/** @file\r
\r
- The common variable operation routines shared by DXE_RINTIME variable \r
+ The common variable operation routines shared by DXE_RUNTIME variable \r
module and DXE_SMM variable module.\r
\r
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxVariableSize))) {\r
return EFI_INVALID_PARAMETER;\r
} \r
- } \r
+ }\r
+\r
+ if (AtRuntime ()) {\r
+ //\r
+ // HwErrRecSupport Global Variable identifies the level of hardware error record persistence\r
+ // support implemented by the platform. This variable is only modified by firmware and is read-only to the OS.\r
+ //\r
+ if (CompareGuid (VendorGuid, &gEfiGlobalVariableGuid) && (StrCmp (VariableName, L"HwErrRecSupport") == 0)) {\r
+ return EFI_WRITE_PROTECTED;\r
+ }\r
+ }\r
\r
AcquireLockOnlyAtBootTime(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock);\r
\r
/** @file\r
- The common variable operation routines shared by DXE_RINTIME variable\r
+ The common variable operation routines shared by DXE_RUNTIME variable\r
module and DXE_SMM variable module.\r
\r
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
}\r
}\r
\r
+ if (AtRuntime ()) {\r
+ //\r
+ // HwErrRecSupport Global Variable identifies the level of hardware error record persistence\r
+ // support implemented by the platform. This variable is only modified by firmware and is read-only to the OS.\r
+ //\r
+ if (CompareGuid (VendorGuid, &gEfiGlobalVariableGuid) && (StrCmp (VariableName, L"HwErrRecSupport") == 0)) {\r
+ return EFI_WRITE_PROTECTED;\r
+ }\r
+ }\r
+\r
AcquireLockOnlyAtBootTime(&mVariableModuleGlobal->VariableGlobal.VariableServicesLock);\r
\r
//\r