10#ifndef _TPM_COMM_LIB_H_
11#define _TPM_COMM_LIB_H_
20#define TPM_BASE_ADDRESS 0xfed40000
52 UINT32 IntfCapability;
66 UINT8 Reserved4[0xed8];
82 UINT8 TcgDefined[0x7b];
86 UINT32 LegacyAddress1;
90 UINT32 LegacyAddress1Ex;
94 UINT32 LegacyAddress2;
98 UINT32 LegacyAddress2Ex;
102 UINT8 VendorDefined[0x70];
118#define TCG_PLATFORM_TYPE_CLIENT 0
119#define TCG_PLATFORM_TYPE_SERVER 1
128#define TIS_PC_VALID BIT7
132#define TIS_PC_ACC_ACTIVE BIT5
137#define TIS_PC_ACC_SEIZED BIT4
143#define TIS_PC_ACC_SEIZE BIT3
147#define TIS_PC_ACC_PENDIND BIT2
151#define TIS_PC_ACC_RQUUSE BIT1
155#define TIS_PC_ACC_ESTABLISH BIT0
161#define TIS_PC_STS_READY BIT6
165#define TIS_PC_STS_GO BIT5
169#define TIS_PC_STS_DATA BIT4
173#define TIS_PC_STS_EXPECT BIT3
177#define TIS_PC_STS_RETRY BIT1
182#define TIS_TIMEOUT_A 750 * 1000
183#define TIS_TIMEOUT_B 2000 * 1000
184#define TIS_TIMEOUT_C 750 * 1000
185#define TIS_TIMEOUT_D 750 * 1000
190#define TPMCMDBUFLENGTH 1024
227 OUT UINT16 *BurstCount
EFI_STATUS EFIAPI Register(IN EFI_PEI_RSC_HANDLER_CALLBACK Callback)
EFI_STATUS EFIAPI TisPcWaitRegisterBits(IN UINT8 *Register, IN UINT8 BitSet, IN UINT8 BitClear, IN UINT32 TimeOut)
EFI_STATUS EFIAPI TpmCommHashAll(IN CONST UINT8 *Data, IN UINTN DataLen, OUT TPM_DIGEST *Digest)
EFI_STATUS EFIAPI TisPcPrepareCommand(IN TIS_PC_REGISTERS_PTR TisReg)
EFI_STATUS EFIAPI TisPcRequestUseTpm(IN TIS_PC_REGISTERS_PTR TisReg)
EFI_STATUS EFIAPI TisPcReadBurstCount(IN TIS_PC_REGISTERS_PTR TisReg, OUT UINT16 *BurstCount)