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>
This commit is contained in:
Arthur Heymans 2019-10-29 07:32:48 +01:00 committed by Nico Huber
parent 55069d15d8
commit c4c5d85c22
8 changed files with 2 additions and 16 deletions

View File

@ -17,7 +17,6 @@ config ARCH_ROMSTAGE_ARM
config ARCH_RAMSTAGE_ARM config ARCH_RAMSTAGE_ARM
bool bool
select ARCH_ARM select ARCH_ARM
select RAMSTAGE_CBMEM_TOP_ARG
source src/arch/arm/armv4/Kconfig source src/arch/arm/armv4/Kconfig
source src/arch/arm/armv7/Kconfig source src/arch/arm/armv7/Kconfig

View File

@ -17,7 +17,6 @@ config ARCH_ROMSTAGE_ARM64
config ARCH_RAMSTAGE_ARM64 config ARCH_RAMSTAGE_ARM64
bool bool
select ARCH_ARM64 select ARCH_ARM64
select RAMSTAGE_CBMEM_TOP_ARG
source src/arch/arm64/armv8/Kconfig source src/arch/arm64/armv8/Kconfig

View File

@ -22,7 +22,6 @@ config ARCH_BOOTBLOCK_MIPS
default n default n
select BOOTBLOCK_CUSTOM select BOOTBLOCK_CUSTOM
select C_ENVIRONMENT_BOOTBLOCK select C_ENVIRONMENT_BOOTBLOCK
select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_VERSTAGE_MIPS config ARCH_VERSTAGE_MIPS
bool bool

View File

@ -1,6 +1,5 @@
config ARCH_PPC64 config ARCH_PPC64
bool bool
select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_BOOTBLOCK_PPC64 config ARCH_BOOTBLOCK_PPC64
bool bool

View File

@ -90,7 +90,6 @@ config ARCH_ROMSTAGE_RISCV
config ARCH_RAMSTAGE_RISCV config ARCH_RAMSTAGE_RISCV
bool bool
default n default n
select RAMSTAGE_CBMEM_TOP_ARG
config RISCV_USE_ARCH_TIMER config RISCV_USE_ARCH_TIMER
bool bool

View File

@ -16,7 +16,6 @@ config ARCH_X86
default n default n
select PCI select PCI
select RELOCATABLE_MODULES select RELOCATABLE_MODULES
select RAMSTAGE_CBMEM_TOP_ARG
# stage selectors for x86 # stage selectors for x86

View File

@ -24,12 +24,6 @@ config RAMSTAGE_LIBHWBASE
help help
Selected by features that require `libhwbase` in ramstage. 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 config FLATTENED_DEVICE_TREE
bool bool
help help

View File

@ -51,16 +51,14 @@ uintptr_t _cbmem_top_ptr;
void *cbmem_top(void) void *cbmem_top(void)
{ {
if (ENV_ROMSTAGE if (ENV_ROMSTAGE) {
|| ((ENV_POSTCAR || ENV_RAMSTAGE)
&& !CONFIG(RAMSTAGE_CBMEM_TOP_ARG))) {
MAYBE_STATIC_BSS void *top = NULL; MAYBE_STATIC_BSS void *top = NULL;
if (top) if (top)
return top; return top;
top = cbmem_top_chipset(); top = cbmem_top_chipset();
return top; return top;
} }
if ((ENV_POSTCAR || ENV_RAMSTAGE) && CONFIG(RAMSTAGE_CBMEM_TOP_ARG)) if (ENV_POSTCAR || ENV_RAMSTAGE)
return (void *)_cbmem_top_ptr; return (void *)_cbmem_top_ptr;
dead_code(); dead_code();