mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
MdeModulePkg VariablePei: Don't check BOOT_IN_RECOVERY_MODE
Don't check BOOT_IN_RECOVERY_MODE, but check PcdEmuVariableNvModeEnable which platform can configure flexibly. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Tested-by: Julien Grall <julien.grall@arm.com> Acked-by: Julien Grall <julien.grall@arm.com>
This commit is contained in:
parent
7cd6995946
commit
3c007f3653
@ -2,7 +2,7 @@
|
|||||||
Implement ReadOnly Variable Services required by PEIM and install
|
Implement ReadOnly Variable Services required by PEIM and install
|
||||||
PEI ReadOnly Varaiable2 PPI. These services operates the non volatile storage space.
|
PEI ReadOnly Varaiable2 PPI. These services operates the non volatile storage space.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -584,9 +584,9 @@ GetVariableStore (
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VariableStoreTypeNv:
|
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);
|
NvStorageSize = PcdGet32 (PcdFlashNvStorageVariableSize);
|
||||||
@ -594,6 +594,8 @@ GetVariableStore (
|
|||||||
PcdGet64 (PcdFlashNvStorageVariableBase64) :
|
PcdGet64 (PcdFlashNvStorageVariableBase64) :
|
||||||
PcdGet32 (PcdFlashNvStorageVariableBase)
|
PcdGet32 (PcdFlashNvStorageVariableBase)
|
||||||
);
|
);
|
||||||
|
ASSERT (NvStorageBase != 0);
|
||||||
|
|
||||||
//
|
//
|
||||||
// First let FvHeader point to NV storage base.
|
// First let FvHeader point to NV storage base.
|
||||||
//
|
//
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# This module implements ReadOnly Variable Services required by PEIM and installs PEI ReadOnly Varaiable2 PPI.
|
# This module implements ReadOnly Variable Services required by PEIM and installs PEI ReadOnly Varaiable2 PPI.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -68,6 +68,7 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SOMETIMES_CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase ## SOMETIMES_CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable ## SOMETIMES_CONSUMES
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEdkiiFaultTolerantWriteGuid
|
gEdkiiFaultTolerantWriteGuid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user