Message ID | 1501065662-52029-16-git-send-email-philipp.tomsich@theobroma-systems.com |
---|---|
State | Superseded |
Delegated to: | Philipp Tomsich |
Headers | show |
On Wed, Jul 26, 2017 at 12:40:19PM +0200, Philipp Tomsich wrote: > To allow a TPL and SPL to run from different addresses/memories, we > need to split setup of the TPL and SPL stacks. To do so, we introduce > CONFIG_TPL_STACK (not listed in Kconfig) which can be used to override > the initial stack pointer for TPL. > > To provide backward compatibility for existing boards, this is added > as an optional configuration item and the normal search order (i.e. > SPL_STACK, then SYS_STACK) apply if not defined. > > Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Tom Rini <trini@konsulko.com>
On 26 July 2017 at 04:40, Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote: > To allow a TPL and SPL to run from different addresses/memories, we > need to split setup of the TPL and SPL stacks. To do so, we introduce > CONFIG_TPL_STACK (not listed in Kconfig) which can be used to override > the initial stack pointer for TPL. > > To provide backward compatibility for existing boards, this is added > as an optional configuration item and the normal search order (i.e. > SPL_STACK, then SYS_STACK) apply if not defined. > > Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> > --- > > Changes in v2: None > > arch/arm/lib/crt0_64.S | 4 +++- > scripts/config_whitelist.txt | 1 + > 2 files changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 57e728f..177b5bf 100644 --- a/arch/arm/lib/crt0_64.S +++ b/arch/arm/lib/crt0_64.S @@ -69,7 +69,9 @@ ENTRY(_main) /* * Set up initial C runtime environment and call board_init_f(0). */ -#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK) +#if defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_STACK) + ldr x0, =(CONFIG_TPL_STACK) +#elif defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_STACK) ldr x0, =(CONFIG_SPL_STACK) #else ldr x0, =(CONFIG_SYS_INIT_SP_ADDR) diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 1ab6101..34aadc5 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -4997,6 +4997,7 @@ CONFIG_TI_SPI_MMAP CONFIG_TMU_TIMER CONFIG_TPL_DRIVERS_MISC_SUPPORT CONFIG_TPL_PAD_TO +CONFIG_TPL_STACK CONFIG_TPM_TIS_BASE_ADDRESS CONFIG_TPS6586X_POWER CONFIG_TQM834X
To allow a TPL and SPL to run from different addresses/memories, we need to split setup of the TPL and SPL stacks. To do so, we introduce CONFIG_TPL_STACK (not listed in Kconfig) which can be used to override the initial stack pointer for TPL. To provide backward compatibility for existing boards, this is added as an optional configuration item and the normal search order (i.e. SPL_STACK, then SYS_STACK) apply if not defined. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> --- Changes in v2: None arch/arm/lib/crt0_64.S | 4 +++- scripts/config_whitelist.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-)