console: Simplify bootblock console Kconfig selection logic

Instead of depending BOOTBLOCK_CONSOLE on a set of architectures,
allow the arch or platform to specify whether it can provide a C
environment. This simplifies the selection logic.

Change-Id: Ia3e41796d9aea197cee0a073acce63761823c3aa
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/12871
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Alexandru Gagniuc 2015-10-02 18:01:18 -07:00 committed by Aaron Durbin
parent cc96624de4
commit ee464b17ce
6 changed files with 11 additions and 1 deletions

View File

@ -271,6 +271,12 @@ config BOOTBLOCK_SOURCE
default "bootblock_simple.c" if BOOTBLOCK_SIMPLE
default "bootblock_normal.c" if BOOTBLOCK_NORMAL
# To be selected by arch or platform if a C environment is available during the
# bootblock. Normally this signifies availability of RW memory (e.g. SRAM).
config C_ENVIRONMENT_BOOTBLOCK
bool
default n
config SKIP_MAX_REBOOT_CNT_CLEAR
bool "Do not clear reboot count after successful boot"
default n

View File

@ -6,6 +6,7 @@ config ARCH_BOOTBLOCK_ARM
bool
default n
select ARCH_ARM
select C_ENVIRONMENT_BOOTBLOCK
config ARCH_VERSTAGE_ARM
bool

View File

@ -6,6 +6,7 @@ config ARCH_BOOTBLOCK_ARM64
bool
default n
select ARCH_ARM64
select C_ENVIRONMENT_BOOTBLOCK
config ARCH_VERSTAGE_ARM64
bool

View File

@ -23,6 +23,7 @@ config ARCH_BOOTBLOCK_MIPS
default n
select ARCH_MIPS
select BOOTBLOCK_CUSTOM
select C_ENVIRONMENT_BOOTBLOCK
config ARCH_VERSTAGE_MIPS
bool

View File

@ -7,6 +7,7 @@ config ARCH_BOOTBLOCK_RISCV
default n
select ARCH_RISCV
select BOOTBLOCK_CUSTOM
select C_ENVIRONMENT_BOOTBLOCK
config ARCH_VERSTAGE_RISCV
bool

View File

@ -2,7 +2,7 @@ menu "Console"
config BOOTBLOCK_CONSOLE
bool "Enable early (bootblock) console output."
depends on ARCH_ARM || ARCH_ARM64 || ARCH_RISCV || ARCH_MIPS
depends on C_ENVIRONMENT_BOOTBLOCK
default n
help
Use console during the bootblock if supported