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

Go to the source code of this file.

Data Structures

struct  TPM_RSP_GET_TICKS
 

Functions

STATIC EFI_STATUS TestTpm12 ()
 
EFI_STATUS InternalTpm12Detect (VOID)
 

Detailed Description

Implement the InternalTpm12Detect() function on top of the Tpm12DeviceLib class.

Copyright (C) 2020, Red Hat, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Tpm12Support.c.

Function Documentation

◆ InternalTpm12Detect()

EFI_STATUS InternalTpm12Detect ( VOID  )

Detect the presence of a TPM with interface version 1.2.

Return values
EFI_SUCCESSTPM-1.2 available. The Tpm12RequestUseTpm() and Tpm12SubmitCommand(TPM_ORD_GetTicks) operations (from the Tpm12DeviceLib class) have succeeded.
Returns
Error codes propagated from Tpm12RequestUseTpm() and Tpm12SubmitCommand().

Definition at line 71 of file Tpm12Support.c.

◆ TestTpm12()

STATIC EFI_STATUS TestTpm12 ( )

Probe for the TPM for 1.2 version, by sending TPM1.2 GetTicks

Sending a TPM1.2 command to a TPM2 should return a TPM1.2 header (tag = 0xc4) and error code (TPM_BADTAG = 0x1e)

Return values
EFI_SUCCESSTPM version 1.2 probing successful.
Returns
Error codes propagated from Tpm12SubmitCommand().

Definition at line 34 of file Tpm12Support.c.