aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/lib/crt0_64.S
diff options
context:
space:
mode:
authorzijun_hu <zijun_hu@htc.com>2017-09-22 14:39:13 +0800
committerTom Rini <trini@konsulko.com>2017-10-08 16:19:56 -0400
commit01a835998935b78c31e80227358ac11212d60878 (patch)
tree9dcb150319ba00dcbc78b954af4570573de0824f /arch/arm/lib/crt0_64.S
parent0d3aaa35b87573c229d65bc79050ab13f39d8ec2 (diff)
downloadu-boot-01a835998935b78c31e80227358ac11212d60878.zip
u-boot-01a835998935b78c31e80227358ac11212d60878.tar.gz
u-boot-01a835998935b78c31e80227358ac11212d60878.tar.bz2
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>
Diffstat (limited to 'arch/arm/lib/crt0_64.S')
-rw-r--r--arch/arm/lib/crt0_64.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index 62fad45..9c46c93 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -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 */