From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.5209.1633670134884967157 for ; Thu, 07 Oct 2021 22:15:37 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: chasel.chiu@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="249794465" X-IronPort-AV: E=Sophos;i="5.85,356,1624345200"; d="scan'208";a="249794465" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 22:15:37 -0700 X-IronPort-AV: E=Sophos;i="5.85,356,1624345200"; d="scan'208";a="489312748" Received: from cchiu4-mobl.gar.corp.intel.com ([10.252.188.53]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 22:15:36 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Jeremy Soller Subject: [edk2-platforms: PATCH v2 4/9] KabylakeOpenBoardPkg/GalagoPro3: Use same variable name for FspNvsHob. Date: Fri, 8 Oct 2021 13:14:57 +0800 Message-Id: <20211008051502.1243-5-chasel.chiu@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20211008051502.1243-1-chasel.chiu@intel.com> References: <20211008051502.1243-1-chasel.chiu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3678 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 Cc: Jeremy Soller Signed-off-by: Chasel Chiu --- Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSilic= onPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c | 24 ++++++++++------= -------- Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSilic= onPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf | 5 ++--- Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc = | 3 +++ 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c b/Platform/Intel/= KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyUpdateLi= bFsp/PeiFspMiscUpdUpdateLib.c index 9d6c0176f6..2158eb299f 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/Pei= SiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/Pei= SiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c @@ -1,7 +1,7 @@ /** @file=0D Implementation of Fsp Misc UPD Initialization.=0D =0D -Copyright (c) 2019, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2019 - 2021, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -16,7 +16,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D =0D -#include =0D #include =0D #include =0D #include =0D @@ -38,24 +37,21 @@ PeiFspMiscUpdUpdatePreMem ( {=0D EFI_STATUS Status;=0D UINTN VariableSize;=0D - VOID *MemorySavedData;=0D + VOID *FspNvsBufferPtr;=0D UINT8 MorControl;=0D VOID *MorControlPtr;=0D =0D //=0D // Initialize S3 Data variable (S3DataPtr). It may be used for warm and = fast boot paths.=0D //=0D - VariableSize =3D 0;=0D - MemorySavedData =3D NULL;=0D - Status =3D PeiGetVariable (=0D - L"MemoryConfig",=0D - &gFspNonVolatileStorageHobGuid,=0D - &MemorySavedData,=0D - &VariableSize=0D - );=0D - DEBUG ((DEBUG_INFO, "Get L\"MemoryConfig\" gFspNonVolatileStorageHobGuid= - %r\n", Status));=0D - DEBUG ((DEBUG_INFO, "MemoryConfig Size - 0x%x\n", VariableSize));=0D - FspmUpd->FspmArchUpd.NvsBufferPtr =3D MemorySavedData;=0D + FspNvsBufferPtr =3D NULL;=0D + VariableSize =3D 0;=0D + Status =3D PeiGetLargeVariable (L"FspNvsBuffer", &gFspNvsBufferVariableG= uid, &FspNvsBufferPtr, &VariableSize);=0D + if (Status =3D=3D EFI_SUCCESS) {=0D + DEBUG ((DEBUG_INFO, "Get L\"FspNvsBuffer\" gFspNvsBufferVariableGuid -= %r\n", Status));=0D + DEBUG ((DEBUG_INFO, "FspNvsBuffer Size - 0x%x\n", VariableSize));=0D + FspmUpd->FspmArchUpd.NvsBufferPtr =3D FspNvsBufferPtr;=0D + }=0D =0D if (FspmUpd->FspmArchUpd.NvsBufferPtr !=3D NULL) {=0D //=0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Libr= ary/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf b/Platfor= m/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicy= UpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf index 463455c90b..ceefe7639e 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/Pei= SiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/Pei= SiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf @@ -1,7 +1,7 @@ ## @file=0D # FSP wrapper silicon policy update library.=0D #=0D -# Copyright (c) 2019 - 2020 Intel Corporation. All rights reserved.
=0D +# Copyright (c) 2019 - 2021 Intel Corporation. All rights reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -81,7 +81,6 @@ PchInfoLib=0D PchHsioLib=0D PchPcieRpLib=0D - MemoryAllocationLib=0D CpuMailboxLib=0D DebugPrintErrorLevelLib=0D SiPolicyLib=0D @@ -138,7 +137,7 @@ gKabylakeOpenBoardPkgTokenSpaceGuid.PcdGraphicsVbtGuid=0D =0D [Guids]=0D - gFspNonVolatileStorageHobGuid ## CONSUMES=0D + gFspNvsBufferVariableGuid ## CONSUMES=0D gTianoLogoGuid ## CONSUMES=0D gEfiMemoryOverwriteControlDataGuid=0D =0D diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.ds= c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc index 7f276d3512..299c7f18cd 100644 --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc @@ -141,6 +141,9 @@ PlatformHookLib|$(PROJECT)/Library/BasePlatformHookLib/BasePlatformHookL= ib.inf=0D SiliconPolicyUpdateLib|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyUpd= ateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf=0D =0D +[LibraryClasses.Common.SEC]=0D + VariableReadLib|MinPlatformPkg/Library/BaseVariableReadLibNull/BaseVaria= bleReadLibNull.inf=0D +=0D [LibraryClasses.IA32.SEC]=0D #######################################=0D # Edk2 Packages=0D --=20 2.28.0.windows.1