From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.92.47.17]) by mx.groups.io with SMTP id smtpd.web08.21999.1654826401226226812 for ; Thu, 09 Jun 2022 19:00:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=RAKGIZU+; spf=pass (domain: outlook.com, ip: 40.92.47.17, mailfrom: michael.kubacki@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WAYmX+YiLw3DICIgjzSiinN47PvPcna9SnvoppuO0KIiv4VyTFDWs/VWy6M9x9QKypZ7P2KwiNup7V4phvQyPdVqTxaOdRUvbCU4i/3xwpisjRimi4tlA9ki6f3DGE1/hKZF0e4t+Ihk5x3C09a2Qg0XNF4x4MdNglNud4VB0BBlAfatDWfu71IRdoXNmXeWlDwAZScn+ZiWYtMTjMFGS6MOIFmR6El86yKa6gg4eWu1Flre8dOBx/6V7X+8M4QPeEe0iRuRp0G9cRAB8z2FPdyN438aHpg9sky/rbAwrUkx8arvQlDZJ5V0ZoULGXqSqLjADA09Y9I7KmqZlXmEZg== 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=NLoH60vRKv0aIChse49slLg5b+EIjqpsj2C3vkUbmOk=; b=GuP215ebhAxkcCFCm5TDDGIC01STdYVAZN13dSf0sFf6ABRXAmfVcdNvtKIHrmgqvAkNo2vrgnV89eALrI3tdHuJjqnTR2L2UiDENuLAcYLaaE/b7hHXeuMDkbKB6ntcA0dn2+agJ/Eos8ZTJnRWaqSrIv5e32UCVB/77pYxQ8mSb4bN3fArGYxMF++i6I0AMq05ZoWCXWgTzVnVO2ZfbDmeZ/Ex+/mspJjGjBdm1HgIXKjvJQfwNCwx9tARjpZslVE7NRXx6TV6s1UVDJp2sA1zIWQjiWt9Q0WApJfwHabZfeypyXsoU2WMcZeWStCZ4p9cBOpyzZfcLE9i/uiQNw== 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=NLoH60vRKv0aIChse49slLg5b+EIjqpsj2C3vkUbmOk=; b=RAKGIZU+Oj/fcddgDgae2Lsg51gSRBu9eTwSYrSgM0HBcFXvtmydXFkl/BhX9ewez4OP1CMWPd+/Na5KpDNUrKjCf7a8wRWTh0z1jEDgi2qNe/IjB/5BWBWK6W5Cqlkgm6eDpwsaxCOYbmEBEdJVl9tqzhocG9qOOWZFPiEFD3urd289AZ4LMEo+3AaFN3hY2KPBmut24C+9Pnvikzd8EX4mWfnm3wGmDrqOH3JTScbX02T4tyQcBr39SxaIdNuznMiGUTeI7vUQo2p3u+XoEOmSrRMzC4BUm3VqcTQThVP9ZyUNG2b6vP1+UdmZvEqMN4++t1RjvpkYRYUIt7zi0g== Received: from SJ0PR16MB4876.namprd16.prod.outlook.com (2603:10b6:a03:404::12) by CY4PR16MB1383.namprd16.prod.outlook.com (2603:10b6:903:10e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Fri, 10 Jun 2022 01:59:59 +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 01:59:59 +0000 Message-ID: Date: Thu, 9 Jun 2022 21:59:53 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [edk2-devel] [PATCH V1 1/1] MdeModulePkg: Add Definition of EDKII_PEI_VARIABLE_PPI 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> From: "Michael Kubacki" In-Reply-To: <20220610011705.5148-2-nathaniel.l.desimone@intel.com> X-TMN: [5qkBz+BJ9OPj+YYTfNnsjwdCVniJvMFm] X-ClientProxiedBy: BN9PR03CA0863.namprd03.prod.outlook.com (2603:10b6:408:13d::28) To SJ0PR16MB4876.namprd16.prod.outlook.com (2603:10b6:a03:404::12) Return-Path: michael.kubacki@outlook.com X-Microsoft-Original-Message-ID: <549821e1-5ffa-eb72-bdc7-22d4361b3e84@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 26ee9e8f-b887-4dd6-8714-08da4a84eb9c X-MS-TrafficTypeDiagnostic: CY4PR16MB1383:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ql2gHfSBrD0JiCdTiA4JlXqBzD06Ugx6s3KuXkTzoS4leY6VFvE9WcErjmnZXlERrFWhMfJrh54xn/5KhKwQlFqCuTzL0ewBLBp8z4n5TpBbhH4yk8yVoqPAx1Fo01XIru5j9t30GckJrheln7+XNPNN6LDHHiN9gKWKp3s5GAC1sGFLYktOO98FbmNW6Scsf9z0y4QH8pEXd0ZsVr1kVVbDfAtPlTxADG/gNR7Texgl0dJRxsPv/0hmBPzGkeHSvOmDALN/Q4xpwUr4mU24yd1fGDyaNSaZtUnbpS0k1E55qq4z7ICwDEeVpuBfTaNfdeyQQf7TfgFZM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=?utf-8?B?S2phdjJSYmJ4SEpBNjZiSVpTTW1OK1hVTnpmdGNMU2V0VTAyK2gxMzYvb2px?= =?utf-8?B?TWpvc2cya09KTVB4L3U4SER0WDdlczdkN0dlRGpYUjdHTFJvS3ZzQStpRE1r?= =?utf-8?B?QTEzVjlNcTFML0hJY2dhbkcxSlNZUjRyYXhaZkkwSU1rcmtvVUdQZG9KSnpv?= =?utf-8?B?TEJIaWh3TFVPeEdjU3p5eWRvY0FwSDRGd0RhVWxYR2c3Q2UwQWNHaUdER3Zz?= =?utf-8?B?cEpzSTVTb3FlQ2hyVC9TOUJMZ0xNOWUwcHJpSjBnS0F5aVVNNzVtWVcvSzJy?= =?utf-8?B?MWF6azlKaVE3ejY0T3A3U2thMEV4NnZxVzBPNEovSEpYU2FvLzJFR2pqOWwy?= =?utf-8?B?N2FRM01MZFpjWWlkbk1BTWNkR0VMMEpsMW5nZ2I0Z0J6cG5FMWQvNWw0a1g0?= =?utf-8?Q?9iGa4p1mq27eiJG66IOjFHzJdLX5XD3O?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 26ee9e8f-b887-4dd6-8714-08da4a84eb9c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR16MB4876.namprd16.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jun 2022 01:59:58.9618 (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: CY4PR16MB1383 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Is this change just adding the interface to Tianocore or is there additional implementation planned as well? --- I thought we were following this convention now: "#ifndef __PEI_VARIABLE_PPI_H_" -> "#ifndef PEI_VARIABLE_PPI_H_" Some other comments are inline. Regards, Michael 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 > --- > MdeModulePkg/Include/Ppi/Variable.h | 189 ++++++++++++++++++++++++++++ > MdeModulePkg/MdeModulePkg.dec | 3 + > 2 files changed, 192 insertions(+) > create mode 100644 MdeModulePkg/Include/Ppi/Variable.h > > diff --git a/MdeModulePkg/Include/Ppi/Variable.h 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 > + EDKII PEI Variable Protocol provides an implementation of variables [MK] Was "EDKII PEI Variable PPI" intended? > + intended for use as a means to store data in the PEI environment. > + > + Copyright (c) 2022, Intel Corporation. All rights reserved.
> + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef __PEI_VARIABLE_PPI_H_ > +#define __PEI_VARIABLE_PPI_H_ > + > +#define EDKII_PEI_VARIABLE_PPI_GUID \ > + { \ > + 0xe7b2cd04, 0x4b14, 0x44c2, { 0xb7, 0x48, 0xce, 0xaf, 0x2b, 0x66, 0x4a, 0xb0 } \ > + } > + > +typedef struct _EDKII_PEI_VARIABLE_PPI EDKII_PEI_VARIABLE_PPI; > + > +/** > + This service retrieves a variable's value using its name and GUID. > + > + Read the specified variable from the UEFI variable store. If the Data > + buffer is too small to hold the contents of the variable, > + the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the > + required buffer size to obtain the data. > + > + @param[in] This A pointer to this instance of the EDKII_PEI_VARIABLE_PPI. > + @param[in] VariableName A pointer to a null-terminated string that is the variable's name. > + @param[in] VariableGuid A pointer to an EFI_GUID that is the variable's GUID. The combination of > + VariableGuid and VariableName must be unique. > + @param[out] Attributes If non-NULL, on return, points to the variable's attributes. > + @param[in, out] DataSize On entry, points to the size in bytes of the Data buffer. > + On return, points to the size of the data returned in Data. > + @param[out] Data Points to the buffer which will hold the returned variable value. > + May be NULL with a zero DataSize in order to determine the size of the > + buffer needed. > + > + @retval EFI_SUCCESS The variable was read successfully. > + @retval EFI_NOT_FOUND The variable was not found. > + @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data. > + DataSize is updated with the size required for > + the specified variable. > + @retval EFI_INVALID_PARAMETER VariableName, VariableGuid, DataSize or Data is NULL. > + @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_PEI_GET_VARIABLE)( > + IN CONST EDKII_PEI_VARIABLE_PPI *This, > + IN CONST CHAR16 *VariableName, > + IN CONST EFI_GUID *VariableGuid, > + OUT UINT32 *Attributes, [MK] Based on the description, Attributes should be marked "OPTIONAL". > + IN OUT UINTN *DataSize, > + OUT VOID *Data OPTIONAL > + ); > + > +/** > + Return the next variable name and GUID. > + > + This function is called multiple times to retrieve the VariableName > + and VariableGuid of all variables currently available in the system. > + On each call, the previous results are passed into the interface, > + and, on return, the interface returns the data for the next > + interface. When the entire variable list has been returned, > + EFI_NOT_FOUND is returned. > + [MK] I know other descriptions don't usually have it but it would be nice to describe the initial calling values expected. > + @param[in] This A pointer to this instance of the EDKII_PEI_VARIABLE_PPI. > + @param[in, out] VariableNameSize On entry, points to the size of the buffer pointed to by VariableName. > + On return, the size of the variable name buffer. > + @param[in, out] VariableName On entry, a pointer to a null-terminated string that is the variable's name. > + On return, points to the next variable's null-terminated name string. > + @param[in, out] VariableGuid On entry, a pointer to an EFI_GUID that is the variable's GUID. > + On return, a pointer to the next variable's GUID. > + > + @retval EFI_SUCCESS The variable was read successfully. > + @retval EFI_NOT_FOUND The variable could not be found. > + @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the resulting > + data. VariableNameSize is updated with the size > + required for the specified variable. > + @retval EFI_INVALID_PARAMETER VariableName, VariableGuid or > + VariableNameSize is NULL. > + @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_PEI_GET_NEXT_VARIABLE_NAME)( > + IN CONST EDKII_PEI_VARIABLE_PPI *This, > + IN OUT UINTN *VariableNameSize, > + IN OUT CHAR16 *VariableName, > + IN OUT EFI_GUID *VariableGuid > + ); > + > +/** > + Sets the value of a variable. > + > + @param[in] This A pointer to this instance of the EDKII_PEI_VARIABLE_PPI. > + @param[in] VariableName A Null-terminated string that is the name of the vendor's variable. > + Each VariableName is unique for each VendorGuid. VariableName must > + contain 1 or more characters. If VariableName is an empty string, > + then EFI_INVALID_PARAMETER is returned. > + @param[in] VendorGuid A unique identifier for the vendor. > + @param[in] Attributes Attributes bitmask to set for the variable. > + @param[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE > + attribute is set, a size of zero causes the variable to be deleted. When the > + EFI_VARIABLE_APPEND_WRITE attribute is set, then a SetVariable() call with a > + DataSize of zero will not cause any change to the variable value. > + @param[in] Data The contents for the variable. > + > + @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as > + defined by the Attributes. > + @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits, name, and GUID was supplied, or the > + DataSize exceeds the maximum allowed. > + @retval EFI_INVALID_PARAMETER VariableName is an empty string. > + @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data. > + @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error. > + @retval EFI_WRITE_PROTECTED The variable in question is read-only. > + @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. > + @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, > + or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS, or > + EFI_VARIABLE_ENHANCED_AUTHENTICATED_ACCESS being set. Writing to authenticated > + variables is not supported in the PEI environment. Updates to authenticated > + variables can be requested during PEI via the EFI_AUTHENTICATED_VARIABLE_HOB, but > + these updates won't be written to non-volatile storage until later in DXE. See > + MdeModulePkg/Include/Guid/VariableFormat.h for more details on > + EFI_AUTHENTICATED_VARIABLE_HOB. [MK] I didn't see "EFI_AUTHENTICATED_VARIABLE_HOB" mentioned in VariableFormat.h. [MK] It seems that if a contract for producing and then consuming this HOB is going to be defined between the HOB producer and consumer phase, it should be described in something like the PI Spec. > + @retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_PEI_SET_VARIABLE)( > + IN CONST EDKII_PEI_VARIABLE_PPI *This, > + IN CHAR16 *VariableName, > + IN EFI_GUID *VendorGuid, > + IN UINT32 Attributes, > + IN UINTN DataSize, > + IN VOID *Data > + ); > + > +/** > + Returns information about the UEFI variables. > + > + @param[in] This A pointer to this instance of the EDKII_PEI_VARIABLE_PPI. > + @param[in] Attributes Attributes bitmask to specify the type of variables on > + which to return information. > + @param[out] MaximumVariableStorageSize On output the maximum size of the storage space > + available for the EFI variables associated with the > + attributes specified. > + @param[out] RemainingVariableStorageSize Returns the remaining size of the storage space > + available for the EFI variables associated with the > + attributes specified. > + @param[out] MaximumVariableSize Returns the maximum size of the individual EFI > + variables associated with the attributes specified. > + > + @retval EFI_SUCCESS Valid answer returned. > + @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied > + @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the > + MaximumVariableStorageSize, > + RemainingVariableStorageSize, MaximumVariableSize > + are undefined. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_PEI_QUERY_VARIABLE_INFO)( > + IN CONST EDKII_PEI_VARIABLE_PPI *This, > + IN UINT32 Attributes, > + OUT UINT64 *MaximumVariableStorageSize, > + OUT UINT64 *RemainingVariableStorageSize, > + OUT UINT64 *MaximumVariableSize > + ); > + > +/// > +/// PEI Variable Protocol is intended for use as a means [MK] Was "PEI Variable PPI" intended? > +/// to store data in the PEI environment. > +/// > +struct _EDKII_PEI_VARIABLE_PPI { > + EDKII_PEI_GET_VARIABLE GetVariable; > + EDKII_PEI_GET_NEXT_VARIABLE_NAME GetNextVariableName; > + EDKII_PEI_SET_VARIABLE SetVariable; > + EDKII_PEI_QUERY_VARIABLE_INFO QueryVariableInfo; > +}; > + > +extern EFI_GUID gEdkiiPeiVariablePpiGuid; > + > +#endif > diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec > index 2bcb9f9453..4f4c48b81f 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -513,6 +513,9 @@ > gEdkiiPeiCapsuleOnDiskPpiGuid = { 0x71a9ea61, 0x5a35, 0x4a5d, { 0xac, 0xef, 0x9c, 0xf8, 0x6d, 0x6d, 0x67, 0xe0 } } > gEdkiiPeiBootInCapsuleOnDiskModePpiGuid = { 0xb08a11e4, 0xe2b7, 0x4b75, { 0xb5, 0x15, 0xaf, 0x61, 0x6, 0x68, 0xbf, 0xd1 } } > > + ## Include/Ppi/Variable.h > + gEdkiiPeiVariablePpiGuid = { 0xe7b2cd04, 0x4b14, 0x44c2, { 0xb7, 0x48, 0xce, 0xaf, 0x2b, 0x66, 0x4a, 0xb0 } } > + > [Protocols] > ## Load File protocol provides capability to load and unload EFI image into memory and execute it. > # Include/Protocol/LoadPe32Image.h