From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.1163.1570571437522351141 for ; Tue, 08 Oct 2019 14:50:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=OcZ4zJ03; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: michael.a.kubacki@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2019 14:50:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,272,1566889200"; d="scan'208";a="192689562" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga008.fm.intel.com with ESMTP; 08 Oct 2019 14:50:36 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 8 Oct 2019 14:50:36 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 8 Oct 2019 14:50:36 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.58) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 8 Oct 2019 14:50:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K+scAafKes3W+Y1ZwDlXUGyogHUYYgmfJdJJL7VU7fzKIEV7Fk7/e1NTiDieR7yU8b/ViavGB/WlY3F+iHm7fcDgQFkhKkvWg8LDB40PyRAqpD+Yq5YIayt3xpIF6Ll5voqPeh4HqOa5VseE2wP9diJG9nYFCaGs085/cSA+ZpAwvflatCOfycO4GDCpHunfCqJlxRwTSkUl4wMCKfFP70g4VlfPVJvCHiYcBC3ePOGqO4wrOGimV9nmB1icBsD54609CC2XOJkfpZI75Vhvh4ina+rniiprOVSVLFnoVj+U0+W8fCv8w0XcaK0kyLWsaT+wr94Afl26P4XOwSj2TA== 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=EcKlklEMLV2Zt+rcpVWwallku01bbYtXkcfMzvcTHg0=; b=RBRiR6C1GF+Nqt3RODIJZDVTMzsF68N/xZmtj8waHcC/kzf+0QyOHdHPjTC0mvzPpemVxiBYFIHLiH2b3gX1FBjuNGYecF0C6WQwh1nVmYYncjMdR7CokEOs4UV3de+HwKo5O8PX4ccQyjF6UYDb9k8M1HpVHvqLgsRRZAcF0QlUj6kpSIQlvqeKAzcQuhnzmjZWmgHkOrwMDPf4QIWuHrJvcOac364OEP12Cqb3X8gcjLyy135ZGgalez5ek8Sizw0MbpV9yR42mjQB1nKLScpkIDPxAS7iOpkEnzgfQb/T/oiqRDIDklLdNBCg9bE/lVTq4QFu9iC3c4A4BIvjHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EcKlklEMLV2Zt+rcpVWwallku01bbYtXkcfMzvcTHg0=; b=OcZ4zJ03IA5WQRMcMKYoKu72YpsCYss7BqtFmzkDjZvQrGRQw5czqKqH0XZCqBmCF+Z56OG5PIQG7h3o46w0VWcDwON62ZrBTvX8pT5O49aPhVv5gtfCAuOZjfvoayVPtWulxxzpppgimIl9iyLPet4jk1774CuwRad1SGi9bAI= Received: from DM6PR11MB3834.namprd11.prod.outlook.com (20.179.17.87) by DM6PR11MB2537.namprd11.prod.outlook.com (20.176.102.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.24; Tue, 8 Oct 2019 21:49:59 +0000 Received: from DM6PR11MB3834.namprd11.prod.outlook.com ([fe80::59cc:8a30:6b9e:584e]) by DM6PR11MB3834.namprd11.prod.outlook.com ([fe80::59cc:8a30:6b9e:584e%3]) with mapi id 15.20.2327.025; Tue, 8 Oct 2019 21:49:59 +0000 From: "Kubacki, Michael A" To: "Wu, Hao A" , "devel@edk2.groups.io" CC: "Bi, Dandan" , Ard Biesheuvel , "Dong, Eric" , Laszlo Ersek , "Gao, Liming" , "Kinney, Michael D" , "Ni, Ray" , "Wang, Jian J" , "Yao, Jiewen" Subject: Re: [edk2-devel] [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize VARIABLE_INFO_ENTRY buffer Thread-Topic: [edk2-devel] [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize VARIABLE_INFO_ENTRY buffer Thread-Index: AQHVdZ61sWwVTyB4eUeIO+dh4/6Kh6dCNuWQgAcIC7CABsar4IABU7JQ Date: Tue, 8 Oct 2019 21:49:59 +0000 Message-ID: References: <20190928014717.31372-1-michael.a.kubacki@intel.com> <20190928014717.31372-4-michael.a.kubacki@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzE2NWY1OTYtYzM2MC00MDA2LWIxODQtYmFlZDU2OWY0MTIxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTFZFOWFVSzVmeTFGMVF6RlJYZXZpY1p1eVpQc0NyXC9ZaFp4eHdRc2pjVDRycEtzWVJRaHl1Sllxbk85Z3dFakUifQ== dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=michael.a.kubacki@intel.com; x-originating-ip: [134.134.136.217] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 95f38cca-dfa7-49ff-9ecf-08d74c397733 x-ms-traffictypediagnostic: DM6PR11MB2537: x-ms-exchange-purlcount: 3 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 01842C458A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(346002)(396003)(366004)(376002)(136003)(51914003)(189003)(199004)(13464003)(102836004)(2906002)(110136005)(86362001)(316002)(6506007)(53546011)(66066001)(76176011)(54906003)(14444005)(966005)(478600001)(256004)(26005)(4326008)(99286004)(5660300002)(14454004)(186003)(305945005)(7736002)(74316002)(2501003)(11346002)(476003)(66476007)(66446008)(66946007)(229853002)(64756008)(66556008)(486006)(8936002)(25786009)(9686003)(446003)(55016002)(6306002)(6116002)(3846002)(8676002)(30864003)(7696005)(52536014)(6436002)(6246003)(81166006)(33656002)(81156014)(107886003)(71200400001)(71190400001)(76116006);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR11MB2537;H:DM6PR11MB3834.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AOZ3ICPfezsML4+UD30tTH22ik4mS8DIR3cstUgcr45PwImqsU3THcHvLBwRlaCIjkTLqd9erXPKIWwOVmsl+JfTwreuAtpnI/itl2kd33G6yYprYsL0PAHub1ZYOpJ6MgRg8wPXfklUmZwkNjd/fUDeWTCLD1HzwOpfPau5nIzYm6qiWfsbwnG8nDkg2aH6gaOpj6PPiLhMvBn3C2Q9T+ZViZ+HHCLJoegy+uNNu1DvUmdwr6nto/86Vgm76wDkofNaeMw4I2MzYhnQ4/bdbd59yA/Hy6kf7IAFxJXoiYBcC8v/lZOtypHvjXdc8EpZOzJZM8DtZOCtMQAyyv0tlVO6Jtpv2N0iGD6HSaIxUePtlCe0YpScrfRkHAOt2YOd39gU9TGPtJiq3AarLdsicp+OiYQLlLoZpcz/bnUjM575KkYczrVVlq9UrBr5+7UlgxRA9NxmxAdlcRyVCgtBDQ== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 95f38cca-dfa7-49ff-9ecf-08d74c397733 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2019 21:49:59.1274 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8Z0MOc4UxFAV0uZYMizg4S3+d6u9WaU5SzSBDXNiSgxEboFtddetMK7noEAE07W0FeHe8DNSc+8Kpt6GeKwgk7x0bXE2wzvxh/h0RTocYS0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2537 Return-Path: michael.a.kubacki@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I will clarify that aspect in the commit message. Thanks, Michael > -----Original Message----- > From: Wu, Hao A > Sent: Monday, October 7, 2019 7:12 PM > To: devel@edk2.groups.io; Kubacki, Michael A > Cc: Bi, Dandan ; Ard Biesheuvel > ; Dong, Eric ; Laszlo Er= sek > ; Gao, Liming ; Kinney, Michael= D > ; Ni, Ray ; Wang, Jian J > ; Yao, Jiewen > Subject: RE: [edk2-devel] [PATCH V2 3/9] MdeModulePkg/Variable: > Parameterize VARIABLE_INFO_ENTRY buffer >=20 > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > Kubacki, Michael A > > Sent: Friday, October 04, 2019 2:06 AM > > To: Wu, Hao A; devel@edk2.groups.io > > Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming; > > Kinney, Michael D; Ni, Ray; Wang, Jian J; Yao, Jiewen > > Subject: Re: [edk2-devel] [PATCH V2 3/9] MdeModulePkg/Variable: > > Parameterize VARIABLE_INFO_ENTRY buffer > > > > Your understanding is correct. >=20 >=20 > Thanks for the confirmation. > Could you help to refine the commit message in the next series? Thanks. >=20 > Best Regards, > Hao Wu >=20 >=20 > > > > Thanks, > > Michael > > > > > -----Original Message----- > > > From: Wu, Hao A > > > Sent: Thursday, October 3, 2019 1:04 AM > > > To: Kubacki, Michael A ; > > > devel@edk2.groups.io > > > Cc: Bi, Dandan ; Ard Biesheuvel > > > ; Dong, Eric ; > > > Laszlo > > Ersek > > > ; Gao, Liming ; Kinney, > > Michael > > > D ; Ni, Ray ; Wang, > > > Jian J ; Yao, Jiewen > > > Subject: RE: [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize > > > VARIABLE_INFO_ENTRY buffer > > > > > > > -----Original Message----- > > > > From: Kubacki, Michael A > > > > Sent: Saturday, September 28, 2019 9:47 AM > > > > To: devel@edk2.groups.io > > > > Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, > > > > Liming; Kinney, Michael D; Ni, Ray; Wang, Jian J; Wu, Hao A; Yao, > > > > Jiewen > > > > Subject: [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize > > > > VARIABLE_INFO_ENTRY buffer > > > > > > > > UpdateVariableInfo () currently accepts parameters regarding > > > > updates to be made to a global variable of type > > > > VARIABLE_INFO_ENTRY. This change passes the structure by pointer > > > > to UpdateVariableInfo () so structures can be updated outside the = fixed > global variable. > > > > > > > > > For: > > > "... so structures can be updated outside the fixed global variable = " > > > > > > Do you mean: > > > > > > VARIABLE_INFO_ENTRY structure pointers other than "&gVariableInfo" > > > can be passed to UpdateVariableInfo(). > > > > > > Is my understanding correct? If so, > > > Reviewed-by: Hao A Wu > > > > > > Best Regards, > > > Hao Wu > > > > > > > > > > > > > > Cc: Dandan Bi > > > > Cc: Ard Biesheuvel > > > > Cc: Eric Dong > > > > Cc: Laszlo Ersek > > > > Cc: Liming Gao > > > > Cc: Michael D Kinney > > > > Cc: Ray Ni > > > > Cc: Jian J Wang > > > > Cc: Hao A Wu > > > > Cc: Jiewen Yao > > > > Signed-off-by: Michael Kubacki > > > > --- > > > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h | 18 > > > > +++++---- > > > > MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 14 > > +++--- > > > - > > > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c | 41 > > > > +++++++++++--------- > > > > 3 files changed, 39 insertions(+), 34 deletions(-) > > > > > > > > diff --git > > > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h > > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h > > > > index 0d231511ea..6f2000f3ee 100644 > > > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h > > > > +++ > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h > > > > @@ -286,13 +286,14 @@ GetNextVariableEx ( > > > > the transaction. Data is allocated by this routine, but never > > > > freed. > > > > > > > > - @param[in] VariableName Name of the Variable to track. > > > > - @param[in] VendorGuid Guid of the Variable to track. > > > > - @param[in] Volatile TRUE if volatile FALSE if non-volatil= e. > > > > - @param[in] Read TRUE if GetVariable() was called. > > > > - @param[in] Write TRUE if SetVariable() was called. > > > > - @param[in] Delete TRUE if deleted via SetVariable(). > > > > - @param[in] Cache TRUE for a cache hit. > > > > + @param[in] VariableName Name of the Variable to track. > > > > + @param[in] VendorGuid Guid of the Variable to track. > > > > + @param[in] Volatile TRUE if volatile FALSE if non-vo= latile. > > > > + @param[in] Read TRUE if GetVariable() was called= . > > > > + @param[in] Write TRUE if SetVariable() was called= . > > > > + @param[in] Delete TRUE if deleted via SetVariable(= ). > > > > + @param[in] Cache TRUE for a cache hit. > > > > + @param[in,out] VariableInfo Pointer to a pointer of > > > > VARIABLE_INFO_ENTRY structures. > > > > > > > > **/ > > > > VOID > > > > @@ -303,7 +304,8 @@ UpdateVariableInfo ( > > > > IN BOOLEAN Read, > > > > IN BOOLEAN Write, > > > > IN BOOLEAN Delete, > > > > - IN BOOLEAN Cache > > > > + IN BOOLEAN Cache, > > > > + IN OUT VARIABLE_INFO_ENTRY **VariableInfo > > > > ); > > > > > > > > #endif > > > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > > > index 816e8f7b8f..1a57d7e1ba 100644 > > > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > > > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > > > @@ -1641,7 +1641,7 @@ UpdateVariable ( > > > > // go to delete this variable in variable HOB and > > > > // try to flush other variables from HOB to flash. > > > > // > > > > - UpdateVariableInfo (VariableName, VendorGuid, FALSE, FALS= E, > > > FALSE, > > > > TRUE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, FALSE, > > > > + FALSE, FALSE, > > > > TRUE, FALSE, &gVariableInfo); > > > > FlushHobVariableToFlash (VariableName, VendorGuid); > > > > return EFI_SUCCESS; > > > > } > > > > @@ -1758,7 +1758,7 @@ UpdateVariable ( > > > > &State > > > > ); > > > > if (!EFI_ERROR (Status)) { > > > > - UpdateVariableInfo (VariableName, VendorGuid, Variable->V= olatile, > > > > FALSE, FALSE, TRUE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, > > > > + Variable->Volatile, > > > > FALSE, FALSE, TRUE, FALSE, &gVariableInfo); > > > > if (!Variable->Volatile) { > > > > CacheVariable->CurrPtr->State =3D State; > > > > FlushHobVariableToFlash (VariableName, VendorGuid); @@ > > > > -1777,7 +1777,7 @@ UpdateVariable ( > > > > // > > > > // Variable content unchanged and no need to update > > > > timestamp, just return. > > > > // > > > > - UpdateVariableInfo (VariableName, VendorGuid, Variable->Vol= atile, > > > > FALSE, TRUE, FALSE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, > > > > + Variable->Volatile, > > > > FALSE, TRUE, FALSE, FALSE, &gVariableInfo); > > > > Status =3D EFI_SUCCESS; > > > > goto Done; > > > > } else if ((CacheVariable->CurrPtr->State =3D=3D VAR_ADDED) |= | @@ > > > > -2006,7 +2006,7 @@ UpdateVariable ( > > > > CacheVariable->CurrPtr =3D (VARIABLE_HEADER *)((UINTN) > > > > CacheVariable->StartPtr + ((UINTN) Variable->CurrPtr - (UINTN) > > > > CacheVariable->Variable- > > > > >StartPtr)); > > > > CacheVariable->InDeletedTransitionPtr =3D NULL; > > > > } > > > > - UpdateVariableInfo (VariableName, VendorGuid, FALSE, FALS= E, > > TRUE, > > > > FALSE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, FALSE, > > > > + FALSE, TRUE, > > > > FALSE, FALSE, &gVariableInfo); > > > > FlushHobVariableToFlash (VariableName, VendorGuid); > > > > } else { > > > > if (IsCommonUserVariable && ((VarSize + > > > > mVariableModuleGlobal- > > > > >CommonUserVariableTotalSize) > mVariableModuleGlobal- > > > > >CommonMaxUserVariableSpace)) { > > > > @@ -2156,7 +2156,7 @@ UpdateVariable ( > > > > CacheVariable->CurrPtr =3D (VARIABLE_HEADER *)((UINTN) > > > > CacheVariable->StartPtr + ((UINTN) Variable->CurrPtr - (UINTN) > > > > CacheVariable->Variable- > > > > >StartPtr)); > > > > CacheVariable->InDeletedTransitionPtr =3D NULL; > > > > } > > > > - UpdateVariableInfo (VariableName, VendorGuid, TRUE, FALSE= , TRUE, > > > > FALSE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, TRUE, > > > > + FALSE, TRUE, > > > > FALSE, FALSE, &gVariableInfo); > > > > } > > > > goto Done; > > > > } > > > > @@ -2227,7 +2227,7 @@ UpdateVariable ( > > > > } > > > > > > > > if (!EFI_ERROR (Status)) { > > > > - UpdateVariableInfo (VariableName, VendorGuid, Volatile, FALSE= , > > TRUE, > > > > FALSE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, Volatile, > > > > + FALSE, TRUE, > > > > FALSE, FALSE, &gVariableInfo); > > > > if (!Volatile) { > > > > FlushHobVariableToFlash (VariableName, VendorGuid); > > > > } > > > > @@ -2306,7 +2306,7 @@ VariableServiceGetVariable ( > > > > } > > > > > > > > *DataSize =3D VarDataSize; > > > > - UpdateVariableInfo (VariableName, VendorGuid, Variable.Volati= le, > > > TRUE, > > > > FALSE, FALSE, FALSE); > > > > + UpdateVariableInfo (VariableName, VendorGuid, > > > > + Variable.Volatile, TRUE, > > > > FALSE, FALSE, FALSE, &gVariableInfo); > > > > > > > > Status =3D EFI_SUCCESS; > > > > goto Done; > > > > diff --git > > > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c > > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c > > > > index 9bc5369a90..394195342d 100644 > > > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c > > > > +++ > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c > > > > @@ -660,13 +660,14 @@ Done: > > > > the transaction. Data is allocated by this routine, but never > > > > freed. > > > > > > > > - @param[in] VariableName Name of the Variable to track. > > > > - @param[in] VendorGuid Guid of the Variable to track. > > > > - @param[in] Volatile TRUE if volatile FALSE if non-volatil= e. > > > > - @param[in] Read TRUE if GetVariable() was called. > > > > - @param[in] Write TRUE if SetVariable() was called. > > > > - @param[in] Delete TRUE if deleted via SetVariable(). > > > > - @param[in] Cache TRUE for a cache hit. > > > > + @param[in] VariableName Name of the Variable to track. > > > > + @param[in] VendorGuid Guid of the Variable to track. > > > > + @param[in] Volatile TRUE if volatile FALSE if non-vo= latile. > > > > + @param[in] Read TRUE if GetVariable() was called= . > > > > + @param[in] Write TRUE if SetVariable() was called= . > > > > + @param[in] Delete TRUE if deleted via SetVariable(= ). > > > > + @param[in] Cache TRUE for a cache hit. > > > > + @param[in,out] VariableInfo Pointer to a pointer of > > > > VARIABLE_INFO_ENTRY structures. > > > > > > > > **/ > > > > VOID > > > > @@ -677,35 +678,38 @@ UpdateVariableInfo ( > > > > IN BOOLEAN Read, > > > > IN BOOLEAN Write, > > > > IN BOOLEAN Delete, > > > > - IN BOOLEAN Cache > > > > + IN BOOLEAN Cache, > > > > + IN OUT VARIABLE_INFO_ENTRY **VariableInfo > > > > ) > > > > { > > > > VARIABLE_INFO_ENTRY *Entry; > > > > > > > > if (FeaturePcdGet (PcdVariableCollectStatistics)) { > > > > - > > > > + if (VariableName =3D=3D NULL || VendorGuid =3D=3D NULL || > > > > + VariableInfo =3D=3D > > > > NULL) { > > > > + return; > > > > + } > > > > if (AtRuntime ()) { > > > > // Don't collect statistics at runtime. > > > > return; > > > > } > > > > > > > > - if (gVariableInfo =3D=3D NULL) { > > > > + if (*VariableInfo =3D=3D NULL) { > > > > // > > > > // On the first call allocate a entry and place a pointer t= o it in > > > > // the EFI System Table. > > > > // > > > > - gVariableInfo =3D AllocateZeroPool (sizeof (VARIABLE_INFO_E= NTRY)); > > > > - ASSERT (gVariableInfo !=3D NULL); > > > > + *VariableInfo =3D AllocateZeroPool (sizeof (VARIABLE_INFO_E= NTRY)); > > > > + ASSERT (*VariableInfo !=3D NULL); > > > > > > > > - CopyGuid (&gVariableInfo->VendorGuid, VendorGuid); > > > > - gVariableInfo->Name =3D AllocateZeroPool (StrSize (Variable= Name)); > > > > - ASSERT (gVariableInfo->Name !=3D NULL); > > > > - StrCpyS (gVariableInfo->Name, > > StrSize(VariableName)/sizeof(CHAR16), > > > > VariableName); > > > > - gVariableInfo->Volatile =3D Volatile; > > > > + CopyGuid (&(*VariableInfo)->VendorGuid, VendorGuid); > > > > + (*VariableInfo)->Name =3D AllocateZeroPool (StrSize (Variab= leName)); > > > > + ASSERT ((*VariableInfo)->Name !=3D NULL); > > > > + StrCpyS ((*VariableInfo)->Name, > > > > + StrSize(VariableName)/sizeof(CHAR16), > > > > VariableName); > > > > + (*VariableInfo)->Volatile =3D Volatile; > > > > } > > > > > > > > > > > > - for (Entry =3D gVariableInfo; Entry !=3D NULL; Entry =3D Entr= y->Next) { > > > > + for (Entry =3D (*VariableInfo); Entry !=3D NULL; Entry =3D > > > > + Entry->Next) { > > > > if (CompareGuid (VendorGuid, &Entry->VendorGuid)) { > > > > if (StrCmp (VariableName, Entry->Name) =3D=3D 0) { > > > > if (Read) { > > > > @@ -739,7 +743,6 @@ UpdateVariableInfo ( > > > > StrCpyS (Entry->Next->Name, > > > > StrSize(VariableName)/sizeof(CHAR16), > > > > VariableName); > > > > Entry->Next->Volatile =3D Volatile; > > > > } > > > > - > > > > } > > > > } > > > > } > > > > -- > > > > 2.16.2.windows.1 > > > > > > > > >=20 >=20