diff mbox series

bootstash: Do not provide a default address for all

Message ID 20240703212338.1436606-1-trini@konsulko.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series bootstash: Do not provide a default address for all | expand

Commit Message

Tom Rini July 3, 2024, 9:23 p.m. UTC
A valid memory location to stash bootstage information at will be
architecture dependent. Move the existing defaults to the main Kconfig
file for this option and set 0x0 as the default only for sandbox.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Cc: Simon Glass <sjg@chromium.org>
---
 arch/arm/mach-stm32mp/Kconfig.13x | 3 ---
 arch/arm/mach-stm32mp/Kconfig.15x | 3 ---
 arch/arm/mach-stm32mp/Kconfig.25x | 3 ---
 boot/Kconfig                      | 4 +++-
 4 files changed, 3 insertions(+), 10 deletions(-)

Comments

Simon Glass July 5, 2024, 8:36 a.m. UTC | #1
Hi Tom,

On Wed, 3 Jul 2024 at 22:23, Tom Rini <trini@konsulko.com> wrote:
>
> A valid memory location to stash bootstage information at will be
> architecture dependent. Move the existing defaults to the main Kconfig
> file for this option and set 0x0 as the default only for sandbox.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Cc: Simon Glass <sjg@chromium.org>
> ---
>  arch/arm/mach-stm32mp/Kconfig.13x | 3 ---
>  arch/arm/mach-stm32mp/Kconfig.15x | 3 ---
>  arch/arm/mach-stm32mp/Kconfig.25x | 3 ---
>  boot/Kconfig                      | 4 +++-
>  4 files changed, 3 insertions(+), 10 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

But from my previous investigations, having no default for a hex
option can cause the build to hang unless the user is presentt, since
the build keeps asking for the value. I added support in buildman to
try to detect this, so we'll see how it goes.

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/arm/mach-stm32mp/Kconfig.13x b/arch/arm/mach-stm32mp/Kconfig.13x
index 4d74b35055b8..bc8b3f8cf77f 100644
--- a/arch/arm/mach-stm32mp/Kconfig.13x
+++ b/arch/arm/mach-stm32mp/Kconfig.13x
@@ -28,9 +28,6 @@  config PRE_CON_BUF_ADDR
 config PRE_CON_BUF_SZ
 	default 4096
 
-config BOOTSTAGE_STASH_ADDR
-	default 0xC3000000
-
 if BOOTCOUNT_GENERIC
 config SYS_BOOTCOUNT_SINGLEWORD
 	default y
diff --git a/arch/arm/mach-stm32mp/Kconfig.15x b/arch/arm/mach-stm32mp/Kconfig.15x
index d99aa9fd694a..42da36a73e85 100644
--- a/arch/arm/mach-stm32mp/Kconfig.15x
+++ b/arch/arm/mach-stm32mp/Kconfig.15x
@@ -86,9 +86,6 @@  config PRE_CON_BUF_ADDR
 config PRE_CON_BUF_SZ
 	default 4096
 
-config BOOTSTAGE_STASH_ADDR
-	default 0xC3000000
-
 if BOOTCOUNT_GENERIC
 config SYS_BOOTCOUNT_SINGLEWORD
 	default y
diff --git a/arch/arm/mach-stm32mp/Kconfig.25x b/arch/arm/mach-stm32mp/Kconfig.25x
index 2c0f691f8b54..7d2d8171845b 100644
--- a/arch/arm/mach-stm32mp/Kconfig.25x
+++ b/arch/arm/mach-stm32mp/Kconfig.25x
@@ -24,9 +24,6 @@  config PRE_CON_BUF_ADDR
 config PRE_CON_BUF_SZ
 	default 4096
 
-config BOOTSTAGE_STASH_ADDR
-	default 0x87000000
-
 if DEBUG_UART
 
 config DEBUG_UART_BOARD_INIT
diff --git a/boot/Kconfig b/boot/Kconfig
index 11175fb7bb26..6fb77b23f3c8 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -1002,7 +1002,9 @@  config BOOTSTAGE_STASH
 
 config BOOTSTAGE_STASH_ADDR
 	hex "Address to stash boot timing information"
-	default 0x0
+	default 0xC3000000 if STM32MP13X || STM32MP15X
+	default 0x87000000 if STM32MP25X
+	default 0x0 if SANDBOX
 	help
 	  Provide an address which will not be overwritten by the OS when it
 	  starts, so that it can read this information when ready.