From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.231.1657212422118266063 for ; Thu, 07 Jul 2022 09:47:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=kA6cNiYP; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657212422; x=1688748422; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=pC9txq0N7+4iBqkG67s8OCjFF3MWxjB99xogi/R5mdc=; b=kA6cNiYPr+VkDzRlKds5iAe2VSBom5NK3ZRYr3pRnv0ZWzF8xP5415Qh rAAquDle9AsR1qLpbWPnq2HhX+22wmJLkaNHZdzZNgzlikl3azufAYtka 3T3I0AOr5HAba4EEJF9Us63q3KyusGLwKhmuRkanMgpXYjQhaXT9GXnuy YH6oRPcYwTs74SC8TVNuywkrMgT5FVE3QcOX+2ex2lUzRG5yOykYyyX5r m7ZtYcu4IiaYLtrUzKWXsdYxN629hf5C9/+THgbCxnIEgsp+08GUbBLFR aDyYB2fErsbNpMsY93pNn9Sgn4K87mDlX4pXStNvUqkQ7vVB05M59nM7c g==; X-IronPort-AV: E=McAfee;i="6400,9594,10401"; a="263853891" X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208,217";a="263853891" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2022 09:47:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,253,1650956400"; d="scan'208,217";a="620866123" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga008.jf.intel.com with ESMTP; 07 Jul 2022 09:47:01 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 7 Jul 2022 09:47:00 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 7 Jul 2022 09:47:00 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 7 Jul 2022 09:47:00 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.168) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 7 Jul 2022 09:47:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tofc8Fblm7FOJCtjrefdTU8YAifnwiebr3eMX9WTuYV2xvcXMdYDTG65uKBqeYrvxcB/8bTkaCMJg8wijR59RSIzDVwxLbWsrzRkGS6wF0nDsnS25RZTWlVurUPBTMA+WmMsz3hk3kk1rPMlZ9YwtaBIMP2DUeinoG2k0wQGkjkFgoWq26R3AcMyQas1+papxVts3PJu302/VGMoelxgXBG7EIaKW3gTOFxx4I3kP6O2h6r8/PW6G/d9W6m/QOIpcHrWASLoZJ0ou1/R2H/yz2UW4pFZsxoQpAuTqct8i/LdB2WvCp+uSgVlYLphTNw3UPeSWyyxumtXR3AEUD7LaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OpHFuuO03dhXmQwhGdN+S52lCy/qQnnM7dLpBmEky+4=; b=eHSn+w04nisgv6C/snmSNSYBmZqb3LRtyl/2CKZPzKsk3dXPR5wIV1w36Kg7qvLQRY2d60xbm/FJKBM2rRu/CRYrAHfGcOfXpDX497wR+fRxhycfPwXzfZUF62xDL7pwn9iEp1blPCO2a7P9aca930wor8Rab1qhmq2HdMydCJXJ06mkEU1h6HCIhri+pZPvi7OXT65TRmuJkv0xQNhVekaCUs/wcWBE6x78c8qZPu9YOh/1MRTiW2qCwqv+1SS1ecB0Z9rRrwj8wO52kXqN8V28LjKm+TX6+BpMa5nYIX4PuU2VZ11GYNWKKCctiCTn0WVbPjrCj+ja3wmEklfktw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by MWHPR1101MB2320.namprd11.prod.outlook.com (2603:10b6:301:53::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Thu, 7 Jul 2022 16:46:58 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::991b:97a0:7836:5174%10]) with mapi id 15.20.5417.019; Thu, 7 Jul 2022 16:46:58 +0000 From: "Ni, Ray" To: "Lu, James" , "devel@edk2.groups.io" CC: "Lu, James" , "Dong, Guo" , "Guo, Gua" Subject: Re: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL Thread-Topic: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver in UPL Thread-Index: AQHYkhzOmsyaXHSVtEOTC22nyvHXT61zHeTn Date: Thu, 7 Jul 2022 16:46:57 +0000 Message-ID: References: <20220707161509.1471-1-james.lu@intel.com> In-Reply-To: <20220707161509.1471-1-james.lu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a5c9dc6d-a47a-4e0c-7522-08da60384e95 x-ms-traffictypediagnostic: MWHPR1101MB2320:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Kg8CVFBHyhmrmtSSbITocHVJvMbno24MtzCNUywlfjyKgKg0L2JLd+UngwPt+FxBmm2xPpTA17B9mEtzJ68vkouK2Z6sQW+Pb8kCVu93zoB6kcxN0dNWunCMahGUZnQpSxLVyW9eYx7YZUOhUXld+KdRFiB6JKhybUDKXElseneTMD4nve4W1UxdAoI5Qz2Im4wPR0L0VXHPyyx3eBCuw2Yt2QW71Hxbywd9LCZclC8jkNreOqzCHSJ2jeiJw2qlgFYkesKN1zOnDp/CCoiRLKp2KhHwJkLYAJfcbRr6HbYDvPvWDp9pylfeS8LmAClhDmbE9f4RmqrZkUC+SOn3PBat2S5St9BTvRH9wgX/fUJ59DReMekqTe0CxNLPyNIj2m/XKCRf8te+yC04VthhTs+0f1/TzbP2T/S2htNdOR2vcc26kJRMsRKDq4bFVxvOpeU2uxiiMkvOtnne9snPBX6fc9LcqZ1a/ibjz8uY/27q2DnvxP+QIIRCUqE+lzz/PPwMrGJZs+g15hFnV2lLWgDxP8mBfKqZENKhKgZADQ6Pr3QP1eZEBUaII0z3LGvvobEPuIjRJXydVxUnzTn9ArFeudcznYPizGy+iDZtJrGooyrD3Gxqvo76NM1caNSBCzGIcexQmFFfTzdXHtWRpkubefTItI3Y4Rf10gFxGms1cmcZSNHv3KoYTtHQ0xkEAEMcq1cdNG1lNDW9A0OB4ZPG4fBDlZk73H0ZB4wu0btxASqC6MyHcxHPjyX6rrYZWTC0lNMUzTjKdiF1Kkk5TG/Lrl5h7FoqcERVY0TEwQndyoDwxxXazxynIP7k0qDFV12/3+SLEEwGKjJihJcW3RG8pmT31ZiAvwlZsFMLn3M= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(366004)(136003)(376002)(396003)(346002)(38070700005)(186003)(107886003)(83380400001)(110136005)(64756008)(54906003)(316002)(38100700002)(8676002)(91956017)(66946007)(55016003)(71200400001)(76116006)(122000001)(66556008)(66446008)(66476007)(4326008)(478600001)(966005)(53546011)(7696005)(33656002)(86362001)(6506007)(166002)(52536014)(82960400001)(8936002)(5660300002)(26005)(9686003)(2906002)(41300700001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nrYziL6FeI0USQXt2tCAzJhkiukRC2QWaaVF6XUY7+uRKzEX25jrS/69ZMnM?= =?us-ascii?Q?aaoius8AcQqSBa8Xi9Obv4UcbtSDTz6M+2tnPkS4GJCRuLPxA6fUoLv4CSb1?= =?us-ascii?Q?Nf32yWlr/2esL8/tHVH4hsHEKiKbUQckPbOvkFfaLYv0g7r/1tjToQKT1ga2?= =?us-ascii?Q?bHZloN+Ipcmxe3/A7TGAhRFYNgX6zsVIZhTyDVuYhKD9Dq03OHH7Xf0DbNr2?= =?us-ascii?Q?QdQrxPgXBP0G5OFi6YX1nnJPH6AuHUuLvc6TxgAdY40T6LkIWivmHHtDSUal?= =?us-ascii?Q?USOBBRJ2oMZr0UqxZJ+es7ifkwkDtjMCMGoKVOfkINHNvy1P69BUfAzWyigD?= =?us-ascii?Q?AqDjynM8F7iGEBxJ3w6/XisFeyiAOauxfClRRqkBC7YVvLrc/0/l9IyIo6rJ?= =?us-ascii?Q?5T/rgFB9ZSCXmnG9lMNaiLd/RxzKkaqN5LLBKxQ72YosYmvtEHj9QZ/qLWRl?= =?us-ascii?Q?gvXfU5K8MWjXvdr70aLF6k7KxcVeEtsSOj/pI62xnykqmw7sR45vtaHFBkoY?= =?us-ascii?Q?6/aznt3Q1SHWCaJMP+pqxggIWNdufuqoEt6KVNooExqHlWNfqG/OBUvFegkX?= =?us-ascii?Q?kMJ0McRCzTaWVggMLjAN0pyYiyhy0V6p0aiERoPImRU7o0JE414pOpo+ve5D?= =?us-ascii?Q?FXBobyshliiuFirAvqEMJuFDoox9FfT3NYw2IM9Fh6nhrZUneI6cEXrqdCbo?= =?us-ascii?Q?HOBNwLnQeo3hZBd1s9cKtvvhnVhA/cwxggSXIuEaJ3EErI0/LLWdlDSysIMi?= =?us-ascii?Q?EJB4FDCBRkWJgRCWY+tckcEGDqaZReUcS8Gcw5tiLwBvwC5azZb/z8eFYSYm?= =?us-ascii?Q?oo9Ber/kLP7MNGBBFO3S5ldhHR/ZfZH8p4p5DMwYtlQDxQnHYR7o/KTbQtVW?= =?us-ascii?Q?I0TAt/oAC/Xex9wf8uAjkZDuLU7LPx5yt0/glFL8mtFz4TxAweV9IXgYHPNR?= =?us-ascii?Q?WITVAmhlU9R3X+FUjzX8U+rdYZWHHw6V/hsN6oO8KoDXa4+rViVTgnGw5oRY?= =?us-ascii?Q?1S0oXDZFBMYY2yQLgX3kqnt6nBC2426wVqF1TmY6N4EfgW2KgBHjF6F7mv/B?= =?us-ascii?Q?0eR91k7QnPAG83VRdsupcuR25il82fK1/x7QXWrSzrNqGaxQaY2o7cFQ0m/Q?= =?us-ascii?Q?scO0nQvWLkCXWitl0oAb8yIj8irwieX5VtIeMASFMauQjbKcMTBJss/pVcBV?= =?us-ascii?Q?yYRPfD6SLDXa9f2DUN2qdQL0kUKUvGwXW3Em2zv5z4RPdAqNIhqCgTkKxaOb?= =?us-ascii?Q?6rFFa1IwqcIYIVfLZqYqGaU7aNaV4tS/FxmLFGqCqNk4QfQHBdF39fhHxvhv?= =?us-ascii?Q?sKNoG6VCujypkLQ2VU+WKjGSWNuxO/OFs327/HyrCXCSZralDCXuXeP80Qir?= =?us-ascii?Q?sL3sC8+JX0H9gRTr2WB1ZDsoy2Ua+7DHQAwobnk1I9GVvhVZvAz4G3Q6Mx4g?= =?us-ascii?Q?06yL9l1e70K7oTfVkUKc31WEhDghU+8zzmBCMJ20baqEVOP2JT1omVJtMFrs?= =?us-ascii?Q?WamCgZprNy7GEz6ECb9KAGJ+5UDW0web5lJoHbJrSng06xJLkRqxe5PnqRvX?= =?us-ascii?Q?m/B8+NRUt8MT/T2hwFEsblL3taRFncqHGgUgDYG642YBojy7Ude4hXvz5t3O?= =?us-ascii?Q?Sw=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5c9dc6d-a47a-4e0c-7522-08da60384e95 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2022 16:46:57.8574 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dHO76xEZBqNX3ZQaAWGICqzFKom7JJ2bY8LqIm2wqVGQwvseQ7HK8nkbULxbLbzLOuXPq8xE4frP/C48KZNbrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2320 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MWHPR11MB16314755F36B3D6E02BFADA58C839MWHPR11MB1631namp_" --_000_MWHPR11MB16314755F36B3D6E02BFADA58C839MWHPR11MB1631namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni thanks, ray ________________________________ From: Lu, James Sent: Friday, July 8, 2022 12:15:09 AM To: devel@edk2.groups.io Cc: Lu, James ; Dong, Guo ; Ni, Ray= ; Guo, Gua Subject: [PATCH v3] UefiPayloadPkg: Add macro to support selective driver i= n UPL 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 DEFINE ABOVE_4G_MEMORY =3D TRUE DEFINE BOOT_MANAGER_ESCAPE =3D FALSE + DEFINE ATA_ENABLE =3D TRUE + DEFINE SD_ENABLE =3D TRUE + DEFINE PS2_MOUSE_ENABLE =3D TRUE DEFINE SD_MMC_TIMEOUT =3D 1000000 + + # + # NULL: NullMemoryTestDxe + # GENERIC: GenericMemoryTestDxe + # + DEFINE MEMORY_TEST =3D NULL # # SBL: UEFI payload for Slim Bootloader # COREBOOT: UEFI payload for coreboot @@ -596,7 +605,11 @@ MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRun= timeDxe.inf UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf +!if $(MEMORY_TEST) =3D=3D "GENERIC" + MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTest= Dxe.inf +!elseif $(MEMORY_TEST) =3D=3D "NULL" MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.in= f +!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) =3D=3D 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) =3D=3D 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) =3D=3D TRUE MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf !endif +!if $(PS2_MOUSE_ENABLE) =3D=3D 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) =3D=3D TRUE ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf { ## 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 { ## This flag is used to control initialization of the shell library 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 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf -INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.= inf +!if $(MEMORY_TEST) =3D=3D "GENERIC" +INF MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryT= estDxe.inf +!elseif $(MEMORY_TEST) =3D=3D "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) =3D=3D TRUE INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf !endif +!if $(PS2_MOUSE_ENABLE) =3D=3D 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) =3D=3D 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) =3D=3D 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/AcpiTable= Dxe.inf # !if $(SHELL_TYPE) =3D=3D BUILD_SHELL INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf +!endif INF ShellPkg/Application/Shell/Shell.inf !endif -- 2.26.2.windows.1 --_000_MWHPR11MB16314755F36B3D6E02BFADA58C839MWHPR11MB1631namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Ray Ni <Ray.ni@intel.com>

