[edk2-devel] [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL

Lu, James posted 1 patch 1 year, 8 months ago
Failed in applying to current master (apply log)
UefiPayloadPkg/UefiPayloadPkg.dsc | 21 ++++++++++++++++++++
UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++-
2 files changed, 34 insertions(+), 1 deletion(-)
[edk2-devel] [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL
Posted by Lu, James 1 year, 8 months ago
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
 - MEMORY_TEST: NullMemoryTestDxe or GenericMemoryDxe
 - ATA_ENABLE: SataControllerDxe, AtaBusDxe
 - 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 | 21 ++++++++++++++++++++
 UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index cfcf38578d..ec79914f45 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,7 +36,16 @@
   DEFINE PLATFORM_BOOT_TIMEOUT        = 3
   DEFINE ABOVE_4G_MEMORY              = TRUE
   DEFINE BOOT_MANAGER_ESCAPE          = FALSE
+  DEFINE ATA_ENABLE                   = TRUE
+  DEFINE SD_ENABLE                    = TRUE
+  DEFINE PS2_MOUSE_ENABLE             = TRUE
   DEFINE SD_MMC_TIMEOUT               = 1000000
+
+  #
+  # NULL:    NullMemoryTestDxe
+  # GENERIC: GenericMemoryTestDxe
+  #
+  DEFINE MEMORY_TEST                  = NULL
   #
   # SBL:      UEFI payload for Slim Bootloader
   # COREBOOT: UEFI payload for coreboot
@@ -596,7 +605,11 @@
   MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
   UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+!if $(MEMORY_TEST) == "GENERIC"
+  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf
+!elseif $(MEMORY_TEST) == "NULL"
   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+!endif
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
   MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
   MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
@@ -631,8 +644,10 @@
   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
+!endif
   MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
@@ -644,9 +659,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 +688,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 +761,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..35f79be2f0 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -149,7 +149,11 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
 
 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf
 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
+!if $(MEMORY_TEST) == "GENERIC"
+INF  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf
+!elseif $(MEMORY_TEST) == "NULL"
+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 +180,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,8 +201,10 @@ 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
+!endif
 INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
@@ -209,9 +217,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 +251,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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91143): https://edk2.groups.io/g/devel/message/91143
Mute This Topic: https://groups.io/mt/92231909/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL
Posted by Guo Dong 1 year, 8 months ago
Reviewed-by: Guo Dong <guo.dong@intel.com>

-----Original Message-----
From: Lu, James <james.lu@intel.com> 
Sent: Thursday, July 7, 2022 9:15 AM
To: devel@edk2.groups.io
Cc: Lu, James <james.lu@intel.com>; Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL

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
 - MEMORY_TEST: NullMemoryTestDxe or GenericMemoryDxe
 - ATA_ENABLE: SataControllerDxe, AtaBusDxe
 - 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 | 21 ++++++++++++++++++++  UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index cfcf38578d..ec79914f45 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,7 +36,16 @@
   DEFINE PLATFORM_BOOT_TIMEOUT        = 3   DEFINE ABOVE_4G_MEMORY              = TRUE   DEFINE BOOT_MANAGER_ESCAPE          = FALSE+  DEFINE ATA_ENABLE                   = TRUE+  DEFINE SD_ENABLE                    = TRUE+  DEFINE PS2_MOUSE_ENABLE             = TRUE   DEFINE SD_MMC_TIMEOUT               = 1000000++  #+  # NULL:    NullMemoryTestDxe+  # GENERIC: GenericMemoryTestDxe+  #+  DEFINE MEMORY_TEST                  = NULL   #   # SBL:      UEFI payload for Slim Bootloader   # COREBOOT: UEFI payload for coreboot@@ -596,7 +605,11 @@
   MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf   UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf+!if $(MEMORY_TEST) == "GENERIC"+  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf+!elseif $(MEMORY_TEST) == "NULL"   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf+!endif   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf   MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf   MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf@@ -631,8 +644,10 @@
   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+!endif   MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf@@ -644,9 +659,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 +688,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 +761,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 librarydiff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index c7b04978ad..35f79be2f0 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -149,7 +149,11 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
  INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf+!if $(MEMORY_TEST) == "GENERIC"+INF  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf+!elseif $(MEMORY_TEST) == "NULL"+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 +180,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,8 +201,10 @@ 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+!endif INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf@@ -209,9 +217,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 +251,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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91484): https://edk2.groups.io/g/devel/message/91484
Mute This Topic: https://groups.io/mt/92231909/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL
Posted by Ni, Ray 1 year, 8 months ago
Reviewed-by: Ray Ni <Ray.ni@intel.com>

thanks,
ray
________________________________
From: Lu, James <james.lu@intel.com>
Sent: Friday, July 8, 2022 12:15:09 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Lu, James <james.lu@intel.com>; Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL

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
 - MEMORY_TEST: NullMemoryTestDxe or GenericMemoryDxe
 - ATA_ENABLE: SataControllerDxe, AtaBusDxe
 - 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 | 21 ++++++++++++++++++++
 UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index cfcf38578d..ec79914f45 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,7 +36,16 @@
   DEFINE PLATFORM_BOOT_TIMEOUT        = 3

   DEFINE ABOVE_4G_MEMORY              = TRUE

   DEFINE BOOT_MANAGER_ESCAPE          = FALSE

