]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
armv8: update gd after relocate
authorKever Yang <kever.yang@rock-chips.com>
Fri, 3 Nov 2017 02:10:27 +0000 (10:10 +0800)
committerTom Rini <trini@konsulko.com>
Fri, 17 Nov 2017 12:44:13 +0000 (07:44 -0500)
We need to update gd in assamble code after relocate,
this is a fix to:
adc421e arm: move gd handling outside of C code

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
arch/arm/lib/crt0_64.S

index da7c62cbe0aa2ae04eca2ad961e1f02aa5dbe3e2..ccefce0b20a4658d383c61f7981009ca6855cd0f 100644 (file)
@@ -120,6 +120,8 @@ relocation_return:
 #endif /* !CONFIG_SPL_BUILD */
 #if defined(CONFIG_SPL_BUILD)
        bl      spl_relocate_stack_gd           /* may return NULL */
+       /* set up gd here, outside any C code */
+       mov     x18, x0
        /*
         * Perform 'sp = (x0 != NULL) ? x0 : sp' while working
         * around the constraint that conditional moves can not