MdeModulePkg Variable: Not get NV PCD in VariableWriteServiceInitialize
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323 Merge EmuVariable and Real variable driver. Add macro NV_STORAGE_VARIABLE_BASE. Not get NV PCD in VariableWriteServiceInitialize, but in FtwNotificationEvent/SmmFtwNotificationEvent, then VariableWriteServiceInitialize could be not aware the NV storage is real or emulated. This patch prepares for adding emulated variable NV mode support in VariableRuntimeDxe. 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:
@@ -2,7 +2,7 @@
|
||||
The internal header file includes the common header files, defines
|
||||
internal structure and functions used by Variable modules.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -46,6 +46,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
#include "PrivilegePolymorphic.h"
|
||||
|
||||
#define NV_STORAGE_VARIABLE_BASE (EFI_PHYSICAL_ADDRESS) \
|
||||
(PcdGet64 (PcdFlashNvStorageVariableBase64) != 0 ? \
|
||||
PcdGet64 (PcdFlashNvStorageVariableBase64) : \
|
||||
PcdGet32 (PcdFlashNvStorageVariableBase))
|
||||
|
||||
#define EFI_VARIABLE_ATTRIBUTES_MASK (EFI_VARIABLE_NON_VOLATILE | \
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | \
|
||||
EFI_VARIABLE_RUNTIME_ACCESS | \
|
||||
@@ -473,7 +478,7 @@ GetMaxVariableSize (
|
||||
);
|
||||
|
||||
/**
|
||||
Initializes variable write service after FVB was ready.
|
||||
Initializes variable write service.
|
||||
|
||||
@retval EFI_SUCCESS Function successfully executed.
|
||||
@retval Others Fail to initialize the variable service.
|
||||
|
Reference in New Issue
Block a user