TianoCore EDK2 master
Loading...
Searching...
No Matches
TcgMor.c File Reference
#include "TcgMor.h"

Go to the source code of this file.

Functions

VOID EFIAPI OnReadyToBoot (IN EFI_EVENT Event, IN VOID *Context)
 
VOID InitiateTPerReset (IN EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Ssp, IN UINT32 MediaId)
 
VOID EFIAPI TPerResetAtEndOfDxe (IN EFI_EVENT Event, IN VOID *Context)
 
EFI_STATUS EFIAPI MorDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

UINT8 mMorControl
 

Detailed Description

TCG MOR (Memory Overwrite Request) Control Driver.

This driver initialize MemoryOverwriteRequestControl variable. It will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will also do TPer Reset for those encrypted drives through EFI_STORAGE_SECURITY_COMMAND_PROTOCOL at EndOfDxe.

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

Definition in file TcgMor.c.

Function Documentation

◆ InitiateTPerReset()

VOID InitiateTPerReset ( IN EFI_STORAGE_SECURITY_COMMAND_PROTOCOL Ssp,
IN UINT32  MediaId 
)

Send TPer Reset command to reset eDrive to lock all protected bands. Typically, there are 2 mechanism for resetting eDrive. They are:

  1. TPer Reset through IEEE 1667 protocol.
  2. TPer Reset through native TCG protocol. This routine will detect what protocol the attached eDrive conform to, TCG or IEEE 1667 protocol. Then send out TPer Reset command separately.
Parameters
[in]SspThe pointer to EFI_STORAGE_SECURITY_COMMAND_PROTOCOL instance.
[in]MediaIdID of the medium to receive data from or send data to.

Definition at line 73 of file TcgMor.c.

◆ MorDriverEntryPoint()

EFI_STATUS EFIAPI MorDriverEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

Entry Point for TCG MOR Control driver.

Parameters
[in]ImageHandleImage handle of this driver.
[in]SystemTableA Pointer to the EFI System Table.
Return values
EFI_SUCCESS
Returns
Others Some error occurs.

The firmware is required to create the MemoryOverwriteRequestControl UEFI variable.

Definition at line 307 of file TcgMor.c.

◆ OnReadyToBoot()

VOID EFIAPI OnReadyToBoot ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Ready to Boot Event notification handler.

Parameters
[in]EventEvent whose notification function is being invoked
[in]ContextPointer to the notification function's context

Definition at line 26 of file TcgMor.c.

◆ TPerResetAtEndOfDxe()

VOID EFIAPI TPerResetAtEndOfDxe ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

Notification function of END_OF_DXE.

Parameters
[in]EventEvent whose notification function is being invoked.
[in]ContextPointer to the notification function's context.

Definition at line 236 of file TcgMor.c.

Variable Documentation

◆ mMorControl

UINT8 mMorControl

Definition at line 15 of file TcgMor.c.