From: "Kathappan Esakkithevar" <kathappan.esakkithevar@intel.com>
To: "Chiu, Chasel" <chasel.chiu@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
"Esakkithevar, Kathappan" <kathappan.esakkithevar@intel.com>
Cc: "Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
"Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
"Kethi Reddy, Deepika" <deepika.kethi.reddy@intel.com>
Subject: Re: [edk2-platforms: PATCH v3 2/9] CometlakeOpenBoardPkg: Use same variable name for FspNvsHob.
Date: Fri, 8 Oct 2021 13:43:29 +0000 [thread overview]
Message-ID: <DM8PR11MB5655F495DAD73A83B5D551AF9BB29@DM8PR11MB5655.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211008064317.1371-3-chasel.chiu@intel.com>
Reviewed-by: Kathappan Esakkithevar <kathappan.esakkithevar@intel.com>
> -----Original Message-----
> From: Chiu, Chasel <chasel.chiu@intel.com>
> Sent: Friday, October 8, 2021 12:13 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>; Kethi Reddy, Deepika
> <deepika.kethi.reddy@intel.com>; Esakkithevar, Kathappan
> <kathappan.esakkithevar@intel.com>
> Subject: [edk2-platforms: PATCH v3 2/9] CometlakeOpenBoardPkg: 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: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Deepika Kethi Reddy <deepika.kethi.reddy@intel.com>
> Cc: Kathappan Esakkithevar <kathappan.esakkithevar@intel.com>
> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
> ---
>
> Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolic
> yUpdateLibFsp/PeiFspMiscUpdUpdateLib.c | 63 ++++++++++++++--------
> -----------------------------------------
>
> Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg.d
> sc | 3 +++
>
> Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolic
> yUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf | 5 ++---
> 3 files changed, 19 insertions(+), 52 deletions(-)
>
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconP
> olicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> b/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconP
> olicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> index 7dbdfa7c16..9e8606ada9 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconP
> olicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSilicon
> +++ PolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
> @@ -2,7 +2,7 @@
> Implementation of Fsp Misc UPD Initialization.
>
>
>
>
>
> - Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
>
> + Copyright (c) 2020 - 2021, Intel Corporation. All rights
> + reserved.<BR>
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
>
>
>
> @@ -17,7 +17,6 @@
> #include <FspmUpd.h>
>
> #include <FspsUpd.h>
>
>
>
> -#include <Library/MemoryAllocationLib.h>
>
> #include <Library/DebugLib.h>
>
> #include <Library/DebugPrintErrorLevelLib.h>
>
> #include <Library/PciLib.h>
>
> @@ -44,55 +43,21 @@ PeiFspMiscUpdUpdatePreMem (
> )
>
> {
>
> EFI_STATUS Status;
>
> - EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices;
>
> - UINTN VariableSize;
>
> - VOID *MemorySavedData;
>
> -
>
> - Status = PeiServicesLocatePpi (
>
> - &gEfiPeiReadOnlyVariable2PpiGuid,
>
> - 0,
>
> - NULL,
>
> - (VOID **) &VariableServices
>
> - );
>
> - if (EFI_ERROR (Status)) {
>
> - ASSERT_EFI_ERROR (Status);
>
> - return Status;
>
> + UINTN FspNvsBufferSize;
>
> + VOID *FspNvsBufferPtr;
>
> +
>
> + //
>
> + // Initialize S3 Data variable (S3DataPtr). It may be used for warm and fast
> boot paths.
>
> + //
>
> + 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));
>
> + FspmUpd->FspmArchUpd.NvsBufferPtr = FspNvsBufferPtr;
>
> }
>
>
>
> - VariableSize = 0;
>
> - MemorySavedData = NULL;
>
> - Status = VariableServices->GetVariable (
>
> - VariableServices,
>
> - L"MemoryConfig",
>
> - &gFspNonVolatileStorageHobGuid,
>
> - NULL,
>
> - &VariableSize,
>
> - MemorySavedData
>
> - );
>
> - if (Status == EFI_BUFFER_TOO_SMALL) {
>
> - MemorySavedData = AllocatePool (VariableSize);
>
> - if (MemorySavedData == NULL) {
>
> - ASSERT (MemorySavedData != NULL);
>
> - return EFI_OUT_OF_RESOURCES;
>
> - }
>
> -
>
> - DEBUG ((DEBUG_INFO, "VariableSize is 0x%x\n", VariableSize));
>
> - Status = VariableServices->GetVariable (
>
> - VariableServices,
>
> - L"MemoryConfig",
>
> - &gFspNonVolatileStorageHobGuid,
>
> - NULL,
>
> - &VariableSize,
>
> - MemorySavedData
>
> - );
>
> - if (Status == EFI_SUCCESS) {
>
> - FspmUpd->FspmArchUpd.NvsBufferPtr = MemorySavedData;
>
> - } else {
>
> - DEBUG ((DEBUG_ERROR, "Fail to retrieve Variable:\"MemoryConfig\"
> gMemoryConfigVariableGuid, Status = %r\n", Status));
>
> - ASSERT_EFI_ERROR (Status);
>
> - }
>
> - }
>
> - FspmUpd->FspmArchUpd.NvsBufferPtr = MemorySavedData;
>
>
>
> return EFI_SUCCESS;
>
> }
>
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> .dsc
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> .dsc
> index 44a1bd54d6..d63ff263c1 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> .dsc
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/CometlakeURvp/OpenBoardPkg
> .ds
> +++ c
> @@ -142,6 +142,9 @@
> #######################################
>
>
> PlatformHookLib|$(PROJECT)/Library/BasePlatformHookLib/BasePlatformHo
> okLib.inf
>
>
>
> +[LibraryClasses.Common.SEC]
>
> +
> +
> VariableReadLib|MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVar
> + iableReadLibNull.inf
>
> +
>
> [LibraryClasses.IA32.SEC]
>
> #######################################
>
> # Platform Package
>
> diff --git
> a/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconP
> olicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> b/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconP
> olicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> index c842b7eef6..94776603c4 100644
> ---
> a/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSiliconP
> olicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> +++
> b/Platform/Intel/CometlakeOpenBoardPkg/FspWrapper/Library/PeiSilicon
> +++ PolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> @@ -2,7 +2,7 @@
> # Provide FSP wrapper platform related function.
>
> #
>
> #
>
> -# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
>
> +# Copyright (c) 2020 - 2021, Intel Corporation. All rights
> +reserved.<BR>
>
> #
>
> # SPDX-License-Identifier: BSD-2-Clause-Patent
>
> #
>
> @@ -82,7 +82,6 @@
> PchInfoLib
>
> PchHsioLib
>
> PchPcieRpLib
>
> - MemoryAllocationLib
>
> DebugPrintErrorLevelLib
>
> SiPolicyLib
>
> PchGbeLib
>
> @@ -132,7 +131,7 @@
> gCometlakeOpenBoardPkgTokenSpaceGuid.PcdMrcSpdAddressTable3
>
>
>
> [Guids]
>
> - gFspNonVolatileStorageHobGuid ## CONSUMES
>
> + gFspNvsBufferVariableGuid ## CONSUMES
>
> gTianoLogoGuid ## CONSUMES
>
> gEfiMemoryOverwriteControlDataGuid
>
>
>
> --
> 2.28.0.windows.1
next prev parent reply other threads:[~2021-10-08 13:43 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 [this message]
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
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=DM8PR11MB5655F495DAD73A83B5D551AF9BB29@DM8PR11MB5655.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