summaryrefslogtreecommitdiff
path: root/SecurityPkg
diff options
context:
space:
mode:
authorDong, Guo <guo.dong@intel.com>2014-09-03 09:19:30 +0000
committergdong1 <gdong1@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-03 09:19:30 +0000
commit7c064c3189dbf0892167f99245431946b7a74266 (patch)
tree058fde9a83f49acfab80d3aefa3b3998b7512a55 /SecurityPkg
parente7bafeb9a8254b10d0c8be51b32d3d104672dded (diff)
downloadedk2-platforms-7c064c3189dbf0892167f99245431946b7a74266.tar.xz
SecurityPkg VariableRuntimeDxe: Bug fix and and refine debug message.
Correct NV variable base address for flash memory attribute set to EFI_MEMORY_RUNTIME. Refine the debug error message. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dong, Guo <guo.dong@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Zeng, Star <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16055 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c
index d8910b76f8..9d9d6abc52 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableDxe.c
@@ -369,7 +369,7 @@ FtwNotificationEvent (
//
// Mark the variable storage region of the FLASH as RUNTIME.
//
- VariableStoreBase = mVariableModuleGlobal->VariableGlobal.NonVolatileVariableBase;
+ VariableStoreBase = NvStorageVariableBase + (((EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)(NvStorageVariableBase))->HeaderLength);
VariableStoreLength = ((VARIABLE_STORE_HEADER *)(UINTN)VariableStoreBase)->Size;
BaseAddress = VariableStoreBase & (~EFI_PAGE_MASK);
Length = VariableStoreLength + (VariableStoreBase - BaseAddress);
@@ -377,7 +377,7 @@ FtwNotificationEvent (
Status = gDS->GetMemorySpaceDescriptor (BaseAddress, &GcdDescriptor);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_WARN, "Variable driver failed to add EFI_MEMORY_RUNTIME attribute to Flash.\n"));
+ DEBUG ((DEBUG_WARN, "Variable driver failed to get flash memory attribute.\n"));
} else {
Status = gDS->SetMemorySpaceAttributes (
BaseAddress,