Functions | |
BOOLEAN | IsAnyMorVariable (IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid) |
BOOLEAN | IsMorLockVariable (IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid) |
EFI_STATUS EFIAPI | SetVariableCheckHandlerMor (IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Data) |
EFI_STATUS EFIAPI | MorLockDriverInit (VOID) |
Variables | |
VARIABLE_TYPE | mMorVariableType [] |
This driver initilize MemoryOverwriteRequestControlLock variable. This module will add Variable Hook and allow MemoryOverwriteRequestControlLock variable set only once.
Copyright (c) 2015, Intel Corporation. All rights reserved.
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 http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
BOOLEAN IsAnyMorVariable | ( | IN CHAR16 * | VariableName, | |
IN EFI_GUID * | VendorGuid | |||
) |
Returns if this is MOR related variable.
VariableName | the name of the vendor's variable, it's a Null-Terminated Unicode String | |
VendorGuid | Unify identifier for vendor. |
TRUE | The variable is MOR related. | |
FALSE | The variable is NOT MOR related. |
References mMorVariableType, TRUE, and UINTN().
Referenced by SetVariableCheckHandlerMor().
BOOLEAN IsMorLockVariable | ( | IN CHAR16 * | VariableName, | |
IN EFI_GUID * | VendorGuid | |||
) |
Returns if this is MOR lock variable.
VariableName | the name of the vendor's variable, it's a Null-Terminated Unicode String | |
VendorGuid | Unify identifier for vendor. |
TRUE | The variable is MOR lock variable. | |
FALSE | The variable is NOT MOR lock variable. |
References TRUE.
Referenced by SetVariableCheckHandlerMor().
EFI_STATUS EFIAPI MorLockDriverInit | ( | VOID | ) |
Entry Point for MOR Lock Control driver.
[in] | ImageHandle | Image handle of this driver. |
[in] | SystemTable | A Pointer to the EFI System Table. |
EFI_SUCEESS |
References EFI_STATUS(), and InternalSetVariable().
Referenced by MorLockDriverEntryPointSmm().
EFI_STATUS EFIAPI SetVariableCheckHandlerMor | ( | IN CHAR16 * | VariableName, | |
IN EFI_GUID * | VendorGuid, | |||
IN UINT32 | Attributes, | |||
IN UINTN | DataSize, | |||
IN VOID * | Data | |||
) |
This service is a checker handler for the UEFI Runtime Service SetVariable()
VariableName | the name of the vendor's variable, as a Null-Terminated Unicode String | |
VendorGuid | Unify identifier for vendor. | |
Attributes | Point to memory location to return the attributes of variable. If the point is NULL, the parameter would be ignored. | |
DataSize | The size in bytes of Data-Buffer. | |
Data | Point to the content of the variable. |
EFI_SUCCESS | The firmware has successfully stored the variable and its data as defined by the Attributes. | |
EFI_INVALID_PARAMETER | An invalid combination of attribute bits was supplied, or the DataSize exceeds the maximum allowed. | |
EFI_INVALID_PARAMETER | VariableName is an empty Unicode string. | |
EFI_OUT_OF_RESOURCES | Not enough storage is available to hold the variable and its data. | |
EFI_DEVICE_ERROR | The variable could not be saved due to a hardware failure. | |
EFI_WRITE_PROTECTED | The variable in question is read-only. | |
EFI_WRITE_PROTECTED | The variable in question cannot be deleted. | |
EFI_SECURITY_VIOLATION | The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS set but the AuthInfo does NOT pass the validation check carried out by the firmware. | |
EFI_NOT_FOUND | The variable trying to be updated or deleted was not found. |
References BOOLEAN(), EFI_STATUS(), InternalGetVariable(), IsAnyMorVariable(), IsMorLockVariable(), and UINTN().
Referenced by MorLockDriverEntryPointSmm().
VARIABLE_TYPE mMorVariableType[] |
Initial value:
{ {MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, &gEfiMemoryOverwriteControlDataGuid}, {MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, &gEfiMemoryOverwriteRequestControlLockGuid}, }
Referenced by IsAnyMorVariable().