xref: /aosp_15_r20/external/coreboot/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-csrs-dap.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 #ifndef __BDK_CSRS_DAP_H__
2 #define __BDK_CSRS_DAP_H__
3 /* This file is auto-generated. Do not edit */
4 
5 /***********************license start***************
6  * Copyright (c) 2003-2017  Cavium Inc. ([email protected]). All rights
7  * reserved.
8  *
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are
12  * met:
13  *
14  *   * Redistributions of source code must retain the above copyright
15  *     notice, this list of conditions and the following disclaimer.
16  *
17  *   * Redistributions in binary form must reproduce the above
18  *     copyright notice, this list of conditions and the following
19  *     disclaimer in the documentation and/or other materials provided
20  *     with the distribution.
21 
22  *   * Neither the name of Cavium Inc. nor the names of
23  *     its contributors may be used to endorse or promote products
24  *     derived from this software without specific prior written
25  *     permission.
26 
27  * This Software, including technical data, may be subject to U.S. export  control
28  * laws, including the U.S. Export Administration Act and its  associated
29  * regulations, and may be subject to export or import  regulations in other
30  * countries.
31 
32  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
33  * AND WITH ALL FAULTS AND CAVIUM  NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR
34  * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
35  * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
36  * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
37  * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
38  * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
39  * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
40  * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
41  * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
42  ***********************license end**************************************/
43 
44 
45 /**
46  * @file
47  *
48  * Configuration and status register (CSR) address and type definitions for
49  * Cavium DAP.
50  *
51  * This file is auto generated. Do not edit.
52  *
53  */
54 
55 /**
56  * Enumeration dap_bar_e
57  *
58  * DAP Base Address Register Enumeration
59  * Enumerates the base address registers.
60  */
61 #define BDK_DAP_BAR_E_DAP_PF_BAR0 (0x87e002000000ll)
62 #define BDK_DAP_BAR_E_DAP_PF_BAR0_SIZE 0x100000ull
63 #define BDK_DAP_BAR_E_DAP_PF_BAR2_CN8 (0x87a080000000ll)
64 #define BDK_DAP_BAR_E_DAP_PF_BAR2_CN8_SIZE 0x2000000ull
65 #define BDK_DAP_BAR_E_DAP_PF_BAR2_CN9 (0x87a000000000ll)
66 #define BDK_DAP_BAR_E_DAP_PF_BAR2_CN9_SIZE 0x100000000ull
67 
68 /**
69  * Register (RSL) dap_const
70  *
71  * DAP Constant Register
72  * This register contains constant for software discovery.
73  */
74 union bdk_dap_const
75 {
76     uint64_t u;
77     struct bdk_dap_const_s
78     {
79 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
80         uint64_t reserved_0_63         : 64;
81 #else /* Word 0 - Little Endian */
82         uint64_t reserved_0_63         : 64;
83 #endif /* Word 0 - End */
84     } s;
85     /* struct bdk_dap_const_s cn; */
86 };
87 typedef union bdk_dap_const bdk_dap_const_t;
88 
89 #define BDK_DAP_CONST BDK_DAP_CONST_FUNC()
90 static inline uint64_t BDK_DAP_CONST_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_CONST_FUNC(void)91 static inline uint64_t BDK_DAP_CONST_FUNC(void)
92 {
93     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
94         return 0x87e002000130ll;
95     __bdk_csr_fatal("DAP_CONST", 0, 0, 0, 0, 0);
96 }
97 
98 #define typedef_BDK_DAP_CONST bdk_dap_const_t
99 #define bustype_BDK_DAP_CONST BDK_CSR_TYPE_RSL
100 #define basename_BDK_DAP_CONST "DAP_CONST"
101 #define device_bar_BDK_DAP_CONST 0x0 /* PF_BAR0 */
102 #define busnum_BDK_DAP_CONST 0
103 #define arguments_BDK_DAP_CONST -1,-1,-1,-1
104 
105 /**
106  * Register (RSL) dap_eco
107  *
108  * INTERNAL: DAP ECO Register
109  */
110 union bdk_dap_eco
111 {
112     uint64_t u;
113     struct bdk_dap_eco_s
114     {
115 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
116         uint64_t reserved_32_63        : 32;
117         uint64_t eco_ro                : 16; /**< [ 31: 16](RO) Reserved for ECO usage. */
118         uint64_t eco_rw                : 16; /**< [ 15:  0](R/W) Reserved for ECO usage. */
119 #else /* Word 0 - Little Endian */
120         uint64_t eco_rw                : 16; /**< [ 15:  0](R/W) Reserved for ECO usage. */
121         uint64_t eco_ro                : 16; /**< [ 31: 16](RO) Reserved for ECO usage. */
122         uint64_t reserved_32_63        : 32;
123 #endif /* Word 0 - End */
124     } s;
125     /* struct bdk_dap_eco_s cn; */
126 };
127 typedef union bdk_dap_eco bdk_dap_eco_t;
128 
129 #define BDK_DAP_ECO BDK_DAP_ECO_FUNC()
130 static inline uint64_t BDK_DAP_ECO_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_ECO_FUNC(void)131 static inline uint64_t BDK_DAP_ECO_FUNC(void)
132 {
133     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
134         return 0x87e002000120ll;
135     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
136         return 0x87e002000120ll;
137     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
138         return 0x87e002000120ll;
139     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
140         return 0x87e002000120ll;
141     __bdk_csr_fatal("DAP_ECO", 0, 0, 0, 0, 0);
142 }
143 
144 #define typedef_BDK_DAP_ECO bdk_dap_eco_t
145 #define bustype_BDK_DAP_ECO BDK_CSR_TYPE_RSL
146 #define basename_BDK_DAP_ECO "DAP_ECO"
147 #define device_bar_BDK_DAP_ECO 0x0 /* PF_BAR0 */
148 #define busnum_BDK_DAP_ECO 0
149 #define arguments_BDK_DAP_ECO -1,-1,-1,-1
150 
151 /**
152  * Register (RSL32b) dap_hwpoll_cnt
153  *
154  * DAP Hardware Poll Counter Register
155  */
156 union bdk_dap_hwpoll_cnt
157 {
158     uint32_t u;
159     struct bdk_dap_hwpoll_cnt_s
160     {
161 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
162         uint32_t poll_dis              : 1;  /**< [ 31: 31](R/W) Disable hardware polling. For diagnostic use only. */
163         uint32_t reserved_16_30        : 15;
164         uint32_t count                 : 16; /**< [ 15:  0](R/W) Number of coprocessor-clocks between DAP bus poll intervals.
165                                                                  With the approximate transaction delay of 256 cycles, the default
166                                                                  results in a poll approximately every 2048 cycles.
167                                                                  Must not be zero. For diagnostic use only. */
168 #else /* Word 0 - Little Endian */
169         uint32_t count                 : 16; /**< [ 15:  0](R/W) Number of coprocessor-clocks between DAP bus poll intervals.
170                                                                  With the approximate transaction delay of 256 cycles, the default
171                                                                  results in a poll approximately every 2048 cycles.
172                                                                  Must not be zero. For diagnostic use only. */
173         uint32_t reserved_16_30        : 15;
174         uint32_t poll_dis              : 1;  /**< [ 31: 31](R/W) Disable hardware polling. For diagnostic use only. */
175 #endif /* Word 0 - End */
176     } s;
177     struct bdk_dap_hwpoll_cnt_cn88xxp1
178     {
179 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
180         uint32_t reserved_31           : 1;
181         uint32_t reserved_16_30        : 15;
182         uint32_t count                 : 16; /**< [ 15:  0](R/W) Number of coprocessor-clocks between DAP bus poll intervals.
183                                                                  With the approximate transaction delay of 256 cycles, the default
184                                                                  results in a poll approximately every 2048 cycles.
185                                                                  Must not be zero. For diagnostic use only. */
186 #else /* Word 0 - Little Endian */
187         uint32_t count                 : 16; /**< [ 15:  0](R/W) Number of coprocessor-clocks between DAP bus poll intervals.
188                                                                  With the approximate transaction delay of 256 cycles, the default
189                                                                  results in a poll approximately every 2048 cycles.
190                                                                  Must not be zero. For diagnostic use only. */
191         uint32_t reserved_16_30        : 15;
192         uint32_t reserved_31           : 1;
193 #endif /* Word 0 - End */
194     } cn88xxp1;
195     /* struct bdk_dap_hwpoll_cnt_s cn9; */
196     /* struct bdk_dap_hwpoll_cnt_s cn81xx; */
197     /* struct bdk_dap_hwpoll_cnt_s cn83xx; */
198     /* struct bdk_dap_hwpoll_cnt_s cn88xxp2; */
199 };
200 typedef union bdk_dap_hwpoll_cnt bdk_dap_hwpoll_cnt_t;
201 
202 #define BDK_DAP_HWPOLL_CNT BDK_DAP_HWPOLL_CNT_FUNC()
203 static inline uint64_t BDK_DAP_HWPOLL_CNT_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_HWPOLL_CNT_FUNC(void)204 static inline uint64_t BDK_DAP_HWPOLL_CNT_FUNC(void)
205 {
206     return 0x87e002000114ll;
207 }
208 
209 #define typedef_BDK_DAP_HWPOLL_CNT bdk_dap_hwpoll_cnt_t
210 #define bustype_BDK_DAP_HWPOLL_CNT BDK_CSR_TYPE_RSL32b
211 #define basename_BDK_DAP_HWPOLL_CNT "DAP_HWPOLL_CNT"
212 #define device_bar_BDK_DAP_HWPOLL_CNT 0x0 /* PF_BAR0 */
213 #define busnum_BDK_DAP_HWPOLL_CNT 0
214 #define arguments_BDK_DAP_HWPOLL_CNT -1,-1,-1,-1
215 
216 /**
217  * Register (RSL32b) dap_imp_dar
218  *
219  * DAP Debug Authentication Register
220  * This register controls the device enables and secure/nonsecure access permissions.
221  */
222 union bdk_dap_imp_dar
223 {
224     uint32_t u;
225     struct bdk_dap_imp_dar_s
226     {
227 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
228         uint32_t reserved_30_31        : 2;
229         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
230                                                                  Internal:
231                                                                  Passed to trace unit, but not presently used.
232                                                                  0 = Future trace feature enabled.
233                                                                  1 = Future trace feature disabled. */
234         uint32_t distrace              : 1;  /**< [ 28: 28](R/W) Disable trace unit discovery.
235                                                                  0 = Trace unit is discoverable by software.
236                                                                  1 = Trace unit is hidden. */
237         uint32_t reserved_11_27        : 17;
238         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
239                                                                  0 = Return fault on nonsecure CAB accesses.
240                                                                  1 = Enable nonsecure CAB accesses. */
241         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
242                                                                  0 = Return fault for all CAB accesses.
243                                                                  1 = Enable all CAB accesses.
244 
245                                                                  When in trusted-mode resets to 0, else 1. */
246         uint32_t reserved_6_8          : 3;
247         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
248 
249                                                                  When in trusted-mode resets to 0, else 1. */
250         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
251 
252                                                                  When in trusted mode resets to zero, else one. */
253         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure non invasive debug enable.
254 
255                                                                  When in trusted-mode resets to 0, else 1. */
256         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
257 
258                                                                  When in trusted mode resets to zero, else one. */
259         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable non secure invasive debug enable.
260 
261                                                                  When in trusted mode resets to zero, else one. */
262         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
263 
264                                                                  When in trusted-mode resets to 0, else 1. */
265 #else /* Word 0 - Little Endian */
266         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
267 
268                                                                  When in trusted-mode resets to 0, else 1. */
269         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable non secure invasive debug enable.
270 
271                                                                  When in trusted mode resets to zero, else one. */
272         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
273 
274                                                                  When in trusted mode resets to zero, else one. */
275         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure non invasive debug enable.
276 
277                                                                  When in trusted-mode resets to 0, else 1. */
278         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
279 
280                                                                  When in trusted mode resets to zero, else one. */
281         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
282 
283                                                                  When in trusted-mode resets to 0, else 1. */
284         uint32_t reserved_6_8          : 3;
285         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
286                                                                  0 = Return fault for all CAB accesses.
287                                                                  1 = Enable all CAB accesses.
288 
289                                                                  When in trusted-mode resets to 0, else 1. */
290         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
291                                                                  0 = Return fault on nonsecure CAB accesses.
292                                                                  1 = Enable nonsecure CAB accesses. */
293         uint32_t reserved_11_27        : 17;
294         uint32_t distrace              : 1;  /**< [ 28: 28](R/W) Disable trace unit discovery.
295                                                                  0 = Trace unit is discoverable by software.
296                                                                  1 = Trace unit is hidden. */
297         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
298                                                                  Internal:
299                                                                  Passed to trace unit, but not presently used.
300                                                                  0 = Future trace feature enabled.
301                                                                  1 = Future trace feature disabled. */
302         uint32_t reserved_30_31        : 2;
303 #endif /* Word 0 - End */
304     } s;
305     struct bdk_dap_imp_dar_cn88xxp1
306     {
307 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
308         uint32_t reserved_11_31        : 21;
309         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
310                                                                  0 = Return fault on nonsecure CAB accesses.
311                                                                  1 = Enable nonsecure CAB accesses. */
312         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
313                                                                  0 = Return fault for all CAB accesses.
314                                                                  1 = Enable all CAB accesses.
315 
316                                                                  When in trusted-mode resets to 0, else 1. */
317         uint32_t reserved_6_8          : 3;
318         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
319 
320                                                                  When in trusted-mode resets to 0, else 1. */
321         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
322 
323                                                                  When in trusted mode resets to zero, else one. */
324         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure non invasive debug enable.
325 
326                                                                  When in trusted-mode resets to 0, else 1. */
327         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
328 
329                                                                  When in trusted mode resets to zero, else one. */
330         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable non secure invasive debug enable.
331 
332                                                                  When in trusted mode resets to zero, else one. */
333         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
334 
335                                                                  When in trusted-mode resets to 0, else 1. */
336 #else /* Word 0 - Little Endian */
337         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
338 
339                                                                  When in trusted-mode resets to 0, else 1. */
340         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable non secure invasive debug enable.
341 
342                                                                  When in trusted mode resets to zero, else one. */
343         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
344 
345                                                                  When in trusted mode resets to zero, else one. */
346         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure non invasive debug enable.
347 
348                                                                  When in trusted-mode resets to 0, else 1. */
349         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
350 
351                                                                  When in trusted mode resets to zero, else one. */
352         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
353 
354                                                                  When in trusted-mode resets to 0, else 1. */
355         uint32_t reserved_6_8          : 3;
356         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
357                                                                  0 = Return fault for all CAB accesses.
358                                                                  1 = Enable all CAB accesses.
359 
360                                                                  When in trusted-mode resets to 0, else 1. */
361         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
362                                                                  0 = Return fault on nonsecure CAB accesses.
363                                                                  1 = Enable nonsecure CAB accesses. */
364         uint32_t reserved_11_31        : 21;
365 #endif /* Word 0 - End */
366     } cn88xxp1;
367     struct bdk_dap_imp_dar_cn9
368     {
369 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
370         uint32_t reserved_30_31        : 2;
371         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
372                                                                  Internal:
373                                                                  Passed to trace unit, but not presently used.
374                                                                  0 = Future trace feature enabled.
375                                                                  1 = Future trace feature disabled. */
376         uint32_t distrace              : 1;  /**< [ 28: 28](RO) Trace unit is always discoverable in CNXXXX.
377                                                                  0 = Trace unit is discoverable by software.
378                                                                  1 = Trace unit is hidden.
379 
380                                                                  In CNXXXX, always discoverable. */
381         uint32_t reserved_11_27        : 17;
382         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
383                                                                  0 = Return fault on nonsecure CAB accesses.
384                                                                  1 = Enable nonsecure CAB accesses. */
385         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
386                                                                  0 = Return fault for all CAB accesses.
387                                                                  1 = Enable all CAB accesses.
388 
389                                                                  When in trusted mode resets to zero, else one. */
390         uint32_t reserved_6_8          : 3;
391         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
392 
393                                                                  When in trusted mode resets to zero, else one. */
394         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
395 
396                                                                  When in trusted mode resets to zero, else one. */
397         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure noninvasive debug enable.
398 
399                                                                  When in trusted mode resets to zero, else one. */
400         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
401 
402                                                                  When in trusted mode resets to zero, else one. */
403         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable nonsecure invasive debug enable.
404 
405                                                                  When in trusted mode resets to zero, else one. */
406         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
407 
408                                                                  When in trusted mode resets to zero, else one. */
409 #else /* Word 0 - Little Endian */
410         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
411 
412                                                                  When in trusted mode resets to zero, else one. */
413         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable nonsecure invasive debug enable.
414 
415                                                                  When in trusted mode resets to zero, else one. */
416         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
417 
418                                                                  When in trusted mode resets to zero, else one. */
419         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure noninvasive debug enable.
420 
421                                                                  When in trusted mode resets to zero, else one. */
422         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
423 
424                                                                  When in trusted mode resets to zero, else one. */
425         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
426 
427                                                                  When in trusted mode resets to zero, else one. */
428         uint32_t reserved_6_8          : 3;
429         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
430                                                                  0 = Return fault for all CAB accesses.
431                                                                  1 = Enable all CAB accesses.
432 
433                                                                  When in trusted mode resets to zero, else one. */
434         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
435                                                                  0 = Return fault on nonsecure CAB accesses.
436                                                                  1 = Enable nonsecure CAB accesses. */
437         uint32_t reserved_11_27        : 17;
438         uint32_t distrace              : 1;  /**< [ 28: 28](RO) Trace unit is always discoverable in CNXXXX.
439                                                                  0 = Trace unit is discoverable by software.
440                                                                  1 = Trace unit is hidden.
441 
442                                                                  In CNXXXX, always discoverable. */
443         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
444                                                                  Internal:
445                                                                  Passed to trace unit, but not presently used.
446                                                                  0 = Future trace feature enabled.
447                                                                  1 = Future trace feature disabled. */
448         uint32_t reserved_30_31        : 2;
449 #endif /* Word 0 - End */
450     } cn9;
451     struct bdk_dap_imp_dar_cn81xx
452     {
453 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
454         uint32_t reserved_30_31        : 2;
455         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
456                                                                  Internal:
457                                                                  Passed to trace unit, but not presently used.
458                                                                  0 = Future trace feature enabled.
459                                                                  1 = Future trace feature disabled. */
460         uint32_t distrace              : 1;  /**< [ 28: 28](R/W) Disable trace unit discovery.
461                                                                  0 = Trace unit is discoverable by software.
462                                                                  1 = Trace unit is hidden. */
463         uint32_t reserved_11_27        : 17;
464         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
465                                                                  0 = Return fault on nonsecure CAB accesses.
466                                                                  1 = Enable nonsecure CAB accesses. */
467         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
468                                                                  0 = Return fault for all CAB accesses.
469                                                                  1 = Enable all CAB accesses.
470 
471                                                                  When in trusted mode resets to zero, else one. */
472         uint32_t reserved_6_8          : 3;
473         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
474 
475                                                                  When in trusted mode resets to zero, else one. */
476         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
477 
478                                                                  When in trusted mode resets to zero, else one. */
479         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure noninvasive debug enable.
480 
481                                                                  When in trusted mode resets to zero, else one. */
482         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
483 
484                                                                  When in trusted mode resets to zero, else one. */
485         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable nonsecure invasive debug enable.
486 
487                                                                  When in trusted mode resets to zero, else one. */
488         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
489 
490                                                                  When in trusted mode resets to zero, else one. */
491 #else /* Word 0 - Little Endian */
492         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
493 
494                                                                  When in trusted mode resets to zero, else one. */
495         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable nonsecure invasive debug enable.
496 
497                                                                  When in trusted mode resets to zero, else one. */
498         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
499 
500                                                                  When in trusted mode resets to zero, else one. */
501         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure noninvasive debug enable.
502 
503                                                                  When in trusted mode resets to zero, else one. */
504         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
505 
506                                                                  When in trusted mode resets to zero, else one. */
507         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
508 
509                                                                  When in trusted mode resets to zero, else one. */
510         uint32_t reserved_6_8          : 3;
511         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
512                                                                  0 = Return fault for all CAB accesses.
513                                                                  1 = Enable all CAB accesses.
514 
515                                                                  When in trusted mode resets to zero, else one. */
516         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
517                                                                  0 = Return fault on nonsecure CAB accesses.
518                                                                  1 = Enable nonsecure CAB accesses. */
519         uint32_t reserved_11_27        : 17;
520         uint32_t distrace              : 1;  /**< [ 28: 28](R/W) Disable trace unit discovery.
521                                                                  0 = Trace unit is discoverable by software.
522                                                                  1 = Trace unit is hidden. */
523         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
524                                                                  Internal:
525                                                                  Passed to trace unit, but not presently used.
526                                                                  0 = Future trace feature enabled.
527                                                                  1 = Future trace feature disabled. */
528         uint32_t reserved_30_31        : 2;
529 #endif /* Word 0 - End */
530     } cn81xx;
531     /* struct bdk_dap_imp_dar_cn81xx cn83xx; */
532     struct bdk_dap_imp_dar_cn88xxp2
533     {
534 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
535         uint32_t reserved_30_31        : 2;
536         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
537                                                                  Internal:
538                                                                  Passed to trace unit, but not presently used.
539                                                                  0 = Future trace feature enabled.
540                                                                  1 = Future trace feature disabled. */
541         uint32_t distrace              : 1;  /**< [ 28: 28](R/W) Disable trace unit discovery.
542                                                                  0 = Trace unit is discoverable by software.
543                                                                  1 = Trace unit is hidden. */
544         uint32_t reserved_11_27        : 17;
545         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
546                                                                  0 = Return fault on nonsecure CAB accesses.
547                                                                  1 = Enable nonsecure CAB accesses. */
548         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
549                                                                  0 = Return fault for all CAB accesses.
550                                                                  1 = Enable all CAB accesses.
551 
552                                                                  When in trusted-mode resets to 0, else 1. */
553         uint32_t reserved_6_8          : 3;
554         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
555 
556                                                                  When in trusted-mode resets to 0, else 1. */
557         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
558 
559                                                                  When in trusted-mode resets to 0, else 1. */
560         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure noninvasive debug enable.
561 
562                                                                  When in trusted mode resets to zero, else one. */
563         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
564 
565                                                                  When in trusted mode resets to zero, else one. */
566         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable nonsecure invasive debug enable.
567 
568                                                                  When in trusted mode resets to zero, else one. */
569         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
570 
571                                                                  When in trusted mode resets to zero, else one. */
572 #else /* Word 0 - Little Endian */
573         uint32_t dbgen                 : 1;  /**< [  0:  0](R/W) Set this bit to enable debug enable.
574 
575                                                                  When in trusted mode resets to zero, else one. */
576         uint32_t niden                 : 1;  /**< [  1:  1](R/W) Set this bit to enable nonsecure invasive debug enable.
577 
578                                                                  When in trusted mode resets to zero, else one. */
579         uint32_t spiden                : 1;  /**< [  2:  2](R/W) Set this bit to enable secure invasive debug enable.
580 
581                                                                  When in trusted mode resets to zero, else one. */
582         uint32_t spniden               : 1;  /**< [  3:  3](R/W) Set this bit to enable secure noninvasive debug enable.
583 
584                                                                  When in trusted mode resets to zero, else one. */
585         uint32_t dabdeviceen           : 1;  /**< [  4:  4](R/W) Set this bit to use ARM-AP inside DAP for DAB serial bus accesses.
586 
587                                                                  When in trusted-mode resets to 0, else 1. */
588         uint32_t deviceen              : 1;  /**< [  5:  5](R/W) Set this bit to use CVM-AP inside DAP for CNXXXX addressing accesses.
589 
590                                                                  When in trusted-mode resets to 0, else 1. */
591         uint32_t reserved_6_8          : 3;
592         uint32_t caben                 : 1;  /**< [  9:  9](R/W) Enable CAB accesses from NCB and RSL devices.
593                                                                  0 = Return fault for all CAB accesses.
594                                                                  1 = Enable all CAB accesses.
595 
596                                                                  When in trusted-mode resets to 0, else 1. */
597         uint32_t cabnsen               : 1;  /**< [ 10: 10](R/W) Enable nonsecure CAB accesses from NCB and RSL devices.
598                                                                  0 = Return fault on nonsecure CAB accesses.
599                                                                  1 = Enable nonsecure CAB accesses. */
600         uint32_t reserved_11_27        : 17;
601         uint32_t distrace              : 1;  /**< [ 28: 28](R/W) Disable trace unit discovery.
602                                                                  0 = Trace unit is discoverable by software.
603                                                                  1 = Trace unit is hidden. */
604         uint32_t distracefeature       : 1;  /**< [ 29: 29](R/W) Reserved.
605                                                                  Internal:
606                                                                  Passed to trace unit, but not presently used.
607                                                                  0 = Future trace feature enabled.
608                                                                  1 = Future trace feature disabled. */
609         uint32_t reserved_30_31        : 2;
610 #endif /* Word 0 - End */
611     } cn88xxp2;
612 };
613 typedef union bdk_dap_imp_dar bdk_dap_imp_dar_t;
614 
615 #define BDK_DAP_IMP_DAR BDK_DAP_IMP_DAR_FUNC()
616 static inline uint64_t BDK_DAP_IMP_DAR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_IMP_DAR_FUNC(void)617 static inline uint64_t BDK_DAP_IMP_DAR_FUNC(void)
618 {
619     return 0x87e002000100ll;
620 }
621 
622 #define typedef_BDK_DAP_IMP_DAR bdk_dap_imp_dar_t
623 #define bustype_BDK_DAP_IMP_DAR BDK_CSR_TYPE_RSL32b
624 #define basename_BDK_DAP_IMP_DAR "DAP_IMP_DAR"
625 #define device_bar_BDK_DAP_IMP_DAR 0x0 /* PF_BAR0 */
626 #define busnum_BDK_DAP_IMP_DAR 0
627 #define arguments_BDK_DAP_IMP_DAR -1,-1,-1,-1
628 
629 /**
630  * Register (RSL32b) dap_owb_to
631  *
632  * DAP One-Wire-Bus Timeout Register
633  * This register configures the one-wire bus.
634  */
635 union bdk_dap_owb_to
636 {
637     uint32_t u;
638     struct bdk_dap_owb_to_s
639     {
640 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
641         uint32_t to_dis                : 1;  /**< [ 31: 31](R/W) Disable timeout mechanism. */
642         uint32_t reserved_16_30        : 15;
643         uint32_t tovalue               : 16; /**< [ 15:  0](R/W) Timeout value. If an OWB transaction is longer than this number
644                                                                  of coprocessor-clock cycles, it will timeout. */
645 #else /* Word 0 - Little Endian */
646         uint32_t tovalue               : 16; /**< [ 15:  0](R/W) Timeout value. If an OWB transaction is longer than this number
647                                                                  of coprocessor-clock cycles, it will timeout. */
648         uint32_t reserved_16_30        : 15;
649         uint32_t to_dis                : 1;  /**< [ 31: 31](R/W) Disable timeout mechanism. */
650 #endif /* Word 0 - End */
651     } s;
652     struct bdk_dap_owb_to_cn88xxp1
653     {
654 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
655         uint32_t reserved_31           : 1;
656         uint32_t reserved_16_30        : 15;
657         uint32_t tovalue               : 16; /**< [ 15:  0](R/W) Timeout value. If an OWB transaction is longer than this number
658                                                                  of coprocessor-clock cycles, it will timeout. */
659 #else /* Word 0 - Little Endian */
660         uint32_t tovalue               : 16; /**< [ 15:  0](R/W) Timeout value. If an OWB transaction is longer than this number
661                                                                  of coprocessor-clock cycles, it will timeout. */
662         uint32_t reserved_16_30        : 15;
663         uint32_t reserved_31           : 1;
664 #endif /* Word 0 - End */
665     } cn88xxp1;
666     /* struct bdk_dap_owb_to_s cn9; */
667     /* struct bdk_dap_owb_to_s cn81xx; */
668     /* struct bdk_dap_owb_to_s cn83xx; */
669     /* struct bdk_dap_owb_to_s cn88xxp2; */
670 };
671 typedef union bdk_dap_owb_to bdk_dap_owb_to_t;
672 
673 #define BDK_DAP_OWB_TO BDK_DAP_OWB_TO_FUNC()
674 static inline uint64_t BDK_DAP_OWB_TO_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_OWB_TO_FUNC(void)675 static inline uint64_t BDK_DAP_OWB_TO_FUNC(void)
676 {
677     return 0x87e002000110ll;
678 }
679 
680 #define typedef_BDK_DAP_OWB_TO bdk_dap_owb_to_t
681 #define bustype_BDK_DAP_OWB_TO BDK_CSR_TYPE_RSL32b
682 #define basename_BDK_DAP_OWB_TO "DAP_OWB_TO"
683 #define device_bar_BDK_DAP_OWB_TO 0x0 /* PF_BAR0 */
684 #define busnum_BDK_DAP_OWB_TO 0
685 #define arguments_BDK_DAP_OWB_TO -1,-1,-1,-1
686 
687 /**
688  * Register (RSL) dap_owb_to_status
689  *
690  * DAP One Wire Bus Timeout Status Register
691  * This register reports error status.
692  */
693 union bdk_dap_owb_to_status
694 {
695     uint64_t u;
696     struct bdk_dap_owb_to_status_s
697     {
698 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
699         uint64_t reserved_1_63         : 63;
700         uint64_t time_out              : 1;  /**< [  0:  0](R/W1C/H) This bit will be set if there is timeout in one wire bus activity. */
701 #else /* Word 0 - Little Endian */
702         uint64_t time_out              : 1;  /**< [  0:  0](R/W1C/H) This bit will be set if there is timeout in one wire bus activity. */
703         uint64_t reserved_1_63         : 63;
704 #endif /* Word 0 - End */
705     } s;
706     /* struct bdk_dap_owb_to_status_s cn; */
707 };
708 typedef union bdk_dap_owb_to_status bdk_dap_owb_to_status_t;
709 
710 #define BDK_DAP_OWB_TO_STATUS BDK_DAP_OWB_TO_STATUS_FUNC()
711 static inline uint64_t BDK_DAP_OWB_TO_STATUS_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_OWB_TO_STATUS_FUNC(void)712 static inline uint64_t BDK_DAP_OWB_TO_STATUS_FUNC(void)
713 {
714     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
715         return 0x87e002000138ll;
716     __bdk_csr_fatal("DAP_OWB_TO_STATUS", 0, 0, 0, 0, 0);
717 }
718 
719 #define typedef_BDK_DAP_OWB_TO_STATUS bdk_dap_owb_to_status_t
720 #define bustype_BDK_DAP_OWB_TO_STATUS BDK_CSR_TYPE_RSL
721 #define basename_BDK_DAP_OWB_TO_STATUS "DAP_OWB_TO_STATUS"
722 #define device_bar_BDK_DAP_OWB_TO_STATUS 0x0 /* PF_BAR0 */
723 #define busnum_BDK_DAP_OWB_TO_STATUS 0
724 #define arguments_BDK_DAP_OWB_TO_STATUS -1,-1,-1,-1
725 
726 /**
727  * Register (RSL) dap_rst_on_warm
728  *
729  * DAP Reset On Warm Reset Register
730  */
731 union bdk_dap_rst_on_warm
732 {
733     uint64_t u;
734     struct bdk_dap_rst_on_warm_s
735     {
736 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
737         uint64_t reserved_1_63         : 63;
738         uint64_t rst_on_warm           : 1;  /**< [  0:  0](R/W1S) Always reset DAR register.
739                                                                  Once set this bit cannot be cleared until the next cold reset.
740                                                                  [RST_ON_WARM] is set to one when trusted-mode changes from zero to one (i.e. a
741                                                                  non-trusted boot is followed by a trusted boot). */
742 #else /* Word 0 - Little Endian */
743         uint64_t rst_on_warm           : 1;  /**< [  0:  0](R/W1S) Always reset DAR register.
744                                                                  Once set this bit cannot be cleared until the next cold reset.
745                                                                  [RST_ON_WARM] is set to one when trusted-mode changes from zero to one (i.e. a
746                                                                  non-trusted boot is followed by a trusted boot). */
747         uint64_t reserved_1_63         : 63;
748 #endif /* Word 0 - End */
749     } s;
750     /* struct bdk_dap_rst_on_warm_s cn; */
751 };
752 typedef union bdk_dap_rst_on_warm bdk_dap_rst_on_warm_t;
753 
754 #define BDK_DAP_RST_ON_WARM BDK_DAP_RST_ON_WARM_FUNC()
755 static inline uint64_t BDK_DAP_RST_ON_WARM_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_RST_ON_WARM_FUNC(void)756 static inline uint64_t BDK_DAP_RST_ON_WARM_FUNC(void)
757 {
758     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
759         return 0x87e002000128ll;
760     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
761         return 0x87e002000128ll;
762     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
763         return 0x87e002000128ll;
764     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
765         return 0x87e002000128ll;
766     __bdk_csr_fatal("DAP_RST_ON_WARM", 0, 0, 0, 0, 0);
767 }
768 
769 #define typedef_BDK_DAP_RST_ON_WARM bdk_dap_rst_on_warm_t
770 #define bustype_BDK_DAP_RST_ON_WARM BDK_CSR_TYPE_RSL
771 #define basename_BDK_DAP_RST_ON_WARM "DAP_RST_ON_WARM"
772 #define device_bar_BDK_DAP_RST_ON_WARM 0x0 /* PF_BAR0 */
773 #define busnum_BDK_DAP_RST_ON_WARM 0
774 #define arguments_BDK_DAP_RST_ON_WARM -1,-1,-1,-1
775 
776 /**
777  * Register (RSL) dap_scratch
778  *
779  * INTERNAL: DAP Scratch Register
780  *
781  * This register is a scratch register for software use.
782  */
783 union bdk_dap_scratch
784 {
785     uint64_t u;
786     struct bdk_dap_scratch_s
787     {
788 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
789         uint64_t data                  : 64; /**< [ 63:  0](R/W) Scratch data, not used by hardware. */
790 #else /* Word 0 - Little Endian */
791         uint64_t data                  : 64; /**< [ 63:  0](R/W) Scratch data, not used by hardware. */
792 #endif /* Word 0 - End */
793     } s;
794     /* struct bdk_dap_scratch_s cn; */
795 };
796 typedef union bdk_dap_scratch bdk_dap_scratch_t;
797 
798 #define BDK_DAP_SCRATCH BDK_DAP_SCRATCH_FUNC()
799 static inline uint64_t BDK_DAP_SCRATCH_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_SCRATCH_FUNC(void)800 static inline uint64_t BDK_DAP_SCRATCH_FUNC(void)
801 {
802     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
803         return 0x87e002000118ll;
804     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
805         return 0x87e002000118ll;
806     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
807         return 0x87e002000118ll;
808     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
809         return 0x87e002000118ll;
810     __bdk_csr_fatal("DAP_SCRATCH", 0, 0, 0, 0, 0);
811 }
812 
813 #define typedef_BDK_DAP_SCRATCH bdk_dap_scratch_t
814 #define bustype_BDK_DAP_SCRATCH BDK_CSR_TYPE_RSL
815 #define basename_BDK_DAP_SCRATCH "DAP_SCRATCH"
816 #define device_bar_BDK_DAP_SCRATCH 0x0 /* PF_BAR0 */
817 #define busnum_BDK_DAP_SCRATCH 0
818 #define arguments_BDK_DAP_SCRATCH -1,-1,-1,-1
819 
820 /**
821  * Register (RSL32b) dap_sraaddr
822  *
823  * DAP RSL Devices Broadcast Write Polling Register
824  * This register controls broadcast write or polling to the cores.
825  */
826 union bdk_dap_sraaddr
827 {
828     uint32_t u;
829     struct bdk_dap_sraaddr_s
830     {
831 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
832         uint32_t reserved_29_31        : 3;
833         uint32_t cabdabsel             : 1;  /**< [ 28: 28](R/W) CAB or DAB bus access selection for polling/broadcast write.
834                                                                  0 = Polling/broadcast write is for DAB bus, bits \<20:5\> is the address offset.
835                                                                  1 = Polling/broadcast write is for CAB bus, bits \<19:5\> is the register number. */
836         uint32_t reserved_21_27        : 7;
837         uint32_t regnum                : 16; /**< [ 20:  5](R/W) If [CABDABSEL]=1, then \<19:5\> is the register number with these bit definitions:
838                                                                  \<19\>: Op0[0].
839                                                                  \<18:16\>: Op1.
840                                                                  \<15:12\>: CRn.
841                                                                  \<11:8\>: CRm.
842                                                                  \<7:5\>: Op.
843 
844                                                                  If [CABDABSEL]=0, then [REGNUM] is the register offset. */
845         uint32_t reserved_2_4          : 3;
846         uint32_t errstatus             : 1;  /**< [  1:  1](RAZ) Currently reserved. */
847         uint32_t busy                  : 1;  /**< [  0:  0](RO/H) Busy indicator if the broadcast write or polling still in progress.
848                                                                  0 = Idle.
849                                                                  1 = Broadcast write or polling still in progress. */
850 #else /* Word 0 - Little Endian */
851         uint32_t busy                  : 1;  /**< [  0:  0](RO/H) Busy indicator if the broadcast write or polling still in progress.
852                                                                  0 = Idle.
853                                                                  1 = Broadcast write or polling still in progress. */
854         uint32_t errstatus             : 1;  /**< [  1:  1](RAZ) Currently reserved. */
855         uint32_t reserved_2_4          : 3;
856         uint32_t regnum                : 16; /**< [ 20:  5](R/W) If [CABDABSEL]=1, then \<19:5\> is the register number with these bit definitions:
857                                                                  \<19\>: Op0[0].
858                                                                  \<18:16\>: Op1.
859                                                                  \<15:12\>: CRn.
860                                                                  \<11:8\>: CRm.
861                                                                  \<7:5\>: Op.
862 
863                                                                  If [CABDABSEL]=0, then [REGNUM] is the register offset. */
864         uint32_t reserved_21_27        : 7;
865         uint32_t cabdabsel             : 1;  /**< [ 28: 28](R/W) CAB or DAB bus access selection for polling/broadcast write.
866                                                                  0 = Polling/broadcast write is for DAB bus, bits \<20:5\> is the address offset.
867                                                                  1 = Polling/broadcast write is for CAB bus, bits \<19:5\> is the register number. */
868         uint32_t reserved_29_31        : 3;
869 #endif /* Word 0 - End */
870     } s;
871     /* struct bdk_dap_sraaddr_s cn88xxp1; */
872     struct bdk_dap_sraaddr_cn9
873     {
874 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
875         uint32_t reserved_29_31        : 3;
876         uint32_t cabdabsel             : 1;  /**< [ 28: 28](R/W) CAB or DAB bus access selection for polling/broadcast write.
877                                                                  0 = Polling/broadcast write is for DAB bus, bits \<20:5\> is the address offset.
878                                                                  1 = Polling/broadcast write is for CAB bus, bits \<19:5\> is the register number. */
879         uint32_t reserved_21_27        : 7;
880         uint32_t regnum                : 16; /**< [ 20:  5](R/W) If [CABDABSEL]=1, then \<19:5\> is the register number with these bit definitions:
881                                                                  \<19\>: Op0[0].
882                                                                  \<18:16\>: Op1.
883                                                                  \<15:12\>: CRn.
884                                                                  \<11:8\>: CRm.
885                                                                  \<7:5\>: Op.
886 
887                                                                  If [CABDABSEL]=0, then [REGNUM] is the register offset. */
888         uint32_t reserved_2_4          : 3;
889         uint32_t errstatus             : 1;  /**< [  1:  1](RAZ) Reserved. */
890         uint32_t busy                  : 1;  /**< [  0:  0](RO/H) Busy indicator if the broadcast write or polling still in progress.
891                                                                  0 = Idle.
892                                                                  1 = Broadcast write or polling still in progress. */
893 #else /* Word 0 - Little Endian */
894         uint32_t busy                  : 1;  /**< [  0:  0](RO/H) Busy indicator if the broadcast write or polling still in progress.
895                                                                  0 = Idle.
896                                                                  1 = Broadcast write or polling still in progress. */
897         uint32_t errstatus             : 1;  /**< [  1:  1](RAZ) Reserved. */
898         uint32_t reserved_2_4          : 3;
899         uint32_t regnum                : 16; /**< [ 20:  5](R/W) If [CABDABSEL]=1, then \<19:5\> is the register number with these bit definitions:
900                                                                  \<19\>: Op0[0].
901                                                                  \<18:16\>: Op1.
902                                                                  \<15:12\>: CRn.
903                                                                  \<11:8\>: CRm.
904                                                                  \<7:5\>: Op.
905 
906                                                                  If [CABDABSEL]=0, then [REGNUM] is the register offset. */
907         uint32_t reserved_21_27        : 7;
908         uint32_t cabdabsel             : 1;  /**< [ 28: 28](R/W) CAB or DAB bus access selection for polling/broadcast write.
909                                                                  0 = Polling/broadcast write is for DAB bus, bits \<20:5\> is the address offset.
910                                                                  1 = Polling/broadcast write is for CAB bus, bits \<19:5\> is the register number. */
911         uint32_t reserved_29_31        : 3;
912 #endif /* Word 0 - End */
913     } cn9;
914     /* struct bdk_dap_sraaddr_cn9 cn81xx; */
915     /* struct bdk_dap_sraaddr_cn9 cn83xx; */
916     struct bdk_dap_sraaddr_cn88xxp2
917     {
918 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
919         uint32_t reserved_29_31        : 3;
920         uint32_t cabdabsel             : 1;  /**< [ 28: 28](R/W) CAB or DAB bus access selection for polling/broadcast write.
921                                                                  0 = Polling/broadcast write is for DAB bus, bits \<20:5\> is the address offset.
922                                                                  1 = Polling/broadcast write is for CAB bus, bits \<19:5\> is the register number. */
923         uint32_t reserved_21_27        : 7;
924         uint32_t regnum                : 16; /**< [ 20:  5](R/W) If [CABDABSEL]=1, then \<19:5\> is the register number with these bit definitions:
925                                                                  \<19\>: Op0[0].
926                                                                  \<18:16\>: Op1
927                                                                  \<15:12\>: CRn.
928                                                                  \<11:8\>: CRm.
929                                                                  \<7:5\>: Op.
930 
931                                                                  If [CABDABSEL]=0, then [REGNUM] is the register offset. */
932         uint32_t reserved_2_4          : 3;
933         uint32_t errstatus             : 1;  /**< [  1:  1](RAZ) Reserved. */
934         uint32_t busy                  : 1;  /**< [  0:  0](RO/H) Busy indicator if the broadcast write or polling still in progress.
935                                                                  0 = Idle.
936                                                                  1 = Broadcast write or polling still in progress. */
937 #else /* Word 0 - Little Endian */
938         uint32_t busy                  : 1;  /**< [  0:  0](RO/H) Busy indicator if the broadcast write or polling still in progress.
939                                                                  0 = Idle.
940                                                                  1 = Broadcast write or polling still in progress. */
941         uint32_t errstatus             : 1;  /**< [  1:  1](RAZ) Reserved. */
942         uint32_t reserved_2_4          : 3;
943         uint32_t regnum                : 16; /**< [ 20:  5](R/W) If [CABDABSEL]=1, then \<19:5\> is the register number with these bit definitions:
944                                                                  \<19\>: Op0[0].
945                                                                  \<18:16\>: Op1
946                                                                  \<15:12\>: CRn.
947                                                                  \<11:8\>: CRm.
948                                                                  \<7:5\>: Op.
949 
950                                                                  If [CABDABSEL]=0, then [REGNUM] is the register offset. */
951         uint32_t reserved_21_27        : 7;
952         uint32_t cabdabsel             : 1;  /**< [ 28: 28](R/W) CAB or DAB bus access selection for polling/broadcast write.
953                                                                  0 = Polling/broadcast write is for DAB bus, bits \<20:5\> is the address offset.
954                                                                  1 = Polling/broadcast write is for CAB bus, bits \<19:5\> is the register number. */
955         uint32_t reserved_29_31        : 3;
956 #endif /* Word 0 - End */
957     } cn88xxp2;
958 };
959 typedef union bdk_dap_sraaddr bdk_dap_sraaddr_t;
960 
961 #define BDK_DAP_SRAADDR BDK_DAP_SRAADDR_FUNC()
962 static inline uint64_t BDK_DAP_SRAADDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_SRAADDR_FUNC(void)963 static inline uint64_t BDK_DAP_SRAADDR_FUNC(void)
964 {
965     return 0x87e002000104ll;
966 }
967 
968 #define typedef_BDK_DAP_SRAADDR bdk_dap_sraaddr_t
969 #define bustype_BDK_DAP_SRAADDR BDK_CSR_TYPE_RSL32b
970 #define basename_BDK_DAP_SRAADDR "DAP_SRAADDR"
971 #define device_bar_BDK_DAP_SRAADDR 0x0 /* PF_BAR0 */
972 #define busnum_BDK_DAP_SRAADDR 0
973 #define arguments_BDK_DAP_SRAADDR -1,-1,-1,-1
974 
975 /**
976  * Register (RSL) dap_sradata
977  *
978  * DAP Broadcast Write Data Register
979  * Data register for broadcast writes and polling from the cores.
980  */
981 union bdk_dap_sradata
982 {
983     uint64_t u;
984     struct bdk_dap_sradata_s
985     {
986 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
987         uint64_t reserved_0_63         : 64;
988 #else /* Word 0 - Little Endian */
989         uint64_t reserved_0_63         : 64;
990 #endif /* Word 0 - End */
991     } s;
992     /* struct bdk_dap_sradata_s cn; */
993 };
994 typedef union bdk_dap_sradata bdk_dap_sradata_t;
995 
996 #define BDK_DAP_SRADATA BDK_DAP_SRADATA_FUNC()
997 static inline uint64_t BDK_DAP_SRADATA_FUNC(void) __attribute__ ((pure, always_inline));
BDK_DAP_SRADATA_FUNC(void)998 static inline uint64_t BDK_DAP_SRADATA_FUNC(void)
999 {
1000     return 0x87e002000108ll;
1001 }
1002 
1003 #define typedef_BDK_DAP_SRADATA bdk_dap_sradata_t
1004 #define bustype_BDK_DAP_SRADATA BDK_CSR_TYPE_RSL
1005 #define basename_BDK_DAP_SRADATA "DAP_SRADATA"
1006 #define device_bar_BDK_DAP_SRADATA 0x0 /* PF_BAR0 */
1007 #define busnum_BDK_DAP_SRADATA 0
1008 #define arguments_BDK_DAP_SRADATA -1,-1,-1,-1
1009 
1010 #endif /* __BDK_CSRS_DAP_H__ */
1011