From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kever Yang Date: Fri, 3 Nov 2017 10:10:27 +0800 Subject: [U-Boot] [PATCH] armv8: update gd after relocate Message-ID: <1509675027-18757-1-git-send-email-kever.yang@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/arm/lib/crt0_64.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 62fad45..2008b76 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -113,6 +113,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 -- 1.9.1