[U-Boot] [PATCH] armv8: update gd after relocate

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

On 3 Nov 2017, at 03:10, Kever Yang kever.yang@rock-chips.com wrote:
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

On Fri, Nov 03, 2017 at 10:10:27AM +0800, Kever Yang wrote:
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
Applied to u-boot/master, thanks!

On 11/17/2017 08:07 AM, Tom Rini wrote:
On Fri, Nov 03, 2017 at 10:10:27AM +0800, Kever Yang wrote:
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
Applied to u-boot/master, thanks!
Tom,
I didn't notice this patch until I found it broke my SPL boot. I have sent a patch to fix. Please review http://patchwork.ozlabs.org/patch/845850/.
York

On Thu, Dec 07, 2017 at 09:26:58PM +0000, York Sun wrote:
On 11/17/2017 08:07 AM, Tom Rini wrote:
On Fri, Nov 03, 2017 at 10:10:27AM +0800, Kever Yang wrote:
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
Applied to u-boot/master, thanks!
Tom,
I didn't notice this patch until I found it broke my SPL boot. I have sent a patch to fix. Please review http://patchwork.ozlabs.org/patch/845850/.
Sorry about that, thanks!
participants (4)
-
Dr. Philipp Tomsich
-
Kever Yang
-
Tom Rini
-
York Sun