TianoCore EDK2 master
Loading...
Searching...
No Matches
MmTcg2PhysicalPresenceLibCommon.c File Reference

Go to the source code of this file.

Functions

UINT32 EFIAPI Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction (OUT UINT32 *MostRecentRequest, OUT UINT32 *Response)
 
UINT32 Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx (IN OUT UINT32 *OperationRequest, IN OUT UINT32 *RequestParameter)
 
UINT32 EFIAPI Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction (IN UINT32 OperationRequest, IN UINT32 RequestParameter)
 
UINT32 EFIAPI Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (IN UINT32 OperationRequest)
 
EFI_STATUS Tcg2PhysicalPresenceLibCommonConstructor (VOID)
 

Variables

EFI_SMM_VARIABLE_PROTOCOLmTcg2PpSmmVariable
 
BOOLEAN mIsTcg2PPVerLowerThan_1_3 = FALSE
 
UINT32 mTcg2PhysicalPresenceFlags
 

Detailed Description

Handle TPM 2.0 physical presence requests from OS.

This library will handle TPM 2.0 physical presence request from OS.

Caution: This module requires additional review when modified. This driver will have external input - variable. This external input must be validated carefully to avoid security issue.

Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() and Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction() will receive untrusted input and do validation.

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

Definition in file MmTcg2PhysicalPresenceLibCommon.c.

Function Documentation

◆ Tcg2PhysicalPresenceLibCommonConstructor()

EFI_STATUS Tcg2PhysicalPresenceLibCommonConstructor ( VOID  )

The constructor function locates SmmVariable protocol.

It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.

Return values
EFI_SUCCESSThe constructor successfully added string package.
Othervalue The constructor can't add string package.

Definition at line 377 of file MmTcg2PhysicalPresenceLibCommon.c.

◆ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction()

UINT32 EFIAPI Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction ( IN UINT32  OperationRequest)

The handler for TPM physical presence function: Get User Confirmation Status for Operation.

This API should be invoked in OS runtime phase to interface with ACPI method.

Caution: This function may receive untrusted input.

Parameters
[in]OperationRequestTPM physical presence operation request.
Returns
Return Code for Get User Confirmation Status for Operation.

Definition at line 229 of file MmTcg2PhysicalPresenceLibCommon.c.

◆ Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction()

UINT32 EFIAPI Tcg2PhysicalPresenceLibReturnOperationResponseToOsFunction ( OUT UINT32 *  MostRecentRequest,
OUT UINT32 *  Response 
)

The handler for TPM physical presence function: Return TPM Operation Response to OS Environment.

This API should be invoked in OS runtime phase to interface with ACPI method.

Parameters
[out]MostRecentRequestMost recent operation request.
[out]ResponseResponse to the most recent operation request.
Returns
Return Code for Return TPM Operation Response to OS Environment.

Definition at line 37 of file MmTcg2PhysicalPresenceLibCommon.c.

◆ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction()

UINT32 EFIAPI Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction ( IN UINT32  OperationRequest,
IN UINT32  RequestParameter 
)

The handler for TPM physical presence function: Submit TPM Operation Request to Pre-OS Environment and Submit TPM Operation Request to Pre-OS Environment 2.

This API should be invoked in OS runtime phase to interface with ACPI method.

Caution: This function may receive untrusted input.

Parameters
[in]OperationRequestTPM physical presence operation request.
[in]RequestParameterTPM physical presence operation request parameter.
Returns
Return Code for Submit TPM Operation Request to Pre-OS Environment and Submit TPM Operation Request to Pre-OS Environment 2.

Definition at line 201 of file MmTcg2PhysicalPresenceLibCommon.c.

◆ Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx()

UINT32 Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunctionEx ( IN OUT UINT32 *  OperationRequest,
IN OUT UINT32 *  RequestParameter 
)

The handler for TPM physical presence function: Submit TPM Operation Request to Pre-OS Environment and Submit TPM Operation Request to Pre-OS Environment 2.

This API should be invoked in OS runtime phase to interface with ACPI method.

Caution: This function may receive untrusted input.

Parameters
[in,out]Pointerto OperationRequest TPM physical presence operation request.
[in,out]Pointerto RequestParameter TPM physical presence operation request parameter.
Returns
Return Code for Submit TPM Operation Request to Pre-OS Environment and Submit TPM Operation Request to Pre-OS Environment 2.

Definition at line 88 of file MmTcg2PhysicalPresenceLibCommon.c.

Variable Documentation

◆ mIsTcg2PPVerLowerThan_1_3

BOOLEAN mIsTcg2PPVerLowerThan_1_3 = FALSE

Definition at line 21 of file MmTcg2PhysicalPresenceLibCommon.c.

◆ mTcg2PhysicalPresenceFlags

UINT32 mTcg2PhysicalPresenceFlags

Definition at line 22 of file MmTcg2PhysicalPresenceLibCommon.c.

◆ mTcg2PpSmmVariable

EFI_SMM_VARIABLE_PROTOCOL* mTcg2PpSmmVariable

Definition at line 20 of file MmTcg2PhysicalPresenceLibCommon.c.