TianoCore EDK2 master
|
#include "Tcg2Smm.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | TpmNvsCommunciate (IN EFI_HANDLE DispatchHandle, IN CONST VOID *RegisterContext, IN OUT VOID *CommBuffer, IN OUT UINTN *CommBufferSize) |
EFI_STATUS EFIAPI | PhysicalPresenceCallback (IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context, IN OUT VOID *CommBuffer, IN OUT UINTN *CommBufferSize) |
EFI_STATUS EFIAPI | TcgMmReadyToLock (IN CONST EFI_GUID *Protocol, IN VOID *Interface, IN EFI_HANDLE Handle) |
EFI_STATUS | InitializeTcgCommon (VOID) |
Variables | |
EFI_SMM_VARIABLE_PROTOCOL * | mSmmVariable = NULL |
TCG_NVS * | mTcgNvs = NULL |
UINTN | mPpSoftwareSmi |
UINTN | mMcSoftwareSmi |
EFI_HANDLE | mReadyToLockHandle |
It updates TPM2 items in ACPI table and registers SMI2 callback functions for Tcg2 physical presence, ClearMemory, and sample for dTPM StartMethod.
Caution: This module requires additional review when modified. This driver will have external input - variable and ACPINvs data in SMM mode. This external input must be validated carefully to avoid security issue.
PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check.
Copyright (c) 2015 - 2024, Intel Corporation. All rights reserved.
Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Tcg2Smm.c.
EFI_STATUS InitializeTcgCommon | ( | VOID | ) |
The driver's common initialization routine.
It install callbacks for TPM physical presence and MemoryClear, and locate SMM variable to be used in the callback function.
EFI_SUCCESS | The entry point is executed successfully. |
Others | Some error occurs when executing this entry point. |
EFI_STATUS EFIAPI PhysicalPresenceCallback | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID * | Context, | ||
IN OUT VOID * | CommBuffer, | ||
IN OUT UINTN * | CommBufferSize | ||
) |
Software SMI callback for TPM physical presence which is called from ACPI method.
Caution: This function may receive untrusted input. Variable and ACPINvs are external input, so this function will validate its data structure to be valid value.
[in] | DispatchHandle | The unique handle assigned to this handler by SmiHandlerRegister(). |
[in] | Context | Points to an optional handler context which was specified when the handler was registered. |
[in,out] | CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment. |
[in,out] | CommBufferSize | The size of the CommBuffer. |
EFI_SUCCESS | The interrupt was handled successfully. |
EFI_STATUS EFIAPI TcgMmReadyToLock | ( | IN CONST EFI_GUID * | Protocol, |
IN VOID * | Interface, | ||
IN EFI_HANDLE | Handle | ||
) |
Notification for SMM ReadyToLock protocol.
[in] | Protocol | Points to the protocol's unique identifier. |
[in] | Interface | Points to the interface instance. |
[in] | Handle | The handle on which the interface was installed. |
EFI_SUCCESS | Notification runs successfully. |
EFI_STATUS EFIAPI TpmNvsCommunciate | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID * | RegisterContext, | ||
IN OUT VOID * | CommBuffer, | ||
IN OUT UINTN * | CommBufferSize | ||
) |
Communication service SMI Handler entry.
This handler takes requests to exchange Mmi channel and Nvs address between MM and DXE.
Caution: This function may receive untrusted input. Communicate buffer and buffer size are external input, so this function will do basic validation.
[in] | DispatchHandle | The unique handle assigned to this handler by SmiHandlerRegister(). |
[in] | RegisterContext | Points to an optional handler context which was specified when the handler was registered. |
[in,out] | CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment. |
[in,out] | CommBufferSize | The size of the CommBuffer. |
EFI_SUCCESS | The interrupt was handled and quiesced. No other handlers should still be called. |
EFI_UNSUPPORTED | An unknown test function was requested. |
EFI_ACCESS_DENIED | Part of the communication buffer lies in an invalid region. |
EFI_HANDLE mReadyToLockHandle |
EFI_SMM_VARIABLE_PROTOCOL* mSmmVariable = NULL |