thanks,
ray

From: Lu, James <james.l= u@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@int= el.com>; Ni, Ray <ray.ni@intel.com>; Guo, Gua <gua.guo@intel.co= m>
Subject: [PATCH v3] UefiPayloadPkg: Add macro to support selective d= river in UPL
 
From: James Lu <james.lu@intel.com>

REF: http= s://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 <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/UefiPayload= Pkg.dsc
index cfcf38578d..ec79914f45 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -36,7 +36,16 @@
   DEFINE PLATFORM_BOOT_TIMEOUT     &nbs= p;  =3D 3

   DEFINE ABOVE_4G_MEMORY      &nbs= p;       =3D TRUE

   DEFINE BOOT_MANAGER_ESCAPE      =     =3D FALSE

+  DEFINE ATA_ENABLE        &n= bsp;          =3D TRUE

+  DEFINE SD_ENABLE        &nb= sp;           =3D TRUE
+  DEFINE PS2_MOUSE_ENABLE       &n= bsp;     =3D TRUE

   DEFINE SD_MMC_TIMEOUT       = ;        =3D 1000000

+

+  #

+  # NULL:    NullMemoryTestDxe

+  # GENERIC: GenericMemoryTestDxe

+  #

+  DEFINE MEMORY_TEST        &= nbsp;         =3D NULL

   #

   # SBL:      UEFI payload for Slim Boo= tloader

   # COREBOOT: UEFI payload for coreboot

