From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=iFz4Xx0+; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: michael.a.kubacki@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Thu, 03 Oct 2019 11:43:18 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2019 11:43:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,253,1566889200"; d="scan'208";a="205679595" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga001.fm.intel.com with ESMTP; 03 Oct 2019 11:43:17 -0700 Received: from orsmsx158.amr.corp.intel.com (10.22.240.20) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 3 Oct 2019 11:43:17 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX158.amr.corp.intel.com (10.22.240.20) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 3 Oct 2019 11:43:17 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.36.58) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 3 Oct 2019 11:43:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wpt80F5TWExgeM10QYsOSEfK1FIrbs/1w1DORREc+4qr6i8w1I51KLl+ief9aWjbrRiBW+0ofYiQ4TTl9thj3Fr7ys1fTRur/WWs0byDCn+ntCwPTec2fUwTD5XueBozAPrdBmhStFkUO1QLWNgSb3y8wRx/110e3O9i/d9dq++yjZKUNo4MSVHUnLVi5ztnecD03vQQ6Qi2ulFAVkZNjw2yOOtkInE0hp5OECIaE3Qcll4tov4WSN3y6JljA3yoHYSlH7iHrQAOXC/nQmnOBl9kqEBKPe9rK68Y51WeTYqjrN6S01HPDZSO+50dfICfDEV6ZNA1BfBvwtoRxWUk1w== 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=qwqUnOO0hHIitMSsWPNL2+PGfqijBZ/s6YmtCYmu4vg=; b=CMnlV2h+ugX+Q5NDiwmVjMcsgPtPM3buzxy5MezwZMWNDbn2Ppbcz+yepc++SCtV1X4iez7nrybfb/yU4Lwm4EADZBD4/ItXdA45k9INo99W54YhI+C1h+wxWQ9RxBnAW5AbyhBxEBfZEp07rkvSNysmp0xhWZNhVkRIOdrFRqQG1MIM1WmeF45Z5DZXvxn5JaedecqToFMVVep5WwPosSDShUqtE3tWAVWKGztUNYMNeBlbp2DBuJ2FC1KCpVtnKMKrLvxGaS/z1f0lHTi62EOjs8urZlaKGotogq8OPOW/xlcNLuoQLig1kmjODZGn06WcEZHDwTOQb5Cq75KcrA== 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=qwqUnOO0hHIitMSsWPNL2+PGfqijBZ/s6YmtCYmu4vg=; b=iFz4Xx0+Dvo4AmZoUSlnaOWNnLzHLjmcG7jRh2xdCYfN6saTo20SPg+aJRXu5s/86ZZMz5RRsIwCI/smMpTPwcSZnlksValwUZZYKoSzuM+2QeK6uWMBGMasHNBUpaQYXHxIe94YR5Grslh8H2xRJHfAnkD8kVFU8khMftJamM8= Received: from DM6PR11MB3834.namprd11.prod.outlook.com (20.179.17.87) by DM6PR11MB3356.namprd11.prod.outlook.com (20.176.122.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Thu, 3 Oct 2019 18:43:15 +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.2305.023; Thu, 3 Oct 2019 18:43:15 +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: [PATCH V2 5/9] MdeModulePkg/Variable: Add a file for NV variable functions Thread-Topic: [PATCH V2 5/9] MdeModulePkg/Variable: Add a file for NV variable functions Thread-Index: AQHVdZ63uOPHhfGQlU+EzIXsAAqI2KdCPn9AgAcI+FA= Date: Thu, 3 Oct 2019 18:43:15 +0000 Message-ID: References: <20190928014717.31372-1-michael.a.kubacki@intel.com> <20190928014717.31372-6-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGQ4ODVjMTAtZmE1ZS00ODYxLTk4ZjYtNDc0MTRhYzc4ZGE5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidkljREdwWFdTNDdrMGRLR1BibWZRdEdXb05cL1NXeGwxVmhXYzI2WW9lYVd2eGFJVGNST0hZNTNSTVwvODZKS0xmIn0= 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: c6f2d67c-772a-4c6a-bd50-08d748318d16 x-ms-traffictypediagnostic: DM6PR11MB3356: 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:4714; x-forefront-prvs: 01792087B6 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(136003)(39850400004)(396003)(366004)(346002)(189003)(199004)(13464003)(76116006)(55016002)(9686003)(71190400001)(71200400001)(478600001)(6246003)(4326008)(305945005)(74316002)(110136005)(7736002)(54906003)(99286004)(53546011)(14454004)(3846002)(66066001)(6116002)(64756008)(66946007)(66446008)(66556008)(86362001)(316002)(66476007)(186003)(2501003)(52536014)(26005)(102836004)(5660300002)(2906002)(76176011)(6506007)(486006)(7696005)(8936002)(6436002)(446003)(256004)(107886003)(81166006)(8676002)(81156014)(33656002)(476003)(229853002)(25786009)(11346002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM6PR11MB3356;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: y+kNM+zxS2BbvH/sdctJzaNJP5RLRyTjM6ERyfwpQRRJW6zk6M1OMiD4Yzsqw8OJS6yfN74GulzackXnE4o+haOYb+MXAnJVXsZkkx2QbzYY1PPRvZI2aR3ebjK3Mrrsy34Q8IZjs+HDJ6u54mvhAxeRVxB9McrYqZfLTAXUcXKiF2GxVOcddUa8zW8/hPqt6+iWVJSJuDTdci3ZAdFDLcUPY8CSLXevUiOc2GWbdiK53Lf578eCdo+tpmvE7HPFtyjhaIyfWgqBk8Ik/54orHb9Kpq58443twN6+cXVh/iRovnh7I76Ok/KtWIFzMN1R8sgvGA7rp6T5nzp/ty4uok745Jw4bueRXazVd5jPpOlPIRPGfoTa75rnpT8LkQ59Yxc0T2qqiK7jIDjPmisUpVKYU22amexPtws067/gDc= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c6f2d67c-772a-4c6a-bd50-08d748318d16 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2019 18:43:15.1940 (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: evZG7o+sWSCLnlbNqglo/cbM5sHhaOBHb7IJtGjm6TP55E2uJWbHURgjdNOE4EIRQCnDDeZfPfuPUmUxV9p7R010gXigWcYjJg/eg8qgy8k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3356 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 was debating on keeping this file in the patch series. I don't see a prob= lem moving those other functions. The goal was to break out some of the NV-specific co= ntent from many of the other more generic functions in Variable.c Since you menti= oned it, I will make that change in V3, unless I hear back otherwise. 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 Ers= ek > ; Gao, Liming ; Kinney, Michael > D ; Ni, Ray ; Wang, Jian J > ; Yao, Jiewen > Subject: RE: [PATCH V2 5/9] MdeModulePkg/Variable: Add a file for NV > variable functions >=20 > > -----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 5/9] MdeModulePkg/Variable: Add a file for NV > > variable functions > > > > This change adds a dedicated file for variable operations specific to > > non-volatile variables. This decreases the overall length of the > > relatively large Variable.c file. >=20 >=20 > It is not clear to me what are the criteria for moving functions into the > separate new file. >=20 > I guess the new file is for functions related with NV variables, but I sa= w there > are functions like: >=20 > InitRealNonVolatileVariableStore > InitEmuNonVolatileVariableStore > InitNonVolatileVariableStore >=20 > Not sure if they can be put into the new file as well. >=20 > Best Regards, > Hao Wu >=20 >=20 > > > > 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/VariableRuntimeDxe.inf > > | 2 ++ > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf | > 2 > > ++ > > > > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf > > | 2 ++ > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.h > | > > 25 +++++++++++++++++ > > MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | = 20 +-- > -- > > --------- > > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c > | > > 28 ++++++++++++++++++++ > > 6 files changed, 60 insertions(+), 19 deletions(-) > > > > diff --git > > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > > index c35e5fe787..08a5490787 100644 > > --- > > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > > +++ > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > > @@ -36,6 +36,8 @@ > > Variable.c > > VariableDxe.c > > Variable.h > > + VariableNonVolatile.c > > + VariableNonVolatile.h > > VariableParsing.c > > VariableParsing.h > > PrivilegePolymorphic.h > > diff --git > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf > > index 626738b9c7..6dc2721b81 100644 > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf > > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf > > @@ -45,6 +45,8 @@ > > Variable.c > > VariableTraditionalMm.c > > VariableSmm.c > > + VariableNonVolatile.c > > + VariableNonVolatile.h > > VariableParsing.c > > VariableParsing.h > > VarCheck.c > > diff --git > > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.i > > nf > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm. > > inf > > index 1ba8f9ebfb..ca9d23ce9f 100644 > > --- > > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.i > > nf > > +++ > > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm. > > inf > > @@ -45,6 +45,8 @@ > > Variable.c > > VariableSmm.c > > VariableStandaloneMm.c > > + VariableNonVolatile.c > > + VariableNonVolatile.h > > VariableParsing.c > > VariableParsing.h > > VarCheck.c > > diff --git > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.h > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.h > > new file mode 100644 > > index 0000000000..82572262ef > > --- /dev/null > > +++ > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.h > > @@ -0,0 +1,25 @@ > > +/** @file > > + Common variable non-volatile store routines. > > + > > +Copyright (c) 2019, Intel Corporation. All rights reserved.
> > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#ifndef _VARIABLE_NON_VOLATILE_H_ > > +#define _VARIABLE_NON_VOLATILE_H_ > > + > > +#include "Variable.h" > > + > > +/** > > + Get non-volatile maximum variable size. > > + > > + @return Non-volatile maximum variable size. > > + > > +**/ > > +UINTN > > +GetNonVolatileMaxVariableSize ( > > + VOID > > + ); > > + > > +#endif > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > index 53d797152c..5da2354aa5 100644 > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c > > @@ -23,6 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ > > > > #include "Variable.h" > > +#include "VariableNonVolatile.h" > > #include "VariableParsing.h" > > > > VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal; @@ -3006,25 > +3007,6 > > @@ ReclaimForOS( > > } > > } > > > > -/** > > - Get non-volatile maximum variable size. > > - > > - @return Non-volatile maximum variable size. > > - > > -**/ > > -UINTN > > -GetNonVolatileMaxVariableSize ( > > - VOID > > - ) > > -{ > > - if (PcdGet32 (PcdHwErrStorageSize) !=3D 0) { > > - return MAX (MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 > > (PcdMaxAuthVariableSize)), > > - PcdGet32 (PcdMaxHardwareErrorVariableSize)); > > - } else { > > - return MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 > > (PcdMaxAuthVariableSize)); > > - } > > -} > > - > > /** > > Get maximum variable size, covering both non-volatile and volatile > variables. > > > > diff --git > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c > > new file mode 100644 > > index 0000000000..b1b6d8282f > > --- /dev/null > > +++ > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c > > @@ -0,0 +1,28 @@ > > +/** @file > > + Common variable non-volatile store routines. > > + > > +Copyright (c) 2019, Intel Corporation. All rights reserved.
> > +SPDX-License-Identifier: BSD-2-Clause-Patent > > + > > +**/ > > + > > +#include "VariableNonVolatile.h" > > + > > +/** > > + Get non-volatile maximum variable size. > > + > > + @return Non-volatile maximum variable size. > > + > > +**/ > > +UINTN > > +GetNonVolatileMaxVariableSize ( > > + VOID > > + ) > > +{ > > + if (PcdGet32 (PcdHwErrStorageSize) !=3D 0) { > > + return MAX (MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 > > (PcdMaxAuthVariableSize)), > > + PcdGet32 (PcdMaxHardwareErrorVariableSize)); > > + } else { > > + return MAX (PcdGet32 (PcdMaxVariableSize), PcdGet32 > > (PcdMaxAuthVariableSize)); > > + } > > +} > > -- > > 2.16.2.windows.1 >=20