xref: /aosp_15_r20/external/coreboot/src/vendorcode/cavium/include/bdk/libbdk-arch/bdk-csrs-pccpf.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 #ifndef __BDK_CSRS_PCCPF_H__
2 #define __BDK_CSRS_PCCPF_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 #include <bdk.h>	/* FIXME(dhendrix): added to satisfy compiler... */
45 
46 /**
47  * @file
48  *
49  * Configuration and status register (CSR) address and type definitions for
50  * Cavium PCCPF.
51  *
52  * This file is auto generated. Do not edit.
53  *
54  */
55 
56 /**
57  * Enumeration pcc_dev_con_e
58  *
59  * PCC Device Connection Enumeration
60  * Enumerates where the device is connected in the topology. Software must rely on discovery and
61  * not use this enumeration as the values will vary by product, and the mnemonics are a super-set
62  * of the devices available. The value of the enumeration is formatted as defined by
63  * PCC_DEV_CON_S.
64  */
65 #define BDK_PCC_DEV_CON_E_APX(a) (0x200 + (a))
66 #define BDK_PCC_DEV_CON_E_AVS (0xf0)
67 #define BDK_PCC_DEV_CON_E_BCH_CN8 (0x300)
68 #define BDK_PCC_DEV_CON_E_BCH_CN9 (0x400)
69 #define BDK_PCC_DEV_CON_E_BGXX(a) (0x180 + (a))
70 #define BDK_PCC_DEV_CON_E_BTS (0x141)
71 #define BDK_PCC_DEV_CON_E_CCS (0x109)
72 #define BDK_PCC_DEV_CON_E_CCUX(a) (0x120 + (a))
73 #define BDK_PCC_DEV_CON_E_CGXX(a) (0x188 + (a))
74 #define BDK_PCC_DEV_CON_E_CPC (0xd0)
75 #define BDK_PCC_DEV_CON_E_CPT0 (0x400)
76 #define BDK_PCC_DEV_CON_E_CPT1 (0x500)
77 #define BDK_PCC_DEV_CON_E_DAP (0x102)
78 #define BDK_PCC_DEV_CON_E_DDF0 (0x10500)
79 #define BDK_PCC_DEV_CON_E_DFA (0x400)
80 #define BDK_PCC_DEV_CON_E_DPI0_CN8 (0xb00)
81 #define BDK_PCC_DEV_CON_E_DPI0_CN9 (0xc00)
82 #define BDK_PCC_DEV_CON_E_FPA_CN8 (0x900)
83 #define BDK_PCC_DEV_CON_E_FPA_CN9 (0xa00)
84 #define BDK_PCC_DEV_CON_E_FUS (0x103)
85 #define BDK_PCC_DEV_CON_E_FUSF (0x104)
86 #define BDK_PCC_DEV_CON_E_GIC_CN8 (0x18)
87 #define BDK_PCC_DEV_CON_E_GIC_CN9 (0x20)
88 #define BDK_PCC_DEV_CON_E_GPIO_CN8 (0x30)
89 #define BDK_PCC_DEV_CON_E_GPIO_CN9 (0x78)
90 #define BDK_PCC_DEV_CON_E_GSERX(a) (0x1e0 + (a))
91 #define BDK_PCC_DEV_CON_E_GSERNX(a) (0x1f0 + (a))
92 #define BDK_PCC_DEV_CON_E_GTI_CN8 (0x20)
93 #define BDK_PCC_DEV_CON_E_GTI_CN9 (0x28)
94 #define BDK_PCC_DEV_CON_E_IOBNX(a) (0x158 + (a))
95 #define BDK_PCC_DEV_CON_E_KEY (0x10d)
96 #define BDK_PCC_DEV_CON_E_L2C (0x109)
97 #define BDK_PCC_DEV_CON_E_L2C_CBCX(a) (0x138 + (a))
98 #define BDK_PCC_DEV_CON_E_L2C_MCIX(a) (0x13c + (a))
99 #define BDK_PCC_DEV_CON_E_L2C_TADX(a) (0x130 + (a))
100 #define BDK_PCC_DEV_CON_E_LBKX(a) (0x168 + (a))
101 #define BDK_PCC_DEV_CON_E_LMCX(a) (0x150 + (a))
102 #define BDK_PCC_DEV_CON_E_MCCX(a) (0x130 + (a))
103 #define BDK_PCC_DEV_CON_E_MDC (0x140)
104 #define BDK_PCC_DEV_CON_E_MIO_BOOT (0x10e)
105 #define BDK_PCC_DEV_CON_E_MIO_EMM (0x10c)
106 #define BDK_PCC_DEV_CON_E_MIO_FUS (0x103)
107 #define BDK_PCC_DEV_CON_E_MIO_PTP (0x40)
108 #define BDK_PCC_DEV_CON_E_MIO_TWSX(a) (0x148 + (a))
109 #define BDK_PCC_DEV_CON_E_MPI (0x38)
110 #define BDK_PCC_DEV_CON_E_MPIX(a) (0x30 + 8 * (a))
111 #define BDK_PCC_DEV_CON_E_MRML (0x100)
112 #define BDK_PCC_DEV_CON_E_NCSI (0x108)
113 #define BDK_PCC_DEV_CON_E_NDF (0x58)
114 #define BDK_PCC_DEV_CON_E_NIC_CN9 (0x10100)
115 #define BDK_PCC_DEV_CON_E_NIC_CN81XX (0x500)
116 #define BDK_PCC_DEV_CON_E_NIC_CN88XX (0x20100)
117 #define BDK_PCC_DEV_CON_E_NIC_CN83XX (0x10100)
118 #define BDK_PCC_DEV_CON_E_NICL (0x10100)
119 #define BDK_PCC_DEV_CON_E_NIX0 (0x10600)
120 #define BDK_PCC_DEV_CON_E_OCLAX_CN8(a) (0x160 + (a))
121 #define BDK_PCC_DEV_CON_E_OCLAX_CN9(a) (0x190 + (a))
122 #define BDK_PCC_DEV_CON_E_OCX (0x105)
123 #define BDK_PCC_DEV_CON_E_PBUS (0x10f)
124 #define BDK_PCC_DEV_CON_E_PCCBR_AP (0x10)
125 #define BDK_PCC_DEV_CON_E_PCCBR_BCH (0x50)
126 #define BDK_PCC_DEV_CON_E_PCCBR_CPT0 (0x60)
127 #define BDK_PCC_DEV_CON_E_PCCBR_CPT1 (0x68)
128 #define BDK_PCC_DEV_CON_E_PCCBR_DDF0 (0x100a0)
129 #define BDK_PCC_DEV_CON_E_PCCBR_DFA (0xb0)
130 #define BDK_PCC_DEV_CON_E_PCCBR_DPI0 (0xa0)
131 #define BDK_PCC_DEV_CON_E_PCCBR_FPA (0x90)
132 #define BDK_PCC_DEV_CON_E_PCCBR_MRML (8)
133 #define BDK_PCC_DEV_CON_E_PCCBR_NIC_CN9 (0x10080)
134 #define BDK_PCC_DEV_CON_E_PCCBR_NIC_CN81XX (0x78)
135 #define BDK_PCC_DEV_CON_E_PCCBR_NIC_CN88XX (0x20010)
136 #define BDK_PCC_DEV_CON_E_PCCBR_NIC_CN83XX (0x10080)
137 #define BDK_PCC_DEV_CON_E_PCCBR_NICL (0x10080)
138 #define BDK_PCC_DEV_CON_E_PCCBR_PKI (0x10088)
139 #define BDK_PCC_DEV_CON_E_PCCBR_PKO (0x10090)
140 #define BDK_PCC_DEV_CON_E_PCCBR_RAD_CN9 (0x70)
141 #define BDK_PCC_DEV_CON_E_PCCBR_RAD_CN88XX (0xa0)
142 #define BDK_PCC_DEV_CON_E_PCCBR_RAD_CN83XX (0x70)
143 #define BDK_PCC_DEV_CON_E_PCCBR_RNM (0x48)
144 #define BDK_PCC_DEV_CON_E_PCCBR_RVUX(a) (0x20000 + 8 * (a))
145 #define BDK_PCC_DEV_CON_E_PCCBR_SSO (0x80)
146 #define BDK_PCC_DEV_CON_E_PCCBR_SSOW (0x88)
147 #define BDK_PCC_DEV_CON_E_PCCBR_TIM (0x98)
148 #define BDK_PCC_DEV_CON_E_PCCBR_ZIP_CN9 (0x10098)
149 #define BDK_PCC_DEV_CON_E_PCCBR_ZIP_CN88XX (0xa8)
150 #define BDK_PCC_DEV_CON_E_PCCBR_ZIP_CN83XX (0x10098)
151 #define BDK_PCC_DEV_CON_E_PCIERC0_CN9 (0x30000)
152 #define BDK_PCC_DEV_CON_E_PCIERC0_CN81XX (0xc0)
153 #define BDK_PCC_DEV_CON_E_PCIERC0_CN88XX (0x10080)
154 #define BDK_PCC_DEV_CON_E_PCIERC0_CN83XX (0xc8)
155 #define BDK_PCC_DEV_CON_E_PCIERC1_CN9 (0x40000)
156 #define BDK_PCC_DEV_CON_E_PCIERC1_CN81XX (0xc8)
157 #define BDK_PCC_DEV_CON_E_PCIERC1_CN88XX (0x10090)
158 #define BDK_PCC_DEV_CON_E_PCIERC1_CN83XX (0xd0)
159 #define BDK_PCC_DEV_CON_E_PCIERC2_CN9 (0x50000)
160 #define BDK_PCC_DEV_CON_E_PCIERC2_CN81XX (0xd0)
161 #define BDK_PCC_DEV_CON_E_PCIERC2_CN88XX (0x100a0)
162 #define BDK_PCC_DEV_CON_E_PCIERC2_CN83XX (0xd8)
163 #define BDK_PCC_DEV_CON_E_PCIERC3_CN9 (0x60000)
164 #define BDK_PCC_DEV_CON_E_PCIERC3_CN88XX (0x30080)
165 #define BDK_PCC_DEV_CON_E_PCIERC3_CN83XX (0xe0)
166 #define BDK_PCC_DEV_CON_E_PCIERC4 (0x30090)
167 #define BDK_PCC_DEV_CON_E_PCIERC5 (0x300a0)
168 #define BDK_PCC_DEV_CON_E_PCM (0x68)
169 #define BDK_PCC_DEV_CON_E_PEMX(a) (0x170 + (a))
170 #define BDK_PCC_DEV_CON_E_PEM0 (0x2000c0)
171 #define BDK_PCC_DEV_CON_E_PEM1 (0x2000c8)
172 #define BDK_PCC_DEV_CON_E_PEM2 (0x2000d0)
173 #define BDK_PCC_DEV_CON_E_PEM3 (0x2000d8)
174 #define BDK_PCC_DEV_CON_E_PKI (0x10200)
175 #define BDK_PCC_DEV_CON_E_PKO (0x10300)
176 #define BDK_PCC_DEV_CON_E_PSBM (0x107)
177 #define BDK_PCC_DEV_CON_E_RAD_CN9 (0x700)
178 #define BDK_PCC_DEV_CON_E_RAD_CN88XX (0x200)
179 #define BDK_PCC_DEV_CON_E_RAD_CN83XX (0x600)
180 #define BDK_PCC_DEV_CON_E_RGXX(a) (0x190 + (a))
181 #define BDK_PCC_DEV_CON_E_RNM_CN9 (0x300)
182 #define BDK_PCC_DEV_CON_E_RNM_CN81XX (0x200)
183 #define BDK_PCC_DEV_CON_E_RNM_CN88XX (0x48)
184 #define BDK_PCC_DEV_CON_E_RNM_CN83XX (0x200)
185 #define BDK_PCC_DEV_CON_E_RST (0x101)
186 #define BDK_PCC_DEV_CON_E_RVUX(a) (0x20100 + 0x100 * (a))
187 #define BDK_PCC_DEV_CON_E_SATA0_CN9 (0x10020)
188 #define BDK_PCC_DEV_CON_E_SATA0_CN81XX (0xb0)
189 #define BDK_PCC_DEV_CON_E_SATA0_CN88XX (0x10020)
190 #define BDK_PCC_DEV_CON_E_SATA0_CN83XX (0x10020)
191 #define BDK_PCC_DEV_CON_E_SATA1_CN9 (0x10028)
192 #define BDK_PCC_DEV_CON_E_SATA1_CN81XX (0xb8)
193 #define BDK_PCC_DEV_CON_E_SATA1_CN88XX (0x10028)
194 #define BDK_PCC_DEV_CON_E_SATA1_CN83XX (0x10028)
195 #define BDK_PCC_DEV_CON_E_SATA10 (0x30030)
196 #define BDK_PCC_DEV_CON_E_SATA11 (0x30038)
197 #define BDK_PCC_DEV_CON_E_SATA12 (0x30040)
198 #define BDK_PCC_DEV_CON_E_SATA13 (0x30048)
199 #define BDK_PCC_DEV_CON_E_SATA14 (0x30050)
200 #define BDK_PCC_DEV_CON_E_SATA15 (0x30058)
201 #define BDK_PCC_DEV_CON_E_SATA2 (0x10030)
202 #define BDK_PCC_DEV_CON_E_SATA3 (0x10038)
203 #define BDK_PCC_DEV_CON_E_SATA4 (0x10040)
204 #define BDK_PCC_DEV_CON_E_SATA5 (0x10048)
205 #define BDK_PCC_DEV_CON_E_SATA6 (0x10050)
206 #define BDK_PCC_DEV_CON_E_SATA7 (0x10058)
207 #define BDK_PCC_DEV_CON_E_SATA8 (0x30020)
208 #define BDK_PCC_DEV_CON_E_SATA9 (0x30028)
209 #define BDK_PCC_DEV_CON_E_SGP (0x10a)
210 #define BDK_PCC_DEV_CON_E_SLI0_CN81XX (0x70)
211 #define BDK_PCC_DEV_CON_E_SLI0_CN88XX (0x10010)
212 #define BDK_PCC_DEV_CON_E_SLI1 (0x30010)
213 #define BDK_PCC_DEV_CON_E_SLIRE0 (0xc0)
214 #define BDK_PCC_DEV_CON_E_SMI (0x10b)
215 #define BDK_PCC_DEV_CON_E_SMMU0_CN8 (0x10)
216 #define BDK_PCC_DEV_CON_E_SMMU0_CN9 (0x18)
217 #define BDK_PCC_DEV_CON_E_SMMU1 (0x10008)
218 #define BDK_PCC_DEV_CON_E_SMMU2 (0x20008)
219 #define BDK_PCC_DEV_CON_E_SMMU3 (0x30008)
220 #define BDK_PCC_DEV_CON_E_SSO_CN8 (0x700)
221 #define BDK_PCC_DEV_CON_E_SSO_CN9 (0x800)
222 #define BDK_PCC_DEV_CON_E_SSOW_CN8 (0x800)
223 #define BDK_PCC_DEV_CON_E_SSOW_CN9 (0x900)
224 #define BDK_PCC_DEV_CON_E_TIM_CN8 (0xa00)
225 #define BDK_PCC_DEV_CON_E_TIM_CN9 (0xb00)
226 #define BDK_PCC_DEV_CON_E_TNS (0x20018)
227 #define BDK_PCC_DEV_CON_E_TSNX(a) (0x170 + (a))
228 #define BDK_PCC_DEV_CON_E_UAAX_CN8(a) (0x140 + (a))
229 #define BDK_PCC_DEV_CON_E_UAAX_CN9(a) (0x160 + (a))
230 #define BDK_PCC_DEV_CON_E_USBDRDX_CN81XX(a) (0x80 + 8 * (a))
231 #define BDK_PCC_DEV_CON_E_USBDRDX_CN83XX(a) (0x10060 + 8 * (a))
232 #define BDK_PCC_DEV_CON_E_USBDRDX_CN9(a) (0x10060 + 8 * (a))
233 #define BDK_PCC_DEV_CON_E_USBHX(a) (0x80 + 8 * (a))
234 #define BDK_PCC_DEV_CON_E_VRMX(a) (0x144 + (a))
235 #define BDK_PCC_DEV_CON_E_XCPX(a) (0xe0 + 8 * (a))
236 #define BDK_PCC_DEV_CON_E_XCVX(a) (0x110 + (a))
237 #define BDK_PCC_DEV_CON_E_ZIP_CN9 (0x10400)
238 #define BDK_PCC_DEV_CON_E_ZIP_CN88XX (0x300)
239 #define BDK_PCC_DEV_CON_E_ZIP_CN83XX (0x10400)
240 
241 /**
242  * Enumeration pcc_dev_idl_e
243  *
244  * PCC Device ID Low Enumeration
245  * Enumerates the values of the PCI configuration header Device ID bits
246  * \<7:0\>.
247  *
248  * Internal:
249  * The class_codes are formatted as defined by PCC_CLASS_CODE_S.
250  */
251 #define BDK_PCC_DEV_IDL_E_AP5 (0x76)
252 #define BDK_PCC_DEV_IDL_E_AVS (0x6a)
253 #define BDK_PCC_DEV_IDL_E_BCH (0x43)
254 #define BDK_PCC_DEV_IDL_E_BCH_VF (0x44)
255 #define BDK_PCC_DEV_IDL_E_BGX (0x26)
256 #define BDK_PCC_DEV_IDL_E_BTS (0x88)
257 #define BDK_PCC_DEV_IDL_E_CCS (0x6e)
258 #define BDK_PCC_DEV_IDL_E_CCU (0x6f)
259 #define BDK_PCC_DEV_IDL_E_CER (0x61)
260 #define BDK_PCC_DEV_IDL_E_CGX (0x59)
261 #define BDK_PCC_DEV_IDL_E_CHIP (0)
262 #define BDK_PCC_DEV_IDL_E_CHIP_VF (3)
263 #define BDK_PCC_DEV_IDL_E_CPC (0x68)
264 #define BDK_PCC_DEV_IDL_E_CPT (0x40)
265 #define BDK_PCC_DEV_IDL_E_CPT_VF (0x41)
266 #define BDK_PCC_DEV_IDL_E_DAP (0x2c)
267 #define BDK_PCC_DEV_IDL_E_DDF (0x45)
268 #define BDK_PCC_DEV_IDL_E_DDF_VF (0x46)
269 #define BDK_PCC_DEV_IDL_E_DFA (0x19)
270 #define BDK_PCC_DEV_IDL_E_DPI (0x57)
271 #define BDK_PCC_DEV_IDL_E_DPI5 (0x80)
272 #define BDK_PCC_DEV_IDL_E_DPI5_VF (0x81)
273 #define BDK_PCC_DEV_IDL_E_DPI_VF (0x58)
274 #define BDK_PCC_DEV_IDL_E_FPA (0x52)
275 #define BDK_PCC_DEV_IDL_E_FPA_VF (0x53)
276 #define BDK_PCC_DEV_IDL_E_FUS5 (0x74)
277 #define BDK_PCC_DEV_IDL_E_FUSF (0x32)
278 #define BDK_PCC_DEV_IDL_E_GIC (9)
279 #define BDK_PCC_DEV_IDL_E_GPIO (0xa)
280 #define BDK_PCC_DEV_IDL_E_GSER (0x25)
281 #define BDK_PCC_DEV_IDL_E_GSERN (0x28)
282 #define BDK_PCC_DEV_IDL_E_GTI (0x17)
283 #define BDK_PCC_DEV_IDL_E_IOBN (0x27)
284 #define BDK_PCC_DEV_IDL_E_IOBN5 (0x6b)
285 #define BDK_PCC_DEV_IDL_E_KEY (0x16)
286 #define BDK_PCC_DEV_IDL_E_L2C (0x21)
287 #define BDK_PCC_DEV_IDL_E_L2C_CBC (0x2f)
288 #define BDK_PCC_DEV_IDL_E_L2C_MCI (0x30)
289 #define BDK_PCC_DEV_IDL_E_L2C_TAD (0x2e)
290 #define BDK_PCC_DEV_IDL_E_LBK (0x42)
291 #define BDK_PCC_DEV_IDL_E_LMC (0x22)
292 #define BDK_PCC_DEV_IDL_E_MCC (0x70)
293 #define BDK_PCC_DEV_IDL_E_MDC (0x73)
294 #define BDK_PCC_DEV_IDL_E_MIO_BOOT (0x11)
295 #define BDK_PCC_DEV_IDL_E_MIO_EMM (0x10)
296 #define BDK_PCC_DEV_IDL_E_MIO_FUS (0x31)
297 #define BDK_PCC_DEV_IDL_E_MIO_PTP (0xc)
298 #define BDK_PCC_DEV_IDL_E_MIO_TWS (0x12)
299 #define BDK_PCC_DEV_IDL_E_MIX (0xd)
300 #define BDK_PCC_DEV_IDL_E_MPI (0xb)
301 #define BDK_PCC_DEV_IDL_E_MRML (1)
302 #define BDK_PCC_DEV_IDL_E_MRML5 (0x75)
303 #define BDK_PCC_DEV_IDL_E_NCSI (0x29)
304 #define BDK_PCC_DEV_IDL_E_NDF (0x4f)
305 #define BDK_PCC_DEV_IDL_E_NIC (0x1e)
306 #define BDK_PCC_DEV_IDL_E_NICL (0x77)
307 #define BDK_PCC_DEV_IDL_E_NICL_VF (0x78)
308 #define BDK_PCC_DEV_IDL_E_NIC_VF (0x34)
309 #define BDK_PCC_DEV_IDL_E_NPC (0x60)
310 #define BDK_PCC_DEV_IDL_E_OCLA (0x23)
311 #define BDK_PCC_DEV_IDL_E_OCX (0x13)
312 #define BDK_PCC_DEV_IDL_E_OCX5 (0x79)
313 #define BDK_PCC_DEV_IDL_E_OSM (0x24)
314 #define BDK_PCC_DEV_IDL_E_PBUS (0x35)
315 #define BDK_PCC_DEV_IDL_E_PCCBR (2)
316 #define BDK_PCC_DEV_IDL_E_PCIERC (0x2d)
317 #define BDK_PCC_DEV_IDL_E_PCM (0x4e)
318 #define BDK_PCC_DEV_IDL_E_PEM (0x20)
319 #define BDK_PCC_DEV_IDL_E_PEM5 (0x6c)
320 #define BDK_PCC_DEV_IDL_E_PKI (0x47)
321 #define BDK_PCC_DEV_IDL_E_PKO (0x48)
322 #define BDK_PCC_DEV_IDL_E_PKO_VF (0x49)
323 #define BDK_PCC_DEV_IDL_E_PSBM (0x69)
324 #define BDK_PCC_DEV_IDL_E_RAD (0x1d)
325 #define BDK_PCC_DEV_IDL_E_RAD_VF (0x36)
326 #define BDK_PCC_DEV_IDL_E_RGX (0x54)
327 #define BDK_PCC_DEV_IDL_E_RNM (0x18)
328 #define BDK_PCC_DEV_IDL_E_RNM_VF (0x33)
329 #define BDK_PCC_DEV_IDL_E_RST (0xe)
330 #define BDK_PCC_DEV_IDL_E_RST5 (0x85)
331 #define BDK_PCC_DEV_IDL_E_RVU (0x63)
332 #define BDK_PCC_DEV_IDL_E_RVU_AF (0x65)
333 #define BDK_PCC_DEV_IDL_E_RVU_VF (0x64)
334 #define BDK_PCC_DEV_IDL_E_SATA (0x1c)
335 #define BDK_PCC_DEV_IDL_E_SATA5 (0x84)
336 #define BDK_PCC_DEV_IDL_E_SGP (0x2a)
337 #define BDK_PCC_DEV_IDL_E_SLI (0x15)
338 #define BDK_PCC_DEV_IDL_E_SLIRE (0x38)
339 #define BDK_PCC_DEV_IDL_E_SMI (0x2b)
340 #define BDK_PCC_DEV_IDL_E_SMMU (8)
341 #define BDK_PCC_DEV_IDL_E_SMMU3 (0x62)
342 #define BDK_PCC_DEV_IDL_E_SSO (0x4a)
343 #define BDK_PCC_DEV_IDL_E_SSOW (0x4c)
344 #define BDK_PCC_DEV_IDL_E_SSOW_VF (0x4d)
345 #define BDK_PCC_DEV_IDL_E_SSO_VF (0x4b)
346 #define BDK_PCC_DEV_IDL_E_TIM (0x50)
347 #define BDK_PCC_DEV_IDL_E_TIM_VF (0x51)
348 #define BDK_PCC_DEV_IDL_E_TNS (0x1f)
349 #define BDK_PCC_DEV_IDL_E_TSN (0x6d)
350 #define BDK_PCC_DEV_IDL_E_UAA (0xf)
351 #define BDK_PCC_DEV_IDL_E_USBDRD (0x55)
352 #define BDK_PCC_DEV_IDL_E_USBH (0x1b)
353 #define BDK_PCC_DEV_IDL_E_VRM (0x14)
354 #define BDK_PCC_DEV_IDL_E_XCP (0x67)
355 #define BDK_PCC_DEV_IDL_E_XCV (0x56)
356 #define BDK_PCC_DEV_IDL_E_ZIP (0x1a)
357 #define BDK_PCC_DEV_IDL_E_ZIP5 (0x82)
358 #define BDK_PCC_DEV_IDL_E_ZIP5_VF (0x83)
359 #define BDK_PCC_DEV_IDL_E_ZIP_VF (0x37)
360 
361 /**
362  * Enumeration pcc_jtag_dev_e
363  *
364  * PCC JTAG Device Enumeration
365  * Enumerates the device number sub-field of Cavium-assigned JTAG ID_Codes. Device number is
366  * mapped to Part_Number[7:4]. Where Part_Number [15:0] is mapped to ID_Code[27:12].
367  */
368 #define BDK_PCC_JTAG_DEV_E_DAP (1)
369 #define BDK_PCC_JTAG_DEV_E_MAIN (0)
370 #define BDK_PCC_JTAG_DEV_E_MCP (3)
371 #define BDK_PCC_JTAG_DEV_E_SCP (2)
372 
373 /**
374  * Enumeration pcc_pidr_partnum0_e
375  *
376  * PCC PIDR Part Number 0 Enumeration
377  * When *_PIDR1[PARTNUM1] = PCC_PIDR_PARTNUM1_E::COMP, enumerates the values of Cavium-
378  * assigned CoreSight PIDR part number 0 fields.
379  * For example SMMU()_PIDR0[PARTNUM0].
380  */
381 #define BDK_PCC_PIDR_PARTNUM0_E_CTI (0xd)
382 #define BDK_PCC_PIDR_PARTNUM0_E_DBG (0xe)
383 #define BDK_PCC_PIDR_PARTNUM0_E_ETR (0x13)
384 #define BDK_PCC_PIDR_PARTNUM0_E_GICD (2)
385 #define BDK_PCC_PIDR_PARTNUM0_E_GICR (1)
386 #define BDK_PCC_PIDR_PARTNUM0_E_GITS (3)
387 #define BDK_PCC_PIDR_PARTNUM0_E_GTI_BZ (4)
388 #define BDK_PCC_PIDR_PARTNUM0_E_GTI_CC (5)
389 #define BDK_PCC_PIDR_PARTNUM0_E_GTI_CTL (6)
390 #define BDK_PCC_PIDR_PARTNUM0_E_GTI_RD (7)
391 #define BDK_PCC_PIDR_PARTNUM0_E_GTI_WC (8)
392 #define BDK_PCC_PIDR_PARTNUM0_E_GTI_WR (9)
393 #define BDK_PCC_PIDR_PARTNUM0_E_NONE (0)
394 #define BDK_PCC_PIDR_PARTNUM0_E_PMU (0xa)
395 #define BDK_PCC_PIDR_PARTNUM0_E_RAS (0x12)
396 #define BDK_PCC_PIDR_PARTNUM0_E_SMMU (0xb)
397 #define BDK_PCC_PIDR_PARTNUM0_E_SMMU3 (0x11)
398 #define BDK_PCC_PIDR_PARTNUM0_E_SYSCTI (0xf)
399 #define BDK_PCC_PIDR_PARTNUM0_E_TRC (0x10)
400 #define BDK_PCC_PIDR_PARTNUM0_E_UAA (0xc)
401 
402 /**
403  * Enumeration pcc_pidr_partnum1_e
404  *
405  * PCC PIDR Part Number 1 Enumeration
406  * Enumerates the values of Cavium-assigned CoreSight PIDR PARTNUM1 fields, for example
407  * SMMU()_PIDR1[PARTNUM1].
408  */
409 #define BDK_PCC_PIDR_PARTNUM1_E_COMP (2)
410 #define BDK_PCC_PIDR_PARTNUM1_E_PROD (1)
411 
412 /**
413  * Enumeration pcc_prod_e
414  *
415  * PCC Device ID Product Enumeration
416  * Enumerates the chip identifier.
417  */
418 #define BDK_PCC_PROD_E_CN81XX (0xa2)
419 #define BDK_PCC_PROD_E_CN83XX (0xa3)
420 #define BDK_PCC_PROD_E_CN88XX (0xa1)
421 #define BDK_PCC_PROD_E_CN93XX (0xb2)
422 #define BDK_PCC_PROD_E_CN98XX (0xb1)
423 #define BDK_PCC_PROD_E_GEN (0xa0)
424 
425 /**
426  * Enumeration pcc_vendor_e
427  *
428  * PCC Vendor ID Enumeration
429  * Enumerates the values of the PCI configuration header vendor ID.
430  */
431 #define BDK_PCC_VENDOR_E_CAVIUM (0x177d)
432 
433 /**
434  * Enumeration pcc_vsecid_e
435  *
436  * PCC Vendor-Specific Capability ID Enumeration
437  * Enumerates the values of Cavium's vendor-specific PCI capability IDs.
438  * Internal:
439  * See also http://mawiki.caveonetworks.com/wiki/Architecture/PCI_Vendor_Headers
440  */
441 #define BDK_PCC_VSECID_E_NONE (0)
442 #define BDK_PCC_VSECID_E_SY_RAS_DES (2)
443 #define BDK_PCC_VSECID_E_SY_RAS_DP (1)
444 #define BDK_PCC_VSECID_E_SY_RSVDX(a) (0 + (a))
445 #define BDK_PCC_VSECID_E_TX_BR (0xa1)
446 #define BDK_PCC_VSECID_E_TX_PF (0xa0)
447 #define BDK_PCC_VSECID_E_TX_VF (0xa2)
448 
449 /**
450  * Structure pcc_class_code_s
451  *
452  * INTERNAL: PCC Class Code Structure
453  *
454  * Defines the components of the PCC class code.
455  */
456 union bdk_pcc_class_code_s
457 {
458     uint32_t u;
459     struct bdk_pcc_class_code_s_s
460     {
461 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
462         uint32_t reserved_24_31        : 8;
463         uint32_t bcc                   : 8;  /**< [ 23: 16] Base class code. */
464         uint32_t sc                    : 8;  /**< [ 15:  8] Subclass code. */
465         uint32_t pi                    : 8;  /**< [  7:  0] Programming interface. */
466 #else /* Word 0 - Little Endian */
467         uint32_t pi                    : 8;  /**< [  7:  0] Programming interface. */
468         uint32_t sc                    : 8;  /**< [ 15:  8] Subclass code. */
469         uint32_t bcc                   : 8;  /**< [ 23: 16] Base class code. */
470         uint32_t reserved_24_31        : 8;
471 #endif /* Word 0 - End */
472     } s;
473     /* struct bdk_pcc_class_code_s_s cn; */
474 };
475 
476 /**
477  * Structure pcc_dev_con_s
478  *
479  * PCC Device Connection Structure
480  * Defines the components of the PCC device connection values enumerated by PCC_DEV_CON_E,
481  * using ARI format.
482  */
483 union bdk_pcc_dev_con_s
484 {
485     uint32_t u;
486     struct bdk_pcc_dev_con_s_s
487     {
488 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
489         uint32_t reserved_16_31        : 16;
490         uint32_t bus                   : 8;  /**< [ 15:  8] PCI requestor bus number. */
491         uint32_t func                  : 8;  /**< [  7:  0] For ARI devices (when bus is nonzero), an eight-bit RSL function number.
492 
493                                                                  For non-ARI devices (when bus is zero), \<7:3\> is the device number, \<2:0\> the function
494                                                                  number. */
495 #else /* Word 0 - Little Endian */
496         uint32_t func                  : 8;  /**< [  7:  0] For ARI devices (when bus is nonzero), an eight-bit RSL function number.
497 
498                                                                  For non-ARI devices (when bus is zero), \<7:3\> is the device number, \<2:0\> the function
499                                                                  number. */
500         uint32_t bus                   : 8;  /**< [ 15:  8] PCI requestor bus number. */
501         uint32_t reserved_16_31        : 16;
502 #endif /* Word 0 - End */
503     } s;
504     struct bdk_pcc_dev_con_s_cn8
505     {
506 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
507         uint32_t reserved_18_31        : 14;
508         uint32_t ecam                  : 2;  /**< [ 17: 16] ECAM number. */
509         uint32_t bus                   : 8;  /**< [ 15:  8] PCI requestor bus number. */
510         uint32_t func                  : 8;  /**< [  7:  0] For ARI devices (when bus is nonzero), an eight-bit RSL function number.
511 
512                                                                  For non-ARI devices (when bus is zero), \<7:3\> is the device number, \<2:0\> the function
513                                                                  number. */
514 #else /* Word 0 - Little Endian */
515         uint32_t func                  : 8;  /**< [  7:  0] For ARI devices (when bus is nonzero), an eight-bit RSL function number.
516 
517                                                                  For non-ARI devices (when bus is zero), \<7:3\> is the device number, \<2:0\> the function
518                                                                  number. */
519         uint32_t bus                   : 8;  /**< [ 15:  8] PCI requestor bus number. */
520         uint32_t ecam                  : 2;  /**< [ 17: 16] ECAM number. */
521         uint32_t reserved_18_31        : 14;
522 #endif /* Word 0 - End */
523     } cn8;
524     struct bdk_pcc_dev_con_s_cn9
525     {
526 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
527         uint32_t reserved_22_31        : 10;
528         uint32_t dmn                   : 6;  /**< [ 21: 16] Domain number. */
529         uint32_t bus                   : 8;  /**< [ 15:  8] PCI requestor bus number. */
530         uint32_t func                  : 8;  /**< [  7:  0] For ARI devices (when bus is nonzero), an eight-bit RSL function number.
531 
532                                                                  For non-ARI devices (when bus is zero), \<7:3\> is the device number, \<2:0\> the function
533                                                                  number. */
534 #else /* Word 0 - Little Endian */
535         uint32_t func                  : 8;  /**< [  7:  0] For ARI devices (when bus is nonzero), an eight-bit RSL function number.
536 
537                                                                  For non-ARI devices (when bus is zero), \<7:3\> is the device number, \<2:0\> the function
538                                                                  number. */
539         uint32_t bus                   : 8;  /**< [ 15:  8] PCI requestor bus number. */
540         uint32_t dmn                   : 6;  /**< [ 21: 16] Domain number. */
541         uint32_t reserved_22_31        : 10;
542 #endif /* Word 0 - End */
543     } cn9;
544 };
545 
546 /**
547  * Structure pcc_ea_entry_s
548  *
549  * PCC PCI Enhanced Allocation Entry Structure
550  * This structure describes the format of an enhanced allocation entry stored in
551  * PCCPF_XXX_EA_ENTRY(). This describes what PCC hardware generates only; software must
552  * implement a full EA parser including testing the [ENTRY_SIZE], [BASE64] and
553  * [OFFSET64] fields.
554  *
555  * PCI configuration registers are 32-bits, however due to tool limitiations this
556  * structure is described as a little-endian 64-bit wide structure.
557  */
558 union bdk_pcc_ea_entry_s
559 {
560     uint64_t u[3];
561     struct bdk_pcc_ea_entry_s_s
562     {
563 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
564         uint64_t basel                 : 30; /**< [ 63: 34] Lower bits of the entry 0 base address. */
565         uint64_t base64                : 1;  /**< [ 33: 33] 64-bit base, indicates [BASEH] is present. For CNXXXX always set. */
566         uint64_t reserved_32           : 1;
567         uint64_t enable                : 1;  /**< [ 31: 31] Enable. Always set. */
568         uint64_t w                     : 1;  /**< [ 30: 30] Writable. Always clear. */
569         uint64_t reserved_24_29        : 6;
570         uint64_t sec_prop              : 8;  /**< [ 23: 16] Secondary properties. For CNXXXX always 0xFF, indicating that the primary properties must
571                                                                  be used. */
572         uint64_t pri_prop              : 8;  /**< [ 15:  8] Primary properties.
573                                                                  0x0 = Memory space, non-prefetchable.
574                                                                  0x4 = Physical function indicating virtual function memory space, non-prefetchable. */
575         uint64_t bei                   : 4;  /**< [  7:  4] BAR equivelent indicator.
576                                                                  0x0 = Entry is equivalent to BAR 0.
577                                                                  0x2 = Entry is equivalent to BAR 2.
578                                                                  0x4 = Entry is equivalent to BAR 4.
579                                                                  0x7 = Equivalent not indicated.
580                                                                  0x9 = Entry is equivalent to SR-IOV BAR 0.
581                                                                  0xB = Entry is equivalent to SR-IOV BAR 2.
582                                                                  0xD = Entry is equivalent to SR-IOV BAR 4. */
583         uint64_t reserved_3            : 1;
584         uint64_t entry_size            : 3;  /**< [  2:  0] Number of 32-bit words following this entry format header, excluding the header
585                                                                  itself.
586                                                                  0x4 = Four 32-bit words; header followed by base low, offset low, base high,
587                                                                  offset high. */
588 #else /* Word 0 - Little Endian */
589         uint64_t entry_size            : 3;  /**< [  2:  0] Number of 32-bit words following this entry format header, excluding the header
590                                                                  itself.
591                                                                  0x4 = Four 32-bit words; header followed by base low, offset low, base high,
592                                                                  offset high. */
593         uint64_t reserved_3            : 1;
594         uint64_t bei                   : 4;  /**< [  7:  4] BAR equivelent indicator.
595                                                                  0x0 = Entry is equivalent to BAR 0.
596                                                                  0x2 = Entry is equivalent to BAR 2.
597                                                                  0x4 = Entry is equivalent to BAR 4.
598                                                                  0x7 = Equivalent not indicated.
599                                                                  0x9 = Entry is equivalent to SR-IOV BAR 0.
600                                                                  0xB = Entry is equivalent to SR-IOV BAR 2.
601                                                                  0xD = Entry is equivalent to SR-IOV BAR 4. */
602         uint64_t pri_prop              : 8;  /**< [ 15:  8] Primary properties.
603                                                                  0x0 = Memory space, non-prefetchable.
604                                                                  0x4 = Physical function indicating virtual function memory space, non-prefetchable. */
605         uint64_t sec_prop              : 8;  /**< [ 23: 16] Secondary properties. For CNXXXX always 0xFF, indicating that the primary properties must
606                                                                  be used. */
607         uint64_t reserved_24_29        : 6;
608         uint64_t w                     : 1;  /**< [ 30: 30] Writable. Always clear. */
609         uint64_t enable                : 1;  /**< [ 31: 31] Enable. Always set. */
610         uint64_t reserved_32           : 1;
611         uint64_t base64                : 1;  /**< [ 33: 33] 64-bit base, indicates [BASEH] is present. For CNXXXX always set. */
612         uint64_t basel                 : 30; /**< [ 63: 34] Lower bits of the entry 0 base address. */
613 #endif /* Word 0 - End */
614 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 1 - Big Endian */
615         uint64_t baseh                 : 32; /**< [127: 96] Upper bits of the entry 0 base address. */
616         uint64_t offsetl               : 30; /**< [ 95: 66] Lower bits of the entry 0 offset. Bits \<1:0\> of the offset are not present and
617                                                                  must be interpreted as all-ones. */
618         uint64_t offset64              : 1;  /**< [ 65: 65] 64-bit offset, indicates [OFFSETH] is present. For CNXXXX always set. */
619         uint64_t reserved_64           : 1;
620 #else /* Word 1 - Little Endian */
621         uint64_t reserved_64           : 1;
622         uint64_t offset64              : 1;  /**< [ 65: 65] 64-bit offset, indicates [OFFSETH] is present. For CNXXXX always set. */
623         uint64_t offsetl               : 30; /**< [ 95: 66] Lower bits of the entry 0 offset. Bits \<1:0\> of the offset are not present and
624                                                                  must be interpreted as all-ones. */
625         uint64_t baseh                 : 32; /**< [127: 96] Upper bits of the entry 0 base address. */
626 #endif /* Word 1 - End */
627 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 2 - Big Endian */
628         uint64_t reserved_160_191      : 32;
629         uint64_t offseth               : 32; /**< [159:128] Upper bits of the entry 0 offset. */
630 #else /* Word 2 - Little Endian */
631         uint64_t offseth               : 32; /**< [159:128] Upper bits of the entry 0 offset. */
632         uint64_t reserved_160_191      : 32;
633 #endif /* Word 2 - End */
634     } s;
635     /* struct bdk_pcc_ea_entry_s_s cn; */
636 };
637 
638 /**
639  * Register (PCCPF) pccpf_xxx_aer_cap_hdr
640  *
641  * PCC PF AER Capability Header Register
642  * This register is the header of the 44-byte PCI advanced error reporting (AER) capability
643  * structure.
644  */
645 union bdk_pccpf_xxx_aer_cap_hdr
646 {
647     uint32_t u;
648     struct bdk_pccpf_xxx_aer_cap_hdr_s
649     {
650 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
651         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If this device is on a nonzero bus, points to
652                                                                  PCCPF_XXX_ARI_CAP_HDR, else 0x0. */
653         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
654         uint32_t aerid                 : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates AER capability. */
655 #else /* Word 0 - Little Endian */
656         uint32_t aerid                 : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates AER capability. */
657         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
658         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If this device is on a nonzero bus, points to
659                                                                  PCCPF_XXX_ARI_CAP_HDR, else 0x0. */
660 #endif /* Word 0 - End */
661     } s;
662     /* struct bdk_pccpf_xxx_aer_cap_hdr_s cn; */
663 };
664 typedef union bdk_pccpf_xxx_aer_cap_hdr bdk_pccpf_xxx_aer_cap_hdr_t;
665 
666 #define BDK_PCCPF_XXX_AER_CAP_HDR BDK_PCCPF_XXX_AER_CAP_HDR_FUNC()
667 static inline uint64_t BDK_PCCPF_XXX_AER_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_AER_CAP_HDR_FUNC(void)668 static inline uint64_t BDK_PCCPF_XXX_AER_CAP_HDR_FUNC(void)
669 {
670     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
671         return 0x140;
672     __bdk_csr_fatal("PCCPF_XXX_AER_CAP_HDR", 0, 0, 0, 0, 0);
673 }
674 
675 #define typedef_BDK_PCCPF_XXX_AER_CAP_HDR bdk_pccpf_xxx_aer_cap_hdr_t
676 #define bustype_BDK_PCCPF_XXX_AER_CAP_HDR BDK_CSR_TYPE_PCCPF
677 #define basename_BDK_PCCPF_XXX_AER_CAP_HDR "PCCPF_XXX_AER_CAP_HDR"
678 #define busnum_BDK_PCCPF_XXX_AER_CAP_HDR 0
679 #define arguments_BDK_PCCPF_XXX_AER_CAP_HDR -1,-1,-1,-1
680 
681 /**
682  * Register (PCCPF) pccpf_xxx_aer_cor_mask
683  *
684  * PCC PF AER Correctable Error Mask Register
685  * This register contains a mask bit for each nonreserved bit in PCCPF_XXX_AER_COR_STATUS.
686  * The mask bits are R/W for PCIe and software compatibility but are not used by hardware.
687  *
688  * This register is reset on a chip domain reset.
689  */
690 union bdk_pccpf_xxx_aer_cor_mask
691 {
692     uint32_t u;
693     struct bdk_pccpf_xxx_aer_cor_mask_s
694     {
695 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
696         uint32_t reserved_15_31        : 17;
697         uint32_t cor_intn              : 1;  /**< [ 14: 14](R/W) Corrected internal error. */
698         uint32_t adv_nfat              : 1;  /**< [ 13: 13](R/W) Advisory nonfatal error. */
699         uint32_t rep_timer             : 1;  /**< [ 12: 12](R/W) Replay timer timeout. */
700         uint32_t reserved_9_11         : 3;
701         uint32_t rep_roll              : 1;  /**< [  8:  8](R/W) Replay number rollover. */
702         uint32_t bad_dllp              : 1;  /**< [  7:  7](R/W) Bad DLLP. */
703         uint32_t bad_tlp               : 1;  /**< [  6:  6](R/W) Bad TLP. */
704         uint32_t reserved_1_5          : 5;
705         uint32_t rcvr                  : 1;  /**< [  0:  0](R/W) Receiver error. */
706 #else /* Word 0 - Little Endian */
707         uint32_t rcvr                  : 1;  /**< [  0:  0](R/W) Receiver error. */
708         uint32_t reserved_1_5          : 5;
709         uint32_t bad_tlp               : 1;  /**< [  6:  6](R/W) Bad TLP. */
710         uint32_t bad_dllp              : 1;  /**< [  7:  7](R/W) Bad DLLP. */
711         uint32_t rep_roll              : 1;  /**< [  8:  8](R/W) Replay number rollover. */
712         uint32_t reserved_9_11         : 3;
713         uint32_t rep_timer             : 1;  /**< [ 12: 12](R/W) Replay timer timeout. */
714         uint32_t adv_nfat              : 1;  /**< [ 13: 13](R/W) Advisory nonfatal error. */
715         uint32_t cor_intn              : 1;  /**< [ 14: 14](R/W) Corrected internal error. */
716         uint32_t reserved_15_31        : 17;
717 #endif /* Word 0 - End */
718     } s;
719     /* struct bdk_pccpf_xxx_aer_cor_mask_s cn; */
720 };
721 typedef union bdk_pccpf_xxx_aer_cor_mask bdk_pccpf_xxx_aer_cor_mask_t;
722 
723 #define BDK_PCCPF_XXX_AER_COR_MASK BDK_PCCPF_XXX_AER_COR_MASK_FUNC()
724 static inline uint64_t BDK_PCCPF_XXX_AER_COR_MASK_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_AER_COR_MASK_FUNC(void)725 static inline uint64_t BDK_PCCPF_XXX_AER_COR_MASK_FUNC(void)
726 {
727     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
728         return 0x154;
729     __bdk_csr_fatal("PCCPF_XXX_AER_COR_MASK", 0, 0, 0, 0, 0);
730 }
731 
732 #define typedef_BDK_PCCPF_XXX_AER_COR_MASK bdk_pccpf_xxx_aer_cor_mask_t
733 #define bustype_BDK_PCCPF_XXX_AER_COR_MASK BDK_CSR_TYPE_PCCPF
734 #define basename_BDK_PCCPF_XXX_AER_COR_MASK "PCCPF_XXX_AER_COR_MASK"
735 #define busnum_BDK_PCCPF_XXX_AER_COR_MASK 0
736 #define arguments_BDK_PCCPF_XXX_AER_COR_MASK -1,-1,-1,-1
737 
738 /**
739  * Register (PCCPF) pccpf_xxx_aer_cor_status
740  *
741  * PCC PF AER Correctable Error Status Register
742  * This register is reset on a chip domain reset.
743  */
744 union bdk_pccpf_xxx_aer_cor_status
745 {
746     uint32_t u;
747     struct bdk_pccpf_xxx_aer_cor_status_s
748     {
749 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
750         uint32_t reserved_15_31        : 17;
751         uint32_t cor_intn              : 1;  /**< [ 14: 14](R/W1C/H) Corrected internal error. Set when one is written to PCCPF_XXX_VSEC_CTL[COR_INTN]. */
752         uint32_t adv_nfat              : 1;  /**< [ 13: 13](R/W1C/H) Advisory non-fatal error. Set when one is written to PCCPF_XXX_VSEC_CTL[ADV_NFAT]. */
753         uint32_t rep_timer             : 1;  /**< [ 12: 12](RO) Replay timer timeout. Always zero. */
754         uint32_t reserved_9_11         : 3;
755         uint32_t rep_roll              : 1;  /**< [  8:  8](RO) Replay number rollover. Always zero. */
756         uint32_t bad_dllp              : 1;  /**< [  7:  7](RO) Bad DLLP. Always zero. */
757         uint32_t bad_tlp               : 1;  /**< [  6:  6](RO) Bad TLP. Always zero. */
758         uint32_t reserved_1_5          : 5;
759         uint32_t rcvr                  : 1;  /**< [  0:  0](RO) Receiver error. Always zero. */
760 #else /* Word 0 - Little Endian */
761         uint32_t rcvr                  : 1;  /**< [  0:  0](RO) Receiver error. Always zero. */
762         uint32_t reserved_1_5          : 5;
763         uint32_t bad_tlp               : 1;  /**< [  6:  6](RO) Bad TLP. Always zero. */
764         uint32_t bad_dllp              : 1;  /**< [  7:  7](RO) Bad DLLP. Always zero. */
765         uint32_t rep_roll              : 1;  /**< [  8:  8](RO) Replay number rollover. Always zero. */
766         uint32_t reserved_9_11         : 3;
767         uint32_t rep_timer             : 1;  /**< [ 12: 12](RO) Replay timer timeout. Always zero. */
768         uint32_t adv_nfat              : 1;  /**< [ 13: 13](R/W1C/H) Advisory non-fatal error. Set when one is written to PCCPF_XXX_VSEC_CTL[ADV_NFAT]. */
769         uint32_t cor_intn              : 1;  /**< [ 14: 14](R/W1C/H) Corrected internal error. Set when one is written to PCCPF_XXX_VSEC_CTL[COR_INTN]. */
770         uint32_t reserved_15_31        : 17;
771 #endif /* Word 0 - End */
772     } s;
773     /* struct bdk_pccpf_xxx_aer_cor_status_s cn; */
774 };
775 typedef union bdk_pccpf_xxx_aer_cor_status bdk_pccpf_xxx_aer_cor_status_t;
776 
777 #define BDK_PCCPF_XXX_AER_COR_STATUS BDK_PCCPF_XXX_AER_COR_STATUS_FUNC()
778 static inline uint64_t BDK_PCCPF_XXX_AER_COR_STATUS_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_AER_COR_STATUS_FUNC(void)779 static inline uint64_t BDK_PCCPF_XXX_AER_COR_STATUS_FUNC(void)
780 {
781     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
782         return 0x150;
783     __bdk_csr_fatal("PCCPF_XXX_AER_COR_STATUS", 0, 0, 0, 0, 0);
784 }
785 
786 #define typedef_BDK_PCCPF_XXX_AER_COR_STATUS bdk_pccpf_xxx_aer_cor_status_t
787 #define bustype_BDK_PCCPF_XXX_AER_COR_STATUS BDK_CSR_TYPE_PCCPF
788 #define basename_BDK_PCCPF_XXX_AER_COR_STATUS "PCCPF_XXX_AER_COR_STATUS"
789 #define busnum_BDK_PCCPF_XXX_AER_COR_STATUS 0
790 #define arguments_BDK_PCCPF_XXX_AER_COR_STATUS -1,-1,-1,-1
791 
792 /**
793  * Register (PCCPF) pccpf_xxx_aer_uncor_mask
794  *
795  * PCC PF AER Uncorrectable Error Mask Register
796  * This register contains a mask bit for each nonreserved bit in PCCPF_XXX_AER_UNCOR_STATUS.
797  * The mask bits are R/W for PCIe and software compatibility but are not used by hardware.
798  *
799  * This register is reset on a chip domain reset.
800  */
801 union bdk_pccpf_xxx_aer_uncor_mask
802 {
803     uint32_t u;
804     struct bdk_pccpf_xxx_aer_uncor_mask_s
805     {
806 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
807         uint32_t reserved_23_31        : 9;
808         uint32_t uncor_intn            : 1;  /**< [ 22: 22](R/W) Uncorrectable internal error. */
809         uint32_t reserved_21           : 1;
810         uint32_t unsup                 : 1;  /**< [ 20: 20](R/W) Unsupported request error. */
811         uint32_t reserved_19           : 1;
812         uint32_t malf_tlp              : 1;  /**< [ 18: 18](R/W) Malformed TLP. */
813         uint32_t reserved_17           : 1;
814         uint32_t unx_comp              : 1;  /**< [ 16: 16](R/W) Unexpected completion. */
815         uint32_t reserved_15           : 1;
816         uint32_t comp_time             : 1;  /**< [ 14: 14](R/W) Completion timeout. */
817         uint32_t reserved_13           : 1;
818         uint32_t poison_tlp            : 1;  /**< [ 12: 12](R/W) Poisoned TLP received. */
819         uint32_t reserved_5_11         : 7;
820         uint32_t dlp                   : 1;  /**< [  4:  4](R/W) Data link protocol error. */
821         uint32_t reserved_0_3          : 4;
822 #else /* Word 0 - Little Endian */
823         uint32_t reserved_0_3          : 4;
824         uint32_t dlp                   : 1;  /**< [  4:  4](R/W) Data link protocol error. */
825         uint32_t reserved_5_11         : 7;
826         uint32_t poison_tlp            : 1;  /**< [ 12: 12](R/W) Poisoned TLP received. */
827         uint32_t reserved_13           : 1;
828         uint32_t comp_time             : 1;  /**< [ 14: 14](R/W) Completion timeout. */
829         uint32_t reserved_15           : 1;
830         uint32_t unx_comp              : 1;  /**< [ 16: 16](R/W) Unexpected completion. */
831         uint32_t reserved_17           : 1;
832         uint32_t malf_tlp              : 1;  /**< [ 18: 18](R/W) Malformed TLP. */
833         uint32_t reserved_19           : 1;
834         uint32_t unsup                 : 1;  /**< [ 20: 20](R/W) Unsupported request error. */
835         uint32_t reserved_21           : 1;
836         uint32_t uncor_intn            : 1;  /**< [ 22: 22](R/W) Uncorrectable internal error. */
837         uint32_t reserved_23_31        : 9;
838 #endif /* Word 0 - End */
839     } s;
840     /* struct bdk_pccpf_xxx_aer_uncor_mask_s cn; */
841 };
842 typedef union bdk_pccpf_xxx_aer_uncor_mask bdk_pccpf_xxx_aer_uncor_mask_t;
843 
844 #define BDK_PCCPF_XXX_AER_UNCOR_MASK BDK_PCCPF_XXX_AER_UNCOR_MASK_FUNC()
845 static inline uint64_t BDK_PCCPF_XXX_AER_UNCOR_MASK_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_AER_UNCOR_MASK_FUNC(void)846 static inline uint64_t BDK_PCCPF_XXX_AER_UNCOR_MASK_FUNC(void)
847 {
848     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
849         return 0x148;
850     __bdk_csr_fatal("PCCPF_XXX_AER_UNCOR_MASK", 0, 0, 0, 0, 0);
851 }
852 
853 #define typedef_BDK_PCCPF_XXX_AER_UNCOR_MASK bdk_pccpf_xxx_aer_uncor_mask_t
854 #define bustype_BDK_PCCPF_XXX_AER_UNCOR_MASK BDK_CSR_TYPE_PCCPF
855 #define basename_BDK_PCCPF_XXX_AER_UNCOR_MASK "PCCPF_XXX_AER_UNCOR_MASK"
856 #define busnum_BDK_PCCPF_XXX_AER_UNCOR_MASK 0
857 #define arguments_BDK_PCCPF_XXX_AER_UNCOR_MASK -1,-1,-1,-1
858 
859 /**
860  * Register (PCCPF) pccpf_xxx_aer_uncor_sever
861  *
862  * PCC PF AER Uncorrectable Error Severity Register
863  * This register controls whether an individual error is reported as a nonfatal or
864  * fatal error. An error is reported as fatal when the corresponding severity bit is set, and
865  * nonfatal otherwise.
866  *
867  * This register is reset on a chip domain reset.
868  */
869 union bdk_pccpf_xxx_aer_uncor_sever
870 {
871     uint32_t u;
872     struct bdk_pccpf_xxx_aer_uncor_sever_s
873     {
874 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
875         uint32_t reserved_23_31        : 9;
876         uint32_t uncor_intn            : 1;  /**< [ 22: 22](R/W) Uncorrectable internal error. */
877         uint32_t reserved_21           : 1;
878         uint32_t unsup                 : 1;  /**< [ 20: 20](R/W) Unsupported request error. */
879         uint32_t reserved_19           : 1;
880         uint32_t malf_tlp              : 1;  /**< [ 18: 18](R/W) Malformed TLP. */
881         uint32_t reserved_17           : 1;
882         uint32_t unx_comp              : 1;  /**< [ 16: 16](R/W) Unexpected completion. */
883         uint32_t reserved_15           : 1;
884         uint32_t comp_time             : 1;  /**< [ 14: 14](R/W) Completion timeout. */
885         uint32_t reserved_13           : 1;
886         uint32_t poison_tlp            : 1;  /**< [ 12: 12](R/W) Poisoned TLP received. */
887         uint32_t reserved_5_11         : 7;
888         uint32_t dlp                   : 1;  /**< [  4:  4](R/W) Data link protocol error. */
889         uint32_t reserved_0_3          : 4;
890 #else /* Word 0 - Little Endian */
891         uint32_t reserved_0_3          : 4;
892         uint32_t dlp                   : 1;  /**< [  4:  4](R/W) Data link protocol error. */
893         uint32_t reserved_5_11         : 7;
894         uint32_t poison_tlp            : 1;  /**< [ 12: 12](R/W) Poisoned TLP received. */
895         uint32_t reserved_13           : 1;
896         uint32_t comp_time             : 1;  /**< [ 14: 14](R/W) Completion timeout. */
897         uint32_t reserved_15           : 1;
898         uint32_t unx_comp              : 1;  /**< [ 16: 16](R/W) Unexpected completion. */
899         uint32_t reserved_17           : 1;
900         uint32_t malf_tlp              : 1;  /**< [ 18: 18](R/W) Malformed TLP. */
901         uint32_t reserved_19           : 1;
902         uint32_t unsup                 : 1;  /**< [ 20: 20](R/W) Unsupported request error. */
903         uint32_t reserved_21           : 1;
904         uint32_t uncor_intn            : 1;  /**< [ 22: 22](R/W) Uncorrectable internal error. */
905         uint32_t reserved_23_31        : 9;
906 #endif /* Word 0 - End */
907     } s;
908     /* struct bdk_pccpf_xxx_aer_uncor_sever_s cn; */
909 };
910 typedef union bdk_pccpf_xxx_aer_uncor_sever bdk_pccpf_xxx_aer_uncor_sever_t;
911 
912 #define BDK_PCCPF_XXX_AER_UNCOR_SEVER BDK_PCCPF_XXX_AER_UNCOR_SEVER_FUNC()
913 static inline uint64_t BDK_PCCPF_XXX_AER_UNCOR_SEVER_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_AER_UNCOR_SEVER_FUNC(void)914 static inline uint64_t BDK_PCCPF_XXX_AER_UNCOR_SEVER_FUNC(void)
915 {
916     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
917         return 0x14c;
918     __bdk_csr_fatal("PCCPF_XXX_AER_UNCOR_SEVER", 0, 0, 0, 0, 0);
919 }
920 
921 #define typedef_BDK_PCCPF_XXX_AER_UNCOR_SEVER bdk_pccpf_xxx_aer_uncor_sever_t
922 #define bustype_BDK_PCCPF_XXX_AER_UNCOR_SEVER BDK_CSR_TYPE_PCCPF
923 #define basename_BDK_PCCPF_XXX_AER_UNCOR_SEVER "PCCPF_XXX_AER_UNCOR_SEVER"
924 #define busnum_BDK_PCCPF_XXX_AER_UNCOR_SEVER 0
925 #define arguments_BDK_PCCPF_XXX_AER_UNCOR_SEVER -1,-1,-1,-1
926 
927 /**
928  * Register (PCCPF) pccpf_xxx_aer_uncor_status
929  *
930  * PCC PF AER Uncorrectable Error Status Register
931  * This register is reset on a chip domain reset.
932  */
933 union bdk_pccpf_xxx_aer_uncor_status
934 {
935     uint32_t u;
936     struct bdk_pccpf_xxx_aer_uncor_status_s
937     {
938 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
939         uint32_t reserved_23_31        : 9;
940         uint32_t uncor_intn            : 1;  /**< [ 22: 22](R/W1C/H) Uncorrectable internal error. Set when one is written to PCCPF_XXX_VSEC_CTL[UNCOR_INTN]. */
941         uint32_t reserved_21           : 1;
942         uint32_t unsup                 : 1;  /**< [ 20: 20](RO) Unsupported request error. Always zero. */
943         uint32_t reserved_19           : 1;
944         uint32_t malf_tlp              : 1;  /**< [ 18: 18](RO) Malformed TLP. Always zero. */
945         uint32_t reserved_17           : 1;
946         uint32_t unx_comp              : 1;  /**< [ 16: 16](RO) Unexpected completion. Always zero. */
947         uint32_t reserved_15           : 1;
948         uint32_t comp_time             : 1;  /**< [ 14: 14](RO) Completion timeout. Always zero. */
949         uint32_t reserved_13           : 1;
950         uint32_t poison_tlp            : 1;  /**< [ 12: 12](R/W1C/H) Poisoned TLP received. Set when one is written to PCCPF_XXX_VSEC_CTL[POISON_TLP]. */
951         uint32_t reserved_5_11         : 7;
952         uint32_t dlp                   : 1;  /**< [  4:  4](RO) Data link protocol error. Always zero. */
953         uint32_t reserved_0_3          : 4;
954 #else /* Word 0 - Little Endian */
955         uint32_t reserved_0_3          : 4;
956         uint32_t dlp                   : 1;  /**< [  4:  4](RO) Data link protocol error. Always zero. */
957         uint32_t reserved_5_11         : 7;
958         uint32_t poison_tlp            : 1;  /**< [ 12: 12](R/W1C/H) Poisoned TLP received. Set when one is written to PCCPF_XXX_VSEC_CTL[POISON_TLP]. */
959         uint32_t reserved_13           : 1;
960         uint32_t comp_time             : 1;  /**< [ 14: 14](RO) Completion timeout. Always zero. */
961         uint32_t reserved_15           : 1;
962         uint32_t unx_comp              : 1;  /**< [ 16: 16](RO) Unexpected completion. Always zero. */
963         uint32_t reserved_17           : 1;
964         uint32_t malf_tlp              : 1;  /**< [ 18: 18](RO) Malformed TLP. Always zero. */
965         uint32_t reserved_19           : 1;
966         uint32_t unsup                 : 1;  /**< [ 20: 20](RO) Unsupported request error. Always zero. */
967         uint32_t reserved_21           : 1;
968         uint32_t uncor_intn            : 1;  /**< [ 22: 22](R/W1C/H) Uncorrectable internal error. Set when one is written to PCCPF_XXX_VSEC_CTL[UNCOR_INTN]. */
969         uint32_t reserved_23_31        : 9;
970 #endif /* Word 0 - End */
971     } s;
972     /* struct bdk_pccpf_xxx_aer_uncor_status_s cn; */
973 };
974 typedef union bdk_pccpf_xxx_aer_uncor_status bdk_pccpf_xxx_aer_uncor_status_t;
975 
976 #define BDK_PCCPF_XXX_AER_UNCOR_STATUS BDK_PCCPF_XXX_AER_UNCOR_STATUS_FUNC()
977 static inline uint64_t BDK_PCCPF_XXX_AER_UNCOR_STATUS_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_AER_UNCOR_STATUS_FUNC(void)978 static inline uint64_t BDK_PCCPF_XXX_AER_UNCOR_STATUS_FUNC(void)
979 {
980     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
981         return 0x144;
982     __bdk_csr_fatal("PCCPF_XXX_AER_UNCOR_STATUS", 0, 0, 0, 0, 0);
983 }
984 
985 #define typedef_BDK_PCCPF_XXX_AER_UNCOR_STATUS bdk_pccpf_xxx_aer_uncor_status_t
986 #define bustype_BDK_PCCPF_XXX_AER_UNCOR_STATUS BDK_CSR_TYPE_PCCPF
987 #define basename_BDK_PCCPF_XXX_AER_UNCOR_STATUS "PCCPF_XXX_AER_UNCOR_STATUS"
988 #define busnum_BDK_PCCPF_XXX_AER_UNCOR_STATUS 0
989 #define arguments_BDK_PCCPF_XXX_AER_UNCOR_STATUS -1,-1,-1,-1
990 
991 /**
992  * Register (PCCPF) pccpf_xxx_ari_cap_hdr
993  *
994  * PCC PF ARI Capability Header Register
995  * This register is the header of the eight-byte PCI ARI capability structure.
996  * If this device is on bus 0x0, this ARI header is not present and reads as 0x0.
997  */
998 union bdk_pccpf_xxx_ari_cap_hdr
999 {
1000     uint32_t u;
1001     struct bdk_pccpf_xxx_ari_cap_hdr_s
1002     {
1003 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1004         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. Points to PCCPF_XXX_VSEC_CAP_HDR. */
1005         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
1006         uint32_t ariid                 : 16; /**< [ 15:  0](RO) PCIE extended capability. */
1007 #else /* Word 0 - Little Endian */
1008         uint32_t ariid                 : 16; /**< [ 15:  0](RO) PCIE extended capability. */
1009         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
1010         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. Points to PCCPF_XXX_VSEC_CAP_HDR. */
1011 #endif /* Word 0 - End */
1012     } s;
1013     struct bdk_pccpf_xxx_ari_cap_hdr_cn9
1014     {
1015 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1016         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If SR-IOV is supported as per PCC_DEV_IDL_E, points to
1017                                                                  PCCPF_XXX_SRIOV_CAP_HDR, else 0x0. */
1018         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version (0x1). */
1019         uint32_t ariid                 : 16; /**< [ 15:  0](RO) PCIE extended capability (0xe). */
1020 #else /* Word 0 - Little Endian */
1021         uint32_t ariid                 : 16; /**< [ 15:  0](RO) PCIE extended capability (0xe). */
1022         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version (0x1). */
1023         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If SR-IOV is supported as per PCC_DEV_IDL_E, points to
1024                                                                  PCCPF_XXX_SRIOV_CAP_HDR, else 0x0. */
1025 #endif /* Word 0 - End */
1026     } cn9;
1027     /* struct bdk_pccpf_xxx_ari_cap_hdr_cn9 cn81xx; */
1028     /* struct bdk_pccpf_xxx_ari_cap_hdr_s cn88xx; */
1029     /* struct bdk_pccpf_xxx_ari_cap_hdr_cn9 cn83xx; */
1030 };
1031 typedef union bdk_pccpf_xxx_ari_cap_hdr bdk_pccpf_xxx_ari_cap_hdr_t;
1032 
1033 #define BDK_PCCPF_XXX_ARI_CAP_HDR BDK_PCCPF_XXX_ARI_CAP_HDR_FUNC()
1034 static inline uint64_t BDK_PCCPF_XXX_ARI_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_ARI_CAP_HDR_FUNC(void)1035 static inline uint64_t BDK_PCCPF_XXX_ARI_CAP_HDR_FUNC(void)
1036 {
1037     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
1038         return 0x140;
1039     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
1040         return 0x140;
1041     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
1042         return 0x100;
1043     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
1044         return 0x170;
1045     __bdk_csr_fatal("PCCPF_XXX_ARI_CAP_HDR", 0, 0, 0, 0, 0);
1046 }
1047 
1048 #define typedef_BDK_PCCPF_XXX_ARI_CAP_HDR bdk_pccpf_xxx_ari_cap_hdr_t
1049 #define bustype_BDK_PCCPF_XXX_ARI_CAP_HDR BDK_CSR_TYPE_PCCPF
1050 #define basename_BDK_PCCPF_XXX_ARI_CAP_HDR "PCCPF_XXX_ARI_CAP_HDR"
1051 #define busnum_BDK_PCCPF_XXX_ARI_CAP_HDR 0
1052 #define arguments_BDK_PCCPF_XXX_ARI_CAP_HDR -1,-1,-1,-1
1053 
1054 /**
1055  * Register (PCCPF) pccpf_xxx_bar0l
1056  *
1057  * PCC PF Base Address 0 Lower Register
1058  */
1059 union bdk_pccpf_xxx_bar0l
1060 {
1061     uint32_t u;
1062     struct bdk_pccpf_xxx_bar0l_s
1063     {
1064 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1065         uint32_t reserved_0_31         : 32;
1066 #else /* Word 0 - Little Endian */
1067         uint32_t reserved_0_31         : 32;
1068 #endif /* Word 0 - End */
1069     } s;
1070     struct bdk_pccpf_xxx_bar0l_cn88xxp1
1071     {
1072 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1073         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 0 base address. See additional BAR related notes in
1074                                                                  PCCPF_XXX_BAR0U[UBAB].
1075 
1076                                                                  Internal:
1077                                                                  From PCC's tie__pfbar0_rbsz and tie__pfbar0_offset. */
1078         uint32_t reserved_4_15         : 12;
1079         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1080         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
1081                                                                  0x0 = 32-bit BAR, or BAR not present.
1082                                                                  0x2 = 64-bit BAR. */
1083         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1084                                                                  0 = BAR is a memory BAR.
1085                                                                  1 = BAR is an I/O BAR. */
1086 #else /* Word 0 - Little Endian */
1087         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1088                                                                  0 = BAR is a memory BAR.
1089                                                                  1 = BAR is an I/O BAR. */
1090         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
1091                                                                  0x0 = 32-bit BAR, or BAR not present.
1092                                                                  0x2 = 64-bit BAR. */
1093         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1094         uint32_t reserved_4_15         : 12;
1095         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 0 base address. See additional BAR related notes in
1096                                                                  PCCPF_XXX_BAR0U[UBAB].
1097 
1098                                                                  Internal:
1099                                                                  From PCC's tie__pfbar0_rbsz and tie__pfbar0_offset. */
1100 #endif /* Word 0 - End */
1101     } cn88xxp1;
1102     struct bdk_pccpf_xxx_bar0l_cn9
1103     {
1104 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1105         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1106 #else /* Word 0 - Little Endian */
1107         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1108 #endif /* Word 0 - End */
1109     } cn9;
1110     struct bdk_pccpf_xxx_bar0l_cn81xx
1111     {
1112 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1113         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 0 base address. See additional BAR related notes in
1114                                                                  PCCPF_XXX_BAR0U[UBAB].
1115 
1116                                                                  Internal:
1117                                                                  From PCC's tie__pfbar0_rbsz and tie__pfbar0_offset. */
1118         uint32_t reserved_4_15         : 12;
1119         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1120         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
1121                                                                  0x0 = 32-bit BAR, or BAR not present.
1122                                                                  0x2 = 64-bit BAR. */
1123         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1124                                                                  0 = BAR is a memory BAR.
1125                                                                  1 = BAR is an I/O BAR. */
1126 #else /* Word 0 - Little Endian */
1127         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1128                                                                  0 = BAR is a memory BAR.
1129                                                                  1 = BAR is an I/O BAR. */
1130         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
1131                                                                  0x0 = 32-bit BAR, or BAR not present.
1132                                                                  0x2 = 64-bit BAR. */
1133         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1134         uint32_t reserved_4_15         : 12;
1135         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 0 base address. See additional BAR related notes in
1136                                                                  PCCPF_XXX_BAR0U[UBAB].
1137 
1138                                                                  Internal:
1139                                                                  From PCC's tie__pfbar0_rbsz and tie__pfbar0_offset. */
1140 #endif /* Word 0 - End */
1141     } cn81xx;
1142     /* struct bdk_pccpf_xxx_bar0l_cn81xx cn83xx; */
1143     /* struct bdk_pccpf_xxx_bar0l_cn81xx cn88xxp2; */
1144 };
1145 typedef union bdk_pccpf_xxx_bar0l bdk_pccpf_xxx_bar0l_t;
1146 
1147 #define BDK_PCCPF_XXX_BAR0L BDK_PCCPF_XXX_BAR0L_FUNC()
1148 static inline uint64_t BDK_PCCPF_XXX_BAR0L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_BAR0L_FUNC(void)1149 static inline uint64_t BDK_PCCPF_XXX_BAR0L_FUNC(void)
1150 {
1151     return 0x10;
1152 }
1153 
1154 #define typedef_BDK_PCCPF_XXX_BAR0L bdk_pccpf_xxx_bar0l_t
1155 #define bustype_BDK_PCCPF_XXX_BAR0L BDK_CSR_TYPE_PCCPF
1156 #define basename_BDK_PCCPF_XXX_BAR0L "PCCPF_XXX_BAR0L"
1157 #define busnum_BDK_PCCPF_XXX_BAR0L 0
1158 #define arguments_BDK_PCCPF_XXX_BAR0L -1,-1,-1,-1
1159 
1160 /**
1161  * Register (PCCPF) pccpf_xxx_bar0u
1162  *
1163  * PCC PF Base Address 0 Upper Register
1164  */
1165 union bdk_pccpf_xxx_bar0u
1166 {
1167     uint32_t u;
1168     struct bdk_pccpf_xxx_bar0u_s
1169     {
1170 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1171         uint32_t reserved_0_31         : 32;
1172 #else /* Word 0 - Little Endian */
1173         uint32_t reserved_0_31         : 32;
1174 #endif /* Word 0 - End */
1175     } s;
1176     struct bdk_pccpf_xxx_bar0u_cn8
1177     {
1178 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1179         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Contains the upper 32 bits of the BAR 0 base address. Bits corresponding to address bits
1180                                                                  less than the size of the BAR are read-as-zero, other bits are read-write only to allow
1181                                                                  determining the size of the BAR. Hardware has fixed address decoding and does not use this
1182                                                                  BAR for address decoding. After sizing, for proper software behavior, software must
1183                                                                  restore the register value, where the proper value may be read from PCCPF_XXX_VSEC_BAR0U,
1184                                                                  with software writing the node number into the field bits corresponding to address bits
1185                                                                  \<45:44\>.
1186 
1187                                                                  Internal:
1188                                                                  From PCC's tie__pfbar0_rbsz and tie__pfbar0_offset. */
1189 #else /* Word 0 - Little Endian */
1190         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Contains the upper 32 bits of the BAR 0 base address. Bits corresponding to address bits
1191                                                                  less than the size of the BAR are read-as-zero, other bits are read-write only to allow
1192                                                                  determining the size of the BAR. Hardware has fixed address decoding and does not use this
1193                                                                  BAR for address decoding. After sizing, for proper software behavior, software must
1194                                                                  restore the register value, where the proper value may be read from PCCPF_XXX_VSEC_BAR0U,
1195                                                                  with software writing the node number into the field bits corresponding to address bits
1196                                                                  \<45:44\>.
1197 
1198                                                                  Internal:
1199                                                                  From PCC's tie__pfbar0_rbsz and tie__pfbar0_offset. */
1200 #endif /* Word 0 - End */
1201     } cn8;
1202     struct bdk_pccpf_xxx_bar0u_cn9
1203     {
1204 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1205         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1206 #else /* Word 0 - Little Endian */
1207         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1208 #endif /* Word 0 - End */
1209     } cn9;
1210 };
1211 typedef union bdk_pccpf_xxx_bar0u bdk_pccpf_xxx_bar0u_t;
1212 
1213 #define BDK_PCCPF_XXX_BAR0U BDK_PCCPF_XXX_BAR0U_FUNC()
1214 static inline uint64_t BDK_PCCPF_XXX_BAR0U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_BAR0U_FUNC(void)1215 static inline uint64_t BDK_PCCPF_XXX_BAR0U_FUNC(void)
1216 {
1217     return 0x14;
1218 }
1219 
1220 #define typedef_BDK_PCCPF_XXX_BAR0U bdk_pccpf_xxx_bar0u_t
1221 #define bustype_BDK_PCCPF_XXX_BAR0U BDK_CSR_TYPE_PCCPF
1222 #define basename_BDK_PCCPF_XXX_BAR0U "PCCPF_XXX_BAR0U"
1223 #define busnum_BDK_PCCPF_XXX_BAR0U 0
1224 #define arguments_BDK_PCCPF_XXX_BAR0U -1,-1,-1,-1
1225 
1226 /**
1227  * Register (PCCPF) pccpf_xxx_bar2l
1228  *
1229  * PCC PF Base Address 2 Lower Register
1230  */
1231 union bdk_pccpf_xxx_bar2l
1232 {
1233     uint32_t u;
1234     struct bdk_pccpf_xxx_bar2l_s
1235     {
1236 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1237         uint32_t reserved_0_31         : 32;
1238 #else /* Word 0 - Little Endian */
1239         uint32_t reserved_0_31         : 32;
1240 #endif /* Word 0 - End */
1241     } s;
1242     struct bdk_pccpf_xxx_bar2l_cn88xxp1
1243     {
1244 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1245         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 2 base address. See additional BAR related notes in
1246                                                                  PCCPF_XXX_BAR0U[UBAB].
1247 
1248                                                                  Internal:
1249                                                                  From PCC's tie__pfbar2_rbsz and tie__pfbar2_offset. */
1250         uint32_t reserved_4_15         : 12;
1251         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1252         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
1253                                                                  0x0 = 32-bit BAR, or BAR not present.
1254                                                                  0x2 = 64-bit BAR. */
1255         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1256                                                                  0 = BAR is a memory BAR.
1257                                                                  1 = BAR is an I/O BAR. */
1258 #else /* Word 0 - Little Endian */
1259         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1260                                                                  0 = BAR is a memory BAR.
1261                                                                  1 = BAR is an I/O BAR. */
1262         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
1263                                                                  0x0 = 32-bit BAR, or BAR not present.
1264                                                                  0x2 = 64-bit BAR. */
1265         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1266         uint32_t reserved_4_15         : 12;
1267         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 2 base address. See additional BAR related notes in
1268                                                                  PCCPF_XXX_BAR0U[UBAB].
1269 
1270                                                                  Internal:
1271                                                                  From PCC's tie__pfbar2_rbsz and tie__pfbar2_offset. */
1272 #endif /* Word 0 - End */
1273     } cn88xxp1;
1274     struct bdk_pccpf_xxx_bar2l_cn9
1275     {
1276 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1277         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1278 #else /* Word 0 - Little Endian */
1279         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1280 #endif /* Word 0 - End */
1281     } cn9;
1282     struct bdk_pccpf_xxx_bar2l_cn81xx
1283     {
1284 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1285         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 2 base address. See additional BAR related notes in
1286                                                                  PCCPF_XXX_BAR0U[UBAB].
1287 
1288                                                                  Internal:
1289                                                                  From PCC's tie__pfbar2_rbsz and tie__pfbar2_offset. */
1290         uint32_t reserved_4_15         : 12;
1291         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1292         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
1293                                                                  0x0 = 32-bit BAR, or BAR not present.
1294                                                                  0x2 = 64-bit BAR. */
1295         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1296                                                                  0 = BAR is a memory BAR.
1297                                                                  1 = BAR is an I/O BAR. */
1298 #else /* Word 0 - Little Endian */
1299         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1300                                                                  0 = BAR is a memory BAR.
1301                                                                  1 = BAR is an I/O BAR. */
1302         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
1303                                                                  0x0 = 32-bit BAR, or BAR not present.
1304                                                                  0x2 = 64-bit BAR. */
1305         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1306         uint32_t reserved_4_15         : 12;
1307         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 2 base address. See additional BAR related notes in
1308                                                                  PCCPF_XXX_BAR0U[UBAB].
1309 
1310                                                                  Internal:
1311                                                                  From PCC's tie__pfbar2_rbsz and tie__pfbar2_offset. */
1312 #endif /* Word 0 - End */
1313     } cn81xx;
1314     /* struct bdk_pccpf_xxx_bar2l_cn81xx cn83xx; */
1315     /* struct bdk_pccpf_xxx_bar2l_cn81xx cn88xxp2; */
1316 };
1317 typedef union bdk_pccpf_xxx_bar2l bdk_pccpf_xxx_bar2l_t;
1318 
1319 #define BDK_PCCPF_XXX_BAR2L BDK_PCCPF_XXX_BAR2L_FUNC()
1320 static inline uint64_t BDK_PCCPF_XXX_BAR2L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_BAR2L_FUNC(void)1321 static inline uint64_t BDK_PCCPF_XXX_BAR2L_FUNC(void)
1322 {
1323     return 0x18;
1324 }
1325 
1326 #define typedef_BDK_PCCPF_XXX_BAR2L bdk_pccpf_xxx_bar2l_t
1327 #define bustype_BDK_PCCPF_XXX_BAR2L BDK_CSR_TYPE_PCCPF
1328 #define basename_BDK_PCCPF_XXX_BAR2L "PCCPF_XXX_BAR2L"
1329 #define busnum_BDK_PCCPF_XXX_BAR2L 0
1330 #define arguments_BDK_PCCPF_XXX_BAR2L -1,-1,-1,-1
1331 
1332 /**
1333  * Register (PCCPF) pccpf_xxx_bar2u
1334  *
1335  * PCC PF Base Address 2 Upper Register
1336  */
1337 union bdk_pccpf_xxx_bar2u
1338 {
1339     uint32_t u;
1340     struct bdk_pccpf_xxx_bar2u_s
1341     {
1342 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1343         uint32_t reserved_0_31         : 32;
1344 #else /* Word 0 - Little Endian */
1345         uint32_t reserved_0_31         : 32;
1346 #endif /* Word 0 - End */
1347     } s;
1348     struct bdk_pccpf_xxx_bar2u_cn8
1349     {
1350 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1351         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Contains the upper 32 bits of the BAR 2 base address. See additional BAR related notes in
1352                                                                  PCCPF_XXX_BAR0U[UBAB].
1353 
1354                                                                  Internal:
1355                                                                  From PCC's tie__pfbar2_rbsz and tie__pfbar2_offset. */
1356 #else /* Word 0 - Little Endian */
1357         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Contains the upper 32 bits of the BAR 2 base address. See additional BAR related notes in
1358                                                                  PCCPF_XXX_BAR0U[UBAB].
1359 
1360                                                                  Internal:
1361                                                                  From PCC's tie__pfbar2_rbsz and tie__pfbar2_offset. */
1362 #endif /* Word 0 - End */
1363     } cn8;
1364     struct bdk_pccpf_xxx_bar2u_cn9
1365     {
1366 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1367         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1368 #else /* Word 0 - Little Endian */
1369         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1370 #endif /* Word 0 - End */
1371     } cn9;
1372 };
1373 typedef union bdk_pccpf_xxx_bar2u bdk_pccpf_xxx_bar2u_t;
1374 
1375 #define BDK_PCCPF_XXX_BAR2U BDK_PCCPF_XXX_BAR2U_FUNC()
1376 static inline uint64_t BDK_PCCPF_XXX_BAR2U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_BAR2U_FUNC(void)1377 static inline uint64_t BDK_PCCPF_XXX_BAR2U_FUNC(void)
1378 {
1379     return 0x1c;
1380 }
1381 
1382 #define typedef_BDK_PCCPF_XXX_BAR2U bdk_pccpf_xxx_bar2u_t
1383 #define bustype_BDK_PCCPF_XXX_BAR2U BDK_CSR_TYPE_PCCPF
1384 #define basename_BDK_PCCPF_XXX_BAR2U "PCCPF_XXX_BAR2U"
1385 #define busnum_BDK_PCCPF_XXX_BAR2U 0
1386 #define arguments_BDK_PCCPF_XXX_BAR2U -1,-1,-1,-1
1387 
1388 /**
1389  * Register (PCCPF) pccpf_xxx_bar4l
1390  *
1391  * PCC PF Base Address 4 Lower Register
1392  */
1393 union bdk_pccpf_xxx_bar4l
1394 {
1395     uint32_t u;
1396     struct bdk_pccpf_xxx_bar4l_s
1397     {
1398 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1399         uint32_t reserved_0_31         : 32;
1400 #else /* Word 0 - Little Endian */
1401         uint32_t reserved_0_31         : 32;
1402 #endif /* Word 0 - End */
1403     } s;
1404     struct bdk_pccpf_xxx_bar4l_cn88xxp1
1405     {
1406 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1407         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 4 base address. See additional BAR related notes in
1408                                                                  PCCPF_XXX_BAR0U[UBAB].
1409 
1410                                                                  Internal:
1411                                                                  From PCC's tie__pfbar4_rbsz and tie__pfbar4_offset. */
1412         uint32_t reserved_4_15         : 12;
1413         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1414         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
1415                                                                  0x0 = 32-bit BAR, or BAR not present.
1416                                                                  0x2 = 64-bit BAR. */
1417         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1418                                                                  0 = BAR is a memory BAR.
1419                                                                  1 = BAR is an I/O BAR. */
1420 #else /* Word 0 - Little Endian */
1421         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1422                                                                  0 = BAR is a memory BAR.
1423                                                                  1 = BAR is an I/O BAR. */
1424         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
1425                                                                  0x0 = 32-bit BAR, or BAR not present.
1426                                                                  0x2 = 64-bit BAR. */
1427         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1428         uint32_t reserved_4_15         : 12;
1429         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 4 base address. See additional BAR related notes in
1430                                                                  PCCPF_XXX_BAR0U[UBAB].
1431 
1432                                                                  Internal:
1433                                                                  From PCC's tie__pfbar4_rbsz and tie__pfbar4_offset. */
1434 #endif /* Word 0 - End */
1435     } cn88xxp1;
1436     struct bdk_pccpf_xxx_bar4l_cn9
1437     {
1438 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1439         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1440 #else /* Word 0 - Little Endian */
1441         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1442 #endif /* Word 0 - End */
1443     } cn9;
1444     struct bdk_pccpf_xxx_bar4l_cn81xx
1445     {
1446 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1447         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 4 base address. See additional BAR related notes in
1448                                                                  PCCPF_XXX_BAR0U[UBAB].
1449 
1450                                                                  Internal:
1451                                                                  From PCC's tie__pfbar4_rbsz and tie__pfbar4_offset. */
1452         uint32_t reserved_4_15         : 12;
1453         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1454         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
1455                                                                  0x0 = 32-bit BAR, or BAR not present.
1456                                                                  0x2 = 64-bit BAR. */
1457         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1458                                                                  0 = BAR is a memory BAR.
1459                                                                  1 = BAR is an I/O BAR. */
1460 #else /* Word 0 - Little Endian */
1461         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
1462                                                                  0 = BAR is a memory BAR.
1463                                                                  1 = BAR is an I/O BAR. */
1464         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
1465                                                                  0x0 = 32-bit BAR, or BAR not present.
1466                                                                  0x2 = 64-bit BAR. */
1467         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
1468         uint32_t reserved_4_15         : 12;
1469         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the BAR 4 base address. See additional BAR related notes in
1470                                                                  PCCPF_XXX_BAR0U[UBAB].
1471 
1472                                                                  Internal:
1473                                                                  From PCC's tie__pfbar4_rbsz and tie__pfbar4_offset. */
1474 #endif /* Word 0 - End */
1475     } cn81xx;
1476     /* struct bdk_pccpf_xxx_bar4l_cn81xx cn83xx; */
1477     /* struct bdk_pccpf_xxx_bar4l_cn81xx cn88xxp2; */
1478 };
1479 typedef union bdk_pccpf_xxx_bar4l bdk_pccpf_xxx_bar4l_t;
1480 
1481 #define BDK_PCCPF_XXX_BAR4L BDK_PCCPF_XXX_BAR4L_FUNC()
1482 static inline uint64_t BDK_PCCPF_XXX_BAR4L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_BAR4L_FUNC(void)1483 static inline uint64_t BDK_PCCPF_XXX_BAR4L_FUNC(void)
1484 {
1485     return 0x20;
1486 }
1487 
1488 #define typedef_BDK_PCCPF_XXX_BAR4L bdk_pccpf_xxx_bar4l_t
1489 #define bustype_BDK_PCCPF_XXX_BAR4L BDK_CSR_TYPE_PCCPF
1490 #define basename_BDK_PCCPF_XXX_BAR4L "PCCPF_XXX_BAR4L"
1491 #define busnum_BDK_PCCPF_XXX_BAR4L 0
1492 #define arguments_BDK_PCCPF_XXX_BAR4L -1,-1,-1,-1
1493 
1494 /**
1495  * Register (PCCPF) pccpf_xxx_bar4u
1496  *
1497  * PCC PF Base Address 4 Upper Register
1498  */
1499 union bdk_pccpf_xxx_bar4u
1500 {
1501     uint32_t u;
1502     struct bdk_pccpf_xxx_bar4u_s
1503     {
1504 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1505         uint32_t reserved_0_31         : 32;
1506 #else /* Word 0 - Little Endian */
1507         uint32_t reserved_0_31         : 32;
1508 #endif /* Word 0 - End */
1509     } s;
1510     struct bdk_pccpf_xxx_bar4u_cn8
1511     {
1512 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1513         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Contains the upper 32 bits of the BAR 4 base address. See additional BAR related notes in
1514                                                                  PCCPF_XXX_BAR0U[UBAB].
1515 
1516                                                                  Internal:
1517                                                                  From PCC's tie__pfbar4_rbsz and tie__pfbar4_offset. */
1518 #else /* Word 0 - Little Endian */
1519         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Contains the upper 32 bits of the BAR 4 base address. See additional BAR related notes in
1520                                                                  PCCPF_XXX_BAR0U[UBAB].
1521 
1522                                                                  Internal:
1523                                                                  From PCC's tie__pfbar4_rbsz and tie__pfbar4_offset. */
1524 #endif /* Word 0 - End */
1525     } cn8;
1526     struct bdk_pccpf_xxx_bar4u_cn9
1527     {
1528 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1529         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1530 #else /* Word 0 - Little Endian */
1531         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
1532 #endif /* Word 0 - End */
1533     } cn9;
1534 };
1535 typedef union bdk_pccpf_xxx_bar4u bdk_pccpf_xxx_bar4u_t;
1536 
1537 #define BDK_PCCPF_XXX_BAR4U BDK_PCCPF_XXX_BAR4U_FUNC()
1538 static inline uint64_t BDK_PCCPF_XXX_BAR4U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_BAR4U_FUNC(void)1539 static inline uint64_t BDK_PCCPF_XXX_BAR4U_FUNC(void)
1540 {
1541     return 0x24;
1542 }
1543 
1544 #define typedef_BDK_PCCPF_XXX_BAR4U bdk_pccpf_xxx_bar4u_t
1545 #define bustype_BDK_PCCPF_XXX_BAR4U BDK_CSR_TYPE_PCCPF
1546 #define basename_BDK_PCCPF_XXX_BAR4U "PCCPF_XXX_BAR4U"
1547 #define busnum_BDK_PCCPF_XXX_BAR4U 0
1548 #define arguments_BDK_PCCPF_XXX_BAR4U -1,-1,-1,-1
1549 
1550 /**
1551  * Register (PCCPF) pccpf_xxx_cap_ptr
1552  *
1553  * PCC PF Capability Pointer Register
1554  */
1555 union bdk_pccpf_xxx_cap_ptr
1556 {
1557     uint32_t u;
1558     struct bdk_pccpf_xxx_cap_ptr_s
1559     {
1560 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1561         uint32_t reserved_8_31         : 24;
1562         uint32_t cp                    : 8;  /**< [  7:  0](RO) First capability pointer. Points to PCCPF_XXX_E_CAP_HDR. */
1563 #else /* Word 0 - Little Endian */
1564         uint32_t cp                    : 8;  /**< [  7:  0](RO) First capability pointer. Points to PCCPF_XXX_E_CAP_HDR. */
1565         uint32_t reserved_8_31         : 24;
1566 #endif /* Word 0 - End */
1567     } s;
1568     /* struct bdk_pccpf_xxx_cap_ptr_s cn; */
1569 };
1570 typedef union bdk_pccpf_xxx_cap_ptr bdk_pccpf_xxx_cap_ptr_t;
1571 
1572 #define BDK_PCCPF_XXX_CAP_PTR BDK_PCCPF_XXX_CAP_PTR_FUNC()
1573 static inline uint64_t BDK_PCCPF_XXX_CAP_PTR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_CAP_PTR_FUNC(void)1574 static inline uint64_t BDK_PCCPF_XXX_CAP_PTR_FUNC(void)
1575 {
1576     return 0x34;
1577 }
1578 
1579 #define typedef_BDK_PCCPF_XXX_CAP_PTR bdk_pccpf_xxx_cap_ptr_t
1580 #define bustype_BDK_PCCPF_XXX_CAP_PTR BDK_CSR_TYPE_PCCPF
1581 #define basename_BDK_PCCPF_XXX_CAP_PTR "PCCPF_XXX_CAP_PTR"
1582 #define busnum_BDK_PCCPF_XXX_CAP_PTR 0
1583 #define arguments_BDK_PCCPF_XXX_CAP_PTR -1,-1,-1,-1
1584 
1585 /**
1586  * Register (PCCPF) pccpf_xxx_clsize
1587  *
1588  * PCC PF Cache Line Size Register
1589  */
1590 union bdk_pccpf_xxx_clsize
1591 {
1592     uint32_t u;
1593     struct bdk_pccpf_xxx_clsize_s
1594     {
1595 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1596         uint32_t bist                  : 8;  /**< [ 31: 24](RO) BIST. */
1597         uint32_t hdrtype               : 8;  /**< [ 23: 16](RO) Header type. For RSL, 0x80 to indicate a multifunction device, else 0x0. Per the SR-IOV
1598                                                                  specification, VFs are not indicated as multifunction devices. */
1599         uint32_t lattim                : 8;  /**< [ 15:  8](RO) Latency timer. */
1600         uint32_t clsize                : 8;  /**< [  7:  0](RO) Cacheline size. */
1601 #else /* Word 0 - Little Endian */
1602         uint32_t clsize                : 8;  /**< [  7:  0](RO) Cacheline size. */
1603         uint32_t lattim                : 8;  /**< [ 15:  8](RO) Latency timer. */
1604         uint32_t hdrtype               : 8;  /**< [ 23: 16](RO) Header type. For RSL, 0x80 to indicate a multifunction device, else 0x0. Per the SR-IOV
1605                                                                  specification, VFs are not indicated as multifunction devices. */
1606         uint32_t bist                  : 8;  /**< [ 31: 24](RO) BIST. */
1607 #endif /* Word 0 - End */
1608     } s;
1609     /* struct bdk_pccpf_xxx_clsize_s cn; */
1610 };
1611 typedef union bdk_pccpf_xxx_clsize bdk_pccpf_xxx_clsize_t;
1612 
1613 #define BDK_PCCPF_XXX_CLSIZE BDK_PCCPF_XXX_CLSIZE_FUNC()
1614 static inline uint64_t BDK_PCCPF_XXX_CLSIZE_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_CLSIZE_FUNC(void)1615 static inline uint64_t BDK_PCCPF_XXX_CLSIZE_FUNC(void)
1616 {
1617     return 0xc;
1618 }
1619 
1620 #define typedef_BDK_PCCPF_XXX_CLSIZE bdk_pccpf_xxx_clsize_t
1621 #define bustype_BDK_PCCPF_XXX_CLSIZE BDK_CSR_TYPE_PCCPF
1622 #define basename_BDK_PCCPF_XXX_CLSIZE "PCCPF_XXX_CLSIZE"
1623 #define busnum_BDK_PCCPF_XXX_CLSIZE 0
1624 #define arguments_BDK_PCCPF_XXX_CLSIZE -1,-1,-1,-1
1625 
1626 /**
1627  * Register (PCCPF) pccpf_xxx_cmd
1628  *
1629  * PCC PF Command/Status Register
1630  * This register is reset on a block domain reset or PF function level reset.
1631  */
1632 union bdk_pccpf_xxx_cmd
1633 {
1634     uint32_t u;
1635     struct bdk_pccpf_xxx_cmd_s
1636     {
1637 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1638         uint32_t reserved_21_31        : 11;
1639         uint32_t cl                    : 1;  /**< [ 20: 20](RO) Capabilities list. Indicates presence of an extended capability item. */
1640         uint32_t reserved_3_19         : 17;
1641         uint32_t me                    : 1;  /**< [  2:  2](RO) Master enable.
1642                                                                  Internal:
1643                                                                  For simplicity always one; we do not disable NCB transactions. */
1644         uint32_t msae                  : 1;  /**< [  1:  1](RO) Memory space access enable.
1645                                                                  Internal:
1646                                                                  NCB/RSL always decoded; have hardcoded BARs. */
1647         uint32_t reserved_0            : 1;
1648 #else /* Word 0 - Little Endian */
1649         uint32_t reserved_0            : 1;
1650         uint32_t msae                  : 1;  /**< [  1:  1](RO) Memory space access enable.
1651                                                                  Internal:
1652                                                                  NCB/RSL always decoded; have hardcoded BARs. */
1653         uint32_t me                    : 1;  /**< [  2:  2](RO) Master enable.
1654                                                                  Internal:
1655                                                                  For simplicity always one; we do not disable NCB transactions. */
1656         uint32_t reserved_3_19         : 17;
1657         uint32_t cl                    : 1;  /**< [ 20: 20](RO) Capabilities list. Indicates presence of an extended capability item. */
1658         uint32_t reserved_21_31        : 11;
1659 #endif /* Word 0 - End */
1660     } s;
1661     /* struct bdk_pccpf_xxx_cmd_s cn8; */
1662     struct bdk_pccpf_xxx_cmd_cn9
1663     {
1664 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1665         uint32_t reserved_21_31        : 11;
1666         uint32_t cl                    : 1;  /**< [ 20: 20](RO) Capabilities list. Indicates presence of an extended capability item. */
1667         uint32_t reserved_3_19         : 17;
1668         uint32_t me                    : 1;  /**< [  2:  2](R/W) Bus master enable. If set, function may initiate upstream DMA or MSI-X
1669                                                                  transactions.
1670 
1671                                                                  If PCCPF_XXX_E_DEV_CAP[FLR] is read-only zero, always set and writes have no
1672                                                                  effect. Resets to zero and writable otherwise.
1673 
1674                                                                  Internal:
1675                                                                  Drives pcc__blk_masterena if block's CSR file has pcc_flr="True"
1676                                                                  attribute. Function must not initiate NCBI DMA requests when
1677                                                                  pcc__blk_masterena=0. In addition, PCC will not generate GIB (MSI-X)
1678                                                                  transactions when this bit is clear. */
1679         uint32_t msae                  : 1;  /**< [  1:  1](RO) Memory space access enable.
1680                                                                  Internal:
1681                                                                  NCB/RSL always decoded; have hardcoded BARs. */
1682         uint32_t reserved_0            : 1;
1683 #else /* Word 0 - Little Endian */
1684         uint32_t reserved_0            : 1;
1685         uint32_t msae                  : 1;  /**< [  1:  1](RO) Memory space access enable.
1686                                                                  Internal:
1687                                                                  NCB/RSL always decoded; have hardcoded BARs. */
1688         uint32_t me                    : 1;  /**< [  2:  2](R/W) Bus master enable. If set, function may initiate upstream DMA or MSI-X
1689                                                                  transactions.
1690 
1691                                                                  If PCCPF_XXX_E_DEV_CAP[FLR] is read-only zero, always set and writes have no
1692                                                                  effect. Resets to zero and writable otherwise.
1693 
1694                                                                  Internal:
1695                                                                  Drives pcc__blk_masterena if block's CSR file has pcc_flr="True"
1696                                                                  attribute. Function must not initiate NCBI DMA requests when
1697                                                                  pcc__blk_masterena=0. In addition, PCC will not generate GIB (MSI-X)
1698                                                                  transactions when this bit is clear. */
1699         uint32_t reserved_3_19         : 17;
1700         uint32_t cl                    : 1;  /**< [ 20: 20](RO) Capabilities list. Indicates presence of an extended capability item. */
1701         uint32_t reserved_21_31        : 11;
1702 #endif /* Word 0 - End */
1703     } cn9;
1704 };
1705 typedef union bdk_pccpf_xxx_cmd bdk_pccpf_xxx_cmd_t;
1706 
1707 #define BDK_PCCPF_XXX_CMD BDK_PCCPF_XXX_CMD_FUNC()
1708 static inline uint64_t BDK_PCCPF_XXX_CMD_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_CMD_FUNC(void)1709 static inline uint64_t BDK_PCCPF_XXX_CMD_FUNC(void)
1710 {
1711     return 4;
1712 }
1713 
1714 #define typedef_BDK_PCCPF_XXX_CMD bdk_pccpf_xxx_cmd_t
1715 #define bustype_BDK_PCCPF_XXX_CMD BDK_CSR_TYPE_PCCPF
1716 #define basename_BDK_PCCPF_XXX_CMD "PCCPF_XXX_CMD"
1717 #define busnum_BDK_PCCPF_XXX_CMD 0
1718 #define arguments_BDK_PCCPF_XXX_CMD -1,-1,-1,-1
1719 
1720 /**
1721  * Register (PCCPF) pccpf_xxx_e_cap_hdr
1722  *
1723  * PCC PF PCI Express Capabilities Register
1724  * This register is the header of the 64-byte PCIe capability header.
1725  */
1726 union bdk_pccpf_xxx_e_cap_hdr
1727 {
1728     uint32_t u;
1729     struct bdk_pccpf_xxx_e_cap_hdr_s
1730     {
1731 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1732         uint32_t reserved_24_31        : 8;
1733         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Device/port type. Indicates PCIe endpoint (0x0) for ARI devices (when bus is nonzero) and
1734                                                                  integrated endpoint (0x9) otherwise. */
1735         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1736         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. If MSI-X is supported, points to
1737                                                                  PCCPF_XXX_MSIX_CAP_HDR, else 0x0. */
1738         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1739 #else /* Word 0 - Little Endian */
1740         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1741         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. If MSI-X is supported, points to
1742                                                                  PCCPF_XXX_MSIX_CAP_HDR, else 0x0. */
1743         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1744         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Device/port type. Indicates PCIe endpoint (0x0) for ARI devices (when bus is nonzero) and
1745                                                                  integrated endpoint (0x9) otherwise. */
1746         uint32_t reserved_24_31        : 8;
1747 #endif /* Word 0 - End */
1748     } s;
1749     struct bdk_pccpf_xxx_e_cap_hdr_cn88xxp1
1750     {
1751 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1752         uint32_t reserved_20_31        : 12;
1753         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1754         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. If MSI-X is supported, points to
1755                                                                  PCCPF_XXX_MSIX_CAP_HDR, else 0x0. */
1756         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1757 #else /* Word 0 - Little Endian */
1758         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1759         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. If MSI-X is supported, points to
1760                                                                  PCCPF_XXX_MSIX_CAP_HDR, else 0x0. */
1761         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1762         uint32_t reserved_20_31        : 12;
1763 #endif /* Word 0 - End */
1764     } cn88xxp1;
1765     struct bdk_pccpf_xxx_e_cap_hdr_cn9
1766     {
1767 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1768         uint32_t reserved_24_31        : 8;
1769         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Device/port type. Indicates PCIe endpoint (0x0) for ARI devices (when bus is nonzero) and
1770                                                                  integrated endpoint (0x9) otherwise. */
1771         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1772         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If MSI-X is supported, points to
1773                                                                  PCCPF_XXX_MSIX_CAP_HDR, else points to PCCPF_XXX_EA_CAP_HDR. */
1774         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1775 #else /* Word 0 - Little Endian */
1776         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1777         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If MSI-X is supported, points to
1778                                                                  PCCPF_XXX_MSIX_CAP_HDR, else points to PCCPF_XXX_EA_CAP_HDR. */
1779         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1780         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Device/port type. Indicates PCIe endpoint (0x0) for ARI devices (when bus is nonzero) and
1781                                                                  integrated endpoint (0x9) otherwise. */
1782         uint32_t reserved_24_31        : 8;
1783 #endif /* Word 0 - End */
1784     } cn9;
1785     struct bdk_pccpf_xxx_e_cap_hdr_cn81xx
1786     {
1787 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1788         uint32_t reserved_24_31        : 8;
1789         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Device/port type. Indicates PCIe endpoint (0x0) for ARI devices (when bus is nonzero) and
1790                                                                  integrated endpoint (0x9) otherwise. */
1791         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1792         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If MSI-X is supported, points to
1793                                                                  PCCPF_XXX_MSIX_CAP_HDR, else if PCCPF_XXX_VSEC_SCTL[EA] is set points to
1794                                                                  PCCPF_XXX_EA_CAP_HDR, else 0x0. */
1795         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1796 #else /* Word 0 - Little Endian */
1797         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1798         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If MSI-X is supported, points to
1799                                                                  PCCPF_XXX_MSIX_CAP_HDR, else if PCCPF_XXX_VSEC_SCTL[EA] is set points to
1800                                                                  PCCPF_XXX_EA_CAP_HDR, else 0x0. */
1801         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1802         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Device/port type. Indicates PCIe endpoint (0x0) for ARI devices (when bus is nonzero) and
1803                                                                  integrated endpoint (0x9) otherwise. */
1804         uint32_t reserved_24_31        : 8;
1805 #endif /* Word 0 - End */
1806     } cn81xx;
1807     /* struct bdk_pccpf_xxx_e_cap_hdr_cn81xx cn83xx; */
1808     struct bdk_pccpf_xxx_e_cap_hdr_cn88xxp2
1809     {
1810 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1811         uint32_t reserved_24_31        : 8;
1812         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Reserved. */
1813         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1814         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If MSI-X is supported, points to
1815                                                                  PCCPF_XXX_MSIX_CAP_HDR, else if PCCPF_XXX_VSEC_SCTL[EA] is set points to
1816                                                                  PCCPF_XXX_EA_CAP_HDR, else 0x0. */
1817         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1818 #else /* Word 0 - Little Endian */
1819         uint32_t pcieid                : 8;  /**< [  7:  0](RO) PCIe capability ID. */
1820         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If MSI-X is supported, points to
1821                                                                  PCCPF_XXX_MSIX_CAP_HDR, else if PCCPF_XXX_VSEC_SCTL[EA] is set points to
1822                                                                  PCCPF_XXX_EA_CAP_HDR, else 0x0. */
1823         uint32_t pciecv                : 4;  /**< [ 19: 16](RO) PCIe capability version. */
1824         uint32_t dpt                   : 4;  /**< [ 23: 20](RO) Reserved. */
1825         uint32_t reserved_24_31        : 8;
1826 #endif /* Word 0 - End */
1827     } cn88xxp2;
1828 };
1829 typedef union bdk_pccpf_xxx_e_cap_hdr bdk_pccpf_xxx_e_cap_hdr_t;
1830 
1831 #define BDK_PCCPF_XXX_E_CAP_HDR BDK_PCCPF_XXX_E_CAP_HDR_FUNC()
1832 static inline uint64_t BDK_PCCPF_XXX_E_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_E_CAP_HDR_FUNC(void)1833 static inline uint64_t BDK_PCCPF_XXX_E_CAP_HDR_FUNC(void)
1834 {
1835     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
1836         return 0x40;
1837     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
1838         return 0x40;
1839     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS1_X))
1840         return 0x70;
1841     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
1842         return 0x40;
1843     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
1844         return 0x40;
1845     __bdk_csr_fatal("PCCPF_XXX_E_CAP_HDR", 0, 0, 0, 0, 0);
1846 }
1847 
1848 #define typedef_BDK_PCCPF_XXX_E_CAP_HDR bdk_pccpf_xxx_e_cap_hdr_t
1849 #define bustype_BDK_PCCPF_XXX_E_CAP_HDR BDK_CSR_TYPE_PCCPF
1850 #define basename_BDK_PCCPF_XXX_E_CAP_HDR "PCCPF_XXX_E_CAP_HDR"
1851 #define busnum_BDK_PCCPF_XXX_E_CAP_HDR 0
1852 #define arguments_BDK_PCCPF_XXX_E_CAP_HDR -1,-1,-1,-1
1853 
1854 /**
1855  * Register (PCCPF) pccpf_xxx_e_dev_cap
1856  *
1857  * PCC PF PCI Express Device Capabilities Register
1858  */
1859 union bdk_pccpf_xxx_e_dev_cap
1860 {
1861     uint32_t u;
1862     struct bdk_pccpf_xxx_e_dev_cap_s
1863     {
1864 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1865         uint32_t reserved_29_31        : 3;
1866         uint32_t flr                   : 1;  /**< [ 28: 28](RO) Function level reset capability. If set, PCCPF_XXX_E_DEV_CTL[BCR_FLR] is
1867                                                                  implemented.
1868 
1869                                                                  In CNXXX:
1870                                                                    0 = PCCPF_XXX_E_DEV_CTL[BCR_FLR] is ignored, PCCPF_XXX_E_DEV_CTL[TRPEND] is
1871                                                                    always zero, PCCPF_XXX_CMD[ME] is always set, and PCCPF_XXX_SRIOV_CTL[VFE] is
1872                                                                    always set (for SR-IOV functions).
1873 
1874                                                                    1 = PCCPF_XXX_E_DEV_CTL[BCR_FLR], PCCPF_XXX_E_DEV_CTL[TRPEND],
1875                                                                    PCCPF_XXX_CMD[ME], and PCCPF_XXX_SRIOV_CTL[VFE] (if applicable) are
1876                                                                    functional.
1877 
1878                                                                  Internal:
1879                                                                  Returns 1 if block's CSR file has pcc_flr="True" attribute. */
1880         uint32_t reserved_16_27        : 12;
1881         uint32_t rber                  : 1;  /**< [ 15: 15](RO) Role-based error reporting. Required to be set by PCIe3.1. */
1882         uint32_t reserved_0_14         : 15;
1883 #else /* Word 0 - Little Endian */
1884         uint32_t reserved_0_14         : 15;
1885         uint32_t rber                  : 1;  /**< [ 15: 15](RO) Role-based error reporting. Required to be set by PCIe3.1. */
1886         uint32_t reserved_16_27        : 12;
1887         uint32_t flr                   : 1;  /**< [ 28: 28](RO) Function level reset capability. If set, PCCPF_XXX_E_DEV_CTL[BCR_FLR] is
1888                                                                  implemented.
1889 
1890                                                                  In CNXXX:
1891                                                                    0 = PCCPF_XXX_E_DEV_CTL[BCR_FLR] is ignored, PCCPF_XXX_E_DEV_CTL[TRPEND] is
1892                                                                    always zero, PCCPF_XXX_CMD[ME] is always set, and PCCPF_XXX_SRIOV_CTL[VFE] is
1893                                                                    always set (for SR-IOV functions).
1894 
1895                                                                    1 = PCCPF_XXX_E_DEV_CTL[BCR_FLR], PCCPF_XXX_E_DEV_CTL[TRPEND],
1896                                                                    PCCPF_XXX_CMD[ME], and PCCPF_XXX_SRIOV_CTL[VFE] (if applicable) are
1897                                                                    functional.
1898 
1899                                                                  Internal:
1900                                                                  Returns 1 if block's CSR file has pcc_flr="True" attribute. */
1901         uint32_t reserved_29_31        : 3;
1902 #endif /* Word 0 - End */
1903     } s;
1904     struct bdk_pccpf_xxx_e_dev_cap_cn8
1905     {
1906 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1907         uint32_t reserved_16_31        : 16;
1908         uint32_t rber                  : 1;  /**< [ 15: 15](RO) Role-based error reporting. Required to be set by PCIe3.1. */
1909         uint32_t reserved_0_14         : 15;
1910 #else /* Word 0 - Little Endian */
1911         uint32_t reserved_0_14         : 15;
1912         uint32_t rber                  : 1;  /**< [ 15: 15](RO) Role-based error reporting. Required to be set by PCIe3.1. */
1913         uint32_t reserved_16_31        : 16;
1914 #endif /* Word 0 - End */
1915     } cn8;
1916     /* struct bdk_pccpf_xxx_e_dev_cap_s cn9; */
1917 };
1918 typedef union bdk_pccpf_xxx_e_dev_cap bdk_pccpf_xxx_e_dev_cap_t;
1919 
1920 #define BDK_PCCPF_XXX_E_DEV_CAP BDK_PCCPF_XXX_E_DEV_CAP_FUNC()
1921 static inline uint64_t BDK_PCCPF_XXX_E_DEV_CAP_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_E_DEV_CAP_FUNC(void)1922 static inline uint64_t BDK_PCCPF_XXX_E_DEV_CAP_FUNC(void)
1923 {
1924     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
1925         return 0x44;
1926     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
1927         return 0x44;
1928     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
1929         return 0x44;
1930     __bdk_csr_fatal("PCCPF_XXX_E_DEV_CAP", 0, 0, 0, 0, 0);
1931 }
1932 
1933 #define typedef_BDK_PCCPF_XXX_E_DEV_CAP bdk_pccpf_xxx_e_dev_cap_t
1934 #define bustype_BDK_PCCPF_XXX_E_DEV_CAP BDK_CSR_TYPE_PCCPF
1935 #define basename_BDK_PCCPF_XXX_E_DEV_CAP "PCCPF_XXX_E_DEV_CAP"
1936 #define busnum_BDK_PCCPF_XXX_E_DEV_CAP 0
1937 #define arguments_BDK_PCCPF_XXX_E_DEV_CAP -1,-1,-1,-1
1938 
1939 /**
1940  * Register (PCCPF) pccpf_xxx_e_dev_ctl
1941  *
1942  * PCC PF PCI Express Device Control and Status Register
1943  * This register is reset on a block domain reset or PF function level reset.
1944  */
1945 union bdk_pccpf_xxx_e_dev_ctl
1946 {
1947     uint32_t u;
1948     struct bdk_pccpf_xxx_e_dev_ctl_s
1949     {
1950 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
1951         uint32_t reserved_22_31        : 10;
1952         uint32_t trpend                : 1;  /**< [ 21: 21](RO/H) Transactions pending. If PCCPF_XXX_E_DEV_CAP[FLR] is clear, always 0. */
1953         uint32_t reserved_20           : 1;
1954         uint32_t urd                   : 1;  /**< [ 19: 19](RO) Unsupported request detected. Always zero. */
1955         uint32_t fed                   : 1;  /**< [ 18: 18](R/W1C/H) Fatal error detected. Set when any bit in PCCPF_XXX_AER_UNCOR_STATUS transitions
1956                                                                  to one while the corresponding bit in PCCPF_XXX_AER_UNCOR_SEVER is set. */
1957         uint32_t nfed                  : 1;  /**< [ 17: 17](R/W1C/H) Non-fatal error detected. Set when any bit in PCCPF_XXX_AER_UNCOR_STATUS
1958                                                                  transitions to one while the corresponding bit in PCCPF_XXX_AER_UNCOR_SEVER is
1959                                                                  clear. */
1960         uint32_t ced                   : 1;  /**< [ 16: 16](R/W1C/H) Correctable error detected. Set when any bit in PCCPF_XXX_AER_COR_STATUS transitions to one. */
1961         uint32_t bcr_flr               : 1;  /**< [ 15: 15](R/W1S/H) Initiate function level reset. Writing a one to this bit initiates function level
1962                                                                  reset if PCCPF_XXX_E_DEV_CAP[FLR] is set, else writes have no effect. This is a
1963                                                                  self-clearing bit and always reads as zero. */
1964         uint32_t reserved_4_14         : 11;
1965         uint32_t urre                  : 1;  /**< [  3:  3](R/W) Unsupported request reporting enable. R/W for PCIe and software compatibility, not
1966                                                                  used by hardware. */
1967         uint32_t fere                  : 1;  /**< [  2:  2](R/W) Fatal error reporting enable. R/W for PCIe and software compatibility, not
1968                                                                  used by hardware. */
1969         uint32_t nfere                 : 1;  /**< [  1:  1](R/W) Nonfatal error reporting enable. R/W for PCIe and software compatibility, not
1970                                                                  used by hardware. */
1971         uint32_t cere                  : 1;  /**< [  0:  0](R/W) Correctable error reporting enable. R/W for PCIe and software compatibility, not
1972                                                                  used by hardware. */
1973 #else /* Word 0 - Little Endian */
1974         uint32_t cere                  : 1;  /**< [  0:  0](R/W) Correctable error reporting enable. R/W for PCIe and software compatibility, not
1975                                                                  used by hardware. */
1976         uint32_t nfere                 : 1;  /**< [  1:  1](R/W) Nonfatal error reporting enable. R/W for PCIe and software compatibility, not
1977                                                                  used by hardware. */
1978         uint32_t fere                  : 1;  /**< [  2:  2](R/W) Fatal error reporting enable. R/W for PCIe and software compatibility, not
1979                                                                  used by hardware. */
1980         uint32_t urre                  : 1;  /**< [  3:  3](R/W) Unsupported request reporting enable. R/W for PCIe and software compatibility, not
1981                                                                  used by hardware. */
1982         uint32_t reserved_4_14         : 11;
1983         uint32_t bcr_flr               : 1;  /**< [ 15: 15](R/W1S/H) Initiate function level reset. Writing a one to this bit initiates function level
1984                                                                  reset if PCCPF_XXX_E_DEV_CAP[FLR] is set, else writes have no effect. This is a
1985                                                                  self-clearing bit and always reads as zero. */
1986         uint32_t ced                   : 1;  /**< [ 16: 16](R/W1C/H) Correctable error detected. Set when any bit in PCCPF_XXX_AER_COR_STATUS transitions to one. */
1987         uint32_t nfed                  : 1;  /**< [ 17: 17](R/W1C/H) Non-fatal error detected. Set when any bit in PCCPF_XXX_AER_UNCOR_STATUS
1988                                                                  transitions to one while the corresponding bit in PCCPF_XXX_AER_UNCOR_SEVER is
1989                                                                  clear. */
1990         uint32_t fed                   : 1;  /**< [ 18: 18](R/W1C/H) Fatal error detected. Set when any bit in PCCPF_XXX_AER_UNCOR_STATUS transitions
1991                                                                  to one while the corresponding bit in PCCPF_XXX_AER_UNCOR_SEVER is set. */
1992         uint32_t urd                   : 1;  /**< [ 19: 19](RO) Unsupported request detected. Always zero. */
1993         uint32_t reserved_20           : 1;
1994         uint32_t trpend                : 1;  /**< [ 21: 21](RO/H) Transactions pending. If PCCPF_XXX_E_DEV_CAP[FLR] is clear, always 0. */
1995         uint32_t reserved_22_31        : 10;
1996 #endif /* Word 0 - End */
1997     } s;
1998     /* struct bdk_pccpf_xxx_e_dev_ctl_s cn; */
1999 };
2000 typedef union bdk_pccpf_xxx_e_dev_ctl bdk_pccpf_xxx_e_dev_ctl_t;
2001 
2002 #define BDK_PCCPF_XXX_E_DEV_CTL BDK_PCCPF_XXX_E_DEV_CTL_FUNC()
2003 static inline uint64_t BDK_PCCPF_XXX_E_DEV_CTL_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_E_DEV_CTL_FUNC(void)2004 static inline uint64_t BDK_PCCPF_XXX_E_DEV_CTL_FUNC(void)
2005 {
2006     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
2007         return 0x48;
2008     __bdk_csr_fatal("PCCPF_XXX_E_DEV_CTL", 0, 0, 0, 0, 0);
2009 }
2010 
2011 #define typedef_BDK_PCCPF_XXX_E_DEV_CTL bdk_pccpf_xxx_e_dev_ctl_t
2012 #define bustype_BDK_PCCPF_XXX_E_DEV_CTL BDK_CSR_TYPE_PCCPF
2013 #define basename_BDK_PCCPF_XXX_E_DEV_CTL "PCCPF_XXX_E_DEV_CTL"
2014 #define busnum_BDK_PCCPF_XXX_E_DEV_CTL 0
2015 #define arguments_BDK_PCCPF_XXX_E_DEV_CTL -1,-1,-1,-1
2016 
2017 /**
2018  * Register (PCCPF) pccpf_xxx_ea_cap_hdr
2019  *
2020  * PCC PF PCI Enhanced Allocation Capabilities Register
2021  * This register is the header of the variable-sized PCI enhanced allocation capability
2022  * structure for type 0 devices.
2023  */
2024 union bdk_pccpf_xxx_ea_cap_hdr
2025 {
2026     uint32_t u;
2027     struct bdk_pccpf_xxx_ea_cap_hdr_s
2028     {
2029 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2030         uint32_t reserved_22_31        : 10;
2031         uint32_t num_entries           : 6;  /**< [ 21: 16](RO/H) Number of enhanced entries:
2032                                                                    0x0 = No nonzero BARs.
2033                                                                    0x1 = 1 nonzero normal or SR-IOV BARs.
2034                                                                    0x2 = 2 nonzero normal or SR-IOV BARs.
2035                                                                    0x3 = 3 nonzero normal or SR-IOV BARs.
2036                                                                    0x4 = 4 nonzero normal or SR-IOV BARs.
2037 
2038                                                                  CNXXXX never has more than four normal or SR-IOV BARs. */
2039         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer.  No next capability. */
2040         uint32_t pcieid                : 8;  /**< [  7:  0](RO/H) Enhanced allocation capability ID. */
2041 #else /* Word 0 - Little Endian */
2042         uint32_t pcieid                : 8;  /**< [  7:  0](RO/H) Enhanced allocation capability ID. */
2043         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer.  No next capability. */
2044         uint32_t num_entries           : 6;  /**< [ 21: 16](RO/H) Number of enhanced entries:
2045                                                                    0x0 = No nonzero BARs.
2046                                                                    0x1 = 1 nonzero normal or SR-IOV BARs.
2047                                                                    0x2 = 2 nonzero normal or SR-IOV BARs.
2048                                                                    0x3 = 3 nonzero normal or SR-IOV BARs.
2049                                                                    0x4 = 4 nonzero normal or SR-IOV BARs.
2050 
2051                                                                  CNXXXX never has more than four normal or SR-IOV BARs. */
2052         uint32_t reserved_22_31        : 10;
2053 #endif /* Word 0 - End */
2054     } s;
2055     /* struct bdk_pccpf_xxx_ea_cap_hdr_s cn8; */
2056     struct bdk_pccpf_xxx_ea_cap_hdr_cn9
2057     {
2058 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2059         uint32_t reserved_22_31        : 10;
2060         uint32_t num_entries           : 6;  /**< [ 21: 16](RO/H) Number of enhanced entries:
2061                                                                    0x0 = No nonzero BARs.
2062                                                                    0x1 = 1 nonzero normal or SR-IOV BARs.
2063                                                                    0x2 = 2 nonzero normal or SR-IOV BARs.
2064                                                                    0x3 = 3 nonzero normal or SR-IOV BARs.
2065                                                                    0x4 = 4 nonzero normal or SR-IOV BARs.
2066 
2067                                                                  CNXXXX never has more than four normal or SR-IOV BARs. */
2068         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer.  No next capability. */
2069         uint32_t pcieid                : 8;  /**< [  7:  0](RO) Enhanced allocation capability ID. */
2070 #else /* Word 0 - Little Endian */
2071         uint32_t pcieid                : 8;  /**< [  7:  0](RO) Enhanced allocation capability ID. */
2072         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer.  No next capability. */
2073         uint32_t num_entries           : 6;  /**< [ 21: 16](RO/H) Number of enhanced entries:
2074                                                                    0x0 = No nonzero BARs.
2075                                                                    0x1 = 1 nonzero normal or SR-IOV BARs.
2076                                                                    0x2 = 2 nonzero normal or SR-IOV BARs.
2077                                                                    0x3 = 3 nonzero normal or SR-IOV BARs.
2078                                                                    0x4 = 4 nonzero normal or SR-IOV BARs.
2079 
2080                                                                  CNXXXX never has more than four normal or SR-IOV BARs. */
2081         uint32_t reserved_22_31        : 10;
2082 #endif /* Word 0 - End */
2083     } cn9;
2084 };
2085 typedef union bdk_pccpf_xxx_ea_cap_hdr bdk_pccpf_xxx_ea_cap_hdr_t;
2086 
2087 #define BDK_PCCPF_XXX_EA_CAP_HDR BDK_PCCPF_XXX_EA_CAP_HDR_FUNC()
2088 static inline uint64_t BDK_PCCPF_XXX_EA_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_EA_CAP_HDR_FUNC(void)2089 static inline uint64_t BDK_PCCPF_XXX_EA_CAP_HDR_FUNC(void)
2090 {
2091     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
2092         return 0x98;
2093     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
2094         return 0x98;
2095     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
2096         return 0x98;
2097     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
2098         return 0x98;
2099     __bdk_csr_fatal("PCCPF_XXX_EA_CAP_HDR", 0, 0, 0, 0, 0);
2100 }
2101 
2102 #define typedef_BDK_PCCPF_XXX_EA_CAP_HDR bdk_pccpf_xxx_ea_cap_hdr_t
2103 #define bustype_BDK_PCCPF_XXX_EA_CAP_HDR BDK_CSR_TYPE_PCCPF
2104 #define basename_BDK_PCCPF_XXX_EA_CAP_HDR "PCCPF_XXX_EA_CAP_HDR"
2105 #define busnum_BDK_PCCPF_XXX_EA_CAP_HDR 0
2106 #define arguments_BDK_PCCPF_XXX_EA_CAP_HDR -1,-1,-1,-1
2107 
2108 /**
2109  * Register (PCCPF) pccpf_xxx_ea_entry#
2110  *
2111  * PCC PF PCI Enhanced Allocation Entry Registers
2112  * These registers contain up to four sequential enhanced allocation entries. Each
2113  * entry consists of five sequential 32-bit words described by PCC_EA_ENTRY_S.
2114  */
2115 union bdk_pccpf_xxx_ea_entryx
2116 {
2117     uint32_t u;
2118     struct bdk_pccpf_xxx_ea_entryx_s
2119     {
2120 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2121         uint32_t data                  : 32; /**< [ 31:  0](RO/H) Entry data.  See PCC_EA_ENTRY_S. */
2122 #else /* Word 0 - Little Endian */
2123         uint32_t data                  : 32; /**< [ 31:  0](RO/H) Entry data.  See PCC_EA_ENTRY_S. */
2124 #endif /* Word 0 - End */
2125     } s;
2126     /* struct bdk_pccpf_xxx_ea_entryx_s cn; */
2127 };
2128 typedef union bdk_pccpf_xxx_ea_entryx bdk_pccpf_xxx_ea_entryx_t;
2129 
2130 static inline uint64_t BDK_PCCPF_XXX_EA_ENTRYX(unsigned long a) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_EA_ENTRYX(unsigned long a)2131 static inline uint64_t BDK_PCCPF_XXX_EA_ENTRYX(unsigned long a)
2132 {
2133     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a<=19))
2134         return 0x9c + 4 * ((a) & 0x1f);
2135     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=24))
2136         return 0x9c + 4 * ((a) & 0x1f);
2137     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X) && (a<=19))
2138         return 0x9c + 4 * ((a) & 0x1f);
2139     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX) && (a<=24))
2140         return 0x9c + 4 * ((a) & 0x1f);
2141     __bdk_csr_fatal("PCCPF_XXX_EA_ENTRYX", 1, a, 0, 0, 0);
2142 }
2143 
2144 #define typedef_BDK_PCCPF_XXX_EA_ENTRYX(a) bdk_pccpf_xxx_ea_entryx_t
2145 #define bustype_BDK_PCCPF_XXX_EA_ENTRYX(a) BDK_CSR_TYPE_PCCPF
2146 #define basename_BDK_PCCPF_XXX_EA_ENTRYX(a) "PCCPF_XXX_EA_ENTRYX"
2147 #define busnum_BDK_PCCPF_XXX_EA_ENTRYX(a) (a)
2148 #define arguments_BDK_PCCPF_XXX_EA_ENTRYX(a) (a),-1,-1,-1
2149 
2150 /**
2151  * Register (PCCPF) pccpf_xxx_id
2152  *
2153  * PCC PF Vendor and Device ID Register
2154  * This register is the header of the 64-byte PCI type 0 configuration structure.
2155  */
2156 union bdk_pccpf_xxx_id
2157 {
2158     uint32_t u;
2159     struct bdk_pccpf_xxx_id_s
2160     {
2161 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2162         uint32_t devid                 : 16; /**< [ 31: 16](RO) Device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
2163 
2164                                                                  Internal:
2165                                                                  Unit
2166                                                                  from PCC's tie__pfunitid. */
2167         uint32_t vendid                : 16; /**< [ 15:  0](RO) Cavium's vendor ID. Enumerated by PCC_VENDOR_E::CAVIUM. */
2168 #else /* Word 0 - Little Endian */
2169         uint32_t vendid                : 16; /**< [ 15:  0](RO) Cavium's vendor ID. Enumerated by PCC_VENDOR_E::CAVIUM. */
2170         uint32_t devid                 : 16; /**< [ 31: 16](RO) Device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
2171 
2172                                                                  Internal:
2173                                                                  Unit
2174                                                                  from PCC's tie__pfunitid. */
2175 #endif /* Word 0 - End */
2176     } s;
2177     /* struct bdk_pccpf_xxx_id_s cn8; */
2178     struct bdk_pccpf_xxx_id_cn9
2179     {
2180 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2181         uint32_t devid                 : 16; /**< [ 31: 16](RO/H) Device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
2182 
2183                                                                  Internal:
2184                                                                  Unit from PCC's tie__pfunitid. */
2185         uint32_t vendid                : 16; /**< [ 15:  0](RO) Cavium's vendor ID. Enumerated by PCC_VENDOR_E::CAVIUM. */
2186 #else /* Word 0 - Little Endian */
2187         uint32_t vendid                : 16; /**< [ 15:  0](RO) Cavium's vendor ID. Enumerated by PCC_VENDOR_E::CAVIUM. */
2188         uint32_t devid                 : 16; /**< [ 31: 16](RO/H) Device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
2189 
2190                                                                  Internal:
2191                                                                  Unit from PCC's tie__pfunitid. */
2192 #endif /* Word 0 - End */
2193     } cn9;
2194 };
2195 typedef union bdk_pccpf_xxx_id bdk_pccpf_xxx_id_t;
2196 
2197 #define BDK_PCCPF_XXX_ID BDK_PCCPF_XXX_ID_FUNC()
2198 static inline uint64_t BDK_PCCPF_XXX_ID_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_ID_FUNC(void)2199 static inline uint64_t BDK_PCCPF_XXX_ID_FUNC(void)
2200 {
2201     return 0;
2202 }
2203 
2204 #define typedef_BDK_PCCPF_XXX_ID bdk_pccpf_xxx_id_t
2205 #define bustype_BDK_PCCPF_XXX_ID BDK_CSR_TYPE_PCCPF
2206 #define basename_BDK_PCCPF_XXX_ID "PCCPF_XXX_ID"
2207 #define busnum_BDK_PCCPF_XXX_ID 0
2208 #define arguments_BDK_PCCPF_XXX_ID -1,-1,-1,-1
2209 
2210 /**
2211  * Register (PCCPF) pccpf_xxx_msix_cap_hdr
2212  *
2213  * PCC PF MSI-X Capability Header Register
2214  * This register is the header of the 36-byte PCI MSI-X capability structure.
2215  *
2216  * This register is reset on a block domain reset or PF function level reset.
2217  */
2218 union bdk_pccpf_xxx_msix_cap_hdr
2219 {
2220     uint32_t u;
2221     struct bdk_pccpf_xxx_msix_cap_hdr_s
2222     {
2223 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2224         uint32_t msixen                : 1;  /**< [ 31: 31](R/W) MSI-X enable.
2225                                                                  0 = The MSI-X PBAs corresponding to this function are cleared.  Interrupt messages
2226                                                                  will not be issued.
2227                                                                  1 = Normal PBA and MSI-X delivery. */
2228         uint32_t funm                  : 1;  /**< [ 30: 30](R/W) Function mask.
2229                                                                  0 = Each vectors' mask bit determines whether the vector is masked or not.
2230                                                                  1 = All vectors associated with the function are masked, regardless of their respective
2231                                                                  per-vector mask bits.
2232 
2233                                                                  Setting or clearing FUNM has no effect on the state of the per-vector mask bits. */
2234         uint32_t reserved_27_29        : 3;
2235         uint32_t msixts                : 11; /**< [ 26: 16](RO) MSI-X table size encoded as (table size - 1).
2236                                                                  Internal:
2237                                                                  From PCC's MSIX_PF_VECS parameter. */
2238         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. */
2239         uint32_t msixcid               : 8;  /**< [  7:  0](RO) MSI-X capability ID. */
2240 #else /* Word 0 - Little Endian */
2241         uint32_t msixcid               : 8;  /**< [  7:  0](RO) MSI-X capability ID. */
2242         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. */
2243         uint32_t msixts                : 11; /**< [ 26: 16](RO) MSI-X table size encoded as (table size - 1).
2244                                                                  Internal:
2245                                                                  From PCC's MSIX_PF_VECS parameter. */
2246         uint32_t reserved_27_29        : 3;
2247         uint32_t funm                  : 1;  /**< [ 30: 30](R/W) Function mask.
2248                                                                  0 = Each vectors' mask bit determines whether the vector is masked or not.
2249                                                                  1 = All vectors associated with the function are masked, regardless of their respective
2250                                                                  per-vector mask bits.
2251 
2252                                                                  Setting or clearing FUNM has no effect on the state of the per-vector mask bits. */
2253         uint32_t msixen                : 1;  /**< [ 31: 31](R/W) MSI-X enable.
2254                                                                  0 = The MSI-X PBAs corresponding to this function are cleared.  Interrupt messages
2255                                                                  will not be issued.
2256                                                                  1 = Normal PBA and MSI-X delivery. */
2257 #endif /* Word 0 - End */
2258     } s;
2259     /* struct bdk_pccpf_xxx_msix_cap_hdr_s cn88xxp1; */
2260     struct bdk_pccpf_xxx_msix_cap_hdr_cn9
2261     {
2262 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2263         uint32_t msixen                : 1;  /**< [ 31: 31](R/W) MSI-X enable.
2264                                                                  0 = The MSI-X PBAs corresponding to this function are cleared. Interrupt messages
2265                                                                  will not be issued.
2266                                                                  1 = Normal PBA and MSI-X delivery. See also PCCPF_XXX_CMD[ME]. */
2267         uint32_t funm                  : 1;  /**< [ 30: 30](R/W) Function mask.
2268                                                                  0 = Each vectors' mask bit determines whether the vector is masked or not.
2269                                                                  1 = All vectors associated with the function are masked, regardless of their respective
2270                                                                  per-vector mask bits.
2271 
2272                                                                  Setting or clearing [FUNM] has no effect on the state of the per-vector mask bits. */
2273         uint32_t reserved_27_29        : 3;
2274         uint32_t msixts                : 11; /**< [ 26: 16](RO/H) MSI-X table size encoded as (table size - 1).
2275                                                                  Internal:
2276                                                                  From PCC generated parameter. */
2277         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. Points to PCCPF_XXX_EA_CAP_HDR. */
2278         uint32_t msixcid               : 8;  /**< [  7:  0](RO) MSI-X Capability ID. */
2279 #else /* Word 0 - Little Endian */
2280         uint32_t msixcid               : 8;  /**< [  7:  0](RO) MSI-X Capability ID. */
2281         uint32_t ncp                   : 8;  /**< [ 15:  8](RO) Next capability pointer. Points to PCCPF_XXX_EA_CAP_HDR. */
2282         uint32_t msixts                : 11; /**< [ 26: 16](RO/H) MSI-X table size encoded as (table size - 1).
2283                                                                  Internal:
2284                                                                  From PCC generated parameter. */
2285         uint32_t reserved_27_29        : 3;
2286         uint32_t funm                  : 1;  /**< [ 30: 30](R/W) Function mask.
2287                                                                  0 = Each vectors' mask bit determines whether the vector is masked or not.
2288                                                                  1 = All vectors associated with the function are masked, regardless of their respective
2289                                                                  per-vector mask bits.
2290 
2291                                                                  Setting or clearing [FUNM] has no effect on the state of the per-vector mask bits. */
2292         uint32_t msixen                : 1;  /**< [ 31: 31](R/W) MSI-X enable.
2293                                                                  0 = The MSI-X PBAs corresponding to this function are cleared. Interrupt messages
2294                                                                  will not be issued.
2295                                                                  1 = Normal PBA and MSI-X delivery. See also PCCPF_XXX_CMD[ME]. */
2296 #endif /* Word 0 - End */
2297     } cn9;
2298     struct bdk_pccpf_xxx_msix_cap_hdr_cn81xx
2299     {
2300 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2301         uint32_t msixen                : 1;  /**< [ 31: 31](R/W) MSI-X enable.
2302                                                                  0 = The MSI-X PBAs corresponding to this function are cleared.  Interrupt messages
2303                                                                  will not be issued.
2304                                                                  1 = Normal PBA and MSI-X delivery. */
2305         uint32_t funm                  : 1;  /**< [ 30: 30](R/W) Function mask.
2306                                                                  0 = Each vectors' mask bit determines whether the vector is masked or not.
2307                                                                  1 = All vectors associated with the function are masked, regardless of their respective
2308                                                                  per-vector mask bits.
2309 
2310                                                                  Setting or clearing FUNM has no effect on the state of the per-vector mask bits. */
2311         uint32_t reserved_27_29        : 3;
2312         uint32_t msixts                : 11; /**< [ 26: 16](RO) MSI-X table size encoded as (table size - 1).
2313                                                                  Internal:
2314                                                                  From PCC's MSIX_PF_VECS parameter. */
2315         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If PCCPF_XXX_VSEC_SCTL[EA] is set points to
2316                                                                  PCCPF_XXX_EA_CAP_HDR, else 0x0. */
2317         uint32_t msixcid               : 8;  /**< [  7:  0](RO) MSI-X Capability ID. */
2318 #else /* Word 0 - Little Endian */
2319         uint32_t msixcid               : 8;  /**< [  7:  0](RO) MSI-X Capability ID. */
2320         uint32_t ncp                   : 8;  /**< [ 15:  8](RO/H) Next capability pointer. If PCCPF_XXX_VSEC_SCTL[EA] is set points to
2321                                                                  PCCPF_XXX_EA_CAP_HDR, else 0x0. */
2322         uint32_t msixts                : 11; /**< [ 26: 16](RO) MSI-X table size encoded as (table size - 1).
2323                                                                  Internal:
2324                                                                  From PCC's MSIX_PF_VECS parameter. */
2325         uint32_t reserved_27_29        : 3;
2326         uint32_t funm                  : 1;  /**< [ 30: 30](R/W) Function mask.
2327                                                                  0 = Each vectors' mask bit determines whether the vector is masked or not.
2328                                                                  1 = All vectors associated with the function are masked, regardless of their respective
2329                                                                  per-vector mask bits.
2330 
2331                                                                  Setting or clearing FUNM has no effect on the state of the per-vector mask bits. */
2332         uint32_t msixen                : 1;  /**< [ 31: 31](R/W) MSI-X enable.
2333                                                                  0 = The MSI-X PBAs corresponding to this function are cleared.  Interrupt messages
2334                                                                  will not be issued.
2335                                                                  1 = Normal PBA and MSI-X delivery. */
2336 #endif /* Word 0 - End */
2337     } cn81xx;
2338     /* struct bdk_pccpf_xxx_msix_cap_hdr_cn81xx cn83xx; */
2339     /* struct bdk_pccpf_xxx_msix_cap_hdr_cn81xx cn88xxp2; */
2340 };
2341 typedef union bdk_pccpf_xxx_msix_cap_hdr bdk_pccpf_xxx_msix_cap_hdr_t;
2342 
2343 #define BDK_PCCPF_XXX_MSIX_CAP_HDR BDK_PCCPF_XXX_MSIX_CAP_HDR_FUNC()
2344 static inline uint64_t BDK_PCCPF_XXX_MSIX_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_MSIX_CAP_HDR_FUNC(void)2345 static inline uint64_t BDK_PCCPF_XXX_MSIX_CAP_HDR_FUNC(void)
2346 {
2347     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
2348         return 0x80;
2349     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
2350         return 0x80;
2351     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS1_X))
2352         return 0xb0;
2353     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
2354         return 0x80;
2355     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
2356         return 0x80;
2357     __bdk_csr_fatal("PCCPF_XXX_MSIX_CAP_HDR", 0, 0, 0, 0, 0);
2358 }
2359 
2360 #define typedef_BDK_PCCPF_XXX_MSIX_CAP_HDR bdk_pccpf_xxx_msix_cap_hdr_t
2361 #define bustype_BDK_PCCPF_XXX_MSIX_CAP_HDR BDK_CSR_TYPE_PCCPF
2362 #define basename_BDK_PCCPF_XXX_MSIX_CAP_HDR "PCCPF_XXX_MSIX_CAP_HDR"
2363 #define busnum_BDK_PCCPF_XXX_MSIX_CAP_HDR 0
2364 #define arguments_BDK_PCCPF_XXX_MSIX_CAP_HDR -1,-1,-1,-1
2365 
2366 /**
2367  * Register (PCCPF) pccpf_xxx_msix_pba
2368  *
2369  * PCC PF MSI-X PBA Offset and BIR Register
2370  */
2371 union bdk_pccpf_xxx_msix_pba
2372 {
2373     uint32_t u;
2374     struct bdk_pccpf_xxx_msix_pba_s
2375     {
2376 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2377         uint32_t msixpoffs             : 29; /**< [ 31:  3](RO) MSI-X PBA offset register. Offset of the MSI-X PBA, as a number of eight-byte words from
2378                                                                  the base address of the BAR; e.g. 0x1E000 corresponds to a byte offset of 0xF0000. */
2379         uint32_t msixpbir              : 3;  /**< [  2:  0](RO) MSI-X PBA BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2380                                                                  pending bit array into memory space. As BARs are 64-bits, 0x4 indicates BAR4H/L. */
2381 #else /* Word 0 - Little Endian */
2382         uint32_t msixpbir              : 3;  /**< [  2:  0](RO) MSI-X PBA BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2383                                                                  pending bit array into memory space. As BARs are 64-bits, 0x4 indicates BAR4H/L. */
2384         uint32_t msixpoffs             : 29; /**< [ 31:  3](RO) MSI-X PBA offset register. Offset of the MSI-X PBA, as a number of eight-byte words from
2385                                                                  the base address of the BAR; e.g. 0x1E000 corresponds to a byte offset of 0xF0000. */
2386 #endif /* Word 0 - End */
2387     } s;
2388     /* struct bdk_pccpf_xxx_msix_pba_s cn8; */
2389     struct bdk_pccpf_xxx_msix_pba_cn9
2390     {
2391 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2392         uint32_t msixpoffs             : 29; /**< [ 31:  3](RO) MSI-X PBA offset register. Offset of the MSI-X PBA, as a number of eight-byte words from
2393                                                                  the base address of the BAR; e.g. 0x1E000 corresponds to a byte offset of 0xF0000. */
2394         uint32_t msixpbir              : 3;  /**< [  2:  0](RO) MSI-X PBA BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2395                                                                  pending bit array into memory space. Typically 0x4, indicating BAR4H/L. */
2396 #else /* Word 0 - Little Endian */
2397         uint32_t msixpbir              : 3;  /**< [  2:  0](RO) MSI-X PBA BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2398                                                                  pending bit array into memory space. Typically 0x4, indicating BAR4H/L. */
2399         uint32_t msixpoffs             : 29; /**< [ 31:  3](RO) MSI-X PBA offset register. Offset of the MSI-X PBA, as a number of eight-byte words from
2400                                                                  the base address of the BAR; e.g. 0x1E000 corresponds to a byte offset of 0xF0000. */
2401 #endif /* Word 0 - End */
2402     } cn9;
2403 };
2404 typedef union bdk_pccpf_xxx_msix_pba bdk_pccpf_xxx_msix_pba_t;
2405 
2406 #define BDK_PCCPF_XXX_MSIX_PBA BDK_PCCPF_XXX_MSIX_PBA_FUNC()
2407 static inline uint64_t BDK_PCCPF_XXX_MSIX_PBA_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_MSIX_PBA_FUNC(void)2408 static inline uint64_t BDK_PCCPF_XXX_MSIX_PBA_FUNC(void)
2409 {
2410     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
2411         return 0x88;
2412     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
2413         return 0x88;
2414     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS1_X))
2415         return 0xb8;
2416     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
2417         return 0x88;
2418     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
2419         return 0x88;
2420     __bdk_csr_fatal("PCCPF_XXX_MSIX_PBA", 0, 0, 0, 0, 0);
2421 }
2422 
2423 #define typedef_BDK_PCCPF_XXX_MSIX_PBA bdk_pccpf_xxx_msix_pba_t
2424 #define bustype_BDK_PCCPF_XXX_MSIX_PBA BDK_CSR_TYPE_PCCPF
2425 #define basename_BDK_PCCPF_XXX_MSIX_PBA "PCCPF_XXX_MSIX_PBA"
2426 #define busnum_BDK_PCCPF_XXX_MSIX_PBA 0
2427 #define arguments_BDK_PCCPF_XXX_MSIX_PBA -1,-1,-1,-1
2428 
2429 /**
2430  * Register (PCCPF) pccpf_xxx_msix_table
2431  *
2432  * PCC PF MSI-X Table Offset and BIR Register
2433  */
2434 union bdk_pccpf_xxx_msix_table
2435 {
2436     uint32_t u;
2437     struct bdk_pccpf_xxx_msix_table_s
2438     {
2439 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2440         uint32_t msixtoffs             : 29; /**< [ 31:  3](RO) MSI-X table offset register. Offset of the MSI-X table, as a number of eight-byte
2441                                                                  words from the base address of the BAR. */
2442         uint32_t msixtbir              : 3;  /**< [  2:  0](RO) MSI-X table BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2443                                                                  table into memory space. As BARs are 64-bits, 0x4 indicates BAR4H/L. */
2444 #else /* Word 0 - Little Endian */
2445         uint32_t msixtbir              : 3;  /**< [  2:  0](RO) MSI-X table BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2446                                                                  table into memory space. As BARs are 64-bits, 0x4 indicates BAR4H/L. */
2447         uint32_t msixtoffs             : 29; /**< [ 31:  3](RO) MSI-X table offset register. Offset of the MSI-X table, as a number of eight-byte
2448                                                                  words from the base address of the BAR. */
2449 #endif /* Word 0 - End */
2450     } s;
2451     /* struct bdk_pccpf_xxx_msix_table_s cn8; */
2452     struct bdk_pccpf_xxx_msix_table_cn9
2453     {
2454 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2455         uint32_t msixtoffs             : 29; /**< [ 31:  3](RO) MSI-X table offset register. Offset of the MSI-X table, as a number of eight-byte
2456                                                                  words from the base address of the BAR. */
2457         uint32_t msixtbir              : 3;  /**< [  2:  0](RO) MSI-X table BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2458                                                                  table into memory space. Typically 0x4, indicating BAR4H/L.
2459 
2460                                                                  Internal:
2461                                                                  From PCC generated parameter. */
2462 #else /* Word 0 - Little Endian */
2463         uint32_t msixtbir              : 3;  /**< [  2:  0](RO) MSI-X table BAR indicator register (BIR). Indicates which BAR is used to map the MSI-X
2464                                                                  table into memory space. Typically 0x4, indicating BAR4H/L.
2465 
2466                                                                  Internal:
2467                                                                  From PCC generated parameter. */
2468         uint32_t msixtoffs             : 29; /**< [ 31:  3](RO) MSI-X table offset register. Offset of the MSI-X table, as a number of eight-byte
2469                                                                  words from the base address of the BAR. */
2470 #endif /* Word 0 - End */
2471     } cn9;
2472 };
2473 typedef union bdk_pccpf_xxx_msix_table bdk_pccpf_xxx_msix_table_t;
2474 
2475 #define BDK_PCCPF_XXX_MSIX_TABLE BDK_PCCPF_XXX_MSIX_TABLE_FUNC()
2476 static inline uint64_t BDK_PCCPF_XXX_MSIX_TABLE_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_MSIX_TABLE_FUNC(void)2477 static inline uint64_t BDK_PCCPF_XXX_MSIX_TABLE_FUNC(void)
2478 {
2479     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
2480         return 0x84;
2481     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
2482         return 0x84;
2483     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS1_X))
2484         return 0xb4;
2485     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX_PASS2_X))
2486         return 0x84;
2487     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
2488         return 0x84;
2489     __bdk_csr_fatal("PCCPF_XXX_MSIX_TABLE", 0, 0, 0, 0, 0);
2490 }
2491 
2492 #define typedef_BDK_PCCPF_XXX_MSIX_TABLE bdk_pccpf_xxx_msix_table_t
2493 #define bustype_BDK_PCCPF_XXX_MSIX_TABLE BDK_CSR_TYPE_PCCPF
2494 #define basename_BDK_PCCPF_XXX_MSIX_TABLE "PCCPF_XXX_MSIX_TABLE"
2495 #define busnum_BDK_PCCPF_XXX_MSIX_TABLE 0
2496 #define arguments_BDK_PCCPF_XXX_MSIX_TABLE -1,-1,-1,-1
2497 
2498 /**
2499  * Register (PCCPF) pccpf_xxx_rev
2500  *
2501  * PCC PF Class Code/Revision ID Register
2502  */
2503 union bdk_pccpf_xxx_rev
2504 {
2505     uint32_t u;
2506     struct bdk_pccpf_xxx_rev_s
2507     {
2508 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2509         uint32_t bcc                   : 8;  /**< [ 31: 24](RO) Base class code. See PCC_DEV_IDL_E.
2510                                                                  Internal:
2511                                                                  From PCC's tie__class_code[23:16]. */
2512         uint32_t sc                    : 8;  /**< [ 23: 16](RO) Subclass code. See PCC_DEV_IDL_E.
2513                                                                  Internal:
2514                                                                  From PCC's tie__class_code[15:8]. */
2515         uint32_t pi                    : 8;  /**< [ 15:  8](RO) Programming interface. See PCC_DEV_IDL_E.
2516                                                                  Internal:
2517                                                                  From PCC's tie__class_code[7:0]. */
2518         uint32_t rid                   : 8;  /**< [  7:  0](RO/H) Revision ID. Read only version of PCCPF_XXX_VSEC_SCTL[RID]. */
2519 #else /* Word 0 - Little Endian */
2520         uint32_t rid                   : 8;  /**< [  7:  0](RO/H) Revision ID. Read only version of PCCPF_XXX_VSEC_SCTL[RID]. */
2521         uint32_t pi                    : 8;  /**< [ 15:  8](RO) Programming interface. See PCC_DEV_IDL_E.
2522                                                                  Internal:
2523                                                                  From PCC's tie__class_code[7:0]. */
2524         uint32_t sc                    : 8;  /**< [ 23: 16](RO) Subclass code. See PCC_DEV_IDL_E.
2525                                                                  Internal:
2526                                                                  From PCC's tie__class_code[15:8]. */
2527         uint32_t bcc                   : 8;  /**< [ 31: 24](RO) Base class code. See PCC_DEV_IDL_E.
2528                                                                  Internal:
2529                                                                  From PCC's tie__class_code[23:16]. */
2530 #endif /* Word 0 - End */
2531     } s;
2532     /* struct bdk_pccpf_xxx_rev_s cn8; */
2533     struct bdk_pccpf_xxx_rev_cn9
2534     {
2535 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2536         uint32_t bcc                   : 8;  /**< [ 31: 24](RO/H) Base class code. See PCC_DEV_IDL_E.
2537                                                                  Internal:
2538                                                                  From PCC's tie__class_code[23:16]. */
2539         uint32_t sc                    : 8;  /**< [ 23: 16](RO/H) Subclass code. See PCC_DEV_IDL_E.
2540                                                                  Internal:
2541                                                                  From PCC's tie__class_code[15:8]. */
2542         uint32_t pi                    : 8;  /**< [ 15:  8](RO/H) Programming interface. See PCC_DEV_IDL_E.
2543                                                                  Internal:
2544                                                                  From PCC's tie__class_code[7:0]. */
2545         uint32_t rid                   : 8;  /**< [  7:  0](RO/H) Revision ID. Read only version of PCCPF_XXX_VSEC_SCTL[RID]. */
2546 #else /* Word 0 - Little Endian */
2547         uint32_t rid                   : 8;  /**< [  7:  0](RO/H) Revision ID. Read only version of PCCPF_XXX_VSEC_SCTL[RID]. */
2548         uint32_t pi                    : 8;  /**< [ 15:  8](RO/H) Programming interface. See PCC_DEV_IDL_E.
2549                                                                  Internal:
2550                                                                  From PCC's tie__class_code[7:0]. */
2551         uint32_t sc                    : 8;  /**< [ 23: 16](RO/H) Subclass code. See PCC_DEV_IDL_E.
2552                                                                  Internal:
2553                                                                  From PCC's tie__class_code[15:8]. */
2554         uint32_t bcc                   : 8;  /**< [ 31: 24](RO/H) Base class code. See PCC_DEV_IDL_E.
2555                                                                  Internal:
2556                                                                  From PCC's tie__class_code[23:16]. */
2557 #endif /* Word 0 - End */
2558     } cn9;
2559 };
2560 typedef union bdk_pccpf_xxx_rev bdk_pccpf_xxx_rev_t;
2561 
2562 #define BDK_PCCPF_XXX_REV BDK_PCCPF_XXX_REV_FUNC()
2563 static inline uint64_t BDK_PCCPF_XXX_REV_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_REV_FUNC(void)2564 static inline uint64_t BDK_PCCPF_XXX_REV_FUNC(void)
2565 {
2566     return 8;
2567 }
2568 
2569 #define typedef_BDK_PCCPF_XXX_REV bdk_pccpf_xxx_rev_t
2570 #define bustype_BDK_PCCPF_XXX_REV BDK_CSR_TYPE_PCCPF
2571 #define basename_BDK_PCCPF_XXX_REV "PCCPF_XXX_REV"
2572 #define busnum_BDK_PCCPF_XXX_REV 0
2573 #define arguments_BDK_PCCPF_XXX_REV -1,-1,-1,-1
2574 
2575 /**
2576  * Register (PCCPF) pccpf_xxx_sari_nxt
2577  *
2578  * PCC PF ARI Capability Register
2579  * If this device is on bus 0x0, this ARI header is not present and reads as 0x0.
2580  */
2581 union bdk_pccpf_xxx_sari_nxt
2582 {
2583     uint32_t u;
2584     struct bdk_pccpf_xxx_sari_nxt_s
2585     {
2586 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2587         uint32_t reserved_16_31        : 16;
2588         uint32_t nxtfn                 : 8;  /**< [ 15:  8](RO/H) Next function number. 0x0 except for PCC_DEV_IDL_E::MRML, when it points to the next MFD
2589                                                                  in the linked list of MFDs underneath the RSL and the value comes from
2590                                                                  PCCPF_XXX_VSEC_CTL[NXTFN_NS] or PCCPF_XXX_VSEC_SCTL[NXTFN_S] for nonsecure or secure
2591                                                                  accesses respectively. */
2592         uint32_t reserved_0_7          : 8;
2593 #else /* Word 0 - Little Endian */
2594         uint32_t reserved_0_7          : 8;
2595         uint32_t nxtfn                 : 8;  /**< [ 15:  8](RO/H) Next function number. 0x0 except for PCC_DEV_IDL_E::MRML, when it points to the next MFD
2596                                                                  in the linked list of MFDs underneath the RSL and the value comes from
2597                                                                  PCCPF_XXX_VSEC_CTL[NXTFN_NS] or PCCPF_XXX_VSEC_SCTL[NXTFN_S] for nonsecure or secure
2598                                                                  accesses respectively. */
2599         uint32_t reserved_16_31        : 16;
2600 #endif /* Word 0 - End */
2601     } s;
2602     /* struct bdk_pccpf_xxx_sari_nxt_s cn; */
2603 };
2604 typedef union bdk_pccpf_xxx_sari_nxt bdk_pccpf_xxx_sari_nxt_t;
2605 
2606 #define BDK_PCCPF_XXX_SARI_NXT BDK_PCCPF_XXX_SARI_NXT_FUNC()
2607 static inline uint64_t BDK_PCCPF_XXX_SARI_NXT_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SARI_NXT_FUNC(void)2608 static inline uint64_t BDK_PCCPF_XXX_SARI_NXT_FUNC(void)
2609 {
2610     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
2611         return 0x144;
2612     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
2613         return 0x144;
2614     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
2615         return 0x104;
2616     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
2617         return 0x174;
2618     __bdk_csr_fatal("PCCPF_XXX_SARI_NXT", 0, 0, 0, 0, 0);
2619 }
2620 
2621 #define typedef_BDK_PCCPF_XXX_SARI_NXT bdk_pccpf_xxx_sari_nxt_t
2622 #define bustype_BDK_PCCPF_XXX_SARI_NXT BDK_CSR_TYPE_PCCPF
2623 #define basename_BDK_PCCPF_XXX_SARI_NXT "PCCPF_XXX_SARI_NXT"
2624 #define busnum_BDK_PCCPF_XXX_SARI_NXT 0
2625 #define arguments_BDK_PCCPF_XXX_SARI_NXT -1,-1,-1,-1
2626 
2627 /**
2628  * Register (PCCPF) pccpf_xxx_sriov_bar0l
2629  *
2630  * PCC PF SR-IOV BAR 0 Lower Register
2631  */
2632 union bdk_pccpf_xxx_sriov_bar0l
2633 {
2634     uint32_t u;
2635     struct bdk_pccpf_xxx_sriov_bar0l_s
2636     {
2637 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2638         uint32_t reserved_0_31         : 32;
2639 #else /* Word 0 - Little Endian */
2640         uint32_t reserved_0_31         : 32;
2641 #endif /* Word 0 - End */
2642     } s;
2643     struct bdk_pccpf_xxx_sriov_bar0l_cn88xxp1
2644     {
2645 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2646         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 0 base address. See additional BAR related notes in
2647                                                                  PCCPF_XXX_BAR0U[UBAB].
2648 
2649                                                                  Internal:
2650                                                                  From PCC's tie__vfbar0_rbsz and
2651                                                                  tie__vfbar0_offset. */
2652         uint32_t reserved_4_15         : 12;
2653         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2654         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
2655                                                                  0x0 = 32-bit BAR, or BAR not present.
2656                                                                  0x2 = 64-bit BAR. */
2657         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2658                                                                  0 = BAR is a memory BAR.
2659                                                                  1 = BAR is an I/O BAR. */
2660 #else /* Word 0 - Little Endian */
2661         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2662                                                                  0 = BAR is a memory BAR.
2663                                                                  1 = BAR is an I/O BAR. */
2664         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
2665                                                                  0x0 = 32-bit BAR, or BAR not present.
2666                                                                  0x2 = 64-bit BAR. */
2667         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2668         uint32_t reserved_4_15         : 12;
2669         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 0 base address. See additional BAR related notes in
2670                                                                  PCCPF_XXX_BAR0U[UBAB].
2671 
2672                                                                  Internal:
2673                                                                  From PCC's tie__vfbar0_rbsz and
2674                                                                  tie__vfbar0_offset. */
2675 #endif /* Word 0 - End */
2676     } cn88xxp1;
2677     struct bdk_pccpf_xxx_sriov_bar0l_cn9
2678     {
2679 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2680         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2681 #else /* Word 0 - Little Endian */
2682         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2683 #endif /* Word 0 - End */
2684     } cn9;
2685     struct bdk_pccpf_xxx_sriov_bar0l_cn81xx
2686     {
2687 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2688         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 0 base address. See additional BAR related notes in
2689                                                                  PCCPF_XXX_BAR0U[UBAB].
2690 
2691                                                                  Internal:
2692                                                                  From PCC's tie__vfbar0_rbsz and
2693                                                                  tie__vfbar0_offset. */
2694         uint32_t reserved_4_15         : 12;
2695         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2696         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
2697                                                                  0x0 = 32-bit BAR, or BAR not present.
2698                                                                  0x2 = 64-bit BAR. */
2699         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory Space Indicator.
2700                                                                  0 = BAR is a memory BAR.
2701                                                                  1 = BAR is an I/O BAR. */
2702 #else /* Word 0 - Little Endian */
2703         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory Space Indicator.
2704                                                                  0 = BAR is a memory BAR.
2705                                                                  1 = BAR is an I/O BAR. */
2706         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
2707                                                                  0x0 = 32-bit BAR, or BAR not present.
2708                                                                  0x2 = 64-bit BAR. */
2709         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2710         uint32_t reserved_4_15         : 12;
2711         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 0 base address. See additional BAR related notes in
2712                                                                  PCCPF_XXX_BAR0U[UBAB].
2713 
2714                                                                  Internal:
2715                                                                  From PCC's tie__vfbar0_rbsz and
2716                                                                  tie__vfbar0_offset. */
2717 #endif /* Word 0 - End */
2718     } cn81xx;
2719     struct bdk_pccpf_xxx_sriov_bar0l_cn83xx
2720     {
2721 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2722         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 0 base address. See additional BAR related notes in
2723                                                                  PCCPF_XXX_BAR0U[UBAB].
2724 
2725                                                                  Internal:
2726                                                                  From PCC's tie__vfbar0_rbsz and
2727                                                                  tie__vfbar0_offset. */
2728         uint32_t reserved_4_15         : 12;
2729         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2730         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
2731                                                                  0x0 = 32-bit BAR, or BAR not present.
2732                                                                  0x2 = 64-bit BAR. */
2733         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2734                                                                  0 = BAR is a memory BAR.
2735                                                                  1 = BAR is an I/O BAR. */
2736 #else /* Word 0 - Little Endian */
2737         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2738                                                                  0 = BAR is a memory BAR.
2739                                                                  1 = BAR is an I/O BAR. */
2740         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
2741                                                                  0x0 = 32-bit BAR, or BAR not present.
2742                                                                  0x2 = 64-bit BAR. */
2743         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2744         uint32_t reserved_4_15         : 12;
2745         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 0 base address. See additional BAR related notes in
2746                                                                  PCCPF_XXX_BAR0U[UBAB].
2747 
2748                                                                  Internal:
2749                                                                  From PCC's tie__vfbar0_rbsz and
2750                                                                  tie__vfbar0_offset. */
2751 #endif /* Word 0 - End */
2752     } cn83xx;
2753     /* struct bdk_pccpf_xxx_sriov_bar0l_cn83xx cn88xxp2; */
2754 };
2755 typedef union bdk_pccpf_xxx_sriov_bar0l bdk_pccpf_xxx_sriov_bar0l_t;
2756 
2757 #define BDK_PCCPF_XXX_SRIOV_BAR0L BDK_PCCPF_XXX_SRIOV_BAR0L_FUNC()
2758 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR0L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_BAR0L_FUNC(void)2759 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR0L_FUNC(void)
2760 {
2761     return 0x1a4;
2762 }
2763 
2764 #define typedef_BDK_PCCPF_XXX_SRIOV_BAR0L bdk_pccpf_xxx_sriov_bar0l_t
2765 #define bustype_BDK_PCCPF_XXX_SRIOV_BAR0L BDK_CSR_TYPE_PCCPF
2766 #define basename_BDK_PCCPF_XXX_SRIOV_BAR0L "PCCPF_XXX_SRIOV_BAR0L"
2767 #define busnum_BDK_PCCPF_XXX_SRIOV_BAR0L 0
2768 #define arguments_BDK_PCCPF_XXX_SRIOV_BAR0L -1,-1,-1,-1
2769 
2770 /**
2771  * Register (PCCPF) pccpf_xxx_sriov_bar0u
2772  *
2773  * PCC PF SR-IOV BAR 0 Upper Register
2774  */
2775 union bdk_pccpf_xxx_sriov_bar0u
2776 {
2777     uint32_t u;
2778     struct bdk_pccpf_xxx_sriov_bar0u_s
2779     {
2780 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2781         uint32_t reserved_0_31         : 32;
2782 #else /* Word 0 - Little Endian */
2783         uint32_t reserved_0_31         : 32;
2784 #endif /* Word 0 - End */
2785     } s;
2786     struct bdk_pccpf_xxx_sriov_bar0u_cn8
2787     {
2788 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2789         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Upper bits of the VF BAR 0 base address. See additional BAR related notes in
2790                                                                  PCCPF_XXX_BAR0U[UBAB].
2791 
2792                                                                  Internal:
2793                                                                  From PCC's tie__vfbar0_rbsz and tie__vfbar0_offset. */
2794 #else /* Word 0 - Little Endian */
2795         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Upper bits of the VF BAR 0 base address. See additional BAR related notes in
2796                                                                  PCCPF_XXX_BAR0U[UBAB].
2797 
2798                                                                  Internal:
2799                                                                  From PCC's tie__vfbar0_rbsz and tie__vfbar0_offset. */
2800 #endif /* Word 0 - End */
2801     } cn8;
2802     struct bdk_pccpf_xxx_sriov_bar0u_cn9
2803     {
2804 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2805         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2806 #else /* Word 0 - Little Endian */
2807         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2808 #endif /* Word 0 - End */
2809     } cn9;
2810 };
2811 typedef union bdk_pccpf_xxx_sriov_bar0u bdk_pccpf_xxx_sriov_bar0u_t;
2812 
2813 #define BDK_PCCPF_XXX_SRIOV_BAR0U BDK_PCCPF_XXX_SRIOV_BAR0U_FUNC()
2814 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR0U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_BAR0U_FUNC(void)2815 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR0U_FUNC(void)
2816 {
2817     return 0x1a8;
2818 }
2819 
2820 #define typedef_BDK_PCCPF_XXX_SRIOV_BAR0U bdk_pccpf_xxx_sriov_bar0u_t
2821 #define bustype_BDK_PCCPF_XXX_SRIOV_BAR0U BDK_CSR_TYPE_PCCPF
2822 #define basename_BDK_PCCPF_XXX_SRIOV_BAR0U "PCCPF_XXX_SRIOV_BAR0U"
2823 #define busnum_BDK_PCCPF_XXX_SRIOV_BAR0U 0
2824 #define arguments_BDK_PCCPF_XXX_SRIOV_BAR0U -1,-1,-1,-1
2825 
2826 /**
2827  * Register (PCCPF) pccpf_xxx_sriov_bar2l
2828  *
2829  * PCC PF SR-IOV BAR 2 Lower Register
2830  */
2831 union bdk_pccpf_xxx_sriov_bar2l
2832 {
2833     uint32_t u;
2834     struct bdk_pccpf_xxx_sriov_bar2l_s
2835     {
2836 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2837         uint32_t reserved_0_31         : 32;
2838 #else /* Word 0 - Little Endian */
2839         uint32_t reserved_0_31         : 32;
2840 #endif /* Word 0 - End */
2841     } s;
2842     struct bdk_pccpf_xxx_sriov_bar2l_cn88xxp1
2843     {
2844 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2845         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 2 base address. See additional BAR related notes in
2846                                                                  PCCPF_XXX_BAR0U[UBAB].
2847 
2848                                                                  Internal:
2849                                                                  From PCC's tie__vfbar2_rbsz and tie__vfbar2_offset. */
2850         uint32_t reserved_4_15         : 12;
2851         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2852         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
2853                                                                  0x0 = 32-bit BAR, or BAR not present.
2854                                                                  0x2 = 64-bit BAR. */
2855         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2856                                                                  0 = BAR is a memory BAR.
2857                                                                  1 = BAR is an I/O BAR. */
2858 #else /* Word 0 - Little Endian */
2859         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2860                                                                  0 = BAR is a memory BAR.
2861                                                                  1 = BAR is an I/O BAR. */
2862         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
2863                                                                  0x0 = 32-bit BAR, or BAR not present.
2864                                                                  0x2 = 64-bit BAR. */
2865         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2866         uint32_t reserved_4_15         : 12;
2867         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 2 base address. See additional BAR related notes in
2868                                                                  PCCPF_XXX_BAR0U[UBAB].
2869 
2870                                                                  Internal:
2871                                                                  From PCC's tie__vfbar2_rbsz and tie__vfbar2_offset. */
2872 #endif /* Word 0 - End */
2873     } cn88xxp1;
2874     struct bdk_pccpf_xxx_sriov_bar2l_cn9
2875     {
2876 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2877         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2878 #else /* Word 0 - Little Endian */
2879         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2880 #endif /* Word 0 - End */
2881     } cn9;
2882     struct bdk_pccpf_xxx_sriov_bar2l_cn81xx
2883     {
2884 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2885         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 2 base address. See additional BAR related notes in
2886                                                                  PCCPF_XXX_BAR0U[UBAB].
2887 
2888                                                                  Internal:
2889                                                                  From PCC's tie__vfbar2_rbsz and tie__vfbar2_offset. */
2890         uint32_t reserved_4_15         : 12;
2891         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2892         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
2893                                                                  0x0 = 32-bit BAR, or BAR not present.
2894                                                                  0x2 = 64-bit BAR. */
2895         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2896                                                                  0 = BAR is a memory BAR.
2897                                                                  1 = BAR is an I/O BAR. */
2898 #else /* Word 0 - Little Endian */
2899         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
2900                                                                  0 = BAR is a memory BAR.
2901                                                                  1 = BAR is an I/O BAR. */
2902         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
2903                                                                  0x0 = 32-bit BAR, or BAR not present.
2904                                                                  0x2 = 64-bit BAR. */
2905         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
2906         uint32_t reserved_4_15         : 12;
2907         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 2 base address. See additional BAR related notes in
2908                                                                  PCCPF_XXX_BAR0U[UBAB].
2909 
2910                                                                  Internal:
2911                                                                  From PCC's tie__vfbar2_rbsz and tie__vfbar2_offset. */
2912 #endif /* Word 0 - End */
2913     } cn81xx;
2914     /* struct bdk_pccpf_xxx_sriov_bar2l_cn81xx cn83xx; */
2915     /* struct bdk_pccpf_xxx_sriov_bar2l_cn81xx cn88xxp2; */
2916 };
2917 typedef union bdk_pccpf_xxx_sriov_bar2l bdk_pccpf_xxx_sriov_bar2l_t;
2918 
2919 #define BDK_PCCPF_XXX_SRIOV_BAR2L BDK_PCCPF_XXX_SRIOV_BAR2L_FUNC()
2920 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR2L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_BAR2L_FUNC(void)2921 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR2L_FUNC(void)
2922 {
2923     return 0x1ac;
2924 }
2925 
2926 #define typedef_BDK_PCCPF_XXX_SRIOV_BAR2L bdk_pccpf_xxx_sriov_bar2l_t
2927 #define bustype_BDK_PCCPF_XXX_SRIOV_BAR2L BDK_CSR_TYPE_PCCPF
2928 #define basename_BDK_PCCPF_XXX_SRIOV_BAR2L "PCCPF_XXX_SRIOV_BAR2L"
2929 #define busnum_BDK_PCCPF_XXX_SRIOV_BAR2L 0
2930 #define arguments_BDK_PCCPF_XXX_SRIOV_BAR2L -1,-1,-1,-1
2931 
2932 /**
2933  * Register (PCCPF) pccpf_xxx_sriov_bar2u
2934  *
2935  * PCC PF SR-IOV BAR 2 Upper Register
2936  */
2937 union bdk_pccpf_xxx_sriov_bar2u
2938 {
2939     uint32_t u;
2940     struct bdk_pccpf_xxx_sriov_bar2u_s
2941     {
2942 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2943         uint32_t reserved_0_31         : 32;
2944 #else /* Word 0 - Little Endian */
2945         uint32_t reserved_0_31         : 32;
2946 #endif /* Word 0 - End */
2947     } s;
2948     struct bdk_pccpf_xxx_sriov_bar2u_cn8
2949     {
2950 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2951         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Upper bits of the VF BAR 2 base address. See additional BAR related notes in
2952                                                                  PCCPF_XXX_BAR0U[UBAB].
2953 
2954                                                                  Internal:
2955                                                                  From PCC's tie__vfbar2_rbsz and tie__vfbar2_offset. */
2956 #else /* Word 0 - Little Endian */
2957         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Upper bits of the VF BAR 2 base address. See additional BAR related notes in
2958                                                                  PCCPF_XXX_BAR0U[UBAB].
2959 
2960                                                                  Internal:
2961                                                                  From PCC's tie__vfbar2_rbsz and tie__vfbar2_offset. */
2962 #endif /* Word 0 - End */
2963     } cn8;
2964     struct bdk_pccpf_xxx_sriov_bar2u_cn9
2965     {
2966 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2967         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2968 #else /* Word 0 - Little Endian */
2969         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
2970 #endif /* Word 0 - End */
2971     } cn9;
2972 };
2973 typedef union bdk_pccpf_xxx_sriov_bar2u bdk_pccpf_xxx_sriov_bar2u_t;
2974 
2975 #define BDK_PCCPF_XXX_SRIOV_BAR2U BDK_PCCPF_XXX_SRIOV_BAR2U_FUNC()
2976 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR2U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_BAR2U_FUNC(void)2977 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR2U_FUNC(void)
2978 {
2979     return 0x1b0;
2980 }
2981 
2982 #define typedef_BDK_PCCPF_XXX_SRIOV_BAR2U bdk_pccpf_xxx_sriov_bar2u_t
2983 #define bustype_BDK_PCCPF_XXX_SRIOV_BAR2U BDK_CSR_TYPE_PCCPF
2984 #define basename_BDK_PCCPF_XXX_SRIOV_BAR2U "PCCPF_XXX_SRIOV_BAR2U"
2985 #define busnum_BDK_PCCPF_XXX_SRIOV_BAR2U 0
2986 #define arguments_BDK_PCCPF_XXX_SRIOV_BAR2U -1,-1,-1,-1
2987 
2988 /**
2989  * Register (PCCPF) pccpf_xxx_sriov_bar4l
2990  *
2991  * PCC PF SR-IOV BAR 4 Lower Register
2992  */
2993 union bdk_pccpf_xxx_sriov_bar4l
2994 {
2995     uint32_t u;
2996     struct bdk_pccpf_xxx_sriov_bar4l_s
2997     {
2998 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
2999         uint32_t reserved_0_31         : 32;
3000 #else /* Word 0 - Little Endian */
3001         uint32_t reserved_0_31         : 32;
3002 #endif /* Word 0 - End */
3003     } s;
3004     struct bdk_pccpf_xxx_sriov_bar4l_cn88xxp1
3005     {
3006 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3007         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 4 base address. See additional BAR related notes in
3008                                                                  PCCPF_XXX_BAR0U[UBAB].
3009 
3010                                                                  Internal:
3011                                                                  From PCC's tie__vfbar4_rbsz and tie__vfbar4_offset. */
3012         uint32_t reserved_4_15         : 12;
3013         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
3014         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
3015                                                                  0x0 = 32-bit BAR, or BAR not present.
3016                                                                  0x2 = 64-bit BAR. */
3017         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
3018                                                                  0 = BAR is a memory BAR.
3019                                                                  1 = BAR is an I/O BAR. */
3020 #else /* Word 0 - Little Endian */
3021         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
3022                                                                  0 = BAR is a memory BAR.
3023                                                                  1 = BAR is an I/O BAR. */
3024         uint32_t typ                   : 2;  /**< [  2:  1](RO) BAR type. 0x0 if not implemented, else 0x2:
3025                                                                  0x0 = 32-bit BAR, or BAR not present.
3026                                                                  0x2 = 64-bit BAR. */
3027         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
3028         uint32_t reserved_4_15         : 12;
3029         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 4 base address. See additional BAR related notes in
3030                                                                  PCCPF_XXX_BAR0U[UBAB].
3031 
3032                                                                  Internal:
3033                                                                  From PCC's tie__vfbar4_rbsz and tie__vfbar4_offset. */
3034 #endif /* Word 0 - End */
3035     } cn88xxp1;
3036     struct bdk_pccpf_xxx_sriov_bar4l_cn9
3037     {
3038 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3039         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
3040 #else /* Word 0 - Little Endian */
3041         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
3042 #endif /* Word 0 - End */
3043     } cn9;
3044     struct bdk_pccpf_xxx_sriov_bar4l_cn81xx
3045     {
3046 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3047         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 4 base address. See additional BAR related notes in
3048                                                                  PCCPF_XXX_BAR0U[UBAB].
3049 
3050                                                                  Internal:
3051                                                                  From PCC's tie__vfbar4_rbsz and tie__vfbar4_offset. */
3052         uint32_t reserved_4_15         : 12;
3053         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
3054         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
3055                                                                  0x0 = 32-bit BAR, or BAR not present.
3056                                                                  0x2 = 64-bit BAR. */
3057         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
3058                                                                  0 = BAR is a memory BAR.
3059                                                                  1 = BAR is an I/O BAR. */
3060 #else /* Word 0 - Little Endian */
3061         uint32_t mspc                  : 1;  /**< [  0:  0](RO) Memory space indicator.
3062                                                                  0 = BAR is a memory BAR.
3063                                                                  1 = BAR is an I/O BAR. */
3064         uint32_t typ                   : 2;  /**< [  2:  1](RO/H) BAR type. 0x0 if not implemented or PCCPF_XXX_VSEC_SCTL[EA] is set, else 0x2:
3065                                                                  0x0 = 32-bit BAR, or BAR not present.
3066                                                                  0x2 = 64-bit BAR. */
3067         uint32_t pf                    : 1;  /**< [  3:  3](RO) Prefetchable. */
3068         uint32_t reserved_4_15         : 12;
3069         uint32_t lbab                  : 16; /**< [ 31: 16](R/W/H) Lower bits of the VF BAR 4 base address. See additional BAR related notes in
3070                                                                  PCCPF_XXX_BAR0U[UBAB].
3071 
3072                                                                  Internal:
3073                                                                  From PCC's tie__vfbar4_rbsz and tie__vfbar4_offset. */
3074 #endif /* Word 0 - End */
3075     } cn81xx;
3076     /* struct bdk_pccpf_xxx_sriov_bar4l_cn81xx cn83xx; */
3077     /* struct bdk_pccpf_xxx_sriov_bar4l_cn81xx cn88xxp2; */
3078 };
3079 typedef union bdk_pccpf_xxx_sriov_bar4l bdk_pccpf_xxx_sriov_bar4l_t;
3080 
3081 #define BDK_PCCPF_XXX_SRIOV_BAR4L BDK_PCCPF_XXX_SRIOV_BAR4L_FUNC()
3082 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR4L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_BAR4L_FUNC(void)3083 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR4L_FUNC(void)
3084 {
3085     return 0x1b4;
3086 }
3087 
3088 #define typedef_BDK_PCCPF_XXX_SRIOV_BAR4L bdk_pccpf_xxx_sriov_bar4l_t
3089 #define bustype_BDK_PCCPF_XXX_SRIOV_BAR4L BDK_CSR_TYPE_PCCPF
3090 #define basename_BDK_PCCPF_XXX_SRIOV_BAR4L "PCCPF_XXX_SRIOV_BAR4L"
3091 #define busnum_BDK_PCCPF_XXX_SRIOV_BAR4L 0
3092 #define arguments_BDK_PCCPF_XXX_SRIOV_BAR4L -1,-1,-1,-1
3093 
3094 /**
3095  * Register (PCCPF) pccpf_xxx_sriov_bar4u
3096  *
3097  * PCC PF SR-IOV BAR 4 Upper Register
3098  */
3099 union bdk_pccpf_xxx_sriov_bar4u
3100 {
3101     uint32_t u;
3102     struct bdk_pccpf_xxx_sriov_bar4u_s
3103     {
3104 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3105         uint32_t reserved_0_31         : 32;
3106 #else /* Word 0 - Little Endian */
3107         uint32_t reserved_0_31         : 32;
3108 #endif /* Word 0 - End */
3109     } s;
3110     struct bdk_pccpf_xxx_sriov_bar4u_cn8
3111     {
3112 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3113         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Upper bits of the VF BAR 4 base address. See additional BAR related notes in
3114                                                                  PCCPF_XXX_BAR0U[UBAB].
3115 
3116                                                                  Internal:
3117                                                                  From PCC's tie__vfbar4_rbsz and tie__vfbar4_offset. */
3118 #else /* Word 0 - Little Endian */
3119         uint32_t ubab                  : 32; /**< [ 31:  0](R/W/H) Upper bits of the VF BAR 4 base address. See additional BAR related notes in
3120                                                                  PCCPF_XXX_BAR0U[UBAB].
3121 
3122                                                                  Internal:
3123                                                                  From PCC's tie__vfbar4_rbsz and tie__vfbar4_offset. */
3124 #endif /* Word 0 - End */
3125     } cn8;
3126     struct bdk_pccpf_xxx_sriov_bar4u_cn9
3127     {
3128 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3129         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
3130 #else /* Word 0 - Little Endian */
3131         uint32_t bar                   : 32; /**< [ 31:  0](RO) Always zero. Enhanced allocation used instead of BARs. */
3132 #endif /* Word 0 - End */
3133     } cn9;
3134 };
3135 typedef union bdk_pccpf_xxx_sriov_bar4u bdk_pccpf_xxx_sriov_bar4u_t;
3136 
3137 #define BDK_PCCPF_XXX_SRIOV_BAR4U BDK_PCCPF_XXX_SRIOV_BAR4U_FUNC()
3138 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR4U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_BAR4U_FUNC(void)3139 static inline uint64_t BDK_PCCPF_XXX_SRIOV_BAR4U_FUNC(void)
3140 {
3141     return 0x1b8;
3142 }
3143 
3144 #define typedef_BDK_PCCPF_XXX_SRIOV_BAR4U bdk_pccpf_xxx_sriov_bar4u_t
3145 #define bustype_BDK_PCCPF_XXX_SRIOV_BAR4U BDK_CSR_TYPE_PCCPF
3146 #define basename_BDK_PCCPF_XXX_SRIOV_BAR4U "PCCPF_XXX_SRIOV_BAR4U"
3147 #define busnum_BDK_PCCPF_XXX_SRIOV_BAR4U 0
3148 #define arguments_BDK_PCCPF_XXX_SRIOV_BAR4U -1,-1,-1,-1
3149 
3150 /**
3151  * Register (PCCPF) pccpf_xxx_sriov_cap
3152  *
3153  * PCC PF SR-IOV Capability Register
3154  */
3155 union bdk_pccpf_xxx_sriov_cap
3156 {
3157     uint32_t u;
3158     struct bdk_pccpf_xxx_sriov_cap_s
3159     {
3160 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3161         uint32_t vfmimn                : 11; /**< [ 31: 21](RO) VF migration interrupt message number. */
3162         uint32_t reserved_2_20         : 19;
3163         uint32_t arichp                : 1;  /**< [  1:  1](RO) ARI capable hierarchy preserved. */
3164         uint32_t vfmc                  : 1;  /**< [  0:  0](RO) VF migration capable. */
3165 #else /* Word 0 - Little Endian */
3166         uint32_t vfmc                  : 1;  /**< [  0:  0](RO) VF migration capable. */
3167         uint32_t arichp                : 1;  /**< [  1:  1](RO) ARI capable hierarchy preserved. */
3168         uint32_t reserved_2_20         : 19;
3169         uint32_t vfmimn                : 11; /**< [ 31: 21](RO) VF migration interrupt message number. */
3170 #endif /* Word 0 - End */
3171     } s;
3172     /* struct bdk_pccpf_xxx_sriov_cap_s cn; */
3173 };
3174 typedef union bdk_pccpf_xxx_sriov_cap bdk_pccpf_xxx_sriov_cap_t;
3175 
3176 #define BDK_PCCPF_XXX_SRIOV_CAP BDK_PCCPF_XXX_SRIOV_CAP_FUNC()
3177 static inline uint64_t BDK_PCCPF_XXX_SRIOV_CAP_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_CAP_FUNC(void)3178 static inline uint64_t BDK_PCCPF_XXX_SRIOV_CAP_FUNC(void)
3179 {
3180     return 0x184;
3181 }
3182 
3183 #define typedef_BDK_PCCPF_XXX_SRIOV_CAP bdk_pccpf_xxx_sriov_cap_t
3184 #define bustype_BDK_PCCPF_XXX_SRIOV_CAP BDK_CSR_TYPE_PCCPF
3185 #define basename_BDK_PCCPF_XXX_SRIOV_CAP "PCCPF_XXX_SRIOV_CAP"
3186 #define busnum_BDK_PCCPF_XXX_SRIOV_CAP 0
3187 #define arguments_BDK_PCCPF_XXX_SRIOV_CAP -1,-1,-1,-1
3188 
3189 /**
3190  * Register (PCCPF) pccpf_xxx_sriov_cap_hdr
3191  *
3192  * PCC PF SR-IOV Capability Header Register
3193  * This register is the header of the 64-byte PCI SR-IOV capability structure.
3194  */
3195 union bdk_pccpf_xxx_sriov_cap_hdr
3196 {
3197     uint32_t u;
3198     struct bdk_pccpf_xxx_sriov_cap_hdr_s
3199     {
3200 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3201         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. None. */
3202         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3203         uint32_t pcieec                : 16; /**< [ 15:  0](RO) PCIE extended capability. */
3204 #else /* Word 0 - Little Endian */
3205         uint32_t pcieec                : 16; /**< [ 15:  0](RO) PCIE extended capability. */
3206         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3207         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. None. */
3208 #endif /* Word 0 - End */
3209     } s;
3210     /* struct bdk_pccpf_xxx_sriov_cap_hdr_s cn; */
3211 };
3212 typedef union bdk_pccpf_xxx_sriov_cap_hdr bdk_pccpf_xxx_sriov_cap_hdr_t;
3213 
3214 #define BDK_PCCPF_XXX_SRIOV_CAP_HDR BDK_PCCPF_XXX_SRIOV_CAP_HDR_FUNC()
3215 static inline uint64_t BDK_PCCPF_XXX_SRIOV_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_CAP_HDR_FUNC(void)3216 static inline uint64_t BDK_PCCPF_XXX_SRIOV_CAP_HDR_FUNC(void)
3217 {
3218     return 0x180;
3219 }
3220 
3221 #define typedef_BDK_PCCPF_XXX_SRIOV_CAP_HDR bdk_pccpf_xxx_sriov_cap_hdr_t
3222 #define bustype_BDK_PCCPF_XXX_SRIOV_CAP_HDR BDK_CSR_TYPE_PCCPF
3223 #define basename_BDK_PCCPF_XXX_SRIOV_CAP_HDR "PCCPF_XXX_SRIOV_CAP_HDR"
3224 #define busnum_BDK_PCCPF_XXX_SRIOV_CAP_HDR 0
3225 #define arguments_BDK_PCCPF_XXX_SRIOV_CAP_HDR -1,-1,-1,-1
3226 
3227 /**
3228  * Register (PCCPF) pccpf_xxx_sriov_ctl
3229  *
3230  * PCC PF SR-IOV Control/Status Register
3231  * This register is reset on a chip domain reset.
3232  */
3233 union bdk_pccpf_xxx_sriov_ctl
3234 {
3235     uint32_t u;
3236     struct bdk_pccpf_xxx_sriov_ctl_s
3237     {
3238 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3239         uint32_t reserved_17_31        : 15;
3240         uint32_t ms                    : 1;  /**< [ 16: 16](RO) VF migration status. */
3241         uint32_t reserved_5_15         : 11;
3242         uint32_t ach                   : 1;  /**< [  4:  4](RO) ARI capable hierarchy. */
3243         uint32_t mse                   : 1;  /**< [  3:  3](RO) VF MSE. Master space enable always on. */
3244         uint32_t mie                   : 1;  /**< [  2:  2](RO) VF migration interrupt enable. */
3245         uint32_t me                    : 1;  /**< [  1:  1](RO) VF migration enable. */
3246         uint32_t vfe                   : 1;  /**< [  0:  0](RO) VF enable. */
3247 #else /* Word 0 - Little Endian */
3248         uint32_t vfe                   : 1;  /**< [  0:  0](RO) VF enable. */
3249         uint32_t me                    : 1;  /**< [  1:  1](RO) VF migration enable. */
3250         uint32_t mie                   : 1;  /**< [  2:  2](RO) VF migration interrupt enable. */
3251         uint32_t mse                   : 1;  /**< [  3:  3](RO) VF MSE. Master space enable always on. */
3252         uint32_t ach                   : 1;  /**< [  4:  4](RO) ARI capable hierarchy. */
3253         uint32_t reserved_5_15         : 11;
3254         uint32_t ms                    : 1;  /**< [ 16: 16](RO) VF migration status. */
3255         uint32_t reserved_17_31        : 15;
3256 #endif /* Word 0 - End */
3257     } s;
3258     /* struct bdk_pccpf_xxx_sriov_ctl_s cn8; */
3259     struct bdk_pccpf_xxx_sriov_ctl_cn9
3260     {
3261 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3262         uint32_t reserved_17_31        : 15;
3263         uint32_t ms                    : 1;  /**< [ 16: 16](RO) VF migration status. */
3264         uint32_t reserved_5_15         : 11;
3265         uint32_t ach                   : 1;  /**< [  4:  4](RO) ARI capable hierarchy. */
3266         uint32_t mse                   : 1;  /**< [  3:  3](RO) VF MSE. Master space enable always on. */
3267         uint32_t mie                   : 1;  /**< [  2:  2](RO) VF migration interrupt enable. */
3268         uint32_t me                    : 1;  /**< [  1:  1](RO) VF migration enable. */
3269         uint32_t vfe                   : 1;  /**< [  0:  0](R/W) VF enable. If PCCPF_XXX_E_DEV_CAP[FLR] is clear, always set and writes have no
3270                                                                  effect. Resets to zero and writable otherwise.
3271 
3272                                                                  When clear, PCCVF_XXX_* CSRs are reset, reads and writes to them are RAO/WI.
3273 
3274                                                                  Internal:
3275                                                                  When clear, forces PCCVF_XXX_CMD[ME] = pcc__blk_masterena = 0. */
3276 #else /* Word 0 - Little Endian */
3277         uint32_t vfe                   : 1;  /**< [  0:  0](R/W) VF enable. If PCCPF_XXX_E_DEV_CAP[FLR] is clear, always set and writes have no
3278                                                                  effect. Resets to zero and writable otherwise.
3279 
3280                                                                  When clear, PCCVF_XXX_* CSRs are reset, reads and writes to them are RAO/WI.
3281 
3282                                                                  Internal:
3283                                                                  When clear, forces PCCVF_XXX_CMD[ME] = pcc__blk_masterena = 0. */
3284         uint32_t me                    : 1;  /**< [  1:  1](RO) VF migration enable. */
3285         uint32_t mie                   : 1;  /**< [  2:  2](RO) VF migration interrupt enable. */
3286         uint32_t mse                   : 1;  /**< [  3:  3](RO) VF MSE. Master space enable always on. */
3287         uint32_t ach                   : 1;  /**< [  4:  4](RO) ARI capable hierarchy. */
3288         uint32_t reserved_5_15         : 11;
3289         uint32_t ms                    : 1;  /**< [ 16: 16](RO) VF migration status. */
3290         uint32_t reserved_17_31        : 15;
3291 #endif /* Word 0 - End */
3292     } cn9;
3293 };
3294 typedef union bdk_pccpf_xxx_sriov_ctl bdk_pccpf_xxx_sriov_ctl_t;
3295 
3296 #define BDK_PCCPF_XXX_SRIOV_CTL BDK_PCCPF_XXX_SRIOV_CTL_FUNC()
3297 static inline uint64_t BDK_PCCPF_XXX_SRIOV_CTL_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_CTL_FUNC(void)3298 static inline uint64_t BDK_PCCPF_XXX_SRIOV_CTL_FUNC(void)
3299 {
3300     return 0x188;
3301 }
3302 
3303 #define typedef_BDK_PCCPF_XXX_SRIOV_CTL bdk_pccpf_xxx_sriov_ctl_t
3304 #define bustype_BDK_PCCPF_XXX_SRIOV_CTL BDK_CSR_TYPE_PCCPF
3305 #define basename_BDK_PCCPF_XXX_SRIOV_CTL "PCCPF_XXX_SRIOV_CTL"
3306 #define busnum_BDK_PCCPF_XXX_SRIOV_CTL 0
3307 #define arguments_BDK_PCCPF_XXX_SRIOV_CTL -1,-1,-1,-1
3308 
3309 /**
3310  * Register (PCCPF) pccpf_xxx_sriov_dev
3311  *
3312  * PCC PF SR-IOV VF Device ID Register
3313  */
3314 union bdk_pccpf_xxx_sriov_dev
3315 {
3316     uint32_t u;
3317     struct bdk_pccpf_xxx_sriov_dev_s
3318     {
3319 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3320         uint32_t vfdev                 : 16; /**< [ 31: 16](RO) VF device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
3321                                                                  e.g. 0xA033 for RNM_VF.
3322 
3323                                                                  Internal:
3324                                                                  Unit from PCC's tie__vfunitid. */
3325         uint32_t reserved_0_15         : 16;
3326 #else /* Word 0 - Little Endian */
3327         uint32_t reserved_0_15         : 16;
3328         uint32_t vfdev                 : 16; /**< [ 31: 16](RO) VF device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
3329                                                                  e.g. 0xA033 for RNM_VF.
3330 
3331                                                                  Internal:
3332                                                                  Unit from PCC's tie__vfunitid. */
3333 #endif /* Word 0 - End */
3334     } s;
3335     /* struct bdk_pccpf_xxx_sriov_dev_s cn8; */
3336     struct bdk_pccpf_xxx_sriov_dev_cn9
3337     {
3338 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3339         uint32_t vfdev                 : 16; /**< [ 31: 16](RO/H) VF device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
3340                                                                  e.g. 0xA033 for RNM's VF (PCC_DEV_IDL_E::RNM_VF).
3341 
3342                                                                  Internal:
3343                                                                  Unit from PCC's tie__vfunitid. */
3344         uint32_t reserved_0_15         : 16;
3345 #else /* Word 0 - Little Endian */
3346         uint32_t reserved_0_15         : 16;
3347         uint32_t vfdev                 : 16; /**< [ 31: 16](RO/H) VF device ID. \<15:8\> is PCC_PROD_E::GEN. \<7:0\> enumerated by PCC_DEV_IDL_E.
3348                                                                  e.g. 0xA033 for RNM's VF (PCC_DEV_IDL_E::RNM_VF).
3349 
3350                                                                  Internal:
3351                                                                  Unit from PCC's tie__vfunitid. */
3352 #endif /* Word 0 - End */
3353     } cn9;
3354 };
3355 typedef union bdk_pccpf_xxx_sriov_dev bdk_pccpf_xxx_sriov_dev_t;
3356 
3357 #define BDK_PCCPF_XXX_SRIOV_DEV BDK_PCCPF_XXX_SRIOV_DEV_FUNC()
3358 static inline uint64_t BDK_PCCPF_XXX_SRIOV_DEV_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_DEV_FUNC(void)3359 static inline uint64_t BDK_PCCPF_XXX_SRIOV_DEV_FUNC(void)
3360 {
3361     return 0x198;
3362 }
3363 
3364 #define typedef_BDK_PCCPF_XXX_SRIOV_DEV bdk_pccpf_xxx_sriov_dev_t
3365 #define bustype_BDK_PCCPF_XXX_SRIOV_DEV BDK_CSR_TYPE_PCCPF
3366 #define basename_BDK_PCCPF_XXX_SRIOV_DEV "PCCPF_XXX_SRIOV_DEV"
3367 #define busnum_BDK_PCCPF_XXX_SRIOV_DEV 0
3368 #define arguments_BDK_PCCPF_XXX_SRIOV_DEV -1,-1,-1,-1
3369 
3370 /**
3371  * Register (PCCPF) pccpf_xxx_sriov_fo
3372  *
3373  * PCC PF SR-IOV First VF Offset/VF Stride Register
3374  */
3375 union bdk_pccpf_xxx_sriov_fo
3376 {
3377     uint32_t u;
3378     struct bdk_pccpf_xxx_sriov_fo_s
3379     {
3380 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3381         uint32_t vfs                   : 16; /**< [ 31: 16](RO) VF stride. */
3382         uint32_t fo                    : 16; /**< [ 15:  0](RO) First VF offset. */
3383 #else /* Word 0 - Little Endian */
3384         uint32_t fo                    : 16; /**< [ 15:  0](RO) First VF offset. */
3385         uint32_t vfs                   : 16; /**< [ 31: 16](RO) VF stride. */
3386 #endif /* Word 0 - End */
3387     } s;
3388     /* struct bdk_pccpf_xxx_sriov_fo_s cn; */
3389 };
3390 typedef union bdk_pccpf_xxx_sriov_fo bdk_pccpf_xxx_sriov_fo_t;
3391 
3392 #define BDK_PCCPF_XXX_SRIOV_FO BDK_PCCPF_XXX_SRIOV_FO_FUNC()
3393 static inline uint64_t BDK_PCCPF_XXX_SRIOV_FO_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_FO_FUNC(void)3394 static inline uint64_t BDK_PCCPF_XXX_SRIOV_FO_FUNC(void)
3395 {
3396     return 0x194;
3397 }
3398 
3399 #define typedef_BDK_PCCPF_XXX_SRIOV_FO bdk_pccpf_xxx_sriov_fo_t
3400 #define bustype_BDK_PCCPF_XXX_SRIOV_FO BDK_CSR_TYPE_PCCPF
3401 #define basename_BDK_PCCPF_XXX_SRIOV_FO "PCCPF_XXX_SRIOV_FO"
3402 #define busnum_BDK_PCCPF_XXX_SRIOV_FO 0
3403 #define arguments_BDK_PCCPF_XXX_SRIOV_FO -1,-1,-1,-1
3404 
3405 /**
3406  * Register (PCCPF) pccpf_xxx_sriov_nvf
3407  *
3408  * PCC PF SR-IOV Number of VFs/Function Dependency Link Register
3409  */
3410 union bdk_pccpf_xxx_sriov_nvf
3411 {
3412     uint32_t u;
3413     struct bdk_pccpf_xxx_sriov_nvf_s
3414     {
3415 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3416         uint32_t reserved_24_31        : 8;
3417         uint32_t fdl                   : 8;  /**< [ 23: 16](RO) Function dependency link. Only a single PF 0 exists. */
3418         uint32_t nvf                   : 16; /**< [ 15:  0](RO) Number of VFs that are visible.
3419                                                                  Internal:
3420                                                                  From PCC's MSIX_VFS parameter. */
3421 #else /* Word 0 - Little Endian */
3422         uint32_t nvf                   : 16; /**< [ 15:  0](RO) Number of VFs that are visible.
3423                                                                  Internal:
3424                                                                  From PCC's MSIX_VFS parameter. */
3425         uint32_t fdl                   : 8;  /**< [ 23: 16](RO) Function dependency link. Only a single PF 0 exists. */
3426         uint32_t reserved_24_31        : 8;
3427 #endif /* Word 0 - End */
3428     } s;
3429     /* struct bdk_pccpf_xxx_sriov_nvf_s cn8; */
3430     struct bdk_pccpf_xxx_sriov_nvf_cn9
3431     {
3432 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3433         uint32_t reserved_24_31        : 8;
3434         uint32_t fdl                   : 8;  /**< [ 23: 16](RO) Function dependency link. Only a single PF 0 exists. */
3435         uint32_t nvf                   : 16; /**< [ 15:  0](RO/H) Number of VFs that are visible.
3436                                                                  Internal:
3437                                                                  From PCC generated parameter. For RVU, from RVU_PRIV_PF()_CFG[NVF]. */
3438 #else /* Word 0 - Little Endian */
3439         uint32_t nvf                   : 16; /**< [ 15:  0](RO/H) Number of VFs that are visible.
3440                                                                  Internal:
3441                                                                  From PCC generated parameter. For RVU, from RVU_PRIV_PF()_CFG[NVF]. */
3442         uint32_t fdl                   : 8;  /**< [ 23: 16](RO) Function dependency link. Only a single PF 0 exists. */
3443         uint32_t reserved_24_31        : 8;
3444 #endif /* Word 0 - End */
3445     } cn9;
3446 };
3447 typedef union bdk_pccpf_xxx_sriov_nvf bdk_pccpf_xxx_sriov_nvf_t;
3448 
3449 #define BDK_PCCPF_XXX_SRIOV_NVF BDK_PCCPF_XXX_SRIOV_NVF_FUNC()
3450 static inline uint64_t BDK_PCCPF_XXX_SRIOV_NVF_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_NVF_FUNC(void)3451 static inline uint64_t BDK_PCCPF_XXX_SRIOV_NVF_FUNC(void)
3452 {
3453     return 0x190;
3454 }
3455 
3456 #define typedef_BDK_PCCPF_XXX_SRIOV_NVF bdk_pccpf_xxx_sriov_nvf_t
3457 #define bustype_BDK_PCCPF_XXX_SRIOV_NVF BDK_CSR_TYPE_PCCPF
3458 #define basename_BDK_PCCPF_XXX_SRIOV_NVF "PCCPF_XXX_SRIOV_NVF"
3459 #define busnum_BDK_PCCPF_XXX_SRIOV_NVF 0
3460 #define arguments_BDK_PCCPF_XXX_SRIOV_NVF -1,-1,-1,-1
3461 
3462 /**
3463  * Register (PCCPF) pccpf_xxx_sriov_ps
3464  *
3465  * PCC PF SR-IOV System Page Sizes Register
3466  */
3467 union bdk_pccpf_xxx_sriov_ps
3468 {
3469     uint32_t u;
3470     struct bdk_pccpf_xxx_sriov_ps_s
3471     {
3472 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3473         uint32_t ps                    : 32; /**< [ 31:  0](RO) System page size. 1MB, as that is minimum stride between VFs. */
3474 #else /* Word 0 - Little Endian */
3475         uint32_t ps                    : 32; /**< [ 31:  0](RO) System page size. 1MB, as that is minimum stride between VFs. */
3476 #endif /* Word 0 - End */
3477     } s;
3478     /* struct bdk_pccpf_xxx_sriov_ps_s cn; */
3479 };
3480 typedef union bdk_pccpf_xxx_sriov_ps bdk_pccpf_xxx_sriov_ps_t;
3481 
3482 #define BDK_PCCPF_XXX_SRIOV_PS BDK_PCCPF_XXX_SRIOV_PS_FUNC()
3483 static inline uint64_t BDK_PCCPF_XXX_SRIOV_PS_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_PS_FUNC(void)3484 static inline uint64_t BDK_PCCPF_XXX_SRIOV_PS_FUNC(void)
3485 {
3486     return 0x1a0;
3487 }
3488 
3489 #define typedef_BDK_PCCPF_XXX_SRIOV_PS bdk_pccpf_xxx_sriov_ps_t
3490 #define bustype_BDK_PCCPF_XXX_SRIOV_PS BDK_CSR_TYPE_PCCPF
3491 #define basename_BDK_PCCPF_XXX_SRIOV_PS "PCCPF_XXX_SRIOV_PS"
3492 #define busnum_BDK_PCCPF_XXX_SRIOV_PS 0
3493 #define arguments_BDK_PCCPF_XXX_SRIOV_PS -1,-1,-1,-1
3494 
3495 /**
3496  * Register (PCCPF) pccpf_xxx_sriov_supps
3497  *
3498  * PCC PF SR-IOV Supported Page Sizes Register
3499  */
3500 union bdk_pccpf_xxx_sriov_supps
3501 {
3502     uint32_t u;
3503     struct bdk_pccpf_xxx_sriov_supps_s
3504     {
3505 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3506         uint32_t supps                 : 32; /**< [ 31:  0](RO) Supported page sizes. Indicates required 4K, 8K, 64K, 256K, 1M, 4M. The BAR fixed
3507                                                                  assignment makes this not useful. */
3508 #else /* Word 0 - Little Endian */
3509         uint32_t supps                 : 32; /**< [ 31:  0](RO) Supported page sizes. Indicates required 4K, 8K, 64K, 256K, 1M, 4M. The BAR fixed
3510                                                                  assignment makes this not useful. */
3511 #endif /* Word 0 - End */
3512     } s;
3513     /* struct bdk_pccpf_xxx_sriov_supps_s cn; */
3514 };
3515 typedef union bdk_pccpf_xxx_sriov_supps bdk_pccpf_xxx_sriov_supps_t;
3516 
3517 #define BDK_PCCPF_XXX_SRIOV_SUPPS BDK_PCCPF_XXX_SRIOV_SUPPS_FUNC()
3518 static inline uint64_t BDK_PCCPF_XXX_SRIOV_SUPPS_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_SUPPS_FUNC(void)3519 static inline uint64_t BDK_PCCPF_XXX_SRIOV_SUPPS_FUNC(void)
3520 {
3521     return 0x19c;
3522 }
3523 
3524 #define typedef_BDK_PCCPF_XXX_SRIOV_SUPPS bdk_pccpf_xxx_sriov_supps_t
3525 #define bustype_BDK_PCCPF_XXX_SRIOV_SUPPS BDK_CSR_TYPE_PCCPF
3526 #define basename_BDK_PCCPF_XXX_SRIOV_SUPPS "PCCPF_XXX_SRIOV_SUPPS"
3527 #define busnum_BDK_PCCPF_XXX_SRIOV_SUPPS 0
3528 #define arguments_BDK_PCCPF_XXX_SRIOV_SUPPS -1,-1,-1,-1
3529 
3530 /**
3531  * Register (PCCPF) pccpf_xxx_sriov_vfs
3532  *
3533  * PCC PF SR-IOV Initial VFs/Total VFs Register
3534  */
3535 union bdk_pccpf_xxx_sriov_vfs
3536 {
3537     uint32_t u;
3538     struct bdk_pccpf_xxx_sriov_vfs_s
3539     {
3540 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3541         uint32_t tvf                   : 16; /**< [ 31: 16](RO) Total VFs.
3542                                                                  Internal:
3543                                                                  from pcc's MSIX_VFS parameter. */
3544         uint32_t ivf                   : 16; /**< [ 15:  0](RO) Initial VFs.
3545                                                                  Internal:
3546                                                                  From PCC's MSIX_VFS parameter. */
3547 #else /* Word 0 - Little Endian */
3548         uint32_t ivf                   : 16; /**< [ 15:  0](RO) Initial VFs.
3549                                                                  Internal:
3550                                                                  From PCC's MSIX_VFS parameter. */
3551         uint32_t tvf                   : 16; /**< [ 31: 16](RO) Total VFs.
3552                                                                  Internal:
3553                                                                  from pcc's MSIX_VFS parameter. */
3554 #endif /* Word 0 - End */
3555     } s;
3556     /* struct bdk_pccpf_xxx_sriov_vfs_s cn8; */
3557     struct bdk_pccpf_xxx_sriov_vfs_cn9
3558     {
3559 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3560         uint32_t tvf                   : 16; /**< [ 31: 16](RO) Total VFs.
3561                                                                  Internal:
3562                                                                  From PCC generated parameter. For RVU, from RVU_PRIV_CONST[MAX_VFS_PER_PF]. */
3563         uint32_t ivf                   : 16; /**< [ 15:  0](RO/H) Initial VFs.
3564                                                                  Internal:
3565                                                                  From PCC generated parameter. For RVU, from RVU_PRIV_PF()_CFG[NVF]. */
3566 #else /* Word 0 - Little Endian */
3567         uint32_t ivf                   : 16; /**< [ 15:  0](RO/H) Initial VFs.
3568                                                                  Internal:
3569                                                                  From PCC generated parameter. For RVU, from RVU_PRIV_PF()_CFG[NVF]. */
3570         uint32_t tvf                   : 16; /**< [ 31: 16](RO) Total VFs.
3571                                                                  Internal:
3572                                                                  From PCC generated parameter. For RVU, from RVU_PRIV_CONST[MAX_VFS_PER_PF]. */
3573 #endif /* Word 0 - End */
3574     } cn9;
3575 };
3576 typedef union bdk_pccpf_xxx_sriov_vfs bdk_pccpf_xxx_sriov_vfs_t;
3577 
3578 #define BDK_PCCPF_XXX_SRIOV_VFS BDK_PCCPF_XXX_SRIOV_VFS_FUNC()
3579 static inline uint64_t BDK_PCCPF_XXX_SRIOV_VFS_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SRIOV_VFS_FUNC(void)3580 static inline uint64_t BDK_PCCPF_XXX_SRIOV_VFS_FUNC(void)
3581 {
3582     return 0x18c;
3583 }
3584 
3585 #define typedef_BDK_PCCPF_XXX_SRIOV_VFS bdk_pccpf_xxx_sriov_vfs_t
3586 #define bustype_BDK_PCCPF_XXX_SRIOV_VFS BDK_CSR_TYPE_PCCPF
3587 #define basename_BDK_PCCPF_XXX_SRIOV_VFS "PCCPF_XXX_SRIOV_VFS"
3588 #define busnum_BDK_PCCPF_XXX_SRIOV_VFS 0
3589 #define arguments_BDK_PCCPF_XXX_SRIOV_VFS -1,-1,-1,-1
3590 
3591 /**
3592  * Register (PCCPF) pccpf_xxx_subid
3593  *
3594  * PCC PF Subsystem ID/Subsystem Vendor ID Register
3595  */
3596 union bdk_pccpf_xxx_subid
3597 {
3598     uint32_t u;
3599     struct bdk_pccpf_xxx_subid_s
3600     {
3601 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3602         uint32_t ssid                  : 16; /**< [ 31: 16](RO) Device ID. \<15:8\> enumerated by PCC_PROD_E. \<7:0\> enumerated by PCC_DEV_IDL_E.
3603 
3604                                                                  Internal:
3605                                                                  Unit from PCC's tie__prod and tie__pfunitid. */
3606         uint32_t ssvid                 : 16; /**< [ 15:  0](RO) Subsystem vendor ID. Cavium = 0x177D. */
3607 #else /* Word 0 - Little Endian */
3608         uint32_t ssvid                 : 16; /**< [ 15:  0](RO) Subsystem vendor ID. Cavium = 0x177D. */
3609         uint32_t ssid                  : 16; /**< [ 31: 16](RO) Device ID. \<15:8\> enumerated by PCC_PROD_E. \<7:0\> enumerated by PCC_DEV_IDL_E.
3610 
3611                                                                  Internal:
3612                                                                  Unit from PCC's tie__prod and tie__pfunitid. */
3613 #endif /* Word 0 - End */
3614     } s;
3615     /* struct bdk_pccpf_xxx_subid_s cn8; */
3616     struct bdk_pccpf_xxx_subid_cn9
3617     {
3618 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3619         uint32_t ssid                  : 16; /**< [ 31: 16](RO) Subsystem ID. \<15:8\> enumerated by PCC_PROD_E. \<7:0\> = 0x0.
3620 
3621                                                                  Internal:
3622                                                                  \<15:8\> from PCC's tie__prod. */
3623         uint32_t ssvid                 : 16; /**< [ 15:  0](RO) Subsystem vendor ID. Cavium = 0x177D. */
3624 #else /* Word 0 - Little Endian */
3625         uint32_t ssvid                 : 16; /**< [ 15:  0](RO) Subsystem vendor ID. Cavium = 0x177D. */
3626         uint32_t ssid                  : 16; /**< [ 31: 16](RO) Subsystem ID. \<15:8\> enumerated by PCC_PROD_E. \<7:0\> = 0x0.
3627 
3628                                                                  Internal:
3629                                                                  \<15:8\> from PCC's tie__prod. */
3630 #endif /* Word 0 - End */
3631     } cn9;
3632 };
3633 typedef union bdk_pccpf_xxx_subid bdk_pccpf_xxx_subid_t;
3634 
3635 #define BDK_PCCPF_XXX_SUBID BDK_PCCPF_XXX_SUBID_FUNC()
3636 static inline uint64_t BDK_PCCPF_XXX_SUBID_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_SUBID_FUNC(void)3637 static inline uint64_t BDK_PCCPF_XXX_SUBID_FUNC(void)
3638 {
3639     return 0x2c;
3640 }
3641 
3642 #define typedef_BDK_PCCPF_XXX_SUBID bdk_pccpf_xxx_subid_t
3643 #define bustype_BDK_PCCPF_XXX_SUBID BDK_CSR_TYPE_PCCPF
3644 #define basename_BDK_PCCPF_XXX_SUBID "PCCPF_XXX_SUBID"
3645 #define busnum_BDK_PCCPF_XXX_SUBID 0
3646 #define arguments_BDK_PCCPF_XXX_SUBID -1,-1,-1,-1
3647 
3648 /**
3649  * Register (PCCPF) pccpf_xxx_vsec_bar0l
3650  *
3651  * PCC PF Vendor-Specific Address 0 Lower Register
3652  */
3653 union bdk_pccpf_xxx_vsec_bar0l
3654 {
3655     uint32_t u;
3656     struct bdk_pccpf_xxx_vsec_bar0l_s
3657     {
3658 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3659         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded BAR 0 base address; the reset value for
3660                                                                  PCCPF_XXX_BAR0L[LBAB].
3661 
3662                                                                  Internal:
3663                                                                  From PCC's tie__pfbar0_offset. */
3664         uint32_t reserved_0_15         : 16;
3665 #else /* Word 0 - Little Endian */
3666         uint32_t reserved_0_15         : 16;
3667         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded BAR 0 base address; the reset value for
3668                                                                  PCCPF_XXX_BAR0L[LBAB].
3669 
3670                                                                  Internal:
3671                                                                  From PCC's tie__pfbar0_offset. */
3672 #endif /* Word 0 - End */
3673     } s;
3674     /* struct bdk_pccpf_xxx_vsec_bar0l_s cn; */
3675 };
3676 typedef union bdk_pccpf_xxx_vsec_bar0l bdk_pccpf_xxx_vsec_bar0l_t;
3677 
3678 #define BDK_PCCPF_XXX_VSEC_BAR0L BDK_PCCPF_XXX_VSEC_BAR0L_FUNC()
3679 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR0L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_BAR0L_FUNC(void)3680 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR0L_FUNC(void)
3681 {
3682     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3683         return 0x110;
3684     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3685         return 0x110;
3686     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
3687         return 0x118;
3688     __bdk_csr_fatal("PCCPF_XXX_VSEC_BAR0L", 0, 0, 0, 0, 0);
3689 }
3690 
3691 #define typedef_BDK_PCCPF_XXX_VSEC_BAR0L bdk_pccpf_xxx_vsec_bar0l_t
3692 #define bustype_BDK_PCCPF_XXX_VSEC_BAR0L BDK_CSR_TYPE_PCCPF
3693 #define basename_BDK_PCCPF_XXX_VSEC_BAR0L "PCCPF_XXX_VSEC_BAR0L"
3694 #define busnum_BDK_PCCPF_XXX_VSEC_BAR0L 0
3695 #define arguments_BDK_PCCPF_XXX_VSEC_BAR0L -1,-1,-1,-1
3696 
3697 /**
3698  * Register (PCCPF) pccpf_xxx_vsec_bar0u
3699  *
3700  * PCC PF Vendor-Specific Address 0 Upper Register
3701  */
3702 union bdk_pccpf_xxx_vsec_bar0u
3703 {
3704     uint32_t u;
3705     struct bdk_pccpf_xxx_vsec_bar0u_s
3706     {
3707 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3708         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded BAR 0 base address; the reset value for
3709                                                                  PCCPF_XXX_BAR0U[UBAB].
3710 
3711                                                                  Internal:
3712                                                                  From PCC's tie__pfbar0_offset. */
3713 #else /* Word 0 - Little Endian */
3714         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded BAR 0 base address; the reset value for
3715                                                                  PCCPF_XXX_BAR0U[UBAB].
3716 
3717                                                                  Internal:
3718                                                                  From PCC's tie__pfbar0_offset. */
3719 #endif /* Word 0 - End */
3720     } s;
3721     /* struct bdk_pccpf_xxx_vsec_bar0u_s cn; */
3722 };
3723 typedef union bdk_pccpf_xxx_vsec_bar0u bdk_pccpf_xxx_vsec_bar0u_t;
3724 
3725 #define BDK_PCCPF_XXX_VSEC_BAR0U BDK_PCCPF_XXX_VSEC_BAR0U_FUNC()
3726 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR0U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_BAR0U_FUNC(void)3727 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR0U_FUNC(void)
3728 {
3729     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3730         return 0x114;
3731     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3732         return 0x114;
3733     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
3734         return 0x11c;
3735     __bdk_csr_fatal("PCCPF_XXX_VSEC_BAR0U", 0, 0, 0, 0, 0);
3736 }
3737 
3738 #define typedef_BDK_PCCPF_XXX_VSEC_BAR0U bdk_pccpf_xxx_vsec_bar0u_t
3739 #define bustype_BDK_PCCPF_XXX_VSEC_BAR0U BDK_CSR_TYPE_PCCPF
3740 #define basename_BDK_PCCPF_XXX_VSEC_BAR0U "PCCPF_XXX_VSEC_BAR0U"
3741 #define busnum_BDK_PCCPF_XXX_VSEC_BAR0U 0
3742 #define arguments_BDK_PCCPF_XXX_VSEC_BAR0U -1,-1,-1,-1
3743 
3744 /**
3745  * Register (PCCPF) pccpf_xxx_vsec_bar2l
3746  *
3747  * PCC PF Vendor-Specific Address 2 Lower Register
3748  */
3749 union bdk_pccpf_xxx_vsec_bar2l
3750 {
3751     uint32_t u;
3752     struct bdk_pccpf_xxx_vsec_bar2l_s
3753     {
3754 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3755         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded BAR 2 base address; the reset value for
3756                                                                  PCCPF_XXX_BAR2L[LBAB].
3757 
3758                                                                  Internal:
3759                                                                  From PCC's tie__pfbar2_offset. */
3760         uint32_t reserved_0_15         : 16;
3761 #else /* Word 0 - Little Endian */
3762         uint32_t reserved_0_15         : 16;
3763         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded BAR 2 base address; the reset value for
3764                                                                  PCCPF_XXX_BAR2L[LBAB].
3765 
3766                                                                  Internal:
3767                                                                  From PCC's tie__pfbar2_offset. */
3768 #endif /* Word 0 - End */
3769     } s;
3770     /* struct bdk_pccpf_xxx_vsec_bar2l_s cn; */
3771 };
3772 typedef union bdk_pccpf_xxx_vsec_bar2l bdk_pccpf_xxx_vsec_bar2l_t;
3773 
3774 #define BDK_PCCPF_XXX_VSEC_BAR2L BDK_PCCPF_XXX_VSEC_BAR2L_FUNC()
3775 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR2L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_BAR2L_FUNC(void)3776 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR2L_FUNC(void)
3777 {
3778     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3779         return 0x118;
3780     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3781         return 0x118;
3782     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
3783         return 0x120;
3784     __bdk_csr_fatal("PCCPF_XXX_VSEC_BAR2L", 0, 0, 0, 0, 0);
3785 }
3786 
3787 #define typedef_BDK_PCCPF_XXX_VSEC_BAR2L bdk_pccpf_xxx_vsec_bar2l_t
3788 #define bustype_BDK_PCCPF_XXX_VSEC_BAR2L BDK_CSR_TYPE_PCCPF
3789 #define basename_BDK_PCCPF_XXX_VSEC_BAR2L "PCCPF_XXX_VSEC_BAR2L"
3790 #define busnum_BDK_PCCPF_XXX_VSEC_BAR2L 0
3791 #define arguments_BDK_PCCPF_XXX_VSEC_BAR2L -1,-1,-1,-1
3792 
3793 /**
3794  * Register (PCCPF) pccpf_xxx_vsec_bar2u
3795  *
3796  * PCC PF Vendor-Specific Address 2 Upper Register
3797  */
3798 union bdk_pccpf_xxx_vsec_bar2u
3799 {
3800     uint32_t u;
3801     struct bdk_pccpf_xxx_vsec_bar2u_s
3802     {
3803 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3804         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded BAR 2 base address; the reset value for
3805                                                                  PCCPF_XXX_BAR2U[UBAB].
3806 
3807                                                                  Internal:
3808                                                                  From PCC's tie__pfbar2_offset. */
3809 #else /* Word 0 - Little Endian */
3810         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded BAR 2 base address; the reset value for
3811                                                                  PCCPF_XXX_BAR2U[UBAB].
3812 
3813                                                                  Internal:
3814                                                                  From PCC's tie__pfbar2_offset. */
3815 #endif /* Word 0 - End */
3816     } s;
3817     /* struct bdk_pccpf_xxx_vsec_bar2u_s cn; */
3818 };
3819 typedef union bdk_pccpf_xxx_vsec_bar2u bdk_pccpf_xxx_vsec_bar2u_t;
3820 
3821 #define BDK_PCCPF_XXX_VSEC_BAR2U BDK_PCCPF_XXX_VSEC_BAR2U_FUNC()
3822 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR2U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_BAR2U_FUNC(void)3823 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR2U_FUNC(void)
3824 {
3825     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3826         return 0x11c;
3827     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3828         return 0x11c;
3829     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
3830         return 0x124;
3831     __bdk_csr_fatal("PCCPF_XXX_VSEC_BAR2U", 0, 0, 0, 0, 0);
3832 }
3833 
3834 #define typedef_BDK_PCCPF_XXX_VSEC_BAR2U bdk_pccpf_xxx_vsec_bar2u_t
3835 #define bustype_BDK_PCCPF_XXX_VSEC_BAR2U BDK_CSR_TYPE_PCCPF
3836 #define basename_BDK_PCCPF_XXX_VSEC_BAR2U "PCCPF_XXX_VSEC_BAR2U"
3837 #define busnum_BDK_PCCPF_XXX_VSEC_BAR2U 0
3838 #define arguments_BDK_PCCPF_XXX_VSEC_BAR2U -1,-1,-1,-1
3839 
3840 /**
3841  * Register (PCCPF) pccpf_xxx_vsec_bar4l
3842  *
3843  * PCC PF Vendor-Specific Address 4 Lower Register
3844  */
3845 union bdk_pccpf_xxx_vsec_bar4l
3846 {
3847     uint32_t u;
3848     struct bdk_pccpf_xxx_vsec_bar4l_s
3849     {
3850 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3851         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded BAR 4 base address; the reset value for
3852                                                                  PCCPF_XXX_BAR4L[LBAB].
3853 
3854                                                                  Internal:
3855                                                                  From PCC's tie__pfbar4_offset. */
3856         uint32_t reserved_0_15         : 16;
3857 #else /* Word 0 - Little Endian */
3858         uint32_t reserved_0_15         : 16;
3859         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded BAR 4 base address; the reset value for
3860                                                                  PCCPF_XXX_BAR4L[LBAB].
3861 
3862                                                                  Internal:
3863                                                                  From PCC's tie__pfbar4_offset. */
3864 #endif /* Word 0 - End */
3865     } s;
3866     /* struct bdk_pccpf_xxx_vsec_bar4l_s cn; */
3867 };
3868 typedef union bdk_pccpf_xxx_vsec_bar4l bdk_pccpf_xxx_vsec_bar4l_t;
3869 
3870 #define BDK_PCCPF_XXX_VSEC_BAR4L BDK_PCCPF_XXX_VSEC_BAR4L_FUNC()
3871 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR4L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_BAR4L_FUNC(void)3872 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR4L_FUNC(void)
3873 {
3874     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3875         return 0x120;
3876     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3877         return 0x120;
3878     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
3879         return 0x128;
3880     __bdk_csr_fatal("PCCPF_XXX_VSEC_BAR4L", 0, 0, 0, 0, 0);
3881 }
3882 
3883 #define typedef_BDK_PCCPF_XXX_VSEC_BAR4L bdk_pccpf_xxx_vsec_bar4l_t
3884 #define bustype_BDK_PCCPF_XXX_VSEC_BAR4L BDK_CSR_TYPE_PCCPF
3885 #define basename_BDK_PCCPF_XXX_VSEC_BAR4L "PCCPF_XXX_VSEC_BAR4L"
3886 #define busnum_BDK_PCCPF_XXX_VSEC_BAR4L 0
3887 #define arguments_BDK_PCCPF_XXX_VSEC_BAR4L -1,-1,-1,-1
3888 
3889 /**
3890  * Register (PCCPF) pccpf_xxx_vsec_bar4u
3891  *
3892  * PCC PF Vendor-Specific Address 4 Upper Register
3893  */
3894 union bdk_pccpf_xxx_vsec_bar4u
3895 {
3896     uint32_t u;
3897     struct bdk_pccpf_xxx_vsec_bar4u_s
3898     {
3899 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3900         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded BAR 4 base address; the reset value for
3901                                                                  PCCPF_XXX_BAR4U[UBAB].
3902 
3903                                                                  Internal:
3904                                                                  From PCC's tie__pfbar4_offset. */
3905 #else /* Word 0 - Little Endian */
3906         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded BAR 4 base address; the reset value for
3907                                                                  PCCPF_XXX_BAR4U[UBAB].
3908 
3909                                                                  Internal:
3910                                                                  From PCC's tie__pfbar4_offset. */
3911 #endif /* Word 0 - End */
3912     } s;
3913     /* struct bdk_pccpf_xxx_vsec_bar4u_s cn; */
3914 };
3915 typedef union bdk_pccpf_xxx_vsec_bar4u bdk_pccpf_xxx_vsec_bar4u_t;
3916 
3917 #define BDK_PCCPF_XXX_VSEC_BAR4U BDK_PCCPF_XXX_VSEC_BAR4U_FUNC()
3918 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR4U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_BAR4U_FUNC(void)3919 static inline uint64_t BDK_PCCPF_XXX_VSEC_BAR4U_FUNC(void)
3920 {
3921     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3922         return 0x124;
3923     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3924         return 0x124;
3925     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
3926         return 0x12c;
3927     __bdk_csr_fatal("PCCPF_XXX_VSEC_BAR4U", 0, 0, 0, 0, 0);
3928 }
3929 
3930 #define typedef_BDK_PCCPF_XXX_VSEC_BAR4U bdk_pccpf_xxx_vsec_bar4u_t
3931 #define bustype_BDK_PCCPF_XXX_VSEC_BAR4U BDK_CSR_TYPE_PCCPF
3932 #define basename_BDK_PCCPF_XXX_VSEC_BAR4U "PCCPF_XXX_VSEC_BAR4U"
3933 #define busnum_BDK_PCCPF_XXX_VSEC_BAR4U 0
3934 #define arguments_BDK_PCCPF_XXX_VSEC_BAR4U -1,-1,-1,-1
3935 
3936 /**
3937  * Register (PCCPF) pccpf_xxx_vsec_cap_hdr
3938  *
3939  * PCC PF Vendor-Specific Capability Header Register
3940  * This register is the header of the 64-byte {ProductLine} family PF capability
3941  * structure.
3942  */
3943 union bdk_pccpf_xxx_vsec_cap_hdr
3944 {
3945     uint32_t u;
3946     struct bdk_pccpf_xxx_vsec_cap_hdr_s
3947     {
3948 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3949         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If SR-IOV is supported as per PCC_DEV_IDL_E, points to the
3950                                                                  PCCPF_XXX_SRIOV_CAP_HDR, else 0x0. */
3951         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3952         uint32_t vsecid                : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates vendor-specific capability. */
3953 #else /* Word 0 - Little Endian */
3954         uint32_t vsecid                : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates vendor-specific capability. */
3955         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3956         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If SR-IOV is supported as per PCC_DEV_IDL_E, points to the
3957                                                                  PCCPF_XXX_SRIOV_CAP_HDR, else 0x0. */
3958 #endif /* Word 0 - End */
3959     } s;
3960     struct bdk_pccpf_xxx_vsec_cap_hdr_cn9
3961     {
3962 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3963         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. Points to PCCPF_XXX_AER_CAP_HDR. */
3964         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3965         uint32_t vsecid                : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates vendor-specific capability. */
3966 #else /* Word 0 - Little Endian */
3967         uint32_t vsecid                : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates vendor-specific capability. */
3968         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3969         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. Points to PCCPF_XXX_AER_CAP_HDR. */
3970 #endif /* Word 0 - End */
3971     } cn9;
3972     struct bdk_pccpf_xxx_vsec_cap_hdr_cn81xx
3973     {
3974 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
3975         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If this device is on a nonzero bus, points to
3976                                                                  PCCPF_XXX_ARI_CAP_HDR, else 0x0. */
3977         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3978         uint32_t vsecid                : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates vendor-specific capability. */
3979 #else /* Word 0 - Little Endian */
3980         uint32_t vsecid                : 16; /**< [ 15:  0](RO) PCIE extended capability. Indicates vendor-specific capability. */
3981         uint32_t cv                    : 4;  /**< [ 19: 16](RO) Capability version. */
3982         uint32_t nco                   : 12; /**< [ 31: 20](RO) Next capability offset. If this device is on a nonzero bus, points to
3983                                                                  PCCPF_XXX_ARI_CAP_HDR, else 0x0. */
3984 #endif /* Word 0 - End */
3985     } cn81xx;
3986     /* struct bdk_pccpf_xxx_vsec_cap_hdr_s cn88xx; */
3987     /* struct bdk_pccpf_xxx_vsec_cap_hdr_cn81xx cn83xx; */
3988 };
3989 typedef union bdk_pccpf_xxx_vsec_cap_hdr bdk_pccpf_xxx_vsec_cap_hdr_t;
3990 
3991 #define BDK_PCCPF_XXX_VSEC_CAP_HDR BDK_PCCPF_XXX_VSEC_CAP_HDR_FUNC()
3992 static inline uint64_t BDK_PCCPF_XXX_VSEC_CAP_HDR_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_CAP_HDR_FUNC(void)3993 static inline uint64_t BDK_PCCPF_XXX_VSEC_CAP_HDR_FUNC(void)
3994 {
3995     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
3996         return 0x100;
3997     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
3998         return 0x100;
3999     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4000         return 0x108;
4001     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
4002         return 0x100;
4003     __bdk_csr_fatal("PCCPF_XXX_VSEC_CAP_HDR", 0, 0, 0, 0, 0);
4004 }
4005 
4006 #define typedef_BDK_PCCPF_XXX_VSEC_CAP_HDR bdk_pccpf_xxx_vsec_cap_hdr_t
4007 #define bustype_BDK_PCCPF_XXX_VSEC_CAP_HDR BDK_CSR_TYPE_PCCPF
4008 #define basename_BDK_PCCPF_XXX_VSEC_CAP_HDR "PCCPF_XXX_VSEC_CAP_HDR"
4009 #define busnum_BDK_PCCPF_XXX_VSEC_CAP_HDR 0
4010 #define arguments_BDK_PCCPF_XXX_VSEC_CAP_HDR -1,-1,-1,-1
4011 
4012 /**
4013  * Register (PCCPF) pccpf_xxx_vsec_ctl
4014  *
4015  * PCC PF Vendor-Specific Control Register
4016  * This register is reset on a chip domain reset.
4017  */
4018 union bdk_pccpf_xxx_vsec_ctl
4019 {
4020     uint32_t u;
4021     struct bdk_pccpf_xxx_vsec_ctl_s
4022     {
4023 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4024         uint32_t nxtfn_ns              : 8;  /**< [ 31: 24](R/W) For nonsecure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN]
4025                                                                  indicating the next valid function number for this device.
4026                                                                  Must be kept as 0x0 for non-MRML PCC devices. */
4027         uint32_t reserved_12_23        : 12;
4028         uint32_t cor_intn              : 1;  /**< [ 11: 11](R/W1S/H) Corrected internal error. Writing a one to this bit sets
4029                                                                  PCCPF_XXX_AER_COR_STATUS[COR_INTN].
4030                                                                  This is a self-clearing bit and always reads as zero. */
4031         uint32_t adv_nfat              : 1;  /**< [ 10: 10](R/W1S/H) Advisory non-fatal error. Writing a one to this bit sets
4032                                                                  PCCPF_XXX_AER_COR_STATUS[ADV_NFAT].
4033                                                                  This is a self-clearing bit and always reads as zero. */
4034         uint32_t uncor_intn            : 1;  /**< [  9:  9](R/W1S/H) Poisoned TLP received. Writing a one to this bit sets
4035                                                                  PCCPF_XXX_AER_UNCOR_STATUS[UNCOR_INTN]. This is a self-clearing bit and always
4036                                                                  reads as zero. */
4037         uint32_t poison_tlp            : 1;  /**< [  8:  8](R/W1S/H) Poisoned TLP received. Writing a one to this bit sets
4038                                                                  PCCPF_XXX_AER_UNCOR_STATUS[POISON_TLP]. This is a self-clearing bit and always
4039                                                                  reads as zero. */
4040         uint32_t inst_num              : 8;  /**< [  7:  0](RO) Instance number. For blocks with multiple instances, indicates which instance number,
4041                                                                  otherwise 0x0; may be used to form Linux device numbers. For example for UART(1) is 0x1. */
4042 #else /* Word 0 - Little Endian */
4043         uint32_t inst_num              : 8;  /**< [  7:  0](RO) Instance number. For blocks with multiple instances, indicates which instance number,
4044                                                                  otherwise 0x0; may be used to form Linux device numbers. For example for UART(1) is 0x1. */
4045         uint32_t poison_tlp            : 1;  /**< [  8:  8](R/W1S/H) Poisoned TLP received. Writing a one to this bit sets
4046                                                                  PCCPF_XXX_AER_UNCOR_STATUS[POISON_TLP]. This is a self-clearing bit and always
4047                                                                  reads as zero. */
4048         uint32_t uncor_intn            : 1;  /**< [  9:  9](R/W1S/H) Poisoned TLP received. Writing a one to this bit sets
4049                                                                  PCCPF_XXX_AER_UNCOR_STATUS[UNCOR_INTN]. This is a self-clearing bit and always
4050                                                                  reads as zero. */
4051         uint32_t adv_nfat              : 1;  /**< [ 10: 10](R/W1S/H) Advisory non-fatal error. Writing a one to this bit sets
4052                                                                  PCCPF_XXX_AER_COR_STATUS[ADV_NFAT].
4053                                                                  This is a self-clearing bit and always reads as zero. */
4054         uint32_t cor_intn              : 1;  /**< [ 11: 11](R/W1S/H) Corrected internal error. Writing a one to this bit sets
4055                                                                  PCCPF_XXX_AER_COR_STATUS[COR_INTN].
4056                                                                  This is a self-clearing bit and always reads as zero. */
4057         uint32_t reserved_12_23        : 12;
4058         uint32_t nxtfn_ns              : 8;  /**< [ 31: 24](R/W) For nonsecure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN]
4059                                                                  indicating the next valid function number for this device.
4060                                                                  Must be kept as 0x0 for non-MRML PCC devices. */
4061 #endif /* Word 0 - End */
4062     } s;
4063     struct bdk_pccpf_xxx_vsec_ctl_cn8
4064     {
4065 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4066         uint32_t nxtfn_ns              : 8;  /**< [ 31: 24](R/W) For nonsecure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN]
4067                                                                  indicating the next valid function number for this device.
4068                                                                  Must be kept as 0x0 for non-MRML PCC devices. */
4069         uint32_t reserved_8_23         : 16;
4070         uint32_t inst_num              : 8;  /**< [  7:  0](RO) Instance number. For blocks with multiple instances, indicates which instance number,
4071                                                                  otherwise 0x0; may be used to form Linux device numbers. For example for UART(1) is 0x1. */
4072 #else /* Word 0 - Little Endian */
4073         uint32_t inst_num              : 8;  /**< [  7:  0](RO) Instance number. For blocks with multiple instances, indicates which instance number,
4074                                                                  otherwise 0x0; may be used to form Linux device numbers. For example for UART(1) is 0x1. */
4075         uint32_t reserved_8_23         : 16;
4076         uint32_t nxtfn_ns              : 8;  /**< [ 31: 24](R/W) For nonsecure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN]
4077                                                                  indicating the next valid function number for this device.
4078                                                                  Must be kept as 0x0 for non-MRML PCC devices. */
4079 #endif /* Word 0 - End */
4080     } cn8;
4081     /* struct bdk_pccpf_xxx_vsec_ctl_s cn9; */
4082 };
4083 typedef union bdk_pccpf_xxx_vsec_ctl bdk_pccpf_xxx_vsec_ctl_t;
4084 
4085 #define BDK_PCCPF_XXX_VSEC_CTL BDK_PCCPF_XXX_VSEC_CTL_FUNC()
4086 static inline uint64_t BDK_PCCPF_XXX_VSEC_CTL_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_CTL_FUNC(void)4087 static inline uint64_t BDK_PCCPF_XXX_VSEC_CTL_FUNC(void)
4088 {
4089     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4090         return 0x108;
4091     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4092         return 0x108;
4093     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4094         return 0x110;
4095     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
4096         return 0x108;
4097     __bdk_csr_fatal("PCCPF_XXX_VSEC_CTL", 0, 0, 0, 0, 0);
4098 }
4099 
4100 #define typedef_BDK_PCCPF_XXX_VSEC_CTL bdk_pccpf_xxx_vsec_ctl_t
4101 #define bustype_BDK_PCCPF_XXX_VSEC_CTL BDK_CSR_TYPE_PCCPF
4102 #define basename_BDK_PCCPF_XXX_VSEC_CTL "PCCPF_XXX_VSEC_CTL"
4103 #define busnum_BDK_PCCPF_XXX_VSEC_CTL 0
4104 #define arguments_BDK_PCCPF_XXX_VSEC_CTL -1,-1,-1,-1
4105 
4106 /**
4107  * Register (PCCPF) pccpf_xxx_vsec_id
4108  *
4109  * PCC PF Vendor-Specific Identification Register
4110  */
4111 union bdk_pccpf_xxx_vsec_id
4112 {
4113     uint32_t u;
4114     struct bdk_pccpf_xxx_vsec_id_s
4115     {
4116 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4117         uint32_t len                   : 12; /**< [ 31: 20](RO) Number of bytes in the entire VSEC structure including PCCPF_XXX_VSEC_CAP_HDR. */
4118         uint32_t rev                   : 4;  /**< [ 19: 16](RO) Vendor-specific revision. */
4119         uint32_t id                    : 16; /**< [ 15:  0](RO) Vendor-specific ID. Indicates the {ProductLine} family VSEC ID. */
4120 #else /* Word 0 - Little Endian */
4121         uint32_t id                    : 16; /**< [ 15:  0](RO) Vendor-specific ID. Indicates the {ProductLine} family VSEC ID. */
4122         uint32_t rev                   : 4;  /**< [ 19: 16](RO) Vendor-specific revision. */
4123         uint32_t len                   : 12; /**< [ 31: 20](RO) Number of bytes in the entire VSEC structure including PCCPF_XXX_VSEC_CAP_HDR. */
4124 #endif /* Word 0 - End */
4125     } s;
4126     /* struct bdk_pccpf_xxx_vsec_id_s cn8; */
4127     struct bdk_pccpf_xxx_vsec_id_cn9
4128     {
4129 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4130         uint32_t len                   : 12; /**< [ 31: 20](RO) Number of bytes in the entire VSEC structure including PCCPF_XXX_VSEC_CAP_HDR. */
4131         uint32_t rev                   : 4;  /**< [ 19: 16](RO) Vendor-specific revision. */
4132         uint32_t id                    : 16; /**< [ 15:  0](RO) Vendor-specific ID. Indicates the {ProductLine} family PF VSEC ID.
4133                                                                  Enumerated by PCC_VSECID_E. */
4134 #else /* Word 0 - Little Endian */
4135         uint32_t id                    : 16; /**< [ 15:  0](RO) Vendor-specific ID. Indicates the {ProductLine} family PF VSEC ID.
4136                                                                  Enumerated by PCC_VSECID_E. */
4137         uint32_t rev                   : 4;  /**< [ 19: 16](RO) Vendor-specific revision. */
4138         uint32_t len                   : 12; /**< [ 31: 20](RO) Number of bytes in the entire VSEC structure including PCCPF_XXX_VSEC_CAP_HDR. */
4139 #endif /* Word 0 - End */
4140     } cn9;
4141 };
4142 typedef union bdk_pccpf_xxx_vsec_id bdk_pccpf_xxx_vsec_id_t;
4143 
4144 #define BDK_PCCPF_XXX_VSEC_ID BDK_PCCPF_XXX_VSEC_ID_FUNC()
4145 static inline uint64_t BDK_PCCPF_XXX_VSEC_ID_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_ID_FUNC(void)4146 static inline uint64_t BDK_PCCPF_XXX_VSEC_ID_FUNC(void)
4147 {
4148     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4149         return 0x104;
4150     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4151         return 0x104;
4152     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4153         return 0x10c;
4154     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
4155         return 0x104;
4156     __bdk_csr_fatal("PCCPF_XXX_VSEC_ID", 0, 0, 0, 0, 0);
4157 }
4158 
4159 #define typedef_BDK_PCCPF_XXX_VSEC_ID bdk_pccpf_xxx_vsec_id_t
4160 #define bustype_BDK_PCCPF_XXX_VSEC_ID BDK_CSR_TYPE_PCCPF
4161 #define basename_BDK_PCCPF_XXX_VSEC_ID "PCCPF_XXX_VSEC_ID"
4162 #define busnum_BDK_PCCPF_XXX_VSEC_ID 0
4163 #define arguments_BDK_PCCPF_XXX_VSEC_ID -1,-1,-1,-1
4164 
4165 /**
4166  * Register (PCCPF) pccpf_xxx_vsec_sctl
4167  *
4168  * PCC PF Vendor-Specific Secure Control Register
4169  * This register is reset on a chip domain reset.
4170  */
4171 union bdk_pccpf_xxx_vsec_sctl
4172 {
4173     uint32_t u;
4174     struct bdk_pccpf_xxx_vsec_sctl_s
4175     {
4176 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4177         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4178                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4179                                                                  devices. */
4180         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4181         uint32_t msix_sec_phys         : 1;  /**< [ 15: 15](SR/W) MSI-X secure physical:
4182                                                                  _ 0 = Any MSI-X vectors with SECVEC = 1 use the same physical setting as
4183                                                                  nonsecure vectors, i.e. [MSIX_PHYS].
4184                                                                  _ 1 = Any MSI-X vectors with SECVEC = 1 are considered physical, regardless
4185                                                                  of [MSIX_PHYS]. */
4186         uint32_t reserved_12_14        : 3;
4187         uint32_t gia_timeout           : 6;  /**< [ 11:  6](SR/W) GIA timeout (2^[GIA_TIMEOUT] clock cycles). Timeout for MSI-X commits. When zero, wait
4188                                                                  for commits is disabled. */
4189         uint32_t node                  : 2;  /**< [  5:  4](SRO) Reserved. */
4190         uint32_t ea                    : 1;  /**< [  3:  3](SRO) Reserved. */
4191         uint32_t reserved_2            : 1;
4192         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4193                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4194         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4195                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4196                                                                  address translation.
4197                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4198                                                                  interrupt delivery will bypass the SMMU. */
4199 #else /* Word 0 - Little Endian */
4200         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4201                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4202                                                                  address translation.
4203                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4204                                                                  interrupt delivery will bypass the SMMU. */
4205         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4206                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4207         uint32_t reserved_2            : 1;
4208         uint32_t ea                    : 1;  /**< [  3:  3](SRO) Reserved. */
4209         uint32_t node                  : 2;  /**< [  5:  4](SRO) Reserved. */
4210         uint32_t gia_timeout           : 6;  /**< [ 11:  6](SR/W) GIA timeout (2^[GIA_TIMEOUT] clock cycles). Timeout for MSI-X commits. When zero, wait
4211                                                                  for commits is disabled. */
4212         uint32_t reserved_12_14        : 3;
4213         uint32_t msix_sec_phys         : 1;  /**< [ 15: 15](SR/W) MSI-X secure physical:
4214                                                                  _ 0 = Any MSI-X vectors with SECVEC = 1 use the same physical setting as
4215                                                                  nonsecure vectors, i.e. [MSIX_PHYS].
4216                                                                  _ 1 = Any MSI-X vectors with SECVEC = 1 are considered physical, regardless
4217                                                                  of [MSIX_PHYS]. */
4218         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4219         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4220                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4221                                                                  devices. */
4222 #endif /* Word 0 - End */
4223     } s;
4224     struct bdk_pccpf_xxx_vsec_sctl_cn88xxp1
4225     {
4226 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4227         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4228                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4229                                                                  devices. */
4230         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4231         uint32_t reserved_6_15         : 10;
4232         uint32_t node                  : 2;  /**< [  5:  4](SRO) Reserved. */
4233         uint32_t ea                    : 1;  /**< [  3:  3](SRO) Reserved. */
4234         uint32_t bcst_rsp              : 1;  /**< [  2:  2](SR/W) Reserved, must be 0.
4235                                                                  Internal:
4236                                                                  Reserved for future use - Enable this PCC
4237                                                                  instance as the responder to PCC broadcast reads/writes. */
4238         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4239                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4240         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4241                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4242                                                                  address translation.
4243                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4244                                                                  interrupt delivery will bypass the SMMU. */
4245 #else /* Word 0 - Little Endian */
4246         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4247                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4248                                                                  address translation.
4249                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4250                                                                  interrupt delivery will bypass the SMMU. */
4251         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4252                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4253         uint32_t bcst_rsp              : 1;  /**< [  2:  2](SR/W) Reserved, must be 0.
4254                                                                  Internal:
4255                                                                  Reserved for future use - Enable this PCC
4256                                                                  instance as the responder to PCC broadcast reads/writes. */
4257         uint32_t ea                    : 1;  /**< [  3:  3](SRO) Reserved. */
4258         uint32_t node                  : 2;  /**< [  5:  4](SRO) Reserved. */
4259         uint32_t reserved_6_15         : 10;
4260         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4261         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4262                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4263                                                                  devices. */
4264 #endif /* Word 0 - End */
4265     } cn88xxp1;
4266     struct bdk_pccpf_xxx_vsec_sctl_cn9
4267     {
4268 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4269         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4270                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4271                                                                  devices. */
4272         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4273         uint32_t msix_sec_phys         : 1;  /**< [ 15: 15](SR/W) MSI-X secure physical:
4274                                                                  _ 0 = Any MSI-X vectors with SECVEC = 1 use the same physical setting as
4275                                                                  nonsecure vectors, i.e. [MSIX_PHYS].
4276                                                                  _ 1 = Any MSI-X vectors with SECVEC = 1 are considered physical, regardless
4277                                                                  of [MSIX_PHYS]. */
4278         uint32_t reserved_12_14        : 3;
4279         uint32_t gia_timeout           : 6;  /**< [ 11:  6](SR/W) GIA timeout (2^[GIA_TIMEOUT] clock cycles). Timeout for MSI-X commits. When zero, wait
4280                                                                  for commits is disabled. */
4281         uint32_t node                  : 2;  /**< [  5:  4](SR/W) Node number. */
4282         uint32_t ea                    : 1;  /**< [  3:  3](SRO) Enable PCI enhanced allocation. Always set.
4283 
4284                                                                  Addresses are discovered using enhanced allocation and PCCPF_XXX_EA_ENTRY().
4285                                                                  Standard BARs are read-only zero (PCCPF_XXX_BAR0L, PCCPF_XXX_BAR0U,
4286                                                                  PCCPF_XXX_BAR2L, PCCPF_XXX_BAR2U, PCCPF_XXX_BAR4L, PCCPF_XXX_BAR4U,
4287                                                                  PCCPF_XXX_SRIOV_BAR0L, PCCPF_XXX_SRIOV_BAR0U, PCCPF_XXX_SRIOV_BAR2L,
4288                                                                  PCCPF_XXX_SRIOV_BAR2U, PCCPF_XXX_SRIOV_BAR4L, PCCPF_XXX_SRIOV_BAR4U). */
4289         uint32_t msix_sec_en           : 1;  /**< [  2:  2](SR/W) MSI-X secure enable:
4290                                                                  _ 0 = Any MSI-X vectors with SECVEC = 1, or all vectors if [MSIX_SEC], use
4291                                                                  the same enable settings as nonsecure vectors based on normal PCIe
4292                                                                  rules, i.e. are enabled when PCCPF_XXX_MSIX_CAP_HDR[MSIXEN]=1 and
4293                                                                  unmasked when PCCPF_XXX_MSIX_CAP_HDR[FUNM]=0 and PCCPF_XXX_CMD[ME]=1.
4294                                                                  _ 1 = Any MSI-X vectors with SECVEC = 1, or all vectors if [MSIX_SEC], will
4295                                                                  act as if PCCPF_XXX_MSIX_CAP_HDR[MSIXEN]=1, PCCPF_XXX_MSIX_CAP_HDR[FUNM]=0
4296                                                                  and PCCPF_XXX_CMD[ME]=1,
4297                                                                  regardless of the true setting of those bits. Nonsecure vectors are
4298                                                                  unaffected. Blocks that have both secure and nonsecure vectors in use
4299                                                                  simultaneously may want to use this setting to prevent the nonsecure world
4300                                                                  from globally disabling secure interrupts. */
4301         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4302                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4303         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4304                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4305                                                                  address translation.
4306                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4307                                                                  interrupt delivery will bypass the SMMU. */
4308 #else /* Word 0 - Little Endian */
4309         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4310                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4311                                                                  address translation.
4312                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4313                                                                  interrupt delivery will bypass the SMMU. */
4314         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4315                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4316         uint32_t msix_sec_en           : 1;  /**< [  2:  2](SR/W) MSI-X secure enable:
4317                                                                  _ 0 = Any MSI-X vectors with SECVEC = 1, or all vectors if [MSIX_SEC], use
4318                                                                  the same enable settings as nonsecure vectors based on normal PCIe
4319                                                                  rules, i.e. are enabled when PCCPF_XXX_MSIX_CAP_HDR[MSIXEN]=1 and
4320                                                                  unmasked when PCCPF_XXX_MSIX_CAP_HDR[FUNM]=0 and PCCPF_XXX_CMD[ME]=1.
4321                                                                  _ 1 = Any MSI-X vectors with SECVEC = 1, or all vectors if [MSIX_SEC], will
4322                                                                  act as if PCCPF_XXX_MSIX_CAP_HDR[MSIXEN]=1, PCCPF_XXX_MSIX_CAP_HDR[FUNM]=0
4323                                                                  and PCCPF_XXX_CMD[ME]=1,
4324                                                                  regardless of the true setting of those bits. Nonsecure vectors are
4325                                                                  unaffected. Blocks that have both secure and nonsecure vectors in use
4326                                                                  simultaneously may want to use this setting to prevent the nonsecure world
4327                                                                  from globally disabling secure interrupts. */
4328         uint32_t ea                    : 1;  /**< [  3:  3](SRO) Enable PCI enhanced allocation. Always set.
4329 
4330                                                                  Addresses are discovered using enhanced allocation and PCCPF_XXX_EA_ENTRY().
4331                                                                  Standard BARs are read-only zero (PCCPF_XXX_BAR0L, PCCPF_XXX_BAR0U,
4332                                                                  PCCPF_XXX_BAR2L, PCCPF_XXX_BAR2U, PCCPF_XXX_BAR4L, PCCPF_XXX_BAR4U,
4333                                                                  PCCPF_XXX_SRIOV_BAR0L, PCCPF_XXX_SRIOV_BAR0U, PCCPF_XXX_SRIOV_BAR2L,
4334                                                                  PCCPF_XXX_SRIOV_BAR2U, PCCPF_XXX_SRIOV_BAR4L, PCCPF_XXX_SRIOV_BAR4U). */
4335         uint32_t node                  : 2;  /**< [  5:  4](SR/W) Node number. */
4336         uint32_t gia_timeout           : 6;  /**< [ 11:  6](SR/W) GIA timeout (2^[GIA_TIMEOUT] clock cycles). Timeout for MSI-X commits. When zero, wait
4337                                                                  for commits is disabled. */
4338         uint32_t reserved_12_14        : 3;
4339         uint32_t msix_sec_phys         : 1;  /**< [ 15: 15](SR/W) MSI-X secure physical:
4340                                                                  _ 0 = Any MSI-X vectors with SECVEC = 1 use the same physical setting as
4341                                                                  nonsecure vectors, i.e. [MSIX_PHYS].
4342                                                                  _ 1 = Any MSI-X vectors with SECVEC = 1 are considered physical, regardless
4343                                                                  of [MSIX_PHYS]. */
4344         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4345         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4346                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4347                                                                  devices. */
4348 #endif /* Word 0 - End */
4349     } cn9;
4350     struct bdk_pccpf_xxx_vsec_sctl_cn81xx
4351     {
4352 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4353         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4354                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4355                                                                  devices. */
4356         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4357         uint32_t reserved_6_15         : 10;
4358         uint32_t node                  : 2;  /**< [  5:  4](SR/W/H) Node number. */
4359         uint32_t ea                    : 1;  /**< [  3:  3](SR/W) Enable PCI enhanced allocation.
4360 
4361                                                                  0 = Addresses are discovered using standard BARs, however while the BARs are
4362                                                                  writable the value is ignored.  PCCPF_XXX_EA_ENTRY() still indicates the BARs
4363                                                                  but software will not read them as PCCPF_XXX_EA_CAP_HDR is not linked into the
4364                                                                  capabilities list (see PCCPF_XXX_E_CAP_HDR[NCP], PCCPF_XXX_MSIX_CAP_HDR[NCP]).
4365 
4366                                                                  1 = Addresses are discovered using enhanced allocation and PCCPF_XXX_EA_ENTRY().
4367                                                                  Standard BARs are read-only zero (PCCPF_XXX_BAR0L, PCCPF_XXX_BAR0U,
4368                                                                  PCCPF_XXX_BAR2L, PCCPF_XXX_BAR2U, PCCPF_XXX_BAR4L, PCCPF_XXX_BAR4U,
4369                                                                  PCCPF_XXX_SRIOV_BAR0L, PCCPF_XXX_SRIOV_BAR0U, PCCPF_XXX_SRIOV_BAR2L,
4370                                                                  PCCPF_XXX_SRIOV_BAR2U, PCCPF_XXX_SRIOV_BAR4L, PCCPF_XXX_SRIOV_BAR4U). */
4371         uint32_t bcst_rsp              : 1;  /**< [  2:  2](SR/W) Reserved, must be 0.
4372                                                                  Internal:
4373                                                                  Reserved for future use - Enable this PCC
4374                                                                  instance as the responder to PCC broadcast reads/writes. */
4375         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4376                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4377         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4378                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4379                                                                  address translation.
4380                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4381                                                                  interrupt delivery will bypass the SMMU. */
4382 #else /* Word 0 - Little Endian */
4383         uint32_t msix_phys             : 1;  /**< [  0:  0](SR/W) MSI-X interrupts are physical.
4384                                                                  0 = MSI-X interrupt vector addresses are standard virtual addresses and subject to SMMU
4385                                                                  address translation.
4386                                                                  1 = MSI-X interrupt vector addresses are considered physical addresses and PCC MSI-X
4387                                                                  interrupt delivery will bypass the SMMU. */
4388         uint32_t msix_sec              : 1;  /**< [  1:  1](SR/W) All MSI-X interrupts are secure. This is equivelent to setting the per-vector secure bit
4389                                                                  (e.g. GTI_MSIX_VEC()_ADDR[SECVEC]) for all vectors in the block. */
4390         uint32_t bcst_rsp              : 1;  /**< [  2:  2](SR/W) Reserved, must be 0.
4391                                                                  Internal:
4392                                                                  Reserved for future use - Enable this PCC
4393                                                                  instance as the responder to PCC broadcast reads/writes. */
4394         uint32_t ea                    : 1;  /**< [  3:  3](SR/W) Enable PCI enhanced allocation.
4395 
4396                                                                  0 = Addresses are discovered using standard BARs, however while the BARs are
4397                                                                  writable the value is ignored.  PCCPF_XXX_EA_ENTRY() still indicates the BARs
4398                                                                  but software will not read them as PCCPF_XXX_EA_CAP_HDR is not linked into the
4399                                                                  capabilities list (see PCCPF_XXX_E_CAP_HDR[NCP], PCCPF_XXX_MSIX_CAP_HDR[NCP]).
4400 
4401                                                                  1 = Addresses are discovered using enhanced allocation and PCCPF_XXX_EA_ENTRY().
4402                                                                  Standard BARs are read-only zero (PCCPF_XXX_BAR0L, PCCPF_XXX_BAR0U,
4403                                                                  PCCPF_XXX_BAR2L, PCCPF_XXX_BAR2U, PCCPF_XXX_BAR4L, PCCPF_XXX_BAR4U,
4404                                                                  PCCPF_XXX_SRIOV_BAR0L, PCCPF_XXX_SRIOV_BAR0U, PCCPF_XXX_SRIOV_BAR2L,
4405                                                                  PCCPF_XXX_SRIOV_BAR2U, PCCPF_XXX_SRIOV_BAR4L, PCCPF_XXX_SRIOV_BAR4U). */
4406         uint32_t node                  : 2;  /**< [  5:  4](SR/W/H) Node number. */
4407         uint32_t reserved_6_15         : 10;
4408         uint32_t rid                   : 8;  /**< [ 23: 16](SR/W) Revision ID. R/W version of the value to be presented in PCCPF_XXX_REV[RID]. */
4409         uint32_t nxtfn_s               : 8;  /**< [ 31: 24](SR/W) For secure accesses, the value to be presented in PCCPF_XXX_(S)ARI_NXT[NXTFN] indicating
4410                                                                  the next valid function number for this device. Must be 0x0 for non-MRML PCC
4411                                                                  devices. */
4412 #endif /* Word 0 - End */
4413     } cn81xx;
4414     /* struct bdk_pccpf_xxx_vsec_sctl_cn81xx cn83xx; */
4415     /* struct bdk_pccpf_xxx_vsec_sctl_cn81xx cn88xxp2; */
4416 };
4417 typedef union bdk_pccpf_xxx_vsec_sctl bdk_pccpf_xxx_vsec_sctl_t;
4418 
4419 #define BDK_PCCPF_XXX_VSEC_SCTL BDK_PCCPF_XXX_VSEC_SCTL_FUNC()
4420 static inline uint64_t BDK_PCCPF_XXX_VSEC_SCTL_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SCTL_FUNC(void)4421 static inline uint64_t BDK_PCCPF_XXX_VSEC_SCTL_FUNC(void)
4422 {
4423     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4424         return 0x10c;
4425     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4426         return 0x10c;
4427     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4428         return 0x114;
4429     if (CAVIUM_IS_MODEL(CAVIUM_CN9XXX))
4430         return 0x10c;
4431     __bdk_csr_fatal("PCCPF_XXX_VSEC_SCTL", 0, 0, 0, 0, 0);
4432 }
4433 
4434 #define typedef_BDK_PCCPF_XXX_VSEC_SCTL bdk_pccpf_xxx_vsec_sctl_t
4435 #define bustype_BDK_PCCPF_XXX_VSEC_SCTL BDK_CSR_TYPE_PCCPF
4436 #define basename_BDK_PCCPF_XXX_VSEC_SCTL "PCCPF_XXX_VSEC_SCTL"
4437 #define busnum_BDK_PCCPF_XXX_VSEC_SCTL 0
4438 #define arguments_BDK_PCCPF_XXX_VSEC_SCTL -1,-1,-1,-1
4439 
4440 /**
4441  * Register (PCCPF) pccpf_xxx_vsec_sriov_bar0l
4442  *
4443  * PCC PF Vendor-Specific SR-IOV Address 0 Lower Register
4444  */
4445 union bdk_pccpf_xxx_vsec_sriov_bar0l
4446 {
4447     uint32_t u;
4448     struct bdk_pccpf_xxx_vsec_sriov_bar0l_s
4449     {
4450 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4451         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded SR-IOV BAR 0 base address; the reset value for
4452                                                                  PCCPF_XXX_SRIOV_BAR0L[LBAB].
4453 
4454                                                                  Internal:
4455                                                                  From PCC's tie__vfbar0_offset. */
4456         uint32_t reserved_0_15         : 16;
4457 #else /* Word 0 - Little Endian */
4458         uint32_t reserved_0_15         : 16;
4459         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded SR-IOV BAR 0 base address; the reset value for
4460                                                                  PCCPF_XXX_SRIOV_BAR0L[LBAB].
4461 
4462                                                                  Internal:
4463                                                                  From PCC's tie__vfbar0_offset. */
4464 #endif /* Word 0 - End */
4465     } s;
4466     /* struct bdk_pccpf_xxx_vsec_sriov_bar0l_s cn; */
4467 };
4468 typedef union bdk_pccpf_xxx_vsec_sriov_bar0l bdk_pccpf_xxx_vsec_sriov_bar0l_t;
4469 
4470 #define BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L_FUNC()
4471 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L_FUNC(void)4472 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L_FUNC(void)
4473 {
4474     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4475         return 0x128;
4476     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4477         return 0x128;
4478     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4479         return 0x130;
4480     __bdk_csr_fatal("PCCPF_XXX_VSEC_SRIOV_BAR0L", 0, 0, 0, 0, 0);
4481 }
4482 
4483 #define typedef_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L bdk_pccpf_xxx_vsec_sriov_bar0l_t
4484 #define bustype_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L BDK_CSR_TYPE_PCCPF
4485 #define basename_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L "PCCPF_XXX_VSEC_SRIOV_BAR0L"
4486 #define busnum_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L 0
4487 #define arguments_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0L -1,-1,-1,-1
4488 
4489 /**
4490  * Register (PCCPF) pccpf_xxx_vsec_sriov_bar0u
4491  *
4492  * PCC PF Vendor-Specific SR-IOV Address 0 Upper Register
4493  */
4494 union bdk_pccpf_xxx_vsec_sriov_bar0u
4495 {
4496     uint32_t u;
4497     struct bdk_pccpf_xxx_vsec_sriov_bar0u_s
4498     {
4499 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4500         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded SR-IOV BAR 0 base address; the reset value for
4501                                                                  PCCPF_XXX_SRIOV_BAR0U[UBAB].
4502 
4503                                                                  Internal:
4504                                                                  From PCC's tie__vfbar0_offset. */
4505 #else /* Word 0 - Little Endian */
4506         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded SR-IOV BAR 0 base address; the reset value for
4507                                                                  PCCPF_XXX_SRIOV_BAR0U[UBAB].
4508 
4509                                                                  Internal:
4510                                                                  From PCC's tie__vfbar0_offset. */
4511 #endif /* Word 0 - End */
4512     } s;
4513     /* struct bdk_pccpf_xxx_vsec_sriov_bar0u_s cn; */
4514 };
4515 typedef union bdk_pccpf_xxx_vsec_sriov_bar0u bdk_pccpf_xxx_vsec_sriov_bar0u_t;
4516 
4517 #define BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U_FUNC()
4518 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U_FUNC(void)4519 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U_FUNC(void)
4520 {
4521     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4522         return 0x12c;
4523     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4524         return 0x12c;
4525     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4526         return 0x134;
4527     __bdk_csr_fatal("PCCPF_XXX_VSEC_SRIOV_BAR0U", 0, 0, 0, 0, 0);
4528 }
4529 
4530 #define typedef_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U bdk_pccpf_xxx_vsec_sriov_bar0u_t
4531 #define bustype_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U BDK_CSR_TYPE_PCCPF
4532 #define basename_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U "PCCPF_XXX_VSEC_SRIOV_BAR0U"
4533 #define busnum_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U 0
4534 #define arguments_BDK_PCCPF_XXX_VSEC_SRIOV_BAR0U -1,-1,-1,-1
4535 
4536 /**
4537  * Register (PCCPF) pccpf_xxx_vsec_sriov_bar2l
4538  *
4539  * PCC PF Vendor-Specific SR-IOV Address 2 Lower Register
4540  */
4541 union bdk_pccpf_xxx_vsec_sriov_bar2l
4542 {
4543     uint32_t u;
4544     struct bdk_pccpf_xxx_vsec_sriov_bar2l_s
4545     {
4546 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4547         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded SR-IOV BAR 2 base address; the reset value for
4548                                                                  PCCPF_XXX_SRIOV_BAR2L[LBAB].
4549 
4550                                                                  Internal:
4551                                                                  From PCC's tie__vfbar2_offset. */
4552         uint32_t reserved_0_15         : 16;
4553 #else /* Word 0 - Little Endian */
4554         uint32_t reserved_0_15         : 16;
4555         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded SR-IOV BAR 2 base address; the reset value for
4556                                                                  PCCPF_XXX_SRIOV_BAR2L[LBAB].
4557 
4558                                                                  Internal:
4559                                                                  From PCC's tie__vfbar2_offset. */
4560 #endif /* Word 0 - End */
4561     } s;
4562     /* struct bdk_pccpf_xxx_vsec_sriov_bar2l_s cn; */
4563 };
4564 typedef union bdk_pccpf_xxx_vsec_sriov_bar2l bdk_pccpf_xxx_vsec_sriov_bar2l_t;
4565 
4566 #define BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L_FUNC()
4567 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L_FUNC(void)4568 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L_FUNC(void)
4569 {
4570     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4571         return 0x130;
4572     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4573         return 0x130;
4574     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4575         return 0x138;
4576     __bdk_csr_fatal("PCCPF_XXX_VSEC_SRIOV_BAR2L", 0, 0, 0, 0, 0);
4577 }
4578 
4579 #define typedef_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L bdk_pccpf_xxx_vsec_sriov_bar2l_t
4580 #define bustype_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L BDK_CSR_TYPE_PCCPF
4581 #define basename_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L "PCCPF_XXX_VSEC_SRIOV_BAR2L"
4582 #define busnum_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L 0
4583 #define arguments_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2L -1,-1,-1,-1
4584 
4585 /**
4586  * Register (PCCPF) pccpf_xxx_vsec_sriov_bar2u
4587  *
4588  * PCC PF Vendor-Specific SR-IOV Address 2 Upper Register
4589  */
4590 union bdk_pccpf_xxx_vsec_sriov_bar2u
4591 {
4592     uint32_t u;
4593     struct bdk_pccpf_xxx_vsec_sriov_bar2u_s
4594     {
4595 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4596         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded SR-IOV BAR 2 base address; the reset value for
4597                                                                  PCCPF_XXX_SRIOV_BAR2U[UBAB].
4598 
4599                                                                  Internal:
4600                                                                  From PCC's tie__vfbar2_offset. */
4601 #else /* Word 0 - Little Endian */
4602         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded SR-IOV BAR 2 base address; the reset value for
4603                                                                  PCCPF_XXX_SRIOV_BAR2U[UBAB].
4604 
4605                                                                  Internal:
4606                                                                  From PCC's tie__vfbar2_offset. */
4607 #endif /* Word 0 - End */
4608     } s;
4609     /* struct bdk_pccpf_xxx_vsec_sriov_bar2u_s cn; */
4610 };
4611 typedef union bdk_pccpf_xxx_vsec_sriov_bar2u bdk_pccpf_xxx_vsec_sriov_bar2u_t;
4612 
4613 #define BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U_FUNC()
4614 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U_FUNC(void)4615 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U_FUNC(void)
4616 {
4617     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4618         return 0x134;
4619     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4620         return 0x134;
4621     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4622         return 0x13c;
4623     __bdk_csr_fatal("PCCPF_XXX_VSEC_SRIOV_BAR2U", 0, 0, 0, 0, 0);
4624 }
4625 
4626 #define typedef_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U bdk_pccpf_xxx_vsec_sriov_bar2u_t
4627 #define bustype_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U BDK_CSR_TYPE_PCCPF
4628 #define basename_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U "PCCPF_XXX_VSEC_SRIOV_BAR2U"
4629 #define busnum_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U 0
4630 #define arguments_BDK_PCCPF_XXX_VSEC_SRIOV_BAR2U -1,-1,-1,-1
4631 
4632 /**
4633  * Register (PCCPF) pccpf_xxx_vsec_sriov_bar4l
4634  *
4635  * PCC PF Vendor-Specific SR-IOV Address 4 Lower Register
4636  */
4637 union bdk_pccpf_xxx_vsec_sriov_bar4l
4638 {
4639     uint32_t u;
4640     struct bdk_pccpf_xxx_vsec_sriov_bar4l_s
4641     {
4642 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4643         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded SR-IOV BAR 4 base address; the reset value for
4644                                                                  PCCPF_XXX_SRIOV_BAR4L[LBAB].
4645 
4646                                                                  Internal:
4647                                                                  From PCC's tie__vfbar4_offset. */
4648         uint32_t reserved_0_15         : 16;
4649 #else /* Word 0 - Little Endian */
4650         uint32_t reserved_0_15         : 16;
4651         uint32_t lbab                  : 16; /**< [ 31: 16](RO) Lower bits of the hard-coded SR-IOV BAR 4 base address; the reset value for
4652                                                                  PCCPF_XXX_SRIOV_BAR4L[LBAB].
4653 
4654                                                                  Internal:
4655                                                                  From PCC's tie__vfbar4_offset. */
4656 #endif /* Word 0 - End */
4657     } s;
4658     /* struct bdk_pccpf_xxx_vsec_sriov_bar4l_s cn; */
4659 };
4660 typedef union bdk_pccpf_xxx_vsec_sriov_bar4l bdk_pccpf_xxx_vsec_sriov_bar4l_t;
4661 
4662 #define BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L_FUNC()
4663 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L_FUNC(void)4664 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L_FUNC(void)
4665 {
4666     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4667         return 0x138;
4668     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4669         return 0x138;
4670     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4671         return 0x140;
4672     __bdk_csr_fatal("PCCPF_XXX_VSEC_SRIOV_BAR4L", 0, 0, 0, 0, 0);
4673 }
4674 
4675 #define typedef_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L bdk_pccpf_xxx_vsec_sriov_bar4l_t
4676 #define bustype_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L BDK_CSR_TYPE_PCCPF
4677 #define basename_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L "PCCPF_XXX_VSEC_SRIOV_BAR4L"
4678 #define busnum_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L 0
4679 #define arguments_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4L -1,-1,-1,-1
4680 
4681 /**
4682  * Register (PCCPF) pccpf_xxx_vsec_sriov_bar4u
4683  *
4684  * PCC PF Vendor-Specific SR-IOV Address 4 Upper Register
4685  */
4686 union bdk_pccpf_xxx_vsec_sriov_bar4u
4687 {
4688     uint32_t u;
4689     struct bdk_pccpf_xxx_vsec_sriov_bar4u_s
4690     {
4691 #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */
4692         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded SR-IOV BAR 4 base address; the reset value for
4693                                                                  PCCPF_XXX_SRIOV_BAR4U[UBAB].
4694 
4695                                                                  Internal:
4696                                                                  From PCC's tie__vfbar4_offset. */
4697 #else /* Word 0 - Little Endian */
4698         uint32_t ubab                  : 32; /**< [ 31:  0](RO) Upper bits of the hard-coded SR-IOV BAR 4 base address; the reset value for
4699                                                                  PCCPF_XXX_SRIOV_BAR4U[UBAB].
4700 
4701                                                                  Internal:
4702                                                                  From PCC's tie__vfbar4_offset. */
4703 #endif /* Word 0 - End */
4704     } s;
4705     /* struct bdk_pccpf_xxx_vsec_sriov_bar4u_s cn; */
4706 };
4707 typedef union bdk_pccpf_xxx_vsec_sriov_bar4u bdk_pccpf_xxx_vsec_sriov_bar4u_t;
4708 
4709 #define BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U_FUNC()
4710 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U_FUNC(void) __attribute__ ((pure, always_inline));
BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U_FUNC(void)4711 static inline uint64_t BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U_FUNC(void)
4712 {
4713     if (CAVIUM_IS_MODEL(CAVIUM_CN81XX))
4714         return 0x13c;
4715     if (CAVIUM_IS_MODEL(CAVIUM_CN83XX))
4716         return 0x13c;
4717     if (CAVIUM_IS_MODEL(CAVIUM_CN88XX))
4718         return 0x144;
4719     __bdk_csr_fatal("PCCPF_XXX_VSEC_SRIOV_BAR4U", 0, 0, 0, 0, 0);
4720 }
4721 
4722 #define typedef_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U bdk_pccpf_xxx_vsec_sriov_bar4u_t
4723 #define bustype_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U BDK_CSR_TYPE_PCCPF
4724 #define basename_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U "PCCPF_XXX_VSEC_SRIOV_BAR4U"
4725 #define busnum_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U 0
4726 #define arguments_BDK_PCCPF_XXX_VSEC_SRIOV_BAR4U -1,-1,-1,-1
4727 
4728 #endif /* __BDK_CSRS_PCCPF_H__ */
4729