summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhiguang Liu <zhiguang.liu@intel.com>2021-08-06 10:40:24 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-08-09 04:05:44 +0000
commit672bd1c7113317816765e6b5aff005e70052cc94 (patch)
tree22e0001e8bc99ea5fc6d672b6b832c0b30310dd1
parentac6e5d6b411fdf1270749e8676f5ef27d9ae01d7 (diff)
downloadedk2-672bd1c7113317816765e6b5aff005e70052cc94.tar.gz
edk2-672bd1c7113317816765e6b5aff005e70052cc94.tar.bz2
edk2-672bd1c7113317816765e6b5aff005e70052cc94.zip
UefiPayloadPkg: Add a macro to enable or diable the serial driver.
This patch doesn't change the default behavior. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.dsc4
-rw-r--r--UefiPayloadPkg/UefiPayloadPkg.fdf2
2 files changed, 6 insertions, 0 deletions
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