+  DEFINE ATA_ENABLE                   = TRUE

+  DEFINE SD_ENABLE                    = TRUE

+  DEFINE PS2_MOUSE_ENABLE             = TRUE

   DEFINE SD_MMC_TIMEOUT               = 1000000

+

+  #

+  # NULL:    NullMemoryTestDxe

+  # GENERIC: GenericMemoryTestDxe

+  #

+  DEFINE MEMORY_TEST                  = NULL

   #

   # SBL:      UEFI payload for Slim Bootloader

   # COREBOOT: UEFI payload for coreboot

@@ -596,7 +605,11 @@
   MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf

   UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

+!if $(MEMORY_TEST) == "GENERIC"

+  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf

+!elseif $(MEMORY_TEST) == "NULL"

   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf

+!endif

   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

   MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf

   MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf

@@ -631,8 +644,10 @@
   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

+!endif

   MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf

   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

@@ -644,9 +659,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 +688,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 +761,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..35f79be2f0 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -149,7 +149,11 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf


 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf

+!if $(MEMORY_TEST) == "GENERIC"

+INF  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf

+!elseif $(MEMORY_TEST) == "NULL"

+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 +180,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,8 +201,10 @@ 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

+!endif

 INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf

 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

@@ -209,9 +217,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 +251,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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91145): https://edk2.groups.io/g/devel/message/91145
Mute This Topic: https://groups.io/mt/92231909/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL
Posted by Lu, James 1 year, 8 months ago
Created PR, please help to push
UefiPayloadPkg: Add macro to support selective driver in UPL by jameslu8 * Pull Request #3065 * tianocore/edk2 (github.com)<https://github.com/tianocore/edk2/pull/3065>


Thanks,
James

From: Ni, Ray <ray.ni@intel.com>
Sent: Friday, July 8, 2022 12:47 AM
To: Lu, James <james.lu@intel.com>; devel@edk2.groups.io
Cc: Lu, James <james.lu@intel.com>; Dong, Guo <guo.dong@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: Re: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL

Reviewed-by: Ray Ni <Ray.ni@intel.com<mailto:Ray.ni@intel.com>>

thanks,
ray
________________________________
From: Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>
Sent: Friday, July 8, 2022 12:15:09 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>>
Cc: Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>; Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Subject: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL

From: James Lu <james.lu@intel.com<mailto: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
 - MEMORY_TEST: NullMemoryTestDxe or GenericMemoryDxe
 - ATA_ENABLE: SataControllerDxe, AtaBusDxe
 - SD_ENABLE: SdMmcPciDxe, EmmcDxe, SdDxe
 - PS2_MOUSE_ENABLE: Ps2MouseDxe

Cc: Guo Dong <guo.dong@intel.com<mailto:guo.dong@intel.com>>
Cc: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Cc: Gua Guo <gua.guo@intel.com<mailto:gua.guo@intel.com>>
Signed-off-by: James Lu <james.lu@intel.com<mailto:james.lu@intel.com>>
---
 UefiPayloadPkg/UefiPayloadPkg.dsc | 21 ++++++++++++++++++++
 UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++-
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc
index cfcf38578d..ec79914f45 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,7 +36,16 @@
   DEFINE PLATFORM_BOOT_TIMEOUT        = 3

   DEFINE ABOVE_4G_MEMORY              = TRUE

   DEFINE BOOT_MANAGER_ESCAPE          = FALSE

+  DEFINE ATA_ENABLE                   = TRUE

+  DEFINE SD_ENABLE                    = TRUE

+  DEFINE PS2_MOUSE_ENABLE             = TRUE

   DEFINE SD_MMC_TIMEOUT               = 1000000

+

+  #

+  # NULL:    NullMemoryTestDxe

+  # GENERIC: GenericMemoryTestDxe

+  #

+  DEFINE MEMORY_TEST                  = NULL

   #

   # SBL:      UEFI payload for Slim Bootloader

   # COREBOOT: UEFI payload for coreboot

@@ -596,7 +605,11 @@
   MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf

   UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

+!if $(MEMORY_TEST) == "GENERIC"

+  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf

+!elseif $(MEMORY_TEST) == "NULL"

   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf

+!endif

   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

   MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf

   MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf

@@ -631,8 +644,10 @@
   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

+!endif

   MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf

   MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

   MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

@@ -644,9 +659,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 +688,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 +761,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..35f79be2f0 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -149,7 +149,11 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf


 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

-INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf

+!if $(MEMORY_TEST) == "GENERIC"

+INF  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf

+!elseif $(MEMORY_TEST) == "NULL"

+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 +180,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,8 +201,10 @@ 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

+!endif

 INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf

 INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

 INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

@@ -209,9 +217,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 +251,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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91410): https://edk2.groups.io/g/devel/message/91410
Mute This Topic: https://groups.io/mt/92231909/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-