From nobody Mon Feb 9 07:04:36 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81958+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81958+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1634191778; cv=none; d=zohomail.com; s=zohoarc; b=TqUqQUX0M3BiGlMBCa8Iedqf9tjY4ARuooyai38cbvzfBnJgEBQ/mLPxxU4uhJH/Q2VBqdSxjAztvPxv1OQnYWpCG75HFiEShpFdGRelVFgyUPUzOfckfwDzoazUZAS0SQCuJdGp+rt4H5EQpt0cHO+YVlbQ0HkErt1N6zPmzto= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634191778; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0pStWYwCC/ugNeAT+ngQF6FKFGlYHMgkUdVXeHYuTDQ=; b=iHSGbqZKsMHpFSCh2Kw11HxvFtoaVyAe+bzpSS9UQuxndOuUOEd26VGL+facKRBgk82mOM/9qlNu9KxH78Baw9/LmHdUWSjLpi1lbfA1qOuGdzlF+D2PDlFDgMo2Nr7saYiWpI9KAGqPJmok39y7iYsSaDjEDYVmGJ4adEtFUKY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81958+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634191778598890.9854304166171; Wed, 13 Oct 2021 23:09:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id g3Q5YY1788612xSCzEGXl4Ft; Wed, 13 Oct 2021 23:09:38 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web12.5656.1634191771996632083 for ; Wed, 13 Oct 2021 23:09:37 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10136"; a="227890277" X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="227890277" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 23:09:36 -0700 X-IronPort-AV: E=Sophos;i="5.85,371,1624345200"; d="scan'208";a="524927968" X-Received: from cchiu4-mobl.gar.corp.intel.com ([10.252.188.134]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 23:09:34 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Chasel Chiu , Isaac Oram , Nate DeSimone Subject: [edk2-devel] [edk2-platforms: PATCH v4 9/9] WhitleySiliconPkg: Use same variable name for FspNvsHob. Date: Thu, 14 Oct 2021 14:09:09 +0800 Message-Id: <20211014060909.2040-10-chasel.chiu@intel.com> In-Reply-To: <20211014060909.2040-1-chasel.chiu@intel.com> References: <20211014060909.2040-1-chasel.chiu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,chasel.chiu@intel.com X-Gm-Message-State: 3UqkWXMgcrwufPBSHO0uTijAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634191778; bh=r9ydYdR86cUyoSmNb+bQffRsi6TX9SmU54H71+Hk82o=; h=Cc:Date:From:Reply-To:Subject:To; b=R2R8ouBFliXfUkLoSbmydzQLhCGf/80e+FhnIfKBA7sai5r+j6YFBMxCjEn1BpWF0Q4 IGqTiIJsoH2+qOqpOV+WZmZK87QiAkm8xgUWsVI1xVWQhHSS1l1T5SGfG8S8hNR8jPUUL IYWQ2K13Wpmx5lR9gYW6CS45BVl2zq81hBA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634191779246100033 Content-Type: text/plain; charset="utf-8" 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: Isaac Oram Cc: Nate DeSimone Signed-off-by: Chasel Chiu Reviewed-by: Nate DeSimone --- Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapperPl= atformLib.c | 35 +++++++++-------------------------- Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrapperPl= atformLib.inf | 3 ++- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/= FspWrapperPlatformLib.c b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrappe= rPlatformLib/FspWrapperPlatformLib.c index a6196a78b0..95a1f2a33c 100644 --- a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrap= perPlatformLib.c +++ b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrap= perPlatformLib.c @@ -13,7 +13,7 @@ #include #include #include - +#include #include #include #include @@ -24,39 +24,22 @@ GetFspNvsBuffer ( ) { EFI_STATUS Status; - UINTN FspNvsBufferSize; - VOID *FspNvsBufferPtr; + UINTN FspNvsBufferSize; + VOID *FspNvsBufferPtr; =20 FspNvsBufferPtr =3D NULL; FspNvsBufferSize =3D 0; - Status =3D GetLargeVariable (L"FspNvsBuffer", &gFspNonVolatileStorageHob= Guid, &FspNvsBufferSize, NULL); - if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { - DEBUG ((DEBUG_INFO, "FspNvsBuffer Size =3D %d\n", FspNvsBufferSize)); - FspNvsBufferPtr =3D AllocateZeroPool (FspNvsBufferSize); - if (FspNvsBufferPtr =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "Error: Cannot create FspNvsBuffer, out of memo= ry!\n")); - ASSERT (FALSE); - return NULL; - } - Status =3D GetLargeVariable (L"FspNvsBuffer", &gFspNonVolatileStorageH= obGuid, &FspNvsBufferSize, FspNvsBufferPtr); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Error: Unable to read FspNvsBuffer UEFI variab= le Status: %r\n", Status)); - ASSERT_EFI_ERROR (Status); - return NULL; - } - + Status =3D PeiGetLargeVariable (L"FspNvsBuffer", &gFspNvsBufferVariableG= uid, &FspNvsBufferPtr, &FspNvsBufferSize); + if (Status =3D=3D EFI_SUCCESS) { return FspNvsBufferPtr; - - } else if (Status =3D=3D 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; } =20 + +} + VOID EFIAPI UpdateFspmUpdData ( diff --git a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/= FspWrapperPlatformLib.inf b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrap= perPlatformLib/FspWrapperPlatformLib.inf index 3e80ea670c..6ee15ea55f 100644 --- a/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrap= perPlatformLib.inf +++ b/Silicon/Intel/WhitleySiliconPkg/Library/FspWrapperPlatformLib/FspWrap= perPlatformLib.inf @@ -58,11 +58,12 @@ =20 [Guids] gEfiPlatformInfoGuid - gFspNonVolatileStorageHobGuid + gFspNvsBufferVariableGuid # CONSUMES =20 [LibraryClasses] PeiServicesLib LargeVariableReadLib + PeiLib =20 [Pcd] gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase ## CONSUMES --=20 2.28.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81958): https://edk2.groups.io/g/devel/message/81958 Mute This Topic: https://groups.io/mt/86306591/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-