From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=NEfCn+Ca; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649262439; bh=2O8re5JaDgCD0PXBmK1Xa+C/i+NX/0e/7d376l0WeMs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NEfCn+Ca+2+fDT3h4QXQu9tXk/Ig4tC4WpRFjwkrXmcCVhu7UdPuXaHUCYjFynaUB 6ZhMLRvyrAvMN8zEXup12uTtjNFe+dWKBMa1gbjYCf5/ZkLnrRPoKszpjdURxRJhi1 TZp66sVL8I1y+8JsLwPUwvWh4UjcZV4U+Vk3MZQ8= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Jian J Wang , Hao A Wu , Liming Gao Subject: [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> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220406162648.234-1-mikuback@linux.microsoft.com> References: <20220406162648.234-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/MdeModulePk= g/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 var= iable flash information structure. + + @retval EFI_SUCCESS Variable flash information was found s= uccessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is= NULL. + @retval EFI_NOT_FOUND Variable flash information could not b= e 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 (GuidH= ob)) !=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: Found two variable flash information HO= Bs\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 (PcdFlashNvSto= rageVariableBase64) !=3D 0 ? - PcdGet64 (PcdFlashNvStora= geVariableBase64) : - PcdGet32 (PcdFlashNvStora= geVariableBase) - ); + Status =3D GetVariableFlashInfo (&VariableFlashInfo); + if (!EFI_ERROR (Status)) { + NvStorageBase =3D VariableFlashInfo->NvStorageBaseAddress; + Status =3D SafeUint64ToUint32 (VariableFlashInfo->NvSto= rageLength, &NvStorageSize); + // This driver currently assumes the size will be UINT32 so on= ly accept + // that for now. + ASSERT_EFI_ERROR (Status); + } + + if (EFI_ERROR (Status)) { + NvStorageSize =3D PcdGet32 (PcdFlashNvStorageVariableSize); + NvStorageBase =3D (EFI_PHYSICAL_ADDRESS)(PcdGet64 (PcdFlashNvS= torageVariableBase64) !=3D 0 ? + PcdGet64 (PcdFlashNvSto= rageVariableBase64) : + PcdGet32 (PcdFlashNvSto= rageVariableBase) + ); + } + ASSERT (NvStorageBase !=3D 0); =20 // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeM= odulePkg/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 var= iable flash information structure. + + @retval EFI_SUCCESS Variable flash information was found s= uccessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is= NULL. + @retval EFI_NOT_FOUND Variable flash information could not b= e 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 (GuidH= ob)) !=3D NULL)) { + DEBUG ((DEBUG_ERROR, "ERROR: Found two variable flash information HO= Bs\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/M= deModulePkg/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->NvS= torageLength, &NvStorageVariableSize); + // This driver currently assumes the size will be UINT32 so only acc= ept + // 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->Header= Length; + Status =3D FtwProtocol->GetMaxBlockSize (FtwProtocol, &FtwMaxBlockSize= ); if (!EFI_ERROR (Status)) { - ASSERT (PcdGet32 (PcdFlashNvStorageVariableSize) <=3D FtwMaxBlockSiz= e); + ASSERT (NvStorageVariableSize <=3D FtwMaxBlockSize); } =20 - NvStorageVariableBase =3D NV_STORAGE_VARIABLE_BASE; - VariableStoreBase =3D NvStorageVariableBase + mNvFvHeaderCache->He= aderLength; - // // Let NonVolatileVariableBase point to flash variable store base dire= ctly after FTW ready. // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolati= le.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->NvStorageLe= ngth, &NvStorageSize); + // This driver currently assumes the size will be UINT32 so only acc= ept 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/M= deModulePkg/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->NvS= torageLength, &NvStorageVariableSize); + // This driver currently assumes the size will be UINT32 so only acc= ept 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->Header= Length; + Status =3D FtwProtocol->GetMaxBlockSize (FtwProtocol, &FtwMaxBlockSize= ); if (!EFI_ERROR (Status)) { - ASSERT (PcdGet32 (PcdFlashNvStorageVariableSize) <=3D FtwMaxBlockSiz= e); + ASSERT (NvStorageVariableSize <=3D FtwMaxBlockSize); } =20 NvStorageVariableBase =3D NV_STORAGE_VARIABLE_BASE; diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.h b/MdeModulePk= g/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/MdeMod= ulePkg/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 ## S= OMETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## C= ONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## C= ONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## S= OMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## S= OMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable ## S= OMETIMES_CONSUMES =20 [Depex] diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h b/MdeM= odulePkg/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 var= iable flash information structure. + + @retval EFI_SUCCESS Variable flash information was found s= uccessfully. + @retval EFI_INVALID_PARAMETER The VariableFlashInfo pointer given is= NULL. + @retval EFI_NOT_FOUND Variable flash information could not b= e found. + +**/ +EFI_STATUS +GetVariableFlashInfo ( + OUT VARIABLE_FLASH_INFO **VariableFlashInfo + ); + /** Flush the HOB variable to flash. =20 diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDx= e.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 ## C= ONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## S= OMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## S= OMETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## C= ONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## S= OMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## C= ONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## C= ONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## C= ONSUMES diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf b= /MdeModulePkg/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 ## = CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## = SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## = SOMETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## = CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## = SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## = CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## = CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## = CONSUMES diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandalon= eMm.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 ## = SOMETIMES_CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## = CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## = CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## = SOMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## = SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize ## = CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize ## = CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize ## = CONSUMES --=20 2.28.0.windows.1