From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.86]) by mx.groups.io with SMTP id smtpd.web11.15276.1627874171045019166 for ; Sun, 01 Aug 2021 20:16:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=q/3PUn6M; spf=pass (domain: arm.com, ip: 40.107.6.86, mailfrom: sunny.wang@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gBR063U+gWWwBy0xiai3jI33j8Frx9c6WaVqNOF1Dp0=; b=q/3PUn6M2ktlJpL75tG/1p90ByldvyRP6VrkK/0sPiO/bXte40RcGUEBfVX08bcyUSA8WSTautzoNxRBfN5YmviaxJw341AKMsreIp8noG51sl4mywdnyB9dEFdc9YhuM+TZXJsvNfaxLnV7qEFX2FjhoR2lKyek4US05Tt5yOM= Received: from AS8P251CA0015.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::14) by AM6PR08MB5205.eurprd08.prod.outlook.com (2603:10a6:20b:ee::28) 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 03:16:05 +0000 Received: from VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::a) by AS8P251CA0015.outlook.office365.com (2603:10a6:20b:2f2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Mon, 2 Aug 2021 03:16:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT013.mail.protection.outlook.com (10.152.19.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.18 via Frontend Transport; Mon, 2 Aug 2021 03:16:04 +0000 Received: ("Tessian outbound d9f41274f41a:v101"); Mon, 02 Aug 2021 03:16:04 +0000 X-CR-MTA-TID: 64aa7808 Received: from 5f11fac954ce.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BBB52F2E-F599-4C6E-903F-0876AA53DCA4.1; Mon, 02 Aug 2021 03:15:58 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5f11fac954ce.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 02 Aug 2021 03:15:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cxu/9fmODZGTlmOzGBz/ah6ogqhCU+G8Fz5Ahtt9r2mN1yK9kb1RpKh6H8utmWHIQRywjCWPoBWjLHz6m0Jgc3oIK1Jg2umf3Q21rVXZWTBjVLLIx3Be5kZaqWNX3w51Dw7PUHO1RKMSeNWuC/oJ7E6Q0Q6MUT/LC5FiKRxEZ6/eWTisSdu7mcx3c4FwOzAt31ifOKph8ZtUHdQ+ET7bpRMJ2OeE3LOKlBH8bz0Fbzl7zVY/AfZ4EOIWnRPBzSlZA76QqWL0v5gbdMP5qpHqytJEgj60RoiiMOaQ7iCTspLVENMLMxX4uvGACjh9a6cG0Pcpwlq3LynUF1iz7J5E1A== 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=gBR063U+gWWwBy0xiai3jI33j8Frx9c6WaVqNOF1Dp0=; b=ceXlwpzK8zDotJ/1eKSCJulFhe8Kk+Kwfxoo8CFpsJ/+iX/t9vJiu4vmbvwktv7WL89Q8cEk2ORrEgx3KOKiA6wdB9CrUy6HLy6k5dx0JhaBZREtQ5WhaoZGnpXLJNVMu00t0kWUlID+f6dYm0yVHCEb5N+Efx0qilubriEaAfwFcLLd+1JG40iUL1NkDdd5bEfNt0PGRDf/jGMQJ/87N1E/M7nID0Q6aPi+L7bAYKtJwlkLhjl0Zl2DEMApTbTnMrQ0fMPgc9ROnpgglWeVz9akYUmRhBTh5tygzUzzeHfSS+fgJccHtyTDIUa33DWwkFffWwronS1hGHXF/BLVAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gBR063U+gWWwBy0xiai3jI33j8Frx9c6WaVqNOF1Dp0=; b=q/3PUn6M2ktlJpL75tG/1p90ByldvyRP6VrkK/0sPiO/bXte40RcGUEBfVX08bcyUSA8WSTautzoNxRBfN5YmviaxJw341AKMsreIp8noG51sl4mywdnyB9dEFdc9YhuM+TZXJsvNfaxLnV7qEFX2FjhoR2lKyek4US05Tt5yOM= Received: from DB8PR08MB3993.eurprd08.prod.outlook.com (2603:10a6:10:ad::26) by DB7PR08MB3161.eurprd08.prod.outlook.com (2603:10a6:5:1d::20) 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 03:15:45 +0000 Received: from DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::14b0:85d6:deeb:9ee0]) by DB8PR08MB3993.eurprd08.prod.outlook.com ([fe80::14b0:85d6:deeb:9ee0%7]) with mapi id 15.20.4373.026; Mon, 2 Aug 2021 03:15:44 +0000 From: "Sunny Wang" To: Grzegorz Bernacki , "devel@edk2.groups.io" , "jian.j.wang@intel.com" , "hao.a.wu@intel.com" CC: "leif@nuviainc.com" , "ardb+tianocore@kernel.org" , Samer El-Haj-Mahmoud , "mw@semihalf.com" , "upstream@semihalf.com" , "pete@akeo.ie" , "dandan.bi@intel.com" , "eric.dong@intel.com" , Zhichao Gao , Sunny Wang , "ray.ni@intel.com" Subject: Re: [PATCH v4 1/1] MdeModulePkg: Add BootDiscoveryPolicyUiLib. Thread-Topic: [PATCH v4 1/1] MdeModulePkg: Add BootDiscoveryPolicyUiLib. Thread-Index: AQHXfs1vdSGPQDj+uEipZ1w7l/HJ5atflmyw Date: Mon, 2 Aug 2021 03:15:44 +0000 Message-ID: References: <20210722074425.2274716-1-gjb@semihalf.com> <20210722074425.2274716-2-gjb@semihalf.com> In-Reply-To: <20210722074425.2274716-2-gjb@semihalf.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: EBE38867A303BA4193B0295F533849A8.0 x-checkrecipientchecked: true Authentication-Results-Original: semihalf.com; dkim=none (message not signed) header.d=none;semihalf.com; dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 55e63944-4cca-4975-6295-08d95563dd07 x-ms-traffictypediagnostic: DB7PR08MB3161:|AM6PR08MB5205: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:6790;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: lXZv9Qktu6+5B8zd9G9zt7ahmBVw+0q/I6oX2dAoIrdxqL/sF5ZWfgnI7IHGLYEgyw4dMfPZIpoOZO8XlGqtS7lO9e/l2/Mnejz+qDSGWkksrMXR7WHwtG8lfw/uf57vefgbHQgsWrVeLRfPUHyxwSshgNviztV6km6XZjwX1bUOuVLVg9HFBtXcedfzuG1cHqRcCalUdWPi9JUNPiquqyLsmejJRfCSAjLjEjwjLjTMznQTRYOZYW3o7PMCRfDSfQTmuYtmFIblB2YeJeBWm8RY3f+LeEuzaKOuJXRohQ9ZNJ0hmSQpjDHGdCGJ3A3DHjlb6Un/fRLNb9lrI5RdU6J4dZT9kaY9656f9WbQJlNWlsXe8u/oR5tvnc/OvkzJsHTKKKCHj2IGxsnkCE2oDGZfvY+4Q4ZXaVyTRNV6GkCBwHTArdkrv7FpYxmAee3PbgtFYauHYhjPu62vlbmBOBHLAF/qlYsoSsOsh+olHllUJLPbOJ8ikTHoXMoOzA+GGND/28oYZktjIxwII2fcRb2lUUp5vqAFIG9OQLJpxlOdMTykM1uDpXWdOtZEvl5HyZPszbZc8nU99F3XqoU6ZmCOZScbyhdL9bMSiZuDUwDm20Li5S56mJMd00s6460mnL/8BWjmxQpolKSJFsQ0JLJSVOFf006Xc5czuKk5Wq+J3mkykZsZWSUaHuOtDVRRljWMtScHlottpEvuLphqSQXZ4QuipumBgdyJ74/ta1IVHbcOvM/tYEkYrikND/V4igFCwb1mtcSotwOfDWD/3NI16zFyV85n6Bk6sf1EMzxRxqt1uXHmo6rNYlKzSX/v X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB8PR08MB3993.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(6029001)(4636009)(396003)(376002)(366004)(39850400004)(346002)(136003)(66446008)(8936002)(4326008)(64756008)(86362001)(76116006)(9686003)(71200400001)(66476007)(66556008)(8676002)(186003)(7696005)(7416002)(2906002)(55016002)(30864003)(122000001)(66946007)(5660300002)(6506007)(83380400001)(53546011)(110136005)(478600001)(52536014)(54906003)(38070700005)(38100700002)(316002)(26005)(966005)(33656002)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?jbJ1CIDmJZeXGq9tbtgzj03bIq3Mn9+LESLyxyvr7a9ShHQJMwo0oN4Tm/pR?= =?us-ascii?Q?879/hWUdegAZ1zQj387SjcSvqV7Xh9eqM4u5/Yx4JzvMaeePvdjL12VvnE1H?= =?us-ascii?Q?XAmPhEl0yPwjFZ+0c8U2qLRhMUysPWo4zknrkFHsvgX/Jq2LfBv/7tmZFbLm?= =?us-ascii?Q?Zqdgg9V3qRxc1MPw6cEQCGuqPvj1DB84QZZ5XdGa13noMTh4sl+ctwnhiJUk?= =?us-ascii?Q?7gDMU2Q8pZd/4tGm1O/DHLLvogCjfjZb7SCfYqcAnMFoB2KyodF4Mg98dge+?= =?us-ascii?Q?Irpe976ef/mDvgFtdWnY92zLBBM8FQ8l/ONpsVSvoAu5RrfFRZ1hYeQ7jSzi?= =?us-ascii?Q?LGrsa8KWyTUGLPz0a3MknpT9aDin+2UBDjz5kV/y70fEGV0mzAGgM1IDiJiZ?= =?us-ascii?Q?o/icn65AI3bF6nE0Cg/jLE7wEhMGLxrrQ1zEGsJb+edeVEE+xTAxHEBaWoAs?= =?us-ascii?Q?IcL0csv/70GOLsBIhOrURth04KMyukFltvq4sIpCzig2EhDYK01AEFNiDfvq?= =?us-ascii?Q?K5NQyeRh72nsJ4SbNW8BNzQrGJztRyMUnCwbvzPLS3U3MKXBb8s4phPZ/f4r?= =?us-ascii?Q?6mw4pQ0Qz8MjPc1RFwq8NbCBJ9XDl8uIQKxKN+Ts9eLx4/IAfh0nC1FvT17B?= =?us-ascii?Q?wBjfpmZZfOLxmG9n272ZWNhe3IuHfXQUEKCej7ujoJMaFshEZJp2AZfIAQ+i?= =?us-ascii?Q?IyqX63nHsNds879e6SD9cGvwq+u8inBS3JGFH2RV9RgHPYFwFagNG1f9iErS?= =?us-ascii?Q?mKMJfUGt5ut0gxLcspsIJGnTCHJ9zjdxB0035wT31O7KPwariAbNp44H0KrR?= =?us-ascii?Q?FCE+SlQzrfO9p0P5ljr5F9qEhfTwoLIDr2S49YjGcdpjQc7/KBjAYXGsqfcF?= =?us-ascii?Q?95DlT7CRaUwcPTxA6tCrZ5VL5JkzKSDW0otLpHsa8XxuIBA+0J7CQHfYfreZ?= =?us-ascii?Q?YpQFaiiH9/F1RGpLQkxl1qxTmDSZ8ii8KJ7xNY4fLgYLqhP3hYPim1CFx8dQ?= =?us-ascii?Q?OlUETezno+TLOxgeqgEh76BZcMxtIyVho4qdIvNCPxbSMUlt02wSfr0hlXi3?= =?us-ascii?Q?nZfZhYYT1arqAXrT/YgMJEfgopuHkyZ+aZTPOyJ1PpSIUuPc1n6As6Kbwwp3?= =?us-ascii?Q?QWqsIdkEDkJCzP4NMMh7C82Ey3l28H+bhHfQCTf2HuItxZm49ocnzDIXyw3F?= =?us-ascii?Q?EYxzpDIrBurAHfEJAFS68J+HCfGscQQEASIBgeB7QQB6AfnIAVvrmAq45/xh?= =?us-ascii?Q?DmzhjwxyNpiGvhx7+uVNzkj5S+sRrj5l/oqANmvOyz3SM6ugGYPhWzxY84Az?= =?us-ascii?Q?uxdWewEwf+mmFxqBM7JD2hVM?= MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3161 Original-Authentication-Results: semihalf.com; dkim=none (message not signed) header.d=none;semihalf.com; dmarc=none action=none header.from=arm.com; Return-Path: Sunny.Wang@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 18fc60f9-bfcc-45df-dd66-08d95563d139 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AOgcIwloQ5NfDKWQlaKPMBW2NxmoV8q54xyLKECvE4y0f+cLHdjp7oZsoY2zq52wvAX9zLWZ47AfL0VNOJNgrY+FFZ/1wKR4vH3CwpqAOQM1MZxmeOiGixQqzQGyB5gOus2+eQisYr03I71bARAPRfBCnIeXwYxKm0p2RDOlDmKoD65vx9AMOhcbZaMptr4JMr5BqFwNmtGvHMLo1OWdJDME5Ni2Fx8ZBm9SChljh03Hmspa8vxooRqIzfLZOyHp68L6Skit1Kn0Ve5I9dTwdW6nNqQGVDN3nNns5h0aL0BuDfU0802THz77lFAK5WvTx54vTdXv7jRRmic525gtMI1RNvTtxOrvYZhOrXqidIeqnDCbpWDnF2di2RwtCf+bArHE1EBooTkkqxZvn8IG9idyMwK1W6HkdZX1R+jfgA8IdLB0MsYcIFjy+5hJY8kx8L4USWxkVDvgp8LeutS9CxXswqihtmTmy5plh+kYWCX00K9z77l6O9gwsIVQhrZ0BtEeP/M8b+VMnEvPEidCT046Vh2vouPY65epbRiOn7qR4WrES1xp8fuzAGc8v4l8P+9Mkvpx91dBZZrDsVrp28qbwAFMxXerG6nQsQHojyk6MkTOJCCEm2Uosbx6guFhDgxAX/y6UaNfbJUBEiCodxyQGT22KUd8ETS/hdwZ3QS6NlaNIELqkfh1tOlXlxKEn04/0WxY5V3HWtoHYFcSZkcfjdmLSFg3RnxGOr6q+Gu1UcBXJiFgoc4eq2GA9FFo7jToyNbi97F8OzmnjA/IUyPeZM2yHINR0MvyumFltsGL3WR4kQhHKtKsAeiAnu5M X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(6029001)(4636009)(376002)(396003)(39850400004)(346002)(136003)(46966006)(36840700001)(52536014)(36860700001)(356005)(336012)(53546011)(6506007)(26005)(186003)(55016002)(316002)(86362001)(9686003)(81166007)(33656002)(110136005)(30864003)(83380400001)(478600001)(2906002)(966005)(7696005)(47076005)(82740400003)(70586007)(8936002)(8676002)(70206006)(107886003)(4326008)(5660300002)(82310400003)(54906003)(44824005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2021 03:16:04.6390 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55e63944-4cca-4975-6295-08d95563dd07 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5205 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Hao, Jian, and MdeModulePkg maintainers, Could you help merge this patch? This patch already got Reviewed-by from Zh= ichao and me. If we still need to get others' reviews, feel free to let us = know. By the way, we do have an edk2-platform change below that is waiting for th= is patch to get merged first, and will have more patches based on this to b= e sent out to solve some deployment and testing problems caused by Fast boo= t 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.co= m; upstream@semihalf.com; pete@akeo.ie; jian.j.wang@intel.com; hao.a.wu@int= el.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/BootDiscoveryPolicyUiLibStri= ngs.uni | 29 ++++ MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLibVfr.= Vfr | 44 ++++++ 7 files changed, 334 insertions(+) create mode 100644 MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDisco= veryPolicyUiLib.inf create mode 100644 MdeModulePkg/Include/Guid/BootDiscoveryPolicy.h create mode 100644 MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDisco= veryPolicyUiLib.c create mode 100644 MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDisco= veryPolicyUiLib.uni create mode 100644 MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDisco= veryPolicyUiLibStrings.uni create mode 100644 MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDisco= veryPolicyUiLibVfr.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, 0x4409, { = 0x8e, 0x67, 0xa2, 0xcd, 0xf, 0x61, 0xe1, 0x70 } } + ## GUID used for Boot Discovery Policy FormSet guid and related variable= s. + gBootDiscoveryPolicyMgrFormsetGuid =3D { 0x5b6f7107, 0xbb3c, 0x4660, { 0= x92, 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|0x4000000e + ## 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"BootDiscoveryP= olicy"|gBootDiscoveryPolicyMgrFormsetGuid|0 + # @Prompt Boot Discovery Policy + gEfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy|2|UINT32|0x4000000= f + [PcdsFixedAtBuild.AARCH64, PcdsPatchableInModule.AARCH64] gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20|UINT32|0= x0001004c diff --git a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPol= icyUiLib.inf b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryP= olicyUiLib.inf new file mode 100644 index 0000000000..1fb4d43caa --- /dev/null +++ b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= b.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-463DBD15FE10 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D NULL|DXE_DRIVER UEFI_APPLICATION + CONSTRUCTOR =3D BootDiscoveryPolicyUiLibConstructor + DESTRUCTOR =3D BootDiscoveryPolicyUiLibDestructor +# +# 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, 0x46= 60, { 0x92, 0xcd, 0x54, 0x26, 0x90, 0x28, 0x0b, 0xbd } } + +#define BOOT_DISCOVERY_POLICY_VAR L"BootDiscoveryPolicy" + +#endif diff --git a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPol= icyUiLib.c b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPol= icyUiLib.c new file mode 100644 index 0000000000..6814d0bb8f --- /dev/null +++ b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= b.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 (PcdBootDiscove= ryPolicy)); + 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 image. + @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/BootDiscoveryPol= icyUiLib.uni b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryP= olicyUiLib.uni new file mode 100644 index 0000000000..eea3ca6c8d --- /dev/null +++ b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= b.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/BootDiscoveryPol= icyUiLibStrings.uni b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDis= coveryPolicyUiLibStrings.uni new file mode 100644 index 0000000000..736011c9bb --- /dev/null +++ b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= bStrings.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 Po= licy" + +#string STR_FORM_BDP_CONN_MIN #language en-US "Minimal" + +#string STR_FORM_BDP_CONN_NET #language en-US "Connect Network D= evices" + +#string STR_FORM_BDP_CONN_ALL #language en-US "Connect All Devic= es" + diff --git a/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPol= icyUiLibVfr.Vfr b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscove= ryPolicyUiLibVfr.Vfr new file mode 100644 index 0000000000..0de87ec34f --- /dev/null +++ b/MdeModulePkg/Library/BootDiscoveryPolicyUiLib/BootDiscoveryPolicyUiLi= bVfr.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_A= CCESS | 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_CON= NECT_MINIMAL, flags =3D DEFAULT; + option text =3D STRING_TOKEN(STR_FORM_BDP_CONN_NET), value =3D BDP_CON= NECT_NET, flags =3D 0; + option text =3D STRING_TOKEN(STR_FORM_BDP_CONN_ALL), value =3D BDP_CON= NECT_ALL, flags =3D 0; + endoneof; + + endform; +endformset; -- 2.25.1 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease 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.