From nobody Mon Feb 9 00:55:25 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+81666+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+81666+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1633675424; cv=none; d=zohomail.com; s=zohoarc; b=MkOIYker3mKBfk32ojljHmStDX4+pL7JjrcWVOTSuOn9QPwu+9aLsTib2XdH9gwyS3OmkTrdfDziBrKTyToPTkoH1FAhqM8KlupoQplglNYaqQFd3siAakyBuCAZDRRPLFX3ipXPWCCuka+yXE8gIyPo1O9F8lY4zbkr8NJoQoE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633675424; 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=dGUoPiBthzUKb9Lbt/Z1zMm3m07lhwHGNfapkg2Iolw=; b=UswUSzzlMHrxwzUQqsGZwOGxUyBBwhvBXvp2X92pZVBOdUgwW/Ysu7wR7uQmIOJli0PSsQK56DRg7sxDrXgnCAPybzrzJp7Y9xMrNfu1YptjMN22ldYukgJl7fgEVUbcOYBF4ECESS4ZLpdr3MZ2xBg1mtUBw1kk3xn1aG/WPv0= 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+81666+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 1633675424544710.2503866968848; Thu, 7 Oct 2021 23:43:44 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6kq6YY1788612xOLNzzgqDTR; Thu, 07 Oct 2021 23:43:44 -0700 X-Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web10.5603.1633675420050669559 for ; Thu, 07 Oct 2021 23:43:43 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10130"; a="289945240" X-IronPort-AV: E=Sophos;i="5.85,356,1624345200"; d="scan'208";a="289945240" X-Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 23:43:42 -0700 X-IronPort-AV: E=Sophos;i="5.85,356,1624345200"; d="scan'208";a="440544956" X-Received: from cchiu4-mobl.gar.corp.intel.com ([10.252.188.53]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2021 23:43:41 -0700 From: "Chiu, Chasel" To: devel@edk2.groups.io Cc: Chasel Chiu , Isaac Oram , Nate DeSimone Subject: [edk2-devel] [edk2-platforms: PATCH v3 9/9] WhitleySiliconPkg: Use same variable name for FspNvsHob. Date: Fri, 8 Oct 2021 14:43:17 +0800 Message-Id: <20211008064317.1371-10-chasel.chiu@intel.com> In-Reply-To: <20211008064317.1371-1-chasel.chiu@intel.com> References: <20211008064317.1371-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: NCSfS38vnLNVuEKg70rM4y7Hx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1633675424; bh=HfQJvD/vAv4s1YtKclSgq88ouu7k0abAlXTfgjZy2C0=; h=Cc:Date:From:Reply-To:Subject:To; b=lbTXsOBL+WyOgk4wrFsflht+tFioY0yLLBZs7lURj+gpkyFguz6d6rI1VguuNgkoJ6i 4Mg9+2NIaJ1h0RBIPMsWhLfaqt8tGdKfmGgw0dLuvHoCSHM0+r0skqc5frOpJgwsy7dDt FPG8n71nokGmzjzOEDQ56SxC2bvVU0G3tEo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1633675426230100001 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 (#81666): https://edk2.groups.io/g/devel/message/81666 Mute This Topic: https://groups.io/mt/86164713/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-