X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FVariable%2FPei%2FVariable.c;fp=MdeModulePkg%2FUniversal%2FVariable%2FPei%2FVariable.c;h=148c1cfefd90c44e6e464fa7257bdec3b624e8a5;hp=77b3eaeb210ddfcf91e249d6ce1304f0638098be;hb=3c007f36531accd5e6d92f5f56fce01a42aa2720;hpb=7cd69959463ac9c761163ed8e8a93907b68e70da diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c index 77b3eaeb21..148c1cfefd 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -2,7 +2,7 @@ Implement ReadOnly Variable Services required by PEIM and install PEI ReadOnly Varaiable2 PPI. These services operates the non volatile storage space. -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -584,9 +584,9 @@ GetVariableStore ( break; case VariableStoreTypeNv: - if (GetBootModeHob () != BOOT_IN_RECOVERY_MODE) { + if (!PcdGetBool (PcdEmuVariableNvModeEnable)) { // - // The content of NV storage for variable is not reliable in recovery boot mode. + // Emulated non-volatile variable mode is not enabled. // NvStorageSize = PcdGet32 (PcdFlashNvStorageVariableSize); @@ -594,6 +594,8 @@ GetVariableStore ( PcdGet64 (PcdFlashNvStorageVariableBase64) : PcdGet32 (PcdFlashNvStorageVariableBase) ); + ASSERT (NvStorageBase != 0); + // // First let FvHeader point to NV storage base. //