]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common: board_f: change calculation of gd->mon_len to fix s5p4418 reloc
authorStefan Bosch <stefan_b@posteo.net>
Fri, 26 Jan 2024 12:50:55 +0000 (12:50 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 1 Mar 2024 23:34:08 +0000 (18:34 -0500)
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>
common/board_f.c

index 7e3136910282835df7a897005934537000e542ce..8bada6ff2eec121aa69650bb844c8740ae12d835 100644 (file)
@@ -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;