mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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
This commit is contained in:
parent
6c310dfb78
commit
021a1af927
@ -1,6 +1,6 @@
|
||||
/** @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) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
@ -2065,7 +2065,17 @@ VariableServiceSetVariable (
|
||||
(sizeof (VARIABLE_HEADER) + StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxVariableSize))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user