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. Change-Id: I9fdfbbb13a7b0a572d7aa8394f754148c6285669 Signed-off-by: zijun_hu <zijun_hu@htc.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 01a835998935b78c31e80227358ac11212d60878)
This commit is contained in:
parent
e6d8fad507
commit
51380c3b1c
|
|
@ -95,8 +95,7 @@ ENTRY(_main)
|
|||
*/
|
||||
ldr x0, [x18, #GD_START_ADDR_SP] /* x0 <- gd->start_addr_sp */
|
||||
bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */
|
||||
ldr x18, [x18, #GD_BD] /* x18 <- gd->bd */
|
||||
sub x18, x18, #GD_SIZE /* new GD is below bd */
|
||||
ldr x18, [x18, #GD_NEW_GD] /* x18 <- gd->new_gd */
|
||||
|
||||
adr lr, relocation_return
|
||||
ldr x9, [x18, #GD_RELOC_OFF] /* x9 <- gd->reloc_off */
|
||||
|
|
|
|||
|
|
@ -41,5 +41,7 @@ int main(void)
|
|||
DEFINE(PM_CTX_SIZE, sizeof(struct pm_ctx));
|
||||
DEFINE(PM_CTX_PHYS, offsetof(struct global_data, pm_ctx_phys));
|
||||
|
||||
DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue