From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.92.41.78]) by mx.groups.io with SMTP id smtpd.web11.22105.1654826846191907230 for ; Thu, 09 Jun 2022 19:07:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@outlook.com header.s=selector1 header.b=aFZHh86Q; spf=pass (domain: outlook.com, ip: 40.92.41.78, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f33nmAwLz8r0F+QIyh8HiDWTeY/WIxJPCzsewJd/avnxggGocXKXeRY3O0RBCmQTB9O1JF9AfDgXNVpkBUiwMMMDN+KMwe43ejgj/b4HSHW7Fvt+dh82bTu1i35aOG3Z62qySqny8toQpIxGd2xg6Oh32YCP93sEp7hu9PstzlL7bjshnRWpmP6ugPyXsPk7Db5gV8My3JTKu9pqUDjQ4unifwCAH9ZWbpgUxjup1dtqAch6oCYRy/nKgJWwaovenSlZItdW75G7Xvf+RfYveolsuAZcmI43+5vu5ZSnRue+Fi1CzX7NlOa5Zpk1iBxvRIUh3raATMi9R5hcmUm+VA== 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=EK5kV4oUCyU3AXDM015LVicXcUixVuFdTi2TQ6O1vKE=; b=ANQFv/Zq6CD0/LIh0dbshCy5FuurprjNmPGag1hezff+L54FQMl1c9UxM5FsjCyCXxnsPpWGaYAOLrLp1ypIuIYMmBmzsV/sGlbiDZYoSL3iv+ZGbylxKorG/dnBiPeBtcouJ+sj58EnLrKtRAtR2fH6HzOiF6+8RKmSG6T0SiKWK05i6azi3E5vxvCte2kxyYy9PEE71DMS8QUFiLcBCzmtH/Plh88ckIOVP5mFd5U4kHJs+1wcDKLHKYs1GclSZjHoqzrnuEjpp7BlFRpibtBAT/q4G2hQQYvJeISZvXyoU9cvpgSh9pvPk9W2DfHivJ/MyIEsmJSgEBn4YIBaEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EK5kV4oUCyU3AXDM015LVicXcUixVuFdTi2TQ6O1vKE=; b=aFZHh86QJ5ITjDQyI7t3Ae+fTcib/dsKlG5T2KYhThZY/XjbzelLoSMZnjyTZWty9NGsGWWHPsjHFpLpEtF8w7RynvxNcZCK2HaTaVridGPLvM0/239CoXSao1Z3/CFFhK9nyycb1SzcotBeekxjpGFz0Z5QnB+OdLQf/DjOqRvh2ZXtNdIypPZ4u2f+1vr9wQq079gzTYV4zCtinL9A63MGb+1IZ+905wb73yibiAwKAr5INNX+lNX/3QsxL03uMKfwR7bIVThUI/WLcneq/Sz5R2ja8sJxLGuHaftQksoAXO3qGvUBO02SAZE/nUlsbwTllbDs+UB7qepWZjVpwA== Received: from SJ0PR16MB4876.namprd16.prod.outlook.com (2603:10b6:a03:404::12) by SJ0PR16MB4602.namprd16.prod.outlook.com (2603:10b6:a03:424::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.18; Fri, 10 Jun 2022 02:07:24 +0000 Received: from SJ0PR16MB4876.namprd16.prod.outlook.com ([fe80::c5bf:51ba:88c9:4146]) by SJ0PR16MB4876.namprd16.prod.outlook.com ([fe80::c5bf:51ba:88c9:4146%5]) with mapi id 15.20.5332.012; Fri, 10 Jun 2022 02:07:24 +0000 Message-ID: Date: Thu, 9 Jun 2022 22:07:20 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [edk2-devel] [PATCH V1 1/1] MdeModulePkg: Add Definition of EDKII_PEI_VARIABLE_PPI From: "Michael Kubacki" To: devel@edk2.groups.io, nathaniel.l.desimone@intel.com CC: Jian J Wang , Liming Gao , Michael D Kinney , Isaac Oram , Chasel Chiu , Gao Cheng , Di Zhang , Daocheng Bu , Michael Kubacki References: <20220610011705.5148-1-nathaniel.l.desimone@intel.com> <20220610011705.5148-2-nathaniel.l.desimone@intel.com> In-Reply-To: X-TMN: [df6uZkXsFdZrdexwlQWMEqFzn+UHxMu0] X-ClientProxiedBy: BN9PR03CA0318.namprd03.prod.outlook.com (2603:10b6:408:112::23) To SJ0PR16MB4876.namprd16.prod.outlook.com (2603:10b6:a03:404::12) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef789a75-e91d-47c7-2095-08da4a85f5aa X-MS-TrafficTypeDiagnostic: SJ0PR16MB4602:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NoG3tY3nlmXl/EMQdG0T0UzJJCzsKbozIbTnVcAsz7chSYheR2CvC3o85tsI3wbc5M90rbL9lDJJAmFR6xWmyfslbzfakFwWAs/UmVt9QTwhVWcEshuI9+IKvuFrr5VgWlZyTbpHkwG2nRirQ0LGMSGu6Zj/73tum5+ex7V2carRTCXz+k9ky+FSf9UfzCWdlBRRpgt26NN7OS8osVTI4BienehpFBm0a3IdVXCw4XhGIvuU261gxAdLSUJaL6UYe3E9tqnqrZUg2fQFZLj/CFQs9H0X29Gvj2imXTnu+z4pHamIOZPL2/rI1dF/G0cvmKwDcP1oSX+KH1eFed3gc34DIgZCZ1NQCqDQ1rzDdfl3ADPEcts5/Bv60nHh18WpMiIhfTAUYyfAuVtaIUZ6PqeJSwTbKRZVdhglnP2sM+89I/6394W41M02EMZB22UhktNeltEpzzDtJpEFHl/65nsyBli/gEvCsP9DTEUD54FaJ6m89XFdpmoP4rp+NVHHebx/bphjlatG4SqstrrObWE8S0MqwYB+UrTCpAfxhlHPxijgqOo3cYLZOm650eC0PSu+UtLA7988koG62uApNA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?o8RYMlxKF8RhUHruCYakZ2s1VLRchSqMupeIuW47bPiIToVFbUpIr0+a9/Pv?= =?us-ascii?Q?xuKQDsddbXOu99Acq6kd/cE/j0JtsKLard8f+Rtr0U3Usn70k6fa2NR8exVw?= =?us-ascii?Q?23XgFGaE1NDh0GHxXYHNCceGPJ9ncppW5p8yH7Eso9cpyOqXdPYKiWIoxQ2e?= =?us-ascii?Q?xoDjPeAZfVeG8BBdiMtDbkcBuuFFNLRb990+uYIqY7KYyxZmO5e31IAU7B9h?= =?us-ascii?Q?EdcPvQ49n6gVBI7j7dcaTKvJ9A1ZIEkJNH9k/F/jfHNNZv3nzBLiIwz6hPcr?= =?us-ascii?Q?3fCS0GbWCBhMMnApGFhJme1l+J/3tXIoAnCp31A7OiF3IucO+r8Ptc5YLGKY?= =?us-ascii?Q?ZsY4YTVnTPvFojH04pQG3cyfPkPbJXlFVtiouAQyEmaiwkRV9zqsWbO4nOqN?= =?us-ascii?Q?WwapweEjvnBPfXX2inIPKM4miiF3Rv1xEo4df8fEXDYR4nonbjSpbaPwO4iZ?= =?us-ascii?Q?DcvEPCxygr0EyKUt0Hm7zlLSSU1YVYLHmItJIVfsDiUJWteFdlXczzn7BwRS?= =?us-ascii?Q?/dhilFH2EZoZv7uaz5XmI5/hTtPsdR0MO842aKDwze3RUfW9Roi3n2gKu/TZ?= =?us-ascii?Q?LEJKbr9eNKpKx4yp8Fe4lgCHYrIsAB6+lE54+azuN2bJS/fRF6wCizxBTzHH?= =?us-ascii?Q?+ncN/anFmGCiJM2VSaKhUc/zPfH/ycs4bsW03M6gl+pyBuAJ10f9JRbcECvr?= =?us-ascii?Q?CLtok/C2OLZbkquu+WrCuoNmF5f2NAtawWujFTJ3yt9bz+hApsvTiBtOtVyg?= =?us-ascii?Q?+nufAqAIhJlUX35/M/OqxO+7PXJlDfOIn9+Ax+HuUkozIjTxovaYRBfCEwEP?= =?us-ascii?Q?xMeQS0hfxz/1w8NqPW826X38uOw7e4Kkg8np1oPyv5I9lBNweLbRrl6DpQLN?= =?us-ascii?Q?XxHaX8uPq7UbOrZDR4BrT8FpCifovZfyzqZuYyo/rmSvSESceohaoXL5t43c?= =?us-ascii?Q?dSXLs+QfZ/QS8OscPNgRsLfcp+ZxWxvfsOEz4kTlxNG1GQ5U1OwJb5YQzXPf?= =?us-ascii?Q?4OvXXoePvhJhQ9PWG/Ut9XhGD6LVkYxmR82DLNq6Pzdf6aiaU/GpV2pzcK4O?= =?us-ascii?Q?lJP3TAFUpWAo6ol2uuQLrIVnq41c2osAoTWJQ94K1DBmXap7i6lSvosoVHhX?= =?us-ascii?Q?HBvxytDpk4vqfDdNC2WGzSQxDuUz/yyaMqYUPTTzRUYaPcRieN+noBUWLU1q?= =?us-ascii?Q?OvpYIoZLcLli26Rz8LkH3Zd2/n1K4M/CydB8o78xJyfOi2x0hFltZL9gRzG+?= =?us-ascii?Q?S8gFUvYU8myDvadbDhAvY7aPBnbAXG3txs32hRDOtCEQ5HTC/h9CWy1k0UPE?= =?us-ascii?Q?BDC30SD8EbEVLBh1wVmuLwOE+fngTlWyP21+6gL8yRi+qzO6/oDsaIU0Emfy?= =?us-ascii?Q?BPhlpUyMCiIHsQYWlTzR7c6usGM6yDmKtrmai3TrKvxbiNQ3oFOIYt82kr6H?= =?us-ascii?Q?3nFHp6yJ1eSAyDqrrNdKxPSTwVsjRYky?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef789a75-e91d-47c7-2095-08da4a85f5aa X-MS-Exchange-CrossTenant-AuthSource: SJ0PR16MB4876.namprd16.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 02:07:24.1675 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR16MB4602 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable I just saw the comment in the cover letter about the additional=20 implementation. Thanks, Michael On 6/9/2022 9:59 PM, Michael Kubacki wrote: > Is this change just adding the interface to Tianocore or is there=20 > additional implementation planned as well? >=20 > --- >=20 > I thought we were following this convention now: >=20 > "#ifndef __PEI_VARIABLE_PPI_H_" -> "#ifndef PEI_VARIABLE_PPI_H_" >=20 > Some other comments are inline. >=20 > Regards, > Michael >=20 > On 6/9/2022 9:17 PM, Nate DeSimone wrote: >> Adds definition of EDKII_PEI_VARIABLE_PPI, a pre-cursor >> to enabling variable writes in the PEI environment. >> >> Cc: Jian J Wang >> Cc: Liming Gao >> Cc: Michael D Kinney >> Cc: Isaac Oram >> Cc: Chasel Chiu >> Cc: Gao Cheng >> Cc: Di Zhang >> Cc: Daocheng Bu >> Cc: Michael Kubacki >> Signed-off-by: Nate DeSimone >> --- >> =C2=A0 MdeModulePkg/Include/Ppi/Variable.h | 189 +++++++++++++++++++++++= +++++ >> =C2=A0 MdeModulePkg/MdeModulePkg.dec=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= |=C2=A0=C2=A0 3 + >> =C2=A0 2 files changed, 192 insertions(+) >> =C2=A0 create mode 100644 MdeModulePkg/Include/Ppi/Variable.h >> >> diff --git a/MdeModulePkg/Include/Ppi/Variable.h=20 >> b/MdeModulePkg/Include/Ppi/Variable.h >> new file mode 100644 >> index 0000000000..97dc7ceefa >> --- /dev/null >> +++ b/MdeModulePkg/Include/Ppi/Variable.h >> @@ -0,0 +1,189 @@ >> +/** @file >> +=C2=A0 EDKII PEI Variable Protocol provides an implementation of variab= les >=20 > [MK] Was "EDKII PEI Variable PPI" intended? >=20 >> +=C2=A0 intended for use as a means to store data in the PEI environment= . >> + >> +=C2=A0 Copyright (c) 2022, Intel Corporation. All rights reserved.
>> +=C2=A0 SPDX-License-Identifier: BSD-2-Clause-Patent >> + >> +**/ >> + >> +#ifndef __PEI_VARIABLE_PPI_H_ >> +#define __PEI_VARIABLE_PPI_H_ >> + >> +#define EDKII_PEI_VARIABLE_PPI_GUID \ >> +=C2=A0 { \ >> +=C2=A0=C2=A0=C2=A0 0xe7b2cd04, 0x4b14, 0x44c2, { 0xb7, 0x48, 0xce, 0xaf= , 0x2b, 0x66,=20 >> 0x4a, 0xb0 } \ >> +=C2=A0 } >> + >> +typedef struct _EDKII_PEI_VARIABLE_PPI EDKII_PEI_VARIABLE_PPI; >> + >> +/** >> +=C2=A0 This service retrieves a variable's value using its name and GUI= D. >> + >> +=C2=A0 Read the specified variable from the UEFI variable store. If the= Data >> +=C2=A0 buffer is too small to hold the contents of the variable, >> +=C2=A0 the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set t= o the >> +=C2=A0 required buffer size to obtain the data. >> + >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A = pointer to this instance of=20 >> the EDKII_PEI_VARIABLE_PPI. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VariableNam= e=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A pointer to a null-terminated=20 >> string that is the variable's name. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VariableGui= d=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A pointer to an EFI_GUID that=20 >> is the variable's GUID. The combination of >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 VariableGuid and VariableName=20 >> must be unique. >> +=C2=A0 @param[out]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 If non-NULL, on return, points=20 >> to the variable's attributes. >> +=C2=A0 @param[in, out]=C2=A0=C2=A0 DataSize=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 On entry, points to the size in=20 >> bytes of the Data buffer. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 On return, points to the size=20 >> of the data returned in Data. >> +=C2=A0 @param[out]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Data=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Points t= o the buffer which will=20 >> hold the returned variable value. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 May be NULL with a zero=20 >> DataSize in order to determine the size of the >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 buffer needed. >> + >> +=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable was read=20 >> successfully. >> +=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable was not found. >> +=C2=A0 @retval EFI_BUFFER_TOO_SMALL=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 The DataSize is too small for=20 >> the resulting data. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 DataSize is updated with the=20 >> size required for >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 the specified variable. >> +=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 VariableName, VariableGuid,=20 >> DataSize or Data is NULL. >> +=C2=A0 @retval EFI_DEVICE_ERROR=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable could not be=20 >> retrieved because of a device error. >> + >> +**/ >> +typedef >> +EFI_STATUS >> +(EFIAPI *EDKII_PEI_GET_VARIABLE)( >> +=C2=A0 IN CONST=C2=A0 EDKII_PEI_VARIABLE_PPI=C2=A0=C2=A0=C2=A0 *This, >> +=C2=A0 IN CONST=C2=A0 CHAR16=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *V= ariableName, >> +=C2=A0 IN CONST=C2=A0 EFI_GUID=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *VariableGu= id, >> +=C2=A0 OUT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT32=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 *Attributes, >=20 > [MK] Based on the description, Attributes should be marked "OPTIONAL". >=20 >> +=C2=A0 IN OUT=C2=A0=C2=A0=C2=A0 UINTN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 *DataSize, >> +=C2=A0 OUT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VOID=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *Data OPTIONAL >> +=C2=A0 ); >> + >> +/** >> +=C2=A0 Return the next variable name and GUID. >> + >> +=C2=A0 This function is called multiple times to retrieve the VariableN= ame >> +=C2=A0 and VariableGuid of all variables currently available in the sys= tem. >> +=C2=A0 On each call, the previous results are passed into the interface= , >> +=C2=A0 and, on return, the interface returns the data for the next >> +=C2=A0 interface. When the entire variable list has been returned, >> +=C2=A0 EFI_NOT_FOUND is returned. >> + >=20 > [MK] I know other descriptions don't usually have it but it would be=20 > nice to describe the initial calling values expected. >=20 >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A = pointer to this instance of=20 >> the EDKII_PEI_VARIABLE_PPI. >> +=C2=A0 @param[in, out]=C2=A0=C2=A0 VariableNameSize=C2=A0 On entry, poi= nts to the size of=20 >> the buffer pointed to by VariableName. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 On return, the size of the=20 >> variable name buffer. >> +=C2=A0 @param[in, out]=C2=A0=C2=A0 VariableName=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 On entry, a pointer to a=20 >> null-terminated string that is the variable's name. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 On return, points to the next=20 >> variable's null-terminated name string. >> +=C2=A0 @param[in, out]=C2=A0=C2=A0 VariableGuid=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 On entry, a pointer to an=20 >> EFI_GUID that is the variable's GUID. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 On return, a pointer to the=20 >> next variable's GUID. >> + >> +=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable was read=20 >> successfully. >> +=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable could not be found. >> +=C2=A0 @retval EFI_BUFFER_TOO_SMALL=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 The VariableNameSize is too=20 >> small for the resulting >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 data. VariableNameSize is=20 >> updated with the size >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 required for the specified=20 >> variable. >> +=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 VariableName, VariableGuid or >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 VariableNameSize is NULL. >> +=C2=A0 @retval EFI_DEVICE_ERROR=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable could not be=20 >> retrieved because of a device error. >> + >> +**/ >> +typedef >> +EFI_STATUS >> +(EFIAPI *EDKII_PEI_GET_NEXT_VARIABLE_NAME)( >> +=C2=A0 IN CONST=C2=A0 EDKII_PEI_VARIABLE_PPI=C2=A0=C2=A0=C2=A0 *This, >> +=C2=A0 IN OUT=C2=A0=C2=A0=C2=A0 UINTN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 *VariableNameSize, >> +=C2=A0 IN OUT=C2=A0=C2=A0=C2=A0 CHAR16=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 *VariableName, >> +=C2=A0 IN OUT=C2=A0=C2=A0=C2=A0 EFI_GUID=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *V= ariableGuid >> +=C2=A0 ); >> + >> +/** >> +=C2=A0 Sets the value of a variable. >> + >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A = pointer to this instance of=20 >> the EDKII_PEI_VARIABLE_PPI. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VariableNam= e=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A Null-terminated string that=20 >> is the name of the vendor's variable. >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 Each VariableName is unique for=20 >> each VendorGuid. VariableName must >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 contain 1 or more characters.=20 >> If VariableName is an empty string, >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 then EFI_INVALID_PARAMETER is=20 >> returned. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VendorGuid= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A unique identifier for the=20 >> vendor. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes bitmask to set for=20 >> the variable. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DataSize=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The size in bytes of th= e Data=20 >> buffer. Unless the EFI_VARIABLE_APPEND_WRITE >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 attribute is set, a size of=20 >> zero causes the variable to be deleted. When the >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 EFI_VARIABLE_APPEND_WRITE=20 >> attribute is set, then a SetVariable() call with a >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 DataSize of zero will not cause=20 >> any change to the variable value. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Data=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Th= e contents for the variable. >> + >> +=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The firmware has succes= sfully=20 >> stored the variable and its data as >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 defined by the Attributes. >> +=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 An invalid combination of=20 >> attribute bits, name, and GUID was supplied, or the >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 DataSize exceeds the maximum=20 >> allowed. >> +=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 VariableName is an empty string. >> +=C2=A0 @retval EFI_OUT_OF_RESOURCES=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 Not enough storage is available=20 >> to hold the variable and its data. >> +=C2=A0 @retval EFI_DEVICE_ERROR=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable could not be=20 >> retrieved due to a hardware error. >> +=C2=A0 @retval EFI_WRITE_PROTECTED=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 The variable in question is=20 >> read-only. >> +=C2=A0 @retval EFI_WRITE_PROTECTED=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 The variable in question cannot=20 >> be deleted. >> +=C2=A0 @retval EFI_SECURITY_VIOLATION=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The= variable could not be=20 >> written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 or=20 >> EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS, or >> + =20 >> EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS being set. Writing to=20 >> authenticated >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 variables is not supported in=20 >> the PEI environment. Updates to authenticated >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 variables can be requested=20 >> during PEI via the EFI_AUTHENTICATED_VARIABLE_HOB, but >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 these updates won't be written=20 >> to non-volatile storage until later in DXE. See >> + =20 >> MdeModulePkg/Include/Guid/VariableFormat.h for more details on >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 EFI_AUTHENTICATED_VARIABLE_HOB. >=20 > [MK] I didn't see "EFI_AUTHENTICATED_VARIABLE_HOB" mentioned in=20 > VariableFormat.h. >=20 > [MK] It seems that if a contract for producing and then consuming this=20 > HOB is going to be defined between the HOB producer and consumer phase,=20 > it should be described in something like the PI Spec. >=20 >> +=C2=A0 @retval EFI_NOT_FOUND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The variable trying to be=20 >> updated or deleted was not found. >> + >> +**/ >> +typedef >> +EFI_STATUS >> +(EFIAPI *EDKII_PEI_SET_VARIABLE)( >> +=C2=A0 IN CONST=C2=A0 EDKII_PEI_VARIABLE_PPI=C2=A0=C2=A0=C2=A0 *This, >> +=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 CHAR16=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 *VariableName, >> +=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 EFI_GUID=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 *VendorGuid, >> +=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT32=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes, >> +=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINTN=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 DataSize, >> +=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VOID=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *Data >> +=C2=A0 ); >> + >> +/** >> +=C2=A0 Returns information about the UEFI variables. >> + >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 A poi= nter to this=20 >> instance of the EDKII_PEI_VARIABLE_PPI. >> +=C2=A0 @param[in]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes bitmask=20 >> to specify the type of variables on >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= which to return=20 >> information. >> +=C2=A0 @param[out]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 MaximumVariableS= torageSize=C2=A0=C2=A0=C2=A0 On output the=20 >> maximum size of the storage space >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= available for the=20 >> EFI variables associated with the >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= attributes specified. >> +=C2=A0 @param[out]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 RemainingVariabl= eStorageSize=C2=A0 Returns the=20 >> remaining size of the storage space >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= available for the=20 >> EFI variables associated with the >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= attributes specified. >> +=C2=A0 @param[out]=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 MaximumVariableS= ize=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Returns the= maximum=20 >> size of the individual EFI >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= variables=20 >> associated with the attributes specified. >> + >> +=C2=A0 @retval EFI_SUCCESS=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Valid answer returned. >> +=C2=A0 @retval EFI_INVALID_PARAMETER=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= An invalid=20 >> combination of attribute bits was supplied >> +=C2=A0 @retval EFI_UNSUPPORTED=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 The attribute is=20 >> not supported on this platform, and the >> + =20 >> MaximumVariableStorageSize, >> + =20 >> RemainingVariableStorageSize, MaximumVariableSize >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= are undefined. >> + >> +**/ >> +typedef >> +EFI_STATUS >> +(EFIAPI *EDKII_PEI_QUERY_VARIABLE_INFO)( >> +=C2=A0 IN CONST=C2=A0 EDKII_PEI_VARIABLE_PPI=C2=A0=C2=A0=C2=A0 *This, >> +=C2=A0 IN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT32=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 Attributes, >> +=C2=A0 OUT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT64=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 *MaximumVariableStorageSize, >> +=C2=A0 OUT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT64=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 *RemainingVariableStorageSize, >> +=C2=A0 OUT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 UINT64=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 *MaximumVariableSize >> +=C2=A0 ); >> + >> +/// >> +/// PEI Variable Protocol is intended for use as a means >=20 > [MK] Was "PEI Variable PPI" intended? >=20 >> +/// to store data in the PEI environment. >> +/// >> +struct _EDKII_PEI_VARIABLE_PPI { >> +=C2=A0 EDKII_PEI_GET_VARIABLE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 GetVariable; >> +=C2=A0 EDKII_PEI_GET_NEXT_VARIABLE_NAME=C2=A0 GetNextVariableName; >> +=C2=A0 EDKII_PEI_SET_VARIABLE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 SetVariable; >> +=C2=A0 EDKII_PEI_QUERY_VARIABLE_INFO=C2=A0=C2=A0=C2=A0=C2=A0 QueryVaria= bleInfo; >> +}; >> + >> +extern EFI_GUID=C2=A0 gEdkiiPeiVariablePpiGuid; >> + >> +#endif >> diff --git a/MdeModulePkg/MdeModulePkg.dec=20 >> b/MdeModulePkg/MdeModulePkg.dec >> index 2bcb9f9453..4f4c48b81f 100644 >> --- a/MdeModulePkg/MdeModulePkg.dec >> +++ b/MdeModulePkg/MdeModulePkg.dec >> @@ -513,6 +513,9 @@ >> =C2=A0=C2=A0=C2=A0 gEdkiiPeiCapsuleOnDiskPpiGuid=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D { 0x71a9ea61, 0x5a35,= =20 >> 0x4a5d, { 0xac, 0xef, 0x9c, 0xf8, 0x6d, 0x6d, 0x67, 0xe0 } } >> =C2=A0=C2=A0=C2=A0 gEdkiiPeiBootInCapsuleOnDiskModePpiGuid=C2=A0=C2=A0 = =3D { 0xb08a11e4, 0xe2b7,=20 >> 0x4b75, { 0xb5, 0x15, 0xaf, 0x61, 0x6, 0x68, 0xbf, 0xd1=C2=A0 } } >> +=C2=A0 ## Include/Ppi/Variable.h >> +=C2=A0 gEdkiiPeiVariablePpiGuid=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D { 0xe7b= 2cd04, 0x4b14,=20 >> 0x44c2, { 0xb7, 0x48, 0xce, 0xaf, 0x2b, 0x66, 0x4a, 0xb0 } } >> + >> =C2=A0 [Protocols] >> =C2=A0=C2=A0=C2=A0 ## Load File protocol provides capability to load and= unload EFI=20 >> image into memory and execute it. >> =C2=A0=C2=A0=C2=A0 #=C2=A0 Include/Protocol/LoadPe32Image.h