From 48aa2edf5dae7a1e819ae01c43a326b6c97f20b1 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Fri, 10 Jul 2020 17:12:56 -0700 Subject: [PATCH] UefiPayloadPkg: Make TerminalDxe build time configurable As the TerminalDxe significantly slows down the boot menu rendering, add the DISABLE_SERIAL_TERMINAL option to disable it at build time. Signed-off-by: Patrick Rudolph Signed-off-by: Marcello Sylvester Bauer Reviewed-by: Maurice Ma Reviewed-by: Guo Dong --- UefiPayloadPkg/UefiPayloadPkg.fdf | 2 ++ UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 5 +++++ UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf index a04fcd2ec2..570a8ee7fd 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -147,7 +147,9 @@ INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf +!if $(DISABLE_SERIAL_TERMINAL) == FALSE INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +!endif INF UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe.inf # diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc index 0efcfa8fb2..6ac10f086b 100644 --- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc +++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc @@ -58,6 +58,9 @@ DEFINE UART_DEFAULT_STOP_BITS = 1 DEFINE DEFAULT_TERMINAL_TYPE = 0 + # Enabling the serial terminal will slow down the boot menu redering! + DEFINE DISABLE_SERIAL_TERMINAL = FALSE + # # typedef struct { # UINT16 VendorId; ///< Vendor ID to match the PCI device. The value 0xFFFF terminates the list of entries. @@ -503,7 +506,9 @@ # MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +!if $(DISABLE_SERIAL_TERMINAL) == FALSE MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf +!endif MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe.inf diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc index d645d233cd..650a72162a 100644 --- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc +++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc @@ -59,6 +59,9 @@ DEFINE UART_DEFAULT_STOP_BITS = 1 DEFINE DEFAULT_TERMINAL_TYPE = 0 + # Enabling the serial terminal will slow down the boot menu redering! + DEFINE DISABLE_SERIAL_TERMINAL = FALSE + # # typedef struct { # UINT16 VendorId; ///< Vendor ID to match the PCI device. The value 0xFFFF terminates the list of entries. @@ -504,7 +507,9 @@ # MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +!if $(DISABLE_SERIAL_TERMINAL) == FALSE MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf +!endif MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe.inf