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
bool
select ARCH_ARM
select RAMSTAGE_CBMEM_TOP_ARG
source src/arch/arm/armv4/Kconfig
source src/arch/arm/armv7/Kconfig

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -24,12 +24,6 @@ config RAMSTAGE_LIBHWBASE
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

View File

@ -51,16 +51,14 @@ uintptr_t _cbmem_top_ptr;
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();