From: james.lu@intel.com
To: devel@edk2.groups.io
Cc: James Lu <james.lu@intel.com>, Guo Dong <guo.dong@intel.com>,
Ray Ni <ray.ni@intel.com>, Gua Guo <gua.guo@intel.com>
Subject: [PATCH] UefiPayloadPkg: Add macro to support selective driver in UPL
Date: Tue, 28 Jun 2022 18:35:02 +0800 [thread overview]
Message-ID: <38b574266fdeaa275743eab94caf39acfe71b2bc.1656412190.git.james.lu@intel.com> (raw)
From: James Lu <james.lu@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3967
Add macros to decide modules built into UPL.elf.
Macro list:
- GENERIC_MEMORY_TEST_ENABLE: GenericMemoryTestDxe
- NULL_MEMORY_TEST_ENABLE: NullMemoryTestDxe
- ATA_ENABLE: SataControllerDxe, AtaBusDxe, AtaAtapiPassThruDxe
- SD_ENABLE: SdMmcPciDxe, EmmcDxe, SdDxe
- PS2_MOUSE_ENABLE: Ps2MouseDxe
Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Gua Guo <gua.guo@intel.com>
Signed-off-by: James Lu <james.lu@intel.com>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 18 ++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.fdf | 15 ++++++++++++++-
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index cfcf38578d..9e94a40d72 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,6 +36,11 @@
DEFINE PLATFORM_BOOT_TIMEOUT = 3
DEFINE ABOVE_4G_MEMORY = TRUE
DEFINE BOOT_MANAGER_ESCAPE = FALSE
+ DEFINE GENERIC_MEMORY_TEST_ENABLE = FALSE
+ DEFINE NULL_MEMORY_TEST_ENABLE = TRUE
+ DEFINE ATA_ENABLE = TRUE
+ DEFINE SD_ENABLE = TRUE
+ DEFINE PS2_MOUSE_ENABLE = TRUE
DEFINE SD_MMC_TIMEOUT = 1000000
#
# SBL: UEFI payload for Slim Bootloader
@@ -596,7 +601,12 @@
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+!if $(GENERIC_MEMORY_TEST_ENABLE) == TRUE
+ MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf
+!endif
+!if $(NULL_MEMORY_TEST_ENABLE) == TRUE
MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+!endif
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
@@ -631,9 +641,11 @@
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
FatPkg/EnhancedFatDxe/Fat.inf
+!if $(ATA_ENABLE) == TRUE
MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
+!endif
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
@@ -644,9 +656,11 @@
#
# SD/eMMC Support
#
+!if $(SD_ENABLE) == TRUE
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+!endif
#
# Usb Support
@@ -671,7 +685,9 @@
!if $(PS2_KEYBOARD_ENABLE) == TRUE
MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
!endif
+!if $(PS2_MOUSE_ENABLE) == TRUE
MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
+!endif
#
# Console Support
@@ -742,12 +758,14 @@
# This should be FALSE for compiling the dynamic command.
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!if $(PERFORMANCE_MEASUREMENT_ENABLE) == TRUE
ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf {
<PcdsFixedAtBuild>
## This flag is used to control initialization of the shell library
# This should be FALSE for compiling the dynamic command.
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!endif
ShellPkg/Application/Shell/Shell.inf {
<PcdsFixedAtBuild>
## This flag is used to control initialization of the shell library
diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index c7b04978ad..5aa228e828 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -149,7 +149,12 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+!if $(GENERIC_MEMORY_TEST_ENABLE) == TRUE
+INF MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf
+!endif
+!if $(NULL_MEMORY_TEST_ENABLE) == TRUE
+INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+!endif
INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
@@ -176,7 +181,9 @@ INF OvmfPkg/SioBusDxe/SioBusDxe.inf
!if $(PS2_KEYBOARD_ENABLE) == TRUE
INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
!endif
+!if $(PS2_MOUSE_ENABLE) == TRUE
INF MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
+!endif
#
# Console Support
@@ -195,9 +202,11 @@ INF UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe.inf
INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
+!if $(ATA_ENABLE) == TRUE
INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
+!endif
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
@@ -209,9 +218,11 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
#
# SD/eMMC Support
#
+!if $(SD_ENABLE) == TRUE
INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf
+!endif
#
# Usb Support
@@ -241,7 +252,9 @@ INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
#
!if $(SHELL_TYPE) == BUILD_SHELL
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
+!if $(PERFORMANCE_MEASUREMENT_ENABLE) == TRUE
INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
+!endif
INF ShellPkg/Application/Shell/Shell.inf
!endif
--
2.26.2.windows.1
next reply other threads:[~2022-06-28 10:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 10:35 james.lu [this message]
2022-07-04 3:34 ` [PATCH] UefiPayloadPkg: Add macro to support selective driver in UPL Ni, Ray
2022-07-05 8:45 ` james.lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38b574266fdeaa275743eab94caf39acfe71b2bc.1656412190.git.james.lu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox