TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgMorLockDxe.c File Reference
#include <PiDxe.h>
#include <Guid/MemoryOverwriteControl.h>
#include <IndustryStandard/MemoryOverwriteRequestControlLock.h>
#include <Library/DebugLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include "Variable.h"
#include <Protocol/VariablePolicy.h>
#include <Library/VariablePolicyHelperLib.h>

Go to the source code of this file.

Functions

EFI_STATUS SetVariableCheckHandlerMor (IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Data)
 
EFI_STATUS MorLockInit (VOID)
 
VOID MorLockInitAtEndOfDxe (VOID)
 

Detailed Description

TCG MOR (Memory Overwrite Request) Lock Control support (DXE version).

This module clears MemoryOverwriteRequestControlLock variable to indicate MOR lock control unsupported.

Copyright (c) 2016, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file TcgMorLockDxe.c.

Function Documentation

◆ MorLockInit()

EFI_STATUS MorLockInit ( VOID  )

Initialization for MOR Control Lock.

Return values
EFI_SUCCESSMorLock initialization success.
Returns
Others Some error occurs.

Definition at line 65 of file TcgMorLockDxe.c.

◆ MorLockInitAtEndOfDxe()

VOID MorLockInitAtEndOfDxe ( VOID  )

Delayed initialization for MOR Control Lock at EndOfDxe.

This function performs any operations queued by MorLockInit().

Definition at line 109 of file TcgMorLockDxe.c.

◆ SetVariableCheckHandlerMor()

EFI_STATUS SetVariableCheckHandlerMor ( IN CHAR16 *  VariableName,
IN EFI_GUID VendorGuid,
IN UINT32  Attributes,
IN UINTN  DataSize,
IN VOID *  Data 
)

This service is an MOR/MorLock checker handler for the SetVariable().

Parameters
[in]VariableNamethe name of the vendor's variable, as a Null-Terminated Unicode String
[in]VendorGuidUnify identifier for vendor.
[in]AttributesAttributes bitmask to set for the variable.
[in]DataSizeThe size in bytes of Data-Buffer.
[in]DataPoint to the content of the variable.
Return values
EFI_SUCCESSThe MOR/MorLock check pass, and Variable driver can store the variable data.
EFI_INVALID_PARAMETERThe MOR/MorLock data or data size or attributes is not allowed for MOR variable.
EFI_ACCESS_DENIEDThe MOR/MorLock is locked.
EFI_ALREADY_STARTEDThe MorLock variable is handled inside this function. Variable driver can just return EFI_SUCCESS.

Definition at line 44 of file TcgMorLockDxe.c.