public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] armv8: update gd after relocate
@ 2017-11-03  2:10 Kever Yang
  2017-11-03  8:18 ` Dr. Philipp Tomsich
  2017-11-17 15:44 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Kever Yang @ 2017-11-03  2:10 UTC (permalink / raw)
  To: u-boot

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>
---

 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-07 21:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03  2:10 [U-Boot] [PATCH] armv8: update gd after relocate Kever Yang
2017-11-03  8:18 ` Dr. Philipp Tomsich
2017-11-17 15:44 ` [U-Boot] " Tom Rini
2017-12-07 21:26   ` York Sun
2017-12-07 21:31     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox