| 1 | #ifndef __BDK_CSRS_L2C_H__ |
| 2 | #define __BDK_CSRS_L2C_H__ |
| 3 | /* This file is auto-generated. Do not edit */ |
| 4 | |
| 5 | /***********************license start*************** |
| 6 | * Copyright (c) 2003-2017 Cavium Inc. ([email protected]). All rights |
| 7 | * reserved. |
| 8 | * |
| 9 | * |
| 10 | * Redistribution and use in source and binary forms, with or without |
| 11 | * modification, are permitted provided that the following conditions are |
| 12 | * met: |
| 13 | * |
| 14 | * * Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions and the following disclaimer. |
| 16 | * |
| 17 | * * Redistributions in binary form must reproduce the above |
| 18 | * copyright notice, this list of conditions and the following |
| 19 | * disclaimer in the documentation and/or other materials provided |
| 20 | * with the distribution. |
| 21 | |
| 22 | * * Neither the name of Cavium Inc. nor the names of |
| 23 | * its contributors may be used to endorse or promote products |
| 24 | * derived from this software without specific prior written |
| 25 | * permission. |
| 26 | |
| 27 | * This Software, including technical data, may be subject to U.S. export control |
| 28 | * laws, including the U.S. Export Administration Act and its associated |
| 29 | * regulations, and may be subject to export or import regulations in other |
| 30 | * countries. |
| 31 | |
| 32 | * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
| 33 | * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS OR |
| 34 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
| 35 | * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR |
| 36 | * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM |
| 37 | * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, |
| 38 | * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF |
| 39 | * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR |
| 40 | * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR |
| 41 | * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. |
| 42 | ***********************license end**************************************/ |
| 43 | |
| 44 | |
| 45 | /** |
| 46 | * @file |
| 47 | * |
| 48 | * Configuration and status register (CSR) address and type definitions for |
| 49 | * Cavium L2C. |
| 50 | * |
| 51 | * This file is auto generated. Do not edit. |
| 52 | * |
| 53 | */ |
| 54 | |
| 55 | /** |
| 56 | * Enumeration inv_cmd_e |
| 57 | * |
| 58 | * INTERNAL: INV Command Enumeration |
| 59 | * |
| 60 | * Enumerates the different INV command encodings. |
| 61 | */ |
| 62 | #define BDK_INV_CMD_E_ALLEX (0xc) |
| 63 | #define BDK_INV_CMD_E_ASIDE1 (0xd) |
| 64 | #define BDK_INV_CMD_E_GBLSYNC (0xf) |
| 65 | #define BDK_INV_CMD_E_IALLU (9) |
| 66 | #define BDK_INV_CMD_E_INV (8) |
| 67 | #define BDK_INV_CMD_E_IPAS2E1 (7) |
| 68 | #define BDK_INV_CMD_E_IVAU (4) |
| 69 | #define BDK_INV_CMD_E_NOP (0) |
| 70 | #define BDK_INV_CMD_E_SEV (0xe) |
| 71 | #define BDK_INV_CMD_E_VAAE1 (6) |
| 72 | #define BDK_INV_CMD_E_VAEX (5) |
| 73 | #define BDK_INV_CMD_E_VMALLE1 (0xa) |
| 74 | #define BDK_INV_CMD_E_VMALLS12 (0xb) |
| 75 | |
| 76 | /** |
| 77 | * Enumeration ioc_cmd_e |
| 78 | * |
| 79 | * INTERNAL: IOC Command Enumeration |
| 80 | * |
| 81 | * Enumerates the different IOC command encodings. |
| 82 | */ |
| 83 | #define BDK_IOC_CMD_E_ADDR (6) |
| 84 | #define BDK_IOC_CMD_E_IAADD (0xc) |
| 85 | #define BDK_IOC_CMD_E_IACAS (0xa) |
| 86 | #define BDK_IOC_CMD_E_IACLR (0xd) |
| 87 | #define BDK_IOC_CMD_E_IASET (0xe) |
| 88 | #define BDK_IOC_CMD_E_IASWP (0xb) |
| 89 | #define BDK_IOC_CMD_E_IDLE (0) |
| 90 | #define BDK_IOC_CMD_E_LMTST (3) |
| 91 | #define BDK_IOC_CMD_E_LOAD (2) |
| 92 | #define BDK_IOC_CMD_E_SLILD (8) |
| 93 | #define BDK_IOC_CMD_E_SLIST (7) |
| 94 | #define BDK_IOC_CMD_E_STORE (1) |
| 95 | #define BDK_IOC_CMD_E_STOREP (9) |
| 96 | |
| 97 | /** |
| 98 | * Enumeration ior_cmd_e |
| 99 | * |
| 100 | * INTERNAL: IOR Command Enumeration |
| 101 | * |
| 102 | * Enumerates the different IOR command encodings. |
| 103 | */ |
| 104 | #define BDK_IOR_CMD_E_DATA (1) |
| 105 | #define BDK_IOR_CMD_E_IDLE (0) |
| 106 | #define BDK_IOR_CMD_E_SLIRSP (3) |
| 107 | |
| 108 | /** |
| 109 | * Enumeration l2c_bar_e |
| 110 | * |
| 111 | * L2C Base Address Register Enumeration |
| 112 | * Enumerates the base address registers. |
| 113 | */ |
| 114 | #define BDK_L2C_BAR_E_L2C_PF_BAR0 (0x87e080800000ll) |
| 115 | #define BDK_L2C_BAR_E_L2C_PF_BAR0_SIZE 0x800000ull |
| 116 | |
| 117 | /** |
| 118 | * Enumeration l2c_dat_errprio_e |
| 119 | * |
| 120 | * L2C Quad Error Priority Enumeration |
| 121 | * Enumerates the different quad error priorities. |
| 122 | */ |
| 123 | #define BDK_L2C_DAT_ERRPRIO_E_FBFDBE (4) |
| 124 | #define BDK_L2C_DAT_ERRPRIO_E_FBFSBE (1) |
| 125 | #define BDK_L2C_DAT_ERRPRIO_E_L2DDBE (6) |
| 126 | #define BDK_L2C_DAT_ERRPRIO_E_L2DSBE (3) |
| 127 | #define BDK_L2C_DAT_ERRPRIO_E_NBE (0) |
| 128 | #define BDK_L2C_DAT_ERRPRIO_E_SBFDBE (5) |
| 129 | #define BDK_L2C_DAT_ERRPRIO_E_SBFSBE (2) |
| 130 | |
| 131 | /** |
| 132 | * Enumeration l2c_tad_prf_sel_e |
| 133 | * |
| 134 | * L2C TAD Performance Counter Select Enumeration |
| 135 | * Enumerates the different TAD performance counter selects. |
| 136 | */ |
| 137 | #define BDK_L2C_TAD_PRF_SEL_E_L2T_HIT (1) |
| 138 | #define BDK_L2C_TAD_PRF_SEL_E_L2T_MISS (2) |
| 139 | #define BDK_L2C_TAD_PRF_SEL_E_L2T_NOALLOC (3) |
| 140 | #define BDK_L2C_TAD_PRF_SEL_E_L2_OPEN_OCI (0x48) |
| 141 | #define BDK_L2C_TAD_PRF_SEL_E_L2_RTG_VIC (0x44) |
| 142 | #define BDK_L2C_TAD_PRF_SEL_E_L2_VIC (4) |
| 143 | #define BDK_L2C_TAD_PRF_SEL_E_LFB_OCC (7) |
| 144 | #define BDK_L2C_TAD_PRF_SEL_E_LMC_WR (0x4e) |
| 145 | #define BDK_L2C_TAD_PRF_SEL_E_LMC_WR_SBLKDTY (0x4f) |
| 146 | #define BDK_L2C_TAD_PRF_SEL_E_LOOKUP (0x40) |
| 147 | #define BDK_L2C_TAD_PRF_SEL_E_LOOKUP_ALL (0x44) |
| 148 | #define BDK_L2C_TAD_PRF_SEL_E_LOOKUP_MIB (0x43) |
| 149 | #define BDK_L2C_TAD_PRF_SEL_E_LOOKUP_XMC_LCL (0x41) |
| 150 | #define BDK_L2C_TAD_PRF_SEL_E_LOOKUP_XMC_RMT (0x42) |
| 151 | #define BDK_L2C_TAD_PRF_SEL_E_NONE (0) |
| 152 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_FLDX_TAG_E_DAT (0x6d) |
| 153 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_FLDX_TAG_E_NODAT (0x6c) |
| 154 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_FWD_CYC_HIT (0x69) |
| 155 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_FWD_RACE (0x6a) |
| 156 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_HAKS (0x6b) |
| 157 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RLDD (0x6e) |
| 158 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RLDD_PEMD (0x6f) |
| 159 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RRQ_DAT_CNT (0x70) |
| 160 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RRQ_DAT_DMASK (0x71) |
| 161 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RSP_DAT_CNT (0x72) |
| 162 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RSP_DAT_DMASK (0x73) |
| 163 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RSP_DAT_VICD_CNT (0x74) |
| 164 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RSP_DAT_VICD_DMASK (0x75) |
| 165 | #define BDK_L2C_TAD_PRF_SEL_E_OCI_RTG_WAIT (0x68) |
| 166 | #define BDK_L2C_TAD_PRF_SEL_E_OPEN_CCPI (0xa) |
| 167 | #define BDK_L2C_TAD_PRF_SEL_E_QDX_BNKS(a) (0x82 + 0x10 * (a)) |
| 168 | #define BDK_L2C_TAD_PRF_SEL_E_QDX_IDX(a) (0x80 + 0x10 * (a)) |
| 169 | #define BDK_L2C_TAD_PRF_SEL_E_QDX_RDAT(a) (0x81 + 0x10 * (a)) |
| 170 | #define BDK_L2C_TAD_PRF_SEL_E_QDX_WDAT(a) (0x83 + 0x10 * (a)) |
| 171 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_ALC (0x5d) |
| 172 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_ALC_EVICT (0x76) |
| 173 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_ALC_HIT (0x5e) |
| 174 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_ALC_HITWB (0x5f) |
| 175 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_ALC_VIC (0x77) |
| 176 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_HIT (0x41) |
| 177 | #define BDK_L2C_TAD_PRF_SEL_E_RTG_MISS (0x42) |
| 178 | #define BDK_L2C_TAD_PRF_SEL_E_SC_FAIL (5) |
| 179 | #define BDK_L2C_TAD_PRF_SEL_E_SC_PASS (6) |
| 180 | #define BDK_L2C_TAD_PRF_SEL_E_STC_LCL (0x64) |
| 181 | #define BDK_L2C_TAD_PRF_SEL_E_STC_LCL_FAIL (0x65) |
| 182 | #define BDK_L2C_TAD_PRF_SEL_E_STC_RMT (0x62) |
| 183 | #define BDK_L2C_TAD_PRF_SEL_E_STC_RMT_FAIL (0x63) |
| 184 | #define BDK_L2C_TAD_PRF_SEL_E_STC_TOTAL (0x60) |
| 185 | #define BDK_L2C_TAD_PRF_SEL_E_STC_TOTAL_FAIL (0x61) |
| 186 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_HIT (0x48) |
| 187 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_LCL_CLNVIC (0x59) |
| 188 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_LCL_DTYVIC (0x5a) |
| 189 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_LCL_EVICT (0x58) |
| 190 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_MISS (0x49) |
| 191 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_NALC (0x4a) |
| 192 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_RMT_EVICT (0x5b) |
| 193 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_RMT_VIC (0x5c) |
| 194 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_RTG_HIT (0x50) |
| 195 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_RTG_HITE (0x51) |
| 196 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_RTG_HITS (0x52) |
| 197 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_ALC_RTG_MISS (0x53) |
| 198 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_NALC_HIT (0x4b) |
| 199 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_NALC_MISS (0x4c) |
| 200 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_NALC_RTG_HIT (0x54) |
| 201 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_NALC_RTG_HITE (0x56) |
| 202 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_NALC_RTG_HITS (0x57) |
| 203 | #define BDK_L2C_TAD_PRF_SEL_E_TAG_NALC_RTG_MISS (0x55) |
| 204 | #define BDK_L2C_TAD_PRF_SEL_E_WAIT_LFB (8) |
| 205 | #define BDK_L2C_TAD_PRF_SEL_E_WAIT_VAB (9) |
| 206 | |
| 207 | /** |
| 208 | * Enumeration l2c_tag_errprio_e |
| 209 | * |
| 210 | * L2C Tag Error Priority Enumeration |
| 211 | * Enumerates the different TAG error priorities. |
| 212 | */ |
| 213 | #define BDK_L2C_TAG_ERRPRIO_E_DBE (3) |
| 214 | #define BDK_L2C_TAG_ERRPRIO_E_NBE (0) |
| 215 | #define BDK_L2C_TAG_ERRPRIO_E_NOWAY (1) |
| 216 | #define BDK_L2C_TAG_ERRPRIO_E_SBE (2) |
| 217 | |
| 218 | /** |
| 219 | * Enumeration oci_ireq_cmd_e |
| 220 | * |
| 221 | * INTERNAL: OCI IREQ Command Enumeration |
| 222 | */ |
| 223 | #define BDK_OCI_IREQ_CMD_E_IAADD (0x10) |
| 224 | #define BDK_OCI_IREQ_CMD_E_IACAS (0x15) |
| 225 | #define BDK_OCI_IREQ_CMD_E_IACLR (0x12) |
| 226 | #define BDK_OCI_IREQ_CMD_E_IASET (0x13) |
| 227 | #define BDK_OCI_IREQ_CMD_E_IASWP (0x14) |
| 228 | #define BDK_OCI_IREQ_CMD_E_IDLE (0x1f) |
| 229 | #define BDK_OCI_IREQ_CMD_E_IOBADDR (6) |
| 230 | #define BDK_OCI_IREQ_CMD_E_IOBADDRA (7) |
| 231 | #define BDK_OCI_IREQ_CMD_E_IOBLD (0) |
| 232 | #define BDK_OCI_IREQ_CMD_E_IOBST (2) |
| 233 | #define BDK_OCI_IREQ_CMD_E_IOBSTA (3) |
| 234 | #define BDK_OCI_IREQ_CMD_E_IOBSTP (4) |
| 235 | #define BDK_OCI_IREQ_CMD_E_IOBSTPA (5) |
| 236 | #define BDK_OCI_IREQ_CMD_E_LMTST (8) |
| 237 | #define BDK_OCI_IREQ_CMD_E_LMTSTA (9) |
| 238 | #define BDK_OCI_IREQ_CMD_E_SLILD (0x1c) |
| 239 | #define BDK_OCI_IREQ_CMD_E_SLIST (0x1d) |
| 240 | |
| 241 | /** |
| 242 | * Enumeration oci_irsp_cmd_e |
| 243 | * |
| 244 | * INTERNAL: OCI IRSP Command Enumeration |
| 245 | */ |
| 246 | #define BDK_OCI_IRSP_CMD_E_IDLE (0x1f) |
| 247 | #define BDK_OCI_IRSP_CMD_E_IOBACK (1) |
| 248 | #define BDK_OCI_IRSP_CMD_E_IOBRSP (0) |
| 249 | #define BDK_OCI_IRSP_CMD_E_SLIRSP (2) |
| 250 | |
| 251 | /** |
| 252 | * Enumeration oci_mfwd_cmd_e |
| 253 | * |
| 254 | * INTERNAL: OCI MFWD Command Enumeration |
| 255 | */ |
| 256 | #define BDK_OCI_MFWD_CMD_E_FEVX_EH (0xb) |
| 257 | #define BDK_OCI_MFWD_CMD_E_FEVX_OH (0xc) |
| 258 | #define BDK_OCI_MFWD_CMD_E_FLDRO_E (0) |
| 259 | #define BDK_OCI_MFWD_CMD_E_FLDRO_O (1) |
| 260 | #define BDK_OCI_MFWD_CMD_E_FLDRS_E (2) |
| 261 | #define BDK_OCI_MFWD_CMD_E_FLDRS_EH (4) |
| 262 | #define BDK_OCI_MFWD_CMD_E_FLDRS_O (3) |
| 263 | #define BDK_OCI_MFWD_CMD_E_FLDRS_OH (5) |
| 264 | #define BDK_OCI_MFWD_CMD_E_FLDT_E (6) |
| 265 | #define BDK_OCI_MFWD_CMD_E_FLDX_E (7) |
| 266 | #define BDK_OCI_MFWD_CMD_E_FLDX_EH (9) |
| 267 | #define BDK_OCI_MFWD_CMD_E_FLDX_O (8) |
| 268 | #define BDK_OCI_MFWD_CMD_E_FLDX_OH (0xa) |
| 269 | #define BDK_OCI_MFWD_CMD_E_IDLE (0x1f) |
| 270 | #define BDK_OCI_MFWD_CMD_E_SINV (0xd) |
| 271 | #define BDK_OCI_MFWD_CMD_E_SINV_H (0xe) |
| 272 | |
| 273 | /** |
| 274 | * Enumeration oci_mreq_cmd_e |
| 275 | * |
| 276 | * INTERNAL: OCI MREQ Command Enumeration |
| 277 | */ |
| 278 | #define BDK_OCI_MREQ_CMD_E_GINV (0x14) |
| 279 | #define BDK_OCI_MREQ_CMD_E_GSYNC (0x18) |
| 280 | #define BDK_OCI_MREQ_CMD_E_IDLE (0x1f) |
| 281 | #define BDK_OCI_MREQ_CMD_E_RADD (0xd) |
| 282 | #define BDK_OCI_MREQ_CMD_E_RC2D_O (6) |
| 283 | #define BDK_OCI_MREQ_CMD_E_RC2D_S (7) |
| 284 | #define BDK_OCI_MREQ_CMD_E_RCAS (0x13) |
| 285 | #define BDK_OCI_MREQ_CMD_E_RCAS_O (0x15) |
| 286 | #define BDK_OCI_MREQ_CMD_E_RCAS_S (0x16) |
| 287 | #define BDK_OCI_MREQ_CMD_E_RCLR (0x12) |
| 288 | #define BDK_OCI_MREQ_CMD_E_RDEC (0xf) |
| 289 | #define BDK_OCI_MREQ_CMD_E_REOR (0xb) |
| 290 | #define BDK_OCI_MREQ_CMD_E_RINC (0xe) |
| 291 | #define BDK_OCI_MREQ_CMD_E_RLDD (0) |
| 292 | #define BDK_OCI_MREQ_CMD_E_RLDI (1) |
| 293 | #define BDK_OCI_MREQ_CMD_E_RLDT (2) |
| 294 | #define BDK_OCI_MREQ_CMD_E_RLDWB (4) |
| 295 | #define BDK_OCI_MREQ_CMD_E_RLDX (5) |
| 296 | #define BDK_OCI_MREQ_CMD_E_RLDY (3) |
| 297 | #define BDK_OCI_MREQ_CMD_E_RSET (0x11) |
| 298 | #define BDK_OCI_MREQ_CMD_E_RSMAX (0x1b) |
| 299 | #define BDK_OCI_MREQ_CMD_E_RSMIN (0x1c) |
| 300 | #define BDK_OCI_MREQ_CMD_E_RSTC (0x17) |
| 301 | #define BDK_OCI_MREQ_CMD_E_RSTC_O (0x19) |
| 302 | #define BDK_OCI_MREQ_CMD_E_RSTC_S (0x1a) |
| 303 | #define BDK_OCI_MREQ_CMD_E_RSTP (0xa) |
| 304 | #define BDK_OCI_MREQ_CMD_E_RSTT (8) |
| 305 | #define BDK_OCI_MREQ_CMD_E_RSTY (9) |
| 306 | #define BDK_OCI_MREQ_CMD_E_RSWP (0x10) |
| 307 | #define BDK_OCI_MREQ_CMD_E_RUMAX (0x1d) |
| 308 | #define BDK_OCI_MREQ_CMD_E_RUMIN (0x1e) |
| 309 | |
| 310 | /** |
| 311 | * Enumeration oci_mrsp_cmd_e |
| 312 | * |
| 313 | * INTERNAL: OCI MRSP Command Enumeration |
| 314 | */ |
| 315 | #define BDK_OCI_MRSP_CMD_E_GSDN (0x18) |
| 316 | #define BDK_OCI_MRSP_CMD_E_HAKD (4) |
| 317 | #define BDK_OCI_MRSP_CMD_E_HAKI (6) |
| 318 | #define BDK_OCI_MRSP_CMD_E_HAKN_S (5) |
| 319 | #define BDK_OCI_MRSP_CMD_E_HAKS (7) |
| 320 | #define BDK_OCI_MRSP_CMD_E_HAKV (8) |
| 321 | #define BDK_OCI_MRSP_CMD_E_IDLE (0x1f) |
| 322 | #define BDK_OCI_MRSP_CMD_E_P2DF (0xd) |
| 323 | #define BDK_OCI_MRSP_CMD_E_PACK (0xc) |
| 324 | #define BDK_OCI_MRSP_CMD_E_PATM (0xb) |
| 325 | #define BDK_OCI_MRSP_CMD_E_PEMD (0xa) |
| 326 | #define BDK_OCI_MRSP_CMD_E_PSHA (9) |
| 327 | #define BDK_OCI_MRSP_CMD_E_VICC (1) |
| 328 | #define BDK_OCI_MRSP_CMD_E_VICD (0) |
| 329 | #define BDK_OCI_MRSP_CMD_E_VICDHI (3) |
| 330 | #define BDK_OCI_MRSP_CMD_E_VICS (2) |
| 331 | |
| 332 | /** |
| 333 | * Enumeration rsc_cmd_e |
| 334 | * |
| 335 | * INTERNAL: RSC Command Enumeration |
| 336 | * |
| 337 | * Enumerates the different RSC command encodings. |
| 338 | */ |
| 339 | #define BDK_RSC_CMD_E_FLDN (3) |
| 340 | #define BDK_RSC_CMD_E_GSDN (2) |
| 341 | #define BDK_RSC_CMD_E_IACK (5) |
| 342 | #define BDK_RSC_CMD_E_IFDN (1) |
| 343 | #define BDK_RSC_CMD_E_NOP (0) |
| 344 | #define BDK_RSC_CMD_E_SCDN (6) |
| 345 | #define BDK_RSC_CMD_E_SCFL (7) |
| 346 | #define BDK_RSC_CMD_E_STDN (4) |
| 347 | |
| 348 | /** |
| 349 | * Enumeration xmc_cmd_e |
| 350 | * |
| 351 | * INTERNAL: XMC Command Enumeration |
| 352 | * |
| 353 | * Enumerates the different XMC command encodings. |
| 354 | */ |
| 355 | #define BDK_XMC_CMD_E_AADD (0x28) |
| 356 | #define BDK_XMC_CMD_E_ACAS (0x26) |
| 357 | #define BDK_XMC_CMD_E_ACLR (0x29) |
| 358 | #define BDK_XMC_CMD_E_ADEC (0x25) |
| 359 | #define BDK_XMC_CMD_E_AEOR (0x2a) |
| 360 | #define BDK_XMC_CMD_E_AINC (0x24) |
| 361 | #define BDK_XMC_CMD_E_ALLEX (0x3c) |
| 362 | #define BDK_XMC_CMD_E_ASET (0x2b) |
| 363 | #define BDK_XMC_CMD_E_ASIDE1 (0x3d) |
| 364 | #define BDK_XMC_CMD_E_ASMAX (0x2c) |
| 365 | #define BDK_XMC_CMD_E_ASMIN (0x2d) |
| 366 | #define BDK_XMC_CMD_E_ASWP (0x27) |
| 367 | #define BDK_XMC_CMD_E_AUMAX (0x2e) |
| 368 | #define BDK_XMC_CMD_E_AUMIN (0x2f) |
| 369 | #define BDK_XMC_CMD_E_DWB (5) |
| 370 | #define BDK_XMC_CMD_E_GBLSYNC (0x3f) |
| 371 | #define BDK_XMC_CMD_E_IAADD (0x68) |
| 372 | #define BDK_XMC_CMD_E_IACAS (0x66) |
| 373 | #define BDK_XMC_CMD_E_IACLR (0x69) |
| 374 | #define BDK_XMC_CMD_E_IALLU (0x39) |
| 375 | #define BDK_XMC_CMD_E_IASET (0x6b) |
| 376 | #define BDK_XMC_CMD_E_IASWP (0x67) |
| 377 | #define BDK_XMC_CMD_E_INVL2 (0x1c) |
| 378 | #define BDK_XMC_CMD_E_IOBADDR (0x43) |
| 379 | #define BDK_XMC_CMD_E_IOBADDRA (0x53) |
| 380 | #define BDK_XMC_CMD_E_IOBLD (0x40) |
| 381 | #define BDK_XMC_CMD_E_IOBST (0x41) |
| 382 | #define BDK_XMC_CMD_E_IOBSTA (0x51) |
| 383 | #define BDK_XMC_CMD_E_IOBSTP (0x42) |
| 384 | #define BDK_XMC_CMD_E_IOBSTPA (0x52) |
| 385 | #define BDK_XMC_CMD_E_IPAS2E1 (0x37) |
| 386 | #define BDK_XMC_CMD_E_IVAU (0x34) |
| 387 | #define BDK_XMC_CMD_E_LCKL2 (0x1f) |
| 388 | #define BDK_XMC_CMD_E_LDD (8) |
| 389 | #define BDK_XMC_CMD_E_LDDT (0xc) |
| 390 | #define BDK_XMC_CMD_E_LDE (0xb) |
| 391 | #define BDK_XMC_CMD_E_LDI (2) |
| 392 | #define BDK_XMC_CMD_E_LDP (7) |
| 393 | #define BDK_XMC_CMD_E_LDT (1) |
| 394 | #define BDK_XMC_CMD_E_LDWB (0xd) |
| 395 | #define BDK_XMC_CMD_E_LDY (6) |
| 396 | #define BDK_XMC_CMD_E_LMTST (0x45) |
| 397 | #define BDK_XMC_CMD_E_LMTSTA (0x55) |
| 398 | #define BDK_XMC_CMD_E_LTGL2I (0x19) |
| 399 | #define BDK_XMC_CMD_E_NOP (0) |
| 400 | #define BDK_XMC_CMD_E_PL2 (3) |
| 401 | #define BDK_XMC_CMD_E_PL2T (0x16) |
| 402 | #define BDK_XMC_CMD_E_PS2 (0xa) |
| 403 | #define BDK_XMC_CMD_E_PS2T (0x17) |
| 404 | #define BDK_XMC_CMD_E_PSL1 (9) |
| 405 | #define BDK_XMC_CMD_E_RPL2 (4) |
| 406 | #define BDK_XMC_CMD_E_RSTP (0xf) |
| 407 | #define BDK_XMC_CMD_E_SEV (0x3e) |
| 408 | #define BDK_XMC_CMD_E_STC (0x13) |
| 409 | #define BDK_XMC_CMD_E_STF (0x10) |
| 410 | #define BDK_XMC_CMD_E_STFIL1 (0x14) |
| 411 | #define BDK_XMC_CMD_E_STGL2I (0x1a) |
| 412 | #define BDK_XMC_CMD_E_STP (0x12) |
| 413 | #define BDK_XMC_CMD_E_STT (0x11) |
| 414 | #define BDK_XMC_CMD_E_STTIL1 (0x15) |
| 415 | #define BDK_XMC_CMD_E_STY (0xe) |
| 416 | #define BDK_XMC_CMD_E_VAAE1 (0x36) |
| 417 | #define BDK_XMC_CMD_E_VAEX (0x35) |
| 418 | #define BDK_XMC_CMD_E_VMALLE1 (0x3a) |
| 419 | #define BDK_XMC_CMD_E_VMALLS12 (0x3b) |
| 420 | #define BDK_XMC_CMD_E_WBIL2 (0x1d) |
| 421 | #define BDK_XMC_CMD_E_WBIL2I (0x18) |
| 422 | #define BDK_XMC_CMD_E_WBL2 (0x1e) |
| 423 | #define BDK_XMC_CMD_E_WBL2I (0x1b) |
| 424 | |
| 425 | /** |
| 426 | * Register (RSL) l2c_asc_region#_attr |
| 427 | * |
| 428 | * L2C Address Space Control Region Attributes Registers |
| 429 | */ |
| 430 | union bdk_l2c_asc_regionx_attr |
| 431 | { |
| 432 | uint64_t u; |
| 433 | struct bdk_l2c_asc_regionx_attr_s |
| 434 | { |
| 435 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 436 | uint64_t reserved_2_63 : 62; |
| 437 | uint64_t s_en : 1; /**< [ 1: 1](R/W) Enables secure access to region. |
| 438 | Undefined if both [S_EN] and [NS_EN] are set for the same region. */ |
| 439 | uint64_t ns_en : 1; /**< [ 0: 0](R/W) Enables nonsecure access to region. |
| 440 | Undefined if both [S_EN] and [NS_EN] are set for the same region. |
| 441 | See also DFA_ASC_REGION()_ATTR[NS_EN]. */ |
| 442 | #else /* Word 0 - Little Endian */ |
| 443 | uint64_t ns_en : 1; /**< [ 0: 0](R/W) Enables nonsecure access to region. |
| 444 | Undefined if both [S_EN] and [NS_EN] are set for the same region. |
| 445 | See also DFA_ASC_REGION()_ATTR[NS_EN]. */ |
| 446 | uint64_t s_en : 1; /**< [ 1: 1](R/W) Enables secure access to region. |
| 447 | Undefined if both [S_EN] and [NS_EN] are set for the same region. */ |
| 448 | uint64_t reserved_2_63 : 62; |
| 449 | #endif /* Word 0 - End */ |
| 450 | } s; |
| 451 | struct bdk_l2c_asc_regionx_attr_cn81xx |
| 452 | { |
| 453 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 454 | uint64_t reserved_2_63 : 62; |
| 455 | uint64_t s_en : 1; /**< [ 1: 1](R/W) Enables secure access to region. |
| 456 | Undefined if both [S_EN] and [NS_EN] are set for the same region. */ |
| 457 | uint64_t ns_en : 1; /**< [ 0: 0](R/W) Enables nonsecure access to region. |
| 458 | Undefined if both [S_EN] and [NS_EN] are set for the same region. |
| 459 | |
| 460 | Internal: |
| 461 | See also DFA_ASC_REGION()_ATTR[NS_EN]. */ |
| 462 | #else /* Word 0 - Little Endian */ |
| 463 | uint64_t ns_en : 1; /**< [ 0: 0](R/W) Enables nonsecure access to region. |
| 464 | Undefined if both [S_EN] and [NS_EN] are set for the same region. |
| 465 | |
| 466 | Internal: |
| 467 | See also DFA_ASC_REGION()_ATTR[NS_EN]. */ |
| 468 | uint64_t s_en : 1; /**< [ 1: 1](R/W) Enables secure access to region. |
| 469 | Undefined if both [S_EN] and [NS_EN] are set for the same region. */ |
| 470 | uint64_t reserved_2_63 : 62; |
| 471 | #endif /* Word 0 - End */ |
| 472 | } cn81xx; |
| 473 | /* struct bdk_l2c_asc_regionx_attr_s cn88xx; */ |
| 474 | /* struct bdk_l2c_asc_regionx_attr_cn81xx cn83xx; */ |
| 475 | }; |
| 476 | typedef union bdk_l2c_asc_regionx_attr bdk_l2c_asc_regionx_attr_t; |
| 477 | |
| 478 | static inline uint64_t BDK_L2C_ASC_REGIONX_ATTR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 479 | static inline uint64_t BDK_L2C_ASC_REGIONX_ATTR(unsigned long a) |
| 480 | { |
| 481 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX) && (a<=3)) |
| 482 | return 0x87e080801010ll + 0x40ll * ((a) & 0x3); |
| 483 | __bdk_csr_fatal("L2C_ASC_REGIONX_ATTR", 1, a, 0, 0, 0); |
| 484 | } |
| 485 | |
| 486 | #define typedef_BDK_L2C_ASC_REGIONX_ATTR(a) bdk_l2c_asc_regionx_attr_t |
| 487 | #define bustype_BDK_L2C_ASC_REGIONX_ATTR(a) BDK_CSR_TYPE_RSL |
| 488 | #define basename_BDK_L2C_ASC_REGIONX_ATTR(a) "L2C_ASC_REGIONX_ATTR" |
| 489 | #define device_bar_BDK_L2C_ASC_REGIONX_ATTR(a) 0x0 /* PF_BAR0 */ |
| 490 | #define busnum_BDK_L2C_ASC_REGIONX_ATTR(a) (a) |
| 491 | #define arguments_BDK_L2C_ASC_REGIONX_ATTR(a) (a),-1,-1,-1 |
| 492 | |
| 493 | /** |
| 494 | * Register (RSL) l2c_asc_region#_end |
| 495 | * |
| 496 | * L2C Address Space Control Region End Address Registers |
| 497 | */ |
| 498 | union bdk_l2c_asc_regionx_end |
| 499 | { |
| 500 | uint64_t u; |
| 501 | struct bdk_l2c_asc_regionx_end_s |
| 502 | { |
| 503 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 504 | uint64_t reserved_40_63 : 24; |
| 505 | uint64_t addr : 20; /**< [ 39: 20](R/W) Node-local physical address \<39:20\> marking the inclusive end of the corresponding ASC |
| 506 | region. |
| 507 | Note that the region includes this address. |
| 508 | Software must ensure that regions do not overlap. |
| 509 | To specify an empty region, clear both the [S_EN] and [NS_EN] fields of |
| 510 | the corresponding L2C_ASC_REGION()_ATTR register. */ |
| 511 | uint64_t reserved_0_19 : 20; |
| 512 | #else /* Word 0 - Little Endian */ |
| 513 | uint64_t reserved_0_19 : 20; |
| 514 | uint64_t addr : 20; /**< [ 39: 20](R/W) Node-local physical address \<39:20\> marking the inclusive end of the corresponding ASC |
| 515 | region. |
| 516 | Note that the region includes this address. |
| 517 | Software must ensure that regions do not overlap. |
| 518 | To specify an empty region, clear both the [S_EN] and [NS_EN] fields of |
| 519 | the corresponding L2C_ASC_REGION()_ATTR register. */ |
| 520 | uint64_t reserved_40_63 : 24; |
| 521 | #endif /* Word 0 - End */ |
| 522 | } s; |
| 523 | /* struct bdk_l2c_asc_regionx_end_s cn; */ |
| 524 | }; |
| 525 | typedef union bdk_l2c_asc_regionx_end bdk_l2c_asc_regionx_end_t; |
| 526 | |
| 527 | static inline uint64_t BDK_L2C_ASC_REGIONX_END(unsigned long a) __attribute__ ((pure, always_inline)); |
| 528 | static inline uint64_t BDK_L2C_ASC_REGIONX_END(unsigned long a) |
| 529 | { |
| 530 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX) && (a<=3)) |
| 531 | return 0x87e080801008ll + 0x40ll * ((a) & 0x3); |
| 532 | __bdk_csr_fatal("L2C_ASC_REGIONX_END", 1, a, 0, 0, 0); |
| 533 | } |
| 534 | |
| 535 | #define typedef_BDK_L2C_ASC_REGIONX_END(a) bdk_l2c_asc_regionx_end_t |
| 536 | #define bustype_BDK_L2C_ASC_REGIONX_END(a) BDK_CSR_TYPE_RSL |
| 537 | #define basename_BDK_L2C_ASC_REGIONX_END(a) "L2C_ASC_REGIONX_END" |
| 538 | #define device_bar_BDK_L2C_ASC_REGIONX_END(a) 0x0 /* PF_BAR0 */ |
| 539 | #define busnum_BDK_L2C_ASC_REGIONX_END(a) (a) |
| 540 | #define arguments_BDK_L2C_ASC_REGIONX_END(a) (a),-1,-1,-1 |
| 541 | |
| 542 | /** |
| 543 | * Register (RSL) l2c_asc_region#_start |
| 544 | * |
| 545 | * L2C Address Space Control Region Start Address Registers |
| 546 | */ |
| 547 | union bdk_l2c_asc_regionx_start |
| 548 | { |
| 549 | uint64_t u; |
| 550 | struct bdk_l2c_asc_regionx_start_s |
| 551 | { |
| 552 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 553 | uint64_t reserved_40_63 : 24; |
| 554 | uint64_t addr : 20; /**< [ 39: 20](R/W) Node-local physical address \<39:20\> marking the start of the corresponding ASC region. |
| 555 | Software must ensure that regions do not overlap. */ |
| 556 | uint64_t reserved_0_19 : 20; |
| 557 | #else /* Word 0 - Little Endian */ |
| 558 | uint64_t reserved_0_19 : 20; |
| 559 | uint64_t addr : 20; /**< [ 39: 20](R/W) Node-local physical address \<39:20\> marking the start of the corresponding ASC region. |
| 560 | Software must ensure that regions do not overlap. */ |
| 561 | uint64_t reserved_40_63 : 24; |
| 562 | #endif /* Word 0 - End */ |
| 563 | } s; |
| 564 | /* struct bdk_l2c_asc_regionx_start_s cn; */ |
| 565 | }; |
| 566 | typedef union bdk_l2c_asc_regionx_start bdk_l2c_asc_regionx_start_t; |
| 567 | |
| 568 | static inline uint64_t BDK_L2C_ASC_REGIONX_START(unsigned long a) __attribute__ ((pure, always_inline)); |
| 569 | static inline uint64_t BDK_L2C_ASC_REGIONX_START(unsigned long a) |
| 570 | { |
| 571 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX) && (a<=3)) |
| 572 | return 0x87e080801000ll + 0x40ll * ((a) & 0x3); |
| 573 | __bdk_csr_fatal("L2C_ASC_REGIONX_START", 1, a, 0, 0, 0); |
| 574 | } |
| 575 | |
| 576 | #define typedef_BDK_L2C_ASC_REGIONX_START(a) bdk_l2c_asc_regionx_start_t |
| 577 | #define bustype_BDK_L2C_ASC_REGIONX_START(a) BDK_CSR_TYPE_RSL |
| 578 | #define basename_BDK_L2C_ASC_REGIONX_START(a) "L2C_ASC_REGIONX_START" |
| 579 | #define device_bar_BDK_L2C_ASC_REGIONX_START(a) 0x0 /* PF_BAR0 */ |
| 580 | #define busnum_BDK_L2C_ASC_REGIONX_START(a) (a) |
| 581 | #define arguments_BDK_L2C_ASC_REGIONX_START(a) (a),-1,-1,-1 |
| 582 | |
| 583 | /** |
| 584 | * Register (RSL) l2c_cbc#_bist_status |
| 585 | * |
| 586 | * L2C CBC BIST Status Registers |
| 587 | */ |
| 588 | union bdk_l2c_cbcx_bist_status |
| 589 | { |
| 590 | uint64_t u; |
| 591 | struct bdk_l2c_cbcx_bist_status_s |
| 592 | { |
| 593 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 594 | uint64_t reserved_37_63 : 27; |
| 595 | uint64_t mibfl : 5; /**< [ 36: 32](RO/H) BIST failure status for various MIB memories. ({XMD, IPM, IRM, MXD, MXN}) */ |
| 596 | uint64_t rsdfl : 32; /**< [ 31: 0](RO/H) BIST failure status for RSDQW0-31. */ |
| 597 | #else /* Word 0 - Little Endian */ |
| 598 | uint64_t rsdfl : 32; /**< [ 31: 0](RO/H) BIST failure status for RSDQW0-31. */ |
| 599 | uint64_t mibfl : 5; /**< [ 36: 32](RO/H) BIST failure status for various MIB memories. ({XMD, IPM, IRM, MXD, MXN}) */ |
| 600 | uint64_t reserved_37_63 : 27; |
| 601 | #endif /* Word 0 - End */ |
| 602 | } s; |
| 603 | /* struct bdk_l2c_cbcx_bist_status_s cn; */ |
| 604 | }; |
| 605 | typedef union bdk_l2c_cbcx_bist_status bdk_l2c_cbcx_bist_status_t; |
| 606 | |
| 607 | static inline uint64_t BDK_L2C_CBCX_BIST_STATUS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 608 | static inline uint64_t BDK_L2C_CBCX_BIST_STATUS(unsigned long a) |
| 609 | { |
| 610 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 611 | return 0x87e0580a0000ll + 0x1000000ll * ((a) & 0x0); |
| 612 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 613 | return 0x87e0580a0000ll + 0x1000000ll * ((a) & 0x1); |
| 614 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 615 | return 0x87e0580a0000ll + 0x1000000ll * ((a) & 0x3); |
| 616 | __bdk_csr_fatal("L2C_CBCX_BIST_STATUS", 1, a, 0, 0, 0); |
| 617 | } |
| 618 | |
| 619 | #define typedef_BDK_L2C_CBCX_BIST_STATUS(a) bdk_l2c_cbcx_bist_status_t |
| 620 | #define bustype_BDK_L2C_CBCX_BIST_STATUS(a) BDK_CSR_TYPE_RSL |
| 621 | #define basename_BDK_L2C_CBCX_BIST_STATUS(a) "L2C_CBCX_BIST_STATUS" |
| 622 | #define device_bar_BDK_L2C_CBCX_BIST_STATUS(a) 0x0 /* PF_BAR0 */ |
| 623 | #define busnum_BDK_L2C_CBCX_BIST_STATUS(a) (a) |
| 624 | #define arguments_BDK_L2C_CBCX_BIST_STATUS(a) (a),-1,-1,-1 |
| 625 | |
| 626 | /** |
| 627 | * Register (RSL) l2c_cbc#_dll |
| 628 | * |
| 629 | * L2C CBC DLL Observability Register |
| 630 | * Register for DLL observability. |
| 631 | */ |
| 632 | union bdk_l2c_cbcx_dll |
| 633 | { |
| 634 | uint64_t u; |
| 635 | struct bdk_l2c_cbcx_dll_s |
| 636 | { |
| 637 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 638 | uint64_t reserved_60_63 : 4; |
| 639 | uint64_t max_dll_setting : 12; /**< [ 59: 48](RO/H) Max reported DLL setting. */ |
| 640 | uint64_t min_dll_setting : 12; /**< [ 47: 36](RO/H) Min reported DLL setting. */ |
| 641 | uint64_t pd_pos_rclk_refclk : 1; /**< [ 35: 35](RO/H) Phase detector output. */ |
| 642 | uint64_t pdl_rclk_refclk : 1; /**< [ 34: 34](RO/H) Phase detector output. */ |
| 643 | uint64_t pdr_rclk_refclk : 1; /**< [ 33: 33](RO/H) Phase detector output. */ |
| 644 | uint64_t reserved_32 : 1; |
| 645 | uint64_t dly_elem_enable : 16; /**< [ 31: 16](RO/H) Delay element enable. */ |
| 646 | uint64_t dll_setting : 12; /**< [ 15: 4](RO/H) DLL setting. */ |
| 647 | uint64_t reserved_1_3 : 3; |
| 648 | uint64_t dll_lock : 1; /**< [ 0: 0](RO/H) DLL locked. */ |
| 649 | #else /* Word 0 - Little Endian */ |
| 650 | uint64_t dll_lock : 1; /**< [ 0: 0](RO/H) DLL locked. */ |
| 651 | uint64_t reserved_1_3 : 3; |
| 652 | uint64_t dll_setting : 12; /**< [ 15: 4](RO/H) DLL setting. */ |
| 653 | uint64_t dly_elem_enable : 16; /**< [ 31: 16](RO/H) Delay element enable. */ |
| 654 | uint64_t reserved_32 : 1; |
| 655 | uint64_t pdr_rclk_refclk : 1; /**< [ 33: 33](RO/H) Phase detector output. */ |
| 656 | uint64_t pdl_rclk_refclk : 1; /**< [ 34: 34](RO/H) Phase detector output. */ |
| 657 | uint64_t pd_pos_rclk_refclk : 1; /**< [ 35: 35](RO/H) Phase detector output. */ |
| 658 | uint64_t min_dll_setting : 12; /**< [ 47: 36](RO/H) Min reported DLL setting. */ |
| 659 | uint64_t max_dll_setting : 12; /**< [ 59: 48](RO/H) Max reported DLL setting. */ |
| 660 | uint64_t reserved_60_63 : 4; |
| 661 | #endif /* Word 0 - End */ |
| 662 | } s; |
| 663 | /* struct bdk_l2c_cbcx_dll_s cn; */ |
| 664 | }; |
| 665 | typedef union bdk_l2c_cbcx_dll bdk_l2c_cbcx_dll_t; |
| 666 | |
| 667 | static inline uint64_t BDK_L2C_CBCX_DLL(unsigned long a) __attribute__ ((pure, always_inline)); |
| 668 | static inline uint64_t BDK_L2C_CBCX_DLL(unsigned long a) |
| 669 | { |
| 670 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 671 | return 0x87e058040000ll + 0x1000000ll * ((a) & 0x0); |
| 672 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 673 | return 0x87e058040000ll + 0x1000000ll * ((a) & 0x1); |
| 674 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 675 | return 0x87e058040000ll + 0x1000000ll * ((a) & 0x3); |
| 676 | __bdk_csr_fatal("L2C_CBCX_DLL", 1, a, 0, 0, 0); |
| 677 | } |
| 678 | |
| 679 | #define typedef_BDK_L2C_CBCX_DLL(a) bdk_l2c_cbcx_dll_t |
| 680 | #define bustype_BDK_L2C_CBCX_DLL(a) BDK_CSR_TYPE_RSL |
| 681 | #define basename_BDK_L2C_CBCX_DLL(a) "L2C_CBCX_DLL" |
| 682 | #define device_bar_BDK_L2C_CBCX_DLL(a) 0x0 /* PF_BAR0 */ |
| 683 | #define busnum_BDK_L2C_CBCX_DLL(a) (a) |
| 684 | #define arguments_BDK_L2C_CBCX_DLL(a) (a),-1,-1,-1 |
| 685 | |
| 686 | /** |
| 687 | * Register (RSL) l2c_cbc#_iocerr |
| 688 | * |
| 689 | * L2C CBC Error Information Registers |
| 690 | * Reserved. |
| 691 | */ |
| 692 | union bdk_l2c_cbcx_iocerr |
| 693 | { |
| 694 | uint64_t u; |
| 695 | struct bdk_l2c_cbcx_iocerr_s |
| 696 | { |
| 697 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 698 | uint64_t reserved_0_63 : 64; |
| 699 | #else /* Word 0 - Little Endian */ |
| 700 | uint64_t reserved_0_63 : 64; |
| 701 | #endif /* Word 0 - End */ |
| 702 | } s; |
| 703 | /* struct bdk_l2c_cbcx_iocerr_s cn; */ |
| 704 | }; |
| 705 | typedef union bdk_l2c_cbcx_iocerr bdk_l2c_cbcx_iocerr_t; |
| 706 | |
| 707 | static inline uint64_t BDK_L2C_CBCX_IOCERR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 708 | static inline uint64_t BDK_L2C_CBCX_IOCERR(unsigned long a) |
| 709 | { |
| 710 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 711 | return 0x87e058080010ll + 0x1000000ll * ((a) & 0x0); |
| 712 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 713 | return 0x87e058080010ll + 0x1000000ll * ((a) & 0x1); |
| 714 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 715 | return 0x87e058080010ll + 0x1000000ll * ((a) & 0x3); |
| 716 | __bdk_csr_fatal("L2C_CBCX_IOCERR", 1, a, 0, 0, 0); |
| 717 | } |
| 718 | |
| 719 | #define typedef_BDK_L2C_CBCX_IOCERR(a) bdk_l2c_cbcx_iocerr_t |
| 720 | #define bustype_BDK_L2C_CBCX_IOCERR(a) BDK_CSR_TYPE_RSL |
| 721 | #define basename_BDK_L2C_CBCX_IOCERR(a) "L2C_CBCX_IOCERR" |
| 722 | #define device_bar_BDK_L2C_CBCX_IOCERR(a) 0x0 /* PF_BAR0 */ |
| 723 | #define busnum_BDK_L2C_CBCX_IOCERR(a) (a) |
| 724 | #define arguments_BDK_L2C_CBCX_IOCERR(a) (a),-1,-1,-1 |
| 725 | |
| 726 | /** |
| 727 | * Register (RSL) l2c_cbc#_iodisocierr |
| 728 | * |
| 729 | * L2C CBC IODISOCI Error Information Registers |
| 730 | * This register records error information associated with IORDDISOCI/IOWRDISOCI interrupts. |
| 731 | * IOWRDISOCI events take priority over previously captured IORDDISOCI events. Of the available |
| 732 | * I/O transactions, some commands will either set [IORDDISOCI], set [IOWRDISOCI], or set both |
| 733 | * [IORDDISOCI] and [IOWRDISOCI]. See L2C_CBC()_INT_W1C for information about which I/O |
| 734 | * transactions |
| 735 | * may result in IORDDISOCI/IOWRDISOCI interrupts. |
| 736 | */ |
| 737 | union bdk_l2c_cbcx_iodisocierr |
| 738 | { |
| 739 | uint64_t u; |
| 740 | struct bdk_l2c_cbcx_iodisocierr_s |
| 741 | { |
| 742 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 743 | uint64_t iorddisoci : 1; /**< [ 63: 63](RO/H) Logged information is for a IORDDISOCI error. */ |
| 744 | uint64_t iowrdisoci : 1; /**< [ 62: 62](RO/H) Logged information is for a IOWRDISOCI error. */ |
| 745 | uint64_t reserved_59_61 : 3; |
| 746 | uint64_t cmd : 7; /**< [ 58: 52](RO/H) Encoding of XMC command. |
| 747 | Internal: |
| 748 | Enumerated by XMC_CMD_E. */ |
| 749 | uint64_t ppvid : 6; /**< [ 51: 46](RO/H) CMB source PPVID. */ |
| 750 | uint64_t node : 2; /**< [ 45: 44](RO/H) Destination node ID. */ |
| 751 | uint64_t did : 8; /**< [ 43: 36](RO/H) Destination device ID. */ |
| 752 | uint64_t addr : 36; /**< [ 35: 0](RO/H) I/O address. */ |
| 753 | #else /* Word 0 - Little Endian */ |
| 754 | uint64_t addr : 36; /**< [ 35: 0](RO/H) I/O address. */ |
| 755 | uint64_t did : 8; /**< [ 43: 36](RO/H) Destination device ID. */ |
| 756 | uint64_t node : 2; /**< [ 45: 44](RO/H) Destination node ID. */ |
| 757 | uint64_t ppvid : 6; /**< [ 51: 46](RO/H) CMB source PPVID. */ |
| 758 | uint64_t cmd : 7; /**< [ 58: 52](RO/H) Encoding of XMC command. |
| 759 | Internal: |
| 760 | Enumerated by XMC_CMD_E. */ |
| 761 | uint64_t reserved_59_61 : 3; |
| 762 | uint64_t iowrdisoci : 1; /**< [ 62: 62](RO/H) Logged information is for a IOWRDISOCI error. */ |
| 763 | uint64_t iorddisoci : 1; /**< [ 63: 63](RO/H) Logged information is for a IORDDISOCI error. */ |
| 764 | #endif /* Word 0 - End */ |
| 765 | } s; |
| 766 | /* struct bdk_l2c_cbcx_iodisocierr_s cn; */ |
| 767 | }; |
| 768 | typedef union bdk_l2c_cbcx_iodisocierr bdk_l2c_cbcx_iodisocierr_t; |
| 769 | |
| 770 | static inline uint64_t BDK_L2C_CBCX_IODISOCIERR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 771 | static inline uint64_t BDK_L2C_CBCX_IODISOCIERR(unsigned long a) |
| 772 | { |
| 773 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 774 | return 0x87e058080008ll + 0x1000000ll * ((a) & 0x0); |
| 775 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 776 | return 0x87e058080008ll + 0x1000000ll * ((a) & 0x1); |
| 777 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 778 | return 0x87e058080008ll + 0x1000000ll * ((a) & 0x3); |
| 779 | __bdk_csr_fatal("L2C_CBCX_IODISOCIERR", 1, a, 0, 0, 0); |
| 780 | } |
| 781 | |
| 782 | #define typedef_BDK_L2C_CBCX_IODISOCIERR(a) bdk_l2c_cbcx_iodisocierr_t |
| 783 | #define bustype_BDK_L2C_CBCX_IODISOCIERR(a) BDK_CSR_TYPE_RSL |
| 784 | #define basename_BDK_L2C_CBCX_IODISOCIERR(a) "L2C_CBCX_IODISOCIERR" |
| 785 | #define device_bar_BDK_L2C_CBCX_IODISOCIERR(a) 0x0 /* PF_BAR0 */ |
| 786 | #define busnum_BDK_L2C_CBCX_IODISOCIERR(a) (a) |
| 787 | #define arguments_BDK_L2C_CBCX_IODISOCIERR(a) (a),-1,-1,-1 |
| 788 | |
| 789 | /** |
| 790 | * Register (RSL) l2c_cbc#_miberr |
| 791 | * |
| 792 | * L2C CBC MIB Error Information Registers |
| 793 | * This register records error information for all CBC MIB errors. An error locks the INDEX and |
| 794 | * [SYN] fields and set the bit corresponding to the error received. MIBDBE errors take priority |
| 795 | * and overwrite an earlier logged MIBSBE error. Only one of [MIBSBE]/[MIBDBE] is set at any |
| 796 | * given |
| 797 | * time and serves to document which error the INDEX/[SYN] is associated with. The syndrome is |
| 798 | * recorded for DBE errors, though the utility of the value is not clear. |
| 799 | */ |
| 800 | union bdk_l2c_cbcx_miberr |
| 801 | { |
| 802 | uint64_t u; |
| 803 | struct bdk_l2c_cbcx_miberr_s |
| 804 | { |
| 805 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 806 | uint64_t mibdbe : 1; /**< [ 63: 63](RO/H) INDEX/SYN corresponds to a double-bit MIB ECC error. */ |
| 807 | uint64_t mibsbe : 1; /**< [ 62: 62](RO/H) INDEX/SYN corresponds to a single-bit MIB ECC error. */ |
| 808 | uint64_t reserved_40_61 : 22; |
| 809 | uint64_t syn : 8; /**< [ 39: 32](RO/H) Error syndrome. */ |
| 810 | uint64_t reserved_3_31 : 29; |
| 811 | uint64_t memid : 2; /**< [ 2: 1](RO/H) Indicates the memory that had the error. |
| 812 | 0x0 = Error from MXB_VC_MRN, MXB_VC_MFN, MXB_VC_MPN VCs. |
| 813 | 0x1 = Error from MXB_VC_MRD, MXB_VC_MPD VCs. |
| 814 | 0x2 = Error from MXB_VC_IRM VC. |
| 815 | 0x3 = Error from MXB_VC_IPM VC. */ |
| 816 | uint64_t mibnum : 1; /**< [ 0: 0](RO/H) Indicates the MIB bus that had the error. */ |
| 817 | #else /* Word 0 - Little Endian */ |
| 818 | uint64_t mibnum : 1; /**< [ 0: 0](RO/H) Indicates the MIB bus that had the error. */ |
| 819 | uint64_t memid : 2; /**< [ 2: 1](RO/H) Indicates the memory that had the error. |
| 820 | 0x0 = Error from MXB_VC_MRN, MXB_VC_MFN, MXB_VC_MPN VCs. |
| 821 | 0x1 = Error from MXB_VC_MRD, MXB_VC_MPD VCs. |
| 822 | 0x2 = Error from MXB_VC_IRM VC. |
| 823 | 0x3 = Error from MXB_VC_IPM VC. */ |
| 824 | uint64_t reserved_3_31 : 29; |
| 825 | uint64_t syn : 8; /**< [ 39: 32](RO/H) Error syndrome. */ |
| 826 | uint64_t reserved_40_61 : 22; |
| 827 | uint64_t mibsbe : 1; /**< [ 62: 62](RO/H) INDEX/SYN corresponds to a single-bit MIB ECC error. */ |
| 828 | uint64_t mibdbe : 1; /**< [ 63: 63](RO/H) INDEX/SYN corresponds to a double-bit MIB ECC error. */ |
| 829 | #endif /* Word 0 - End */ |
| 830 | } s; |
| 831 | /* struct bdk_l2c_cbcx_miberr_s cn; */ |
| 832 | }; |
| 833 | typedef union bdk_l2c_cbcx_miberr bdk_l2c_cbcx_miberr_t; |
| 834 | |
| 835 | static inline uint64_t BDK_L2C_CBCX_MIBERR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 836 | static inline uint64_t BDK_L2C_CBCX_MIBERR(unsigned long a) |
| 837 | { |
| 838 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 839 | return 0x87e058080020ll + 0x1000000ll * ((a) & 0x0); |
| 840 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 841 | return 0x87e058080020ll + 0x1000000ll * ((a) & 0x1); |
| 842 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 843 | return 0x87e058080020ll + 0x1000000ll * ((a) & 0x3); |
| 844 | __bdk_csr_fatal("L2C_CBCX_MIBERR", 1, a, 0, 0, 0); |
| 845 | } |
| 846 | |
| 847 | #define typedef_BDK_L2C_CBCX_MIBERR(a) bdk_l2c_cbcx_miberr_t |
| 848 | #define bustype_BDK_L2C_CBCX_MIBERR(a) BDK_CSR_TYPE_RSL |
| 849 | #define basename_BDK_L2C_CBCX_MIBERR(a) "L2C_CBCX_MIBERR" |
| 850 | #define device_bar_BDK_L2C_CBCX_MIBERR(a) 0x0 /* PF_BAR0 */ |
| 851 | #define busnum_BDK_L2C_CBCX_MIBERR(a) (a) |
| 852 | #define arguments_BDK_L2C_CBCX_MIBERR(a) (a),-1,-1,-1 |
| 853 | |
| 854 | /** |
| 855 | * Register (RSL) l2c_cbc#_rsderr |
| 856 | * |
| 857 | * L2C CBC RSD Error Information Registers |
| 858 | * This register records error information for all CBC RSD errors. |
| 859 | * An error locks the INDEX and [SYN] fields and set the bit corresponding to the error received. |
| 860 | * RSDDBE errors take priority and overwrite an earlier logged RSDSBE error. Only one of |
| 861 | * [RSDSBE]/[RSDDBE] is set at any given time and serves to document which error the INDEX/[SYN] |
| 862 | * is |
| 863 | * associated with. |
| 864 | * The syndrome is recorded for DBE errors, though the utility of the value is not clear. |
| 865 | */ |
| 866 | union bdk_l2c_cbcx_rsderr |
| 867 | { |
| 868 | uint64_t u; |
| 869 | struct bdk_l2c_cbcx_rsderr_s |
| 870 | { |
| 871 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 872 | uint64_t rsddbe : 1; /**< [ 63: 63](RO/H) INDEX/SYN corresponds to a double-bit RSD ECC error. */ |
| 873 | uint64_t rsdsbe : 1; /**< [ 62: 62](RO/H) INDEX/SYN corresponds to a single-bit RSD ECC error. */ |
| 874 | uint64_t reserved_40_61 : 22; |
| 875 | uint64_t syn : 8; /**< [ 39: 32](RO/H) Error syndrome. */ |
| 876 | uint64_t reserved_9_31 : 23; |
| 877 | uint64_t tadnum : 3; /**< [ 8: 6](RO/H) Indicates the TAD FIFO containing the error. */ |
| 878 | uint64_t qwnum : 2; /**< [ 5: 4](RO/H) Indicates the QW containing the error. */ |
| 879 | uint64_t rsdnum : 4; /**< [ 3: 0](RO/H) Indicates the RSD that had the error. */ |
| 880 | #else /* Word 0 - Little Endian */ |
| 881 | uint64_t rsdnum : 4; /**< [ 3: 0](RO/H) Indicates the RSD that had the error. */ |
| 882 | uint64_t qwnum : 2; /**< [ 5: 4](RO/H) Indicates the QW containing the error. */ |
| 883 | uint64_t tadnum : 3; /**< [ 8: 6](RO/H) Indicates the TAD FIFO containing the error. */ |
| 884 | uint64_t reserved_9_31 : 23; |
| 885 | uint64_t syn : 8; /**< [ 39: 32](RO/H) Error syndrome. */ |
| 886 | uint64_t reserved_40_61 : 22; |
| 887 | uint64_t rsdsbe : 1; /**< [ 62: 62](RO/H) INDEX/SYN corresponds to a single-bit RSD ECC error. */ |
| 888 | uint64_t rsddbe : 1; /**< [ 63: 63](RO/H) INDEX/SYN corresponds to a double-bit RSD ECC error. */ |
| 889 | #endif /* Word 0 - End */ |
| 890 | } s; |
| 891 | /* struct bdk_l2c_cbcx_rsderr_s cn; */ |
| 892 | }; |
| 893 | typedef union bdk_l2c_cbcx_rsderr bdk_l2c_cbcx_rsderr_t; |
| 894 | |
| 895 | static inline uint64_t BDK_L2C_CBCX_RSDERR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 896 | static inline uint64_t BDK_L2C_CBCX_RSDERR(unsigned long a) |
| 897 | { |
| 898 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 899 | return 0x87e058080018ll + 0x1000000ll * ((a) & 0x0); |
| 900 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=1)) |
| 901 | return 0x87e058080018ll + 0x1000000ll * ((a) & 0x1); |
| 902 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 903 | return 0x87e058080018ll + 0x1000000ll * ((a) & 0x3); |
| 904 | __bdk_csr_fatal("L2C_CBCX_RSDERR", 1, a, 0, 0, 0); |
| 905 | } |
| 906 | |
| 907 | #define typedef_BDK_L2C_CBCX_RSDERR(a) bdk_l2c_cbcx_rsderr_t |
| 908 | #define bustype_BDK_L2C_CBCX_RSDERR(a) BDK_CSR_TYPE_RSL |
| 909 | #define basename_BDK_L2C_CBCX_RSDERR(a) "L2C_CBCX_RSDERR" |
| 910 | #define device_bar_BDK_L2C_CBCX_RSDERR(a) 0x0 /* PF_BAR0 */ |
| 911 | #define busnum_BDK_L2C_CBCX_RSDERR(a) (a) |
| 912 | #define arguments_BDK_L2C_CBCX_RSDERR(a) (a),-1,-1,-1 |
| 913 | |
| 914 | /** |
| 915 | * Register (RSL) l2c_ctl |
| 916 | * |
| 917 | * L2C Control Register |
| 918 | */ |
| 919 | union bdk_l2c_ctl |
| 920 | { |
| 921 | uint64_t u; |
| 922 | struct bdk_l2c_ctl_s |
| 923 | { |
| 924 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 925 | uint64_t reserved_32_63 : 32; |
| 926 | uint64_t ocla_qos : 3; /**< [ 31: 29](R/W) QOS level for the transactions from OCLA to L2C. */ |
| 927 | uint64_t reserved_28 : 1; |
| 928 | uint64_t disstgl2i : 1; /**< [ 27: 27](R/W) Disable STGL2Is from changing the tags. */ |
| 929 | uint64_t reserved_25_26 : 2; |
| 930 | uint64_t discclk : 1; /**< [ 24: 24](R/W) Disable conditional clocking in L2C PNR blocks. */ |
| 931 | uint64_t reserved_16_23 : 8; |
| 932 | uint64_t rsp_arb_mode : 1; /**< [ 15: 15](R/W) Arbitration mode for RSC/RSD bus. 0 = round-robin; 1 = static priority. |
| 933 | 1. IOR data. |
| 934 | 2. STIN/FILLs. |
| 935 | 3. STDN/SCDN/SCFL. */ |
| 936 | uint64_t xmc_arb_mode : 1; /**< [ 14: 14](R/W) Arbitration mode for ADD bus QOS queues. 0 = fully determined through QOS, 1 = QOS0 |
| 937 | highest priority; QOS 1-7 use normal mode. */ |
| 938 | uint64_t rdf_cnt : 8; /**< [ 13: 6](R/W) Defines the sample point of the LMC response data in the DDR-clock/core-clock crossing. |
| 939 | For optimal performance set to |
| 940 | 10 * (DDR-clock period/core-clock period) - 1. |
| 941 | To disable set to 0. All other values are reserved. */ |
| 942 | uint64_t disdwb : 1; /**< [ 5: 5](R/W) Suppresses DWB and INVL2 commands, effectively turning them into NOPs. |
| 943 | Internal: |
| 944 | The real behavior is DWB and INVL2 commands are forced to look like STGL2I commands with |
| 945 | DISSTGL2I set. */ |
| 946 | uint64_t disgsyncto : 1; /**< [ 4: 4](R/W) Disable global sync timeout. */ |
| 947 | uint64_t disldwb : 1; /**< [ 3: 3](R/W) Suppresses the DWB functionality of any received LDWB, effectively turning them into LDTs. */ |
| 948 | uint64_t dissblkdty : 1; /**< [ 2: 2](R/W) Disable bandwidth optimization between L2 and LMC and MOB which only transfers modified |
| 949 | sub-blocks when possible. In an CCPI system all nodes must use the same setting of |
| 950 | DISSBLKDTY or operation is undefined. */ |
| 951 | uint64_t disecc : 1; /**< [ 1: 1](R/W) Tag and data ECC disable. */ |
| 952 | uint64_t disidxalias : 1; /**< [ 0: 0](R/W) Index alias disable. */ |
| 953 | #else /* Word 0 - Little Endian */ |
| 954 | uint64_t disidxalias : 1; /**< [ 0: 0](R/W) Index alias disable. */ |
| 955 | uint64_t disecc : 1; /**< [ 1: 1](R/W) Tag and data ECC disable. */ |
| 956 | uint64_t dissblkdty : 1; /**< [ 2: 2](R/W) Disable bandwidth optimization between L2 and LMC and MOB which only transfers modified |
| 957 | sub-blocks when possible. In an CCPI system all nodes must use the same setting of |
| 958 | DISSBLKDTY or operation is undefined. */ |
| 959 | uint64_t disldwb : 1; /**< [ 3: 3](R/W) Suppresses the DWB functionality of any received LDWB, effectively turning them into LDTs. */ |
| 960 | uint64_t disgsyncto : 1; /**< [ 4: 4](R/W) Disable global sync timeout. */ |
| 961 | uint64_t disdwb : 1; /**< [ 5: 5](R/W) Suppresses DWB and INVL2 commands, effectively turning them into NOPs. |
| 962 | Internal: |
| 963 | The real behavior is DWB and INVL2 commands are forced to look like STGL2I commands with |
| 964 | DISSTGL2I set. */ |
| 965 | uint64_t rdf_cnt : 8; /**< [ 13: 6](R/W) Defines the sample point of the LMC response data in the DDR-clock/core-clock crossing. |
| 966 | For optimal performance set to |
| 967 | 10 * (DDR-clock period/core-clock period) - 1. |
| 968 | To disable set to 0. All other values are reserved. */ |
| 969 | uint64_t xmc_arb_mode : 1; /**< [ 14: 14](R/W) Arbitration mode for ADD bus QOS queues. 0 = fully determined through QOS, 1 = QOS0 |
| 970 | highest priority; QOS 1-7 use normal mode. */ |
| 971 | uint64_t rsp_arb_mode : 1; /**< [ 15: 15](R/W) Arbitration mode for RSC/RSD bus. 0 = round-robin; 1 = static priority. |
| 972 | 1. IOR data. |
| 973 | 2. STIN/FILLs. |
| 974 | 3. STDN/SCDN/SCFL. */ |
| 975 | uint64_t reserved_16_23 : 8; |
| 976 | uint64_t discclk : 1; /**< [ 24: 24](R/W) Disable conditional clocking in L2C PNR blocks. */ |
| 977 | uint64_t reserved_25_26 : 2; |
| 978 | uint64_t disstgl2i : 1; /**< [ 27: 27](R/W) Disable STGL2Is from changing the tags. */ |
| 979 | uint64_t reserved_28 : 1; |
| 980 | uint64_t ocla_qos : 3; /**< [ 31: 29](R/W) QOS level for the transactions from OCLA to L2C. */ |
| 981 | uint64_t reserved_32_63 : 32; |
| 982 | #endif /* Word 0 - End */ |
| 983 | } s; |
| 984 | struct bdk_l2c_ctl_cn88xxp1 |
| 985 | { |
| 986 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 987 | uint64_t reserved_32_63 : 32; |
| 988 | uint64_t ocla_qos : 3; /**< [ 31: 29](R/W) QOS level for the transactions from OCLA to L2C. */ |
| 989 | uint64_t reserved_28 : 1; |
| 990 | uint64_t disstgl2i : 1; /**< [ 27: 27](R/W) Disable STGL2Is from changing the tags. */ |
| 991 | uint64_t reserved_25_26 : 2; |
| 992 | uint64_t discclk : 1; /**< [ 24: 24](R/W) Disable conditional clocking in L2C PNR blocks. */ |
| 993 | uint64_t reserved_16_23 : 8; |
| 994 | uint64_t rsp_arb_mode : 1; /**< [ 15: 15](R/W) Arbitration mode for RSC/RSD bus. 0 = round-robin; 1 = static priority. |
| 995 | 1. IOR data. |
| 996 | 2. STIN/FILLs. |
| 997 | 3. STDN/SCDN/SCFL. */ |
| 998 | uint64_t xmc_arb_mode : 1; /**< [ 14: 14](R/W) Arbitration mode for ADD bus QOS queues. 0 = fully determined through QOS, 1 = QOS0 |
| 999 | highest priority; QOS 1-7 use normal mode. */ |
| 1000 | uint64_t rdf_cnt : 8; /**< [ 13: 6](R/W) Defines the sample point of the LMC response data in the DDR-clock/core-clock crossing. |
| 1001 | For optimal performance set to |
| 1002 | 10 * (DDR-clock period/core-clock period) - 1. |
| 1003 | To disable set to 0. All other values are reserved. */ |
| 1004 | uint64_t reserved_5 : 1; |
| 1005 | uint64_t reserved_4 : 1; |
| 1006 | uint64_t disldwb : 1; /**< [ 3: 3](R/W) Suppresses the DWB functionality of any received LDWB, effectively turning them into LDTs. */ |
| 1007 | uint64_t dissblkdty : 1; /**< [ 2: 2](R/W) Disable bandwidth optimization between L2 and LMC and MOB which only transfers modified |
| 1008 | sub-blocks when possible. In an CCPI system all nodes must use the same setting of |
| 1009 | DISSBLKDTY or operation is undefined. */ |
| 1010 | uint64_t disecc : 1; /**< [ 1: 1](R/W) Tag and data ECC disable. */ |
| 1011 | uint64_t disidxalias : 1; /**< [ 0: 0](R/W) Index alias disable. */ |
| 1012 | #else /* Word 0 - Little Endian */ |
| 1013 | uint64_t disidxalias : 1; /**< [ 0: 0](R/W) Index alias disable. */ |
| 1014 | uint64_t disecc : 1; /**< [ 1: 1](R/W) Tag and data ECC disable. */ |
| 1015 | uint64_t dissblkdty : 1; /**< [ 2: 2](R/W) Disable bandwidth optimization between L2 and LMC and MOB which only transfers modified |
| 1016 | sub-blocks when possible. In an CCPI system all nodes must use the same setting of |
| 1017 | DISSBLKDTY or operation is undefined. */ |
| 1018 | uint64_t disldwb : 1; /**< [ 3: 3](R/W) Suppresses the DWB functionality of any received LDWB, effectively turning them into LDTs. */ |
| 1019 | uint64_t reserved_4 : 1; |
| 1020 | uint64_t reserved_5 : 1; |
| 1021 | uint64_t rdf_cnt : 8; /**< [ 13: 6](R/W) Defines the sample point of the LMC response data in the DDR-clock/core-clock crossing. |
| 1022 | For optimal performance set to |
| 1023 | 10 * (DDR-clock period/core-clock period) - 1. |
| 1024 | To disable set to 0. All other values are reserved. */ |
| 1025 | uint64_t xmc_arb_mode : 1; /**< [ 14: 14](R/W) Arbitration mode for ADD bus QOS queues. 0 = fully determined through QOS, 1 = QOS0 |
| 1026 | highest priority; QOS 1-7 use normal mode. */ |
| 1027 | uint64_t rsp_arb_mode : 1; /**< [ 15: 15](R/W) Arbitration mode for RSC/RSD bus. 0 = round-robin; 1 = static priority. |
| 1028 | 1. IOR data. |
| 1029 | 2. STIN/FILLs. |
| 1030 | 3. STDN/SCDN/SCFL. */ |
| 1031 | uint64_t reserved_16_23 : 8; |
| 1032 | uint64_t discclk : 1; /**< [ 24: 24](R/W) Disable conditional clocking in L2C PNR blocks. */ |
| 1033 | uint64_t reserved_25_26 : 2; |
| 1034 | uint64_t disstgl2i : 1; /**< [ 27: 27](R/W) Disable STGL2Is from changing the tags. */ |
| 1035 | uint64_t reserved_28 : 1; |
| 1036 | uint64_t ocla_qos : 3; /**< [ 31: 29](R/W) QOS level for the transactions from OCLA to L2C. */ |
| 1037 | uint64_t reserved_32_63 : 32; |
| 1038 | #endif /* Word 0 - End */ |
| 1039 | } cn88xxp1; |
| 1040 | /* struct bdk_l2c_ctl_s cn81xx; */ |
| 1041 | /* struct bdk_l2c_ctl_s cn83xx; */ |
| 1042 | struct bdk_l2c_ctl_cn88xxp2 |
| 1043 | { |
| 1044 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1045 | uint64_t reserved_32_63 : 32; |
| 1046 | uint64_t ocla_qos : 3; /**< [ 31: 29](R/W) QOS level for the transactions from OCLA to L2C. */ |
| 1047 | uint64_t reserved_28 : 1; |
| 1048 | uint64_t disstgl2i : 1; /**< [ 27: 27](R/W) Disable STGL2Is from changing the tags. */ |
| 1049 | uint64_t reserved_25_26 : 2; |
| 1050 | uint64_t discclk : 1; /**< [ 24: 24](R/W) Disable conditional clocking in L2C PNR blocks. */ |
| 1051 | uint64_t reserved_16_23 : 8; |
| 1052 | uint64_t rsp_arb_mode : 1; /**< [ 15: 15](R/W) Arbitration mode for RSC/RSD bus. 0 = round-robin; 1 = static priority. |
| 1053 | 1. IOR data. |
| 1054 | 2. STIN/FILLs. |
| 1055 | 3. STDN/SCDN/SCFL. */ |
| 1056 | uint64_t xmc_arb_mode : 1; /**< [ 14: 14](R/W) Arbitration mode for ADD bus QOS queues. 0 = fully determined through QOS, 1 = QOS0 |
| 1057 | highest priority; QOS 1-7 use normal mode. */ |
| 1058 | uint64_t rdf_cnt : 8; /**< [ 13: 6](R/W) Defines the sample point of the LMC response data in the DDR-clock/core-clock crossing. |
| 1059 | For optimal performance set to |
| 1060 | 10 * (DDR-clock period/core-clock period) - 1. |
| 1061 | To disable set to 0. All other values are reserved. */ |
| 1062 | uint64_t reserved_5 : 1; |
| 1063 | uint64_t disgsyncto : 1; /**< [ 4: 4](R/W) Disable global sync timeout. */ |
| 1064 | uint64_t disldwb : 1; /**< [ 3: 3](R/W) Suppresses the DWB functionality of any received LDWB, effectively turning them into LDTs. */ |
| 1065 | uint64_t dissblkdty : 1; /**< [ 2: 2](R/W) Disable bandwidth optimization between L2 and LMC and MOB which only transfers modified |
| 1066 | sub-blocks when possible. In an CCPI system all nodes must use the same setting of |
| 1067 | DISSBLKDTY or operation is undefined. */ |
| 1068 | uint64_t disecc : 1; /**< [ 1: 1](R/W) Tag and data ECC disable. */ |
| 1069 | uint64_t disidxalias : 1; /**< [ 0: 0](R/W) Index alias disable. */ |
| 1070 | #else /* Word 0 - Little Endian */ |
| 1071 | uint64_t disidxalias : 1; /**< [ 0: 0](R/W) Index alias disable. */ |
| 1072 | uint64_t disecc : 1; /**< [ 1: 1](R/W) Tag and data ECC disable. */ |
| 1073 | uint64_t dissblkdty : 1; /**< [ 2: 2](R/W) Disable bandwidth optimization between L2 and LMC and MOB which only transfers modified |
| 1074 | sub-blocks when possible. In an CCPI system all nodes must use the same setting of |
| 1075 | DISSBLKDTY or operation is undefined. */ |
| 1076 | uint64_t disldwb : 1; /**< [ 3: 3](R/W) Suppresses the DWB functionality of any received LDWB, effectively turning them into LDTs. */ |
| 1077 | uint64_t disgsyncto : 1; /**< [ 4: 4](R/W) Disable global sync timeout. */ |
| 1078 | uint64_t reserved_5 : 1; |
| 1079 | uint64_t rdf_cnt : 8; /**< [ 13: 6](R/W) Defines the sample point of the LMC response data in the DDR-clock/core-clock crossing. |
| 1080 | For optimal performance set to |
| 1081 | 10 * (DDR-clock period/core-clock period) - 1. |
| 1082 | To disable set to 0. All other values are reserved. */ |
| 1083 | uint64_t xmc_arb_mode : 1; /**< [ 14: 14](R/W) Arbitration mode for ADD bus QOS queues. 0 = fully determined through QOS, 1 = QOS0 |
| 1084 | highest priority; QOS 1-7 use normal mode. */ |
| 1085 | uint64_t rsp_arb_mode : 1; /**< [ 15: 15](R/W) Arbitration mode for RSC/RSD bus. 0 = round-robin; 1 = static priority. |
| 1086 | 1. IOR data. |
| 1087 | 2. STIN/FILLs. |
| 1088 | 3. STDN/SCDN/SCFL. */ |
| 1089 | uint64_t reserved_16_23 : 8; |
| 1090 | uint64_t discclk : 1; /**< [ 24: 24](R/W) Disable conditional clocking in L2C PNR blocks. */ |
| 1091 | uint64_t reserved_25_26 : 2; |
| 1092 | uint64_t disstgl2i : 1; /**< [ 27: 27](R/W) Disable STGL2Is from changing the tags. */ |
| 1093 | uint64_t reserved_28 : 1; |
| 1094 | uint64_t ocla_qos : 3; /**< [ 31: 29](R/W) QOS level for the transactions from OCLA to L2C. */ |
| 1095 | uint64_t reserved_32_63 : 32; |
| 1096 | #endif /* Word 0 - End */ |
| 1097 | } cn88xxp2; |
| 1098 | }; |
| 1099 | typedef union bdk_l2c_ctl bdk_l2c_ctl_t; |
| 1100 | |
| 1101 | #define BDK_L2C_CTL BDK_L2C_CTL_FUNC() |
| 1102 | static inline uint64_t BDK_L2C_CTL_FUNC(void) __attribute__ ((pure, always_inline)); |
| 1103 | static inline uint64_t BDK_L2C_CTL_FUNC(void) |
| 1104 | { |
| 1105 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX)) |
| 1106 | return 0x87e080800000ll; |
| 1107 | __bdk_csr_fatal("L2C_CTL", 0, 0, 0, 0, 0); |
| 1108 | } |
| 1109 | |
| 1110 | #define typedef_BDK_L2C_CTL bdk_l2c_ctl_t |
| 1111 | #define bustype_BDK_L2C_CTL BDK_CSR_TYPE_RSL |
| 1112 | #define basename_BDK_L2C_CTL "L2C_CTL" |
| 1113 | #define device_bar_BDK_L2C_CTL 0x0 /* PF_BAR0 */ |
| 1114 | #define busnum_BDK_L2C_CTL 0 |
| 1115 | #define arguments_BDK_L2C_CTL -1,-1,-1,-1 |
| 1116 | |
| 1117 | /** |
| 1118 | * Register (RSL) l2c_ecc_ctl |
| 1119 | * |
| 1120 | * L2C ECC Control Register |
| 1121 | * Flip ECC bits to generate single-bit or double-bit ECC errors in all instances of a given |
| 1122 | * memory type. Encodings are as follows. |
| 1123 | * 0x0 = No error. |
| 1124 | * 0x1 = Single-bit error on ECC\<0\>. |
| 1125 | * 0x2 = Single-bit error on ECC\<1\>. |
| 1126 | * 0x3 = Double-bit error on ECC\<1:0\>. |
| 1127 | * |
| 1128 | * L2DFLIP allows software to generate L2DSBE, L2DDBE, VBFSBE, and VBFDBE errors for the purposes |
| 1129 | * of testing error handling code. When one (or both) of these bits are set, a PL2 that misses in |
| 1130 | * the L2 will fill with the appropriate error in the first two OWs of the fill. Software can |
| 1131 | * determine which OW pair gets the error by choosing the desired fill order (address\<6:5\>). A |
| 1132 | * PL2 that hits in the L2 will not inject any errors. Therefore sending a WBIL2 prior to the PL2 |
| 1133 | * is recommended to make a miss likely. (If multiple processors are involved, software must be |
| 1134 | * sure that no other processor or I/O device can bring the block into the L2). |
| 1135 | * |
| 1136 | * To generate a VBFSBE or VBFDBE, software must first get the cache block into the cache with an |
| 1137 | * error using a PL2 that misses the L2. Then a store partial to a portion of the cache block |
| 1138 | * without the error must change the block to dirty. Then, a subsequent WBL2/WBIL2/victim will |
| 1139 | * trigger the VBFSBE/VBFDBE error. |
| 1140 | */ |
| 1141 | union bdk_l2c_ecc_ctl |
| 1142 | { |
| 1143 | uint64_t u; |
| 1144 | struct bdk_l2c_ecc_ctl_s |
| 1145 | { |
| 1146 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1147 | uint64_t reserved_12_63 : 52; |
| 1148 | uint64_t mibflip : 2; /**< [ 11: 10](R/W) Generate an ECC error in the MIB. See note above. */ |
| 1149 | uint64_t l2dflip : 2; /**< [ 9: 8](R/W) Generate an ECC error in the L2D. See note above. */ |
| 1150 | uint64_t l2tflip : 2; /**< [ 7: 6](R/W) Generate an ECC error in the L2T. */ |
| 1151 | uint64_t rdfflip : 2; /**< [ 5: 4](R/W) Generate an ECC error in RDF memory. */ |
| 1152 | uint64_t xmdflip : 2; /**< [ 3: 2](R/W) Generate an ECC error in all corresponding CBC XMD memories. */ |
| 1153 | uint64_t reserved_0_1 : 2; |
| 1154 | #else /* Word 0 - Little Endian */ |
| 1155 | uint64_t reserved_0_1 : 2; |
| 1156 | uint64_t xmdflip : 2; /**< [ 3: 2](R/W) Generate an ECC error in all corresponding CBC XMD memories. */ |
| 1157 | uint64_t rdfflip : 2; /**< [ 5: 4](R/W) Generate an ECC error in RDF memory. */ |
| 1158 | uint64_t l2tflip : 2; /**< [ 7: 6](R/W) Generate an ECC error in the L2T. */ |
| 1159 | uint64_t l2dflip : 2; /**< [ 9: 8](R/W) Generate an ECC error in the L2D. See note above. */ |
| 1160 | uint64_t mibflip : 2; /**< [ 11: 10](R/W) Generate an ECC error in the MIB. See note above. */ |
| 1161 | uint64_t reserved_12_63 : 52; |
| 1162 | #endif /* Word 0 - End */ |
| 1163 | } s; |
| 1164 | /* struct bdk_l2c_ecc_ctl_s cn; */ |
| 1165 | }; |
| 1166 | typedef union bdk_l2c_ecc_ctl bdk_l2c_ecc_ctl_t; |
| 1167 | |
| 1168 | #define BDK_L2C_ECC_CTL BDK_L2C_ECC_CTL_FUNC() |
| 1169 | static inline uint64_t BDK_L2C_ECC_CTL_FUNC(void) __attribute__ ((pure, always_inline)); |
| 1170 | static inline uint64_t BDK_L2C_ECC_CTL_FUNC(void) |
| 1171 | { |
| 1172 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX)) |
| 1173 | return 0x87e080800010ll; |
| 1174 | __bdk_csr_fatal("L2C_ECC_CTL", 0, 0, 0, 0, 0); |
| 1175 | } |
| 1176 | |
| 1177 | #define typedef_BDK_L2C_ECC_CTL bdk_l2c_ecc_ctl_t |
| 1178 | #define bustype_BDK_L2C_ECC_CTL BDK_CSR_TYPE_RSL |
| 1179 | #define basename_BDK_L2C_ECC_CTL "L2C_ECC_CTL" |
| 1180 | #define device_bar_BDK_L2C_ECC_CTL 0x0 /* PF_BAR0 */ |
| 1181 | #define busnum_BDK_L2C_ECC_CTL 0 |
| 1182 | #define arguments_BDK_L2C_ECC_CTL -1,-1,-1,-1 |
| 1183 | |
| 1184 | /** |
| 1185 | * Register (RSL) l2c_mci#_bist_status |
| 1186 | * |
| 1187 | * Level 2 MCI BIST Status (DCLK) Registers |
| 1188 | * If clear BIST is desired, [CLEAR_BIST] must be written to 1 before [START_BIST] is |
| 1189 | * written to 1 using a separate CSR write operation. [CLEAR_BIST] must not be changed |
| 1190 | * after writing [START_BIST] to 1 until the BIST operation completes (indicated by |
| 1191 | * [START_BIST] returning to 0) or operation is undefined. |
| 1192 | */ |
| 1193 | union bdk_l2c_mcix_bist_status |
| 1194 | { |
| 1195 | uint64_t u; |
| 1196 | struct bdk_l2c_mcix_bist_status_s |
| 1197 | { |
| 1198 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1199 | uint64_t start_bist : 1; /**< [ 63: 63](R/W/H) When written to 1, starts BIST. Remains 1 until BIST is complete. */ |
| 1200 | uint64_t clear_bist : 1; /**< [ 62: 62](R/W) When BIST is triggered, run clear BIST. */ |
| 1201 | uint64_t reserved_2_61 : 60; |
| 1202 | uint64_t vbffl : 2; /**< [ 1: 0](RO/H) BIST failure status for VBF0-1. */ |
| 1203 | #else /* Word 0 - Little Endian */ |
| 1204 | uint64_t vbffl : 2; /**< [ 1: 0](RO/H) BIST failure status for VBF0-1. */ |
| 1205 | uint64_t reserved_2_61 : 60; |
| 1206 | uint64_t clear_bist : 1; /**< [ 62: 62](R/W) When BIST is triggered, run clear BIST. */ |
| 1207 | uint64_t start_bist : 1; /**< [ 63: 63](R/W/H) When written to 1, starts BIST. Remains 1 until BIST is complete. */ |
| 1208 | #endif /* Word 0 - End */ |
| 1209 | } s; |
| 1210 | /* struct bdk_l2c_mcix_bist_status_s cn; */ |
| 1211 | }; |
| 1212 | typedef union bdk_l2c_mcix_bist_status bdk_l2c_mcix_bist_status_t; |
| 1213 | |
| 1214 | static inline uint64_t BDK_L2C_MCIX_BIST_STATUS(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1215 | static inline uint64_t BDK_L2C_MCIX_BIST_STATUS(unsigned long a) |
| 1216 | { |
| 1217 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 1218 | return 0x87e05c020000ll + 0x1000000ll * ((a) & 0x0); |
| 1219 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=2)) |
| 1220 | return 0x87e05c020000ll + 0x1000000ll * ((a) & 0x3); |
| 1221 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 1222 | return 0x87e05c020000ll + 0x1000000ll * ((a) & 0x3); |
| 1223 | __bdk_csr_fatal("L2C_MCIX_BIST_STATUS", 1, a, 0, 0, 0); |
| 1224 | } |
| 1225 | |
| 1226 | #define typedef_BDK_L2C_MCIX_BIST_STATUS(a) bdk_l2c_mcix_bist_status_t |
| 1227 | #define bustype_BDK_L2C_MCIX_BIST_STATUS(a) BDK_CSR_TYPE_RSL |
| 1228 | #define basename_BDK_L2C_MCIX_BIST_STATUS(a) "L2C_MCIX_BIST_STATUS" |
| 1229 | #define device_bar_BDK_L2C_MCIX_BIST_STATUS(a) 0x0 /* PF_BAR0 */ |
| 1230 | #define busnum_BDK_L2C_MCIX_BIST_STATUS(a) (a) |
| 1231 | #define arguments_BDK_L2C_MCIX_BIST_STATUS(a) (a),-1,-1,-1 |
| 1232 | |
| 1233 | /** |
| 1234 | * Register (RSL) l2c_mci#_err |
| 1235 | * |
| 1236 | * L2C MCI Error Information Registers |
| 1237 | * This register records error information for all MCI errors. |
| 1238 | * An error locks [VBF4], [INDEX], [SYN0] and [SYN1] and sets the bit corresponding to the error |
| 1239 | * received. VBFDBE errors take priority and will overwrite an earlier logged VBFSBE error. The |
| 1240 | * information from exactly one VBF read is present at any given time and serves to document |
| 1241 | * which error(s) were present in the read with the highest priority error. |
| 1242 | * The syndrome is recorded for DBE errors. |
| 1243 | */ |
| 1244 | union bdk_l2c_mcix_err |
| 1245 | { |
| 1246 | uint64_t u; |
| 1247 | struct bdk_l2c_mcix_err_s |
| 1248 | { |
| 1249 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1250 | uint64_t vbfdbe1 : 1; /**< [ 63: 63](RO/H) INDEX/SYN1 corresponds to a double-bit VBF ECC error. */ |
| 1251 | uint64_t vbfdbe0 : 1; /**< [ 62: 62](RO/H) INDEX/SYN0 corresponds to a double-bit VBF ECC error. */ |
| 1252 | uint64_t vbfsbe1 : 1; /**< [ 61: 61](RO/H) INDEX/SYN1 corresponds to a single-bit VBF ECC error. */ |
| 1253 | uint64_t vbfsbe0 : 1; /**< [ 60: 60](RO/H) INDEX/SYN0 corresponds to a single-bit VBF ECC error. */ |
| 1254 | uint64_t reserved_48_59 : 12; |
| 1255 | uint64_t syn1 : 8; /**< [ 47: 40](RO/H) Error syndrome for QW1 ([127:64]). |
| 1256 | Records only on single bit errors. |
| 1257 | |
| 1258 | Internal: |
| 1259 | See bug26334. */ |
| 1260 | uint64_t syn0 : 8; /**< [ 39: 32](RO/H) Error syndrome for QW0 ([63:0]). |
| 1261 | Records only on single bit errors. |
| 1262 | |
| 1263 | Internal: |
| 1264 | See bug26334. */ |
| 1265 | uint64_t reserved_12_31 : 20; |
| 1266 | uint64_t vbf4 : 1; /**< [ 11: 11](RO/H) When 1, errors were from VBF (4+a), when 0, from VBF (0+a). */ |
| 1267 | uint64_t index : 7; /**< [ 10: 4](RO/H) VBF index which was read and had the error(s). */ |
| 1268 | uint64_t reserved_0_3 : 4; |
| 1269 | #else /* Word 0 - Little Endian */ |
| 1270 | uint64_t reserved_0_3 : 4; |
| 1271 | uint64_t index : 7; /**< [ 10: 4](RO/H) VBF index which was read and had the error(s). */ |
| 1272 | uint64_t vbf4 : 1; /**< [ 11: 11](RO/H) When 1, errors were from VBF (4+a), when 0, from VBF (0+a). */ |
| 1273 | uint64_t reserved_12_31 : 20; |
| 1274 | uint64_t syn0 : 8; /**< [ 39: 32](RO/H) Error syndrome for QW0 ([63:0]). |
| 1275 | Records only on single bit errors. |
| 1276 | |
| 1277 | Internal: |
| 1278 | See bug26334. */ |
| 1279 | uint64_t syn1 : 8; /**< [ 47: 40](RO/H) Error syndrome for QW1 ([127:64]). |
| 1280 | Records only on single bit errors. |
| 1281 | |
| 1282 | Internal: |
| 1283 | See bug26334. */ |
| 1284 | uint64_t reserved_48_59 : 12; |
| 1285 | uint64_t vbfsbe0 : 1; /**< [ 60: 60](RO/H) INDEX/SYN0 corresponds to a single-bit VBF ECC error. */ |
| 1286 | uint64_t vbfsbe1 : 1; /**< [ 61: 61](RO/H) INDEX/SYN1 corresponds to a single-bit VBF ECC error. */ |
| 1287 | uint64_t vbfdbe0 : 1; /**< [ 62: 62](RO/H) INDEX/SYN0 corresponds to a double-bit VBF ECC error. */ |
| 1288 | uint64_t vbfdbe1 : 1; /**< [ 63: 63](RO/H) INDEX/SYN1 corresponds to a double-bit VBF ECC error. */ |
| 1289 | #endif /* Word 0 - End */ |
| 1290 | } s; |
| 1291 | /* struct bdk_l2c_mcix_err_s cn; */ |
| 1292 | }; |
| 1293 | typedef union bdk_l2c_mcix_err bdk_l2c_mcix_err_t; |
| 1294 | |
| 1295 | static inline uint64_t BDK_L2C_MCIX_ERR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1296 | static inline uint64_t BDK_L2C_MCIX_ERR(unsigned long a) |
| 1297 | { |
| 1298 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 1299 | return 0x87e05c010000ll + 0x1000000ll * ((a) & 0x0); |
| 1300 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=2)) |
| 1301 | return 0x87e05c010000ll + 0x1000000ll * ((a) & 0x3); |
| 1302 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=3)) |
| 1303 | return 0x87e05c010000ll + 0x1000000ll * ((a) & 0x3); |
| 1304 | __bdk_csr_fatal("L2C_MCIX_ERR", 1, a, 0, 0, 0); |
| 1305 | } |
| 1306 | |
| 1307 | #define typedef_BDK_L2C_MCIX_ERR(a) bdk_l2c_mcix_err_t |
| 1308 | #define bustype_BDK_L2C_MCIX_ERR(a) BDK_CSR_TYPE_RSL |
| 1309 | #define basename_BDK_L2C_MCIX_ERR(a) "L2C_MCIX_ERR" |
| 1310 | #define device_bar_BDK_L2C_MCIX_ERR(a) 0x0 /* PF_BAR0 */ |
| 1311 | #define busnum_BDK_L2C_MCIX_ERR(a) (a) |
| 1312 | #define arguments_BDK_L2C_MCIX_ERR(a) (a),-1,-1,-1 |
| 1313 | |
| 1314 | /** |
| 1315 | * Register (RSL) l2c_oci_ctl |
| 1316 | * |
| 1317 | * L2C CCPI Control Register |
| 1318 | */ |
| 1319 | union bdk_l2c_oci_ctl |
| 1320 | { |
| 1321 | uint64_t u; |
| 1322 | struct bdk_l2c_oci_ctl_s |
| 1323 | { |
| 1324 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1325 | uint64_t reserved_31_63 : 33; |
| 1326 | uint64_t ncpend : 1; /**< [ 30: 30](RO/H) An indication that a node change is pending. Hardware sets this bit when |
| 1327 | OCX_COM_NODE[ID] is changed and clears the bit when the node change has taken |
| 1328 | effect. */ |
| 1329 | uint64_t lock_local_cas : 1; /**< [ 29: 29](RO) Reserved. */ |
| 1330 | uint64_t lock_local_stc : 1; /**< [ 28: 28](RO) Reserved. */ |
| 1331 | uint64_t lock_local_pp : 1; /**< [ 27: 27](RO) Reserved. */ |
| 1332 | uint64_t lngtolen : 5; /**< [ 26: 22](R/W) Reserved. |
| 1333 | Internal: |
| 1334 | This only controls the GSYNC timeout in the L2C_CBCs in non-OCI chips. */ |
| 1335 | uint64_t shtolen : 5; /**< [ 21: 17](RO) Reserved. */ |
| 1336 | uint64_t shtoioen : 1; /**< [ 16: 16](RO) Reserved. */ |
| 1337 | uint64_t shtoen : 3; /**< [ 15: 13](RO) Reserved. */ |
| 1338 | uint64_t shto : 1; /**< [ 12: 12](RO) Reserved. */ |
| 1339 | uint64_t inv_mode : 2; /**< [ 11: 10](RO) Reserved. */ |
| 1340 | uint64_t cas_fdx : 1; /**< [ 9: 9](RO) Reserved. */ |
| 1341 | uint64_t rldd_psha : 1; /**< [ 8: 8](RO) Reserved. */ |
| 1342 | uint64_t lock_local_iob : 1; /**< [ 7: 7](RO) Reserved. */ |
| 1343 | uint64_t iofrcl : 1; /**< [ 6: 6](RO) Reserved. */ |
| 1344 | uint64_t reserved_4_5 : 2; |
| 1345 | uint64_t enaoci : 4; /**< [ 3: 0](RO) CCPI is not present. Any attempt to enable it will be ignored. */ |
| 1346 | #else /* Word 0 - Little Endian */ |
| 1347 | uint64_t enaoci : 4; /**< [ 3: 0](RO) CCPI is not present. Any attempt to enable it will be ignored. */ |
| 1348 | uint64_t reserved_4_5 : 2; |
| 1349 | uint64_t iofrcl : 1; /**< [ 6: 6](RO) Reserved. */ |
| 1350 | uint64_t lock_local_iob : 1; /**< [ 7: 7](RO) Reserved. */ |
| 1351 | uint64_t rldd_psha : 1; /**< [ 8: 8](RO) Reserved. */ |
| 1352 | uint64_t cas_fdx : 1; /**< [ 9: 9](RO) Reserved. */ |
| 1353 | uint64_t inv_mode : 2; /**< [ 11: 10](RO) Reserved. */ |
| 1354 | uint64_t shto : 1; /**< [ 12: 12](RO) Reserved. */ |
| 1355 | uint64_t shtoen : 3; /**< [ 15: 13](RO) Reserved. */ |
| 1356 | uint64_t shtoioen : 1; /**< [ 16: 16](RO) Reserved. */ |
| 1357 | uint64_t shtolen : 5; /**< [ 21: 17](RO) Reserved. */ |
| 1358 | uint64_t lngtolen : 5; /**< [ 26: 22](R/W) Reserved. |
| 1359 | Internal: |
| 1360 | This only controls the GSYNC timeout in the L2C_CBCs in non-OCI chips. */ |
| 1361 | uint64_t lock_local_pp : 1; /**< [ 27: 27](RO) Reserved. */ |
| 1362 | uint64_t lock_local_stc : 1; /**< [ 28: 28](RO) Reserved. */ |
| 1363 | uint64_t lock_local_cas : 1; /**< [ 29: 29](RO) Reserved. */ |
| 1364 | uint64_t ncpend : 1; /**< [ 30: 30](RO/H) An indication that a node change is pending. Hardware sets this bit when |
| 1365 | OCX_COM_NODE[ID] is changed and clears the bit when the node change has taken |
| 1366 | effect. */ |
| 1367 | uint64_t reserved_31_63 : 33; |
| 1368 | #endif /* Word 0 - End */ |
| 1369 | } s; |
| 1370 | struct bdk_l2c_oci_ctl_cn88xxp1 |
| 1371 | { |
| 1372 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1373 | uint64_t reserved_31_63 : 33; |
| 1374 | uint64_t reserved_30 : 1; |
| 1375 | uint64_t lock_local_cas : 1; /**< [ 29: 29](R/W) When set, L2 CAS operations to remote addresses which miss at the requester will be |
| 1376 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1377 | send the CAS request to be performed on the home node. For STC ops [LOCK_LOCAL_STC]. */ |
| 1378 | uint64_t lock_local_stc : 1; /**< [ 28: 28](R/W) When set, L2 STC operations to remote addresses which miss at the requester will be |
| 1379 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1380 | send the STC request to be performed on the home node. For CAS ops [LOCK_LOCAL_CAS]. */ |
| 1381 | uint64_t lock_local_pp : 1; /**< [ 27: 27](R/W) When clear, L2 atomic operations (excluding CAS/STC) core initiated requests to remote |
| 1382 | addresses which miss at the requester will send the atomic request to be performed on the |
| 1383 | home node. Default operation will instead be performed locally on the requesting node. |
| 1384 | For request initiated by IOB & for STC & CAS ops, see |
| 1385 | [LOCK_LOCAL_IOB]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. */ |
| 1386 | uint64_t lngtolen : 5; /**< [ 26: 22](R/W) Selects the bit in the counter for the long timeout value (timeout used when [SHTO] is |
| 1387 | clear). Values supported are between 11 and 29 (for a timeout values between 2^11 and |
| 1388 | 2^29). Actual timeout is between 1x and 2x this interval. For example if [LNGTOLEN] = 28 |
| 1389 | (the reset value), the timeout is between 256M and 512M core clocks. Note: a value of 0 |
| 1390 | disables this timer. */ |
| 1391 | uint64_t shtolen : 5; /**< [ 21: 17](R/W) Selects the bit in the counter for the short timeout value (timeout used when [SHTO] is |
| 1392 | set). Values supported are between 9 and 29 (for a timeout values between 2^9 and 2^29). |
| 1393 | Actual timeout is between 1x and 2x this interval. For example if [SHTOLEN] = 14 (the |
| 1394 | reset |
| 1395 | value), the timeout is between 16K and 32K core clocks. Note: a value of 0 disables this |
| 1396 | timer. */ |
| 1397 | uint64_t shtoioen : 1; /**< [ 16: 16](R/W) When set, any core issues any of an IO load, atomic, acking store, acking IOBADDR, or |
| 1398 | acking LMTST to a node that doesn't exist (existence defined by the ENAOCI bits), then the |
| 1399 | hardware sets [SHTO]. */ |
| 1400 | uint64_t shtoen : 3; /**< [ 15: 13](R/W) When set, if the corresponding CCPI link is down, the hardware sets [SHTO]. |
| 1401 | See OCX_COM_LINK(0..2)_CTL for a description of what events can contribute to the |
| 1402 | link_down condition. */ |
| 1403 | uint64_t shto : 1; /**< [ 12: 12](R/W/H) Use short timeout intervals. When set, core uses SDIDTTO for both DID and commit counter |
| 1404 | timeouts, rather than DIDTTO/DIDTTO2. Similarly, L2C will use short instead of long |
| 1405 | timeout. */ |
| 1406 | uint64_t inv_mode : 2; /**< [ 11: 10](R/W) Describes how aggressive to be when waiting for local invalidates before sending CCPI |
| 1407 | responses which act like commits at the remote. |
| 1408 | 0x0 = Conservative mode, waits until all local invalidates have been sent by their |
| 1409 | respective CBCs to the cores. |
| 1410 | 0x1 = Moderate mode, waits until all local invalidates have been sent to their respective |
| 1411 | CBCs, but not necessarily actually sent to the cores themselves. |
| 1412 | 0x2 = Aggressive mode, does not wait for local invalidates to begin their processing. */ |
| 1413 | uint64_t cas_fdx : 1; /**< [ 9: 9](R/W) When set, L2 STC/CAS operations performed at the home will immediately bring the block |
| 1414 | exclusive into the home. Default operation is to first request the block shared and only |
| 1415 | invalidate the remote if the compare succeeds. */ |
| 1416 | uint64_t rldd_psha : 1; /**< [ 8: 8](R/W) When set, RLDD is assumed to return a shared response (PSHA). Default operation assumes an |
| 1417 | exclusive response (PEMD). Note that an incorrect assumption only causes an extra tag |
| 1418 | write to be done upon receiving the response. */ |
| 1419 | uint64_t lock_local_iob : 1; /**< [ 7: 7](R/W) When set, L2 atomic operations (excluding CAS/STC) initiated by IOB to remote addresses |
| 1420 | which miss at the requester are performed locally on the requesting node. When clear the |
| 1421 | operation instead sends the atomic request to be performed on the home node. For request |
| 1422 | initiated by core for STC and CAS ops; see |
| 1423 | [LOCK_LOCAL_PP]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. |
| 1424 | Default is set to 1 (local locks). */ |
| 1425 | uint64_t iofrcl : 1; /**< [ 6: 6](R/W) When set, L2C services all I/O read and write operations on the local node, regardless of |
| 1426 | the value of the node ID bits in the physical address. During normal operation this bit is |
| 1427 | expected to be 0. Will only transition from 1 to 0, never from 0 to 1. */ |
| 1428 | uint64_t reserved_4_5 : 2; |
| 1429 | uint64_t enaoci : 4; /**< [ 3: 0](R/W) Enable CCPI processing (one bit per node_id). When set, perform CCPI |
| 1430 | processing. When clear, CCPI memory writes are blocked and CCPI memory reads |
| 1431 | return unpredictable data. When clear, |
| 1432 | CCPI I/O requests and MOC references are processed and sent to OCX where they are |
| 1433 | ultimately discarded. RDDISOCI/WRDISOCI/IORDDISOCI/IOWRDISOCI interrupts occur if and only |
| 1434 | if the corresponding ENAOCI\<node\> bit is clear. References to the local node (configured |
| 1435 | via OCX_COM_NODE[ID]) ignore the value of ENAOCI\<node\> because no CCPI processing is |
| 1436 | required. Similarly, all I/O references ignore the value of ENAOCI when |
| 1437 | L2C_OCI_CTL[IOFRCL] is set. */ |
| 1438 | #else /* Word 0 - Little Endian */ |
| 1439 | uint64_t enaoci : 4; /**< [ 3: 0](R/W) Enable CCPI processing (one bit per node_id). When set, perform CCPI |
| 1440 | processing. When clear, CCPI memory writes are blocked and CCPI memory reads |
| 1441 | return unpredictable data. When clear, |
| 1442 | CCPI I/O requests and MOC references are processed and sent to OCX where they are |
| 1443 | ultimately discarded. RDDISOCI/WRDISOCI/IORDDISOCI/IOWRDISOCI interrupts occur if and only |
| 1444 | if the corresponding ENAOCI\<node\> bit is clear. References to the local node (configured |
| 1445 | via OCX_COM_NODE[ID]) ignore the value of ENAOCI\<node\> because no CCPI processing is |
| 1446 | required. Similarly, all I/O references ignore the value of ENAOCI when |
| 1447 | L2C_OCI_CTL[IOFRCL] is set. */ |
| 1448 | uint64_t reserved_4_5 : 2; |
| 1449 | uint64_t iofrcl : 1; /**< [ 6: 6](R/W) When set, L2C services all I/O read and write operations on the local node, regardless of |
| 1450 | the value of the node ID bits in the physical address. During normal operation this bit is |
| 1451 | expected to be 0. Will only transition from 1 to 0, never from 0 to 1. */ |
| 1452 | uint64_t lock_local_iob : 1; /**< [ 7: 7](R/W) When set, L2 atomic operations (excluding CAS/STC) initiated by IOB to remote addresses |
| 1453 | which miss at the requester are performed locally on the requesting node. When clear the |
| 1454 | operation instead sends the atomic request to be performed on the home node. For request |
| 1455 | initiated by core for STC and CAS ops; see |
| 1456 | [LOCK_LOCAL_PP]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. |
| 1457 | Default is set to 1 (local locks). */ |
| 1458 | uint64_t rldd_psha : 1; /**< [ 8: 8](R/W) When set, RLDD is assumed to return a shared response (PSHA). Default operation assumes an |
| 1459 | exclusive response (PEMD). Note that an incorrect assumption only causes an extra tag |
| 1460 | write to be done upon receiving the response. */ |
| 1461 | uint64_t cas_fdx : 1; /**< [ 9: 9](R/W) When set, L2 STC/CAS operations performed at the home will immediately bring the block |
| 1462 | exclusive into the home. Default operation is to first request the block shared and only |
| 1463 | invalidate the remote if the compare succeeds. */ |
| 1464 | uint64_t inv_mode : 2; /**< [ 11: 10](R/W) Describes how aggressive to be when waiting for local invalidates before sending CCPI |
| 1465 | responses which act like commits at the remote. |
| 1466 | 0x0 = Conservative mode, waits until all local invalidates have been sent by their |
| 1467 | respective CBCs to the cores. |
| 1468 | 0x1 = Moderate mode, waits until all local invalidates have been sent to their respective |
| 1469 | CBCs, but not necessarily actually sent to the cores themselves. |
| 1470 | 0x2 = Aggressive mode, does not wait for local invalidates to begin their processing. */ |
| 1471 | uint64_t shto : 1; /**< [ 12: 12](R/W/H) Use short timeout intervals. When set, core uses SDIDTTO for both DID and commit counter |
| 1472 | timeouts, rather than DIDTTO/DIDTTO2. Similarly, L2C will use short instead of long |
| 1473 | timeout. */ |
| 1474 | uint64_t shtoen : 3; /**< [ 15: 13](R/W) When set, if the corresponding CCPI link is down, the hardware sets [SHTO]. |
| 1475 | See OCX_COM_LINK(0..2)_CTL for a description of what events can contribute to the |
| 1476 | link_down condition. */ |
| 1477 | uint64_t shtoioen : 1; /**< [ 16: 16](R/W) When set, any core issues any of an IO load, atomic, acking store, acking IOBADDR, or |
| 1478 | acking LMTST to a node that doesn't exist (existence defined by the ENAOCI bits), then the |
| 1479 | hardware sets [SHTO]. */ |
| 1480 | uint64_t shtolen : 5; /**< [ 21: 17](R/W) Selects the bit in the counter for the short timeout value (timeout used when [SHTO] is |
| 1481 | set). Values supported are between 9 and 29 (for a timeout values between 2^9 and 2^29). |
| 1482 | Actual timeout is between 1x and 2x this interval. For example if [SHTOLEN] = 14 (the |
| 1483 | reset |
| 1484 | value), the timeout is between 16K and 32K core clocks. Note: a value of 0 disables this |
| 1485 | timer. */ |
| 1486 | uint64_t lngtolen : 5; /**< [ 26: 22](R/W) Selects the bit in the counter for the long timeout value (timeout used when [SHTO] is |
| 1487 | clear). Values supported are between 11 and 29 (for a timeout values between 2^11 and |
| 1488 | 2^29). Actual timeout is between 1x and 2x this interval. For example if [LNGTOLEN] = 28 |
| 1489 | (the reset value), the timeout is between 256M and 512M core clocks. Note: a value of 0 |
| 1490 | disables this timer. */ |
| 1491 | uint64_t lock_local_pp : 1; /**< [ 27: 27](R/W) When clear, L2 atomic operations (excluding CAS/STC) core initiated requests to remote |
| 1492 | addresses which miss at the requester will send the atomic request to be performed on the |
| 1493 | home node. Default operation will instead be performed locally on the requesting node. |
| 1494 | For request initiated by IOB & for STC & CAS ops, see |
| 1495 | [LOCK_LOCAL_IOB]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. */ |
| 1496 | uint64_t lock_local_stc : 1; /**< [ 28: 28](R/W) When set, L2 STC operations to remote addresses which miss at the requester will be |
| 1497 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1498 | send the STC request to be performed on the home node. For CAS ops [LOCK_LOCAL_CAS]. */ |
| 1499 | uint64_t lock_local_cas : 1; /**< [ 29: 29](R/W) When set, L2 CAS operations to remote addresses which miss at the requester will be |
| 1500 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1501 | send the CAS request to be performed on the home node. For STC ops [LOCK_LOCAL_STC]. */ |
| 1502 | uint64_t reserved_30 : 1; |
| 1503 | uint64_t reserved_31_63 : 33; |
| 1504 | #endif /* Word 0 - End */ |
| 1505 | } cn88xxp1; |
| 1506 | /* struct bdk_l2c_oci_ctl_s cn81xx; */ |
| 1507 | /* struct bdk_l2c_oci_ctl_s cn83xx; */ |
| 1508 | struct bdk_l2c_oci_ctl_cn88xxp2 |
| 1509 | { |
| 1510 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1511 | uint64_t reserved_31_63 : 33; |
| 1512 | uint64_t ncpend : 1; /**< [ 30: 30](RO/H) An indication that a node change is pending. Hardware sets this bit when |
| 1513 | OCX_COM_NODE[ID] is changed and clears the bit when the node change has taken |
| 1514 | effect. */ |
| 1515 | uint64_t lock_local_cas : 1; /**< [ 29: 29](R/W) When set, L2 CAS operations to remote addresses which miss at the requester will be |
| 1516 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1517 | send the CAS request to be performed on the home node. For STC ops [LOCK_LOCAL_STC]. */ |
| 1518 | uint64_t lock_local_stc : 1; /**< [ 28: 28](R/W) When set, L2 STC operations to remote addresses which miss at the requester will be |
| 1519 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1520 | send the STC request to be performed on the home node. For CAS ops [LOCK_LOCAL_CAS]. */ |
| 1521 | uint64_t lock_local_pp : 1; /**< [ 27: 27](R/W) When clear, L2 atomic operations (excluding CAS/STC) core initiated requests to remote |
| 1522 | addresses which miss at the requester will send the atomic request to be performed on the |
| 1523 | home node. Default operation will instead be performed locally on the requesting node. |
| 1524 | For request initiated by IOB & for STC & CAS ops, see |
| 1525 | [LOCK_LOCAL_IOB]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. */ |
| 1526 | uint64_t lngtolen : 5; /**< [ 26: 22](R/W) Selects the bit in the counter for the long timeout value (timeout used when [SHTO] is |
| 1527 | clear). Values supported are between 11 and 29 (for a timeout values between 2^11 and |
| 1528 | 2^29). Actual timeout is between 1x and 2x this interval. For example if [LNGTOLEN] = 28 |
| 1529 | (the reset value), the timeout is between 256M and 512M core clocks. Note: a value of 0 |
| 1530 | disables this timer. */ |
| 1531 | uint64_t shtolen : 5; /**< [ 21: 17](R/W) Selects the bit in the counter for the short timeout value (timeout used when [SHTO] is |
| 1532 | set). Values supported are between 9 and 29 (for a timeout values between 2^9 and 2^29). |
| 1533 | Actual timeout is between 1x and 2x this interval. For example if [SHTOLEN] = 14 (the |
| 1534 | reset |
| 1535 | value), the timeout is between 16K and 32K core clocks. Note: a value of 0 disables this |
| 1536 | timer. */ |
| 1537 | uint64_t shtoioen : 1; /**< [ 16: 16](R/W) When set, any core issues any of an IO load, atomic, acking store, acking IOBADDR, or |
| 1538 | acking LMTST to a node that doesn't exist (existence defined by the ENAOCI bits), then the |
| 1539 | hardware sets [SHTO]. */ |
| 1540 | uint64_t shtoen : 3; /**< [ 15: 13](R/W) When set, if the corresponding CCPI link is down, the hardware sets [SHTO]. |
| 1541 | See OCX_COM_LINK(0..2)_CTL for a description of what events can contribute to the |
| 1542 | link_down condition. */ |
| 1543 | uint64_t shto : 1; /**< [ 12: 12](R/W/H) Use short timeout intervals. When set, core uses SDIDTTO for both DID and commit counter |
| 1544 | timeouts, rather than DIDTTO/DIDTTO2. Similarly, L2C will use short instead of long |
| 1545 | timeout. */ |
| 1546 | uint64_t inv_mode : 2; /**< [ 11: 10](R/W) Describes how aggressive to be when waiting for local invalidates before sending CCPI |
| 1547 | responses which act like commits at the remote. |
| 1548 | 0x0 = Conservative mode, waits until all local invalidates have been sent by their |
| 1549 | respective CBCs to the cores. |
| 1550 | 0x1 = Moderate mode, waits until all local invalidates have been sent to their respective |
| 1551 | CBCs, but not necessarily actually sent to the cores themselves. |
| 1552 | 0x2 = Aggressive mode, does not wait for local invalidates to begin their processing. */ |
| 1553 | uint64_t cas_fdx : 1; /**< [ 9: 9](R/W) When set, L2 STC/CAS operations performed at the home will immediately bring the block |
| 1554 | exclusive into the home. Default operation is to first request the block shared and only |
| 1555 | invalidate the remote if the compare succeeds. */ |
| 1556 | uint64_t rldd_psha : 1; /**< [ 8: 8](R/W) When set, RLDD is assumed to return a shared response (PSHA). Default operation assumes an |
| 1557 | exclusive response (PEMD). Note that an incorrect assumption only causes an extra tag |
| 1558 | write to be done upon receiving the response. */ |
| 1559 | uint64_t lock_local_iob : 1; /**< [ 7: 7](R/W) When set, L2 atomic operations (excluding CAS/STC) initiated by IOB to remote addresses |
| 1560 | which miss at the requester are performed locally on the requesting node. When clear the |
| 1561 | operation instead sends the atomic request to be performed on the home node. For request |
| 1562 | initiated by core for STC and CAS ops; see |
| 1563 | [LOCK_LOCAL_PP]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. |
| 1564 | Default is set to 1 (local locks). */ |
| 1565 | uint64_t iofrcl : 1; /**< [ 6: 6](R/W) When set, L2C services all I/O read and write operations on the local node, regardless of |
| 1566 | the value of the node ID bits in the physical address. During normal operation this bit is |
| 1567 | expected to be 0. Will only transition from 1 to 0, never from 0 to 1. */ |
| 1568 | uint64_t reserved_4_5 : 2; |
| 1569 | uint64_t enaoci : 4; /**< [ 3: 0](R/W) Enable CCPI processing (one bit per node_id). When set, perform CCPI |
| 1570 | processing. When clear, CCPI memory writes are blocked and CCPI memory reads |
| 1571 | return unpredictable data. When clear, |
| 1572 | CCPI I/O requests and MOC references are processed and sent to OCX where they are |
| 1573 | ultimately discarded. RDDISOCI/WRDISOCI/IORDDISOCI/IOWRDISOCI interrupts occur if and only |
| 1574 | if the corresponding ENAOCI\<node\> bit is clear. References to the local node (configured |
| 1575 | via OCX_COM_NODE[ID]) ignore the value of ENAOCI\<node\> because no CCPI processing is |
| 1576 | required. Similarly, all I/O references ignore the value of ENAOCI when |
| 1577 | L2C_OCI_CTL[IOFRCL] is set. */ |
| 1578 | #else /* Word 0 - Little Endian */ |
| 1579 | uint64_t enaoci : 4; /**< [ 3: 0](R/W) Enable CCPI processing (one bit per node_id). When set, perform CCPI |
| 1580 | processing. When clear, CCPI memory writes are blocked and CCPI memory reads |
| 1581 | return unpredictable data. When clear, |
| 1582 | CCPI I/O requests and MOC references are processed and sent to OCX where they are |
| 1583 | ultimately discarded. RDDISOCI/WRDISOCI/IORDDISOCI/IOWRDISOCI interrupts occur if and only |
| 1584 | if the corresponding ENAOCI\<node\> bit is clear. References to the local node (configured |
| 1585 | via OCX_COM_NODE[ID]) ignore the value of ENAOCI\<node\> because no CCPI processing is |
| 1586 | required. Similarly, all I/O references ignore the value of ENAOCI when |
| 1587 | L2C_OCI_CTL[IOFRCL] is set. */ |
| 1588 | uint64_t reserved_4_5 : 2; |
| 1589 | uint64_t iofrcl : 1; /**< [ 6: 6](R/W) When set, L2C services all I/O read and write operations on the local node, regardless of |
| 1590 | the value of the node ID bits in the physical address. During normal operation this bit is |
| 1591 | expected to be 0. Will only transition from 1 to 0, never from 0 to 1. */ |
| 1592 | uint64_t lock_local_iob : 1; /**< [ 7: 7](R/W) When set, L2 atomic operations (excluding CAS/STC) initiated by IOB to remote addresses |
| 1593 | which miss at the requester are performed locally on the requesting node. When clear the |
| 1594 | operation instead sends the atomic request to be performed on the home node. For request |
| 1595 | initiated by core for STC and CAS ops; see |
| 1596 | [LOCK_LOCAL_PP]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. |
| 1597 | Default is set to 1 (local locks). */ |
| 1598 | uint64_t rldd_psha : 1; /**< [ 8: 8](R/W) When set, RLDD is assumed to return a shared response (PSHA). Default operation assumes an |
| 1599 | exclusive response (PEMD). Note that an incorrect assumption only causes an extra tag |
| 1600 | write to be done upon receiving the response. */ |
| 1601 | uint64_t cas_fdx : 1; /**< [ 9: 9](R/W) When set, L2 STC/CAS operations performed at the home will immediately bring the block |
| 1602 | exclusive into the home. Default operation is to first request the block shared and only |
| 1603 | invalidate the remote if the compare succeeds. */ |
| 1604 | uint64_t inv_mode : 2; /**< [ 11: 10](R/W) Describes how aggressive to be when waiting for local invalidates before sending CCPI |
| 1605 | responses which act like commits at the remote. |
| 1606 | 0x0 = Conservative mode, waits until all local invalidates have been sent by their |
| 1607 | respective CBCs to the cores. |
| 1608 | 0x1 = Moderate mode, waits until all local invalidates have been sent to their respective |
| 1609 | CBCs, but not necessarily actually sent to the cores themselves. |
| 1610 | 0x2 = Aggressive mode, does not wait for local invalidates to begin their processing. */ |
| 1611 | uint64_t shto : 1; /**< [ 12: 12](R/W/H) Use short timeout intervals. When set, core uses SDIDTTO for both DID and commit counter |
| 1612 | timeouts, rather than DIDTTO/DIDTTO2. Similarly, L2C will use short instead of long |
| 1613 | timeout. */ |
| 1614 | uint64_t shtoen : 3; /**< [ 15: 13](R/W) When set, if the corresponding CCPI link is down, the hardware sets [SHTO]. |
| 1615 | See OCX_COM_LINK(0..2)_CTL for a description of what events can contribute to the |
| 1616 | link_down condition. */ |
| 1617 | uint64_t shtoioen : 1; /**< [ 16: 16](R/W) When set, any core issues any of an IO load, atomic, acking store, acking IOBADDR, or |
| 1618 | acking LMTST to a node that doesn't exist (existence defined by the ENAOCI bits), then the |
| 1619 | hardware sets [SHTO]. */ |
| 1620 | uint64_t shtolen : 5; /**< [ 21: 17](R/W) Selects the bit in the counter for the short timeout value (timeout used when [SHTO] is |
| 1621 | set). Values supported are between 9 and 29 (for a timeout values between 2^9 and 2^29). |
| 1622 | Actual timeout is between 1x and 2x this interval. For example if [SHTOLEN] = 14 (the |
| 1623 | reset |
| 1624 | value), the timeout is between 16K and 32K core clocks. Note: a value of 0 disables this |
| 1625 | timer. */ |
| 1626 | uint64_t lngtolen : 5; /**< [ 26: 22](R/W) Selects the bit in the counter for the long timeout value (timeout used when [SHTO] is |
| 1627 | clear). Values supported are between 11 and 29 (for a timeout values between 2^11 and |
| 1628 | 2^29). Actual timeout is between 1x and 2x this interval. For example if [LNGTOLEN] = 28 |
| 1629 | (the reset value), the timeout is between 256M and 512M core clocks. Note: a value of 0 |
| 1630 | disables this timer. */ |
| 1631 | uint64_t lock_local_pp : 1; /**< [ 27: 27](R/W) When clear, L2 atomic operations (excluding CAS/STC) core initiated requests to remote |
| 1632 | addresses which miss at the requester will send the atomic request to be performed on the |
| 1633 | home node. Default operation will instead be performed locally on the requesting node. |
| 1634 | For request initiated by IOB & for STC & CAS ops, see |
| 1635 | [LOCK_LOCAL_IOB]/[LOCK_LOCAL_STC]/[LOCK_LOCAL_CAS]. */ |
| 1636 | uint64_t lock_local_stc : 1; /**< [ 28: 28](R/W) When set, L2 STC operations to remote addresses which miss at the requester will be |
| 1637 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1638 | send the STC request to be performed on the home node. For CAS ops [LOCK_LOCAL_CAS]. */ |
| 1639 | uint64_t lock_local_cas : 1; /**< [ 29: 29](R/W) When set, L2 CAS operations to remote addresses which miss at the requester will be |
| 1640 | performed locally (if possible) on the requesting node. Default operation will instead |
| 1641 | send the CAS request to be performed on the home node. For STC ops [LOCK_LOCAL_STC]. */ |
| 1642 | uint64_t ncpend : 1; /**< [ 30: 30](RO/H) An indication that a node change is pending. Hardware sets this bit when |
| 1643 | OCX_COM_NODE[ID] is changed and clears the bit when the node change has taken |
| 1644 | effect. */ |
| 1645 | uint64_t reserved_31_63 : 33; |
| 1646 | #endif /* Word 0 - End */ |
| 1647 | } cn88xxp2; |
| 1648 | }; |
| 1649 | typedef union bdk_l2c_oci_ctl bdk_l2c_oci_ctl_t; |
| 1650 | |
| 1651 | #define BDK_L2C_OCI_CTL BDK_L2C_OCI_CTL_FUNC() |
| 1652 | static inline uint64_t BDK_L2C_OCI_CTL_FUNC(void) __attribute__ ((pure, always_inline)); |
| 1653 | static inline uint64_t BDK_L2C_OCI_CTL_FUNC(void) |
| 1654 | { |
| 1655 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX)) |
| 1656 | return 0x87e080800020ll; |
| 1657 | __bdk_csr_fatal("L2C_OCI_CTL", 0, 0, 0, 0, 0); |
| 1658 | } |
| 1659 | |
| 1660 | #define typedef_BDK_L2C_OCI_CTL bdk_l2c_oci_ctl_t |
| 1661 | #define bustype_BDK_L2C_OCI_CTL BDK_CSR_TYPE_RSL |
| 1662 | #define basename_BDK_L2C_OCI_CTL "L2C_OCI_CTL" |
| 1663 | #define device_bar_BDK_L2C_OCI_CTL 0x0 /* PF_BAR0 */ |
| 1664 | #define busnum_BDK_L2C_OCI_CTL 0 |
| 1665 | #define arguments_BDK_L2C_OCI_CTL -1,-1,-1,-1 |
| 1666 | |
| 1667 | /** |
| 1668 | * Register (RSL) l2c_qos_pp# |
| 1669 | * |
| 1670 | * L2C Core QOS Level Registers |
| 1671 | */ |
| 1672 | union bdk_l2c_qos_ppx |
| 1673 | { |
| 1674 | uint64_t u; |
| 1675 | struct bdk_l2c_qos_ppx_s |
| 1676 | { |
| 1677 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1678 | uint64_t reserved_3_63 : 61; |
| 1679 | uint64_t lvl : 3; /**< [ 2: 0](R/W) QOS level to use for this core. */ |
| 1680 | #else /* Word 0 - Little Endian */ |
| 1681 | uint64_t lvl : 3; /**< [ 2: 0](R/W) QOS level to use for this core. */ |
| 1682 | uint64_t reserved_3_63 : 61; |
| 1683 | #endif /* Word 0 - End */ |
| 1684 | } s; |
| 1685 | /* struct bdk_l2c_qos_ppx_s cn; */ |
| 1686 | }; |
| 1687 | typedef union bdk_l2c_qos_ppx bdk_l2c_qos_ppx_t; |
| 1688 | |
| 1689 | static inline uint64_t BDK_L2C_QOS_PPX(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1690 | static inline uint64_t BDK_L2C_QOS_PPX(unsigned long a) |
| 1691 | { |
| 1692 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a<=3)) |
| 1693 | return 0x87e080880000ll + 8ll * ((a) & 0x3); |
| 1694 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=23)) |
| 1695 | return 0x87e080880000ll + 8ll * ((a) & 0x1f); |
| 1696 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=47)) |
| 1697 | return 0x87e080880000ll + 8ll * ((a) & 0x3f); |
| 1698 | __bdk_csr_fatal("L2C_QOS_PPX", 1, a, 0, 0, 0); |
| 1699 | } |
| 1700 | |
| 1701 | #define typedef_BDK_L2C_QOS_PPX(a) bdk_l2c_qos_ppx_t |
| 1702 | #define bustype_BDK_L2C_QOS_PPX(a) BDK_CSR_TYPE_RSL |
| 1703 | #define basename_BDK_L2C_QOS_PPX(a) "L2C_QOS_PPX" |
| 1704 | #define device_bar_BDK_L2C_QOS_PPX(a) 0x0 /* PF_BAR0 */ |
| 1705 | #define busnum_BDK_L2C_QOS_PPX(a) (a) |
| 1706 | #define arguments_BDK_L2C_QOS_PPX(a) (a),-1,-1,-1 |
| 1707 | |
| 1708 | /** |
| 1709 | * Register (RSL) l2c_qos_wgt |
| 1710 | * |
| 1711 | * L2C QOS Weight Register |
| 1712 | */ |
| 1713 | union bdk_l2c_qos_wgt |
| 1714 | { |
| 1715 | uint64_t u; |
| 1716 | struct bdk_l2c_qos_wgt_s |
| 1717 | { |
| 1718 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1719 | uint64_t wgt7 : 8; /**< [ 63: 56](R/W) Weight for QOS level 7. */ |
| 1720 | uint64_t wgt6 : 8; /**< [ 55: 48](R/W) Weight for QOS level 6. */ |
| 1721 | uint64_t wgt5 : 8; /**< [ 47: 40](R/W) Weight for QOS level 5. */ |
| 1722 | uint64_t wgt4 : 8; /**< [ 39: 32](R/W) Weight for QOS level 4. */ |
| 1723 | uint64_t wgt3 : 8; /**< [ 31: 24](R/W) Weight for QOS level 3. */ |
| 1724 | uint64_t wgt2 : 8; /**< [ 23: 16](R/W) Weight for QOS level 2. */ |
| 1725 | uint64_t wgt1 : 8; /**< [ 15: 8](R/W) Weight for QOS level 1. */ |
| 1726 | uint64_t wgt0 : 8; /**< [ 7: 0](R/W) Weight for QOS level 0. */ |
| 1727 | #else /* Word 0 - Little Endian */ |
| 1728 | uint64_t wgt0 : 8; /**< [ 7: 0](R/W) Weight for QOS level 0. */ |
| 1729 | uint64_t wgt1 : 8; /**< [ 15: 8](R/W) Weight for QOS level 1. */ |
| 1730 | uint64_t wgt2 : 8; /**< [ 23: 16](R/W) Weight for QOS level 2. */ |
| 1731 | uint64_t wgt3 : 8; /**< [ 31: 24](R/W) Weight for QOS level 3. */ |
| 1732 | uint64_t wgt4 : 8; /**< [ 39: 32](R/W) Weight for QOS level 4. */ |
| 1733 | uint64_t wgt5 : 8; /**< [ 47: 40](R/W) Weight for QOS level 5. */ |
| 1734 | uint64_t wgt6 : 8; /**< [ 55: 48](R/W) Weight for QOS level 6. */ |
| 1735 | uint64_t wgt7 : 8; /**< [ 63: 56](R/W) Weight for QOS level 7. */ |
| 1736 | #endif /* Word 0 - End */ |
| 1737 | } s; |
| 1738 | /* struct bdk_l2c_qos_wgt_s cn; */ |
| 1739 | }; |
| 1740 | typedef union bdk_l2c_qos_wgt bdk_l2c_qos_wgt_t; |
| 1741 | |
| 1742 | #define BDK_L2C_QOS_WGT BDK_L2C_QOS_WGT_FUNC() |
| 1743 | static inline uint64_t BDK_L2C_QOS_WGT_FUNC(void) __attribute__ ((pure, always_inline)); |
| 1744 | static inline uint64_t BDK_L2C_QOS_WGT_FUNC(void) |
| 1745 | { |
| 1746 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX)) |
| 1747 | return 0x87e080800008ll; |
| 1748 | __bdk_csr_fatal("L2C_QOS_WGT", 0, 0, 0, 0, 0); |
| 1749 | } |
| 1750 | |
| 1751 | #define typedef_BDK_L2C_QOS_WGT bdk_l2c_qos_wgt_t |
| 1752 | #define bustype_BDK_L2C_QOS_WGT BDK_CSR_TYPE_RSL |
| 1753 | #define basename_BDK_L2C_QOS_WGT "L2C_QOS_WGT" |
| 1754 | #define device_bar_BDK_L2C_QOS_WGT 0x0 /* PF_BAR0 */ |
| 1755 | #define busnum_BDK_L2C_QOS_WGT 0 |
| 1756 | #define arguments_BDK_L2C_QOS_WGT -1,-1,-1,-1 |
| 1757 | |
| 1758 | /** |
| 1759 | * Register (RSL) l2c_tad#_dll |
| 1760 | * |
| 1761 | * L2C TAD DLL Observability Register |
| 1762 | * This register provides the parameters for DLL observability. |
| 1763 | */ |
| 1764 | union bdk_l2c_tadx_dll |
| 1765 | { |
| 1766 | uint64_t u; |
| 1767 | struct bdk_l2c_tadx_dll_s |
| 1768 | { |
| 1769 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1770 | uint64_t reserved_60_63 : 4; |
| 1771 | uint64_t max_dll_setting : 12; /**< [ 59: 48](RO/H) Max reported DLL setting. */ |
| 1772 | uint64_t min_dll_setting : 12; /**< [ 47: 36](RO/H) Min reported DLL setting. */ |
| 1773 | uint64_t pd_pos_rclk_refclk : 1; /**< [ 35: 35](RO/H) Phase detector output. */ |
| 1774 | uint64_t pdl_rclk_refclk : 1; /**< [ 34: 34](RO/H) Phase detector output. */ |
| 1775 | uint64_t pdr_rclk_refclk : 1; /**< [ 33: 33](RO/H) Phase detector output. */ |
| 1776 | uint64_t reserved_32 : 1; |
| 1777 | uint64_t dly_elem_enable : 16; /**< [ 31: 16](RO/H) Delay element enable. */ |
| 1778 | uint64_t dll_setting : 12; /**< [ 15: 4](RO/H) DLL setting. */ |
| 1779 | uint64_t reserved_1_3 : 3; |
| 1780 | uint64_t dll_lock : 1; /**< [ 0: 0](RO/H) DLL lock: 1 = locked, 0 = unlocked. */ |
| 1781 | #else /* Word 0 - Little Endian */ |
| 1782 | uint64_t dll_lock : 1; /**< [ 0: 0](RO/H) DLL lock: 1 = locked, 0 = unlocked. */ |
| 1783 | uint64_t reserved_1_3 : 3; |
| 1784 | uint64_t dll_setting : 12; /**< [ 15: 4](RO/H) DLL setting. */ |
| 1785 | uint64_t dly_elem_enable : 16; /**< [ 31: 16](RO/H) Delay element enable. */ |
| 1786 | uint64_t reserved_32 : 1; |
| 1787 | uint64_t pdr_rclk_refclk : 1; /**< [ 33: 33](RO/H) Phase detector output. */ |
| 1788 | uint64_t pdl_rclk_refclk : 1; /**< [ 34: 34](RO/H) Phase detector output. */ |
| 1789 | uint64_t pd_pos_rclk_refclk : 1; /**< [ 35: 35](RO/H) Phase detector output. */ |
| 1790 | uint64_t min_dll_setting : 12; /**< [ 47: 36](RO/H) Min reported DLL setting. */ |
| 1791 | uint64_t max_dll_setting : 12; /**< [ 59: 48](RO/H) Max reported DLL setting. */ |
| 1792 | uint64_t reserved_60_63 : 4; |
| 1793 | #endif /* Word 0 - End */ |
| 1794 | } s; |
| 1795 | /* struct bdk_l2c_tadx_dll_s cn; */ |
| 1796 | }; |
| 1797 | typedef union bdk_l2c_tadx_dll bdk_l2c_tadx_dll_t; |
| 1798 | |
| 1799 | static inline uint64_t BDK_L2C_TADX_DLL(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1800 | static inline uint64_t BDK_L2C_TADX_DLL(unsigned long a) |
| 1801 | { |
| 1802 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 1803 | return 0x87e050030000ll + 0x1000000ll * ((a) & 0x0); |
| 1804 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 1805 | return 0x87e050030000ll + 0x1000000ll * ((a) & 0x3); |
| 1806 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 1807 | return 0x87e050030000ll + 0x1000000ll * ((a) & 0x7); |
| 1808 | __bdk_csr_fatal("L2C_TADX_DLL", 1, a, 0, 0, 0); |
| 1809 | } |
| 1810 | |
| 1811 | #define typedef_BDK_L2C_TADX_DLL(a) bdk_l2c_tadx_dll_t |
| 1812 | #define bustype_BDK_L2C_TADX_DLL(a) BDK_CSR_TYPE_RSL |
| 1813 | #define basename_BDK_L2C_TADX_DLL(a) "L2C_TADX_DLL" |
| 1814 | #define device_bar_BDK_L2C_TADX_DLL(a) 0x0 /* PF_BAR0 */ |
| 1815 | #define busnum_BDK_L2C_TADX_DLL(a) (a) |
| 1816 | #define arguments_BDK_L2C_TADX_DLL(a) (a),-1,-1,-1 |
| 1817 | |
| 1818 | /** |
| 1819 | * Register (RSL) l2c_tad#_err |
| 1820 | * |
| 1821 | * L2C TAD Request Error Info Registers |
| 1822 | * This register records error information for *DISOCI and *NXM |
| 1823 | * interrupts. The NXM logic only applies to local addresses. A command for |
| 1824 | * a remote address does not cause a [RDNXM]/[WRNXM] on the requesting node, but |
| 1825 | * may on the remote node. Similarly, [RDDISOCI]/[WRDISOCI] is always for a remote |
| 1826 | * address. The first [WRDISOCI]/[WRNXM] error will lock the register until the |
| 1827 | * logged error type is cleared; [RDDISOCI]/[RDNXM] never locks the register. |
| 1828 | */ |
| 1829 | union bdk_l2c_tadx_err |
| 1830 | { |
| 1831 | uint64_t u; |
| 1832 | struct bdk_l2c_tadx_err_s |
| 1833 | { |
| 1834 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1835 | uint64_t rdnxm : 1; /**< [ 63: 63](RO/H) Logged information is for a L2C_TAD()_INT_W1C[RDNXM] error. */ |
| 1836 | uint64_t wrnxm : 1; /**< [ 62: 62](RO/H) Logged information is for a L2C_TAD()_INT_W1C[WRNXM] error. */ |
| 1837 | uint64_t rddisoci : 1; /**< [ 61: 61](RO/H) Logged information is for a L2C_TAD()_INT_W1C[RDDISOCI] error. */ |
| 1838 | uint64_t wrdisoci : 1; /**< [ 60: 60](RO/H) Logged information is for a L2C_TAD()_INT_W1C[WRDISOCI] error. */ |
| 1839 | uint64_t nonsec : 1; /**< [ 59: 59](RO/H) Nonsecure (NS) bit of request causing error. */ |
| 1840 | uint64_t cmd : 8; /**< [ 58: 51](RO/H) Encoding of XMC or CCPI command causing error. |
| 1841 | Internal: |
| 1842 | If CMD\<7\>==1, use XMC_CMD_E to |
| 1843 | decode CMD\<6:0\>. If CMD\<7:5\>==0, use OCI_MREQ_CMD_E to decode CMD\<4:0\>. If CMD\<7:5\>==1, |
| 1844 | use OCI_MFWD_CMD_E to decode CMD\<4:0\>. If CMD\<7:5\>==2, use OCI_MRSP_CMD_E to decode |
| 1845 | CMD\<4:0\>. */ |
| 1846 | uint64_t source : 7; /**< [ 50: 44](RO/H) XMC source of request causing error. If [SOURCE]\<6\>==0, then [SOURCE]\<5:0\> is |
| 1847 | PPID, else [SOURCE]\<3:0\> is BUSID of the IOB which made the request. If |
| 1848 | [CMD]\<7\>==0, this field is unpredictable. */ |
| 1849 | uint64_t reserved_42_43 : 2; |
| 1850 | uint64_t node : 2; /**< [ 41: 40](RO/H) CCPI node of XMC request causing error. For *NXM errors [NODE] is always the node that |
| 1851 | generated request causing the error (*NXM errors are logged at the home node). For *DISOCI |
| 1852 | errors, is the NODE the request is directed to (DISOCI request is always the current |
| 1853 | node). */ |
| 1854 | uint64_t addr : 40; /**< [ 39: 0](RO/H) XMC address causing the error. [ADDR]\<6:0\> is unpredictable for *DISOCI and *NXM |
| 1855 | errors. This field is the physical address after index aliasing (if enabled). */ |
| 1856 | #else /* Word 0 - Little Endian */ |
| 1857 | uint64_t addr : 40; /**< [ 39: 0](RO/H) XMC address causing the error. [ADDR]\<6:0\> is unpredictable for *DISOCI and *NXM |
| 1858 | errors. This field is the physical address after index aliasing (if enabled). */ |
| 1859 | uint64_t node : 2; /**< [ 41: 40](RO/H) CCPI node of XMC request causing error. For *NXM errors [NODE] is always the node that |
| 1860 | generated request causing the error (*NXM errors are logged at the home node). For *DISOCI |
| 1861 | errors, is the NODE the request is directed to (DISOCI request is always the current |
| 1862 | node). */ |
| 1863 | uint64_t reserved_42_43 : 2; |
| 1864 | uint64_t source : 7; /**< [ 50: 44](RO/H) XMC source of request causing error. If [SOURCE]\<6\>==0, then [SOURCE]\<5:0\> is |
| 1865 | PPID, else [SOURCE]\<3:0\> is BUSID of the IOB which made the request. If |
| 1866 | [CMD]\<7\>==0, this field is unpredictable. */ |
| 1867 | uint64_t cmd : 8; /**< [ 58: 51](RO/H) Encoding of XMC or CCPI command causing error. |
| 1868 | Internal: |
| 1869 | If CMD\<7\>==1, use XMC_CMD_E to |
| 1870 | decode CMD\<6:0\>. If CMD\<7:5\>==0, use OCI_MREQ_CMD_E to decode CMD\<4:0\>. If CMD\<7:5\>==1, |
| 1871 | use OCI_MFWD_CMD_E to decode CMD\<4:0\>. If CMD\<7:5\>==2, use OCI_MRSP_CMD_E to decode |
| 1872 | CMD\<4:0\>. */ |
| 1873 | uint64_t nonsec : 1; /**< [ 59: 59](RO/H) Nonsecure (NS) bit of request causing error. */ |
| 1874 | uint64_t wrdisoci : 1; /**< [ 60: 60](RO/H) Logged information is for a L2C_TAD()_INT_W1C[WRDISOCI] error. */ |
| 1875 | uint64_t rddisoci : 1; /**< [ 61: 61](RO/H) Logged information is for a L2C_TAD()_INT_W1C[RDDISOCI] error. */ |
| 1876 | uint64_t wrnxm : 1; /**< [ 62: 62](RO/H) Logged information is for a L2C_TAD()_INT_W1C[WRNXM] error. */ |
| 1877 | uint64_t rdnxm : 1; /**< [ 63: 63](RO/H) Logged information is for a L2C_TAD()_INT_W1C[RDNXM] error. */ |
| 1878 | #endif /* Word 0 - End */ |
| 1879 | } s; |
| 1880 | /* struct bdk_l2c_tadx_err_s cn; */ |
| 1881 | }; |
| 1882 | typedef union bdk_l2c_tadx_err bdk_l2c_tadx_err_t; |
| 1883 | |
| 1884 | static inline uint64_t BDK_L2C_TADX_ERR(unsigned long a) __attribute__ ((pure, always_inline)); |
| 1885 | static inline uint64_t BDK_L2C_TADX_ERR(unsigned long a) |
| 1886 | { |
| 1887 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 1888 | return 0x87e050060000ll + 0x1000000ll * ((a) & 0x0); |
| 1889 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 1890 | return 0x87e050060000ll + 0x1000000ll * ((a) & 0x3); |
| 1891 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 1892 | return 0x87e050060000ll + 0x1000000ll * ((a) & 0x7); |
| 1893 | __bdk_csr_fatal("L2C_TADX_ERR", 1, a, 0, 0, 0); |
| 1894 | } |
| 1895 | |
| 1896 | #define typedef_BDK_L2C_TADX_ERR(a) bdk_l2c_tadx_err_t |
| 1897 | #define bustype_BDK_L2C_TADX_ERR(a) BDK_CSR_TYPE_RSL |
| 1898 | #define basename_BDK_L2C_TADX_ERR(a) "L2C_TADX_ERR" |
| 1899 | #define device_bar_BDK_L2C_TADX_ERR(a) 0x0 /* PF_BAR0 */ |
| 1900 | #define busnum_BDK_L2C_TADX_ERR(a) (a) |
| 1901 | #define arguments_BDK_L2C_TADX_ERR(a) (a),-1,-1,-1 |
| 1902 | |
| 1903 | /** |
| 1904 | * Register (RSL) l2c_tad#_pfc# |
| 1905 | * |
| 1906 | * L2C TAD Performance Counter Registers |
| 1907 | */ |
| 1908 | union bdk_l2c_tadx_pfcx |
| 1909 | { |
| 1910 | uint64_t u; |
| 1911 | struct bdk_l2c_tadx_pfcx_s |
| 1912 | { |
| 1913 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1914 | uint64_t count : 64; /**< [ 63: 0](R/W/H) Current counter value. */ |
| 1915 | #else /* Word 0 - Little Endian */ |
| 1916 | uint64_t count : 64; /**< [ 63: 0](R/W/H) Current counter value. */ |
| 1917 | #endif /* Word 0 - End */ |
| 1918 | } s; |
| 1919 | /* struct bdk_l2c_tadx_pfcx_s cn; */ |
| 1920 | }; |
| 1921 | typedef union bdk_l2c_tadx_pfcx bdk_l2c_tadx_pfcx_t; |
| 1922 | |
| 1923 | static inline uint64_t BDK_L2C_TADX_PFCX(unsigned long a, unsigned long b) __attribute__ ((pure, always_inline)); |
| 1924 | static inline uint64_t BDK_L2C_TADX_PFCX(unsigned long a, unsigned long b) |
| 1925 | { |
| 1926 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && ((a==0) && (b<=3))) |
| 1927 | return 0x87e050010100ll + 0x1000000ll * ((a) & 0x0) + 8ll * ((b) & 0x3); |
| 1928 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && ((a<=3) && (b<=3))) |
| 1929 | return 0x87e050010100ll + 0x1000000ll * ((a) & 0x3) + 8ll * ((b) & 0x3); |
| 1930 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && ((a<=7) && (b<=3))) |
| 1931 | return 0x87e050010100ll + 0x1000000ll * ((a) & 0x7) + 8ll * ((b) & 0x3); |
| 1932 | __bdk_csr_fatal("L2C_TADX_PFCX", 2, a, b, 0, 0); |
| 1933 | } |
| 1934 | |
| 1935 | #define typedef_BDK_L2C_TADX_PFCX(a,b) bdk_l2c_tadx_pfcx_t |
| 1936 | #define bustype_BDK_L2C_TADX_PFCX(a,b) BDK_CSR_TYPE_RSL |
| 1937 | #define basename_BDK_L2C_TADX_PFCX(a,b) "L2C_TADX_PFCX" |
| 1938 | #define device_bar_BDK_L2C_TADX_PFCX(a,b) 0x0 /* PF_BAR0 */ |
| 1939 | #define busnum_BDK_L2C_TADX_PFCX(a,b) (a) |
| 1940 | #define arguments_BDK_L2C_TADX_PFCX(a,b) (a),(b),-1,-1 |
| 1941 | |
| 1942 | /** |
| 1943 | * Register (RSL) l2c_tad#_prf |
| 1944 | * |
| 1945 | * L2C TAD Performance Counter Control Registers |
| 1946 | * All four counters are equivalent and can use any of the defined selects. |
| 1947 | */ |
| 1948 | union bdk_l2c_tadx_prf |
| 1949 | { |
| 1950 | uint64_t u; |
| 1951 | struct bdk_l2c_tadx_prf_s |
| 1952 | { |
| 1953 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1954 | uint64_t reserved_32_63 : 32; |
| 1955 | uint64_t cnt3sel : 8; /**< [ 31: 24](R/W) Selects event to count for L2C_TAD(0)_PFC(3). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1956 | uint64_t cnt2sel : 8; /**< [ 23: 16](R/W) Selects event to count for L2C_TAD(0)_PFC(2). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1957 | uint64_t cnt1sel : 8; /**< [ 15: 8](R/W) Selects event to count for L2C_TAD(0)_PFC(1). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1958 | uint64_t cnt0sel : 8; /**< [ 7: 0](R/W) Selects event to count for L2C_TAD(0)_PFC(0). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1959 | #else /* Word 0 - Little Endian */ |
| 1960 | uint64_t cnt0sel : 8; /**< [ 7: 0](R/W) Selects event to count for L2C_TAD(0)_PFC(0). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1961 | uint64_t cnt1sel : 8; /**< [ 15: 8](R/W) Selects event to count for L2C_TAD(0)_PFC(1). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1962 | uint64_t cnt2sel : 8; /**< [ 23: 16](R/W) Selects event to count for L2C_TAD(0)_PFC(2). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1963 | uint64_t cnt3sel : 8; /**< [ 31: 24](R/W) Selects event to count for L2C_TAD(0)_PFC(3). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1964 | uint64_t reserved_32_63 : 32; |
| 1965 | #endif /* Word 0 - End */ |
| 1966 | } s; |
| 1967 | /* struct bdk_l2c_tadx_prf_s cn81xx; */ |
| 1968 | struct bdk_l2c_tadx_prf_cn88xx |
| 1969 | { |
| 1970 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1971 | uint64_t reserved_32_63 : 32; |
| 1972 | uint64_t cnt3sel : 8; /**< [ 31: 24](R/W) Selects event to count for L2C_TAD(0..7)_PFC(3). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1973 | uint64_t cnt2sel : 8; /**< [ 23: 16](R/W) Selects event to count for L2C_TAD(0..7)_PFC(2). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1974 | uint64_t cnt1sel : 8; /**< [ 15: 8](R/W) Selects event to count for L2C_TAD(0..7)_PFC(1). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1975 | uint64_t cnt0sel : 8; /**< [ 7: 0](R/W) Selects event to count for L2C_TAD(0..7)_PFC(0). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1976 | #else /* Word 0 - Little Endian */ |
| 1977 | uint64_t cnt0sel : 8; /**< [ 7: 0](R/W) Selects event to count for L2C_TAD(0..7)_PFC(0). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1978 | uint64_t cnt1sel : 8; /**< [ 15: 8](R/W) Selects event to count for L2C_TAD(0..7)_PFC(1). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1979 | uint64_t cnt2sel : 8; /**< [ 23: 16](R/W) Selects event to count for L2C_TAD(0..7)_PFC(2). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1980 | uint64_t cnt3sel : 8; /**< [ 31: 24](R/W) Selects event to count for L2C_TAD(0..7)_PFC(3). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1981 | uint64_t reserved_32_63 : 32; |
| 1982 | #endif /* Word 0 - End */ |
| 1983 | } cn88xx; |
| 1984 | struct bdk_l2c_tadx_prf_cn83xx |
| 1985 | { |
| 1986 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 1987 | uint64_t reserved_32_63 : 32; |
| 1988 | uint64_t cnt3sel : 8; /**< [ 31: 24](R/W) Selects event to count for L2C_TAD(0..3)_PFC(3). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1989 | uint64_t cnt2sel : 8; /**< [ 23: 16](R/W) Selects event to count for L2C_TAD(0..3)_PFC(2). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1990 | uint64_t cnt1sel : 8; /**< [ 15: 8](R/W) Selects event to count for L2C_TAD(0..3)_PFC(1). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1991 | uint64_t cnt0sel : 8; /**< [ 7: 0](R/W) Selects event to count for L2C_TAD(0..3)_PFC(0). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1992 | #else /* Word 0 - Little Endian */ |
| 1993 | uint64_t cnt0sel : 8; /**< [ 7: 0](R/W) Selects event to count for L2C_TAD(0..3)_PFC(0). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1994 | uint64_t cnt1sel : 8; /**< [ 15: 8](R/W) Selects event to count for L2C_TAD(0..3)_PFC(1). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1995 | uint64_t cnt2sel : 8; /**< [ 23: 16](R/W) Selects event to count for L2C_TAD(0..3)_PFC(2). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1996 | uint64_t cnt3sel : 8; /**< [ 31: 24](R/W) Selects event to count for L2C_TAD(0..3)_PFC(3). Enumerated by L2C_TAD_PRF_SEL_E. */ |
| 1997 | uint64_t reserved_32_63 : 32; |
| 1998 | #endif /* Word 0 - End */ |
| 1999 | } cn83xx; |
| 2000 | }; |
| 2001 | typedef union bdk_l2c_tadx_prf bdk_l2c_tadx_prf_t; |
| 2002 | |
| 2003 | static inline uint64_t BDK_L2C_TADX_PRF(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2004 | static inline uint64_t BDK_L2C_TADX_PRF(unsigned long a) |
| 2005 | { |
| 2006 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 2007 | return 0x87e050010000ll + 0x1000000ll * ((a) & 0x0); |
| 2008 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 2009 | return 0x87e050010000ll + 0x1000000ll * ((a) & 0x3); |
| 2010 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 2011 | return 0x87e050010000ll + 0x1000000ll * ((a) & 0x7); |
| 2012 | __bdk_csr_fatal("L2C_TADX_PRF", 1, a, 0, 0, 0); |
| 2013 | } |
| 2014 | |
| 2015 | #define typedef_BDK_L2C_TADX_PRF(a) bdk_l2c_tadx_prf_t |
| 2016 | #define bustype_BDK_L2C_TADX_PRF(a) BDK_CSR_TYPE_RSL |
| 2017 | #define basename_BDK_L2C_TADX_PRF(a) "L2C_TADX_PRF" |
| 2018 | #define device_bar_BDK_L2C_TADX_PRF(a) 0x0 /* PF_BAR0 */ |
| 2019 | #define busnum_BDK_L2C_TADX_PRF(a) (a) |
| 2020 | #define arguments_BDK_L2C_TADX_PRF(a) (a),-1,-1,-1 |
| 2021 | |
| 2022 | /** |
| 2023 | * Register (RSL) l2c_tad#_stat |
| 2024 | * |
| 2025 | * L2C TAD Status Registers |
| 2026 | * This register holds information about the instantaneous state of the TAD. |
| 2027 | */ |
| 2028 | union bdk_l2c_tadx_stat |
| 2029 | { |
| 2030 | uint64_t u; |
| 2031 | struct bdk_l2c_tadx_stat_s |
| 2032 | { |
| 2033 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2034 | uint64_t reserved_14_63 : 50; |
| 2035 | uint64_t lfb_valid_cnt : 6; /**< [ 13: 8](RO/H) The number of LFBs in use. */ |
| 2036 | uint64_t reserved_5_7 : 3; |
| 2037 | uint64_t vbf_inuse_cnt : 5; /**< [ 4: 0](RO/H) The number of MCI VBFs in use. */ |
| 2038 | #else /* Word 0 - Little Endian */ |
| 2039 | uint64_t vbf_inuse_cnt : 5; /**< [ 4: 0](RO/H) The number of MCI VBFs in use. */ |
| 2040 | uint64_t reserved_5_7 : 3; |
| 2041 | uint64_t lfb_valid_cnt : 6; /**< [ 13: 8](RO/H) The number of LFBs in use. */ |
| 2042 | uint64_t reserved_14_63 : 50; |
| 2043 | #endif /* Word 0 - End */ |
| 2044 | } s; |
| 2045 | /* struct bdk_l2c_tadx_stat_s cn; */ |
| 2046 | }; |
| 2047 | typedef union bdk_l2c_tadx_stat bdk_l2c_tadx_stat_t; |
| 2048 | |
| 2049 | static inline uint64_t BDK_L2C_TADX_STAT(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2050 | static inline uint64_t BDK_L2C_TADX_STAT(unsigned long a) |
| 2051 | { |
| 2052 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 2053 | return 0x87e050020008ll + 0x1000000ll * ((a) & 0x0); |
| 2054 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 2055 | return 0x87e050020008ll + 0x1000000ll * ((a) & 0x3); |
| 2056 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 2057 | return 0x87e050020008ll + 0x1000000ll * ((a) & 0x7); |
| 2058 | __bdk_csr_fatal("L2C_TADX_STAT", 1, a, 0, 0, 0); |
| 2059 | } |
| 2060 | |
| 2061 | #define typedef_BDK_L2C_TADX_STAT(a) bdk_l2c_tadx_stat_t |
| 2062 | #define bustype_BDK_L2C_TADX_STAT(a) BDK_CSR_TYPE_RSL |
| 2063 | #define basename_BDK_L2C_TADX_STAT(a) "L2C_TADX_STAT" |
| 2064 | #define device_bar_BDK_L2C_TADX_STAT(a) 0x0 /* PF_BAR0 */ |
| 2065 | #define busnum_BDK_L2C_TADX_STAT(a) (a) |
| 2066 | #define arguments_BDK_L2C_TADX_STAT(a) (a),-1,-1,-1 |
| 2067 | |
| 2068 | /** |
| 2069 | * Register (RSL) l2c_tad#_tag |
| 2070 | * |
| 2071 | * L2C TAD Tag Data Registers |
| 2072 | * This register holds the tag information for LTGL2I and STGL2I commands. |
| 2073 | */ |
| 2074 | union bdk_l2c_tadx_tag |
| 2075 | { |
| 2076 | uint64_t u; |
| 2077 | struct bdk_l2c_tadx_tag_s |
| 2078 | { |
| 2079 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2080 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2081 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2082 | uint64_t reserved_59 : 1; |
| 2083 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2084 | uint64_t businfo : 9; /**< [ 57: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2085 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2086 | uint64_t reserved_6_41 : 36; |
| 2087 | uint64_t node : 2; /**< [ 5: 4](RAZ) Reserved. */ |
| 2088 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2089 | 0x0 = Invalid. |
| 2090 | 0x1 = Shared. |
| 2091 | 0x2 = Exclusive. |
| 2092 | |
| 2093 | Note that a local address will never have the value of exclusive as that state |
| 2094 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2095 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2096 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2097 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2098 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2099 | #else /* Word 0 - Little Endian */ |
| 2100 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2101 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2102 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2103 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2104 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2105 | 0x0 = Invalid. |
| 2106 | 0x1 = Shared. |
| 2107 | 0x2 = Exclusive. |
| 2108 | |
| 2109 | Note that a local address will never have the value of exclusive as that state |
| 2110 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2111 | uint64_t node : 2; /**< [ 5: 4](RAZ) Reserved. */ |
| 2112 | uint64_t reserved_6_41 : 36; |
| 2113 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2114 | uint64_t businfo : 9; /**< [ 57: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2115 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2116 | uint64_t reserved_59 : 1; |
| 2117 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2118 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2119 | #endif /* Word 0 - End */ |
| 2120 | } s; |
| 2121 | struct bdk_l2c_tadx_tag_cn81xx |
| 2122 | { |
| 2123 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2124 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2125 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2126 | uint64_t reserved_59 : 1; |
| 2127 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2128 | uint64_t reserved_57 : 1; |
| 2129 | uint64_t businfo : 8; /**< [ 56: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2130 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2131 | uint64_t reserved_40_41 : 2; |
| 2132 | uint64_t tag : 23; /**< [ 39: 17](R/W/H) The tag. TAG\<39:17\> is the corresponding bits from the L2C+LMC internal L2/DRAM byte |
| 2133 | address. */ |
| 2134 | uint64_t reserved_6_16 : 11; |
| 2135 | uint64_t node : 2; /**< [ 5: 4](RAZ) Reserved. */ |
| 2136 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2137 | 0x0 = Invalid. |
| 2138 | 0x1 = Shared. |
| 2139 | 0x2 = Exclusive. |
| 2140 | |
| 2141 | Note that a local address will never have the value of exclusive as that state |
| 2142 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2143 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2144 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2145 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2146 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2147 | #else /* Word 0 - Little Endian */ |
| 2148 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2149 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2150 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2151 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2152 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2153 | 0x0 = Invalid. |
| 2154 | 0x1 = Shared. |
| 2155 | 0x2 = Exclusive. |
| 2156 | |
| 2157 | Note that a local address will never have the value of exclusive as that state |
| 2158 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2159 | uint64_t node : 2; /**< [ 5: 4](RAZ) Reserved. */ |
| 2160 | uint64_t reserved_6_16 : 11; |
| 2161 | uint64_t tag : 23; /**< [ 39: 17](R/W/H) The tag. TAG\<39:17\> is the corresponding bits from the L2C+LMC internal L2/DRAM byte |
| 2162 | address. */ |
| 2163 | uint64_t reserved_40_41 : 2; |
| 2164 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2165 | uint64_t businfo : 8; /**< [ 56: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2166 | uint64_t reserved_57 : 1; |
| 2167 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2168 | uint64_t reserved_59 : 1; |
| 2169 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2170 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2171 | #endif /* Word 0 - End */ |
| 2172 | } cn81xx; |
| 2173 | struct bdk_l2c_tadx_tag_cn88xx |
| 2174 | { |
| 2175 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2176 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2177 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2178 | uint64_t reserved_59 : 1; |
| 2179 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2180 | uint64_t businfo : 9; /**< [ 57: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2181 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2182 | uint64_t tag : 22; /**< [ 41: 20](R/W/H) The tag. TAG\<39:20\> is the corresponding bits from the L2C+LMC internal L2/DRAM byte |
| 2183 | address. TAG\<41:40\> is the CCPI node of the address. The RTG must always have the |
| 2184 | TAG\<41:40\> equal to the current node or operation is undefined. */ |
| 2185 | uint64_t reserved_6_19 : 14; |
| 2186 | uint64_t node : 2; /**< [ 5: 4](R/W/H) The node ID for the remote node which holds this block. Ignored/loaded with 0 for TAG accesses. */ |
| 2187 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2188 | 0x0 = Invalid. |
| 2189 | 0x1 = Shared. |
| 2190 | 0x2 = Exclusive. |
| 2191 | |
| 2192 | Note that a local address will never have the value of exclusive as that state |
| 2193 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2194 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2195 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2196 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2197 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2198 | #else /* Word 0 - Little Endian */ |
| 2199 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2200 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2201 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2202 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2203 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2204 | 0x0 = Invalid. |
| 2205 | 0x1 = Shared. |
| 2206 | 0x2 = Exclusive. |
| 2207 | |
| 2208 | Note that a local address will never have the value of exclusive as that state |
| 2209 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2210 | uint64_t node : 2; /**< [ 5: 4](R/W/H) The node ID for the remote node which holds this block. Ignored/loaded with 0 for TAG accesses. */ |
| 2211 | uint64_t reserved_6_19 : 14; |
| 2212 | uint64_t tag : 22; /**< [ 41: 20](R/W/H) The tag. TAG\<39:20\> is the corresponding bits from the L2C+LMC internal L2/DRAM byte |
| 2213 | address. TAG\<41:40\> is the CCPI node of the address. The RTG must always have the |
| 2214 | TAG\<41:40\> equal to the current node or operation is undefined. */ |
| 2215 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2216 | uint64_t businfo : 9; /**< [ 57: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2217 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2218 | uint64_t reserved_59 : 1; |
| 2219 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2220 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2221 | #endif /* Word 0 - End */ |
| 2222 | } cn88xx; |
| 2223 | struct bdk_l2c_tadx_tag_cn83xx |
| 2224 | { |
| 2225 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2226 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2227 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2228 | uint64_t reserved_59 : 1; |
| 2229 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2230 | uint64_t businfo : 9; /**< [ 57: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2231 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2232 | uint64_t reserved_40_41 : 2; |
| 2233 | uint64_t tag : 22; /**< [ 39: 18](R/W/H) The tag. TAG\<39:18\> is the corresponding bits from the L2C+LMC internal L2/DRAM byte |
| 2234 | address. */ |
| 2235 | uint64_t reserved_6_17 : 12; |
| 2236 | uint64_t node : 2; /**< [ 5: 4](RAZ) Reserved. */ |
| 2237 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2238 | 0x0 = Invalid. |
| 2239 | 0x1 = Shared. |
| 2240 | 0x2 = Exclusive. |
| 2241 | |
| 2242 | Note that a local address will never have the value of exclusive as that state |
| 2243 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2244 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2245 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2246 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2247 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2248 | #else /* Word 0 - Little Endian */ |
| 2249 | uint64_t lock : 1; /**< [ 0: 0](R/W/H) The lock bit. If setting the [LOCK] bit, the USE bit should also be set or the |
| 2250 | operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2251 | uint64_t used : 1; /**< [ 1: 1](R/W/H) The LRU use bit. If setting the [LOCK] bit, the USE bit should also be set or |
| 2252 | the operation is undefined. Ignored/loaded with 0 for RTG accesses. */ |
| 2253 | uint64_t ts : 2; /**< [ 3: 2](R/W/H) The tag state. |
| 2254 | 0x0 = Invalid. |
| 2255 | 0x1 = Shared. |
| 2256 | 0x2 = Exclusive. |
| 2257 | |
| 2258 | Note that a local address will never have the value of exclusive as that state |
| 2259 | is encoded as shared in the tag and invalid in the RTG. */ |
| 2260 | uint64_t node : 2; /**< [ 5: 4](RAZ) Reserved. */ |
| 2261 | uint64_t reserved_6_17 : 12; |
| 2262 | uint64_t tag : 22; /**< [ 39: 18](R/W/H) The tag. TAG\<39:18\> is the corresponding bits from the L2C+LMC internal L2/DRAM byte |
| 2263 | address. */ |
| 2264 | uint64_t reserved_40_41 : 2; |
| 2265 | uint64_t ecc : 7; /**< [ 48: 42](R/W/H) The tag ECC. This field is undefined if L2C_CTL[DISECC] is not 1 when the LTGL2I reads the tags. */ |
| 2266 | uint64_t businfo : 9; /**< [ 57: 49](R/W/H) The bus information bits. Ignored/loaded with 0 for RTG accesses. */ |
| 2267 | uint64_t nonsec : 1; /**< [ 58: 58](R/W/H) Nonsecure bit. */ |
| 2268 | uint64_t reserved_59 : 1; |
| 2269 | uint64_t sblkdty : 4; /**< [ 63: 60](R/W/H) Sub-block dirty bits. Ignored/loaded with 0 for RTG accesses. If [TS] is invalid |
| 2270 | (0), [SBLKDTY] must be 0 or operation is undefined. */ |
| 2271 | #endif /* Word 0 - End */ |
| 2272 | } cn83xx; |
| 2273 | }; |
| 2274 | typedef union bdk_l2c_tadx_tag bdk_l2c_tadx_tag_t; |
| 2275 | |
| 2276 | static inline uint64_t BDK_L2C_TADX_TAG(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2277 | static inline uint64_t BDK_L2C_TADX_TAG(unsigned long a) |
| 2278 | { |
| 2279 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 2280 | return 0x87e050020000ll + 0x1000000ll * ((a) & 0x0); |
| 2281 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 2282 | return 0x87e050020000ll + 0x1000000ll * ((a) & 0x3); |
| 2283 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 2284 | return 0x87e050020000ll + 0x1000000ll * ((a) & 0x7); |
| 2285 | __bdk_csr_fatal("L2C_TADX_TAG", 1, a, 0, 0, 0); |
| 2286 | } |
| 2287 | |
| 2288 | #define typedef_BDK_L2C_TADX_TAG(a) bdk_l2c_tadx_tag_t |
| 2289 | #define bustype_BDK_L2C_TADX_TAG(a) BDK_CSR_TYPE_RSL |
| 2290 | #define basename_BDK_L2C_TADX_TAG(a) "L2C_TADX_TAG" |
| 2291 | #define device_bar_BDK_L2C_TADX_TAG(a) 0x0 /* PF_BAR0 */ |
| 2292 | #define busnum_BDK_L2C_TADX_TAG(a) (a) |
| 2293 | #define arguments_BDK_L2C_TADX_TAG(a) (a),-1,-1,-1 |
| 2294 | |
| 2295 | /** |
| 2296 | * Register (RSL) l2c_tad#_timeout |
| 2297 | * |
| 2298 | * L2C TAD LFB Timeout Info Registers |
| 2299 | * This register records error information for an LFBTO (LFB TimeOut). The first LFBTO error will |
| 2300 | * lock the register until the logged error type s cleared. If multiple LFBs timed out |
| 2301 | * simultaneously, then this will contain the information from the lowest LFB number that has |
| 2302 | * timed-out. The address can be for the original transaction address or the replacement address |
| 2303 | * (if both could have timed out, then the transaction address will be here). |
| 2304 | */ |
| 2305 | union bdk_l2c_tadx_timeout |
| 2306 | { |
| 2307 | uint64_t u; |
| 2308 | struct bdk_l2c_tadx_timeout_s |
| 2309 | { |
| 2310 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2311 | uint64_t infolfb : 1; /**< [ 63: 63](RO/H) Logged address information is for the LFB original transation. */ |
| 2312 | uint64_t infovab : 1; /**< [ 62: 62](RO/H) Logged address information is for the VAB (replacement). If both this and |
| 2313 | [INFOLFB] is set, then both could have timed out, but info captured is from the |
| 2314 | original LFB. */ |
| 2315 | uint64_t reserved_57_61 : 5; |
| 2316 | uint64_t lfbnum : 5; /**< [ 56: 52](RO/H) The LFB number of the entry that timed out, and have its info captures in this register. */ |
| 2317 | uint64_t cmd : 8; /**< [ 51: 44](RO/H) Encoding of XMC or CCPI command causing error. |
| 2318 | Internal: |
| 2319 | If CMD\<7\>==1, use XMC_CMD_E to decode CMD\<6:0\>. If CMD\<7:5\>==0, use |
| 2320 | OCI_MREQ_CMD_E to |
| 2321 | decode CMD\<4:0\>. If CMD\<7:5\>==1, use OCI_MFWD_CMD_E to decode CMD\<4:0\>. If CMD\<7:5\>==2, |
| 2322 | use OCI_MRSP_CMD_E to decode CMD\<4:0\>. */ |
| 2323 | uint64_t reserved_42_43 : 2; |
| 2324 | uint64_t node : 2; /**< [ 41: 40](RO/H) Home node of the address causing the error. Similar to [ADDR] below, this can be the |
| 2325 | request address (if [INFOLFB] is set), else it is the replacement address (if [INFOLFB] is |
| 2326 | clear & [INFOVAB] is set). */ |
| 2327 | uint64_t addr : 33; /**< [ 39: 7](RO/H) Cache line address causing the error. This can be either the request address or |
| 2328 | the replacement (if [INFOLFB] is set), else it is the replacement address (if |
| 2329 | [INFOLFB] is clear & [INFOVAB] is set). This address is a physical address. L2C |
| 2330 | performs index aliasing (if enabled) on the written address and uses that for |
| 2331 | the command. This index-aliased address is what is returned on a read of |
| 2332 | L2C_XMC_CMD. */ |
| 2333 | uint64_t reserved_0_6 : 7; |
| 2334 | #else /* Word 0 - Little Endian */ |
| 2335 | uint64_t reserved_0_6 : 7; |
| 2336 | uint64_t addr : 33; /**< [ 39: 7](RO/H) Cache line address causing the error. This can be either the request address or |
| 2337 | the replacement (if [INFOLFB] is set), else it is the replacement address (if |
| 2338 | [INFOLFB] is clear & [INFOVAB] is set). This address is a physical address. L2C |
| 2339 | performs index aliasing (if enabled) on the written address and uses that for |
| 2340 | the command. This index-aliased address is what is returned on a read of |
| 2341 | L2C_XMC_CMD. */ |
| 2342 | uint64_t node : 2; /**< [ 41: 40](RO/H) Home node of the address causing the error. Similar to [ADDR] below, this can be the |
| 2343 | request address (if [INFOLFB] is set), else it is the replacement address (if [INFOLFB] is |
| 2344 | clear & [INFOVAB] is set). */ |
| 2345 | uint64_t reserved_42_43 : 2; |
| 2346 | uint64_t cmd : 8; /**< [ 51: 44](RO/H) Encoding of XMC or CCPI command causing error. |
| 2347 | Internal: |
| 2348 | If CMD\<7\>==1, use XMC_CMD_E to decode CMD\<6:0\>. If CMD\<7:5\>==0, use |
| 2349 | OCI_MREQ_CMD_E to |
| 2350 | decode CMD\<4:0\>. If CMD\<7:5\>==1, use OCI_MFWD_CMD_E to decode CMD\<4:0\>. If CMD\<7:5\>==2, |
| 2351 | use OCI_MRSP_CMD_E to decode CMD\<4:0\>. */ |
| 2352 | uint64_t lfbnum : 5; /**< [ 56: 52](RO/H) The LFB number of the entry that timed out, and have its info captures in this register. */ |
| 2353 | uint64_t reserved_57_61 : 5; |
| 2354 | uint64_t infovab : 1; /**< [ 62: 62](RO/H) Logged address information is for the VAB (replacement). If both this and |
| 2355 | [INFOLFB] is set, then both could have timed out, but info captured is from the |
| 2356 | original LFB. */ |
| 2357 | uint64_t infolfb : 1; /**< [ 63: 63](RO/H) Logged address information is for the LFB original transation. */ |
| 2358 | #endif /* Word 0 - End */ |
| 2359 | } s; |
| 2360 | /* struct bdk_l2c_tadx_timeout_s cn; */ |
| 2361 | }; |
| 2362 | typedef union bdk_l2c_tadx_timeout bdk_l2c_tadx_timeout_t; |
| 2363 | |
| 2364 | static inline uint64_t BDK_L2C_TADX_TIMEOUT(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2365 | static inline uint64_t BDK_L2C_TADX_TIMEOUT(unsigned long a) |
| 2366 | { |
| 2367 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 2368 | return 0x87e050050100ll + 0x1000000ll * ((a) & 0x0); |
| 2369 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 2370 | return 0x87e050050100ll + 0x1000000ll * ((a) & 0x3); |
| 2371 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 2372 | return 0x87e050050100ll + 0x1000000ll * ((a) & 0x7); |
| 2373 | __bdk_csr_fatal("L2C_TADX_TIMEOUT", 1, a, 0, 0, 0); |
| 2374 | } |
| 2375 | |
| 2376 | #define typedef_BDK_L2C_TADX_TIMEOUT(a) bdk_l2c_tadx_timeout_t |
| 2377 | #define bustype_BDK_L2C_TADX_TIMEOUT(a) BDK_CSR_TYPE_RSL |
| 2378 | #define basename_BDK_L2C_TADX_TIMEOUT(a) "L2C_TADX_TIMEOUT" |
| 2379 | #define device_bar_BDK_L2C_TADX_TIMEOUT(a) 0x0 /* PF_BAR0 */ |
| 2380 | #define busnum_BDK_L2C_TADX_TIMEOUT(a) (a) |
| 2381 | #define arguments_BDK_L2C_TADX_TIMEOUT(a) (a),-1,-1,-1 |
| 2382 | |
| 2383 | /** |
| 2384 | * Register (RSL) l2c_tad#_timetwo |
| 2385 | * |
| 2386 | * L2C TAD LFB Timeout Count Registers |
| 2387 | * This register records the number of LFB entries that have timed out. |
| 2388 | */ |
| 2389 | union bdk_l2c_tadx_timetwo |
| 2390 | { |
| 2391 | uint64_t u; |
| 2392 | struct bdk_l2c_tadx_timetwo_s |
| 2393 | { |
| 2394 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2395 | uint64_t reserved_33_63 : 31; |
| 2396 | uint64_t sid : 4; /**< [ 32: 29](RO/H) Source id of the original request, that is 'source' of request. This is only valid if the |
| 2397 | request is a local request (valid if L2C_TAD()_TIMEOUT[CMD] is an XMC request and not |
| 2398 | relevant if it is an CCPI request). */ |
| 2399 | uint64_t busid : 4; /**< [ 28: 25](RO/H) Busid of the original request, that is 'source' of request. */ |
| 2400 | uint64_t vabst : 3; /**< [ 24: 22](RO/H) This is the LFB internal state if INFOLFB is set, else will contain VAB internal state if |
| 2401 | INFOVAB is set. */ |
| 2402 | uint64_t lfbst : 14; /**< [ 21: 8](RO/H) This is the LFB internal state if INFOLFB is set, else will contain VAB internal state if |
| 2403 | INFOVAB is set. */ |
| 2404 | uint64_t tocnt : 8; /**< [ 7: 0](RO/H) This is a running count of the LFB that has timed out ... the count will saturate at 0xFF. |
| 2405 | Will clear when the LFBTO interrupt is cleared. */ |
| 2406 | #else /* Word 0 - Little Endian */ |
| 2407 | uint64_t tocnt : 8; /**< [ 7: 0](RO/H) This is a running count of the LFB that has timed out ... the count will saturate at 0xFF. |
| 2408 | Will clear when the LFBTO interrupt is cleared. */ |
| 2409 | uint64_t lfbst : 14; /**< [ 21: 8](RO/H) This is the LFB internal state if INFOLFB is set, else will contain VAB internal state if |
| 2410 | INFOVAB is set. */ |
| 2411 | uint64_t vabst : 3; /**< [ 24: 22](RO/H) This is the LFB internal state if INFOLFB is set, else will contain VAB internal state if |
| 2412 | INFOVAB is set. */ |
| 2413 | uint64_t busid : 4; /**< [ 28: 25](RO/H) Busid of the original request, that is 'source' of request. */ |
| 2414 | uint64_t sid : 4; /**< [ 32: 29](RO/H) Source id of the original request, that is 'source' of request. This is only valid if the |
| 2415 | request is a local request (valid if L2C_TAD()_TIMEOUT[CMD] is an XMC request and not |
| 2416 | relevant if it is an CCPI request). */ |
| 2417 | uint64_t reserved_33_63 : 31; |
| 2418 | #endif /* Word 0 - End */ |
| 2419 | } s; |
| 2420 | /* struct bdk_l2c_tadx_timetwo_s cn; */ |
| 2421 | }; |
| 2422 | typedef union bdk_l2c_tadx_timetwo bdk_l2c_tadx_timetwo_t; |
| 2423 | |
| 2424 | static inline uint64_t BDK_L2C_TADX_TIMETWO(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2425 | static inline uint64_t BDK_L2C_TADX_TIMETWO(unsigned long a) |
| 2426 | { |
| 2427 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a==0)) |
| 2428 | return 0x87e050050000ll + 0x1000000ll * ((a) & 0x0); |
| 2429 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=3)) |
| 2430 | return 0x87e050050000ll + 0x1000000ll * ((a) & 0x3); |
| 2431 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=7)) |
| 2432 | return 0x87e050050000ll + 0x1000000ll * ((a) & 0x7); |
| 2433 | __bdk_csr_fatal("L2C_TADX_TIMETWO", 1, a, 0, 0, 0); |
| 2434 | } |
| 2435 | |
| 2436 | #define typedef_BDK_L2C_TADX_TIMETWO(a) bdk_l2c_tadx_timetwo_t |
| 2437 | #define bustype_BDK_L2C_TADX_TIMETWO(a) BDK_CSR_TYPE_RSL |
| 2438 | #define basename_BDK_L2C_TADX_TIMETWO(a) "L2C_TADX_TIMETWO" |
| 2439 | #define device_bar_BDK_L2C_TADX_TIMETWO(a) 0x0 /* PF_BAR0 */ |
| 2440 | #define busnum_BDK_L2C_TADX_TIMETWO(a) (a) |
| 2441 | #define arguments_BDK_L2C_TADX_TIMETWO(a) (a),-1,-1,-1 |
| 2442 | |
| 2443 | /** |
| 2444 | * Register (RSL) l2c_tad_ctl |
| 2445 | * |
| 2446 | * L2C TAD Control Register |
| 2447 | * In CNXXXX, [MAXLFB], EXLRQ, EXRRQ, EXFWD, EXVIC refer to half-TAD |
| 2448 | * LFBs/VABs. Therefore, even though there are 32 LFBs/VABs in a full TAD, the number |
| 2449 | * applies to both halves. |
| 2450 | * * If [MAXLFB] is != 0, [VBF_THRESH] should be less than [MAXLFB]. |
| 2451 | * * If [MAXVBF] is != 0, [VBF_THRESH] should be less than [MAXVBF]. |
| 2452 | * * If [MAXLFB] != 0, EXLRQ + EXRRQ + EXFWD + EXVIC must be less than or equal to [MAXLFB] - 4. |
| 2453 | * * If [MAXLFB] == 0, EXLRQ + EXRRQ + EXFWD + EXVIC must be less than or equal to 12. |
| 2454 | */ |
| 2455 | union bdk_l2c_tad_ctl |
| 2456 | { |
| 2457 | uint64_t u; |
| 2458 | struct bdk_l2c_tad_ctl_s |
| 2459 | { |
| 2460 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2461 | uint64_t reserved_33_63 : 31; |
| 2462 | uint64_t frcnalc : 1; /**< [ 32: 32](R/W) When set, all cache accesses are forced to not allocate in the local L2. */ |
| 2463 | uint64_t disrstp : 1; /**< [ 31: 31](RO) Reserved. */ |
| 2464 | uint64_t wtlmcwrdn : 1; /**< [ 30: 30](R/W) Be more conservative with LFB done relative to LMC writes. */ |
| 2465 | uint64_t wtinvdn : 1; /**< [ 29: 29](R/W) Be more conservative with LFB done relative to invalidates. */ |
| 2466 | uint64_t wtfilldn : 1; /**< [ 28: 28](R/W) Be more conservative with LFB done relative to fills. */ |
| 2467 | uint64_t exlrq : 4; /**< [ 27: 24](RO) Reserved. */ |
| 2468 | uint64_t exrrq : 4; /**< [ 23: 20](RO) Reserved. */ |
| 2469 | uint64_t exfwd : 4; /**< [ 19: 16](RO) Reserved. */ |
| 2470 | uint64_t exvic : 4; /**< [ 15: 12](RO) Reserved. */ |
| 2471 | uint64_t vbf_thresh : 4; /**< [ 11: 8](R/W) VBF threshold. When the number of in-use VBFs exceeds this number the L2C TAD increases |
| 2472 | the priority of all its write operations in the LMC. */ |
| 2473 | uint64_t maxvbf : 4; /**< [ 7: 4](R/W) Maximum VBFs in use at once (0 means 16, 1-15 as expected). */ |
| 2474 | uint64_t maxlfb : 4; /**< [ 3: 0](R/W) Maximum VABs/LFBs in use at once (0 means 16, 1-15 as expected). */ |
| 2475 | #else /* Word 0 - Little Endian */ |
| 2476 | uint64_t maxlfb : 4; /**< [ 3: 0](R/W) Maximum VABs/LFBs in use at once (0 means 16, 1-15 as expected). */ |
| 2477 | uint64_t maxvbf : 4; /**< [ 7: 4](R/W) Maximum VBFs in use at once (0 means 16, 1-15 as expected). */ |
| 2478 | uint64_t vbf_thresh : 4; /**< [ 11: 8](R/W) VBF threshold. When the number of in-use VBFs exceeds this number the L2C TAD increases |
| 2479 | the priority of all its write operations in the LMC. */ |
| 2480 | uint64_t exvic : 4; /**< [ 15: 12](RO) Reserved. */ |
| 2481 | uint64_t exfwd : 4; /**< [ 19: 16](RO) Reserved. */ |
| 2482 | uint64_t exrrq : 4; /**< [ 23: 20](RO) Reserved. */ |
| 2483 | uint64_t exlrq : 4; /**< [ 27: 24](RO) Reserved. */ |
| 2484 | uint64_t wtfilldn : 1; /**< [ 28: 28](R/W) Be more conservative with LFB done relative to fills. */ |
| 2485 | uint64_t wtinvdn : 1; /**< [ 29: 29](R/W) Be more conservative with LFB done relative to invalidates. */ |
| 2486 | uint64_t wtlmcwrdn : 1; /**< [ 30: 30](R/W) Be more conservative with LFB done relative to LMC writes. */ |
| 2487 | uint64_t disrstp : 1; /**< [ 31: 31](RO) Reserved. */ |
| 2488 | uint64_t frcnalc : 1; /**< [ 32: 32](R/W) When set, all cache accesses are forced to not allocate in the local L2. */ |
| 2489 | uint64_t reserved_33_63 : 31; |
| 2490 | #endif /* Word 0 - End */ |
| 2491 | } s; |
| 2492 | /* struct bdk_l2c_tad_ctl_s cn81xx; */ |
| 2493 | struct bdk_l2c_tad_ctl_cn88xx |
| 2494 | { |
| 2495 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2496 | uint64_t reserved_33_63 : 31; |
| 2497 | uint64_t frcnalc : 1; /**< [ 32: 32](R/W) When set, all cache accesses are forced to not allocate in the local L2. */ |
| 2498 | uint64_t disrstp : 1; /**< [ 31: 31](R/W) When set, if the L2 receives an RSTP XMC command, it treats it as a STP. */ |
| 2499 | uint64_t wtlmcwrdn : 1; /**< [ 30: 30](R/W) Be more conservative with LFB done relative to LMC writes. */ |
| 2500 | uint64_t wtinvdn : 1; /**< [ 29: 29](R/W) Be more conservative with LFB done relative to invalidates. */ |
| 2501 | uint64_t wtfilldn : 1; /**< [ 28: 28](R/W) Be more conservative with LFB done relative to fills. */ |
| 2502 | uint64_t exlrq : 4; /**< [ 27: 24](R/W) Extra LFBs to reserve for locally generated XMC commands. None are reserved for functional |
| 2503 | correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2504 | uint64_t exrrq : 4; /**< [ 23: 20](R/W) Extra LFBs to reserve for Rxxx CCPI commands beyond the 1 required for CCPI protocol |
| 2505 | functional correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2506 | uint64_t exfwd : 4; /**< [ 19: 16](R/W) Extra LFBs to reserve for Fxxx/SINV CCPI commands beyond the 1 required for CCPI protocol |
| 2507 | functional correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2508 | uint64_t exvic : 4; /**< [ 15: 12](R/W) Extra LFBs to reserve for VICx CCPI commands beyond the 1 required for CCPI protocol |
| 2509 | functional correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2510 | uint64_t vbf_thresh : 4; /**< [ 11: 8](R/W) VBF threshold. When the number of in-use VBFs exceeds this number the L2C TAD increases |
| 2511 | the priority of all its write operations in the LMC. */ |
| 2512 | uint64_t maxvbf : 4; /**< [ 7: 4](R/W) Maximum VBFs in use at once (0 means 16, 1-15 as expected). */ |
| 2513 | uint64_t maxlfb : 4; /**< [ 3: 0](R/W) Maximum VABs/LFBs in use at once (0 means 16, 1-15 as expected). */ |
| 2514 | #else /* Word 0 - Little Endian */ |
| 2515 | uint64_t maxlfb : 4; /**< [ 3: 0](R/W) Maximum VABs/LFBs in use at once (0 means 16, 1-15 as expected). */ |
| 2516 | uint64_t maxvbf : 4; /**< [ 7: 4](R/W) Maximum VBFs in use at once (0 means 16, 1-15 as expected). */ |
| 2517 | uint64_t vbf_thresh : 4; /**< [ 11: 8](R/W) VBF threshold. When the number of in-use VBFs exceeds this number the L2C TAD increases |
| 2518 | the priority of all its write operations in the LMC. */ |
| 2519 | uint64_t exvic : 4; /**< [ 15: 12](R/W) Extra LFBs to reserve for VICx CCPI commands beyond the 1 required for CCPI protocol |
| 2520 | functional correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2521 | uint64_t exfwd : 4; /**< [ 19: 16](R/W) Extra LFBs to reserve for Fxxx/SINV CCPI commands beyond the 1 required for CCPI protocol |
| 2522 | functional correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2523 | uint64_t exrrq : 4; /**< [ 23: 20](R/W) Extra LFBs to reserve for Rxxx CCPI commands beyond the 1 required for CCPI protocol |
| 2524 | functional correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2525 | uint64_t exlrq : 4; /**< [ 27: 24](R/W) Extra LFBs to reserve for locally generated XMC commands. None are reserved for functional |
| 2526 | correctness. Ignored if L2C_OCI_CTL[ENAOCI] is 0. */ |
| 2527 | uint64_t wtfilldn : 1; /**< [ 28: 28](R/W) Be more conservative with LFB done relative to fills. */ |
| 2528 | uint64_t wtinvdn : 1; /**< [ 29: 29](R/W) Be more conservative with LFB done relative to invalidates. */ |
| 2529 | uint64_t wtlmcwrdn : 1; /**< [ 30: 30](R/W) Be more conservative with LFB done relative to LMC writes. */ |
| 2530 | uint64_t disrstp : 1; /**< [ 31: 31](R/W) When set, if the L2 receives an RSTP XMC command, it treats it as a STP. */ |
| 2531 | uint64_t frcnalc : 1; /**< [ 32: 32](R/W) When set, all cache accesses are forced to not allocate in the local L2. */ |
| 2532 | uint64_t reserved_33_63 : 31; |
| 2533 | #endif /* Word 0 - End */ |
| 2534 | } cn88xx; |
| 2535 | /* struct bdk_l2c_tad_ctl_s cn83xx; */ |
| 2536 | }; |
| 2537 | typedef union bdk_l2c_tad_ctl bdk_l2c_tad_ctl_t; |
| 2538 | |
| 2539 | #define BDK_L2C_TAD_CTL BDK_L2C_TAD_CTL_FUNC() |
| 2540 | static inline uint64_t BDK_L2C_TAD_CTL_FUNC(void) __attribute__ ((pure, always_inline)); |
| 2541 | static inline uint64_t BDK_L2C_TAD_CTL_FUNC(void) |
| 2542 | { |
| 2543 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX)) |
| 2544 | return 0x87e080800018ll; |
| 2545 | __bdk_csr_fatal("L2C_TAD_CTL", 0, 0, 0, 0, 0); |
| 2546 | } |
| 2547 | |
| 2548 | #define typedef_BDK_L2C_TAD_CTL bdk_l2c_tad_ctl_t |
| 2549 | #define bustype_BDK_L2C_TAD_CTL BDK_CSR_TYPE_RSL |
| 2550 | #define basename_BDK_L2C_TAD_CTL "L2C_TAD_CTL" |
| 2551 | #define device_bar_BDK_L2C_TAD_CTL 0x0 /* PF_BAR0 */ |
| 2552 | #define busnum_BDK_L2C_TAD_CTL 0 |
| 2553 | #define arguments_BDK_L2C_TAD_CTL -1,-1,-1,-1 |
| 2554 | |
| 2555 | /** |
| 2556 | * Register (RSL) l2c_wpar_iob# |
| 2557 | * |
| 2558 | * L2C IOB Way Partitioning Registers |
| 2559 | */ |
| 2560 | union bdk_l2c_wpar_iobx |
| 2561 | { |
| 2562 | uint64_t u; |
| 2563 | struct bdk_l2c_wpar_iobx_s |
| 2564 | { |
| 2565 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2566 | uint64_t reserved_16_63 : 48; |
| 2567 | uint64_t mask : 16; /**< [ 15: 0](R/W/H) Way partitioning mask (1 means do not use). The read value of [MASK] includes bits set |
| 2568 | because of the L2C cripple fuses. */ |
| 2569 | #else /* Word 0 - Little Endian */ |
| 2570 | uint64_t mask : 16; /**< [ 15: 0](R/W/H) Way partitioning mask (1 means do not use). The read value of [MASK] includes bits set |
| 2571 | because of the L2C cripple fuses. */ |
| 2572 | uint64_t reserved_16_63 : 48; |
| 2573 | #endif /* Word 0 - End */ |
| 2574 | } s; |
| 2575 | /* struct bdk_l2c_wpar_iobx_s cn; */ |
| 2576 | }; |
| 2577 | typedef union bdk_l2c_wpar_iobx bdk_l2c_wpar_iobx_t; |
| 2578 | |
| 2579 | static inline uint64_t BDK_L2C_WPAR_IOBX(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2580 | static inline uint64_t BDK_L2C_WPAR_IOBX(unsigned long a) |
| 2581 | { |
| 2582 | if (CAVIUM_IS_MODEL(CAVIUM_CN8XXX) && (a<=15)) |
| 2583 | return 0x87e080840200ll + 8ll * ((a) & 0xf); |
| 2584 | __bdk_csr_fatal("L2C_WPAR_IOBX", 1, a, 0, 0, 0); |
| 2585 | } |
| 2586 | |
| 2587 | #define typedef_BDK_L2C_WPAR_IOBX(a) bdk_l2c_wpar_iobx_t |
| 2588 | #define bustype_BDK_L2C_WPAR_IOBX(a) BDK_CSR_TYPE_RSL |
| 2589 | #define basename_BDK_L2C_WPAR_IOBX(a) "L2C_WPAR_IOBX" |
| 2590 | #define device_bar_BDK_L2C_WPAR_IOBX(a) 0x0 /* PF_BAR0 */ |
| 2591 | #define busnum_BDK_L2C_WPAR_IOBX(a) (a) |
| 2592 | #define arguments_BDK_L2C_WPAR_IOBX(a) (a),-1,-1,-1 |
| 2593 | |
| 2594 | /** |
| 2595 | * Register (RSL) l2c_wpar_pp# |
| 2596 | * |
| 2597 | * L2C Core Way Partitioning Registers |
| 2598 | */ |
| 2599 | union bdk_l2c_wpar_ppx |
| 2600 | { |
| 2601 | uint64_t u; |
| 2602 | struct bdk_l2c_wpar_ppx_s |
| 2603 | { |
| 2604 | #if __BYTE_ORDER == __BIG_ENDIAN /* Word 0 - Big Endian */ |
| 2605 | uint64_t reserved_16_63 : 48; |
| 2606 | uint64_t mask : 16; /**< [ 15: 0](R/W/H) Way partitioning mask (1 means do not use). The read value of [MASK] includes bits set |
| 2607 | because of the L2C cripple fuses. */ |
| 2608 | #else /* Word 0 - Little Endian */ |
| 2609 | uint64_t mask : 16; /**< [ 15: 0](R/W/H) Way partitioning mask (1 means do not use). The read value of [MASK] includes bits set |
| 2610 | because of the L2C cripple fuses. */ |
| 2611 | uint64_t reserved_16_63 : 48; |
| 2612 | #endif /* Word 0 - End */ |
| 2613 | } s; |
| 2614 | /* struct bdk_l2c_wpar_ppx_s cn; */ |
| 2615 | }; |
| 2616 | typedef union bdk_l2c_wpar_ppx bdk_l2c_wpar_ppx_t; |
| 2617 | |
| 2618 | static inline uint64_t BDK_L2C_WPAR_PPX(unsigned long a) __attribute__ ((pure, always_inline)); |
| 2619 | static inline uint64_t BDK_L2C_WPAR_PPX(unsigned long a) |
| 2620 | { |
| 2621 | if (CAVIUM_IS_MODEL(CAVIUM_CN81XX) && (a<=3)) |
| 2622 | return 0x87e080840000ll + 8ll * ((a) & 0x3); |
| 2623 | if (CAVIUM_IS_MODEL(CAVIUM_CN83XX) && (a<=23)) |
| 2624 | return 0x87e080840000ll + 8ll * ((a) & 0x1f); |
| 2625 | if (CAVIUM_IS_MODEL(CAVIUM_CN88XX) && (a<=47)) |
| 2626 | return 0x87e080840000ll + 8ll * ((a) & 0x3f); |
| 2627 | __bdk_csr_fatal("L2C_WPAR_PPX", 1, a, 0, 0, 0); |
| 2628 | } |
| 2629 | |
| 2630 | #define typedef_BDK_L2C_WPAR_PPX(a) bdk_l2c_wpar_ppx_t |
| 2631 | #define bustype_BDK_L2C_WPAR_PPX(a) BDK_CSR_TYPE_RSL |
| 2632 | #define basename_BDK_L2C_WPAR_PPX(a) "L2C_WPAR_PPX" |
| 2633 | #define device_bar_BDK_L2C_WPAR_PPX(a) 0x0 /* PF_BAR0 */ |
| 2634 | #define busnum_BDK_L2C_WPAR_PPX(a) (a) |
| 2635 | #define arguments_BDK_L2C_WPAR_PPX(a) (a),-1,-1,-1 |
| 2636 | |
| 2637 | #endif /* __BDK_CSRS_L2C_H__ */ |