From nobody Fri May 17 03:39:43 2024 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+88462+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+88462+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1649262436; cv=none; d=zohomail.com; s=zohoarc; b=GjVkhpLvU59uCxA8PQQfg5Hj5rNLvZwq1XiMuzgLIgnY4xfpclzHfV9+Kj8R8ZmrVewOhHuT4pY1UyjAmOZoW+5hLDlXCJ3lfgDDJalHm4KbdvM3oP48bHH53bhYVbN/6EHpOzVCq8ReN33jefhC9jAgHoFW4Qev4sscZO2cUSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649262436; 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=YOhMoOvuj11Bh/GAfONJ7TN0ESbH7q6h5VAbtnCcqwc=; b=Rnnu26eCc0hEqo13JViWRn4rbIu3lgMZgU1zAhenxoE+/qyFXDt83duyVd6b5TXhxOly4bRGcn7zNHPwpxDSSgsUnGE6Tj+znbTPbqUdAlTkiv53zb6EkQZxkdmO87b10ikfpJaHCamNFmmc6gzxr8rpONa5Pxuom2ZF0IS0v8M= 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+88462+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 1649262436064966.3809365799445; Wed, 6 Apr 2022 09:27:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KBqTYY1788612xTw6SLknTS9; Wed, 06 Apr 2022 09:27:15 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web12.10985.1649262434949161637 for ; Wed, 06 Apr 2022 09:27:15 -0700 X-Received: from localhost.localdomain (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id 97C5420DFD99; Wed, 6 Apr 2022 09:27:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 97C5420DFD99 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Liming Gao Subject: [edk2-devel] [PATCH v1 1/3] MdeModulePkg: Add Variable Flash Info HOB Date: Wed, 6 Apr 2022 12:26:46 -0400 Message-Id: <20220406162648.234-2-mikuback@linux.microsoft.com> In-Reply-To: <20220406162648.234-1-mikuback@linux.microsoft.com> References: <20220406162648.234-1-mikuback@linux.microsoft.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,mikuback@linux.microsoft.com X-Gm-Message-State: iRLPfgzR0uISpuCrtNKfva2wx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649262435; bh=0HL3bNdulc0dv+mZXdQEjigUcfzJH7vQSU2mXVIOiSg=; h=Cc:Date:From:Reply-To:Subject:To; b=tJh/8gpcDNzU2PsXile9uqOaGcehRX2D4Pq8Q8rkExsagrIA+j4xDmcyai8Td5Zjuno 5prz7nbfFyn3dooMobaESoIlOX1sfVcLD7C0OM6f3RS3BM25gZMUrJW2/WArtDYo1sVH4 I42r/mAQQPgk/Z8xAEMdw0RjLa3FwqkFuKU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649262436539100001 Content-Type: text/plain; charset="utf-8" From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3479 Adds a new GUID that is used to identify a HOB that passes variable flash information to UEFI variable drivers in HOB consumption phases such as DXE, Traditional MM, and Standalone MM. This information was previously passed directly with PCDs such as EfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase and gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize. However, the Standalone MM variable driver instance does not have direct access to the PCD database. Therefore, this HOB will first be considered as the source for variable flash information and if platforms do not produce the HOB, reading the information from the PCDs directly will be a backup to provide backward compatibility. Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Signed-off-by: Michael Kubacki --- MdeModulePkg/Include/Guid/VariableFlashInfo.h | 36 ++++++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 4 +++ 2 files changed, 40 insertions(+) diff --git a/MdeModulePkg/Include/Guid/VariableFlashInfo.h b/MdeModulePkg/I= nclude/Guid/VariableFlashInfo.h new file mode 100644 index 000000000000..07aaa69fb748 --- /dev/null +++ b/MdeModulePkg/Include/Guid/VariableFlashInfo.h @@ -0,0 +1,36 @@ +/** @file + This file defines the GUID and data structure used to pass information a= bout + a variable store mapped on flash (i.e. a MMIO firmware volume) to the DX= E and MM environment. + + Copyright (c) Microsoft Corporation.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef VARIABLE_FLASH_INFO_H_ +#define VARIABLE_FLASH_INFO_H_ + +#define VARIABLE_FLASH_INFO_HOB_GUID \ + { 0x5d11c653, 0x8154, 0x4ac3, { 0xa8, 0xc2, 0xfb, 0xa2, 0x89, 0x20, 0xfc= , 0x90 }} + +extern EFI_GUID gVariableFlashInfoHobGuid; + +#pragma pack (push, 1) + +/// +/// This structure can be used to describe UEFI variable +/// flash information. +/// +typedef struct { + EFI_PHYSICAL_ADDRESS NvStorageBaseAddress; + UINT64 NvStorageLength; + EFI_PHYSICAL_ADDRESS FtwSpareBaseAddress; + UINT64 FtwSpareLength; + EFI_PHYSICAL_ADDRESS FtwWorkingBaseAddress; + UINT64 FtwWorkingLength; +} VARIABLE_FLASH_INFO; + +#pragma pack (pop) + +#endif diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index cf79292ec877..4e82f5836096 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -226,6 +226,10 @@ [Guids] # Include/Guid/SmmVariableCommon.h gSmmVariableWriteGuid =3D { 0x93ba1826, 0xdffb, 0x45dd, { 0x82, 0xa7, 0= xe7, 0xdc, 0xaa, 0x3b, 0xbd, 0xf3 }} =20 + ## Guid of the variable flash information HOB. + # Include/Guid/VariableFlashInfo.h + gVariableFlashInfoHobGuid =3D { 0x5d11c653, 0x8154, 0x4ac3, { 0xa8, 0xc2= , 0xfb, 0xa2, 0x89, 0x20, 0xfc, 0x90 }} + ## Performance protocol guid that also acts as the performance HOB guid = and performance variable GUID # Include/Guid/Performance.h gPerformanceProtocolGuid =3D { 0x76B6BDFA, 0x2ACD, 0x4462, { 0x9E,= 0x3F, 0xCB, 0x58, 0xC9, 0x69, 0xD9, 0x37 } } --=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 (#88462): https://edk2.groups.io/g/devel/message/88462 Mute This Topic: https://groups.io/mt/90293663/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- From nobody Fri May 17 03:39:43 2024 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+88463+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+88463+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1649262440; cv=none; d=zohomail.com; s=zohoarc; b=HU+w44nkldSlkPagCi2N6fqUG2kNjmVi8D5vA5JgLvDicqrYHafpYW2j0jGFB09G0E0KFe3xfAs8ipJIsOT+yzlSYB0/3Zlrf+3afLYdU8hm6yVhOlssW5UZ7ve7SEfPHItwVKLXiC3GdPn1P/OMYQgqZXyKQvUR97FRD/lHBOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649262440; 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=/eWqtobUDLlEnFo5ZwP0ITU2zcE9eJSOwNFx3eIty5U=; b=lnh3U0U4kfP+0PLBenvrmWfWaBcUMQKs0sMxo68PdeYLr9qidsmyocKkOMethgdIVZ8mSHjEpeDL69JhVbr93jNNU6+Vws0mqXquhWEDDFyxtWyBSIciE99/UcwO805HxnNW+xSeKUAD5+lDgKEBCz5JGVCTzYmfKqKaPiKePY4= 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+88463+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 1649262440856749.9226190746976; Wed, 6 Apr 2022 09:27:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LTedYY1788612xI2CSOH2DFK; Wed, 06 Apr 2022 09:27:20 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web09.10909.1649262439741694009 for ; Wed, 06 Apr 2022 09:27:19 -0700 X-Received: from localhost.localdomain (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id 8B7CD20DFD93; Wed, 6 Apr 2022 09:27:18 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8B7CD20DFD93 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Liming Gao Subject: [edk2-devel] [PATCH v1 2/3] MdeModulePkg/Variable: Consume Variable Info HOB Date: Wed, 6 Apr 2022 12:26:47 -0400 Message-Id: <20220406162648.234-3-mikuback@linux.microsoft.com> In-Reply-To: <20220406162648.234-1-mikuback@linux.microsoft.com> References: <20220406162648.234-1-mikuback@linux.microsoft.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,mikuback@linux.microsoft.com X-Gm-Message-State: fU7j3ppoAjnd2MB076WSFU1Px1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649262440; bh=Qm91tmwF5SDHnaqDhxl017++wSC2wDztggAAhkGtcIU=; h=Cc:Date:From:Reply-To:Subject:To; b=V+gZAUPTNG6R3mmN6s0BQBGXMhTUx7JcODB1u5wKR033yAEMy9ISKPwQTZhVNoP08zW LpSOSBShKnN0QDnNsXUia+1v+wCY6BbTlmwefwpjbDRf45Mgb6rjrKJmQPA9osxKTvZVe scfL/lGTxpASsU7VIADBn5kQ1TefpDYOcJ4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649262442630100003 Content-Type: text/plain; charset="utf-8" From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3479 Updates VariableRuntimeDxe, VariableSmm, and VariableStandaloneMm to acquire variable flash information from the Variable Flash Information HOB. If the HOB is not present, the drivers will continue to directly read flash information from PCDs. Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Signed-off-by: Michael Kubacki --- MdeModulePkg/Universal/Variable/Pei/Variable.c | 66 += +++++++++++++++++-- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c | 42 += ++++++++++++ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c | 25 += +++++-- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c | 20 += +++-- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c | 20 += ++++- MdeModulePkg/Universal/Variable/Pei/Variable.h | 2 + MdeModulePkg/Universal/Variable/Pei/VariablePei.inf | 6 +- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h | 17 += ++++ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf | 6 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf | 6 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 6 +- 11 files changed, 194 insertions(+), 22 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/= Universal/Variable/Pei/Variable.c index b36dd0de67b2..b19a26965ef2 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -553,6 +553,48 @@ GetHobVariableStore ( } } =20 +/** + Get the HOB that contains variable flash information. + + @param[out] VariableFlashInfo Pointer to a pointer to set to the varia= ble flash information structure. + + @retval EFI_SUCCESS Variable flash information was found suc= cessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is N= ULL. + @retval EFI_NOT_FOUND Variable flash information could not be = found. + +**/ +EFI_STATUS +GetVariableFlashInfo ( + OUT VARIABLE_FLASH_INFO **VariableFlashInfo + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + + if (VariableFlashInfo =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + GuidHob =3D GetFirstGuidHob (&gVariableFlashInfoHobGuid); + if (GuidHob =3D=3D NULL) { + return EFI_NOT_FOUND; + } + + *VariableFlashInfo =3D GET_GUID_HOB_DATA (GuidHob); + + // + // Assert if more than one variable flash information HOB is present. + // + DEBUG_CODE ( + if ((GetNextGuidHob (&gVariableFlashInfoHobGuid, GET_NEXT_HOB (GuidHob= )) !=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: Found two variable flash information HOBs= \n")); + ASSERT (FALSE); + } + + ); + + return EFI_SUCCESS; +} + /** Return the variable store header and the store info based on the Index. =20 @@ -567,8 +609,10 @@ GetVariableStore ( OUT VARIABLE_STORE_INFO *StoreInfo ) { + EFI_STATUS Status; EFI_HOB_GUID_TYPE *GuidHob; EFI_FIRMWARE_VOLUME_HEADER *FvHeader; + VARIABLE_FLASH_INFO *VariableFlashInfo; VARIABLE_STORE_HEADER *VariableStoreHeader; EFI_PHYSICAL_ADDRESS NvStorageBase; UINT32 NvStorageSize; @@ -591,11 +635,23 @@ GetVariableStore ( // Emulated non-volatile variable mode is not enabled. // =20 - NvStorageSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); - NvStorageBase =3D (EFI_PHYSICAL_ADDRESS)(PcdGet64 (PcdFlashNvStora= geVariableBase64) !=3D 0 ? - PcdGet64 (PcdFlashNvStorage= VariableBase64) : - PcdGet32 (PcdFlashNvStorage= VariableBase) - ); + Status =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (Status)) { + NvStorageBase =3D VariableFlashInfo->NvStorageBaseAddress; + Status =3D SafeUint64ToUint32 (VariableFlashInfo->NvStora= geLength, &NvStorageSize); + // This driver currently assumes the size will be UINT32 so only= accept + // that for now. + ASSERT_EFI_ERROR (Status); + } + + if (EFI_ERROR (Status)) { + NvStorageSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + NvStorageBase =3D (EFI_PHYSICAL_ADDRESS)(PcdGet64 (PcdFlashNvSto= rageVariableBase64) !=3D 0 ? + PcdGet64 (PcdFlashNvStora= geVariableBase64) : + PcdGet32 (PcdFlashNvStora= geVariableBase) + ); + } + ASSERT (NvStorageBase !=3D 0); =20 // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeMod= ulePkg/Universal/Variable/RuntimeDxe/Variable.c index 6c1a3440ac8c..6ab4efd62a7e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -3701,6 +3701,48 @@ GetHobVariableStore ( return EFI_SUCCESS; } =20 +/** + Get the HOB that contains variable flash information. + + @param[out] VariableFlashInfo Pointer to a pointer to set to the varia= ble flash information structure. + + @retval EFI_SUCCESS Variable flash information was found suc= cessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is N= ULL. + @retval EFI_NOT_FOUND Variable flash information could not be = found. + +**/ +EFI_STATUS +GetVariableFlashInfo ( + OUT VARIABLE_FLASH_INFO **VariableFlashInfo + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + + if (VariableFlashInfo =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + GuidHob =3D GetFirstGuidHob (&gVariableFlashInfoHobGuid); + if (GuidHob =3D=3D NULL) { + return EFI_NOT_FOUND; + } + + *VariableFlashInfo =3D GET_GUID_HOB_DATA (GuidHob); + + // + // Assert if more than one variable flash information HOB is present. + // + DEBUG_CODE ( + if ((GetNextGuidHob (&gVariableFlashInfoHobGuid, GET_NEXT_HOB (GuidHob= )) !=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: Found two variable flash information HOBs= \n")); + ASSERT (FALSE); + } + + ); + + return EFI_SUCCESS; +} + /** Initializes variable store area for non-volatile and volatile variable. =20 diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c b/Mde= ModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c index 03fec3048dc4..1dc121d78e35 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c @@ -416,6 +416,7 @@ FtwNotificationEvent ( EFI_STATUS Status; EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbProtocol; EFI_FAULT_TOLERANT_WRITE_PROTOCOL *FtwProtocol; + VARIABLE_FLASH_INFO *VariableFlashInfo; EFI_PHYSICAL_ADDRESS NvStorageVariableBase; EFI_GCD_MEMORY_SPACE_DESCRIPTOR GcdDescriptor; EFI_PHYSICAL_ADDRESS BaseAddress; @@ -423,6 +424,7 @@ FtwNotificationEvent ( EFI_PHYSICAL_ADDRESS VariableStoreBase; UINT64 VariableStoreLength; UINTN FtwMaxBlockSize; + UINT32 NvStorageVariableSize; =20 // // Ensure FTW protocol is installed. @@ -432,14 +434,29 @@ FtwNotificationEvent ( return; } =20 + Status =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (Status)) { + NvStorageVariableBase =3D VariableFlashInfo->NvStorageBaseAddress; + Status =3D SafeUint64ToUint32 (VariableFlashInfo->NvSto= rageLength, &NvStorageVariableSize); + // This driver currently assumes the size will be UINT32 so only accept + // that for now. + ASSERT_EFI_ERROR (Status); + } + + if (EFI_ERROR (Status)) { + NvStorageVariableBase =3D NV_STORAGE_VARIABLE_BASE; + NvStorageVariableSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + } + + ASSERT (NvStorageVariableBase !=3D 0); + + VariableStoreBase =3D NvStorageVariableBase + mNvFvHeaderCache->HeaderLe= ngth; + Status =3D FtwProtocol->GetMaxBlockSize (FtwProtocol, &FtwMaxBlockSize); if (!EFI_ERROR (Status)) { - ASSERT (PcdGet32 (PcdFlashNvStorageVariableSize) <=3D FtwMaxBlockSize); + ASSERT (NvStorageVariableSize <=3D FtwMaxBlockSize); } =20 - NvStorageVariableBase =3D NV_STORAGE_VARIABLE_BASE; - VariableStoreBase =3D NvStorageVariableBase + mNvFvHeaderCache->Head= erLength; - // // Let NonVolatileVariableBase point to flash variable store base direct= ly after FTW ready. // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile= .c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c index 5e9d40b67ac2..e424c210248a 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c @@ -137,6 +137,7 @@ InitRealNonVolatileVariableStore ( { EFI_FIRMWARE_VOLUME_HEADER *FvHeader; VARIABLE_STORE_HEADER *VariableStore; + VARIABLE_FLASH_INFO *VariableFlashInfo; UINT32 VariableStoreLength; EFI_HOB_GUID_TYPE *GuidHob; EFI_PHYSICAL_ADDRESS NvStorageBase; @@ -153,19 +154,30 @@ InitRealNonVolatileVariableStore ( =20 mVariableModuleGlobal->FvbInstance =3D NULL; =20 + Status =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (Status)) { + NvStorageBase =3D VariableFlashInfo->NvStorageBaseAddress; + Status =3D SafeUint64ToUint32 (VariableFlashInfo->NvStorageLeng= th, &NvStorageSize); + // This driver currently assumes the size will be UINT32 so only accep= t that for now. + ASSERT_EFI_ERROR (Status); + } + + if (EFI_ERROR (Status)) { + NvStorageBase =3D NV_STORAGE_VARIABLE_BASE; + NvStorageSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + } + + ASSERT (NvStorageBase !=3D 0); + // // Allocate runtime memory used for a memory copy of the FLASH region. // Keep the memory and the FLASH in sync as updates occur. // - NvStorageSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); NvStorageData =3D AllocateRuntimeZeroPool (NvStorageSize); if (NvStorageData =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } =20 - NvStorageBase =3D NV_STORAGE_VARIABLE_BASE; - ASSERT (NvStorageBase !=3D 0); - // // Copy NV storage data to the memory buffer. // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c b/Mde= ModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c index 517cae7b00f8..c8667dd6ca34 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c @@ -1082,8 +1082,10 @@ SmmFtwNotificationEvent ( EFI_PHYSICAL_ADDRESS VariableStoreBase; EFI_SMM_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbProtocol; EFI_SMM_FAULT_TOLERANT_WRITE_PROTOCOL *FtwProtocol; + VARIABLE_FLASH_INFO *VariableFlashInfo; EFI_PHYSICAL_ADDRESS NvStorageVariableBase; UINTN FtwMaxBlockSize; + UINT32 NvStorageVariableSize; =20 if (mVariableModuleGlobal->FvbInstance !=3D NULL) { return EFI_SUCCESS; @@ -1097,9 +1099,25 @@ SmmFtwNotificationEvent ( return Status; } =20 + Status =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (Status)) { + NvStorageVariableBase =3D VariableFlashInfo->NvStorageBaseAddress; + Status =3D SafeUint64ToUint32 (VariableFlashInfo->NvSto= rageLength, &NvStorageVariableSize); + // This driver currently assumes the size will be UINT32 so only accep= t that for now. + ASSERT_EFI_ERROR (Status); + } + + if (EFI_ERROR (Status)) { + NvStorageVariableBase =3D NV_STORAGE_VARIABLE_BASE; + NvStorageVariableSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + } + + ASSERT (NvStorageVariableBase !=3D 0); + VariableStoreBase =3D NvStorageVariableBase + mNvFvHeaderCache->HeaderLe= ngth; + Status =3D FtwProtocol->GetMaxBlockSize (FtwProtocol, &FtwMaxBlockSize); if (!EFI_ERROR (Status)) { - ASSERT (PcdGet32 (PcdFlashNvStorageVariableSize) <=3D FtwMaxBlockSize); + ASSERT (NvStorageVariableSize <=3D FtwMaxBlockSize); } =20 NvStorageVariableBase =3D NV_STORAGE_VARIABLE_BASE; diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h b/MdeModulePkg/= Universal/Variable/Pei/Variable.h index 7f9ad5bfc357..b2ba30b841c1 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.h +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.h @@ -20,7 +20,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include =20 +#include #include #include #include diff --git a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf b/MdeModul= ePkg/Universal/Variable/Pei/VariablePei.inf index 7cbdd2385e8f..2557219f9b30 100644 --- a/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +++ b/MdeModulePkg/Universal/Variable/Pei/VariablePei.inf @@ -39,6 +39,7 @@ [LibraryClasses] DebugLib PeiServicesTablePointerLib PeiServicesLib + SafeIntLib =20 [Guids] ## CONSUMES ## GUID # Variable store header @@ -54,14 +55,15 @@ [Guids] ## SOMETIMES_CONSUMES ## HOB ## CONSUMES ## GUID # Dependence gEdkiiFaultTolerantWriteGuid + gVariableFlashInfoHobGuid ## CONSUMES ## HOB =20 [Ppis] gEfiPeiReadOnlyVariable2PpiGuid ## PRODUCES =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable ## SOM= ETIMES_CONSUMES =20 [Depex] diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeMod= ulePkg/Universal/Variable/RuntimeDxe/Variable.h index 31e408976a35..c9bbd1568567 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h @@ -31,12 +31,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include #include #include #include #include #include #include +#include =20 #include "PrivilegePolymorphic.h" =20 @@ -126,6 +128,21 @@ typedef struct { EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbInstance; } VARIABLE_MODULE_GLOBAL; =20 +/** + Get the HOB that contains variable flash information. + + @param[out] VariableFlashInfo Pointer to a pointer to set to the varia= ble flash information structure. + + @retval EFI_SUCCESS Variable flash information was found suc= cessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is N= ULL. + @retval EFI_NOT_FOUND Variable flash information could not be = found. + +**/ +EFI_STATUS +GetVariableFlashInfo ( + OUT VARIABLE_FLASH_INFO **VariableFlashInfo + ); + /** Flush the HOB variable to flash. =20 diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.= inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf index c9434df631ee..6df350afa260 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf @@ -73,6 +73,7 @@ [LibraryClasses] VarCheckLib VariablePolicyLib VariablePolicyHelperLib + SafeIntLib =20 [Protocols] gEfiFirmwareVolumeBlockProtocolGuid ## CONSUMES @@ -114,6 +115,7 @@ [Guids] gEfiSystemNvDataFvGuid ## CONSUMES ##= GUID gEfiEndOfDxeEventGroupGuid ## CONSUMES ##= Event gEdkiiFaultTolerantWriteGuid ## SOMETIMES_CONSUMES ##= HOB + gVariableFlashInfoHobGuid ## CONSUMES ##= HOB =20 ## SOMETIMES_CONSUMES ## Variable:L"VarErrorFlag" ## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag" @@ -125,9 +127,9 @@ [Guids] gEfiImageSecurityDatabaseGuid =20 [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## CON= SUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## CON= SUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## CON= SUMES diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf b/M= deModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf index eaa97a01c6e5..398e7d9060ab 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf @@ -82,6 +82,7 @@ [LibraryClasses] UefiBootServicesTableLib VariablePolicyLib VariablePolicyHelperLib + SafeIntLib =20 [Protocols] gEfiSmmFirmwareVolumeBlockProtocolGuid ## CONSUMES @@ -121,15 +122,16 @@ [Guids] gSmmVariableWriteGuid ## PRODUCES ##= GUID # Install protocol gEfiSystemNvDataFvGuid ## CONSUMES ##= GUID gEdkiiFaultTolerantWriteGuid ## SOMETIMES_CONSUMES ##= HOB + gVariableFlashInfoHobGuid ## CONSUMES ##= HOB =20 ## SOMETIMES_CONSUMES ## Variable:L"VarErrorFlag" ## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag" gEdkiiVarErrorFlagGuid =20 [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## SO= METIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SO= METIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CO= NSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## SO= METIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## CO= NSUMES diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneM= m.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf index d8c4f77e7f1f..efc9290ae759 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf @@ -73,6 +73,7 @@ [LibraryClasses] HobLib MemoryAllocationLib MmServicesTableLib + SafeIntLib StandaloneMmDriverEntryPoint SynchronizationLib VarCheckLib @@ -114,6 +115,7 @@ [Guids] =20 gEfiSystemNvDataFvGuid ## CONSUMES ##= GUID gEdkiiFaultTolerantWriteGuid ## SOMETIMES_CONSUMES ##= HOB + gVariableFlashInfoHobGuid ## CONSUMES ##= HOB =20 ## SOMETIMES_CONSUMES ## Variable:L"VarErrorFlag" ## SOMETIMES_PRODUCES ## Variable:L"VarErrorFlag" @@ -121,8 +123,8 @@ [Guids] =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SO= METIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CO= NSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CO= NSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## SO= METIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## SO= METIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## CO= NSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## CO= NSUMES --=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 (#88463): https://edk2.groups.io/g/devel/message/88463 Mute This Topic: https://groups.io/mt/90293666/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- From nobody Fri May 17 03:39:43 2024 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+88464+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+88464+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linux.microsoft.com ARC-Seal: i=1; a=rsa-sha256; t=1649262445; cv=none; d=zohomail.com; s=zohoarc; b=WTgQWTGJP3Fvxgj5JAeqU2DWm36XMvoU8njcNHu0yio970R6P5LoqJ2Zun2Y+0y9DvjzA8gZ/m3YswYqurSsWcPS3wOlqP6k6+B1k6cApCwFP8nz7LBYt9uz53Rzlz54Tm7tDliaNdsZmNd9RblsqnKZWdWs0NpviCM4zb0/h7I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649262445; 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=YRv+LApbbzVg/25sRxC5HP2nEVpEJ4/aJAOgyNxKHIo=; b=REz4xnNXu7peGow1mAfNW3nfxZyrvloRLLKYs87tzw85Do0ts3WUHwyMgeJb2lYcAPGlTVAnIKtpxLl2bJ8Sn1YDuDWrdUYiy1kA9JIJuRlOaOpj1MqZYuzpVo6achFPBjuZmtjXivqkzz/PXsIqez+jCtcFB59Gn6St5JJZ6/Y= 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+88464+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 1649262445918626.9533825527799; Wed, 6 Apr 2022 09:27:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1bR6YY1788612xj8MTLbz4M2; Wed, 06 Apr 2022 09:27:25 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.10846.1649262444726019137 for ; Wed, 06 Apr 2022 09:27:24 -0700 X-Received: from localhost.localdomain (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id 9C88120DFD98; Wed, 6 Apr 2022 09:27:23 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9C88120DFD98 From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Liming Gao Subject: [edk2-devel] [PATCH v1 3/3] MdeModulePkg/FaultTolerantWrite: Consume Variable Info HOB Date: Wed, 6 Apr 2022 12:26:48 -0400 Message-Id: <20220406162648.234-4-mikuback@linux.microsoft.com> In-Reply-To: <20220406162648.234-1-mikuback@linux.microsoft.com> References: <20220406162648.234-1-mikuback@linux.microsoft.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,mikuback@linux.microsoft.com X-Gm-Message-State: fefQikNDhoD1a0qUffoSczuQx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1649262445; bh=jFvPyk45fu/DmB+PtMakr+EO1wxLbMPuhlQE/YsllgM=; h=Cc:Date:From:Reply-To:Subject:To; b=pk9p0GRtBtxv8hR63xvYucEF8HfHcQhlKG5SXFfg/7d4KrF6iUfWXBomoqxV9X9HjT/ abUUGpxwGPIMFDH8huW9gIPj5aovKBthBri9FF6LawniMHykat7S+fqGBwS+puFTQMNc6 wDocPP3nt/jIYNkwkQDKSOr2AbEXeARZYuo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1649262446647100001 Content-Type: text/plain; charset="utf-8" From: Michael Kubacki REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3479 Adds support to the UEFI variable fault tolerant write (FTW) drivers to receive FTW base and size information dynamically via the Variable Flash Information HOB. This supplements support added earlier for the variable store base address and size passed with the Variable Flash Information HOB. Cc: Jian J Wang Cc: Hao A Wu Cc: Liming Gao Signed-off-by: Michael Kubacki --- MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c = | 111 +++++++++++++++++--- MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c = | 7 +- MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c = | 92 ++++++++++++++-- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h = | 9 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf = | 11 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf = | 11 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandaloneM= m.inf | 11 +- MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf = | 10 +- 8 files changed, 221 insertions(+), 41 deletions(-) diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeMo= dulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c index 661e1487673b..5066fe0d3711 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c @@ -972,6 +972,48 @@ GetPreviousRecordOfWrites ( return EFI_SUCCESS; } =20 +/** + Get the HOB that contains variable flash information. + + @param[out] VariableFlashInfo Pointer to a pointer to set to the varia= ble flash information structure. + + @retval EFI_SUCCESS Variable flash information was found suc= cessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is N= ULL. + @retval EFI_NOT_FOUND Variable flash information could not be = found. + +**/ +EFI_STATUS +GetVariableFlashInfo ( + OUT VARIABLE_FLASH_INFO **VariableFlashInfo + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + + if (VariableFlashInfo =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + GuidHob =3D GetFirstGuidHob (&gVariableFlashInfoHobGuid); + if (GuidHob =3D=3D NULL) { + return EFI_NOT_FOUND; + } + + *VariableFlashInfo =3D GET_GUID_HOB_DATA (GuidHob); + + // + // Assert if more than one variable flash information HOB is present. + // + DEBUG_CODE ( + if ((GetNextGuidHob (&gVariableFlashInfoHobGuid, GET_NEXT_HOB (GuidHob= )) !=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: Found two variable flash information HOBs= \n")); + ASSERT (FALSE); + } + + ); + + return EFI_SUCCESS; +} + /** Allocate private data for FTW driver and initialize it. =20 @@ -987,22 +1029,71 @@ InitFtwDevice ( OUT EFI_FTW_DEVICE **FtwData ) { - EFI_FTW_DEVICE *FtwDevice; + EFI_STATUS Status; + EFI_STATUS VariableFlashInfoStatus; + UINTN FtwWorkingSize; + VARIABLE_FLASH_INFO *VariableFlashInfo; + EFI_FTW_DEVICE *FtwDevice; + + FtwWorkingSize =3D 0; + VariableFlashInfoStatus =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (VariableFlashInfoStatus)) { + Status =3D SafeUint64ToUintn (VariableFlashInfo->FtwWorkingLength, &Ft= wWorkingSize); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + FtwWorkingSize =3D 0; + } + } + + if (FtwWorkingSize =3D=3D 0) { + FtwWorkingSize =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwWorkingSize); + } =20 // // Allocate private data of this driver, // Including the FtwWorkSpace[FTW_WORK_SPACE_SIZE]. // - FtwDevice =3D AllocateZeroPool (sizeof (EFI_FTW_DEVICE) + PcdGet32 (PcdF= lashNvStorageFtwWorkingSize)); + FtwDevice =3D AllocateZeroPool (sizeof (EFI_FTW_DEVICE) + FtwWorkingSize= ); if (FtwDevice =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } =20 + FtwDevice->WorkSpaceLength =3D FtwWorkingSize; + + if (!EFI_ERROR (VariableFlashInfoStatus)) { + // This driver currently assumes the size will be UINT32 so only accept + // that for now. + Status =3D SafeUint64ToUintn (VariableFlashInfo->FtwSpareLength, &FtwD= evice->SpareAreaLength); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + FtwDevice->SpareAreaLength =3D 0; + } + + FtwDevice->SpareAreaAddress =3D VariableFlashInfo->FtwSpareBaseAddress; + FtwDevice->WorkSpaceAddress =3D VariableFlashInfo->FtwWorkingBaseAddre= ss; + } + + if (FtwDevice->SpareAreaLength =3D=3D 0) { + FtwDevice->SpareAreaLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwSp= areSize); + } + + if (FtwDevice->SpareAreaAddress =3D=3D 0) { + FtwDevice->SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFla= shNvStorageFtwSpareBase64); + if (FtwDevice->SpareAreaAddress =3D=3D 0) { + FtwDevice->SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdF= lashNvStorageFtwSpareBase); + } + } + + if (FtwDevice->WorkSpaceAddress =3D=3D 0) { + FtwDevice->WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFla= shNvStorageFtwWorkingBase64); + if (FtwDevice->WorkSpaceAddress =3D=3D 0) { + FtwDevice->WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdF= lashNvStorageFtwWorkingBase); + } + } + // // Initialize other parameters, and set WorkSpace as FTW_ERASED_BYTE. // - FtwDevice->WorkSpaceLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwWork= ingSize); - FtwDevice->SpareAreaLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwSpar= eSize); if ((FtwDevice->WorkSpaceLength =3D=3D 0) || (FtwDevice->SpareAreaLength= =3D=3D 0)) { DEBUG ((DEBUG_ERROR, "Ftw: Workspace or Spare block does not exist!\n"= )); FreePool (FtwDevice); @@ -1015,16 +1106,6 @@ InitFtwDevice ( FtwDevice->FtwWorkSpaceLba =3D (EFI_LBA)(-1); FtwDevice->FtwSpareLba =3D (EFI_LBA)(-1); =20 - FtwDevice->WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFlash= NvStorageFtwWorkingBase64); - if (FtwDevice->WorkSpaceAddress =3D=3D 0) { - FtwDevice->WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFla= shNvStorageFtwWorkingBase); - } - - FtwDevice->SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFlash= NvStorageFtwSpareBase64); - if (FtwDevice->SpareAreaAddress =3D=3D 0) { - FtwDevice->SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFla= shNvStorageFtwSpareBase); - } - *FtwData =3D FtwDevice; return EFI_SUCCESS; } @@ -1277,7 +1358,7 @@ InitFtwProtocol ( FtwDevice->FtwLastWriteHeader =3D NULL; FtwDevice->FtwLastWriteRecord =3D NULL; =20 - InitializeLocalWorkSpaceHeader (); + InitializeLocalWorkSpaceHeader (FtwDevice->WorkSpaceLength); =20 // // Refresh the working space data from working block diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBloc= k.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c index 61e7a92ccea1..fd563643eb63 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c @@ -16,10 +16,13 @@ EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER mWorkingBlockH= eader =3D { ZERO_GUID, 0, 0 =20 Since Signature and WriteQueueSize have been known, Crc can be calculate= d out, then the work space header will be fixed. + + @param[in] WorkSpaceLength Length in bytes of the FTW workspace are= a. + **/ VOID InitializeLocalWorkSpaceHeader ( - VOID + IN UINTN WorkSpaceLength ) { // @@ -46,7 +49,7 @@ InitializeLocalWorkSpaceHeader ( &gEdkiiWorkingBlockSignatureGuid, sizeof (EFI_GUID) ); - mWorkingBlockHeader.WriteQueueSize =3D PcdGet32 (PcdFlashNvStorageFtwWor= kingSize) - sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER); + mWorkingBlockHeader.WriteQueueSize =3D WorkSpaceLength - sizeof (EFI_FAU= LT_TOLERANT_WORKING_BLOCK_HEADER); =20 // // Crc is calculated with all the fields except Crc and STATE, so leave = them as FTW_ERASED_BYTE. diff --git a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWrit= ePei.c b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei= .c index 15543f12ed29..7abf8f72d569 100644 --- a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c +++ b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c @@ -11,11 +11,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 #include #include +#include #include #include #include #include #include +#include =20 EFI_PEI_PPI_DESCRIPTOR mPpiListVariable =3D { (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), @@ -186,6 +188,48 @@ IsValidWorkSpace ( return TRUE; } =20 +/** + Get the HOB that contains variable flash information. + + @param[out] VariableFlashInfo Pointer to a pointer to set to the varia= ble flash information structure. + + @retval EFI_SUCCESS Variable flash information was found suc= cessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is N= ULL. + @retval EFI_NOT_FOUND Variable flash information could not be = found. + +**/ +EFI_STATUS +GetVariableFlashInfo ( + OUT VARIABLE_FLASH_INFO **VariableFlashInfo + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + + if (VariableFlashInfo =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + GuidHob =3D GetFirstGuidHob (&gVariableFlashInfoHobGuid); + if (GuidHob =3D=3D NULL) { + return EFI_NOT_FOUND; + } + + *VariableFlashInfo =3D GET_GUID_HOB_DATA (GuidHob); + + // + // Assert if more than one variable flash information HOB is present. + // + DEBUG_CODE ( + if ((GetNextGuidHob (&gVariableFlashInfoHobGuid, GET_NEXT_HOB (GuidHob= )) !=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: Found two variable flash information HOBs= \n")); + ASSERT (FALSE); + } + + ); + + return EFI_SUCCESS; +} + /** Main entry for Fault Tolerant Write PEIM. =20 @@ -207,6 +251,7 @@ PeimFaultTolerantWriteInitialize ( EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER *FtwWorkingBlockHeader; EFI_FAULT_TOLERANT_WRITE_HEADER *FtwLastWriteHeader; EFI_FAULT_TOLERANT_WRITE_RECORD *FtwLastWriteRecord; + VARIABLE_FLASH_INFO *VariableFlashInfo; EFI_PHYSICAL_ADDRESS WorkSpaceAddress; UINTN WorkSpaceLength; EFI_PHYSICAL_ADDRESS SpareAreaAddress; @@ -218,19 +263,52 @@ PeimFaultTolerantWriteInitialize ( FtwLastWriteHeader =3D NULL; FtwLastWriteRecord =3D NULL; =20 - WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFlashNvStorageFt= wWorkingBase64); - if (WorkSpaceAddress =3D=3D 0) { - WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFlashNvStorage= FtwWorkingBase); + SpareAreaAddress =3D 0; + SpareAreaLength =3D 0; + WorkSpaceAddress =3D 0; + WorkSpaceLength =3D 0; + + Status =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (Status)) { + // This driver currently assumes the size will be UINT32 so only accept + // that for now. + Status =3D SafeUint64ToUintn (VariableFlashInfo->FtwSpareLength, &Spar= eAreaLength); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + SpareAreaLength =3D 0; + } + + Status =3D SafeUint64ToUintn (VariableFlashInfo->FtwWorkingLength, &Wo= rkSpaceLength); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + WorkSpaceLength =3D 0; + } + + SpareAreaAddress =3D VariableFlashInfo->FtwSpareBaseAddress; + WorkSpaceAddress =3D VariableFlashInfo->FtwWorkingBaseAddress; } =20 - WorkSpaceLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwWorkingSize); + if (SpareAreaLength =3D=3D 0) { + SpareAreaLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwSpareSize); + } + + if (WorkSpaceLength =3D=3D 0) { + WorkSpaceLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwWorkingSize); + } =20 - SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFlashNvStorageFt= wSpareBase64); if (SpareAreaAddress =3D=3D 0) { - SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFlashNvStorage= FtwSpareBase); + SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFlashNvStorage= FtwSpareBase64); + if (SpareAreaAddress =3D=3D 0) { + SpareAreaAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFlashNvStora= geFtwSpareBase); + } } =20 - SpareAreaLength =3D (UINTN)PcdGet32 (PcdFlashNvStorageFtwSpareSize); + if (WorkSpaceAddress =3D=3D 0) { + WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFlashNvStorage= FtwWorkingBase64); + if (WorkSpaceAddress =3D=3D 0) { + WorkSpaceAddress =3D (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFlashNvStora= geFtwWorkingBase); + } + } =20 // // The address of FTW working base and spare base must not be 0. diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrit= e.h b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h index c14e47b5c7b2..40ef44c069eb 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h @@ -14,11 +14,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =20 #include +#include #include #include #include #include =20 +#include +#include #include #include #include @@ -706,12 +709,16 @@ InitFtwProtocol ( /** Initialize a local work space header. =20 + Since Signature and WriteQueueSize have been known, Crc can be calculate= d out, then the work space header will be fixed. + + @param[in] WorkSpaceLength Length in bytes of the FTW workspace are= a. + **/ VOID InitializeLocalWorkSpaceHeader ( - VOID + IN UINTN WorkSpaceLength ); =20 /** diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrit= eDxe.inf b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteD= xe.inf index 96165614d178..923f0231a047 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf @@ -46,6 +46,8 @@ [LibraryClasses] UefiLib PcdLib ReportStatusCodeLib + HobLib + SafeIntLib =20 [Guids] # @@ -54,6 +56,7 @@ [Guids] ## CONSUMES ## GUID ## PRODUCES ## GUID gEdkiiWorkingBlockSignatureGuid + gVariableFlashInfoHobGuid ## CONSUMES ## HOB =20 [Protocols] gEfiSwapAddressRangeProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.PcdFul= lFtwServiceEnable ## SOMETIMES_CONSUMES @@ -67,11 +70,11 @@ [FeaturePcd] =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## SOM= ETIMES_CONSUMES =20 # # gBS->CalculateCrc32() is consumed in EntryPoint. diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrit= eSmm.inf b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteS= mm.inf index 8cc6028470d8..bbed17e4b611 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf @@ -52,6 +52,8 @@ [LibraryClasses] ReportStatusCodeLib SmmMemLib BaseLib + HobLib + SafeIntLib =20 [Guids] # @@ -60,6 +62,7 @@ [Guids] ## CONSUMES ## GUID ## PRODUCES ## GUID gEdkiiWorkingBlockSignatureGuid + gVariableFlashInfoHobGuid ## CONSUMES ## HOB =20 [Protocols] gEfiSmmSwapAddressRangeProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.Pcd= FullFtwServiceEnable ## SOMETIMES_CONSUMES @@ -76,11 +79,11 @@ [FeaturePcd] =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## SOM= ETIMES_CONSUMES =20 # # gBS->CalculateCrc32() is consumed in EntryPoint. diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrit= eStandaloneMm.inf b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultToler= antWriteStandaloneMm.inf index d0fab7d9414f..0b394b04da7b 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStanda= loneMm.inf +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStanda= loneMm.inf @@ -46,10 +46,12 @@ [LibraryClasses] BaseLib BaseMemoryLib DebugLib + HobLib MemoryAllocationLib MmServicesTableLib PcdLib ReportStatusCodeLib + SafeIntLib StandaloneMmDriverEntryPoint =20 [Guids] @@ -59,6 +61,7 @@ [Guids] ## CONSUMES ## GUID ## PRODUCES ## GUID gEdkiiWorkingBlockSignatureGuid + gVariableFlashInfoHobGuid ## CONSUMES ## HOB =20 [Protocols] gEfiSmmSwapAddressRangeProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.Pcd= FullFtwServiceEnable ## SOMETIMES_CONSUMES @@ -75,11 +78,11 @@ [FeaturePcd] =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## SOM= ETIMES_CONSUMES =20 [Depex] TRUE diff --git a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWrit= ePei.inf b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWriteP= ei.inf index f90892ad4493..ff9d53bf7040 100644 --- a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf +++ b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf @@ -39,6 +39,7 @@ [LibraryClasses] HobLib BaseMemoryLib PcdLib + SafeIntLib =20 [Guids] ## SOMETIMES_PRODUCES ## HOB @@ -46,14 +47,15 @@ [Guids] gEdkiiFaultTolerantWriteGuid gEdkiiWorkingBlockSignatureGuid ## SOMETIMES_CONSUMES ##= GUID gEfiSystemNvDataFvGuid ## SOMETIMES_CONSUMES ##= GUID + gVariableFlashInfoHobGuid ## CONSUMES ##= HOB =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize ## SOM= ETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase ## SOM= ETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## CON= SUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## CON= SUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64 ## SOM= ETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize ## SOM= ETIMES_CONSUMES =20 [Depex] TRUE --=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 (#88464): https://edk2.groups.io/g/devel/message/88464 Mute This Topic: https://groups.io/mt/90293667/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-