Commit 01a835998935b78c31e80227358ac11212d60878
Committed by
Tom Rini
1 parent
0d3aaa35b8
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
ARMv8: get new GD address from gd->new_gd directly
the new GD address is calculated via board data BD currently it require the new GD area locates below BD tightly, so a strict constraint is imposed on memory layout which maybe make special platform unpleasant. fix it by getting new GD address from gd->new_gd directly. Signed-off-by: zijun_hu <zijun_hu@htc.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 3 additions and 2 deletions Side-by-side Diff
arch/arm/lib/crt0_64.S
... | ... | @@ -95,8 +95,7 @@ |
95 | 95 | */ |
96 | 96 | ldr x0, [x18, #GD_START_ADDR_SP] /* x0 <- gd->start_addr_sp */ |
97 | 97 | bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */ |
98 | - ldr x18, [x18, #GD_BD] /* x18 <- gd->bd */ | |
99 | - sub x18, x18, #GD_SIZE /* new GD is below bd */ | |
98 | + ldr x18, [x18, #GD_NEW_GD] /* x18 <- gd->new_gd */ | |
100 | 99 | |
101 | 100 | adr lr, relocation_return |
102 | 101 | ldr x9, [x18, #GD_RELOC_OFF] /* x9 <- gd->reloc_off */ |