On Tue, Feb 04, 2025 at 06:54:51PM -0700, Simon Glass wrote:
> VPL has the same needs as TPL in situations where the stack is at the
> top of SRAM. Add an option for this and implement it for arm
> 
> Signed-off-by: Simon Glass <[email protected]>
> ---
> 
>  arch/arm/lib/crt0_64.S |  4 +++-
>  common/spl/Kconfig.vpl | 13 +++++++++++++
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
> index 32401f544a7..122e0217470 100644
> --- a/arch/arm/lib/crt0_64.S
> +++ b/arch/arm/lib/crt0_64.S
> @@ -71,7 +71,9 @@ ENTRY(_main)
>   */
>  #if defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_NEEDS_SEPARATE_STACK)
>       ldr     x0, =(CONFIG_TPL_STACK)
> -#elif defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_STACK)
> +#elif defined(CONFIG_VPL_BUILD) && defined(CONFIG_VPL_NEEDS_SEPARATE_STACK)
> +     ldr     x0, =(CONFIG_VPL_STACK)
> +#elif defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK)
>       ldr     x0, =(CONFIG_SPL_STACK)
>  #elif defined(CONFIG_INIT_SP_RELATIVE)
>  #if CONFIG_POSITION_INDEPENDENT

We should rename CONFIG_SPL_STACK to CONFIG_SPL_NEEDS_SEPARATE_STACK so
that this can be tidied up to something like:
#if defined(CONFIG_XPL_BUILD) && CONFIG_IS_ENABLED(NEEDS_SEPARATE_STACK)
        ldr     x0, =CONFIG_VAL(STACK)
#endif

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to