1
2
3
4
5
6 #ifndef _MEI_HW_TXE_REGS_H_
7 #define _MEI_HW_TXE_REGS_H_
8
9 #include "hw.h"
10
11 #define SEC_ALIVENESS_TIMER_TIMEOUT (5 * MSEC_PER_SEC)
12 #define SEC_ALIVENESS_WAIT_TIMEOUT (1 * MSEC_PER_SEC)
13 #define SEC_RESET_WAIT_TIMEOUT (1 * MSEC_PER_SEC)
14 #define SEC_READY_WAIT_TIMEOUT (5 * MSEC_PER_SEC)
15 #define START_MESSAGE_RESPONSE_WAIT_TIMEOUT (5 * MSEC_PER_SEC)
16 #define RESET_CANCEL_WAIT_TIMEOUT (1 * MSEC_PER_SEC)
17
18 enum {
19 SEC_BAR,
20 BRIDGE_BAR,
21
22 NUM_OF_MEM_BARS
23 };
24
25
26
27
28
29
30 #define PCI_CFG_TXE_FW_STS0 0x40
31 # define PCI_CFG_TXE_FW_STS0_WRK_ST_MSK 0x0000000F
32 # define PCI_CFG_TXE_FW_STS0_OP_ST_MSK 0x000001C0
33 # define PCI_CFG_TXE_FW_STS0_FW_INIT_CMPLT 0x00000200
34 # define PCI_CFG_TXE_FW_STS0_ERR_CODE_MSK 0x0000F000
35 # define PCI_CFG_TXE_FW_STS0_OP_MODE_MSK 0x000F0000
36 # define PCI_CFG_TXE_FW_STS0_RST_CNT_MSK 0x00F00000
37 #define PCI_CFG_TXE_FW_STS1 0x48
38
39 #define IPC_BASE_ADDR 0x80400
40
41
42 #define SEC_IPC_INPUT_DOORBELL_REG (0x0000 + IPC_BASE_ADDR)
43
44
45
46
47
48
49
50 #define SEC_IPC_INPUT_STATUS_REG (0x0008 + IPC_BASE_ADDR)
51 # define SEC_IPC_INPUT_STATUS_RDY BIT(0)
52
53
54 #define SEC_IPC_HOST_INT_STATUS_REG (0x0010 + IPC_BASE_ADDR)
55 #define SEC_IPC_HOST_INT_STATUS_OUT_DB BIT(0)
56 #define SEC_IPC_HOST_INT_STATUS_IN_RDY BIT(1)
57 #define SEC_IPC_HOST_INT_STATUS_HDCP_M0_RCVD BIT(5)
58 #define SEC_IPC_HOST_INT_STATUS_ILL_MEM_ACCESS BIT(17)
59 #define SEC_IPC_HOST_INT_STATUS_AES_HKEY_ERR BIT(18)
60 #define SEC_IPC_HOST_INT_STATUS_DES_HKEY_ERR BIT(19)
61 #define SEC_IPC_HOST_INT_STATUS_TMRMTB_OVERFLOW BIT(21)
62
63
64 #define SEC_IPC_HOST_INT_STATUS_PENDING \
65 (SEC_IPC_HOST_INT_STATUS_OUT_DB| \
66 SEC_IPC_HOST_INT_STATUS_IN_RDY)
67
68
69 #define SEC_IPC_HOST_INT_MASK_REG (0x0014 + IPC_BASE_ADDR)
70
71 # define SEC_IPC_HOST_INT_MASK_OUT_DB BIT(0)
72 # define SEC_IPC_HOST_INT_MASK_IN_RDY BIT(1)
73
74
75 #define SEC_IPC_INPUT_PAYLOAD_REG (0x0100 + IPC_BASE_ADDR)
76
77 #define IPC_SHARED_PAYLOAD_REG (0x0200 + IPC_BASE_ADDR)
78
79
80
81
82
83 #define SATT2_CTRL_REG 0x1040
84 # define SATT2_CTRL_VALID_MSK BIT(0)
85 # define SATT2_CTRL_BR_BASE_ADDR_REG_SHIFT 8
86 # define SATT2_CTRL_BRIDGE_HOST_EN_MSK BIT(12)
87
88
89 #define SATT2_SAP_BA_REG 0x1044
90
91 #define SATT2_SAP_SIZE_REG 0x1048
92
93 #define SATT2_BRG_BA_LSB_REG 0x104C
94
95
96 #define HHISR_REG 0x2020
97
98
99
100
101
102
103
104 #define HHIER_REG 0x2024
105 #define IPC_HHIER_SEC BIT(0)
106 #define IPC_HHIER_BRIDGE BIT(1)
107 #define IPC_HHIER_MSK (IPC_HHIER_SEC | IPC_HHIER_BRIDGE)
108
109
110
111
112
113
114 #define HHIMR_REG 0x2028
115 #define IPC_HHIMR_SEC BIT(0)
116 #define IPC_HHIMR_BRIDGE BIT(1)
117
118
119 #define HHIRQSR_REG 0x202C
120
121
122
123
124
125
126
127
128 #define HICR_SEC_IPC_READINESS_REG 0x2040
129 #define HICR_SEC_IPC_READINESS_HOST_RDY BIT(0)
130 #define HICR_SEC_IPC_READINESS_SEC_RDY BIT(1)
131 #define HICR_SEC_IPC_READINESS_SYS_RDY \
132 (HICR_SEC_IPC_READINESS_HOST_RDY | \
133 HICR_SEC_IPC_READINESS_SEC_RDY)
134 #define HICR_SEC_IPC_READINESS_RDY_CLR BIT(2)
135
136
137
138
139
140
141 #define HICR_HOST_ALIVENESS_RESP_REG 0x2044
142 #define HICR_HOST_ALIVENESS_RESP_ACK BIT(0)
143
144
145 #define HICR_SEC_IPC_OUTPUT_DOORBELL_REG 0x2048
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160 #define HISR_REG 0x2060
161 #define HISR_INT_0_STS BIT(0)
162 #define HISR_INT_1_STS BIT(1)
163 #define HISR_INT_2_STS BIT(2)
164 #define HISR_INT_3_STS BIT(3)
165 #define HISR_INT_4_STS BIT(4)
166 #define HISR_INT_5_STS BIT(5)
167 #define HISR_INT_6_STS BIT(6)
168 #define HISR_INT_7_STS BIT(7)
169 #define HISR_INT_STS_MSK \
170 (HISR_INT_0_STS | HISR_INT_1_STS | HISR_INT_2_STS)
171
172
173 #define HIER_REG 0x2064
174 #define HIER_INT_0_EN BIT(0)
175 #define HIER_INT_1_EN BIT(1)
176 #define HIER_INT_2_EN BIT(2)
177 #define HIER_INT_3_EN BIT(3)
178 #define HIER_INT_4_EN BIT(4)
179 #define HIER_INT_5_EN BIT(5)
180 #define HIER_INT_6_EN BIT(6)
181 #define HIER_INT_7_EN BIT(7)
182
183 #define HIER_INT_EN_MSK \
184 (HIER_INT_0_EN | HIER_INT_1_EN | HIER_INT_2_EN)
185
186
187
188
189
190
191 #define BRIDGE_IPC_OUTPUT_PAYLOAD_REG 0x20C0
192
193
194
195
196
197
198 #define SICR_HOST_ALIVENESS_REQ_REG 0x214C
199 #define SICR_HOST_ALIVENESS_REQ_REQUESTED BIT(0)
200
201
202
203
204
205
206
207
208
209 #define SICR_HOST_IPC_READINESS_REQ_REG 0x2150
210
211
212 #define SICR_HOST_IPC_READINESS_HOST_RDY BIT(0)
213 #define SICR_HOST_IPC_READINESS_SEC_RDY BIT(1)
214 #define SICR_HOST_IPC_READINESS_SYS_RDY \
215 (SICR_HOST_IPC_READINESS_HOST_RDY | \
216 SICR_HOST_IPC_READINESS_SEC_RDY)
217 #define SICR_HOST_IPC_READINESS_RDY_CLR BIT(2)
218
219
220
221
222
223
224
225
226 #define SICR_SEC_IPC_OUTPUT_STATUS_REG 0x2154
227 # define SEC_IPC_OUTPUT_STATUS_RDY BIT(0)
228
229
230
231
232 #define PAYLOAD_SIZE 64
233
234
235 #define SATT_RANGE_MAX (32 << 20)
236
237
238 #endif
239