TianoCore EDK2 master
Loading...
Searching...
No Matches
TpmTis.h
Go to the documentation of this file.
1
10#ifndef _TPM_TIS_H_
11#define _TPM_TIS_H_
12
13//
14// Set structure alignment to 1-byte
15//
16#pragma pack (1)
17
18//
19// Register set map as specified in TIS specification Chapter 10
20//
21typedef struct {
25 UINT8 Access; // 0
26 UINT8 Reserved1[7]; // 1
30 UINT32 IntEnable; // 8
34 UINT8 IntVector; // 0ch
35 UINT8 Reserved2[3]; // 0dh
39 UINT32 IntSts; // 10h
43 UINT32 IntfCapability; // 14h
47 UINT8 Status; // 18h
51 UINT16 BurstCount; // 19h
52 UINT8 Reserved3[9];
56 UINT32 DataFifo; // 24h
57 UINT8 Reserved4[0xed8]; // 28h
61 UINT16 Vid; // 0f00h
65 UINT16 Did; // 0f02h
69 UINT8 Rid; // 0f04h
70 UINT8 Reserved[0x7b]; // 0f05h
74 UINT32 LegacyAddress1; // 0f80h
78 UINT32 LegacyAddress1Ex; // 0f84h
82 UINT32 LegacyAddress2; // 0f88h
86 UINT32 LegacyAddress2Ex; // 0f8ch
90 UINT8 VendorDefined[0x70]; // 0f90h
92
93//
94// Restore original structure alignment
95//
96#pragma pack ()
97
98//
99// Define pointer types used to access TIS registers on PC
100//
102
103//
104// Define bits of ACCESS and STATUS registers
105//
106
110#define TIS_PC_VALID BIT7
114#define TIS_PC_ACC_ACTIVE BIT5
119#define TIS_PC_ACC_SEIZED BIT4
125#define TIS_PC_ACC_SEIZE BIT3
129#define TIS_PC_ACC_PENDIND BIT2
133#define TIS_PC_ACC_RQUUSE BIT1
137#define TIS_PC_ACC_ESTABLISH BIT0
138
142#define TIS_PC_STS_CANCEL BIT24
146#define TIS_PC_STS_VALID BIT7
151#define TIS_PC_STS_READY BIT6
155#define TIS_PC_STS_GO BIT5
159#define TIS_PC_STS_DATA BIT4
163#define TIS_PC_STS_EXPECT BIT3
167#define TIS_PC_STS_SELFTEST_DONE BIT2
171#define TIS_PC_STS_RETRY BIT1
172
173//
174// Default TimeOut value
175//
176#define TIS_TIMEOUT_A (750 * 1000) // 750ms
177#define TIS_TIMEOUT_B (2000 * 1000) // 2s
178#define TIS_TIMEOUT_C (750 * 1000) // 750ms
179#define TIS_TIMEOUT_D (750 * 1000) // 750ms
180
181#endif
UINT16 Vid
Definition: TpmTis.h:61
UINT16 Did
Definition: TpmTis.h:65
UINT8 Access
Definition: TpmTis.h:25
UINT32 IntfCapability
Definition: TpmTis.h:43
UINT32 LegacyAddress2Ex
Definition: TpmTis.h:86
UINT8 Status
Definition: TpmTis.h:47
UINT8 IntVector
Definition: TpmTis.h:34
UINT32 DataFifo
Definition: TpmTis.h:56
UINT32 IntEnable
Definition: TpmTis.h:30
UINT16 BurstCount
Definition: TpmTis.h:51
UINT32 LegacyAddress1
Definition: TpmTis.h:74
UINT32 IntSts
Definition: TpmTis.h:39
UINT32 LegacyAddress1Ex
Definition: TpmTis.h:78
UINT32 LegacyAddress2
Definition: TpmTis.h:82