src: Introduce `ARCH_ALL_STAGES_X86`

Introduce the `ARCH_ALL_STAGES_X86` Kconfig symbol to automatically
select the per-stage arch options. Subsequent commits will leverage
this to allow choosing between 32-bit and 64-bit coreboot where all
stages are x86. AMD Picasso and AMD Cezanne are the only exceptions
to this rule: they disable `ARCH_ALL_STAGES_X86` and explicitly set
the per-stage arch options accordingly.

Change-Id: Ia2ddbae8c0dfb5301352d725032f6ebd370428c9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Angel Pons 2021-06-22 15:18:07 +02:00
parent de62f55507
commit 6f5a6581a6
36 changed files with 11 additions and 33 deletions

View File

@ -28,6 +28,7 @@ config ARCH_RAMSTAGE_X86_32
config ARCH_ALL_STAGES_X86_32 config ARCH_ALL_STAGES_X86_32
bool bool
default ARCH_ALL_STAGES_X86 && !ARCH_ALL_STAGES_X86_64
select ARCH_BOOTBLOCK_X86_32 select ARCH_BOOTBLOCK_X86_32
select ARCH_VERSTAGE_X86_32 select ARCH_VERSTAGE_X86_32
select ARCH_ROMSTAGE_X86_32 select ARCH_ROMSTAGE_X86_32
@ -58,6 +59,10 @@ config ARCH_ALL_STAGES_X86_64
select ARCH_ROMSTAGE_X86_64 select ARCH_ROMSTAGE_X86_64
select ARCH_RAMSTAGE_X86_64 select ARCH_RAMSTAGE_X86_64
config ARCH_ALL_STAGES_X86
bool
default y
config ARCH_X86_64_PGTBL_LOC config ARCH_X86_64_PGTBL_LOC
hex "x86_64 page table location in CBFS" hex "x86_64 page table location in CBFS"
depends on ARCH_BOOTBLOCK_X86_64 depends on ARCH_BOOTBLOCK_X86_64

View File

@ -6,7 +6,6 @@ config CPU_AMD_AGESA
default y if CPU_AMD_AGESA_FAMILY15_TN default y if CPU_AMD_AGESA_FAMILY15_TN
default y if CPU_AMD_AGESA_FAMILY16_KB default y if CPU_AMD_AGESA_FAMILY16_KB
default n default n
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select DRIVERS_AMD_PI select DRIVERS_AMD_PI
select TSC_SYNC_LFENCE select TSC_SYNC_LFENCE

View File

@ -4,7 +4,6 @@ config CPU_AMD_PI
bool bool
default y if CPU_AMD_PI_00730F01 default y if CPU_AMD_PI_00730F01
default n default n
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select DRIVERS_AMD_PI select DRIVERS_AMD_PI
select TSC_SYNC_LFENCE select TSC_SYNC_LFENCE

View File

@ -6,7 +6,6 @@ if CPU_INTEL_HASWELL
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES
select MMX select MMX

View File

@ -1,6 +1,5 @@
config CPU_INTEL_MODEL_1067X config CPU_INTEL_MODEL_1067X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SSE2 select SSE2
select UDELAY_TSC select UDELAY_TSC

View File

@ -1,6 +1,5 @@
config CPU_INTEL_MODEL_106CX config CPU_INTEL_MODEL_106CX
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SSE2 select SSE2
select UDELAY_TSC select UDELAY_TSC

View File

@ -5,7 +5,6 @@ if CPU_INTEL_MODEL_2065X
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES
select SSE2 select SSE2

View File

@ -10,7 +10,6 @@ config ARCH_EXP_X86_64
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32 if !ARCH_EXP_X86_64
select ARCH_ALL_STAGES_X86_64 if ARCH_EXP_X86_64 select ARCH_ALL_STAGES_X86_64 if ARCH_EXP_X86_64
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES

View File

@ -1,5 +1,4 @@
config CPU_INTEL_MODEL_65X config CPU_INTEL_MODEL_65X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS

View File

@ -1,5 +1,4 @@
config CPU_INTEL_MODEL_67X config CPU_INTEL_MODEL_67X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS

View File

@ -2,6 +2,5 @@
config CPU_INTEL_MODEL_68X config CPU_INTEL_MODEL_68X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS

View File

@ -1,5 +1,4 @@
config CPU_INTEL_MODEL_6BX config CPU_INTEL_MODEL_6BX
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS

View File

@ -1,6 +1,5 @@
config CPU_INTEL_MODEL_6EX config CPU_INTEL_MODEL_6EX
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SSE2 select SSE2
select UDELAY_TSC select UDELAY_TSC

View File

@ -1,6 +1,5 @@
config CPU_INTEL_MODEL_6FX config CPU_INTEL_MODEL_6FX
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SSE2 select SSE2
select UDELAY_TSC select UDELAY_TSC

