Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1 | /**************************************************************************** |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2 | * Driver for Solarflare network controllers and boards |
| 3 | * Copyright 2009-2013 Solarflare Communications Inc. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 as published |
| 7 | * by the Free Software Foundation, incorporated herein by reference. |
| 8 | */ |
| 9 | |
| 10 | |
| 11 | #ifndef MCDI_PCOL_H |
| 12 | #define MCDI_PCOL_H |
| 13 | |
| 14 | /* Values to be written into FMCR_CZ_RESET_STATE_REG to control boot. */ |
| 15 | /* Power-on reset state */ |
| 16 | #define MC_FW_STATE_POR (1) |
| 17 | /* If this is set in MC_RESET_STATE_REG then it should be |
| 18 | * possible to jump into IMEM without loading code from flash. */ |
| 19 | #define MC_FW_WARM_BOOT_OK (2) |
| 20 | /* The MC main image has started to boot. */ |
| 21 | #define MC_FW_STATE_BOOTING (4) |
| 22 | /* The Scheduler has started. */ |
| 23 | #define MC_FW_STATE_SCHED (8) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 24 | /* If this is set in MC_RESET_STATE_REG then it should be |
| 25 | * possible to jump into IMEM without loading code from flash. |
| 26 | * Unlike a warm boot, assume DMEM has been reloaded, so that |
| 27 | * the MC persistent data must be reinitialised. */ |
| 28 | #define MC_FW_TEPID_BOOT_OK (16) |
| 29 | /* BIST state has been initialized */ |
| 30 | #define MC_FW_BIST_INIT_OK (128) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 31 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 32 | /* Siena MC shared memmory offsets */ |
| 33 | /* The 'doorbell' addresses are hard-wired to alert the MC when written */ |
| 34 | #define MC_SMEM_P0_DOORBELL_OFST 0x000 |
| 35 | #define MC_SMEM_P1_DOORBELL_OFST 0x004 |
| 36 | /* The rest of these are firmware-defined */ |
| 37 | #define MC_SMEM_P0_PDU_OFST 0x008 |
| 38 | #define MC_SMEM_P1_PDU_OFST 0x108 |
| 39 | #define MC_SMEM_PDU_LEN 0x100 |
| 40 | #define MC_SMEM_P0_PTP_TIME_OFST 0x7f0 |
| 41 | #define MC_SMEM_P0_STATUS_OFST 0x7f8 |
| 42 | #define MC_SMEM_P1_STATUS_OFST 0x7fc |
| 43 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 44 | /* Values to be written to the per-port status dword in shared |
| 45 | * memory on reboot and assert */ |
| 46 | #define MC_STATUS_DWORD_REBOOT (0xb007b007) |
| 47 | #define MC_STATUS_DWORD_ASSERT (0xdeaddead) |
| 48 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 49 | /* Check whether an mcfw version (in host order) belongs to a bootloader */ |
| 50 | #define MC_FW_VERSION_IS_BOOTLOADER(_v) (((_v) >> 16) == 0xb007) |
| 51 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 52 | /* The current version of the MCDI protocol. |
| 53 | * |
| 54 | * Note that the ROM burnt into the card only talks V0, so at the very |
| 55 | * least every driver must support version 0 and MCDI_PCOL_VERSION |
| 56 | */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 57 | #define MCDI_PCOL_VERSION 2 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 58 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 59 | /* Unused commands: 0x23, 0x27, 0x30, 0x31 */ |
| 60 | |
Ben Hutchings | 1aa8b47 | 2012-07-10 10:56:59 +0000 | [diff] [blame] | 61 | /* MCDI version 1 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 62 | * |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 63 | * Each MCDI request starts with an MCDI_HEADER, which is a 32bit |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 64 | * structure, filled in by the client. |
| 65 | * |
| 66 | * 0 7 8 16 20 22 23 24 31 |
| 67 | * | CODE | R | LEN | SEQ | Rsvd | E | R | XFLAGS | |
| 68 | * | | | |
| 69 | * | | \--- Response |
| 70 | * | \------- Error |
| 71 | * \------------------------------ Resync (always set) |
| 72 | * |
| 73 | * The client writes it's request into MC shared memory, and rings the |
| 74 | * doorbell. Each request is completed by either by the MC writting |
| 75 | * back into shared memory, or by writting out an event. |
| 76 | * |
| 77 | * All MCDI commands support completion by shared memory response. Each |
| 78 | * request may also contain additional data (accounted for by HEADER.LEN), |
| 79 | * and some response's may also contain additional data (again, accounted |
| 80 | * for by HEADER.LEN). |
| 81 | * |
| 82 | * Some MCDI commands support completion by event, in which any associated |
| 83 | * response data is included in the event. |
| 84 | * |
| 85 | * The protocol requires one response to be delivered for every request, a |
| 86 | * request should not be sent unless the response for the previous request |
| 87 | * has been received (either by polling shared memory, or by receiving |
| 88 | * an event). |
| 89 | */ |
| 90 | |
| 91 | /** Request/Response structure */ |
| 92 | #define MCDI_HEADER_OFST 0 |
| 93 | #define MCDI_HEADER_CODE_LBN 0 |
| 94 | #define MCDI_HEADER_CODE_WIDTH 7 |
| 95 | #define MCDI_HEADER_RESYNC_LBN 7 |
| 96 | #define MCDI_HEADER_RESYNC_WIDTH 1 |
| 97 | #define MCDI_HEADER_DATALEN_LBN 8 |
| 98 | #define MCDI_HEADER_DATALEN_WIDTH 8 |
| 99 | #define MCDI_HEADER_SEQ_LBN 16 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 100 | #define MCDI_HEADER_SEQ_WIDTH 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 101 | #define MCDI_HEADER_RSVD_LBN 20 |
| 102 | #define MCDI_HEADER_RSVD_WIDTH 1 |
| 103 | #define MCDI_HEADER_NOT_EPOCH_LBN 21 |
| 104 | #define MCDI_HEADER_NOT_EPOCH_WIDTH 1 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 105 | #define MCDI_HEADER_ERROR_LBN 22 |
| 106 | #define MCDI_HEADER_ERROR_WIDTH 1 |
| 107 | #define MCDI_HEADER_RESPONSE_LBN 23 |
| 108 | #define MCDI_HEADER_RESPONSE_WIDTH 1 |
| 109 | #define MCDI_HEADER_XFLAGS_LBN 24 |
| 110 | #define MCDI_HEADER_XFLAGS_WIDTH 8 |
| 111 | /* Request response using event */ |
| 112 | #define MCDI_HEADER_XFLAGS_EVREQ 0x01 |
| 113 | |
| 114 | /* Maximum number of payload bytes */ |
Ben Hutchings | d0c2ee9 | 2013-08-20 15:47:12 +0100 | [diff] [blame] | 115 | #define MCDI_CTL_SDU_LEN_MAX_V1 0xfc |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 116 | #define MCDI_CTL_SDU_LEN_MAX_V2 0x400 |
Ben Hutchings | d0c2ee9 | 2013-08-20 15:47:12 +0100 | [diff] [blame] | 117 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 118 | #define MCDI_CTL_SDU_LEN_MAX MCDI_CTL_SDU_LEN_MAX_V2 |
| 119 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 120 | |
| 121 | /* The MC can generate events for two reasons: |
| 122 | * - To complete a shared memory request if XFLAGS_EVREQ was set |
| 123 | * - As a notification (link state, i2c event), controlled |
| 124 | * via MC_CMD_LOG_CTRL |
| 125 | * |
| 126 | * Both events share a common structure: |
| 127 | * |
| 128 | * 0 32 33 36 44 52 60 |
| 129 | * | Data | Cont | Level | Src | Code | Rsvd | |
| 130 | * | |
| 131 | * \ There is another event pending in this notification |
| 132 | * |
| 133 | * If Code==CMDDONE, then the fields are further interpreted as: |
| 134 | * |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 135 | * - LEVEL==INFO Command succeeded |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 136 | * - LEVEL==ERR Command failed |
| 137 | * |
| 138 | * 0 8 16 24 32 |
| 139 | * | Seq | Datalen | Errno | Rsvd | |
| 140 | * |
| 141 | * These fields are taken directly out of the standard MCDI header, i.e., |
| 142 | * LEVEL==ERR, Datalen == 0 => Reboot |
| 143 | * |
| 144 | * Events can be squirted out of the UART (using LOG_CTRL) without a |
| 145 | * MCDI header. An event can be distinguished from a MCDI response by |
| 146 | * examining the first byte which is 0xc0. This corresponds to the |
| 147 | * non-existent MCDI command MC_CMD_DEBUG_LOG. |
| 148 | * |
| 149 | * 0 7 8 |
| 150 | * | command | Resync | = 0xc0 |
| 151 | * |
| 152 | * Since the event is written in big-endian byte order, this works |
| 153 | * providing bits 56-63 of the event are 0xc0. |
| 154 | * |
| 155 | * 56 60 63 |
| 156 | * | Rsvd | Code | = 0xc0 |
| 157 | * |
| 158 | * Which means for convenience the event code is 0xc for all MC |
| 159 | * generated events. |
| 160 | */ |
| 161 | #define FSE_AZ_EV_CODE_MCDI_EVRESPONSE 0xc |
| 162 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 163 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 164 | /* Operation not permitted. */ |
| 165 | #define MC_CMD_ERR_EPERM 1 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 166 | /* Non-existent command target */ |
| 167 | #define MC_CMD_ERR_ENOENT 2 |
| 168 | /* assert() has killed the MC */ |
| 169 | #define MC_CMD_ERR_EINTR 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 170 | /* I/O failure */ |
| 171 | #define MC_CMD_ERR_EIO 5 |
| 172 | /* Try again */ |
| 173 | #define MC_CMD_ERR_EAGAIN 11 |
| 174 | /* Out of memory */ |
| 175 | #define MC_CMD_ERR_ENOMEM 12 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 176 | /* Caller does not hold required locks */ |
| 177 | #define MC_CMD_ERR_EACCES 13 |
| 178 | /* Resource is currently unavailable (e.g. lock contention) */ |
| 179 | #define MC_CMD_ERR_EBUSY 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 180 | /* No such device */ |
| 181 | #define MC_CMD_ERR_ENODEV 19 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 182 | /* Invalid argument to target */ |
| 183 | #define MC_CMD_ERR_EINVAL 22 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 184 | /* Out of range */ |
| 185 | #define MC_CMD_ERR_ERANGE 34 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 186 | /* Non-recursive resource is already acquired */ |
| 187 | #define MC_CMD_ERR_EDEADLK 35 |
| 188 | /* Operation not implemented */ |
| 189 | #define MC_CMD_ERR_ENOSYS 38 |
| 190 | /* Operation timed out */ |
| 191 | #define MC_CMD_ERR_ETIME 62 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 192 | /* Link has been severed */ |
| 193 | #define MC_CMD_ERR_ENOLINK 67 |
| 194 | /* Protocol error */ |
| 195 | #define MC_CMD_ERR_EPROTO 71 |
| 196 | /* Operation not supported */ |
| 197 | #define MC_CMD_ERR_ENOTSUP 95 |
| 198 | /* Address not available */ |
| 199 | #define MC_CMD_ERR_EADDRNOTAVAIL 99 |
| 200 | /* Not connected */ |
| 201 | #define MC_CMD_ERR_ENOTCONN 107 |
| 202 | /* Operation already in progress */ |
| 203 | #define MC_CMD_ERR_EALREADY 114 |
| 204 | |
| 205 | /* Resource allocation failed. */ |
| 206 | #define MC_CMD_ERR_ALLOC_FAIL 0x1000 |
| 207 | /* V-adaptor not found. */ |
| 208 | #define MC_CMD_ERR_NO_VADAPTOR 0x1001 |
| 209 | /* EVB port not found. */ |
| 210 | #define MC_CMD_ERR_NO_EVB_PORT 0x1002 |
| 211 | /* V-switch not found. */ |
| 212 | #define MC_CMD_ERR_NO_VSWITCH 0x1003 |
| 213 | /* Too many VLAN tags. */ |
| 214 | #define MC_CMD_ERR_VLAN_LIMIT 0x1004 |
| 215 | /* Bad PCI function number. */ |
| 216 | #define MC_CMD_ERR_BAD_PCI_FUNC 0x1005 |
| 217 | /* Invalid VLAN mode. */ |
| 218 | #define MC_CMD_ERR_BAD_VLAN_MODE 0x1006 |
| 219 | /* Invalid v-switch type. */ |
| 220 | #define MC_CMD_ERR_BAD_VSWITCH_TYPE 0x1007 |
| 221 | /* Invalid v-port type. */ |
| 222 | #define MC_CMD_ERR_BAD_VPORT_TYPE 0x1008 |
| 223 | /* MAC address exists. */ |
| 224 | #define MC_CMD_ERR_MAC_EXIST 0x1009 |
| 225 | /* Slave core not present */ |
| 226 | #define MC_CMD_ERR_SLAVE_NOT_PRESENT 0x100a |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 227 | /* The datapath is disabled. */ |
| 228 | #define MC_CMD_ERR_DATAPATH_DISABLED 0x100b |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 229 | |
| 230 | #define MC_CMD_ERR_CODE_OFST 0 |
| 231 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 232 | /* We define 8 "escape" commands to allow |
| 233 | for command number space extension */ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 234 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 235 | #define MC_CMD_CMD_SPACE_ESCAPE_0 0x78 |
| 236 | #define MC_CMD_CMD_SPACE_ESCAPE_1 0x79 |
| 237 | #define MC_CMD_CMD_SPACE_ESCAPE_2 0x7A |
| 238 | #define MC_CMD_CMD_SPACE_ESCAPE_3 0x7B |
| 239 | #define MC_CMD_CMD_SPACE_ESCAPE_4 0x7C |
| 240 | #define MC_CMD_CMD_SPACE_ESCAPE_5 0x7D |
| 241 | #define MC_CMD_CMD_SPACE_ESCAPE_6 0x7E |
| 242 | #define MC_CMD_CMD_SPACE_ESCAPE_7 0x7F |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 243 | |
| 244 | /* Vectors in the boot ROM */ |
| 245 | /* Point to the copycode entry point. */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 246 | #define SIENA_MC_BOOTROM_COPYCODE_VEC (0x800 - 3 * 0x4) |
| 247 | #define HUNT_MC_BOOTROM_COPYCODE_VEC (0x8000 - 3 * 0x4) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 248 | /* Points to the recovery mode entry point. */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 249 | #define SIENA_MC_BOOTROM_NOFLASH_VEC (0x800 - 2 * 0x4) |
| 250 | #define HUNT_MC_BOOTROM_NOFLASH_VEC (0x8000 - 2 * 0x4) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 251 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 252 | /* The command set exported by the boot ROM (MCDI v0) */ |
| 253 | #define MC_CMD_GET_VERSION_V0_SUPPORTED_FUNCS { \ |
| 254 | (1 << MC_CMD_READ32) | \ |
| 255 | (1 << MC_CMD_WRITE32) | \ |
| 256 | (1 << MC_CMD_COPYCODE) | \ |
| 257 | (1 << MC_CMD_GET_VERSION), \ |
| 258 | 0, 0, 0 } |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 259 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 260 | #define MC_CMD_SENSOR_INFO_OUT_OFFSET_OFST(_x) \ |
| 261 | (MC_CMD_SENSOR_ENTRY_OFST + (_x)) |
| 262 | |
| 263 | #define MC_CMD_DBI_WRITE_IN_ADDRESS_OFST(n) \ |
| 264 | (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST + \ |
| 265 | MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST + \ |
| 266 | (n) * MC_CMD_DBIWROP_TYPEDEF_LEN) |
| 267 | |
| 268 | #define MC_CMD_DBI_WRITE_IN_BYTE_MASK_OFST(n) \ |
| 269 | (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST + \ |
| 270 | MC_CMD_DBIWROP_TYPEDEF_BYTE_MASK_OFST + \ |
| 271 | (n) * MC_CMD_DBIWROP_TYPEDEF_LEN) |
| 272 | |
| 273 | #define MC_CMD_DBI_WRITE_IN_VALUE_OFST(n) \ |
| 274 | (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST + \ |
| 275 | MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST + \ |
| 276 | (n) * MC_CMD_DBIWROP_TYPEDEF_LEN) |
| 277 | |
| 278 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 279 | /* Version 2 adds an optional argument to error returns: the errno value |
| 280 | * may be followed by the (0-based) number of the first argument that |
| 281 | * could not be processed. |
| 282 | */ |
| 283 | #define MC_CMD_ERR_ARG_OFST 4 |
| 284 | |
| 285 | /* No space */ |
| 286 | #define MC_CMD_ERR_ENOSPC 28 |
| 287 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 288 | /* MCDI_EVENT structuredef */ |
| 289 | #define MCDI_EVENT_LEN 8 |
| 290 | #define MCDI_EVENT_CONT_LBN 32 |
| 291 | #define MCDI_EVENT_CONT_WIDTH 1 |
| 292 | #define MCDI_EVENT_LEVEL_LBN 33 |
| 293 | #define MCDI_EVENT_LEVEL_WIDTH 3 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 294 | /* enum: Info. */ |
| 295 | #define MCDI_EVENT_LEVEL_INFO 0x0 |
| 296 | /* enum: Warning. */ |
| 297 | #define MCDI_EVENT_LEVEL_WARN 0x1 |
| 298 | /* enum: Error. */ |
| 299 | #define MCDI_EVENT_LEVEL_ERR 0x2 |
| 300 | /* enum: Fatal. */ |
| 301 | #define MCDI_EVENT_LEVEL_FATAL 0x3 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 302 | #define MCDI_EVENT_DATA_OFST 0 |
| 303 | #define MCDI_EVENT_CMDDONE_SEQ_LBN 0 |
| 304 | #define MCDI_EVENT_CMDDONE_SEQ_WIDTH 8 |
| 305 | #define MCDI_EVENT_CMDDONE_DATALEN_LBN 8 |
| 306 | #define MCDI_EVENT_CMDDONE_DATALEN_WIDTH 8 |
| 307 | #define MCDI_EVENT_CMDDONE_ERRNO_LBN 16 |
| 308 | #define MCDI_EVENT_CMDDONE_ERRNO_WIDTH 8 |
| 309 | #define MCDI_EVENT_LINKCHANGE_LP_CAP_LBN 0 |
| 310 | #define MCDI_EVENT_LINKCHANGE_LP_CAP_WIDTH 16 |
| 311 | #define MCDI_EVENT_LINKCHANGE_SPEED_LBN 16 |
| 312 | #define MCDI_EVENT_LINKCHANGE_SPEED_WIDTH 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 313 | /* enum: 100Mbs */ |
| 314 | #define MCDI_EVENT_LINKCHANGE_SPEED_100M 0x1 |
| 315 | /* enum: 1Gbs */ |
| 316 | #define MCDI_EVENT_LINKCHANGE_SPEED_1G 0x2 |
| 317 | /* enum: 10Gbs */ |
| 318 | #define MCDI_EVENT_LINKCHANGE_SPEED_10G 0x3 |
| 319 | /* enum: 40Gbs */ |
| 320 | #define MCDI_EVENT_LINKCHANGE_SPEED_40G 0x4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 321 | #define MCDI_EVENT_LINKCHANGE_FCNTL_LBN 20 |
| 322 | #define MCDI_EVENT_LINKCHANGE_FCNTL_WIDTH 4 |
| 323 | #define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_LBN 24 |
| 324 | #define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_WIDTH 8 |
| 325 | #define MCDI_EVENT_SENSOREVT_MONITOR_LBN 0 |
| 326 | #define MCDI_EVENT_SENSOREVT_MONITOR_WIDTH 8 |
| 327 | #define MCDI_EVENT_SENSOREVT_STATE_LBN 8 |
| 328 | #define MCDI_EVENT_SENSOREVT_STATE_WIDTH 8 |
| 329 | #define MCDI_EVENT_SENSOREVT_VALUE_LBN 16 |
| 330 | #define MCDI_EVENT_SENSOREVT_VALUE_WIDTH 16 |
| 331 | #define MCDI_EVENT_FWALERT_DATA_LBN 8 |
| 332 | #define MCDI_EVENT_FWALERT_DATA_WIDTH 24 |
| 333 | #define MCDI_EVENT_FWALERT_REASON_LBN 0 |
| 334 | #define MCDI_EVENT_FWALERT_REASON_WIDTH 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 335 | /* enum: SRAM Access. */ |
| 336 | #define MCDI_EVENT_FWALERT_REASON_SRAM_ACCESS 0x1 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 337 | #define MCDI_EVENT_FLR_VF_LBN 0 |
| 338 | #define MCDI_EVENT_FLR_VF_WIDTH 8 |
| 339 | #define MCDI_EVENT_TX_ERR_TXQ_LBN 0 |
| 340 | #define MCDI_EVENT_TX_ERR_TXQ_WIDTH 12 |
| 341 | #define MCDI_EVENT_TX_ERR_TYPE_LBN 12 |
| 342 | #define MCDI_EVENT_TX_ERR_TYPE_WIDTH 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 343 | /* enum: Descriptor loader reported failure */ |
| 344 | #define MCDI_EVENT_TX_ERR_DL_FAIL 0x1 |
| 345 | /* enum: Descriptor ring empty and no EOP seen for packet */ |
| 346 | #define MCDI_EVENT_TX_ERR_NO_EOP 0x2 |
| 347 | /* enum: Overlength packet */ |
| 348 | #define MCDI_EVENT_TX_ERR_2BIG 0x3 |
| 349 | /* enum: Malformed option descriptor */ |
| 350 | #define MCDI_EVENT_TX_BAD_OPTDESC 0x5 |
| 351 | /* enum: Option descriptor part way through a packet */ |
| 352 | #define MCDI_EVENT_TX_OPT_IN_PKT 0x8 |
| 353 | /* enum: DMA or PIO data access error */ |
| 354 | #define MCDI_EVENT_TX_ERR_BAD_DMA_OR_PIO 0x9 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 355 | #define MCDI_EVENT_TX_ERR_INFO_LBN 16 |
| 356 | #define MCDI_EVENT_TX_ERR_INFO_WIDTH 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 357 | #define MCDI_EVENT_TX_FLUSH_TO_DRIVER_LBN 12 |
| 358 | #define MCDI_EVENT_TX_FLUSH_TO_DRIVER_WIDTH 1 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 359 | #define MCDI_EVENT_TX_FLUSH_TXQ_LBN 0 |
| 360 | #define MCDI_EVENT_TX_FLUSH_TXQ_WIDTH 12 |
| 361 | #define MCDI_EVENT_PTP_ERR_TYPE_LBN 0 |
| 362 | #define MCDI_EVENT_PTP_ERR_TYPE_WIDTH 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 363 | /* enum: PLL lost lock */ |
| 364 | #define MCDI_EVENT_PTP_ERR_PLL_LOST 0x1 |
| 365 | /* enum: Filter overflow (PDMA) */ |
| 366 | #define MCDI_EVENT_PTP_ERR_FILTER 0x2 |
| 367 | /* enum: FIFO overflow (FPGA) */ |
| 368 | #define MCDI_EVENT_PTP_ERR_FIFO 0x3 |
| 369 | /* enum: Merge queue overflow */ |
| 370 | #define MCDI_EVENT_PTP_ERR_QUEUE 0x4 |
| 371 | #define MCDI_EVENT_AOE_ERR_TYPE_LBN 0 |
| 372 | #define MCDI_EVENT_AOE_ERR_TYPE_WIDTH 8 |
| 373 | /* enum: AOE failed to load - no valid image? */ |
| 374 | #define MCDI_EVENT_AOE_NO_LOAD 0x1 |
| 375 | /* enum: AOE FC reported an exception */ |
| 376 | #define MCDI_EVENT_AOE_FC_ASSERT 0x2 |
| 377 | /* enum: AOE FC watchdogged */ |
| 378 | #define MCDI_EVENT_AOE_FC_WATCHDOG 0x3 |
| 379 | /* enum: AOE FC failed to start */ |
| 380 | #define MCDI_EVENT_AOE_FC_NO_START 0x4 |
| 381 | /* enum: Generic AOE fault - likely to have been reported via other means too |
| 382 | * but intended for use by aoex driver. |
| 383 | */ |
| 384 | #define MCDI_EVENT_AOE_FAULT 0x5 |
| 385 | /* enum: Results of reprogramming the CPLD (status in AOE_ERR_DATA) */ |
| 386 | #define MCDI_EVENT_AOE_CPLD_REPROGRAMMED 0x6 |
| 387 | /* enum: AOE loaded successfully */ |
| 388 | #define MCDI_EVENT_AOE_LOAD 0x7 |
| 389 | /* enum: AOE DMA operation completed (LSB of HOST_HANDLE in AOE_ERR_DATA) */ |
| 390 | #define MCDI_EVENT_AOE_DMA 0x8 |
| 391 | /* enum: AOE byteblaster connected/disconnected (Connection status in |
| 392 | * AOE_ERR_DATA) |
| 393 | */ |
| 394 | #define MCDI_EVENT_AOE_BYTEBLASTER 0x9 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 395 | /* enum: DDR ECC status update */ |
| 396 | #define MCDI_EVENT_AOE_DDR_ECC_STATUS 0xa |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 397 | #define MCDI_EVENT_AOE_ERR_DATA_LBN 8 |
| 398 | #define MCDI_EVENT_AOE_ERR_DATA_WIDTH 8 |
| 399 | #define MCDI_EVENT_RX_ERR_RXQ_LBN 0 |
| 400 | #define MCDI_EVENT_RX_ERR_RXQ_WIDTH 12 |
| 401 | #define MCDI_EVENT_RX_ERR_TYPE_LBN 12 |
| 402 | #define MCDI_EVENT_RX_ERR_TYPE_WIDTH 4 |
| 403 | #define MCDI_EVENT_RX_ERR_INFO_LBN 16 |
| 404 | #define MCDI_EVENT_RX_ERR_INFO_WIDTH 16 |
| 405 | #define MCDI_EVENT_RX_FLUSH_TO_DRIVER_LBN 12 |
| 406 | #define MCDI_EVENT_RX_FLUSH_TO_DRIVER_WIDTH 1 |
| 407 | #define MCDI_EVENT_RX_FLUSH_RXQ_LBN 0 |
| 408 | #define MCDI_EVENT_RX_FLUSH_RXQ_WIDTH 12 |
| 409 | #define MCDI_EVENT_MC_REBOOT_COUNT_LBN 0 |
| 410 | #define MCDI_EVENT_MC_REBOOT_COUNT_WIDTH 16 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 411 | #define MCDI_EVENT_DATA_LBN 0 |
| 412 | #define MCDI_EVENT_DATA_WIDTH 32 |
| 413 | #define MCDI_EVENT_SRC_LBN 36 |
| 414 | #define MCDI_EVENT_SRC_WIDTH 8 |
| 415 | #define MCDI_EVENT_EV_CODE_LBN 60 |
| 416 | #define MCDI_EVENT_EV_CODE_WIDTH 4 |
| 417 | #define MCDI_EVENT_CODE_LBN 44 |
| 418 | #define MCDI_EVENT_CODE_WIDTH 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 419 | /* enum: Bad assert. */ |
| 420 | #define MCDI_EVENT_CODE_BADSSERT 0x1 |
| 421 | /* enum: PM Notice. */ |
| 422 | #define MCDI_EVENT_CODE_PMNOTICE 0x2 |
| 423 | /* enum: Command done. */ |
| 424 | #define MCDI_EVENT_CODE_CMDDONE 0x3 |
| 425 | /* enum: Link change. */ |
| 426 | #define MCDI_EVENT_CODE_LINKCHANGE 0x4 |
| 427 | /* enum: Sensor Event. */ |
| 428 | #define MCDI_EVENT_CODE_SENSOREVT 0x5 |
| 429 | /* enum: Schedule error. */ |
| 430 | #define MCDI_EVENT_CODE_SCHEDERR 0x6 |
| 431 | /* enum: Reboot. */ |
| 432 | #define MCDI_EVENT_CODE_REBOOT 0x7 |
| 433 | /* enum: Mac stats DMA. */ |
| 434 | #define MCDI_EVENT_CODE_MAC_STATS_DMA 0x8 |
| 435 | /* enum: Firmware alert. */ |
| 436 | #define MCDI_EVENT_CODE_FWALERT 0x9 |
| 437 | /* enum: Function level reset. */ |
| 438 | #define MCDI_EVENT_CODE_FLR 0xa |
| 439 | /* enum: Transmit error */ |
| 440 | #define MCDI_EVENT_CODE_TX_ERR 0xb |
| 441 | /* enum: Tx flush has completed */ |
| 442 | #define MCDI_EVENT_CODE_TX_FLUSH 0xc |
| 443 | /* enum: PTP packet received timestamp */ |
| 444 | #define MCDI_EVENT_CODE_PTP_RX 0xd |
| 445 | /* enum: PTP NIC failure */ |
| 446 | #define MCDI_EVENT_CODE_PTP_FAULT 0xe |
| 447 | /* enum: PTP PPS event */ |
| 448 | #define MCDI_EVENT_CODE_PTP_PPS 0xf |
| 449 | /* enum: Rx flush has completed */ |
| 450 | #define MCDI_EVENT_CODE_RX_FLUSH 0x10 |
| 451 | /* enum: Receive error */ |
| 452 | #define MCDI_EVENT_CODE_RX_ERR 0x11 |
| 453 | /* enum: AOE fault */ |
| 454 | #define MCDI_EVENT_CODE_AOE 0x12 |
| 455 | /* enum: Network port calibration failed (VCAL). */ |
| 456 | #define MCDI_EVENT_CODE_VCAL_FAIL 0x13 |
| 457 | /* enum: HW PPS event */ |
| 458 | #define MCDI_EVENT_CODE_HW_PPS 0x14 |
| 459 | /* enum: The MC has rebooted (huntington and later, siena uses CODE_REBOOT and |
| 460 | * a different format) |
| 461 | */ |
| 462 | #define MCDI_EVENT_CODE_MC_REBOOT 0x15 |
| 463 | /* enum: the MC has detected a parity error */ |
| 464 | #define MCDI_EVENT_CODE_PAR_ERR 0x16 |
| 465 | /* enum: the MC has detected a correctable error */ |
| 466 | #define MCDI_EVENT_CODE_ECC_CORR_ERR 0x17 |
| 467 | /* enum: the MC has detected an uncorrectable error */ |
| 468 | #define MCDI_EVENT_CODE_ECC_FATAL_ERR 0x18 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 469 | /* enum: The MC has entered offline BIST mode */ |
| 470 | #define MCDI_EVENT_CODE_MC_BIST 0x19 |
| 471 | /* enum: PTP tick event providing current NIC time */ |
| 472 | #define MCDI_EVENT_CODE_PTP_TIME 0x1a |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 473 | /* enum: Artificial event generated by host and posted via MC for test |
| 474 | * purposes. |
| 475 | */ |
| 476 | #define MCDI_EVENT_CODE_TESTGEN 0xfa |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 477 | #define MCDI_EVENT_CMDDONE_DATA_OFST 0 |
| 478 | #define MCDI_EVENT_CMDDONE_DATA_LBN 0 |
| 479 | #define MCDI_EVENT_CMDDONE_DATA_WIDTH 32 |
| 480 | #define MCDI_EVENT_LINKCHANGE_DATA_OFST 0 |
| 481 | #define MCDI_EVENT_LINKCHANGE_DATA_LBN 0 |
| 482 | #define MCDI_EVENT_LINKCHANGE_DATA_WIDTH 32 |
| 483 | #define MCDI_EVENT_SENSOREVT_DATA_OFST 0 |
| 484 | #define MCDI_EVENT_SENSOREVT_DATA_LBN 0 |
| 485 | #define MCDI_EVENT_SENSOREVT_DATA_WIDTH 32 |
| 486 | #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_OFST 0 |
| 487 | #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LBN 0 |
| 488 | #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_WIDTH 32 |
| 489 | #define MCDI_EVENT_TX_ERR_DATA_OFST 0 |
| 490 | #define MCDI_EVENT_TX_ERR_DATA_LBN 0 |
| 491 | #define MCDI_EVENT_TX_ERR_DATA_WIDTH 32 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 492 | /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the seconds field of |
| 493 | * timestamp |
| 494 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 495 | #define MCDI_EVENT_PTP_SECONDS_OFST 0 |
| 496 | #define MCDI_EVENT_PTP_SECONDS_LBN 0 |
| 497 | #define MCDI_EVENT_PTP_SECONDS_WIDTH 32 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 498 | /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the major field of |
| 499 | * timestamp |
| 500 | */ |
| 501 | #define MCDI_EVENT_PTP_MAJOR_OFST 0 |
| 502 | #define MCDI_EVENT_PTP_MAJOR_LBN 0 |
| 503 | #define MCDI_EVENT_PTP_MAJOR_WIDTH 32 |
| 504 | /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the nanoseconds field |
| 505 | * of timestamp |
| 506 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 507 | #define MCDI_EVENT_PTP_NANOSECONDS_OFST 0 |
| 508 | #define MCDI_EVENT_PTP_NANOSECONDS_LBN 0 |
| 509 | #define MCDI_EVENT_PTP_NANOSECONDS_WIDTH 32 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 510 | /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the minor field of |
| 511 | * timestamp |
| 512 | */ |
| 513 | #define MCDI_EVENT_PTP_MINOR_OFST 0 |
| 514 | #define MCDI_EVENT_PTP_MINOR_LBN 0 |
| 515 | #define MCDI_EVENT_PTP_MINOR_WIDTH 32 |
| 516 | /* For CODE_PTP_RX events, the lowest four bytes of sourceUUID from PTP packet |
| 517 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 518 | #define MCDI_EVENT_PTP_UUID_OFST 0 |
| 519 | #define MCDI_EVENT_PTP_UUID_LBN 0 |
| 520 | #define MCDI_EVENT_PTP_UUID_WIDTH 32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 521 | #define MCDI_EVENT_RX_ERR_DATA_OFST 0 |
| 522 | #define MCDI_EVENT_RX_ERR_DATA_LBN 0 |
| 523 | #define MCDI_EVENT_RX_ERR_DATA_WIDTH 32 |
| 524 | #define MCDI_EVENT_PAR_ERR_DATA_OFST 0 |
| 525 | #define MCDI_EVENT_PAR_ERR_DATA_LBN 0 |
| 526 | #define MCDI_EVENT_PAR_ERR_DATA_WIDTH 32 |
| 527 | #define MCDI_EVENT_ECC_CORR_ERR_DATA_OFST 0 |
| 528 | #define MCDI_EVENT_ECC_CORR_ERR_DATA_LBN 0 |
| 529 | #define MCDI_EVENT_ECC_CORR_ERR_DATA_WIDTH 32 |
| 530 | #define MCDI_EVENT_ECC_FATAL_ERR_DATA_OFST 0 |
| 531 | #define MCDI_EVENT_ECC_FATAL_ERR_DATA_LBN 0 |
| 532 | #define MCDI_EVENT_ECC_FATAL_ERR_DATA_WIDTH 32 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 533 | /* For CODE_PTP_TIME events, the major value of the PTP clock */ |
| 534 | #define MCDI_EVENT_PTP_TIME_MAJOR_OFST 0 |
| 535 | #define MCDI_EVENT_PTP_TIME_MAJOR_LBN 0 |
| 536 | #define MCDI_EVENT_PTP_TIME_MAJOR_WIDTH 32 |
| 537 | /* For CODE_PTP_TIME events, bits 19-26 of the minor value of the PTP clock */ |
| 538 | #define MCDI_EVENT_PTP_TIME_MINOR_26_19_LBN 36 |
| 539 | #define MCDI_EVENT_PTP_TIME_MINOR_26_19_WIDTH 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 540 | |
| 541 | /* FCDI_EVENT structuredef */ |
| 542 | #define FCDI_EVENT_LEN 8 |
| 543 | #define FCDI_EVENT_CONT_LBN 32 |
| 544 | #define FCDI_EVENT_CONT_WIDTH 1 |
| 545 | #define FCDI_EVENT_LEVEL_LBN 33 |
| 546 | #define FCDI_EVENT_LEVEL_WIDTH 3 |
| 547 | /* enum: Info. */ |
| 548 | #define FCDI_EVENT_LEVEL_INFO 0x0 |
| 549 | /* enum: Warning. */ |
| 550 | #define FCDI_EVENT_LEVEL_WARN 0x1 |
| 551 | /* enum: Error. */ |
| 552 | #define FCDI_EVENT_LEVEL_ERR 0x2 |
| 553 | /* enum: Fatal. */ |
| 554 | #define FCDI_EVENT_LEVEL_FATAL 0x3 |
| 555 | #define FCDI_EVENT_DATA_OFST 0 |
| 556 | #define FCDI_EVENT_LINK_STATE_STATUS_LBN 0 |
| 557 | #define FCDI_EVENT_LINK_STATE_STATUS_WIDTH 1 |
| 558 | #define FCDI_EVENT_LINK_DOWN 0x0 /* enum */ |
| 559 | #define FCDI_EVENT_LINK_UP 0x1 /* enum */ |
| 560 | #define FCDI_EVENT_DATA_LBN 0 |
| 561 | #define FCDI_EVENT_DATA_WIDTH 32 |
| 562 | #define FCDI_EVENT_SRC_LBN 36 |
| 563 | #define FCDI_EVENT_SRC_WIDTH 8 |
| 564 | #define FCDI_EVENT_EV_CODE_LBN 60 |
| 565 | #define FCDI_EVENT_EV_CODE_WIDTH 4 |
| 566 | #define FCDI_EVENT_CODE_LBN 44 |
| 567 | #define FCDI_EVENT_CODE_WIDTH 8 |
| 568 | /* enum: The FC was rebooted. */ |
| 569 | #define FCDI_EVENT_CODE_REBOOT 0x1 |
| 570 | /* enum: Bad assert. */ |
| 571 | #define FCDI_EVENT_CODE_ASSERT 0x2 |
| 572 | /* enum: DDR3 test result. */ |
| 573 | #define FCDI_EVENT_CODE_DDR_TEST_RESULT 0x3 |
| 574 | /* enum: Link status. */ |
| 575 | #define FCDI_EVENT_CODE_LINK_STATE 0x4 |
| 576 | /* enum: A timed read is ready to be serviced. */ |
| 577 | #define FCDI_EVENT_CODE_TIMED_READ 0x5 |
| 578 | /* enum: One or more PPS IN events */ |
| 579 | #define FCDI_EVENT_CODE_PPS_IN 0x6 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 580 | /* enum: Tick event from PTP clock */ |
| 581 | #define FCDI_EVENT_CODE_PTP_TICK 0x7 |
| 582 | /* enum: ECC error counters */ |
| 583 | #define FCDI_EVENT_CODE_DDR_ECC_STATUS 0x8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 584 | #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_OFST 0 |
| 585 | #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LBN 0 |
| 586 | #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_WIDTH 32 |
| 587 | #define FCDI_EVENT_ASSERT_TYPE_LBN 36 |
| 588 | #define FCDI_EVENT_ASSERT_TYPE_WIDTH 8 |
| 589 | #define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_LBN 36 |
| 590 | #define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_WIDTH 8 |
| 591 | #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_OFST 0 |
| 592 | #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LBN 0 |
| 593 | #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_WIDTH 32 |
| 594 | #define FCDI_EVENT_LINK_STATE_DATA_OFST 0 |
| 595 | #define FCDI_EVENT_LINK_STATE_DATA_LBN 0 |
| 596 | #define FCDI_EVENT_LINK_STATE_DATA_WIDTH 32 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 597 | #define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_LBN 36 |
| 598 | #define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_WIDTH 8 |
| 599 | #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_OFST 0 |
| 600 | #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LBN 0 |
| 601 | #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_WIDTH 32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 602 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 603 | /* FCDI_EXTENDED_EVENT_PPS structuredef: Extended FCDI event to send PPS events |
| 604 | * to the MC. Note that this structure | is overlayed over a normal FCDI event |
| 605 | * such that bits 32-63 containing | event code, level, source etc remain the |
| 606 | * same. In this case the data | field of the header is defined to be the |
| 607 | * number of timestamps |
| 608 | */ |
| 609 | #define FCDI_EXTENDED_EVENT_PPS_LENMIN 16 |
| 610 | #define FCDI_EXTENDED_EVENT_PPS_LENMAX 248 |
| 611 | #define FCDI_EXTENDED_EVENT_PPS_LEN(num) (8+8*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 612 | /* Number of timestamps following */ |
| 613 | #define FCDI_EXTENDED_EVENT_PPS_COUNT_OFST 0 |
| 614 | #define FCDI_EXTENDED_EVENT_PPS_COUNT_LBN 0 |
| 615 | #define FCDI_EXTENDED_EVENT_PPS_COUNT_WIDTH 32 |
| 616 | /* Seconds field of a timestamp record */ |
| 617 | #define FCDI_EXTENDED_EVENT_PPS_SECONDS_OFST 8 |
| 618 | #define FCDI_EXTENDED_EVENT_PPS_SECONDS_LBN 64 |
| 619 | #define FCDI_EXTENDED_EVENT_PPS_SECONDS_WIDTH 32 |
| 620 | /* Nanoseconds field of a timestamp record */ |
| 621 | #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_OFST 12 |
| 622 | #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LBN 96 |
| 623 | #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_WIDTH 32 |
| 624 | /* Timestamp records comprising the event */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 625 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_OFST 8 |
| 626 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LEN 8 |
| 627 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LO_OFST 8 |
| 628 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_HI_OFST 12 |
| 629 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MINNUM 1 |
| 630 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM 30 |
| 631 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LBN 64 |
| 632 | #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_WIDTH 64 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 633 | |
| 634 | |
| 635 | /***********************************/ |
| 636 | /* MC_CMD_READ32 |
| 637 | * Read multiple 32byte words from MC memory. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 638 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 639 | #define MC_CMD_READ32 0x1 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 640 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 641 | #define MC_CMD_0x1_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 642 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 643 | /* MC_CMD_READ32_IN msgrequest */ |
| 644 | #define MC_CMD_READ32_IN_LEN 8 |
| 645 | #define MC_CMD_READ32_IN_ADDR_OFST 0 |
| 646 | #define MC_CMD_READ32_IN_NUMWORDS_OFST 4 |
| 647 | |
| 648 | /* MC_CMD_READ32_OUT msgresponse */ |
| 649 | #define MC_CMD_READ32_OUT_LENMIN 4 |
| 650 | #define MC_CMD_READ32_OUT_LENMAX 252 |
| 651 | #define MC_CMD_READ32_OUT_LEN(num) (0+4*(num)) |
| 652 | #define MC_CMD_READ32_OUT_BUFFER_OFST 0 |
| 653 | #define MC_CMD_READ32_OUT_BUFFER_LEN 4 |
| 654 | #define MC_CMD_READ32_OUT_BUFFER_MINNUM 1 |
| 655 | #define MC_CMD_READ32_OUT_BUFFER_MAXNUM 63 |
| 656 | |
| 657 | |
| 658 | /***********************************/ |
| 659 | /* MC_CMD_WRITE32 |
| 660 | * Write multiple 32byte words to MC memory. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 661 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 662 | #define MC_CMD_WRITE32 0x2 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 663 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 664 | #define MC_CMD_0x2_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 665 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 666 | /* MC_CMD_WRITE32_IN msgrequest */ |
| 667 | #define MC_CMD_WRITE32_IN_LENMIN 8 |
| 668 | #define MC_CMD_WRITE32_IN_LENMAX 252 |
| 669 | #define MC_CMD_WRITE32_IN_LEN(num) (4+4*(num)) |
| 670 | #define MC_CMD_WRITE32_IN_ADDR_OFST 0 |
| 671 | #define MC_CMD_WRITE32_IN_BUFFER_OFST 4 |
| 672 | #define MC_CMD_WRITE32_IN_BUFFER_LEN 4 |
| 673 | #define MC_CMD_WRITE32_IN_BUFFER_MINNUM 1 |
| 674 | #define MC_CMD_WRITE32_IN_BUFFER_MAXNUM 62 |
| 675 | |
| 676 | /* MC_CMD_WRITE32_OUT msgresponse */ |
| 677 | #define MC_CMD_WRITE32_OUT_LEN 0 |
| 678 | |
| 679 | |
| 680 | /***********************************/ |
| 681 | /* MC_CMD_COPYCODE |
| 682 | * Copy MC code between two locations and jump. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 683 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 684 | #define MC_CMD_COPYCODE 0x3 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 685 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 686 | #define MC_CMD_0x3_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 687 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 688 | /* MC_CMD_COPYCODE_IN msgrequest */ |
| 689 | #define MC_CMD_COPYCODE_IN_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 690 | /* Source address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 691 | #define MC_CMD_COPYCODE_IN_SRC_ADDR_OFST 0 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 692 | /* enum: The main image should be entered via a copy of a single word from and |
| 693 | * to this address when none of the other magic behaviours are required. |
| 694 | */ |
| 695 | #define MC_CMD_COPYCODE_HUNT_NO_MAGIC_ADDR 0x10000 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 696 | /* enum: Entering the main image via a copy of a single word from and to this |
| 697 | * address indicates that it should not attempt to start the datapath CPUs. |
| 698 | * This is useful for certain soft rebooting scenarios. (Huntington only) |
| 699 | */ |
| 700 | #define MC_CMD_COPYCODE_HUNT_NO_DATAPATH_MAGIC_ADDR 0x1d0d0 |
| 701 | /* enum: Entering the main image via a copy of a single word from and to this |
| 702 | * address indicates that it should not attempt to parse any configuration from |
| 703 | * flash. (In addition, the datapath CPUs will not be started, as for |
| 704 | * MC_CMD_COPYCODE_HUNT_NO_DATAPATH_MAGIC_ADDR above.) This is useful for |
| 705 | * certain soft rebooting scenarios. (Huntington only) |
| 706 | */ |
| 707 | #define MC_CMD_COPYCODE_HUNT_IGNORE_CONFIG_MAGIC_ADDR 0x1badc |
| 708 | /* Destination address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 709 | #define MC_CMD_COPYCODE_IN_DEST_ADDR_OFST 4 |
| 710 | #define MC_CMD_COPYCODE_IN_NUMWORDS_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 711 | /* Address of where to jump after copy. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 712 | #define MC_CMD_COPYCODE_IN_JUMP_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 713 | /* enum: Control should return to the caller rather than jumping */ |
| 714 | #define MC_CMD_COPYCODE_JUMP_NONE 0x1 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 715 | |
| 716 | /* MC_CMD_COPYCODE_OUT msgresponse */ |
| 717 | #define MC_CMD_COPYCODE_OUT_LEN 0 |
| 718 | |
| 719 | |
| 720 | /***********************************/ |
| 721 | /* MC_CMD_SET_FUNC |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 722 | * Select function for function-specific commands. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 723 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 724 | #define MC_CMD_SET_FUNC 0x4 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 725 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 726 | #define MC_CMD_0x4_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 727 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 728 | /* MC_CMD_SET_FUNC_IN msgrequest */ |
| 729 | #define MC_CMD_SET_FUNC_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 730 | /* Set function */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 731 | #define MC_CMD_SET_FUNC_IN_FUNC_OFST 0 |
| 732 | |
| 733 | /* MC_CMD_SET_FUNC_OUT msgresponse */ |
| 734 | #define MC_CMD_SET_FUNC_OUT_LEN 0 |
| 735 | |
| 736 | |
| 737 | /***********************************/ |
| 738 | /* MC_CMD_GET_BOOT_STATUS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 739 | * Get the instruction address from which the MC booted. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 740 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 741 | #define MC_CMD_GET_BOOT_STATUS 0x5 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 742 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 743 | #define MC_CMD_0x5_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 744 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 745 | /* MC_CMD_GET_BOOT_STATUS_IN msgrequest */ |
| 746 | #define MC_CMD_GET_BOOT_STATUS_IN_LEN 0 |
| 747 | |
| 748 | /* MC_CMD_GET_BOOT_STATUS_OUT msgresponse */ |
| 749 | #define MC_CMD_GET_BOOT_STATUS_OUT_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 750 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 751 | #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 752 | /* enum: indicates that the MC wasn't flash booted */ |
| 753 | #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_NULL 0xdeadbeef |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 754 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_OFST 4 |
| 755 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_LBN 0 |
| 756 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_WIDTH 1 |
| 757 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_LBN 1 |
| 758 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_WIDTH 1 |
| 759 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_LBN 2 |
| 760 | #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_WIDTH 1 |
| 761 | |
| 762 | |
| 763 | /***********************************/ |
| 764 | /* MC_CMD_GET_ASSERTS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 765 | * Get (and optionally clear) the current assertion status. Only |
| 766 | * OUT.GLOBAL_FLAGS is guaranteed to exist in the completion payload. The other |
| 767 | * fields will only be present if OUT.GLOBAL_FLAGS != NO_FAILS |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 768 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 769 | #define MC_CMD_GET_ASSERTS 0x6 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 770 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 771 | #define MC_CMD_0x6_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 772 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 773 | /* MC_CMD_GET_ASSERTS_IN msgrequest */ |
| 774 | #define MC_CMD_GET_ASSERTS_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 775 | /* Set to clear assertion */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 776 | #define MC_CMD_GET_ASSERTS_IN_CLEAR_OFST 0 |
| 777 | |
| 778 | /* MC_CMD_GET_ASSERTS_OUT msgresponse */ |
| 779 | #define MC_CMD_GET_ASSERTS_OUT_LEN 140 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 780 | /* Assertion status flag. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 781 | #define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 782 | /* enum: No assertions have failed. */ |
| 783 | #define MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 |
| 784 | /* enum: A system-level assertion has failed. */ |
| 785 | #define MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2 |
| 786 | /* enum: A thread-level assertion has failed. */ |
| 787 | #define MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3 |
| 788 | /* enum: The system was reset by the watchdog. */ |
| 789 | #define MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4 |
| 790 | /* enum: An illegal address trap stopped the system (huntington and later) */ |
| 791 | #define MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 |
| 792 | /* Failing PC value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 793 | #define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 794 | /* Saved GP regs */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 795 | #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_OFST 8 |
| 796 | #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_LEN 4 |
| 797 | #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_NUM 31 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 798 | /* Failing thread address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 799 | #define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_OFST 132 |
| 800 | #define MC_CMD_GET_ASSERTS_OUT_RESERVED_OFST 136 |
| 801 | |
| 802 | |
| 803 | /***********************************/ |
| 804 | /* MC_CMD_LOG_CTRL |
| 805 | * Configure the output stream for various events and messages. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 806 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 807 | #define MC_CMD_LOG_CTRL 0x7 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 808 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 809 | #define MC_CMD_0x7_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 810 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 811 | /* MC_CMD_LOG_CTRL_IN msgrequest */ |
| 812 | #define MC_CMD_LOG_CTRL_IN_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 813 | /* Log destination */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 814 | #define MC_CMD_LOG_CTRL_IN_LOG_DEST_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 815 | /* enum: UART. */ |
| 816 | #define MC_CMD_LOG_CTRL_IN_LOG_DEST_UART 0x1 |
| 817 | /* enum: Event queue. */ |
| 818 | #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ 0x2 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 819 | #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_OFST 4 |
| 820 | |
| 821 | /* MC_CMD_LOG_CTRL_OUT msgresponse */ |
| 822 | #define MC_CMD_LOG_CTRL_OUT_LEN 0 |
| 823 | |
| 824 | |
| 825 | /***********************************/ |
| 826 | /* MC_CMD_GET_VERSION |
| 827 | * Get version information about the MC firmware. |
| 828 | */ |
| 829 | #define MC_CMD_GET_VERSION 0x8 |
| 830 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 831 | #define MC_CMD_0x8_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 832 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 833 | /* MC_CMD_GET_VERSION_IN msgrequest */ |
| 834 | #define MC_CMD_GET_VERSION_IN_LEN 0 |
| 835 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 836 | /* MC_CMD_GET_VERSION_EXT_IN msgrequest: Asks for the extended version */ |
| 837 | #define MC_CMD_GET_VERSION_EXT_IN_LEN 4 |
| 838 | /* placeholder, set to 0 */ |
| 839 | #define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_OFST 0 |
| 840 | |
| 841 | /* MC_CMD_GET_VERSION_V0_OUT msgresponse: deprecated version format */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 842 | #define MC_CMD_GET_VERSION_V0_OUT_LEN 4 |
| 843 | #define MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 844 | /* enum: Reserved version number to indicate "any" version. */ |
| 845 | #define MC_CMD_GET_VERSION_OUT_FIRMWARE_ANY 0xffffffff |
| 846 | /* enum: Bootrom version value for Siena. */ |
| 847 | #define MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM 0xb0070000 |
| 848 | /* enum: Bootrom version value for Huntington. */ |
| 849 | #define MC_CMD_GET_VERSION_OUT_FIRMWARE_HUNT_BOOTROM 0xb0070001 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 850 | |
| 851 | /* MC_CMD_GET_VERSION_OUT msgresponse */ |
| 852 | #define MC_CMD_GET_VERSION_OUT_LEN 32 |
| 853 | /* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ |
| 854 | /* Enum values, see field(s): */ |
| 855 | /* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ |
| 856 | #define MC_CMD_GET_VERSION_OUT_PCOL_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 857 | /* 128bit mask of functions supported by the current firmware */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 858 | #define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_OFST 8 |
| 859 | #define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_LEN 16 |
| 860 | #define MC_CMD_GET_VERSION_OUT_VERSION_OFST 24 |
| 861 | #define MC_CMD_GET_VERSION_OUT_VERSION_LEN 8 |
| 862 | #define MC_CMD_GET_VERSION_OUT_VERSION_LO_OFST 24 |
| 863 | #define MC_CMD_GET_VERSION_OUT_VERSION_HI_OFST 28 |
| 864 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 865 | /* MC_CMD_GET_VERSION_EXT_OUT msgresponse */ |
| 866 | #define MC_CMD_GET_VERSION_EXT_OUT_LEN 48 |
| 867 | /* MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */ |
| 868 | /* Enum values, see field(s): */ |
| 869 | /* MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */ |
| 870 | #define MC_CMD_GET_VERSION_EXT_OUT_PCOL_OFST 4 |
| 871 | /* 128bit mask of functions supported by the current firmware */ |
| 872 | #define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_OFST 8 |
| 873 | #define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_LEN 16 |
| 874 | #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_OFST 24 |
| 875 | #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_LEN 8 |
| 876 | #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_LO_OFST 24 |
| 877 | #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_HI_OFST 28 |
| 878 | /* extra info */ |
| 879 | #define MC_CMD_GET_VERSION_EXT_OUT_EXTRA_OFST 32 |
| 880 | #define MC_CMD_GET_VERSION_EXT_OUT_EXTRA_LEN 16 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 881 | |
| 882 | |
| 883 | /***********************************/ |
| 884 | /* MC_CMD_PTP |
| 885 | * Perform PTP operation |
| 886 | */ |
| 887 | #define MC_CMD_PTP 0xb |
| 888 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 889 | #define MC_CMD_0xb_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 890 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 891 | /* MC_CMD_PTP_IN msgrequest */ |
| 892 | #define MC_CMD_PTP_IN_LEN 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 893 | /* PTP operation code */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 894 | #define MC_CMD_PTP_IN_OP_OFST 0 |
| 895 | #define MC_CMD_PTP_IN_OP_LEN 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 896 | /* enum: Enable PTP packet timestamping operation. */ |
| 897 | #define MC_CMD_PTP_OP_ENABLE 0x1 |
| 898 | /* enum: Disable PTP packet timestamping operation. */ |
| 899 | #define MC_CMD_PTP_OP_DISABLE 0x2 |
| 900 | /* enum: Send a PTP packet. */ |
| 901 | #define MC_CMD_PTP_OP_TRANSMIT 0x3 |
| 902 | /* enum: Read the current NIC time. */ |
| 903 | #define MC_CMD_PTP_OP_READ_NIC_TIME 0x4 |
| 904 | /* enum: Get the current PTP status. */ |
| 905 | #define MC_CMD_PTP_OP_STATUS 0x5 |
| 906 | /* enum: Adjust the PTP NIC's time. */ |
| 907 | #define MC_CMD_PTP_OP_ADJUST 0x6 |
| 908 | /* enum: Synchronize host and NIC time. */ |
| 909 | #define MC_CMD_PTP_OP_SYNCHRONIZE 0x7 |
| 910 | /* enum: Basic manufacturing tests. */ |
| 911 | #define MC_CMD_PTP_OP_MANFTEST_BASIC 0x8 |
| 912 | /* enum: Packet based manufacturing tests. */ |
| 913 | #define MC_CMD_PTP_OP_MANFTEST_PACKET 0x9 |
| 914 | /* enum: Reset some of the PTP related statistics */ |
| 915 | #define MC_CMD_PTP_OP_RESET_STATS 0xa |
| 916 | /* enum: Debug operations to MC. */ |
| 917 | #define MC_CMD_PTP_OP_DEBUG 0xb |
| 918 | /* enum: Read an FPGA register */ |
| 919 | #define MC_CMD_PTP_OP_FPGAREAD 0xc |
| 920 | /* enum: Write an FPGA register */ |
| 921 | #define MC_CMD_PTP_OP_FPGAWRITE 0xd |
| 922 | /* enum: Apply an offset to the NIC clock */ |
| 923 | #define MC_CMD_PTP_OP_CLOCK_OFFSET_ADJUST 0xe |
| 924 | /* enum: Change Apply an offset to the NIC clock */ |
| 925 | #define MC_CMD_PTP_OP_CLOCK_FREQ_ADJUST 0xf |
| 926 | /* enum: Set the MC packet filter VLAN tags for received PTP packets */ |
| 927 | #define MC_CMD_PTP_OP_RX_SET_VLAN_FILTER 0x10 |
| 928 | /* enum: Set the MC packet filter UUID for received PTP packets */ |
| 929 | #define MC_CMD_PTP_OP_RX_SET_UUID_FILTER 0x11 |
| 930 | /* enum: Set the MC packet filter Domain for received PTP packets */ |
| 931 | #define MC_CMD_PTP_OP_RX_SET_DOMAIN_FILTER 0x12 |
| 932 | /* enum: Set the clock source */ |
| 933 | #define MC_CMD_PTP_OP_SET_CLK_SRC 0x13 |
| 934 | /* enum: Reset value of Timer Reg. */ |
| 935 | #define MC_CMD_PTP_OP_RST_CLK 0x14 |
| 936 | /* enum: Enable the forwarding of PPS events to the host */ |
| 937 | #define MC_CMD_PTP_OP_PPS_ENABLE 0x15 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 938 | /* enum: Get the time format used by this NIC for PTP operations */ |
| 939 | #define MC_CMD_PTP_OP_GET_TIME_FORMAT 0x16 |
| 940 | /* enum: Get the clock attributes. NOTE- extended version of |
| 941 | * MC_CMD_PTP_OP_GET_TIME_FORMAT |
| 942 | */ |
| 943 | #define MC_CMD_PTP_OP_GET_ATTRIBUTES 0x16 |
| 944 | /* enum: Get corrections that should be applied to the various different |
| 945 | * timestamps |
| 946 | */ |
| 947 | #define MC_CMD_PTP_OP_GET_TIMESTAMP_CORRECTIONS 0x17 |
| 948 | /* enum: Subscribe to receive periodic time events indicating the current NIC |
| 949 | * time |
| 950 | */ |
| 951 | #define MC_CMD_PTP_OP_TIME_EVENT_SUBSCRIBE 0x18 |
| 952 | /* enum: Unsubscribe to stop receiving time events */ |
| 953 | #define MC_CMD_PTP_OP_TIME_EVENT_UNSUBSCRIBE 0x19 |
| 954 | /* enum: PPS based manfacturing tests. Requires PPS output to be looped to PPS |
| 955 | * input on the same NIC. |
| 956 | */ |
| 957 | #define MC_CMD_PTP_OP_MANFTEST_PPS 0x1a |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 958 | /* enum: Above this for future use. */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 959 | #define MC_CMD_PTP_OP_MAX 0x1b |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 960 | |
| 961 | /* MC_CMD_PTP_IN_ENABLE msgrequest */ |
| 962 | #define MC_CMD_PTP_IN_ENABLE_LEN 16 |
| 963 | #define MC_CMD_PTP_IN_CMD_OFST 0 |
| 964 | #define MC_CMD_PTP_IN_PERIPH_ID_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 965 | /* Event queue for PTP events */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 966 | #define MC_CMD_PTP_IN_ENABLE_QUEUE_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 967 | /* PTP timestamping mode */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 968 | #define MC_CMD_PTP_IN_ENABLE_MODE_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 969 | /* enum: PTP, version 1 */ |
| 970 | #define MC_CMD_PTP_MODE_V1 0x0 |
| 971 | /* enum: PTP, version 1, with VLAN headers - deprecated */ |
| 972 | #define MC_CMD_PTP_MODE_V1_VLAN 0x1 |
| 973 | /* enum: PTP, version 2 */ |
| 974 | #define MC_CMD_PTP_MODE_V2 0x2 |
| 975 | /* enum: PTP, version 2, with VLAN headers - deprecated */ |
| 976 | #define MC_CMD_PTP_MODE_V2_VLAN 0x3 |
| 977 | /* enum: PTP, version 2, with improved UUID filtering */ |
| 978 | #define MC_CMD_PTP_MODE_V2_ENHANCED 0x4 |
| 979 | /* enum: FCoE (seconds and microseconds) */ |
| 980 | #define MC_CMD_PTP_MODE_FCOE 0x5 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 981 | |
| 982 | /* MC_CMD_PTP_IN_DISABLE msgrequest */ |
| 983 | #define MC_CMD_PTP_IN_DISABLE_LEN 8 |
| 984 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 985 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 986 | |
| 987 | /* MC_CMD_PTP_IN_TRANSMIT msgrequest */ |
| 988 | #define MC_CMD_PTP_IN_TRANSMIT_LENMIN 13 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 989 | #define MC_CMD_PTP_IN_TRANSMIT_LENMAX 252 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 990 | #define MC_CMD_PTP_IN_TRANSMIT_LEN(num) (12+1*(num)) |
| 991 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 992 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 993 | /* Transmit packet length */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 994 | #define MC_CMD_PTP_IN_TRANSMIT_LENGTH_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 995 | /* Transmit packet data */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 996 | #define MC_CMD_PTP_IN_TRANSMIT_PACKET_OFST 12 |
| 997 | #define MC_CMD_PTP_IN_TRANSMIT_PACKET_LEN 1 |
| 998 | #define MC_CMD_PTP_IN_TRANSMIT_PACKET_MINNUM 1 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 999 | #define MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM 240 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1000 | |
| 1001 | /* MC_CMD_PTP_IN_READ_NIC_TIME msgrequest */ |
| 1002 | #define MC_CMD_PTP_IN_READ_NIC_TIME_LEN 8 |
| 1003 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1004 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1005 | |
| 1006 | /* MC_CMD_PTP_IN_STATUS msgrequest */ |
| 1007 | #define MC_CMD_PTP_IN_STATUS_LEN 8 |
| 1008 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1009 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1010 | |
| 1011 | /* MC_CMD_PTP_IN_ADJUST msgrequest */ |
| 1012 | #define MC_CMD_PTP_IN_ADJUST_LEN 24 |
| 1013 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1014 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1015 | /* Frequency adjustment 40 bit fixed point ns */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1016 | #define MC_CMD_PTP_IN_ADJUST_FREQ_OFST 8 |
| 1017 | #define MC_CMD_PTP_IN_ADJUST_FREQ_LEN 8 |
| 1018 | #define MC_CMD_PTP_IN_ADJUST_FREQ_LO_OFST 8 |
| 1019 | #define MC_CMD_PTP_IN_ADJUST_FREQ_HI_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1020 | /* enum: Number of fractional bits in frequency adjustment */ |
| 1021 | #define MC_CMD_PTP_IN_ADJUST_BITS 0x28 |
| 1022 | /* Time adjustment in seconds */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1023 | #define MC_CMD_PTP_IN_ADJUST_SECONDS_OFST 16 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1024 | /* Time adjustment major value */ |
| 1025 | #define MC_CMD_PTP_IN_ADJUST_MAJOR_OFST 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1026 | /* Time adjustment in nanoseconds */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1027 | #define MC_CMD_PTP_IN_ADJUST_NANOSECONDS_OFST 20 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1028 | /* Time adjustment minor value */ |
| 1029 | #define MC_CMD_PTP_IN_ADJUST_MINOR_OFST 20 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1030 | |
| 1031 | /* MC_CMD_PTP_IN_SYNCHRONIZE msgrequest */ |
| 1032 | #define MC_CMD_PTP_IN_SYNCHRONIZE_LEN 20 |
| 1033 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1034 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1035 | /* Number of time readings to capture */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1036 | #define MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1037 | /* Host address in which to write "synchronization started" indication (64 |
| 1038 | * bits) |
| 1039 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1040 | #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_OFST 12 |
| 1041 | #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LEN 8 |
| 1042 | #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LO_OFST 12 |
| 1043 | #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_HI_OFST 16 |
| 1044 | |
| 1045 | /* MC_CMD_PTP_IN_MANFTEST_BASIC msgrequest */ |
| 1046 | #define MC_CMD_PTP_IN_MANFTEST_BASIC_LEN 8 |
| 1047 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1048 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1049 | |
| 1050 | /* MC_CMD_PTP_IN_MANFTEST_PACKET msgrequest */ |
| 1051 | #define MC_CMD_PTP_IN_MANFTEST_PACKET_LEN 12 |
| 1052 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1053 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1054 | /* Enable or disable packet testing */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1055 | #define MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_OFST 8 |
| 1056 | |
| 1057 | /* MC_CMD_PTP_IN_RESET_STATS msgrequest */ |
| 1058 | #define MC_CMD_PTP_IN_RESET_STATS_LEN 8 |
| 1059 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1060 | /* Reset PTP statistics */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1061 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1062 | |
| 1063 | /* MC_CMD_PTP_IN_DEBUG msgrequest */ |
| 1064 | #define MC_CMD_PTP_IN_DEBUG_LEN 12 |
| 1065 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1066 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1067 | /* Debug operations */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1068 | #define MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_OFST 8 |
| 1069 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1070 | /* MC_CMD_PTP_IN_FPGAREAD msgrequest */ |
| 1071 | #define MC_CMD_PTP_IN_FPGAREAD_LEN 16 |
| 1072 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1073 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1074 | #define MC_CMD_PTP_IN_FPGAREAD_ADDR_OFST 8 |
| 1075 | #define MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_OFST 12 |
| 1076 | |
| 1077 | /* MC_CMD_PTP_IN_FPGAWRITE msgrequest */ |
| 1078 | #define MC_CMD_PTP_IN_FPGAWRITE_LENMIN 13 |
| 1079 | #define MC_CMD_PTP_IN_FPGAWRITE_LENMAX 252 |
| 1080 | #define MC_CMD_PTP_IN_FPGAWRITE_LEN(num) (12+1*(num)) |
| 1081 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1082 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1083 | #define MC_CMD_PTP_IN_FPGAWRITE_ADDR_OFST 8 |
| 1084 | #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_OFST 12 |
| 1085 | #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_LEN 1 |
| 1086 | #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MINNUM 1 |
| 1087 | #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MAXNUM 240 |
| 1088 | |
| 1089 | /* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST msgrequest */ |
| 1090 | #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_LEN 16 |
| 1091 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1092 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1093 | /* Time adjustment in seconds */ |
| 1094 | #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_OFST 8 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1095 | /* Time adjustment major value */ |
| 1096 | #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1097 | /* Time adjustment in nanoseconds */ |
| 1098 | #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_OFST 12 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1099 | /* Time adjustment minor value */ |
| 1100 | #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1101 | |
| 1102 | /* MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST msgrequest */ |
| 1103 | #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_LEN 16 |
| 1104 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1105 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1106 | /* Frequency adjustment 40 bit fixed point ns */ |
| 1107 | #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_OFST 8 |
| 1108 | #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LEN 8 |
| 1109 | #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LO_OFST 8 |
| 1110 | #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_HI_OFST 12 |
| 1111 | /* enum: Number of fractional bits in frequency adjustment */ |
| 1112 | /* MC_CMD_PTP_IN_ADJUST_BITS 0x28 */ |
| 1113 | |
| 1114 | /* MC_CMD_PTP_IN_RX_SET_VLAN_FILTER msgrequest */ |
| 1115 | #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_LEN 24 |
| 1116 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1117 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1118 | /* Number of VLAN tags, 0 if not VLAN */ |
| 1119 | #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_OFST 8 |
| 1120 | /* Set of VLAN tags to filter against */ |
| 1121 | #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_OFST 12 |
| 1122 | #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_LEN 4 |
| 1123 | #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_NUM 3 |
| 1124 | |
| 1125 | /* MC_CMD_PTP_IN_RX_SET_UUID_FILTER msgrequest */ |
| 1126 | #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_LEN 20 |
| 1127 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1128 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1129 | /* 1 to enable UUID filtering, 0 to disable */ |
| 1130 | #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_OFST 8 |
| 1131 | /* UUID to filter against */ |
| 1132 | #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_OFST 12 |
| 1133 | #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LEN 8 |
| 1134 | #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LO_OFST 12 |
| 1135 | #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_HI_OFST 16 |
| 1136 | |
| 1137 | /* MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER msgrequest */ |
| 1138 | #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_LEN 16 |
| 1139 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1140 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1141 | /* 1 to enable Domain filtering, 0 to disable */ |
| 1142 | #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_OFST 8 |
| 1143 | /* Domain number to filter against */ |
| 1144 | #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_OFST 12 |
| 1145 | |
| 1146 | /* MC_CMD_PTP_IN_SET_CLK_SRC msgrequest */ |
| 1147 | #define MC_CMD_PTP_IN_SET_CLK_SRC_LEN 12 |
| 1148 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1149 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1150 | /* Set the clock source. */ |
| 1151 | #define MC_CMD_PTP_IN_SET_CLK_SRC_CLK_OFST 8 |
| 1152 | /* enum: Internal. */ |
| 1153 | #define MC_CMD_PTP_CLK_SRC_INTERNAL 0x0 |
| 1154 | /* enum: External. */ |
| 1155 | #define MC_CMD_PTP_CLK_SRC_EXTERNAL 0x1 |
| 1156 | |
| 1157 | /* MC_CMD_PTP_IN_RST_CLK msgrequest */ |
| 1158 | #define MC_CMD_PTP_IN_RST_CLK_LEN 8 |
| 1159 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1160 | /* Reset value of Timer Reg. */ |
| 1161 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1162 | |
| 1163 | /* MC_CMD_PTP_IN_PPS_ENABLE msgrequest */ |
| 1164 | #define MC_CMD_PTP_IN_PPS_ENABLE_LEN 12 |
| 1165 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1166 | /* Enable or disable */ |
| 1167 | #define MC_CMD_PTP_IN_PPS_ENABLE_OP_OFST 4 |
| 1168 | /* enum: Enable */ |
| 1169 | #define MC_CMD_PTP_ENABLE_PPS 0x0 |
| 1170 | /* enum: Disable */ |
| 1171 | #define MC_CMD_PTP_DISABLE_PPS 0x1 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1172 | /* Queue id to send events back */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1173 | #define MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_OFST 8 |
| 1174 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1175 | /* MC_CMD_PTP_IN_GET_TIME_FORMAT msgrequest */ |
| 1176 | #define MC_CMD_PTP_IN_GET_TIME_FORMAT_LEN 8 |
| 1177 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1178 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1179 | |
| 1180 | /* MC_CMD_PTP_IN_GET_ATTRIBUTES msgrequest */ |
| 1181 | #define MC_CMD_PTP_IN_GET_ATTRIBUTES_LEN 8 |
| 1182 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1183 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1184 | |
| 1185 | /* MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS msgrequest */ |
| 1186 | #define MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS_LEN 8 |
| 1187 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1188 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1189 | |
| 1190 | /* MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE msgrequest */ |
| 1191 | #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_LEN 12 |
| 1192 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1193 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1194 | /* Event queue to send PTP time events to */ |
| 1195 | #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_OFST 8 |
| 1196 | |
| 1197 | /* MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE msgrequest */ |
| 1198 | #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN 16 |
| 1199 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1200 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1201 | /* Unsubscribe options */ |
| 1202 | #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_OFST 8 |
| 1203 | /* enum: Unsubscribe a single queue */ |
| 1204 | #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_SINGLE 0x0 |
| 1205 | /* enum: Unsubscribe all queues */ |
| 1206 | #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_ALL 0x1 |
| 1207 | /* Event queue ID */ |
| 1208 | #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_OFST 12 |
| 1209 | |
| 1210 | /* MC_CMD_PTP_IN_MANFTEST_PPS msgrequest */ |
| 1211 | #define MC_CMD_PTP_IN_MANFTEST_PPS_LEN 12 |
| 1212 | /* MC_CMD_PTP_IN_CMD_OFST 0 */ |
| 1213 | /* MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */ |
| 1214 | /* 1 to enable PPS test mode, 0 to disable and return result. */ |
| 1215 | #define MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_OFST 8 |
| 1216 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1217 | /* MC_CMD_PTP_OUT msgresponse */ |
| 1218 | #define MC_CMD_PTP_OUT_LEN 0 |
| 1219 | |
| 1220 | /* MC_CMD_PTP_OUT_TRANSMIT msgresponse */ |
| 1221 | #define MC_CMD_PTP_OUT_TRANSMIT_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1222 | /* Value of seconds timestamp */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1223 | #define MC_CMD_PTP_OUT_TRANSMIT_SECONDS_OFST 0 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1224 | /* Timestamp major value */ |
| 1225 | #define MC_CMD_PTP_OUT_TRANSMIT_MAJOR_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1226 | /* Value of nanoseconds timestamp */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1227 | #define MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_OFST 4 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1228 | /* Timestamp minor value */ |
| 1229 | #define MC_CMD_PTP_OUT_TRANSMIT_MINOR_OFST 4 |
| 1230 | |
| 1231 | /* MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE msgresponse */ |
| 1232 | #define MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE_LEN 0 |
| 1233 | |
| 1234 | /* MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE msgresponse */ |
| 1235 | #define MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE_LEN 0 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1236 | |
| 1237 | /* MC_CMD_PTP_OUT_READ_NIC_TIME msgresponse */ |
| 1238 | #define MC_CMD_PTP_OUT_READ_NIC_TIME_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1239 | /* Value of seconds timestamp */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1240 | #define MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_OFST 0 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1241 | /* Timestamp major value */ |
| 1242 | #define MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1243 | /* Value of nanoseconds timestamp */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1244 | #define MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_OFST 4 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1245 | /* Timestamp minor value */ |
| 1246 | #define MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_OFST 4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1247 | |
| 1248 | /* MC_CMD_PTP_OUT_STATUS msgresponse */ |
| 1249 | #define MC_CMD_PTP_OUT_STATUS_LEN 64 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1250 | /* Frequency of NIC's hardware clock */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1251 | #define MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1252 | /* Number of packets transmitted and timestamped */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1253 | #define MC_CMD_PTP_OUT_STATUS_STATS_TX_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1254 | /* Number of packets received and timestamped */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1255 | #define MC_CMD_PTP_OUT_STATUS_STATS_RX_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1256 | /* Number of packets timestamped by the FPGA */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1257 | #define MC_CMD_PTP_OUT_STATUS_STATS_TS_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1258 | /* Number of packets filter matched */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1259 | #define MC_CMD_PTP_OUT_STATUS_STATS_FM_OFST 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1260 | /* Number of packets not filter matched */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1261 | #define MC_CMD_PTP_OUT_STATUS_STATS_NFM_OFST 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1262 | /* Number of PPS overflows (noise on input?) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1263 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_OFST 24 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1264 | /* Number of PPS bad periods */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1265 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_OFST 28 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1266 | /* Minimum period of PPS pulse in nanoseconds */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1267 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_OFST 32 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1268 | /* Maximum period of PPS pulse in nanoseconds */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1269 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_OFST 36 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1270 | /* Last period of PPS pulse in nanoseconds */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1271 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_OFST 40 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1272 | /* Mean period of PPS pulse in nanoseconds */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1273 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_OFST 44 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1274 | /* Minimum offset of PPS pulse in nanoseconds (signed) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1275 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_OFST 48 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1276 | /* Maximum offset of PPS pulse in nanoseconds (signed) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1277 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_OFST 52 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1278 | /* Last offset of PPS pulse in nanoseconds (signed) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1279 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_OFST 56 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1280 | /* Mean offset of PPS pulse in nanoseconds (signed) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1281 | #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_OFST 60 |
| 1282 | |
| 1283 | /* MC_CMD_PTP_OUT_SYNCHRONIZE msgresponse */ |
| 1284 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMIN 20 |
| 1285 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMAX 240 |
| 1286 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_LEN(num) (0+20*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1287 | /* A set of host and NIC times */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1288 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_OFST 0 |
| 1289 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_LEN 20 |
| 1290 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MINNUM 1 |
| 1291 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1292 | /* Host time immediately before NIC's hardware clock read */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1293 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1294 | /* Value of seconds timestamp */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1295 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_OFST 4 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1296 | /* Timestamp major value */ |
| 1297 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1298 | /* Value of nanoseconds timestamp */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1299 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_OFST 8 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1300 | /* Timestamp minor value */ |
| 1301 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1302 | /* Host time immediately after NIC's hardware clock read */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1303 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1304 | /* Number of nanoseconds waited after reading NIC's hardware clock */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1305 | #define MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_OFST 16 |
| 1306 | |
| 1307 | /* MC_CMD_PTP_OUT_MANFTEST_BASIC msgresponse */ |
| 1308 | #define MC_CMD_PTP_OUT_MANFTEST_BASIC_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1309 | /* Results of testing */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1310 | #define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1311 | /* enum: Successful test */ |
| 1312 | #define MC_CMD_PTP_MANF_SUCCESS 0x0 |
| 1313 | /* enum: FPGA load failed */ |
| 1314 | #define MC_CMD_PTP_MANF_FPGA_LOAD 0x1 |
| 1315 | /* enum: FPGA version invalid */ |
| 1316 | #define MC_CMD_PTP_MANF_FPGA_VERSION 0x2 |
| 1317 | /* enum: FPGA registers incorrect */ |
| 1318 | #define MC_CMD_PTP_MANF_FPGA_REGISTERS 0x3 |
| 1319 | /* enum: Oscillator possibly not working? */ |
| 1320 | #define MC_CMD_PTP_MANF_OSCILLATOR 0x4 |
| 1321 | /* enum: Timestamps not increasing */ |
| 1322 | #define MC_CMD_PTP_MANF_TIMESTAMPS 0x5 |
| 1323 | /* enum: Mismatched packet count */ |
| 1324 | #define MC_CMD_PTP_MANF_PACKET_COUNT 0x6 |
| 1325 | /* enum: Mismatched packet count (Siena filter and FPGA) */ |
| 1326 | #define MC_CMD_PTP_MANF_FILTER_COUNT 0x7 |
| 1327 | /* enum: Not enough packets to perform timestamp check */ |
| 1328 | #define MC_CMD_PTP_MANF_PACKET_ENOUGH 0x8 |
| 1329 | /* enum: Timestamp trigger GPIO not working */ |
| 1330 | #define MC_CMD_PTP_MANF_GPIO_TRIGGER 0x9 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1331 | /* enum: Insufficient PPS events to perform checks */ |
| 1332 | #define MC_CMD_PTP_MANF_PPS_ENOUGH 0xa |
| 1333 | /* enum: PPS time event period not sufficiently close to 1s. */ |
| 1334 | #define MC_CMD_PTP_MANF_PPS_PERIOD 0xb |
| 1335 | /* enum: PPS time event nS reading not sufficiently close to zero. */ |
| 1336 | #define MC_CMD_PTP_MANF_PPS_NS 0xc |
| 1337 | /* enum: PTP peripheral registers incorrect */ |
| 1338 | #define MC_CMD_PTP_MANF_REGISTERS 0xd |
| 1339 | /* enum: Failed to read time from PTP peripheral */ |
| 1340 | #define MC_CMD_PTP_MANF_CLOCK_READ 0xe |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1341 | /* Presence of external oscillator */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1342 | #define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_OFST 4 |
| 1343 | |
| 1344 | /* MC_CMD_PTP_OUT_MANFTEST_PACKET msgresponse */ |
| 1345 | #define MC_CMD_PTP_OUT_MANFTEST_PACKET_LEN 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1346 | /* Results of testing */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1347 | #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1348 | /* Number of packets received by FPGA */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1349 | #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1350 | /* Number of packets received by Siena filters */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1351 | #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_OFST 8 |
| 1352 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1353 | /* MC_CMD_PTP_OUT_FPGAREAD msgresponse */ |
| 1354 | #define MC_CMD_PTP_OUT_FPGAREAD_LENMIN 1 |
| 1355 | #define MC_CMD_PTP_OUT_FPGAREAD_LENMAX 252 |
| 1356 | #define MC_CMD_PTP_OUT_FPGAREAD_LEN(num) (0+1*(num)) |
| 1357 | #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_OFST 0 |
| 1358 | #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_LEN 1 |
| 1359 | #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MINNUM 1 |
| 1360 | #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MAXNUM 252 |
| 1361 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 1362 | /* MC_CMD_PTP_OUT_GET_TIME_FORMAT msgresponse */ |
| 1363 | #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_LEN 4 |
| 1364 | /* Time format required/used by for this NIC. Applies to all PTP MCDI |
| 1365 | * operations that pass times between the host and firmware. If this operation |
| 1366 | * is not supported (older firmware) a format of seconds and nanoseconds should |
| 1367 | * be assumed. |
| 1368 | */ |
| 1369 | #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_OFST 0 |
| 1370 | /* enum: Times are in seconds and nanoseconds */ |
| 1371 | #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_NANOSECONDS 0x0 |
| 1372 | /* enum: Major register has units of 16 second per tick, minor 8 ns per tick */ |
| 1373 | #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_16SECONDS_8NANOSECONDS 0x1 |
| 1374 | /* enum: Major register has units of seconds, minor 2^-27s per tick */ |
| 1375 | #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_27FRACTION 0x2 |
| 1376 | |
| 1377 | /* MC_CMD_PTP_OUT_GET_ATTRIBUTES msgresponse */ |
| 1378 | #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_LEN 8 |
| 1379 | /* Time format required/used by for this NIC. Applies to all PTP MCDI |
| 1380 | * operations that pass times between the host and firmware. If this operation |
| 1381 | * is not supported (older firmware) a format of seconds and nanoseconds should |
| 1382 | * be assumed. |
| 1383 | */ |
| 1384 | #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_OFST 0 |
| 1385 | /* enum: Times are in seconds and nanoseconds */ |
| 1386 | #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS 0x0 |
| 1387 | /* enum: Major register has units of 16 second per tick, minor 8 ns per tick */ |
| 1388 | #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_16SECONDS_8NANOSECONDS 0x1 |
| 1389 | /* enum: Major register has units of seconds, minor 2^-27s per tick */ |
| 1390 | #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_27FRACTION 0x2 |
| 1391 | /* Minimum acceptable value for a corrected synchronization timeset. When |
| 1392 | * comparing host and NIC clock times, the MC returns a set of samples that |
| 1393 | * contain the host start and end time, the MC time when the host start was |
| 1394 | * detected and the time the MC waited between reading the time and detecting |
| 1395 | * the host end. The corrected sync window is the difference between the host |
| 1396 | * end and start times minus the time that the MC waited for host end. |
| 1397 | */ |
| 1398 | #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_OFST 4 |
| 1399 | |
| 1400 | /* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS msgresponse */ |
| 1401 | #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_LEN 16 |
| 1402 | /* Uncorrected error on transmit timestamps in NIC clock format */ |
| 1403 | #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_OFST 0 |
| 1404 | /* Uncorrected error on receive timestamps in NIC clock format */ |
| 1405 | #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_OFST 4 |
| 1406 | /* Uncorrected error on PPS output in NIC clock format */ |
| 1407 | #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_OFST 8 |
| 1408 | /* Uncorrected error on PPS input in NIC clock format */ |
| 1409 | #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_OFST 12 |
| 1410 | |
| 1411 | /* MC_CMD_PTP_OUT_MANFTEST_PPS msgresponse */ |
| 1412 | #define MC_CMD_PTP_OUT_MANFTEST_PPS_LEN 4 |
| 1413 | /* Results of testing */ |
| 1414 | #define MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_OFST 0 |
| 1415 | /* Enum values, see field(s): */ |
| 1416 | /* MC_CMD_PTP_OUT_MANFTEST_BASIC/TEST_RESULT */ |
| 1417 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1418 | |
| 1419 | /***********************************/ |
| 1420 | /* MC_CMD_CSR_READ32 |
| 1421 | * Read 32bit words from the indirect memory map. |
| 1422 | */ |
| 1423 | #define MC_CMD_CSR_READ32 0xc |
| 1424 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1425 | #define MC_CMD_0xc_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1426 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1427 | /* MC_CMD_CSR_READ32_IN msgrequest */ |
| 1428 | #define MC_CMD_CSR_READ32_IN_LEN 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1429 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1430 | #define MC_CMD_CSR_READ32_IN_ADDR_OFST 0 |
| 1431 | #define MC_CMD_CSR_READ32_IN_STEP_OFST 4 |
| 1432 | #define MC_CMD_CSR_READ32_IN_NUMWORDS_OFST 8 |
| 1433 | |
| 1434 | /* MC_CMD_CSR_READ32_OUT msgresponse */ |
| 1435 | #define MC_CMD_CSR_READ32_OUT_LENMIN 4 |
| 1436 | #define MC_CMD_CSR_READ32_OUT_LENMAX 252 |
| 1437 | #define MC_CMD_CSR_READ32_OUT_LEN(num) (0+4*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1438 | /* The last dword is the status, not a value read */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1439 | #define MC_CMD_CSR_READ32_OUT_BUFFER_OFST 0 |
| 1440 | #define MC_CMD_CSR_READ32_OUT_BUFFER_LEN 4 |
| 1441 | #define MC_CMD_CSR_READ32_OUT_BUFFER_MINNUM 1 |
| 1442 | #define MC_CMD_CSR_READ32_OUT_BUFFER_MAXNUM 63 |
| 1443 | |
| 1444 | |
| 1445 | /***********************************/ |
| 1446 | /* MC_CMD_CSR_WRITE32 |
| 1447 | * Write 32bit dwords to the indirect memory map. |
| 1448 | */ |
| 1449 | #define MC_CMD_CSR_WRITE32 0xd |
| 1450 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1451 | #define MC_CMD_0xd_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1452 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1453 | /* MC_CMD_CSR_WRITE32_IN msgrequest */ |
| 1454 | #define MC_CMD_CSR_WRITE32_IN_LENMIN 12 |
| 1455 | #define MC_CMD_CSR_WRITE32_IN_LENMAX 252 |
| 1456 | #define MC_CMD_CSR_WRITE32_IN_LEN(num) (8+4*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1457 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1458 | #define MC_CMD_CSR_WRITE32_IN_ADDR_OFST 0 |
| 1459 | #define MC_CMD_CSR_WRITE32_IN_STEP_OFST 4 |
| 1460 | #define MC_CMD_CSR_WRITE32_IN_BUFFER_OFST 8 |
| 1461 | #define MC_CMD_CSR_WRITE32_IN_BUFFER_LEN 4 |
| 1462 | #define MC_CMD_CSR_WRITE32_IN_BUFFER_MINNUM 1 |
| 1463 | #define MC_CMD_CSR_WRITE32_IN_BUFFER_MAXNUM 61 |
| 1464 | |
| 1465 | /* MC_CMD_CSR_WRITE32_OUT msgresponse */ |
| 1466 | #define MC_CMD_CSR_WRITE32_OUT_LEN 4 |
| 1467 | #define MC_CMD_CSR_WRITE32_OUT_STATUS_OFST 0 |
| 1468 | |
| 1469 | |
| 1470 | /***********************************/ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1471 | /* MC_CMD_HP |
| 1472 | * These commands are used for HP related features. They are grouped under one |
| 1473 | * MCDI command to avoid creating too many MCDI commands. |
| 1474 | */ |
| 1475 | #define MC_CMD_HP 0x54 |
| 1476 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1477 | #define MC_CMD_0x54_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1478 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1479 | /* MC_CMD_HP_IN msgrequest */ |
| 1480 | #define MC_CMD_HP_IN_LEN 16 |
| 1481 | /* HP OCSD sub-command. When address is not NULL, request activation of OCSD at |
| 1482 | * the specified address with the specified interval.When address is NULL, |
| 1483 | * INTERVAL is interpreted as a command: 0: stop OCSD / 1: Report OCSD current |
| 1484 | * state / 2: (debug) Show temperature reported by one of the supported |
| 1485 | * sensors. |
| 1486 | */ |
| 1487 | #define MC_CMD_HP_IN_SUBCMD_OFST 0 |
| 1488 | /* enum: OCSD (Option Card Sensor Data) sub-command. */ |
| 1489 | #define MC_CMD_HP_IN_OCSD_SUBCMD 0x0 |
| 1490 | /* enum: Last known valid HP sub-command. */ |
| 1491 | #define MC_CMD_HP_IN_LAST_SUBCMD 0x0 |
| 1492 | /* The address to the array of sensor fields. (Or NULL to use a sub-command.) |
| 1493 | */ |
| 1494 | #define MC_CMD_HP_IN_OCSD_ADDR_OFST 4 |
| 1495 | #define MC_CMD_HP_IN_OCSD_ADDR_LEN 8 |
| 1496 | #define MC_CMD_HP_IN_OCSD_ADDR_LO_OFST 4 |
| 1497 | #define MC_CMD_HP_IN_OCSD_ADDR_HI_OFST 8 |
| 1498 | /* The requested update interval, in seconds. (Or the sub-command if ADDR is |
| 1499 | * NULL.) |
| 1500 | */ |
| 1501 | #define MC_CMD_HP_IN_OCSD_INTERVAL_OFST 12 |
| 1502 | |
| 1503 | /* MC_CMD_HP_OUT msgresponse */ |
| 1504 | #define MC_CMD_HP_OUT_LEN 4 |
| 1505 | #define MC_CMD_HP_OUT_OCSD_STATUS_OFST 0 |
| 1506 | /* enum: OCSD stopped for this card. */ |
| 1507 | #define MC_CMD_HP_OUT_OCSD_STOPPED 0x1 |
| 1508 | /* enum: OCSD was successfully started with the address provided. */ |
| 1509 | #define MC_CMD_HP_OUT_OCSD_STARTED 0x2 |
| 1510 | /* enum: OCSD was already started for this card. */ |
| 1511 | #define MC_CMD_HP_OUT_OCSD_ALREADY_STARTED 0x3 |
| 1512 | |
| 1513 | |
| 1514 | /***********************************/ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1515 | /* MC_CMD_STACKINFO |
| 1516 | * Get stack information. |
| 1517 | */ |
| 1518 | #define MC_CMD_STACKINFO 0xf |
| 1519 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1520 | #define MC_CMD_0xf_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1521 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1522 | /* MC_CMD_STACKINFO_IN msgrequest */ |
| 1523 | #define MC_CMD_STACKINFO_IN_LEN 0 |
| 1524 | |
| 1525 | /* MC_CMD_STACKINFO_OUT msgresponse */ |
| 1526 | #define MC_CMD_STACKINFO_OUT_LENMIN 12 |
| 1527 | #define MC_CMD_STACKINFO_OUT_LENMAX 252 |
| 1528 | #define MC_CMD_STACKINFO_OUT_LEN(num) (0+12*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1529 | /* (thread ptr, stack size, free space) for each thread in system */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1530 | #define MC_CMD_STACKINFO_OUT_THREAD_INFO_OFST 0 |
| 1531 | #define MC_CMD_STACKINFO_OUT_THREAD_INFO_LEN 12 |
| 1532 | #define MC_CMD_STACKINFO_OUT_THREAD_INFO_MINNUM 1 |
| 1533 | #define MC_CMD_STACKINFO_OUT_THREAD_INFO_MAXNUM 21 |
| 1534 | |
| 1535 | |
| 1536 | /***********************************/ |
| 1537 | /* MC_CMD_MDIO_READ |
| 1538 | * MDIO register read. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1539 | */ |
| 1540 | #define MC_CMD_MDIO_READ 0x10 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1541 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1542 | #define MC_CMD_0x10_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 1543 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1544 | /* MC_CMD_MDIO_READ_IN msgrequest */ |
| 1545 | #define MC_CMD_MDIO_READ_IN_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1546 | /* Bus number; there are two MDIO buses: one for the internal PHY, and one for |
| 1547 | * external devices. |
| 1548 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1549 | #define MC_CMD_MDIO_READ_IN_BUS_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1550 | /* enum: Internal. */ |
| 1551 | #define MC_CMD_MDIO_BUS_INTERNAL 0x0 |
| 1552 | /* enum: External. */ |
| 1553 | #define MC_CMD_MDIO_BUS_EXTERNAL 0x1 |
| 1554 | /* Port address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1555 | #define MC_CMD_MDIO_READ_IN_PRTAD_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1556 | /* Device Address or clause 22. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1557 | #define MC_CMD_MDIO_READ_IN_DEVAD_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1558 | /* enum: By default all the MCDI MDIO operations perform clause45 mode. If you |
| 1559 | * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22. |
| 1560 | */ |
| 1561 | #define MC_CMD_MDIO_CLAUSE22 0x20 |
| 1562 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1563 | #define MC_CMD_MDIO_READ_IN_ADDR_OFST 12 |
| 1564 | |
| 1565 | /* MC_CMD_MDIO_READ_OUT msgresponse */ |
| 1566 | #define MC_CMD_MDIO_READ_OUT_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1567 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1568 | #define MC_CMD_MDIO_READ_OUT_VALUE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1569 | /* Status the MDIO commands return the raw status bits from the MDIO block. A |
| 1570 | * "good" transaction should have the DONE bit set and all other bits clear. |
| 1571 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1572 | #define MC_CMD_MDIO_READ_OUT_STATUS_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1573 | /* enum: Good. */ |
| 1574 | #define MC_CMD_MDIO_STATUS_GOOD 0x8 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1575 | |
| 1576 | |
| 1577 | /***********************************/ |
| 1578 | /* MC_CMD_MDIO_WRITE |
| 1579 | * MDIO register write. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1580 | */ |
| 1581 | #define MC_CMD_MDIO_WRITE 0x11 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1582 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1583 | #define MC_CMD_0x11_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1584 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1585 | /* MC_CMD_MDIO_WRITE_IN msgrequest */ |
| 1586 | #define MC_CMD_MDIO_WRITE_IN_LEN 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1587 | /* Bus number; there are two MDIO buses: one for the internal PHY, and one for |
| 1588 | * external devices. |
| 1589 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1590 | #define MC_CMD_MDIO_WRITE_IN_BUS_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1591 | /* enum: Internal. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1592 | /* MC_CMD_MDIO_BUS_INTERNAL 0x0 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1593 | /* enum: External. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1594 | /* MC_CMD_MDIO_BUS_EXTERNAL 0x1 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1595 | /* Port address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1596 | #define MC_CMD_MDIO_WRITE_IN_PRTAD_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1597 | /* Device Address or clause 22. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1598 | #define MC_CMD_MDIO_WRITE_IN_DEVAD_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1599 | /* enum: By default all the MCDI MDIO operations perform clause45 mode. If you |
| 1600 | * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22. |
| 1601 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1602 | /* MC_CMD_MDIO_CLAUSE22 0x20 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1603 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1604 | #define MC_CMD_MDIO_WRITE_IN_ADDR_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1605 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1606 | #define MC_CMD_MDIO_WRITE_IN_VALUE_OFST 16 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1607 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1608 | /* MC_CMD_MDIO_WRITE_OUT msgresponse */ |
| 1609 | #define MC_CMD_MDIO_WRITE_OUT_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1610 | /* Status; the MDIO commands return the raw status bits from the MDIO block. A |
| 1611 | * "good" transaction should have the DONE bit set and all other bits clear. |
| 1612 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1613 | #define MC_CMD_MDIO_WRITE_OUT_STATUS_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1614 | /* enum: Good. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1615 | /* MC_CMD_MDIO_STATUS_GOOD 0x8 */ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1616 | |
| 1617 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1618 | /***********************************/ |
| 1619 | /* MC_CMD_DBI_WRITE |
| 1620 | * Write DBI register(s). |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1621 | */ |
| 1622 | #define MC_CMD_DBI_WRITE 0x12 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1623 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1624 | #define MC_CMD_0x12_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1625 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1626 | /* MC_CMD_DBI_WRITE_IN msgrequest */ |
| 1627 | #define MC_CMD_DBI_WRITE_IN_LENMIN 12 |
| 1628 | #define MC_CMD_DBI_WRITE_IN_LENMAX 252 |
| 1629 | #define MC_CMD_DBI_WRITE_IN_LEN(num) (0+12*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1630 | /* Each write op consists of an address (offset 0), byte enable/VF/CS2 (offset |
| 1631 | * 32) and value (offset 64). See MC_CMD_DBIWROP_TYPEDEF. |
| 1632 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1633 | #define MC_CMD_DBI_WRITE_IN_DBIWROP_OFST 0 |
| 1634 | #define MC_CMD_DBI_WRITE_IN_DBIWROP_LEN 12 |
| 1635 | #define MC_CMD_DBI_WRITE_IN_DBIWROP_MINNUM 1 |
| 1636 | #define MC_CMD_DBI_WRITE_IN_DBIWROP_MAXNUM 21 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1637 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1638 | /* MC_CMD_DBI_WRITE_OUT msgresponse */ |
| 1639 | #define MC_CMD_DBI_WRITE_OUT_LEN 0 |
| 1640 | |
| 1641 | /* MC_CMD_DBIWROP_TYPEDEF structuredef */ |
| 1642 | #define MC_CMD_DBIWROP_TYPEDEF_LEN 12 |
| 1643 | #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST 0 |
| 1644 | #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LBN 0 |
| 1645 | #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_WIDTH 32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1646 | #define MC_CMD_DBIWROP_TYPEDEF_PARMS_OFST 4 |
| 1647 | #define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_LBN 16 |
| 1648 | #define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_WIDTH 16 |
| 1649 | #define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_LBN 15 |
| 1650 | #define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_WIDTH 1 |
| 1651 | #define MC_CMD_DBIWROP_TYPEDEF_CS2_LBN 14 |
| 1652 | #define MC_CMD_DBIWROP_TYPEDEF_CS2_WIDTH 1 |
| 1653 | #define MC_CMD_DBIWROP_TYPEDEF_PARMS_LBN 32 |
| 1654 | #define MC_CMD_DBIWROP_TYPEDEF_PARMS_WIDTH 32 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1655 | #define MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST 8 |
| 1656 | #define MC_CMD_DBIWROP_TYPEDEF_VALUE_LBN 64 |
| 1657 | #define MC_CMD_DBIWROP_TYPEDEF_VALUE_WIDTH 32 |
| 1658 | |
| 1659 | |
| 1660 | /***********************************/ |
| 1661 | /* MC_CMD_PORT_READ32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1662 | * Read a 32-bit register from the indirect port register map. The port to |
| 1663 | * access is implied by the Shared memory channel used. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1664 | */ |
| 1665 | #define MC_CMD_PORT_READ32 0x14 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1666 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1667 | /* MC_CMD_PORT_READ32_IN msgrequest */ |
| 1668 | #define MC_CMD_PORT_READ32_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1669 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1670 | #define MC_CMD_PORT_READ32_IN_ADDR_OFST 0 |
| 1671 | |
| 1672 | /* MC_CMD_PORT_READ32_OUT msgresponse */ |
| 1673 | #define MC_CMD_PORT_READ32_OUT_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1674 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1675 | #define MC_CMD_PORT_READ32_OUT_VALUE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1676 | /* Status */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1677 | #define MC_CMD_PORT_READ32_OUT_STATUS_OFST 4 |
| 1678 | |
| 1679 | |
| 1680 | /***********************************/ |
| 1681 | /* MC_CMD_PORT_WRITE32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1682 | * Write a 32-bit register to the indirect port register map. The port to |
| 1683 | * access is implied by the Shared memory channel used. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1684 | */ |
| 1685 | #define MC_CMD_PORT_WRITE32 0x15 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1686 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1687 | /* MC_CMD_PORT_WRITE32_IN msgrequest */ |
| 1688 | #define MC_CMD_PORT_WRITE32_IN_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1689 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1690 | #define MC_CMD_PORT_WRITE32_IN_ADDR_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1691 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1692 | #define MC_CMD_PORT_WRITE32_IN_VALUE_OFST 4 |
| 1693 | |
| 1694 | /* MC_CMD_PORT_WRITE32_OUT msgresponse */ |
| 1695 | #define MC_CMD_PORT_WRITE32_OUT_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1696 | /* Status */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1697 | #define MC_CMD_PORT_WRITE32_OUT_STATUS_OFST 0 |
| 1698 | |
| 1699 | |
| 1700 | /***********************************/ |
| 1701 | /* MC_CMD_PORT_READ128 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1702 | * Read a 128-bit register from the indirect port register map. The port to |
| 1703 | * access is implied by the Shared memory channel used. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1704 | */ |
| 1705 | #define MC_CMD_PORT_READ128 0x16 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1706 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1707 | /* MC_CMD_PORT_READ128_IN msgrequest */ |
| 1708 | #define MC_CMD_PORT_READ128_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1709 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1710 | #define MC_CMD_PORT_READ128_IN_ADDR_OFST 0 |
| 1711 | |
| 1712 | /* MC_CMD_PORT_READ128_OUT msgresponse */ |
| 1713 | #define MC_CMD_PORT_READ128_OUT_LEN 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1714 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1715 | #define MC_CMD_PORT_READ128_OUT_VALUE_OFST 0 |
| 1716 | #define MC_CMD_PORT_READ128_OUT_VALUE_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1717 | /* Status */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1718 | #define MC_CMD_PORT_READ128_OUT_STATUS_OFST 16 |
| 1719 | |
| 1720 | |
| 1721 | /***********************************/ |
| 1722 | /* MC_CMD_PORT_WRITE128 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1723 | * Write a 128-bit register to the indirect port register map. The port to |
| 1724 | * access is implied by the Shared memory channel used. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1725 | */ |
| 1726 | #define MC_CMD_PORT_WRITE128 0x17 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1727 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1728 | /* MC_CMD_PORT_WRITE128_IN msgrequest */ |
| 1729 | #define MC_CMD_PORT_WRITE128_IN_LEN 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1730 | /* Address */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1731 | #define MC_CMD_PORT_WRITE128_IN_ADDR_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1732 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1733 | #define MC_CMD_PORT_WRITE128_IN_VALUE_OFST 4 |
| 1734 | #define MC_CMD_PORT_WRITE128_IN_VALUE_LEN 16 |
| 1735 | |
| 1736 | /* MC_CMD_PORT_WRITE128_OUT msgresponse */ |
| 1737 | #define MC_CMD_PORT_WRITE128_OUT_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1738 | /* Status */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1739 | #define MC_CMD_PORT_WRITE128_OUT_STATUS_OFST 0 |
| 1740 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1741 | /* MC_CMD_CAPABILITIES structuredef */ |
| 1742 | #define MC_CMD_CAPABILITIES_LEN 4 |
| 1743 | /* Small buf table. */ |
| 1744 | #define MC_CMD_CAPABILITIES_SMALL_BUF_TBL_LBN 0 |
| 1745 | #define MC_CMD_CAPABILITIES_SMALL_BUF_TBL_WIDTH 1 |
| 1746 | /* Turbo mode (for Maranello). */ |
| 1747 | #define MC_CMD_CAPABILITIES_TURBO_LBN 1 |
| 1748 | #define MC_CMD_CAPABILITIES_TURBO_WIDTH 1 |
| 1749 | /* Turbo mode active (for Maranello). */ |
| 1750 | #define MC_CMD_CAPABILITIES_TURBO_ACTIVE_LBN 2 |
| 1751 | #define MC_CMD_CAPABILITIES_TURBO_ACTIVE_WIDTH 1 |
| 1752 | /* PTP offload. */ |
| 1753 | #define MC_CMD_CAPABILITIES_PTP_LBN 3 |
| 1754 | #define MC_CMD_CAPABILITIES_PTP_WIDTH 1 |
| 1755 | /* AOE mode. */ |
| 1756 | #define MC_CMD_CAPABILITIES_AOE_LBN 4 |
| 1757 | #define MC_CMD_CAPABILITIES_AOE_WIDTH 1 |
| 1758 | /* AOE mode active. */ |
| 1759 | #define MC_CMD_CAPABILITIES_AOE_ACTIVE_LBN 5 |
| 1760 | #define MC_CMD_CAPABILITIES_AOE_ACTIVE_WIDTH 1 |
| 1761 | /* AOE mode active. */ |
| 1762 | #define MC_CMD_CAPABILITIES_FC_ACTIVE_LBN 6 |
| 1763 | #define MC_CMD_CAPABILITIES_FC_ACTIVE_WIDTH 1 |
| 1764 | #define MC_CMD_CAPABILITIES_RESERVED_LBN 7 |
| 1765 | #define MC_CMD_CAPABILITIES_RESERVED_WIDTH 25 |
| 1766 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1767 | |
| 1768 | /***********************************/ |
| 1769 | /* MC_CMD_GET_BOARD_CFG |
| 1770 | * Returns the MC firmware configuration structure. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1771 | */ |
| 1772 | #define MC_CMD_GET_BOARD_CFG 0x18 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1773 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1774 | #define MC_CMD_0x18_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 1775 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1776 | /* MC_CMD_GET_BOARD_CFG_IN msgrequest */ |
| 1777 | #define MC_CMD_GET_BOARD_CFG_IN_LEN 0 |
| 1778 | |
| 1779 | /* MC_CMD_GET_BOARD_CFG_OUT msgresponse */ |
| 1780 | #define MC_CMD_GET_BOARD_CFG_OUT_LENMIN 96 |
| 1781 | #define MC_CMD_GET_BOARD_CFG_OUT_LENMAX 136 |
| 1782 | #define MC_CMD_GET_BOARD_CFG_OUT_LEN(num) (72+2*(num)) |
| 1783 | #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_OFST 0 |
| 1784 | #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_OFST 4 |
| 1785 | #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_LEN 32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1786 | /* See MC_CMD_CAPABILITIES */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1787 | #define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_OFST 36 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1788 | /* See MC_CMD_CAPABILITIES */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1789 | #define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_OFST 40 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1790 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST 44 |
| 1791 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_LEN 6 |
| 1792 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_OFST 50 |
| 1793 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_LEN 6 |
| 1794 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_OFST 56 |
| 1795 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_OFST 60 |
| 1796 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_OFST 64 |
| 1797 | #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_OFST 68 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1798 | /* This field contains a 16-bit value for each of the types of NVRAM area. The |
| 1799 | * values are defined in the firmware/mc/platform/.c file for a specific board |
| 1800 | * type, but otherwise have no meaning to the MC; they are used by the driver |
| 1801 | * to manage selection of appropriate firmware updates. |
| 1802 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1803 | #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST 72 |
| 1804 | #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN 2 |
| 1805 | #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM 12 |
| 1806 | #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM 32 |
| 1807 | |
| 1808 | |
| 1809 | /***********************************/ |
| 1810 | /* MC_CMD_DBI_READX |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1811 | * Read DBI register(s) -- extended functionality |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1812 | */ |
| 1813 | #define MC_CMD_DBI_READX 0x19 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1814 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1815 | #define MC_CMD_0x19_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1816 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1817 | /* MC_CMD_DBI_READX_IN msgrequest */ |
| 1818 | #define MC_CMD_DBI_READX_IN_LENMIN 8 |
| 1819 | #define MC_CMD_DBI_READX_IN_LENMAX 248 |
| 1820 | #define MC_CMD_DBI_READX_IN_LEN(num) (0+8*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1821 | /* Each Read op consists of an address (offset 0), VF/CS2) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1822 | #define MC_CMD_DBI_READX_IN_DBIRDOP_OFST 0 |
| 1823 | #define MC_CMD_DBI_READX_IN_DBIRDOP_LEN 8 |
| 1824 | #define MC_CMD_DBI_READX_IN_DBIRDOP_LO_OFST 0 |
| 1825 | #define MC_CMD_DBI_READX_IN_DBIRDOP_HI_OFST 4 |
| 1826 | #define MC_CMD_DBI_READX_IN_DBIRDOP_MINNUM 1 |
| 1827 | #define MC_CMD_DBI_READX_IN_DBIRDOP_MAXNUM 31 |
| 1828 | |
| 1829 | /* MC_CMD_DBI_READX_OUT msgresponse */ |
| 1830 | #define MC_CMD_DBI_READX_OUT_LENMIN 4 |
| 1831 | #define MC_CMD_DBI_READX_OUT_LENMAX 252 |
| 1832 | #define MC_CMD_DBI_READX_OUT_LEN(num) (0+4*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1833 | /* Value */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1834 | #define MC_CMD_DBI_READX_OUT_VALUE_OFST 0 |
| 1835 | #define MC_CMD_DBI_READX_OUT_VALUE_LEN 4 |
| 1836 | #define MC_CMD_DBI_READX_OUT_VALUE_MINNUM 1 |
| 1837 | #define MC_CMD_DBI_READX_OUT_VALUE_MAXNUM 63 |
| 1838 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1839 | /* MC_CMD_DBIRDOP_TYPEDEF structuredef */ |
| 1840 | #define MC_CMD_DBIRDOP_TYPEDEF_LEN 8 |
| 1841 | #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_OFST 0 |
| 1842 | #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LBN 0 |
| 1843 | #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_WIDTH 32 |
| 1844 | #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_OFST 4 |
| 1845 | #define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_LBN 16 |
| 1846 | #define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_WIDTH 16 |
| 1847 | #define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_LBN 15 |
| 1848 | #define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_WIDTH 1 |
| 1849 | #define MC_CMD_DBIRDOP_TYPEDEF_CS2_LBN 14 |
| 1850 | #define MC_CMD_DBIRDOP_TYPEDEF_CS2_WIDTH 1 |
| 1851 | #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_LBN 32 |
| 1852 | #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_WIDTH 32 |
| 1853 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1854 | |
| 1855 | /***********************************/ |
| 1856 | /* MC_CMD_SET_RAND_SEED |
| 1857 | * Set the 16byte seed for the MC pseudo-random generator. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1858 | */ |
| 1859 | #define MC_CMD_SET_RAND_SEED 0x1a |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1860 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1861 | #define MC_CMD_0x1a_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 1862 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1863 | /* MC_CMD_SET_RAND_SEED_IN msgrequest */ |
| 1864 | #define MC_CMD_SET_RAND_SEED_IN_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1865 | /* Seed value. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1866 | #define MC_CMD_SET_RAND_SEED_IN_SEED_OFST 0 |
| 1867 | #define MC_CMD_SET_RAND_SEED_IN_SEED_LEN 16 |
| 1868 | |
| 1869 | /* MC_CMD_SET_RAND_SEED_OUT msgresponse */ |
| 1870 | #define MC_CMD_SET_RAND_SEED_OUT_LEN 0 |
| 1871 | |
| 1872 | |
| 1873 | /***********************************/ |
| 1874 | /* MC_CMD_LTSSM_HIST |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1875 | * Retrieve the history of the LTSSM, if the build supports it. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1876 | */ |
| 1877 | #define MC_CMD_LTSSM_HIST 0x1b |
| 1878 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1879 | /* MC_CMD_LTSSM_HIST_IN msgrequest */ |
| 1880 | #define MC_CMD_LTSSM_HIST_IN_LEN 0 |
| 1881 | |
| 1882 | /* MC_CMD_LTSSM_HIST_OUT msgresponse */ |
| 1883 | #define MC_CMD_LTSSM_HIST_OUT_LENMIN 0 |
| 1884 | #define MC_CMD_LTSSM_HIST_OUT_LENMAX 252 |
| 1885 | #define MC_CMD_LTSSM_HIST_OUT_LEN(num) (0+4*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1886 | /* variable number of LTSSM values, as bytes. The history is read-to-clear. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1887 | #define MC_CMD_LTSSM_HIST_OUT_DATA_OFST 0 |
| 1888 | #define MC_CMD_LTSSM_HIST_OUT_DATA_LEN 4 |
| 1889 | #define MC_CMD_LTSSM_HIST_OUT_DATA_MINNUM 0 |
| 1890 | #define MC_CMD_LTSSM_HIST_OUT_DATA_MAXNUM 63 |
| 1891 | |
| 1892 | |
| 1893 | /***********************************/ |
| 1894 | /* MC_CMD_DRV_ATTACH |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1895 | * Inform MCPU that this port is managed on the host (i.e. driver active). For |
| 1896 | * Huntington, also request the preferred datapath firmware to use if possible |
| 1897 | * (it may not be possible for this request to be fulfilled; the driver must |
| 1898 | * issue a subsequent MC_CMD_GET_CAPABILITIES command to determine which |
| 1899 | * features are actually available). The FIRMWARE_ID field is ignored by older |
| 1900 | * platforms. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1901 | */ |
| 1902 | #define MC_CMD_DRV_ATTACH 0x1c |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1903 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1904 | #define MC_CMD_0x1c_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 1905 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1906 | /* MC_CMD_DRV_ATTACH_IN msgrequest */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1907 | #define MC_CMD_DRV_ATTACH_IN_LEN 12 |
| 1908 | /* new state (0=detached, 1=attached) to set if UPDATE=1 */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1909 | #define MC_CMD_DRV_ATTACH_IN_NEW_STATE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1910 | /* 1 to set new state, or 0 to just report the existing state */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1911 | #define MC_CMD_DRV_ATTACH_IN_UPDATE_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1912 | /* preferred datapath firmware (for Huntington; ignored for Siena) */ |
| 1913 | #define MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_OFST 8 |
| 1914 | /* enum: Prefer to use full featured firmware */ |
| 1915 | #define MC_CMD_FW_FULL_FEATURED 0x0 |
| 1916 | /* enum: Prefer to use firmware with fewer features but lower latency */ |
| 1917 | #define MC_CMD_FW_LOW_LATENCY 0x1 |
Edward Cree | 267d9d7 | 2015-05-06 00:59:18 +0100 | [diff] [blame] | 1918 | /* enum: Only this option is allowed for non-admin functions */ |
| 1919 | #define MC_CMD_FW_DONT_CARE 0xffffffff |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1920 | |
| 1921 | /* MC_CMD_DRV_ATTACH_OUT msgresponse */ |
| 1922 | #define MC_CMD_DRV_ATTACH_OUT_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1923 | /* previous or existing state (0=detached, 1=attached) */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1924 | #define MC_CMD_DRV_ATTACH_OUT_OLD_STATE_OFST 0 |
| 1925 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1926 | /* MC_CMD_DRV_ATTACH_EXT_OUT msgresponse */ |
| 1927 | #define MC_CMD_DRV_ATTACH_EXT_OUT_LEN 8 |
| 1928 | /* previous or existing state (0=detached, 1=attached) */ |
| 1929 | #define MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_OFST 0 |
| 1930 | /* Flags associated with this function */ |
| 1931 | #define MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_OFST 4 |
| 1932 | /* enum: Labels the lowest-numbered function visible to the OS */ |
| 1933 | #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY 0x0 |
| 1934 | /* enum: The function can control the link state of the physical port it is |
| 1935 | * bound to. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1936 | */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1937 | #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL 0x1 |
| 1938 | /* enum: The function can perform privileged operations */ |
| 1939 | #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED 0x2 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1940 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1941 | |
| 1942 | /***********************************/ |
| 1943 | /* MC_CMD_SHMUART |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1944 | * Route UART output to circular buffer in shared memory instead. |
| 1945 | */ |
| 1946 | #define MC_CMD_SHMUART 0x1f |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1947 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1948 | /* MC_CMD_SHMUART_IN msgrequest */ |
| 1949 | #define MC_CMD_SHMUART_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1950 | /* ??? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1951 | #define MC_CMD_SHMUART_IN_FLAG_OFST 0 |
| 1952 | |
| 1953 | /* MC_CMD_SHMUART_OUT msgresponse */ |
| 1954 | #define MC_CMD_SHMUART_OUT_LEN 0 |
| 1955 | |
| 1956 | |
| 1957 | /***********************************/ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1958 | /* MC_CMD_PORT_RESET |
| 1959 | * Generic per-port reset. There is no equivalent for per-board reset. Locks |
| 1960 | * required: None; Return code: 0, ETIME. NOTE: This command is deprecated - |
| 1961 | * use MC_CMD_ENTITY_RESET instead. |
| 1962 | */ |
| 1963 | #define MC_CMD_PORT_RESET 0x20 |
| 1964 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1965 | #define MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 1966 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1967 | /* MC_CMD_PORT_RESET_IN msgrequest */ |
| 1968 | #define MC_CMD_PORT_RESET_IN_LEN 0 |
| 1969 | |
| 1970 | /* MC_CMD_PORT_RESET_OUT msgresponse */ |
| 1971 | #define MC_CMD_PORT_RESET_OUT_LEN 0 |
| 1972 | |
| 1973 | |
| 1974 | /***********************************/ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1975 | /* MC_CMD_ENTITY_RESET |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1976 | * Generic per-resource reset. There is no equivalent for per-board reset. |
| 1977 | * Locks required: None; Return code: 0, ETIME. NOTE: This command is an |
| 1978 | * extended version of the deprecated MC_CMD_PORT_RESET with added fields. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1979 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1980 | #define MC_CMD_ENTITY_RESET 0x20 |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 1981 | /* MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL */ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1982 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1983 | /* MC_CMD_ENTITY_RESET_IN msgrequest */ |
| 1984 | #define MC_CMD_ENTITY_RESET_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 1985 | /* Optional flags field. Omitting this will perform a "legacy" reset action |
| 1986 | * (TBD). |
| 1987 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 1988 | #define MC_CMD_ENTITY_RESET_IN_FLAG_OFST 0 |
| 1989 | #define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_LBN 0 |
| 1990 | #define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_WIDTH 1 |
| 1991 | |
| 1992 | /* MC_CMD_ENTITY_RESET_OUT msgresponse */ |
| 1993 | #define MC_CMD_ENTITY_RESET_OUT_LEN 0 |
| 1994 | |
| 1995 | |
| 1996 | /***********************************/ |
| 1997 | /* MC_CMD_PCIE_CREDITS |
| 1998 | * Read instantaneous and minimum flow control thresholds. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 1999 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2000 | #define MC_CMD_PCIE_CREDITS 0x21 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2001 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2002 | /* MC_CMD_PCIE_CREDITS_IN msgrequest */ |
| 2003 | #define MC_CMD_PCIE_CREDITS_IN_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2004 | /* poll period. 0 is disabled */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2005 | #define MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2006 | /* wipe statistics */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2007 | #define MC_CMD_PCIE_CREDITS_IN_WIPE_OFST 4 |
| 2008 | |
| 2009 | /* MC_CMD_PCIE_CREDITS_OUT msgresponse */ |
| 2010 | #define MC_CMD_PCIE_CREDITS_OUT_LEN 16 |
| 2011 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_OFST 0 |
| 2012 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_LEN 2 |
| 2013 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_OFST 2 |
| 2014 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_LEN 2 |
| 2015 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_OFST 4 |
| 2016 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_LEN 2 |
| 2017 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_OFST 6 |
| 2018 | #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_LEN 2 |
| 2019 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_OFST 8 |
| 2020 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_LEN 2 |
| 2021 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_OFST 10 |
| 2022 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_LEN 2 |
| 2023 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_OFST 12 |
| 2024 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_LEN 2 |
| 2025 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_OFST 14 |
| 2026 | #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_LEN 2 |
| 2027 | |
| 2028 | |
| 2029 | /***********************************/ |
| 2030 | /* MC_CMD_RXD_MONITOR |
| 2031 | * Get histogram of RX queue fill level. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2032 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2033 | #define MC_CMD_RXD_MONITOR 0x22 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2034 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2035 | /* MC_CMD_RXD_MONITOR_IN msgrequest */ |
| 2036 | #define MC_CMD_RXD_MONITOR_IN_LEN 12 |
| 2037 | #define MC_CMD_RXD_MONITOR_IN_QID_OFST 0 |
| 2038 | #define MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_OFST 4 |
| 2039 | #define MC_CMD_RXD_MONITOR_IN_WIPE_OFST 8 |
| 2040 | |
| 2041 | /* MC_CMD_RXD_MONITOR_OUT msgresponse */ |
| 2042 | #define MC_CMD_RXD_MONITOR_OUT_LEN 80 |
| 2043 | #define MC_CMD_RXD_MONITOR_OUT_QID_OFST 0 |
| 2044 | #define MC_CMD_RXD_MONITOR_OUT_RING_FILL_OFST 4 |
| 2045 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_OFST 8 |
| 2046 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_1_OFST 12 |
| 2047 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_2_OFST 16 |
| 2048 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_4_OFST 20 |
| 2049 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_8_OFST 24 |
| 2050 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_16_OFST 28 |
| 2051 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_32_OFST 32 |
| 2052 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_64_OFST 36 |
| 2053 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_128_OFST 40 |
| 2054 | #define MC_CMD_RXD_MONITOR_OUT_RING_LT_256_OFST 44 |
| 2055 | #define MC_CMD_RXD_MONITOR_OUT_RING_GE_256_OFST 48 |
| 2056 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_OFST 52 |
| 2057 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_OFST 56 |
| 2058 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_OFST 60 |
| 2059 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_OFST 64 |
| 2060 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_OFST 68 |
| 2061 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_OFST 72 |
| 2062 | #define MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_OFST 76 |
| 2063 | |
| 2064 | |
| 2065 | /***********************************/ |
| 2066 | /* MC_CMD_PUTS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2067 | * Copy the given ASCII string out onto UART and/or out of the network port. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2068 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2069 | #define MC_CMD_PUTS 0x23 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2070 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2071 | #define MC_CMD_0x23_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 2072 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2073 | /* MC_CMD_PUTS_IN msgrequest */ |
| 2074 | #define MC_CMD_PUTS_IN_LENMIN 13 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 2075 | #define MC_CMD_PUTS_IN_LENMAX 252 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2076 | #define MC_CMD_PUTS_IN_LEN(num) (12+1*(num)) |
| 2077 | #define MC_CMD_PUTS_IN_DEST_OFST 0 |
| 2078 | #define MC_CMD_PUTS_IN_UART_LBN 0 |
| 2079 | #define MC_CMD_PUTS_IN_UART_WIDTH 1 |
| 2080 | #define MC_CMD_PUTS_IN_PORT_LBN 1 |
| 2081 | #define MC_CMD_PUTS_IN_PORT_WIDTH 1 |
| 2082 | #define MC_CMD_PUTS_IN_DHOST_OFST 4 |
| 2083 | #define MC_CMD_PUTS_IN_DHOST_LEN 6 |
| 2084 | #define MC_CMD_PUTS_IN_STRING_OFST 12 |
| 2085 | #define MC_CMD_PUTS_IN_STRING_LEN 1 |
| 2086 | #define MC_CMD_PUTS_IN_STRING_MINNUM 1 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 2087 | #define MC_CMD_PUTS_IN_STRING_MAXNUM 240 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2088 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2089 | /* MC_CMD_PUTS_OUT msgresponse */ |
| 2090 | #define MC_CMD_PUTS_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2091 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2092 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2093 | /***********************************/ |
| 2094 | /* MC_CMD_GET_PHY_CFG |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2095 | * Report PHY configuration. This guarantees to succeed even if the PHY is in a |
| 2096 | * 'zombie' state. Locks required: None |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2097 | */ |
| 2098 | #define MC_CMD_GET_PHY_CFG 0x24 |
| 2099 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2100 | #define MC_CMD_0x24_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 2101 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2102 | /* MC_CMD_GET_PHY_CFG_IN msgrequest */ |
| 2103 | #define MC_CMD_GET_PHY_CFG_IN_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2104 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2105 | /* MC_CMD_GET_PHY_CFG_OUT msgresponse */ |
| 2106 | #define MC_CMD_GET_PHY_CFG_OUT_LEN 72 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2107 | /* flags */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2108 | #define MC_CMD_GET_PHY_CFG_OUT_FLAGS_OFST 0 |
| 2109 | #define MC_CMD_GET_PHY_CFG_OUT_PRESENT_LBN 0 |
| 2110 | #define MC_CMD_GET_PHY_CFG_OUT_PRESENT_WIDTH 1 |
| 2111 | #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN 1 |
| 2112 | #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_WIDTH 1 |
| 2113 | #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_LBN 2 |
| 2114 | #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_WIDTH 1 |
| 2115 | #define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_LBN 3 |
| 2116 | #define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_WIDTH 1 |
| 2117 | #define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_LBN 4 |
| 2118 | #define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_WIDTH 1 |
| 2119 | #define MC_CMD_GET_PHY_CFG_OUT_TXDIS_LBN 5 |
| 2120 | #define MC_CMD_GET_PHY_CFG_OUT_TXDIS_WIDTH 1 |
| 2121 | #define MC_CMD_GET_PHY_CFG_OUT_BIST_LBN 6 |
| 2122 | #define MC_CMD_GET_PHY_CFG_OUT_BIST_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2123 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2124 | #define MC_CMD_GET_PHY_CFG_OUT_TYPE_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2125 | /* Bitmask of supported capabilities */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2126 | #define MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_OFST 8 |
| 2127 | #define MC_CMD_PHY_CAP_10HDX_LBN 1 |
| 2128 | #define MC_CMD_PHY_CAP_10HDX_WIDTH 1 |
| 2129 | #define MC_CMD_PHY_CAP_10FDX_LBN 2 |
| 2130 | #define MC_CMD_PHY_CAP_10FDX_WIDTH 1 |
| 2131 | #define MC_CMD_PHY_CAP_100HDX_LBN 3 |
| 2132 | #define MC_CMD_PHY_CAP_100HDX_WIDTH 1 |
| 2133 | #define MC_CMD_PHY_CAP_100FDX_LBN 4 |
| 2134 | #define MC_CMD_PHY_CAP_100FDX_WIDTH 1 |
| 2135 | #define MC_CMD_PHY_CAP_1000HDX_LBN 5 |
| 2136 | #define MC_CMD_PHY_CAP_1000HDX_WIDTH 1 |
| 2137 | #define MC_CMD_PHY_CAP_1000FDX_LBN 6 |
| 2138 | #define MC_CMD_PHY_CAP_1000FDX_WIDTH 1 |
| 2139 | #define MC_CMD_PHY_CAP_10000FDX_LBN 7 |
| 2140 | #define MC_CMD_PHY_CAP_10000FDX_WIDTH 1 |
| 2141 | #define MC_CMD_PHY_CAP_PAUSE_LBN 8 |
| 2142 | #define MC_CMD_PHY_CAP_PAUSE_WIDTH 1 |
| 2143 | #define MC_CMD_PHY_CAP_ASYM_LBN 9 |
| 2144 | #define MC_CMD_PHY_CAP_ASYM_WIDTH 1 |
| 2145 | #define MC_CMD_PHY_CAP_AN_LBN 10 |
| 2146 | #define MC_CMD_PHY_CAP_AN_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2147 | #define MC_CMD_PHY_CAP_40000FDX_LBN 11 |
| 2148 | #define MC_CMD_PHY_CAP_40000FDX_WIDTH 1 |
| 2149 | #define MC_CMD_PHY_CAP_DDM_LBN 12 |
| 2150 | #define MC_CMD_PHY_CAP_DDM_WIDTH 1 |
| 2151 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2152 | #define MC_CMD_GET_PHY_CFG_OUT_CHANNEL_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2153 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2154 | #define MC_CMD_GET_PHY_CFG_OUT_PRT_OFST 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2155 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2156 | #define MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_OFST 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2157 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2158 | #define MC_CMD_GET_PHY_CFG_OUT_NAME_OFST 24 |
| 2159 | #define MC_CMD_GET_PHY_CFG_OUT_NAME_LEN 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2160 | /* ?? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2161 | #define MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_OFST 44 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2162 | /* enum: Xaui. */ |
| 2163 | #define MC_CMD_MEDIA_XAUI 0x1 |
| 2164 | /* enum: CX4. */ |
| 2165 | #define MC_CMD_MEDIA_CX4 0x2 |
| 2166 | /* enum: KX4. */ |
| 2167 | #define MC_CMD_MEDIA_KX4 0x3 |
| 2168 | /* enum: XFP Far. */ |
| 2169 | #define MC_CMD_MEDIA_XFP 0x4 |
| 2170 | /* enum: SFP+. */ |
| 2171 | #define MC_CMD_MEDIA_SFP_PLUS 0x5 |
| 2172 | /* enum: 10GBaseT. */ |
| 2173 | #define MC_CMD_MEDIA_BASE_T 0x6 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 2174 | /* enum: QSFP+. */ |
| 2175 | #define MC_CMD_MEDIA_QSFP_PLUS 0x7 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2176 | #define MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_OFST 48 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2177 | /* enum: Native clause 22 */ |
| 2178 | #define MC_CMD_MMD_CLAUSE22 0x0 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2179 | #define MC_CMD_MMD_CLAUSE45_PMAPMD 0x1 /* enum */ |
| 2180 | #define MC_CMD_MMD_CLAUSE45_WIS 0x2 /* enum */ |
| 2181 | #define MC_CMD_MMD_CLAUSE45_PCS 0x3 /* enum */ |
| 2182 | #define MC_CMD_MMD_CLAUSE45_PHYXS 0x4 /* enum */ |
| 2183 | #define MC_CMD_MMD_CLAUSE45_DTEXS 0x5 /* enum */ |
| 2184 | #define MC_CMD_MMD_CLAUSE45_TC 0x6 /* enum */ |
| 2185 | #define MC_CMD_MMD_CLAUSE45_AN 0x7 /* enum */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2186 | /* enum: Clause22 proxied over clause45 by PHY. */ |
| 2187 | #define MC_CMD_MMD_CLAUSE45_C22EXT 0x1d |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2188 | #define MC_CMD_MMD_CLAUSE45_VEND1 0x1e /* enum */ |
| 2189 | #define MC_CMD_MMD_CLAUSE45_VEND2 0x1f /* enum */ |
| 2190 | #define MC_CMD_GET_PHY_CFG_OUT_REVISION_OFST 52 |
| 2191 | #define MC_CMD_GET_PHY_CFG_OUT_REVISION_LEN 20 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2192 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2193 | |
| 2194 | /***********************************/ |
| 2195 | /* MC_CMD_START_BIST |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2196 | * Start a BIST test on the PHY. Locks required: PHY_LOCK if doing a PHY BIST |
| 2197 | * Return code: 0, EINVAL, EACCES (if PHY_LOCK is not held) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2198 | */ |
| 2199 | #define MC_CMD_START_BIST 0x25 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2200 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2201 | #define MC_CMD_0x25_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 2202 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2203 | /* MC_CMD_START_BIST_IN msgrequest */ |
| 2204 | #define MC_CMD_START_BIST_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2205 | /* Type of test. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2206 | #define MC_CMD_START_BIST_IN_TYPE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2207 | /* enum: Run the PHY's short cable BIST. */ |
| 2208 | #define MC_CMD_PHY_BIST_CABLE_SHORT 0x1 |
| 2209 | /* enum: Run the PHY's long cable BIST. */ |
| 2210 | #define MC_CMD_PHY_BIST_CABLE_LONG 0x2 |
| 2211 | /* enum: Run BIST on the currently selected BPX Serdes (XAUI or XFI) . */ |
| 2212 | #define MC_CMD_BPX_SERDES_BIST 0x3 |
| 2213 | /* enum: Run the MC loopback tests. */ |
| 2214 | #define MC_CMD_MC_LOOPBACK_BIST 0x4 |
| 2215 | /* enum: Run the PHY's standard BIST. */ |
| 2216 | #define MC_CMD_PHY_BIST 0x5 |
| 2217 | /* enum: Run MC RAM test. */ |
| 2218 | #define MC_CMD_MC_MEM_BIST 0x6 |
| 2219 | /* enum: Run Port RAM test. */ |
| 2220 | #define MC_CMD_PORT_MEM_BIST 0x7 |
| 2221 | /* enum: Run register test. */ |
| 2222 | #define MC_CMD_REG_BIST 0x8 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2223 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2224 | /* MC_CMD_START_BIST_OUT msgresponse */ |
| 2225 | #define MC_CMD_START_BIST_OUT_LEN 0 |
| 2226 | |
| 2227 | |
| 2228 | /***********************************/ |
| 2229 | /* MC_CMD_POLL_BIST |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2230 | * Poll for BIST completion. Returns a single status code, and optionally some |
| 2231 | * PHY specific bist output. The driver should only consume the BIST output |
| 2232 | * after validating OUTLEN and MC_CMD_GET_PHY_CFG.TYPE. If a driver can't |
| 2233 | * successfully parse the BIST output, it should still respect the pass/Fail in |
| 2234 | * OUT.RESULT. Locks required: PHY_LOCK if doing a PHY BIST. Return code: 0, |
| 2235 | * EACCES (if PHY_LOCK is not held). |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2236 | */ |
| 2237 | #define MC_CMD_POLL_BIST 0x26 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2238 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2239 | #define MC_CMD_0x26_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 2240 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2241 | /* MC_CMD_POLL_BIST_IN msgrequest */ |
| 2242 | #define MC_CMD_POLL_BIST_IN_LEN 0 |
| 2243 | |
| 2244 | /* MC_CMD_POLL_BIST_OUT msgresponse */ |
| 2245 | #define MC_CMD_POLL_BIST_OUT_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2246 | /* result */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2247 | #define MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2248 | /* enum: Running. */ |
| 2249 | #define MC_CMD_POLL_BIST_RUNNING 0x1 |
| 2250 | /* enum: Passed. */ |
| 2251 | #define MC_CMD_POLL_BIST_PASSED 0x2 |
| 2252 | /* enum: Failed. */ |
| 2253 | #define MC_CMD_POLL_BIST_FAILED 0x3 |
| 2254 | /* enum: Timed-out. */ |
| 2255 | #define MC_CMD_POLL_BIST_TIMEOUT 0x4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2256 | #define MC_CMD_POLL_BIST_OUT_PRIVATE_OFST 4 |
| 2257 | |
| 2258 | /* MC_CMD_POLL_BIST_OUT_SFT9001 msgresponse */ |
| 2259 | #define MC_CMD_POLL_BIST_OUT_SFT9001_LEN 36 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2260 | /* result */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2261 | /* MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */ |
| 2262 | /* Enum values, see field(s): */ |
| 2263 | /* MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */ |
| 2264 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_OFST 4 |
| 2265 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_OFST 8 |
| 2266 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_OFST 12 |
| 2267 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_OFST 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2268 | /* Status of each channel A */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2269 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_OFST 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2270 | /* enum: Ok. */ |
| 2271 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_OK 0x1 |
| 2272 | /* enum: Open. */ |
| 2273 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_OPEN 0x2 |
| 2274 | /* enum: Intra-pair short. */ |
| 2275 | #define MC_CMD_POLL_BIST_SFT9001_INTRA_PAIR_SHORT 0x3 |
| 2276 | /* enum: Inter-pair short. */ |
| 2277 | #define MC_CMD_POLL_BIST_SFT9001_INTER_PAIR_SHORT 0x4 |
| 2278 | /* enum: Busy. */ |
| 2279 | #define MC_CMD_POLL_BIST_SFT9001_PAIR_BUSY 0x9 |
| 2280 | /* Status of each channel B */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2281 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_OFST 24 |
| 2282 | /* Enum values, see field(s): */ |
| 2283 | /* CABLE_STATUS_A */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2284 | /* Status of each channel C */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2285 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_OFST 28 |
| 2286 | /* Enum values, see field(s): */ |
| 2287 | /* CABLE_STATUS_A */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2288 | /* Status of each channel D */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2289 | #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_OFST 32 |
| 2290 | /* Enum values, see field(s): */ |
| 2291 | /* CABLE_STATUS_A */ |
| 2292 | |
| 2293 | /* MC_CMD_POLL_BIST_OUT_MRSFP msgresponse */ |
| 2294 | #define MC_CMD_POLL_BIST_OUT_MRSFP_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2295 | /* result */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2296 | /* MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */ |
| 2297 | /* Enum values, see field(s): */ |
| 2298 | /* MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */ |
| 2299 | #define MC_CMD_POLL_BIST_OUT_MRSFP_TEST_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2300 | /* enum: Complete. */ |
| 2301 | #define MC_CMD_POLL_BIST_MRSFP_TEST_COMPLETE 0x0 |
| 2302 | /* enum: Bus switch off I2C write. */ |
| 2303 | #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_WRITE 0x1 |
| 2304 | /* enum: Bus switch off I2C no access IO exp. */ |
| 2305 | #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_IO_EXP 0x2 |
| 2306 | /* enum: Bus switch off I2C no access module. */ |
| 2307 | #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_MODULE 0x3 |
| 2308 | /* enum: IO exp I2C configure. */ |
| 2309 | #define MC_CMD_POLL_BIST_MRSFP_TEST_IO_EXP_I2C_CONFIGURE 0x4 |
| 2310 | /* enum: Bus switch I2C no cross talk. */ |
| 2311 | #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_I2C_NO_CROSSTALK 0x5 |
| 2312 | /* enum: Module presence. */ |
| 2313 | #define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_PRESENCE 0x6 |
| 2314 | /* enum: Module ID I2C access. */ |
| 2315 | #define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_I2C_ACCESS 0x7 |
| 2316 | /* enum: Module ID sane value. */ |
| 2317 | #define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_SANE_VALUE 0x8 |
| 2318 | |
| 2319 | /* MC_CMD_POLL_BIST_OUT_MEM msgresponse */ |
| 2320 | #define MC_CMD_POLL_BIST_OUT_MEM_LEN 36 |
| 2321 | /* result */ |
| 2322 | /* MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */ |
| 2323 | /* Enum values, see field(s): */ |
| 2324 | /* MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */ |
| 2325 | #define MC_CMD_POLL_BIST_OUT_MEM_TEST_OFST 4 |
| 2326 | /* enum: Test has completed. */ |
| 2327 | #define MC_CMD_POLL_BIST_MEM_COMPLETE 0x0 |
| 2328 | /* enum: RAM test - walk ones. */ |
| 2329 | #define MC_CMD_POLL_BIST_MEM_MEM_WALK_ONES 0x1 |
| 2330 | /* enum: RAM test - walk zeros. */ |
| 2331 | #define MC_CMD_POLL_BIST_MEM_MEM_WALK_ZEROS 0x2 |
| 2332 | /* enum: RAM test - walking inversions zeros/ones. */ |
| 2333 | #define MC_CMD_POLL_BIST_MEM_MEM_INV_ZERO_ONE 0x3 |
| 2334 | /* enum: RAM test - walking inversions checkerboard. */ |
| 2335 | #define MC_CMD_POLL_BIST_MEM_MEM_INV_CHKBOARD 0x4 |
| 2336 | /* enum: Register test - set / clear individual bits. */ |
| 2337 | #define MC_CMD_POLL_BIST_MEM_REG 0x5 |
| 2338 | /* enum: ECC error detected. */ |
| 2339 | #define MC_CMD_POLL_BIST_MEM_ECC 0x6 |
| 2340 | /* Failure address, only valid if result is POLL_BIST_FAILED */ |
| 2341 | #define MC_CMD_POLL_BIST_OUT_MEM_ADDR_OFST 8 |
| 2342 | /* Bus or address space to which the failure address corresponds */ |
| 2343 | #define MC_CMD_POLL_BIST_OUT_MEM_BUS_OFST 12 |
| 2344 | /* enum: MC MIPS bus. */ |
| 2345 | #define MC_CMD_POLL_BIST_MEM_BUS_MC 0x0 |
| 2346 | /* enum: CSR IREG bus. */ |
| 2347 | #define MC_CMD_POLL_BIST_MEM_BUS_CSR 0x1 |
| 2348 | /* enum: RX DPCPU bus. */ |
| 2349 | #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX 0x2 |
| 2350 | /* enum: TX0 DPCPU bus. */ |
| 2351 | #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX0 0x3 |
| 2352 | /* enum: TX1 DPCPU bus. */ |
| 2353 | #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX1 0x4 |
| 2354 | /* enum: RX DICPU bus. */ |
| 2355 | #define MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX 0x5 |
| 2356 | /* enum: TX DICPU bus. */ |
| 2357 | #define MC_CMD_POLL_BIST_MEM_BUS_DICPU_TX 0x6 |
| 2358 | /* Pattern written to RAM / register */ |
| 2359 | #define MC_CMD_POLL_BIST_OUT_MEM_EXPECT_OFST 16 |
| 2360 | /* Actual value read from RAM / register */ |
| 2361 | #define MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_OFST 20 |
| 2362 | /* ECC error mask */ |
| 2363 | #define MC_CMD_POLL_BIST_OUT_MEM_ECC_OFST 24 |
| 2364 | /* ECC parity error mask */ |
| 2365 | #define MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_OFST 28 |
| 2366 | /* ECC fatal error mask */ |
| 2367 | #define MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_OFST 32 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2368 | |
| 2369 | |
| 2370 | /***********************************/ |
| 2371 | /* MC_CMD_FLUSH_RX_QUEUES |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2372 | * Flush receive queue(s). If SRIOV is enabled (via MC_CMD_SRIOV), then RXQ |
| 2373 | * flushes should be initiated via this MCDI operation, rather than via |
| 2374 | * directly writing FLUSH_CMD. |
| 2375 | * |
| 2376 | * The flush is completed (either done/fail) asynchronously (after this command |
| 2377 | * returns). The driver must still wait for flush done/failure events as usual. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2378 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2379 | #define MC_CMD_FLUSH_RX_QUEUES 0x27 |
| 2380 | |
| 2381 | /* MC_CMD_FLUSH_RX_QUEUES_IN msgrequest */ |
| 2382 | #define MC_CMD_FLUSH_RX_QUEUES_IN_LENMIN 4 |
| 2383 | #define MC_CMD_FLUSH_RX_QUEUES_IN_LENMAX 252 |
| 2384 | #define MC_CMD_FLUSH_RX_QUEUES_IN_LEN(num) (0+4*(num)) |
| 2385 | #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_OFST 0 |
| 2386 | #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_LEN 4 |
| 2387 | #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MINNUM 1 |
| 2388 | #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM 63 |
| 2389 | |
| 2390 | /* MC_CMD_FLUSH_RX_QUEUES_OUT msgresponse */ |
| 2391 | #define MC_CMD_FLUSH_RX_QUEUES_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2392 | |
| 2393 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2394 | /***********************************/ |
| 2395 | /* MC_CMD_GET_LOOPBACK_MODES |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2396 | * Returns a bitmask of loopback modes available at each speed. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2397 | */ |
| 2398 | #define MC_CMD_GET_LOOPBACK_MODES 0x28 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2399 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2400 | #define MC_CMD_0x28_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 2401 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2402 | /* MC_CMD_GET_LOOPBACK_MODES_IN msgrequest */ |
| 2403 | #define MC_CMD_GET_LOOPBACK_MODES_IN_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2404 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2405 | /* MC_CMD_GET_LOOPBACK_MODES_OUT msgresponse */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2406 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_LEN 40 |
| 2407 | /* Supported loopbacks. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2408 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_OFST 0 |
| 2409 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LEN 8 |
| 2410 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LO_OFST 0 |
| 2411 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_HI_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2412 | /* enum: None. */ |
| 2413 | #define MC_CMD_LOOPBACK_NONE 0x0 |
| 2414 | /* enum: Data. */ |
| 2415 | #define MC_CMD_LOOPBACK_DATA 0x1 |
| 2416 | /* enum: GMAC. */ |
| 2417 | #define MC_CMD_LOOPBACK_GMAC 0x2 |
| 2418 | /* enum: XGMII. */ |
| 2419 | #define MC_CMD_LOOPBACK_XGMII 0x3 |
| 2420 | /* enum: XGXS. */ |
| 2421 | #define MC_CMD_LOOPBACK_XGXS 0x4 |
| 2422 | /* enum: XAUI. */ |
| 2423 | #define MC_CMD_LOOPBACK_XAUI 0x5 |
| 2424 | /* enum: GMII. */ |
| 2425 | #define MC_CMD_LOOPBACK_GMII 0x6 |
| 2426 | /* enum: SGMII. */ |
| 2427 | #define MC_CMD_LOOPBACK_SGMII 0x7 |
| 2428 | /* enum: XGBR. */ |
| 2429 | #define MC_CMD_LOOPBACK_XGBR 0x8 |
| 2430 | /* enum: XFI. */ |
| 2431 | #define MC_CMD_LOOPBACK_XFI 0x9 |
| 2432 | /* enum: XAUI Far. */ |
| 2433 | #define MC_CMD_LOOPBACK_XAUI_FAR 0xa |
| 2434 | /* enum: GMII Far. */ |
| 2435 | #define MC_CMD_LOOPBACK_GMII_FAR 0xb |
| 2436 | /* enum: SGMII Far. */ |
| 2437 | #define MC_CMD_LOOPBACK_SGMII_FAR 0xc |
| 2438 | /* enum: XFI Far. */ |
| 2439 | #define MC_CMD_LOOPBACK_XFI_FAR 0xd |
| 2440 | /* enum: GPhy. */ |
| 2441 | #define MC_CMD_LOOPBACK_GPHY 0xe |
| 2442 | /* enum: PhyXS. */ |
| 2443 | #define MC_CMD_LOOPBACK_PHYXS 0xf |
| 2444 | /* enum: PCS. */ |
| 2445 | #define MC_CMD_LOOPBACK_PCS 0x10 |
| 2446 | /* enum: PMA-PMD. */ |
| 2447 | #define MC_CMD_LOOPBACK_PMAPMD 0x11 |
| 2448 | /* enum: Cross-Port. */ |
| 2449 | #define MC_CMD_LOOPBACK_XPORT 0x12 |
| 2450 | /* enum: XGMII-Wireside. */ |
| 2451 | #define MC_CMD_LOOPBACK_XGMII_WS 0x13 |
| 2452 | /* enum: XAUI Wireside. */ |
| 2453 | #define MC_CMD_LOOPBACK_XAUI_WS 0x14 |
| 2454 | /* enum: XAUI Wireside Far. */ |
| 2455 | #define MC_CMD_LOOPBACK_XAUI_WS_FAR 0x15 |
| 2456 | /* enum: XAUI Wireside near. */ |
| 2457 | #define MC_CMD_LOOPBACK_XAUI_WS_NEAR 0x16 |
| 2458 | /* enum: GMII Wireside. */ |
| 2459 | #define MC_CMD_LOOPBACK_GMII_WS 0x17 |
| 2460 | /* enum: XFI Wireside. */ |
| 2461 | #define MC_CMD_LOOPBACK_XFI_WS 0x18 |
| 2462 | /* enum: XFI Wireside Far. */ |
| 2463 | #define MC_CMD_LOOPBACK_XFI_WS_FAR 0x19 |
| 2464 | /* enum: PhyXS Wireside. */ |
| 2465 | #define MC_CMD_LOOPBACK_PHYXS_WS 0x1a |
| 2466 | /* enum: PMA lanes MAC-Serdes. */ |
| 2467 | #define MC_CMD_LOOPBACK_PMA_INT 0x1b |
| 2468 | /* enum: KR Serdes Parallel (Encoder). */ |
| 2469 | #define MC_CMD_LOOPBACK_SD_NEAR 0x1c |
| 2470 | /* enum: KR Serdes Serial. */ |
| 2471 | #define MC_CMD_LOOPBACK_SD_FAR 0x1d |
| 2472 | /* enum: PMA lanes MAC-Serdes Wireside. */ |
| 2473 | #define MC_CMD_LOOPBACK_PMA_INT_WS 0x1e |
| 2474 | /* enum: KR Serdes Parallel Wireside (Full PCS). */ |
| 2475 | #define MC_CMD_LOOPBACK_SD_FEP2_WS 0x1f |
| 2476 | /* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */ |
| 2477 | #define MC_CMD_LOOPBACK_SD_FEP1_5_WS 0x20 |
| 2478 | /* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */ |
| 2479 | #define MC_CMD_LOOPBACK_SD_FEP_WS 0x21 |
| 2480 | /* enum: KR Serdes Serial Wireside. */ |
| 2481 | #define MC_CMD_LOOPBACK_SD_FES_WS 0x22 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 2482 | /* enum: Near side of AOE Siena side port */ |
| 2483 | #define MC_CMD_LOOPBACK_AOE_INT_NEAR 0x23 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2484 | /* Supported loopbacks. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2485 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_OFST 8 |
| 2486 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LEN 8 |
| 2487 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LO_OFST 8 |
| 2488 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_HI_OFST 12 |
| 2489 | /* Enum values, see field(s): */ |
| 2490 | /* 100M */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2491 | /* Supported loopbacks. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2492 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_OFST 16 |
| 2493 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LEN 8 |
| 2494 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LO_OFST 16 |
| 2495 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_HI_OFST 20 |
| 2496 | /* Enum values, see field(s): */ |
| 2497 | /* 100M */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2498 | /* Supported loopbacks. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2499 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_OFST 24 |
| 2500 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LEN 8 |
| 2501 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LO_OFST 24 |
| 2502 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_HI_OFST 28 |
| 2503 | /* Enum values, see field(s): */ |
| 2504 | /* 100M */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2505 | /* Supported loopbacks. */ |
| 2506 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_OFST 32 |
| 2507 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LEN 8 |
| 2508 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LO_OFST 32 |
| 2509 | #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_HI_OFST 36 |
| 2510 | /* Enum values, see field(s): */ |
| 2511 | /* 100M */ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2512 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2513 | |
| 2514 | /***********************************/ |
| 2515 | /* MC_CMD_GET_LINK |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2516 | * Read the unified MAC/PHY link state. Locks required: None Return code: 0, |
| 2517 | * ETIME. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2518 | */ |
| 2519 | #define MC_CMD_GET_LINK 0x29 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2520 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2521 | #define MC_CMD_0x29_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 2522 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2523 | /* MC_CMD_GET_LINK_IN msgrequest */ |
| 2524 | #define MC_CMD_GET_LINK_IN_LEN 0 |
| 2525 | |
| 2526 | /* MC_CMD_GET_LINK_OUT msgresponse */ |
| 2527 | #define MC_CMD_GET_LINK_OUT_LEN 28 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2528 | /* near-side advertised capabilities */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2529 | #define MC_CMD_GET_LINK_OUT_CAP_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2530 | /* link-partner advertised capabilities */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2531 | #define MC_CMD_GET_LINK_OUT_LP_CAP_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2532 | /* Autonegotiated speed in mbit/s. The link may still be down even if this |
| 2533 | * reads non-zero. |
| 2534 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2535 | #define MC_CMD_GET_LINK_OUT_LINK_SPEED_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2536 | /* Current loopback setting. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2537 | #define MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_OFST 12 |
| 2538 | /* Enum values, see field(s): */ |
| 2539 | /* MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */ |
| 2540 | #define MC_CMD_GET_LINK_OUT_FLAGS_OFST 16 |
| 2541 | #define MC_CMD_GET_LINK_OUT_LINK_UP_LBN 0 |
| 2542 | #define MC_CMD_GET_LINK_OUT_LINK_UP_WIDTH 1 |
| 2543 | #define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_LBN 1 |
| 2544 | #define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_WIDTH 1 |
| 2545 | #define MC_CMD_GET_LINK_OUT_BPX_LINK_LBN 2 |
| 2546 | #define MC_CMD_GET_LINK_OUT_BPX_LINK_WIDTH 1 |
| 2547 | #define MC_CMD_GET_LINK_OUT_PHY_LINK_LBN 3 |
| 2548 | #define MC_CMD_GET_LINK_OUT_PHY_LINK_WIDTH 1 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 2549 | #define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_LBN 6 |
| 2550 | #define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_WIDTH 1 |
| 2551 | #define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_LBN 7 |
| 2552 | #define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2553 | /* This returns the negotiated flow control value. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2554 | #define MC_CMD_GET_LINK_OUT_FCNTL_OFST 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2555 | /* enum: Flow control is off. */ |
| 2556 | #define MC_CMD_FCNTL_OFF 0x0 |
| 2557 | /* enum: Respond to flow control. */ |
| 2558 | #define MC_CMD_FCNTL_RESPOND 0x1 |
| 2559 | /* enum: Respond to and Issue flow control. */ |
| 2560 | #define MC_CMD_FCNTL_BIDIR 0x2 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2561 | #define MC_CMD_GET_LINK_OUT_MAC_FAULT_OFST 24 |
| 2562 | #define MC_CMD_MAC_FAULT_XGMII_LOCAL_LBN 0 |
| 2563 | #define MC_CMD_MAC_FAULT_XGMII_LOCAL_WIDTH 1 |
| 2564 | #define MC_CMD_MAC_FAULT_XGMII_REMOTE_LBN 1 |
| 2565 | #define MC_CMD_MAC_FAULT_XGMII_REMOTE_WIDTH 1 |
| 2566 | #define MC_CMD_MAC_FAULT_SGMII_REMOTE_LBN 2 |
| 2567 | #define MC_CMD_MAC_FAULT_SGMII_REMOTE_WIDTH 1 |
| 2568 | #define MC_CMD_MAC_FAULT_PENDING_RECONFIG_LBN 3 |
| 2569 | #define MC_CMD_MAC_FAULT_PENDING_RECONFIG_WIDTH 1 |
| 2570 | |
| 2571 | |
| 2572 | /***********************************/ |
| 2573 | /* MC_CMD_SET_LINK |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2574 | * Write the unified MAC/PHY link configuration. Locks required: None. Return |
| 2575 | * code: 0, EINVAL, ETIME |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2576 | */ |
| 2577 | #define MC_CMD_SET_LINK 0x2a |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2578 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2579 | #define MC_CMD_0x2a_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 2580 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2581 | /* MC_CMD_SET_LINK_IN msgrequest */ |
| 2582 | #define MC_CMD_SET_LINK_IN_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2583 | /* ??? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2584 | #define MC_CMD_SET_LINK_IN_CAP_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2585 | /* Flags */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2586 | #define MC_CMD_SET_LINK_IN_FLAGS_OFST 4 |
| 2587 | #define MC_CMD_SET_LINK_IN_LOWPOWER_LBN 0 |
| 2588 | #define MC_CMD_SET_LINK_IN_LOWPOWER_WIDTH 1 |
| 2589 | #define MC_CMD_SET_LINK_IN_POWEROFF_LBN 1 |
| 2590 | #define MC_CMD_SET_LINK_IN_POWEROFF_WIDTH 1 |
| 2591 | #define MC_CMD_SET_LINK_IN_TXDIS_LBN 2 |
| 2592 | #define MC_CMD_SET_LINK_IN_TXDIS_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2593 | /* Loopback mode. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2594 | #define MC_CMD_SET_LINK_IN_LOOPBACK_MODE_OFST 8 |
| 2595 | /* Enum values, see field(s): */ |
| 2596 | /* MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2597 | /* A loopback speed of "0" is supported, and means (choose any available |
| 2598 | * speed). |
| 2599 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2600 | #define MC_CMD_SET_LINK_IN_LOOPBACK_SPEED_OFST 12 |
| 2601 | |
| 2602 | /* MC_CMD_SET_LINK_OUT msgresponse */ |
| 2603 | #define MC_CMD_SET_LINK_OUT_LEN 0 |
| 2604 | |
| 2605 | |
| 2606 | /***********************************/ |
| 2607 | /* MC_CMD_SET_ID_LED |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2608 | * Set identification LED state. Locks required: None. Return code: 0, EINVAL |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2609 | */ |
| 2610 | #define MC_CMD_SET_ID_LED 0x2b |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2611 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2612 | #define MC_CMD_0x2b_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 2613 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2614 | /* MC_CMD_SET_ID_LED_IN msgrequest */ |
| 2615 | #define MC_CMD_SET_ID_LED_IN_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2616 | /* Set LED state. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2617 | #define MC_CMD_SET_ID_LED_IN_STATE_OFST 0 |
| 2618 | #define MC_CMD_LED_OFF 0x0 /* enum */ |
| 2619 | #define MC_CMD_LED_ON 0x1 /* enum */ |
| 2620 | #define MC_CMD_LED_DEFAULT 0x2 /* enum */ |
| 2621 | |
| 2622 | /* MC_CMD_SET_ID_LED_OUT msgresponse */ |
| 2623 | #define MC_CMD_SET_ID_LED_OUT_LEN 0 |
| 2624 | |
| 2625 | |
| 2626 | /***********************************/ |
| 2627 | /* MC_CMD_SET_MAC |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2628 | * Set MAC configuration. Locks required: None. Return code: 0, EINVAL |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2629 | */ |
| 2630 | #define MC_CMD_SET_MAC 0x2c |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2631 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2632 | #define MC_CMD_0x2c_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 2633 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2634 | /* MC_CMD_SET_MAC_IN msgrequest */ |
| 2635 | #define MC_CMD_SET_MAC_IN_LEN 24 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2636 | /* The MTU is the MTU programmed directly into the XMAC/GMAC (inclusive of |
| 2637 | * EtherII, VLAN, bug16011 padding). |
| 2638 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2639 | #define MC_CMD_SET_MAC_IN_MTU_OFST 0 |
| 2640 | #define MC_CMD_SET_MAC_IN_DRAIN_OFST 4 |
| 2641 | #define MC_CMD_SET_MAC_IN_ADDR_OFST 8 |
| 2642 | #define MC_CMD_SET_MAC_IN_ADDR_LEN 8 |
| 2643 | #define MC_CMD_SET_MAC_IN_ADDR_LO_OFST 8 |
| 2644 | #define MC_CMD_SET_MAC_IN_ADDR_HI_OFST 12 |
| 2645 | #define MC_CMD_SET_MAC_IN_REJECT_OFST 16 |
| 2646 | #define MC_CMD_SET_MAC_IN_REJECT_UNCST_LBN 0 |
| 2647 | #define MC_CMD_SET_MAC_IN_REJECT_UNCST_WIDTH 1 |
| 2648 | #define MC_CMD_SET_MAC_IN_REJECT_BRDCST_LBN 1 |
| 2649 | #define MC_CMD_SET_MAC_IN_REJECT_BRDCST_WIDTH 1 |
| 2650 | #define MC_CMD_SET_MAC_IN_FCNTL_OFST 20 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2651 | /* enum: Flow control is off. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2652 | /* MC_CMD_FCNTL_OFF 0x0 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2653 | /* enum: Respond to flow control. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2654 | /* MC_CMD_FCNTL_RESPOND 0x1 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2655 | /* enum: Respond to and Issue flow control. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2656 | /* MC_CMD_FCNTL_BIDIR 0x2 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2657 | /* enum: Auto neg flow control. */ |
| 2658 | #define MC_CMD_FCNTL_AUTO 0x3 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2659 | |
| 2660 | /* MC_CMD_SET_MAC_OUT msgresponse */ |
| 2661 | #define MC_CMD_SET_MAC_OUT_LEN 0 |
| 2662 | |
| 2663 | |
| 2664 | /***********************************/ |
| 2665 | /* MC_CMD_PHY_STATS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2666 | * Get generic PHY statistics. This call returns the statistics for a generic |
| 2667 | * PHY in a sparse array (indexed by the enumerate). Each value is represented |
| 2668 | * by a 32bit number. If the DMA_ADDR is 0, then no DMA is performed, and the |
| 2669 | * statistics may be read from the message response. If DMA_ADDR != 0, then the |
| 2670 | * statistics are dmad to that (page-aligned location). Locks required: None. |
| 2671 | * Returns: 0, ETIME |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2672 | */ |
| 2673 | #define MC_CMD_PHY_STATS 0x2d |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2674 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2675 | #define MC_CMD_0x2d_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 2676 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2677 | /* MC_CMD_PHY_STATS_IN msgrequest */ |
| 2678 | #define MC_CMD_PHY_STATS_IN_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2679 | /* ??? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2680 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_OFST 0 |
| 2681 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_LEN 8 |
| 2682 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_LO_OFST 0 |
| 2683 | #define MC_CMD_PHY_STATS_IN_DMA_ADDR_HI_OFST 4 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2684 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2685 | /* MC_CMD_PHY_STATS_OUT_DMA msgresponse */ |
| 2686 | #define MC_CMD_PHY_STATS_OUT_DMA_LEN 0 |
| 2687 | |
| 2688 | /* MC_CMD_PHY_STATS_OUT_NO_DMA msgresponse */ |
| 2689 | #define MC_CMD_PHY_STATS_OUT_NO_DMA_LEN (((MC_CMD_PHY_NSTATS*32))>>3) |
| 2690 | #define MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_OFST 0 |
| 2691 | #define MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_LEN 4 |
| 2692 | #define MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_NUM MC_CMD_PHY_NSTATS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2693 | /* enum: OUI. */ |
| 2694 | #define MC_CMD_OUI 0x0 |
| 2695 | /* enum: PMA-PMD Link Up. */ |
| 2696 | #define MC_CMD_PMA_PMD_LINK_UP 0x1 |
| 2697 | /* enum: PMA-PMD RX Fault. */ |
| 2698 | #define MC_CMD_PMA_PMD_RX_FAULT 0x2 |
| 2699 | /* enum: PMA-PMD TX Fault. */ |
| 2700 | #define MC_CMD_PMA_PMD_TX_FAULT 0x3 |
| 2701 | /* enum: PMA-PMD Signal */ |
| 2702 | #define MC_CMD_PMA_PMD_SIGNAL 0x4 |
| 2703 | /* enum: PMA-PMD SNR A. */ |
| 2704 | #define MC_CMD_PMA_PMD_SNR_A 0x5 |
| 2705 | /* enum: PMA-PMD SNR B. */ |
| 2706 | #define MC_CMD_PMA_PMD_SNR_B 0x6 |
| 2707 | /* enum: PMA-PMD SNR C. */ |
| 2708 | #define MC_CMD_PMA_PMD_SNR_C 0x7 |
| 2709 | /* enum: PMA-PMD SNR D. */ |
| 2710 | #define MC_CMD_PMA_PMD_SNR_D 0x8 |
| 2711 | /* enum: PCS Link Up. */ |
| 2712 | #define MC_CMD_PCS_LINK_UP 0x9 |
| 2713 | /* enum: PCS RX Fault. */ |
| 2714 | #define MC_CMD_PCS_RX_FAULT 0xa |
| 2715 | /* enum: PCS TX Fault. */ |
| 2716 | #define MC_CMD_PCS_TX_FAULT 0xb |
| 2717 | /* enum: PCS BER. */ |
| 2718 | #define MC_CMD_PCS_BER 0xc |
| 2719 | /* enum: PCS Block Errors. */ |
| 2720 | #define MC_CMD_PCS_BLOCK_ERRORS 0xd |
| 2721 | /* enum: PhyXS Link Up. */ |
| 2722 | #define MC_CMD_PHYXS_LINK_UP 0xe |
| 2723 | /* enum: PhyXS RX Fault. */ |
| 2724 | #define MC_CMD_PHYXS_RX_FAULT 0xf |
| 2725 | /* enum: PhyXS TX Fault. */ |
| 2726 | #define MC_CMD_PHYXS_TX_FAULT 0x10 |
| 2727 | /* enum: PhyXS Align. */ |
| 2728 | #define MC_CMD_PHYXS_ALIGN 0x11 |
| 2729 | /* enum: PhyXS Sync. */ |
| 2730 | #define MC_CMD_PHYXS_SYNC 0x12 |
| 2731 | /* enum: AN link-up. */ |
| 2732 | #define MC_CMD_AN_LINK_UP 0x13 |
| 2733 | /* enum: AN Complete. */ |
| 2734 | #define MC_CMD_AN_COMPLETE 0x14 |
| 2735 | /* enum: AN 10GBaseT Status. */ |
| 2736 | #define MC_CMD_AN_10GBT_STATUS 0x15 |
| 2737 | /* enum: Clause 22 Link-Up. */ |
| 2738 | #define MC_CMD_CL22_LINK_UP 0x16 |
| 2739 | /* enum: (Last entry) */ |
| 2740 | #define MC_CMD_PHY_NSTATS 0x17 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2741 | |
| 2742 | |
| 2743 | /***********************************/ |
| 2744 | /* MC_CMD_MAC_STATS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2745 | * Get generic MAC statistics. This call returns unified statistics maintained |
| 2746 | * by the MC as it switches between the GMAC and XMAC. The MC will write out |
| 2747 | * all supported stats. The driver should zero initialise the buffer to |
| 2748 | * guarantee consistent results. If the DMA_ADDR is 0, then no DMA is |
| 2749 | * performed, and the statistics may be read from the message response. If |
| 2750 | * DMA_ADDR != 0, then the statistics are dmad to that (page-aligned location). |
| 2751 | * Locks required: None. Returns: 0, ETIME |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2752 | */ |
| 2753 | #define MC_CMD_MAC_STATS 0x2e |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2754 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 2755 | #define MC_CMD_0x2e_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 2756 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2757 | /* MC_CMD_MAC_STATS_IN msgrequest */ |
| 2758 | #define MC_CMD_MAC_STATS_IN_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2759 | /* ??? */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2760 | #define MC_CMD_MAC_STATS_IN_DMA_ADDR_OFST 0 |
| 2761 | #define MC_CMD_MAC_STATS_IN_DMA_ADDR_LEN 8 |
| 2762 | #define MC_CMD_MAC_STATS_IN_DMA_ADDR_LO_OFST 0 |
| 2763 | #define MC_CMD_MAC_STATS_IN_DMA_ADDR_HI_OFST 4 |
| 2764 | #define MC_CMD_MAC_STATS_IN_CMD_OFST 8 |
| 2765 | #define MC_CMD_MAC_STATS_IN_DMA_LBN 0 |
| 2766 | #define MC_CMD_MAC_STATS_IN_DMA_WIDTH 1 |
| 2767 | #define MC_CMD_MAC_STATS_IN_CLEAR_LBN 1 |
| 2768 | #define MC_CMD_MAC_STATS_IN_CLEAR_WIDTH 1 |
| 2769 | #define MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_LBN 2 |
| 2770 | #define MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_WIDTH 1 |
| 2771 | #define MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_LBN 3 |
| 2772 | #define MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_WIDTH 1 |
| 2773 | #define MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_LBN 4 |
| 2774 | #define MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_WIDTH 1 |
| 2775 | #define MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_LBN 5 |
| 2776 | #define MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_WIDTH 1 |
| 2777 | #define MC_CMD_MAC_STATS_IN_PERIOD_MS_LBN 16 |
| 2778 | #define MC_CMD_MAC_STATS_IN_PERIOD_MS_WIDTH 16 |
| 2779 | #define MC_CMD_MAC_STATS_IN_DMA_LEN_OFST 12 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2780 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2781 | /* MC_CMD_MAC_STATS_OUT_DMA msgresponse */ |
| 2782 | #define MC_CMD_MAC_STATS_OUT_DMA_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2783 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2784 | /* MC_CMD_MAC_STATS_OUT_NO_DMA msgresponse */ |
| 2785 | #define MC_CMD_MAC_STATS_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS*64))>>3) |
| 2786 | #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_OFST 0 |
| 2787 | #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_LEN 8 |
| 2788 | #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_LO_OFST 0 |
| 2789 | #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_HI_OFST 4 |
| 2790 | #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS |
| 2791 | #define MC_CMD_MAC_GENERATION_START 0x0 /* enum */ |
| 2792 | #define MC_CMD_MAC_TX_PKTS 0x1 /* enum */ |
| 2793 | #define MC_CMD_MAC_TX_PAUSE_PKTS 0x2 /* enum */ |
| 2794 | #define MC_CMD_MAC_TX_CONTROL_PKTS 0x3 /* enum */ |
| 2795 | #define MC_CMD_MAC_TX_UNICAST_PKTS 0x4 /* enum */ |
| 2796 | #define MC_CMD_MAC_TX_MULTICAST_PKTS 0x5 /* enum */ |
| 2797 | #define MC_CMD_MAC_TX_BROADCAST_PKTS 0x6 /* enum */ |
| 2798 | #define MC_CMD_MAC_TX_BYTES 0x7 /* enum */ |
| 2799 | #define MC_CMD_MAC_TX_BAD_BYTES 0x8 /* enum */ |
| 2800 | #define MC_CMD_MAC_TX_LT64_PKTS 0x9 /* enum */ |
| 2801 | #define MC_CMD_MAC_TX_64_PKTS 0xa /* enum */ |
| 2802 | #define MC_CMD_MAC_TX_65_TO_127_PKTS 0xb /* enum */ |
| 2803 | #define MC_CMD_MAC_TX_128_TO_255_PKTS 0xc /* enum */ |
| 2804 | #define MC_CMD_MAC_TX_256_TO_511_PKTS 0xd /* enum */ |
| 2805 | #define MC_CMD_MAC_TX_512_TO_1023_PKTS 0xe /* enum */ |
| 2806 | #define MC_CMD_MAC_TX_1024_TO_15XX_PKTS 0xf /* enum */ |
| 2807 | #define MC_CMD_MAC_TX_15XX_TO_JUMBO_PKTS 0x10 /* enum */ |
| 2808 | #define MC_CMD_MAC_TX_GTJUMBO_PKTS 0x11 /* enum */ |
| 2809 | #define MC_CMD_MAC_TX_BAD_FCS_PKTS 0x12 /* enum */ |
| 2810 | #define MC_CMD_MAC_TX_SINGLE_COLLISION_PKTS 0x13 /* enum */ |
| 2811 | #define MC_CMD_MAC_TX_MULTIPLE_COLLISION_PKTS 0x14 /* enum */ |
| 2812 | #define MC_CMD_MAC_TX_EXCESSIVE_COLLISION_PKTS 0x15 /* enum */ |
| 2813 | #define MC_CMD_MAC_TX_LATE_COLLISION_PKTS 0x16 /* enum */ |
| 2814 | #define MC_CMD_MAC_TX_DEFERRED_PKTS 0x17 /* enum */ |
| 2815 | #define MC_CMD_MAC_TX_EXCESSIVE_DEFERRED_PKTS 0x18 /* enum */ |
| 2816 | #define MC_CMD_MAC_TX_NON_TCPUDP_PKTS 0x19 /* enum */ |
| 2817 | #define MC_CMD_MAC_TX_MAC_SRC_ERR_PKTS 0x1a /* enum */ |
| 2818 | #define MC_CMD_MAC_TX_IP_SRC_ERR_PKTS 0x1b /* enum */ |
| 2819 | #define MC_CMD_MAC_RX_PKTS 0x1c /* enum */ |
| 2820 | #define MC_CMD_MAC_RX_PAUSE_PKTS 0x1d /* enum */ |
| 2821 | #define MC_CMD_MAC_RX_GOOD_PKTS 0x1e /* enum */ |
| 2822 | #define MC_CMD_MAC_RX_CONTROL_PKTS 0x1f /* enum */ |
| 2823 | #define MC_CMD_MAC_RX_UNICAST_PKTS 0x20 /* enum */ |
| 2824 | #define MC_CMD_MAC_RX_MULTICAST_PKTS 0x21 /* enum */ |
| 2825 | #define MC_CMD_MAC_RX_BROADCAST_PKTS 0x22 /* enum */ |
| 2826 | #define MC_CMD_MAC_RX_BYTES 0x23 /* enum */ |
| 2827 | #define MC_CMD_MAC_RX_BAD_BYTES 0x24 /* enum */ |
| 2828 | #define MC_CMD_MAC_RX_64_PKTS 0x25 /* enum */ |
| 2829 | #define MC_CMD_MAC_RX_65_TO_127_PKTS 0x26 /* enum */ |
| 2830 | #define MC_CMD_MAC_RX_128_TO_255_PKTS 0x27 /* enum */ |
| 2831 | #define MC_CMD_MAC_RX_256_TO_511_PKTS 0x28 /* enum */ |
| 2832 | #define MC_CMD_MAC_RX_512_TO_1023_PKTS 0x29 /* enum */ |
| 2833 | #define MC_CMD_MAC_RX_1024_TO_15XX_PKTS 0x2a /* enum */ |
| 2834 | #define MC_CMD_MAC_RX_15XX_TO_JUMBO_PKTS 0x2b /* enum */ |
| 2835 | #define MC_CMD_MAC_RX_GTJUMBO_PKTS 0x2c /* enum */ |
| 2836 | #define MC_CMD_MAC_RX_UNDERSIZE_PKTS 0x2d /* enum */ |
| 2837 | #define MC_CMD_MAC_RX_BAD_FCS_PKTS 0x2e /* enum */ |
| 2838 | #define MC_CMD_MAC_RX_OVERFLOW_PKTS 0x2f /* enum */ |
| 2839 | #define MC_CMD_MAC_RX_FALSE_CARRIER_PKTS 0x30 /* enum */ |
| 2840 | #define MC_CMD_MAC_RX_SYMBOL_ERROR_PKTS 0x31 /* enum */ |
| 2841 | #define MC_CMD_MAC_RX_ALIGN_ERROR_PKTS 0x32 /* enum */ |
| 2842 | #define MC_CMD_MAC_RX_LENGTH_ERROR_PKTS 0x33 /* enum */ |
| 2843 | #define MC_CMD_MAC_RX_INTERNAL_ERROR_PKTS 0x34 /* enum */ |
| 2844 | #define MC_CMD_MAC_RX_JABBER_PKTS 0x35 /* enum */ |
| 2845 | #define MC_CMD_MAC_RX_NODESC_DROPS 0x36 /* enum */ |
| 2846 | #define MC_CMD_MAC_RX_LANES01_CHAR_ERR 0x37 /* enum */ |
| 2847 | #define MC_CMD_MAC_RX_LANES23_CHAR_ERR 0x38 /* enum */ |
| 2848 | #define MC_CMD_MAC_RX_LANES01_DISP_ERR 0x39 /* enum */ |
| 2849 | #define MC_CMD_MAC_RX_LANES23_DISP_ERR 0x3a /* enum */ |
| 2850 | #define MC_CMD_MAC_RX_MATCH_FAULT 0x3b /* enum */ |
Matthew Slattery | 2ca10a7 | 2013-09-10 19:06:27 +0100 | [diff] [blame] | 2851 | /* enum: PM trunc_bb_overflow counter. Valid for EF10 with PM_AND_RXDP_COUNTERS |
| 2852 | * capability only. |
| 2853 | */ |
| 2854 | #define MC_CMD_MAC_PM_TRUNC_BB_OVERFLOW 0x3c |
| 2855 | /* enum: PM discard_bb_overflow counter. Valid for EF10 with |
| 2856 | * PM_AND_RXDP_COUNTERS capability only. |
| 2857 | */ |
| 2858 | #define MC_CMD_MAC_PM_DISCARD_BB_OVERFLOW 0x3d |
| 2859 | /* enum: PM trunc_vfifo_full counter. Valid for EF10 with PM_AND_RXDP_COUNTERS |
| 2860 | * capability only. |
| 2861 | */ |
| 2862 | #define MC_CMD_MAC_PM_TRUNC_VFIFO_FULL 0x3e |
| 2863 | /* enum: PM discard_vfifo_full counter. Valid for EF10 with |
| 2864 | * PM_AND_RXDP_COUNTERS capability only. |
| 2865 | */ |
| 2866 | #define MC_CMD_MAC_PM_DISCARD_VFIFO_FULL 0x3f |
| 2867 | /* enum: PM trunc_qbb counter. Valid for EF10 with PM_AND_RXDP_COUNTERS |
| 2868 | * capability only. |
| 2869 | */ |
| 2870 | #define MC_CMD_MAC_PM_TRUNC_QBB 0x40 |
| 2871 | /* enum: PM discard_qbb counter. Valid for EF10 with PM_AND_RXDP_COUNTERS |
| 2872 | * capability only. |
| 2873 | */ |
| 2874 | #define MC_CMD_MAC_PM_DISCARD_QBB 0x41 |
| 2875 | /* enum: PM discard_mapping counter. Valid for EF10 with PM_AND_RXDP_COUNTERS |
| 2876 | * capability only. |
| 2877 | */ |
| 2878 | #define MC_CMD_MAC_PM_DISCARD_MAPPING 0x42 |
| 2879 | /* enum: RXDP counter: Number of packets dropped due to the queue being |
| 2880 | * disabled. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only. |
| 2881 | */ |
| 2882 | #define MC_CMD_MAC_RXDP_Q_DISABLED_PKTS 0x43 |
| 2883 | /* enum: RXDP counter: Number of packets dropped by the DICPU. Valid for EF10 |
| 2884 | * with PM_AND_RXDP_COUNTERS capability only. |
| 2885 | */ |
| 2886 | #define MC_CMD_MAC_RXDP_DI_DROPPED_PKTS 0x45 |
| 2887 | /* enum: RXDP counter: Number of non-host packets. Valid for EF10 with |
| 2888 | * PM_AND_RXDP_COUNTERS capability only. |
| 2889 | */ |
| 2890 | #define MC_CMD_MAC_RXDP_STREAMING_PKTS 0x46 |
| 2891 | /* enum: RXDP counter: Number of times an emergency descriptor fetch was |
| 2892 | * performed. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only. |
| 2893 | */ |
Daniel Pieczko | e80ca013 | 2015-06-02 11:38:34 +0100 | [diff] [blame] | 2894 | #define MC_CMD_MAC_RXDP_HLB_FETCH_CONDITIONS 0x47 |
Matthew Slattery | 2ca10a7 | 2013-09-10 19:06:27 +0100 | [diff] [blame] | 2895 | /* enum: RXDP counter: Number of times the DPCPU waited for an existing |
| 2896 | * descriptor fetch. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only. |
| 2897 | */ |
Daniel Pieczko | e80ca013 | 2015-06-02 11:38:34 +0100 | [diff] [blame] | 2898 | #define MC_CMD_MAC_RXDP_HLB_WAIT_CONDITIONS 0x48 |
Daniel Pieczko | 3c36a2a | 2015-06-02 11:39:06 +0100 | [diff] [blame^] | 2899 | #define MC_CMD_MAC_VADAPTER_RX_DMABUF_START 0x4c /* enum */ |
| 2900 | #define MC_CMD_MAC_VADAPTER_RX_UNICAST_PACKETS 0x4c /* enum */ |
| 2901 | #define MC_CMD_MAC_VADAPTER_RX_UNICAST_BYTES 0x4d /* enum */ |
| 2902 | #define MC_CMD_MAC_VADAPTER_RX_MULTICAST_PACKETS 0x4e /* enum */ |
| 2903 | #define MC_CMD_MAC_VADAPTER_RX_MULTICAST_BYTES 0x4f /* enum */ |
| 2904 | #define MC_CMD_MAC_VADAPTER_RX_BROADCAST_PACKETS 0x50 /* enum */ |
| 2905 | #define MC_CMD_MAC_VADAPTER_RX_BROADCAST_BYTES 0x51 /* enum */ |
| 2906 | #define MC_CMD_MAC_VADAPTER_RX_BAD_PACKETS 0x52 /* enum */ |
| 2907 | #define MC_CMD_MAC_VADAPTER_RX_BAD_BYTES 0x53 /* enum */ |
| 2908 | #define MC_CMD_MAC_VADAPTER_RX_OVERFLOW 0x54 /* enum */ |
| 2909 | #define MC_CMD_MAC_VADAPTER_TX_DMABUF_START 0x57 /* enum */ |
| 2910 | #define MC_CMD_MAC_VADAPTER_TX_UNICAST_PACKETS 0x57 /* enum */ |
| 2911 | #define MC_CMD_MAC_VADAPTER_TX_UNICAST_BYTES 0x58 /* enum */ |
| 2912 | #define MC_CMD_MAC_VADAPTER_TX_MULTICAST_PACKETS 0x59 /* enum */ |
| 2913 | #define MC_CMD_MAC_VADAPTER_TX_MULTICAST_BYTES 0x5a /* enum */ |
| 2914 | #define MC_CMD_MAC_VADAPTER_TX_BROADCAST_PACKETS 0x5b /* enum */ |
| 2915 | #define MC_CMD_MAC_VADAPTER_TX_BROADCAST_BYTES 0x5c /* enum */ |
| 2916 | #define MC_CMD_MAC_VADAPTER_TX_BAD_PACKETS 0x5d /* enum */ |
| 2917 | #define MC_CMD_MAC_VADAPTER_TX_BAD_BYTES 0x5e /* enum */ |
| 2918 | #define MC_CMD_MAC_VADAPTER_TX_OVERFLOW 0x5f /* enum */ |
Matthew Slattery | 2ca10a7 | 2013-09-10 19:06:27 +0100 | [diff] [blame] | 2919 | /* enum: Start of GMAC stats buffer space, for Siena only. */ |
| 2920 | #define MC_CMD_GMAC_DMABUF_START 0x40 |
| 2921 | /* enum: End of GMAC stats buffer space, for Siena only. */ |
| 2922 | #define MC_CMD_GMAC_DMABUF_END 0x5f |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2923 | #define MC_CMD_MAC_GENERATION_END 0x60 /* enum */ |
| 2924 | #define MC_CMD_MAC_NSTATS 0x61 /* enum */ |
| 2925 | |
| 2926 | |
| 2927 | /***********************************/ |
| 2928 | /* MC_CMD_SRIOV |
| 2929 | * to be documented |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2930 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2931 | #define MC_CMD_SRIOV 0x30 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2932 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2933 | /* MC_CMD_SRIOV_IN msgrequest */ |
| 2934 | #define MC_CMD_SRIOV_IN_LEN 12 |
| 2935 | #define MC_CMD_SRIOV_IN_ENABLE_OFST 0 |
| 2936 | #define MC_CMD_SRIOV_IN_VI_BASE_OFST 4 |
| 2937 | #define MC_CMD_SRIOV_IN_VF_COUNT_OFST 8 |
| 2938 | |
| 2939 | /* MC_CMD_SRIOV_OUT msgresponse */ |
| 2940 | #define MC_CMD_SRIOV_OUT_LEN 8 |
| 2941 | #define MC_CMD_SRIOV_OUT_VI_SCALE_OFST 0 |
| 2942 | #define MC_CMD_SRIOV_OUT_VF_TOTAL_OFST 4 |
| 2943 | |
| 2944 | /* MC_CMD_MEMCPY_RECORD_TYPEDEF structuredef */ |
| 2945 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LEN 32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2946 | /* this is only used for the first record */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2947 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_OFST 0 |
| 2948 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_LBN 0 |
| 2949 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_WIDTH 32 |
| 2950 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_OFST 4 |
| 2951 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_LBN 32 |
| 2952 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_WIDTH 32 |
| 2953 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_OFST 8 |
| 2954 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LEN 8 |
| 2955 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LO_OFST 8 |
| 2956 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_HI_OFST 12 |
| 2957 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LBN 64 |
| 2958 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_WIDTH 64 |
| 2959 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_OFST 16 |
| 2960 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_RID_INLINE 0x100 /* enum */ |
| 2961 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_LBN 128 |
| 2962 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_WIDTH 32 |
| 2963 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_OFST 20 |
| 2964 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LEN 8 |
| 2965 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LO_OFST 20 |
| 2966 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_HI_OFST 24 |
| 2967 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LBN 160 |
| 2968 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_WIDTH 64 |
| 2969 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_OFST 28 |
| 2970 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_LBN 224 |
| 2971 | #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_WIDTH 32 |
| 2972 | |
| 2973 | |
| 2974 | /***********************************/ |
| 2975 | /* MC_CMD_MEMCPY |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 2976 | * DMA write data into (Rid,Addr), either by dma reading (Rid,Addr), or by data |
| 2977 | * embedded directly in the command. |
| 2978 | * |
| 2979 | * A common pattern is for a client to use generation counts to signal a dma |
| 2980 | * update of a datastructure. To facilitate this, this MCDI operation can |
| 2981 | * contain multiple requests which are executed in strict order. Requests take |
| 2982 | * the form of duplicating the entire MCDI request continuously (including the |
| 2983 | * requests record, which is ignored in all but the first structure) |
| 2984 | * |
| 2985 | * The source data can either come from a DMA from the host, or it can be |
| 2986 | * embedded within the request directly, thereby eliminating a DMA read. To |
| 2987 | * indicate this, the client sets FROM_RID=%RID_INLINE, ADDR_HI=0, and |
| 2988 | * ADDR_LO=offset, and inserts the data at %offset from the start of the |
| 2989 | * payload. It's the callers responsibility to ensure that the embedded data |
| 2990 | * doesn't overlap the records. |
| 2991 | * |
| 2992 | * Returns: 0, EINVAL (invalid RID) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 2993 | */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 2994 | #define MC_CMD_MEMCPY 0x31 |
| 2995 | |
| 2996 | /* MC_CMD_MEMCPY_IN msgrequest */ |
| 2997 | #define MC_CMD_MEMCPY_IN_LENMIN 32 |
| 2998 | #define MC_CMD_MEMCPY_IN_LENMAX 224 |
| 2999 | #define MC_CMD_MEMCPY_IN_LEN(num) (0+32*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3000 | /* see MC_CMD_MEMCPY_RECORD_TYPEDEF */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3001 | #define MC_CMD_MEMCPY_IN_RECORD_OFST 0 |
| 3002 | #define MC_CMD_MEMCPY_IN_RECORD_LEN 32 |
| 3003 | #define MC_CMD_MEMCPY_IN_RECORD_MINNUM 1 |
| 3004 | #define MC_CMD_MEMCPY_IN_RECORD_MAXNUM 7 |
| 3005 | |
| 3006 | /* MC_CMD_MEMCPY_OUT msgresponse */ |
| 3007 | #define MC_CMD_MEMCPY_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3008 | |
| 3009 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3010 | /***********************************/ |
| 3011 | /* MC_CMD_WOL_FILTER_SET |
| 3012 | * Set a WoL filter. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3013 | */ |
| 3014 | #define MC_CMD_WOL_FILTER_SET 0x32 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3015 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3016 | #define MC_CMD_0x32_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 3017 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3018 | /* MC_CMD_WOL_FILTER_SET_IN msgrequest */ |
| 3019 | #define MC_CMD_WOL_FILTER_SET_IN_LEN 192 |
| 3020 | #define MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 |
| 3021 | #define MC_CMD_FILTER_MODE_SIMPLE 0x0 /* enum */ |
| 3022 | #define MC_CMD_FILTER_MODE_STRUCTURED 0xffffffff /* enum */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3023 | /* A type value of 1 is unused. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3024 | #define MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3025 | /* enum: Magic */ |
| 3026 | #define MC_CMD_WOL_TYPE_MAGIC 0x0 |
| 3027 | /* enum: MS Windows Magic */ |
| 3028 | #define MC_CMD_WOL_TYPE_WIN_MAGIC 0x2 |
| 3029 | /* enum: IPv4 Syn */ |
| 3030 | #define MC_CMD_WOL_TYPE_IPV4_SYN 0x3 |
| 3031 | /* enum: IPv6 Syn */ |
| 3032 | #define MC_CMD_WOL_TYPE_IPV6_SYN 0x4 |
| 3033 | /* enum: Bitmap */ |
| 3034 | #define MC_CMD_WOL_TYPE_BITMAP 0x5 |
| 3035 | /* enum: Link */ |
| 3036 | #define MC_CMD_WOL_TYPE_LINK 0x6 |
| 3037 | /* enum: (Above this for future use) */ |
| 3038 | #define MC_CMD_WOL_TYPE_MAX 0x7 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3039 | #define MC_CMD_WOL_FILTER_SET_IN_DATA_OFST 8 |
| 3040 | #define MC_CMD_WOL_FILTER_SET_IN_DATA_LEN 4 |
| 3041 | #define MC_CMD_WOL_FILTER_SET_IN_DATA_NUM 46 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3042 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3043 | /* MC_CMD_WOL_FILTER_SET_IN_MAGIC msgrequest */ |
| 3044 | #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_LEN 16 |
| 3045 | /* MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */ |
| 3046 | /* MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */ |
| 3047 | #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_OFST 8 |
| 3048 | #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_LEN 8 |
| 3049 | #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_LO_OFST 8 |
| 3050 | #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_HI_OFST 12 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3051 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3052 | /* MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN msgrequest */ |
| 3053 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_LEN 20 |
| 3054 | /* MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */ |
| 3055 | /* MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */ |
| 3056 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_IP_OFST 8 |
| 3057 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_IP_OFST 12 |
| 3058 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_PORT_OFST 16 |
| 3059 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_PORT_LEN 2 |
| 3060 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_PORT_OFST 18 |
| 3061 | #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_PORT_LEN 2 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3062 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3063 | /* MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN msgrequest */ |
| 3064 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_LEN 44 |
| 3065 | /* MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */ |
| 3066 | /* MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */ |
| 3067 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_IP_OFST 8 |
| 3068 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_IP_LEN 16 |
| 3069 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_IP_OFST 24 |
| 3070 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_IP_LEN 16 |
| 3071 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_PORT_OFST 40 |
| 3072 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_PORT_LEN 2 |
| 3073 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_PORT_OFST 42 |
| 3074 | #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_PORT_LEN 2 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3075 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3076 | /* MC_CMD_WOL_FILTER_SET_IN_BITMAP msgrequest */ |
| 3077 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN 187 |
| 3078 | /* MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */ |
| 3079 | /* MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */ |
| 3080 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_MASK_OFST 8 |
| 3081 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_MASK_LEN 48 |
| 3082 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_BITMAP_OFST 56 |
| 3083 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_BITMAP_LEN 128 |
| 3084 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN_OFST 184 |
| 3085 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN_LEN 1 |
| 3086 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER3_OFST 185 |
| 3087 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER3_LEN 1 |
| 3088 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER4_OFST 186 |
| 3089 | #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER4_LEN 1 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3090 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3091 | /* MC_CMD_WOL_FILTER_SET_IN_LINK msgrequest */ |
| 3092 | #define MC_CMD_WOL_FILTER_SET_IN_LINK_LEN 12 |
| 3093 | /* MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */ |
| 3094 | /* MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */ |
| 3095 | #define MC_CMD_WOL_FILTER_SET_IN_LINK_MASK_OFST 8 |
| 3096 | #define MC_CMD_WOL_FILTER_SET_IN_LINK_UP_LBN 0 |
| 3097 | #define MC_CMD_WOL_FILTER_SET_IN_LINK_UP_WIDTH 1 |
| 3098 | #define MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_LBN 1 |
| 3099 | #define MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_WIDTH 1 |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3100 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3101 | /* MC_CMD_WOL_FILTER_SET_OUT msgresponse */ |
| 3102 | #define MC_CMD_WOL_FILTER_SET_OUT_LEN 4 |
| 3103 | #define MC_CMD_WOL_FILTER_SET_OUT_FILTER_ID_OFST 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3104 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3105 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3106 | /***********************************/ |
| 3107 | /* MC_CMD_WOL_FILTER_REMOVE |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3108 | * Remove a WoL filter. Locks required: None. Returns: 0, EINVAL, ENOSYS |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3109 | */ |
| 3110 | #define MC_CMD_WOL_FILTER_REMOVE 0x33 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3111 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3112 | #define MC_CMD_0x33_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 3113 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3114 | /* MC_CMD_WOL_FILTER_REMOVE_IN msgrequest */ |
| 3115 | #define MC_CMD_WOL_FILTER_REMOVE_IN_LEN 4 |
| 3116 | #define MC_CMD_WOL_FILTER_REMOVE_IN_FILTER_ID_OFST 0 |
| 3117 | |
| 3118 | /* MC_CMD_WOL_FILTER_REMOVE_OUT msgresponse */ |
| 3119 | #define MC_CMD_WOL_FILTER_REMOVE_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3120 | |
| 3121 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3122 | /***********************************/ |
| 3123 | /* MC_CMD_WOL_FILTER_RESET |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3124 | * Reset (i.e. remove all) WoL filters. Locks required: None. Returns: 0, |
| 3125 | * ENOSYS |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3126 | */ |
| 3127 | #define MC_CMD_WOL_FILTER_RESET 0x34 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3128 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3129 | #define MC_CMD_0x34_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 3130 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3131 | /* MC_CMD_WOL_FILTER_RESET_IN msgrequest */ |
| 3132 | #define MC_CMD_WOL_FILTER_RESET_IN_LEN 4 |
| 3133 | #define MC_CMD_WOL_FILTER_RESET_IN_MASK_OFST 0 |
| 3134 | #define MC_CMD_WOL_FILTER_RESET_IN_WAKE_FILTERS 0x1 /* enum */ |
| 3135 | #define MC_CMD_WOL_FILTER_RESET_IN_LIGHTSOUT_OFFLOADS 0x2 /* enum */ |
| 3136 | |
| 3137 | /* MC_CMD_WOL_FILTER_RESET_OUT msgresponse */ |
| 3138 | #define MC_CMD_WOL_FILTER_RESET_OUT_LEN 0 |
| 3139 | |
| 3140 | |
| 3141 | /***********************************/ |
| 3142 | /* MC_CMD_SET_MCAST_HASH |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3143 | * Set the MCAST hash value without otherwise reconfiguring the MAC |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3144 | */ |
| 3145 | #define MC_CMD_SET_MCAST_HASH 0x35 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3146 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3147 | /* MC_CMD_SET_MCAST_HASH_IN msgrequest */ |
| 3148 | #define MC_CMD_SET_MCAST_HASH_IN_LEN 32 |
| 3149 | #define MC_CMD_SET_MCAST_HASH_IN_HASH0_OFST 0 |
| 3150 | #define MC_CMD_SET_MCAST_HASH_IN_HASH0_LEN 16 |
| 3151 | #define MC_CMD_SET_MCAST_HASH_IN_HASH1_OFST 16 |
| 3152 | #define MC_CMD_SET_MCAST_HASH_IN_HASH1_LEN 16 |
| 3153 | |
| 3154 | /* MC_CMD_SET_MCAST_HASH_OUT msgresponse */ |
| 3155 | #define MC_CMD_SET_MCAST_HASH_OUT_LEN 0 |
| 3156 | |
| 3157 | |
| 3158 | /***********************************/ |
| 3159 | /* MC_CMD_NVRAM_TYPES |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3160 | * Return bitfield indicating available types of virtual NVRAM partitions. |
| 3161 | * Locks required: none. Returns: 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3162 | */ |
| 3163 | #define MC_CMD_NVRAM_TYPES 0x36 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3164 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3165 | #define MC_CMD_0x36_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3166 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3167 | /* MC_CMD_NVRAM_TYPES_IN msgrequest */ |
| 3168 | #define MC_CMD_NVRAM_TYPES_IN_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3169 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3170 | /* MC_CMD_NVRAM_TYPES_OUT msgresponse */ |
| 3171 | #define MC_CMD_NVRAM_TYPES_OUT_LEN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3172 | /* Bit mask of supported types. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3173 | #define MC_CMD_NVRAM_TYPES_OUT_TYPES_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3174 | /* enum: Disabled callisto. */ |
| 3175 | #define MC_CMD_NVRAM_TYPE_DISABLED_CALLISTO 0x0 |
| 3176 | /* enum: MC firmware. */ |
| 3177 | #define MC_CMD_NVRAM_TYPE_MC_FW 0x1 |
| 3178 | /* enum: MC backup firmware. */ |
| 3179 | #define MC_CMD_NVRAM_TYPE_MC_FW_BACKUP 0x2 |
| 3180 | /* enum: Static configuration Port0. */ |
| 3181 | #define MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT0 0x3 |
| 3182 | /* enum: Static configuration Port1. */ |
| 3183 | #define MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT1 0x4 |
| 3184 | /* enum: Dynamic configuration Port0. */ |
| 3185 | #define MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT0 0x5 |
| 3186 | /* enum: Dynamic configuration Port1. */ |
| 3187 | #define MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1 0x6 |
| 3188 | /* enum: Expansion Rom. */ |
| 3189 | #define MC_CMD_NVRAM_TYPE_EXP_ROM 0x7 |
| 3190 | /* enum: Expansion Rom Configuration Port0. */ |
| 3191 | #define MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT0 0x8 |
| 3192 | /* enum: Expansion Rom Configuration Port1. */ |
| 3193 | #define MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1 0x9 |
| 3194 | /* enum: Phy Configuration Port0. */ |
| 3195 | #define MC_CMD_NVRAM_TYPE_PHY_PORT0 0xa |
| 3196 | /* enum: Phy Configuration Port1. */ |
| 3197 | #define MC_CMD_NVRAM_TYPE_PHY_PORT1 0xb |
| 3198 | /* enum: Log. */ |
| 3199 | #define MC_CMD_NVRAM_TYPE_LOG 0xc |
| 3200 | /* enum: FPGA image. */ |
| 3201 | #define MC_CMD_NVRAM_TYPE_FPGA 0xd |
| 3202 | /* enum: FPGA backup image */ |
| 3203 | #define MC_CMD_NVRAM_TYPE_FPGA_BACKUP 0xe |
| 3204 | /* enum: FC firmware. */ |
| 3205 | #define MC_CMD_NVRAM_TYPE_FC_FW 0xf |
| 3206 | /* enum: FC backup firmware. */ |
| 3207 | #define MC_CMD_NVRAM_TYPE_FC_FW_BACKUP 0x10 |
| 3208 | /* enum: CPLD image. */ |
| 3209 | #define MC_CMD_NVRAM_TYPE_CPLD 0x11 |
| 3210 | /* enum: Licensing information. */ |
| 3211 | #define MC_CMD_NVRAM_TYPE_LICENSE 0x12 |
| 3212 | /* enum: FC Log. */ |
| 3213 | #define MC_CMD_NVRAM_TYPE_FC_LOG 0x13 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3214 | |
| 3215 | |
| 3216 | /***********************************/ |
| 3217 | /* MC_CMD_NVRAM_INFO |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3218 | * Read info about a virtual NVRAM partition. Locks required: none. Returns: 0, |
| 3219 | * EINVAL (bad type). |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3220 | */ |
| 3221 | #define MC_CMD_NVRAM_INFO 0x37 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3222 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3223 | #define MC_CMD_0x37_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3224 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3225 | /* MC_CMD_NVRAM_INFO_IN msgrequest */ |
| 3226 | #define MC_CMD_NVRAM_INFO_IN_LEN 4 |
| 3227 | #define MC_CMD_NVRAM_INFO_IN_TYPE_OFST 0 |
| 3228 | /* Enum values, see field(s): */ |
| 3229 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3230 | |
| 3231 | /* MC_CMD_NVRAM_INFO_OUT msgresponse */ |
| 3232 | #define MC_CMD_NVRAM_INFO_OUT_LEN 24 |
| 3233 | #define MC_CMD_NVRAM_INFO_OUT_TYPE_OFST 0 |
| 3234 | /* Enum values, see field(s): */ |
| 3235 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3236 | #define MC_CMD_NVRAM_INFO_OUT_SIZE_OFST 4 |
| 3237 | #define MC_CMD_NVRAM_INFO_OUT_ERASESIZE_OFST 8 |
| 3238 | #define MC_CMD_NVRAM_INFO_OUT_FLAGS_OFST 12 |
| 3239 | #define MC_CMD_NVRAM_INFO_OUT_PROTECTED_LBN 0 |
| 3240 | #define MC_CMD_NVRAM_INFO_OUT_PROTECTED_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3241 | #define MC_CMD_NVRAM_INFO_OUT_TLV_LBN 1 |
| 3242 | #define MC_CMD_NVRAM_INFO_OUT_TLV_WIDTH 1 |
| 3243 | #define MC_CMD_NVRAM_INFO_OUT_A_B_LBN 7 |
| 3244 | #define MC_CMD_NVRAM_INFO_OUT_A_B_WIDTH 1 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3245 | #define MC_CMD_NVRAM_INFO_OUT_PHYSDEV_OFST 16 |
| 3246 | #define MC_CMD_NVRAM_INFO_OUT_PHYSADDR_OFST 20 |
| 3247 | |
| 3248 | |
| 3249 | /***********************************/ |
| 3250 | /* MC_CMD_NVRAM_UPDATE_START |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3251 | * Start a group of update operations on a virtual NVRAM partition. Locks |
| 3252 | * required: PHY_LOCK if type==*PHY*. Returns: 0, EINVAL (bad type), EACCES (if |
| 3253 | * PHY_LOCK required and not held). |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3254 | */ |
| 3255 | #define MC_CMD_NVRAM_UPDATE_START 0x38 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3256 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3257 | #define MC_CMD_0x38_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3258 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3259 | /* MC_CMD_NVRAM_UPDATE_START_IN msgrequest */ |
| 3260 | #define MC_CMD_NVRAM_UPDATE_START_IN_LEN 4 |
| 3261 | #define MC_CMD_NVRAM_UPDATE_START_IN_TYPE_OFST 0 |
| 3262 | /* Enum values, see field(s): */ |
| 3263 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3264 | |
| 3265 | /* MC_CMD_NVRAM_UPDATE_START_OUT msgresponse */ |
| 3266 | #define MC_CMD_NVRAM_UPDATE_START_OUT_LEN 0 |
| 3267 | |
| 3268 | |
| 3269 | /***********************************/ |
| 3270 | /* MC_CMD_NVRAM_READ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3271 | * Read data from a virtual NVRAM partition. Locks required: PHY_LOCK if |
| 3272 | * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if |
| 3273 | * PHY_LOCK required and not held) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3274 | */ |
| 3275 | #define MC_CMD_NVRAM_READ 0x39 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3276 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3277 | #define MC_CMD_0x39_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3278 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3279 | /* MC_CMD_NVRAM_READ_IN msgrequest */ |
| 3280 | #define MC_CMD_NVRAM_READ_IN_LEN 12 |
| 3281 | #define MC_CMD_NVRAM_READ_IN_TYPE_OFST 0 |
| 3282 | /* Enum values, see field(s): */ |
| 3283 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3284 | #define MC_CMD_NVRAM_READ_IN_OFFSET_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3285 | /* amount to read in bytes */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3286 | #define MC_CMD_NVRAM_READ_IN_LENGTH_OFST 8 |
| 3287 | |
| 3288 | /* MC_CMD_NVRAM_READ_OUT msgresponse */ |
| 3289 | #define MC_CMD_NVRAM_READ_OUT_LENMIN 1 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 3290 | #define MC_CMD_NVRAM_READ_OUT_LENMAX 252 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3291 | #define MC_CMD_NVRAM_READ_OUT_LEN(num) (0+1*(num)) |
| 3292 | #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_OFST 0 |
| 3293 | #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_LEN 1 |
| 3294 | #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MINNUM 1 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 3295 | #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MAXNUM 252 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3296 | |
| 3297 | |
| 3298 | /***********************************/ |
| 3299 | /* MC_CMD_NVRAM_WRITE |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3300 | * Write data to a virtual NVRAM partition. Locks required: PHY_LOCK if |
| 3301 | * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if |
| 3302 | * PHY_LOCK required and not held) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3303 | */ |
| 3304 | #define MC_CMD_NVRAM_WRITE 0x3a |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3305 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3306 | #define MC_CMD_0x3a_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3307 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3308 | /* MC_CMD_NVRAM_WRITE_IN msgrequest */ |
| 3309 | #define MC_CMD_NVRAM_WRITE_IN_LENMIN 13 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 3310 | #define MC_CMD_NVRAM_WRITE_IN_LENMAX 252 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3311 | #define MC_CMD_NVRAM_WRITE_IN_LEN(num) (12+1*(num)) |
| 3312 | #define MC_CMD_NVRAM_WRITE_IN_TYPE_OFST 0 |
| 3313 | /* Enum values, see field(s): */ |
| 3314 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3315 | #define MC_CMD_NVRAM_WRITE_IN_OFFSET_OFST 4 |
| 3316 | #define MC_CMD_NVRAM_WRITE_IN_LENGTH_OFST 8 |
| 3317 | #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_OFST 12 |
| 3318 | #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_LEN 1 |
| 3319 | #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MINNUM 1 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 3320 | #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MAXNUM 240 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3321 | |
| 3322 | /* MC_CMD_NVRAM_WRITE_OUT msgresponse */ |
| 3323 | #define MC_CMD_NVRAM_WRITE_OUT_LEN 0 |
| 3324 | |
| 3325 | |
| 3326 | /***********************************/ |
| 3327 | /* MC_CMD_NVRAM_ERASE |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3328 | * Erase sector(s) from a virtual NVRAM partition. Locks required: PHY_LOCK if |
| 3329 | * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if |
| 3330 | * PHY_LOCK required and not held) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3331 | */ |
| 3332 | #define MC_CMD_NVRAM_ERASE 0x3b |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3333 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3334 | #define MC_CMD_0x3b_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3335 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3336 | /* MC_CMD_NVRAM_ERASE_IN msgrequest */ |
| 3337 | #define MC_CMD_NVRAM_ERASE_IN_LEN 12 |
| 3338 | #define MC_CMD_NVRAM_ERASE_IN_TYPE_OFST 0 |
| 3339 | /* Enum values, see field(s): */ |
| 3340 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3341 | #define MC_CMD_NVRAM_ERASE_IN_OFFSET_OFST 4 |
| 3342 | #define MC_CMD_NVRAM_ERASE_IN_LENGTH_OFST 8 |
| 3343 | |
| 3344 | /* MC_CMD_NVRAM_ERASE_OUT msgresponse */ |
| 3345 | #define MC_CMD_NVRAM_ERASE_OUT_LEN 0 |
| 3346 | |
| 3347 | |
| 3348 | /***********************************/ |
| 3349 | /* MC_CMD_NVRAM_UPDATE_FINISH |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3350 | * Finish a group of update operations on a virtual NVRAM partition. Locks |
| 3351 | * required: PHY_LOCK if type==*PHY*. Returns: 0, EINVAL (bad |
| 3352 | * type/offset/length), EACCES (if PHY_LOCK required and not held) |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3353 | */ |
| 3354 | #define MC_CMD_NVRAM_UPDATE_FINISH 0x3c |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3355 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3356 | #define MC_CMD_0x3c_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3357 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3358 | /* MC_CMD_NVRAM_UPDATE_FINISH_IN msgrequest */ |
| 3359 | #define MC_CMD_NVRAM_UPDATE_FINISH_IN_LEN 8 |
| 3360 | #define MC_CMD_NVRAM_UPDATE_FINISH_IN_TYPE_OFST 0 |
| 3361 | /* Enum values, see field(s): */ |
| 3362 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3363 | #define MC_CMD_NVRAM_UPDATE_FINISH_IN_REBOOT_OFST 4 |
| 3364 | |
| 3365 | /* MC_CMD_NVRAM_UPDATE_FINISH_OUT msgresponse */ |
| 3366 | #define MC_CMD_NVRAM_UPDATE_FINISH_OUT_LEN 0 |
| 3367 | |
| 3368 | |
| 3369 | /***********************************/ |
| 3370 | /* MC_CMD_REBOOT |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3371 | * Reboot the MC. |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3372 | * |
| 3373 | * The AFTER_ASSERTION flag is intended to be used when the driver notices an |
| 3374 | * assertion failure (at which point it is expected to perform a complete tear |
| 3375 | * down and reinitialise), to allow both ports to reset the MC once in an |
| 3376 | * atomic fashion. |
| 3377 | * |
| 3378 | * Production mc firmwares are generally compiled with REBOOT_ON_ASSERT=1, |
| 3379 | * which means that they will automatically reboot out of the assertion |
| 3380 | * handler, so this is in practise an optional operation. It is still |
| 3381 | * recommended that drivers execute this to support custom firmwares with |
| 3382 | * REBOOT_ON_ASSERT=0. |
| 3383 | * |
| 3384 | * Locks required: NONE Returns: Nothing. You get back a response with ERR=1, |
| 3385 | * DATALEN=0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3386 | */ |
| 3387 | #define MC_CMD_REBOOT 0x3d |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3388 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3389 | #define MC_CMD_0x3d_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3390 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3391 | /* MC_CMD_REBOOT_IN msgrequest */ |
| 3392 | #define MC_CMD_REBOOT_IN_LEN 4 |
| 3393 | #define MC_CMD_REBOOT_IN_FLAGS_OFST 0 |
| 3394 | #define MC_CMD_REBOOT_FLAGS_AFTER_ASSERTION 0x1 /* enum */ |
| 3395 | |
| 3396 | /* MC_CMD_REBOOT_OUT msgresponse */ |
| 3397 | #define MC_CMD_REBOOT_OUT_LEN 0 |
| 3398 | |
| 3399 | |
| 3400 | /***********************************/ |
| 3401 | /* MC_CMD_SCHEDINFO |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3402 | * Request scheduler info. Locks required: NONE. Returns: An array of |
| 3403 | * (timeslice,maximum overrun), one for each thread, in ascending order of |
| 3404 | * thread address. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3405 | */ |
| 3406 | #define MC_CMD_SCHEDINFO 0x3e |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3407 | |
| 3408 | /* MC_CMD_SCHEDINFO_IN msgrequest */ |
| 3409 | #define MC_CMD_SCHEDINFO_IN_LEN 0 |
| 3410 | |
| 3411 | /* MC_CMD_SCHEDINFO_OUT msgresponse */ |
| 3412 | #define MC_CMD_SCHEDINFO_OUT_LENMIN 4 |
| 3413 | #define MC_CMD_SCHEDINFO_OUT_LENMAX 252 |
| 3414 | #define MC_CMD_SCHEDINFO_OUT_LEN(num) (0+4*(num)) |
| 3415 | #define MC_CMD_SCHEDINFO_OUT_DATA_OFST 0 |
| 3416 | #define MC_CMD_SCHEDINFO_OUT_DATA_LEN 4 |
| 3417 | #define MC_CMD_SCHEDINFO_OUT_DATA_MINNUM 1 |
| 3418 | #define MC_CMD_SCHEDINFO_OUT_DATA_MAXNUM 63 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3419 | |
| 3420 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3421 | /***********************************/ |
| 3422 | /* MC_CMD_REBOOT_MODE |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3423 | * Set the mode for the next MC reboot. Locks required: NONE. Sets the reboot |
| 3424 | * mode to the specified value. Returns the old mode. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3425 | */ |
| 3426 | #define MC_CMD_REBOOT_MODE 0x3f |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3427 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3428 | #define MC_CMD_0x3f_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3429 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3430 | /* MC_CMD_REBOOT_MODE_IN msgrequest */ |
| 3431 | #define MC_CMD_REBOOT_MODE_IN_LEN 4 |
| 3432 | #define MC_CMD_REBOOT_MODE_IN_VALUE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3433 | /* enum: Normal. */ |
| 3434 | #define MC_CMD_REBOOT_MODE_NORMAL 0x0 |
| 3435 | /* enum: Power-on Reset. */ |
| 3436 | #define MC_CMD_REBOOT_MODE_POR 0x2 |
| 3437 | /* enum: Snapper. */ |
| 3438 | #define MC_CMD_REBOOT_MODE_SNAPPER 0x3 |
| 3439 | /* enum: snapper fake POR */ |
| 3440 | #define MC_CMD_REBOOT_MODE_SNAPPER_POR 0x4 |
| 3441 | #define MC_CMD_REBOOT_MODE_IN_FAKE_LBN 7 |
| 3442 | #define MC_CMD_REBOOT_MODE_IN_FAKE_WIDTH 1 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3443 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3444 | /* MC_CMD_REBOOT_MODE_OUT msgresponse */ |
| 3445 | #define MC_CMD_REBOOT_MODE_OUT_LEN 4 |
| 3446 | #define MC_CMD_REBOOT_MODE_OUT_VALUE_OFST 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3447 | |
| 3448 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3449 | /***********************************/ |
| 3450 | /* MC_CMD_SENSOR_INFO |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3451 | * Returns information about every available sensor. |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3452 | * |
| 3453 | * Each sensor has a single (16bit) value, and a corresponding state. The |
| 3454 | * mapping between value and state is nominally determined by the MC, but may |
| 3455 | * be implemented using up to 2 ranges per sensor. |
| 3456 | * |
| 3457 | * This call returns a mask (32bit) of the sensors that are supported by this |
| 3458 | * platform, then an array of sensor information structures, in order of sensor |
| 3459 | * type (but without gaps for unimplemented sensors). Each structure defines |
| 3460 | * the ranges for the corresponding sensor. An unused range is indicated by |
| 3461 | * equal limit values. If one range is used, a value outside that range results |
| 3462 | * in STATE_FATAL. If two ranges are used, a value outside the second range |
| 3463 | * results in STATE_FATAL while a value outside the first and inside the second |
| 3464 | * range results in STATE_WARNING. |
| 3465 | * |
| 3466 | * Sensor masks and sensor information arrays are organised into pages. For |
| 3467 | * backward compatibility, older host software can only use sensors in page 0. |
| 3468 | * Bit 32 in the sensor mask was previously unused, and is no reserved for use |
| 3469 | * as the next page flag. |
| 3470 | * |
| 3471 | * If the request does not contain a PAGE value then firmware will only return |
| 3472 | * page 0 of sensor information, with bit 31 in the sensor mask cleared. |
| 3473 | * |
| 3474 | * If the request contains a PAGE value then firmware responds with the sensor |
| 3475 | * mask and sensor information array for that page of sensors. In this case bit |
| 3476 | * 31 in the mask is set if another page exists. |
| 3477 | * |
| 3478 | * Locks required: None Returns: 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3479 | */ |
| 3480 | #define MC_CMD_SENSOR_INFO 0x41 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3481 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3482 | #define MC_CMD_0x41_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3483 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3484 | /* MC_CMD_SENSOR_INFO_IN msgrequest */ |
| 3485 | #define MC_CMD_SENSOR_INFO_IN_LEN 0 |
| 3486 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3487 | /* MC_CMD_SENSOR_INFO_EXT_IN msgrequest */ |
| 3488 | #define MC_CMD_SENSOR_INFO_EXT_IN_LEN 4 |
| 3489 | /* Which page of sensors to report. |
| 3490 | * |
| 3491 | * Page 0 contains sensors 0 to 30 (sensor 31 is the next page bit). |
| 3492 | * |
| 3493 | * Page 1 contains sensors 32 to 62 (sensor 63 is the next page bit). etc. |
| 3494 | */ |
| 3495 | #define MC_CMD_SENSOR_INFO_EXT_IN_PAGE_OFST 0 |
| 3496 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3497 | /* MC_CMD_SENSOR_INFO_OUT msgresponse */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 3498 | #define MC_CMD_SENSOR_INFO_OUT_LENMIN 4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3499 | #define MC_CMD_SENSOR_INFO_OUT_LENMAX 252 |
| 3500 | #define MC_CMD_SENSOR_INFO_OUT_LEN(num) (4+8*(num)) |
| 3501 | #define MC_CMD_SENSOR_INFO_OUT_MASK_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3502 | /* enum: Controller temperature: degC */ |
| 3503 | #define MC_CMD_SENSOR_CONTROLLER_TEMP 0x0 |
| 3504 | /* enum: Phy common temperature: degC */ |
| 3505 | #define MC_CMD_SENSOR_PHY_COMMON_TEMP 0x1 |
| 3506 | /* enum: Controller cooling: bool */ |
| 3507 | #define MC_CMD_SENSOR_CONTROLLER_COOLING 0x2 |
| 3508 | /* enum: Phy 0 temperature: degC */ |
| 3509 | #define MC_CMD_SENSOR_PHY0_TEMP 0x3 |
| 3510 | /* enum: Phy 0 cooling: bool */ |
| 3511 | #define MC_CMD_SENSOR_PHY0_COOLING 0x4 |
| 3512 | /* enum: Phy 1 temperature: degC */ |
| 3513 | #define MC_CMD_SENSOR_PHY1_TEMP 0x5 |
| 3514 | /* enum: Phy 1 cooling: bool */ |
| 3515 | #define MC_CMD_SENSOR_PHY1_COOLING 0x6 |
| 3516 | /* enum: 1.0v power: mV */ |
| 3517 | #define MC_CMD_SENSOR_IN_1V0 0x7 |
| 3518 | /* enum: 1.2v power: mV */ |
| 3519 | #define MC_CMD_SENSOR_IN_1V2 0x8 |
| 3520 | /* enum: 1.8v power: mV */ |
| 3521 | #define MC_CMD_SENSOR_IN_1V8 0x9 |
| 3522 | /* enum: 2.5v power: mV */ |
| 3523 | #define MC_CMD_SENSOR_IN_2V5 0xa |
| 3524 | /* enum: 3.3v power: mV */ |
| 3525 | #define MC_CMD_SENSOR_IN_3V3 0xb |
| 3526 | /* enum: 12v power: mV */ |
| 3527 | #define MC_CMD_SENSOR_IN_12V0 0xc |
| 3528 | /* enum: 1.2v analogue power: mV */ |
| 3529 | #define MC_CMD_SENSOR_IN_1V2A 0xd |
| 3530 | /* enum: reference voltage: mV */ |
| 3531 | #define MC_CMD_SENSOR_IN_VREF 0xe |
| 3532 | /* enum: AOE FPGA power: mV */ |
| 3533 | #define MC_CMD_SENSOR_OUT_VAOE 0xf |
| 3534 | /* enum: AOE FPGA temperature: degC */ |
| 3535 | #define MC_CMD_SENSOR_AOE_TEMP 0x10 |
| 3536 | /* enum: AOE FPGA PSU temperature: degC */ |
| 3537 | #define MC_CMD_SENSOR_PSU_AOE_TEMP 0x11 |
| 3538 | /* enum: AOE PSU temperature: degC */ |
| 3539 | #define MC_CMD_SENSOR_PSU_TEMP 0x12 |
| 3540 | /* enum: Fan 0 speed: RPM */ |
| 3541 | #define MC_CMD_SENSOR_FAN_0 0x13 |
| 3542 | /* enum: Fan 1 speed: RPM */ |
| 3543 | #define MC_CMD_SENSOR_FAN_1 0x14 |
| 3544 | /* enum: Fan 2 speed: RPM */ |
| 3545 | #define MC_CMD_SENSOR_FAN_2 0x15 |
| 3546 | /* enum: Fan 3 speed: RPM */ |
| 3547 | #define MC_CMD_SENSOR_FAN_3 0x16 |
| 3548 | /* enum: Fan 4 speed: RPM */ |
| 3549 | #define MC_CMD_SENSOR_FAN_4 0x17 |
| 3550 | /* enum: AOE FPGA input power: mV */ |
| 3551 | #define MC_CMD_SENSOR_IN_VAOE 0x18 |
| 3552 | /* enum: AOE FPGA current: mA */ |
| 3553 | #define MC_CMD_SENSOR_OUT_IAOE 0x19 |
| 3554 | /* enum: AOE FPGA input current: mA */ |
| 3555 | #define MC_CMD_SENSOR_IN_IAOE 0x1a |
| 3556 | /* enum: NIC power consumption: W */ |
| 3557 | #define MC_CMD_SENSOR_NIC_POWER 0x1b |
| 3558 | /* enum: 0.9v power voltage: mV */ |
| 3559 | #define MC_CMD_SENSOR_IN_0V9 0x1c |
| 3560 | /* enum: 0.9v power current: mA */ |
| 3561 | #define MC_CMD_SENSOR_IN_I0V9 0x1d |
| 3562 | /* enum: 1.2v power current: mA */ |
| 3563 | #define MC_CMD_SENSOR_IN_I1V2 0x1e |
| 3564 | /* enum: Not a sensor: reserved for the next page flag */ |
| 3565 | #define MC_CMD_SENSOR_PAGE0_NEXT 0x1f |
| 3566 | /* enum: 0.9v power voltage (at ADC): mV */ |
| 3567 | #define MC_CMD_SENSOR_IN_0V9_ADC 0x20 |
| 3568 | /* enum: Controller temperature 2: degC */ |
| 3569 | #define MC_CMD_SENSOR_CONTROLLER_2_TEMP 0x21 |
| 3570 | /* enum: Voltage regulator internal temperature: degC */ |
| 3571 | #define MC_CMD_SENSOR_VREG_INTERNAL_TEMP 0x22 |
| 3572 | /* enum: 0.9V voltage regulator temperature: degC */ |
| 3573 | #define MC_CMD_SENSOR_VREG_0V9_TEMP 0x23 |
| 3574 | /* enum: 1.2V voltage regulator temperature: degC */ |
| 3575 | #define MC_CMD_SENSOR_VREG_1V2_TEMP 0x24 |
| 3576 | /* enum: controller internal temperature sensor voltage (internal ADC): mV */ |
| 3577 | #define MC_CMD_SENSOR_CONTROLLER_VPTAT 0x25 |
| 3578 | /* enum: controller internal temperature (internal ADC): degC */ |
| 3579 | #define MC_CMD_SENSOR_CONTROLLER_INTERNAL_TEMP 0x26 |
| 3580 | /* enum: controller internal temperature sensor voltage (external ADC): mV */ |
| 3581 | #define MC_CMD_SENSOR_CONTROLLER_VPTAT_EXTADC 0x27 |
| 3582 | /* enum: controller internal temperature (external ADC): degC */ |
| 3583 | #define MC_CMD_SENSOR_CONTROLLER_INTERNAL_TEMP_EXTADC 0x28 |
| 3584 | /* enum: ambient temperature: degC */ |
| 3585 | #define MC_CMD_SENSOR_AMBIENT_TEMP 0x29 |
| 3586 | /* enum: air flow: bool */ |
| 3587 | #define MC_CMD_SENSOR_AIRFLOW 0x2a |
| 3588 | /* enum: voltage between VSS08D and VSS08D at CSR: mV */ |
| 3589 | #define MC_CMD_SENSOR_VDD08D_VSS08D_CSR 0x2b |
| 3590 | /* enum: voltage between VSS08D and VSS08D at CSR (external ADC): mV */ |
| 3591 | #define MC_CMD_SENSOR_VDD08D_VSS08D_CSR_EXTADC 0x2c |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 3592 | /* enum: Hotpoint temperature: degC */ |
| 3593 | #define MC_CMD_SENSOR_HOTPOINT_TEMP 0x2d |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3594 | /* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3595 | #define MC_CMD_SENSOR_ENTRY_OFST 4 |
| 3596 | #define MC_CMD_SENSOR_ENTRY_LEN 8 |
| 3597 | #define MC_CMD_SENSOR_ENTRY_LO_OFST 4 |
| 3598 | #define MC_CMD_SENSOR_ENTRY_HI_OFST 8 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 3599 | #define MC_CMD_SENSOR_ENTRY_MINNUM 0 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3600 | #define MC_CMD_SENSOR_ENTRY_MAXNUM 31 |
| 3601 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3602 | /* MC_CMD_SENSOR_INFO_EXT_OUT msgresponse */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 3603 | #define MC_CMD_SENSOR_INFO_EXT_OUT_LENMIN 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3604 | #define MC_CMD_SENSOR_INFO_EXT_OUT_LENMAX 252 |
| 3605 | #define MC_CMD_SENSOR_INFO_EXT_OUT_LEN(num) (4+8*(num)) |
| 3606 | #define MC_CMD_SENSOR_INFO_EXT_OUT_MASK_OFST 0 |
| 3607 | /* Enum values, see field(s): */ |
| 3608 | /* MC_CMD_SENSOR_INFO_OUT */ |
| 3609 | #define MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_LBN 31 |
| 3610 | #define MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_WIDTH 1 |
| 3611 | /* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF */ |
| 3612 | /* MC_CMD_SENSOR_ENTRY_OFST 4 */ |
| 3613 | /* MC_CMD_SENSOR_ENTRY_LEN 8 */ |
| 3614 | /* MC_CMD_SENSOR_ENTRY_LO_OFST 4 */ |
| 3615 | /* MC_CMD_SENSOR_ENTRY_HI_OFST 8 */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 3616 | /* MC_CMD_SENSOR_ENTRY_MINNUM 0 */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3617 | /* MC_CMD_SENSOR_ENTRY_MAXNUM 31 */ |
| 3618 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3619 | /* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF structuredef */ |
| 3620 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_LEN 8 |
| 3621 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_OFST 0 |
| 3622 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_LEN 2 |
| 3623 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_LBN 0 |
| 3624 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_WIDTH 16 |
| 3625 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_OFST 2 |
| 3626 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_LEN 2 |
| 3627 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_LBN 16 |
| 3628 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_WIDTH 16 |
| 3629 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_OFST 4 |
| 3630 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_LEN 2 |
| 3631 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_LBN 32 |
| 3632 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_WIDTH 16 |
| 3633 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_OFST 6 |
| 3634 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_LEN 2 |
| 3635 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_LBN 48 |
| 3636 | #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_WIDTH 16 |
| 3637 | |
| 3638 | |
| 3639 | /***********************************/ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3640 | /* MC_CMD_READ_SENSORS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3641 | * Returns the current reading from each sensor. DMAs an array of sensor |
| 3642 | * readings, in order of sensor type (but without gaps for unimplemented |
| 3643 | * sensors), into host memory. Each array element is a |
| 3644 | * MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF dword. |
| 3645 | * |
| 3646 | * If the request does not contain the LENGTH field then only sensors 0 to 30 |
| 3647 | * are reported, to avoid DMA buffer overflow in older host software. If the |
| 3648 | * sensor reading require more space than the LENGTH allows, then return |
| 3649 | * EINVAL. |
| 3650 | * |
| 3651 | * The MC will send a SENSOREVT event every time any sensor changes state. The |
| 3652 | * driver is responsible for ensuring that it doesn't miss any events. The |
| 3653 | * board will function normally if all sensors are in STATE_OK or |
| 3654 | * STATE_WARNING. Otherwise the board should not be expected to function. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3655 | */ |
| 3656 | #define MC_CMD_READ_SENSORS 0x42 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3657 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3658 | #define MC_CMD_0x42_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3659 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3660 | /* MC_CMD_READ_SENSORS_IN msgrequest */ |
| 3661 | #define MC_CMD_READ_SENSORS_IN_LEN 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3662 | /* DMA address of host buffer for sensor readings (must be 4Kbyte aligned). */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3663 | #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_OFST 0 |
| 3664 | #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_LEN 8 |
| 3665 | #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_LO_OFST 0 |
| 3666 | #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_HI_OFST 4 |
| 3667 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3668 | /* MC_CMD_READ_SENSORS_EXT_IN msgrequest */ |
| 3669 | #define MC_CMD_READ_SENSORS_EXT_IN_LEN 12 |
| 3670 | /* DMA address of host buffer for sensor readings */ |
| 3671 | #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_OFST 0 |
| 3672 | #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_LEN 8 |
| 3673 | #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_LO_OFST 0 |
| 3674 | #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_HI_OFST 4 |
| 3675 | /* Size in bytes of host buffer. */ |
| 3676 | #define MC_CMD_READ_SENSORS_EXT_IN_LENGTH_OFST 8 |
| 3677 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3678 | /* MC_CMD_READ_SENSORS_OUT msgresponse */ |
| 3679 | #define MC_CMD_READ_SENSORS_OUT_LEN 0 |
| 3680 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3681 | /* MC_CMD_READ_SENSORS_EXT_OUT msgresponse */ |
| 3682 | #define MC_CMD_READ_SENSORS_EXT_OUT_LEN 0 |
| 3683 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3684 | /* MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF structuredef */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3685 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_LEN 4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3686 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_OFST 0 |
| 3687 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_LEN 2 |
| 3688 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_LBN 0 |
| 3689 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_WIDTH 16 |
| 3690 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_OFST 2 |
| 3691 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_LEN 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3692 | /* enum: Ok. */ |
| 3693 | #define MC_CMD_SENSOR_STATE_OK 0x0 |
| 3694 | /* enum: Breached warning threshold. */ |
| 3695 | #define MC_CMD_SENSOR_STATE_WARNING 0x1 |
| 3696 | /* enum: Breached fatal threshold. */ |
| 3697 | #define MC_CMD_SENSOR_STATE_FATAL 0x2 |
| 3698 | /* enum: Fault with sensor. */ |
| 3699 | #define MC_CMD_SENSOR_STATE_BROKEN 0x3 |
| 3700 | /* enum: Sensor is working but does not currently have a reading. */ |
| 3701 | #define MC_CMD_SENSOR_STATE_NO_READING 0x4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3702 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_LBN 16 |
| 3703 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_WIDTH 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3704 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_OFST 3 |
| 3705 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_LEN 1 |
| 3706 | /* Enum values, see field(s): */ |
| 3707 | /* MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */ |
| 3708 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_LBN 24 |
| 3709 | #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_WIDTH 8 |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3710 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3711 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3712 | /***********************************/ |
| 3713 | /* MC_CMD_GET_PHY_STATE |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3714 | * Report current state of PHY. A 'zombie' PHY is a PHY that has failed to boot |
| 3715 | * (e.g. due to missing or corrupted firmware). Locks required: None. Return |
| 3716 | * code: 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3717 | */ |
| 3718 | #define MC_CMD_GET_PHY_STATE 0x43 |
| 3719 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3720 | #define MC_CMD_0x43_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 3721 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3722 | /* MC_CMD_GET_PHY_STATE_IN msgrequest */ |
| 3723 | #define MC_CMD_GET_PHY_STATE_IN_LEN 0 |
| 3724 | |
| 3725 | /* MC_CMD_GET_PHY_STATE_OUT msgresponse */ |
| 3726 | #define MC_CMD_GET_PHY_STATE_OUT_LEN 4 |
| 3727 | #define MC_CMD_GET_PHY_STATE_OUT_STATE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3728 | /* enum: Ok. */ |
| 3729 | #define MC_CMD_PHY_STATE_OK 0x1 |
| 3730 | /* enum: Faulty. */ |
| 3731 | #define MC_CMD_PHY_STATE_ZOMBIE 0x2 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3732 | |
| 3733 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3734 | /***********************************/ |
| 3735 | /* MC_CMD_SETUP_8021QBB |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3736 | * 802.1Qbb control. 8 Tx queues that map to priorities 0 - 7. Use all 1s to |
| 3737 | * disable 802.Qbb for a given priority. |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3738 | */ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3739 | #define MC_CMD_SETUP_8021QBB 0x44 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3740 | |
| 3741 | /* MC_CMD_SETUP_8021QBB_IN msgrequest */ |
| 3742 | #define MC_CMD_SETUP_8021QBB_IN_LEN 32 |
| 3743 | #define MC_CMD_SETUP_8021QBB_IN_TXQS_OFST 0 |
| 3744 | #define MC_CMD_SETUP_8021QBB_IN_TXQS_LEN 32 |
| 3745 | |
| 3746 | /* MC_CMD_SETUP_8021QBB_OUT msgresponse */ |
| 3747 | #define MC_CMD_SETUP_8021QBB_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3748 | |
| 3749 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3750 | /***********************************/ |
| 3751 | /* MC_CMD_WOL_FILTER_GET |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3752 | * Retrieve ID of any WoL filters. Locks required: None. Returns: 0, ENOSYS |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3753 | */ |
| 3754 | #define MC_CMD_WOL_FILTER_GET 0x45 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3755 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3756 | #define MC_CMD_0x45_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 3757 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3758 | /* MC_CMD_WOL_FILTER_GET_IN msgrequest */ |
| 3759 | #define MC_CMD_WOL_FILTER_GET_IN_LEN 0 |
| 3760 | |
| 3761 | /* MC_CMD_WOL_FILTER_GET_OUT msgresponse */ |
| 3762 | #define MC_CMD_WOL_FILTER_GET_OUT_LEN 4 |
| 3763 | #define MC_CMD_WOL_FILTER_GET_OUT_FILTER_ID_OFST 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3764 | |
| 3765 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3766 | /***********************************/ |
| 3767 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3768 | * Add a protocol offload to NIC for lights-out state. Locks required: None. |
| 3769 | * Returns: 0, ENOSYS |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3770 | */ |
| 3771 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD 0x46 |
| 3772 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3773 | #define MC_CMD_0x46_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 3774 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3775 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN msgrequest */ |
| 3776 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMIN 8 |
| 3777 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMAX 252 |
| 3778 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LEN(num) (4+4*(num)) |
| 3779 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 |
| 3780 | #define MC_CMD_LIGHTSOUT_OFFLOAD_PROTOCOL_ARP 0x1 /* enum */ |
| 3781 | #define MC_CMD_LIGHTSOUT_OFFLOAD_PROTOCOL_NS 0x2 /* enum */ |
| 3782 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_OFST 4 |
| 3783 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_LEN 4 |
| 3784 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MINNUM 1 |
| 3785 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MAXNUM 62 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3786 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3787 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP msgrequest */ |
| 3788 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_LEN 14 |
| 3789 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 */ |
| 3790 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_MAC_OFST 4 |
| 3791 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_MAC_LEN 6 |
| 3792 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_IP_OFST 10 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3793 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3794 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS msgrequest */ |
| 3795 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_LEN 42 |
| 3796 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 */ |
| 3797 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_MAC_OFST 4 |
| 3798 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_MAC_LEN 6 |
| 3799 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_SNIPV6_OFST 10 |
| 3800 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_SNIPV6_LEN 16 |
| 3801 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_IPV6_OFST 26 |
| 3802 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_IPV6_LEN 16 |
| 3803 | |
| 3804 | /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT msgresponse */ |
| 3805 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_LEN 4 |
| 3806 | #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_FILTER_ID_OFST 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3807 | |
| 3808 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3809 | /***********************************/ |
| 3810 | /* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3811 | * Remove a protocol offload from NIC for lights-out state. Locks required: |
| 3812 | * None. Returns: 0, ENOSYS |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3813 | */ |
| 3814 | #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD 0x47 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3815 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3816 | #define MC_CMD_0x47_PRIVILEGE_CTG SRIOV_CTG_LINK |
| 3817 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3818 | /* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN msgrequest */ |
| 3819 | #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_LEN 8 |
| 3820 | #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 |
| 3821 | #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_FILTER_ID_OFST 4 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3822 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3823 | /* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT msgresponse */ |
| 3824 | #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3825 | |
| 3826 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3827 | /***********************************/ |
| 3828 | /* MC_CMD_MAC_RESET_RESTORE |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3829 | * Restore MAC after block reset. Locks required: None. Returns: 0. |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3830 | */ |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3831 | #define MC_CMD_MAC_RESET_RESTORE 0x48 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3832 | |
| 3833 | /* MC_CMD_MAC_RESET_RESTORE_IN msgrequest */ |
| 3834 | #define MC_CMD_MAC_RESET_RESTORE_IN_LEN 0 |
| 3835 | |
| 3836 | /* MC_CMD_MAC_RESET_RESTORE_OUT msgresponse */ |
| 3837 | #define MC_CMD_MAC_RESET_RESTORE_OUT_LEN 0 |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 3838 | |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3839 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3840 | /***********************************/ |
| 3841 | /* MC_CMD_TESTASSERT |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3842 | * Deliberately trigger an assert-detonation in the firmware for testing |
| 3843 | * purposes (i.e. to allow tests that the driver copes gracefully). Locks |
| 3844 | * required: None Returns: 0 |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3845 | */ |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3846 | #define MC_CMD_TESTASSERT 0x49 |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3847 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3848 | #define MC_CMD_0x49_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3849 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3850 | /* MC_CMD_TESTASSERT_IN msgrequest */ |
| 3851 | #define MC_CMD_TESTASSERT_IN_LEN 0 |
| 3852 | |
| 3853 | /* MC_CMD_TESTASSERT_OUT msgresponse */ |
| 3854 | #define MC_CMD_TESTASSERT_OUT_LEN 0 |
| 3855 | |
| 3856 | |
| 3857 | /***********************************/ |
| 3858 | /* MC_CMD_WORKAROUND |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3859 | * Enable/Disable a given workaround. The mcfw will return EINVAL if it doesn't |
| 3860 | * understand the given workaround number - which should not be treated as a |
| 3861 | * hard error by client code. This op does not imply any semantics about each |
| 3862 | * workaround, that's between the driver and the mcfw on a per-workaround |
| 3863 | * basis. Locks required: None. Returns: 0, EINVAL . |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3864 | */ |
| 3865 | #define MC_CMD_WORKAROUND 0x4a |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3866 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3867 | #define MC_CMD_0x4a_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3868 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3869 | /* MC_CMD_WORKAROUND_IN msgrequest */ |
| 3870 | #define MC_CMD_WORKAROUND_IN_LEN 8 |
| 3871 | #define MC_CMD_WORKAROUND_IN_TYPE_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3872 | /* enum: Bug 17230 work around. */ |
| 3873 | #define MC_CMD_WORKAROUND_BUG17230 0x1 |
| 3874 | /* enum: Bug 35388 work around (unsafe EVQ writes). */ |
| 3875 | #define MC_CMD_WORKAROUND_BUG35388 0x2 |
| 3876 | /* enum: Bug35017 workaround (A64 tables must be identity map) */ |
| 3877 | #define MC_CMD_WORKAROUND_BUG35017 0x3 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3878 | #define MC_CMD_WORKAROUND_IN_ENABLED_OFST 4 |
| 3879 | |
| 3880 | /* MC_CMD_WORKAROUND_OUT msgresponse */ |
| 3881 | #define MC_CMD_WORKAROUND_OUT_LEN 0 |
| 3882 | |
| 3883 | |
| 3884 | /***********************************/ |
| 3885 | /* MC_CMD_GET_PHY_MEDIA_INFO |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3886 | * Read media-specific data from PHY (e.g. SFP/SFP+ module ID information for |
| 3887 | * SFP+ PHYs). The 'media type' can be found via GET_PHY_CFG |
| 3888 | * (GET_PHY_CFG_OUT_MEDIA_TYPE); the valid 'page number' input values, and the |
| 3889 | * output data, are interpreted on a per-type basis. For SFP+: PAGE=0 or 1 |
| 3890 | * returns a 128-byte block read from module I2C address 0xA0 offset 0 or 0x80. |
| 3891 | * Anything else: currently undefined. Locks required: None. Return code: 0. |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3892 | */ |
| 3893 | #define MC_CMD_GET_PHY_MEDIA_INFO 0x4b |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3894 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3895 | #define MC_CMD_0x4b_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3896 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3897 | /* MC_CMD_GET_PHY_MEDIA_INFO_IN msgrequest */ |
| 3898 | #define MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN 4 |
| 3899 | #define MC_CMD_GET_PHY_MEDIA_INFO_IN_PAGE_OFST 0 |
| 3900 | |
| 3901 | /* MC_CMD_GET_PHY_MEDIA_INFO_OUT msgresponse */ |
| 3902 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMIN 5 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 3903 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX 252 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3904 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(num) (4+1*(num)) |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3905 | /* in bytes */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3906 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_OFST 0 |
| 3907 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_OFST 4 |
| 3908 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_LEN 1 |
| 3909 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MINNUM 1 |
Ben Hutchings | 576eda8 | 2012-09-19 02:46:37 +0100 | [diff] [blame] | 3910 | #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MAXNUM 248 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3911 | |
| 3912 | |
| 3913 | /***********************************/ |
| 3914 | /* MC_CMD_NVRAM_TEST |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3915 | * Test a particular NVRAM partition for valid contents (where "valid" depends |
| 3916 | * on the type of partition). |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3917 | */ |
| 3918 | #define MC_CMD_NVRAM_TEST 0x4c |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3919 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3920 | #define MC_CMD_0x4c_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3921 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3922 | /* MC_CMD_NVRAM_TEST_IN msgrequest */ |
| 3923 | #define MC_CMD_NVRAM_TEST_IN_LEN 4 |
| 3924 | #define MC_CMD_NVRAM_TEST_IN_TYPE_OFST 0 |
| 3925 | /* Enum values, see field(s): */ |
| 3926 | /* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ |
| 3927 | |
| 3928 | /* MC_CMD_NVRAM_TEST_OUT msgresponse */ |
| 3929 | #define MC_CMD_NVRAM_TEST_OUT_LEN 4 |
| 3930 | #define MC_CMD_NVRAM_TEST_OUT_RESULT_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3931 | /* enum: Passed. */ |
| 3932 | #define MC_CMD_NVRAM_TEST_PASS 0x0 |
| 3933 | /* enum: Failed. */ |
| 3934 | #define MC_CMD_NVRAM_TEST_FAIL 0x1 |
| 3935 | /* enum: Not supported. */ |
| 3936 | #define MC_CMD_NVRAM_TEST_NOTSUPP 0x2 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3937 | |
| 3938 | |
| 3939 | /***********************************/ |
| 3940 | /* MC_CMD_MRSFP_TWEAK |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3941 | * Read status and/or set parameters for the 'mrsfp' driver in mr_rusty builds. |
| 3942 | * I2C I/O expander bits are always read; if equaliser parameters are supplied, |
| 3943 | * they are configured first. Locks required: None. Return code: 0, EINVAL. |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3944 | */ |
| 3945 | #define MC_CMD_MRSFP_TWEAK 0x4d |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 3946 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3947 | /* MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG msgrequest */ |
| 3948 | #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_LEN 16 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3949 | /* 0-6 low->high de-emph. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3950 | #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_LEVEL_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3951 | /* 0-8 low->high ref.V */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3952 | #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_DT_CFG_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3953 | /* 0-8 0-8 low->high boost */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3954 | #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_BOOST_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3955 | /* 0-8 low->high ref.V */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3956 | #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_DT_CFG_OFST 12 |
Ben Hutchings | fbcfe8e | 2010-04-28 09:29:14 +0000 | [diff] [blame] | 3957 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3958 | /* MC_CMD_MRSFP_TWEAK_IN_READ_ONLY msgrequest */ |
| 3959 | #define MC_CMD_MRSFP_TWEAK_IN_READ_ONLY_LEN 0 |
| 3960 | |
| 3961 | /* MC_CMD_MRSFP_TWEAK_OUT msgresponse */ |
| 3962 | #define MC_CMD_MRSFP_TWEAK_OUT_LEN 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3963 | /* input bits */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3964 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_INPUTS_OFST 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3965 | /* output bits */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3966 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3967 | /* direction */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3968 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3969 | /* enum: Out. */ |
| 3970 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OUT 0x0 |
| 3971 | /* enum: In. */ |
| 3972 | #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_IN 0x1 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3973 | |
| 3974 | |
| 3975 | /***********************************/ |
| 3976 | /* MC_CMD_SENSOR_SET_LIMS |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3977 | * Adjusts the sensor limits. This is a warranty-voiding operation. Returns: |
| 3978 | * ENOENT if the sensor specified does not exist, EINVAL if the limits are out |
| 3979 | * of range. |
Ben Hutchings | fbcfe8e | 2010-04-28 09:29:14 +0000 | [diff] [blame] | 3980 | */ |
| 3981 | #define MC_CMD_SENSOR_SET_LIMS 0x4e |
Ben Hutchings | fbcfe8e | 2010-04-28 09:29:14 +0000 | [diff] [blame] | 3982 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 3983 | #define MC_CMD_0x4e_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 3984 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3985 | /* MC_CMD_SENSOR_SET_LIMS_IN msgrequest */ |
| 3986 | #define MC_CMD_SENSOR_SET_LIMS_IN_LEN 20 |
| 3987 | #define MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_OFST 0 |
| 3988 | /* Enum values, see field(s): */ |
| 3989 | /* MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3990 | /* interpretation is is sensor-specific. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3991 | #define MC_CMD_SENSOR_SET_LIMS_IN_LOW0_OFST 4 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3992 | /* interpretation is is sensor-specific. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3993 | #define MC_CMD_SENSOR_SET_LIMS_IN_HI0_OFST 8 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3994 | /* interpretation is is sensor-specific. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3995 | #define MC_CMD_SENSOR_SET_LIMS_IN_LOW1_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 3996 | /* interpretation is is sensor-specific. */ |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 3997 | #define MC_CMD_SENSOR_SET_LIMS_IN_HI1_OFST 16 |
| 3998 | |
| 3999 | /* MC_CMD_SENSOR_SET_LIMS_OUT msgresponse */ |
| 4000 | #define MC_CMD_SENSOR_SET_LIMS_OUT_LEN 0 |
| 4001 | |
| 4002 | |
| 4003 | /***********************************/ |
| 4004 | /* MC_CMD_GET_RESOURCE_LIMITS |
| 4005 | */ |
| 4006 | #define MC_CMD_GET_RESOURCE_LIMITS 0x4f |
| 4007 | |
| 4008 | /* MC_CMD_GET_RESOURCE_LIMITS_IN msgrequest */ |
| 4009 | #define MC_CMD_GET_RESOURCE_LIMITS_IN_LEN 0 |
| 4010 | |
| 4011 | /* MC_CMD_GET_RESOURCE_LIMITS_OUT msgresponse */ |
| 4012 | #define MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN 16 |
| 4013 | #define MC_CMD_GET_RESOURCE_LIMITS_OUT_BUFTBL_OFST 0 |
| 4014 | #define MC_CMD_GET_RESOURCE_LIMITS_OUT_EVQ_OFST 4 |
| 4015 | #define MC_CMD_GET_RESOURCE_LIMITS_OUT_RXQ_OFST 8 |
| 4016 | #define MC_CMD_GET_RESOURCE_LIMITS_OUT_TXQ_OFST 12 |
| 4017 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4018 | |
| 4019 | /***********************************/ |
| 4020 | /* MC_CMD_NVRAM_PARTITIONS |
| 4021 | * Reads the list of available virtual NVRAM partition types. Locks required: |
| 4022 | * none. Returns: 0, EINVAL (bad type). |
| 4023 | */ |
| 4024 | #define MC_CMD_NVRAM_PARTITIONS 0x51 |
| 4025 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4026 | #define MC_CMD_0x51_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 4027 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4028 | /* MC_CMD_NVRAM_PARTITIONS_IN msgrequest */ |
| 4029 | #define MC_CMD_NVRAM_PARTITIONS_IN_LEN 0 |
| 4030 | |
| 4031 | /* MC_CMD_NVRAM_PARTITIONS_OUT msgresponse */ |
| 4032 | #define MC_CMD_NVRAM_PARTITIONS_OUT_LENMIN 4 |
| 4033 | #define MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX 252 |
| 4034 | #define MC_CMD_NVRAM_PARTITIONS_OUT_LEN(num) (4+4*(num)) |
| 4035 | /* total number of partitions */ |
| 4036 | #define MC_CMD_NVRAM_PARTITIONS_OUT_NUM_PARTITIONS_OFST 0 |
| 4037 | /* type ID code for each of NUM_PARTITIONS partitions */ |
| 4038 | #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_OFST 4 |
| 4039 | #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_LEN 4 |
| 4040 | #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MINNUM 0 |
| 4041 | #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MAXNUM 62 |
| 4042 | |
| 4043 | |
| 4044 | /***********************************/ |
| 4045 | /* MC_CMD_NVRAM_METADATA |
| 4046 | * Reads soft metadata for a virtual NVRAM partition type. Locks required: |
| 4047 | * none. Returns: 0, EINVAL (bad type). |
| 4048 | */ |
| 4049 | #define MC_CMD_NVRAM_METADATA 0x52 |
| 4050 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4051 | #define MC_CMD_0x52_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 4052 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4053 | /* MC_CMD_NVRAM_METADATA_IN msgrequest */ |
| 4054 | #define MC_CMD_NVRAM_METADATA_IN_LEN 4 |
| 4055 | /* Partition type ID code */ |
| 4056 | #define MC_CMD_NVRAM_METADATA_IN_TYPE_OFST 0 |
| 4057 | |
| 4058 | /* MC_CMD_NVRAM_METADATA_OUT msgresponse */ |
| 4059 | #define MC_CMD_NVRAM_METADATA_OUT_LENMIN 20 |
| 4060 | #define MC_CMD_NVRAM_METADATA_OUT_LENMAX 252 |
| 4061 | #define MC_CMD_NVRAM_METADATA_OUT_LEN(num) (20+1*(num)) |
| 4062 | /* Partition type ID code */ |
| 4063 | #define MC_CMD_NVRAM_METADATA_OUT_TYPE_OFST 0 |
| 4064 | #define MC_CMD_NVRAM_METADATA_OUT_FLAGS_OFST 4 |
| 4065 | #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_LBN 0 |
| 4066 | #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_WIDTH 1 |
| 4067 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_LBN 1 |
| 4068 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_WIDTH 1 |
| 4069 | #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_LBN 2 |
| 4070 | #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_WIDTH 1 |
| 4071 | /* Subtype ID code for content of this partition */ |
| 4072 | #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_OFST 8 |
| 4073 | /* 1st component of W.X.Y.Z version number for content of this partition */ |
| 4074 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_W_OFST 12 |
| 4075 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_W_LEN 2 |
| 4076 | /* 2nd component of W.X.Y.Z version number for content of this partition */ |
| 4077 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_X_OFST 14 |
| 4078 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_X_LEN 2 |
| 4079 | /* 3rd component of W.X.Y.Z version number for content of this partition */ |
| 4080 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Y_OFST 16 |
| 4081 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Y_LEN 2 |
| 4082 | /* 4th component of W.X.Y.Z version number for content of this partition */ |
| 4083 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Z_OFST 18 |
| 4084 | #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Z_LEN 2 |
| 4085 | /* Zero-terminated string describing the content of this partition */ |
| 4086 | #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_OFST 20 |
| 4087 | #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_LEN 1 |
| 4088 | #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MINNUM 0 |
| 4089 | #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MAXNUM 232 |
| 4090 | |
| 4091 | |
| 4092 | /***********************************/ |
| 4093 | /* MC_CMD_GET_MAC_ADDRESSES |
| 4094 | * Returns the base MAC, count and stride for the requestiong function |
| 4095 | */ |
| 4096 | #define MC_CMD_GET_MAC_ADDRESSES 0x55 |
| 4097 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4098 | #define MC_CMD_0x55_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4099 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4100 | /* MC_CMD_GET_MAC_ADDRESSES_IN msgrequest */ |
| 4101 | #define MC_CMD_GET_MAC_ADDRESSES_IN_LEN 0 |
| 4102 | |
| 4103 | /* MC_CMD_GET_MAC_ADDRESSES_OUT msgresponse */ |
| 4104 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_LEN 16 |
| 4105 | /* Base MAC address */ |
| 4106 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE_OFST 0 |
| 4107 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE_LEN 6 |
| 4108 | /* Padding */ |
| 4109 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_RESERVED_OFST 6 |
| 4110 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_RESERVED_LEN 2 |
| 4111 | /* Number of allocated MAC addresses */ |
| 4112 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_COUNT_OFST 8 |
| 4113 | /* Spacing of allocated MAC addresses */ |
| 4114 | #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_STRIDE_OFST 12 |
| 4115 | |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 4116 | /* MC_CMD_RESOURCE_SPECIFIER enum */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4117 | /* enum: Any */ |
| 4118 | #define MC_CMD_RESOURCE_INSTANCE_ANY 0xffffffff |
| 4119 | /* enum: None */ |
| 4120 | #define MC_CMD_RESOURCE_INSTANCE_NONE 0xfffffffe |
| 4121 | |
| 4122 | /* EVB_PORT_ID structuredef */ |
| 4123 | #define EVB_PORT_ID_LEN 4 |
| 4124 | #define EVB_PORT_ID_PORT_ID_OFST 0 |
| 4125 | /* enum: An invalid port handle. */ |
| 4126 | #define EVB_PORT_ID_NULL 0x0 |
| 4127 | /* enum: The port assigned to this function.. */ |
| 4128 | #define EVB_PORT_ID_ASSIGNED 0x1000000 |
| 4129 | /* enum: External network port 0 */ |
| 4130 | #define EVB_PORT_ID_MAC0 0x2000000 |
| 4131 | /* enum: External network port 1 */ |
| 4132 | #define EVB_PORT_ID_MAC1 0x2000001 |
| 4133 | /* enum: External network port 2 */ |
| 4134 | #define EVB_PORT_ID_MAC2 0x2000002 |
| 4135 | /* enum: External network port 3 */ |
| 4136 | #define EVB_PORT_ID_MAC3 0x2000003 |
| 4137 | #define EVB_PORT_ID_PORT_ID_LBN 0 |
| 4138 | #define EVB_PORT_ID_PORT_ID_WIDTH 32 |
| 4139 | |
| 4140 | /* EVB_VLAN_TAG structuredef */ |
| 4141 | #define EVB_VLAN_TAG_LEN 2 |
| 4142 | /* The VLAN tag value */ |
| 4143 | #define EVB_VLAN_TAG_VLAN_ID_LBN 0 |
| 4144 | #define EVB_VLAN_TAG_VLAN_ID_WIDTH 12 |
| 4145 | #define EVB_VLAN_TAG_MODE_LBN 12 |
| 4146 | #define EVB_VLAN_TAG_MODE_WIDTH 4 |
| 4147 | /* enum: Insert the VLAN. */ |
| 4148 | #define EVB_VLAN_TAG_INSERT 0x0 |
| 4149 | /* enum: Replace the VLAN if already present. */ |
| 4150 | #define EVB_VLAN_TAG_REPLACE 0x1 |
| 4151 | |
| 4152 | /* BUFTBL_ENTRY structuredef */ |
| 4153 | #define BUFTBL_ENTRY_LEN 12 |
| 4154 | /* the owner ID */ |
| 4155 | #define BUFTBL_ENTRY_OID_OFST 0 |
| 4156 | #define BUFTBL_ENTRY_OID_LEN 2 |
| 4157 | #define BUFTBL_ENTRY_OID_LBN 0 |
| 4158 | #define BUFTBL_ENTRY_OID_WIDTH 16 |
| 4159 | /* the page parameter as one of ESE_DZ_SMC_PAGE_SIZE_ */ |
| 4160 | #define BUFTBL_ENTRY_PGSZ_OFST 2 |
| 4161 | #define BUFTBL_ENTRY_PGSZ_LEN 2 |
| 4162 | #define BUFTBL_ENTRY_PGSZ_LBN 16 |
| 4163 | #define BUFTBL_ENTRY_PGSZ_WIDTH 16 |
| 4164 | /* the raw 64-bit address field from the SMC, not adjusted for page size */ |
| 4165 | #define BUFTBL_ENTRY_RAWADDR_OFST 4 |
| 4166 | #define BUFTBL_ENTRY_RAWADDR_LEN 8 |
| 4167 | #define BUFTBL_ENTRY_RAWADDR_LO_OFST 4 |
| 4168 | #define BUFTBL_ENTRY_RAWADDR_HI_OFST 8 |
| 4169 | #define BUFTBL_ENTRY_RAWADDR_LBN 32 |
| 4170 | #define BUFTBL_ENTRY_RAWADDR_WIDTH 64 |
| 4171 | |
| 4172 | /* NVRAM_PARTITION_TYPE structuredef */ |
| 4173 | #define NVRAM_PARTITION_TYPE_LEN 2 |
| 4174 | #define NVRAM_PARTITION_TYPE_ID_OFST 0 |
| 4175 | #define NVRAM_PARTITION_TYPE_ID_LEN 2 |
| 4176 | /* enum: Primary MC firmware partition */ |
| 4177 | #define NVRAM_PARTITION_TYPE_MC_FIRMWARE 0x100 |
| 4178 | /* enum: Secondary MC firmware partition */ |
| 4179 | #define NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP 0x200 |
| 4180 | /* enum: Expansion ROM partition */ |
| 4181 | #define NVRAM_PARTITION_TYPE_EXPANSION_ROM 0x300 |
| 4182 | /* enum: Static configuration TLV partition */ |
| 4183 | #define NVRAM_PARTITION_TYPE_STATIC_CONFIG 0x400 |
| 4184 | /* enum: Dynamic configuration TLV partition */ |
| 4185 | #define NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG 0x500 |
| 4186 | /* enum: Expansion ROM configuration data for port 0 */ |
| 4187 | #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0 0x600 |
| 4188 | /* enum: Expansion ROM configuration data for port 1 */ |
| 4189 | #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT1 0x601 |
| 4190 | /* enum: Expansion ROM configuration data for port 2 */ |
| 4191 | #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT2 0x602 |
| 4192 | /* enum: Expansion ROM configuration data for port 3 */ |
| 4193 | #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT3 0x603 |
| 4194 | /* enum: Non-volatile log output partition */ |
| 4195 | #define NVRAM_PARTITION_TYPE_LOG 0x700 |
| 4196 | /* enum: Device state dump output partition */ |
| 4197 | #define NVRAM_PARTITION_TYPE_DUMP 0x800 |
| 4198 | /* enum: Application license key storage partition */ |
| 4199 | #define NVRAM_PARTITION_TYPE_LICENSE 0x900 |
Matthew Slattery | bedca86 | 2013-08-23 17:32:55 +0100 | [diff] [blame] | 4200 | /* enum: Start of range used for PHY partitions (low 8 bits are the PHY ID) */ |
| 4201 | #define NVRAM_PARTITION_TYPE_PHY_MIN 0xa00 |
| 4202 | /* enum: End of range used for PHY partitions (low 8 bits are the PHY ID) */ |
| 4203 | #define NVRAM_PARTITION_TYPE_PHY_MAX 0xaff |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4204 | /* enum: Start of reserved value range (firmware may use for any purpose) */ |
| 4205 | #define NVRAM_PARTITION_TYPE_RESERVED_VALUES_MIN 0xff00 |
| 4206 | /* enum: End of reserved value range (firmware may use for any purpose) */ |
| 4207 | #define NVRAM_PARTITION_TYPE_RESERVED_VALUES_MAX 0xfffd |
| 4208 | /* enum: Recovery partition map (provided if real map is missing or corrupt) */ |
| 4209 | #define NVRAM_PARTITION_TYPE_RECOVERY_MAP 0xfffe |
| 4210 | /* enum: Partition map (real map as stored in flash) */ |
| 4211 | #define NVRAM_PARTITION_TYPE_PARTITION_MAP 0xffff |
| 4212 | #define NVRAM_PARTITION_TYPE_ID_LBN 0 |
| 4213 | #define NVRAM_PARTITION_TYPE_ID_WIDTH 16 |
| 4214 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 4215 | /* LICENSED_APP_ID structuredef */ |
| 4216 | #define LICENSED_APP_ID_LEN 4 |
| 4217 | #define LICENSED_APP_ID_ID_OFST 0 |
| 4218 | /* enum: OpenOnload */ |
| 4219 | #define LICENSED_APP_ID_ONLOAD 0x1 |
| 4220 | /* enum: PTP timestamping */ |
| 4221 | #define LICENSED_APP_ID_PTP 0x2 |
| 4222 | /* enum: SolarCapture Pro */ |
| 4223 | #define LICENSED_APP_ID_SOLARCAPTURE_PRO 0x4 |
| 4224 | #define LICENSED_APP_ID_ID_LBN 0 |
| 4225 | #define LICENSED_APP_ID_ID_WIDTH 32 |
| 4226 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4227 | |
| 4228 | /***********************************/ |
Edward Cree | 267d9d7 | 2015-05-06 00:59:18 +0100 | [diff] [blame] | 4229 | /* MC_CMD_GET_WORKAROUNDS |
| 4230 | * Read the list of all implemented and all currently enabled workarounds. The |
| 4231 | * enums here must correspond with those in MC_CMD_WORKAROUND. |
| 4232 | */ |
| 4233 | #define MC_CMD_GET_WORKAROUNDS 0x59 |
| 4234 | |
| 4235 | /* MC_CMD_GET_WORKAROUNDS_OUT msgresponse */ |
| 4236 | #define MC_CMD_GET_WORKAROUNDS_OUT_LEN 8 |
| 4237 | /* Each workaround is represented by a single bit according to the enums below. |
| 4238 | */ |
| 4239 | #define MC_CMD_GET_WORKAROUNDS_OUT_IMPLEMENTED_OFST 0 |
| 4240 | #define MC_CMD_GET_WORKAROUNDS_OUT_ENABLED_OFST 4 |
| 4241 | /* enum: Bug 17230 work around. */ |
| 4242 | #define MC_CMD_GET_WORKAROUNDS_OUT_BUG17230 0x2 |
| 4243 | /* enum: Bug 35388 work around (unsafe EVQ writes). */ |
| 4244 | #define MC_CMD_GET_WORKAROUNDS_OUT_BUG35388 0x4 |
| 4245 | /* enum: Bug35017 workaround (A64 tables must be identity map) */ |
| 4246 | #define MC_CMD_GET_WORKAROUNDS_OUT_BUG35017 0x8 |
| 4247 | |
| 4248 | |
| 4249 | /***********************************/ |
Edward Cree | 4392dc6 | 2015-05-20 11:12:13 +0100 | [diff] [blame] | 4250 | /* MC_CMD_LINK_STATE_MODE |
| 4251 | * Read/set link state mode of a VF |
| 4252 | */ |
| 4253 | #define MC_CMD_LINK_STATE_MODE 0x5c |
| 4254 | |
| 4255 | #define MC_CMD_0x5c_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4256 | |
| 4257 | /* MC_CMD_LINK_STATE_MODE_IN msgrequest */ |
| 4258 | #define MC_CMD_LINK_STATE_MODE_IN_LEN 8 |
| 4259 | /* The target function to have its link state mode read or set, must be a VF |
| 4260 | * e.g. VF 1,3 = 0x00030001 |
| 4261 | */ |
| 4262 | #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_OFST 0 |
| 4263 | #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_LBN 0 |
| 4264 | #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_WIDTH 16 |
| 4265 | #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_LBN 16 |
| 4266 | #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_WIDTH 16 |
| 4267 | /* New link state mode to be set */ |
| 4268 | #define MC_CMD_LINK_STATE_MODE_IN_NEW_MODE_OFST 4 |
| 4269 | #define MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_AUTO 0x0 /* enum */ |
| 4270 | #define MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_UP 0x1 /* enum */ |
| 4271 | #define MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_DOWN 0x2 /* enum */ |
| 4272 | /* enum: Use this value to just read the existing setting without modifying it. |
| 4273 | */ |
| 4274 | #define MC_CMD_LINK_STATE_MODE_IN_DO_NOT_CHANGE 0xffffffff |
| 4275 | |
| 4276 | /* MC_CMD_LINK_STATE_MODE_OUT msgresponse */ |
| 4277 | #define MC_CMD_LINK_STATE_MODE_OUT_LEN 4 |
| 4278 | #define MC_CMD_LINK_STATE_MODE_OUT_OLD_MODE_OFST 0 |
| 4279 | |
| 4280 | |
| 4281 | /***********************************/ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4282 | /* MC_CMD_READ_REGS |
| 4283 | * Get a dump of the MCPU registers |
| 4284 | */ |
| 4285 | #define MC_CMD_READ_REGS 0x50 |
| 4286 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4287 | #define MC_CMD_0x50_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 4288 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4289 | /* MC_CMD_READ_REGS_IN msgrequest */ |
| 4290 | #define MC_CMD_READ_REGS_IN_LEN 0 |
| 4291 | |
| 4292 | /* MC_CMD_READ_REGS_OUT msgresponse */ |
| 4293 | #define MC_CMD_READ_REGS_OUT_LEN 308 |
| 4294 | /* Whether the corresponding register entry contains a valid value */ |
| 4295 | #define MC_CMD_READ_REGS_OUT_MASK_OFST 0 |
| 4296 | #define MC_CMD_READ_REGS_OUT_MASK_LEN 16 |
| 4297 | /* Same order as MIPS GDB (r0-r31, sr, lo, hi, bad, cause, 32 x float, fsr, |
| 4298 | * fir, fp) |
| 4299 | */ |
| 4300 | #define MC_CMD_READ_REGS_OUT_REGS_OFST 16 |
| 4301 | #define MC_CMD_READ_REGS_OUT_REGS_LEN 4 |
| 4302 | #define MC_CMD_READ_REGS_OUT_REGS_NUM 73 |
| 4303 | |
| 4304 | |
| 4305 | /***********************************/ |
| 4306 | /* MC_CMD_INIT_EVQ |
| 4307 | * Set up an event queue according to the supplied parameters. The IN arguments |
| 4308 | * end with an address for each 4k of host memory required to back the EVQ. |
| 4309 | */ |
| 4310 | #define MC_CMD_INIT_EVQ 0x80 |
| 4311 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4312 | #define MC_CMD_0x80_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4313 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4314 | /* MC_CMD_INIT_EVQ_IN msgrequest */ |
| 4315 | #define MC_CMD_INIT_EVQ_IN_LENMIN 44 |
| 4316 | #define MC_CMD_INIT_EVQ_IN_LENMAX 548 |
| 4317 | #define MC_CMD_INIT_EVQ_IN_LEN(num) (36+8*(num)) |
| 4318 | /* Size, in entries */ |
| 4319 | #define MC_CMD_INIT_EVQ_IN_SIZE_OFST 0 |
| 4320 | /* Desired instance. Must be set to a specific instance, which is a function |
| 4321 | * local queue index. |
| 4322 | */ |
| 4323 | #define MC_CMD_INIT_EVQ_IN_INSTANCE_OFST 4 |
| 4324 | /* The initial timer value. The load value is ignored if the timer mode is DIS. |
| 4325 | */ |
| 4326 | #define MC_CMD_INIT_EVQ_IN_TMR_LOAD_OFST 8 |
| 4327 | /* The reload value is ignored in one-shot modes */ |
| 4328 | #define MC_CMD_INIT_EVQ_IN_TMR_RELOAD_OFST 12 |
| 4329 | /* tbd */ |
| 4330 | #define MC_CMD_INIT_EVQ_IN_FLAGS_OFST 16 |
| 4331 | #define MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_LBN 0 |
| 4332 | #define MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_WIDTH 1 |
| 4333 | #define MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_LBN 1 |
| 4334 | #define MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_WIDTH 1 |
| 4335 | #define MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_LBN 2 |
| 4336 | #define MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_WIDTH 1 |
| 4337 | #define MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_LBN 3 |
| 4338 | #define MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_WIDTH 1 |
| 4339 | #define MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_LBN 4 |
| 4340 | #define MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_WIDTH 1 |
| 4341 | #define MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_LBN 5 |
| 4342 | #define MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_WIDTH 1 |
| 4343 | #define MC_CMD_INIT_EVQ_IN_TMR_MODE_OFST 20 |
| 4344 | /* enum: Disabled */ |
| 4345 | #define MC_CMD_INIT_EVQ_IN_TMR_MODE_DIS 0x0 |
| 4346 | /* enum: Immediate */ |
| 4347 | #define MC_CMD_INIT_EVQ_IN_TMR_IMMED_START 0x1 |
| 4348 | /* enum: Triggered */ |
| 4349 | #define MC_CMD_INIT_EVQ_IN_TMR_TRIG_START 0x2 |
| 4350 | /* enum: Hold-off */ |
| 4351 | #define MC_CMD_INIT_EVQ_IN_TMR_INT_HLDOFF 0x3 |
| 4352 | /* Target EVQ for wakeups if in wakeup mode. */ |
| 4353 | #define MC_CMD_INIT_EVQ_IN_TARGET_EVQ_OFST 24 |
| 4354 | /* Target interrupt if in interrupting mode (note union with target EVQ). Use |
| 4355 | * MC_CMD_RESOURCE_INSTANCE_ANY unless a specific one required for test |
| 4356 | * purposes. |
| 4357 | */ |
| 4358 | #define MC_CMD_INIT_EVQ_IN_IRQ_NUM_OFST 24 |
| 4359 | /* Event Counter Mode. */ |
| 4360 | #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_OFST 28 |
| 4361 | /* enum: Disabled */ |
| 4362 | #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_DIS 0x0 |
| 4363 | /* enum: Disabled */ |
| 4364 | #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_RX 0x1 |
| 4365 | /* enum: Disabled */ |
| 4366 | #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_TX 0x2 |
| 4367 | /* enum: Disabled */ |
| 4368 | #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_RXTX 0x3 |
| 4369 | /* Event queue packet count threshold. */ |
| 4370 | #define MC_CMD_INIT_EVQ_IN_COUNT_THRSHLD_OFST 32 |
| 4371 | /* 64-bit address of 4k of 4k-aligned host memory buffer */ |
| 4372 | #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_OFST 36 |
| 4373 | #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_LEN 8 |
| 4374 | #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_LO_OFST 36 |
| 4375 | #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_HI_OFST 40 |
| 4376 | #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_MINNUM 1 |
| 4377 | #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_MAXNUM 64 |
| 4378 | |
| 4379 | /* MC_CMD_INIT_EVQ_OUT msgresponse */ |
| 4380 | #define MC_CMD_INIT_EVQ_OUT_LEN 4 |
| 4381 | /* Only valid if INTRFLAG was true */ |
| 4382 | #define MC_CMD_INIT_EVQ_OUT_IRQ_OFST 0 |
| 4383 | |
| 4384 | /* QUEUE_CRC_MODE structuredef */ |
| 4385 | #define QUEUE_CRC_MODE_LEN 1 |
| 4386 | #define QUEUE_CRC_MODE_MODE_LBN 0 |
| 4387 | #define QUEUE_CRC_MODE_MODE_WIDTH 4 |
| 4388 | /* enum: No CRC. */ |
| 4389 | #define QUEUE_CRC_MODE_NONE 0x0 |
| 4390 | /* enum: CRC Fiber channel over ethernet. */ |
| 4391 | #define QUEUE_CRC_MODE_FCOE 0x1 |
| 4392 | /* enum: CRC (digest) iSCSI header only. */ |
| 4393 | #define QUEUE_CRC_MODE_ISCSI_HDR 0x2 |
| 4394 | /* enum: CRC (digest) iSCSI header and payload. */ |
| 4395 | #define QUEUE_CRC_MODE_ISCSI 0x3 |
| 4396 | /* enum: CRC Fiber channel over IP over ethernet. */ |
| 4397 | #define QUEUE_CRC_MODE_FCOIPOE 0x4 |
| 4398 | /* enum: CRC MPA. */ |
| 4399 | #define QUEUE_CRC_MODE_MPA 0x5 |
| 4400 | #define QUEUE_CRC_MODE_SPARE_LBN 4 |
| 4401 | #define QUEUE_CRC_MODE_SPARE_WIDTH 4 |
| 4402 | |
| 4403 | |
| 4404 | /***********************************/ |
| 4405 | /* MC_CMD_INIT_RXQ |
| 4406 | * set up a receive queue according to the supplied parameters. The IN |
| 4407 | * arguments end with an address for each 4k of host memory required to back |
| 4408 | * the RXQ. |
| 4409 | */ |
| 4410 | #define MC_CMD_INIT_RXQ 0x81 |
| 4411 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4412 | #define MC_CMD_0x81_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4413 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4414 | /* MC_CMD_INIT_RXQ_IN msgrequest */ |
| 4415 | #define MC_CMD_INIT_RXQ_IN_LENMIN 36 |
| 4416 | #define MC_CMD_INIT_RXQ_IN_LENMAX 252 |
| 4417 | #define MC_CMD_INIT_RXQ_IN_LEN(num) (28+8*(num)) |
| 4418 | /* Size, in entries */ |
| 4419 | #define MC_CMD_INIT_RXQ_IN_SIZE_OFST 0 |
| 4420 | /* The EVQ to send events to. This is an index originally specified to INIT_EVQ |
| 4421 | */ |
| 4422 | #define MC_CMD_INIT_RXQ_IN_TARGET_EVQ_OFST 4 |
| 4423 | /* The value to put in the event data. Check hardware spec. for valid range. */ |
| 4424 | #define MC_CMD_INIT_RXQ_IN_LABEL_OFST 8 |
| 4425 | /* Desired instance. Must be set to a specific instance, which is a function |
| 4426 | * local queue index. |
| 4427 | */ |
| 4428 | #define MC_CMD_INIT_RXQ_IN_INSTANCE_OFST 12 |
| 4429 | /* There will be more flags here. */ |
| 4430 | #define MC_CMD_INIT_RXQ_IN_FLAGS_OFST 16 |
| 4431 | #define MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_LBN 0 |
| 4432 | #define MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_WIDTH 1 |
| 4433 | #define MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_LBN 1 |
| 4434 | #define MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_WIDTH 1 |
| 4435 | #define MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_LBN 2 |
| 4436 | #define MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_WIDTH 1 |
| 4437 | #define MC_CMD_INIT_RXQ_IN_CRC_MODE_LBN 3 |
| 4438 | #define MC_CMD_INIT_RXQ_IN_CRC_MODE_WIDTH 4 |
| 4439 | #define MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_LBN 7 |
| 4440 | #define MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_WIDTH 1 |
| 4441 | #define MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_LBN 8 |
| 4442 | #define MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_WIDTH 1 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 4443 | #define MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_LBN 9 |
| 4444 | #define MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4445 | /* Owner ID to use if in buffer mode (zero if physical) */ |
| 4446 | #define MC_CMD_INIT_RXQ_IN_OWNER_ID_OFST 20 |
| 4447 | /* The port ID associated with the v-adaptor which should contain this DMAQ. */ |
| 4448 | #define MC_CMD_INIT_RXQ_IN_PORT_ID_OFST 24 |
| 4449 | /* 64-bit address of 4k of 4k-aligned host memory buffer */ |
| 4450 | #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_OFST 28 |
| 4451 | #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_LEN 8 |
| 4452 | #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_LO_OFST 28 |
| 4453 | #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_HI_OFST 32 |
| 4454 | #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_MINNUM 1 |
| 4455 | #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_MAXNUM 28 |
| 4456 | |
| 4457 | /* MC_CMD_INIT_RXQ_OUT msgresponse */ |
| 4458 | #define MC_CMD_INIT_RXQ_OUT_LEN 0 |
| 4459 | |
| 4460 | |
| 4461 | /***********************************/ |
| 4462 | /* MC_CMD_INIT_TXQ |
| 4463 | */ |
| 4464 | #define MC_CMD_INIT_TXQ 0x82 |
| 4465 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4466 | #define MC_CMD_0x82_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4467 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4468 | /* MC_CMD_INIT_TXQ_IN msgrequest */ |
| 4469 | #define MC_CMD_INIT_TXQ_IN_LENMIN 36 |
| 4470 | #define MC_CMD_INIT_TXQ_IN_LENMAX 252 |
| 4471 | #define MC_CMD_INIT_TXQ_IN_LEN(num) (28+8*(num)) |
| 4472 | /* Size, in entries */ |
| 4473 | #define MC_CMD_INIT_TXQ_IN_SIZE_OFST 0 |
| 4474 | /* The EVQ to send events to. This is an index originally specified to |
| 4475 | * INIT_EVQ. |
| 4476 | */ |
| 4477 | #define MC_CMD_INIT_TXQ_IN_TARGET_EVQ_OFST 4 |
| 4478 | /* The value to put in the event data. Check hardware spec. for valid range. */ |
| 4479 | #define MC_CMD_INIT_TXQ_IN_LABEL_OFST 8 |
| 4480 | /* Desired instance. Must be set to a specific instance, which is a function |
| 4481 | * local queue index. |
| 4482 | */ |
| 4483 | #define MC_CMD_INIT_TXQ_IN_INSTANCE_OFST 12 |
| 4484 | /* There will be more flags here. */ |
| 4485 | #define MC_CMD_INIT_TXQ_IN_FLAGS_OFST 16 |
| 4486 | #define MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_LBN 0 |
| 4487 | #define MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_WIDTH 1 |
| 4488 | #define MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_LBN 1 |
| 4489 | #define MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_WIDTH 1 |
| 4490 | #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_LBN 2 |
| 4491 | #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_WIDTH 1 |
| 4492 | #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_LBN 3 |
| 4493 | #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_WIDTH 1 |
| 4494 | #define MC_CMD_INIT_TXQ_IN_CRC_MODE_LBN 4 |
| 4495 | #define MC_CMD_INIT_TXQ_IN_CRC_MODE_WIDTH 4 |
| 4496 | #define MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_LBN 8 |
| 4497 | #define MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_WIDTH 1 |
| 4498 | #define MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_LBN 9 |
| 4499 | #define MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_WIDTH 1 |
| 4500 | /* Owner ID to use if in buffer mode (zero if physical) */ |
| 4501 | #define MC_CMD_INIT_TXQ_IN_OWNER_ID_OFST 20 |
| 4502 | /* The port ID associated with the v-adaptor which should contain this DMAQ. */ |
| 4503 | #define MC_CMD_INIT_TXQ_IN_PORT_ID_OFST 24 |
| 4504 | /* 64-bit address of 4k of 4k-aligned host memory buffer */ |
| 4505 | #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_OFST 28 |
| 4506 | #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_LEN 8 |
| 4507 | #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_LO_OFST 28 |
| 4508 | #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_HI_OFST 32 |
| 4509 | #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_MINNUM 1 |
| 4510 | #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_MAXNUM 28 |
| 4511 | |
| 4512 | /* MC_CMD_INIT_TXQ_OUT msgresponse */ |
| 4513 | #define MC_CMD_INIT_TXQ_OUT_LEN 0 |
| 4514 | |
| 4515 | |
| 4516 | /***********************************/ |
| 4517 | /* MC_CMD_FINI_EVQ |
| 4518 | * Teardown an EVQ. |
| 4519 | * |
| 4520 | * All DMAQs or EVQs that point to the EVQ to tear down must be torn down first |
| 4521 | * or the operation will fail with EBUSY |
| 4522 | */ |
| 4523 | #define MC_CMD_FINI_EVQ 0x83 |
| 4524 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4525 | #define MC_CMD_0x83_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4526 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4527 | /* MC_CMD_FINI_EVQ_IN msgrequest */ |
| 4528 | #define MC_CMD_FINI_EVQ_IN_LEN 4 |
| 4529 | /* Instance of EVQ to destroy. Should be the same instance as that previously |
| 4530 | * passed to INIT_EVQ |
| 4531 | */ |
| 4532 | #define MC_CMD_FINI_EVQ_IN_INSTANCE_OFST 0 |
| 4533 | |
| 4534 | /* MC_CMD_FINI_EVQ_OUT msgresponse */ |
| 4535 | #define MC_CMD_FINI_EVQ_OUT_LEN 0 |
| 4536 | |
| 4537 | |
| 4538 | /***********************************/ |
| 4539 | /* MC_CMD_FINI_RXQ |
| 4540 | * Teardown a RXQ. |
| 4541 | */ |
| 4542 | #define MC_CMD_FINI_RXQ 0x84 |
| 4543 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4544 | #define MC_CMD_0x84_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4545 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4546 | /* MC_CMD_FINI_RXQ_IN msgrequest */ |
| 4547 | #define MC_CMD_FINI_RXQ_IN_LEN 4 |
| 4548 | /* Instance of RXQ to destroy */ |
| 4549 | #define MC_CMD_FINI_RXQ_IN_INSTANCE_OFST 0 |
| 4550 | |
| 4551 | /* MC_CMD_FINI_RXQ_OUT msgresponse */ |
| 4552 | #define MC_CMD_FINI_RXQ_OUT_LEN 0 |
| 4553 | |
| 4554 | |
| 4555 | /***********************************/ |
| 4556 | /* MC_CMD_FINI_TXQ |
| 4557 | * Teardown a TXQ. |
| 4558 | */ |
| 4559 | #define MC_CMD_FINI_TXQ 0x85 |
| 4560 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4561 | #define MC_CMD_0x85_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4562 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4563 | /* MC_CMD_FINI_TXQ_IN msgrequest */ |
| 4564 | #define MC_CMD_FINI_TXQ_IN_LEN 4 |
| 4565 | /* Instance of TXQ to destroy */ |
| 4566 | #define MC_CMD_FINI_TXQ_IN_INSTANCE_OFST 0 |
| 4567 | |
| 4568 | /* MC_CMD_FINI_TXQ_OUT msgresponse */ |
| 4569 | #define MC_CMD_FINI_TXQ_OUT_LEN 0 |
| 4570 | |
| 4571 | |
| 4572 | /***********************************/ |
| 4573 | /* MC_CMD_DRIVER_EVENT |
| 4574 | * Generate an event on an EVQ belonging to the function issuing the command. |
| 4575 | */ |
| 4576 | #define MC_CMD_DRIVER_EVENT 0x86 |
| 4577 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4578 | #define MC_CMD_0x86_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4579 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4580 | /* MC_CMD_DRIVER_EVENT_IN msgrequest */ |
| 4581 | #define MC_CMD_DRIVER_EVENT_IN_LEN 12 |
| 4582 | /* Handle of target EVQ */ |
| 4583 | #define MC_CMD_DRIVER_EVENT_IN_EVQ_OFST 0 |
| 4584 | /* Bits 0 - 63 of event */ |
| 4585 | #define MC_CMD_DRIVER_EVENT_IN_DATA_OFST 4 |
| 4586 | #define MC_CMD_DRIVER_EVENT_IN_DATA_LEN 8 |
| 4587 | #define MC_CMD_DRIVER_EVENT_IN_DATA_LO_OFST 4 |
| 4588 | #define MC_CMD_DRIVER_EVENT_IN_DATA_HI_OFST 8 |
| 4589 | |
| 4590 | /* MC_CMD_DRIVER_EVENT_OUT msgresponse */ |
| 4591 | #define MC_CMD_DRIVER_EVENT_OUT_LEN 0 |
| 4592 | |
| 4593 | |
| 4594 | /***********************************/ |
| 4595 | /* MC_CMD_PROXY_CMD |
| 4596 | * Execute an arbitrary MCDI command on behalf of a different function, subject |
| 4597 | * to security restrictions. The command to be proxied follows immediately |
| 4598 | * afterward in the host buffer (or on the UART). This command supercedes |
| 4599 | * MC_CMD_SET_FUNC, which remains available for Siena but now deprecated. |
| 4600 | */ |
| 4601 | #define MC_CMD_PROXY_CMD 0x5b |
| 4602 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4603 | #define MC_CMD_0x5b_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 4604 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4605 | /* MC_CMD_PROXY_CMD_IN msgrequest */ |
| 4606 | #define MC_CMD_PROXY_CMD_IN_LEN 4 |
| 4607 | /* The handle of the target function. */ |
| 4608 | #define MC_CMD_PROXY_CMD_IN_TARGET_OFST 0 |
| 4609 | #define MC_CMD_PROXY_CMD_IN_TARGET_PF_LBN 0 |
| 4610 | #define MC_CMD_PROXY_CMD_IN_TARGET_PF_WIDTH 16 |
| 4611 | #define MC_CMD_PROXY_CMD_IN_TARGET_VF_LBN 16 |
| 4612 | #define MC_CMD_PROXY_CMD_IN_TARGET_VF_WIDTH 16 |
| 4613 | #define MC_CMD_PROXY_CMD_IN_VF_NULL 0xffff /* enum */ |
| 4614 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 4615 | /* MC_CMD_PROXY_CMD_OUT msgresponse */ |
| 4616 | #define MC_CMD_PROXY_CMD_OUT_LEN 0 |
| 4617 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4618 | |
| 4619 | /***********************************/ |
| 4620 | /* MC_CMD_ALLOC_BUFTBL_CHUNK |
| 4621 | * Allocate a set of buffer table entries using the specified owner ID. This |
| 4622 | * operation allocates the required buffer table entries (and fails if it |
| 4623 | * cannot do so). The buffer table entries will initially be zeroed. |
| 4624 | */ |
| 4625 | #define MC_CMD_ALLOC_BUFTBL_CHUNK 0x87 |
| 4626 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4627 | #define MC_CMD_0x87_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 4628 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4629 | /* MC_CMD_ALLOC_BUFTBL_CHUNK_IN msgrequest */ |
| 4630 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_LEN 8 |
| 4631 | /* Owner ID to use */ |
| 4632 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_OWNER_OFST 0 |
| 4633 | /* Size of buffer table pages to use, in bytes (note that only a few values are |
| 4634 | * legal on any specific hardware). |
| 4635 | */ |
| 4636 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_PAGE_SIZE_OFST 4 |
| 4637 | |
| 4638 | /* MC_CMD_ALLOC_BUFTBL_CHUNK_OUT msgresponse */ |
| 4639 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_LEN 12 |
| 4640 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_HANDLE_OFST 0 |
| 4641 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_NUMENTRIES_OFST 4 |
| 4642 | /* Buffer table IDs for use in DMA descriptors. */ |
| 4643 | #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_ID_OFST 8 |
| 4644 | |
| 4645 | |
| 4646 | /***********************************/ |
| 4647 | /* MC_CMD_PROGRAM_BUFTBL_ENTRIES |
| 4648 | * Reprogram a set of buffer table entries in the specified chunk. |
| 4649 | */ |
| 4650 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES 0x88 |
| 4651 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4652 | #define MC_CMD_0x88_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 4653 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4654 | /* MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN msgrequest */ |
| 4655 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMIN 20 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 4656 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMAX 268 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4657 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LEN(num) (12+8*(num)) |
| 4658 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_HANDLE_OFST 0 |
| 4659 | /* ID */ |
| 4660 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_FIRSTID_OFST 4 |
| 4661 | /* Num entries */ |
| 4662 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_NUMENTRIES_OFST 8 |
| 4663 | /* Buffer table entry address */ |
| 4664 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_OFST 12 |
| 4665 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_LEN 8 |
| 4666 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_LO_OFST 12 |
| 4667 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_HI_OFST 16 |
| 4668 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MINNUM 1 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 4669 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MAXNUM 32 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4670 | |
| 4671 | /* MC_CMD_PROGRAM_BUFTBL_ENTRIES_OUT msgresponse */ |
| 4672 | #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_OUT_LEN 0 |
| 4673 | |
| 4674 | |
| 4675 | /***********************************/ |
| 4676 | /* MC_CMD_FREE_BUFTBL_CHUNK |
| 4677 | */ |
| 4678 | #define MC_CMD_FREE_BUFTBL_CHUNK 0x89 |
| 4679 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4680 | #define MC_CMD_0x89_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 4681 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4682 | /* MC_CMD_FREE_BUFTBL_CHUNK_IN msgrequest */ |
| 4683 | #define MC_CMD_FREE_BUFTBL_CHUNK_IN_LEN 4 |
| 4684 | #define MC_CMD_FREE_BUFTBL_CHUNK_IN_HANDLE_OFST 0 |
| 4685 | |
| 4686 | /* MC_CMD_FREE_BUFTBL_CHUNK_OUT msgresponse */ |
| 4687 | #define MC_CMD_FREE_BUFTBL_CHUNK_OUT_LEN 0 |
| 4688 | |
| 4689 | |
| 4690 | /***********************************/ |
| 4691 | /* MC_CMD_FILTER_OP |
| 4692 | * Multiplexed MCDI call for filter operations |
| 4693 | */ |
| 4694 | #define MC_CMD_FILTER_OP 0x8a |
| 4695 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4696 | #define MC_CMD_0x8a_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4697 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4698 | /* MC_CMD_FILTER_OP_IN msgrequest */ |
| 4699 | #define MC_CMD_FILTER_OP_IN_LEN 108 |
| 4700 | /* identifies the type of operation requested */ |
| 4701 | #define MC_CMD_FILTER_OP_IN_OP_OFST 0 |
| 4702 | /* enum: single-recipient filter insert */ |
| 4703 | #define MC_CMD_FILTER_OP_IN_OP_INSERT 0x0 |
| 4704 | /* enum: single-recipient filter remove */ |
| 4705 | #define MC_CMD_FILTER_OP_IN_OP_REMOVE 0x1 |
| 4706 | /* enum: multi-recipient filter subscribe */ |
| 4707 | #define MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE 0x2 |
| 4708 | /* enum: multi-recipient filter unsubscribe */ |
| 4709 | #define MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE 0x3 |
| 4710 | /* enum: replace one recipient with another (warning - the filter handle may |
| 4711 | * change) |
| 4712 | */ |
| 4713 | #define MC_CMD_FILTER_OP_IN_OP_REPLACE 0x4 |
| 4714 | /* filter handle (for remove / unsubscribe operations) */ |
| 4715 | #define MC_CMD_FILTER_OP_IN_HANDLE_OFST 4 |
| 4716 | #define MC_CMD_FILTER_OP_IN_HANDLE_LEN 8 |
| 4717 | #define MC_CMD_FILTER_OP_IN_HANDLE_LO_OFST 4 |
| 4718 | #define MC_CMD_FILTER_OP_IN_HANDLE_HI_OFST 8 |
| 4719 | /* The port ID associated with the v-adaptor which should contain this filter. |
| 4720 | */ |
| 4721 | #define MC_CMD_FILTER_OP_IN_PORT_ID_OFST 12 |
| 4722 | /* fields to include in match criteria */ |
| 4723 | #define MC_CMD_FILTER_OP_IN_MATCH_FIELDS_OFST 16 |
| 4724 | #define MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_LBN 0 |
| 4725 | #define MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_WIDTH 1 |
| 4726 | #define MC_CMD_FILTER_OP_IN_MATCH_DST_IP_LBN 1 |
| 4727 | #define MC_CMD_FILTER_OP_IN_MATCH_DST_IP_WIDTH 1 |
| 4728 | #define MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_LBN 2 |
| 4729 | #define MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_WIDTH 1 |
| 4730 | #define MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_LBN 3 |
| 4731 | #define MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_WIDTH 1 |
| 4732 | #define MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_LBN 4 |
| 4733 | #define MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_WIDTH 1 |
| 4734 | #define MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_LBN 5 |
| 4735 | #define MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_WIDTH 1 |
| 4736 | #define MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_LBN 6 |
| 4737 | #define MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_WIDTH 1 |
| 4738 | #define MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_LBN 7 |
| 4739 | #define MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_WIDTH 1 |
| 4740 | #define MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_LBN 8 |
| 4741 | #define MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_WIDTH 1 |
| 4742 | #define MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_LBN 9 |
| 4743 | #define MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_WIDTH 1 |
| 4744 | #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_LBN 10 |
| 4745 | #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_WIDTH 1 |
| 4746 | #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_LBN 11 |
| 4747 | #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_WIDTH 1 |
| 4748 | #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_LBN 30 |
| 4749 | #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_WIDTH 1 |
| 4750 | #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_LBN 31 |
| 4751 | #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_WIDTH 1 |
| 4752 | /* receive destination */ |
| 4753 | #define MC_CMD_FILTER_OP_IN_RX_DEST_OFST 20 |
| 4754 | /* enum: drop packets */ |
| 4755 | #define MC_CMD_FILTER_OP_IN_RX_DEST_DROP 0x0 |
| 4756 | /* enum: receive to host */ |
| 4757 | #define MC_CMD_FILTER_OP_IN_RX_DEST_HOST 0x1 |
| 4758 | /* enum: receive to MC */ |
| 4759 | #define MC_CMD_FILTER_OP_IN_RX_DEST_MC 0x2 |
| 4760 | /* enum: loop back to port 0 TX MAC */ |
| 4761 | #define MC_CMD_FILTER_OP_IN_RX_DEST_TX0 0x3 |
| 4762 | /* enum: loop back to port 1 TX MAC */ |
| 4763 | #define MC_CMD_FILTER_OP_IN_RX_DEST_TX1 0x4 |
| 4764 | /* receive queue handle (for multiple queue modes, this is the base queue) */ |
| 4765 | #define MC_CMD_FILTER_OP_IN_RX_QUEUE_OFST 24 |
| 4766 | /* receive mode */ |
| 4767 | #define MC_CMD_FILTER_OP_IN_RX_MODE_OFST 28 |
| 4768 | /* enum: receive to just the specified queue */ |
| 4769 | #define MC_CMD_FILTER_OP_IN_RX_MODE_SIMPLE 0x0 |
| 4770 | /* enum: receive to multiple queues using RSS context */ |
| 4771 | #define MC_CMD_FILTER_OP_IN_RX_MODE_RSS 0x1 |
| 4772 | /* enum: receive to multiple queues using .1p mapping */ |
| 4773 | #define MC_CMD_FILTER_OP_IN_RX_MODE_DOT1P_MAPPING 0x2 |
| 4774 | /* enum: install a filter entry that will never match; for test purposes only |
| 4775 | */ |
| 4776 | #define MC_CMD_FILTER_OP_IN_RX_MODE_TEST_NEVER_MATCH 0x80000000 |
| 4777 | /* RSS context (for RX_MODE_RSS) or .1p mapping handle (for |
| 4778 | * RX_MODE_DOT1P_MAPPING), as returned by MC_CMD_RSS_CONTEXT_ALLOC or |
| 4779 | * MC_CMD_DOT1P_MAPPING_ALLOC. Note that these handles should be considered |
| 4780 | * opaque to the host, although a value of 0xFFFFFFFF is guaranteed never to be |
| 4781 | * a valid handle. |
| 4782 | */ |
| 4783 | #define MC_CMD_FILTER_OP_IN_RX_CONTEXT_OFST 32 |
| 4784 | /* transmit domain (reserved; set to 0) */ |
| 4785 | #define MC_CMD_FILTER_OP_IN_TX_DOMAIN_OFST 36 |
| 4786 | /* transmit destination (either set the MAC and/or PM bits for explicit |
| 4787 | * control, or set this field to TX_DEST_DEFAULT for sensible default |
| 4788 | * behaviour) |
| 4789 | */ |
| 4790 | #define MC_CMD_FILTER_OP_IN_TX_DEST_OFST 40 |
| 4791 | /* enum: request default behaviour (based on filter type) */ |
| 4792 | #define MC_CMD_FILTER_OP_IN_TX_DEST_DEFAULT 0xffffffff |
| 4793 | #define MC_CMD_FILTER_OP_IN_TX_DEST_MAC_LBN 0 |
| 4794 | #define MC_CMD_FILTER_OP_IN_TX_DEST_MAC_WIDTH 1 |
| 4795 | #define MC_CMD_FILTER_OP_IN_TX_DEST_PM_LBN 1 |
| 4796 | #define MC_CMD_FILTER_OP_IN_TX_DEST_PM_WIDTH 1 |
| 4797 | /* source MAC address to match (as bytes in network order) */ |
| 4798 | #define MC_CMD_FILTER_OP_IN_SRC_MAC_OFST 44 |
| 4799 | #define MC_CMD_FILTER_OP_IN_SRC_MAC_LEN 6 |
| 4800 | /* source port to match (as bytes in network order) */ |
| 4801 | #define MC_CMD_FILTER_OP_IN_SRC_PORT_OFST 50 |
| 4802 | #define MC_CMD_FILTER_OP_IN_SRC_PORT_LEN 2 |
| 4803 | /* destination MAC address to match (as bytes in network order) */ |
| 4804 | #define MC_CMD_FILTER_OP_IN_DST_MAC_OFST 52 |
| 4805 | #define MC_CMD_FILTER_OP_IN_DST_MAC_LEN 6 |
| 4806 | /* destination port to match (as bytes in network order) */ |
| 4807 | #define MC_CMD_FILTER_OP_IN_DST_PORT_OFST 58 |
| 4808 | #define MC_CMD_FILTER_OP_IN_DST_PORT_LEN 2 |
| 4809 | /* Ethernet type to match (as bytes in network order) */ |
| 4810 | #define MC_CMD_FILTER_OP_IN_ETHER_TYPE_OFST 60 |
| 4811 | #define MC_CMD_FILTER_OP_IN_ETHER_TYPE_LEN 2 |
| 4812 | /* Inner VLAN tag to match (as bytes in network order) */ |
| 4813 | #define MC_CMD_FILTER_OP_IN_INNER_VLAN_OFST 62 |
| 4814 | #define MC_CMD_FILTER_OP_IN_INNER_VLAN_LEN 2 |
| 4815 | /* Outer VLAN tag to match (as bytes in network order) */ |
| 4816 | #define MC_CMD_FILTER_OP_IN_OUTER_VLAN_OFST 64 |
| 4817 | #define MC_CMD_FILTER_OP_IN_OUTER_VLAN_LEN 2 |
| 4818 | /* IP protocol to match (in low byte; set high byte to 0) */ |
| 4819 | #define MC_CMD_FILTER_OP_IN_IP_PROTO_OFST 66 |
| 4820 | #define MC_CMD_FILTER_OP_IN_IP_PROTO_LEN 2 |
| 4821 | /* Firmware defined register 0 to match (reserved; set to 0) */ |
| 4822 | #define MC_CMD_FILTER_OP_IN_FWDEF0_OFST 68 |
| 4823 | /* Firmware defined register 1 to match (reserved; set to 0) */ |
| 4824 | #define MC_CMD_FILTER_OP_IN_FWDEF1_OFST 72 |
| 4825 | /* source IP address to match (as bytes in network order; set last 12 bytes to |
| 4826 | * 0 for IPv4 address) |
| 4827 | */ |
| 4828 | #define MC_CMD_FILTER_OP_IN_SRC_IP_OFST 76 |
| 4829 | #define MC_CMD_FILTER_OP_IN_SRC_IP_LEN 16 |
| 4830 | /* destination IP address to match (as bytes in network order; set last 12 |
| 4831 | * bytes to 0 for IPv4 address) |
| 4832 | */ |
| 4833 | #define MC_CMD_FILTER_OP_IN_DST_IP_OFST 92 |
| 4834 | #define MC_CMD_FILTER_OP_IN_DST_IP_LEN 16 |
| 4835 | |
| 4836 | /* MC_CMD_FILTER_OP_OUT msgresponse */ |
| 4837 | #define MC_CMD_FILTER_OP_OUT_LEN 12 |
| 4838 | /* identifies the type of operation requested */ |
| 4839 | #define MC_CMD_FILTER_OP_OUT_OP_OFST 0 |
| 4840 | /* Enum values, see field(s): */ |
| 4841 | /* MC_CMD_FILTER_OP_IN/OP */ |
| 4842 | /* Returned filter handle (for insert / subscribe operations). Note that these |
| 4843 | * handles should be considered opaque to the host, although a value of |
| 4844 | * 0xFFFFFFFF_FFFFFFFF is guaranteed never to be a valid handle. |
| 4845 | */ |
| 4846 | #define MC_CMD_FILTER_OP_OUT_HANDLE_OFST 4 |
| 4847 | #define MC_CMD_FILTER_OP_OUT_HANDLE_LEN 8 |
| 4848 | #define MC_CMD_FILTER_OP_OUT_HANDLE_LO_OFST 4 |
| 4849 | #define MC_CMD_FILTER_OP_OUT_HANDLE_HI_OFST 8 |
| 4850 | |
| 4851 | |
| 4852 | /***********************************/ |
| 4853 | /* MC_CMD_GET_PARSER_DISP_INFO |
| 4854 | * Get information related to the parser-dispatcher subsystem |
| 4855 | */ |
| 4856 | #define MC_CMD_GET_PARSER_DISP_INFO 0xe4 |
| 4857 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4858 | #define MC_CMD_0xe4_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4859 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4860 | /* MC_CMD_GET_PARSER_DISP_INFO_IN msgrequest */ |
| 4861 | #define MC_CMD_GET_PARSER_DISP_INFO_IN_LEN 4 |
| 4862 | /* identifies the type of operation requested */ |
| 4863 | #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_OFST 0 |
| 4864 | /* enum: read the list of supported RX filter matches */ |
| 4865 | #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SUPPORTED_RX_MATCHES 0x1 |
| 4866 | |
| 4867 | /* MC_CMD_GET_PARSER_DISP_INFO_OUT msgresponse */ |
| 4868 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMIN 8 |
| 4869 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX 252 |
| 4870 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_LEN(num) (8+4*(num)) |
| 4871 | /* identifies the type of operation requested */ |
| 4872 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_OP_OFST 0 |
| 4873 | /* Enum values, see field(s): */ |
| 4874 | /* MC_CMD_GET_PARSER_DISP_INFO_IN/OP */ |
| 4875 | /* number of supported match types */ |
| 4876 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_NUM_SUPPORTED_MATCHES_OFST 4 |
| 4877 | /* array of supported match types (valid MATCH_FIELDS values for |
| 4878 | * MC_CMD_FILTER_OP) sorted in decreasing priority order |
| 4879 | */ |
| 4880 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_OFST 8 |
| 4881 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_LEN 4 |
| 4882 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MINNUM 0 |
| 4883 | #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MAXNUM 61 |
| 4884 | |
| 4885 | |
| 4886 | /***********************************/ |
| 4887 | /* MC_CMD_PARSER_DISP_RW |
| 4888 | * Direct read/write of parser-dispatcher state (DICPUs and LUE) for debugging |
| 4889 | */ |
| 4890 | #define MC_CMD_PARSER_DISP_RW 0xe5 |
| 4891 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4892 | #define MC_CMD_0xe5_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 4893 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4894 | /* MC_CMD_PARSER_DISP_RW_IN msgrequest */ |
| 4895 | #define MC_CMD_PARSER_DISP_RW_IN_LEN 32 |
| 4896 | /* identifies the target of the operation */ |
| 4897 | #define MC_CMD_PARSER_DISP_RW_IN_TARGET_OFST 0 |
| 4898 | /* enum: RX dispatcher CPU */ |
| 4899 | #define MC_CMD_PARSER_DISP_RW_IN_RX_DICPU 0x0 |
| 4900 | /* enum: TX dispatcher CPU */ |
| 4901 | #define MC_CMD_PARSER_DISP_RW_IN_TX_DICPU 0x1 |
| 4902 | /* enum: Lookup engine */ |
| 4903 | #define MC_CMD_PARSER_DISP_RW_IN_LUE 0x2 |
| 4904 | /* identifies the type of operation requested */ |
| 4905 | #define MC_CMD_PARSER_DISP_RW_IN_OP_OFST 4 |
| 4906 | /* enum: read a word of DICPU DMEM or a LUE entry */ |
| 4907 | #define MC_CMD_PARSER_DISP_RW_IN_READ 0x0 |
| 4908 | /* enum: write a word of DICPU DMEM or a LUE entry */ |
| 4909 | #define MC_CMD_PARSER_DISP_RW_IN_WRITE 0x1 |
| 4910 | /* enum: read-modify-write a word of DICPU DMEM (not valid for LUE) */ |
| 4911 | #define MC_CMD_PARSER_DISP_RW_IN_RMW 0x2 |
| 4912 | /* data memory address or LUE index */ |
| 4913 | #define MC_CMD_PARSER_DISP_RW_IN_ADDRESS_OFST 8 |
| 4914 | /* value to write (for DMEM writes) */ |
| 4915 | #define MC_CMD_PARSER_DISP_RW_IN_DMEM_WRITE_VALUE_OFST 12 |
| 4916 | /* XOR value (for DMEM read-modify-writes: new = (old & mask) ^ value) */ |
| 4917 | #define MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_XOR_VALUE_OFST 12 |
| 4918 | /* AND mask (for DMEM read-modify-writes: new = (old & mask) ^ value) */ |
| 4919 | #define MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_AND_MASK_OFST 16 |
| 4920 | /* value to write (for LUE writes) */ |
| 4921 | #define MC_CMD_PARSER_DISP_RW_IN_LUE_WRITE_VALUE_OFST 12 |
| 4922 | #define MC_CMD_PARSER_DISP_RW_IN_LUE_WRITE_VALUE_LEN 20 |
| 4923 | |
| 4924 | /* MC_CMD_PARSER_DISP_RW_OUT msgresponse */ |
| 4925 | #define MC_CMD_PARSER_DISP_RW_OUT_LEN 52 |
| 4926 | /* value read (for DMEM reads) */ |
| 4927 | #define MC_CMD_PARSER_DISP_RW_OUT_DMEM_READ_VALUE_OFST 0 |
| 4928 | /* value read (for LUE reads) */ |
| 4929 | #define MC_CMD_PARSER_DISP_RW_OUT_LUE_READ_VALUE_OFST 0 |
| 4930 | #define MC_CMD_PARSER_DISP_RW_OUT_LUE_READ_VALUE_LEN 20 |
| 4931 | /* up to 8 32-bit words of additional soft state from the LUE manager (the |
| 4932 | * exact content is firmware-dependent and intended only for debug use) |
| 4933 | */ |
| 4934 | #define MC_CMD_PARSER_DISP_RW_OUT_LUE_MGR_STATE_OFST 20 |
| 4935 | #define MC_CMD_PARSER_DISP_RW_OUT_LUE_MGR_STATE_LEN 32 |
| 4936 | |
| 4937 | |
| 4938 | /***********************************/ |
| 4939 | /* MC_CMD_GET_PF_COUNT |
| 4940 | * Get number of PFs on the device. |
| 4941 | */ |
| 4942 | #define MC_CMD_GET_PF_COUNT 0xb6 |
| 4943 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4944 | #define MC_CMD_0xb6_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4945 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4946 | /* MC_CMD_GET_PF_COUNT_IN msgrequest */ |
| 4947 | #define MC_CMD_GET_PF_COUNT_IN_LEN 0 |
| 4948 | |
| 4949 | /* MC_CMD_GET_PF_COUNT_OUT msgresponse */ |
| 4950 | #define MC_CMD_GET_PF_COUNT_OUT_LEN 1 |
| 4951 | /* Identifies the number of PFs on the device. */ |
| 4952 | #define MC_CMD_GET_PF_COUNT_OUT_PF_COUNT_OFST 0 |
| 4953 | #define MC_CMD_GET_PF_COUNT_OUT_PF_COUNT_LEN 1 |
| 4954 | |
| 4955 | |
| 4956 | /***********************************/ |
| 4957 | /* MC_CMD_SET_PF_COUNT |
| 4958 | * Set number of PFs on the device. |
| 4959 | */ |
| 4960 | #define MC_CMD_SET_PF_COUNT 0xb7 |
| 4961 | |
| 4962 | /* MC_CMD_SET_PF_COUNT_IN msgrequest */ |
| 4963 | #define MC_CMD_SET_PF_COUNT_IN_LEN 4 |
| 4964 | /* New number of PFs on the device. */ |
| 4965 | #define MC_CMD_SET_PF_COUNT_IN_PF_COUNT_OFST 0 |
| 4966 | |
| 4967 | /* MC_CMD_SET_PF_COUNT_OUT msgresponse */ |
| 4968 | #define MC_CMD_SET_PF_COUNT_OUT_LEN 0 |
| 4969 | |
| 4970 | |
| 4971 | /***********************************/ |
| 4972 | /* MC_CMD_GET_PORT_ASSIGNMENT |
| 4973 | * Get port assignment for current PCI function. |
| 4974 | */ |
| 4975 | #define MC_CMD_GET_PORT_ASSIGNMENT 0xb8 |
| 4976 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4977 | #define MC_CMD_0xb8_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 4978 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4979 | /* MC_CMD_GET_PORT_ASSIGNMENT_IN msgrequest */ |
| 4980 | #define MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN 0 |
| 4981 | |
| 4982 | /* MC_CMD_GET_PORT_ASSIGNMENT_OUT msgresponse */ |
| 4983 | #define MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN 4 |
| 4984 | /* Identifies the port assignment for this function. */ |
| 4985 | #define MC_CMD_GET_PORT_ASSIGNMENT_OUT_PORT_OFST 0 |
| 4986 | |
| 4987 | |
| 4988 | /***********************************/ |
| 4989 | /* MC_CMD_SET_PORT_ASSIGNMENT |
| 4990 | * Set port assignment for current PCI function. |
| 4991 | */ |
| 4992 | #define MC_CMD_SET_PORT_ASSIGNMENT 0xb9 |
| 4993 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 4994 | #define MC_CMD_0xb9_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 4995 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 4996 | /* MC_CMD_SET_PORT_ASSIGNMENT_IN msgrequest */ |
| 4997 | #define MC_CMD_SET_PORT_ASSIGNMENT_IN_LEN 4 |
| 4998 | /* Identifies the port assignment for this function. */ |
| 4999 | #define MC_CMD_SET_PORT_ASSIGNMENT_IN_PORT_OFST 0 |
| 5000 | |
| 5001 | /* MC_CMD_SET_PORT_ASSIGNMENT_OUT msgresponse */ |
| 5002 | #define MC_CMD_SET_PORT_ASSIGNMENT_OUT_LEN 0 |
| 5003 | |
| 5004 | |
| 5005 | /***********************************/ |
| 5006 | /* MC_CMD_ALLOC_VIS |
| 5007 | * Allocate VIs for current PCI function. |
| 5008 | */ |
| 5009 | #define MC_CMD_ALLOC_VIS 0x8b |
| 5010 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5011 | #define MC_CMD_0x8b_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5012 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5013 | /* MC_CMD_ALLOC_VIS_IN msgrequest */ |
| 5014 | #define MC_CMD_ALLOC_VIS_IN_LEN 8 |
| 5015 | /* The minimum number of VIs that is acceptable */ |
| 5016 | #define MC_CMD_ALLOC_VIS_IN_MIN_VI_COUNT_OFST 0 |
| 5017 | /* The maximum number of VIs that would be useful */ |
| 5018 | #define MC_CMD_ALLOC_VIS_IN_MAX_VI_COUNT_OFST 4 |
| 5019 | |
| 5020 | /* MC_CMD_ALLOC_VIS_OUT msgresponse */ |
| 5021 | #define MC_CMD_ALLOC_VIS_OUT_LEN 8 |
| 5022 | /* The number of VIs allocated on this function */ |
| 5023 | #define MC_CMD_ALLOC_VIS_OUT_VI_COUNT_OFST 0 |
| 5024 | /* The base absolute VI number allocated to this function. Required to |
| 5025 | * correctly interpret wakeup events. |
| 5026 | */ |
| 5027 | #define MC_CMD_ALLOC_VIS_OUT_VI_BASE_OFST 4 |
| 5028 | |
| 5029 | |
| 5030 | /***********************************/ |
| 5031 | /* MC_CMD_FREE_VIS |
| 5032 | * Free VIs for current PCI function. Any linked PIO buffers will be unlinked, |
| 5033 | * but not freed. |
| 5034 | */ |
| 5035 | #define MC_CMD_FREE_VIS 0x8c |
| 5036 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5037 | #define MC_CMD_0x8c_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5038 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5039 | /* MC_CMD_FREE_VIS_IN msgrequest */ |
| 5040 | #define MC_CMD_FREE_VIS_IN_LEN 0 |
| 5041 | |
| 5042 | /* MC_CMD_FREE_VIS_OUT msgresponse */ |
| 5043 | #define MC_CMD_FREE_VIS_OUT_LEN 0 |
| 5044 | |
| 5045 | |
| 5046 | /***********************************/ |
| 5047 | /* MC_CMD_GET_SRIOV_CFG |
| 5048 | * Get SRIOV config for this PF. |
| 5049 | */ |
| 5050 | #define MC_CMD_GET_SRIOV_CFG 0xba |
| 5051 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5052 | #define MC_CMD_0xba_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5053 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5054 | /* MC_CMD_GET_SRIOV_CFG_IN msgrequest */ |
| 5055 | #define MC_CMD_GET_SRIOV_CFG_IN_LEN 0 |
| 5056 | |
| 5057 | /* MC_CMD_GET_SRIOV_CFG_OUT msgresponse */ |
| 5058 | #define MC_CMD_GET_SRIOV_CFG_OUT_LEN 20 |
| 5059 | /* Number of VFs currently enabled. */ |
| 5060 | #define MC_CMD_GET_SRIOV_CFG_OUT_VF_CURRENT_OFST 0 |
| 5061 | /* Max number of VFs before sriov stride and offset may need to be changed. */ |
| 5062 | #define MC_CMD_GET_SRIOV_CFG_OUT_VF_MAX_OFST 4 |
| 5063 | #define MC_CMD_GET_SRIOV_CFG_OUT_FLAGS_OFST 8 |
| 5064 | #define MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_LBN 0 |
| 5065 | #define MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_WIDTH 1 |
| 5066 | /* RID offset of first VF from PF. */ |
| 5067 | #define MC_CMD_GET_SRIOV_CFG_OUT_VF_OFFSET_OFST 12 |
| 5068 | /* RID offset of each subsequent VF from the previous. */ |
| 5069 | #define MC_CMD_GET_SRIOV_CFG_OUT_VF_STRIDE_OFST 16 |
| 5070 | |
| 5071 | |
| 5072 | /***********************************/ |
| 5073 | /* MC_CMD_SET_SRIOV_CFG |
| 5074 | * Set SRIOV config for this PF. |
| 5075 | */ |
| 5076 | #define MC_CMD_SET_SRIOV_CFG 0xbb |
| 5077 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5078 | #define MC_CMD_0xbb_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 5079 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5080 | /* MC_CMD_SET_SRIOV_CFG_IN msgrequest */ |
| 5081 | #define MC_CMD_SET_SRIOV_CFG_IN_LEN 20 |
| 5082 | /* Number of VFs currently enabled. */ |
| 5083 | #define MC_CMD_SET_SRIOV_CFG_IN_VF_CURRENT_OFST 0 |
| 5084 | /* Max number of VFs before sriov stride and offset may need to be changed. */ |
| 5085 | #define MC_CMD_SET_SRIOV_CFG_IN_VF_MAX_OFST 4 |
| 5086 | #define MC_CMD_SET_SRIOV_CFG_IN_FLAGS_OFST 8 |
| 5087 | #define MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_LBN 0 |
| 5088 | #define MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_WIDTH 1 |
| 5089 | /* RID offset of first VF from PF, or 0 for no change, or |
| 5090 | * MC_CMD_RESOURCE_INSTANCE_ANY to allow the system to allocate an offset. |
| 5091 | */ |
| 5092 | #define MC_CMD_SET_SRIOV_CFG_IN_VF_OFFSET_OFST 12 |
| 5093 | /* RID offset of each subsequent VF from the previous, 0 for no change, or |
| 5094 | * MC_CMD_RESOURCE_INSTANCE_ANY to allow the system to allocate a stride. |
| 5095 | */ |
| 5096 | #define MC_CMD_SET_SRIOV_CFG_IN_VF_STRIDE_OFST 16 |
| 5097 | |
| 5098 | /* MC_CMD_SET_SRIOV_CFG_OUT msgresponse */ |
| 5099 | #define MC_CMD_SET_SRIOV_CFG_OUT_LEN 0 |
| 5100 | |
| 5101 | |
| 5102 | /***********************************/ |
| 5103 | /* MC_CMD_GET_VI_ALLOC_INFO |
| 5104 | * Get information about number of VI's and base VI number allocated to this |
| 5105 | * function. |
| 5106 | */ |
| 5107 | #define MC_CMD_GET_VI_ALLOC_INFO 0x8d |
| 5108 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5109 | #define MC_CMD_0x8d_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5110 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5111 | /* MC_CMD_GET_VI_ALLOC_INFO_IN msgrequest */ |
| 5112 | #define MC_CMD_GET_VI_ALLOC_INFO_IN_LEN 0 |
| 5113 | |
| 5114 | /* MC_CMD_GET_VI_ALLOC_INFO_OUT msgresponse */ |
| 5115 | #define MC_CMD_GET_VI_ALLOC_INFO_OUT_LEN 8 |
| 5116 | /* The number of VIs allocated on this function */ |
| 5117 | #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_COUNT_OFST 0 |
| 5118 | /* The base absolute VI number allocated to this function. Required to |
| 5119 | * correctly interpret wakeup events. |
| 5120 | */ |
| 5121 | #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_BASE_OFST 4 |
| 5122 | |
| 5123 | |
| 5124 | /***********************************/ |
| 5125 | /* MC_CMD_DUMP_VI_STATE |
| 5126 | * For CmdClient use. Dump pertinent information on a specific absolute VI. |
| 5127 | */ |
| 5128 | #define MC_CMD_DUMP_VI_STATE 0x8e |
| 5129 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5130 | #define MC_CMD_0x8e_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5131 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5132 | /* MC_CMD_DUMP_VI_STATE_IN msgrequest */ |
| 5133 | #define MC_CMD_DUMP_VI_STATE_IN_LEN 4 |
| 5134 | /* The VI number to query. */ |
| 5135 | #define MC_CMD_DUMP_VI_STATE_IN_VI_NUMBER_OFST 0 |
| 5136 | |
| 5137 | /* MC_CMD_DUMP_VI_STATE_OUT msgresponse */ |
| 5138 | #define MC_CMD_DUMP_VI_STATE_OUT_LEN 96 |
| 5139 | /* The PF part of the function owning this VI. */ |
| 5140 | #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_PF_OFST 0 |
| 5141 | #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_PF_LEN 2 |
| 5142 | /* The VF part of the function owning this VI. */ |
| 5143 | #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_VF_OFST 2 |
| 5144 | #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_VF_LEN 2 |
| 5145 | /* Base of VIs allocated to this function. */ |
| 5146 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_BASE_OFST 4 |
| 5147 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_BASE_LEN 2 |
| 5148 | /* Count of VIs allocated to the owner function. */ |
| 5149 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_COUNT_OFST 6 |
| 5150 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_COUNT_LEN 2 |
| 5151 | /* Base interrupt vector allocated to this function. */ |
| 5152 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_BASE_OFST 8 |
| 5153 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_BASE_LEN 2 |
| 5154 | /* Number of interrupt vectors allocated to this function. */ |
| 5155 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_COUNT_OFST 10 |
| 5156 | #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_COUNT_LEN 2 |
| 5157 | /* Raw evq ptr table data. */ |
| 5158 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_OFST 12 |
| 5159 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_LEN 8 |
| 5160 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_LO_OFST 12 |
| 5161 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_HI_OFST 16 |
| 5162 | /* Raw evq timer table data. */ |
| 5163 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_OFST 20 |
| 5164 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_LEN 8 |
| 5165 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_LO_OFST 20 |
| 5166 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_HI_OFST 24 |
| 5167 | /* Combined metadata field. */ |
| 5168 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_OFST 28 |
| 5169 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_LBN 0 |
| 5170 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_WIDTH 16 |
| 5171 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_LBN 16 |
| 5172 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_WIDTH 8 |
| 5173 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_LBN 24 |
| 5174 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_WIDTH 8 |
| 5175 | /* TXDPCPU raw table data for queue. */ |
| 5176 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_OFST 32 |
| 5177 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_LEN 8 |
| 5178 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_LO_OFST 32 |
| 5179 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_HI_OFST 36 |
| 5180 | /* TXDPCPU raw table data for queue. */ |
| 5181 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_OFST 40 |
| 5182 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_LEN 8 |
| 5183 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_LO_OFST 40 |
| 5184 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_HI_OFST 44 |
| 5185 | /* TXDPCPU raw table data for queue. */ |
| 5186 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_OFST 48 |
| 5187 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_LEN 8 |
| 5188 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_LO_OFST 48 |
| 5189 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_HI_OFST 52 |
| 5190 | /* Combined metadata field. */ |
| 5191 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_OFST 56 |
| 5192 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_LEN 8 |
| 5193 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_LO_OFST 56 |
| 5194 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_HI_OFST 60 |
| 5195 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_LBN 0 |
| 5196 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_WIDTH 16 |
| 5197 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_LBN 16 |
| 5198 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_WIDTH 8 |
| 5199 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_LBN 24 |
| 5200 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_WIDTH 8 |
| 5201 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_LBN 32 |
| 5202 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_WIDTH 8 |
| 5203 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_LBN 40 |
| 5204 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_WIDTH 24 |
| 5205 | /* RXDPCPU raw table data for queue. */ |
| 5206 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_OFST 64 |
| 5207 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_LEN 8 |
| 5208 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_LO_OFST 64 |
| 5209 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_HI_OFST 68 |
| 5210 | /* RXDPCPU raw table data for queue. */ |
| 5211 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_OFST 72 |
| 5212 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_LEN 8 |
| 5213 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_LO_OFST 72 |
| 5214 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_HI_OFST 76 |
| 5215 | /* Reserved, currently 0. */ |
| 5216 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_OFST 80 |
| 5217 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_LEN 8 |
| 5218 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_LO_OFST 80 |
| 5219 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_HI_OFST 84 |
| 5220 | /* Combined metadata field. */ |
| 5221 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_OFST 88 |
| 5222 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_LEN 8 |
| 5223 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_LO_OFST 88 |
| 5224 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_HI_OFST 92 |
| 5225 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_LBN 0 |
| 5226 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_WIDTH 16 |
| 5227 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_LBN 16 |
| 5228 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_WIDTH 8 |
| 5229 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_LBN 24 |
| 5230 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_WIDTH 8 |
| 5231 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_LBN 32 |
| 5232 | #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_WIDTH 8 |
| 5233 | |
| 5234 | |
| 5235 | /***********************************/ |
| 5236 | /* MC_CMD_ALLOC_PIOBUF |
| 5237 | * Allocate a push I/O buffer for later use with a tx queue. |
| 5238 | */ |
| 5239 | #define MC_CMD_ALLOC_PIOBUF 0x8f |
| 5240 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5241 | #define MC_CMD_0x8f_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 5242 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5243 | /* MC_CMD_ALLOC_PIOBUF_IN msgrequest */ |
| 5244 | #define MC_CMD_ALLOC_PIOBUF_IN_LEN 0 |
| 5245 | |
| 5246 | /* MC_CMD_ALLOC_PIOBUF_OUT msgresponse */ |
| 5247 | #define MC_CMD_ALLOC_PIOBUF_OUT_LEN 4 |
| 5248 | /* Handle for allocated push I/O buffer. */ |
| 5249 | #define MC_CMD_ALLOC_PIOBUF_OUT_PIOBUF_HANDLE_OFST 0 |
| 5250 | |
| 5251 | |
| 5252 | /***********************************/ |
| 5253 | /* MC_CMD_FREE_PIOBUF |
| 5254 | * Free a push I/O buffer. |
| 5255 | */ |
| 5256 | #define MC_CMD_FREE_PIOBUF 0x90 |
| 5257 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5258 | #define MC_CMD_0x90_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 5259 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5260 | /* MC_CMD_FREE_PIOBUF_IN msgrequest */ |
| 5261 | #define MC_CMD_FREE_PIOBUF_IN_LEN 4 |
| 5262 | /* Handle for allocated push I/O buffer. */ |
| 5263 | #define MC_CMD_FREE_PIOBUF_IN_PIOBUF_HANDLE_OFST 0 |
| 5264 | |
| 5265 | /* MC_CMD_FREE_PIOBUF_OUT msgresponse */ |
| 5266 | #define MC_CMD_FREE_PIOBUF_OUT_LEN 0 |
| 5267 | |
| 5268 | |
| 5269 | /***********************************/ |
| 5270 | /* MC_CMD_GET_VI_TLP_PROCESSING |
| 5271 | * Get TLP steering and ordering information for a VI. |
| 5272 | */ |
| 5273 | #define MC_CMD_GET_VI_TLP_PROCESSING 0xb0 |
| 5274 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5275 | #define MC_CMD_0xb0_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5276 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5277 | /* MC_CMD_GET_VI_TLP_PROCESSING_IN msgrequest */ |
| 5278 | #define MC_CMD_GET_VI_TLP_PROCESSING_IN_LEN 4 |
| 5279 | /* VI number to get information for. */ |
| 5280 | #define MC_CMD_GET_VI_TLP_PROCESSING_IN_INSTANCE_OFST 0 |
| 5281 | |
| 5282 | /* MC_CMD_GET_VI_TLP_PROCESSING_OUT msgresponse */ |
| 5283 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_LEN 4 |
| 5284 | /* Transaction processing steering hint 1 for use with the Rx Queue. */ |
| 5285 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG1_RX_OFST 0 |
| 5286 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG1_RX_LEN 1 |
| 5287 | /* Transaction processing steering hint 2 for use with the Ev Queue. */ |
| 5288 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG2_EV_OFST 1 |
| 5289 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG2_EV_LEN 1 |
| 5290 | /* Use Relaxed ordering model for TLPs on this VI. */ |
| 5291 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_RELAXED_ORDERING_LBN 16 |
| 5292 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_RELAXED_ORDERING_WIDTH 1 |
| 5293 | /* Use ID based ordering for TLPs on this VI. */ |
| 5294 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_ID_BASED_ORDERING_LBN 17 |
| 5295 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_ID_BASED_ORDERING_WIDTH 1 |
| 5296 | /* Set no snoop bit for TLPs on this VI. */ |
| 5297 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_NO_SNOOP_LBN 18 |
| 5298 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_NO_SNOOP_WIDTH 1 |
| 5299 | /* Enable TPH for TLPs on this VI. */ |
| 5300 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_ON_LBN 19 |
| 5301 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_ON_WIDTH 1 |
| 5302 | #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_DATA_OFST 0 |
| 5303 | |
| 5304 | |
| 5305 | /***********************************/ |
| 5306 | /* MC_CMD_SET_VI_TLP_PROCESSING |
| 5307 | * Set TLP steering and ordering information for a VI. |
| 5308 | */ |
| 5309 | #define MC_CMD_SET_VI_TLP_PROCESSING 0xb1 |
| 5310 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5311 | #define MC_CMD_0xb1_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5312 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5313 | /* MC_CMD_SET_VI_TLP_PROCESSING_IN msgrequest */ |
| 5314 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_LEN 8 |
| 5315 | /* VI number to set information for. */ |
| 5316 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_INSTANCE_OFST 0 |
| 5317 | /* Transaction processing steering hint 1 for use with the Rx Queue. */ |
| 5318 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG1_RX_OFST 4 |
| 5319 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG1_RX_LEN 1 |
| 5320 | /* Transaction processing steering hint 2 for use with the Ev Queue. */ |
| 5321 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG2_EV_OFST 5 |
| 5322 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG2_EV_LEN 1 |
| 5323 | /* Use Relaxed ordering model for TLPs on this VI. */ |
| 5324 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_RELAXED_ORDERING_LBN 48 |
| 5325 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_RELAXED_ORDERING_WIDTH 1 |
| 5326 | /* Use ID based ordering for TLPs on this VI. */ |
| 5327 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_ID_BASED_ORDERING_LBN 49 |
| 5328 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_ID_BASED_ORDERING_WIDTH 1 |
| 5329 | /* Set the no snoop bit for TLPs on this VI. */ |
| 5330 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_NO_SNOOP_LBN 50 |
| 5331 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_NO_SNOOP_WIDTH 1 |
| 5332 | /* Enable TPH for TLPs on this VI. */ |
| 5333 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_ON_LBN 51 |
| 5334 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_ON_WIDTH 1 |
| 5335 | #define MC_CMD_SET_VI_TLP_PROCESSING_IN_DATA_OFST 4 |
| 5336 | |
| 5337 | /* MC_CMD_SET_VI_TLP_PROCESSING_OUT msgresponse */ |
| 5338 | #define MC_CMD_SET_VI_TLP_PROCESSING_OUT_LEN 0 |
| 5339 | |
| 5340 | |
| 5341 | /***********************************/ |
| 5342 | /* MC_CMD_GET_TLP_PROCESSING_GLOBALS |
| 5343 | * Get global PCIe steering and transaction processing configuration. |
| 5344 | */ |
| 5345 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS 0xbc |
| 5346 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5347 | #define MC_CMD_0xbc_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 5348 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5349 | /* MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN msgrequest */ |
| 5350 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_LEN 4 |
| 5351 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_OFST 0 |
| 5352 | /* enum: MISC. */ |
| 5353 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_MISC 0x0 |
| 5354 | /* enum: IDO. */ |
| 5355 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_IDO 0x1 |
| 5356 | /* enum: RO. */ |
| 5357 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_RO 0x2 |
| 5358 | /* enum: TPH Type. */ |
| 5359 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_TPH_TYPE 0x3 |
| 5360 | |
| 5361 | /* MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT msgresponse */ |
| 5362 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_LEN 8 |
| 5363 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_GLOBAL_CATEGORY_OFST 0 |
| 5364 | /* Enum values, see field(s): */ |
| 5365 | /* MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN/TLP_GLOBAL_CATEGORY */ |
| 5366 | /* Amalgamated TLP info word. */ |
| 5367 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_WORD_OFST 4 |
| 5368 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_LBN 0 |
| 5369 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_WIDTH 1 |
| 5370 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_LBN 1 |
| 5371 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_WIDTH 31 |
| 5372 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_LBN 0 |
| 5373 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_WIDTH 1 |
| 5374 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_LBN 1 |
| 5375 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_WIDTH 1 |
| 5376 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_LBN 2 |
| 5377 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_WIDTH 1 |
| 5378 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_LBN 3 |
| 5379 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_WIDTH 1 |
| 5380 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_LBN 4 |
| 5381 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_WIDTH 28 |
| 5382 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_LBN 0 |
| 5383 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_WIDTH 1 |
| 5384 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_LBN 1 |
| 5385 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_WIDTH 1 |
| 5386 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_LBN 2 |
| 5387 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_WIDTH 1 |
| 5388 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_LBN 3 |
| 5389 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_WIDTH 29 |
| 5390 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_LBN 0 |
| 5391 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_WIDTH 2 |
| 5392 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_LBN 2 |
| 5393 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_WIDTH 2 |
| 5394 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_LBN 4 |
| 5395 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_WIDTH 2 |
| 5396 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_LBN 6 |
| 5397 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_WIDTH 2 |
| 5398 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_LBN 8 |
| 5399 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_WIDTH 2 |
| 5400 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_LBN 9 |
| 5401 | #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_WIDTH 23 |
| 5402 | |
| 5403 | |
| 5404 | /***********************************/ |
| 5405 | /* MC_CMD_SET_TLP_PROCESSING_GLOBALS |
| 5406 | * Set global PCIe steering and transaction processing configuration. |
| 5407 | */ |
| 5408 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS 0xbd |
| 5409 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5410 | #define MC_CMD_0xbd_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 5411 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5412 | /* MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN msgrequest */ |
| 5413 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_LEN 8 |
| 5414 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_OFST 0 |
| 5415 | /* Enum values, see field(s): */ |
| 5416 | /* MC_CMD_GET_TLP_PROCESSING_GLOBALS/MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN/TLP_GLOBAL_CATEGORY */ |
| 5417 | /* Amalgamated TLP info word. */ |
| 5418 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_WORD_OFST 4 |
| 5419 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_LBN 0 |
| 5420 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_WIDTH 1 |
| 5421 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_LBN 0 |
| 5422 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_WIDTH 1 |
| 5423 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_LBN 1 |
| 5424 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_WIDTH 1 |
| 5425 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_LBN 2 |
| 5426 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_WIDTH 1 |
| 5427 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_LBN 3 |
| 5428 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_WIDTH 1 |
| 5429 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_LBN 0 |
| 5430 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_WIDTH 1 |
| 5431 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_LBN 1 |
| 5432 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_WIDTH 1 |
| 5433 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_LBN 2 |
| 5434 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_WIDTH 1 |
| 5435 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_LBN 0 |
| 5436 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_WIDTH 2 |
| 5437 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_LBN 2 |
| 5438 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_WIDTH 2 |
| 5439 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_LBN 4 |
| 5440 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_WIDTH 2 |
| 5441 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_LBN 6 |
| 5442 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_WIDTH 2 |
| 5443 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_LBN 8 |
| 5444 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_WIDTH 2 |
| 5445 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_LBN 10 |
| 5446 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_WIDTH 22 |
| 5447 | |
| 5448 | /* MC_CMD_SET_TLP_PROCESSING_GLOBALS_OUT msgresponse */ |
| 5449 | #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_OUT_LEN 0 |
| 5450 | |
| 5451 | |
| 5452 | /***********************************/ |
| 5453 | /* MC_CMD_SATELLITE_DOWNLOAD |
| 5454 | * Download a new set of images to the satellite CPUs from the host. |
| 5455 | */ |
| 5456 | #define MC_CMD_SATELLITE_DOWNLOAD 0x91 |
| 5457 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5458 | #define MC_CMD_0x91_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 5459 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5460 | /* MC_CMD_SATELLITE_DOWNLOAD_IN msgrequest: The reset requirements for the CPUs |
| 5461 | * are subtle, and so downloads must proceed in a number of phases. |
| 5462 | * |
| 5463 | * 1) PHASE_RESET with a target of TARGET_ALL and chunk ID/length of 0. |
| 5464 | * |
| 5465 | * 2) PHASE_IMEMS for each of the IMEM targets (target IDs 0-11). Each download |
| 5466 | * may consist of multiple chunks. The final chunk (with CHUNK_ID_LAST) should |
| 5467 | * be a checksum (a simple 32-bit sum) of the transferred data. An individual |
| 5468 | * download may be aborted using CHUNK_ID_ABORT. |
| 5469 | * |
| 5470 | * 3) PHASE_VECTORS for each of the vector table targets (target IDs 12-15), |
| 5471 | * similar to PHASE_IMEMS. |
| 5472 | * |
| 5473 | * 4) PHASE_READY with a target of TARGET_ALL and chunk ID/length of 0. |
| 5474 | * |
| 5475 | * After any error (a requested abort is not considered to be an error) the |
| 5476 | * sequence must be restarted from PHASE_RESET. |
| 5477 | */ |
| 5478 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_LENMIN 20 |
| 5479 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_LENMAX 252 |
| 5480 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_LEN(num) (16+4*(num)) |
| 5481 | /* Download phase. (Note: the IDLE phase is used internally and is never valid |
| 5482 | * in a command from the host.) |
| 5483 | */ |
| 5484 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_OFST 0 |
| 5485 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_IDLE 0x0 /* enum */ |
| 5486 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_RESET 0x1 /* enum */ |
| 5487 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_IMEMS 0x2 /* enum */ |
| 5488 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_VECTORS 0x3 /* enum */ |
| 5489 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_READY 0x4 /* enum */ |
| 5490 | /* Target for download. (These match the blob numbers defined in |
| 5491 | * mc_flash_layout.h.) |
| 5492 | */ |
| 5493 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_OFST 4 |
| 5494 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5495 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_TEXT 0x0 |
| 5496 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5497 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_TEXT 0x1 |
| 5498 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5499 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDP_TEXT 0x2 |
| 5500 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5501 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDP_TEXT 0x3 |
| 5502 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5503 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_LUT 0x4 |
| 5504 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5505 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_LUT_CFG 0x5 |
| 5506 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5507 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_LUT 0x6 |
| 5508 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5509 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_LUT_CFG 0x7 |
| 5510 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5511 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_PGM 0x8 |
| 5512 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5513 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_SL_PGM 0x9 |
| 5514 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5515 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_PGM 0xa |
| 5516 | /* enum: Valid in phase 2 (PHASE_IMEMS) only */ |
| 5517 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_SL_PGM 0xb |
| 5518 | /* enum: Valid in phase 3 (PHASE_VECTORS) only */ |
| 5519 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_VTBL0 0xc |
| 5520 | /* enum: Valid in phase 3 (PHASE_VECTORS) only */ |
| 5521 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_VTBL0 0xd |
| 5522 | /* enum: Valid in phase 3 (PHASE_VECTORS) only */ |
| 5523 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_VTBL1 0xe |
| 5524 | /* enum: Valid in phase 3 (PHASE_VECTORS) only */ |
| 5525 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_VTBL1 0xf |
| 5526 | /* enum: Valid in phases 1 (PHASE_RESET) and 4 (PHASE_READY) only */ |
| 5527 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_ALL 0xffffffff |
| 5528 | /* Chunk ID, or CHUNK_ID_LAST or CHUNK_ID_ABORT */ |
| 5529 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_OFST 8 |
| 5530 | /* enum: Last chunk, containing checksum rather than data */ |
| 5531 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_LAST 0xffffffff |
| 5532 | /* enum: Abort download of this item */ |
| 5533 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_ABORT 0xfffffffe |
| 5534 | /* Length of this chunk in bytes */ |
| 5535 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_LEN_OFST 12 |
| 5536 | /* Data for this chunk */ |
| 5537 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_OFST 16 |
| 5538 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_LEN 4 |
| 5539 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MINNUM 1 |
| 5540 | #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MAXNUM 59 |
| 5541 | |
| 5542 | /* MC_CMD_SATELLITE_DOWNLOAD_OUT msgresponse */ |
| 5543 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_LEN 8 |
| 5544 | /* Same as MC_CMD_ERR field, but included as 0 in success cases */ |
| 5545 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_RESULT_OFST 0 |
| 5546 | /* Extra status information */ |
| 5547 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_INFO_OFST 4 |
| 5548 | /* enum: Code download OK, completed. */ |
| 5549 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_COMPLETE 0x0 |
| 5550 | /* enum: Code download aborted as requested. */ |
| 5551 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_ABORTED 0x1 |
| 5552 | /* enum: Code download OK so far, send next chunk. */ |
| 5553 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_NEXT_CHUNK 0x2 |
| 5554 | /* enum: Download phases out of sequence */ |
| 5555 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_PHASE 0x100 |
| 5556 | /* enum: Bad target for this phase */ |
| 5557 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_TARGET 0x101 |
| 5558 | /* enum: Chunk ID out of sequence */ |
| 5559 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHUNK_ID 0x200 |
| 5560 | /* enum: Chunk length zero or too large */ |
| 5561 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHUNK_LEN 0x201 |
| 5562 | /* enum: Checksum was incorrect */ |
| 5563 | #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHECKSUM 0x300 |
| 5564 | |
| 5565 | |
| 5566 | /***********************************/ |
| 5567 | /* MC_CMD_GET_CAPABILITIES |
| 5568 | * Get device capabilities. |
| 5569 | * |
| 5570 | * This is supplementary to the MC_CMD_GET_BOARD_CFG command, and intended to |
| 5571 | * reference inherent device capabilities as opposed to current NVRAM config. |
| 5572 | */ |
| 5573 | #define MC_CMD_GET_CAPABILITIES 0xbe |
| 5574 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5575 | #define MC_CMD_0xbe_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5576 | /* MC_CMD_GET_CAPABILITIES_IN msgrequest */ |
| 5577 | #define MC_CMD_GET_CAPABILITIES_IN_LEN 0 |
| 5578 | |
| 5579 | /* MC_CMD_GET_CAPABILITIES_OUT msgresponse */ |
| 5580 | #define MC_CMD_GET_CAPABILITIES_OUT_LEN 20 |
| 5581 | /* First word of flags. */ |
| 5582 | #define MC_CMD_GET_CAPABILITIES_OUT_FLAGS1_OFST 0 |
| 5583 | #define MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_LBN 19 |
| 5584 | #define MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_WIDTH 1 |
| 5585 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_LBN 20 |
| 5586 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_WIDTH 1 |
| 5587 | #define MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_LBN 21 |
| 5588 | #define MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_WIDTH 1 |
| 5589 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_LBN 22 |
| 5590 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_WIDTH 1 |
| 5591 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_LBN 23 |
| 5592 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_WIDTH 1 |
| 5593 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_LBN 24 |
| 5594 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_WIDTH 1 |
| 5595 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_LBN 25 |
| 5596 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_WIDTH 1 |
| 5597 | #define MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_LBN 26 |
| 5598 | #define MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_WIDTH 1 |
Matthew Slattery | 2ca10a7 | 2013-09-10 19:06:27 +0100 | [diff] [blame] | 5599 | #define MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_LBN 27 |
| 5600 | #define MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5601 | /* RxDPCPU firmware id. */ |
| 5602 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_DPCPU_FW_ID_OFST 4 |
| 5603 | #define MC_CMD_GET_CAPABILITIES_OUT_RX_DPCPU_FW_ID_LEN 2 |
| 5604 | /* enum: Standard RXDP firmware */ |
| 5605 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP 0x0 |
| 5606 | /* enum: Low latency RXDP firmware */ |
| 5607 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_LOW_LATENCY 0x1 |
| 5608 | /* enum: RXDP Test firmware image 1 */ |
| 5609 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101 |
| 5610 | /* enum: RXDP Test firmware image 2 */ |
| 5611 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102 |
| 5612 | /* enum: RXDP Test firmware image 3 */ |
| 5613 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103 |
| 5614 | /* enum: RXDP Test firmware image 4 */ |
| 5615 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104 |
| 5616 | /* enum: RXDP Test firmware image 5 */ |
| 5617 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_BACKPRESSURE 0x105 |
| 5618 | /* enum: RXDP Test firmware image 6 */ |
| 5619 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106 |
| 5620 | /* enum: RXDP Test firmware image 7 */ |
| 5621 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107 |
| 5622 | /* enum: RXDP Test firmware image 8 */ |
| 5623 | #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DISABLE_DL 0x108 |
| 5624 | /* TxDPCPU firmware id. */ |
| 5625 | #define MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_OFST 6 |
| 5626 | #define MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_LEN 2 |
| 5627 | /* enum: Standard TXDP firmware */ |
| 5628 | #define MC_CMD_GET_CAPABILITIES_OUT_TXDP 0x0 |
| 5629 | /* enum: Low latency TXDP firmware */ |
| 5630 | #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_LOW_LATENCY 0x1 |
| 5631 | /* enum: TXDP Test firmware image 1 */ |
| 5632 | #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_TSO_EDIT 0x101 |
| 5633 | /* enum: TXDP Test firmware image 2 */ |
| 5634 | #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102 |
| 5635 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_OFST 8 |
| 5636 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_LEN 2 |
| 5637 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_LBN 0 |
| 5638 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_WIDTH 12 |
| 5639 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_LBN 12 |
| 5640 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4 |
| 5641 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1 /* enum */ |
| 5642 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2 /* enum */ |
| 5643 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_VSWITCH 0x3 /* enum */ |
| 5644 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4 /* enum */ |
| 5645 | #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */ |
| 5646 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_OFST 10 |
| 5647 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_LEN 2 |
| 5648 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_LBN 0 |
| 5649 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_WIDTH 12 |
| 5650 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_LBN 12 |
| 5651 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4 |
| 5652 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1 /* enum */ |
| 5653 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2 /* enum */ |
| 5654 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_VSWITCH 0x3 /* enum */ |
| 5655 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4 /* enum */ |
| 5656 | #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */ |
| 5657 | /* Hardware capabilities of NIC */ |
| 5658 | #define MC_CMD_GET_CAPABILITIES_OUT_HW_CAPABILITIES_OFST 12 |
| 5659 | /* Licensed capabilities */ |
| 5660 | #define MC_CMD_GET_CAPABILITIES_OUT_LICENSE_CAPABILITIES_OFST 16 |
| 5661 | |
| 5662 | |
| 5663 | /***********************************/ |
| 5664 | /* MC_CMD_V2_EXTN |
| 5665 | * Encapsulation for a v2 extended command |
| 5666 | */ |
| 5667 | #define MC_CMD_V2_EXTN 0x7f |
| 5668 | |
| 5669 | /* MC_CMD_V2_EXTN_IN msgrequest */ |
| 5670 | #define MC_CMD_V2_EXTN_IN_LEN 4 |
| 5671 | /* the extended command number */ |
| 5672 | #define MC_CMD_V2_EXTN_IN_EXTENDED_CMD_LBN 0 |
| 5673 | #define MC_CMD_V2_EXTN_IN_EXTENDED_CMD_WIDTH 15 |
| 5674 | #define MC_CMD_V2_EXTN_IN_UNUSED_LBN 15 |
| 5675 | #define MC_CMD_V2_EXTN_IN_UNUSED_WIDTH 1 |
| 5676 | /* the actual length of the encapsulated command (which is not in the v1 |
| 5677 | * header) |
| 5678 | */ |
| 5679 | #define MC_CMD_V2_EXTN_IN_ACTUAL_LEN_LBN 16 |
| 5680 | #define MC_CMD_V2_EXTN_IN_ACTUAL_LEN_WIDTH 10 |
| 5681 | #define MC_CMD_V2_EXTN_IN_UNUSED2_LBN 26 |
| 5682 | #define MC_CMD_V2_EXTN_IN_UNUSED2_WIDTH 6 |
| 5683 | |
| 5684 | |
| 5685 | /***********************************/ |
| 5686 | /* MC_CMD_TCM_BUCKET_ALLOC |
| 5687 | * Allocate a pacer bucket (for qau rp or a snapper test) |
| 5688 | */ |
| 5689 | #define MC_CMD_TCM_BUCKET_ALLOC 0xb2 |
| 5690 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5691 | #define MC_CMD_0xb2_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5692 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5693 | /* MC_CMD_TCM_BUCKET_ALLOC_IN msgrequest */ |
| 5694 | #define MC_CMD_TCM_BUCKET_ALLOC_IN_LEN 0 |
| 5695 | |
| 5696 | /* MC_CMD_TCM_BUCKET_ALLOC_OUT msgresponse */ |
| 5697 | #define MC_CMD_TCM_BUCKET_ALLOC_OUT_LEN 4 |
| 5698 | /* the bucket id */ |
| 5699 | #define MC_CMD_TCM_BUCKET_ALLOC_OUT_BUCKET_OFST 0 |
| 5700 | |
| 5701 | |
| 5702 | /***********************************/ |
| 5703 | /* MC_CMD_TCM_BUCKET_FREE |
| 5704 | * Free a pacer bucket |
| 5705 | */ |
| 5706 | #define MC_CMD_TCM_BUCKET_FREE 0xb3 |
| 5707 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5708 | #define MC_CMD_0xb3_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5709 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5710 | /* MC_CMD_TCM_BUCKET_FREE_IN msgrequest */ |
| 5711 | #define MC_CMD_TCM_BUCKET_FREE_IN_LEN 4 |
| 5712 | /* the bucket id */ |
| 5713 | #define MC_CMD_TCM_BUCKET_FREE_IN_BUCKET_OFST 0 |
| 5714 | |
| 5715 | /* MC_CMD_TCM_BUCKET_FREE_OUT msgresponse */ |
| 5716 | #define MC_CMD_TCM_BUCKET_FREE_OUT_LEN 0 |
| 5717 | |
| 5718 | |
| 5719 | /***********************************/ |
| 5720 | /* MC_CMD_TCM_BUCKET_INIT |
| 5721 | * Initialise pacer bucket with a given rate |
| 5722 | */ |
| 5723 | #define MC_CMD_TCM_BUCKET_INIT 0xb4 |
| 5724 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5725 | #define MC_CMD_0xb4_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5726 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5727 | /* MC_CMD_TCM_BUCKET_INIT_IN msgrequest */ |
| 5728 | #define MC_CMD_TCM_BUCKET_INIT_IN_LEN 8 |
| 5729 | /* the bucket id */ |
| 5730 | #define MC_CMD_TCM_BUCKET_INIT_IN_BUCKET_OFST 0 |
| 5731 | /* the rate in mbps */ |
| 5732 | #define MC_CMD_TCM_BUCKET_INIT_IN_RATE_OFST 4 |
| 5733 | |
| 5734 | /* MC_CMD_TCM_BUCKET_INIT_OUT msgresponse */ |
| 5735 | #define MC_CMD_TCM_BUCKET_INIT_OUT_LEN 0 |
| 5736 | |
| 5737 | |
| 5738 | /***********************************/ |
| 5739 | /* MC_CMD_TCM_TXQ_INIT |
| 5740 | * Initialise txq in pacer with given options or set options |
| 5741 | */ |
| 5742 | #define MC_CMD_TCM_TXQ_INIT 0xb5 |
| 5743 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5744 | #define MC_CMD_0xb5_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5745 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5746 | /* MC_CMD_TCM_TXQ_INIT_IN msgrequest */ |
| 5747 | #define MC_CMD_TCM_TXQ_INIT_IN_LEN 28 |
| 5748 | /* the txq id */ |
| 5749 | #define MC_CMD_TCM_TXQ_INIT_IN_QID_OFST 0 |
| 5750 | /* the static priority associated with the txq */ |
| 5751 | #define MC_CMD_TCM_TXQ_INIT_IN_LABEL_OFST 4 |
| 5752 | /* bitmask of the priority queues this txq is inserted into */ |
| 5753 | #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAGS_OFST 8 |
| 5754 | /* the reaction point (RP) bucket */ |
| 5755 | #define MC_CMD_TCM_TXQ_INIT_IN_RP_BKT_OFST 12 |
| 5756 | /* an already reserved bucket (typically set to bucket associated with outer |
| 5757 | * vswitch) |
| 5758 | */ |
| 5759 | #define MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT1_OFST 16 |
| 5760 | /* an already reserved bucket (typically set to bucket associated with inner |
| 5761 | * vswitch) |
| 5762 | */ |
| 5763 | #define MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT2_OFST 20 |
| 5764 | /* the min bucket (typically for ETS/minimum bandwidth) */ |
| 5765 | #define MC_CMD_TCM_TXQ_INIT_IN_MIN_BKT_OFST 24 |
| 5766 | |
| 5767 | /* MC_CMD_TCM_TXQ_INIT_OUT msgresponse */ |
| 5768 | #define MC_CMD_TCM_TXQ_INIT_OUT_LEN 0 |
| 5769 | |
| 5770 | |
| 5771 | /***********************************/ |
| 5772 | /* MC_CMD_LINK_PIOBUF |
| 5773 | * Link a push I/O buffer to a TxQ |
| 5774 | */ |
| 5775 | #define MC_CMD_LINK_PIOBUF 0x92 |
| 5776 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5777 | #define MC_CMD_0x92_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 5778 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5779 | /* MC_CMD_LINK_PIOBUF_IN msgrequest */ |
| 5780 | #define MC_CMD_LINK_PIOBUF_IN_LEN 8 |
| 5781 | /* Handle for allocated push I/O buffer. */ |
| 5782 | #define MC_CMD_LINK_PIOBUF_IN_PIOBUF_HANDLE_OFST 0 |
| 5783 | /* Function Local Instance (VI) number. */ |
| 5784 | #define MC_CMD_LINK_PIOBUF_IN_TXQ_INSTANCE_OFST 4 |
| 5785 | |
| 5786 | /* MC_CMD_LINK_PIOBUF_OUT msgresponse */ |
| 5787 | #define MC_CMD_LINK_PIOBUF_OUT_LEN 0 |
| 5788 | |
| 5789 | |
| 5790 | /***********************************/ |
| 5791 | /* MC_CMD_UNLINK_PIOBUF |
| 5792 | * Unlink a push I/O buffer from a TxQ |
| 5793 | */ |
| 5794 | #define MC_CMD_UNLINK_PIOBUF 0x93 |
| 5795 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5796 | #define MC_CMD_0x93_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 5797 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5798 | /* MC_CMD_UNLINK_PIOBUF_IN msgrequest */ |
| 5799 | #define MC_CMD_UNLINK_PIOBUF_IN_LEN 4 |
| 5800 | /* Function Local Instance (VI) number. */ |
| 5801 | #define MC_CMD_UNLINK_PIOBUF_IN_TXQ_INSTANCE_OFST 0 |
| 5802 | |
| 5803 | /* MC_CMD_UNLINK_PIOBUF_OUT msgresponse */ |
| 5804 | #define MC_CMD_UNLINK_PIOBUF_OUT_LEN 0 |
| 5805 | |
| 5806 | |
| 5807 | /***********************************/ |
| 5808 | /* MC_CMD_VSWITCH_ALLOC |
| 5809 | * allocate and initialise a v-switch. |
| 5810 | */ |
| 5811 | #define MC_CMD_VSWITCH_ALLOC 0x94 |
| 5812 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5813 | #define MC_CMD_0x94_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5814 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5815 | /* MC_CMD_VSWITCH_ALLOC_IN msgrequest */ |
| 5816 | #define MC_CMD_VSWITCH_ALLOC_IN_LEN 16 |
| 5817 | /* The port to connect to the v-switch's upstream port. */ |
| 5818 | #define MC_CMD_VSWITCH_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 5819 | /* The type of v-switch to create. */ |
| 5820 | #define MC_CMD_VSWITCH_ALLOC_IN_TYPE_OFST 4 |
| 5821 | /* enum: VLAN */ |
| 5822 | #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VLAN 0x1 |
| 5823 | /* enum: VEB */ |
| 5824 | #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VEB 0x2 |
| 5825 | /* enum: VEPA */ |
| 5826 | #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VEPA 0x3 |
| 5827 | /* Flags controlling v-port creation */ |
| 5828 | #define MC_CMD_VSWITCH_ALLOC_IN_FLAGS_OFST 8 |
| 5829 | #define MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_LBN 0 |
| 5830 | #define MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1 |
| 5831 | /* The number of VLAN tags to support. */ |
| 5832 | #define MC_CMD_VSWITCH_ALLOC_IN_NUM_VLAN_TAGS_OFST 12 |
| 5833 | |
| 5834 | /* MC_CMD_VSWITCH_ALLOC_OUT msgresponse */ |
| 5835 | #define MC_CMD_VSWITCH_ALLOC_OUT_LEN 0 |
| 5836 | |
| 5837 | |
| 5838 | /***********************************/ |
| 5839 | /* MC_CMD_VSWITCH_FREE |
| 5840 | * de-allocate a v-switch. |
| 5841 | */ |
| 5842 | #define MC_CMD_VSWITCH_FREE 0x95 |
| 5843 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5844 | #define MC_CMD_0x95_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5845 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5846 | /* MC_CMD_VSWITCH_FREE_IN msgrequest */ |
| 5847 | #define MC_CMD_VSWITCH_FREE_IN_LEN 4 |
| 5848 | /* The port to which the v-switch is connected. */ |
| 5849 | #define MC_CMD_VSWITCH_FREE_IN_UPSTREAM_PORT_ID_OFST 0 |
| 5850 | |
| 5851 | /* MC_CMD_VSWITCH_FREE_OUT msgresponse */ |
| 5852 | #define MC_CMD_VSWITCH_FREE_OUT_LEN 0 |
| 5853 | |
| 5854 | |
| 5855 | /***********************************/ |
| 5856 | /* MC_CMD_VPORT_ALLOC |
| 5857 | * allocate a v-port. |
| 5858 | */ |
| 5859 | #define MC_CMD_VPORT_ALLOC 0x96 |
| 5860 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5861 | #define MC_CMD_0x96_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5862 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5863 | /* MC_CMD_VPORT_ALLOC_IN msgrequest */ |
| 5864 | #define MC_CMD_VPORT_ALLOC_IN_LEN 20 |
| 5865 | /* The port to which the v-switch is connected. */ |
| 5866 | #define MC_CMD_VPORT_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 5867 | /* The type of the new v-port. */ |
| 5868 | #define MC_CMD_VPORT_ALLOC_IN_TYPE_OFST 4 |
| 5869 | /* enum: VLAN (obsolete) */ |
| 5870 | #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VLAN 0x1 |
| 5871 | /* enum: VEB (obsolete) */ |
| 5872 | #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VEB 0x2 |
| 5873 | /* enum: VEPA (obsolete) */ |
| 5874 | #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VEPA 0x3 |
| 5875 | /* enum: A normal v-port receives packets which match a specified MAC and/or |
| 5876 | * VLAN. |
| 5877 | */ |
| 5878 | #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_NORMAL 0x4 |
| 5879 | /* enum: An expansion v-port packets traffic which don't match any other |
| 5880 | * v-port. |
| 5881 | */ |
| 5882 | #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_EXPANSION 0x5 |
| 5883 | /* enum: An test v-port receives packets which match any filters installed by |
| 5884 | * its downstream components. |
| 5885 | */ |
| 5886 | #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_TEST 0x6 |
| 5887 | /* Flags controlling v-port creation */ |
| 5888 | #define MC_CMD_VPORT_ALLOC_IN_FLAGS_OFST 8 |
| 5889 | #define MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_LBN 0 |
| 5890 | #define MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1 |
| 5891 | /* The number of VLAN tags to insert/remove. */ |
| 5892 | #define MC_CMD_VPORT_ALLOC_IN_NUM_VLAN_TAGS_OFST 12 |
| 5893 | /* The actual VLAN tags to insert/remove */ |
| 5894 | #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAGS_OFST 16 |
| 5895 | #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_LBN 0 |
| 5896 | #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_WIDTH 16 |
| 5897 | #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_LBN 16 |
| 5898 | #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_WIDTH 16 |
| 5899 | |
| 5900 | /* MC_CMD_VPORT_ALLOC_OUT msgresponse */ |
| 5901 | #define MC_CMD_VPORT_ALLOC_OUT_LEN 4 |
| 5902 | /* The handle of the new v-port */ |
| 5903 | #define MC_CMD_VPORT_ALLOC_OUT_VPORT_ID_OFST 0 |
| 5904 | |
| 5905 | |
| 5906 | /***********************************/ |
| 5907 | /* MC_CMD_VPORT_FREE |
| 5908 | * de-allocate a v-port. |
| 5909 | */ |
| 5910 | #define MC_CMD_VPORT_FREE 0x97 |
| 5911 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5912 | #define MC_CMD_0x97_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5913 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5914 | /* MC_CMD_VPORT_FREE_IN msgrequest */ |
| 5915 | #define MC_CMD_VPORT_FREE_IN_LEN 4 |
| 5916 | /* The handle of the v-port */ |
| 5917 | #define MC_CMD_VPORT_FREE_IN_VPORT_ID_OFST 0 |
| 5918 | |
| 5919 | /* MC_CMD_VPORT_FREE_OUT msgresponse */ |
| 5920 | #define MC_CMD_VPORT_FREE_OUT_LEN 0 |
| 5921 | |
| 5922 | |
| 5923 | /***********************************/ |
| 5924 | /* MC_CMD_VADAPTOR_ALLOC |
| 5925 | * allocate a v-adaptor. |
| 5926 | */ |
| 5927 | #define MC_CMD_VADAPTOR_ALLOC 0x98 |
| 5928 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5929 | #define MC_CMD_0x98_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5930 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5931 | /* MC_CMD_VADAPTOR_ALLOC_IN msgrequest */ |
Shradha Shah | af6a074 | 2015-05-20 11:08:40 +0100 | [diff] [blame] | 5932 | #define MC_CMD_VADAPTOR_ALLOC_IN_LEN 30 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5933 | /* The port to connect to the v-adaptor's port. */ |
| 5934 | #define MC_CMD_VADAPTOR_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 5935 | /* Flags controlling v-adaptor creation */ |
| 5936 | #define MC_CMD_VADAPTOR_ALLOC_IN_FLAGS_OFST 8 |
| 5937 | #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_LBN 0 |
| 5938 | #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_WIDTH 1 |
| 5939 | /* The number of VLAN tags to strip on receive */ |
| 5940 | #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLANS_OFST 12 |
Shradha Shah | af6a074 | 2015-05-20 11:08:40 +0100 | [diff] [blame] | 5941 | /* The number of VLAN tags to transparently insert/remove. */ |
| 5942 | #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLAN_TAGS_OFST 16 |
| 5943 | /* The actual VLAN tags to insert/remove */ |
| 5944 | #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAGS_OFST 20 |
| 5945 | #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_LBN 0 |
| 5946 | #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_WIDTH 16 |
| 5947 | #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_LBN 16 |
| 5948 | #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_WIDTH 16 |
| 5949 | /* The MAC address to assign to this v-adaptor */ |
| 5950 | #define MC_CMD_VADAPTOR_ALLOC_IN_MACADDR_OFST 24 |
| 5951 | #define MC_CMD_VADAPTOR_ALLOC_IN_MACADDR_LEN 6 |
| 5952 | /* enum: Derive the MAC address from the upstream port */ |
| 5953 | #define MC_CMD_VADAPTOR_ALLOC_IN_AUTO_MAC 0x0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5954 | |
| 5955 | /* MC_CMD_VADAPTOR_ALLOC_OUT msgresponse */ |
| 5956 | #define MC_CMD_VADAPTOR_ALLOC_OUT_LEN 0 |
| 5957 | |
| 5958 | |
| 5959 | /***********************************/ |
| 5960 | /* MC_CMD_VADAPTOR_FREE |
| 5961 | * de-allocate a v-adaptor. |
| 5962 | */ |
| 5963 | #define MC_CMD_VADAPTOR_FREE 0x99 |
| 5964 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 5965 | #define MC_CMD_0x99_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5966 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 5967 | /* MC_CMD_VADAPTOR_FREE_IN msgrequest */ |
| 5968 | #define MC_CMD_VADAPTOR_FREE_IN_LEN 4 |
| 5969 | /* The port to which the v-adaptor is connected. */ |
| 5970 | #define MC_CMD_VADAPTOR_FREE_IN_UPSTREAM_PORT_ID_OFST 0 |
| 5971 | |
| 5972 | /* MC_CMD_VADAPTOR_FREE_OUT msgresponse */ |
| 5973 | #define MC_CMD_VADAPTOR_FREE_OUT_LEN 0 |
| 5974 | |
| 5975 | |
| 5976 | /***********************************/ |
Shradha Shah | 910c878 | 2015-05-20 11:12:48 +0100 | [diff] [blame] | 5977 | /* MC_CMD_VADAPTOR_SET_MAC |
| 5978 | * assign a new MAC address to a v-adaptor. |
| 5979 | */ |
| 5980 | #define MC_CMD_VADAPTOR_SET_MAC 0x5d |
| 5981 | |
| 5982 | #define MC_CMD_0x5d_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 5983 | |
| 5984 | /* MC_CMD_VADAPTOR_SET_MAC_IN msgrequest */ |
| 5985 | #define MC_CMD_VADAPTOR_SET_MAC_IN_LEN 10 |
| 5986 | /* The port to which the v-adaptor is connected. */ |
| 5987 | #define MC_CMD_VADAPTOR_SET_MAC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 5988 | /* The new MAC address to assign to this v-adaptor */ |
| 5989 | #define MC_CMD_VADAPTOR_SET_MAC_IN_MACADDR_OFST 4 |
| 5990 | #define MC_CMD_VADAPTOR_SET_MAC_IN_MACADDR_LEN 6 |
| 5991 | |
| 5992 | /* MC_CMD_VADAPTOR_SET_MAC_OUT msgresponse */ |
| 5993 | #define MC_CMD_VADAPTOR_SET_MAC_OUT_LEN 0 |
| 5994 | |
| 5995 | |
| 5996 | /***********************************/ |
| 5997 | /* MC_CMD_VADAPTOR_GET_MAC |
| 5998 | * read the MAC address assigned to a v-adaptor. |
| 5999 | */ |
| 6000 | #define MC_CMD_VADAPTOR_GET_MAC 0x5e |
| 6001 | |
| 6002 | #define MC_CMD_0x5e_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6003 | |
| 6004 | /* MC_CMD_VADAPTOR_GET_MAC_IN msgrequest */ |
| 6005 | #define MC_CMD_VADAPTOR_GET_MAC_IN_LEN 4 |
| 6006 | /* The port to which the v-adaptor is connected. */ |
| 6007 | #define MC_CMD_VADAPTOR_GET_MAC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 6008 | |
| 6009 | /* MC_CMD_VADAPTOR_GET_MAC_OUT msgresponse */ |
| 6010 | #define MC_CMD_VADAPTOR_GET_MAC_OUT_LEN 6 |
| 6011 | /* The MAC address assigned to this v-adaptor */ |
| 6012 | #define MC_CMD_VADAPTOR_GET_MAC_OUT_MACADDR_OFST 0 |
| 6013 | #define MC_CMD_VADAPTOR_GET_MAC_OUT_MACADDR_LEN 6 |
| 6014 | |
| 6015 | |
| 6016 | /***********************************/ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6017 | /* MC_CMD_EVB_PORT_ASSIGN |
| 6018 | * assign a port to a PCI function. |
| 6019 | */ |
| 6020 | #define MC_CMD_EVB_PORT_ASSIGN 0x9a |
| 6021 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6022 | #define MC_CMD_0x9a_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6023 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6024 | /* MC_CMD_EVB_PORT_ASSIGN_IN msgrequest */ |
| 6025 | #define MC_CMD_EVB_PORT_ASSIGN_IN_LEN 8 |
| 6026 | /* The port to assign. */ |
| 6027 | #define MC_CMD_EVB_PORT_ASSIGN_IN_PORT_ID_OFST 0 |
| 6028 | /* The target function to modify. */ |
| 6029 | #define MC_CMD_EVB_PORT_ASSIGN_IN_FUNCTION_OFST 4 |
| 6030 | #define MC_CMD_EVB_PORT_ASSIGN_IN_PF_LBN 0 |
| 6031 | #define MC_CMD_EVB_PORT_ASSIGN_IN_PF_WIDTH 16 |
| 6032 | #define MC_CMD_EVB_PORT_ASSIGN_IN_VF_LBN 16 |
| 6033 | #define MC_CMD_EVB_PORT_ASSIGN_IN_VF_WIDTH 16 |
| 6034 | |
| 6035 | /* MC_CMD_EVB_PORT_ASSIGN_OUT msgresponse */ |
| 6036 | #define MC_CMD_EVB_PORT_ASSIGN_OUT_LEN 0 |
| 6037 | |
| 6038 | |
| 6039 | /***********************************/ |
| 6040 | /* MC_CMD_RDWR_A64_REGIONS |
| 6041 | * Assign the 64 bit region addresses. |
| 6042 | */ |
| 6043 | #define MC_CMD_RDWR_A64_REGIONS 0x9b |
| 6044 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6045 | #define MC_CMD_0x9b_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6046 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6047 | /* MC_CMD_RDWR_A64_REGIONS_IN msgrequest */ |
| 6048 | #define MC_CMD_RDWR_A64_REGIONS_IN_LEN 17 |
| 6049 | #define MC_CMD_RDWR_A64_REGIONS_IN_REGION0_OFST 0 |
| 6050 | #define MC_CMD_RDWR_A64_REGIONS_IN_REGION1_OFST 4 |
| 6051 | #define MC_CMD_RDWR_A64_REGIONS_IN_REGION2_OFST 8 |
| 6052 | #define MC_CMD_RDWR_A64_REGIONS_IN_REGION3_OFST 12 |
| 6053 | /* Write enable bits 0-3, set to write, clear to read. */ |
| 6054 | #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_LBN 128 |
| 6055 | #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_WIDTH 4 |
| 6056 | #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_BYTE_OFST 16 |
| 6057 | #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_BYTE_LEN 1 |
| 6058 | |
| 6059 | /* MC_CMD_RDWR_A64_REGIONS_OUT msgresponse: This data always included |
| 6060 | * regardless of state of write bits in the request. |
| 6061 | */ |
| 6062 | #define MC_CMD_RDWR_A64_REGIONS_OUT_LEN 16 |
| 6063 | #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION0_OFST 0 |
| 6064 | #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION1_OFST 4 |
| 6065 | #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION2_OFST 8 |
| 6066 | #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION3_OFST 12 |
| 6067 | |
| 6068 | |
| 6069 | /***********************************/ |
| 6070 | /* MC_CMD_ONLOAD_STACK_ALLOC |
| 6071 | * Allocate an Onload stack ID. |
| 6072 | */ |
| 6073 | #define MC_CMD_ONLOAD_STACK_ALLOC 0x9c |
| 6074 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6075 | #define MC_CMD_0x9c_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 6076 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6077 | /* MC_CMD_ONLOAD_STACK_ALLOC_IN msgrequest */ |
| 6078 | #define MC_CMD_ONLOAD_STACK_ALLOC_IN_LEN 4 |
| 6079 | /* The handle of the owning upstream port */ |
| 6080 | #define MC_CMD_ONLOAD_STACK_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 6081 | |
| 6082 | /* MC_CMD_ONLOAD_STACK_ALLOC_OUT msgresponse */ |
| 6083 | #define MC_CMD_ONLOAD_STACK_ALLOC_OUT_LEN 4 |
| 6084 | /* The handle of the new Onload stack */ |
| 6085 | #define MC_CMD_ONLOAD_STACK_ALLOC_OUT_ONLOAD_STACK_ID_OFST 0 |
| 6086 | |
| 6087 | |
| 6088 | /***********************************/ |
| 6089 | /* MC_CMD_ONLOAD_STACK_FREE |
| 6090 | * Free an Onload stack ID. |
| 6091 | */ |
| 6092 | #define MC_CMD_ONLOAD_STACK_FREE 0x9d |
| 6093 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6094 | #define MC_CMD_0x9d_PRIVILEGE_CTG SRIOV_CTG_ONLOAD |
| 6095 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6096 | /* MC_CMD_ONLOAD_STACK_FREE_IN msgrequest */ |
| 6097 | #define MC_CMD_ONLOAD_STACK_FREE_IN_LEN 4 |
| 6098 | /* The handle of the Onload stack */ |
| 6099 | #define MC_CMD_ONLOAD_STACK_FREE_IN_ONLOAD_STACK_ID_OFST 0 |
| 6100 | |
| 6101 | /* MC_CMD_ONLOAD_STACK_FREE_OUT msgresponse */ |
| 6102 | #define MC_CMD_ONLOAD_STACK_FREE_OUT_LEN 0 |
| 6103 | |
| 6104 | |
| 6105 | /***********************************/ |
| 6106 | /* MC_CMD_RSS_CONTEXT_ALLOC |
| 6107 | * Allocate an RSS context. |
| 6108 | */ |
| 6109 | #define MC_CMD_RSS_CONTEXT_ALLOC 0x9e |
| 6110 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6111 | #define MC_CMD_0x9e_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6112 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6113 | /* MC_CMD_RSS_CONTEXT_ALLOC_IN msgrequest */ |
| 6114 | #define MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN 12 |
| 6115 | /* The handle of the owning upstream port */ |
| 6116 | #define MC_CMD_RSS_CONTEXT_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 6117 | /* The type of context to allocate */ |
| 6118 | #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_OFST 4 |
| 6119 | /* enum: Allocate a context for exclusive use. The key and indirection table |
| 6120 | * must be explicitly configured. |
| 6121 | */ |
| 6122 | #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_EXCLUSIVE 0x0 |
| 6123 | /* enum: Allocate a context for shared use; this will spread across a range of |
| 6124 | * queues, but the key and indirection table are pre-configured and may not be |
| 6125 | * changed. For this mode, NUM_QUEUES must 2, 4, 8, 16, 32 or 64. |
| 6126 | */ |
| 6127 | #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_SHARED 0x1 |
| 6128 | /* Number of queues spanned by this context, in the range 1-64; valid offsets |
| 6129 | * in the indirection table will be in the range 0 to NUM_QUEUES-1. |
| 6130 | */ |
| 6131 | #define MC_CMD_RSS_CONTEXT_ALLOC_IN_NUM_QUEUES_OFST 8 |
| 6132 | |
| 6133 | /* MC_CMD_RSS_CONTEXT_ALLOC_OUT msgresponse */ |
| 6134 | #define MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN 4 |
| 6135 | /* The handle of the new RSS context */ |
| 6136 | #define MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_OFST 0 |
| 6137 | |
| 6138 | |
| 6139 | /***********************************/ |
| 6140 | /* MC_CMD_RSS_CONTEXT_FREE |
| 6141 | * Free an RSS context. |
| 6142 | */ |
| 6143 | #define MC_CMD_RSS_CONTEXT_FREE 0x9f |
| 6144 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6145 | #define MC_CMD_0x9f_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6146 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6147 | /* MC_CMD_RSS_CONTEXT_FREE_IN msgrequest */ |
| 6148 | #define MC_CMD_RSS_CONTEXT_FREE_IN_LEN 4 |
| 6149 | /* The handle of the RSS context */ |
| 6150 | #define MC_CMD_RSS_CONTEXT_FREE_IN_RSS_CONTEXT_ID_OFST 0 |
| 6151 | |
| 6152 | /* MC_CMD_RSS_CONTEXT_FREE_OUT msgresponse */ |
| 6153 | #define MC_CMD_RSS_CONTEXT_FREE_OUT_LEN 0 |
| 6154 | |
| 6155 | |
| 6156 | /***********************************/ |
| 6157 | /* MC_CMD_RSS_CONTEXT_SET_KEY |
| 6158 | * Set the Toeplitz hash key for an RSS context. |
| 6159 | */ |
| 6160 | #define MC_CMD_RSS_CONTEXT_SET_KEY 0xa0 |
| 6161 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6162 | #define MC_CMD_0xa0_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6163 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6164 | /* MC_CMD_RSS_CONTEXT_SET_KEY_IN msgrequest */ |
| 6165 | #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_LEN 44 |
| 6166 | /* The handle of the RSS context */ |
| 6167 | #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_RSS_CONTEXT_ID_OFST 0 |
| 6168 | /* The 40-byte Toeplitz hash key (TBD endianness issues?) */ |
| 6169 | #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_OFST 4 |
| 6170 | #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_LEN 40 |
| 6171 | |
| 6172 | /* MC_CMD_RSS_CONTEXT_SET_KEY_OUT msgresponse */ |
| 6173 | #define MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN 0 |
| 6174 | |
| 6175 | |
| 6176 | /***********************************/ |
| 6177 | /* MC_CMD_RSS_CONTEXT_GET_KEY |
| 6178 | * Get the Toeplitz hash key for an RSS context. |
| 6179 | */ |
| 6180 | #define MC_CMD_RSS_CONTEXT_GET_KEY 0xa1 |
| 6181 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6182 | #define MC_CMD_0xa1_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6183 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6184 | /* MC_CMD_RSS_CONTEXT_GET_KEY_IN msgrequest */ |
| 6185 | #define MC_CMD_RSS_CONTEXT_GET_KEY_IN_LEN 4 |
| 6186 | /* The handle of the RSS context */ |
| 6187 | #define MC_CMD_RSS_CONTEXT_GET_KEY_IN_RSS_CONTEXT_ID_OFST 0 |
| 6188 | |
| 6189 | /* MC_CMD_RSS_CONTEXT_GET_KEY_OUT msgresponse */ |
| 6190 | #define MC_CMD_RSS_CONTEXT_GET_KEY_OUT_LEN 44 |
| 6191 | /* The 40-byte Toeplitz hash key (TBD endianness issues?) */ |
| 6192 | #define MC_CMD_RSS_CONTEXT_GET_KEY_OUT_TOEPLITZ_KEY_OFST 4 |
| 6193 | #define MC_CMD_RSS_CONTEXT_GET_KEY_OUT_TOEPLITZ_KEY_LEN 40 |
| 6194 | |
| 6195 | |
| 6196 | /***********************************/ |
| 6197 | /* MC_CMD_RSS_CONTEXT_SET_TABLE |
| 6198 | * Set the indirection table for an RSS context. |
| 6199 | */ |
| 6200 | #define MC_CMD_RSS_CONTEXT_SET_TABLE 0xa2 |
| 6201 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6202 | #define MC_CMD_0xa2_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6203 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6204 | /* MC_CMD_RSS_CONTEXT_SET_TABLE_IN msgrequest */ |
| 6205 | #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_LEN 132 |
| 6206 | /* The handle of the RSS context */ |
| 6207 | #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_RSS_CONTEXT_ID_OFST 0 |
| 6208 | /* The 128-byte indirection table (1 byte per entry) */ |
| 6209 | #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_INDIRECTION_TABLE_OFST 4 |
| 6210 | #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_INDIRECTION_TABLE_LEN 128 |
| 6211 | |
| 6212 | /* MC_CMD_RSS_CONTEXT_SET_TABLE_OUT msgresponse */ |
| 6213 | #define MC_CMD_RSS_CONTEXT_SET_TABLE_OUT_LEN 0 |
| 6214 | |
| 6215 | |
| 6216 | /***********************************/ |
| 6217 | /* MC_CMD_RSS_CONTEXT_GET_TABLE |
| 6218 | * Get the indirection table for an RSS context. |
| 6219 | */ |
| 6220 | #define MC_CMD_RSS_CONTEXT_GET_TABLE 0xa3 |
| 6221 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6222 | #define MC_CMD_0xa3_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6223 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6224 | /* MC_CMD_RSS_CONTEXT_GET_TABLE_IN msgrequest */ |
| 6225 | #define MC_CMD_RSS_CONTEXT_GET_TABLE_IN_LEN 4 |
| 6226 | /* The handle of the RSS context */ |
| 6227 | #define MC_CMD_RSS_CONTEXT_GET_TABLE_IN_RSS_CONTEXT_ID_OFST 0 |
| 6228 | |
| 6229 | /* MC_CMD_RSS_CONTEXT_GET_TABLE_OUT msgresponse */ |
| 6230 | #define MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_LEN 132 |
| 6231 | /* The 128-byte indirection table (1 byte per entry) */ |
| 6232 | #define MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_INDIRECTION_TABLE_OFST 4 |
| 6233 | #define MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_INDIRECTION_TABLE_LEN 128 |
| 6234 | |
| 6235 | |
| 6236 | /***********************************/ |
| 6237 | /* MC_CMD_RSS_CONTEXT_SET_FLAGS |
| 6238 | * Set various control flags for an RSS context. |
| 6239 | */ |
| 6240 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS 0xe1 |
| 6241 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6242 | #define MC_CMD_0xe1_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6243 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6244 | /* MC_CMD_RSS_CONTEXT_SET_FLAGS_IN msgrequest */ |
| 6245 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_LEN 8 |
| 6246 | /* The handle of the RSS context */ |
| 6247 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RSS_CONTEXT_ID_OFST 0 |
| 6248 | /* Hash control flags */ |
| 6249 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_FLAGS_OFST 4 |
| 6250 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_LBN 0 |
| 6251 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_WIDTH 1 |
| 6252 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_LBN 1 |
| 6253 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_WIDTH 1 |
| 6254 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_LBN 2 |
| 6255 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_WIDTH 1 |
| 6256 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_LBN 3 |
| 6257 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_WIDTH 1 |
| 6258 | |
| 6259 | /* MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT msgresponse */ |
| 6260 | #define MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN 0 |
| 6261 | |
| 6262 | |
| 6263 | /***********************************/ |
| 6264 | /* MC_CMD_RSS_CONTEXT_GET_FLAGS |
| 6265 | * Get various control flags for an RSS context. |
| 6266 | */ |
| 6267 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS 0xe2 |
| 6268 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6269 | #define MC_CMD_0xe2_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6270 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6271 | /* MC_CMD_RSS_CONTEXT_GET_FLAGS_IN msgrequest */ |
| 6272 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_LEN 4 |
| 6273 | /* The handle of the RSS context */ |
| 6274 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_RSS_CONTEXT_ID_OFST 0 |
| 6275 | |
| 6276 | /* MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT msgresponse */ |
| 6277 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_LEN 8 |
| 6278 | /* Hash control flags */ |
| 6279 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_FLAGS_OFST 4 |
| 6280 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_LBN 0 |
| 6281 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_WIDTH 1 |
| 6282 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_LBN 1 |
| 6283 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_WIDTH 1 |
| 6284 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_LBN 2 |
| 6285 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_WIDTH 1 |
| 6286 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_LBN 3 |
| 6287 | #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_WIDTH 1 |
| 6288 | |
| 6289 | |
| 6290 | /***********************************/ |
| 6291 | /* MC_CMD_DOT1P_MAPPING_ALLOC |
| 6292 | * Allocate a .1p mapping. |
| 6293 | */ |
| 6294 | #define MC_CMD_DOT1P_MAPPING_ALLOC 0xa4 |
| 6295 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6296 | #define MC_CMD_0xa4_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6297 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6298 | /* MC_CMD_DOT1P_MAPPING_ALLOC_IN msgrequest */ |
| 6299 | #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_LEN 8 |
| 6300 | /* The handle of the owning upstream port */ |
| 6301 | #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0 |
| 6302 | /* Number of queues spanned by this mapping, in the range 1-64; valid fixed |
| 6303 | * offsets in the mapping table will be in the range 0 to NUM_QUEUES-1, and |
| 6304 | * referenced RSS contexts must span no more than this number. |
| 6305 | */ |
| 6306 | #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_NUM_QUEUES_OFST 4 |
| 6307 | |
| 6308 | /* MC_CMD_DOT1P_MAPPING_ALLOC_OUT msgresponse */ |
| 6309 | #define MC_CMD_DOT1P_MAPPING_ALLOC_OUT_LEN 4 |
| 6310 | /* The handle of the new .1p mapping */ |
| 6311 | #define MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_OFST 0 |
| 6312 | |
| 6313 | |
| 6314 | /***********************************/ |
| 6315 | /* MC_CMD_DOT1P_MAPPING_FREE |
| 6316 | * Free a .1p mapping. |
| 6317 | */ |
| 6318 | #define MC_CMD_DOT1P_MAPPING_FREE 0xa5 |
| 6319 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6320 | #define MC_CMD_0xa5_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6321 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6322 | /* MC_CMD_DOT1P_MAPPING_FREE_IN msgrequest */ |
| 6323 | #define MC_CMD_DOT1P_MAPPING_FREE_IN_LEN 4 |
| 6324 | /* The handle of the .1p mapping */ |
| 6325 | #define MC_CMD_DOT1P_MAPPING_FREE_IN_DOT1P_MAPPING_ID_OFST 0 |
| 6326 | |
| 6327 | /* MC_CMD_DOT1P_MAPPING_FREE_OUT msgresponse */ |
| 6328 | #define MC_CMD_DOT1P_MAPPING_FREE_OUT_LEN 0 |
| 6329 | |
| 6330 | |
| 6331 | /***********************************/ |
| 6332 | /* MC_CMD_DOT1P_MAPPING_SET_TABLE |
| 6333 | * Set the mapping table for a .1p mapping. |
| 6334 | */ |
| 6335 | #define MC_CMD_DOT1P_MAPPING_SET_TABLE 0xa6 |
| 6336 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6337 | #define MC_CMD_0xa6_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6338 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6339 | /* MC_CMD_DOT1P_MAPPING_SET_TABLE_IN msgrequest */ |
| 6340 | #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_LEN 36 |
| 6341 | /* The handle of the .1p mapping */ |
| 6342 | #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_DOT1P_MAPPING_ID_OFST 0 |
| 6343 | /* Per-priority mappings (1 32-bit word per entry - an offset or RSS context |
| 6344 | * handle) |
| 6345 | */ |
| 6346 | #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_MAPPING_TABLE_OFST 4 |
| 6347 | #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_MAPPING_TABLE_LEN 32 |
| 6348 | |
| 6349 | /* MC_CMD_DOT1P_MAPPING_SET_TABLE_OUT msgresponse */ |
| 6350 | #define MC_CMD_DOT1P_MAPPING_SET_TABLE_OUT_LEN 0 |
| 6351 | |
| 6352 | |
| 6353 | /***********************************/ |
| 6354 | /* MC_CMD_DOT1P_MAPPING_GET_TABLE |
| 6355 | * Get the mapping table for a .1p mapping. |
| 6356 | */ |
| 6357 | #define MC_CMD_DOT1P_MAPPING_GET_TABLE 0xa7 |
| 6358 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6359 | #define MC_CMD_0xa7_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6360 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6361 | /* MC_CMD_DOT1P_MAPPING_GET_TABLE_IN msgrequest */ |
| 6362 | #define MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_LEN 4 |
| 6363 | /* The handle of the .1p mapping */ |
| 6364 | #define MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_DOT1P_MAPPING_ID_OFST 0 |
| 6365 | |
| 6366 | /* MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT msgresponse */ |
| 6367 | #define MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_LEN 36 |
| 6368 | /* Per-priority mappings (1 32-bit word per entry - an offset or RSS context |
| 6369 | * handle) |
| 6370 | */ |
| 6371 | #define MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_MAPPING_TABLE_OFST 4 |
| 6372 | #define MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_MAPPING_TABLE_LEN 32 |
| 6373 | |
| 6374 | |
| 6375 | /***********************************/ |
| 6376 | /* MC_CMD_GET_VECTOR_CFG |
| 6377 | * Get Interrupt Vector config for this PF. |
| 6378 | */ |
| 6379 | #define MC_CMD_GET_VECTOR_CFG 0xbf |
| 6380 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6381 | #define MC_CMD_0xbf_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6382 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6383 | /* MC_CMD_GET_VECTOR_CFG_IN msgrequest */ |
| 6384 | #define MC_CMD_GET_VECTOR_CFG_IN_LEN 0 |
| 6385 | |
| 6386 | /* MC_CMD_GET_VECTOR_CFG_OUT msgresponse */ |
| 6387 | #define MC_CMD_GET_VECTOR_CFG_OUT_LEN 12 |
| 6388 | /* Base absolute interrupt vector number. */ |
| 6389 | #define MC_CMD_GET_VECTOR_CFG_OUT_VEC_BASE_OFST 0 |
| 6390 | /* Number of interrupt vectors allocate to this PF. */ |
| 6391 | #define MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_PF_OFST 4 |
| 6392 | /* Number of interrupt vectors to allocate per VF. */ |
| 6393 | #define MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_VF_OFST 8 |
| 6394 | |
| 6395 | |
| 6396 | /***********************************/ |
| 6397 | /* MC_CMD_SET_VECTOR_CFG |
| 6398 | * Set Interrupt Vector config for this PF. |
| 6399 | */ |
| 6400 | #define MC_CMD_SET_VECTOR_CFG 0xc0 |
| 6401 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6402 | #define MC_CMD_0xc0_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6403 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6404 | /* MC_CMD_SET_VECTOR_CFG_IN msgrequest */ |
| 6405 | #define MC_CMD_SET_VECTOR_CFG_IN_LEN 12 |
| 6406 | /* Base absolute interrupt vector number, or MC_CMD_RESOURCE_INSTANCE_ANY to |
| 6407 | * let the system find a suitable base. |
| 6408 | */ |
| 6409 | #define MC_CMD_SET_VECTOR_CFG_IN_VEC_BASE_OFST 0 |
| 6410 | /* Number of interrupt vectors allocate to this PF. */ |
| 6411 | #define MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_PF_OFST 4 |
| 6412 | /* Number of interrupt vectors to allocate per VF. */ |
| 6413 | #define MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_VF_OFST 8 |
| 6414 | |
| 6415 | /* MC_CMD_SET_VECTOR_CFG_OUT msgresponse */ |
| 6416 | #define MC_CMD_SET_VECTOR_CFG_OUT_LEN 0 |
| 6417 | |
| 6418 | |
| 6419 | /***********************************/ |
| 6420 | /* MC_CMD_RMON_RX_CLASS_STATS |
| 6421 | * Retrieve rmon rx class statistics |
| 6422 | */ |
| 6423 | #define MC_CMD_RMON_RX_CLASS_STATS 0xc3 |
| 6424 | |
| 6425 | /* MC_CMD_RMON_RX_CLASS_STATS_IN msgrequest */ |
| 6426 | #define MC_CMD_RMON_RX_CLASS_STATS_IN_LEN 4 |
| 6427 | /* flags */ |
| 6428 | #define MC_CMD_RMON_RX_CLASS_STATS_IN_FLAGS_OFST 0 |
| 6429 | #define MC_CMD_RMON_RX_CLASS_STATS_IN_CLASS_LBN 0 |
| 6430 | #define MC_CMD_RMON_RX_CLASS_STATS_IN_CLASS_WIDTH 8 |
| 6431 | #define MC_CMD_RMON_RX_CLASS_STATS_IN_RST_LBN 8 |
| 6432 | #define MC_CMD_RMON_RX_CLASS_STATS_IN_RST_WIDTH 1 |
| 6433 | |
| 6434 | /* MC_CMD_RMON_RX_CLASS_STATS_OUT msgresponse */ |
| 6435 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_LENMIN 4 |
| 6436 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_LENMAX 252 |
| 6437 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6438 | /* Array of stats */ |
| 6439 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_BUFFER_OFST 0 |
| 6440 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_BUFFER_LEN 4 |
| 6441 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_BUFFER_MINNUM 1 |
| 6442 | #define MC_CMD_RMON_RX_CLASS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6443 | |
| 6444 | |
| 6445 | /***********************************/ |
| 6446 | /* MC_CMD_RMON_TX_CLASS_STATS |
| 6447 | * Retrieve rmon tx class statistics |
| 6448 | */ |
| 6449 | #define MC_CMD_RMON_TX_CLASS_STATS 0xc4 |
| 6450 | |
| 6451 | /* MC_CMD_RMON_TX_CLASS_STATS_IN msgrequest */ |
| 6452 | #define MC_CMD_RMON_TX_CLASS_STATS_IN_LEN 4 |
| 6453 | /* flags */ |
| 6454 | #define MC_CMD_RMON_TX_CLASS_STATS_IN_FLAGS_OFST 0 |
| 6455 | #define MC_CMD_RMON_TX_CLASS_STATS_IN_CLASS_LBN 0 |
| 6456 | #define MC_CMD_RMON_TX_CLASS_STATS_IN_CLASS_WIDTH 8 |
| 6457 | #define MC_CMD_RMON_TX_CLASS_STATS_IN_RST_LBN 8 |
| 6458 | #define MC_CMD_RMON_TX_CLASS_STATS_IN_RST_WIDTH 1 |
| 6459 | |
| 6460 | /* MC_CMD_RMON_TX_CLASS_STATS_OUT msgresponse */ |
| 6461 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_LENMIN 4 |
| 6462 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_LENMAX 252 |
| 6463 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6464 | /* Array of stats */ |
| 6465 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_BUFFER_OFST 0 |
| 6466 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_BUFFER_LEN 4 |
| 6467 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_BUFFER_MINNUM 1 |
| 6468 | #define MC_CMD_RMON_TX_CLASS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6469 | |
| 6470 | |
| 6471 | /***********************************/ |
| 6472 | /* MC_CMD_RMON_RX_SUPER_CLASS_STATS |
| 6473 | * Retrieve rmon rx super_class statistics |
| 6474 | */ |
| 6475 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS 0xc5 |
| 6476 | |
| 6477 | /* MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN msgrequest */ |
| 6478 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN_LEN 4 |
| 6479 | /* flags */ |
| 6480 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN_FLAGS_OFST 0 |
| 6481 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN_SUPER_CLASS_LBN 0 |
| 6482 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN_SUPER_CLASS_WIDTH 4 |
| 6483 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN_RST_LBN 4 |
| 6484 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_IN_RST_WIDTH 1 |
| 6485 | |
| 6486 | /* MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT msgresponse */ |
| 6487 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_LENMIN 4 |
| 6488 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_LENMAX 252 |
| 6489 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6490 | /* Array of stats */ |
| 6491 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_BUFFER_OFST 0 |
| 6492 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_BUFFER_LEN 4 |
| 6493 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_BUFFER_MINNUM 1 |
| 6494 | #define MC_CMD_RMON_RX_SUPER_CLASS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6495 | |
| 6496 | |
| 6497 | /***********************************/ |
| 6498 | /* MC_CMD_RMON_TX_SUPER_CLASS_STATS |
| 6499 | * Retrieve rmon tx super_class statistics |
| 6500 | */ |
| 6501 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS 0xc6 |
| 6502 | |
| 6503 | /* MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN msgrequest */ |
| 6504 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN_LEN 4 |
| 6505 | /* flags */ |
| 6506 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN_FLAGS_OFST 0 |
| 6507 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN_SUPER_CLASS_LBN 0 |
| 6508 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN_SUPER_CLASS_WIDTH 4 |
| 6509 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN_RST_LBN 4 |
| 6510 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_IN_RST_WIDTH 1 |
| 6511 | |
| 6512 | /* MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT msgresponse */ |
| 6513 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_LENMIN 4 |
| 6514 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_LENMAX 252 |
| 6515 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6516 | /* Array of stats */ |
| 6517 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_BUFFER_OFST 0 |
| 6518 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_BUFFER_LEN 4 |
| 6519 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_BUFFER_MINNUM 1 |
| 6520 | #define MC_CMD_RMON_TX_SUPER_CLASS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6521 | |
| 6522 | |
| 6523 | /***********************************/ |
| 6524 | /* MC_CMD_RMON_RX_ADD_QID_TO_CLASS |
| 6525 | * Add qid to class for statistics collection |
| 6526 | */ |
| 6527 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS 0xc7 |
| 6528 | |
| 6529 | /* MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN msgrequest */ |
| 6530 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_LEN 12 |
| 6531 | /* class */ |
| 6532 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_CLASS_OFST 0 |
| 6533 | /* qid */ |
| 6534 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_QID_OFST 4 |
| 6535 | /* flags */ |
| 6536 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_FLAGS_OFST 8 |
| 6537 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_SUPER_CLASS_LBN 0 |
| 6538 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_SUPER_CLASS_WIDTH 4 |
| 6539 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_PE_DELTA_LBN 4 |
| 6540 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_PE_DELTA_WIDTH 4 |
| 6541 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_MTU_LBN 8 |
| 6542 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_IN_MTU_WIDTH 14 |
| 6543 | |
| 6544 | /* MC_CMD_RMON_RX_ADD_QID_TO_CLASS_OUT msgresponse */ |
| 6545 | #define MC_CMD_RMON_RX_ADD_QID_TO_CLASS_OUT_LEN 0 |
| 6546 | |
| 6547 | |
| 6548 | /***********************************/ |
| 6549 | /* MC_CMD_RMON_TX_ADD_QID_TO_CLASS |
| 6550 | * Add qid to class for statistics collection |
| 6551 | */ |
| 6552 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS 0xc8 |
| 6553 | |
| 6554 | /* MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN msgrequest */ |
| 6555 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_LEN 12 |
| 6556 | /* class */ |
| 6557 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_CLASS_OFST 0 |
| 6558 | /* qid */ |
| 6559 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_QID_OFST 4 |
| 6560 | /* flags */ |
| 6561 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_FLAGS_OFST 8 |
| 6562 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_SUPER_CLASS_LBN 0 |
| 6563 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_SUPER_CLASS_WIDTH 4 |
| 6564 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_PE_DELTA_LBN 4 |
| 6565 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_PE_DELTA_WIDTH 4 |
| 6566 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_MTU_LBN 8 |
| 6567 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_IN_MTU_WIDTH 14 |
| 6568 | |
| 6569 | /* MC_CMD_RMON_TX_ADD_QID_TO_CLASS_OUT msgresponse */ |
| 6570 | #define MC_CMD_RMON_TX_ADD_QID_TO_CLASS_OUT_LEN 0 |
| 6571 | |
| 6572 | |
| 6573 | /***********************************/ |
| 6574 | /* MC_CMD_RMON_MC_ADD_QID_TO_CLASS |
| 6575 | * Add qid to class for statistics collection |
| 6576 | */ |
| 6577 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS 0xc9 |
| 6578 | |
| 6579 | /* MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN msgrequest */ |
| 6580 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_LEN 12 |
| 6581 | /* class */ |
| 6582 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_CLASS_OFST 0 |
| 6583 | /* qid */ |
| 6584 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_QID_OFST 4 |
| 6585 | /* flags */ |
| 6586 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_FLAGS_OFST 8 |
| 6587 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_SUPER_CLASS_LBN 0 |
| 6588 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_SUPER_CLASS_WIDTH 4 |
| 6589 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_PE_DELTA_LBN 4 |
| 6590 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_PE_DELTA_WIDTH 4 |
| 6591 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_MTU_LBN 8 |
| 6592 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_IN_MTU_WIDTH 14 |
| 6593 | |
| 6594 | /* MC_CMD_RMON_MC_ADD_QID_TO_CLASS_OUT msgresponse */ |
| 6595 | #define MC_CMD_RMON_MC_ADD_QID_TO_CLASS_OUT_LEN 0 |
| 6596 | |
| 6597 | |
| 6598 | /***********************************/ |
| 6599 | /* MC_CMD_RMON_ALLOC_CLASS |
| 6600 | * Allocate an rmon class |
| 6601 | */ |
| 6602 | #define MC_CMD_RMON_ALLOC_CLASS 0xca |
| 6603 | |
| 6604 | /* MC_CMD_RMON_ALLOC_CLASS_IN msgrequest */ |
| 6605 | #define MC_CMD_RMON_ALLOC_CLASS_IN_LEN 0 |
| 6606 | |
| 6607 | /* MC_CMD_RMON_ALLOC_CLASS_OUT msgresponse */ |
| 6608 | #define MC_CMD_RMON_ALLOC_CLASS_OUT_LEN 4 |
| 6609 | /* class */ |
| 6610 | #define MC_CMD_RMON_ALLOC_CLASS_OUT_CLASS_OFST 0 |
| 6611 | |
| 6612 | |
| 6613 | /***********************************/ |
| 6614 | /* MC_CMD_RMON_DEALLOC_CLASS |
| 6615 | * Deallocate an rmon class |
| 6616 | */ |
| 6617 | #define MC_CMD_RMON_DEALLOC_CLASS 0xcb |
| 6618 | |
| 6619 | /* MC_CMD_RMON_DEALLOC_CLASS_IN msgrequest */ |
| 6620 | #define MC_CMD_RMON_DEALLOC_CLASS_IN_LEN 4 |
| 6621 | /* class */ |
| 6622 | #define MC_CMD_RMON_DEALLOC_CLASS_IN_CLASS_OFST 0 |
| 6623 | |
| 6624 | /* MC_CMD_RMON_DEALLOC_CLASS_OUT msgresponse */ |
| 6625 | #define MC_CMD_RMON_DEALLOC_CLASS_OUT_LEN 0 |
| 6626 | |
| 6627 | |
| 6628 | /***********************************/ |
| 6629 | /* MC_CMD_RMON_ALLOC_SUPER_CLASS |
| 6630 | * Allocate an rmon super_class |
| 6631 | */ |
| 6632 | #define MC_CMD_RMON_ALLOC_SUPER_CLASS 0xcc |
| 6633 | |
| 6634 | /* MC_CMD_RMON_ALLOC_SUPER_CLASS_IN msgrequest */ |
| 6635 | #define MC_CMD_RMON_ALLOC_SUPER_CLASS_IN_LEN 0 |
| 6636 | |
| 6637 | /* MC_CMD_RMON_ALLOC_SUPER_CLASS_OUT msgresponse */ |
| 6638 | #define MC_CMD_RMON_ALLOC_SUPER_CLASS_OUT_LEN 4 |
| 6639 | /* super_class */ |
| 6640 | #define MC_CMD_RMON_ALLOC_SUPER_CLASS_OUT_SUPER_CLASS_OFST 0 |
| 6641 | |
| 6642 | |
| 6643 | /***********************************/ |
| 6644 | /* MC_CMD_RMON_DEALLOC_SUPER_CLASS |
| 6645 | * Deallocate an rmon tx super_class |
| 6646 | */ |
| 6647 | #define MC_CMD_RMON_DEALLOC_SUPER_CLASS 0xcd |
| 6648 | |
| 6649 | /* MC_CMD_RMON_DEALLOC_SUPER_CLASS_IN msgrequest */ |
| 6650 | #define MC_CMD_RMON_DEALLOC_SUPER_CLASS_IN_LEN 4 |
| 6651 | /* super_class */ |
| 6652 | #define MC_CMD_RMON_DEALLOC_SUPER_CLASS_IN_SUPER_CLASS_OFST 0 |
| 6653 | |
| 6654 | /* MC_CMD_RMON_DEALLOC_SUPER_CLASS_OUT msgresponse */ |
| 6655 | #define MC_CMD_RMON_DEALLOC_SUPER_CLASS_OUT_LEN 0 |
| 6656 | |
| 6657 | |
| 6658 | /***********************************/ |
| 6659 | /* MC_CMD_RMON_RX_UP_CONV_STATS |
| 6660 | * Retrieve up converter statistics |
| 6661 | */ |
| 6662 | #define MC_CMD_RMON_RX_UP_CONV_STATS 0xce |
| 6663 | |
| 6664 | /* MC_CMD_RMON_RX_UP_CONV_STATS_IN msgrequest */ |
| 6665 | #define MC_CMD_RMON_RX_UP_CONV_STATS_IN_LEN 4 |
| 6666 | /* flags */ |
| 6667 | #define MC_CMD_RMON_RX_UP_CONV_STATS_IN_FLAGS_OFST 0 |
| 6668 | #define MC_CMD_RMON_RX_UP_CONV_STATS_IN_PORT_LBN 0 |
| 6669 | #define MC_CMD_RMON_RX_UP_CONV_STATS_IN_PORT_WIDTH 2 |
| 6670 | #define MC_CMD_RMON_RX_UP_CONV_STATS_IN_RST_LBN 2 |
| 6671 | #define MC_CMD_RMON_RX_UP_CONV_STATS_IN_RST_WIDTH 1 |
| 6672 | |
| 6673 | /* MC_CMD_RMON_RX_UP_CONV_STATS_OUT msgresponse */ |
| 6674 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_LENMIN 4 |
| 6675 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_LENMAX 252 |
| 6676 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_LEN(num) (0+4*(num)) |
| 6677 | /* Array of stats */ |
| 6678 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_BUFFER_OFST 0 |
| 6679 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_BUFFER_LEN 4 |
| 6680 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_BUFFER_MINNUM 1 |
| 6681 | #define MC_CMD_RMON_RX_UP_CONV_STATS_OUT_BUFFER_MAXNUM 63 |
| 6682 | |
| 6683 | |
| 6684 | /***********************************/ |
| 6685 | /* MC_CMD_RMON_RX_IPI_STATS |
| 6686 | * Retrieve rx ipi stats |
| 6687 | */ |
| 6688 | #define MC_CMD_RMON_RX_IPI_STATS 0xcf |
| 6689 | |
| 6690 | /* MC_CMD_RMON_RX_IPI_STATS_IN msgrequest */ |
| 6691 | #define MC_CMD_RMON_RX_IPI_STATS_IN_LEN 4 |
| 6692 | /* flags */ |
| 6693 | #define MC_CMD_RMON_RX_IPI_STATS_IN_FLAGS_OFST 0 |
| 6694 | #define MC_CMD_RMON_RX_IPI_STATS_IN_VFIFO_LBN 0 |
| 6695 | #define MC_CMD_RMON_RX_IPI_STATS_IN_VFIFO_WIDTH 5 |
| 6696 | #define MC_CMD_RMON_RX_IPI_STATS_IN_RST_LBN 5 |
| 6697 | #define MC_CMD_RMON_RX_IPI_STATS_IN_RST_WIDTH 1 |
| 6698 | |
| 6699 | /* MC_CMD_RMON_RX_IPI_STATS_OUT msgresponse */ |
| 6700 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_LENMIN 4 |
| 6701 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_LENMAX 252 |
| 6702 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_LEN(num) (0+4*(num)) |
| 6703 | /* Array of stats */ |
| 6704 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_BUFFER_OFST 0 |
| 6705 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_BUFFER_LEN 4 |
| 6706 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_BUFFER_MINNUM 1 |
| 6707 | #define MC_CMD_RMON_RX_IPI_STATS_OUT_BUFFER_MAXNUM 63 |
| 6708 | |
| 6709 | |
| 6710 | /***********************************/ |
| 6711 | /* MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS |
| 6712 | * Retrieve rx ipsec cntxt_ptr indexed stats |
| 6713 | */ |
| 6714 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS 0xd0 |
| 6715 | |
| 6716 | /* MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN msgrequest */ |
| 6717 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN_LEN 4 |
| 6718 | /* flags */ |
| 6719 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN_FLAGS_OFST 0 |
| 6720 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN_CNTXT_PTR_LBN 0 |
| 6721 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN_CNTXT_PTR_WIDTH 9 |
| 6722 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN_RST_LBN 9 |
| 6723 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_IN_RST_WIDTH 1 |
| 6724 | |
| 6725 | /* MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT msgresponse */ |
| 6726 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_LENMIN 4 |
| 6727 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_LENMAX 252 |
| 6728 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_LEN(num) (0+4*(num)) |
| 6729 | /* Array of stats */ |
| 6730 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_OFST 0 |
| 6731 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_LEN 4 |
| 6732 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_MINNUM 1 |
| 6733 | #define MC_CMD_RMON_RX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_MAXNUM 63 |
| 6734 | |
| 6735 | |
| 6736 | /***********************************/ |
| 6737 | /* MC_CMD_RMON_RX_IPSEC_PORT_STATS |
| 6738 | * Retrieve rx ipsec port indexed stats |
| 6739 | */ |
| 6740 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS 0xd1 |
| 6741 | |
| 6742 | /* MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN msgrequest */ |
| 6743 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN_LEN 4 |
| 6744 | /* flags */ |
| 6745 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN_FLAGS_OFST 0 |
| 6746 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN_PORT_LBN 0 |
| 6747 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN_PORT_WIDTH 2 |
| 6748 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN_RST_LBN 2 |
| 6749 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_IN_RST_WIDTH 1 |
| 6750 | |
| 6751 | /* MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT msgresponse */ |
| 6752 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_LENMIN 4 |
| 6753 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_LENMAX 252 |
| 6754 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_LEN(num) (0+4*(num)) |
| 6755 | /* Array of stats */ |
| 6756 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_BUFFER_OFST 0 |
| 6757 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_BUFFER_LEN 4 |
| 6758 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_BUFFER_MINNUM 1 |
| 6759 | #define MC_CMD_RMON_RX_IPSEC_PORT_STATS_OUT_BUFFER_MAXNUM 63 |
| 6760 | |
| 6761 | |
| 6762 | /***********************************/ |
| 6763 | /* MC_CMD_RMON_RX_IPSEC_OFLOW_STATS |
| 6764 | * Retrieve tx ipsec overflow |
| 6765 | */ |
| 6766 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS 0xd2 |
| 6767 | |
| 6768 | /* MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN msgrequest */ |
| 6769 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN_LEN 4 |
| 6770 | /* flags */ |
| 6771 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN_FLAGS_OFST 0 |
| 6772 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN_PORT_LBN 0 |
| 6773 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN_PORT_WIDTH 2 |
| 6774 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN_RST_LBN 2 |
| 6775 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_IN_RST_WIDTH 1 |
| 6776 | |
| 6777 | /* MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT msgresponse */ |
| 6778 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_LENMIN 4 |
| 6779 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_LENMAX 252 |
| 6780 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_LEN(num) (0+4*(num)) |
| 6781 | /* Array of stats */ |
| 6782 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_BUFFER_OFST 0 |
| 6783 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_BUFFER_LEN 4 |
| 6784 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_BUFFER_MINNUM 1 |
| 6785 | #define MC_CMD_RMON_RX_IPSEC_OFLOW_STATS_OUT_BUFFER_MAXNUM 63 |
| 6786 | |
| 6787 | |
| 6788 | /***********************************/ |
| 6789 | /* MC_CMD_VPORT_ADD_MAC_ADDRESS |
| 6790 | * Add a MAC address to a v-port |
| 6791 | */ |
| 6792 | #define MC_CMD_VPORT_ADD_MAC_ADDRESS 0xa8 |
| 6793 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6794 | #define MC_CMD_0xa8_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6795 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6796 | /* MC_CMD_VPORT_ADD_MAC_ADDRESS_IN msgrequest */ |
| 6797 | #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_LEN 10 |
| 6798 | /* The handle of the v-port */ |
| 6799 | #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_VPORT_ID_OFST 0 |
| 6800 | /* MAC address to add */ |
| 6801 | #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_MACADDR_OFST 4 |
| 6802 | #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_MACADDR_LEN 6 |
| 6803 | |
| 6804 | /* MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT msgresponse */ |
| 6805 | #define MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT_LEN 0 |
| 6806 | |
| 6807 | |
| 6808 | /***********************************/ |
| 6809 | /* MC_CMD_VPORT_DEL_MAC_ADDRESS |
| 6810 | * Delete a MAC address from a v-port |
| 6811 | */ |
| 6812 | #define MC_CMD_VPORT_DEL_MAC_ADDRESS 0xa9 |
| 6813 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6814 | #define MC_CMD_0xa9_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6815 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6816 | /* MC_CMD_VPORT_DEL_MAC_ADDRESS_IN msgrequest */ |
| 6817 | #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_LEN 10 |
| 6818 | /* The handle of the v-port */ |
| 6819 | #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID_OFST 0 |
| 6820 | /* MAC address to add */ |
| 6821 | #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_MACADDR_OFST 4 |
| 6822 | #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_MACADDR_LEN 6 |
| 6823 | |
| 6824 | /* MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT msgresponse */ |
| 6825 | #define MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT_LEN 0 |
| 6826 | |
| 6827 | |
| 6828 | /***********************************/ |
| 6829 | /* MC_CMD_VPORT_GET_MAC_ADDRESSES |
| 6830 | * Delete a MAC address from a v-port |
| 6831 | */ |
| 6832 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES 0xaa |
| 6833 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6834 | #define MC_CMD_0xaa_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 6835 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6836 | /* MC_CMD_VPORT_GET_MAC_ADDRESSES_IN msgrequest */ |
| 6837 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN 4 |
| 6838 | /* The handle of the v-port */ |
| 6839 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_VPORT_ID_OFST 0 |
| 6840 | |
| 6841 | /* MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT msgresponse */ |
| 6842 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMIN 4 |
| 6843 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX 250 |
| 6844 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LEN(num) (4+6*(num)) |
| 6845 | /* The number of MAC addresses returned */ |
| 6846 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_COUNT_OFST 0 |
| 6847 | /* Array of MAC addresses */ |
| 6848 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_OFST 4 |
| 6849 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_LEN 6 |
| 6850 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MINNUM 0 |
| 6851 | #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MAXNUM 41 |
| 6852 | |
| 6853 | |
| 6854 | /***********************************/ |
| 6855 | /* MC_CMD_DUMP_BUFTBL_ENTRIES |
| 6856 | * Dump buffer table entries, mainly for command client debug use. Dumps |
| 6857 | * absolute entries, and does not use chunk handles. All entries must be in |
| 6858 | * range, and used for q page mapping, Although the latter restriction may be |
| 6859 | * lifted in future. |
| 6860 | */ |
| 6861 | #define MC_CMD_DUMP_BUFTBL_ENTRIES 0xab |
| 6862 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6863 | #define MC_CMD_0xab_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6864 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6865 | /* MC_CMD_DUMP_BUFTBL_ENTRIES_IN msgrequest */ |
| 6866 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_LEN 8 |
| 6867 | /* Index of the first buffer table entry. */ |
| 6868 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_FIRSTID_OFST 0 |
| 6869 | /* Number of buffer table entries to dump. */ |
| 6870 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_NUMENTRIES_OFST 4 |
| 6871 | |
| 6872 | /* MC_CMD_DUMP_BUFTBL_ENTRIES_OUT msgresponse */ |
| 6873 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMIN 12 |
| 6874 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMAX 252 |
| 6875 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LEN(num) (0+12*(num)) |
Joe Perches | dbedd44 | 2015-03-06 20:49:12 -0800 | [diff] [blame] | 6876 | /* Raw buffer table entries, laid out as BUFTBL_ENTRY. */ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6877 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_OFST 0 |
| 6878 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_LEN 12 |
| 6879 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MINNUM 1 |
| 6880 | #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MAXNUM 21 |
| 6881 | |
| 6882 | |
| 6883 | /***********************************/ |
| 6884 | /* MC_CMD_SET_RXDP_CONFIG |
| 6885 | * Set global RXDP configuration settings |
| 6886 | */ |
| 6887 | #define MC_CMD_SET_RXDP_CONFIG 0xc1 |
| 6888 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6889 | #define MC_CMD_0xc1_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6890 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6891 | /* MC_CMD_SET_RXDP_CONFIG_IN msgrequest */ |
| 6892 | #define MC_CMD_SET_RXDP_CONFIG_IN_LEN 4 |
| 6893 | #define MC_CMD_SET_RXDP_CONFIG_IN_DATA_OFST 0 |
| 6894 | #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_LBN 0 |
| 6895 | #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_WIDTH 1 |
| 6896 | |
| 6897 | /* MC_CMD_SET_RXDP_CONFIG_OUT msgresponse */ |
| 6898 | #define MC_CMD_SET_RXDP_CONFIG_OUT_LEN 0 |
| 6899 | |
| 6900 | |
| 6901 | /***********************************/ |
| 6902 | /* MC_CMD_GET_RXDP_CONFIG |
| 6903 | * Get global RXDP configuration settings |
| 6904 | */ |
| 6905 | #define MC_CMD_GET_RXDP_CONFIG 0xc2 |
| 6906 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 6907 | #define MC_CMD_0xc2_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 6908 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 6909 | /* MC_CMD_GET_RXDP_CONFIG_IN msgrequest */ |
| 6910 | #define MC_CMD_GET_RXDP_CONFIG_IN_LEN 0 |
| 6911 | |
| 6912 | /* MC_CMD_GET_RXDP_CONFIG_OUT msgresponse */ |
| 6913 | #define MC_CMD_GET_RXDP_CONFIG_OUT_LEN 4 |
| 6914 | #define MC_CMD_GET_RXDP_CONFIG_OUT_DATA_OFST 0 |
| 6915 | #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_LBN 0 |
| 6916 | #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_WIDTH 1 |
| 6917 | |
| 6918 | |
| 6919 | /***********************************/ |
| 6920 | /* MC_CMD_RMON_RX_CLASS_DROPS_STATS |
| 6921 | * Retrieve rx class drop stats |
| 6922 | */ |
| 6923 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS 0xd3 |
| 6924 | |
| 6925 | /* MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN msgrequest */ |
| 6926 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN_LEN 4 |
| 6927 | /* flags */ |
| 6928 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN_FLAGS_OFST 0 |
| 6929 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN_CLASS_LBN 0 |
| 6930 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN_CLASS_WIDTH 8 |
| 6931 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN_RST_LBN 8 |
| 6932 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_IN_RST_WIDTH 1 |
| 6933 | |
| 6934 | /* MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT msgresponse */ |
| 6935 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_LENMIN 4 |
| 6936 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_LENMAX 252 |
| 6937 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6938 | /* Array of stats */ |
| 6939 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_BUFFER_OFST 0 |
| 6940 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_BUFFER_LEN 4 |
| 6941 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_BUFFER_MINNUM 1 |
| 6942 | #define MC_CMD_RMON_RX_CLASS_DROPS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6943 | |
| 6944 | |
| 6945 | /***********************************/ |
| 6946 | /* MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS |
| 6947 | * Retrieve rx super class drop stats |
| 6948 | */ |
| 6949 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS 0xd4 |
| 6950 | |
| 6951 | /* MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN msgrequest */ |
| 6952 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN_LEN 4 |
| 6953 | /* flags */ |
| 6954 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN_FLAGS_OFST 0 |
| 6955 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN_SUPER_CLASS_LBN 0 |
| 6956 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN_SUPER_CLASS_WIDTH 4 |
| 6957 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN_RST_LBN 4 |
| 6958 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_IN_RST_WIDTH 1 |
| 6959 | |
| 6960 | /* MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT msgresponse */ |
| 6961 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_LENMIN 4 |
| 6962 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_LENMAX 252 |
| 6963 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6964 | /* Array of stats */ |
| 6965 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_BUFFER_OFST 0 |
| 6966 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_BUFFER_LEN 4 |
| 6967 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_BUFFER_MINNUM 1 |
| 6968 | #define MC_CMD_RMON_RX_SUPER_CLASS_DROPS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6969 | |
| 6970 | |
| 6971 | /***********************************/ |
| 6972 | /* MC_CMD_RMON_RX_ERRORS_STATS |
| 6973 | * Retrieve rxdp errors |
| 6974 | */ |
| 6975 | #define MC_CMD_RMON_RX_ERRORS_STATS 0xd5 |
| 6976 | |
| 6977 | /* MC_CMD_RMON_RX_ERRORS_STATS_IN msgrequest */ |
| 6978 | #define MC_CMD_RMON_RX_ERRORS_STATS_IN_LEN 4 |
| 6979 | /* flags */ |
| 6980 | #define MC_CMD_RMON_RX_ERRORS_STATS_IN_FLAGS_OFST 0 |
| 6981 | #define MC_CMD_RMON_RX_ERRORS_STATS_IN_QID_LBN 0 |
| 6982 | #define MC_CMD_RMON_RX_ERRORS_STATS_IN_QID_WIDTH 11 |
| 6983 | #define MC_CMD_RMON_RX_ERRORS_STATS_IN_RST_LBN 11 |
| 6984 | #define MC_CMD_RMON_RX_ERRORS_STATS_IN_RST_WIDTH 1 |
| 6985 | |
| 6986 | /* MC_CMD_RMON_RX_ERRORS_STATS_OUT msgresponse */ |
| 6987 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_LENMIN 4 |
| 6988 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_LENMAX 252 |
| 6989 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_LEN(num) (0+4*(num)) |
| 6990 | /* Array of stats */ |
| 6991 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_BUFFER_OFST 0 |
| 6992 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_BUFFER_LEN 4 |
| 6993 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_BUFFER_MINNUM 1 |
| 6994 | #define MC_CMD_RMON_RX_ERRORS_STATS_OUT_BUFFER_MAXNUM 63 |
| 6995 | |
| 6996 | |
| 6997 | /***********************************/ |
| 6998 | /* MC_CMD_RMON_RX_OVERFLOW_STATS |
| 6999 | * Retrieve rxdp overflow |
| 7000 | */ |
| 7001 | #define MC_CMD_RMON_RX_OVERFLOW_STATS 0xd6 |
| 7002 | |
| 7003 | /* MC_CMD_RMON_RX_OVERFLOW_STATS_IN msgrequest */ |
| 7004 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_IN_LEN 4 |
| 7005 | /* flags */ |
| 7006 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_IN_FLAGS_OFST 0 |
| 7007 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_IN_CLASS_LBN 0 |
| 7008 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_IN_CLASS_WIDTH 8 |
| 7009 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_IN_RST_LBN 8 |
| 7010 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_IN_RST_WIDTH 1 |
| 7011 | |
| 7012 | /* MC_CMD_RMON_RX_OVERFLOW_STATS_OUT msgresponse */ |
| 7013 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_LENMIN 4 |
| 7014 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_LENMAX 252 |
| 7015 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_LEN(num) (0+4*(num)) |
| 7016 | /* Array of stats */ |
| 7017 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_BUFFER_OFST 0 |
| 7018 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_BUFFER_LEN 4 |
| 7019 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_BUFFER_MINNUM 1 |
| 7020 | #define MC_CMD_RMON_RX_OVERFLOW_STATS_OUT_BUFFER_MAXNUM 63 |
| 7021 | |
| 7022 | |
| 7023 | /***********************************/ |
| 7024 | /* MC_CMD_RMON_TX_IPI_STATS |
| 7025 | * Retrieve tx ipi stats |
| 7026 | */ |
| 7027 | #define MC_CMD_RMON_TX_IPI_STATS 0xd7 |
| 7028 | |
| 7029 | /* MC_CMD_RMON_TX_IPI_STATS_IN msgrequest */ |
| 7030 | #define MC_CMD_RMON_TX_IPI_STATS_IN_LEN 4 |
| 7031 | /* flags */ |
| 7032 | #define MC_CMD_RMON_TX_IPI_STATS_IN_FLAGS_OFST 0 |
| 7033 | #define MC_CMD_RMON_TX_IPI_STATS_IN_VFIFO_LBN 0 |
| 7034 | #define MC_CMD_RMON_TX_IPI_STATS_IN_VFIFO_WIDTH 5 |
| 7035 | #define MC_CMD_RMON_TX_IPI_STATS_IN_RST_LBN 5 |
| 7036 | #define MC_CMD_RMON_TX_IPI_STATS_IN_RST_WIDTH 1 |
| 7037 | |
| 7038 | /* MC_CMD_RMON_TX_IPI_STATS_OUT msgresponse */ |
| 7039 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_LENMIN 4 |
| 7040 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_LENMAX 252 |
| 7041 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_LEN(num) (0+4*(num)) |
| 7042 | /* Array of stats */ |
| 7043 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_BUFFER_OFST 0 |
| 7044 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_BUFFER_LEN 4 |
| 7045 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_BUFFER_MINNUM 1 |
| 7046 | #define MC_CMD_RMON_TX_IPI_STATS_OUT_BUFFER_MAXNUM 63 |
| 7047 | |
| 7048 | |
| 7049 | /***********************************/ |
| 7050 | /* MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS |
| 7051 | * Retrieve tx ipsec counters by cntxt_ptr |
| 7052 | */ |
| 7053 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS 0xd8 |
| 7054 | |
| 7055 | /* MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN msgrequest */ |
| 7056 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN_LEN 4 |
| 7057 | /* flags */ |
| 7058 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN_FLAGS_OFST 0 |
| 7059 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN_CNTXT_PTR_LBN 0 |
| 7060 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN_CNTXT_PTR_WIDTH 9 |
| 7061 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN_RST_LBN 9 |
| 7062 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_IN_RST_WIDTH 1 |
| 7063 | |
| 7064 | /* MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT msgresponse */ |
| 7065 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_LENMIN 4 |
| 7066 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_LENMAX 252 |
| 7067 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_LEN(num) (0+4*(num)) |
| 7068 | /* Array of stats */ |
| 7069 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_OFST 0 |
| 7070 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_LEN 4 |
| 7071 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_MINNUM 1 |
| 7072 | #define MC_CMD_RMON_TX_IPSEC_CNTXT_PTR_STATS_OUT_BUFFER_MAXNUM 63 |
| 7073 | |
| 7074 | |
| 7075 | /***********************************/ |
| 7076 | /* MC_CMD_RMON_TX_IPSEC_PORT_STATS |
| 7077 | * Retrieve tx ipsec counters by port |
| 7078 | */ |
| 7079 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS 0xd9 |
| 7080 | |
| 7081 | /* MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN msgrequest */ |
| 7082 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN_LEN 4 |
| 7083 | /* flags */ |
| 7084 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN_FLAGS_OFST 0 |
| 7085 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN_PORT_LBN 0 |
| 7086 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN_PORT_WIDTH 2 |
| 7087 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN_RST_LBN 2 |
| 7088 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_IN_RST_WIDTH 1 |
| 7089 | |
| 7090 | /* MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT msgresponse */ |
| 7091 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_LENMIN 4 |
| 7092 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_LENMAX 252 |
| 7093 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_LEN(num) (0+4*(num)) |
| 7094 | /* Array of stats */ |
| 7095 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_BUFFER_OFST 0 |
| 7096 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_BUFFER_LEN 4 |
| 7097 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_BUFFER_MINNUM 1 |
| 7098 | #define MC_CMD_RMON_TX_IPSEC_PORT_STATS_OUT_BUFFER_MAXNUM 63 |
| 7099 | |
| 7100 | |
| 7101 | /***********************************/ |
| 7102 | /* MC_CMD_RMON_TX_IPSEC_OFLOW_STATS |
| 7103 | * Retrieve tx ipsec overflow |
| 7104 | */ |
| 7105 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS 0xda |
| 7106 | |
| 7107 | /* MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN msgrequest */ |
| 7108 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN_LEN 4 |
| 7109 | /* flags */ |
| 7110 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN_FLAGS_OFST 0 |
| 7111 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN_PORT_LBN 0 |
| 7112 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN_PORT_WIDTH 2 |
| 7113 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN_RST_LBN 2 |
| 7114 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_IN_RST_WIDTH 1 |
| 7115 | |
| 7116 | /* MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT msgresponse */ |
| 7117 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_LENMIN 4 |
| 7118 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_LENMAX 252 |
| 7119 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_LEN(num) (0+4*(num)) |
| 7120 | /* Array of stats */ |
| 7121 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_BUFFER_OFST 0 |
| 7122 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_BUFFER_LEN 4 |
| 7123 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_BUFFER_MINNUM 1 |
| 7124 | #define MC_CMD_RMON_TX_IPSEC_OFLOW_STATS_OUT_BUFFER_MAXNUM 63 |
| 7125 | |
| 7126 | |
| 7127 | /***********************************/ |
| 7128 | /* MC_CMD_RMON_TX_NOWHERE_STATS |
| 7129 | * Retrieve tx nowhere stats |
| 7130 | */ |
| 7131 | #define MC_CMD_RMON_TX_NOWHERE_STATS 0xdb |
| 7132 | |
| 7133 | /* MC_CMD_RMON_TX_NOWHERE_STATS_IN msgrequest */ |
| 7134 | #define MC_CMD_RMON_TX_NOWHERE_STATS_IN_LEN 4 |
| 7135 | /* flags */ |
| 7136 | #define MC_CMD_RMON_TX_NOWHERE_STATS_IN_FLAGS_OFST 0 |
| 7137 | #define MC_CMD_RMON_TX_NOWHERE_STATS_IN_CLASS_LBN 0 |
| 7138 | #define MC_CMD_RMON_TX_NOWHERE_STATS_IN_CLASS_WIDTH 8 |
| 7139 | #define MC_CMD_RMON_TX_NOWHERE_STATS_IN_RST_LBN 8 |
| 7140 | #define MC_CMD_RMON_TX_NOWHERE_STATS_IN_RST_WIDTH 1 |
| 7141 | |
| 7142 | /* MC_CMD_RMON_TX_NOWHERE_STATS_OUT msgresponse */ |
| 7143 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_LENMIN 4 |
| 7144 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_LENMAX 252 |
| 7145 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_LEN(num) (0+4*(num)) |
| 7146 | /* Array of stats */ |
| 7147 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_BUFFER_OFST 0 |
| 7148 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_BUFFER_LEN 4 |
| 7149 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_BUFFER_MINNUM 1 |
| 7150 | #define MC_CMD_RMON_TX_NOWHERE_STATS_OUT_BUFFER_MAXNUM 63 |
| 7151 | |
| 7152 | |
| 7153 | /***********************************/ |
| 7154 | /* MC_CMD_RMON_TX_NOWHERE_QBB_STATS |
| 7155 | * Retrieve tx nowhere qbb stats |
| 7156 | */ |
| 7157 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS 0xdc |
| 7158 | |
| 7159 | /* MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN msgrequest */ |
| 7160 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN_LEN 4 |
| 7161 | /* flags */ |
| 7162 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN_FLAGS_OFST 0 |
| 7163 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN_PRIORITY_LBN 0 |
| 7164 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN_PRIORITY_WIDTH 3 |
| 7165 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN_RST_LBN 3 |
| 7166 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_IN_RST_WIDTH 1 |
| 7167 | |
| 7168 | /* MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT msgresponse */ |
| 7169 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_LENMIN 4 |
| 7170 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_LENMAX 252 |
| 7171 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_LEN(num) (0+4*(num)) |
| 7172 | /* Array of stats */ |
| 7173 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_BUFFER_OFST 0 |
| 7174 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_BUFFER_LEN 4 |
| 7175 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_BUFFER_MINNUM 1 |
| 7176 | #define MC_CMD_RMON_TX_NOWHERE_QBB_STATS_OUT_BUFFER_MAXNUM 63 |
| 7177 | |
| 7178 | |
| 7179 | /***********************************/ |
| 7180 | /* MC_CMD_RMON_TX_ERRORS_STATS |
| 7181 | * Retrieve rxdp errors |
| 7182 | */ |
| 7183 | #define MC_CMD_RMON_TX_ERRORS_STATS 0xdd |
| 7184 | |
| 7185 | /* MC_CMD_RMON_TX_ERRORS_STATS_IN msgrequest */ |
| 7186 | #define MC_CMD_RMON_TX_ERRORS_STATS_IN_LEN 4 |
| 7187 | /* flags */ |
| 7188 | #define MC_CMD_RMON_TX_ERRORS_STATS_IN_FLAGS_OFST 0 |
| 7189 | #define MC_CMD_RMON_TX_ERRORS_STATS_IN_QID_LBN 0 |
| 7190 | #define MC_CMD_RMON_TX_ERRORS_STATS_IN_QID_WIDTH 11 |
| 7191 | #define MC_CMD_RMON_TX_ERRORS_STATS_IN_RST_LBN 11 |
| 7192 | #define MC_CMD_RMON_TX_ERRORS_STATS_IN_RST_WIDTH 1 |
| 7193 | |
| 7194 | /* MC_CMD_RMON_TX_ERRORS_STATS_OUT msgresponse */ |
| 7195 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_LENMIN 4 |
| 7196 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_LENMAX 252 |
| 7197 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_LEN(num) (0+4*(num)) |
| 7198 | /* Array of stats */ |
| 7199 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_BUFFER_OFST 0 |
| 7200 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_BUFFER_LEN 4 |
| 7201 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_BUFFER_MINNUM 1 |
| 7202 | #define MC_CMD_RMON_TX_ERRORS_STATS_OUT_BUFFER_MAXNUM 63 |
| 7203 | |
| 7204 | |
| 7205 | /***********************************/ |
| 7206 | /* MC_CMD_RMON_TX_OVERFLOW_STATS |
| 7207 | * Retrieve rxdp overflow |
| 7208 | */ |
| 7209 | #define MC_CMD_RMON_TX_OVERFLOW_STATS 0xde |
| 7210 | |
| 7211 | /* MC_CMD_RMON_TX_OVERFLOW_STATS_IN msgrequest */ |
| 7212 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_IN_LEN 4 |
| 7213 | /* flags */ |
| 7214 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_IN_FLAGS_OFST 0 |
| 7215 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_IN_CLASS_LBN 0 |
| 7216 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_IN_CLASS_WIDTH 8 |
| 7217 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_IN_RST_LBN 8 |
| 7218 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_IN_RST_WIDTH 1 |
| 7219 | |
| 7220 | /* MC_CMD_RMON_TX_OVERFLOW_STATS_OUT msgresponse */ |
| 7221 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_LENMIN 4 |
| 7222 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_LENMAX 252 |
| 7223 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_LEN(num) (0+4*(num)) |
| 7224 | /* Array of stats */ |
| 7225 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_BUFFER_OFST 0 |
| 7226 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_BUFFER_LEN 4 |
| 7227 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_BUFFER_MINNUM 1 |
| 7228 | #define MC_CMD_RMON_TX_OVERFLOW_STATS_OUT_BUFFER_MAXNUM 63 |
| 7229 | |
| 7230 | |
| 7231 | /***********************************/ |
| 7232 | /* MC_CMD_RMON_COLLECT_CLASS_STATS |
| 7233 | * Explicitly collect class stats at the specified evb port |
| 7234 | */ |
| 7235 | #define MC_CMD_RMON_COLLECT_CLASS_STATS 0xdf |
| 7236 | |
| 7237 | /* MC_CMD_RMON_COLLECT_CLASS_STATS_IN msgrequest */ |
| 7238 | #define MC_CMD_RMON_COLLECT_CLASS_STATS_IN_LEN 4 |
| 7239 | /* The port id associated with the vport/pport at which to collect class stats |
| 7240 | */ |
| 7241 | #define MC_CMD_RMON_COLLECT_CLASS_STATS_IN_PORT_ID_OFST 0 |
| 7242 | |
| 7243 | /* MC_CMD_RMON_COLLECT_CLASS_STATS_OUT msgresponse */ |
| 7244 | #define MC_CMD_RMON_COLLECT_CLASS_STATS_OUT_LEN 4 |
| 7245 | /* class */ |
| 7246 | #define MC_CMD_RMON_COLLECT_CLASS_STATS_OUT_CLASS_OFST 0 |
| 7247 | |
| 7248 | |
| 7249 | /***********************************/ |
| 7250 | /* MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS |
| 7251 | * Explicitly collect class stats at the specified evb port |
| 7252 | */ |
| 7253 | #define MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS 0xe0 |
| 7254 | |
| 7255 | /* MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS_IN msgrequest */ |
| 7256 | #define MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS_IN_LEN 4 |
| 7257 | /* The port id associated with the vport/pport at which to collect class stats |
| 7258 | */ |
| 7259 | #define MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS_IN_PORT_ID_OFST 0 |
| 7260 | |
| 7261 | /* MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS_OUT msgresponse */ |
| 7262 | #define MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS_OUT_LEN 4 |
| 7263 | /* super_class */ |
| 7264 | #define MC_CMD_RMON_COLLECT_SUPER_CLASS_STATS_OUT_SUPER_CLASS_OFST 0 |
| 7265 | |
| 7266 | |
| 7267 | /***********************************/ |
| 7268 | /* MC_CMD_GET_CLOCK |
| 7269 | * Return the system and PDCPU clock frequencies. |
| 7270 | */ |
| 7271 | #define MC_CMD_GET_CLOCK 0xac |
| 7272 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7273 | #define MC_CMD_0xac_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 7274 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7275 | /* MC_CMD_GET_CLOCK_IN msgrequest */ |
| 7276 | #define MC_CMD_GET_CLOCK_IN_LEN 0 |
| 7277 | |
| 7278 | /* MC_CMD_GET_CLOCK_OUT msgresponse */ |
| 7279 | #define MC_CMD_GET_CLOCK_OUT_LEN 8 |
| 7280 | /* System frequency, MHz */ |
| 7281 | #define MC_CMD_GET_CLOCK_OUT_SYS_FREQ_OFST 0 |
| 7282 | /* DPCPU frequency, MHz */ |
| 7283 | #define MC_CMD_GET_CLOCK_OUT_DPCPU_FREQ_OFST 4 |
| 7284 | |
| 7285 | |
| 7286 | /***********************************/ |
| 7287 | /* MC_CMD_SET_CLOCK |
| 7288 | * Control the system and DPCPU clock frequencies. Changes are lost reboot. |
| 7289 | */ |
| 7290 | #define MC_CMD_SET_CLOCK 0xad |
| 7291 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7292 | #define MC_CMD_0xad_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7293 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7294 | /* MC_CMD_SET_CLOCK_IN msgrequest */ |
| 7295 | #define MC_CMD_SET_CLOCK_IN_LEN 12 |
| 7296 | /* Requested system frequency in MHz; 0 leaves unchanged. */ |
| 7297 | #define MC_CMD_SET_CLOCK_IN_SYS_FREQ_OFST 0 |
| 7298 | /* Requested inter-core frequency in MHz; 0 leaves unchanged. */ |
| 7299 | #define MC_CMD_SET_CLOCK_IN_ICORE_FREQ_OFST 4 |
| 7300 | /* Request DPCPU frequency in MHz; 0 leaves unchanged. */ |
| 7301 | #define MC_CMD_SET_CLOCK_IN_DPCPU_FREQ_OFST 8 |
| 7302 | |
| 7303 | /* MC_CMD_SET_CLOCK_OUT msgresponse */ |
| 7304 | #define MC_CMD_SET_CLOCK_OUT_LEN 12 |
| 7305 | /* Resulting system frequency in MHz */ |
| 7306 | #define MC_CMD_SET_CLOCK_OUT_SYS_FREQ_OFST 0 |
| 7307 | /* Resulting inter-core frequency in MHz */ |
| 7308 | #define MC_CMD_SET_CLOCK_OUT_ICORE_FREQ_OFST 4 |
| 7309 | /* Resulting DPCPU frequency in MHz */ |
| 7310 | #define MC_CMD_SET_CLOCK_OUT_DPCPU_FREQ_OFST 8 |
| 7311 | |
| 7312 | |
| 7313 | /***********************************/ |
| 7314 | /* MC_CMD_DPCPU_RPC |
| 7315 | * Send an arbitrary DPCPU message. |
| 7316 | */ |
| 7317 | #define MC_CMD_DPCPU_RPC 0xae |
| 7318 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7319 | #define MC_CMD_0xae_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7320 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7321 | /* MC_CMD_DPCPU_RPC_IN msgrequest */ |
| 7322 | #define MC_CMD_DPCPU_RPC_IN_LEN 36 |
| 7323 | #define MC_CMD_DPCPU_RPC_IN_CPU_OFST 0 |
| 7324 | /* enum: RxDPCPU */ |
| 7325 | #define MC_CMD_DPCPU_RPC_IN_DPCPU_RX 0x0 |
| 7326 | /* enum: TxDPCPU0 */ |
| 7327 | #define MC_CMD_DPCPU_RPC_IN_DPCPU_TX0 0x1 |
| 7328 | /* enum: TxDPCPU1 */ |
| 7329 | #define MC_CMD_DPCPU_RPC_IN_DPCPU_TX1 0x2 |
| 7330 | /* First 8 bits [39:32] of DATA are consumed by MC-DPCPU protocol and must be |
| 7331 | * initialised to zero |
| 7332 | */ |
| 7333 | #define MC_CMD_DPCPU_RPC_IN_DATA_OFST 4 |
| 7334 | #define MC_CMD_DPCPU_RPC_IN_DATA_LEN 32 |
| 7335 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_LBN 8 |
| 7336 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_WIDTH 8 |
| 7337 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_READ 0x6 /* enum */ |
| 7338 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_WRITE 0x7 /* enum */ |
| 7339 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_SELF_TEST 0xc /* enum */ |
| 7340 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_CSR_ACCESS 0xe /* enum */ |
| 7341 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_READ 0x46 /* enum */ |
| 7342 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_WRITE 0x47 /* enum */ |
| 7343 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_SELF_TEST 0x4a /* enum */ |
| 7344 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_CSR_ACCESS 0x4c /* enum */ |
| 7345 | #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_SET_MC_REPLAY_CNTXT 0x4d /* enum */ |
| 7346 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_LBN 16 |
| 7347 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_WIDTH 16 |
| 7348 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_LBN 16 |
| 7349 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_WIDTH 16 |
| 7350 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_LBN 48 |
| 7351 | #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_WIDTH 16 |
| 7352 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_LBN 16 |
| 7353 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_WIDTH 240 |
| 7354 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_LBN 16 |
| 7355 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_WIDTH 16 |
| 7356 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_STOP_RETURN_RESULT 0x0 /* enum */ |
| 7357 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_READ 0x1 /* enum */ |
| 7358 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_WRITE 0x2 /* enum */ |
| 7359 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_WRITE_READ 0x3 /* enum */ |
| 7360 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_PIPELINED_READ 0x4 /* enum */ |
| 7361 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_LBN 48 |
| 7362 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_WIDTH 16 |
| 7363 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_LBN 64 |
| 7364 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_WIDTH 16 |
| 7365 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_LBN 80 |
| 7366 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_WIDTH 16 |
| 7367 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_LBN 16 |
| 7368 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_WIDTH 16 |
| 7369 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_CUT_THROUGH 0x1 /* enum */ |
| 7370 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_STORE_FORWARD 0x2 /* enum */ |
| 7371 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_STORE_FORWARD_FIRST 0x3 /* enum */ |
| 7372 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_LBN 64 |
| 7373 | #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_WIDTH 16 |
| 7374 | #define MC_CMD_DPCPU_RPC_IN_WDATA_OFST 12 |
| 7375 | #define MC_CMD_DPCPU_RPC_IN_WDATA_LEN 24 |
| 7376 | /* Register data to write. Only valid in write/write-read. */ |
| 7377 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_DATA_OFST 16 |
| 7378 | /* Register address. */ |
| 7379 | #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_ADDRESS_OFST 20 |
| 7380 | |
| 7381 | /* MC_CMD_DPCPU_RPC_OUT msgresponse */ |
| 7382 | #define MC_CMD_DPCPU_RPC_OUT_LEN 36 |
| 7383 | #define MC_CMD_DPCPU_RPC_OUT_RC_OFST 0 |
| 7384 | /* DATA */ |
| 7385 | #define MC_CMD_DPCPU_RPC_OUT_DATA_OFST 4 |
| 7386 | #define MC_CMD_DPCPU_RPC_OUT_DATA_LEN 32 |
| 7387 | #define MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_LBN 32 |
| 7388 | #define MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_WIDTH 16 |
| 7389 | #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_LBN 48 |
| 7390 | #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_WIDTH 16 |
| 7391 | #define MC_CMD_DPCPU_RPC_OUT_RDATA_OFST 12 |
| 7392 | #define MC_CMD_DPCPU_RPC_OUT_RDATA_LEN 24 |
| 7393 | #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_1_OFST 12 |
| 7394 | #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_2_OFST 16 |
| 7395 | #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_3_OFST 20 |
| 7396 | #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_4_OFST 24 |
| 7397 | |
| 7398 | |
| 7399 | /***********************************/ |
| 7400 | /* MC_CMD_TRIGGER_INTERRUPT |
| 7401 | * Trigger an interrupt by prodding the BIU. |
| 7402 | */ |
| 7403 | #define MC_CMD_TRIGGER_INTERRUPT 0xe3 |
| 7404 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7405 | #define MC_CMD_0xe3_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 7406 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7407 | /* MC_CMD_TRIGGER_INTERRUPT_IN msgrequest */ |
| 7408 | #define MC_CMD_TRIGGER_INTERRUPT_IN_LEN 4 |
| 7409 | /* Interrupt level relative to base for function. */ |
| 7410 | #define MC_CMD_TRIGGER_INTERRUPT_IN_INTR_LEVEL_OFST 0 |
| 7411 | |
| 7412 | /* MC_CMD_TRIGGER_INTERRUPT_OUT msgresponse */ |
| 7413 | #define MC_CMD_TRIGGER_INTERRUPT_OUT_LEN 0 |
| 7414 | |
| 7415 | |
| 7416 | /***********************************/ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7417 | /* MC_CMD_CAP_BLK_READ |
| 7418 | * Read multiple 64bit words from capture block memory |
| 7419 | */ |
| 7420 | #define MC_CMD_CAP_BLK_READ 0xe7 |
| 7421 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7422 | #define MC_CMD_0xe7_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7423 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7424 | /* MC_CMD_CAP_BLK_READ_IN msgrequest */ |
| 7425 | #define MC_CMD_CAP_BLK_READ_IN_LEN 12 |
| 7426 | #define MC_CMD_CAP_BLK_READ_IN_CAP_REG_OFST 0 |
| 7427 | #define MC_CMD_CAP_BLK_READ_IN_ADDR_OFST 4 |
| 7428 | #define MC_CMD_CAP_BLK_READ_IN_COUNT_OFST 8 |
| 7429 | |
| 7430 | /* MC_CMD_CAP_BLK_READ_OUT msgresponse */ |
| 7431 | #define MC_CMD_CAP_BLK_READ_OUT_LENMIN 8 |
| 7432 | #define MC_CMD_CAP_BLK_READ_OUT_LENMAX 248 |
| 7433 | #define MC_CMD_CAP_BLK_READ_OUT_LEN(num) (0+8*(num)) |
| 7434 | #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_OFST 0 |
| 7435 | #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_LEN 8 |
| 7436 | #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_LO_OFST 0 |
| 7437 | #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_HI_OFST 4 |
| 7438 | #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_MINNUM 1 |
| 7439 | #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_MAXNUM 31 |
| 7440 | |
| 7441 | |
| 7442 | /***********************************/ |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7443 | /* MC_CMD_DUMP_DO |
| 7444 | * Take a dump of the DUT state |
| 7445 | */ |
| 7446 | #define MC_CMD_DUMP_DO 0xe8 |
| 7447 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7448 | #define MC_CMD_0xe8_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7449 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7450 | /* MC_CMD_DUMP_DO_IN msgrequest */ |
| 7451 | #define MC_CMD_DUMP_DO_IN_LEN 52 |
| 7452 | #define MC_CMD_DUMP_DO_IN_PADDING_OFST 0 |
| 7453 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_OFST 4 |
| 7454 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM 0x0 /* enum */ |
| 7455 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_DEFAULT 0x1 /* enum */ |
| 7456 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_TYPE_OFST 8 |
| 7457 | #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_NVRAM 0x1 /* enum */ |
| 7458 | #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_HOST_MEMORY 0x2 /* enum */ |
| 7459 | #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_HOST_MEMORY_MLI 0x3 /* enum */ |
| 7460 | #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_UART 0x4 /* enum */ |
| 7461 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 12 |
| 7462 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_OFST 16 |
| 7463 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 12 |
| 7464 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 16 |
| 7465 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 12 |
| 7466 | #define MC_CMD_DUMP_DO_IN_HOST_MEMORY_MLI_PAGE_SIZE 0x1000 /* enum */ |
| 7467 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 16 |
| 7468 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 20 |
| 7469 | #define MC_CMD_DUMP_DO_IN_HOST_MEMORY_MLI_MAX_DEPTH 0x2 /* enum */ |
| 7470 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_OFST 12 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7471 | /* enum: The uart port this command was received over (if using a uart |
| 7472 | * transport) |
| 7473 | */ |
| 7474 | #define MC_CMD_DUMP_DO_IN_UART_PORT_SRC 0xff |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7475 | #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_SIZE_OFST 24 |
| 7476 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_OFST 28 |
| 7477 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM 0x0 /* enum */ |
| 7478 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_NVRAM_DUMP_PARTITION 0x1 /* enum */ |
| 7479 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_TYPE_OFST 32 |
| 7480 | /* Enum values, see field(s): */ |
| 7481 | /* MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */ |
| 7482 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 36 |
| 7483 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_OFST 40 |
| 7484 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 36 |
| 7485 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 40 |
| 7486 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 36 |
| 7487 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 40 |
| 7488 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 44 |
| 7489 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_UART_PORT_OFST 36 |
| 7490 | #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_SIZE_OFST 48 |
| 7491 | |
| 7492 | /* MC_CMD_DUMP_DO_OUT msgresponse */ |
| 7493 | #define MC_CMD_DUMP_DO_OUT_LEN 4 |
| 7494 | #define MC_CMD_DUMP_DO_OUT_DUMPFILE_SIZE_OFST 0 |
| 7495 | |
| 7496 | |
| 7497 | /***********************************/ |
| 7498 | /* MC_CMD_DUMP_CONFIGURE_UNSOLICITED |
| 7499 | * Configure unsolicited dumps |
| 7500 | */ |
| 7501 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED 0xe9 |
| 7502 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7503 | #define MC_CMD_0xe9_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7504 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7505 | /* MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN msgrequest */ |
| 7506 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_LEN 52 |
| 7507 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_ENABLE_OFST 0 |
| 7508 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_OFST 4 |
| 7509 | /* Enum values, see field(s): */ |
| 7510 | /* MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC */ |
| 7511 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_TYPE_OFST 8 |
| 7512 | /* Enum values, see field(s): */ |
| 7513 | /* MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */ |
| 7514 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 12 |
| 7515 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_OFST 16 |
| 7516 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 12 |
| 7517 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 16 |
| 7518 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 12 |
| 7519 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 16 |
| 7520 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 20 |
| 7521 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_OFST 12 |
| 7522 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_SIZE_OFST 24 |
| 7523 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_OFST 28 |
| 7524 | /* Enum values, see field(s): */ |
| 7525 | /* MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPFILE_DST */ |
| 7526 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_TYPE_OFST 32 |
| 7527 | /* Enum values, see field(s): */ |
| 7528 | /* MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */ |
| 7529 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 36 |
| 7530 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_OFST 40 |
| 7531 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 36 |
| 7532 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 40 |
| 7533 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 36 |
| 7534 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 40 |
| 7535 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 44 |
| 7536 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_UART_PORT_OFST 36 |
| 7537 | #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_SIZE_OFST 48 |
| 7538 | |
| 7539 | |
| 7540 | /***********************************/ |
| 7541 | /* MC_CMD_SET_PSU |
| 7542 | * Adjusts power supply parameters. This is a warranty-voiding operation. |
| 7543 | * Returns: ENOENT if the parameter or rail specified does not exist, EINVAL if |
| 7544 | * the parameter is out of range. |
| 7545 | */ |
| 7546 | #define MC_CMD_SET_PSU 0xea |
| 7547 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7548 | #define MC_CMD_0xea_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7549 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7550 | /* MC_CMD_SET_PSU_IN msgrequest */ |
| 7551 | #define MC_CMD_SET_PSU_IN_LEN 12 |
| 7552 | #define MC_CMD_SET_PSU_IN_PARAM_OFST 0 |
| 7553 | #define MC_CMD_SET_PSU_IN_PARAM_SUPPLY_VOLTAGE 0x0 /* enum */ |
| 7554 | #define MC_CMD_SET_PSU_IN_RAIL_OFST 4 |
| 7555 | #define MC_CMD_SET_PSU_IN_RAIL_0V9 0x0 /* enum */ |
| 7556 | #define MC_CMD_SET_PSU_IN_RAIL_1V2 0x1 /* enum */ |
| 7557 | /* desired value, eg voltage in mV */ |
| 7558 | #define MC_CMD_SET_PSU_IN_VALUE_OFST 8 |
| 7559 | |
| 7560 | /* MC_CMD_SET_PSU_OUT msgresponse */ |
| 7561 | #define MC_CMD_SET_PSU_OUT_LEN 0 |
| 7562 | |
| 7563 | |
| 7564 | /***********************************/ |
| 7565 | /* MC_CMD_GET_FUNCTION_INFO |
| 7566 | * Get function information. PF and VF number. |
| 7567 | */ |
| 7568 | #define MC_CMD_GET_FUNCTION_INFO 0xec |
| 7569 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7570 | #define MC_CMD_0xec_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 7571 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7572 | /* MC_CMD_GET_FUNCTION_INFO_IN msgrequest */ |
| 7573 | #define MC_CMD_GET_FUNCTION_INFO_IN_LEN 0 |
| 7574 | |
| 7575 | /* MC_CMD_GET_FUNCTION_INFO_OUT msgresponse */ |
| 7576 | #define MC_CMD_GET_FUNCTION_INFO_OUT_LEN 8 |
| 7577 | #define MC_CMD_GET_FUNCTION_INFO_OUT_PF_OFST 0 |
| 7578 | #define MC_CMD_GET_FUNCTION_INFO_OUT_VF_OFST 4 |
| 7579 | |
| 7580 | |
| 7581 | /***********************************/ |
| 7582 | /* MC_CMD_ENABLE_OFFLINE_BIST |
| 7583 | * Enters offline BIST mode. All queues are torn down, chip enters quiescent |
| 7584 | * mode, calling function gets exclusive MCDI ownership. The only way out is |
| 7585 | * reboot. |
| 7586 | */ |
| 7587 | #define MC_CMD_ENABLE_OFFLINE_BIST 0xed |
| 7588 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7589 | #define MC_CMD_0xed_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7590 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7591 | /* MC_CMD_ENABLE_OFFLINE_BIST_IN msgrequest */ |
| 7592 | #define MC_CMD_ENABLE_OFFLINE_BIST_IN_LEN 0 |
| 7593 | |
| 7594 | /* MC_CMD_ENABLE_OFFLINE_BIST_OUT msgresponse */ |
| 7595 | #define MC_CMD_ENABLE_OFFLINE_BIST_OUT_LEN 0 |
| 7596 | |
| 7597 | |
| 7598 | /***********************************/ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7599 | /* MC_CMD_UART_SEND_DATA |
| 7600 | * Send checksummed[sic] block of data over the uart. Response is a placeholder |
| 7601 | * should we wish to make this reliable; currently requests are fire-and- |
| 7602 | * forget. |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7603 | */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7604 | #define MC_CMD_UART_SEND_DATA 0xee |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7605 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7606 | #define MC_CMD_0xee_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 7607 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7608 | /* MC_CMD_UART_SEND_DATA_OUT msgrequest */ |
| 7609 | #define MC_CMD_UART_SEND_DATA_OUT_LENMIN 16 |
| 7610 | #define MC_CMD_UART_SEND_DATA_OUT_LENMAX 252 |
| 7611 | #define MC_CMD_UART_SEND_DATA_OUT_LEN(num) (16+1*(num)) |
| 7612 | /* CRC32 over OFFSET, LENGTH, RESERVED, DATA */ |
| 7613 | #define MC_CMD_UART_SEND_DATA_OUT_CHECKSUM_OFST 0 |
| 7614 | /* Offset at which to write the data */ |
| 7615 | #define MC_CMD_UART_SEND_DATA_OUT_OFFSET_OFST 4 |
| 7616 | /* Length of data */ |
| 7617 | #define MC_CMD_UART_SEND_DATA_OUT_LENGTH_OFST 8 |
| 7618 | /* Reserved for future use */ |
| 7619 | #define MC_CMD_UART_SEND_DATA_OUT_RESERVED_OFST 12 |
| 7620 | #define MC_CMD_UART_SEND_DATA_OUT_DATA_OFST 16 |
| 7621 | #define MC_CMD_UART_SEND_DATA_OUT_DATA_LEN 1 |
| 7622 | #define MC_CMD_UART_SEND_DATA_OUT_DATA_MINNUM 0 |
| 7623 | #define MC_CMD_UART_SEND_DATA_OUT_DATA_MAXNUM 236 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7624 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7625 | /* MC_CMD_UART_SEND_DATA_IN msgresponse */ |
| 7626 | #define MC_CMD_UART_SEND_DATA_IN_LEN 0 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7627 | |
| 7628 | |
| 7629 | /***********************************/ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7630 | /* MC_CMD_UART_RECV_DATA |
| 7631 | * Request checksummed[sic] block of data over the uart. Only a placeholder, |
| 7632 | * subject to change and not currently implemented. |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7633 | */ |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7634 | #define MC_CMD_UART_RECV_DATA 0xef |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7635 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7636 | #define MC_CMD_0xef_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 7637 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7638 | /* MC_CMD_UART_RECV_DATA_OUT msgrequest */ |
| 7639 | #define MC_CMD_UART_RECV_DATA_OUT_LEN 16 |
| 7640 | /* CRC32 over OFFSET, LENGTH, RESERVED */ |
| 7641 | #define MC_CMD_UART_RECV_DATA_OUT_CHECKSUM_OFST 0 |
| 7642 | /* Offset from which to read the data */ |
| 7643 | #define MC_CMD_UART_RECV_DATA_OUT_OFFSET_OFST 4 |
| 7644 | /* Length of data */ |
| 7645 | #define MC_CMD_UART_RECV_DATA_OUT_LENGTH_OFST 8 |
| 7646 | /* Reserved for future use */ |
| 7647 | #define MC_CMD_UART_RECV_DATA_OUT_RESERVED_OFST 12 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7648 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7649 | /* MC_CMD_UART_RECV_DATA_IN msgresponse */ |
| 7650 | #define MC_CMD_UART_RECV_DATA_IN_LENMIN 16 |
| 7651 | #define MC_CMD_UART_RECV_DATA_IN_LENMAX 252 |
| 7652 | #define MC_CMD_UART_RECV_DATA_IN_LEN(num) (16+1*(num)) |
| 7653 | /* CRC32 over RESERVED1, RESERVED2, RESERVED3, DATA */ |
| 7654 | #define MC_CMD_UART_RECV_DATA_IN_CHECKSUM_OFST 0 |
| 7655 | /* Offset at which to write the data */ |
| 7656 | #define MC_CMD_UART_RECV_DATA_IN_RESERVED1_OFST 4 |
| 7657 | /* Length of data */ |
| 7658 | #define MC_CMD_UART_RECV_DATA_IN_RESERVED2_OFST 8 |
| 7659 | /* Reserved for future use */ |
| 7660 | #define MC_CMD_UART_RECV_DATA_IN_RESERVED3_OFST 12 |
| 7661 | #define MC_CMD_UART_RECV_DATA_IN_DATA_OFST 16 |
| 7662 | #define MC_CMD_UART_RECV_DATA_IN_DATA_LEN 1 |
| 7663 | #define MC_CMD_UART_RECV_DATA_IN_DATA_MINNUM 0 |
| 7664 | #define MC_CMD_UART_RECV_DATA_IN_DATA_MAXNUM 236 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7665 | |
| 7666 | |
| 7667 | /***********************************/ |
| 7668 | /* MC_CMD_READ_FUSES |
| 7669 | * Read data programmed into the device One-Time-Programmable (OTP) Fuses |
| 7670 | */ |
| 7671 | #define MC_CMD_READ_FUSES 0xf0 |
| 7672 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7673 | #define MC_CMD_0xf0_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7674 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7675 | /* MC_CMD_READ_FUSES_IN msgrequest */ |
| 7676 | #define MC_CMD_READ_FUSES_IN_LEN 8 |
| 7677 | /* Offset in OTP to read */ |
| 7678 | #define MC_CMD_READ_FUSES_IN_OFFSET_OFST 0 |
| 7679 | /* Length of data to read in bytes */ |
| 7680 | #define MC_CMD_READ_FUSES_IN_LENGTH_OFST 4 |
| 7681 | |
| 7682 | /* MC_CMD_READ_FUSES_OUT msgresponse */ |
| 7683 | #define MC_CMD_READ_FUSES_OUT_LENMIN 4 |
| 7684 | #define MC_CMD_READ_FUSES_OUT_LENMAX 252 |
| 7685 | #define MC_CMD_READ_FUSES_OUT_LEN(num) (4+1*(num)) |
| 7686 | /* Length of returned OTP data in bytes */ |
| 7687 | #define MC_CMD_READ_FUSES_OUT_LENGTH_OFST 0 |
| 7688 | /* Returned data */ |
| 7689 | #define MC_CMD_READ_FUSES_OUT_DATA_OFST 4 |
| 7690 | #define MC_CMD_READ_FUSES_OUT_DATA_LEN 1 |
| 7691 | #define MC_CMD_READ_FUSES_OUT_DATA_MINNUM 0 |
| 7692 | #define MC_CMD_READ_FUSES_OUT_DATA_MAXNUM 248 |
| 7693 | |
| 7694 | |
| 7695 | /***********************************/ |
| 7696 | /* MC_CMD_KR_TUNE |
| 7697 | * Get or set KR Serdes RXEQ and TX Driver settings |
| 7698 | */ |
| 7699 | #define MC_CMD_KR_TUNE 0xf1 |
| 7700 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7701 | #define MC_CMD_0xf1_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7702 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7703 | /* MC_CMD_KR_TUNE_IN msgrequest */ |
| 7704 | #define MC_CMD_KR_TUNE_IN_LENMIN 4 |
| 7705 | #define MC_CMD_KR_TUNE_IN_LENMAX 252 |
| 7706 | #define MC_CMD_KR_TUNE_IN_LEN(num) (4+4*(num)) |
| 7707 | /* Requested operation */ |
| 7708 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_OP_OFST 0 |
| 7709 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_OP_LEN 1 |
| 7710 | /* enum: Get current RXEQ settings */ |
| 7711 | #define MC_CMD_KR_TUNE_IN_RXEQ_GET 0x0 |
| 7712 | /* enum: Override RXEQ settings */ |
| 7713 | #define MC_CMD_KR_TUNE_IN_RXEQ_SET 0x1 |
| 7714 | /* enum: Get current TX Driver settings */ |
| 7715 | #define MC_CMD_KR_TUNE_IN_TXEQ_GET 0x2 |
| 7716 | /* enum: Override TX Driver settings */ |
| 7717 | #define MC_CMD_KR_TUNE_IN_TXEQ_SET 0x3 |
| 7718 | /* enum: Force KR Serdes reset / recalibration */ |
| 7719 | #define MC_CMD_KR_TUNE_IN_RECAL 0x4 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7720 | /* enum: Start KR Serdes Eye diagram plot on a given lane. Lane must have valid |
| 7721 | * signal. |
| 7722 | */ |
| 7723 | #define MC_CMD_KR_TUNE_IN_START_EYE_PLOT 0x5 |
| 7724 | /* enum: Poll KR Serdes Eye diagram plot. Returns one row of BER data. The |
| 7725 | * caller should call this command repeatedly after starting eye plot, until no |
| 7726 | * more data is returned. |
| 7727 | */ |
| 7728 | #define MC_CMD_KR_TUNE_IN_POLL_EYE_PLOT 0x6 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7729 | /* Align the arguments to 32 bits */ |
| 7730 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_RSVD_OFST 1 |
| 7731 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_RSVD_LEN 3 |
| 7732 | /* Arguments specific to the operation */ |
| 7733 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_OFST 4 |
| 7734 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_LEN 4 |
| 7735 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MINNUM 0 |
| 7736 | #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MAXNUM 62 |
| 7737 | |
| 7738 | /* MC_CMD_KR_TUNE_OUT msgresponse */ |
| 7739 | #define MC_CMD_KR_TUNE_OUT_LEN 0 |
| 7740 | |
| 7741 | /* MC_CMD_KR_TUNE_RXEQ_GET_IN msgrequest */ |
| 7742 | #define MC_CMD_KR_TUNE_RXEQ_GET_IN_LEN 4 |
| 7743 | /* Requested operation */ |
| 7744 | #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_OP_OFST 0 |
| 7745 | #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_OP_LEN 1 |
| 7746 | /* Align the arguments to 32 bits */ |
| 7747 | #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_RSVD_OFST 1 |
| 7748 | #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_RSVD_LEN 3 |
| 7749 | |
| 7750 | /* MC_CMD_KR_TUNE_RXEQ_GET_OUT msgresponse */ |
| 7751 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMIN 4 |
| 7752 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMAX 252 |
| 7753 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LEN(num) (0+4*(num)) |
| 7754 | /* RXEQ Parameter */ |
| 7755 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_OFST 0 |
| 7756 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LEN 4 |
| 7757 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MINNUM 1 |
| 7758 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM 63 |
| 7759 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_LBN 0 |
| 7760 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_WIDTH 8 |
| 7761 | /* enum: Attenuation (0-15) */ |
| 7762 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_ATT 0x0 |
| 7763 | /* enum: CTLE Boost (0-15) */ |
| 7764 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_BOOST 0x1 |
| 7765 | /* enum: Edge DFE Tap1 (0 - max negative, 64 - zero, 127 - max positive) */ |
| 7766 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP1 0x2 |
| 7767 | /* enum: Edge DFE Tap2 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 7768 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP2 0x3 |
| 7769 | /* enum: Edge DFE Tap3 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 7770 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP3 0x4 |
| 7771 | /* enum: Edge DFE Tap4 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 7772 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP4 0x5 |
| 7773 | /* enum: Edge DFE Tap5 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 7774 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP5 0x6 |
| 7775 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8 |
| 7776 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 3 |
| 7777 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_0 0x0 /* enum */ |
| 7778 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_1 0x1 /* enum */ |
| 7779 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_2 0x2 /* enum */ |
| 7780 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_3 0x3 /* enum */ |
| 7781 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_ALL 0x4 /* enum */ |
| 7782 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_LBN 11 |
| 7783 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_WIDTH 1 |
| 7784 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_LBN 12 |
| 7785 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_WIDTH 4 |
| 7786 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_LBN 16 |
| 7787 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_WIDTH 8 |
| 7788 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_LBN 24 |
| 7789 | #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8 |
| 7790 | |
| 7791 | /* MC_CMD_KR_TUNE_RXEQ_SET_IN msgrequest */ |
| 7792 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMIN 8 |
| 7793 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMAX 252 |
| 7794 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_LEN(num) (4+4*(num)) |
| 7795 | /* Requested operation */ |
| 7796 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_OP_OFST 0 |
| 7797 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_OP_LEN 1 |
| 7798 | /* Align the arguments to 32 bits */ |
| 7799 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_RSVD_OFST 1 |
| 7800 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_RSVD_LEN 3 |
| 7801 | /* RXEQ Parameter */ |
| 7802 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_OFST 4 |
| 7803 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LEN 4 |
| 7804 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MINNUM 1 |
| 7805 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MAXNUM 62 |
| 7806 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_LBN 0 |
| 7807 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_WIDTH 8 |
| 7808 | /* Enum values, see field(s): */ |
| 7809 | /* MC_CMD_KR_TUNE_RXEQ_GET_OUT/PARAM_ID */ |
| 7810 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_LBN 8 |
| 7811 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_WIDTH 3 |
| 7812 | /* Enum values, see field(s): */ |
| 7813 | /* MC_CMD_KR_TUNE_RXEQ_GET_OUT/PARAM_LANE */ |
| 7814 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_LBN 11 |
| 7815 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_WIDTH 1 |
| 7816 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_LBN 12 |
| 7817 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_WIDTH 4 |
| 7818 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_LBN 16 |
| 7819 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_WIDTH 8 |
| 7820 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_LBN 24 |
| 7821 | #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_WIDTH 8 |
| 7822 | |
| 7823 | /* MC_CMD_KR_TUNE_RXEQ_SET_OUT msgresponse */ |
| 7824 | #define MC_CMD_KR_TUNE_RXEQ_SET_OUT_LEN 0 |
| 7825 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7826 | /* MC_CMD_KR_TUNE_TXEQ_GET_IN msgrequest */ |
| 7827 | #define MC_CMD_KR_TUNE_TXEQ_GET_IN_LEN 4 |
| 7828 | /* Requested operation */ |
| 7829 | #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_OP_OFST 0 |
| 7830 | #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_OP_LEN 1 |
| 7831 | /* Align the arguments to 32 bits */ |
| 7832 | #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_RSVD_OFST 1 |
| 7833 | #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_RSVD_LEN 3 |
| 7834 | |
| 7835 | /* MC_CMD_KR_TUNE_TXEQ_GET_OUT msgresponse */ |
| 7836 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMIN 4 |
| 7837 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMAX 252 |
| 7838 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LEN(num) (0+4*(num)) |
| 7839 | /* TXEQ Parameter */ |
| 7840 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_OFST 0 |
| 7841 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LEN 4 |
| 7842 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MINNUM 1 |
| 7843 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM 63 |
| 7844 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_LBN 0 |
| 7845 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_WIDTH 8 |
| 7846 | /* enum: TX Amplitude */ |
| 7847 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV 0x0 |
| 7848 | /* enum: De-Emphasis Tap1 Magnitude (0-7) */ |
| 7849 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_MODE 0x1 |
| 7850 | /* enum: De-Emphasis Tap1 Fine */ |
| 7851 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_DTLEV 0x2 |
| 7852 | /* enum: De-Emphasis Tap2 Magnitude (0-6) */ |
| 7853 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_D2 0x3 |
| 7854 | /* enum: De-Emphasis Tap2 Fine */ |
| 7855 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_D2TLEV 0x4 |
| 7856 | /* enum: Pre-Emphasis Magnitude */ |
| 7857 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_E 0x5 |
| 7858 | /* enum: Pre-Emphasis Fine */ |
| 7859 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_ETLEV 0x6 |
| 7860 | /* enum: TX Slew Rate Coarse control */ |
| 7861 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_PREDRV_DLY 0x7 |
| 7862 | /* enum: TX Slew Rate Fine control */ |
| 7863 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_SR_SET 0x8 |
| 7864 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_LBN 8 |
| 7865 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_WIDTH 3 |
| 7866 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_0 0x0 /* enum */ |
| 7867 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_1 0x1 /* enum */ |
| 7868 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_2 0x2 /* enum */ |
| 7869 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_3 0x3 /* enum */ |
| 7870 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_ALL 0x4 /* enum */ |
| 7871 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_LBN 11 |
| 7872 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_WIDTH 5 |
| 7873 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_LBN 16 |
| 7874 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_WIDTH 8 |
| 7875 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_LBN 24 |
| 7876 | #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_WIDTH 8 |
| 7877 | |
| 7878 | /* MC_CMD_KR_TUNE_TXEQ_SET_IN msgrequest */ |
| 7879 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMIN 8 |
| 7880 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMAX 252 |
| 7881 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_LEN(num) (4+4*(num)) |
| 7882 | /* Requested operation */ |
| 7883 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_OP_OFST 0 |
| 7884 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_OP_LEN 1 |
| 7885 | /* Align the arguments to 32 bits */ |
| 7886 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_RSVD_OFST 1 |
| 7887 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_RSVD_LEN 3 |
| 7888 | /* TXEQ Parameter */ |
| 7889 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_OFST 4 |
| 7890 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LEN 4 |
| 7891 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MINNUM 1 |
| 7892 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MAXNUM 62 |
| 7893 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_LBN 0 |
| 7894 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_WIDTH 8 |
| 7895 | /* Enum values, see field(s): */ |
| 7896 | /* MC_CMD_KR_TUNE_TXEQ_GET_OUT/PARAM_ID */ |
| 7897 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_LBN 8 |
| 7898 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_WIDTH 3 |
| 7899 | /* Enum values, see field(s): */ |
| 7900 | /* MC_CMD_KR_TUNE_TXEQ_GET_OUT/PARAM_LANE */ |
| 7901 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_LBN 11 |
| 7902 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_WIDTH 5 |
| 7903 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_LBN 16 |
| 7904 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_WIDTH 8 |
| 7905 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_LBN 24 |
| 7906 | #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_WIDTH 8 |
| 7907 | |
| 7908 | /* MC_CMD_KR_TUNE_TXEQ_SET_OUT msgresponse */ |
| 7909 | #define MC_CMD_KR_TUNE_TXEQ_SET_OUT_LEN 0 |
| 7910 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7911 | /* MC_CMD_KR_TUNE_RECAL_IN msgrequest */ |
| 7912 | #define MC_CMD_KR_TUNE_RECAL_IN_LEN 4 |
| 7913 | /* Requested operation */ |
| 7914 | #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_OP_OFST 0 |
| 7915 | #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_OP_LEN 1 |
| 7916 | /* Align the arguments to 32 bits */ |
| 7917 | #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_RSVD_OFST 1 |
| 7918 | #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_RSVD_LEN 3 |
| 7919 | |
| 7920 | /* MC_CMD_KR_TUNE_RECAL_OUT msgresponse */ |
| 7921 | #define MC_CMD_KR_TUNE_RECAL_OUT_LEN 0 |
| 7922 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7923 | /* MC_CMD_KR_TUNE_START_EYE_PLOT_IN msgrequest */ |
| 7924 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LEN 8 |
| 7925 | /* Requested operation */ |
| 7926 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_OP_OFST 0 |
| 7927 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_OP_LEN 1 |
| 7928 | /* Align the arguments to 32 bits */ |
| 7929 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_RSVD_OFST 1 |
| 7930 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_RSVD_LEN 3 |
| 7931 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LANE_OFST 4 |
| 7932 | |
| 7933 | /* MC_CMD_KR_TUNE_START_EYE_PLOT_OUT msgresponse */ |
| 7934 | #define MC_CMD_KR_TUNE_START_EYE_PLOT_OUT_LEN 0 |
| 7935 | |
| 7936 | /* MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN msgrequest */ |
| 7937 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_LEN 4 |
| 7938 | /* Requested operation */ |
| 7939 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_OP_OFST 0 |
| 7940 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_OP_LEN 1 |
| 7941 | /* Align the arguments to 32 bits */ |
| 7942 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_RSVD_OFST 1 |
| 7943 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_RSVD_LEN 3 |
| 7944 | |
| 7945 | /* MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT msgresponse */ |
| 7946 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMIN 0 |
| 7947 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMAX 252 |
| 7948 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LEN(num) (0+2*(num)) |
| 7949 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_OFST 0 |
| 7950 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_LEN 2 |
| 7951 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MINNUM 0 |
| 7952 | #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM 126 |
| 7953 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7954 | |
| 7955 | /***********************************/ |
| 7956 | /* MC_CMD_PCIE_TUNE |
| 7957 | * Get or set PCIE Serdes RXEQ and TX Driver settings |
| 7958 | */ |
| 7959 | #define MC_CMD_PCIE_TUNE 0xf2 |
| 7960 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 7961 | #define MC_CMD_0xf2_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 7962 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7963 | /* MC_CMD_PCIE_TUNE_IN msgrequest */ |
| 7964 | #define MC_CMD_PCIE_TUNE_IN_LENMIN 4 |
| 7965 | #define MC_CMD_PCIE_TUNE_IN_LENMAX 252 |
| 7966 | #define MC_CMD_PCIE_TUNE_IN_LEN(num) (4+4*(num)) |
| 7967 | /* Requested operation */ |
| 7968 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_OP_OFST 0 |
| 7969 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_OP_LEN 1 |
| 7970 | /* enum: Get current RXEQ settings */ |
| 7971 | #define MC_CMD_PCIE_TUNE_IN_RXEQ_GET 0x0 |
| 7972 | /* enum: Override RXEQ settings */ |
| 7973 | #define MC_CMD_PCIE_TUNE_IN_RXEQ_SET 0x1 |
| 7974 | /* enum: Get current TX Driver settings */ |
| 7975 | #define MC_CMD_PCIE_TUNE_IN_TXEQ_GET 0x2 |
| 7976 | /* enum: Override TX Driver settings */ |
| 7977 | #define MC_CMD_PCIE_TUNE_IN_TXEQ_SET 0x3 |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 7978 | /* enum: Start PCIe Serdes Eye diagram plot on a given lane. */ |
| 7979 | #define MC_CMD_PCIE_TUNE_IN_START_EYE_PLOT 0x5 |
| 7980 | /* enum: Poll PCIe Serdes Eye diagram plot. Returns one row of BER data. The |
| 7981 | * caller should call this command repeatedly after starting eye plot, until no |
| 7982 | * more data is returned. |
| 7983 | */ |
| 7984 | #define MC_CMD_PCIE_TUNE_IN_POLL_EYE_PLOT 0x6 |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 7985 | /* Align the arguments to 32 bits */ |
| 7986 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_RSVD_OFST 1 |
| 7987 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_RSVD_LEN 3 |
| 7988 | /* Arguments specific to the operation */ |
| 7989 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_OFST 4 |
| 7990 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_LEN 4 |
| 7991 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MINNUM 0 |
| 7992 | #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MAXNUM 62 |
| 7993 | |
| 7994 | /* MC_CMD_PCIE_TUNE_OUT msgresponse */ |
| 7995 | #define MC_CMD_PCIE_TUNE_OUT_LEN 0 |
| 7996 | |
| 7997 | /* MC_CMD_PCIE_TUNE_RXEQ_GET_IN msgrequest */ |
| 7998 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_LEN 4 |
| 7999 | /* Requested operation */ |
| 8000 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_OP_OFST 0 |
| 8001 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_OP_LEN 1 |
| 8002 | /* Align the arguments to 32 bits */ |
| 8003 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_RSVD_OFST 1 |
| 8004 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_RSVD_LEN 3 |
| 8005 | |
| 8006 | /* MC_CMD_PCIE_TUNE_RXEQ_GET_OUT msgresponse */ |
| 8007 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMIN 4 |
| 8008 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMAX 252 |
| 8009 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LEN(num) (0+4*(num)) |
| 8010 | /* RXEQ Parameter */ |
| 8011 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_OFST 0 |
| 8012 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LEN 4 |
| 8013 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MINNUM 1 |
| 8014 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM 63 |
| 8015 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_LBN 0 |
| 8016 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_WIDTH 8 |
| 8017 | /* enum: Attenuation (0-15) */ |
| 8018 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_ATT 0x0 |
| 8019 | /* enum: CTLE Boost (0-15) */ |
| 8020 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_BOOST 0x1 |
| 8021 | /* enum: DFE Tap1 (0 - max negative, 64 - zero, 127 - max positive) */ |
| 8022 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP1 0x2 |
| 8023 | /* enum: DFE Tap2 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 8024 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP2 0x3 |
| 8025 | /* enum: DFE Tap3 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 8026 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP3 0x4 |
| 8027 | /* enum: DFE Tap4 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 8028 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP4 0x5 |
| 8029 | /* enum: DFE Tap5 (0 - max negative, 32 - zero, 63 - max positive) */ |
| 8030 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP5 0x6 |
| 8031 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8 |
| 8032 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 4 |
| 8033 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_0 0x0 /* enum */ |
| 8034 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_1 0x1 /* enum */ |
| 8035 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_2 0x2 /* enum */ |
| 8036 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_3 0x3 /* enum */ |
| 8037 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_4 0x4 /* enum */ |
| 8038 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_5 0x5 /* enum */ |
| 8039 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_6 0x6 /* enum */ |
| 8040 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_7 0x7 /* enum */ |
| 8041 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_ALL 0x8 /* enum */ |
| 8042 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_LBN 12 |
| 8043 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_WIDTH 12 |
| 8044 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_LBN 24 |
| 8045 | #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8 |
| 8046 | |
| 8047 | /* MC_CMD_PCIE_TUNE_TXEQ_GET_IN msgrequest */ |
| 8048 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_LEN 4 |
| 8049 | /* Requested operation */ |
| 8050 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_OP_OFST 0 |
| 8051 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_OP_LEN 1 |
| 8052 | /* Align the arguments to 32 bits */ |
| 8053 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_RSVD_OFST 1 |
| 8054 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_RSVD_LEN 3 |
| 8055 | |
| 8056 | /* MC_CMD_PCIE_TUNE_TXEQ_GET_OUT msgresponse */ |
| 8057 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMIN 4 |
| 8058 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMAX 252 |
| 8059 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LEN(num) (0+4*(num)) |
| 8060 | /* RXEQ Parameter */ |
| 8061 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_OFST 0 |
| 8062 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LEN 4 |
| 8063 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MINNUM 1 |
| 8064 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM 63 |
| 8065 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_LBN 0 |
| 8066 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_WIDTH 8 |
| 8067 | /* enum: TxMargin (PIPE) */ |
| 8068 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_TXMARGIN 0x0 |
| 8069 | /* enum: TxSwing (PIPE) */ |
| 8070 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_TXSWING 0x1 |
| 8071 | /* enum: De-emphasis coefficient C(-1) (PIPE) */ |
| 8072 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_CM1 0x2 |
| 8073 | /* enum: De-emphasis coefficient C(0) (PIPE) */ |
| 8074 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_C0 0x3 |
| 8075 | /* enum: De-emphasis coefficient C(+1) (PIPE) */ |
| 8076 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_CP1 0x4 |
| 8077 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_LBN 8 |
| 8078 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_WIDTH 4 |
| 8079 | /* Enum values, see field(s): */ |
| 8080 | /* MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_LANE */ |
| 8081 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_LBN 12 |
| 8082 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_WIDTH 12 |
| 8083 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_LBN 24 |
| 8084 | #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8 |
| 8085 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 8086 | /* MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN msgrequest */ |
| 8087 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LEN 8 |
| 8088 | /* Requested operation */ |
| 8089 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_OP_OFST 0 |
| 8090 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_OP_LEN 1 |
| 8091 | /* Align the arguments to 32 bits */ |
| 8092 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_RSVD_OFST 1 |
| 8093 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_RSVD_LEN 3 |
| 8094 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LANE_OFST 4 |
| 8095 | |
| 8096 | /* MC_CMD_PCIE_TUNE_START_EYE_PLOT_OUT msgresponse */ |
| 8097 | #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_OUT_LEN 0 |
| 8098 | |
| 8099 | /* MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN msgrequest */ |
| 8100 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_LEN 4 |
| 8101 | /* Requested operation */ |
| 8102 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_OP_OFST 0 |
| 8103 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_OP_LEN 1 |
| 8104 | /* Align the arguments to 32 bits */ |
| 8105 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_RSVD_OFST 1 |
| 8106 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_RSVD_LEN 3 |
| 8107 | |
| 8108 | /* MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT msgresponse */ |
| 8109 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMIN 0 |
| 8110 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMAX 252 |
| 8111 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LEN(num) (0+2*(num)) |
| 8112 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_OFST 0 |
| 8113 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_LEN 2 |
| 8114 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MINNUM 0 |
| 8115 | #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM 126 |
| 8116 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 8117 | |
| 8118 | /***********************************/ |
| 8119 | /* MC_CMD_LICENSING |
| 8120 | * Operations on the NVRAM_PARTITION_TYPE_LICENSE application license partition |
| 8121 | */ |
| 8122 | #define MC_CMD_LICENSING 0xf3 |
| 8123 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 8124 | #define MC_CMD_0xf3_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 8125 | |
Ben Hutchings | f2b0bef | 2013-08-20 20:35:50 +0100 | [diff] [blame] | 8126 | /* MC_CMD_LICENSING_IN msgrequest */ |
| 8127 | #define MC_CMD_LICENSING_IN_LEN 4 |
| 8128 | /* identifies the type of operation requested */ |
| 8129 | #define MC_CMD_LICENSING_IN_OP_OFST 0 |
| 8130 | /* enum: re-read and apply licenses after a license key partition update; note |
| 8131 | * that this operation returns a zero-length response |
| 8132 | */ |
| 8133 | #define MC_CMD_LICENSING_IN_OP_UPDATE_LICENSE 0x0 |
| 8134 | /* enum: report counts of installed licenses */ |
| 8135 | #define MC_CMD_LICENSING_IN_OP_GET_KEY_STATS 0x1 |
| 8136 | |
| 8137 | /* MC_CMD_LICENSING_OUT msgresponse */ |
| 8138 | #define MC_CMD_LICENSING_OUT_LEN 28 |
| 8139 | /* count of application keys which are valid */ |
| 8140 | #define MC_CMD_LICENSING_OUT_VALID_APP_KEYS_OFST 0 |
| 8141 | /* sum of UNVERIFIABLE_APP_KEYS + WRONG_NODE_APP_KEYS (for compatibility with |
| 8142 | * MC_CMD_FC_OP_LICENSE) |
| 8143 | */ |
| 8144 | #define MC_CMD_LICENSING_OUT_INVALID_APP_KEYS_OFST 4 |
| 8145 | /* count of application keys which are invalid due to being blacklisted */ |
| 8146 | #define MC_CMD_LICENSING_OUT_BLACKLISTED_APP_KEYS_OFST 8 |
| 8147 | /* count of application keys which are invalid due to being unverifiable */ |
| 8148 | #define MC_CMD_LICENSING_OUT_UNVERIFIABLE_APP_KEYS_OFST 12 |
| 8149 | /* count of application keys which are invalid due to being for the wrong node |
| 8150 | */ |
| 8151 | #define MC_CMD_LICENSING_OUT_WRONG_NODE_APP_KEYS_OFST 16 |
| 8152 | /* licensing state (for diagnostics; the exact meaning of the bits in this |
| 8153 | * field are private to the firmware) |
| 8154 | */ |
| 8155 | #define MC_CMD_LICENSING_OUT_LICENSING_STATE_OFST 20 |
| 8156 | /* licensing subsystem self-test report (for manftest) */ |
| 8157 | #define MC_CMD_LICENSING_OUT_LICENSING_SELF_TEST_OFST 24 |
| 8158 | /* enum: licensing subsystem self-test failed */ |
| 8159 | #define MC_CMD_LICENSING_OUT_SELF_TEST_FAIL 0x0 |
| 8160 | /* enum: licensing subsystem self-test passed */ |
| 8161 | #define MC_CMD_LICENSING_OUT_SELF_TEST_PASS 0x1 |
| 8162 | |
| 8163 | |
| 8164 | /***********************************/ |
| 8165 | /* MC_CMD_MC2MC_PROXY |
| 8166 | * Execute an arbitrary MCDI command on the slave MC of a dual-core device. |
| 8167 | * This will fail on a single-core system. |
| 8168 | */ |
| 8169 | #define MC_CMD_MC2MC_PROXY 0xf4 |
Ben Hutchings | 05a9320 | 2011-12-20 00:44:06 +0000 | [diff] [blame] | 8170 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 8171 | #define MC_CMD_0xf4_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 8172 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 8173 | /* MC_CMD_MC2MC_PROXY_IN msgrequest */ |
| 8174 | #define MC_CMD_MC2MC_PROXY_IN_LEN 0 |
| 8175 | |
| 8176 | /* MC_CMD_MC2MC_PROXY_OUT msgresponse */ |
| 8177 | #define MC_CMD_MC2MC_PROXY_OUT_LEN 0 |
| 8178 | |
| 8179 | |
| 8180 | /***********************************/ |
| 8181 | /* MC_CMD_GET_LICENSED_APP_STATE |
| 8182 | * Query the state of an individual licensed application. (Note that the actual |
| 8183 | * state may be invalidated by the MC_CMD_LICENSING OP_UPDATE_LICENSE operation |
| 8184 | * or a reboot of the MC.) |
| 8185 | */ |
| 8186 | #define MC_CMD_GET_LICENSED_APP_STATE 0xf5 |
| 8187 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 8188 | #define MC_CMD_0xf5_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 8189 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 8190 | /* MC_CMD_GET_LICENSED_APP_STATE_IN msgrequest */ |
| 8191 | #define MC_CMD_GET_LICENSED_APP_STATE_IN_LEN 4 |
| 8192 | /* application ID to query (LICENSED_APP_ID_xxx) */ |
| 8193 | #define MC_CMD_GET_LICENSED_APP_STATE_IN_APP_ID_OFST 0 |
| 8194 | |
| 8195 | /* MC_CMD_GET_LICENSED_APP_STATE_OUT msgresponse */ |
| 8196 | #define MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN 4 |
| 8197 | /* state of this application */ |
| 8198 | #define MC_CMD_GET_LICENSED_APP_STATE_OUT_STATE_OFST 0 |
| 8199 | /* enum: no (or invalid) license is present for the application */ |
| 8200 | #define MC_CMD_GET_LICENSED_APP_STATE_OUT_NOT_LICENSED 0x0 |
| 8201 | /* enum: a valid license is present for the application */ |
| 8202 | #define MC_CMD_GET_LICENSED_APP_STATE_OUT_LICENSED 0x1 |
| 8203 | |
| 8204 | |
| 8205 | /***********************************/ |
| 8206 | /* MC_CMD_LICENSED_APP_OP |
| 8207 | * Perform an action for an individual licensed application. |
| 8208 | */ |
| 8209 | #define MC_CMD_LICENSED_APP_OP 0xf6 |
| 8210 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 8211 | #define MC_CMD_0xf6_PRIVILEGE_CTG SRIOV_CTG_GENERAL |
| 8212 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 8213 | /* MC_CMD_LICENSED_APP_OP_IN msgrequest */ |
| 8214 | #define MC_CMD_LICENSED_APP_OP_IN_LENMIN 8 |
| 8215 | #define MC_CMD_LICENSED_APP_OP_IN_LENMAX 252 |
| 8216 | #define MC_CMD_LICENSED_APP_OP_IN_LEN(num) (8+4*(num)) |
| 8217 | /* application ID */ |
| 8218 | #define MC_CMD_LICENSED_APP_OP_IN_APP_ID_OFST 0 |
| 8219 | /* the type of operation requested */ |
| 8220 | #define MC_CMD_LICENSED_APP_OP_IN_OP_OFST 4 |
| 8221 | /* enum: validate application */ |
| 8222 | #define MC_CMD_LICENSED_APP_OP_IN_OP_VALIDATE 0x0 |
| 8223 | /* arguments specific to this particular operation */ |
| 8224 | #define MC_CMD_LICENSED_APP_OP_IN_ARGS_OFST 8 |
| 8225 | #define MC_CMD_LICENSED_APP_OP_IN_ARGS_LEN 4 |
| 8226 | #define MC_CMD_LICENSED_APP_OP_IN_ARGS_MINNUM 0 |
| 8227 | #define MC_CMD_LICENSED_APP_OP_IN_ARGS_MAXNUM 61 |
| 8228 | |
| 8229 | /* MC_CMD_LICENSED_APP_OP_OUT msgresponse */ |
| 8230 | #define MC_CMD_LICENSED_APP_OP_OUT_LENMIN 0 |
| 8231 | #define MC_CMD_LICENSED_APP_OP_OUT_LENMAX 252 |
| 8232 | #define MC_CMD_LICENSED_APP_OP_OUT_LEN(num) (0+4*(num)) |
| 8233 | /* result specific to this particular operation */ |
| 8234 | #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_OFST 0 |
| 8235 | #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_LEN 4 |
| 8236 | #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_MINNUM 0 |
| 8237 | #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_MAXNUM 63 |
| 8238 | |
| 8239 | /* MC_CMD_LICENSED_APP_OP_VALIDATE_IN msgrequest */ |
| 8240 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_LEN 72 |
| 8241 | /* application ID */ |
| 8242 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_APP_ID_OFST 0 |
| 8243 | /* the type of operation requested */ |
| 8244 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_OP_OFST 4 |
| 8245 | /* validation challenge */ |
| 8246 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_CHALLENGE_OFST 8 |
| 8247 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_CHALLENGE_LEN 64 |
| 8248 | |
| 8249 | /* MC_CMD_LICENSED_APP_OP_VALIDATE_OUT msgresponse */ |
| 8250 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_LEN 68 |
| 8251 | /* feature expiry (time_t) */ |
| 8252 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_EXPIRY_OFST 0 |
| 8253 | /* validation response */ |
| 8254 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_RESPONSE_OFST 4 |
| 8255 | #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_RESPONSE_LEN 64 |
| 8256 | |
| 8257 | |
| 8258 | /***********************************/ |
| 8259 | /* MC_CMD_SET_PORT_SNIFF_CONFIG |
| 8260 | * Configure port sniffing for the physical port associated with the calling |
| 8261 | * function. Only a privileged function may change the port sniffing |
| 8262 | * configuration. A copy of all traffic delivered to the host (non-promiscuous |
| 8263 | * mode) or all traffic arriving at the port (promiscuous mode) may be |
| 8264 | * delivered to a specific queue, or a set of queues with RSS. |
| 8265 | */ |
| 8266 | #define MC_CMD_SET_PORT_SNIFF_CONFIG 0xf7 |
| 8267 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 8268 | #define MC_CMD_0xf7_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 8269 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 8270 | /* MC_CMD_SET_PORT_SNIFF_CONFIG_IN msgrequest */ |
| 8271 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_LEN 16 |
| 8272 | /* configuration flags */ |
| 8273 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_FLAGS_OFST 0 |
| 8274 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_LBN 0 |
| 8275 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_WIDTH 1 |
| 8276 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_LBN 1 |
| 8277 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_WIDTH 1 |
| 8278 | /* receive queue handle (for RSS mode, this is the base queue) */ |
| 8279 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_QUEUE_OFST 4 |
| 8280 | /* receive mode */ |
| 8281 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_OFST 8 |
| 8282 | /* enum: receive to just the specified queue */ |
| 8283 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_SIMPLE 0x0 |
| 8284 | /* enum: receive to multiple queues using RSS context */ |
| 8285 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_RSS 0x1 |
| 8286 | /* RSS context (for RX_MODE_RSS) as returned by MC_CMD_RSS_CONTEXT_ALLOC. Note |
| 8287 | * that these handles should be considered opaque to the host, although a value |
| 8288 | * of 0xFFFFFFFF is guaranteed never to be a valid handle. |
| 8289 | */ |
| 8290 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_OFST 12 |
| 8291 | |
| 8292 | /* MC_CMD_SET_PORT_SNIFF_CONFIG_OUT msgresponse */ |
| 8293 | #define MC_CMD_SET_PORT_SNIFF_CONFIG_OUT_LEN 0 |
| 8294 | |
| 8295 | |
| 8296 | /***********************************/ |
| 8297 | /* MC_CMD_GET_PORT_SNIFF_CONFIG |
| 8298 | * Obtain the current port sniffing configuration for the physical port |
| 8299 | * associated with the calling function. Only a privileged function may read |
| 8300 | * the configuration. |
| 8301 | */ |
| 8302 | #define MC_CMD_GET_PORT_SNIFF_CONFIG 0xf8 |
| 8303 | |
Shradha Shah | 75122ec | 2015-05-20 11:08:23 +0100 | [diff] [blame] | 8304 | #define MC_CMD_0xf8_PRIVILEGE_CTG SRIOV_CTG_ADMIN |
| 8305 | |
Ben Hutchings | 512bb06 | 2013-12-04 19:48:07 +0000 | [diff] [blame] | 8306 | /* MC_CMD_GET_PORT_SNIFF_CONFIG_IN msgrequest */ |
| 8307 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_IN_LEN 0 |
| 8308 | |
| 8309 | /* MC_CMD_GET_PORT_SNIFF_CONFIG_OUT msgresponse */ |
| 8310 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_LEN 16 |
| 8311 | /* configuration flags */ |
| 8312 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_FLAGS_OFST 0 |
| 8313 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_LBN 0 |
| 8314 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_WIDTH 1 |
| 8315 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_LBN 1 |
| 8316 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_WIDTH 1 |
| 8317 | /* receiving queue handle (for RSS mode, this is the base queue) */ |
| 8318 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_OFST 4 |
| 8319 | /* receive mode */ |
| 8320 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_OFST 8 |
| 8321 | /* enum: receiving to just the specified queue */ |
| 8322 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_SIMPLE 0x0 |
| 8323 | /* enum: receiving to multiple queues using RSS context */ |
| 8324 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_RSS 0x1 |
| 8325 | /* RSS context (for RX_MODE_RSS) */ |
| 8326 | #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_OFST 12 |
| 8327 | |
Ben Hutchings | 5297a98 | 2010-02-03 09:28:14 +0000 | [diff] [blame] | 8328 | |
Steve Hodgson | f0d37f4 | 2009-11-29 15:15:07 +0000 | [diff] [blame] | 8329 | #endif /* MCDI_PCOL_H */ |