]> git.sur5r.net Git - u-boot/commitdiff
armv8: spl: Support separate stack for TPL
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 4 Jul 2017 09:02:14 +0000 (11:02 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 13 Aug 2017 15:12:21 +0000 (17:12 +0200)
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: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/lib/crt0_64.S
scripts/config_whitelist.txt

index 57e728f9f2a36be2781442b4a9f4da3204fad1c1..177b5bf31deeb72936786a2dec07c1e966977f7a 100644 (file)
@@ -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)
index f509984d77566e19ef3f8b51b059bb38e672ff45..93c53a3341e5c0dc8ea3d0c1d1d1d911234e9e0c 100644 (file)
@@ -4911,6 +4911,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