AM64x MCU+ SDK  08.02.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 
61 #define TISCI_MSG_FLAG_RESERVED0 TISCI_BIT(0)
62 
69 #define TISCI_MSG_FLAG_AOP TISCI_BIT(1)
70 
72 #define TISCI_MSG_FLAG_SEC TISCI_BIT(2)
73 
78 #define TISCI_MSG_FLAG_ACK TISCI_BIT(1)
79 
89 struct tisci_header {
90  uint16_t type;
91  uint8_t host;
92  uint8_t seq;
93  uint32_t flags;
94  /* Windows Visual Studio build has issues with payload[], changing it only for visual studio build */
95 #ifdef _MSC_VER
96  uint8_t payload;
97 #else
98  uint8_t payload[];
99 #endif
100 };
101 
102 /*
103  * Messages sent via secure transport need an additional field for integrity
104  * check in addition to the fields of a TISCI message. The below data structure
105  * is used to enhance the standard TISCI message header with a field for
106  * integrity check and a reserved field for future use.
107  *
108  * The below defined header is placed before the \ref tisci_header when
109  * transmitting a message via a secure transport.
110  *
111  * For more information, please refer to the TISCI documentation.
112  */
113 
125  uint16_t integ_check;
126  uint16_t rsvd;
127 };
128 
129 /* TISCI Message IDs */
130 #define TISCI_MSG_VERSION (0x0002U)
131 #define TISCI_MSG_BOOT_NOTIFICATION (0x000AU)
132 #define TISCI_MSG_BOARD_CONFIG (0x000BU)
133 #define TISCI_MSG_BOARD_CONFIG_RM (0x000CU)
134 #define TISCI_MSG_BOARD_CONFIG_SECURITY (0x000DU)
135 #define TISCI_MSG_BOARD_CONFIG_PM (0x000EU)
136 
137 #define TISCI_MSG_ENABLE_WDT (0x0000U)
138 #define TISCI_MSG_WAKE_RESET (0x0001U)
139 #define TISCI_MSG_WAKE_REASON (0x0003U)
140 #define TISCI_MSG_GOODBYE (0x0004U)
141 #define TISCI_MSG_SYS_RESET (0x0005U)
142 
143 #define TISCI_MSG_QUERY_MSMC (0x0020U)
144 
145 #define TISCI_MSG_SET_CLOCK (0x0100U)
146 #define TISCI_MSG_GET_CLOCK (0x0101U)
147 #define TISCI_MSG_SET_CLOCK_PARENT (0x0102U)
148 #define TISCI_MSG_GET_CLOCK_PARENT (0x0103U)
149 #define TISCI_MSG_GET_NUM_CLOCK_PARENTS (0x0104U)
150 #define TISCI_MSG_SET_FREQ (0x010cU)
151 #define TISCI_MSG_QUERY_FREQ (0x010dU)
152 #define TISCI_MSG_GET_FREQ (0x010eU)
153 
154 #define TISCI_MSG_SET_DEVICE (0x0200U)
155 #define TISCI_MSG_GET_DEVICE (0x0201U)
156 #define TISCI_MSG_SET_DEVICE_RESETS (0x0202U)
157 #define TISCI_MSG_DEVICE_DROP_POWERUP_REF (0x0203U)
158 
160 #define TISCI_MSG_SET_FWL_REGION (0x9000U)
161 
162 #define TISCI_MSG_GET_FWL_REGION (0x9001U)
163 
164 #define TISCI_MSG_CHANGE_FWL_OWNER (0x9002U)
165 
166 #define TISCI_MSG_SA2UL_SET_DKEK (0x9003U)
167 
168 #define TISCI_MSG_SA2UL_RELEASE_DKEK (0x9004U)
169 
170 #define TISCI_MSG_KEYSTORE_IMPORT_SKEY (0x9005U)
171 
172 #define TISCI_MSG_KEYSTORE_ERASE_SKEY (0x9006U)
173 /* Reserved ID not for (re)use */
174 #define TISCI_MSG_SEC_RESERVED_9007 (0x9007U)
175 /* Reserved ID not for (re)use */
176 #define TISCI_MSG_SEC_RESERVED_9008 (0x9008U)
177 
178 #define TISCI_MSG_SET_ISC_REGION (0x9009U)
179 
180 #define TISCI_MSG_GET_ISC_REGION (0x900AU)
181 
182 #define TISCI_MSG_FWL_EXCP_NOTIFICATION (0x900BU)
183 
184 #define TISCI_MSG_OPEN_DEBUG_FWLS (0x900CU)
185 
189 #define TISCI_MSG_KEYSTORE_WRITE (0x900DU)
190 
194 #define TISCI_MSG_KEYSTORE_EXPORT_ALL (0x900EU)
195 
196 #define TISCI_MSG_KEYSTORE_IMPORT_ALL (0x900FU)
197 /* Reserved ID not for (re)use */
198 #define TISCI_MSG_SEC_RESERVED_9010 (0x9010U)
199 /* Reserved ID not for (re)use */
200 #define TISCI_MSG_SEC_RESERVED_9011 (0x9011U)
201 /* Reserved ID not for (re)use */
202 #define TISCI_MSG_SEC_RESERVED_9012 (0x9012U)
203 /* Reserved ID not for (re)use */
204 #define TISCI_MSG_SEC_RESERVED_9013 (0x9013U)
205 /* Reserved ID not for (re)use */
206 #define TISCI_MSG_SEC_RESERVED_9014 (0x9014U)
207 /* Reserved ID not for (re)use */
208 #define TISCI_MSG_SEC_RESERVED_9015 (0x9015U)
209 
210 /* Reserved ID not for (re)use */
211 #define TISCI_MSG_SEC_RESERVED_9016 (0x9016U)
212 
214 #define TISCI_MSG_SA2UL_AUTH_RES_ACQUIRE (0x9017U)
215 
217 #define TISCI_MSG_SA2UL_AUTH_RES_RELEASE (0x9018U)
218 
219 /* Reserved ID not for (re)use */
220 #define TISCI_MSG_SEC_RESERVED_9020 (0x9020U)
221 
223 #define TISCI_MSG_GET_SOC_UID (0x9021U)
224 
225 /*********************************************************/
226 /* Messages for handling extended OTP area */
227 
229 #define TISCI_MSG_READ_OTP_MMR (0x9022U)
230 
232 #define TISCI_MSG_WRITE_OTP_ROW (0x9023U)
233 
235 #define TISCI_MSG_LOCK_OTP_ROW (0x9024U)
236 
238 #define TISCI_MSG_SOFT_LOCK_OTP_WRITE_GLOBAL (0x9025U)
239 
241 #define TISCI_MSG_GET_OTP_ROW_LOCK_STATUS (0x9026U)
242 
244 #define TISCI_MSG_RSVD_OTP_1 (0x9027U)
245 
247 #define TISCI_MSG_RSVD_OTP_2 (0x9028U)
248 
250 #define TISCI_MSG_SA2UL_GET_DKEK (0x9029U)
251 
255 #define TISCI_MSG_SEC_HANDOVER (0x9030U)
256 
257 /******************************************************/
258 
259 /* Keywriter TISCI message to write keys from a certificate */
260 #define TISCI_MSG_KEY_WRITER (0x9031U)
261 
262 /* Processor Control APIs */
263 
265 #define TISCI_MSG_PROC_REQUEST (0xC000U)
266 
267 #define TISCI_MSG_PROC_RELEASE (0xC001U)
268 
269 #define TISCI_MSG_PROC_HANDOVER (0xC005U)
270 
272 #define TISCI_MSG_PROC_SET_CONFIG (0xC100U)
273 
274 #define TISCI_MSG_PROC_SET_CONTROL (0xC101U)
275 
277 #define TISCI_MSG_PROC_GET_STATUS (0xC400U)
278 
280 #define TISCI_MSG_PROC_WAIT_STATUS (0xC401U)
281 
283 #define TISCI_MSG_PROC_AUTH_BOOT (0xC120U)
284 
285 /* RM IDs */
286 
290 #define TISCI_MSG_RM_GET_RESOURCE_RANGE (0x1500U)
291 
294 #define TISCI_MSG_RM_IRQ_SET (0x1000U)
295 
298 #define TISCI_MSG_RM_IRQ_RELEASE (0x1001U)
299 /* Reserved ID not for (re)use */
300 #define TISCI_MSG_RM_RESERVED_1100 (0x1100U)
301 /* Reserved ID not for (re)use */
302 #define TISCI_MSG_RM_RESERVED_1101 (0x1101U)
303 /* Reserved ID not for (re)use */
304 #define TISCI_MSG_RM_RESERVED_1102 (0x1102U)
305 /* Reserved ID not for (re)use */
306 #define TISCI_MSG_RM_RESERVED_1103 (0x1103U)
307 
310 #define TISCI_MSG_RM_RING_CFG (0x1110U)
311 /* Reserved ID not for (re)use */
312 #define TISCI_MSG_RM_RESERVED_1111 (0x1111U)
313 
316 #define TISCI_MSG_RM_RING_MON_CFG (0x1120U)
317 /* Reserved ID not for (re)use */
318 #define TISCI_MSG_RM_RESERVED_1200 (0x1200U)
319 /* Reserved ID not for (re)use */
320 #define TISCI_MSG_RM_RESERVED_1201 (0x1201U)
321 
324 #define TISCI_MSG_RM_UDMAP_TX_CH_CFG (0x1205U)
325 /* Reserved ID not for (re)use */
326 #define TISCI_MSG_RM_RESERVED_1206 (0x1206U)
327 /* Reserved ID not for (re)use */
328 #define TISCI_MSG_RM_RESERVED_1210 (0x1210U)
329 /* Reserved ID not for (re)use */
330 #define TISCI_MSG_RM_RESERVED_1211 (0x1211U)
331 
334 #define TISCI_MSG_RM_UDMAP_RX_CH_CFG (0x1215U)
335 #define TISCI_MSG_RM_RESERVED_1216 (0x1216U)
336 /* Reserved ID not for (re)use */
337 #define TISCI_MSG_RM_RESERVED_1220 (0x1220U)
338 /* Reserved ID not for (re)use */
339 #define TISCI_MSG_RM_RESERVED_1221 (0x1221U)
340 
343 #define TISCI_MSG_RM_UDMAP_FLOW_CFG (0x1230U)
344 
348 #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG (0x1231U)
349 /* Reserved ID not for (re)use */
350 #define TISCI_MSG_RM_RESERVED_1232 (0x1232U)
351 /* Reserved ID not for (re)use */
352 #define TISCI_MSG_RM_RESERVED_1233 (0x1233U)
353 
356 #define TISCI_MSG_RM_UDMAP_FLOW_DELEGATE (0x1234U)
357 
361 #define TISCI_MSG_RM_UDMAP_GCFG_CFG (0x1240U)
362 /* Reserved ID not for (re)use */
363 #define TISCI_MSG_RM_RESERVED_1241 (0x1241U)
364 
367 #define TISCI_MSG_RM_PSIL_PAIR (0x1280U)
368 
371 #define TISCI_MSG_RM_PSIL_UNPAIR (0x1281U)
372 
375 #define TISCI_MSG_RM_PSIL_READ (0x1282U)
376 
379 #define TISCI_MSG_RM_PSIL_WRITE (0x1283U)
380 
384 #define TISCI_MSG_RM_PROXY_CFG (0x1300U)
385 
386 #endif /* TISCI_PROTOCOL_H */
387 
tisci_sec_header
Header that prefixes all TISCI messages sent via secure transport.
Definition: tisci_protocol.h:124
tisci_header::type
uint16_t type
Definition: tisci_protocol.h:90
tisci_header::payload
uint8_t payload[]
Definition: tisci_protocol.h:98
tisci_header
Header that prefixes all TISCI messages.
Definition: tisci_protocol.h:89
tisci_sec_header::integ_check
uint16_t integ_check
Definition: tisci_protocol.h:125
tisci_header::flags
uint32_t flags
Definition: tisci_protocol.h:93
tisci_header::seq
uint8_t seq
Definition: tisci_protocol.h:92
tisci_sec_header::rsvd
uint16_t rsvd
Definition: tisci_protocol.h:126
tisci_header::host
uint8_t host
Definition: tisci_protocol.h:91