diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index da7c62c..ccefce0 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -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