aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStefan Bosch2024-01-26 12:50:55 +0000
committerTom Rini2024-03-01 18:34:08 -0500
commitd819250c2af656cad7e0bf0cbf9529f3b8a5e7d2 (patch)
treeb47c678bb70b32eb69662c63462732c5c6c9b3c9 /common
parent15f832a7dc1082f0fff87e07b3752fe8c324ee48 (diff)
common: board_f: change calculation of gd->mon_len to fix s5p4418 reloc
ARCH_NEXELL: Change calculation of monitor length (gd->mon_len) to fix relocation at boards with s5p4418-SoC (ARCH_NEXELL). At s5p4418, _start is after the header (NSIH). Therefore the monitor length has to be calculated using __image_copy_start instead of _start in order the whole monitor code is relocated. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 7e313691028..8bada6ff2ee 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -282,7 +282,9 @@ static int init_func_i2c(void)
static int setup_mon_len(void)
{
-#if defined(__ARM__) || defined(__MICROBLAZE__)
+#if defined(CONFIG_ARCH_NEXELL)
+ gd->mon_len = (ulong)__bss_end - (ulong)__image_copy_start;
+#elif defined(__ARM__) || defined(__MICROBLAZE__)
gd->mon_len = (ulong)__bss_end - (ulong)_start;
#elif defined(CONFIG_SANDBOX) && !defined(__riscv)
gd->mon_len = (ulong)_end - (ulong)_init;