AM62Px MCU+ SDK  10.01.00
tisci_protocol.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017-2024 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 
94 struct tisci_header {
95  uint16_t type;
96  uint8_t host;
97  uint8_t seq;
98  uint32_t flags;
99 };
100 
101 /*
102  * Messages sent via secure transport need an additional field for integrity
103  * check in addition to the fields of a TISCI message. The below data structure
104  * is used to enhance the standard TISCI message header with a field for
105  * integrity check and a reserved field for future use.
106  *
107  * The below defined header is placed before the \ref tisci_header when
108  * transmitting a message via a secure transport.
109  *
110  * For more information, please refer to the TISCI documentation.
111  */
112 
124  uint16_t integ_check;
125  uint16_t rsvd;
126 };
127 
128 /* TISCI Message IDs */
129 #define TISCI_MSG_VERSION (0x0002U)
130 #define TISCI_MSG_BOOT_NOTIFICATION (0x000AU)
131 #define TISCI_MSG_BOARD_CONFIG (0x000BU)
132 #define TISCI_MSG_BOARD_CONFIG_RM (0x000CU)
133 #define TISCI_MSG_BOARD_CONFIG_SECURITY (0x000DU)
134 #define TISCI_MSG_BOARD_CONFIG_PM (0x000EU)
135 
136 #define TISCI_MSG_ENABLE_WDT (0x0000U)
137 #define TISCI_MSG_WAKE_RESET (0x0001U)
138 #define TISCI_MSG_WAKE_REASON (0x0003U)
139 #define TISCI_MSG_GOODBYE (0x0004U)
140 #define TISCI_MSG_SYS_RESET (0x0005U)
141 
142 #define TISCI_MSG_QUERY_MSMC (0x0020U)
143 #define TISCI_MSG_GET_TRACE_CONFIG (0x0021U)
144 #define TISCI_MSG_QUERY_FW_CAPS (0x0022U)
145 
146 #define TISCI_MSG_SET_CLOCK (0x0100U)
147 #define TISCI_MSG_GET_CLOCK (0x0101U)
148 #define TISCI_MSG_SET_CLOCK_PARENT (0x0102U)
149 #define TISCI_MSG_GET_CLOCK_PARENT (0x0103U)
150 #define TISCI_MSG_GET_NUM_CLOCK_PARENTS (0x0104U)
151 #define TISCI_MSG_SET_FREQ (0x010cU)
152 #define TISCI_MSG_QUERY_FREQ (0x010dU)
153 #define TISCI_MSG_GET_FREQ (0x010eU)
154 
155 #define TISCI_MSG_SET_DEVICE (0x0200U)
156 #define TISCI_MSG_GET_DEVICE (0x0201U)
157 #define TISCI_MSG_SET_DEVICE_RESETS (0x0202U)
158 #define TISCI_MSG_DEVICE_DROP_POWERUP_REF (0x0203U)
159 
160 #define TISCI_MSG_PREPARE_SLEEP (0x0300U)
161 #define TISCI_MSG_ENTER_SLEEP (0x0301U)
162 
163 /*
164  * NOTE: These can likely be marked reserved here and defined in a
165  * tisci_protocol_priv.h?
166  */
167 #define TISCI_MSG_SYNC_RESUME (0x0302U)
168 #define TISCI_MSG_CONTINUE_RESUME (0x0303U)
169 #define TISCI_MSG_CORE_RESUME (0x0304U)
170 #define TISCI_MSG_ABORT_ENTER_SLEEP (0x0305U)
171 #define TISCI_MSG_LPM_WAKE_REASON (0x0306U)
172 #define TISCI_MSG_SET_IO_ISOLATION (0x0307U)
173 #define TISCI_MSG_MIN_CONTEXT_RESTORE (0x0308U)
174 #define TISCI_MSG_LPM_SET_DEVICE_CONSTRAINT (0x0309U)
175 #define TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT (0x030AU)
176 #define TISCI_MSG_LPM_GET_DEVICE_CONSTRAINT (0x030BU)
177 #define TISCI_MSG_LPM_GET_LATENCY_CONSTRAINT (0x030CU)
178 #define TISCI_MSG_LPM_GET_NEXT_SYS_MODE (0x030DU)
179 #define TISCI_MSG_LPM_GET_NEXT_HOST_STATE (0x030EU)
180 
181 #define TISCI_MSG_FIRMWARE_LOAD (0x8105U)
182 #define MSG_FIRMWARE_LOAD_RESULT (0x8805U)
183 
185 #define TISCI_MSG_SET_FWL_REGION (0x9000U)
186 
187 #define TISCI_MSG_GET_FWL_REGION (0x9001U)
188 
189 #define TISCI_MSG_CHANGE_FWL_OWNER (0x9002U)
190 
191 #define TISCI_MSG_SA2UL_SET_DKEK (0x9003U)
192 
193 #define TISCI_MSG_SA2UL_RELEASE_DKEK (0x9004U)
194 
195 #define TISCI_MSG_KEYSTORE_IMPORT_SKEY (0x9005U)
196 
197 #define TISCI_MSG_KEYSTORE_ERASE_SKEY (0x9006U)
198 /* Reserved ID not for (re)use */
199 #define TISCI_MSG_SEC_RESERVED_9007 (0x9007U)
200 /* Reserved ID not for (re)use */
201 #define TISCI_MSG_SEC_RESERVED_9008 (0x9008U)
202 
203 #define TISCI_MSG_SET_ISC_REGION (0x9009U)
204 
205 #define TISCI_MSG_GET_ISC_REGION (0x900AU)
206 
207 #define TISCI_MSG_FWL_EXCP_NOTIFICATION (0x900BU)
208 
209 #define TISCI_MSG_OPEN_DEBUG_FWLS (0x900CU)
210 
214 #define TISCI_MSG_KEYSTORE_WRITE (0x900DU)
215 
219 #define TISCI_MSG_KEYSTORE_EXPORT_ALL (0x900EU)
220 
221 #define TISCI_MSG_KEYSTORE_IMPORT_ALL (0x900FU)
222 /* Reserved ID not for (re)use */
223 #define TISCI_MSG_SEC_RESERVED_9010 (0x9010U)
224 /* Reserved ID not for (re)use */
225 #define TISCI_MSG_SEC_RESERVED_9011 (0x9011U)
226 /* Reserved ID not for (re)use */
227 #define TISCI_MSG_SEC_RESERVED_9012 (0x9012U)
228 /* Reserved ID not for (re)use */
229 #define TISCI_MSG_SEC_RESERVED_9013 (0x9013U)
230 /* Reserved ID not for (re)use */
231 #define TISCI_MSG_SEC_RESERVED_9014 (0x9014U)
232 /* Reserved ID not for (re)use */
233 #define TISCI_MSG_SEC_RESERVED_9015 (0x9015U)
234 
235 /* Reserved ID not for (re)use */
236 #define TISCI_MSG_SEC_RESERVED_9016 (0x9016U)
237 
239 #define TISCI_MSG_SA2UL_AUTH_RES_ACQUIRE (0x9017U)
240 
242 #define TISCI_MSG_SA2UL_AUTH_RES_RELEASE (0x9018U)
243 
244 /* Reserved ID not for (re)use */
245 #define TISCI_MSG_SEC_RESERVED_9020 (0x9020U)
246 
248 #define TISCI_MSG_GET_SOC_UID (0x9021U)
249 
250 /*********************************************************/
251 /* Messages for handling extended OTP area */
252 
254 #define TISCI_MSG_READ_OTP_MMR (0x9022U)
255 
257 #define TISCI_MSG_WRITE_OTP_ROW (0x9023U)
258 
260 #define TISCI_MSG_LOCK_OTP_ROW (0x9024U)
261 
263 #define TISCI_MSG_SOFT_LOCK_OTP_WRITE_GLOBAL (0x9025U)
264 
266 #define TISCI_MSG_GET_OTP_ROW_LOCK_STATUS (0x9026U)
267 
269 #define TISCI_MSG_RSVD_OTP_1 (0x9027U)
270 
272 #define TISCI_MSG_RSVD_OTP_2 (0x9028U)
273 
275 #define TISCI_MSG_SA2UL_GET_DKEK (0x9029U)
276 
278 #define TISCI_MSG_ALLOW_FWL_CTRL_READ (0x902CU)
279 
281 #define TISCI_MSG_FORBID_FWL_CTRL_READ (0x902DU)
282 
286 #define TISCI_MSG_SEC_HANDOVER (0x9030U)
287 
288 /******************************************************/
289 
290 /* Keywriter TISCI message to write keys from a certificate */
291 #define TISCI_MSG_KEY_WRITER (0x9031U)
292 
294 #define TISCI_MSG_WRITE_SWREV (0x9032U)
295 
297 #define TISCI_MSG_READ_SWREV (0x9033U)
298 
300 #define TISCI_MSG_READ_KEYCNT_KEYREV (0x9034U)
301 
303 #define TISCI_MSG_WRITE_KEYREV (0x9035U)
304 
306 #define TISCI_MSG_SA2UL_GET_DSMEK (0x9036U)
307 
309 #define TISCI_MSG_SA2UL_SET_DSMEK (0x9037U)
310 
312 #define TISCI_MSG_SA2UL_RELEASE_DSMEK (0x9038U)
313 
315 #define TISCI_MSG_KEYRING_IMPORT (0X9039U)
316 
318 #define TISCI_MSG_SA2UL_SET_DKEK_CONST (0x902AU)
319 
321 #define TISCI_MSG_SA2UL_GET_DKEK_CONST (0x902BU)
322 
324 #define TISCI_MSG_SA2UL_AES_ENCRYPT (0x9040U)
325 
327 #define TISCI_MSG_SA2UL_AES_DECRYPT (0x9041U)
328 
329 /* Processor Control APIs */
330 
332 #define TISCI_MSG_PROC_REQUEST (0xC000U)
333 
334 #define TISCI_MSG_PROC_RELEASE (0xC001U)
335 
336 #define TISCI_MSG_PROC_HANDOVER (0xC005U)
337 
339 #define TISCI_MSG_PROC_SET_CONFIG (0xC100U)
340 
341 #define TISCI_MSG_PROC_SET_CONTROL (0xC101U)
342 
344 #define TISCI_MSG_PROC_GET_STATUS (0xC400U)
345 
347 #define TISCI_MSG_PROC_WAIT_STATUS (0xC401U)
348 
350 #define TISCI_MSG_PROC_AUTH_BOOT (0xC120U)
351 
352 /* RM IDs */
353 
357 #define TISCI_MSG_RM_GET_RESOURCE_RANGE (0x1500U)
358 
361 #define TISCI_MSG_RM_IRQ_SET (0x1000U)
362 
365 #define TISCI_MSG_RM_IRQ_RELEASE (0x1001U)
366 /* Reserved ID not for (re)use */
367 #define TISCI_MSG_RM_RESERVED_1100 (0x1100U)
368 /* Reserved ID not for (re)use */
369 #define TISCI_MSG_RM_RESERVED_1101 (0x1101U)
370 /* Reserved ID not for (re)use */
371 #define TISCI_MSG_RM_RESERVED_1102 (0x1102U)
372 /* Reserved ID not for (re)use */
373 #define TISCI_MSG_RM_RESERVED_1103 (0x1103U)
374 
377 #define TISCI_MSG_RM_RING_CFG (0x1110U)
378 /* Reserved ID not for (re)use */
379 #define TISCI_MSG_RM_RESERVED_1111 (0x1111U)
380 
383 #define TISCI_MSG_RM_RING_MON_CFG (0x1120U)
384 /* Reserved ID not for (re)use */
385 #define TISCI_MSG_RM_RESERVED_1200 (0x1200U)
386 /* Reserved ID not for (re)use */
387 #define TISCI_MSG_RM_RESERVED_1201 (0x1201U)
388 
391 #define TISCI_MSG_RM_UDMAP_TX_CH_CFG (0x1205U)
392 /* Reserved ID not for (re)use */
393 #define TISCI_MSG_RM_RESERVED_1206 (0x1206U)
394 /* Reserved ID not for (re)use */
395 #define TISCI_MSG_RM_RESERVED_1210 (0x1210U)
396 /* Reserved ID not for (re)use */
397 #define TISCI_MSG_RM_RESERVED_1211 (0x1211U)
398 
401 #define TISCI_MSG_RM_UDMAP_RX_CH_CFG (0x1215U)
402 #define TISCI_MSG_RM_RESERVED_1216 (0x1216U)
403 /* Reserved ID not for (re)use */
404 #define TISCI_MSG_RM_RESERVED_1220 (0x1220U)
405 /* Reserved ID not for (re)use */
406 #define TISCI_MSG_RM_RESERVED_1221 (0x1221U)
407 
410 #define TISCI_MSG_RM_UDMAP_FLOW_CFG (0x1230U)
411 
415 #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG (0x1231U)
416 /* Reserved ID not for (re)use */
417 #define TISCI_MSG_RM_RESERVED_1232 (0x1232U)
418 /* Reserved ID not for (re)use */
419 #define TISCI_MSG_RM_RESERVED_1233 (0x1233U)
420 
423 #define TISCI_MSG_RM_UDMAP_FLOW_DELEGATE (0x1234U)
424 
428 #define TISCI_MSG_RM_UDMAP_GCFG_CFG (0x1240U)
429 /* Reserved ID not for (re)use */
430 #define TISCI_MSG_RM_RESERVED_1241 (0x1241U)
431 
434 #define TISCI_MSG_RM_PSIL_PAIR (0x1280U)
435 
438 #define TISCI_MSG_RM_PSIL_UNPAIR (0x1281U)
439 
442 #define TISCI_MSG_RM_PSIL_READ (0x1282U)
443 
446 #define TISCI_MSG_RM_PSIL_WRITE (0x1283U)
447 
451 #define TISCI_MSG_RM_PROXY_CFG (0x1300U)
452 
453 
454 #ifdef __cplusplus
455 }
456 #endif
457 
458 #endif /* TISCI_PROTOCOL_H */
459 
tisci_sec_header
Header that prefixes all TISCI messages sent via secure transport.
Definition: tisci_protocol.h:123
tisci_header::type
uint16_t type
Definition: tisci_protocol.h:95
tisci_header
Header that prefixes all TISCI messages.
Definition: tisci_protocol.h:94
tisci_sec_header::integ_check
uint16_t integ_check
Definition: tisci_protocol.h:124
tisci_header::flags
uint32_t flags
Definition: tisci_protocol.h:98
tisci_header::seq
uint8_t seq
Definition: tisci_protocol.h:97
tisci_sec_header::rsvd
uint16_t rsvd
Definition: tisci_protocol.h:125
tisci_header::host
uint8_t host
Definition: tisci_protocol.h:96