Clean up architecture-specific Kconfigs
It's an unfortunate side effect of our different-archs-per-stage mechanism that all src/arch/*/Kconfig files are always parsed with no if blocks to exclude them if they're not relevant. This makes it very easy to accidentally rely on a Kconfig default set by a totally different and not applying architecture. This patch moves a few Kconfigs from ARM and X86 that leaked out like this into a common Kconfig file for clarity. It also gives ARM64 its own BOOTBLOCK_CUSTOM mechanism so that it doesn't leech off the ARM one (currently not used by any board). In the future, we should maybe prefix all options in the arch/*/Kconfig files with the architecture name (such as X86_BOOTBLOCK_NORMAL and ARM_LPAE are already doing), to make it more apparent when they are used in the wrong place. BUG=None TEST=None (tested together with dependent changes) Change-Id: I3e8bb3dfbb2c4edada621ce16d130bd7387d4eb8 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 5528aa9252cdf711af3c160da387c6a7bebe9e76 Original-Change-Id: Ieb2d79bae6c6800be0f93ca3489b658008b1dfae Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/219171 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9235 Reviewed-by: Aaron Durbin <adurbin@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
committed by
Patrick Georgi
parent
db273065f6
commit
c3e7c4e7b4
12
src/Kconfig
12
src/Kconfig
@@ -311,6 +311,14 @@ source src/drivers/intel/fsp/Kconfig
|
|||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
config CPU_HAS_BOOTBLOCK_INIT
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
|
||||||
|
config MAINBOARD_HAS_BOOTBLOCK_INIT
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
|
||||||
source src/device/Kconfig
|
source src/device/Kconfig
|
||||||
|
|
||||||
menu "Generic Drivers"
|
menu "Generic Drivers"
|
||||||
@@ -337,6 +345,10 @@ config HEAP_SIZE
|
|||||||
hex
|
hex
|
||||||
default 0x4000
|
default 0x4000
|
||||||
|
|
||||||
|
config STACK_SIZE
|
||||||
|
hex
|
||||||
|
default 0x1000
|
||||||
|
|
||||||
config MAX_CPUS
|
config MAX_CPUS
|
||||||
int
|
int
|
||||||
default 1
|
default 1
|
||||||
|
@@ -24,14 +24,6 @@ config ARM_BOOTBLOCK_CUSTOM
|
|||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config CPU_HAS_BOOTBLOCK_INIT
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config MAINBOARD_HAS_BOOTBLOCK_INIT
|
|
||||||
bool
|
|
||||||
default n
|
|
||||||
|
|
||||||
config ARM_LPAE
|
config ARM_LPAE
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
@@ -26,3 +26,9 @@ config ARCH_SPINTABLE
|
|||||||
depends on ARCH_RAMSTAGE_ARM64
|
depends on ARCH_RAMSTAGE_ARM64
|
||||||
|
|
||||||
source src/arch/arm64/armv8/Kconfig
|
source src/arch/arm64/armv8/Kconfig
|
||||||
|
|
||||||
|
# If a custom bootblock is necessary, this option should be "select"-ed by
|
||||||
|
# the thing that needs it, probably the CPU.
|
||||||
|
config ARM64_BOOTBLOCK_CUSTOM
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
@@ -32,11 +32,10 @@ armv8_asm_flags = $(armv8_flags)
|
|||||||
################################################################################
|
################################################################################
|
||||||
ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV8_64),y)
|
ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV8_64),y)
|
||||||
|
|
||||||
ifneq ($(CONFIG_ARM_BOOTBLOCK_CUSTOM),y)
|
ifneq ($(CONFIG_ARM64_BOOTBLOCK_CUSTOM),y)
|
||||||
bootblock-y += bootblock.S
|
bootblock-y += bootblock.S
|
||||||
|
bootblock-y += bootblock_simple.c
|
||||||
endif
|
endif
|
||||||
bootblock-$(CONFIG_ARM_BOOTBLOCK_SIMPLE) += bootblock_simple.c
|
|
||||||
bootblock-$(CONFIG_ARM_BOOTBLOCK_NORMAL) += bootblock_normal.c
|
|
||||||
bootblock-y += cache.c
|
bootblock-y += cache.c
|
||||||
bootblock-y += cpu.S
|
bootblock-y += cpu.S
|
||||||
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c
|
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += exception.c
|
||||||
|
@@ -49,10 +49,6 @@ config RAMBASE
|
|||||||
hex
|
hex
|
||||||
default 0x100000
|
default 0x100000
|
||||||
|
|
||||||
config STACK_SIZE
|
|
||||||
hex
|
|
||||||
default 0x1000
|
|
||||||
|
|
||||||
# This is something you almost certainly don't want to mess with.
|
# This is something you almost certainly don't want to mess with.
|
||||||
# How many SIPIs do we send when starting up APs and cores?
|
# How many SIPIs do we send when starting up APs and cores?
|
||||||
# The answer in 2000 or so was '2'. Nowadays, on many systems,
|
# The answer in 2000 or so was '2'. Nowadays, on many systems,
|
||||||
|
Reference in New Issue
Block a user