public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael Kubacki" <mikuback@linux.microsoft.com>
To: devel@edk2.groups.io, chasel.chiu@intel.com
Cc: Ashraf Ali S <ashraf.ali.s@intel.com>,
	Isaac Oram <isaac.w.oram@intel.com>,
	Rangasai V Chaganty <rangasai.v.chaganty@intel.com>,
	Ray Ni <ray.ni@intel.com>,
	Michael Kubacki <michael.kubacki@microsoft.com>
Subject: Re: [edk2-devel] [edk2-platforms: PATCH] IntelSiliconPkg/SpiFvbServiceSmm: Support Other NVS variable region.
Date: Thu, 9 Feb 2023 10:39:49 -0500	[thread overview]
Message-ID: <62c9fe71-b3fc-5272-eac3-f39165b0b5fd@linux.microsoft.com> (raw)
In-Reply-To: <20230209051402.1319-1-chasel.chiu@intel.com>

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 <ashraf.ali.s@intel.com>
> Cc: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Michael Kubacki <michael.kubacki@microsoft.com>
> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
> ---
>   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.<BR>
> 
>     # @Prompt Flash Variable Store type.
> 
>     gIntelSiliconPkgTokenSpaceGuid.PcdFlashVariableStoreType|0x00|UINT8|0x0000000E
> 
> +
> 
> +  ## Declares Separate NVS Variable Region Size.<BR><BR>
> 
> +  #  Platform may implement a Regular variable region and an Other variable region, which will require this PCD
> 
> +  #  to tell SpiFvbService to include both regions.<BR>
> 
> +  #  0: No separate Other variable region.<BR>
> 
> +  #  non-zero: The size of a separate Other variable region following the Regular variable region.<BR>
> 
> +  # @Prompt Separate NVS Variable Region Size.
> 
> +  gIntelSiliconPkgTokenSpaceGuid.PcdFlashNvStorageOtherVariableSize|0x00000000|UINT32|0x0000000F
> 

  reply	other threads:[~2023-02-09 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09  5:14 [edk2-platforms: PATCH] IntelSiliconPkg/SpiFvbServiceSmm: Support Other NVS variable region Chiu, Chasel
2023-02-09 15:39 ` Michael Kubacki [this message]
2023-02-09 16:04   ` [edk2-devel] " Isaac Oram
2023-02-09 16:46     ` Michael Kubacki
2023-02-09 17:25       ` Chiu, Chasel
     [not found]       ` <174237FCE67B704B.15261@groups.io>
2023-02-09 18:28         ` Chiu, Chasel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62c9fe71-b3fc-5272-eac3-f39165b0b5fd@linux.microsoft.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox