From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.18754.1675957192327585123 for ; Thu, 09 Feb 2023 07:39:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=LHERlxXa; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id 1722520C8AEB; Thu, 9 Feb 2023 07:39:50 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1722520C8AEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1675957191; bh=XDzMDvo1Mu9LJM6l8v4cFeDk2epM18/YTR5BwnKo5so=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=LHERlxXaEHfNrPAOhwseevcRVCBxfjPJ8x0Ct1cn3DEw9sd2fWOLGbJMjGdB6GzO+ Jt30gFUJBusk0uJ/4mhU53QjRyzjxX0YNZW0YiUw5WU4nsQvvBYhSrEM3OhSJTqPRy nGIHwx9+LDy9zepS1K1/JG6W2xEPV8wdg8k+nKRk= Message-ID: <62c9fe71-b3fc-5272-eac3-f39165b0b5fd@linux.microsoft.com> Date: Thu, 9 Feb 2023 10:39:49 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [edk2-devel] [edk2-platforms: PATCH] IntelSiliconPkg/SpiFvbServiceSmm: Support Other NVS variable region. To: devel@edk2.groups.io, chasel.chiu@intel.com Cc: Ashraf Ali S , Isaac Oram , Rangasai V Chaganty , Ray Ni , Michael Kubacki References: <20230209051402.1319-1-chasel.chiu@intel.com> From: "Michael Kubacki" In-Reply-To: <20230209051402.1319-1-chasel.chiu@intel.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Is there a reason this other content can't go into it's own FV? On 2/9/2023 12:14 AM, Chiu, Chasel wrote: > Platform may implement Other NVS variable region following Regular > variable region and in this case SpiFvbService should include both > region size when calculating the total NVS region size. > > One usage model is EventLog NVS region and there could be others. > > Cc: Ashraf Ali S > Cc: Isaac Oram > Cc: Rangasai V Chaganty > Cc: Ray Ni > Cc: Michael Kubacki > Signed-off-by: Chasel Chiu > --- > Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.c | 7 +++++++ > Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf | 7 ++++--- > Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 8 ++++++++ > 3 files changed, 19 insertions(+), 3 deletions(-) > > diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.c b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.c > index 942abf95a6..bcde98131d 100644 > --- a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.c > +++ b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceCommon.c > @@ -568,6 +568,13 @@ GetVariableFvInfo ( > return; > > } > > > > + // > > + // GetVariableFlashNvStorageInfo () only reports regular variable region information, > > + // if platform implemented a separate Other variable region following the regular variable region, > > + // the size should be included as overall NVS variable region size. > > + // > > + NvStoreLength += PcdGet32 (PcdFlashNvStorageOtherVariableSize); > > + > > Status = GetVariableFlashFtwSpareInfo (&NvBaseAddress, &Length64); > > if (!EFI_ERROR (Status)) { > > // Stay within the current UINT32 size assumptions in the variable stack. > > diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf > index 73049eceb2..f40067418a 100644 > --- a/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf > +++ b/Silicon/Intel/IntelSiliconPkg/Feature/Flash/SpiFvbService/SpiFvbServiceSmm.inf > @@ -43,9 +43,10 @@ > IntelSiliconPkg/IntelSiliconPkg.dec > > > > [Pcd] > > - gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase ## CONSUMES > > - gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize ## CONSUMES > > - gIntelSiliconPkgTokenSpaceGuid.PcdFlashVariableStoreType ## SOMETIMES_CONSUMES > > + gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase ## CONSUMES > > + gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize ## CONSUMES > > + gIntelSiliconPkgTokenSpaceGuid.PcdFlashVariableStoreType ## SOMETIMES_CONSUMES > > + gIntelSiliconPkgTokenSpaceGuid.PcdFlashNvStorageOtherVariableSize ## CONSUMES > > > > [Sources] > > FvbInfo.c > > diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > index 63dae756ad..7034ab93b0 100644 > --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > @@ -194,3 +194,11 @@ > # Other value: reserved for future use.
> > # @Prompt Flash Variable Store type. > > gIntelSiliconPkgTokenSpaceGuid.PcdFlashVariableStoreType|0x00|UINT8|0x0000000E > > + > > + ## Declares Separate NVS Variable Region Size.

> > + # Platform may implement a Regular variable region and an Other variable region, which will require this PCD > > + # to tell SpiFvbService to include both regions.
> > + # 0: No separate Other variable region.
> > + # non-zero: The size of a separate Other variable region following the Regular variable region.
> > + # @Prompt Separate NVS Variable Region Size. > > + gIntelSiliconPkgTokenSpaceGuid.PcdFlashNvStorageOtherVariableSize|0x00000000|UINT32|0x0000000F >