Commit a7f99bf1 authored by Benoît Thébaudeau's avatar Benoît Thébaudeau Committed by Albert ARIBAUD
Browse files

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 41623c91 '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 0a26e1d6

 '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: default avatarBenoît Thébaudeau <>
Cc: Albert Aribaud <>
Cc: Manfred Rudigier <>
Cc: Christian Riesch <>
Cc: Sudhakar Rajashekhara <>
Cc: Heiko Schocher <>
parent 58f9e1ae
......@@ -45,11 +45,12 @@
b reset
ldr pc, _undefined_instruction
ldr pc, _software_interrupt
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment