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: "Oram, Isaac W" <isaac.w.oram@intel.com>
Subject: Re: [edk2-platforms: PATCH v3 9/9] WhitleySiliconPkg: Use same variable name for FspNvsHob.
Date: Mon, 11 Oct 2021 21:47:01 +0000	[thread overview]
Message-ID: <MWHPR1101MB2160444385BA62E93ED721FFCDB59@MWHPR1101MB2160.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211008064317.1371-10-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>; Oram, Isaac W
> <isaac.w.oram@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>
> Subject: [edk2-platforms: PATCH v3 9/9] WhitleySiliconPkg: 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: Isaac Oram <isaac.w.oram@intel.com>
> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
> ---
> 
> Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapper
> PlatformLib.c   | 35 +++++++++--------------------------
> 
> Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapper
> PlatformLib.inf |  3 ++-
>  2 files changed, 11 insertions(+), 27 deletions(-)
> 
> diff --git
> a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapp
> erPlatformLib.c
> b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapp
> erPlatformLib.c
> index a6196a78b0..95a1f2a33c 100644
> ---
> a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapp
> erPlatformLib.c
> +++ b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspW
> +++ rapperPlatformLib.c
> @@ -13,7 +13,7 @@
>  #include <Library/HobLib.h> #include <Library/MemoryAllocationLib.h>
> #include <Library/LargeVariableReadLib.h>-+#include <Library/PeiLib.h>
> #include <FspmUpd.h> #include <Guid/PlatformInfo.h> #include
> <Ppi/UpiPolicyPpi.h>@@ -24,39 +24,22 @@ GetFspNvsBuffer (
>  ) {   EFI_STATUS          Status;-  UINTN                     FspNvsBufferSize;-  VOID
> *FspNvsBufferPtr;+  UINTN               FspNvsBufferSize;+  VOID
> *FspNvsBufferPtr;    FspNvsBufferPtr   = NULL;   FspNvsBufferSize  = 0;-
> Status = GetLargeVariable (L"FspNvsBuffer",
> &gFspNonVolatileStorageHobGuid, &FspNvsBufferSize, NULL);-  if (Status ==
> EFI_BUFFER_TOO_SMALL) {-    DEBUG ((DEBUG_INFO, "FspNvsBuffer Size =
> %d\n", FspNvsBufferSize));-    FspNvsBufferPtr = AllocateZeroPool
> (FspNvsBufferSize);-    if (FspNvsBufferPtr == NULL) {-      DEBUG
> ((DEBUG_ERROR, "Error: Cannot create FspNvsBuffer, out of memory!\n"));-
> ASSERT (FALSE);-    return NULL;-  }-    Status = GetLargeVariable
> (L"FspNvsBuffer", &gFspNonVolatileStorageHobGuid, &FspNvsBufferSize,
> FspNvsBufferPtr);-    if (EFI_ERROR (Status)) {-      DEBUG ((DEBUG_ERROR,
> "Error: Unable to read FspNvsBuffer UEFI variable Status: %r\n", Status));-
> ASSERT_EFI_ERROR (Status);-    return NULL;-  }-+  Status =
> PeiGetLargeVariable (L"FspNvsBuffer", &gFspNvsBufferVariableGuid,
> &FspNvsBufferPtr, &FspNvsBufferSize);+  if (Status == EFI_SUCCESS) {
> return FspNvsBufferPtr;--  } else if (Status == EFI_NOT_FOUND) {-    DEBUG
> ((DEBUG_INFO, "Cannot create FSP NVS Buffer, UEFI variable does not exist
> (this is likely a first boot)\n"));   } else {-    DEBUG ((DEBUG_ERROR, "Error:
> Unable to read FspNvsBuffer UEFI variable Status: %r\n", Status));-
> ASSERT_EFI_ERROR (Status);-  }-+    DEBUG ((DEBUG_INFO, "Cannot create
> FSP NVS Buffer, UEFI variable does not exist (this is likely a first boot)\n"));
> return NULL;   } ++}+ VOID EFIAPI UpdateFspmUpdData (diff --git
> a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapp
> erPlatformLib.inf
> b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapp
> erPlatformLib.inf
> index 3e80ea670c..6ee15ea55f 100644
> ---
> a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapp
> erPlatformLib.inf
> +++ b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspW
> +++ rapperPlatformLib.inf
> @@ -58,11 +58,12 @@
>   [Guids]   gEfiPlatformInfoGuid-  gFspNonVolatileStorageHobGuid+
> gFspNvsBufferVariableGuid      # CONSUMES  [LibraryClasses]   PeiServicesLib
> LargeVariableReadLib+  PeiLib  [Pcd]
> gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase         ## CONSUMES--
> 2.28.0.windows.1


  reply	other threads:[~2021-10-11 21:47 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
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 [this message]
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=MWHPR1101MB2160444385BA62E93ED721FFCDB59@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