Message ID | 20231127182609.4663-2-stefan_b@posteo.net |
---|---|
State | Accepted |
Delegated to: | Minkyu Kang |
Headers | show |
Series | arm: s5p4418: fix relocation | expand |
On Mon, 27 Nov 2023 at 11:28, Stefan Bosch <stefan_b@posteo.net> wrote: > > ARM and MICROBLAZE: Change calculation of monitor length (gd->mon_len) > to fix relocation at boards with s5p4418-SoC. 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> > --- > > Changes in v2: > - Cosmetic: Fix spelling mistake in commit message > > common/board_f.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Simon Glass <sjg@chromium.org> > diff --git a/common/board_f.c b/common/board_f.c > index d4d7d01f8f..d2e4d9eae2 100644 > --- a/common/board_f.c > +++ b/common/board_f.c > @@ -283,7 +283,7 @@ static int init_func_i2c(void) > static int setup_mon_len(void) > { > #if defined(__ARM__) || defined(__MICROBLAZE__) > - gd->mon_len = (ulong)__bss_end - (ulong)_start; > + gd->mon_len = (ulong)__bss_end - (ulong)__image_copy_start; > #elif defined(CONFIG_SANDBOX) && !defined(__riscv) > gd->mon_len = (ulong)_end - (ulong)_init; > #elif defined(CONFIG_SANDBOX) > -- > 2.17.1 >
diff --git a/common/board_f.c b/common/board_f.c index d4d7d01f8f..d2e4d9eae2 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -283,7 +283,7 @@ static int init_func_i2c(void) static int setup_mon_len(void) { #if defined(__ARM__) || defined(__MICROBLAZE__) - gd->mon_len = (ulong)__bss_end - (ulong)_start; + gd->mon_len = (ulong)__bss_end - (ulong)__image_copy_start; #elif defined(CONFIG_SANDBOX) && !defined(__riscv) gd->mon_len = (ulong)_end - (ulong)_init; #elif defined(CONFIG_SANDBOX)
ARM and MICROBLAZE: Change calculation of monitor length (gd->mon_len) to fix relocation at boards with s5p4418-SoC. 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> --- Changes in v2: - Cosmetic: Fix spelling mistake in commit message common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)