From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.16116.1627881751192684223 for ; Sun, 01 Aug 2021 22:22:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=uqrapvaD; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: hao.a.wu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="235314508" X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="235314508" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2021 22:22:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,287,1620716400"; d="scan'208";a="440431859" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga007.fm.intel.com with ESMTP; 01 Aug 2021 22:22:29 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Sun, 1 Aug 2021 22:22:29 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Sun, 1 Aug 2021 22:22:29 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Sun, 1 Aug 2021 22:22:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JjNu1RBRcs+EqLqfCPgMy7u4gIoDGD8HDuk8rCZnTkw+JMA3SdO6zHHCiN9ee/YJRRey4IZ2yw3cshglfUJGmCvBTcRPNolY1+9or0/AnTDfXjADhsgb/XMBm8L6b6rGbUUWHtK/1uuYK8GgQS2ZVkFzS26Fn7Fch9MzX0kh6ESVKTHUVa20F8E0ftOxDjdANwwBV2m5LjIpskWnsTQHFbOcNWCR4rJdoeXAmwMO6fy5R8U770KzAuTbyIsylOfd+nL1tegfnn+nThY4BP2poh9hcGetMQMof3bEd9DK2fo08RYwkld6I6lxYfTEQI75InWtsF5w3l+ppBwNIKM00A== 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-SenderADCheck; bh=ZCuV4wCObDNQFCkpd2UUVFVubqo5uDtsDvLOPv8S29w=; b=KaO1nKxDTU+vDJgniZrZTI1FSEqfZoXbUPfAiizI3bgjSaauA8KtvW/cvEufKHZ1GhiQgGO49Tfzo9ZABuKIAPNDB7/jm3khA1GW+gCzB869qhGvsz3bQkIcW/Aqh5HxKTk26/Bu893NzAKGYtM593dE+N2iVdgM3thgdrT4Aw4RR1XqrQG4haeveNyp0jP1F7CEn4e3S25ehFty1TlGtoawd1SG/D2uh/4k5M3HoZEGu3SdbfLxepp0A3KdvSC4mWknS/Ju5aW+IZkbtsz2WQqmOHby6NcbB+s3NDst7lhI8tqNjoPsFERRrdBfSImpBQ1YkFeYCrxSTG7jo7N0lQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZCuV4wCObDNQFCkpd2UUVFVubqo5uDtsDvLOPv8S29w=; b=uqrapvaDSt3orPt63AmsHH4dlmR7dbm9nZQFWnTxiJnnKK3BFIZJiO8SlJiY0UP4oNjfxE7jiD1sGE+rqp9+3LOzHx1daQqt0VPpvs67ZOHCGBSv1I7DEHcR6kBN7Rsljk31IeDYgrzYyL3cBi0wT9656BaCvcNONQYPW2zvC/Y= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR1101MB2100.namprd11.prod.outlook.com (2603:10b6:405:58::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18; Mon, 2 Aug 2021 05:22:27 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::cd58:25ce:5017:619d]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::cd58:25ce:5017:619d%5]) with mapi id 15.20.4373.026; Mon, 2 Aug 2021 05:22:27 +0000 From: "Wu, Hao A" To: Grzegorz Bernacki , "devel@edk2.groups.io" , Sunny Wang CC: "leif@nuviainc.com" , "ardb+tianocore@kernel.org" , Samer El-Haj-Mahmoud , "mw@semihalf.com" , "upstream@semihalf.com" , "pete@akeo.ie" , "Bi, Dandan" , "Dong, Eric" , "Ni, Ray" , "Wang, Jian J" , "Gao, Zhichao" Subject: Re: [edk2-devel] [PATCH v4 1/1] MdeModulePkg: Add BootDiscoveryPolicyUiLib. Thread-Topic: [edk2-devel] [PATCH v4 1/1] MdeModulePkg: Add BootDiscoveryPolicyUiLib. Thread-Index: AQHXfs1zX7DpFYpfIE+Os26YKwwQ06tfm8EAgAAVNZCAAAyasA== Date: Mon, 2 Aug 2021 05:22:27 +0000 Message-ID: References: <20210722074425.2274716-1-gjb@semihalf.com> <20210722074425.2274716-2-gjb@semihalf.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: semihalf.com; dkim=none (message not signed) header.d=none;semihalf.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a371c781-b147-41d5-d32c-08d9557584c0 x-ms-traffictypediagnostic: BN6PR1101MB2100: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1417; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mx2wDxE5bQtJUI0Zktu+QpGiUwT0zzJyrB/XRoWk00uuKBz+QnAkvR8zXBsBc0zorYh1rH2TfT3FlIceKxH8i9nGE++3uBPWBEifMQphm3oNryUSmZCMVkx0mtlvM9ESY0Q7ayT+kU7wkyRPBGjDl3YqJRzHAiM830DiEMWWHIx+1V3D5ZgWd7HdA8KSB4HeOIHneakpeeLmt1a2Lu2nx/wFehd+KK8sikKsXZaFBDk6t+fPJVXN6W6qRjjF6xSDmm+/5lkTcg4VCWcmFuxhSxy+J/4n5J5Zvp/gabipa+ndtPU7zXidnDbz6M2AxEBnC6Qcmg5Kf/lAlx4EYHKQT8KZ8ZvTnmDEyI+vay6LKfSJmPmpQqW8nMNdZaSk47ixvYJInUkzPuqHYEHPevdpsiy1MAq9JiAhMgib8d9GQyLuY7I3KWTSUFqMQnUzcUnHLyC7wAuallXSnZ1O9k1YAs2Dj74lh+VOxqRrsi6Vi9VNkVhzxFuXcovabgUP/pc3+YRR9yjx6M8mrGTFYGcgiylBHitX9WMiUKybCpzgfwAHfVQXk2NR4f1cqFRInIHjw0jeJ9LgfLQTLUhztvrRYoT0Bid4cIov7oJ0K43Dt6yboIy38UTOgQr1V3GzEDbjDKy2brwwxKPRMqsjqhZScFZxC4dGLhKXvjT+lS3Ly8KMspZM+BuzFPWD8w4EEyq8zCtYxhvrhvcpHi4dFNlQ01yU1My7Y8cEgM5QTLZCWelxxaowNzdwVhi+r2vSr7fryn8V4RvzcLsFRV1hN4/DQ2cVNAk/PyWyAwPMvK/9aRCGwqx7XBkfU72r39pMi8v4zsZ6hzB7D2F/ywnOT4Q84rEqO4XnuVEzaXIigZbj6TQ= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(396003)(346002)(366004)(136003)(39860400002)(376002)(6506007)(53546011)(55016002)(8676002)(86362001)(7696005)(38070700005)(186003)(26005)(33656002)(54906003)(110136005)(107886003)(38100700002)(478600001)(76116006)(52536014)(66946007)(66476007)(966005)(64756008)(122000001)(2940100002)(316002)(66446008)(71200400001)(5660300002)(83380400001)(30864003)(66556008)(4326008)(8936002)(9686003)(2906002)(579004)(44824005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jFWXbX8QMh2JosqRF43RN76325FWX4G9HkmCe4+9xOkIRr3lxFW0Z/Me9owt?= =?us-ascii?Q?sOa53CH/jUe31eJeZoWXGdflUfbk/cwOB/l85Qvzk0h5Nafy0eIQEV/OF1Q2?= =?us-ascii?Q?dlk/9oGaoyb8PhXWt8m2apK2YfxTv/uwghyJZidh4eIrJBUqF7zBQL0X55++?= =?us-ascii?Q?2bUccQpRdrwRV2eHGEcADnpz9oKCS0CKz2JUd/07n0ueiuekJXqs21cnrgb0?= =?us-ascii?Q?kSb+GXMLvyDS5RpRYq7fuufenC6uxXBrjg/HeoSXnW0AuW6A5SrMTAxZFeaI?= =?us-ascii?Q?4vWr2fltQvjmz8aYsB/IU2YnvtlTGniLZUGTgJdGY/VxN9ZgAHtnrJCAEJCt?= =?us-ascii?Q?DR7QXrdC3QlNtRJhV0uHG12us85rELI/wwRmZ0WL1Mz2cShaaD2DOn5mTLXv?= =?us-ascii?Q?Eg3zJvJZeoQzLdZuWcy8BREDHMQQCvDBEyZhUqBu/mSDHAEIIQsZyI4IDj6S?= =?us-ascii?Q?1qiNC5pJqdL3BUfprWrga1qigInkTAjexeb9dNDFHXe23zyFMp6LLc00K9qo?= =?us-ascii?Q?jK1W306C9tdlfiVKfLBaIk8HPXnYpDf/8u6r1df4IWTOED+Pff/B82mdssV4?= =?us-ascii?Q?GV3N/8cxV8KmO+6eXNZ9TED9rQjtSHMgcUOmd8Lb5TA5rYLiTeZeiMwwrnua?= =?us-ascii?Q?uTkTuHh+mdPGYCAx/aymf/ZkwLGvGSRqL7oxyDIfYnVQSQ+EsfzonPg9z6Wn?= =?us-ascii?Q?aYbSyZj+3NsviBQ+HnBA25Os1yw9LRwjV50l3j5ytgpNoMNQGZA4DORTESg0?= =?us-ascii?Q?HPzIq1KZwLDf1yMvrR3jEyLIdgBx9HIUldIjnSmZ0XcwiDQDFYqHWKMYfTuJ?= =?us-ascii?Q?Y1TUn+e+YcJnkpzr6kExnxJTxTKcKxEH3Vw661QwcEbJq5uT6/+eVNFazAmT?= =?us-ascii?Q?spEaaO2uWBzsrGXZJK02wD/FoRIvjA86cpepM4DpeGvepVkTicLENhcfCwuP?= =?us-ascii?Q?CoU3HeaTGE/QMSGMAwdYBk17pMm959+6gQkdrMDTxEfd9cVq2wsxZiTE6X3t?= =?us-ascii?Q?L2N7d/BjB9CyLvRNv2fOOn+6DbGV/7jDJawJdJQn72JH27S1jdqZhkkdKXrO?= =?us-ascii?Q?/lOPo8BSthvGwH7EbwTtBlDcLOnLFu1xdC2EixPY/z4BspfUseCNkSJ2lAAY?= =?us-ascii?Q?teuJQn7R3TPrzN2HCQSkmJ6egCZ7ongs3Pmv2Z8Z83HOOk0bg6q1YBng86lx?= =?us-ascii?Q?0iY7nPHxJGW5CXZnoxvOG5wG6/hrqWygq97xsUR3Cddivzq953cXuhKbL7VP?= =?us-ascii?Q?ijmGE4m4wlhPjetckJ12inlmDlrRJ3fUctT940y910Z67zRruGoBpmtGrQkV?= =?us-ascii?Q?j5ygXfWIqghcWByj0NzXPfqK?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a371c781-b147-41d5-d32c-08d9557584c0 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2021 05:22:27.3901 (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: 6mS5Dct5oqNWghes4BGNxYDezOot1y2Kbjcx4lIA45hJy9TUjW9HU50n/oRugCSMFzYpm4imKzu2KzI1nthhIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2100 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, Hao > A > Sent: Monday, August 2, 2021 12:36 PM > To: Sunny Wang ; Gao, Zhichao > ; Grzegorz Bernacki ; > devel@edk2.groups.io; Wang, Jian J > Cc: leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj-Mahmoud > ; mw@semihalf.com; > upstream@semihalf.com; pete@akeo.ie; Bi, Dandan ; > Dong, Eric ; Ni, Ray > Subject: Re: [edk2-devel] [PATCH v4 1/1] MdeModulePkg: Add > BootDiscoveryPolicyUiLib. >=20 > > -----Original Message----- > > From: Sunny Wang > > Sent: Monday, August 2, 2021 11:16 AM > > To: Grzegorz Bernacki ; devel@edk2.groups.io; Wang, > > Jian J ; Wu, Hao A > > Cc: leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj- > Mahmoud > > ; mw@semihalf.com; > > upstream@semihalf.com; pete@akeo.ie; Bi, Dandan > ; > > Dong, Eric ; Gao, Zhichao > > ; Sunny Wang ; Ni, Ray > > > > Subject: RE: [PATCH v4 1/1] MdeModulePkg: Add BootDiscoveryPolicyUiLib= . > > > > Hi Hao, Jian, and MdeModulePkg maintainers, > > > > Could you help merge this patch? This patch already got Reviewed-by > > from Zhichao and me. If we still need to get others' reviews, feel > > free to let us know. >=20 >=20 > Really sorry for the slow response. > Pull request created at: https://github.com/tianocore/edk2/pull/1855 Hello Greg, A couple of checks failed during the merging test: https://github.com/tian= ocore/edk2/pull/1855 Could you help to refine the patch for the below reported errors? https://dev.azure.com/tianocore/11ea4a10-ac9f-4e5f-8b13-7def1f19d478/_apis= /build/builds/26960/artifacts?artifactName=3DBuild%20Logs%20TARGET_MDEMODUL= E_RELEASE&api-version=3D6.0&%24format=3Dzip (file CI_BUILDLOG.md): #### ERROR: Overall Build Status: Error There were 1 failures out of 10 attempts ## Summary #### ERROR: Error ## Table of Contents + [Init SDE](#init-sde) + [Loading Plugins](#loading-plugins) + [Start Invocable Tool](#start-invocable-tool) + [Getting Environment](#getting-environment) + [Loading plugins](#loading-plugins) + [Building MdeModulePkg Package](#building-mdemodulepkg-package) + [MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= b.inf not in MdeModulePkg/MdeModulePkg.dsc](#mdemodulepkg/library/bootdisco= verypolicyuilib/bootdiscoverypolicyuilibinf-not-in-mdemodulepkg/mdemodulepk= gdsc) + [Summary](#summary) ## Error List + "--->Test Failed: Dsc Complete Check Test NO-TARGET returned 1" from c:= \hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\edk2toolext\in= vocables\edk2_ci_build.py:192 + "Overall Build Status: Error" from c:\hostedtoolcache\windows\python\3.= 8.10\x64\lib\site-packages\edk2toolext\invocables\edk2_ci_build.py:214 + "Error" from c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-pack= ages\edk2toolext\base_abstract_invocable.py:144 https://dev.azure.com/tianocore/11ea4a10-ac9f-4e5f-8b13-7def1f19d478/_apis= /build/builds/26959/artifacts?artifactName=3DBuild%20Logs%20TARGET_MDEMODUL= E_RELEASE&api-version=3D6.0&%24format=3Dzip (file CI_BUILDLOG.md): #### ERROR: Overall Build Status: Error There were 2 failures out of 10 attempts ## Summary #### ERROR: Error ## Table of Contents + [Init SDE](#init-sde) + [Loading Plugins](#loading-plugins) + [Start Invocable Tool](#start-invocable-tool) + [Getting Environment](#getting-environment) + [Loading plugins](#loading-plugins) + [Building MdeModulePkg Package](#building-mdemodulepkg-package) + [MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= b.inf not in MdeModulePkg/MdeModulePkg.dsc](#mdemodulepkg/library/bootdisco= verypolicyuilib/bootdiscoverypolicyuilibinf-not-in-mdemodulepkg/mdemodulepk= gdsc) + [Summary](#summary) ## Error List + "EFI coding style error" from /home/vsts/work/1/s/.pytool/Plugin/EccChe= ck/EccCheck.py:87 + "*Error code: 7001" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/Ec= cCheck.py:87 + "*There should be no use of int, unsigned, char, void, long in any .c, = .h or .asl files" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/EccCheck= .py:87 + "*file: //home/vsts/work/1/s/MdeModulePkg/Library/BootDiscoveryPolicyUi= Lib/BootDiscoveryPolicyUiLib.c" from /home/vsts/work/1/s/.pytool/Plugin/Ecc= Check/EccCheck.py:87 + "*Line number: 31" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/Ecc= Check.py:87 + "*Invalid variable type (unsigned) in definition [extern unsigned char = [] BootDiscoveryPolicyUiLibVfrBin]" from /home/vsts/work/1/s/.pytool/Plugin= /EccCheck/EccCheck.py:87 + "EFI coding style error" from /home/vsts/work/1/s/.pytool/Plugin/EccChe= ck/EccCheck.py:87 + "*Error code: 8003" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/Ec= cCheck.py:87 + "*The #ifndef at the start of an include file should have one postfix u= nderscore, and no prefix underscore character '_'" from /home/vsts/work/1/s= /.pytool/Plugin/EccCheck/EccCheck.py:87 + "*file: //home/vsts/work/1/s/MdeModulePkg/Include/Guid/BootDiscoveryPol= icy.h" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/EccCheck.py:87 + "*Line number: 11" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/Ecc= Check.py:87 + "*The #ifndef name [_BOOT_DISCOVERY_POLICY_UI_LIB_H_] does not follow t= he rules" from /home/vsts/work/1/s/.pytool/Plugin/EccCheck/EccCheck.py:87 + "--->Test Failed: EccCheck Test NO-TARGET returned 1" from /opt/hostedt= oolcache/Python/3.8.11/x64/lib/python3.8/site-packages/edk2toolext/invocabl= es/edk2_ci_build.py:192 + "--->Test Failed: Dsc Complete Check Test NO-TARGET returned 1" from /o= pt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/edk2toolex= t/invocables/edk2_ci_build.py:192 + "Overall Build Status: Error" from /opt/hostedtoolcache/Python/3.8.11/x= 64/lib/python3.8/site-packages/edk2toolext/invocables/edk2_ci_build.py:214 + "Error" from /opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-= packages/edk2toolext/base_abstract_invocable.py:144 Best Regards, Hao Wu >=20 > By the way, I do not see an explicit 'Reviewed-by' tag from you for this= V4 > patch, so I will treat the above statement as your 'R-b' tag for this pa= tch. > Thanks you and Zhichao for the reviewing effort. >=20 > Best Regards, > Hao Wu >=20 >=20 > > By the way, we do have an edk2-platform change below that is waiting > > for this patch to get merged first, and will have more patches based > > on this to be sent out to solve some deployment and testing problems > > caused by Fast boot on ARM platforms. > > - https://edk2.groups.io/g/devel/message/78072 > > > > Best Regards, > > Sunny Wang > > > > -----Original Message----- > > From: Grzegorz Bernacki > > Sent: Thursday, July 22, 2021 3:44 PM > > To: devel@edk2.groups.io > > Cc: leif@nuviainc.com; ardb+tianocore@kernel.org; Samer El-Haj- > Mahmoud > > ; Sunny Wang > ; > > mw@semihalf.com; upstream@semihalf.com; pete@akeo.ie; > > jian.j.wang@intel.com; hao.a.wu@intel.com; dandan.bi@intel.com; > > eric.dong@intel.com; Grzegorz Bernacki ; Zhichao Gao > > > > Subject: [PATCH v4 1/1] MdeModulePkg: Add BootDiscoveryPolicyUiLib. > > > > This library extends Boot Maintenance Menu and allows to select Boot > > Discovery Policy. When choice is made BootDiscoveryPolicy variable is = set. > > Platform code can use this variable to decide which class of device > > shall be connected. > > > > Signed-off-by: Grzegorz Bernacki > > Reviewed-by: Zhichao Gao > > --- > > MdeModulePkg/MdeModulePkg.dec = | 9 ++ > > > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib. > > inf | 52 +++++++ > > MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h = | > 22 > > +++ > > > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib. > > c | 160 ++++++++++++++++++++ > > > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib. > > uni | 18 +++ > > > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib > > Strings.uni | 29 ++++ > > > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib > > Vfr.Vfr | 44 ++++++ > > 7 files changed, 334 insertions(+) > > create mode 100644 > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib. > > inf > > create mode 100644 MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h > > create mode 100644 > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib. > > c > > create mode 100644 > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib. > > uni > > create mode 100644 > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib > > Strings.uni > > create mode 100644 > > > MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLib > > Vfr.Vfr > > > > diff --git a/MdeModulePkg/MdeModulePkg.dec > > b/MdeModulePkg/MdeModulePkg.dec index ad84421cf3..133e04ee86 > > 100644 > > --- a/MdeModulePkg/MdeModulePkg.dec > > +++ b/MdeModulePkg/MdeModulePkg.dec > > @@ -425,6 +425,9 @@ > > ## Include/UniversalPayload/SerialPortInfo.h > > gUniversalPayloadSerialPortInfoGuid =3D { 0xaa7e190d, 0xbe21, 0x440= 9, > > { 0x8e, 0x67, 0xa2, 0xcd, 0xf, 0x61, 0xe1, 0x70 } } > > > > + ## GUID used for Boot Discovery Policy FormSet guid and related > variables. > > + gBootDiscoveryPolicyMgrFormsetGuid =3D { 0x5b6f7107, 0xbb3c, 0x4660= , > > + { 0x92, 0xcd, 0x54, 0x26, 0x90, 0x28, 0x0b, 0xbd } } > > + > > [Ppis] > > ## Include/Ppi/AtaController.h > > gPeiAtaControllerPpiGuid =3D { 0xa45e60d1, 0xc719, 0x44aa, { = 0xb0, 0x7a, > > 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} > > @@ -1600,6 +1603,12 @@ > > # @Prompt Console Output Row of Text Setup > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow|25|UINT32|0x40 > > 00000e > > > > + ## Specify the Boot Discovery Policy settings # To support > > + configuring from setup page, this PCD should be overridden in > > + DynamicHii > > type in its platform .dsc: > > + # > > + > > > gEfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy|L"BootDiscove > > ryP > > + olicy"|gBootDiscoveryPolicyMgrFormsetGuid|0 > > + # @Prompt Boot Discovery Policy > > + > > + > > > gEfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy|2|UINT32|0x4 > > 0000 > > + 00f > > + > > [PcdsFixedAtBuild.AARCH64, PcdsPatchableInModule.AARCH64] > > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20|UI > > NT32|0x0001004c > > > > diff --git > > > a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > b.inf > > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > b.inf > > new file mode 100644 > > index 0000000000..1fb4d43caa > > --- /dev/null > > +++ > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyU > > +++ iLib.inf > > @@ -0,0 +1,52 @@ > > +## @file > > +# Library for BDS phase to use Boot Discovery Policy # # Copyright > > +(c) 2021, ARM Ltd. All rights reserved.
# Copyright (c) 2021, > > +Semihalf All rights reserved.
# SPDX-License-Identifier: > > +BSD-2-Clause-Patent # ## > > + > > +[Defines] > > + INF_VERSION =3D 0x00010005 > > + BASE_NAME =3D BootDiscoveryPolicyUiLib > > + MODULE_UNI_FILE =3D BootDiscoveryPolicyUiLib.uni > > + FILE_GUID =3D BE73105A-B13D-4B57-A41A-463DBD15= FE10 > > + MODULE_TYPE =3D DXE_DRIVER > > + VERSION_STRING =3D 1.0 > > + LIBRARY_CLASS =3D NULL|DXE_DRIVER UEFI_APPLICATION > > + CONSTRUCTOR =3D BootDiscoveryPolicyUiLibConstruc= tor > > + DESTRUCTOR =3D BootDiscoveryPolicyUiLibDestruct= or > > +# > > +# The following information is for reference only and not required by > > +the > > build tools. > > +# > > +# VALID_ARCHITECTURES =3D IA32 X64 AARCH64 > > +# > > + > > +[Sources] > > + BootDiscoveryPolicyUiLib.c > > + BootDiscoveryPolicyUiLibStrings.uni > > + BootDiscoveryPolicyUiLibVfr.Vfr > > + > > +[Packages] > > + MdePkg/MdePkg.dec > > + MdeModulePkg/MdeModulePkg.dec > > + > > +[LibraryClasses] > > + DevicePathLib > > + BaseLib > > + UefiRuntimeServicesTableLib > > + UefiBootServicesTableLib > > + DebugLib > > + HiiLib > > + UefiLib > > + BaseMemoryLib > > + > > +[Guids] > > + gBootDiscoveryPolicyMgrFormsetGuid > > + > > +[Pcd] > > + gEfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy ## > > PRODUCES > > + > > +[Depex] > > + gEfiHiiDatabaseProtocolGuid AND gPcdProtocolGuid > > diff --git a/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h > > b/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h > > new file mode 100644 > > index 0000000000..8eb0968a16 > > --- /dev/null > > +++ b/MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h > > @@ -0,0 +1,22 @@ > > +/** @file > > + Definition for structure & defines exported by Boot Discovery > > +Policy UI > > + > > + Copyright (c) 2021, ARM Ltd. All rights reserved.
Copyright > > + (c) 2021, Semihalf All rights reserved.
> > + > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#ifndef _BOOT_DISCOVERY_POLICY_UI_LIB_H_ #define > > +_BOOT_DISCOVERY_POLICY_UI_LIB_H_ > > + > > +#define BDP_CONNECT_MINIMAL 0 /* Do not connect any additional > > devices */ > > +#define BDP_CONNECT_NET 1 > > +#define BDP_CONNECT_ALL 2 > > + > > +#define BOOT_DISCOVERY_POLICY_MGR_FORMSET_GUID { 0x5b6f7107, > > 0xbb3c, > > +0x4660, { 0x92, 0xcd, 0x54, 0x26, 0x90, 0x28, 0x0b, 0xbd } } > > + > > +#define BOOT_DISCOVERY_POLICY_VAR L"BootDiscoveryPolicy" > > + > > +#endif > > diff --git > > > a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > b.c > > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > b.c > > new file mode 100644 > > index 0000000000..6814d0bb8f > > --- /dev/null > > +++ > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyU > > +++ iLib.c > > @@ -0,0 +1,160 @@ > > +/** @file > > + Boot Discovery Policy UI for Boot Maintenance menu. > > + > > + Copyright (c) 2021, ARM Ltd. All rights reserved.
Copyright > > + (c) 2021, Semihalf All rights reserved.
> > + > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#include #include > > + #include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +/// > > +/// HII specific Vendor Device Path definition. > > +/// > > +typedef struct { > > + VENDOR_DEVICE_PATH VendorDevicePath; > > + EFI_DEVICE_PATH_PROTOCOL End; > > +} HII_VENDOR_DEVICE_PATH; > > + > > +extern unsigned char BootDiscoveryPolicyUiLibVfrBin[]; > > + > > +EFI_HII_HANDLE mBPHiiHandle =3D NULL; > > +EFI_HANDLE mBPDriverHandle =3D NULL; > > + > > +STATIC HII_VENDOR_DEVICE_PATH mVendorDevicePath =3D { > > + { > > + { > > + HARDWARE_DEVICE_PATH, > > + HW_VENDOR_DP, > > + { > > + (UINT8)(sizeof (VENDOR_DEVICE_PATH)), > > + (UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8) > > + } > > + }, > > + BOOT_DISCOVERY_POLICY_MGR_FORMSET_GUID > > + }, > > + { > > + END_DEVICE_PATH_TYPE, > > + END_ENTIRE_DEVICE_PATH_SUBTYPE, > > + { > > + (UINT8)(END_DEVICE_PATH_LENGTH), > > + (UINT8)((END_DEVICE_PATH_LENGTH) >> 8) > > + } > > + } > > +}; > > + > > +/** > > + > > + Initialize Boot Maintenance Menu library. > > + > > + @param ImageHandle The image handle. > > + @param SystemTable The system table. > > + > > + @retval EFI_SUCCESS Install Boot manager menu success. > > + @retval Other Return error status.gBPDisplayLibGuid > > + > > +**/ > > +EFI_STATUS > > +EFIAPI > > +BootDiscoveryPolicyUiLibConstructor ( > > + IN EFI_HANDLE ImageHandle, > > + IN EFI_SYSTEM_TABLE *SystemTable > > + ) > > +{ > > + EFI_STATUS Status; > > + UINTN Size; > > + UINT32 BootDiscoveryPolicy; > > + > > + Size =3D sizeof (UINT32); > > + Status =3D gRT->GetVariable ( > > + BOOT_DISCOVERY_POLICY_VAR, > > + &gBootDiscoveryPolicyMgrFormsetGuid, > > + NULL, > > + &Size, > > + &BootDiscoveryPolicy > > + ); > > + if (EFI_ERROR (Status)) { > > + Status =3D PcdSet32S (PcdBootDiscoveryPolicy, PcdGet32 > > (PcdBootDiscoveryPolicy)); > > + ASSERT_EFI_ERROR (Status); > > + } > > + > > + Status =3D gBS->InstallMultipleProtocolInterfaces ( > > + &mBPDriverHandle, > > + &gEfiDevicePathProtocolGuid, > > + &mVendorDevicePath, > > + NULL > > + ); > > + if (EFI_ERROR (Status)) { > > + return Status; > > + } > > + > > + // > > + // Publish our HII data > > + // > > + mBPHiiHandle =3D HiiAddPackages ( > > + &gBootDiscoveryPolicyMgrFormsetGuid, > > + mBPDriverHandle, > > + BootDiscoveryPolicyUiLibVfrBin, > > + BootDiscoveryPolicyUiLibStrings, > > + NULL > > + ); > > + if (mBPHiiHandle =3D=3D NULL) { > > + gBS->UninstallMultipleProtocolInterfaces ( > > + mBPDriverHandle, > > + &gEfiDevicePathProtocolGuid, > > + &mVendorDevicePath, > > + NULL > > + ); > > + > > + return EFI_OUT_OF_RESOURCES; > > + } > > + > > + return EFI_SUCCESS; > > +} > > + > > +/** > > + Destructor of Boot Maintenance menu library. > > + > > + @param ImageHandle The firmware allocated handle for the EFI ima= ge. > > + @param SystemTable A pointer to the EFI System Table. > > + > > + @retval EFI_SUCCESS The destructor completed successfully. > > + @retval Other value The destructor did not complete successfully. > > + > > +**/ > > +EFI_STATUS > > +EFIAPI > > +BootDiscoveryPolicyUiLibDestructor ( > > + IN EFI_HANDLE ImageHandle, > > + IN EFI_SYSTEM_TABLE *SystemTable > > + ) > > +{ > > + > > + if (mBPDriverHandle !=3D NULL) { > > + gBS->UninstallProtocolInterface ( > > + mBPDriverHandle, > > + &gEfiDevicePathProtocolGuid, > > + &mVendorDevicePath > > + ); > > + mBPDriverHandle =3D NULL; > > + } > > + > > + if (mBPHiiHandle !=3D NULL) { > > + HiiRemovePackages (mBPHiiHandle); > > + mBPHiiHandle =3D NULL; > > + } > > + > > + return EFI_SUCCESS; > > +} > > diff --git > > > a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > b.uni > > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > b.uni > > new file mode 100644 > > index 0000000000..eea3ca6c8d > > --- /dev/null > > +++ > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyU > > +++ iLib.uni > > @@ -0,0 +1,18 @@ > > +// /** @file > > +// Boot Discovery Policy UI module. > > +// > > +// Copyright (c) 2021, ARM Ltd. All rights reserved.
// Copyright > > +(c) 2021, Semihalf All rights reserved.
// // > > +SPDX-License-Identifier: BSD-2-Clause-Patent // // **/ > > + > > + > > +#string STR_MODULE_ABSTRACT > > +#language en-US "Boot Discovery Policy UI module." > > + > > +#string STR_MODULE_DESCRIPTION > > +#language en-US "Boot Discovery Policy UI module." > > + > > + > > diff --git > > > a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > bStrings.uni > > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > bStrings.uni > > new file mode 100644 > > index 0000000000..736011c9bb > > --- /dev/null > > +++ > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyU > > +++ iLibStrings.uni > > @@ -0,0 +1,29 @@ > > +// *++ > > +// > > +// Copyright (c) 2021, ARM Ltd. All rights reserved.
// > > +Copyright > > +(c) 2021, Semihalf All rights reserved.
// > > +SPDX-License-Identifier: BSD-2-Clause-Patent // // Module Name: > > +// > > +// BootDiscoveryPolicyUiLibStrings.uni > > +// > > +// Abstract: > > +// > > +// String definitions for Boot Discovery Policy UI. > > +// > > +// --*/ > > + > > +/=3D# > > + > > + > > +#langdef en-US "English" > > + > > +#string STR_FORM_BDP_MAIN_TITLE #language en-US "Boot > Discovery > > Policy" > > + > > +#string STR_FORM_BDP_CONN_MIN #language en-US "Minimal" > > + > > +#string STR_FORM_BDP_CONN_NET #language en-US "Connect > > Network Devices" > > + > > +#string STR_FORM_BDP_CONN_ALL #language en-US "Connect All > > Devices" > > + > > diff --git > > > a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > bVfr.Vfr > > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiL > > i > > bVfr.Vfr > > new file mode 100644 > > index 0000000000..0de87ec34f > > --- /dev/null > > +++ > > b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyU > > +++ iLibVfr.Vfr > > @@ -0,0 +1,44 @@ > > +///** @file > > +// > > +// Formset for Boot Discovery Policy UI // // Copyright (c) 2021, > > +ARM Ltd. All rights reserved.
// Copyright (c) 2021, Semihalf > > +All rights reserved.
// // SPDX-License-Identifier: > > +BSD-2-Clause-Patent // //**/ > > + > > +#include > > +#include "Guid/BootDiscoveryPolicy.h" > > +#include > > + > > +typedef struct { > > + UINT32 BootDiscoveryPolicy; > > +} BOOT_DISCOVERY_POLICY_VARSTORE_DATA; > > + > > +formset > > + guid =3D BOOT_DISCOVERY_POLICY_MGR_FORMSET_GUID, > > + title =3D STRING_TOKEN(STR_FORM_BDP_MAIN_TITLE), > > + help =3D STRING_TOKEN(STR_FORM_BDP_MAIN_TITLE), > > + classguid =3D EFI_IFR_BOOT_MAINTENANCE_GUID, > > + > > + efivarstore BOOT_DISCOVERY_POLICY_VARSTORE_DATA, > > + attribute =3D EFI_VARIABLE_BOOTSERVICE_ACCESS | > > EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, > > + name =3D BootDiscoveryPolicy, > > + guid =3D BOOT_DISCOVERY_POLICY_MGR_FORMSET_GUID; > > + > > + form formid =3D 0x0001, > > + title =3D STRING_TOKEN(STR_FORM_BDP_MAIN_TITLE); > > + > > + oneof varid =3D BootDiscoveryPolicy.BootDiscoveryPolicy, > > + prompt =3D STRING_TOKEN(STR_FORM_BDP_MAIN_TITLE), > > + help =3D STRING_TOKEN(STR_FORM_BDP_MAIN_TITLE), > > + flags =3D NUMERIC_SIZE_4 | INTERACTIVE | RESET_REQUIRED, > > + option text =3D STRING_TOKEN(STR_FORM_BDP_CONN_MIN), value =3D > > BDP_CONNECT_MINIMAL, flags =3D DEFAULT; > > + option text =3D STRING_TOKEN(STR_FORM_BDP_CONN_NET), value =3D > > BDP_CONNECT_NET, flags =3D 0; > > + option text =3D STRING_TOKEN(STR_FORM_BDP_CONN_ALL), value =3D > > + BDP_CONNECT_ALL, flags =3D 0; endoneof; > > + > > + endform; > > +endformset; > > -- > > 2.25.1 > > > > IMPORTANT NOTICE: The contents of this email and any attachments are > > confidential and may also be privileged. If you are not the intended > > recipient, please notify the sender immediately and do not disclose > > the contents to any other person, use it for any purpose, or store or > > copy the information in any medium. Thank you. >=20 >=20 >=20 >=20