X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Farm%2Flib%2Fcrt0_64.S;h=04afa518acf011b58ae28664e03480b31d6a00c1;hb=45fa59b407163abbb553d7cd333b1302e878683a;hp=9cb70552fedad205d0dba215134dbb12324b9906;hpb=b55c89ce0207d3a504238c1b8f268c56035656a3;p=oweals%2Fu-boot.git diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 9cb70552fe..04afa518ac 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * crt0 - C-runtime startup Code for AArch64 U-Boot * @@ -6,8 +7,6 @@ * * (C) Copyright 2012 * Albert ARIBAUD - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -73,6 +72,9 @@ ENTRY(_main) ldr x0, =(CONFIG_TPL_STACK) #elif defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK) ldr x0, =(CONFIG_SPL_STACK) +#elif defined(CONFIG_INIT_SP_RELATIVE) + adr x0, __bss_start + add x0, x0, #CONFIG_SYS_INIT_SP_BSS_OFFSET #else ldr x0, =(CONFIG_SYS_INIT_SP_ADDR) #endif @@ -118,6 +120,7 @@ relocation_return: */ bl c_runtime_cpu_setup /* still call old routine */ #endif /* !CONFIG_SPL_BUILD */ +#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(FRAMEWORK) #if defined(CONFIG_SPL_BUILD) bl spl_relocate_stack_gd /* may return NULL */ /* set up gd here, outside any C code, if new stack is returned */ @@ -150,5 +153,6 @@ clear_loop: b board_init_r /* PC relative jump */ /* NOTREACHED - board_init_r() does not return */ +#endif ENDPROC(_main)