public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Chiu, Chasel" <chasel.chiu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Benjamin Doron <benjamin.doron00@gmail.com>
Subject: Re: [edk2-platforms: PATCH v3 3/9] KabylakeOpenBoardPkg/AspireVn7Dash572G:Use same variable name for FspNvsHob
Date: Mon, 11 Oct 2021 21:46:43 +0000	[thread overview]
Message-ID: <MWHPR1101MB21609AC39CD57780D6F2F0FFCDB59@MWHPR1101MB2160.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211008064317.1371-4-chasel.chiu@intel.com>

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

> -----Original Message-----
> From: Chiu, Chasel <chasel.chiu@intel.com>
> Sent: Thursday, October 7, 2021 11:43 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Benjamin Doron
> <benjamin.doron00@gmail.com>
> Subject: [edk2-platforms: PATCH v3 3/9]
> KabylakeOpenBoardPkg/AspireVn7Dash572G:Use same variable name for
> FspNvsHob
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3678
> 
> To simplify the implementation the variable Name/GUID has been changed
> to "FspNvsBuffer" and gFspNvsBufferVariableGuid regardless it stores the
> data from FSP_NON_VOLATILE_STORAGE_HOB2 or
> FSP_NON_VOLATILE_STORAGE_HOB.
> 
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Cc: Benjamin Doron <benjamin.doron00@gmail.com>
> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
> ---
> 
> Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Li
> brary/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c         | 24
> ++++++++++--------------
> 
> Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/
> PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c             | 23 +++++++++-
> -------------
> 
> Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/Li
> brary/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf |  7
> ++++---
> 
> Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Library/
> PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf           |  2 +-
>  4 files changed, 24 insertions(+), 32 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/
> Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper
> /Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> index d8413d284e..a9b7e446c8 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/
> Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper
> /L
> +++ ibrary/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> @@ -1,7 +1,7 @@
>  /** @file   Implementation of Fsp Misc UPD Initialization. -Copyright (c) 2017,
> Intel Corporation. All rights reserved.<BR>+Copyright (c) 2017 - 2021, Intel
> Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-
> Patent  **/@@ -11,7 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-
> Patent
>  #include <Library/DebugLib.h> #include <Library/PciLib.h> #include
> <Library/PeiLib.h>- #include <FspEas.h> #include <FspmUpd.h> #include
> <FspsUpd.h>@@ -34,24 +33,21 @@ PeiFspMiscUpdUpdatePreMem (
>  {   EFI_STATUS                        Status;   UINTN                             VariableSize;-  VOID
> *MemorySavedData;+  VOID                              *FspNvsBufferPtr;   UINT8
> MorControl;   VOID                              *MorControlPtr;    //   // Initialize S3 Data
> variable (S3DataPtr). It may be used for warm and fast boot paths.   //-
> VariableSize = 0;-  MemorySavedData = NULL;-  Status = PeiGetVariable (-
> L"MemoryConfig",-             &gFspNonVolatileStorageHobGuid,-
> &MemorySavedData,-             &VariableSize-             );-  DEBUG ((DEBUG_INFO,
> "Get L\"MemoryConfig\" gFspNonVolatileStorageHobGuid - %r\n", Status));-
> DEBUG ((DEBUG_INFO, "MemoryConfig Size - 0x%x\n", VariableSize));-
> FspmUpd->FspmArchUpd.NvsBufferPtr = MemorySavedData;+
> FspNvsBufferPtr   = NULL;+  VariableSize  = 0;+  Status = PeiGetLargeVariable
> (L"FspNvsBuffer", &gFspNvsBufferVariableGuid, &FspNvsBufferPtr,
> &VariableSize);+  if (Status == EFI_SUCCESS) {+    DEBUG ((DEBUG_INFO,
> "Get L\"FspNvsBuffer\" gFspNvsBufferVariableGuid - %r\n", Status));+
> DEBUG ((DEBUG_INFO, "FspNvsBuffer Size - 0x%x\n", VariableSize));+
> FspmUpd->FspmArchUpd.NvsBufferPtr = FspNvsBufferPtr;+  }    if
> (FspmUpd->FspmArchUpd.NvsBufferPtr != NULL) {     //diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Librar
> y/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Librar
> y/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c
> index c9dfb17e0a..3764f7c3ac 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Librar
> y/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Libra
> +++ ry/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c
> @@ -431,8 +431,8 @@ SiliconPolicyUpdatePreMem (
>    SA_MISC_PEI_PREMEM_CONFIG     *MiscPeiPreMemConfig;
> MEMORY_CONFIG_NO_CRC          *MemConfigNoCrc;   VOID
> *Buffer;-  UINTN                         VariableSize;-  VOID
> *MemorySavedData;+  UINTN                         FspNvsBufferSize;+  VOID
> *FspNvsBufferPtr;   UINT8                         SpdAddressTable[4];
> DEBUG((DEBUG_INFO, "\nUpdating Policy in Pre-Mem\n"));@@ -463,18
> +463,13 @@ SiliconPolicyUpdatePreMem (
>        // Note: AmberLake FSP does not implement the
> FSPM_ARCH_CONFIG_PPI added in FSP 2.1, hence       // the platform specific
> S3DataPtr must be used instead.       //-      VariableSize = 0;-
> MemorySavedData = NULL;-      Status = PeiGetVariable (-
> L"MemoryConfig",-                &gFspNonVolatileStorageHobGuid,-
> &MemorySavedData,-                &VariableSize-                );-      DEBUG
> ((DEBUG_INFO, "Get L\"MemoryConfig\" gFspNonVolatileStorageHobGuid -
> %r\n", Status));-      DEBUG ((DEBUG_INFO, "MemoryConfig Size - 0x%x\n",
> VariableSize));-      if (!EFI_ERROR (Status)) {-        MiscPeiPreMemConfig-
> >S3DataPtr = MemorySavedData;+      FspNvsBufferPtr   = NULL;+
> FspNvsBufferSize  = 0;+      Status = PeiGetLargeVariable (L"FspNvsBuffer",
> &gFspNvsBufferVariableGuid, &FspNvsBufferPtr, &FspNvsBufferSize);+      if
> (Status == EFI_SUCCESS) {+        DEBUG ((DEBUG_INFO, "Get
> L\"FspNvsBuffer\" gFspNvsBufferVariableGuid - %r\n", Status));+        DEBUG
> ((DEBUG_INFO, "FspNvsBuffer Size - 0x%x\n", FspNvsBufferSize));+
> MiscPeiPreMemConfig->S3DataPtr = FspNvsBufferPtr;       }        //diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/
> Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper
> /Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> index e4a657c5f1..eac9344b0a 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper/
> Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/FspWrapper
> /L
> +++ ibrary/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> @@ -1,7 +1,7 @@
>  ## @file #  Provide FSP wrapper platform related function. #-# Copyright (c)
> 2017 - 2020 Intel Corporation. All rights reserved.<BR>+# Copyright (c) 2017 -
> 2021 Intel Corporation. All rights reserved.<BR> # # SPDX-License-Identifier:
> BSD-2-Clause-Patent #@@ -74,7 +74,6 @@
>    PchInfoLib   PchHsioLib   PchPcieRpLib-  MemoryAllocationLib   SiPolicyLib
> PeiLib @@ -134,9 +133,11 @@
>    gKabylakeOpenBoardPkgTokenSpaceGuid.PcdAudioConnector
> gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGraphicsVbtGuid+
> gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress+
> gKabylakeOpenBoardPkgTokenSpaceGuid.PcdRootPort4ClkInfo  [Guids]-
> gFspNonVolatileStorageHobGuid                 ## CONSUMES+
> gFspNvsBufferVariableGuid                     ## CONSUMES   gTianoLogoGuid
> ## CONSUMES   gEfiMemoryOverwriteControlDataGuid diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Librar
> y/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Librar
> y/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
> index 0a8cf91b07..4dcc000186 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Librar
> y/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/AspireVn7Dash572G/Policy/Libra
> +++ ry/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
> @@ -52,7 +52,7 @@
>    gHsioPciePreMemConfigGuid                     ## CONSUMES
> gHsioSataPreMemConfigGuid                     ## CONSUMES
> gSaMiscPeiPreMemConfigGuid                    ## CONSUMES-
> gFspNonVolatileStorageHobGuid                 ## CONSUMES+
> gFspNvsBufferVariableGuid                     ## CONSUMES   gIoApicConfigGuid
> ## CONSUMES   gHpetPreMemConfigGuid                         ## CONSUMES
> gLockDownConfigGuid--
> 2.28.0.windows.1


  reply	other threads:[~2021-10-11 21:46 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  6:43 [edk2-platforms: PATCH v3 0/9] MinPlatformPkg: Support FSP 2.3 FSP_NON_VOLATILE_STORAGE_HOB2 Chiu, Chasel
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 1/9] " Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 2/9] CometlakeOpenBoardPkg: Use same variable name for FspNvsHob Chiu, Chasel
2021-10-08 13:43   ` Kathappan Esakkithevar
2021-10-11 21:46   ` Nate DeSimone
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 3/9] KabylakeOpenBoardPkg/AspireVn7Dash572G:Use " Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone [this message]
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 4/9] KabylakeOpenBoardPkg/GalagoPro3: Use " Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 5/9] KabylakeOpenBoardPkg/KabylakeRvp3: " Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 6/9] TigerlakeOpenBoardPkg: " Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone
2021-10-12  1:33   ` Heng Luo
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 7/9] WhiskeylakeOpenBoardPkg: " Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 8/9] WhitleyOpenBoardPkg: Support FSP 2.3 FSP_NON_VOLATILE_STORAGE_HOB2 Chiu, Chasel
2021-10-11 21:46   ` Nate DeSimone
2021-10-08  6:43 ` [edk2-platforms: PATCH v3 9/9] WhitleySiliconPkg: Use same variable name for FspNvsHob Chiu, Chasel
2021-10-11 21:47   ` Nate DeSimone
2021-10-08 13:44 ` [edk2-platforms: PATCH v3 0/9] MinPlatformPkg: Support FSP 2.3 FSP_NON_VOLATILE_STORAGE_HOB2 Kathappan Esakkithevar
2021-10-11 21:46 ` Nate DeSimone
2021-10-12  1:43 ` Oram, Isaac W
2021-10-14  6:11 ` 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=MWHPR1101MB21609AC39CD57780D6F2F0FFCDB59@MWHPR1101MB2160.namprd11.prod.outlook.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