summaryrefslogtreecommitdiff
path: root/SecurityPkg/VariableAuthenticated/RuntimeDxe
diff options
context:
space:
mode:
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-30 02:42:26 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-30 02:42:26 +0000
commit021a1af927f5ba50ecfe21259a0928a7308e70ff (patch)
treec27b487fccddb64e5802e6cfb1b393abc792fb23 /SecurityPkg/VariableAuthenticated/RuntimeDxe
parent6c310dfb78cdbda612b9f5850097580a5e3aa95c (diff)
Return EFI_WRITE_PROTECTED when setting HwErrRecSupport Global Variable at runtime.
Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13372 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'SecurityPkg/VariableAuthenticated/RuntimeDxe')
-rw-r--r--SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
index 4c88eb6ff..d3e0b7766 100644
--- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
+++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/Variable.c
@@ -1,5 +1,5 @@
/** @file
- The common variable operation routines shared by DXE_RINTIME variable
+ The common variable operation routines shared by DXE_RUNTIME variable
module and DXE_SMM variable module.
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
@@ -2216,6 +2216,16 @@ VariableServiceSetVariable (
}
}
+ if (AtRuntime ()) {
+ //
+ // HwErrRecSupport Global Variable identifies the level of hardware error record persistence
+ // support implemented by the platform. This variable is only modified by firmware and is read-only to the OS.
+ //
+ if (CompareGuid (VendorGuid, &gEfiGlobalVariableGuid) && (StrCmp (VariableName, L"HwErrRecSupport") == 0)) {
+ return EFI_WRITE_PROTECTED;
+ }
+ }
+
AcquireLockOnlyAtBootTime(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock);
//