AM62x MCU+ SDK  08.04.00
tisci_protocol.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017-2022 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
54 #ifndef TISCI_PROTOCOL_H
55 #define TISCI_PROTOCOL_H
56 
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
62 
63 
67 #define TISCI_MSG_FLAG_RESERVED0 TISCI_BIT(0)
68 
75 #define TISCI_MSG_FLAG_AOP TISCI_BIT(1)
76 
78 #define TISCI_MSG_FLAG_SEC TISCI_BIT(2)
79 
84 #define TISCI_MSG_FLAG_ACK TISCI_BIT(1)
85 
95 struct tisci_header {
96  uint16_t type;
97  uint8_t host;
98  uint8_t seq;
99  uint32_t flags;
100  /* Windows Visual Studio build has issues with payload[], changing it only for visual studio build */
101 #ifdef _MSC_VER
102  uint8_t payload;
103 #else
104  uint8_t payload[];
105 #endif
106 };
107 
108 /*
109  * Messages sent via secure transport need an additional field for integrity
110  * check in addition to the fields of a TISCI message. The below data structure
111  * is used to enhance the standard TISCI message header with a field for
112  * integrity check and a reserved field for future use.
113  *
114  * The below defined header is placed before the \ref tisci_header when
115  * transmitting a message via a secure transport.
116  *
117  * For more information, please refer to the TISCI documentation.
118  */
119 
131  uint16_t integ_check;
132  uint16_t rsvd;
133 };
134 
135 /* TISCI Message IDs */
136 #define TISCI_MSG_VERSION (0x0002U)
137 #define TISCI_MSG_BOOT_NOTIFICATION (0x000AU)
138 #define TISCI_MSG_BOARD_CONFIG (0x000BU)
139 #define TISCI_MSG_BOARD_CONFIG_RM (0x000CU)
140 #define TISCI_MSG_BOARD_CONFIG_SECURITY (0x000DU)
141 #define TISCI_MSG_BOARD_CONFIG_PM (0x000EU)
142 
143 #define TISCI_MSG_ENABLE_WDT (0x0000U)
144 #define TISCI_MSG_WAKE_RESET (0x0001U)
145 #define TISCI_MSG_WAKE_REASON (0x0003U)
146 #define TISCI_MSG_GOODBYE (0x0004U)
147 #define TISCI_MSG_SYS_RESET (0x0005U)
148 
149 #define TISCI_MSG_QUERY_MSMC (0x0020U)
150 
151 #define TISCI_MSG_SET_CLOCK (0x0100U)
152 #define TISCI_MSG_GET_CLOCK (0x0101U)
153 #define TISCI_MSG_SET_CLOCK_PARENT (0x0102U)
154 #define TISCI_MSG_GET_CLOCK_PARENT (0x0103U)
155 #define TISCI_MSG_GET_NUM_CLOCK_PARENTS (0x0104U)
156 #define TISCI_MSG_SET_FREQ (0x010cU)
157 #define TISCI_MSG_QUERY_FREQ (0x010dU)
158 #define TISCI_MSG_GET_FREQ (0x010eU)
159 
160 #define TISCI_MSG_SET_DEVICE (0x0200U)
161 #define TISCI_MSG_GET_DEVICE (0x0201U)
162 #define TISCI_MSG_SET_DEVICE_RESETS (0x0202U)
163 #define TISCI_MSG_DEVICE_DROP_POWERUP_REF (0x0203U)
164 
166 #define TISCI_MSG_SET_FWL_REGION (0x9000U)
167 
168 #define TISCI_MSG_GET_FWL_REGION (0x9001U)
169 
170 #define TISCI_MSG_CHANGE_FWL_OWNER (0x9002U)
171 
172 #define TISCI_MSG_SA2UL_SET_DKEK (0x9003U)
173 
174 #define TISCI_MSG_SA2UL_RELEASE_DKEK (0x9004U)
175 
176 #define TISCI_MSG_KEYSTORE_IMPORT_SKEY (0x9005U)
177 
178 #define TISCI_MSG_KEYSTORE_ERASE_SKEY (0x9006U)
179 /* Reserved ID not for (re)use */
180 #define TISCI_MSG_SEC_RESERVED_9007 (0x9007U)
181 /* Reserved ID not for (re)use */
182 #define TISCI_MSG_SEC_RESERVED_9008 (0x9008U)
183 
184 #define TISCI_MSG_SET_ISC_REGION (0x9009U)
185 
186 #define TISCI_MSG_GET_ISC_REGION (0x900AU)
187 
188 #define TISCI_MSG_FWL_EXCP_NOTIFICATION (0x900BU)
189 
190 #define TISCI_MSG_OPEN_DEBUG_FWLS (0x900CU)
191 
195 #define TISCI_MSG_KEYSTORE_WRITE (0x900DU)
196 
200 #define TISCI_MSG_KEYSTORE_EXPORT_ALL (0x900EU)
201 
202 #define TISCI_MSG_KEYSTORE_IMPORT_ALL (0x900FU)
203 /* Reserved ID not for (re)use */
204 #define TISCI_MSG_SEC_RESERVED_9010 (0x9010U)
205 /* Reserved ID not for (re)use */
206 #define TISCI_MSG_SEC_RESERVED_9011 (0x9011U)
207 /* Reserved ID not for (re)use */
208 #define TISCI_MSG_SEC_RESERVED_9012 (0x9012U)
209 /* Reserved ID not for (re)use */
210 #define TISCI_MSG_SEC_RESERVED_9013 (0x9013U)
211 /* Reserved ID not for (re)use */
212 #define TISCI_MSG_SEC_RESERVED_9014 (0x9014U)
213 /* Reserved ID not for (re)use */
214 #define TISCI_MSG_SEC_RESERVED_9015 (0x9015U)
215 
216 /* Reserved ID not for (re)use */
217 #define TISCI_MSG_SEC_RESERVED_9016 (0x9016U)
218 
220 #define TISCI_MSG_SA2UL_AUTH_RES_ACQUIRE (0x9017U)
221 
223 #define TISCI_MSG_SA2UL_AUTH_RES_RELEASE (0x9018U)
224 
225 /* Reserved ID not for (re)use */
226 #define TISCI_MSG_SEC_RESERVED_9020 (0x9020U)
227 
229 #define TISCI_MSG_GET_SOC_UID (0x9021U)
230 
231 /*********************************************************/
232 /* Messages for handling extended OTP area */
233 
235 #define TISCI_MSG_READ_OTP_MMR (0x9022U)
236 
238 #define TISCI_MSG_WRITE_OTP_ROW (0x9023U)
239 
241 #define TISCI_MSG_LOCK_OTP_ROW (0x9024U)
242 
244 #define TISCI_MSG_SOFT_LOCK_OTP_WRITE_GLOBAL (0x9025U)
245 
247 #define TISCI_MSG_GET_OTP_ROW_LOCK_STATUS (0x9026U)
248 
250 #define TISCI_MSG_RSVD_OTP_1 (0x9027U)
251 
253 #define TISCI_MSG_RSVD_OTP_2 (0x9028U)
254 
256 #define TISCI_MSG_SA2UL_GET_DKEK (0x9029U)
257 
261 #define TISCI_MSG_SEC_HANDOVER (0x9030U)
262 
263 /******************************************************/
264 
265 /* Keywriter TISCI message to write keys from a certificate */
266 #define TISCI_MSG_KEY_WRITER (0x9031U)
267 
268 /* SWREV TISCI messages */
269 
270 /* SWREV TISCI message to write software revision to eFUSE */
271 #define TISCI_MSG_WRITE_SWREV (0x9032U)
272 
273 /* SWREV TISCI message to read software revision from eFUSE */
274 #define TISCI_MSG_READ_SWREV (0x9033U)
275 
276 /* Processor Control APIs */
277 
279 #define TISCI_MSG_PROC_REQUEST (0xC000U)
280 
281 #define TISCI_MSG_PROC_RELEASE (0xC001U)
282 
283 #define TISCI_MSG_PROC_HANDOVER (0xC005U)
284 
286 #define TISCI_MSG_PROC_SET_CONFIG (0xC100U)
287 
288 #define TISCI_MSG_PROC_SET_CONTROL (0xC101U)
289 
291 #define TISCI_MSG_PROC_GET_STATUS (0xC400U)
292 
294 #define TISCI_MSG_PROC_WAIT_STATUS (0xC401U)
295 
297 #define TISCI_MSG_PROC_AUTH_BOOT (0xC120U)
298 
299 /* RM IDs */
300 
304 #define TISCI_MSG_RM_GET_RESOURCE_RANGE (0x1500U)
305 
308 #define TISCI_MSG_RM_IRQ_SET (0x1000U)
309 
312 #define TISCI_MSG_RM_IRQ_RELEASE (0x1001U)
313 /* Reserved ID not for (re)use */
314 #define TISCI_MSG_RM_RESERVED_1100 (0x1100U)
315 /* Reserved ID not for (re)use */
316 #define TISCI_MSG_RM_RESERVED_1101 (0x1101U)
317 /* Reserved ID not for (re)use */
318 #define TISCI_MSG_RM_RESERVED_1102 (0x1102U)
319 /* Reserved ID not for (re)use */
320 #define TISCI_MSG_RM_RESERVED_1103 (0x1103U)
321 
324 #define TISCI_MSG_RM_RING_CFG (0x1110U)
325 /* Reserved ID not for (re)use */
326 #define TISCI_MSG_RM_RESERVED_1111 (0x1111U)
327 
330 #define TISCI_MSG_RM_RING_MON_CFG (0x1120U)
331 /* Reserved ID not for (re)use */
332 #define TISCI_MSG_RM_RESERVED_1200 (0x1200U)
333 /* Reserved ID not for (re)use */
334 #define TISCI_MSG_RM_RESERVED_1201 (0x1201U)
335 
338 #define TISCI_MSG_RM_UDMAP_TX_CH_CFG (0x1205U)
339 /* Reserved ID not for (re)use */
340 #define TISCI_MSG_RM_RESERVED_1206 (0x1206U)
341 /* Reserved ID not for (re)use */
342 #define TISCI_MSG_RM_RESERVED_1210 (0x1210U)
343 /* Reserved ID not for (re)use */
344 #define TISCI_MSG_RM_RESERVED_1211 (0x1211U)
345 
348 #define TISCI_MSG_RM_UDMAP_RX_CH_CFG (0x1215U)
349 #define TISCI_MSG_RM_RESERVED_1216 (0x1216U)
350 /* Reserved ID not for (re)use */
351 #define TISCI_MSG_RM_RESERVED_1220 (0x1220U)
352 /* Reserved ID not for (re)use */
353 #define TISCI_MSG_RM_RESERVED_1221 (0x1221U)
354 
357 #define TISCI_MSG_RM_UDMAP_FLOW_CFG (0x1230U)
358 
362 #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG (0x1231U)
363 /* Reserved ID not for (re)use */
364 #define TISCI_MSG_RM_RESERVED_1232 (0x1232U)
365 /* Reserved ID not for (re)use */
366 #define TISCI_MSG_RM_RESERVED_1233 (0x1233U)
367 
370 #define TISCI_MSG_RM_UDMAP_FLOW_DELEGATE (0x1234U)
371 
375 #define TISCI_MSG_RM_UDMAP_GCFG_CFG (0x1240U)
376 /* Reserved ID not for (re)use */
377 #define TISCI_MSG_RM_RESERVED_1241 (0x1241U)
378 
381 #define TISCI_MSG_RM_PSIL_PAIR (0x1280U)
382 
385 #define TISCI_MSG_RM_PSIL_UNPAIR (0x1281U)
386 
389 #define TISCI_MSG_RM_PSIL_READ (0x1282U)
390 
393 #define TISCI_MSG_RM_PSIL_WRITE (0x1283U)
394 
398 #define TISCI_MSG_RM_PROXY_CFG (0x1300U)
399 
400 
401 #ifdef __cplusplus
402 }
403 #endif
404 
405 #endif /* TISCI_PROTOCOL_H */
406 
tisci_sec_header
Header that prefixes all TISCI messages sent via secure transport.
Definition: tisci_protocol.h:130
tisci_header::type
uint16_t type
Definition: tisci_protocol.h:96
tisci_header::payload
uint8_t payload[]
Definition: tisci_protocol.h:104
tisci_header
Header that prefixes all TISCI messages.
Definition: tisci_protocol.h:95
tisci_sec_header::integ_check
uint16_t integ_check
Definition: tisci_protocol.h:131
tisci_header::flags
uint32_t flags
Definition: tisci_protocol.h:99
tisci_header::seq
uint8_t seq
Definition: tisci_protocol.h:98
tisci_sec_header::rsvd
uint16_t rsvd
Definition: tisci_protocol.h:132
tisci_header::host
uint8_t host
Definition: tisci_protocol.h:97