summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorManfred Schlaegl <manfred.schlaegl@ginzinger.com>2017-05-10 15:41:32 +0200
committerPeng Fan <peng.fan@nxp.com>2017-05-11 15:03:12 +0800
commitb505caa5b83e42130772d9b3804c459d09ad6e10 (patch)
treed354b9892404c8d26ac23cb4998bfa24a89c9098 /arch/arm
parent95b2ee328ead6899a78ce92fe9bf27547ced6671 (diff)
downloadu-boot-imx-b505caa5b83e42130772d9b3804c459d09ad6e10.zip
u-boot-imx-b505caa5b83e42130772d9b3804c459d09ad6e10.tar.gz
u-boot-imx-b505caa5b83e42130772d9b3804c459d09ad6e10.tar.bz2
ARM: fixed relocation using proper alignment
Using u-boot-2017.05 on i.MX6UL we ran into following problem: Initially U-Boot could be started normally. If we added one random command in configuration, the newly generated image hung at startup (last output was DRAM: 256 MiB). We tracked this down to a data abort within relocation (relocated_code). relocated_code in arch/arm/lib/relocate.S copies 8 bytes per loop iteration until the source pointer is equal to __image_copy_end. In a good case __image_copy_end was aligned to 8 bytes, so the loop stopped as suggested, but in an errornous case __image_copy_end was not aligned to 8 bytes, so the loop ran out of bounds and caused a data abort exception. This patches solves the issue by aligning __image_copy_end to 8 byte using the linker script related to arm. From Community: http://patchwork.ozlabs.org/patch/760592/ Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/cpu/u-boot.lds2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
index 38defae..aaf7191 100644
--- a/arch/arm/cpu/u-boot.lds
+++ b/arch/arm/cpu/u-boot.lds
@@ -165,7 +165,7 @@ SECTIONS
*(.__efi_runtime_rel_stop)
}
- . = ALIGN(4);
+ . = ALIGN(8);
.image_copy_end :
{