AM62x MCU+ SDK  08.03.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 /* Processor Control APIs */
269 
271 #define TISCI_MSG_PROC_REQUEST (0xC000U)
272 
273 #define TISCI_MSG_PROC_RELEASE (0xC001U)
274 
275 #define TISCI_MSG_PROC_HANDOVER (0xC005U)
276 
278 #define TISCI_MSG_PROC_SET_CONFIG (0xC100U)
279 
280 #define TISCI_MSG_PROC_SET_CONTROL (0xC101U)
281 
283 #define TISCI_MSG_PROC_GET_STATUS (0xC400U)
284 
286 #define TISCI_MSG_PROC_WAIT_STATUS (0xC401U)
287 
289 #define TISCI_MSG_PROC_AUTH_BOOT (0xC120U)
290 
291 /* RM IDs */
292 
296 #define TISCI_MSG_RM_GET_RESOURCE_RANGE (0x1500U)
297 
300 #define TISCI_MSG_RM_IRQ_SET (0x1000U)
301 
304 #define TISCI_MSG_RM_IRQ_RELEASE (0x1001U)
305 /* Reserved ID not for (re)use */
306 #define TISCI_MSG_RM_RESERVED_1100 (0x1100U)
307 /* Reserved ID not for (re)use */
308 #define TISCI_MSG_RM_RESERVED_1101 (0x1101U)
309 /* Reserved ID not for (re)use */
310 #define TISCI_MSG_RM_RESERVED_1102 (0x1102U)
311 /* Reserved ID not for (re)use */
312 #define TISCI_MSG_RM_RESERVED_1103 (0x1103U)
313 
316 #define TISCI_MSG_RM_RING_CFG (0x1110U)
317 /* Reserved ID not for (re)use */
318 #define TISCI_MSG_RM_RESERVED_1111 (0x1111U)
319 
322 #define TISCI_MSG_RM_RING_MON_CFG (0x1120U)
323 /* Reserved ID not for (re)use */
324 #define TISCI_MSG_RM_RESERVED_1200 (0x1200U)
325 /* Reserved ID not for (re)use */
326 #define TISCI_MSG_RM_RESERVED_1201 (0x1201U)
327 
330 #define TISCI_MSG_RM_UDMAP_TX_CH_CFG (0x1205U)
331 /* Reserved ID not for (re)use */
332 #define TISCI_MSG_RM_RESERVED_1206 (0x1206U)
333 /* Reserved ID not for (re)use */
334 #define TISCI_MSG_RM_RESERVED_1210 (0x1210U)
335 /* Reserved ID not for (re)use */
336 #define TISCI_MSG_RM_RESERVED_1211 (0x1211U)
337 
340 #define TISCI_MSG_RM_UDMAP_RX_CH_CFG (0x1215U)
341 #define TISCI_MSG_RM_RESERVED_1216 (0x1216U)
342 /* Reserved ID not for (re)use */
343 #define TISCI_MSG_RM_RESERVED_1220 (0x1220U)
344 /* Reserved ID not for (re)use */
345 #define TISCI_MSG_RM_RESERVED_1221 (0x1221U)
346 
349 #define TISCI_MSG_RM_UDMAP_FLOW_CFG (0x1230U)
350 
354 #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG (0x1231U)
355 /* Reserved ID not for (re)use */
356 #define TISCI_MSG_RM_RESERVED_1232 (0x1232U)
357 /* Reserved ID not for (re)use */
358 #define TISCI_MSG_RM_RESERVED_1233 (0x1233U)
359 
362 #define TISCI_MSG_RM_UDMAP_FLOW_DELEGATE (0x1234U)
363 
367 #define TISCI_MSG_RM_UDMAP_GCFG_CFG (0x1240U)
368 /* Reserved ID not for (re)use */
369 #define TISCI_MSG_RM_RESERVED_1241 (0x1241U)
370 
373 #define TISCI_MSG_RM_PSIL_PAIR (0x1280U)
374 
377 #define TISCI_MSG_RM_PSIL_UNPAIR (0x1281U)
378 
381 #define TISCI_MSG_RM_PSIL_READ (0x1282U)
382 
385 #define TISCI_MSG_RM_PSIL_WRITE (0x1283U)
386 
390 #define TISCI_MSG_RM_PROXY_CFG (0x1300U)
391 
392 
393 #ifdef __cplusplus
394 }
395 #endif
396 
397 #endif /* TISCI_PROTOCOL_H */
398 
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