From 8e10a4826a8fe83292a084450cf1b905ac832edd Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Mon, 4 Jul 2022 17:01:09 +0100 Subject: [PATCH] payloads/external/tianocore: Hook up debug builds to serial support ConSplitterDxe uses the intersection of all outputs, which includes serial, for the list of supported text modes. When serial output is supported, this slows down performance and limits the size of FrontPage. Only enable edk2's serial support when it's a debug build as it's the only case where there will be debug output. Signed-off-by: Sean Rhodes Change-Id: Ic3633767dabb3543e865aa65c4101840a7b69cc1 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65643 Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- payloads/external/Makefile.inc | 1 + payloads/external/tianocore/Kconfig | 8 ++++++++ payloads/external/tianocore/Makefile | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 14a7ebb386..e560cbe71a 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -176,6 +176,7 @@ $(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG) CONFIG_TIANOCORE_HAVE_EFI_SHELL=$(CONFIG_TIANOCORE_HAVE_EFI_SHELL) \ CONFIG_TIANOCORE_PRIORITIZE_INTERNAL=$(CONFIG_TIANOCORE_PRIORITIZE_INTERNAL) \ CONFIG_TIANOCORE_PS2_SUPPORT=$(CONFIG_TIANOCORE_PS2_SUPPORT) \ + CONFIG_TIANOCORE_SERIAL_SUPPORT=$(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) \ diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index c0c86ae9ba..d30386e064 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -175,6 +175,14 @@ config TIANOCORE_SD_MMC_TIMEOUT The amount of time allowed to initialize the SD Card reader and/or eMMC drive. Most only require 1000μs, but certain readers can take 1000000μs. +config TIANOCORE_SERIAL_SUPPORT + bool "Support serial output" + default y if TIANOCORE_DEBUG + default n + help + Enable serial port output in edk2. Serial output limits the performance of edk2's + FrontPage. + endif if TIANOCORE_COREBOOTPAYLOAD diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index bcadcb277e..7dcaf201b3 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -36,6 +36,10 @@ endif ifeq ($(CONFIG_TIANOCORE_RELEASE),y) BUILD_STR += -b RELEASE endif +# DISABLE_SERIAL_TERMINAL = FALSE +ifneq ($(CONFIG_TIANOCORE_SERIAL_SUPPORT),y) +BUILD_STR += -D DISABLE_SERIAL_TERMINAL=TRUE +endif # FOLLOW_BGRT_SPEC = FALSE ifeq ($(CONFIG_TIANOCORE_FOLLOW_BGRT_SPEC),y) BUILD_STR += -D FOLLOW_BGRT_SPEC=TRUE