[PATCH 4/4] UefiPayloadPkg: Add a macro to enable or diable the serial driver.


Zhiguang Liu
 

This patch doesn't change the default behavior.

Cc: Guo Dong <guo.dong@intel.com>
Cc: 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>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 4 ++++
UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++
2 files changed, 6 insertions(+)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload=
Pkg.dsc
index 002d2a8fa7..b4a30be381 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -98,6 +98,8 @@
DEFINE RTC_INDEX_REGISTER =3D 0x70=0D
DEFINE RTC_TARGET_REGISTER =3D 0x71=0D
=0D
+ DEFINE SERIAL_DRIVER_ENABLE =3D TRUE=0D
+=0D
[BuildOptions]=0D
*_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES=
=0D
GCC:*_UNIXGCC_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D
@@ -536,7 +538,9 @@
#=0D
# ISA Support=0D
#=0D
+!if $(SERIAL_DRIVER_ENABLE) =3D=3D TRUE=0D
MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D
+!endif=0D
!if $(PS2_KEYBOARD_ENABLE) =3D=3D TRUE=0D
OvmfPkg/SioBusDxe/SioBusDxe.inf=0D
MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf=0D
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload=
Pkg.fdf
index 041fed842c..b2cfb6b405 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -136,7 +136,9 @@ INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge=
Dxe.inf
#=0D
# ISA Support=0D
#=0D
+!if $(SERIAL_DRIVER_ENABLE) =3D=3D TRUE=0D
INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf=0D
+!endif=0D
!if $(PS2_KEYBOARD_ENABLE) =3D=3D TRUE=0D
INF OvmfPkg/SioBusDxe/SioBusDxe.inf=0D
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf=0D
--=20
2.32.0.windows.2

Join devel@edk2.groups.io to automatically receive all group messages.