From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web12.3359.1617658402581721728 for ; Mon, 05 Apr 2021 14:33:22 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=nrgOEH7W; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [10.124.238.202] (unknown [167.220.2.74]) by linux.microsoft.com (Postfix) with ESMTPSA id 0BAA920B5680; Mon, 5 Apr 2021 14:33:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0BAA920B5680 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1617658402; bh=C21nIv8iAgG2ebz4C3TlHfZof361Pta2hOWQpsjB+NY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=nrgOEH7W70IeSQNG2l8A0ugOD1w1hcynCRiEBhC0zwJuevLMNQViLzkFfMSgIh7aA 8mRtiQfcVOuZB0BpLwAwYMhDCE3Ky5Css3yLbilBK0lBqP4C3/ccghDiTiXHKZkQOQ EOWtE2KO9XPmxPpbEIv5cUVDXdHPr/7/lmmFMS3Y= Subject: Re: [edk2-devel] [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries To: devel@edk2.groups.io, nathaniel.l.desimone@intel.com, Bret Barkelew , "Oram, Isaac W" Cc: "Chiu, Chasel" , Liming Gao , "Dong, Eric" , Michael Kubacki References: <20210404094039.2701-1-nathaniel.l.desimone@intel.com> From: "Michael Kubacki" Message-ID: <16c2cea4-4dd8-b090-9305-d84e6057049a@linux.microsoft.com> Date: Mon, 5 Apr 2021 14:33:22 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable I have not reviewed the code yet but I think that's an important point=20 to capture. Could you please add that use case to the commit? Perhaps=20 the commit message and INF file description for the LargeVariableLibs? Thanks, Michael On 4/5/2021 1:25 PM, Nate DeSimone wrote: > The max variable size is a build time configurable option. For those=20 > that produce binary compatible drivers/OpROMs which need to work both=20 > with TianoCore and other vendor provided UEFI PI implementations, the=20 > luxury of recompiling the entire BIOS image or dictating the platform=92= s=20 > choice for PcdMaxVariableSize image may not exist. >=20 > *From:* Bret Barkelew > *Sent:* Monday, April 5, 2021 12:31 PM > *To:* devel@edk2.groups.io; Oram, Isaac W ;=20 > Desimone, Nathaniel L > *Cc:* Chiu, Chasel ; Liming Gao=20 > ; Dong, Eric ; Michael=20 > Kubacki > *Subject:* RE: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Librar= ies >=20 > Na=EFve question: if max variable size is not already configurable, why= =20 > not just do that? >=20 > - Bret >=20 > *From: *Oram, Isaac W via groups.io=20 > > *Sent: *Monday, April 5, 2021 12:27 PM > *To: *Desimone, Nathaniel L ;=20 > devel@edk2.groups.io > *Cc: *Chiu, Chasel ; Liming Gao=20 > ; Dong, Eric=20 > ; Michael Kubacki=20 > > *Subject: *[EXTERNAL] Re: [edk2-devel] [edk2-platforms] [PATCH v2 0/4]= =20 > Add Large Variable Libraries >=20 > Series Reviewed-by: Isaac Oram > >=20 > -----Original Message----- > From: Desimone, Nathaniel L > > Sent: Sunday, April 4, 2021 2:41 AM > To: devel@edk2.groups.io > Cc: Chiu, Chasel >;= = =20 > Liming Gao >;= = =20 > Dong, Eric >; Michael= =20 > Kubacki >; Oram, Isaac W=20 > > > Subject: [edk2-platforms] [PATCH v2 0/4] Add Large Variable Libraries >=20 > Changes from V1: > =A0- Changed prefix from "Min" to "VarLib" > =A0- Better comments > =A0- Added more whitespace for readability > =A0- Removed unused INF sections > =A0- Better debug messages >=20 > This patch series introduces libaries that enable large data sets to be= =20 > stored using the UEFI Variable Services. At present, most UEFI Variable= =20 > Services implementations have a maximum variable size of <=3D64KB. The= =20 > exact value varies depending on platform. >=20 > These libaries enable a data set to use as much space as needed, up to= =20 > the remaining space in the UEFI Variable non-volatile storage. >=20 > To implement this, I have broken the problem down into two parts: >=20 > =A01. Phase angostic UEFI Variable access. > =A02. Storage of data across multiple UEFI Variables. >=20 > For the first part, I have created two new LibraryClasses: > VariableReadLib and VariableWriteLib. I have provided implementation=20 > instances of VariableReadLib for PEI, DXE, and SMM. > For VariableWriteLib, I have provided implementation instances for DXE= =20 > and SMM. This enables code that accesses UEFI variables to be written in= = =20 > a matter than is phase agnostic, so the same code can be used in PEI,=20 > DXE, or SMM without modification. >=20 > The second part involves another two new LibaryClasses: > LargeVariableReadLib and LargeVariableWriteLib. Only one BASE=20 > implementation is needed for both of these as the phase dependent code= =20 > was seperated out in the first piece. These libraries provide logic to= =20 > calculate the maximum size of an individual UEFI variable and split the= =20 > data into as many smaller pieces as needed to store the entire data set= =20 > in the UEFI Variable storage. They also provide the ability to stitch=20 > the data back together when it is read. > Deleting the data will delete all variables used to store it. >=20 > Cc: Chasel Chiu > > Cc: Liming Gao > > Cc: Eric Dong > > Cc: Michael Kubacki > > Cc: Isaac Oram > > Signed-off-by: Nate DeSimone > >=20 > Nate DeSimone (4): > =A0 MinPlatformPkg: Add VariableReadLib > =A0 MinPlatformPkg: Add VariableWriteLib > =A0 MinPlatformPkg: Add LargeVariableReadLib > =A0 MinPlatformPkg: Add LargeVariableWriteLib >=20 > =A0.../Include/Dsc/CoreCommonLib.dsc=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 |=A0=A0 6 +- > =A0.../MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc |=A0 12 +- > =A0.../MinPlatformPkg/Include/Dsc/CorePeiLib.dsc |=A0=A0 9 +- > =A0.../Include/Library/LargeVariableReadLib.h=A0=A0=A0 |=A0 50 ++ > =A0.../Include/Library/LargeVariableWriteLib.h=A0=A0 |=A0 58 +++ > =A0.../Include/Library/VariableReadLib.h=A0=A0=A0=A0=A0=A0=A0=A0 |=A0 8= 7 ++++ > =A0.../Include/Library/VariableWriteLib.h=A0=A0=A0=A0=A0=A0=A0 | 129 ++= +++ > =A0.../BaseLargeVariableReadLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= = =A0 |=A0 44 ++ > =A0.../LargeVariableReadLib.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= = =A0=A0=A0=A0=A0 | 199 ++++++++ > =A0.../BaseLargeVariableWriteLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 |=A0 44 ++ > =A0.../LargeVariableWriteLib.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 | 479 ++++++++++++++++++ > =A0.../DxeRuntimeVariableReadLib.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 | 115 +++++ > =A0.../DxeRuntimeVariableReadLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 |=A0 41 ++ > =A0.../DxeRuntimeVariableWriteLib.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= = =A0 | 256 ++++++++++ > =A0.../DxeRuntimeVariableWriteLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = |=A0 49 ++ > =A0.../PeiVariableReadLib/PeiVariableReadLib.c=A0=A0 | 153 ++++++ > =A0.../PeiVariableReadLib/PeiVariableReadLib.inf |=A0 42 ++ > =A0.../SmmVariableReadCommon.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 | 114 +++++ > =A0.../StandaloneMmVariableReadLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |= =A0 50 ++ > =A0.../StandaloneMmVariableReadLibConstructor.c=A0 |=A0 48 ++ > =A0.../TraditionalMmVariableReadLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0= 49 ++ > =A0.../TraditionalMmVariableReadLibConstructor.c |=A0 48 ++ > =A0.../SmmVariableWriteCommon.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 | 167 ++++++ > =A0.../StandaloneMmVariableWriteLib.inf=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0= 45 ++ > =A0.../StandaloneMmVariableWriteLibConstructor.c |=A0 48 ++ > =A0.../TraditionalMmVariableWriteLib.inf=A0=A0=A0=A0=A0=A0=A0=A0 |=A0 4= 4 ++ > =A0...TraditionalMmVariableWriteLibConstructor.c |=A0 48 ++ > =A0.../Intel/MinPlatformPkg/MinPlatformPkg.dsc=A0=A0 |=A0=A0 4 +- > =A028 files changed, 2428 insertions(+), 10 deletions(-)=A0 create mode= = =20 > 100644 Platform/Intel/MinPlatformPkg/Include/Library/LargeVariableReadLi= b.h > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Include/Library/LargeVariableWriteLib.h > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Include/Library/VariableReadLib.h > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Include/Library/VariableWriteLib.h > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableReadLib/BaseLarge= VariableReadLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableReadLib/LargeVari= ableReadLib.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableWriteLib/BaseLarg= eVariableWriteLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/BaseLargeVariableWriteLib/LargeVar= iableWriteLib.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableReadLib/DxeRunti= meVariableReadLib.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableReadLib/DxeRunti= meVariableReadLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRunt= imeVariableWriteLib.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/DxeRuntimeVariableWriteLib/DxeRunt= imeVariableWriteLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/PeiVariableReadLib/PeiVariableRead= Lib.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/PeiVariableReadLib/PeiVariableRead= Lib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableReadLib/SmmVariableRead= Common.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableReadLib/StandaloneMmVar= iableReadLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableReadLib/StandaloneMmVar= iableReadLibConstructor.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableReadLib/TraditionalMmVa= riableReadLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableReadLib/TraditionalMmVa= riableReadLibConstructor.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/SmmVariableWri= teCommon.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVa= riableWriteLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/StandaloneMmVa= riableWriteLibConstructor.c > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmV= ariableWriteLib.inf > =A0create mode 100644=20 > Platform/Intel/MinPlatformPkg/Library/SmmVariableWriteLib/TraditionalMmV= ariableWriteLibConstructor.c >=20 > -- > 2.27.0.windows.1 >=20 >=20 >=20 >=20