summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>2014-09-03 23:32:34 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-09-11 18:04:39 +0200
commita7f99bf139b3aaa0d5494693fd0395084355e41a (patch)
tree8b63441b3c5c53521a4635be5072c41000291f06 /arch/arm
parent58f9e1ae6391a1fbb7ca024ae45e288aabb88807 (diff)
downloadu-boot-imx-a7f99bf139b3aaa0d5494693fd0395084355e41a.zip
u-boot-imx-a7f99bf139b3aaa0d5494693fd0395084355e41a.tar.gz
u-boot-imx-a7f99bf139b3aaa0d5494693fd0395084355e41a.tar.bz2
arm: Fix _start for CONFIG_SYS_DV_NOR_BOOT_CFG
The boards using CONFIG_SYS_DV_NOR_BOOT_CFG (i.e. calimain, da850evm_direct_nor and enbw_cmc) had the _start symbol defined after the CONFIG_SYS_DV_NOR_BOOT_CFG word rather than before it in arch/arm/lib/vectors.S. Because of that, if by lack of luck 'gd->mon_len = (ulong)&__bss_end - (ulong)_start' (see setup_mon_len()) was a multiple of 4 kiB (see reserve_uboot()), then the last BSS word overlapped the first word of the following reserved RAM area (or went beyond the top of RAM without such an area) after relocation because __image_copy_start did not match _start (see relocate_code()). This was broken by commit 41623c9 'arm: move exception handling out of start.S files', which defined _start twice (before and after the CONFIG_SYS_DV_NOR_BOOT_CFG word), then by commit 0a26e1d 'arm: fix a double-definition error of _start symbol', which kept the definition of the _start symbol after the CONFIG_SYS_DV_NOR_BOOT_CFG word. This new commit fixes this issue by restoring the original behavior, i.e. by defining the _start symbol before the CONFIG_SYS_DV_NOR_BOOT_CFG word. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Manfred Rudigier <manfred.rudigier@omicron.at> Cc: Christian Riesch <christian.riesch@omicron.at> Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Cc: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/lib/vectors.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index 843b18f..0cb87ce 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -45,11 +45,12 @@
*************************************************************************
*/
+_start:
+
#ifdef CONFIG_SYS_DV_NOR_BOOT_CFG
.word CONFIG_SYS_DV_NOR_BOOT_CFG
#endif
-_start:
b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt