From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A8FAB211B63E5 for ; Mon, 14 Jan 2019 21:05:28 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 21:05:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,480,1539673200"; d="scan'208";a="311875897" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 14 Jan 2019 21:05:28 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 21:05:27 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 21:05:27 -0800 Received: from shsmsx107.ccr.corp.intel.com ([169.254.9.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.160]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 13:05:24 +0800 From: "Wang, Jian J" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" Thread-Topic: [PATCH V2 05/15] MdeModulePkg: Add PcdEmuVariableNvModeEnable in dec Thread-Index: AQHUrBypSsPb35ruvkaH0dRDh/uERaWvwzDw Date: Tue, 15 Jan 2019 05:05:23 +0000 Message-ID: References: <1547479196-40248-1-git-send-email-star.zeng@intel.com> <1547479196-40248-6-git-send-email-star.zeng@intel.com> In-Reply-To: <1547479196-40248-6-git-send-email-star.zeng@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmU4YWI0YjItOWJmYS00NTY2LTljYmUtNmYwNDdjMjNiNmYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidm1VVDFpYUxVYlM3ME5VS0JqVlhVSFJPT1VFMmNQZlc1NERqMmZLcFB5UVVJNmhObmtPYnR6bjZjRldzamp1OCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH V2 05/15] MdeModulePkg: Add PcdEmuVariableNvModeEnable in dec X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 05:05:28 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Star, > -----Original Message----- > From: Zeng, Star > Sent: Monday, January 14, 2019 11:20 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Wang, Jian J ; > Wu, Hao A > Subject: [PATCH V2 05/15] MdeModulePkg: Add PcdEmuVariableNvModeEnable > in dec >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1323 > Merge EmuVariable and Real variable driver. >=20 > Add PcdEmuVariableNvModeEnable (support both static and > dynamic) to indicate if Variable driver will enable > emulated variable NV mode. >=20 > This patch prepares for adding emulated variable NV mode > support in VariableRuntimeDxe. >=20 > Cc: Jian J Wang > Cc: Hao Wu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > Reviewed-by: Laszlo Ersek > --- > MdeModulePkg/MdeModulePkg.dec | 10 ++++++++-- > MdeModulePkg/MdeModulePkg.uni | 10 ++++++++-- > 2 files changed, 16 insertions(+), 4 deletions(-) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec > b/MdeModulePkg/MdeModulePkg.dec > index 217ede1f7163..8fbc0af61365 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -3,7 +3,7 @@ > # It also provides the definitions(including PPIs/PROTOCOLs/GUIDs and li= brary > classes) > # and libraries instances, which are used for those modules. > # > -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
> # Copyright (c) 2016, Linaro Ltd. All rights reserved.
> # (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> # Copyright (c) 2017, AMD Incorporated. All rights reserved.
> @@ -1586,7 +1586,13 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, > PcdsDynamic, PcdsDynamicEx] > # @Prompt 64-bit Base address of flash FTW working block range. >=20 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0x0 > |UINT64|0x80000010 >=20 > - ## This PCD defines a reserved memory range for the EMU Variable drive= r's NV > Variable Store. > + ## Indicates if Variable driver will enable emulated variable NV > mode.

> + # TRUE - An EMU variable NV storage will be allocated or reserved f= or NV > variables.
> + # FALSE - No EMU variable NV storage will be allocated or reserved f= or NV > variables.
> + # @Prompt EMU variable NV mode enable. > + > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|FALSE|BO > OLEAN|0x01100001 > + > + ## This PCD defines a reserved memory range for EMU variable NV storag= e. > # The range is valid if non-zero. The memory range size must be > PcdVariableStoreSize. > # @Prompt Reserved memory range for EMU variable NV storage. >=20 The description is a little bit confuse to me. The value of this PCD is act= ually the base address of reserved memory range, but not the range (size). A complete memory range includes both base address and its size. But this PCD contains only base address information. Maybe something like below would be better (just for example): ---------------------- This PCD defines the base address of reserved memory range for EMU variable NV storage. A non-ZERO value indicates a valid range reserved with size giv= en by PcdVariableStoreSize. @Prompt Base of reserved memory range for EMU variable NV storage. ---------------------- If you agree, please update the uni help string below as well. > gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0|UINT6 > 4|0x40000008 > diff --git a/MdeModulePkg/MdeModulePkg.uni > b/MdeModulePkg/MdeModulePkg.uni > index 35af744d89be..9c413a98f65d 100644 > --- a/MdeModulePkg/MdeModulePkg.uni > +++ b/MdeModulePkg/MdeModulePkg.uni > @@ -4,7 +4,7 @@ > // It also provides the definitions(including PPIs/PROTOCOLs/GUIDs and l= ibrary > classes) > // and libraries instances, which are used for those modules. > // > -// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > +// Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved. > // > // This program and the accompanying materials are licensed and made > available under > // the terms and conditions of the BSD License that accompanies this > distribution. > @@ -389,9 +389,15 @@ >=20 > #string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdFlashNvStorageFtwWorkingBase6 > 4_HELP #language en-US "64-bit Base address of the FTW working block ran= ge > in flash device. If PcdFlashNvStorageFtwWorkingSize is larger than one bl= ock > size, this value should be block size aligned." >=20 > +#string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEmuVariableNvModeEnable_PRO > MPT #language en-US "EMU variable NV mode enable" > + > +#string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEmuVariableNvModeEnable_HELP > #language en-US "Indicates if Variable driver will enable emulated variab= le NV > mode.

" > + = "TRUE - An EMU variable NV > storage will be allocated or reserved for NV variables.
" > + = "FALSE - No EMU variable NV > storage will be allocated or reserved for NV variables.
" > + > #string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEmuVariableNvStoreReserved_PR > OMPT #language en-US "Reserved memory range for EMU variable NV storage" >=20 > -#string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEmuVariableNvStoreReserved_HE > LP #language en-US "This PCD defines a reserved memory range for the EMU > Variable driver's NV Variable Store. The range is valid if non-zero. The = memory > range size must be PcdVariableStoreSize." > +#string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdEmuVariableNvStoreReserved_HE > LP #language en-US "This PCD defines a reserved memory range for EMU > variable NV storage. The range is valid if non-zero. The memory range siz= e must > be PcdVariableStoreSize." >=20 > #string > STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHelloWorldPrintTimes_PROMPT > #language en-US "HelloWorld print times" >=20 > -- > 2.7.0.windows.1