path: root/dts/src/arm
diff options
authorAhmad Fatoum <>2021-04-03 09:03:32 +0200
committerSascha Hauer <>2021-04-13 09:48:27 +0200
commit9ac300c34b31213ca570c80c22bd55477ecd5700 (patch)
treec4b43c86a029cfe0f4d367fce21802a8962ad677 /dts/src/arm
parente4ee908a4f124f36c92c7d8712882c201c9165b3 (diff)
RISC-V: boot: uncompress: determine piggy data bounds before relocationHEADmaster
Like on ARM, the PBL common code does not relocate the piggy data and instead keeps pointers into the old image's location. For relocate_to_current_adr, this doesn't matter, because both destination and source address are the same, but when running from ROM or flash relocate_to_adr will only copy up to __bss_start, so determining the piggy data bounds _must_ happen before relocation. We did so, but input_data_len, which references the image end was executed after relocation unearthing two bugs at once: - The compiler cached input_data_end from before relocation, so the runtime offset wasn't being added - Even with runtime offset added, we were pointing at the new address, but the old piggy data wasn't copied there (On erizo, it's still in ROM) Fix these by evaluating the bounds before relocation and add a comment, why it needs to be there. The same comment will also be added at the code's origin in the ARM architecture support. Reported-by: Antony Pavlov <> Signed-off-by: Ahmad Fatoum <> Link: Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'dts/src/arm')
0 files changed, 0 insertions, 0 deletions