View File

@ -1,5 +1,4 @@
config CPU_INTEL_MODEL_6XX config CPU_INTEL_MODEL_6XX
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS

View File

@ -1,6 +1,5 @@
config CPU_INTEL_MODEL_F2X config CPU_INTEL_MODEL_F2X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS
select SMM_ASEG select SMM_ASEG

View File

@ -1,6 +1,5 @@
config CPU_INTEL_MODEL_F3X config CPU_INTEL_MODEL_F3X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS
select CPU_INTEL_COMMON select CPU_INTEL_COMMON

View File

@ -1,5 +1,4 @@
config CPU_INTEL_MODEL_F4X config CPU_INTEL_MODEL_F4X
bool bool
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select SUPPORT_CPU_UCODE_IN_CBFS select SUPPORT_CPU_UCODE_IN_CBFS

View File

@ -57,5 +57,4 @@ config CPU_QEMU_X86_32
bool bool
default n if CPU_QEMU_X86_64 default n if CPU_QEMU_X86_64
default y default y
select ARCH_ALL_STAGES_X86_32
endif endif

View File

@ -70,6 +70,9 @@ config SOC_SPECIFIC_OPTIONS
select X86_AMD_FIXED_MTRRS select X86_AMD_FIXED_MTRRS
select X86_AMD_INIT_SIPI select X86_AMD_INIT_SIPI
config ARCH_ALL_STAGES_X86
default n
config SOC_AMD_COMMON_BLOCK_UCODE_SIZE config SOC_AMD_COMMON_BLOCK_UCODE_SIZE
default 5568 default 5568

View File

@ -69,6 +69,9 @@ config CPU_SPECIFIC_OPTIONS
select UDK_2017_BINDING select UDK_2017_BINDING
select HAVE_CF9_RESET select HAVE_CF9_RESET
config ARCH_ALL_STAGES_X86
default n
config SOC_AMD_COMMON_BLOCK_UCODE_SIZE config SOC_AMD_COMMON_BLOCK_UCODE_SIZE
default 3200 default 3200

View File

@ -10,7 +10,6 @@ if SOC_AMD_STONEYRIDGE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_SOC_NVS select ACPI_SOC_NVS
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
select COLLECT_TIMESTAMPS_NO_TSC select COLLECT_TIMESTAMPS_NO_TSC

View File

@ -14,7 +14,6 @@ if SOC_EXAMPLE_MIN86
config SOC_SPECIFIC_OPTIONS config SOC_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select NO_MONOTONIC_TIMER select NO_MONOTONIC_TIMER
select NO_MMCONF_SUPPORT select NO_MMCONF_SUPPORT

View File

@ -13,7 +13,6 @@ if SOC_INTEL_ALDERLAKE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -24,7 +24,6 @@ config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ACPI_NO_PCAT_8259 select ACPI_NO_PCAT_8259
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
# CPU specific options # CPU specific options

View File

@ -8,7 +8,6 @@ if SOC_INTEL_BAYTRAIL
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES

View File

@ -8,7 +8,6 @@ if SOC_INTEL_BRASWELL
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES select BOOT_DEVICE_SPI_FLASH_NO_EARLY_WRITES
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES

View File

@ -47,7 +47,6 @@ config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ACPI_NHLT select ACPI_NHLT
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -13,7 +13,6 @@ config CPU_INTEL_NUM_FIT_ENTRIES
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select DEBUG_GPIO select DEBUG_GPIO

View File

@ -8,7 +8,6 @@ if SOC_INTEL_ELKHARTLAKE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -8,7 +8,6 @@ if SOC_INTEL_ICELAKE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -8,7 +8,6 @@ if SOC_INTEL_JASPERLAKE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -9,7 +9,6 @@ if SOC_INTEL_QUARK
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select NO_MMCONF_SUPPORT select NO_MMCONF_SUPPORT
select REG_SCRIPT select REG_SCRIPT

View File

@ -23,7 +23,6 @@ config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ACPI_NHLT select ACPI_NHLT
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -8,7 +8,6 @@ if SOC_INTEL_TIGERLAKE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ACPI_INTEL_HARDWARE_SLEEP_VALUES select ACPI_INTEL_HARDWARE_SLEEP_VALUES
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CACHE_MRC_SETTINGS select CACHE_MRC_SETTINGS

View File

@ -26,7 +26,6 @@ if XEON_SP_COMMON_BASE
config CPU_SPECIFIC_OPTIONS config CPU_SPECIFIC_OPTIONS
def_bool y def_bool y
select ARCH_ALL_STAGES_X86_32
select ARCH_X86 select ARCH_X86
select BOOT_DEVICE_SUPPORTS_WRITES select BOOT_DEVICE_SUPPORTS_WRITES
select CPU_INTEL_COMMON select CPU_INTEL_COMMON