@@ -596,7 +605,11 @@
   MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCode= HandlerRuntimeDxe.inf

   UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

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

+  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemor= yTestDxe.inf

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

   MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemory= TestDxe.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/Englis= hDxe.inf

   FatPkg/EnhancedFatDxe/Fat.inf

+!if $(ATA_ENABLE) =3D=3D 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) =3D=3D 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) =3D=3D TRUE

   MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf

 !endif

+!if $(PS2_MOUSE_ENABLE) =3D=3D TRUE

   MdeModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf

+!endif

 

   #

   # Console Support

@@ -742,12 +761,14 @@
       #  This should be FALSE for compi= ling the dynamic command.

       gEfiShellPkgTokenSpaceGuid.PcdShellLib= AutoInitialize|FALSE

   }

+!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE

   ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf = {

     <PcdsFixedAtBuild>

       ## This flag is used to control initia= lization of the shell library

       #  This should be FALSE for compi= ling the dynamic command.

       gEfiShellPkgTokenSpaceGuid.PcdShellLib= AutoInitialize|FALSE

   }

+!endif

   ShellPkg/Application/Shell/Shell.inf {

     <PcdsFixedAtBuild>

       ## This flag is used to control initia= lization of the shell library

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
 

 INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf

 INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

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

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

+INF  MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMe= moryTestDxe.inf

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

+INF  MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTe= stDxe.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) =3D=3D TRUE

 INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf

 !endif

+!if $(PS2_MOUSE_ENABLE) =3D=3D 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/EnglishDx= e.inf

+!if $(ATA_ENABLE) =3D=3D 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) =3D=3D 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/Acpi= TableDxe.inf
 #

 !if $(SHELL_TYPE) =3D=3D BUILD_SHELL

 INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf=

+!if $(PERFORMANCE_MEASUREMENT_ENABLE) =3D=3D TRUE

 INF ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf

+!endif

 INF ShellPkg/Application/Shell/Shell.inf

 !endif

 

--
2.26.2.windows.1

--_000_MWHPR11MB16314755F36B3D6E02BFADA58C839MWHPR11MB1631namp_--