From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.7591.1657210648837117307 for ; Thu, 07 Jul 2022 09:17:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UDt+HvQd; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: james.lu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657210648; x=1688746648; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=V0+nuKVI7I059lmx8xH7h3gPmiMNopIs/Cbc8WDvGU4=; b=UDt+HvQdlKs4iPvyFrzMcll/OnGnsSDD8VVHkP/xz+ZUu84EppamTkss xvMJyshjmXqcBftE7RHXtlBxesM8iSrFqywOVzzOrClayeCiDL+iy3uZJ Q67akAld0GPJ/OzjIRCdYqUEXRKIIBYtxBLt7PmJMldqKzF6ohFt08b2n ivfQStKKMeW0T9vGC2MTk8M/Hz7VwyBiuQIqnhAPVRbq7qqg13AVZLWVJ S+TKsIeRBZ6EDAEoP37c9Z4v2KFrvKngvFX4PR8Is1kCOv/aHwzAIGgvv nEczS4yuqKacbCSGaig9JNUG0R06alCcvsZQeSKufb7pRmGVpzZK6IqzI A==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="264477953" X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="264477953" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 09:15:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208";a="620854644" Received: from jameslu8-desk2.gar.corp.intel.com ([10.5.215.168]) by orsmga008.jf.intel.com with ESMTP; 07 Jul 2022 09:15:22 -0700 From: "Lu, James" To: devel@edk2.groups.io Cc: James Lu , Guo Dong , Ray Ni , Gua Guo Subject: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL Date: Fri, 8 Jul 2022 00:15:09 +0800 Message-Id: <20220707161509.1471-1-james.lu@intel.com> X-Mailer: git-send-email 2.26.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: James Lu REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3967 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 Cc: Ray Ni Cc: Gua Guo Signed-off-by: James Lu --- UefiPayloadPkg/UefiPayloadPkg.dsc | 21 ++++++++++++++++++++ UefiPayloadPkg/UefiPayloadPkg.fdf | 14 ++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload= Pkg.dsc index cfcf38578d..ec79914f45 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -36,7 +36,16 @@ DEFINE PLATFORM_BOOT_TIMEOUT =3D 3=0D DEFINE ABOVE_4G_MEMORY =3D TRUE=0D DEFINE BOOT_MANAGER_ESCAPE =3D FALSE=0D + DEFINE ATA_ENABLE =3D TRUE=0D + DEFINE SD_ENABLE =3D TRUE=0D + DEFINE PS2_MOUSE_ENABLE =3D TRUE=0D DEFINE SD_MMC_TIMEOUT =3D 1000000=0D +=0D + #=0D + # NULL: NullMemoryTestDxe=0D + # GENERIC: GenericMemoryTestDxe=0D + #=0D + DEFINE MEMORY_TEST =3D NULL=0D #=0D # SBL: UEFI payload for Slim Bootloader=0D # COREBOOT: UEFI payload for coreboot=0D @@ -596,7 +605,11 @@ MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf=0D UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D +!if $(MEMORY_TEST) =3D=3D "GENERIC"=0D + MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTest= Dxe.inf=0D +!elseif $(MEMORY_TEST) =3D=3D "NULL"=0D MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.in= f=0D +!endif=0D MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D @@ -631,8 +644,10 @@ MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf=0D FatPkg/EnhancedFatDxe/Fat.inf=0D +!if $(ATA_ENABLE) =3D=3D TRUE=0D MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf=0D MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D +!endif=0D MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D @@ -644,9 +659,11 @@ #=0D # SD/eMMC Support=0D #=0D +!if $(SD_ENABLE) =3D=3D TRUE=0D MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf=0D MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf=0D MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf=0D +!endif=0D =0D #=0D # Usb Support=0D @@ -671,7 +688,9 @@ !if $(PS2_KEYBOARD_ENABLE) =3D=3D TRUE=0D MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf=0D !endif=0D +!if $(PS2_MOUSE_ENABLE) =3D=3D TRUE=0D MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf=0D +!endif=0D =0D #=0D # Console Support=0D @@ -742,12 +761,14 @@ # This should be FALSE for compiling the dynamic command.=0D gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D }=0D +!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE=0D ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf {=0D =0D ## This flag is used to control initialization of the shell library= =0D # This should be FALSE for compiling the dynamic command.=0D gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE=0D }=0D +!endif=0D ShellPkg/Application/Shell/Shell.inf {=0D =0D ## This flag is used to control initialization of the shell library= =0D diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf index c7b04978ad..35f79be2f0 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.fdf +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf @@ -149,7 +149,11 @@ INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRea= lTimeClockRuntimeDxe.inf =0D INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf=0D INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf=0D -INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.= inf=0D +!if $(MEMORY_TEST) =3D=3D "GENERIC"=0D +INF MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryT= estDxe.inf=0D +!elseif $(MEMORY_TEST) =3D=3D "NULL"=0D +INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe= .inf=0D +!endif=0D INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf=0D INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf=0D INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf=0D @@ -176,7 +180,9 @@ INF OvmfPkg/SioBusDxe/SioBusDxe.inf !if $(PS2_KEYBOARD_ENABLE) =3D=3D TRUE=0D INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf=0D !endif=0D +!if $(PS2_MOUSE_ENABLE) =3D=3D TRUE=0D INF MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf=0D +!endif=0D =0D #=0D # Console Support=0D @@ -195,8 +201,10 @@ INF UefiPayloadPkg/GraphicsOutputDxe/GraphicsOutputDxe= .inf INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf=0D INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf=0D INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf= =0D +!if $(ATA_ENABLE) =3D=3D TRUE=0D INF MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf=0D INF MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf=0D +!endif=0D INF MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf=0D INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf=0D INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf=0D @@ -209,9 +217,11 @@ INF FatPkg/EnhancedFatDxe/Fat.inf #=0D # SD/eMMC Support=0D #=0D +!if $(SD_ENABLE) =3D=3D TRUE=0D INF MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf=0D INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf=0D INF MdeModulePkg/Bus/Sd/SdDxe/SdDxe.inf=0D +!endif=0D =0D #=0D # Usb Support=0D @@ -241,7 +251,9 @@ INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable= Dxe.inf #=0D !if $(SHELL_TYPE) =3D=3D BUILD_SHELL=0D INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf=0D +!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE=0D INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf=0D +!endif=0D INF ShellPkg/Application/Shell/Shell.inf=0D !endif=0D =0D --=20 2.26.2.windows.1