From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.112]) by mx.groups.io with SMTP id smtpd.web09.1717.1617651047301236470 for ; Mon, 05 Apr 2021 12:30:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@microsoft.com header.s=selector2 header.b=iDlfY1wb; spf=pass (domain: microsoft.com, ip: 40.107.237.112, mailfrom: bret.barkelew@microsoft.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jW309lpBIXYt+G1TSNgNrsfThSaTULxhHVxrxDPtSxlhYlPAXjJ48ci/WXV02dk/S/F1Mgqp/bUXhPil/qZ9iT86BrSIMJYKZkj4g3jxw/FmJlM1qAo7YNhHqyTvYVPuSeHC12un1jf7vNdg8qrk4SclS+C/dUgFR+ztTA5g3P0bYkIwsk+lkqA0AqDnHVuJIrTErklduimo6Hob+fhQQcM3S2sdS6sWLA2+dEvsi+CcPOJi2JvCiUnXcTZYIix3B8d9iaBltN5XpHj1yrAVtuRAgWivToQ0Q6L1e7jNWCmocQCtxE07Q2A0kndSxUWO69hakus4RdXLlqv4Q/eLqA== 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=Ib1KmdYdWXJozX/qcruekSeMrOC3Rs7NERFPWrawonY=; b=fpby1DdIkcdkGkZztBb/NvGTA1iY2wbfS+Yb5OSZjfGqBw1c9NEn+yEiR/0CtkZFOJG7Aiv/Zq1tMPhkhuplOX7mGNxXphFqtRYCqfCzkNY0PW9fjeC1nfNnoh/RR+rklGGvZDBFfiDWNAmGvn9G1xWGl0Do59U1Qt1F5XQfEMjawBvLGREP0QzUB4EZ8aY9ZudwP2PGy/msT6JSTOANTTa8lEDLG+M5lnn+LwZx/kQX5QPGZ06GBdk2rJj6HwSwhjsrZC9PCepaL2X2eDlgj4ebyXf/1+iFY7CK1uZNa/qlUb7JRq6elf6ijPF5qC4VL3aAGl7h4SE68lThlUjEZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microsoft.com; dmarc=pass action=none header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ib1KmdYdWXJozX/qcruekSeMrOC3Rs7NERFPWrawonY=; b=iDlfY1wbj1uRJoRTTzgBNfuniCbOlAuJJKLTn5vbMQz+nARsi4dZwRyxbgTQbuYcPNpgSEztY+XrMtIHW8fVmdR2YZlUssmg1KHbhX1zV2b+ux5gctMSl1KJkZ61vWD77iLC72iZpeFFJHKp2EHyLp7BFUiO/ZaSYl2ukuE5MXo= Received: from MW4PR21MB1907.namprd21.prod.outlook.com (2603:10b6:303:71::8) by MWHPR21MB0191.namprd21.prod.outlook.com (2603:10b6:300:79::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.4; Mon, 5 Apr 2021 19:30:44 +0000 Received: from MW4PR21MB1907.namprd21.prod.outlook.com ([fe80::adcb:b821:ee26:3348]) by MW4PR21MB1907.namprd21.prod.outlook.com ([fe80::adcb:b821:ee26:3348%7]) with mapi id 15.20.4042.004; Mon, 5 Apr 2021 19:30:44 +0000 From: "Bret Barkelew" To: "devel@edk2.groups.io" , "isaac.w.oram@intel.com" , "Desimone, Nathaniel L" CC: "Chiu, Chasel" , Liming Gao , "Dong, Eric" , Michael Kubacki Subject: Re: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries Thread-Topic: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries Thread-Index: AQHXKlGuc/Re2Mroq0uUvAeIlEUtoqqmT4Vx Date: Mon, 5 Apr 2021 19:30:44 +0000 Message-ID: References: <20210404094039.2701-1-nathaniel.l.desimone@intel.com>, In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2021-04-05T19:30:04.9212353Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Privileged authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [174.21.70.23] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 92c1bf78-b58d-4e92-5a12-08d8f8694ebc x-ms-traffictypediagnostic: MWHPR21MB0191: x-ms-exchange-transport-forked: True x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3QY+sYsIaGOP492qtgyFkyjqm0SHpcIpaE/+Dwa+IIB9aCoTg5mfSqrGoIqOasXMxPBRQzu+UXhh1sPuy7FGK8ozKs+qCkjgHZxoYZ5qyHdjJkrY/KtLV3kyA2vmFxrZzueZWisLlZq627GfysrYTqzCiD9BIGIiF6w02XVRMPDOmSSgXKrC8pjvXzRHpMZmjXmeY9NBO9Yznv/RO7i8Wrsn/zNsUmuCeXcb0DsPWIQNXkOYukIj+fmA2hQiD8m3vwGqewNK36RZjHU0yIdrZJR675GVuicNWZ9cKBId9pxjDhlI1EoGrrBUPhLBdbLvhnRd0+LLlpYQLyMuF01AfIKClPssRAV/eqv7nSja1m8bgypjYbCnaNVEwOGEh/Zzn3hgBfSfVqfLi/H4duxu+k5A62js6Bko3Nl5fRdWLBefi1vrG8FkpBkqFfq7b3Qp2RtNjx8sfzX+gcX+wqb1n1+c4y7+o1bP+7MpG4VXV9RzHMQhq7GSoymmsIpjJSZYoC0lm3RUL+fWBV2TGmwK4MxpLgUfrYUXZVOFtCfOJv12O6r4FeMweFBnhvCrtkdfoa91MPmpC1xjHvFQzdGnd8q/pU8AUYiqEGjRvh41LTdjvbqOST9s4NP/MkfsnnK/8DNt/TPX3iWJURXGtj0TzcUt5tuxfQoxrOpbq0KWMgGGmZRljf8qN2RsPueeZp6vfc9KggC7o7rlTx6NnT8yFQneXJyAPNtvIiKfgYIcrkNN4851lJ4fmabsBnn5ZE65 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR21MB1907.namprd21.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(376002)(346002)(39860400002)(366004)(396003)(136003)(66446008)(55016002)(86362001)(71200400001)(9686003)(33656002)(5660300002)(478600001)(2906002)(7696005)(8936002)(38100700001)(4326008)(64756008)(6506007)(53546011)(8676002)(966005)(83380400001)(186003)(110136005)(8990500004)(66574015)(166002)(82960400001)(82950400001)(54906003)(66946007)(66476007)(76116006)(52536014)(316002)(66556008)(10290500003)(26005)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?RUSb3CUt0mBoF09Lpzwrm0QdEhizaDl/89H3qPuTaaDeJkW4ksAUh4Ph6/?= =?iso-8859-1?Q?pIjUSmjTarwECaDIx+fJIr+ng+FNgnM75GHo1OfvIA9/kFOVof9dybPutl?= =?iso-8859-1?Q?pf73kSC7Rqy16xHEVyAwoj73m80xnDq8tCFC0W7u8skk1uOCswBWHhkC3w?= =?iso-8859-1?Q?qAdo/tfvoCtpikM6gPmKGcxQSydNkLtiveXCwfGvBHIz2PElpaa8LEfJHp?= =?iso-8859-1?Q?mXaDb2ahvvrqzH7RoPbQEvYQC23c4H3Tg9a9thlersFBN7oc2reqyWP3Jb?= =?iso-8859-1?Q?nvnmwWNsk4qtBc7pcjEtuul47DXxYlfEJHNdgZhT8BR2PLRVAP7qFtTKKj?= =?iso-8859-1?Q?DCQk6AVaq7tv+yrnr/EzzyvK/U7OqrhT0PiBm1d8sApFIlteteA9uefoLr?= =?iso-8859-1?Q?JcYQjn+Jci33F5gkSchSZ9P0OS/XUkoS24EqyLrPpHrlmJTtf0B0yRZPTX?= =?iso-8859-1?Q?bJPp8UGRkCVUtPL7PHCu5kRYocyrZHBPIs4LlC/EBsraORaITsPFP7RBM8?= =?iso-8859-1?Q?yfpmGxUJpl8LI2kF+EtOxoLZE3fG/P/66szfnvyD03pediat50NuCtjXN0?= =?iso-8859-1?Q?/T/tXeuKbyT+geSfOgEDPv3F5f6hCM+w4SRx/pyJeibofhrjpOIvdp9ggq?= =?iso-8859-1?Q?CZTVg1JiqaCXKpaVl8afnKxrte5mfkjlZGRq8Zba1kghAf63RKY7WRQcYx?= =?iso-8859-1?Q?opxVDrdCwYufIuPSn0UawjqXQymJntPcTpGplHgm8/JFwZNvQ5DUcJfkIy?= =?iso-8859-1?Q?SLaDpY+5NBdofye7j0aGjwH8V8rAYX4z6PyigsZXWOOGen+viOZgmOdcF7?= =?iso-8859-1?Q?dV1k23MK3kzt1F55Wpzu4poYE4XXShVysmmP8uUbOm+rACbCWOU7uBbOa6?= =?iso-8859-1?Q?fmt2hv96A7uBWz95z6oEhEo1ki1NYdLwaugjMVhk3zHTt39uDBCccDyJ0j?= =?iso-8859-1?Q?TsZwUST0olTzwqUTpNtUjImRDpIGsyqva2v4HYw1TKuVbgRk55yN7ivqGi?= =?iso-8859-1?Q?NyzxFecu0Qmf/UOfujIfjq4mYHiE8RYCA6gc0Ah7Qc1sWYuxUz1lF3kFlW?= =?iso-8859-1?Q?e6PQI3d+w51tvTPxhdONeAFG9QLME2QLAgwYDyShlLeo7hWRU1yV1GMcrA?= =?iso-8859-1?Q?i60UXLhVBYNh0BrqBgOiIUkvdPpi5dnn8OaS82tKtq8HbHNZwrFad9m2I9?= =?iso-8859-1?Q?wreHmlkRzt0YMXzoFCWNjBmk2pArDNB9YGBo7btoNoPGDqaI7q/KQNlHbf?= =?iso-8859-1?Q?6o4xonGsZtiQEo7BWHrtCY3o1ouJRc9VjTVGExF2EapRvy77PBjOUC/y7f?= =?iso-8859-1?Q?7/W7zZnrSZiygQ08uWNuj9doG5QpvkX6npRZ87o0vqcSZnSjBaWAj2x1iZ?= =?iso-8859-1?Q?aKzfBtOzcNYmtUBLqrGF42F76fE+Q2TQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR21MB1907.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92c1bf78-b58d-4e92-5a12-08d8f8694ebc X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Apr 2021 19:30:44.7274 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vwbcbjYeqcqE1le+ZXAwuc4ONFv7wqQ0ETk6LElYFp7a0bOw/ClxhSiZQxMXv2dhgCHHgO411Au87p6tEIBXBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0191 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MW4PR21MB19078A1BE9A1B1164B0AF85CEF779MW4PR21MB1907namp_" --_000_MW4PR21MB19078A1BE9A1B1164B0AF85CEF779MW4PR21MB1907namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Na=EFve question: if max variable size is not already configurable, why not= just do that? - Bret From: Oram, Isaac W via groups.io Sent: Monday, April 5, 2021 12:27 PM To: Desimone, Nathaniel L; devel@ed= k2.groups.io Cc: Chiu, Chasel; Liming Gao; Dong, Eric; Michael Kubacki<= mailto:Michael.Kubacki@microsoft.com> Subject: [EXTERNAL] Re: [edk2-devel] [edk2-platforms] [PATCH v2 0/4] Add L= arge Variable Libraries Series Reviewed-by: Isaac Oram -----Original Message----- From: Desimone, Nathaniel L Sent: Sunday, April 4, 2021 2:41 AM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Liming Gao ; Dong, Eric ; Michael Kubacki ; Oram, Isaac W Subject: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries Changes from V1: - Changed prefix from "Min" to "VarLib" - Better comments - Added more whitespace for readability - Removed unused INF sections - Better debug messages This patch series introduces libaries that enable large data sets to be st= ored using the UEFI Variable Services. At present, most UEFI Variable Servi= ces implementations have a maximum variable size of <=3D64KB. The exact val= ue varies depending on platform. These libaries enable a data set to use as much space as needed, up to the= remaining space in the UEFI Variable non-volatile storage. To implement this, I have broken the problem down into two parts: 1. Phase angostic UEFI Variable access. 2. Storage of data across multiple UEFI Variables. For the first part, I have created two new LibraryClasses: VariableReadLib and VariableWriteLib. I have provided implementation insta= nces of VariableReadLib for PEI, DXE, and SMM. For VariableWriteLib, I have provided implementation instances for DXE and= SMM. This enables code that accesses UEFI variables to be written in a mat= ter than is phase agnostic, so the same code can be used in PEI, DXE, or SM= M without modification. The second part involves another two new LibaryClasses: LargeVariableReadLib and LargeVariableWriteLib. Only one BASE implementati= on is needed for both of these as the phase dependent code was seperated ou= t in the first piece. These libraries provide logic to calculate the maximu= m size of an individual UEFI variable and split the data into as many small= er pieces as needed to store the entire data set in the UEFI Variable stora= ge. They also provide the ability to stitch the data back together when it = is read. Deleting the data will delete all variables used to store it. Cc: Chasel Chiu Cc: Liming Gao Cc: Eric Dong Cc: Michael Kubacki Cc: Isaac Oram Signed-off-by: Nate DeSimone Nate DeSimone (4): MinPlatformPkg: Add VariableReadLib MinPlatformPkg: Add VariableWriteLib MinPlatformPkg: Add LargeVariableReadLib MinPlatformPkg: Add LargeVariableWriteLib .../Include/Dsc/CoreCommonLib.dsc | 6 +- .../MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc | 12 +- .../MinPlatformPkg/Include/Dsc/CorePeiLib.dsc | 9 +- .../Include/Library/LargeVariableReadLib.h | 50 ++ .../Include/Library/LargeVariableWriteLib.h | 58 +++ .../Include/Library/VariableReadLib.h | 87 ++++ .../Include/Library/VariableWriteLib.h | 129 +++++ .../BaseLargeVariableReadLib.inf | 44 ++ .../LargeVariableReadLib.c | 199 ++++++++ .../BaseLargeVariableWriteLib.inf | 44 ++ .../LargeVariableWriteLib.c | 479 ++++++++++++++++++ .../DxeRuntimeVariableReadLib.c | 115 +++++ .../DxeRuntimeVariableReadLib.inf | 41 ++ .../DxeRuntimeVariableWriteLib.c | 256 ++++++++++ .../DxeRuntimeVariableWriteLib.inf | 49 ++ .../PeiVariableReadLib/PeiVariableReadLib.c | 153 ++++++ .../PeiVariableReadLib/PeiVariableReadLib.inf | 42 ++ .../SmmVariableReadCommon.c | 114 +++++ .../StandaloneMmVariableReadLib.inf | 50 ++ .../StandaloneMmVariableReadLibConstructor.c | 48 ++ .../TraditionalMmVariableReadLib.inf | 49 ++ .../TraditionalMmVariableReadLibConstructor.c | 48 ++ .../SmmVariableWriteCommon.c | 167 ++++++ .../StandaloneMmVariableWriteLib.inf | 45 ++ .../StandaloneMmVariableWriteLibConstructor.c | 48 ++ .../TraditionalMmVariableWriteLib.inf | 44 ++ ...TraditionalMmVariableWriteLibConstructor.c | 48 ++ .../Intel/MinPlatformPkg/MinPlatformPkg.dsc | 4 +- 28 files changed, 2428 insertions(+), 10 deletions(-) create mode 100644= Platform/Intel/MinPlatformPkg/Include/Library/LargeVariableReadLib.h create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/LargeVar= iableWriteLib.h create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/Variable= ReadLib.h create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/Variable= WriteLib.h create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVariabl= eReadLib/BaseLargeVariableReadLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVariabl= eReadLib/LargeVariableReadLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVariabl= eWriteLib/BaseLargeVariableWriteLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVariabl= eWriteLib/LargeVariableWriteLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariab= leReadLib/DxeRuntimeVariableReadLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariab= leReadLib/DxeRuntimeVariableReadLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariab= leWriteLib/DxeRuntimeVariableWriteLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariab= leWriteLib/DxeRuntimeVariableWriteLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/PeiVariableReadL= ib/PeiVariableReadLib.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/PeiVariableReadL= ib/PeiVariableReadLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableReadL= ib/SmmVariableReadCommon.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableReadL= ib/StandaloneMmVariableReadLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableReadL= ib/StandaloneMmVariableReadLibConstructor.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableReadL= ib/TraditionalMmVariableReadLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableReadL= ib/TraditionalMmVariableReadLibConstructor.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableWrite= Lib/SmmVariableWriteCommon.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableWrite= Lib/StandaloneMmVariableWriteLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableWrite= Lib/StandaloneMmVariableWriteLibConstructor.c create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableWrite= Lib/TraditionalMmVariableWriteLib.inf create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariableWrite= Lib/TraditionalMmVariableWriteLibConstructor.c -- 2.27.0.windows.1 --_000_MW4PR21MB19078A1BE9A1B1164B0AF85CEF779MW4PR21MB1907namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Na=EFve question: if max variable size is not alrea= dy configurable, why not just do that?

 

- Bret

 

From: Oram, Isaac W via groups.= io
Sent: Monday, April 5, 2021 12:27 PM
To: Desimone, Nat= haniel L; devel@edk2.groups.io
Cc: Chiu, Chasel; Liming Gao; Dong, Eric; Michael Kubacki
Subject: [EXTERNAL] Re: [edk2-devel] [edk2-platforms] [PATCH v2 0/4= ] Add Large Variable Libraries

 

Series Reviewed-by: = Isaac Oram <isaac.w.oram@intel.com>

-----Original Message-----
From: Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
Sent: Sunday, April 4, 2021 2:41 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Liming Gao <gaoliming@b= yosoft.com.cn>; Dong, Eric <eric.dong@intel.com>; Michael Kubacki = <michael.kubacki@microsoft.com>; Oram, Isaac W <isaac.w.oram@intel= .com>
Subject: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries

Changes from V1:
 - Changed prefix from "Min" to "VarLib"
 - Better comments
 - Added more whitespace for readability
 - Removed unused INF sections
 - Better debug messages

This patch series introduces libaries that enable large data sets to be st= ored using the UEFI Variable Services. At present, most UEFI Variable Servi= ces implementations have a maximum variable size of <=3D64KB. The exact = value varies depending on platform.

These libaries enable a data set to use as much space as needed, up to the= remaining space in the UEFI Variable non-volatile storage.

To implement this, I have broken the problem down into two parts:

 1. Phase angostic UEFI Variable access.
 2. Storage of data across multiple UEFI Variables.

For the first part, I have created two new LibraryClasses:
VariableReadLib and VariableWriteLib. I have provided implementation insta= nces of VariableReadLib for PEI, DXE, and SMM.
For VariableWriteLib, I have provided implementation instances for DXE and= SMM. This enables code that accesses UEFI variables to be written in a mat= ter than is phase agnostic, so the same code can be used in PEI, DXE, or SM= M without modification.

The second part involves another two new LibaryClasses:
LargeVariableReadLib and LargeVariableWriteLib. Only one BASE implementati= on is needed for both of these as the phase dependent code was seperated ou= t in the first piece. These libraries provide logic to calculate the maximu= m size of an individual UEFI variable and split the data into as many smaller pieces as needed to store the ent= ire data set in the UEFI Variable storage. They also provide the ability to= stitch the data back together when it is read.
Deleting the data will delete all variables used to store it.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Cc: Isaac Oram <isaac.w.oram@intel.com>
Signed-off-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

Nate DeSimone (4):
  MinPlatformPkg: Add VariableReadLib
  MinPlatformPkg: Add VariableWriteLib
  MinPlatformPkg: Add LargeVariableReadLib
  MinPlatformPkg: Add LargeVariableWriteLib

 .../Include/Dsc/CoreCommonLib.dsc      = ;       |   6 +-
 .../MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc |  12 +-
 .../MinPlatformPkg/Include/Dsc/CorePeiLib.dsc |   9 +-
 .../Include/Library/LargeVariableReadLib.h    | = 50 ++
 .../Include/Library/LargeVariableWriteLib.h   |  58 += ++
 .../Include/Library/VariableReadLib.h     &= nbsp;   |  87 ++++
 .../Include/Library/VariableWriteLib.h     =    | 129 +++++
 .../BaseLargeVariableReadLib.inf      =         |  44 ++
 .../LargeVariableReadLib.c       =              | = 199 ++++++++
 .../BaseLargeVariableWriteLib.inf      = ;       |  44 ++
 .../LargeVariableWriteLib.c       = ;            | 479 += +++++++++++++++++
 .../DxeRuntimeVariableReadLib.c      &= nbsp;        | 115 +++++
 .../DxeRuntimeVariableReadLib.inf      = ;       |  41 ++
 .../DxeRuntimeVariableWriteLib.c      =         | 256 ++++++++++
 .../DxeRuntimeVariableWriteLib.inf     &nbs= p;      |  49 ++
 .../PeiVariableReadLib/PeiVariableReadLib.c   | 153 ++++++=
 .../PeiVariableReadLib/PeiVariableReadLib.inf |  42 ++
 .../SmmVariableReadCommon.c       = ;            | 114 += ++++
 .../StandaloneMmVariableReadLib.inf     &nb= sp;     |  50 ++
 .../StandaloneMmVariableReadLibConstructor.c  |  48 ++
 .../TraditionalMmVariableReadLib.inf     &n= bsp;    |  49 ++
 .../TraditionalMmVariableReadLibConstructor.c |  48 ++
 .../SmmVariableWriteCommon.c      &nbs= p;           | 167 ++++++=
 .../StandaloneMmVariableWriteLib.inf     &n= bsp;    |  45 ++
 .../StandaloneMmVariableWriteLibConstructor.c |  48 ++
 .../TraditionalMmVariableWriteLib.inf     &= nbsp;   |  44 ++
 ...TraditionalMmVariableWriteLibConstructor.c |  48 ++
 .../Intel/MinPlatformPkg/MinPlatformPkg.dsc   |  = ; 4 +-
 28 files changed, 2428 insertions(+), 10 deletions(-)  create m= ode 100644 Platform/Intel/MinPlatformPkg/Include/Library/LargeVariableReadL= ib.h
 create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/Lar= geVariableWriteLib.h
 create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/Var= iableReadLib.h
 create mode 100644 Platform/Intel/MinPlatformPkg/Include/Library/Var= iableWriteLib.h
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVa= riableReadLib/BaseLargeVariableReadLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVa= riableReadLib/LargeVariableReadLib.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVa= riableWriteLib/BaseLargeVariableWriteLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/BaseLargeVa= riableWriteLib/LargeVariableWriteLib.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeV= ariableReadLib/DxeRuntimeVariableReadLib.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeV= ariableReadLib/DxeRuntimeVariableReadLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeV= ariableWriteLib/DxeRuntimeVariableWriteLib.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/DxeRuntimeV= ariableWriteLib/DxeRuntimeVariableWriteLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/PeiVariable= ReadLib/PeiVariableReadLib.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/PeiVariable= ReadLib/PeiVariableReadLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= ReadLib/SmmVariableReadCommon.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= ReadLib/StandaloneMmVariableReadLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= ReadLib/StandaloneMmVariableReadLibConstructor.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= ReadLib/TraditionalMmVariableReadLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= ReadLib/TraditionalMmVariableReadLibConstructor.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= WriteLib/SmmVariableWriteCommon.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= WriteLib/StandaloneMmVariableWriteLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= WriteLib/StandaloneMmVariableWriteLibConstructor.c
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= WriteLib/TraditionalMmVariableWriteLib.inf
 create mode 100644 Platform/Intel/MinPlatformPkg/Library/SmmVariable= WriteLib/TraditionalMmVariableWriteLibConstructor.c

--
2.27.0.windows.1





 

--_000_MW4PR21MB19078A1BE9A1B1164B0AF85CEF779MW4PR21MB1907namp_--