From 02f2b193840f68c41a91380be0dd4f435ab2f339 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Fri, 8 Jul 2022 16:29:54 +0100 Subject: [PATCH] payloads/tianocore: Remove the option for CorebootPayloadPkg Recent changes to both coreboot and edk2 means that UefiPayloadPkg seems to work on all hardware. It has been tested on: * Intel Core 2nd, 3rd, 4th, 5th, 6th, 8th, 8th, 9th, 10th, 11th and 12th generation processors * Intel Small Core BYT, BSW, APL, GLK and GLK-R processors * AMD Stoney Ridge and Picasso This includes the problematic Lenovo X230s. The most likely fixes are: * Configuring the PCI Base and Length in edk2 * Fixes to the HostBridgeLib in edk2 * Adjustment to the SD/eMMC initialisation timeout This means we can now remove the already deprecated option for CorebootPayloadPkg and the legacy 8254 timer build option. Signed-off-by: Sean Rhodes Change-Id: Ice7b7576eb3d32ea46e5138266b7df3fbcdcf7ea Reviewed-on: https://review.coreboot.org/c/coreboot/+/65721 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier Reviewed-by: Arthur Heymans Reviewed-by: Lean Sheng Tan --- payloads/external/Makefile.inc | 2 -- payloads/external/tianocore/Kconfig | 21 +-------------------- payloads/external/tianocore/Makefile | 18 +----------------- src/drivers/smmstore/Kconfig | 2 +- 4 files changed, 3 insertions(+), 40 deletions(-) diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index d7a3ee7628..1fca61770b 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -164,7 +164,6 @@ $(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG) CONFIG_TIANOCORE_UPSTREAM=$(CONFIG_TIANOCORE_UPSTREAM) \ CONFIG_TIANOCORE_CUSTOM=$(CONFIG_TIANOCORE_CUSTOM) \ CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS=$(CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS) \ - CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \ CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \ CONFIG_TIANOCORE_RELEASE=$(CONFIG_TIANOCORE_RELEASE) \ CONFIG_TIANOCORE_ABOVE_4G_MEMORY=$(CONFIG_TIANOCORE_ABOVE_4G_MEMORY) \ @@ -179,7 +178,6 @@ $(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG) CONFIG_TIANOCORE_PS2_SUPPORT=$(CONFIG_TIANOCORE_PS2_SUPPORT) \ CONFIG_TIANOCORE_SERIAL_SUPPORT=$(CONFIG_TIANOCORE_SERIAL_SUPPORT) \ CONFIG_TIANOCORE_SD_MMC_TIMEOUT=$(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) \ - CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \ CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \ CONFIG_ECAM_MMCONF_LENGTH=$(CONFIG_ECAM_MMCONF_LENGTH) \ CONFIG_SMMSTORE_V2=$(CONFIG_SMMSTORE_V2) \ diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index 1a72142744..d1493d992f 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -14,9 +14,6 @@ choice UefiPayload: MrChromebox's customized fork of Tianocore which works on most x86_64 devices Upstream: Use upstream Tianocore payload from https://github.com/tianocore/edk2 - CorebootPayload: MrChromebox's customized fork of the deprecated CorebootPayloadPkg - Tianocore build target. It may work better on some older hardware (eg, x230) - which does not work properly with the UefiPayloadPkg options. config TIANOCORE_UEFIPAYLOAD bool "UEFIPayload" @@ -29,12 +26,6 @@ config TIANOCORE_UPSTREAM help Select this option if you want to use upstream EDK2 to build Tianocore. -config TIANOCORE_COREBOOTPAYLOAD - bool "CorebootPayload" - help - Select this option to build using MrChromebox's older (now deprecated) - CorebootPayloadPkg-based Tianocore branch - config TIANOCORE_CUSTOM bool "Custom" help @@ -45,7 +36,7 @@ endchoice config TIANOCORE_REPOSITORY string "URL to git repository for edk2" default "https://github.com/tianocore/edk2" if TIANOCORE_UPSTREAM - default "https://github.com/mrchromebox/edk2" if TIANOCORE_UEFIPAYLOAD || TIANOCORE_COREBOOTPAYLOAD + default "https://github.com/mrchromebox/edk2" if TIANOCORE_UEFIPAYLOAD help coreboot supports an array of build options which can be found below. These options will only have an effect if the relevant options exist in the target repository. @@ -54,7 +45,6 @@ config TIANOCORE_TAG_OR_REV string "Insert a commit's SHA-1 or a branch name" default "origin/uefipayload_202207" if TIANOCORE_UEFIPAYLOAD default "origin/master" if TIANOCORE_UPSTREAM - default "origin/coreboot_fb" if TIANOCORE_COREBOOTPAYLOAD help The commit's SHA-1 or branch name of the revision to use. This must exist in TIANOCORE_REPOSITORY, and in the case of a branch name, prefixed with origin i.e. @@ -201,15 +191,6 @@ config TIANOCORE_SERIAL_SUPPORT endif -if TIANOCORE_COREBOOTPAYLOAD - -config TIANOCORE_USE_8254_TIMER - bool "TianoCore 8254 Timer" - help - Use 8254 Timer for legacy support. - -endif - config TIANOCORE_CUSTOM_BUILD_PARAMS string "TianoCore additional custom build parameters" default "-D VARIABLE_SUPPORT=SMMSTORE" if TIANOCORE_UEFIPAYLOAD && SMMSTORE_V2 diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index 9841604d09..dd6f6bd208 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -7,11 +7,7 @@ project_name = Tianocore project_dir = $(CURDIR)/$(word 3,$(subst /, ,$(CONFIG_TIANOCORE_REPOSITORY))) BUILD_STR = -a IA32 -a X64 -t COREBOOT -ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y) -BUILD_STR += -p CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc -else BUILD_STR += -p UefiPayloadPkg/UefiPayloadPkg.dsc -endif BUILD_STR += -D BOOTLOADER=COREBOOT -q # @@ -80,6 +76,7 @@ endif ifneq ($(CONFIG_TIANOCORE_SD_MMC_TIMEOUT),) BUILD_STR += -D SD_MMC_TIMEOUT=$(shell echo $$(( $(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) * 1000)) ) endif + # # EDKII has the below PCDs that are relevant to coreboot: # @@ -90,19 +87,6 @@ BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn=0 BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow=0 BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn=0 endif -# -# The below are legacy options only available in CorebootPayloadPkg: -# -# PCIE_BASE = 0 -ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y) -ifneq ($(CONFIG_ECAM_MMCONF_BASE_ADDRESS),) -BUILD_STR += -D PCIE_BASE=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) -endif -# USE_HPET_TIMER = FALSE -ifeq ($(CONFIG_TIANOCORE_USE_8254_TIMER),y) -BUILD_STR += -D USE_HPET_TIMER=TRUE -endif -endif # CONFIG_TIANOCORE_COREBOOTPAYLOAD bootloader = $(word 8,$(subst /, ,$(BUILD_STR))) diff --git a/src/drivers/smmstore/Kconfig b/src/drivers/smmstore/Kconfig index 3e20e3e66d..93b3f00262 100644 --- a/src/drivers/smmstore/Kconfig +++ b/src/drivers/smmstore/Kconfig @@ -9,7 +9,7 @@ config SMMSTORE config SMMSTORE_V2 bool "Use version 2 of SMMSTORE API" depends on SMMSTORE - default y if TIANOCORE_UEFIPAYLOAD + default y if PAYLOAD_TIANOCORE default n help Version 2 of SMMSTORE allows secure communication with SMM and