payloads/edk2: Disable the CPU Timer Lib unless supported
For recent X86 CPUs, the 0x15 CPUID instruction will return Time Stamp Counter Frequence. For CPUs that do not support this instruction, EDK2 must include a different library which is the reason why this must be configured at build time. If this is enabled, and the CPU doesn't support 0x15, it will fail to boot. If is not enabled, and the CPU does support 0x15, it will still boot but without support for the leaf. Consequently, disabled it by default. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I4f0f43ce50c4f6f7eb03063fff34d015468f6daa Reviewed-on: https://review.coreboot.org/c/coreboot/+/65950 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
This commit is contained in:
committed by
Martin L Roth
parent
27c8bf0cc9
commit
7bbc9a512a
4
payloads/external/Makefile.inc
vendored
4
payloads/external/Makefile.inc
vendored
@@ -164,6 +164,7 @@ $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG)
|
||||
CONFIG_EDK2_REPO_OFFICIAL=$(CONFIG_EDK2_REPO_OFFICIAL) \
|
||||
CONFIG_EDK2_REPO_MRCHROMEBOX=$(CONFIG_EDK2_REPO_MRCHROMEBOX) \
|
||||
CONFIG_EDK2_REPO_CUSTOM=$(CONFIG_EDK2_REPO_CUSTOM) \
|
||||
CONFIG_EDK2_CPU_TIMER_LIB=$(CONFIG_EDK2_CPU_TIMER_LIB) \
|
||||
CONFIG_EDK2_CUSTOM_BUILD_PARAMS=$(CONFIG_EDK2_CUSTOM_BUILD_PARAMS) \
|
||||
CONFIG_EDK2_DEBUG=$(CONFIG_EDK2_DEBUG) \
|
||||
CONFIG_EDK2_RELEASE=$(CONFIG_EDK2_RELEASE) \
|
||||
@@ -182,6 +183,7 @@ $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG)
|
||||
CONFIG_EDK2_SD_MMC_TIMEOUT=$(CONFIG_EDK2_SD_MMC_TIMEOUT) \
|
||||
CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
|
||||
CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \
|
||||
CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \
|
||||
CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_v2) \
|
||||
GCC_CC_x86_32=$(GCC_CC_x86_32) \
|
||||
GCC_CC_x86_64=$(GCC_CC_x86_64) \
|
||||
@@ -203,6 +205,7 @@ $(obj)/ShimmedUniversalPayload.elf: $(DOTCONFIG)
|
||||
CONFIG_EDK2_REPO_OFFICIAL=$(CONFIG_EDK2_REPO_OFFICIAL) \
|
||||
CONFIG_EDK2_REPO_MRCHROMEBOX=$(CONFIG_EDK2_REPO_MRCHROMEBOX) \
|
||||
CONFIG_EDK2_REPO_CUSTOM=$(CONFIG_EDK2_REPO_CUSTOM) \
|
||||
CONFIG_EDK2_CPU_TIMER_LIB=$(CONFIG_EDK2_CPU_TIMER_LIB) \
|
||||
CONFIG_EDK2_CUSTOM_BUILD_PARAMS=$(CONFIG_EDK2_CUSTOM_BUILD_PARAMS) \
|
||||
CONFIG_EDK2_DEBUG=$(CONFIG_EDK2_DEBUG) \
|
||||
CONFIG_EDK2_RELEASE=$(CONFIG_EDK2_RELEASE) \
|
||||
@@ -221,6 +224,7 @@ $(obj)/ShimmedUniversalPayload.elf: $(DOTCONFIG)
|
||||
CONFIG_EDK2_UNIVERSAL_PAYLOAD=$(CONFIG_EDK2_UNIVERSAL_PAYLOAD) \
|
||||
CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
|
||||
CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \
|
||||
CONFIG_CPU_XTAL_HZ=$(CONFIG_CPU_XTAL_HZ) \
|
||||
CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_v2) \
|
||||
GCC_CC_x86_32=$(GCC_CC_x86_32) \
|
||||
GCC_CC_x86_64=$(GCC_CC_x86_64) \
|
||||
|
14
payloads/external/edk2/Kconfig
vendored
14
payloads/external/edk2/Kconfig
vendored
@@ -155,6 +155,20 @@ config EDK2_CBMEM_LOGGING
|
||||
this option, especially if using a debug (vs release) build.
|
||||
Selecting this option will increase the payload size in CBFS by 0x10000.
|
||||
|
||||
config EDK2_CPU_TIMER_LIB
|
||||
bool
|
||||
default n
|
||||
help
|
||||
For recent Intel and AMD CPUs, the 0x15 CPUID instruction will return Time
|
||||
Stamp Counter Frequence. For CPUs that do not support this instruction,
|
||||
EDK2 must include a different library which is the reason why this must be
|
||||
configured at build time.
|
||||
|
||||
If this is enabled, and the CPU doesn't support 0x15, it will fail to
|
||||
boot. If it is not enabled, and the CPU does support 0x15, it will still
|
||||
boot but without support for the leaf. Consequently, it is disabled by
|
||||
default.
|
||||
|
||||
config EDK2_FOLLOW_BGRT_SPEC
|
||||
bool "Center logo 38.2% from the top of screen"
|
||||
default n
|
||||
|
6
payloads/external/edk2/Makefile
vendored
6
payloads/external/edk2/Makefile
vendored
@@ -44,6 +44,12 @@ RELEASE_STR = DEBUG
|
||||
else
|
||||
RELEASE_STR = RELEASE
|
||||
endif
|
||||
# CPU_TIMER_LIB_ENABLE = TRUE
|
||||
ifneq ($(CONFIG_EDK2_CPU_TIMER_LIB),y)
|
||||
BUILD_STR += -D CPU_TIMER_LIB_ENABLE=FALSE
|
||||
else
|
||||
BUILD_STR += --pcd gUefiCpuPkgTokenSpaceGuid.PcdCpuCoreCrystalClockFrequency=$(CONFIG_CPU_XTAL_HZ)
|
||||
endif
|
||||
# DISABLE_SERIAL_TERMINAL = FALSE
|
||||
ifneq ($(CONFIG_EDK2_SERIAL_SUPPORT),y)
|
||||
BUILD_STR += -D DISABLE_SERIAL_TERMINAL=TRUE
|
||||
|
Reference in New Issue
Block a user