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

Go to the source code of this file.

Functions

BOOLEAN TisPcPresenceCheck (IN TIS_PC_REGISTERS_PTR TisReg)
 
EFI_STATUS EFIAPI TisPcWaitRegisterBits (IN UINT8 *Register, IN UINT8 BitSet, IN UINT8 BitClear, IN UINT32 TimeOut)
 
EFI_STATUS EFIAPI TisPcReadBurstCount (IN TIS_PC_REGISTERS_PTR TisReg, OUT UINT16 *BurstCount)
 
EFI_STATUS EFIAPI TisPcPrepareCommand (IN TIS_PC_REGISTERS_PTR TisReg)
 
EFI_STATUS EFIAPI TisPcRequestUseTpm (IN TIS_PC_REGISTERS_PTR TisReg)
 

Detailed Description

Basic TIS (TPM Interface Specification) functions.

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

Definition in file TisPc.c.

Function Documentation

◆ TisPcPrepareCommand()

EFI_STATUS EFIAPI TisPcPrepareCommand ( IN TIS_PC_REGISTERS_PTR  TisReg)

Set TPM chip to ready state by sending ready command TIS_PC_STS_READY to Status Register in time.

Parameters
[in]TisRegPointer to TIS register.
Return values
EFI_SUCCESSTPM chip enters into ready state.
EFI_INVALID_PARAMETERTisReg is NULL.
EFI_TIMEOUTTPM chip can't be set to ready state in time.

Definition at line 123 of file TisPc.c.

◆ TisPcPresenceCheck()

BOOLEAN TisPcPresenceCheck ( IN TIS_PC_REGISTERS_PTR  TisReg)

Check whether TPM chip exist.

Parameters
[in]TisRegPointer to TIS register.
Return values
TRUETPM chip exists.
FALSETPM chip is not found.

Definition at line 20 of file TisPc.c.

◆ TisPcReadBurstCount()

EFI_STATUS EFIAPI TisPcReadBurstCount ( IN TIS_PC_REGISTERS_PTR  TisReg,
OUT UINT16 *  BurstCount 
)

Get BurstCount by reading the burstCount field of a TIS register in the time of default TIS_TIMEOUT_D.

Parameters
[in]TisRegPointer to TIS register.
[out]BurstCountPointer to a buffer to store the got BurstCount.
Return values
EFI_SUCCESSGet BurstCount.
EFI_INVALID_PARAMETERTisReg is NULL or BurstCount is NULL.
EFI_TIMEOUTBurstCount can't be got in time.

Definition at line 78 of file TisPc.c.

◆ TisPcRequestUseTpm()

EFI_STATUS EFIAPI TisPcRequestUseTpm ( IN TIS_PC_REGISTERS_PTR  TisReg)

Get the control of TPM chip by sending requestUse command TIS_PC_ACC_RQUUSE to ACCESS Register in the time of default TIS_TIMEOUT_A.

Parameters
[in]TisRegPointer to TIS register.
Return values
EFI_SUCCESSGet the control of TPM chip.
EFI_INVALID_PARAMETERTisReg is NULL.
EFI_NOT_FOUNDTPM chip doesn't exit.
EFI_TIMEOUTCan't get the TPM control in time.

Definition at line 156 of file TisPc.c.

◆ TisPcWaitRegisterBits()

EFI_STATUS EFIAPI TisPcWaitRegisterBits ( IN UINT8 *  Register,
IN UINT8  BitSet,
IN UINT8  BitClear,
IN UINT32  TimeOut 
)

Check whether the value of a TPM chip register satisfies the input BIT setting.

Parameters
[in]RegisterAddress port of register to be checked.
[in]BitSetCheck these data bits are set.
[in]BitClearCheck these data bits are clear.
[in]TimeOutThe max wait time (unit MicroSecond) when checking register.
Return values
EFI_SUCCESSThe register satisfies the check bit.
EFI_TIMEOUTThe register can't run into the expected status in time.

Definition at line 43 of file TisPc.c.