lib/Kconfig: Remove RAMSTAGE_CBMEM_TOP_ARG
All targets now have the _cbmem_top_ptr symbol populated via calling
arguments or in the nvidia/tegra210 case worked around by populating
it with cbmem_top_chipset explicitly at the start of ramstage, so the
Kconfig guarding this behavior can be removed.
Change-Id: Ie7467629e58700e4d29f6e735840c22ed687f880
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36422
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/arch/arm/Kconfig b/src/arch/arm/Kconfig
index 9e10378..47c333b 100644
--- a/src/arch/arm/Kconfig
+++ b/src/arch/arm/Kconfig
@@ -17,7 +17,6 @@
config ARCH_RAMSTAGE_ARM
bool
select ARCH_ARM
- select RAMSTAGE_CBMEM_TOP_ARG
source src/arch/arm/armv4/Kconfig
source src/arch/arm/armv7/Kconfig
diff --git a/src/arch/arm64/Kconfig b/src/arch/arm64/Kconfig
index c7eafe6..3d1d184 100644
--- a/src/arch/arm64/Kconfig
+++ b/src/arch/arm64/Kconfig
@@ -17,7 +17,6 @@
config ARCH_RAMSTAGE_ARM64
bool
select ARCH_ARM64
- select RAMSTAGE_CBMEM_TOP_ARG
source src/arch/arm64/armv8/Kconfig
diff --git a/src/arch/mips/Kconfig b/src/arch/mips/Kconfig
index 321bfc9..9df514b 100644
--- a/src/arch/mips/Kconfig
+++ b/src/arch/mips/Kconfig
@@ -22,7 +22,6 @@
default n
select BOOTBLOCK_CUSTOM
select C_ENVIRONMENT_BOOTBLOCK
- select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_VERSTAGE_MIPS
bool
diff --git a/src/arch/ppc64/Kconfig b/src/arch/ppc64/Kconfig
index da9c155..0699e91 100644
--- a/src/arch/ppc64/Kconfig
+++ b/src/arch/ppc64/Kconfig
@@ -1,6 +1,5 @@
config ARCH_PPC64
bool
- select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_BOOTBLOCK_PPC64
bool
diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig
index 9ee781b..f2ca571 100644
--- a/src/arch/riscv/Kconfig
+++ b/src/arch/riscv/Kconfig
@@ -90,7 +90,6 @@
config ARCH_RAMSTAGE_RISCV
bool
default n
- select RAMSTAGE_CBMEM_TOP_ARG
config RISCV_USE_ARCH_TIMER
bool
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 37b7d2d..c5a5642 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -16,7 +16,6 @@
default n
select PCI
select RELOCATABLE_MODULES
- select RAMSTAGE_CBMEM_TOP_ARG
# stage selectors for x86
diff --git a/src/lib/Kconfig b/src/lib/Kconfig
index b94ac49..cb1e4a5 100644
--- a/src/lib/Kconfig
+++ b/src/lib/Kconfig
@@ -24,12 +24,6 @@
help
Selected by features that require `libhwbase` in ramstage.
-config RAMSTAGE_CBMEM_TOP_ARG
- bool
- help
- Select this if stages run after romstage get the cbmem_top
- pointer as the function arguments when called from romstage.
-
config FLATTENED_DEVICE_TREE
bool
help
diff --git a/src/lib/imd_cbmem.c b/src/lib/imd_cbmem.c
index cbd4b8f..38620d2 100644
--- a/src/lib/imd_cbmem.c
+++ b/src/lib/imd_cbmem.c
@@ -51,16 +51,14 @@
void *cbmem_top(void)
{
- if (ENV_ROMSTAGE
- || ((ENV_POSTCAR || ENV_RAMSTAGE)
- && !CONFIG(RAMSTAGE_CBMEM_TOP_ARG))) {
+ if (ENV_ROMSTAGE) {
MAYBE_STATIC_BSS void *top = NULL;
if (top)
return top;
top = cbmem_top_chipset();
return top;
}
- if ((ENV_POSTCAR || ENV_RAMSTAGE) && CONFIG(RAMSTAGE_CBMEM_TOP_ARG))
+ if (ENV_POSTCAR || ENV_RAMSTAGE)
return (void *)_cbmem_top_ptr;
dead_code();