From 672bd1c7113317816765e6b5aff005e70052cc94 Mon Sep 17 00:00:00 2001 From: Zhiguang Liu Date: Fri, 6 Aug 2021 10:40:24 +0800 Subject: [PATCH] UefiPayloadPkg: Add a macro to enable or diable the serial driver. This patch doesn't change the default behavior. Reviewed-by: Guo Dong Reviewed-by: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Zhiguang Liu --- UefiPayloadPkg/UefiPayloadPkg.dsc | 4 ++++ UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++ 2 files changed, 6 insertions(+) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc index 002d2a8fa7..b4a30be381 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -98,6 +98,8 @@ DEFINE RTC_INDEX_REGISTER = 0x70 DEFINE RTC_TARGET_REGISTER = 0x71 + DEFINE SERIAL_DRIVER_ENABLE = TRUE + [BuildOptions] *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG @@ -536,7 +538,9 @@ # # ISA Support # +!if $(SERIAL_DRIVER_ENABLE) == TRUE MdeModulePkg/Universal/SerialDxe/SerialDxe.inf +!endif !if $(PS2_KEYBOARD_ENABLE) == TRUE OvmfPkg/SioBusDxe/SioBusDxe.inf MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf index 041fed842c..b2cfb6b405 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -136,7 +136,9 @@ INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf # # ISA Support # +!if $(SERIAL_DRIVER_ENABLE) == TRUE INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf +!endif !if $(PS2_KEYBOARD_ENABLE) == TRUE INF OvmfPkg/SioBusDxe/SioBusDxe.inf INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf