mirror of
https://github.com/Dasharo/coreboot.git
synced 2026-06-13 10:16:48 -07:00
payloads/edk2: Set System Table firmware information PCDs
Set the EFI System Table fields with the PCDs containing firmware information, such as vendor, release date, version and revision. Do it so the information is the same in coreboot, EDK2 and SMBIOS. Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This commit is contained in:
@@ -173,6 +173,7 @@ $(foreach supported_arch,$(ARCH_SUPPORTED), \
|
||||
# toupper: returns the value in all uppercase
|
||||
# ws_to_under: returns the value with any whitespace changed to underscores
|
||||
# get_fmap_value returns the value of a given FMAP field from fmap_config.h
|
||||
# get_build_value returns the value of a given FMAP field from build.h
|
||||
_toint=$(shell printf "%d" $1)
|
||||
_tohex=$(shell printf 0x"%x" $1)
|
||||
_int-add2=$(shell expr $(call _toint,$1) + $(call _toint,$2))
|
||||
@@ -193,6 +194,7 @@ tolower=$(shell echo '$1' | tr '[:upper:]' '[:lower:]')
|
||||
toupper=$(shell echo '$1' | tr '[:lower:]' '[:upper:]')
|
||||
ws_to_under=$(shell echo '$1' | tr ' \t' '_')
|
||||
get_fmap_value=$(shell awk '$$2 == "$1" {print $$3}' $(obj)/fmap_config.h)
|
||||
get_build_value=$(shell awk '$$2 == "$1" {print $$3}' $(obj)/build.h)
|
||||
|
||||
#######################################################################
|
||||
# Helper functions for ramstage postprocess
|
||||
|
||||
Vendored
+5
-1
@@ -299,7 +299,11 @@ $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG) $(IPXE_EFI)
|
||||
CONFIG_EDK2_DASHARO_IBECC_OPTION=$(CONFIG_EDK2_DASHARO_IBECC_OPTION) \
|
||||
CONFIG_EDK2_DASHARO_SPD_PROFILE_OPTION=$(CONFIG_EDK2_DASHARO_SPD_PROFILE_OPTION) \
|
||||
CONFIG_EDK2_CAPSULE_ON_DISK_SUPPORT=$(CONFIG_EDK2_CAPSULE_ON_DISK_SUPPORT) \
|
||||
CONFIG_EDK2_SHOW_CAPSULE_REPORT=$(CONFIG_EDK2_SHOW_CAPSULE_REPORT)
|
||||
CONFIG_EDK2_SHOW_CAPSULE_REPORT=$(CONFIG_EDK2_SHOW_CAPSULE_REPORT) \
|
||||
CONFIG_EDK2_FW_VERSION=L"$(CONFIG_LOCALVERSION)" \
|
||||
CONFIG_EDK2_FW_VENDOR=L"$(CONFIG_BIOS_VENDOR)" \
|
||||
CONFIG_EDK2_FW_RELEASE_DATE=L"$(call get_build_value,COREBOOT_DMI_DATE)" \
|
||||
CONFIG_EDK2_FW_REVISION=$(shell printf 0x"%04x%04x" $(DASHARO_MAJOR_VERSION) $(DASHARO_MINOR_VERSION))
|
||||
|
||||
|
||||
$(obj)/ShimmedUniversalPayload.elf: $(DOTCONFIG)
|
||||
|
||||
Vendored
+5
@@ -457,6 +457,11 @@ ifneq ($(CONFIG_EDK2_FUM_AUTO_IPXE_BOOT),y)
|
||||
BUILD_STR += --pcd gDasharoSystemFeaturesTokenSpaceGuid.PcdFumAutoIpxeBoot=FALSE
|
||||
endif
|
||||
|
||||
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString=$(CONFIG_EDK2_FW_VERSION)
|
||||
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor=$(CONFIG_EDK2_FW_VENDOR)
|
||||
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString=$(CONFIG_EDK2_FW_RELEASE_DATE)
|
||||
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision=$(CONFIG_EDK2_FW_REVISION)
|
||||
|
||||
endif # !CONFIG_EDK2_REPO_OFFICIAL
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user