net/sfc/base: add CTPIO statistics
[dpdk.git] / drivers / net / sfc / base / efx_regs_mcdi.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright 2008-2018 Solarflare Communications Inc.
4  * All rights reserved.
5  */
6
7 /*! \cidoxg_firmware_mc_cmd */
8
9 #ifndef _SIENA_MC_DRIVER_PCOL_H
10 #define _SIENA_MC_DRIVER_PCOL_H
11
12
13 /* Values to be written into FMCR_CZ_RESET_STATE_REG to control boot. */
14 /* Power-on reset state */
15 #define MC_FW_STATE_POR (1)
16 /* If this is set in MC_RESET_STATE_REG then it should be
17  * possible to jump into IMEM without loading code from flash. */
18 #define MC_FW_WARM_BOOT_OK (2)
19 /* The MC main image has started to boot. */
20 #define MC_FW_STATE_BOOTING (4)
21 /* The Scheduler has started. */
22 #define MC_FW_STATE_SCHED (8)
23 /* If this is set in MC_RESET_STATE_REG then it should be
24  * possible to jump into IMEM without loading code from flash.
25  * Unlike a warm boot, assume DMEM has been reloaded, so that
26  * the MC persistent data must be reinitialised. */
27 #define MC_FW_TEPID_BOOT_OK (16)
28 /* We have entered the main firmware via recovery mode.  This
29  * means that MC persistent data must be reinitialised, but that
30  * we shouldn't touch PCIe config. */
31 #define MC_FW_RECOVERY_MODE_PCIE_INIT_OK (32)
32 /* BIST state has been initialized */
33 #define MC_FW_BIST_INIT_OK (128)
34
35 /* Siena MC shared memmory offsets */
36 /* The 'doorbell' addresses are hard-wired to alert the MC when written */
37 #define MC_SMEM_P0_DOORBELL_OFST        0x000
38 #define MC_SMEM_P1_DOORBELL_OFST        0x004
39 /* The rest of these are firmware-defined */
40 #define MC_SMEM_P0_PDU_OFST             0x008
41 #define MC_SMEM_P1_PDU_OFST             0x108
42 #define MC_SMEM_PDU_LEN                 0x100
43 #define MC_SMEM_P0_PTP_TIME_OFST        0x7f0
44 #define MC_SMEM_P0_STATUS_OFST          0x7f8
45 #define MC_SMEM_P1_STATUS_OFST          0x7fc
46
47 /* Values to be written to the per-port status dword in shared
48  * memory on reboot and assert */
49 #define MC_STATUS_DWORD_REBOOT (0xb007b007)
50 #define MC_STATUS_DWORD_ASSERT (0xdeaddead)
51
52 /* Check whether an mcfw version (in host order) belongs to a bootloader */
53 #define MC_FW_VERSION_IS_BOOTLOADER(_v) (((_v) >> 16) == 0xb007)
54
55 /* The current version of the MCDI protocol.
56  *
57  * Note that the ROM burnt into the card only talks V0, so at the very
58  * least every driver must support version 0 and MCDI_PCOL_VERSION
59  */
60 #ifdef WITH_MCDI_V2
61 #define MCDI_PCOL_VERSION 2
62 #else
63 #define MCDI_PCOL_VERSION 1
64 #endif
65
66 /* Unused commands: 0x23, 0x27, 0x30, 0x31 */
67
68 /* MCDI version 1
69  *
70  * Each MCDI request starts with an MCDI_HEADER, which is a 32bit
71  * structure, filled in by the client.
72  *
73  *       0       7  8     16    20     22  23  24    31
74  *      | CODE | R | LEN | SEQ | Rsvd | E | R | XFLAGS |
75  *               |                      |   |
76  *               |                      |   \--- Response
77  *               |                      \------- Error
78  *               \------------------------------ Resync (always set)
79  *
80  * The client writes it's request into MC shared memory, and rings the
81  * doorbell. Each request is completed by either by the MC writting
82  * back into shared memory, or by writting out an event.
83  *
84  * All MCDI commands support completion by shared memory response. Each
85  * request may also contain additional data (accounted for by HEADER.LEN),
86  * and some response's may also contain additional data (again, accounted
87  * for by HEADER.LEN).
88  *
89  * Some MCDI commands support completion by event, in which any associated
90  * response data is included in the event.
91  *
92  * The protocol requires one response to be delivered for every request, a
93  * request should not be sent unless the response for the previous request
94  * has been received (either by polling shared memory, or by receiving
95  * an event).
96  */
97
98 /** Request/Response structure */
99 #define MCDI_HEADER_OFST 0
100 #define MCDI_HEADER_CODE_LBN 0
101 #define MCDI_HEADER_CODE_WIDTH 7
102 #define MCDI_HEADER_RESYNC_LBN 7
103 #define MCDI_HEADER_RESYNC_WIDTH 1
104 #define MCDI_HEADER_DATALEN_LBN 8
105 #define MCDI_HEADER_DATALEN_WIDTH 8
106 #define MCDI_HEADER_SEQ_LBN 16
107 #define MCDI_HEADER_SEQ_WIDTH 4
108 #define MCDI_HEADER_RSVD_LBN 20
109 #define MCDI_HEADER_RSVD_WIDTH 1
110 #define MCDI_HEADER_NOT_EPOCH_LBN 21
111 #define MCDI_HEADER_NOT_EPOCH_WIDTH 1
112 #define MCDI_HEADER_ERROR_LBN 22
113 #define MCDI_HEADER_ERROR_WIDTH 1
114 #define MCDI_HEADER_RESPONSE_LBN 23
115 #define MCDI_HEADER_RESPONSE_WIDTH 1
116 #define MCDI_HEADER_XFLAGS_LBN 24
117 #define MCDI_HEADER_XFLAGS_WIDTH 8
118 /* Request response using event */
119 #define MCDI_HEADER_XFLAGS_EVREQ 0x01
120 /* Request (and signal) early doorbell return */
121 #define MCDI_HEADER_XFLAGS_DBRET 0x02
122
123 /* Maximum number of payload bytes */
124 #define MCDI_CTL_SDU_LEN_MAX_V1 0xfc
125 #define MCDI_CTL_SDU_LEN_MAX_V2 0x400
126
127 #ifdef WITH_MCDI_V2
128 #define MCDI_CTL_SDU_LEN_MAX MCDI_CTL_SDU_LEN_MAX_V2
129 #else
130 #define MCDI_CTL_SDU_LEN_MAX MCDI_CTL_SDU_LEN_MAX_V1
131 #endif
132
133
134 /* The MC can generate events for two reasons:
135  *   - To advance a shared memory request if XFLAGS_EVREQ was set
136  *   - As a notification (link state, i2c event), controlled
137  *     via MC_CMD_LOG_CTRL
138  *
139  * Both events share a common structure:
140  *
141  *  0      32     33      36    44     52     60
142  * | Data | Cont | Level | Src | Code | Rsvd |
143  *           |
144  *           \ There is another event pending in this notification
145  *
146  * If Code==CMDDONE, then the fields are further interpreted as:
147  *
148  *   - LEVEL==INFO    Command succeeded
149  *   - LEVEL==ERR     Command failed
150  *
151  *    0     8         16      24     32
152  *   | Seq | Datalen | Errno | Rsvd |
153  *
154  *   These fields are taken directly out of the standard MCDI header, i.e.,
155  *   LEVEL==ERR, Datalen == 0 => Reboot
156  *
157  * Events can be squirted out of the UART (using LOG_CTRL) without a
158  * MCDI header.  An event can be distinguished from a MCDI response by
159  * examining the first byte which is 0xc0.  This corresponds to the
160  * non-existent MCDI command MC_CMD_DEBUG_LOG.
161  *
162  *      0         7        8
163  *     | command | Resync |     = 0xc0
164  *
165  * Since the event is written in big-endian byte order, this works
166  * providing bits 56-63 of the event are 0xc0.
167  *
168  *      56     60  63
169  *     | Rsvd | Code |    = 0xc0
170  *
171  * Which means for convenience the event code is 0xc for all MC
172  * generated events.
173  */
174 #define FSE_AZ_EV_CODE_MCDI_EVRESPONSE 0xc
175
176
177 /* Operation not permitted. */
178 #define MC_CMD_ERR_EPERM 1
179 /* Non-existent command target */
180 #define MC_CMD_ERR_ENOENT 2
181 /* assert() has killed the MC */
182 #define MC_CMD_ERR_EINTR 4
183 /* I/O failure */
184 #define MC_CMD_ERR_EIO 5
185 /* Already exists */
186 #define MC_CMD_ERR_EEXIST 6
187 /* Try again */
188 #define MC_CMD_ERR_EAGAIN 11
189 /* Out of memory */
190 #define MC_CMD_ERR_ENOMEM 12
191 /* Caller does not hold required locks */
192 #define MC_CMD_ERR_EACCES 13
193 /* Resource is currently unavailable (e.g. lock contention) */
194 #define MC_CMD_ERR_EBUSY 16
195 /* No such device */
196 #define MC_CMD_ERR_ENODEV 19
197 /* Invalid argument to target */
198 #define MC_CMD_ERR_EINVAL 22
199 /* Broken pipe */
200 #define MC_CMD_ERR_EPIPE 32
201 /* Read-only */
202 #define MC_CMD_ERR_EROFS 30
203 /* Out of range */
204 #define MC_CMD_ERR_ERANGE 34
205 /* Non-recursive resource is already acquired */
206 #define MC_CMD_ERR_EDEADLK 35
207 /* Operation not implemented */
208 #define MC_CMD_ERR_ENOSYS 38
209 /* Operation timed out */
210 #define MC_CMD_ERR_ETIME 62
211 /* Link has been severed */
212 #define MC_CMD_ERR_ENOLINK 67
213 /* Protocol error */
214 #define MC_CMD_ERR_EPROTO 71
215 /* Operation not supported */
216 #define MC_CMD_ERR_ENOTSUP 95
217 /* Address not available */
218 #define MC_CMD_ERR_EADDRNOTAVAIL 99
219 /* Not connected */
220 #define MC_CMD_ERR_ENOTCONN 107
221 /* Operation already in progress */
222 #define MC_CMD_ERR_EALREADY 114
223
224 /* Resource allocation failed. */
225 #define MC_CMD_ERR_ALLOC_FAIL  0x1000
226 /* V-adaptor not found. */
227 #define MC_CMD_ERR_NO_VADAPTOR 0x1001
228 /* EVB port not found. */
229 #define MC_CMD_ERR_NO_EVB_PORT 0x1002
230 /* V-switch not found. */
231 #define MC_CMD_ERR_NO_VSWITCH  0x1003
232 /* Too many VLAN tags. */
233 #define MC_CMD_ERR_VLAN_LIMIT  0x1004
234 /* Bad PCI function number. */
235 #define MC_CMD_ERR_BAD_PCI_FUNC 0x1005
236 /* Invalid VLAN mode. */
237 #define MC_CMD_ERR_BAD_VLAN_MODE 0x1006
238 /* Invalid v-switch type. */
239 #define MC_CMD_ERR_BAD_VSWITCH_TYPE 0x1007
240 /* Invalid v-port type. */
241 #define MC_CMD_ERR_BAD_VPORT_TYPE 0x1008
242 /* MAC address exists. */
243 #define MC_CMD_ERR_MAC_EXIST 0x1009
244 /* Slave core not present */
245 #define MC_CMD_ERR_SLAVE_NOT_PRESENT 0x100a
246 /* The datapath is disabled. */
247 #define MC_CMD_ERR_DATAPATH_DISABLED 0x100b
248 /* The requesting client is not a function */
249 #define MC_CMD_ERR_CLIENT_NOT_FN  0x100c
250 /* The requested operation might require the
251    command to be passed between MCs, and the
252    transport doesn't support that.  Should
253    only ever been seen over the UART. */
254 #define MC_CMD_ERR_TRANSPORT_NOPROXY 0x100d
255 /* VLAN tag(s) exists */
256 #define MC_CMD_ERR_VLAN_EXIST 0x100e
257 /* No MAC address assigned to an EVB port */
258 #define MC_CMD_ERR_NO_MAC_ADDR 0x100f
259 /* Notifies the driver that the request has been relayed
260  * to an admin function for authorization. The driver should
261  * wait for a PROXY_RESPONSE event and then resend its request.
262  * This error code is followed by a 32-bit handle that
263  * helps matching it with the respective PROXY_RESPONSE event. */
264 #define MC_CMD_ERR_PROXY_PENDING 0x1010
265 #define MC_CMD_ERR_PROXY_PENDING_HANDLE_OFST 4
266 /* The request cannot be passed for authorization because
267  * another request from the same function is currently being
268  * authorized. The drvier should try again later. */
269 #define MC_CMD_ERR_PROXY_INPROGRESS 0x1011
270 /* Returned by MC_CMD_PROXY_COMPLETE if the caller is not the function
271  * that has enabled proxying or BLOCK_INDEX points to a function that
272  * doesn't await an authorization. */
273 #define MC_CMD_ERR_PROXY_UNEXPECTED 0x1012
274 /* This code is currently only used internally in FW. Its meaning is that
275  * an operation failed due to lack of SR-IOV privilege.
276  * Normally it is translated to EPERM by send_cmd_err(),
277  * but it may also be used to trigger some special mechanism
278  * for handling such case, e.g. to relay the failed request
279  * to a designated admin function for authorization. */
280 #define MC_CMD_ERR_NO_PRIVILEGE 0x1013
281 /* Workaround 26807 could not be turned on/off because some functions
282  * have already installed filters. See the comment at
283  * MC_CMD_WORKAROUND_BUG26807. */
284 #define MC_CMD_ERR_FILTERS_PRESENT 0x1014
285 /* The clock whose frequency you've attempted to set set
286  * doesn't exist on this NIC */
287 #define MC_CMD_ERR_NO_CLOCK 0x1015
288 /* Returned by MC_CMD_TESTASSERT if the action that should
289  * have caused an assertion failed to do so.  */
290 #define MC_CMD_ERR_UNREACHABLE 0x1016
291 /* This command needs to be processed in the background but there were no
292  * resources to do so. Send it again after a command has completed. */
293 #define MC_CMD_ERR_QUEUE_FULL 0x1017
294 /* The operation could not be completed because the PCIe link has gone
295  * away.  This error code is never expected to be returned over the TLP
296  * transport. */
297 #define MC_CMD_ERR_NO_PCIE 0x1018
298 /* The operation could not be completed because the datapath has gone
299  * away.  This is distinct from MC_CMD_ERR_DATAPATH_DISABLED in that the
300  * datapath absence may be temporary*/
301 #define MC_CMD_ERR_NO_DATAPATH 0x1019
302
303 #define MC_CMD_ERR_CODE_OFST 0
304
305 /* We define 8 "escape" commands to allow
306    for command number space extension */
307
308 #define MC_CMD_CMD_SPACE_ESCAPE_0             0x78
309 #define MC_CMD_CMD_SPACE_ESCAPE_1             0x79
310 #define MC_CMD_CMD_SPACE_ESCAPE_2             0x7A
311 #define MC_CMD_CMD_SPACE_ESCAPE_3             0x7B
312 #define MC_CMD_CMD_SPACE_ESCAPE_4             0x7C
313 #define MC_CMD_CMD_SPACE_ESCAPE_5             0x7D
314 #define MC_CMD_CMD_SPACE_ESCAPE_6             0x7E
315 #define MC_CMD_CMD_SPACE_ESCAPE_7             0x7F
316
317 /* Vectors in the boot ROM */
318 /* Point to the copycode entry point. */
319 #define SIENA_MC_BOOTROM_COPYCODE_VEC (0x800 - 3 * 0x4)
320 #define HUNT_MC_BOOTROM_COPYCODE_VEC (0x8000 - 3 * 0x4)
321 #define MEDFORD_MC_BOOTROM_COPYCODE_VEC (0x10000 - 3 * 0x4)
322 /* Points to the recovery mode entry point. */
323 #define SIENA_MC_BOOTROM_NOFLASH_VEC (0x800 - 2 * 0x4)
324 #define HUNT_MC_BOOTROM_NOFLASH_VEC (0x8000 - 2 * 0x4)
325 #define MEDFORD_MC_BOOTROM_NOFLASH_VEC (0x10000 - 2 * 0x4)
326
327 /* The command set exported by the boot ROM (MCDI v0) */
328 #define MC_CMD_GET_VERSION_V0_SUPPORTED_FUNCS {         \
329         (1 << MC_CMD_READ32)    |                       \
330         (1 << MC_CMD_WRITE32)   |                       \
331         (1 << MC_CMD_COPYCODE)  |                       \
332         (1 << MC_CMD_GET_VERSION),                      \
333         0, 0, 0 }
334
335 #define MC_CMD_SENSOR_INFO_OUT_OFFSET_OFST(_x)          \
336         (MC_CMD_SENSOR_ENTRY_OFST + (_x))
337
338 #define MC_CMD_DBI_WRITE_IN_ADDRESS_OFST(n)             \
339         (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST +             \
340          MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST +          \
341          (n) * MC_CMD_DBIWROP_TYPEDEF_LEN)
342
343 #define MC_CMD_DBI_WRITE_IN_BYTE_MASK_OFST(n)           \
344         (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST +             \
345          MC_CMD_DBIWROP_TYPEDEF_BYTE_MASK_OFST +        \
346          (n) * MC_CMD_DBIWROP_TYPEDEF_LEN)
347
348 #define MC_CMD_DBI_WRITE_IN_VALUE_OFST(n)               \
349         (MC_CMD_DBI_WRITE_IN_DBIWROP_OFST +             \
350          MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST +            \
351          (n) * MC_CMD_DBIWROP_TYPEDEF_LEN)
352
353 /* This may be ORed with an EVB_PORT_ID_xxx constant to pass a non-default
354  * stack ID (which must be in the range 1-255) along with an EVB port ID.
355  */
356 #define EVB_STACK_ID(n)  (((n) & 0xff) << 16)
357
358
359 #ifdef WITH_MCDI_V2
360
361 /* Version 2 adds an optional argument to error returns: the errno value
362  * may be followed by the (0-based) number of the first argument that
363  * could not be processed.
364  */
365 #define MC_CMD_ERR_ARG_OFST 4
366
367 /* No space */
368 #define MC_CMD_ERR_ENOSPC 28
369
370 #endif
371
372 /* MCDI_EVENT structuredef */
373 #define MCDI_EVENT_LEN 8
374 #define MCDI_EVENT_CONT_LBN 32
375 #define MCDI_EVENT_CONT_WIDTH 1
376 #define MCDI_EVENT_LEVEL_LBN 33
377 #define MCDI_EVENT_LEVEL_WIDTH 3
378 /* enum: Info. */
379 #define MCDI_EVENT_LEVEL_INFO  0x0
380 /* enum: Warning. */
381 #define MCDI_EVENT_LEVEL_WARN 0x1
382 /* enum: Error. */
383 #define MCDI_EVENT_LEVEL_ERR 0x2
384 /* enum: Fatal. */
385 #define MCDI_EVENT_LEVEL_FATAL 0x3
386 #define MCDI_EVENT_DATA_OFST 0
387 #define MCDI_EVENT_DATA_LEN 4
388 #define MCDI_EVENT_CMDDONE_SEQ_LBN 0
389 #define MCDI_EVENT_CMDDONE_SEQ_WIDTH 8
390 #define MCDI_EVENT_CMDDONE_DATALEN_LBN 8
391 #define MCDI_EVENT_CMDDONE_DATALEN_WIDTH 8
392 #define MCDI_EVENT_CMDDONE_ERRNO_LBN 16
393 #define MCDI_EVENT_CMDDONE_ERRNO_WIDTH 8
394 #define MCDI_EVENT_LINKCHANGE_LP_CAP_LBN 0
395 #define MCDI_EVENT_LINKCHANGE_LP_CAP_WIDTH 16
396 #define MCDI_EVENT_LINKCHANGE_SPEED_LBN 16
397 #define MCDI_EVENT_LINKCHANGE_SPEED_WIDTH 4
398 /* enum: 100Mbs */
399 #define MCDI_EVENT_LINKCHANGE_SPEED_100M  0x1
400 /* enum: 1Gbs */
401 #define MCDI_EVENT_LINKCHANGE_SPEED_1G  0x2
402 /* enum: 10Gbs */
403 #define MCDI_EVENT_LINKCHANGE_SPEED_10G  0x3
404 /* enum: 40Gbs */
405 #define MCDI_EVENT_LINKCHANGE_SPEED_40G  0x4
406 /* enum: 25Gbs */
407 #define MCDI_EVENT_LINKCHANGE_SPEED_25G  0x5
408 /* enum: 50Gbs */
409 #define MCDI_EVENT_LINKCHANGE_SPEED_50G  0x6
410 /* enum: 100Gbs */
411 #define MCDI_EVENT_LINKCHANGE_SPEED_100G  0x7
412 #define MCDI_EVENT_LINKCHANGE_FCNTL_LBN 20
413 #define MCDI_EVENT_LINKCHANGE_FCNTL_WIDTH 4
414 #define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_LBN 24
415 #define MCDI_EVENT_LINKCHANGE_LINK_FLAGS_WIDTH 8
416 #define MCDI_EVENT_SENSOREVT_MONITOR_LBN 0
417 #define MCDI_EVENT_SENSOREVT_MONITOR_WIDTH 8
418 #define MCDI_EVENT_SENSOREVT_STATE_LBN 8
419 #define MCDI_EVENT_SENSOREVT_STATE_WIDTH 8
420 #define MCDI_EVENT_SENSOREVT_VALUE_LBN 16
421 #define MCDI_EVENT_SENSOREVT_VALUE_WIDTH 16
422 #define MCDI_EVENT_FWALERT_DATA_LBN 8
423 #define MCDI_EVENT_FWALERT_DATA_WIDTH 24
424 #define MCDI_EVENT_FWALERT_REASON_LBN 0
425 #define MCDI_EVENT_FWALERT_REASON_WIDTH 8
426 /* enum: SRAM Access. */
427 #define MCDI_EVENT_FWALERT_REASON_SRAM_ACCESS 0x1
428 #define MCDI_EVENT_FLR_VF_LBN 0
429 #define MCDI_EVENT_FLR_VF_WIDTH 8
430 #define MCDI_EVENT_TX_ERR_TXQ_LBN 0
431 #define MCDI_EVENT_TX_ERR_TXQ_WIDTH 12
432 #define MCDI_EVENT_TX_ERR_TYPE_LBN 12
433 #define MCDI_EVENT_TX_ERR_TYPE_WIDTH 4
434 /* enum: Descriptor loader reported failure */
435 #define MCDI_EVENT_TX_ERR_DL_FAIL 0x1
436 /* enum: Descriptor ring empty and no EOP seen for packet */
437 #define MCDI_EVENT_TX_ERR_NO_EOP 0x2
438 /* enum: Overlength packet */
439 #define MCDI_EVENT_TX_ERR_2BIG 0x3
440 /* enum: Malformed option descriptor */
441 #define MCDI_EVENT_TX_BAD_OPTDESC 0x5
442 /* enum: Option descriptor part way through a packet */
443 #define MCDI_EVENT_TX_OPT_IN_PKT 0x8
444 /* enum: DMA or PIO data access error */
445 #define MCDI_EVENT_TX_ERR_BAD_DMA_OR_PIO 0x9
446 #define MCDI_EVENT_TX_ERR_INFO_LBN 16
447 #define MCDI_EVENT_TX_ERR_INFO_WIDTH 16
448 #define MCDI_EVENT_TX_FLUSH_TO_DRIVER_LBN 12
449 #define MCDI_EVENT_TX_FLUSH_TO_DRIVER_WIDTH 1
450 #define MCDI_EVENT_TX_FLUSH_TXQ_LBN 0
451 #define MCDI_EVENT_TX_FLUSH_TXQ_WIDTH 12
452 #define MCDI_EVENT_PTP_ERR_TYPE_LBN 0
453 #define MCDI_EVENT_PTP_ERR_TYPE_WIDTH 8
454 /* enum: PLL lost lock */
455 #define MCDI_EVENT_PTP_ERR_PLL_LOST 0x1
456 /* enum: Filter overflow (PDMA) */
457 #define MCDI_EVENT_PTP_ERR_FILTER 0x2
458 /* enum: FIFO overflow (FPGA) */
459 #define MCDI_EVENT_PTP_ERR_FIFO 0x3
460 /* enum: Merge queue overflow */
461 #define MCDI_EVENT_PTP_ERR_QUEUE 0x4
462 #define MCDI_EVENT_AOE_ERR_TYPE_LBN 0
463 #define MCDI_EVENT_AOE_ERR_TYPE_WIDTH 8
464 /* enum: AOE failed to load - no valid image? */
465 #define MCDI_EVENT_AOE_NO_LOAD 0x1
466 /* enum: AOE FC reported an exception */
467 #define MCDI_EVENT_AOE_FC_ASSERT 0x2
468 /* enum: AOE FC watchdogged */
469 #define MCDI_EVENT_AOE_FC_WATCHDOG 0x3
470 /* enum: AOE FC failed to start */
471 #define MCDI_EVENT_AOE_FC_NO_START 0x4
472 /* enum: Generic AOE fault - likely to have been reported via other means too
473  * but intended for use by aoex driver.
474  */
475 #define MCDI_EVENT_AOE_FAULT 0x5
476 /* enum: Results of reprogramming the CPLD (status in AOE_ERR_DATA) */
477 #define MCDI_EVENT_AOE_CPLD_REPROGRAMMED 0x6
478 /* enum: AOE loaded successfully */
479 #define MCDI_EVENT_AOE_LOAD 0x7
480 /* enum: AOE DMA operation completed (LSB of HOST_HANDLE in AOE_ERR_DATA) */
481 #define MCDI_EVENT_AOE_DMA 0x8
482 /* enum: AOE byteblaster connected/disconnected (Connection status in
483  * AOE_ERR_DATA)
484  */
485 #define MCDI_EVENT_AOE_BYTEBLASTER 0x9
486 /* enum: DDR ECC status update */
487 #define MCDI_EVENT_AOE_DDR_ECC_STATUS 0xa
488 /* enum: PTP status update */
489 #define MCDI_EVENT_AOE_PTP_STATUS 0xb
490 /* enum: FPGA header incorrect */
491 #define MCDI_EVENT_AOE_FPGA_LOAD_HEADER_ERR 0xc
492 /* enum: FPGA Powered Off due to error in powering up FPGA */
493 #define MCDI_EVENT_AOE_FPGA_POWER_OFF 0xd
494 /* enum: AOE FPGA load failed due to MC to MUM communication failure */
495 #define MCDI_EVENT_AOE_FPGA_LOAD_FAILED 0xe
496 /* enum: Notify that invalid flash type detected */
497 #define MCDI_EVENT_AOE_INVALID_FPGA_FLASH_TYPE 0xf
498 /* enum: Notify that the attempt to run FPGA Controller firmware timedout */
499 #define MCDI_EVENT_AOE_FC_RUN_TIMEDOUT 0x10
500 /* enum: Failure to probe one or more FPGA boot flash chips */
501 #define MCDI_EVENT_AOE_FPGA_BOOT_FLASH_INVALID 0x11
502 /* enum: FPGA boot-flash contains an invalid image header */
503 #define MCDI_EVENT_AOE_FPGA_BOOT_FLASH_HDR_INVALID 0x12
504 /* enum: Failed to program clocks required by the FPGA */
505 #define MCDI_EVENT_AOE_FPGA_CLOCKS_PROGRAM_FAILED 0x13
506 /* enum: Notify that FPGA Controller is alive to serve MCDI requests */
507 #define MCDI_EVENT_AOE_FC_RUNNING 0x14
508 #define MCDI_EVENT_AOE_ERR_DATA_LBN 8
509 #define MCDI_EVENT_AOE_ERR_DATA_WIDTH 8
510 #define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_LBN 8
511 #define MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_WIDTH 8
512 /* enum: FC Assert happened, but the register information is not available */
513 #define MCDI_EVENT_AOE_ERR_FC_ASSERT_SEEN 0x0
514 /* enum: The register information for FC Assert is ready for readinng by driver
515  */
516 #define MCDI_EVENT_AOE_ERR_FC_ASSERT_DATA_READY 0x1
517 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_LBN 8
518 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_WIDTH 8
519 /* enum: Reading from NV failed */
520 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_NV_READ_FAIL 0x0
521 /* enum: Invalid Magic Number if FPGA header */
522 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_MAGIC_FAIL 0x1
523 /* enum: Invalid Silicon type detected in header */
524 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_SILICON_TYPE 0x2
525 /* enum: Unsupported VRatio */
526 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_VRATIO 0x3
527 /* enum: Unsupported DDR Type */
528 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_TYPE 0x4
529 /* enum: DDR Voltage out of supported range */
530 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_VOLTAGE 0x5
531 /* enum: Unsupported DDR speed */
532 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SPEED 0x6
533 /* enum: Unsupported DDR size */
534 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SIZE 0x7
535 /* enum: Unsupported DDR rank */
536 #define MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_RANK 0x8
537 #define MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_LBN 8
538 #define MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_WIDTH 8
539 /* enum: Primary boot flash */
540 #define MCDI_EVENT_AOE_FLASH_TYPE_BOOT_PRIMARY 0x0
541 /* enum: Secondary boot flash */
542 #define MCDI_EVENT_AOE_FLASH_TYPE_BOOT_SECONDARY 0x1
543 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_LBN 8
544 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_WIDTH 8
545 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_LBN 8
546 #define MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_WIDTH 8
547 #define MCDI_EVENT_RX_ERR_RXQ_LBN 0
548 #define MCDI_EVENT_RX_ERR_RXQ_WIDTH 12
549 #define MCDI_EVENT_RX_ERR_TYPE_LBN 12
550 #define MCDI_EVENT_RX_ERR_TYPE_WIDTH 4
551 #define MCDI_EVENT_RX_ERR_INFO_LBN 16
552 #define MCDI_EVENT_RX_ERR_INFO_WIDTH 16
553 #define MCDI_EVENT_RX_FLUSH_TO_DRIVER_LBN 12
554 #define MCDI_EVENT_RX_FLUSH_TO_DRIVER_WIDTH 1
555 #define MCDI_EVENT_RX_FLUSH_RXQ_LBN 0
556 #define MCDI_EVENT_RX_FLUSH_RXQ_WIDTH 12
557 #define MCDI_EVENT_MC_REBOOT_COUNT_LBN 0
558 #define MCDI_EVENT_MC_REBOOT_COUNT_WIDTH 16
559 #define MCDI_EVENT_MUM_ERR_TYPE_LBN 0
560 #define MCDI_EVENT_MUM_ERR_TYPE_WIDTH 8
561 /* enum: MUM failed to load - no valid image? */
562 #define MCDI_EVENT_MUM_NO_LOAD 0x1
563 /* enum: MUM f/w reported an exception */
564 #define MCDI_EVENT_MUM_ASSERT 0x2
565 /* enum: MUM not kicking watchdog */
566 #define MCDI_EVENT_MUM_WATCHDOG 0x3
567 #define MCDI_EVENT_MUM_ERR_DATA_LBN 8
568 #define MCDI_EVENT_MUM_ERR_DATA_WIDTH 8
569 #define MCDI_EVENT_DBRET_SEQ_LBN 0
570 #define MCDI_EVENT_DBRET_SEQ_WIDTH 8
571 #define MCDI_EVENT_SUC_ERR_TYPE_LBN 0
572 #define MCDI_EVENT_SUC_ERR_TYPE_WIDTH 8
573 /* enum: Corrupted or bad SUC application. */
574 #define MCDI_EVENT_SUC_BAD_APP 0x1
575 /* enum: SUC application reported an assert. */
576 #define MCDI_EVENT_SUC_ASSERT 0x2
577 /* enum: SUC application reported an exception. */
578 #define MCDI_EVENT_SUC_EXCEPTION 0x3
579 /* enum: SUC watchdog timer expired. */
580 #define MCDI_EVENT_SUC_WATCHDOG 0x4
581 #define MCDI_EVENT_SUC_ERR_ADDRESS_LBN 8
582 #define MCDI_EVENT_SUC_ERR_ADDRESS_WIDTH 24
583 #define MCDI_EVENT_SUC_ERR_DATA_LBN 8
584 #define MCDI_EVENT_SUC_ERR_DATA_WIDTH 24
585 #define MCDI_EVENT_DATA_LBN 0
586 #define MCDI_EVENT_DATA_WIDTH 32
587 #define MCDI_EVENT_SRC_LBN 36
588 #define MCDI_EVENT_SRC_WIDTH 8
589 #define MCDI_EVENT_EV_CODE_LBN 60
590 #define MCDI_EVENT_EV_CODE_WIDTH 4
591 #define MCDI_EVENT_CODE_LBN 44
592 #define MCDI_EVENT_CODE_WIDTH 8
593 /* enum: Event generated by host software */
594 #define MCDI_EVENT_SW_EVENT 0x0
595 /* enum: Bad assert. */
596 #define MCDI_EVENT_CODE_BADSSERT 0x1
597 /* enum: PM Notice. */
598 #define MCDI_EVENT_CODE_PMNOTICE 0x2
599 /* enum: Command done. */
600 #define MCDI_EVENT_CODE_CMDDONE 0x3
601 /* enum: Link change. */
602 #define MCDI_EVENT_CODE_LINKCHANGE 0x4
603 /* enum: Sensor Event. */
604 #define MCDI_EVENT_CODE_SENSOREVT 0x5
605 /* enum: Schedule error. */
606 #define MCDI_EVENT_CODE_SCHEDERR 0x6
607 /* enum: Reboot. */
608 #define MCDI_EVENT_CODE_REBOOT 0x7
609 /* enum: Mac stats DMA. */
610 #define MCDI_EVENT_CODE_MAC_STATS_DMA 0x8
611 /* enum: Firmware alert. */
612 #define MCDI_EVENT_CODE_FWALERT 0x9
613 /* enum: Function level reset. */
614 #define MCDI_EVENT_CODE_FLR 0xa
615 /* enum: Transmit error */
616 #define MCDI_EVENT_CODE_TX_ERR 0xb
617 /* enum: Tx flush has completed */
618 #define MCDI_EVENT_CODE_TX_FLUSH  0xc
619 /* enum: PTP packet received timestamp */
620 #define MCDI_EVENT_CODE_PTP_RX  0xd
621 /* enum: PTP NIC failure */
622 #define MCDI_EVENT_CODE_PTP_FAULT  0xe
623 /* enum: PTP PPS event */
624 #define MCDI_EVENT_CODE_PTP_PPS  0xf
625 /* enum: Rx flush has completed */
626 #define MCDI_EVENT_CODE_RX_FLUSH  0x10
627 /* enum: Receive error */
628 #define MCDI_EVENT_CODE_RX_ERR 0x11
629 /* enum: AOE fault */
630 #define MCDI_EVENT_CODE_AOE  0x12
631 /* enum: Network port calibration failed (VCAL). */
632 #define MCDI_EVENT_CODE_VCAL_FAIL  0x13
633 /* enum: HW PPS event */
634 #define MCDI_EVENT_CODE_HW_PPS  0x14
635 /* enum: The MC has rebooted (huntington and later, siena uses CODE_REBOOT and
636  * a different format)
637  */
638 #define MCDI_EVENT_CODE_MC_REBOOT 0x15
639 /* enum: the MC has detected a parity error */
640 #define MCDI_EVENT_CODE_PAR_ERR 0x16
641 /* enum: the MC has detected a correctable error */
642 #define MCDI_EVENT_CODE_ECC_CORR_ERR 0x17
643 /* enum: the MC has detected an uncorrectable error */
644 #define MCDI_EVENT_CODE_ECC_FATAL_ERR 0x18
645 /* enum: The MC has entered offline BIST mode */
646 #define MCDI_EVENT_CODE_MC_BIST 0x19
647 /* enum: PTP tick event providing current NIC time */
648 #define MCDI_EVENT_CODE_PTP_TIME 0x1a
649 /* enum: MUM fault */
650 #define MCDI_EVENT_CODE_MUM 0x1b
651 /* enum: notify the designated PF of a new authorization request */
652 #define MCDI_EVENT_CODE_PROXY_REQUEST 0x1c
653 /* enum: notify a function that awaits an authorization that its request has
654  * been processed and it may now resend the command
655  */
656 #define MCDI_EVENT_CODE_PROXY_RESPONSE 0x1d
657 /* enum: MCDI command accepted. New commands can be issued but this command is
658  * not done yet.
659  */
660 #define MCDI_EVENT_CODE_DBRET 0x1e
661 /* enum: The MC has detected a fault on the SUC */
662 #define MCDI_EVENT_CODE_SUC 0x1f
663 /* enum: Artificial event generated by host and posted via MC for test
664  * purposes.
665  */
666 #define MCDI_EVENT_CODE_TESTGEN  0xfa
667 #define MCDI_EVENT_CMDDONE_DATA_OFST 0
668 #define MCDI_EVENT_CMDDONE_DATA_LEN 4
669 #define MCDI_EVENT_CMDDONE_DATA_LBN 0
670 #define MCDI_EVENT_CMDDONE_DATA_WIDTH 32
671 #define MCDI_EVENT_LINKCHANGE_DATA_OFST 0
672 #define MCDI_EVENT_LINKCHANGE_DATA_LEN 4
673 #define MCDI_EVENT_LINKCHANGE_DATA_LBN 0
674 #define MCDI_EVENT_LINKCHANGE_DATA_WIDTH 32
675 #define MCDI_EVENT_SENSOREVT_DATA_OFST 0
676 #define MCDI_EVENT_SENSOREVT_DATA_LEN 4
677 #define MCDI_EVENT_SENSOREVT_DATA_LBN 0
678 #define MCDI_EVENT_SENSOREVT_DATA_WIDTH 32
679 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_OFST 0
680 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LEN 4
681 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_LBN 0
682 #define MCDI_EVENT_MAC_STATS_DMA_GENERATION_WIDTH 32
683 #define MCDI_EVENT_TX_ERR_DATA_OFST 0
684 #define MCDI_EVENT_TX_ERR_DATA_LEN 4
685 #define MCDI_EVENT_TX_ERR_DATA_LBN 0
686 #define MCDI_EVENT_TX_ERR_DATA_WIDTH 32
687 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the seconds field of
688  * timestamp
689  */
690 #define MCDI_EVENT_PTP_SECONDS_OFST 0
691 #define MCDI_EVENT_PTP_SECONDS_LEN 4
692 #define MCDI_EVENT_PTP_SECONDS_LBN 0
693 #define MCDI_EVENT_PTP_SECONDS_WIDTH 32
694 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the major field of
695  * timestamp
696  */
697 #define MCDI_EVENT_PTP_MAJOR_OFST 0
698 #define MCDI_EVENT_PTP_MAJOR_LEN 4
699 #define MCDI_EVENT_PTP_MAJOR_LBN 0
700 #define MCDI_EVENT_PTP_MAJOR_WIDTH 32
701 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the nanoseconds field
702  * of timestamp
703  */
704 #define MCDI_EVENT_PTP_NANOSECONDS_OFST 0
705 #define MCDI_EVENT_PTP_NANOSECONDS_LEN 4
706 #define MCDI_EVENT_PTP_NANOSECONDS_LBN 0
707 #define MCDI_EVENT_PTP_NANOSECONDS_WIDTH 32
708 /* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the minor field of
709  * timestamp
710  */
711 #define MCDI_EVENT_PTP_MINOR_OFST 0
712 #define MCDI_EVENT_PTP_MINOR_LEN 4
713 #define MCDI_EVENT_PTP_MINOR_LBN 0
714 #define MCDI_EVENT_PTP_MINOR_WIDTH 32
715 /* For CODE_PTP_RX events, the lowest four bytes of sourceUUID from PTP packet
716  */
717 #define MCDI_EVENT_PTP_UUID_OFST 0
718 #define MCDI_EVENT_PTP_UUID_LEN 4
719 #define MCDI_EVENT_PTP_UUID_LBN 0
720 #define MCDI_EVENT_PTP_UUID_WIDTH 32
721 #define MCDI_EVENT_RX_ERR_DATA_OFST 0
722 #define MCDI_EVENT_RX_ERR_DATA_LEN 4
723 #define MCDI_EVENT_RX_ERR_DATA_LBN 0
724 #define MCDI_EVENT_RX_ERR_DATA_WIDTH 32
725 #define MCDI_EVENT_PAR_ERR_DATA_OFST 0
726 #define MCDI_EVENT_PAR_ERR_DATA_LEN 4
727 #define MCDI_EVENT_PAR_ERR_DATA_LBN 0
728 #define MCDI_EVENT_PAR_ERR_DATA_WIDTH 32
729 #define MCDI_EVENT_ECC_CORR_ERR_DATA_OFST 0
730 #define MCDI_EVENT_ECC_CORR_ERR_DATA_LEN 4
731 #define MCDI_EVENT_ECC_CORR_ERR_DATA_LBN 0
732 #define MCDI_EVENT_ECC_CORR_ERR_DATA_WIDTH 32
733 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_OFST 0
734 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_LEN 4
735 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_LBN 0
736 #define MCDI_EVENT_ECC_FATAL_ERR_DATA_WIDTH 32
737 /* For CODE_PTP_TIME events, the major value of the PTP clock */
738 #define MCDI_EVENT_PTP_TIME_MAJOR_OFST 0
739 #define MCDI_EVENT_PTP_TIME_MAJOR_LEN 4
740 #define MCDI_EVENT_PTP_TIME_MAJOR_LBN 0
741 #define MCDI_EVENT_PTP_TIME_MAJOR_WIDTH 32
742 /* For CODE_PTP_TIME events, bits 19-26 of the minor value of the PTP clock */
743 #define MCDI_EVENT_PTP_TIME_MINOR_26_19_LBN 36
744 #define MCDI_EVENT_PTP_TIME_MINOR_26_19_WIDTH 8
745 /* For CODE_PTP_TIME events, most significant bits of the minor value of the
746  * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_19.
747  */
748 #define MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_LBN 36
749 #define MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_WIDTH 8
750 /* For CODE_PTP_TIME events where report sync status is enabled, indicates
751  * whether the NIC clock has ever been set
752  */
753 #define MCDI_EVENT_PTP_TIME_NIC_CLOCK_VALID_LBN 36
754 #define MCDI_EVENT_PTP_TIME_NIC_CLOCK_VALID_WIDTH 1
755 /* For CODE_PTP_TIME events where report sync status is enabled, indicates
756  * whether the NIC and System clocks are in sync
757  */
758 #define MCDI_EVENT_PTP_TIME_HOST_NIC_IN_SYNC_LBN 37
759 #define MCDI_EVENT_PTP_TIME_HOST_NIC_IN_SYNC_WIDTH 1
760 /* For CODE_PTP_TIME events where report sync status is enabled, bits 21-26 of
761  * the minor value of the PTP clock
762  */
763 #define MCDI_EVENT_PTP_TIME_MINOR_26_21_LBN 38
764 #define MCDI_EVENT_PTP_TIME_MINOR_26_21_WIDTH 6
765 /* For CODE_PTP_TIME events, most significant bits of the minor value of the
766  * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_21.
767  */
768 #define MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_LBN 38
769 #define MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_WIDTH 6
770 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_OFST 0
771 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LEN 4
772 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LBN 0
773 #define MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_WIDTH 32
774 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_OFST 0
775 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_LEN 4
776 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_LBN 0
777 #define MCDI_EVENT_PROXY_RESPONSE_HANDLE_WIDTH 32
778 /* Zero means that the request has been completed or authorized, and the driver
779  * should resend it. A non-zero value means that the authorization has been
780  * denied, and gives the reason. Typically it will be EPERM.
781  */
782 #define MCDI_EVENT_PROXY_RESPONSE_RC_LBN 36
783 #define MCDI_EVENT_PROXY_RESPONSE_RC_WIDTH 8
784 #define MCDI_EVENT_DBRET_DATA_OFST 0
785 #define MCDI_EVENT_DBRET_DATA_LEN 4
786 #define MCDI_EVENT_DBRET_DATA_LBN 0
787 #define MCDI_EVENT_DBRET_DATA_WIDTH 32
788
789 /* FCDI_EVENT structuredef */
790 #define FCDI_EVENT_LEN 8
791 #define FCDI_EVENT_CONT_LBN 32
792 #define FCDI_EVENT_CONT_WIDTH 1
793 #define FCDI_EVENT_LEVEL_LBN 33
794 #define FCDI_EVENT_LEVEL_WIDTH 3
795 /* enum: Info. */
796 #define FCDI_EVENT_LEVEL_INFO  0x0
797 /* enum: Warning. */
798 #define FCDI_EVENT_LEVEL_WARN 0x1
799 /* enum: Error. */
800 #define FCDI_EVENT_LEVEL_ERR 0x2
801 /* enum: Fatal. */
802 #define FCDI_EVENT_LEVEL_FATAL 0x3
803 #define FCDI_EVENT_DATA_OFST 0
804 #define FCDI_EVENT_DATA_LEN 4
805 #define FCDI_EVENT_LINK_STATE_STATUS_LBN 0
806 #define FCDI_EVENT_LINK_STATE_STATUS_WIDTH 1
807 #define FCDI_EVENT_LINK_DOWN 0x0 /* enum */
808 #define FCDI_EVENT_LINK_UP 0x1 /* enum */
809 #define FCDI_EVENT_DATA_LBN 0
810 #define FCDI_EVENT_DATA_WIDTH 32
811 #define FCDI_EVENT_SRC_LBN 36
812 #define FCDI_EVENT_SRC_WIDTH 8
813 #define FCDI_EVENT_EV_CODE_LBN 60
814 #define FCDI_EVENT_EV_CODE_WIDTH 4
815 #define FCDI_EVENT_CODE_LBN 44
816 #define FCDI_EVENT_CODE_WIDTH 8
817 /* enum: The FC was rebooted. */
818 #define FCDI_EVENT_CODE_REBOOT 0x1
819 /* enum: Bad assert. */
820 #define FCDI_EVENT_CODE_ASSERT 0x2
821 /* enum: DDR3 test result. */
822 #define FCDI_EVENT_CODE_DDR_TEST_RESULT 0x3
823 /* enum: Link status. */
824 #define FCDI_EVENT_CODE_LINK_STATE 0x4
825 /* enum: A timed read is ready to be serviced. */
826 #define FCDI_EVENT_CODE_TIMED_READ 0x5
827 /* enum: One or more PPS IN events */
828 #define FCDI_EVENT_CODE_PPS_IN 0x6
829 /* enum: Tick event from PTP clock */
830 #define FCDI_EVENT_CODE_PTP_TICK 0x7
831 /* enum: ECC error counters */
832 #define FCDI_EVENT_CODE_DDR_ECC_STATUS 0x8
833 /* enum: Current status of PTP */
834 #define FCDI_EVENT_CODE_PTP_STATUS 0x9
835 /* enum: Port id config to map MC-FC port idx */
836 #define FCDI_EVENT_CODE_PORT_CONFIG 0xa
837 /* enum: Boot result or error code */
838 #define FCDI_EVENT_CODE_BOOT_RESULT 0xb
839 #define FCDI_EVENT_REBOOT_SRC_LBN 36
840 #define FCDI_EVENT_REBOOT_SRC_WIDTH 8
841 #define FCDI_EVENT_REBOOT_FC_FW 0x0 /* enum */
842 #define FCDI_EVENT_REBOOT_FC_BOOTLOADER 0x1 /* enum */
843 #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_OFST 0
844 #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LEN 4
845 #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LBN 0
846 #define FCDI_EVENT_ASSERT_INSTR_ADDRESS_WIDTH 32
847 #define FCDI_EVENT_ASSERT_TYPE_LBN 36
848 #define FCDI_EVENT_ASSERT_TYPE_WIDTH 8
849 #define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_LBN 36
850 #define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_WIDTH 8
851 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_OFST 0
852 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LEN 4
853 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LBN 0
854 #define FCDI_EVENT_DDR_TEST_RESULT_RESULT_WIDTH 32
855 #define FCDI_EVENT_LINK_STATE_DATA_OFST 0
856 #define FCDI_EVENT_LINK_STATE_DATA_LEN 4
857 #define FCDI_EVENT_LINK_STATE_DATA_LBN 0
858 #define FCDI_EVENT_LINK_STATE_DATA_WIDTH 32
859 #define FCDI_EVENT_PTP_STATE_OFST 0
860 #define FCDI_EVENT_PTP_STATE_LEN 4
861 #define FCDI_EVENT_PTP_UNDEFINED 0x0 /* enum */
862 #define FCDI_EVENT_PTP_SETUP_FAILED 0x1 /* enum */
863 #define FCDI_EVENT_PTP_OPERATIONAL 0x2 /* enum */
864 #define FCDI_EVENT_PTP_STATE_LBN 0
865 #define FCDI_EVENT_PTP_STATE_WIDTH 32
866 #define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_LBN 36
867 #define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_WIDTH 8
868 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_OFST 0
869 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LEN 4
870 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LBN 0
871 #define FCDI_EVENT_DDR_ECC_STATUS_STATUS_WIDTH 32
872 /* Index of MC port being referred to */
873 #define FCDI_EVENT_PORT_CONFIG_SRC_LBN 36
874 #define FCDI_EVENT_PORT_CONFIG_SRC_WIDTH 8
875 /* FC Port index that matches the MC port index in SRC */
876 #define FCDI_EVENT_PORT_CONFIG_DATA_OFST 0
877 #define FCDI_EVENT_PORT_CONFIG_DATA_LEN 4
878 #define FCDI_EVENT_PORT_CONFIG_DATA_LBN 0
879 #define FCDI_EVENT_PORT_CONFIG_DATA_WIDTH 32
880 #define FCDI_EVENT_BOOT_RESULT_OFST 0
881 #define FCDI_EVENT_BOOT_RESULT_LEN 4
882 /*            Enum values, see field(s): */
883 /*               MC_CMD_AOE/MC_CMD_AOE_OUT_INFO/FC_BOOT_RESULT */
884 #define FCDI_EVENT_BOOT_RESULT_LBN 0
885 #define FCDI_EVENT_BOOT_RESULT_WIDTH 32
886
887 /* FCDI_EXTENDED_EVENT_PPS structuredef: Extended FCDI event to send PPS events
888  * to the MC. Note that this structure | is overlayed over a normal FCDI event
889  * such that bits 32-63 containing | event code, level, source etc remain the
890  * same. In this case the data | field of the header is defined to be the
891  * number of timestamps
892  */
893 #define FCDI_EXTENDED_EVENT_PPS_LENMIN 16
894 #define FCDI_EXTENDED_EVENT_PPS_LENMAX 248
895 #define FCDI_EXTENDED_EVENT_PPS_LEN(num) (8+8*(num))
896 /* Number of timestamps following */
897 #define FCDI_EXTENDED_EVENT_PPS_COUNT_OFST 0
898 #define FCDI_EXTENDED_EVENT_PPS_COUNT_LEN 4
899 #define FCDI_EXTENDED_EVENT_PPS_COUNT_LBN 0
900 #define FCDI_EXTENDED_EVENT_PPS_COUNT_WIDTH 32
901 /* Seconds field of a timestamp record */
902 #define FCDI_EXTENDED_EVENT_PPS_SECONDS_OFST 8
903 #define FCDI_EXTENDED_EVENT_PPS_SECONDS_LEN 4
904 #define FCDI_EXTENDED_EVENT_PPS_SECONDS_LBN 64
905 #define FCDI_EXTENDED_EVENT_PPS_SECONDS_WIDTH 32
906 /* Nanoseconds field of a timestamp record */
907 #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_OFST 12
908 #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LEN 4
909 #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LBN 96
910 #define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_WIDTH 32
911 /* Timestamp records comprising the event */
912 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_OFST 8
913 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LEN 8
914 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LO_OFST 8
915 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_HI_OFST 12
916 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MINNUM 1
917 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM 30
918 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LBN 64
919 #define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_WIDTH 64
920
921 /* MUM_EVENT structuredef */
922 #define MUM_EVENT_LEN 8
923 #define MUM_EVENT_CONT_LBN 32
924 #define MUM_EVENT_CONT_WIDTH 1
925 #define MUM_EVENT_LEVEL_LBN 33
926 #define MUM_EVENT_LEVEL_WIDTH 3
927 /* enum: Info. */
928 #define MUM_EVENT_LEVEL_INFO  0x0
929 /* enum: Warning. */
930 #define MUM_EVENT_LEVEL_WARN 0x1
931 /* enum: Error. */
932 #define MUM_EVENT_LEVEL_ERR 0x2
933 /* enum: Fatal. */
934 #define MUM_EVENT_LEVEL_FATAL 0x3
935 #define MUM_EVENT_DATA_OFST 0
936 #define MUM_EVENT_DATA_LEN 4
937 #define MUM_EVENT_SENSOR_ID_LBN 0
938 #define MUM_EVENT_SENSOR_ID_WIDTH 8
939 /*             Enum values, see field(s): */
940 /*                MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
941 #define MUM_EVENT_SENSOR_STATE_LBN 8
942 #define MUM_EVENT_SENSOR_STATE_WIDTH 8
943 #define MUM_EVENT_PORT_PHY_READY_LBN 0
944 #define MUM_EVENT_PORT_PHY_READY_WIDTH 1
945 #define MUM_EVENT_PORT_PHY_LINK_UP_LBN 1
946 #define MUM_EVENT_PORT_PHY_LINK_UP_WIDTH 1
947 #define MUM_EVENT_PORT_PHY_TX_LOL_LBN 2
948 #define MUM_EVENT_PORT_PHY_TX_LOL_WIDTH 1
949 #define MUM_EVENT_PORT_PHY_RX_LOL_LBN 3
950 #define MUM_EVENT_PORT_PHY_RX_LOL_WIDTH 1
951 #define MUM_EVENT_PORT_PHY_TX_LOS_LBN 4
952 #define MUM_EVENT_PORT_PHY_TX_LOS_WIDTH 1
953 #define MUM_EVENT_PORT_PHY_RX_LOS_LBN 5
954 #define MUM_EVENT_PORT_PHY_RX_LOS_WIDTH 1
955 #define MUM_EVENT_PORT_PHY_TX_FAULT_LBN 6
956 #define MUM_EVENT_PORT_PHY_TX_FAULT_WIDTH 1
957 #define MUM_EVENT_DATA_LBN 0
958 #define MUM_EVENT_DATA_WIDTH 32
959 #define MUM_EVENT_SRC_LBN 36
960 #define MUM_EVENT_SRC_WIDTH 8
961 #define MUM_EVENT_EV_CODE_LBN 60
962 #define MUM_EVENT_EV_CODE_WIDTH 4
963 #define MUM_EVENT_CODE_LBN 44
964 #define MUM_EVENT_CODE_WIDTH 8
965 /* enum: The MUM was rebooted. */
966 #define MUM_EVENT_CODE_REBOOT 0x1
967 /* enum: Bad assert. */
968 #define MUM_EVENT_CODE_ASSERT 0x2
969 /* enum: Sensor failure. */
970 #define MUM_EVENT_CODE_SENSOR 0x3
971 /* enum: Link fault has been asserted, or has cleared. */
972 #define MUM_EVENT_CODE_QSFP_LASI_INTERRUPT 0x4
973 #define MUM_EVENT_SENSOR_DATA_OFST 0
974 #define MUM_EVENT_SENSOR_DATA_LEN 4
975 #define MUM_EVENT_SENSOR_DATA_LBN 0
976 #define MUM_EVENT_SENSOR_DATA_WIDTH 32
977 #define MUM_EVENT_PORT_PHY_FLAGS_OFST 0
978 #define MUM_EVENT_PORT_PHY_FLAGS_LEN 4
979 #define MUM_EVENT_PORT_PHY_FLAGS_LBN 0
980 #define MUM_EVENT_PORT_PHY_FLAGS_WIDTH 32
981 #define MUM_EVENT_PORT_PHY_COPPER_LEN_OFST 0
982 #define MUM_EVENT_PORT_PHY_COPPER_LEN_LEN 4
983 #define MUM_EVENT_PORT_PHY_COPPER_LEN_LBN 0
984 #define MUM_EVENT_PORT_PHY_COPPER_LEN_WIDTH 32
985 #define MUM_EVENT_PORT_PHY_CAPS_OFST 0
986 #define MUM_EVENT_PORT_PHY_CAPS_LEN 4
987 #define MUM_EVENT_PORT_PHY_CAPS_LBN 0
988 #define MUM_EVENT_PORT_PHY_CAPS_WIDTH 32
989 #define MUM_EVENT_PORT_PHY_TECH_OFST 0
990 #define MUM_EVENT_PORT_PHY_TECH_LEN 4
991 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_UNKNOWN 0x0 /* enum */
992 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_OPTICAL 0x1 /* enum */
993 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE 0x2 /* enum */
994 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE_EQUALIZED 0x3 /* enum */
995 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_ACTIVE_LIMITING 0x4 /* enum */
996 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_ACTIVE_LINEAR 0x5 /* enum */
997 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_BASE_T 0x6 /* enum */
998 #define MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_LOOPBACK_PASSIVE 0x7 /* enum */
999 #define MUM_EVENT_PORT_PHY_TECH_LBN 0
1000 #define MUM_EVENT_PORT_PHY_TECH_WIDTH 32
1001 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_LBN 36
1002 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_WIDTH 4
1003 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_FLAGS 0x0 /* enum */
1004 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_COPPER_LEN 0x1 /* enum */
1005 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_CAPS 0x2 /* enum */
1006 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_TECH 0x3 /* enum */
1007 #define MUM_EVENT_PORT_PHY_SRC_DATA_ID_MAX 0x4 /* enum */
1008 #define MUM_EVENT_PORT_PHY_SRC_PORT_NO_LBN 40
1009 #define MUM_EVENT_PORT_PHY_SRC_PORT_NO_WIDTH 4
1010
1011
1012 /***********************************/
1013 /* MC_CMD_READ32
1014  * Read multiple 32byte words from MC memory. Note - this command really
1015  * belongs to INSECURE category but is required by shmboot. The command handler
1016  * has additional checks to reject insecure calls.
1017  */
1018 #define MC_CMD_READ32 0x1
1019 #undef  MC_CMD_0x1_PRIVILEGE_CTG
1020
1021 #define MC_CMD_0x1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
1022
1023 /* MC_CMD_READ32_IN msgrequest */
1024 #define MC_CMD_READ32_IN_LEN 8
1025 #define MC_CMD_READ32_IN_ADDR_OFST 0
1026 #define MC_CMD_READ32_IN_ADDR_LEN 4
1027 #define MC_CMD_READ32_IN_NUMWORDS_OFST 4
1028 #define MC_CMD_READ32_IN_NUMWORDS_LEN 4
1029
1030 /* MC_CMD_READ32_OUT msgresponse */
1031 #define MC_CMD_READ32_OUT_LENMIN 4
1032 #define MC_CMD_READ32_OUT_LENMAX 252
1033 #define MC_CMD_READ32_OUT_LEN(num) (0+4*(num))
1034 #define MC_CMD_READ32_OUT_BUFFER_OFST 0
1035 #define MC_CMD_READ32_OUT_BUFFER_LEN 4
1036 #define MC_CMD_READ32_OUT_BUFFER_MINNUM 1
1037 #define MC_CMD_READ32_OUT_BUFFER_MAXNUM 63
1038
1039
1040 /***********************************/
1041 /* MC_CMD_WRITE32
1042  * Write multiple 32byte words to MC memory.
1043  */
1044 #define MC_CMD_WRITE32 0x2
1045 #undef  MC_CMD_0x2_PRIVILEGE_CTG
1046
1047 #define MC_CMD_0x2_PRIVILEGE_CTG SRIOV_CTG_INSECURE
1048
1049 /* MC_CMD_WRITE32_IN msgrequest */
1050 #define MC_CMD_WRITE32_IN_LENMIN 8
1051 #define MC_CMD_WRITE32_IN_LENMAX 252
1052 #define MC_CMD_WRITE32_IN_LEN(num) (4+4*(num))
1053 #define MC_CMD_WRITE32_IN_ADDR_OFST 0
1054 #define MC_CMD_WRITE32_IN_ADDR_LEN 4
1055 #define MC_CMD_WRITE32_IN_BUFFER_OFST 4
1056 #define MC_CMD_WRITE32_IN_BUFFER_LEN 4
1057 #define MC_CMD_WRITE32_IN_BUFFER_MINNUM 1
1058 #define MC_CMD_WRITE32_IN_BUFFER_MAXNUM 62
1059
1060 /* MC_CMD_WRITE32_OUT msgresponse */
1061 #define MC_CMD_WRITE32_OUT_LEN 0
1062
1063
1064 /***********************************/
1065 /* MC_CMD_COPYCODE
1066  * Copy MC code between two locations and jump. Note - this command really
1067  * belongs to INSECURE category but is required by shmboot. The command handler
1068  * has additional checks to reject insecure calls.
1069  */
1070 #define MC_CMD_COPYCODE 0x3
1071 #undef  MC_CMD_0x3_PRIVILEGE_CTG
1072
1073 #define MC_CMD_0x3_PRIVILEGE_CTG SRIOV_CTG_ADMIN
1074
1075 /* MC_CMD_COPYCODE_IN msgrequest */
1076 #define MC_CMD_COPYCODE_IN_LEN 16
1077 /* Source address
1078  *
1079  * The main image should be entered via a copy of a single word from and to a
1080  * magic address, which controls various aspects of the boot. The magic address
1081  * is a bitfield, with each bit as documented below.
1082  */
1083 #define MC_CMD_COPYCODE_IN_SRC_ADDR_OFST 0
1084 #define MC_CMD_COPYCODE_IN_SRC_ADDR_LEN 4
1085 /* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT (see below) */
1086 #define MC_CMD_COPYCODE_HUNT_NO_MAGIC_ADDR 0x10000
1087 /* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT and
1088  * BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED (see below)
1089  */
1090 #define MC_CMD_COPYCODE_HUNT_NO_DATAPATH_MAGIC_ADDR 0x1d0d0
1091 /* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT,
1092  * BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED and BOOT_MAGIC_IGNORE_CONFIG (see
1093  * below)
1094  */
1095 #define MC_CMD_COPYCODE_HUNT_IGNORE_CONFIG_MAGIC_ADDR 0x1badc
1096 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_LBN 17
1097 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_WIDTH 1
1098 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_LBN 2
1099 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_WIDTH 1
1100 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_LBN 3
1101 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_WIDTH 1
1102 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_LBN 4
1103 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_WIDTH 1
1104 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_LBN 5
1105 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_WIDTH 1
1106 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_LBN 6
1107 #define MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_WIDTH 1
1108 /* Destination address */
1109 #define MC_CMD_COPYCODE_IN_DEST_ADDR_OFST 4
1110 #define MC_CMD_COPYCODE_IN_DEST_ADDR_LEN 4
1111 #define MC_CMD_COPYCODE_IN_NUMWORDS_OFST 8
1112 #define MC_CMD_COPYCODE_IN_NUMWORDS_LEN 4
1113 /* Address of where to jump after copy. */
1114 #define MC_CMD_COPYCODE_IN_JUMP_OFST 12
1115 #define MC_CMD_COPYCODE_IN_JUMP_LEN 4
1116 /* enum: Control should return to the caller rather than jumping */
1117 #define MC_CMD_COPYCODE_JUMP_NONE 0x1
1118
1119 /* MC_CMD_COPYCODE_OUT msgresponse */
1120 #define MC_CMD_COPYCODE_OUT_LEN 0
1121
1122
1123 /***********************************/
1124 /* MC_CMD_SET_FUNC
1125  * Select function for function-specific commands.
1126  */
1127 #define MC_CMD_SET_FUNC 0x4
1128 #undef  MC_CMD_0x4_PRIVILEGE_CTG
1129
1130 #define MC_CMD_0x4_PRIVILEGE_CTG SRIOV_CTG_INSECURE
1131
1132 /* MC_CMD_SET_FUNC_IN msgrequest */
1133 #define MC_CMD_SET_FUNC_IN_LEN 4
1134 /* Set function */
1135 #define MC_CMD_SET_FUNC_IN_FUNC_OFST 0
1136 #define MC_CMD_SET_FUNC_IN_FUNC_LEN 4
1137
1138 /* MC_CMD_SET_FUNC_OUT msgresponse */
1139 #define MC_CMD_SET_FUNC_OUT_LEN 0
1140
1141
1142 /***********************************/
1143 /* MC_CMD_GET_BOOT_STATUS
1144  * Get the instruction address from which the MC booted.
1145  */
1146 #define MC_CMD_GET_BOOT_STATUS 0x5
1147 #undef  MC_CMD_0x5_PRIVILEGE_CTG
1148
1149 #define MC_CMD_0x5_PRIVILEGE_CTG SRIOV_CTG_GENERAL
1150
1151 /* MC_CMD_GET_BOOT_STATUS_IN msgrequest */
1152 #define MC_CMD_GET_BOOT_STATUS_IN_LEN 0
1153
1154 /* MC_CMD_GET_BOOT_STATUS_OUT msgresponse */
1155 #define MC_CMD_GET_BOOT_STATUS_OUT_LEN 8
1156 /* ?? */
1157 #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_OFST 0
1158 #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_LEN 4
1159 /* enum: indicates that the MC wasn't flash booted */
1160 #define MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_NULL  0xdeadbeef
1161 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_OFST 4
1162 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_LEN 4
1163 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_LBN 0
1164 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_WIDTH 1
1165 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_LBN 1
1166 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_WIDTH 1
1167 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_LBN 2
1168 #define MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_WIDTH 1
1169
1170
1171 /***********************************/
1172 /* MC_CMD_GET_ASSERTS
1173  * Get (and optionally clear) the current assertion status. Only
1174  * OUT.GLOBAL_FLAGS is guaranteed to exist in the completion payload. The other
1175  * fields will only be present if OUT.GLOBAL_FLAGS != NO_FAILS
1176  */
1177 #define MC_CMD_GET_ASSERTS 0x6
1178 #undef  MC_CMD_0x6_PRIVILEGE_CTG
1179
1180 #define MC_CMD_0x6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
1181
1182 /* MC_CMD_GET_ASSERTS_IN msgrequest */
1183 #define MC_CMD_GET_ASSERTS_IN_LEN 4
1184 /* Set to clear assertion */
1185 #define MC_CMD_GET_ASSERTS_IN_CLEAR_OFST 0
1186 #define MC_CMD_GET_ASSERTS_IN_CLEAR_LEN 4
1187
1188 /* MC_CMD_GET_ASSERTS_OUT msgresponse */
1189 #define MC_CMD_GET_ASSERTS_OUT_LEN 140
1190 /* Assertion status flag. */
1191 #define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_OFST 0
1192 #define MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_LEN 4
1193 /* enum: No assertions have failed. */
1194 #define MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1
1195 /* enum: A system-level assertion has failed. */
1196 #define MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2
1197 /* enum: A thread-level assertion has failed. */
1198 #define MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3
1199 /* enum: The system was reset by the watchdog. */
1200 #define MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4
1201 /* enum: An illegal address trap stopped the system (huntington and later) */
1202 #define MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5
1203 /* Failing PC value */
1204 #define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_OFST 4
1205 #define MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_LEN 4
1206 /* Saved GP regs */
1207 #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_OFST 8
1208 #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_LEN 4
1209 #define MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_NUM 31
1210 /* enum: A magic value hinting that the value in this register at the time of
1211  * the failure has likely been lost.
1212  */
1213 #define MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057
1214 /* Failing thread address */
1215 #define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_OFST 132
1216 #define MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_LEN 4
1217 #define MC_CMD_GET_ASSERTS_OUT_RESERVED_OFST 136
1218 #define MC_CMD_GET_ASSERTS_OUT_RESERVED_LEN 4
1219
1220
1221 /***********************************/
1222 /* MC_CMD_LOG_CTRL
1223  * Configure the output stream for log events such as link state changes,
1224  * sensor notifications and MCDI completions
1225  */
1226 #define MC_CMD_LOG_CTRL 0x7
1227 #undef  MC_CMD_0x7_PRIVILEGE_CTG
1228
1229 #define MC_CMD_0x7_PRIVILEGE_CTG SRIOV_CTG_GENERAL
1230
1231 /* MC_CMD_LOG_CTRL_IN msgrequest */
1232 #define MC_CMD_LOG_CTRL_IN_LEN 8
1233 /* Log destination */
1234 #define MC_CMD_LOG_CTRL_IN_LOG_DEST_OFST 0
1235 #define MC_CMD_LOG_CTRL_IN_LOG_DEST_LEN 4
1236 /* enum: UART. */
1237 #define MC_CMD_LOG_CTRL_IN_LOG_DEST_UART 0x1
1238 /* enum: Event queue. */
1239 #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ 0x2
1240 /* Legacy argument. Must be zero. */
1241 #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_OFST 4
1242 #define MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_LEN 4
1243
1244 /* MC_CMD_LOG_CTRL_OUT msgresponse */
1245 #define MC_CMD_LOG_CTRL_OUT_LEN 0
1246
1247
1248 /***********************************/
1249 /* MC_CMD_GET_VERSION
1250  * Get version information about the MC firmware.
1251  */
1252 #define MC_CMD_GET_VERSION 0x8
1253 #undef  MC_CMD_0x8_PRIVILEGE_CTG
1254
1255 #define MC_CMD_0x8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
1256
1257 /* MC_CMD_GET_VERSION_IN msgrequest */
1258 #define MC_CMD_GET_VERSION_IN_LEN 0
1259
1260 /* MC_CMD_GET_VERSION_EXT_IN msgrequest: Asks for the extended version */
1261 #define MC_CMD_GET_VERSION_EXT_IN_LEN 4
1262 /* placeholder, set to 0 */
1263 #define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_OFST 0
1264 #define MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_LEN 4
1265
1266 /* MC_CMD_GET_VERSION_V0_OUT msgresponse: deprecated version format */
1267 #define MC_CMD_GET_VERSION_V0_OUT_LEN 4
1268 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0
1269 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4
1270 /* enum: Reserved version number to indicate "any" version. */
1271 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_ANY 0xffffffff
1272 /* enum: Bootrom version value for Siena. */
1273 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM 0xb0070000
1274 /* enum: Bootrom version value for Huntington. */
1275 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_HUNT_BOOTROM 0xb0070001
1276 /* enum: Bootrom version value for Medford2. */
1277 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_MEDFORD2_BOOTROM 0xb0070002
1278
1279 /* MC_CMD_GET_VERSION_OUT msgresponse */
1280 #define MC_CMD_GET_VERSION_OUT_LEN 32
1281 /*            MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */
1282 /*            MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */
1283 /*            Enum values, see field(s): */
1284 /*               MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */
1285 #define MC_CMD_GET_VERSION_OUT_PCOL_OFST 4
1286 #define MC_CMD_GET_VERSION_OUT_PCOL_LEN 4
1287 /* 128bit mask of functions supported by the current firmware */
1288 #define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_OFST 8
1289 #define MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_LEN 16
1290 #define MC_CMD_GET_VERSION_OUT_VERSION_OFST 24
1291 #define MC_CMD_GET_VERSION_OUT_VERSION_LEN 8
1292 #define MC_CMD_GET_VERSION_OUT_VERSION_LO_OFST 24
1293 #define MC_CMD_GET_VERSION_OUT_VERSION_HI_OFST 28
1294
1295 /* MC_CMD_GET_VERSION_EXT_OUT msgresponse */
1296 #define MC_CMD_GET_VERSION_EXT_OUT_LEN 48
1297 /*            MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */
1298 /*            MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */
1299 /*            Enum values, see field(s): */
1300 /*               MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */
1301 #define MC_CMD_GET_VERSION_EXT_OUT_PCOL_OFST 4
1302 #define MC_CMD_GET_VERSION_EXT_OUT_PCOL_LEN 4
1303 /* 128bit mask of functions supported by the current firmware */
1304 #define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_OFST 8
1305 #define MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_LEN 16
1306 #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_OFST 24
1307 #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_LEN 8
1308 #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_LO_OFST 24
1309 #define MC_CMD_GET_VERSION_EXT_OUT_VERSION_HI_OFST 28
1310 /* extra info */
1311 #define MC_CMD_GET_VERSION_EXT_OUT_EXTRA_OFST 32
1312 #define MC_CMD_GET_VERSION_EXT_OUT_EXTRA_LEN 16
1313
1314
1315 /***********************************/
1316 /* MC_CMD_PTP
1317  * Perform PTP operation
1318  */
1319 #define MC_CMD_PTP 0xb
1320 #undef  MC_CMD_0xb_PRIVILEGE_CTG
1321
1322 #define MC_CMD_0xb_PRIVILEGE_CTG SRIOV_CTG_GENERAL
1323
1324 /* MC_CMD_PTP_IN msgrequest */
1325 #define MC_CMD_PTP_IN_LEN 1
1326 /* PTP operation code */
1327 #define MC_CMD_PTP_IN_OP_OFST 0
1328 #define MC_CMD_PTP_IN_OP_LEN 1
1329 /* enum: Enable PTP packet timestamping operation. */
1330 #define MC_CMD_PTP_OP_ENABLE 0x1
1331 /* enum: Disable PTP packet timestamping operation. */
1332 #define MC_CMD_PTP_OP_DISABLE 0x2
1333 /* enum: Send a PTP packet. This operation is used on Siena and Huntington.
1334  * From Medford onwards it is not supported: on those platforms PTP transmit
1335  * timestamping is done using the fast path.
1336  */
1337 #define MC_CMD_PTP_OP_TRANSMIT 0x3
1338 /* enum: Read the current NIC time. */
1339 #define MC_CMD_PTP_OP_READ_NIC_TIME 0x4
1340 /* enum: Get the current PTP status. Note that the clock frequency returned (in
1341  * Hz) is rounded to the nearest MHz (e.g. 666000000 for 666666666).
1342  */
1343 #define MC_CMD_PTP_OP_STATUS 0x5
1344 /* enum: Adjust the PTP NIC's time. */
1345 #define MC_CMD_PTP_OP_ADJUST 0x6
1346 /* enum: Synchronize host and NIC time. */
1347 #define MC_CMD_PTP_OP_SYNCHRONIZE 0x7
1348 /* enum: Basic manufacturing tests. Siena PTP adapters only. */
1349 #define MC_CMD_PTP_OP_MANFTEST_BASIC 0x8
1350 /* enum: Packet based manufacturing tests. Siena PTP adapters only. */
1351 #define MC_CMD_PTP_OP_MANFTEST_PACKET 0x9
1352 /* enum: Reset some of the PTP related statistics */
1353 #define MC_CMD_PTP_OP_RESET_STATS 0xa
1354 /* enum: Debug operations to MC. */
1355 #define MC_CMD_PTP_OP_DEBUG 0xb
1356 /* enum: Read an FPGA register. Siena PTP adapters only. */
1357 #define MC_CMD_PTP_OP_FPGAREAD 0xc
1358 /* enum: Write an FPGA register. Siena PTP adapters only. */
1359 #define MC_CMD_PTP_OP_FPGAWRITE 0xd
1360 /* enum: Apply an offset to the NIC clock */
1361 #define MC_CMD_PTP_OP_CLOCK_OFFSET_ADJUST 0xe
1362 /* enum: Change the frequency correction applied to the NIC clock */
1363 #define MC_CMD_PTP_OP_CLOCK_FREQ_ADJUST 0xf
1364 /* enum: Set the MC packet filter VLAN tags for received PTP packets.
1365  * Deprecated for Huntington onwards.
1366  */
1367 #define MC_CMD_PTP_OP_RX_SET_VLAN_FILTER 0x10
1368 /* enum: Set the MC packet filter UUID for received PTP packets. Deprecated for
1369  * Huntington onwards.
1370  */
1371 #define MC_CMD_PTP_OP_RX_SET_UUID_FILTER 0x11
1372 /* enum: Set the MC packet filter Domain for received PTP packets. Deprecated
1373  * for Huntington onwards.
1374  */
1375 #define MC_CMD_PTP_OP_RX_SET_DOMAIN_FILTER 0x12
1376 /* enum: Set the clock source. Required for snapper tests on Huntington and
1377  * Medford. Not implemented for Siena or Medford2.
1378  */
1379 #define MC_CMD_PTP_OP_SET_CLK_SRC 0x13
1380 /* enum: Reset value of Timer Reg. Not implemented. */
1381 #define MC_CMD_PTP_OP_RST_CLK 0x14
1382 /* enum: Enable the forwarding of PPS events to the host */
1383 #define MC_CMD_PTP_OP_PPS_ENABLE 0x15
1384 /* enum: Get the time format used by this NIC for PTP operations */
1385 #define MC_CMD_PTP_OP_GET_TIME_FORMAT 0x16
1386 /* enum: Get the clock attributes. NOTE- extended version of
1387  * MC_CMD_PTP_OP_GET_TIME_FORMAT
1388  */
1389 #define MC_CMD_PTP_OP_GET_ATTRIBUTES 0x16
1390 /* enum: Get corrections that should be applied to the various different
1391  * timestamps
1392  */
1393 #define MC_CMD_PTP_OP_GET_TIMESTAMP_CORRECTIONS 0x17
1394 /* enum: Subscribe to receive periodic time events indicating the current NIC
1395  * time
1396  */
1397 #define MC_CMD_PTP_OP_TIME_EVENT_SUBSCRIBE 0x18
1398 /* enum: Unsubscribe to stop receiving time events */
1399 #define MC_CMD_PTP_OP_TIME_EVENT_UNSUBSCRIBE 0x19
1400 /* enum: PPS based manfacturing tests. Requires PPS output to be looped to PPS
1401  * input on the same NIC. Siena PTP adapters only.
1402  */
1403 #define MC_CMD_PTP_OP_MANFTEST_PPS 0x1a
1404 /* enum: Set the PTP sync status. Status is used by firmware to report to event
1405  * subscribers.
1406  */
1407 #define MC_CMD_PTP_OP_SET_SYNC_STATUS 0x1b
1408 /* enum: Above this for future use. */
1409 #define MC_CMD_PTP_OP_MAX 0x1c
1410
1411 /* MC_CMD_PTP_IN_ENABLE msgrequest */
1412 #define MC_CMD_PTP_IN_ENABLE_LEN 16
1413 #define MC_CMD_PTP_IN_CMD_OFST 0
1414 #define MC_CMD_PTP_IN_CMD_LEN 4
1415 #define MC_CMD_PTP_IN_PERIPH_ID_OFST 4
1416 #define MC_CMD_PTP_IN_PERIPH_ID_LEN 4
1417 /* Not used. Events are always sent to function relative queue 0. */
1418 #define MC_CMD_PTP_IN_ENABLE_QUEUE_OFST 8
1419 #define MC_CMD_PTP_IN_ENABLE_QUEUE_LEN 4
1420 /* PTP timestamping mode. Not used from Huntington onwards. */
1421 #define MC_CMD_PTP_IN_ENABLE_MODE_OFST 12
1422 #define MC_CMD_PTP_IN_ENABLE_MODE_LEN 4
1423 /* enum: PTP, version 1 */
1424 #define MC_CMD_PTP_MODE_V1 0x0
1425 /* enum: PTP, version 1, with VLAN headers - deprecated */
1426 #define MC_CMD_PTP_MODE_V1_VLAN 0x1
1427 /* enum: PTP, version 2 */
1428 #define MC_CMD_PTP_MODE_V2 0x2
1429 /* enum: PTP, version 2, with VLAN headers - deprecated */
1430 #define MC_CMD_PTP_MODE_V2_VLAN 0x3
1431 /* enum: PTP, version 2, with improved UUID filtering */
1432 #define MC_CMD_PTP_MODE_V2_ENHANCED 0x4
1433 /* enum: FCoE (seconds and microseconds) */
1434 #define MC_CMD_PTP_MODE_FCOE 0x5
1435
1436 /* MC_CMD_PTP_IN_DISABLE msgrequest */
1437 #define MC_CMD_PTP_IN_DISABLE_LEN 8
1438 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1439 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1440 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1441 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1442
1443 /* MC_CMD_PTP_IN_TRANSMIT msgrequest */
1444 #define MC_CMD_PTP_IN_TRANSMIT_LENMIN 13
1445 #define MC_CMD_PTP_IN_TRANSMIT_LENMAX 252
1446 #define MC_CMD_PTP_IN_TRANSMIT_LEN(num) (12+1*(num))
1447 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1448 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1449 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1450 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1451 /* Transmit packet length */
1452 #define MC_CMD_PTP_IN_TRANSMIT_LENGTH_OFST 8
1453 #define MC_CMD_PTP_IN_TRANSMIT_LENGTH_LEN 4
1454 /* Transmit packet data */
1455 #define MC_CMD_PTP_IN_TRANSMIT_PACKET_OFST 12
1456 #define MC_CMD_PTP_IN_TRANSMIT_PACKET_LEN 1
1457 #define MC_CMD_PTP_IN_TRANSMIT_PACKET_MINNUM 1
1458 #define MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM 240
1459
1460 /* MC_CMD_PTP_IN_READ_NIC_TIME msgrequest */
1461 #define MC_CMD_PTP_IN_READ_NIC_TIME_LEN 8
1462 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1463 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1464 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1465 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1466
1467 /* MC_CMD_PTP_IN_READ_NIC_TIME_V2 msgrequest */
1468 #define MC_CMD_PTP_IN_READ_NIC_TIME_V2_LEN 8
1469 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1470 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1471 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1472 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1473
1474 /* MC_CMD_PTP_IN_STATUS msgrequest */
1475 #define MC_CMD_PTP_IN_STATUS_LEN 8
1476 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1477 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1478 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1479 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1480
1481 /* MC_CMD_PTP_IN_ADJUST msgrequest */
1482 #define MC_CMD_PTP_IN_ADJUST_LEN 24
1483 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1484 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1485 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1486 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1487 /* Frequency adjustment 40 bit fixed point ns */
1488 #define MC_CMD_PTP_IN_ADJUST_FREQ_OFST 8
1489 #define MC_CMD_PTP_IN_ADJUST_FREQ_LEN 8
1490 #define MC_CMD_PTP_IN_ADJUST_FREQ_LO_OFST 8
1491 #define MC_CMD_PTP_IN_ADJUST_FREQ_HI_OFST 12
1492 /* enum: Number of fractional bits in frequency adjustment */
1493 #define MC_CMD_PTP_IN_ADJUST_BITS 0x28
1494 /* enum: Number of fractional bits in frequency adjustment when FP44_FREQ_ADJ
1495  * is indicated in the MC_CMD_PTP_OUT_GET_ATTRIBUTES command CAPABILITIES
1496  * field.
1497  */
1498 #define MC_CMD_PTP_IN_ADJUST_BITS_FP44 0x2c
1499 /* Time adjustment in seconds */
1500 #define MC_CMD_PTP_IN_ADJUST_SECONDS_OFST 16
1501 #define MC_CMD_PTP_IN_ADJUST_SECONDS_LEN 4
1502 /* Time adjustment major value */
1503 #define MC_CMD_PTP_IN_ADJUST_MAJOR_OFST 16
1504 #define MC_CMD_PTP_IN_ADJUST_MAJOR_LEN 4
1505 /* Time adjustment in nanoseconds */
1506 #define MC_CMD_PTP_IN_ADJUST_NANOSECONDS_OFST 20
1507 #define MC_CMD_PTP_IN_ADJUST_NANOSECONDS_LEN 4
1508 /* Time adjustment minor value */
1509 #define MC_CMD_PTP_IN_ADJUST_MINOR_OFST 20
1510 #define MC_CMD_PTP_IN_ADJUST_MINOR_LEN 4
1511
1512 /* MC_CMD_PTP_IN_ADJUST_V2 msgrequest */
1513 #define MC_CMD_PTP_IN_ADJUST_V2_LEN 28
1514 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1515 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1516 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1517 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1518 /* Frequency adjustment 40 bit fixed point ns */
1519 #define MC_CMD_PTP_IN_ADJUST_V2_FREQ_OFST 8
1520 #define MC_CMD_PTP_IN_ADJUST_V2_FREQ_LEN 8
1521 #define MC_CMD_PTP_IN_ADJUST_V2_FREQ_LO_OFST 8
1522 #define MC_CMD_PTP_IN_ADJUST_V2_FREQ_HI_OFST 12
1523 /* enum: Number of fractional bits in frequency adjustment */
1524 /*               MC_CMD_PTP_IN_ADJUST_BITS 0x28 */
1525 /* enum: Number of fractional bits in frequency adjustment when FP44_FREQ_ADJ
1526  * is indicated in the MC_CMD_PTP_OUT_GET_ATTRIBUTES command CAPABILITIES
1527  * field.
1528  */
1529 /*               MC_CMD_PTP_IN_ADJUST_BITS_FP44 0x2c */
1530 /* Time adjustment in seconds */
1531 #define MC_CMD_PTP_IN_ADJUST_V2_SECONDS_OFST 16
1532 #define MC_CMD_PTP_IN_ADJUST_V2_SECONDS_LEN 4
1533 /* Time adjustment major value */
1534 #define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_OFST 16
1535 #define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_LEN 4
1536 /* Time adjustment in nanoseconds */
1537 #define MC_CMD_PTP_IN_ADJUST_V2_NANOSECONDS_OFST 20
1538 #define MC_CMD_PTP_IN_ADJUST_V2_NANOSECONDS_LEN 4
1539 /* Time adjustment minor value */
1540 #define MC_CMD_PTP_IN_ADJUST_V2_MINOR_OFST 20
1541 #define MC_CMD_PTP_IN_ADJUST_V2_MINOR_LEN 4
1542 /* Upper 32bits of major time offset adjustment */
1543 #define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_HI_OFST 24
1544 #define MC_CMD_PTP_IN_ADJUST_V2_MAJOR_HI_LEN 4
1545
1546 /* MC_CMD_PTP_IN_SYNCHRONIZE msgrequest */
1547 #define MC_CMD_PTP_IN_SYNCHRONIZE_LEN 20
1548 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1549 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1550 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1551 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1552 /* Number of time readings to capture */
1553 #define MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_OFST 8
1554 #define MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_LEN 4
1555 /* Host address in which to write "synchronization started" indication (64
1556  * bits)
1557  */
1558 #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_OFST 12
1559 #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LEN 8
1560 #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LO_OFST 12
1561 #define MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_HI_OFST 16
1562
1563 /* MC_CMD_PTP_IN_MANFTEST_BASIC msgrequest */
1564 #define MC_CMD_PTP_IN_MANFTEST_BASIC_LEN 8
1565 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1566 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1567 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1568 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1569
1570 /* MC_CMD_PTP_IN_MANFTEST_PACKET msgrequest */
1571 #define MC_CMD_PTP_IN_MANFTEST_PACKET_LEN 12
1572 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1573 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1574 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1575 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1576 /* Enable or disable packet testing */
1577 #define MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_OFST 8
1578 #define MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_LEN 4
1579
1580 /* MC_CMD_PTP_IN_RESET_STATS msgrequest */
1581 #define MC_CMD_PTP_IN_RESET_STATS_LEN 8
1582 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1583 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1584 /* Reset PTP statistics */
1585 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1586 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1587
1588 /* MC_CMD_PTP_IN_DEBUG msgrequest */
1589 #define MC_CMD_PTP_IN_DEBUG_LEN 12
1590 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1591 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1592 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1593 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1594 /* Debug operations */
1595 #define MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_OFST 8
1596 #define MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_LEN 4
1597
1598 /* MC_CMD_PTP_IN_FPGAREAD msgrequest */
1599 #define MC_CMD_PTP_IN_FPGAREAD_LEN 16
1600 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1601 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1602 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1603 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1604 #define MC_CMD_PTP_IN_FPGAREAD_ADDR_OFST 8
1605 #define MC_CMD_PTP_IN_FPGAREAD_ADDR_LEN 4
1606 #define MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_OFST 12
1607 #define MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_LEN 4
1608
1609 /* MC_CMD_PTP_IN_FPGAWRITE msgrequest */
1610 #define MC_CMD_PTP_IN_FPGAWRITE_LENMIN 13
1611 #define MC_CMD_PTP_IN_FPGAWRITE_LENMAX 252
1612 #define MC_CMD_PTP_IN_FPGAWRITE_LEN(num) (12+1*(num))
1613 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1614 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1615 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1616 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1617 #define MC_CMD_PTP_IN_FPGAWRITE_ADDR_OFST 8
1618 #define MC_CMD_PTP_IN_FPGAWRITE_ADDR_LEN 4
1619 #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_OFST 12
1620 #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_LEN 1
1621 #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MINNUM 1
1622 #define MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MAXNUM 240
1623
1624 /* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST msgrequest */
1625 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_LEN 16
1626 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1627 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1628 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1629 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1630 /* Time adjustment in seconds */
1631 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_OFST 8
1632 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_LEN 4
1633 /* Time adjustment major value */
1634 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_OFST 8
1635 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_LEN 4
1636 /* Time adjustment in nanoseconds */
1637 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_OFST 12
1638 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_LEN 4
1639 /* Time adjustment minor value */
1640 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_OFST 12
1641 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_LEN 4
1642
1643 /* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2 msgrequest */
1644 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_LEN 20
1645 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1646 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1647 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1648 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1649 /* Time adjustment in seconds */
1650 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_SECONDS_OFST 8
1651 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_SECONDS_LEN 4
1652 /* Time adjustment major value */
1653 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_OFST 8
1654 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_LEN 4
1655 /* Time adjustment in nanoseconds */
1656 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_NANOSECONDS_OFST 12
1657 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_NANOSECONDS_LEN 4
1658 /* Time adjustment minor value */
1659 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MINOR_OFST 12
1660 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MINOR_LEN 4
1661 /* Upper 32bits of major time offset adjustment */
1662 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_HI_OFST 16
1663 #define MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_HI_LEN 4
1664
1665 /* MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST msgrequest */
1666 #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_LEN 16
1667 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1668 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1669 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1670 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1671 /* Frequency adjustment 40 bit fixed point ns */
1672 #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_OFST 8
1673 #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LEN 8
1674 #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LO_OFST 8
1675 #define MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_HI_OFST 12
1676 /*            Enum values, see field(s): */
1677 /*               MC_CMD_PTP/MC_CMD_PTP_IN_ADJUST/FREQ */
1678
1679 /* MC_CMD_PTP_IN_RX_SET_VLAN_FILTER msgrequest */
1680 #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_LEN 24
1681 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1682 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1683 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1684 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1685 /* Number of VLAN tags, 0 if not VLAN */
1686 #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_OFST 8
1687 #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_LEN 4
1688 /* Set of VLAN tags to filter against */
1689 #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_OFST 12
1690 #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_LEN 4
1691 #define MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_NUM 3
1692
1693 /* MC_CMD_PTP_IN_RX_SET_UUID_FILTER msgrequest */
1694 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_LEN 20
1695 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1696 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1697 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1698 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1699 /* 1 to enable UUID filtering, 0 to disable */
1700 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_OFST 8
1701 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_LEN 4
1702 /* UUID to filter against */
1703 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_OFST 12
1704 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LEN 8
1705 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LO_OFST 12
1706 #define MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_HI_OFST 16
1707
1708 /* MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER msgrequest */
1709 #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_LEN 16
1710 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1711 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1712 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1713 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1714 /* 1 to enable Domain filtering, 0 to disable */
1715 #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_OFST 8
1716 #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_LEN 4
1717 /* Domain number to filter against */
1718 #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_OFST 12
1719 #define MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_LEN 4
1720
1721 /* MC_CMD_PTP_IN_SET_CLK_SRC msgrequest */
1722 #define MC_CMD_PTP_IN_SET_CLK_SRC_LEN 12
1723 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1724 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1725 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1726 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1727 /* Set the clock source. */
1728 #define MC_CMD_PTP_IN_SET_CLK_SRC_CLK_OFST 8
1729 #define MC_CMD_PTP_IN_SET_CLK_SRC_CLK_LEN 4
1730 /* enum: Internal. */
1731 #define MC_CMD_PTP_CLK_SRC_INTERNAL 0x0
1732 /* enum: External. */
1733 #define MC_CMD_PTP_CLK_SRC_EXTERNAL 0x1
1734
1735 /* MC_CMD_PTP_IN_RST_CLK msgrequest */
1736 #define MC_CMD_PTP_IN_RST_CLK_LEN 8
1737 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1738 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1739 /* Reset value of Timer Reg. */
1740 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1741 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1742
1743 /* MC_CMD_PTP_IN_PPS_ENABLE msgrequest */
1744 #define MC_CMD_PTP_IN_PPS_ENABLE_LEN 12
1745 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1746 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1747 /* Enable or disable */
1748 #define MC_CMD_PTP_IN_PPS_ENABLE_OP_OFST 4
1749 #define MC_CMD_PTP_IN_PPS_ENABLE_OP_LEN 4
1750 /* enum: Enable */
1751 #define MC_CMD_PTP_ENABLE_PPS 0x0
1752 /* enum: Disable */
1753 #define MC_CMD_PTP_DISABLE_PPS 0x1
1754 /* Not used. Events are always sent to function relative queue 0. */
1755 #define MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_OFST 8
1756 #define MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_LEN 4
1757
1758 /* MC_CMD_PTP_IN_GET_TIME_FORMAT msgrequest */
1759 #define MC_CMD_PTP_IN_GET_TIME_FORMAT_LEN 8
1760 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1761 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1762 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1763 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1764
1765 /* MC_CMD_PTP_IN_GET_ATTRIBUTES msgrequest */
1766 #define MC_CMD_PTP_IN_GET_ATTRIBUTES_LEN 8
1767 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1768 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1769 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1770 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1771
1772 /* MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS msgrequest */
1773 #define MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS_LEN 8
1774 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1775 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1776 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1777 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1778
1779 /* MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE msgrequest */
1780 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_LEN 12
1781 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1782 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1783 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1784 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1785 /* Original field containing queue ID. Now extended to include flags. */
1786 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_OFST 8
1787 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_LEN 4
1788 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_LBN 0
1789 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_WIDTH 16
1790 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_LBN 31
1791 #define MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_WIDTH 1
1792
1793 /* MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE msgrequest */
1794 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN 16
1795 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1796 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1797 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1798 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1799 /* Unsubscribe options */
1800 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_OFST 8
1801 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_LEN 4
1802 /* enum: Unsubscribe a single queue */
1803 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_SINGLE 0x0
1804 /* enum: Unsubscribe all queues */
1805 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_ALL 0x1
1806 /* Event queue ID */
1807 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_OFST 12
1808 #define MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_LEN 4
1809
1810 /* MC_CMD_PTP_IN_MANFTEST_PPS msgrequest */
1811 #define MC_CMD_PTP_IN_MANFTEST_PPS_LEN 12
1812 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1813 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1814 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1815 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1816 /* 1 to enable PPS test mode, 0 to disable and return result. */
1817 #define MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_OFST 8
1818 #define MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_LEN 4
1819
1820 /* MC_CMD_PTP_IN_SET_SYNC_STATUS msgrequest */
1821 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_LEN 24
1822 /*            MC_CMD_PTP_IN_CMD_OFST 0 */
1823 /*            MC_CMD_PTP_IN_CMD_LEN 4 */
1824 /*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
1825 /*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
1826 /* NIC - Host System Clock Synchronization status */
1827 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_STATUS_OFST 8
1828 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_STATUS_LEN 4
1829 /* enum: Host System clock and NIC clock are not in sync */
1830 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_NOT_IN_SYNC 0x0
1831 /* enum: Host System clock and NIC clock are synchronized */
1832 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_IN_SYNC 0x1
1833 /* If synchronized, number of seconds until clocks should be considered to be
1834  * no longer in sync.
1835  */
1836 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_TIMEOUT_OFST 12
1837 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_TIMEOUT_LEN 4
1838 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED0_OFST 16
1839 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED0_LEN 4
1840 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED1_OFST 20
1841 #define MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED1_LEN 4
1842
1843 /* MC_CMD_PTP_OUT msgresponse */
1844 #define MC_CMD_PTP_OUT_LEN 0
1845
1846 /* MC_CMD_PTP_OUT_TRANSMIT msgresponse */
1847 #define MC_CMD_PTP_OUT_TRANSMIT_LEN 8
1848 /* Value of seconds timestamp */
1849 #define MC_CMD_PTP_OUT_TRANSMIT_SECONDS_OFST 0
1850 #define MC_CMD_PTP_OUT_TRANSMIT_SECONDS_LEN 4
1851 /* Timestamp major value */
1852 #define MC_CMD_PTP_OUT_TRANSMIT_MAJOR_OFST 0
1853 #define MC_CMD_PTP_OUT_TRANSMIT_MAJOR_LEN 4
1854 /* Value of nanoseconds timestamp */
1855 #define MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_OFST 4
1856 #define MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_LEN 4
1857 /* Timestamp minor value */
1858 #define MC_CMD_PTP_OUT_TRANSMIT_MINOR_OFST 4
1859 #define MC_CMD_PTP_OUT_TRANSMIT_MINOR_LEN 4
1860
1861 /* MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE msgresponse */
1862 #define MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE_LEN 0
1863
1864 /* MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE msgresponse */
1865 #define MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE_LEN 0
1866
1867 /* MC_CMD_PTP_OUT_READ_NIC_TIME msgresponse */
1868 #define MC_CMD_PTP_OUT_READ_NIC_TIME_LEN 8
1869 /* Value of seconds timestamp */
1870 #define MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_OFST 0
1871 #define MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_LEN 4
1872 /* Timestamp major value */
1873 #define MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_OFST 0
1874 #define MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_LEN 4
1875 /* Value of nanoseconds timestamp */
1876 #define MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_OFST 4
1877 #define MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_LEN 4
1878 /* Timestamp minor value */
1879 #define MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_OFST 4
1880 #define MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_LEN 4
1881
1882 /* MC_CMD_PTP_OUT_READ_NIC_TIME_V2 msgresponse */
1883 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_LEN 12
1884 /* Value of seconds timestamp */
1885 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_SECONDS_OFST 0
1886 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_SECONDS_LEN 4
1887 /* Timestamp major value */
1888 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_OFST 0
1889 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_LEN 4
1890 /* Value of nanoseconds timestamp */
1891 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_NANOSECONDS_OFST 4
1892 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_NANOSECONDS_LEN 4
1893 /* Timestamp minor value */
1894 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MINOR_OFST 4
1895 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MINOR_LEN 4
1896 /* Upper 32bits of major timestamp value */
1897 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_HI_OFST 8
1898 #define MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_HI_LEN 4
1899
1900 /* MC_CMD_PTP_OUT_STATUS msgresponse */
1901 #define MC_CMD_PTP_OUT_STATUS_LEN 64
1902 /* Frequency of NIC's hardware clock */
1903 #define MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_OFST 0
1904 #define MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_LEN 4
1905 /* Number of packets transmitted and timestamped */
1906 #define MC_CMD_PTP_OUT_STATUS_STATS_TX_OFST 4
1907 #define MC_CMD_PTP_OUT_STATUS_STATS_TX_LEN 4
1908 /* Number of packets received and timestamped */
1909 #define MC_CMD_PTP_OUT_STATUS_STATS_RX_OFST 8
1910 #define MC_CMD_PTP_OUT_STATUS_STATS_RX_LEN 4
1911 /* Number of packets timestamped by the FPGA */
1912 #define MC_CMD_PTP_OUT_STATUS_STATS_TS_OFST 12
1913 #define MC_CMD_PTP_OUT_STATUS_STATS_TS_LEN 4
1914 /* Number of packets filter matched */
1915 #define MC_CMD_PTP_OUT_STATUS_STATS_FM_OFST 16
1916 #define MC_CMD_PTP_OUT_STATUS_STATS_FM_LEN 4
1917 /* Number of packets not filter matched */
1918 #define MC_CMD_PTP_OUT_STATUS_STATS_NFM_OFST 20
1919 #define MC_CMD_PTP_OUT_STATUS_STATS_NFM_LEN 4
1920 /* Number of PPS overflows (noise on input?) */
1921 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_OFST 24
1922 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_LEN 4
1923 /* Number of PPS bad periods */
1924 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_OFST 28
1925 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_LEN 4
1926 /* Minimum period of PPS pulse in nanoseconds */
1927 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_OFST 32
1928 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_LEN 4
1929 /* Maximum period of PPS pulse in nanoseconds */
1930 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_OFST 36
1931 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_LEN 4
1932 /* Last period of PPS pulse in nanoseconds */
1933 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_OFST 40
1934 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_LEN 4
1935 /* Mean period of PPS pulse in nanoseconds */
1936 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_OFST 44
1937 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_LEN 4
1938 /* Minimum offset of PPS pulse in nanoseconds (signed) */
1939 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_OFST 48
1940 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_LEN 4
1941 /* Maximum offset of PPS pulse in nanoseconds (signed) */
1942 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_OFST 52
1943 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_LEN 4
1944 /* Last offset of PPS pulse in nanoseconds (signed) */
1945 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_OFST 56
1946 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_LEN 4
1947 /* Mean offset of PPS pulse in nanoseconds (signed) */
1948 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_OFST 60
1949 #define MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_LEN 4
1950
1951 /* MC_CMD_PTP_OUT_SYNCHRONIZE msgresponse */
1952 #define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMIN 20
1953 #define MC_CMD_PTP_OUT_SYNCHRONIZE_LENMAX 240
1954 #define MC_CMD_PTP_OUT_SYNCHRONIZE_LEN(num) (0+20*(num))
1955 /* A set of host and NIC times */
1956 #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_OFST 0
1957 #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_LEN 20
1958 #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MINNUM 1
1959 #define MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM 12
1960 /* Host time immediately before NIC's hardware clock read */
1961 #define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_OFST 0
1962 #define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_LEN 4
1963 /* Value of seconds timestamp */
1964 #define MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_OFST 4
1965 #define MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_LEN 4
1966 /* Timestamp major value */
1967 #define MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_OFST 4
1968 #define MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_LEN 4
1969 /* Value of nanoseconds timestamp */
1970 #define MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_OFST 8
1971 #define MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_LEN 4
1972 /* Timestamp minor value */
1973 #define MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_OFST 8
1974 #define MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_LEN 4
1975 /* Host time immediately after NIC's hardware clock read */
1976 #define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_OFST 12
1977 #define MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_LEN 4
1978 /* Number of nanoseconds waited after reading NIC's hardware clock */
1979 #define MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_OFST 16
1980 #define MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_LEN 4
1981
1982 /* MC_CMD_PTP_OUT_MANFTEST_BASIC msgresponse */
1983 #define MC_CMD_PTP_OUT_MANFTEST_BASIC_LEN 8
1984 /* Results of testing */
1985 #define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_OFST 0
1986 #define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_LEN 4
1987 /* enum: Successful test */
1988 #define MC_CMD_PTP_MANF_SUCCESS 0x0
1989 /* enum: FPGA load failed */
1990 #define MC_CMD_PTP_MANF_FPGA_LOAD 0x1
1991 /* enum: FPGA version invalid */
1992 #define MC_CMD_PTP_MANF_FPGA_VERSION 0x2
1993 /* enum: FPGA registers incorrect */
1994 #define MC_CMD_PTP_MANF_FPGA_REGISTERS 0x3
1995 /* enum: Oscillator possibly not working? */
1996 #define MC_CMD_PTP_MANF_OSCILLATOR 0x4
1997 /* enum: Timestamps not increasing */
1998 #define MC_CMD_PTP_MANF_TIMESTAMPS 0x5
1999 /* enum: Mismatched packet count */
2000 #define MC_CMD_PTP_MANF_PACKET_COUNT 0x6
2001 /* enum: Mismatched packet count (Siena filter and FPGA) */
2002 #define MC_CMD_PTP_MANF_FILTER_COUNT 0x7
2003 /* enum: Not enough packets to perform timestamp check */
2004 #define MC_CMD_PTP_MANF_PACKET_ENOUGH 0x8
2005 /* enum: Timestamp trigger GPIO not working */
2006 #define MC_CMD_PTP_MANF_GPIO_TRIGGER 0x9
2007 /* enum: Insufficient PPS events to perform checks */
2008 #define MC_CMD_PTP_MANF_PPS_ENOUGH 0xa
2009 /* enum: PPS time event period not sufficiently close to 1s. */
2010 #define MC_CMD_PTP_MANF_PPS_PERIOD 0xb
2011 /* enum: PPS time event nS reading not sufficiently close to zero. */
2012 #define MC_CMD_PTP_MANF_PPS_NS 0xc
2013 /* enum: PTP peripheral registers incorrect */
2014 #define MC_CMD_PTP_MANF_REGISTERS 0xd
2015 /* enum: Failed to read time from PTP peripheral */
2016 #define MC_CMD_PTP_MANF_CLOCK_READ 0xe
2017 /* Presence of external oscillator */
2018 #define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_OFST 4
2019 #define MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_LEN 4
2020
2021 /* MC_CMD_PTP_OUT_MANFTEST_PACKET msgresponse */
2022 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_LEN 12
2023 /* Results of testing */
2024 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_OFST 0
2025 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_LEN 4
2026 /* Number of packets received by FPGA */
2027 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_OFST 4
2028 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_LEN 4
2029 /* Number of packets received by Siena filters */
2030 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_OFST 8
2031 #define MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_LEN 4
2032
2033 /* MC_CMD_PTP_OUT_FPGAREAD msgresponse */
2034 #define MC_CMD_PTP_OUT_FPGAREAD_LENMIN 1
2035 #define MC_CMD_PTP_OUT_FPGAREAD_LENMAX 252
2036 #define MC_CMD_PTP_OUT_FPGAREAD_LEN(num) (0+1*(num))
2037 #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_OFST 0
2038 #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_LEN 1
2039 #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MINNUM 1
2040 #define MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MAXNUM 252
2041
2042 /* MC_CMD_PTP_OUT_GET_TIME_FORMAT msgresponse */
2043 #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_LEN 4
2044 /* Time format required/used by for this NIC. Applies to all PTP MCDI
2045  * operations that pass times between the host and firmware. If this operation
2046  * is not supported (older firmware) a format of seconds and nanoseconds should
2047  * be assumed. Note this enum is deprecated. Do not add to it- use the
2048  * TIME_FORMAT field in MC_CMD_PTP_OUT_GET_ATTRIBUTES instead.
2049  */
2050 #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_OFST 0
2051 #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_LEN 4
2052 /* enum: Times are in seconds and nanoseconds */
2053 #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_NANOSECONDS 0x0
2054 /* enum: Major register has units of 16 second per tick, minor 8 ns per tick */
2055 #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_16SECONDS_8NANOSECONDS 0x1
2056 /* enum: Major register has units of seconds, minor 2^-27s per tick */
2057 #define MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_27FRACTION 0x2
2058
2059 /* MC_CMD_PTP_OUT_GET_ATTRIBUTES msgresponse */
2060 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_LEN 24
2061 /* Time format required/used by for this NIC. Applies to all PTP MCDI
2062  * operations that pass times between the host and firmware. If this operation
2063  * is not supported (older firmware) a format of seconds and nanoseconds should
2064  * be assumed.
2065  */
2066 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_OFST 0
2067 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_LEN 4
2068 /* enum: Times are in seconds and nanoseconds */
2069 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS 0x0
2070 /* enum: Major register has units of 16 second per tick, minor 8 ns per tick */
2071 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_16SECONDS_8NANOSECONDS 0x1
2072 /* enum: Major register has units of seconds, minor 2^-27s per tick */
2073 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_27FRACTION 0x2
2074 /* enum: Major register units are seconds, minor units are quarter nanoseconds
2075  */
2076 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_QTR_NANOSECONDS 0x3
2077 /* Minimum acceptable value for a corrected synchronization timeset. When
2078  * comparing host and NIC clock times, the MC returns a set of samples that
2079  * contain the host start and end time, the MC time when the host start was
2080  * detected and the time the MC waited between reading the time and detecting
2081  * the host end. The corrected sync window is the difference between the host
2082  * end and start times minus the time that the MC waited for host end.
2083  */
2084 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_OFST 4
2085 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_LEN 4
2086 /* Various PTP capabilities */
2087 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_CAPABILITIES_OFST 8
2088 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_CAPABILITIES_LEN 4
2089 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_LBN 0
2090 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_WIDTH 1
2091 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_LBN 1
2092 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_WIDTH 1
2093 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_LBN 2
2094 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_WIDTH 1
2095 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_LBN 3
2096 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_WIDTH 1
2097 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED0_OFST 12
2098 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED0_LEN 4
2099 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED1_OFST 16
2100 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED1_LEN 4
2101 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED2_OFST 20
2102 #define MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED2_LEN 4
2103
2104 /* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS msgresponse */
2105 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_LEN 16
2106 /* Uncorrected error on PTP transmit timestamps in NIC clock format */
2107 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_OFST 0
2108 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_LEN 4
2109 /* Uncorrected error on PTP receive timestamps in NIC clock format */
2110 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_OFST 4
2111 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_LEN 4
2112 /* Uncorrected error on PPS output in NIC clock format */
2113 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_OFST 8
2114 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_LEN 4
2115 /* Uncorrected error on PPS input in NIC clock format */
2116 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_OFST 12
2117 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_LEN 4
2118
2119 /* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2 msgresponse */
2120 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_LEN 24
2121 /* Uncorrected error on PTP transmit timestamps in NIC clock format */
2122 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_TX_OFST 0
2123 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_TX_LEN 4
2124 /* Uncorrected error on PTP receive timestamps in NIC clock format */
2125 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_RX_OFST 4
2126 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_RX_LEN 4
2127 /* Uncorrected error on PPS output in NIC clock format */
2128 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_OUT_OFST 8
2129 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_OUT_LEN 4
2130 /* Uncorrected error on PPS input in NIC clock format */
2131 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_IN_OFST 12
2132 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_IN_LEN 4
2133 /* Uncorrected error on non-PTP transmit timestamps in NIC clock format */
2134 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_TX_OFST 16
2135 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_TX_LEN 4
2136 /* Uncorrected error on non-PTP receive timestamps in NIC clock format */
2137 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_RX_OFST 20
2138 #define MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_RX_LEN 4
2139
2140 /* MC_CMD_PTP_OUT_MANFTEST_PPS msgresponse */
2141 #define MC_CMD_PTP_OUT_MANFTEST_PPS_LEN 4
2142 /* Results of testing */
2143 #define MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_OFST 0
2144 #define MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_LEN 4
2145 /*            Enum values, see field(s): */
2146 /*               MC_CMD_PTP_OUT_MANFTEST_BASIC/TEST_RESULT */
2147
2148 /* MC_CMD_PTP_OUT_SET_SYNC_STATUS msgresponse */
2149 #define MC_CMD_PTP_OUT_SET_SYNC_STATUS_LEN 0
2150
2151
2152 /***********************************/
2153 /* MC_CMD_CSR_READ32
2154  * Read 32bit words from the indirect memory map.
2155  */
2156 #define MC_CMD_CSR_READ32 0xc
2157 #undef  MC_CMD_0xc_PRIVILEGE_CTG
2158
2159 #define MC_CMD_0xc_PRIVILEGE_CTG SRIOV_CTG_INSECURE
2160
2161 /* MC_CMD_CSR_READ32_IN msgrequest */
2162 #define MC_CMD_CSR_READ32_IN_LEN 12
2163 /* Address */
2164 #define MC_CMD_CSR_READ32_IN_ADDR_OFST 0
2165 #define MC_CMD_CSR_READ32_IN_ADDR_LEN 4
2166 #define MC_CMD_CSR_READ32_IN_STEP_OFST 4
2167 #define MC_CMD_CSR_READ32_IN_STEP_LEN 4
2168 #define MC_CMD_CSR_READ32_IN_NUMWORDS_OFST 8
2169 #define MC_CMD_CSR_READ32_IN_NUMWORDS_LEN 4
2170
2171 /* MC_CMD_CSR_READ32_OUT msgresponse */
2172 #define MC_CMD_CSR_READ32_OUT_LENMIN 4
2173 #define MC_CMD_CSR_READ32_OUT_LENMAX 252
2174 #define MC_CMD_CSR_READ32_OUT_LEN(num) (0+4*(num))
2175 /* The last dword is the status, not a value read */
2176 #define MC_CMD_CSR_READ32_OUT_BUFFER_OFST 0
2177 #define MC_CMD_CSR_READ32_OUT_BUFFER_LEN 4
2178 #define MC_CMD_CSR_READ32_OUT_BUFFER_MINNUM 1
2179 #define MC_CMD_CSR_READ32_OUT_BUFFER_MAXNUM 63
2180
2181
2182 /***********************************/
2183 /* MC_CMD_CSR_WRITE32
2184  * Write 32bit dwords to the indirect memory map.
2185  */
2186 #define MC_CMD_CSR_WRITE32 0xd
2187 #undef  MC_CMD_0xd_PRIVILEGE_CTG
2188
2189 #define MC_CMD_0xd_PRIVILEGE_CTG SRIOV_CTG_INSECURE
2190
2191 /* MC_CMD_CSR_WRITE32_IN msgrequest */
2192 #define MC_CMD_CSR_WRITE32_IN_LENMIN 12
2193 #define MC_CMD_CSR_WRITE32_IN_LENMAX 252
2194 #define MC_CMD_CSR_WRITE32_IN_LEN(num) (8+4*(num))
2195 /* Address */
2196 #define MC_CMD_CSR_WRITE32_IN_ADDR_OFST 0
2197 #define MC_CMD_CSR_WRITE32_IN_ADDR_LEN 4
2198 #define MC_CMD_CSR_WRITE32_IN_STEP_OFST 4
2199 #define MC_CMD_CSR_WRITE32_IN_STEP_LEN 4
2200 #define MC_CMD_CSR_WRITE32_IN_BUFFER_OFST 8
2201 #define MC_CMD_CSR_WRITE32_IN_BUFFER_LEN 4
2202 #define MC_CMD_CSR_WRITE32_IN_BUFFER_MINNUM 1
2203 #define MC_CMD_CSR_WRITE32_IN_BUFFER_MAXNUM 61
2204
2205 /* MC_CMD_CSR_WRITE32_OUT msgresponse */
2206 #define MC_CMD_CSR_WRITE32_OUT_LEN 4
2207 #define MC_CMD_CSR_WRITE32_OUT_STATUS_OFST 0
2208 #define MC_CMD_CSR_WRITE32_OUT_STATUS_LEN 4
2209
2210
2211 /***********************************/
2212 /* MC_CMD_HP
2213  * These commands are used for HP related features. They are grouped under one
2214  * MCDI command to avoid creating too many MCDI commands.
2215  */
2216 #define MC_CMD_HP 0x54
2217 #undef  MC_CMD_0x54_PRIVILEGE_CTG
2218
2219 #define MC_CMD_0x54_PRIVILEGE_CTG SRIOV_CTG_ADMIN
2220
2221 /* MC_CMD_HP_IN msgrequest */
2222 #define MC_CMD_HP_IN_LEN 16
2223 /* HP OCSD sub-command. When address is not NULL, request activation of OCSD at
2224  * the specified address with the specified interval.When address is NULL,
2225  * INTERVAL is interpreted as a command: 0: stop OCSD / 1: Report OCSD current
2226  * state / 2: (debug) Show temperature reported by one of the supported
2227  * sensors.
2228  */
2229 #define MC_CMD_HP_IN_SUBCMD_OFST 0
2230 #define MC_CMD_HP_IN_SUBCMD_LEN 4
2231 /* enum: OCSD (Option Card Sensor Data) sub-command. */
2232 #define MC_CMD_HP_IN_OCSD_SUBCMD 0x0
2233 /* enum: Last known valid HP sub-command. */
2234 #define MC_CMD_HP_IN_LAST_SUBCMD 0x0
2235 /* The address to the array of sensor fields. (Or NULL to use a sub-command.)
2236  */
2237 #define MC_CMD_HP_IN_OCSD_ADDR_OFST 4
2238 #define MC_CMD_HP_IN_OCSD_ADDR_LEN 8
2239 #define MC_CMD_HP_IN_OCSD_ADDR_LO_OFST 4
2240 #define MC_CMD_HP_IN_OCSD_ADDR_HI_OFST 8
2241 /* The requested update interval, in seconds. (Or the sub-command if ADDR is
2242  * NULL.)
2243  */
2244 #define MC_CMD_HP_IN_OCSD_INTERVAL_OFST 12
2245 #define MC_CMD_HP_IN_OCSD_INTERVAL_LEN 4
2246
2247 /* MC_CMD_HP_OUT msgresponse */
2248 #define MC_CMD_HP_OUT_LEN 4
2249 #define MC_CMD_HP_OUT_OCSD_STATUS_OFST 0
2250 #define MC_CMD_HP_OUT_OCSD_STATUS_LEN 4
2251 /* enum: OCSD stopped for this card. */
2252 #define MC_CMD_HP_OUT_OCSD_STOPPED 0x1
2253 /* enum: OCSD was successfully started with the address provided. */
2254 #define MC_CMD_HP_OUT_OCSD_STARTED 0x2
2255 /* enum: OCSD was already started for this card. */
2256 #define MC_CMD_HP_OUT_OCSD_ALREADY_STARTED 0x3
2257
2258
2259 /***********************************/
2260 /* MC_CMD_STACKINFO
2261  * Get stack information.
2262  */
2263 #define MC_CMD_STACKINFO 0xf
2264 #undef  MC_CMD_0xf_PRIVILEGE_CTG
2265
2266 #define MC_CMD_0xf_PRIVILEGE_CTG SRIOV_CTG_ADMIN
2267
2268 /* MC_CMD_STACKINFO_IN msgrequest */
2269 #define MC_CMD_STACKINFO_IN_LEN 0
2270
2271 /* MC_CMD_STACKINFO_OUT msgresponse */
2272 #define MC_CMD_STACKINFO_OUT_LENMIN 12
2273 #define MC_CMD_STACKINFO_OUT_LENMAX 252
2274 #define MC_CMD_STACKINFO_OUT_LEN(num) (0+12*(num))
2275 /* (thread ptr, stack size, free space) for each thread in system */
2276 #define MC_CMD_STACKINFO_OUT_THREAD_INFO_OFST 0
2277 #define MC_CMD_STACKINFO_OUT_THREAD_INFO_LEN 12
2278 #define MC_CMD_STACKINFO_OUT_THREAD_INFO_MINNUM 1
2279 #define MC_CMD_STACKINFO_OUT_THREAD_INFO_MAXNUM 21
2280
2281
2282 /***********************************/
2283 /* MC_CMD_MDIO_READ
2284  * MDIO register read.
2285  */
2286 #define MC_CMD_MDIO_READ 0x10
2287 #undef  MC_CMD_0x10_PRIVILEGE_CTG
2288
2289 #define MC_CMD_0x10_PRIVILEGE_CTG SRIOV_CTG_GENERAL
2290
2291 /* MC_CMD_MDIO_READ_IN msgrequest */
2292 #define MC_CMD_MDIO_READ_IN_LEN 16
2293 /* Bus number; there are two MDIO buses: one for the internal PHY, and one for
2294  * external devices.
2295  */
2296 #define MC_CMD_MDIO_READ_IN_BUS_OFST 0
2297 #define MC_CMD_MDIO_READ_IN_BUS_LEN 4
2298 /* enum: Internal. */
2299 #define MC_CMD_MDIO_BUS_INTERNAL 0x0
2300 /* enum: External. */
2301 #define MC_CMD_MDIO_BUS_EXTERNAL 0x1
2302 /* Port address */
2303 #define MC_CMD_MDIO_READ_IN_PRTAD_OFST 4
2304 #define MC_CMD_MDIO_READ_IN_PRTAD_LEN 4
2305 /* Device Address or clause 22. */
2306 #define MC_CMD_MDIO_READ_IN_DEVAD_OFST 8
2307 #define MC_CMD_MDIO_READ_IN_DEVAD_LEN 4
2308 /* enum: By default all the MCDI MDIO operations perform clause45 mode. If you
2309  * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22.
2310  */
2311 #define MC_CMD_MDIO_CLAUSE22 0x20
2312 /* Address */
2313 #define MC_CMD_MDIO_READ_IN_ADDR_OFST 12
2314 #define MC_CMD_MDIO_READ_IN_ADDR_LEN 4
2315
2316 /* MC_CMD_MDIO_READ_OUT msgresponse */
2317 #define MC_CMD_MDIO_READ_OUT_LEN 8
2318 /* Value */
2319 #define MC_CMD_MDIO_READ_OUT_VALUE_OFST 0
2320 #define MC_CMD_MDIO_READ_OUT_VALUE_LEN 4
2321 /* Status the MDIO commands return the raw status bits from the MDIO block. A
2322  * "good" transaction should have the DONE bit set and all other bits clear.
2323  */
2324 #define MC_CMD_MDIO_READ_OUT_STATUS_OFST 4
2325 #define MC_CMD_MDIO_READ_OUT_STATUS_LEN 4
2326 /* enum: Good. */
2327 #define MC_CMD_MDIO_STATUS_GOOD 0x8
2328
2329
2330 /***********************************/
2331 /* MC_CMD_MDIO_WRITE
2332  * MDIO register write.
2333  */
2334 #define MC_CMD_MDIO_WRITE 0x11
2335 #undef  MC_CMD_0x11_PRIVILEGE_CTG
2336
2337 #define MC_CMD_0x11_PRIVILEGE_CTG SRIOV_CTG_ADMIN
2338
2339 /* MC_CMD_MDIO_WRITE_IN msgrequest */
2340 #define MC_CMD_MDIO_WRITE_IN_LEN 20
2341 /* Bus number; there are two MDIO buses: one for the internal PHY, and one for
2342  * external devices.
2343  */
2344 #define MC_CMD_MDIO_WRITE_IN_BUS_OFST 0
2345 #define MC_CMD_MDIO_WRITE_IN_BUS_LEN 4
2346 /* enum: Internal. */
2347 /*               MC_CMD_MDIO_BUS_INTERNAL 0x0 */
2348 /* enum: External. */
2349 /*               MC_CMD_MDIO_BUS_EXTERNAL 0x1 */
2350 /* Port address */
2351 #define MC_CMD_MDIO_WRITE_IN_PRTAD_OFST 4
2352 #define MC_CMD_MDIO_WRITE_IN_PRTAD_LEN 4
2353 /* Device Address or clause 22. */
2354 #define MC_CMD_MDIO_WRITE_IN_DEVAD_OFST 8
2355 #define MC_CMD_MDIO_WRITE_IN_DEVAD_LEN 4
2356 /* enum: By default all the MCDI MDIO operations perform clause45 mode. If you
2357  * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22.
2358  */
2359 /*               MC_CMD_MDIO_CLAUSE22 0x20 */
2360 /* Address */
2361 #define MC_CMD_MDIO_WRITE_IN_ADDR_OFST 12
2362 #define MC_CMD_MDIO_WRITE_IN_ADDR_LEN 4
2363 /* Value */
2364 #define MC_CMD_MDIO_WRITE_IN_VALUE_OFST 16
2365 #define MC_CMD_MDIO_WRITE_IN_VALUE_LEN 4
2366
2367 /* MC_CMD_MDIO_WRITE_OUT msgresponse */
2368 #define MC_CMD_MDIO_WRITE_OUT_LEN 4
2369 /* Status; the MDIO commands return the raw status bits from the MDIO block. A
2370  * "good" transaction should have the DONE bit set and all other bits clear.
2371  */
2372 #define MC_CMD_MDIO_WRITE_OUT_STATUS_OFST 0
2373 #define MC_CMD_MDIO_WRITE_OUT_STATUS_LEN 4
2374 /* enum: Good. */
2375 /*               MC_CMD_MDIO_STATUS_GOOD 0x8 */
2376
2377
2378 /***********************************/
2379 /* MC_CMD_DBI_WRITE
2380  * Write DBI register(s).
2381  */
2382 #define MC_CMD_DBI_WRITE 0x12
2383 #undef  MC_CMD_0x12_PRIVILEGE_CTG
2384
2385 #define MC_CMD_0x12_PRIVILEGE_CTG SRIOV_CTG_INSECURE
2386
2387 /* MC_CMD_DBI_WRITE_IN msgrequest */
2388 #define MC_CMD_DBI_WRITE_IN_LENMIN 12
2389 #define MC_CMD_DBI_WRITE_IN_LENMAX 252
2390 #define MC_CMD_DBI_WRITE_IN_LEN(num) (0+12*(num))
2391 /* Each write op consists of an address (offset 0), byte enable/VF/CS2 (offset
2392  * 32) and value (offset 64). See MC_CMD_DBIWROP_TYPEDEF.
2393  */
2394 #define MC_CMD_DBI_WRITE_IN_DBIWROP_OFST 0
2395 #define MC_CMD_DBI_WRITE_IN_DBIWROP_LEN 12
2396 #define MC_CMD_DBI_WRITE_IN_DBIWROP_MINNUM 1
2397 #define MC_CMD_DBI_WRITE_IN_DBIWROP_MAXNUM 21
2398
2399 /* MC_CMD_DBI_WRITE_OUT msgresponse */
2400 #define MC_CMD_DBI_WRITE_OUT_LEN 0
2401
2402 /* MC_CMD_DBIWROP_TYPEDEF structuredef */
2403 #define MC_CMD_DBIWROP_TYPEDEF_LEN 12
2404 #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST 0
2405 #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LEN 4
2406 #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LBN 0
2407 #define MC_CMD_DBIWROP_TYPEDEF_ADDRESS_WIDTH 32
2408 #define MC_CMD_DBIWROP_TYPEDEF_PARMS_OFST 4
2409 #define MC_CMD_DBIWROP_TYPEDEF_PARMS_LEN 4
2410 #define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_LBN 16
2411 #define MC_CMD_DBIWROP_TYPEDEF_VF_NUM_WIDTH 16
2412 #define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_LBN 15
2413 #define MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_WIDTH 1
2414 #define MC_CMD_DBIWROP_TYPEDEF_CS2_LBN 14
2415 #define MC_CMD_DBIWROP_TYPEDEF_CS2_WIDTH 1
2416 #define MC_CMD_DBIWROP_TYPEDEF_PARMS_LBN 32
2417 #define MC_CMD_DBIWROP_TYPEDEF_PARMS_WIDTH 32
2418 #define MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST 8
2419 #define MC_CMD_DBIWROP_TYPEDEF_VALUE_LEN 4
2420 #define MC_CMD_DBIWROP_TYPEDEF_VALUE_LBN 64
2421 #define MC_CMD_DBIWROP_TYPEDEF_VALUE_WIDTH 32
2422
2423
2424 /***********************************/
2425 /* MC_CMD_PORT_READ32
2426  * Read a 32-bit register from the indirect port register map. The port to
2427  * access is implied by the Shared memory channel used.
2428  */
2429 #define MC_CMD_PORT_READ32 0x14
2430
2431 /* MC_CMD_PORT_READ32_IN msgrequest */
2432 #define MC_CMD_PORT_READ32_IN_LEN 4
2433 /* Address */
2434 #define MC_CMD_PORT_READ32_IN_ADDR_OFST 0
2435 #define MC_CMD_PORT_READ32_IN_ADDR_LEN 4
2436
2437 /* MC_CMD_PORT_READ32_OUT msgresponse */
2438 #define MC_CMD_PORT_READ32_OUT_LEN 8
2439 /* Value */
2440 #define MC_CMD_PORT_READ32_OUT_VALUE_OFST 0
2441 #define MC_CMD_PORT_READ32_OUT_VALUE_LEN 4
2442 /* Status */
2443 #define MC_CMD_PORT_READ32_OUT_STATUS_OFST 4
2444 #define MC_CMD_PORT_READ32_OUT_STATUS_LEN 4
2445
2446
2447 /***********************************/
2448 /* MC_CMD_PORT_WRITE32
2449  * Write a 32-bit register to the indirect port register map. The port to
2450  * access is implied by the Shared memory channel used.
2451  */
2452 #define MC_CMD_PORT_WRITE32 0x15
2453
2454 /* MC_CMD_PORT_WRITE32_IN msgrequest */
2455 #define MC_CMD_PORT_WRITE32_IN_LEN 8
2456 /* Address */
2457 #define MC_CMD_PORT_WRITE32_IN_ADDR_OFST 0
2458 #define MC_CMD_PORT_WRITE32_IN_ADDR_LEN 4
2459 /* Value */
2460 #define MC_CMD_PORT_WRITE32_IN_VALUE_OFST 4
2461 #define MC_CMD_PORT_WRITE32_IN_VALUE_LEN 4
2462
2463 /* MC_CMD_PORT_WRITE32_OUT msgresponse */
2464 #define MC_CMD_PORT_WRITE32_OUT_LEN 4
2465 /* Status */
2466 #define MC_CMD_PORT_WRITE32_OUT_STATUS_OFST 0
2467 #define MC_CMD_PORT_WRITE32_OUT_STATUS_LEN 4
2468
2469
2470 /***********************************/
2471 /* MC_CMD_PORT_READ128
2472  * Read a 128-bit register from the indirect port register map. The port to
2473  * access is implied by the Shared memory channel used.
2474  */
2475 #define MC_CMD_PORT_READ128 0x16
2476
2477 /* MC_CMD_PORT_READ128_IN msgrequest */
2478 #define MC_CMD_PORT_READ128_IN_LEN 4
2479 /* Address */
2480 #define MC_CMD_PORT_READ128_IN_ADDR_OFST 0
2481 #define MC_CMD_PORT_READ128_IN_ADDR_LEN 4
2482
2483 /* MC_CMD_PORT_READ128_OUT msgresponse */
2484 #define MC_CMD_PORT_READ128_OUT_LEN 20
2485 /* Value */
2486 #define MC_CMD_PORT_READ128_OUT_VALUE_OFST 0
2487 #define MC_CMD_PORT_READ128_OUT_VALUE_LEN 16
2488 /* Status */
2489 #define MC_CMD_PORT_READ128_OUT_STATUS_OFST 16
2490 #define MC_CMD_PORT_READ128_OUT_STATUS_LEN 4
2491
2492
2493 /***********************************/
2494 /* MC_CMD_PORT_WRITE128
2495  * Write a 128-bit register to the indirect port register map. The port to
2496  * access is implied by the Shared memory channel used.
2497  */
2498 #define MC_CMD_PORT_WRITE128 0x17
2499
2500 /* MC_CMD_PORT_WRITE128_IN msgrequest */
2501 #define MC_CMD_PORT_WRITE128_IN_LEN 20
2502 /* Address */
2503 #define MC_CMD_PORT_WRITE128_IN_ADDR_OFST 0
2504 #define MC_CMD_PORT_WRITE128_IN_ADDR_LEN 4
2505 /* Value */
2506 #define MC_CMD_PORT_WRITE128_IN_VALUE_OFST 4
2507 #define MC_CMD_PORT_WRITE128_IN_VALUE_LEN 16
2508
2509 /* MC_CMD_PORT_WRITE128_OUT msgresponse */
2510 #define MC_CMD_PORT_WRITE128_OUT_LEN 4
2511 /* Status */
2512 #define MC_CMD_PORT_WRITE128_OUT_STATUS_OFST 0
2513 #define MC_CMD_PORT_WRITE128_OUT_STATUS_LEN 4
2514
2515 /* MC_CMD_CAPABILITIES structuredef */
2516 #define MC_CMD_CAPABILITIES_LEN 4
2517 /* Small buf table. */
2518 #define MC_CMD_CAPABILITIES_SMALL_BUF_TBL_LBN 0
2519 #define MC_CMD_CAPABILITIES_SMALL_BUF_TBL_WIDTH 1
2520 /* Turbo mode (for Maranello). */
2521 #define MC_CMD_CAPABILITIES_TURBO_LBN 1
2522 #define MC_CMD_CAPABILITIES_TURBO_WIDTH 1
2523 /* Turbo mode active (for Maranello). */
2524 #define MC_CMD_CAPABILITIES_TURBO_ACTIVE_LBN 2
2525 #define MC_CMD_CAPABILITIES_TURBO_ACTIVE_WIDTH 1
2526 /* PTP offload. */
2527 #define MC_CMD_CAPABILITIES_PTP_LBN 3
2528 #define MC_CMD_CAPABILITIES_PTP_WIDTH 1
2529 /* AOE mode. */
2530 #define MC_CMD_CAPABILITIES_AOE_LBN 4
2531 #define MC_CMD_CAPABILITIES_AOE_WIDTH 1
2532 /* AOE mode active. */
2533 #define MC_CMD_CAPABILITIES_AOE_ACTIVE_LBN 5
2534 #define MC_CMD_CAPABILITIES_AOE_ACTIVE_WIDTH 1
2535 /* AOE mode active. */
2536 #define MC_CMD_CAPABILITIES_FC_ACTIVE_LBN 6
2537 #define MC_CMD_CAPABILITIES_FC_ACTIVE_WIDTH 1
2538 #define MC_CMD_CAPABILITIES_RESERVED_LBN 7
2539 #define MC_CMD_CAPABILITIES_RESERVED_WIDTH 25
2540
2541
2542 /***********************************/
2543 /* MC_CMD_GET_BOARD_CFG
2544  * Returns the MC firmware configuration structure.
2545  */
2546 #define MC_CMD_GET_BOARD_CFG 0x18
2547 #undef  MC_CMD_0x18_PRIVILEGE_CTG
2548
2549 #define MC_CMD_0x18_PRIVILEGE_CTG SRIOV_CTG_GENERAL
2550
2551 /* MC_CMD_GET_BOARD_CFG_IN msgrequest */
2552 #define MC_CMD_GET_BOARD_CFG_IN_LEN 0
2553
2554 /* MC_CMD_GET_BOARD_CFG_OUT msgresponse */
2555 #define MC_CMD_GET_BOARD_CFG_OUT_LENMIN 96
2556 #define MC_CMD_GET_BOARD_CFG_OUT_LENMAX 136
2557 #define MC_CMD_GET_BOARD_CFG_OUT_LEN(num) (72+2*(num))
2558 #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_OFST 0
2559 #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_LEN 4
2560 #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_OFST 4
2561 #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_LEN 32
2562 /* See MC_CMD_CAPABILITIES */
2563 #define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_OFST 36
2564 #define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_LEN 4
2565 /* See MC_CMD_CAPABILITIES */
2566 #define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_OFST 40
2567 #define MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_LEN 4
2568 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST 44
2569 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_LEN 6
2570 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_OFST 50
2571 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_LEN 6
2572 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_OFST 56
2573 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_LEN 4
2574 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_OFST 60
2575 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_LEN 4
2576 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_OFST 64
2577 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_LEN 4
2578 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_OFST 68
2579 #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_LEN 4
2580 /* This field contains a 16-bit value for each of the types of NVRAM area. The
2581  * values are defined in the firmware/mc/platform/.c file for a specific board
2582  * type, but otherwise have no meaning to the MC; they are used by the driver
2583  * to manage selection of appropriate firmware updates.
2584  */
2585 #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST 72
2586 #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN 2
2587 #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM 12
2588 #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM 32
2589
2590
2591 /***********************************/
2592 /* MC_CMD_DBI_READX
2593  * Read DBI register(s) -- extended functionality
2594  */
2595 #define MC_CMD_DBI_READX 0x19
2596 #undef  MC_CMD_0x19_PRIVILEGE_CTG
2597
2598 #define MC_CMD_0x19_PRIVILEGE_CTG SRIOV_CTG_INSECURE
2599
2600 /* MC_CMD_DBI_READX_IN msgrequest */
2601 #define MC_CMD_DBI_READX_IN_LENMIN 8
2602 #define MC_CMD_DBI_READX_IN_LENMAX 248
2603 #define MC_CMD_DBI_READX_IN_LEN(num) (0+8*(num))
2604 /* Each Read op consists of an address (offset 0), VF/CS2) */
2605 #define MC_CMD_DBI_READX_IN_DBIRDOP_OFST 0
2606 #define MC_CMD_DBI_READX_IN_DBIRDOP_LEN 8
2607 #define MC_CMD_DBI_READX_IN_DBIRDOP_LO_OFST 0
2608 #define MC_CMD_DBI_READX_IN_DBIRDOP_HI_OFST 4
2609 #define MC_CMD_DBI_READX_IN_DBIRDOP_MINNUM 1
2610 #define MC_CMD_DBI_READX_IN_DBIRDOP_MAXNUM 31
2611
2612 /* MC_CMD_DBI_READX_OUT msgresponse */
2613 #define MC_CMD_DBI_READX_OUT_LENMIN 4
2614 #define MC_CMD_DBI_READX_OUT_LENMAX 252
2615 #define MC_CMD_DBI_READX_OUT_LEN(num) (0+4*(num))
2616 /* Value */
2617 #define MC_CMD_DBI_READX_OUT_VALUE_OFST 0
2618 #define MC_CMD_DBI_READX_OUT_VALUE_LEN 4
2619 #define MC_CMD_DBI_READX_OUT_VALUE_MINNUM 1
2620 #define MC_CMD_DBI_READX_OUT_VALUE_MAXNUM 63
2621
2622 /* MC_CMD_DBIRDOP_TYPEDEF structuredef */
2623 #define MC_CMD_DBIRDOP_TYPEDEF_LEN 8
2624 #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_OFST 0
2625 #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LEN 4
2626 #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LBN 0
2627 #define MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_WIDTH 32
2628 #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_OFST 4
2629 #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_LEN 4
2630 #define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_LBN 16
2631 #define MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_WIDTH 16
2632 #define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_LBN 15
2633 #define MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_WIDTH 1
2634 #define MC_CMD_DBIRDOP_TYPEDEF_CS2_LBN 14
2635 #define MC_CMD_DBIRDOP_TYPEDEF_CS2_WIDTH 1
2636 #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_LBN 32
2637 #define MC_CMD_DBIRDOP_TYPEDEF_PARMS_WIDTH 32
2638
2639
2640 /***********************************/
2641 /* MC_CMD_SET_RAND_SEED
2642  * Set the 16byte seed for the MC pseudo-random generator.
2643  */
2644 #define MC_CMD_SET_RAND_SEED 0x1a
2645 #undef  MC_CMD_0x1a_PRIVILEGE_CTG
2646
2647 #define MC_CMD_0x1a_PRIVILEGE_CTG SRIOV_CTG_INSECURE
2648
2649 /* MC_CMD_SET_RAND_SEED_IN msgrequest */
2650 #define MC_CMD_SET_RAND_SEED_IN_LEN 16
2651 /* Seed value. */
2652 #define MC_CMD_SET_RAND_SEED_IN_SEED_OFST 0
2653 #define MC_CMD_SET_RAND_SEED_IN_SEED_LEN 16
2654
2655 /* MC_CMD_SET_RAND_SEED_OUT msgresponse */
2656 #define MC_CMD_SET_RAND_SEED_OUT_LEN 0
2657
2658
2659 /***********************************/
2660 /* MC_CMD_LTSSM_HIST
2661  * Retrieve the history of the LTSSM, if the build supports it.
2662  */
2663 #define MC_CMD_LTSSM_HIST 0x1b
2664
2665 /* MC_CMD_LTSSM_HIST_IN msgrequest */
2666 #define MC_CMD_LTSSM_HIST_IN_LEN 0
2667
2668 /* MC_CMD_LTSSM_HIST_OUT msgresponse */
2669 #define MC_CMD_LTSSM_HIST_OUT_LENMIN 0
2670 #define MC_CMD_LTSSM_HIST_OUT_LENMAX 252
2671 #define MC_CMD_LTSSM_HIST_OUT_LEN(num) (0+4*(num))
2672 /* variable number of LTSSM values, as bytes. The history is read-to-clear. */
2673 #define MC_CMD_LTSSM_HIST_OUT_DATA_OFST 0
2674 #define MC_CMD_LTSSM_HIST_OUT_DATA_LEN 4
2675 #define MC_CMD_LTSSM_HIST_OUT_DATA_MINNUM 0
2676 #define MC_CMD_LTSSM_HIST_OUT_DATA_MAXNUM 63
2677
2678
2679 /***********************************/
2680 /* MC_CMD_DRV_ATTACH
2681  * Inform MCPU that this port is managed on the host (i.e. driver active). For
2682  * Huntington, also request the preferred datapath firmware to use if possible
2683  * (it may not be possible for this request to be fulfilled; the driver must
2684  * issue a subsequent MC_CMD_GET_CAPABILITIES command to determine which
2685  * features are actually available). The FIRMWARE_ID field is ignored by older
2686  * platforms.
2687  */
2688 #define MC_CMD_DRV_ATTACH 0x1c
2689 #undef  MC_CMD_0x1c_PRIVILEGE_CTG
2690
2691 #define MC_CMD_0x1c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
2692
2693 /* MC_CMD_DRV_ATTACH_IN msgrequest */
2694 #define MC_CMD_DRV_ATTACH_IN_LEN 12
2695 /* new state to set if UPDATE=1 */
2696 #define MC_CMD_DRV_ATTACH_IN_NEW_STATE_OFST 0
2697 #define MC_CMD_DRV_ATTACH_IN_NEW_STATE_LEN 4
2698 #define MC_CMD_DRV_ATTACH_LBN 0
2699 #define MC_CMD_DRV_ATTACH_WIDTH 1
2700 #define MC_CMD_DRV_PREBOOT_LBN 1
2701 #define MC_CMD_DRV_PREBOOT_WIDTH 1
2702 /* 1 to set new state, or 0 to just report the existing state */
2703 #define MC_CMD_DRV_ATTACH_IN_UPDATE_OFST 4
2704 #define MC_CMD_DRV_ATTACH_IN_UPDATE_LEN 4
2705 /* preferred datapath firmware (for Huntington; ignored for Siena) */
2706 #define MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_OFST 8
2707 #define MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_LEN 4
2708 /* enum: Prefer to use full featured firmware */
2709 #define MC_CMD_FW_FULL_FEATURED 0x0
2710 /* enum: Prefer to use firmware with fewer features but lower latency */
2711 #define MC_CMD_FW_LOW_LATENCY 0x1
2712 /* enum: Prefer to use firmware for SolarCapture packed stream mode */
2713 #define MC_CMD_FW_PACKED_STREAM 0x2
2714 /* enum: Prefer to use firmware with fewer features and simpler TX event
2715  * batching but higher TX packet rate
2716  */
2717 #define MC_CMD_FW_HIGH_TX_RATE 0x3
2718 /* enum: Reserved value */
2719 #define MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 0x4
2720 /* enum: Prefer to use firmware with additional "rules engine" filtering
2721  * support
2722  */
2723 #define MC_CMD_FW_RULES_ENGINE 0x5
2724 /* enum: Only this option is allowed for non-admin functions */
2725 #define MC_CMD_FW_DONT_CARE  0xffffffff
2726
2727 /* MC_CMD_DRV_ATTACH_OUT msgresponse */
2728 #define MC_CMD_DRV_ATTACH_OUT_LEN 4
2729 /* previous or existing state, see the bitmask at NEW_STATE */
2730 #define MC_CMD_DRV_ATTACH_OUT_OLD_STATE_OFST 0
2731 #define MC_CMD_DRV_ATTACH_OUT_OLD_STATE_LEN 4
2732
2733 /* MC_CMD_DRV_ATTACH_EXT_OUT msgresponse */
2734 #define MC_CMD_DRV_ATTACH_EXT_OUT_LEN 8
2735 /* previous or existing state, see the bitmask at NEW_STATE */
2736 #define MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_OFST 0
2737 #define MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_LEN 4
2738 /* Flags associated with this function */
2739 #define MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_OFST 4
2740 #define MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_LEN 4
2741 /* enum: Labels the lowest-numbered function visible to the OS */
2742 #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY 0x0
2743 /* enum: The function can control the link state of the physical port it is
2744  * bound to.
2745  */
2746 #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL 0x1
2747 /* enum: The function can perform privileged operations */
2748 #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED 0x2
2749 /* enum: The function does not have an active port associated with it. The port
2750  * refers to the Sorrento external FPGA port.
2751  */
2752 #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_NO_ACTIVE_PORT 0x3
2753
2754
2755 /***********************************/
2756 /* MC_CMD_SHMUART
2757  * Route UART output to circular buffer in shared memory instead.
2758  */
2759 #define MC_CMD_SHMUART 0x1f
2760
2761 /* MC_CMD_SHMUART_IN msgrequest */
2762 #define MC_CMD_SHMUART_IN_LEN 4
2763 /* ??? */
2764 #define MC_CMD_SHMUART_IN_FLAG_OFST 0
2765 #define MC_CMD_SHMUART_IN_FLAG_LEN 4
2766
2767 /* MC_CMD_SHMUART_OUT msgresponse */
2768 #define MC_CMD_SHMUART_OUT_LEN 0
2769
2770
2771 /***********************************/
2772 /* MC_CMD_PORT_RESET
2773  * Generic per-port reset. There is no equivalent for per-board reset. Locks
2774  * required: None; Return code: 0, ETIME. NOTE: This command is deprecated -
2775  * use MC_CMD_ENTITY_RESET instead.
2776  */
2777 #define MC_CMD_PORT_RESET 0x20
2778 #undef  MC_CMD_0x20_PRIVILEGE_CTG
2779
2780 #define MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL
2781
2782 /* MC_CMD_PORT_RESET_IN msgrequest */
2783 #define MC_CMD_PORT_RESET_IN_LEN 0
2784
2785 /* MC_CMD_PORT_RESET_OUT msgresponse */
2786 #define MC_CMD_PORT_RESET_OUT_LEN 0
2787
2788
2789 /***********************************/
2790 /* MC_CMD_ENTITY_RESET
2791  * Generic per-resource reset. There is no equivalent for per-board reset.
2792  * Locks required: None; Return code: 0, ETIME. NOTE: This command is an
2793  * extended version of the deprecated MC_CMD_PORT_RESET with added fields.
2794  */
2795 #define MC_CMD_ENTITY_RESET 0x20
2796 /*      MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL */
2797
2798 /* MC_CMD_ENTITY_RESET_IN msgrequest */
2799 #define MC_CMD_ENTITY_RESET_IN_LEN 4
2800 /* Optional flags field. Omitting this will perform a "legacy" reset action
2801  * (TBD).
2802  */
2803 #define MC_CMD_ENTITY_RESET_IN_FLAG_OFST 0
2804 #define MC_CMD_ENTITY_RESET_IN_FLAG_LEN 4
2805 #define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_LBN 0
2806 #define MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_WIDTH 1
2807
2808 /* MC_CMD_ENTITY_RESET_OUT msgresponse */
2809 #define MC_CMD_ENTITY_RESET_OUT_LEN 0
2810
2811
2812 /***********************************/
2813 /* MC_CMD_PCIE_CREDITS
2814  * Read instantaneous and minimum flow control thresholds.
2815  */
2816 #define MC_CMD_PCIE_CREDITS 0x21
2817
2818 /* MC_CMD_PCIE_CREDITS_IN msgrequest */
2819 #define MC_CMD_PCIE_CREDITS_IN_LEN 8
2820 /* poll period. 0 is disabled */
2821 #define MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_OFST 0
2822 #define MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_LEN 4
2823 /* wipe statistics */
2824 #define MC_CMD_PCIE_CREDITS_IN_WIPE_OFST 4
2825 #define MC_CMD_PCIE_CREDITS_IN_WIPE_LEN 4
2826
2827 /* MC_CMD_PCIE_CREDITS_OUT msgresponse */
2828 #define MC_CMD_PCIE_CREDITS_OUT_LEN 16
2829 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_OFST 0
2830 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_LEN 2
2831 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_OFST 2
2832 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_LEN 2
2833 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_OFST 4
2834 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_LEN 2
2835 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_OFST 6
2836 #define MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_LEN 2
2837 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_OFST 8
2838 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_LEN 2
2839 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_OFST 10
2840 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_LEN 2
2841 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_OFST 12
2842 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_LEN 2
2843 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_OFST 14
2844 #define MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_LEN 2
2845
2846
2847 /***********************************/
2848 /* MC_CMD_RXD_MONITOR
2849  * Get histogram of RX queue fill level.
2850  */
2851 #define MC_CMD_RXD_MONITOR 0x22
2852
2853 /* MC_CMD_RXD_MONITOR_IN msgrequest */
2854 #define MC_CMD_RXD_MONITOR_IN_LEN 12
2855 #define MC_CMD_RXD_MONITOR_IN_QID_OFST 0
2856 #define MC_CMD_RXD_MONITOR_IN_QID_LEN 4
2857 #define MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_OFST 4
2858 #define MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_LEN 4
2859 #define MC_CMD_RXD_MONITOR_IN_WIPE_OFST 8
2860 #define MC_CMD_RXD_MONITOR_IN_WIPE_LEN 4
2861
2862 /* MC_CMD_RXD_MONITOR_OUT msgresponse */
2863 #define MC_CMD_RXD_MONITOR_OUT_LEN 80
2864 #define MC_CMD_RXD_MONITOR_OUT_QID_OFST 0
2865 #define MC_CMD_RXD_MONITOR_OUT_QID_LEN 4
2866 #define MC_CMD_RXD_MONITOR_OUT_RING_FILL_OFST 4
2867 #define MC_CMD_RXD_MONITOR_OUT_RING_FILL_LEN 4
2868 #define MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_OFST 8
2869 #define MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_LEN 4
2870 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_1_OFST 12
2871 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_1_LEN 4
2872 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_2_OFST 16
2873 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_2_LEN 4
2874 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_4_OFST 20
2875 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_4_LEN 4
2876 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_8_OFST 24
2877 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_8_LEN 4
2878 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_16_OFST 28
2879 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_16_LEN 4
2880 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_32_OFST 32
2881 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_32_LEN 4
2882 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_64_OFST 36
2883 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_64_LEN 4
2884 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_128_OFST 40
2885 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_128_LEN 4
2886 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_256_OFST 44
2887 #define MC_CMD_RXD_MONITOR_OUT_RING_LT_256_LEN 4
2888 #define MC_CMD_RXD_MONITOR_OUT_RING_GE_256_OFST 48
2889 #define MC_CMD_RXD_MONITOR_OUT_RING_GE_256_LEN 4
2890 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_OFST 52
2891 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_LEN 4
2892 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_OFST 56
2893 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_LEN 4
2894 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_OFST 60
2895 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_LEN 4
2896 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_OFST 64
2897 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_LEN 4
2898 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_OFST 68
2899 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_LEN 4
2900 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_OFST 72
2901 #define MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_LEN 4
2902 #define MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_OFST 76
2903 #define MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_LEN 4
2904
2905
2906 /***********************************/
2907 /* MC_CMD_PUTS
2908  * Copy the given ASCII string out onto UART and/or out of the network port.
2909  */
2910 #define MC_CMD_PUTS 0x23
2911 #undef  MC_CMD_0x23_PRIVILEGE_CTG
2912
2913 #define MC_CMD_0x23_PRIVILEGE_CTG SRIOV_CTG_INSECURE
2914
2915 /* MC_CMD_PUTS_IN msgrequest */
2916 #define MC_CMD_PUTS_IN_LENMIN 13
2917 #define MC_CMD_PUTS_IN_LENMAX 252
2918 #define MC_CMD_PUTS_IN_LEN(num) (12+1*(num))
2919 #define MC_CMD_PUTS_IN_DEST_OFST 0
2920 #define MC_CMD_PUTS_IN_DEST_LEN 4
2921 #define MC_CMD_PUTS_IN_UART_LBN 0
2922 #define MC_CMD_PUTS_IN_UART_WIDTH 1
2923 #define MC_CMD_PUTS_IN_PORT_LBN 1
2924 #define MC_CMD_PUTS_IN_PORT_WIDTH 1
2925 #define MC_CMD_PUTS_IN_DHOST_OFST 4
2926 #define MC_CMD_PUTS_IN_DHOST_LEN 6
2927 #define MC_CMD_PUTS_IN_STRING_OFST 12
2928 #define MC_CMD_PUTS_IN_STRING_LEN 1
2929 #define MC_CMD_PUTS_IN_STRING_MINNUM 1
2930 #define MC_CMD_PUTS_IN_STRING_MAXNUM 240
2931
2932 /* MC_CMD_PUTS_OUT msgresponse */
2933 #define MC_CMD_PUTS_OUT_LEN 0
2934
2935
2936 /***********************************/
2937 /* MC_CMD_GET_PHY_CFG
2938  * Report PHY configuration. This guarantees to succeed even if the PHY is in a
2939  * 'zombie' state. Locks required: None
2940  */
2941 #define MC_CMD_GET_PHY_CFG 0x24
2942 #undef  MC_CMD_0x24_PRIVILEGE_CTG
2943
2944 #define MC_CMD_0x24_PRIVILEGE_CTG SRIOV_CTG_GENERAL
2945
2946 /* MC_CMD_GET_PHY_CFG_IN msgrequest */
2947 #define MC_CMD_GET_PHY_CFG_IN_LEN 0
2948
2949 /* MC_CMD_GET_PHY_CFG_OUT msgresponse */
2950 #define MC_CMD_GET_PHY_CFG_OUT_LEN 72
2951 /* flags */
2952 #define MC_CMD_GET_PHY_CFG_OUT_FLAGS_OFST 0
2953 #define MC_CMD_GET_PHY_CFG_OUT_FLAGS_LEN 4
2954 #define MC_CMD_GET_PHY_CFG_OUT_PRESENT_LBN 0
2955 #define MC_CMD_GET_PHY_CFG_OUT_PRESENT_WIDTH 1
2956 #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN 1
2957 #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_WIDTH 1
2958 #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_LBN 2
2959 #define MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_WIDTH 1
2960 #define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_LBN 3
2961 #define MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_WIDTH 1
2962 #define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_LBN 4
2963 #define MC_CMD_GET_PHY_CFG_OUT_POWEROFF_WIDTH 1
2964 #define MC_CMD_GET_PHY_CFG_OUT_TXDIS_LBN 5
2965 #define MC_CMD_GET_PHY_CFG_OUT_TXDIS_WIDTH 1
2966 #define MC_CMD_GET_PHY_CFG_OUT_BIST_LBN 6
2967 #define MC_CMD_GET_PHY_CFG_OUT_BIST_WIDTH 1
2968 /* ?? */
2969 #define MC_CMD_GET_PHY_CFG_OUT_TYPE_OFST 4
2970 #define MC_CMD_GET_PHY_CFG_OUT_TYPE_LEN 4
2971 /* Bitmask of supported capabilities */
2972 #define MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_OFST 8
2973 #define MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_LEN 4
2974 #define MC_CMD_PHY_CAP_10HDX_LBN 1
2975 #define MC_CMD_PHY_CAP_10HDX_WIDTH 1
2976 #define MC_CMD_PHY_CAP_10FDX_LBN 2
2977 #define MC_CMD_PHY_CAP_10FDX_WIDTH 1
2978 #define MC_CMD_PHY_CAP_100HDX_LBN 3
2979 #define MC_CMD_PHY_CAP_100HDX_WIDTH 1
2980 #define MC_CMD_PHY_CAP_100FDX_LBN 4
2981 #define MC_CMD_PHY_CAP_100FDX_WIDTH 1
2982 #define MC_CMD_PHY_CAP_1000HDX_LBN 5
2983 #define MC_CMD_PHY_CAP_1000HDX_WIDTH 1
2984 #define MC_CMD_PHY_CAP_1000FDX_LBN 6
2985 #define MC_CMD_PHY_CAP_1000FDX_WIDTH 1
2986 #define MC_CMD_PHY_CAP_10000FDX_LBN 7
2987 #define MC_CMD_PHY_CAP_10000FDX_WIDTH 1
2988 #define MC_CMD_PHY_CAP_PAUSE_LBN 8
2989 #define MC_CMD_PHY_CAP_PAUSE_WIDTH 1
2990 #define MC_CMD_PHY_CAP_ASYM_LBN 9
2991 #define MC_CMD_PHY_CAP_ASYM_WIDTH 1
2992 #define MC_CMD_PHY_CAP_AN_LBN 10
2993 #define MC_CMD_PHY_CAP_AN_WIDTH 1
2994 #define MC_CMD_PHY_CAP_40000FDX_LBN 11
2995 #define MC_CMD_PHY_CAP_40000FDX_WIDTH 1
2996 #define MC_CMD_PHY_CAP_DDM_LBN 12
2997 #define MC_CMD_PHY_CAP_DDM_WIDTH 1
2998 #define MC_CMD_PHY_CAP_100000FDX_LBN 13
2999 #define MC_CMD_PHY_CAP_100000FDX_WIDTH 1
3000 #define MC_CMD_PHY_CAP_25000FDX_LBN 14
3001 #define MC_CMD_PHY_CAP_25000FDX_WIDTH 1
3002 #define MC_CMD_PHY_CAP_50000FDX_LBN 15
3003 #define MC_CMD_PHY_CAP_50000FDX_WIDTH 1
3004 #define MC_CMD_PHY_CAP_BASER_FEC_LBN 16
3005 #define MC_CMD_PHY_CAP_BASER_FEC_WIDTH 1
3006 #define MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_LBN 17
3007 #define MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_WIDTH 1
3008 #define MC_CMD_PHY_CAP_RS_FEC_LBN 18
3009 #define MC_CMD_PHY_CAP_RS_FEC_WIDTH 1
3010 #define MC_CMD_PHY_CAP_RS_FEC_REQUESTED_LBN 19
3011 #define MC_CMD_PHY_CAP_RS_FEC_REQUESTED_WIDTH 1
3012 #define MC_CMD_PHY_CAP_25G_BASER_FEC_LBN 20
3013 #define MC_CMD_PHY_CAP_25G_BASER_FEC_WIDTH 1
3014 #define MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_LBN 21
3015 #define MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_WIDTH 1
3016 /* ?? */
3017 #define MC_CMD_GET_PHY_CFG_OUT_CHANNEL_OFST 12
3018 #define MC_CMD_GET_PHY_CFG_OUT_CHANNEL_LEN 4
3019 /* ?? */
3020 #define MC_CMD_GET_PHY_CFG_OUT_PRT_OFST 16
3021 #define MC_CMD_GET_PHY_CFG_OUT_PRT_LEN 4
3022 /* ?? */
3023 #define MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_OFST 20
3024 #define MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_LEN 4
3025 /* ?? */
3026 #define MC_CMD_GET_PHY_CFG_OUT_NAME_OFST 24
3027 #define MC_CMD_GET_PHY_CFG_OUT_NAME_LEN 20
3028 /* ?? */
3029 #define MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_OFST 44
3030 #define MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_LEN 4
3031 /* enum: Xaui. */
3032 #define MC_CMD_MEDIA_XAUI 0x1
3033 /* enum: CX4. */
3034 #define MC_CMD_MEDIA_CX4 0x2
3035 /* enum: KX4. */
3036 #define MC_CMD_MEDIA_KX4 0x3
3037 /* enum: XFP Far. */
3038 #define MC_CMD_MEDIA_XFP 0x4
3039 /* enum: SFP+. */
3040 #define MC_CMD_MEDIA_SFP_PLUS 0x5
3041 /* enum: 10GBaseT. */
3042 #define MC_CMD_MEDIA_BASE_T 0x6
3043 /* enum: QSFP+. */
3044 #define MC_CMD_MEDIA_QSFP_PLUS 0x7
3045 #define MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_OFST 48
3046 #define MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_LEN 4
3047 /* enum: Native clause 22 */
3048 #define MC_CMD_MMD_CLAUSE22 0x0
3049 #define MC_CMD_MMD_CLAUSE45_PMAPMD 0x1 /* enum */
3050 #define MC_CMD_MMD_CLAUSE45_WIS 0x2 /* enum */
3051 #define MC_CMD_MMD_CLAUSE45_PCS 0x3 /* enum */
3052 #define MC_CMD_MMD_CLAUSE45_PHYXS 0x4 /* enum */
3053 #define MC_CMD_MMD_CLAUSE45_DTEXS 0x5 /* enum */
3054 #define MC_CMD_MMD_CLAUSE45_TC 0x6 /* enum */
3055 #define MC_CMD_MMD_CLAUSE45_AN 0x7 /* enum */
3056 /* enum: Clause22 proxied over clause45 by PHY. */
3057 #define MC_CMD_MMD_CLAUSE45_C22EXT 0x1d
3058 #define MC_CMD_MMD_CLAUSE45_VEND1 0x1e /* enum */
3059 #define MC_CMD_MMD_CLAUSE45_VEND2 0x1f /* enum */
3060 #define MC_CMD_GET_PHY_CFG_OUT_REVISION_OFST 52
3061 #define MC_CMD_GET_PHY_CFG_OUT_REVISION_LEN 20
3062
3063
3064 /***********************************/
3065 /* MC_CMD_START_BIST
3066  * Start a BIST test on the PHY. Locks required: PHY_LOCK if doing a PHY BIST
3067  * Return code: 0, EINVAL, EACCES (if PHY_LOCK is not held)
3068  */
3069 #define MC_CMD_START_BIST 0x25
3070 #undef  MC_CMD_0x25_PRIVILEGE_CTG
3071
3072 #define MC_CMD_0x25_PRIVILEGE_CTG SRIOV_CTG_ADMIN
3073
3074 /* MC_CMD_START_BIST_IN msgrequest */
3075 #define MC_CMD_START_BIST_IN_LEN 4
3076 /* Type of test. */
3077 #define MC_CMD_START_BIST_IN_TYPE_OFST 0
3078 #define MC_CMD_START_BIST_IN_TYPE_LEN 4
3079 /* enum: Run the PHY's short cable BIST. */
3080 #define MC_CMD_PHY_BIST_CABLE_SHORT 0x1
3081 /* enum: Run the PHY's long cable BIST. */
3082 #define MC_CMD_PHY_BIST_CABLE_LONG 0x2
3083 /* enum: Run BIST on the currently selected BPX Serdes (XAUI or XFI) . */
3084 #define MC_CMD_BPX_SERDES_BIST 0x3
3085 /* enum: Run the MC loopback tests. */
3086 #define MC_CMD_MC_LOOPBACK_BIST 0x4
3087 /* enum: Run the PHY's standard BIST. */
3088 #define MC_CMD_PHY_BIST 0x5
3089 /* enum: Run MC RAM test. */
3090 #define MC_CMD_MC_MEM_BIST 0x6
3091 /* enum: Run Port RAM test. */
3092 #define MC_CMD_PORT_MEM_BIST 0x7
3093 /* enum: Run register test. */
3094 #define MC_CMD_REG_BIST 0x8
3095
3096 /* MC_CMD_START_BIST_OUT msgresponse */
3097 #define MC_CMD_START_BIST_OUT_LEN 0
3098
3099
3100 /***********************************/
3101 /* MC_CMD_POLL_BIST
3102  * Poll for BIST completion. Returns a single status code, and optionally some
3103  * PHY specific bist output. The driver should only consume the BIST output
3104  * after validating OUTLEN and MC_CMD_GET_PHY_CFG.TYPE. If a driver can't
3105  * successfully parse the BIST output, it should still respect the pass/Fail in
3106  * OUT.RESULT. Locks required: PHY_LOCK if doing a PHY BIST. Return code: 0,
3107  * EACCES (if PHY_LOCK is not held).
3108  */
3109 #define MC_CMD_POLL_BIST 0x26
3110 #undef  MC_CMD_0x26_PRIVILEGE_CTG
3111
3112 #define MC_CMD_0x26_PRIVILEGE_CTG SRIOV_CTG_ADMIN
3113
3114 /* MC_CMD_POLL_BIST_IN msgrequest */
3115 #define MC_CMD_POLL_BIST_IN_LEN 0
3116
3117 /* MC_CMD_POLL_BIST_OUT msgresponse */
3118 #define MC_CMD_POLL_BIST_OUT_LEN 8
3119 /* result */
3120 #define MC_CMD_POLL_BIST_OUT_RESULT_OFST 0
3121 #define MC_CMD_POLL_BIST_OUT_RESULT_LEN 4
3122 /* enum: Running. */
3123 #define MC_CMD_POLL_BIST_RUNNING 0x1
3124 /* enum: Passed. */
3125 #define MC_CMD_POLL_BIST_PASSED 0x2
3126 /* enum: Failed. */
3127 #define MC_CMD_POLL_BIST_FAILED 0x3
3128 /* enum: Timed-out. */
3129 #define MC_CMD_POLL_BIST_TIMEOUT 0x4
3130 #define MC_CMD_POLL_BIST_OUT_PRIVATE_OFST 4
3131 #define MC_CMD_POLL_BIST_OUT_PRIVATE_LEN 4
3132
3133 /* MC_CMD_POLL_BIST_OUT_SFT9001 msgresponse */
3134 #define MC_CMD_POLL_BIST_OUT_SFT9001_LEN 36
3135 /* result */
3136 /*            MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */
3137 /*            MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */
3138 /*            Enum values, see field(s): */
3139 /*               MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */
3140 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_OFST 4
3141 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_LEN 4
3142 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_OFST 8
3143 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_LEN 4
3144 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_OFST 12
3145 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_LEN 4
3146 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_OFST 16
3147 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_LEN 4
3148 /* Status of each channel A */
3149 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_OFST 20
3150 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_LEN 4
3151 /* enum: Ok. */
3152 #define MC_CMD_POLL_BIST_SFT9001_PAIR_OK 0x1
3153 /* enum: Open. */
3154 #define MC_CMD_POLL_BIST_SFT9001_PAIR_OPEN 0x2
3155 /* enum: Intra-pair short. */
3156 #define MC_CMD_POLL_BIST_SFT9001_INTRA_PAIR_SHORT 0x3
3157 /* enum: Inter-pair short. */
3158 #define MC_CMD_POLL_BIST_SFT9001_INTER_PAIR_SHORT 0x4
3159 /* enum: Busy. */
3160 #define MC_CMD_POLL_BIST_SFT9001_PAIR_BUSY 0x9
3161 /* Status of each channel B */
3162 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_OFST 24
3163 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_LEN 4
3164 /*            Enum values, see field(s): */
3165 /*               CABLE_STATUS_A */
3166 /* Status of each channel C */
3167 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_OFST 28
3168 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_LEN 4
3169 /*            Enum values, see field(s): */
3170 /*               CABLE_STATUS_A */
3171 /* Status of each channel D */
3172 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_OFST 32
3173 #define MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_LEN 4
3174 /*            Enum values, see field(s): */
3175 /*               CABLE_STATUS_A */
3176
3177 /* MC_CMD_POLL_BIST_OUT_MRSFP msgresponse */
3178 #define MC_CMD_POLL_BIST_OUT_MRSFP_LEN 8
3179 /* result */
3180 /*            MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */
3181 /*            MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */
3182 /*            Enum values, see field(s): */
3183 /*               MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */
3184 #define MC_CMD_POLL_BIST_OUT_MRSFP_TEST_OFST 4
3185 #define MC_CMD_POLL_BIST_OUT_MRSFP_TEST_LEN 4
3186 /* enum: Complete. */
3187 #define MC_CMD_POLL_BIST_MRSFP_TEST_COMPLETE 0x0
3188 /* enum: Bus switch off I2C write. */
3189 #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_WRITE 0x1
3190 /* enum: Bus switch off I2C no access IO exp. */
3191 #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_IO_EXP 0x2
3192 /* enum: Bus switch off I2C no access module. */
3193 #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_MODULE 0x3
3194 /* enum: IO exp I2C configure. */
3195 #define MC_CMD_POLL_BIST_MRSFP_TEST_IO_EXP_I2C_CONFIGURE 0x4
3196 /* enum: Bus switch I2C no cross talk. */
3197 #define MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_I2C_NO_CROSSTALK 0x5
3198 /* enum: Module presence. */
3199 #define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_PRESENCE 0x6
3200 /* enum: Module ID I2C access. */
3201 #define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_I2C_ACCESS 0x7
3202 /* enum: Module ID sane value. */
3203 #define MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_SANE_VALUE 0x8
3204
3205 /* MC_CMD_POLL_BIST_OUT_MEM msgresponse */
3206 #define MC_CMD_POLL_BIST_OUT_MEM_LEN 36
3207 /* result */
3208 /*            MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */
3209 /*            MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */
3210 /*            Enum values, see field(s): */
3211 /*               MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */
3212 #define MC_CMD_POLL_BIST_OUT_MEM_TEST_OFST 4
3213 #define MC_CMD_POLL_BIST_OUT_MEM_TEST_LEN 4
3214 /* enum: Test has completed. */
3215 #define MC_CMD_POLL_BIST_MEM_COMPLETE 0x0
3216 /* enum: RAM test - walk ones. */
3217 #define MC_CMD_POLL_BIST_MEM_MEM_WALK_ONES 0x1
3218 /* enum: RAM test - walk zeros. */
3219 #define MC_CMD_POLL_BIST_MEM_MEM_WALK_ZEROS 0x2
3220 /* enum: RAM test - walking inversions zeros/ones. */
3221 #define MC_CMD_POLL_BIST_MEM_MEM_INV_ZERO_ONE 0x3
3222 /* enum: RAM test - walking inversions checkerboard. */
3223 #define MC_CMD_POLL_BIST_MEM_MEM_INV_CHKBOARD 0x4
3224 /* enum: Register test - set / clear individual bits. */
3225 #define MC_CMD_POLL_BIST_MEM_REG 0x5
3226 /* enum: ECC error detected. */
3227 #define MC_CMD_POLL_BIST_MEM_ECC 0x6
3228 /* Failure address, only valid if result is POLL_BIST_FAILED */
3229 #define MC_CMD_POLL_BIST_OUT_MEM_ADDR_OFST 8
3230 #define MC_CMD_POLL_BIST_OUT_MEM_ADDR_LEN 4
3231 /* Bus or address space to which the failure address corresponds */
3232 #define MC_CMD_POLL_BIST_OUT_MEM_BUS_OFST 12
3233 #define MC_CMD_POLL_BIST_OUT_MEM_BUS_LEN 4
3234 /* enum: MC MIPS bus. */
3235 #define MC_CMD_POLL_BIST_MEM_BUS_MC 0x0
3236 /* enum: CSR IREG bus. */
3237 #define MC_CMD_POLL_BIST_MEM_BUS_CSR 0x1
3238 /* enum: RX0 DPCPU bus. */
3239 #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX 0x2
3240 /* enum: TX0 DPCPU bus. */
3241 #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX0 0x3
3242 /* enum: TX1 DPCPU bus. */
3243 #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX1 0x4
3244 /* enum: RX0 DICPU bus. */
3245 #define MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX 0x5
3246 /* enum: TX DICPU bus. */
3247 #define MC_CMD_POLL_BIST_MEM_BUS_DICPU_TX 0x6
3248 /* enum: RX1 DPCPU bus. */
3249 #define MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX1 0x7
3250 /* enum: RX1 DICPU bus. */
3251 #define MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX1 0x8
3252 /* Pattern written to RAM / register */
3253 #define MC_CMD_POLL_BIST_OUT_MEM_EXPECT_OFST 16
3254 #define MC_CMD_POLL_BIST_OUT_MEM_EXPECT_LEN 4
3255 /* Actual value read from RAM / register */
3256 #define MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_OFST 20
3257 #define MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_LEN 4
3258 /* ECC error mask */
3259 #define MC_CMD_POLL_BIST_OUT_MEM_ECC_OFST 24
3260 #define MC_CMD_POLL_BIST_OUT_MEM_ECC_LEN 4
3261 /* ECC parity error mask */
3262 #define MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_OFST 28
3263 #define MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_LEN 4
3264 /* ECC fatal error mask */
3265 #define MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_OFST 32
3266 #define MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_LEN 4
3267
3268
3269 /***********************************/
3270 /* MC_CMD_FLUSH_RX_QUEUES
3271  * Flush receive queue(s). If SRIOV is enabled (via MC_CMD_SRIOV), then RXQ
3272  * flushes should be initiated via this MCDI operation, rather than via
3273  * directly writing FLUSH_CMD.
3274  *
3275  * The flush is completed (either done/fail) asynchronously (after this command
3276  * returns). The driver must still wait for flush done/failure events as usual.
3277  */
3278 #define MC_CMD_FLUSH_RX_QUEUES 0x27
3279
3280 /* MC_CMD_FLUSH_RX_QUEUES_IN msgrequest */
3281 #define MC_CMD_FLUSH_RX_QUEUES_IN_LENMIN 4
3282 #define MC_CMD_FLUSH_RX_QUEUES_IN_LENMAX 252
3283 #define MC_CMD_FLUSH_RX_QUEUES_IN_LEN(num) (0+4*(num))
3284 #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_OFST 0
3285 #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_LEN 4
3286 #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MINNUM 1
3287 #define MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM 63
3288
3289 /* MC_CMD_FLUSH_RX_QUEUES_OUT msgresponse */
3290 #define MC_CMD_FLUSH_RX_QUEUES_OUT_LEN 0
3291
3292
3293 /***********************************/
3294 /* MC_CMD_GET_LOOPBACK_MODES
3295  * Returns a bitmask of loopback modes available at each speed.
3296  */
3297 #define MC_CMD_GET_LOOPBACK_MODES 0x28
3298 #undef  MC_CMD_0x28_PRIVILEGE_CTG
3299
3300 #define MC_CMD_0x28_PRIVILEGE_CTG SRIOV_CTG_GENERAL
3301
3302 /* MC_CMD_GET_LOOPBACK_MODES_IN msgrequest */
3303 #define MC_CMD_GET_LOOPBACK_MODES_IN_LEN 0
3304
3305 /* MC_CMD_GET_LOOPBACK_MODES_OUT msgresponse */
3306 #define MC_CMD_GET_LOOPBACK_MODES_OUT_LEN 40
3307 /* Supported loopbacks. */
3308 #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_OFST 0
3309 #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LEN 8
3310 #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LO_OFST 0
3311 #define MC_CMD_GET_LOOPBACK_MODES_OUT_100M_HI_OFST 4
3312 /* enum: None. */
3313 #define MC_CMD_LOOPBACK_NONE  0x0
3314 /* enum: Data. */
3315 #define MC_CMD_LOOPBACK_DATA  0x1
3316 /* enum: GMAC. */
3317 #define MC_CMD_LOOPBACK_GMAC  0x2
3318 /* enum: XGMII. */
3319 #define MC_CMD_LOOPBACK_XGMII 0x3
3320 /* enum: XGXS. */
3321 #define MC_CMD_LOOPBACK_XGXS  0x4
3322 /* enum: XAUI. */
3323 #define MC_CMD_LOOPBACK_XAUI  0x5
3324 /* enum: GMII. */
3325 #define MC_CMD_LOOPBACK_GMII  0x6
3326 /* enum: SGMII. */
3327 #define MC_CMD_LOOPBACK_SGMII  0x7
3328 /* enum: XGBR. */
3329 #define MC_CMD_LOOPBACK_XGBR  0x8
3330 /* enum: XFI. */
3331 #define MC_CMD_LOOPBACK_XFI  0x9
3332 /* enum: XAUI Far. */
3333 #define MC_CMD_LOOPBACK_XAUI_FAR  0xa
3334 /* enum: GMII Far. */
3335 #define MC_CMD_LOOPBACK_GMII_FAR  0xb
3336 /* enum: SGMII Far. */
3337 #define MC_CMD_LOOPBACK_SGMII_FAR  0xc
3338 /* enum: XFI Far. */
3339 #define MC_CMD_LOOPBACK_XFI_FAR  0xd
3340 /* enum: GPhy. */
3341 #define MC_CMD_LOOPBACK_GPHY  0xe
3342 /* enum: PhyXS. */
3343 #define MC_CMD_LOOPBACK_PHYXS  0xf
3344 /* enum: PCS. */
3345 #define MC_CMD_LOOPBACK_PCS  0x10
3346 /* enum: PMA-PMD. */
3347 #define MC_CMD_LOOPBACK_PMAPMD  0x11
3348 /* enum: Cross-Port. */
3349 #define MC_CMD_LOOPBACK_XPORT  0x12
3350 /* enum: XGMII-Wireside. */
3351 #define MC_CMD_LOOPBACK_XGMII_WS  0x13
3352 /* enum: XAUI Wireside. */
3353 #define MC_CMD_LOOPBACK_XAUI_WS  0x14
3354 /* enum: XAUI Wireside Far. */
3355 #define MC_CMD_LOOPBACK_XAUI_WS_FAR  0x15
3356 /* enum: XAUI Wireside near. */
3357 #define MC_CMD_LOOPBACK_XAUI_WS_NEAR  0x16
3358 /* enum: GMII Wireside. */
3359 #define MC_CMD_LOOPBACK_GMII_WS  0x17
3360 /* enum: XFI Wireside. */
3361 #define MC_CMD_LOOPBACK_XFI_WS  0x18
3362 /* enum: XFI Wireside Far. */
3363 #define MC_CMD_LOOPBACK_XFI_WS_FAR  0x19
3364 /* enum: PhyXS Wireside. */
3365 #define MC_CMD_LOOPBACK_PHYXS_WS  0x1a
3366 /* enum: PMA lanes MAC-Serdes. */
3367 #define MC_CMD_LOOPBACK_PMA_INT  0x1b
3368 /* enum: KR Serdes Parallel (Encoder). */
3369 #define MC_CMD_LOOPBACK_SD_NEAR  0x1c
3370 /* enum: KR Serdes Serial. */
3371 #define MC_CMD_LOOPBACK_SD_FAR  0x1d
3372 /* enum: PMA lanes MAC-Serdes Wireside. */
3373 #define MC_CMD_LOOPBACK_PMA_INT_WS  0x1e
3374 /* enum: KR Serdes Parallel Wireside (Full PCS). */
3375 #define MC_CMD_LOOPBACK_SD_FEP2_WS  0x1f
3376 /* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */
3377 #define MC_CMD_LOOPBACK_SD_FEP1_5_WS  0x20
3378 /* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */
3379 #define MC_CMD_LOOPBACK_SD_FEP_WS  0x21
3380 /* enum: KR Serdes Serial Wireside. */
3381 #define MC_CMD_LOOPBACK_SD_FES_WS  0x22
3382 /* enum: Near side of AOE Siena side port */
3383 #define MC_CMD_LOOPBACK_AOE_INT_NEAR  0x23
3384 /* enum: Medford Wireside datapath loopback */
3385 #define MC_CMD_LOOPBACK_DATA_WS  0x24
3386 /* enum: Force link up without setting up any physical loopback (snapper use
3387  * only)
3388  */
3389 #define MC_CMD_LOOPBACK_FORCE_EXT_LINK  0x25
3390 /* Supported loopbacks. */
3391 #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_OFST 8
3392 #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LEN 8
3393 #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LO_OFST 8
3394 #define MC_CMD_GET_LOOPBACK_MODES_OUT_1G_HI_OFST 12
3395 /*            Enum values, see field(s): */
3396 /*               100M */
3397 /* Supported loopbacks. */
3398 #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_OFST 16
3399 #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LEN 8
3400 #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LO_OFST 16
3401 #define MC_CMD_GET_LOOPBACK_MODES_OUT_10G_HI_OFST 20
3402 /*            Enum values, see field(s): */
3403 /*               100M */
3404 /* Supported loopbacks. */
3405 #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_OFST 24
3406 #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LEN 8
3407 #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LO_OFST 24
3408 #define MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_HI_OFST 28
3409 /*            Enum values, see field(s): */
3410 /*               100M */
3411 /* Supported loopbacks. */
3412 #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_OFST 32
3413 #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LEN 8
3414 #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LO_OFST 32
3415 #define MC_CMD_GET_LOOPBACK_MODES_OUT_40G_HI_OFST 36
3416 /*            Enum values, see field(s): */
3417 /*               100M */
3418
3419 /* MC_CMD_GET_LOOPBACK_MODES_OUT_V2 msgresponse: Supported loopback modes for
3420  * newer NICs with 25G/50G/100G support
3421  */
3422 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_LEN 64
3423 /* Supported loopbacks. */
3424 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_OFST 0
3425 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_LEN 8
3426 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_LO_OFST 0
3427 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_HI_OFST 4
3428 /* enum: None. */
3429 /*               MC_CMD_LOOPBACK_NONE  0x0 */
3430 /* enum: Data. */
3431 /*               MC_CMD_LOOPBACK_DATA  0x1 */
3432 /* enum: GMAC. */
3433 /*               MC_CMD_LOOPBACK_GMAC  0x2 */
3434 /* enum: XGMII. */
3435 /*               MC_CMD_LOOPBACK_XGMII 0x3 */
3436 /* enum: XGXS. */
3437 /*               MC_CMD_LOOPBACK_XGXS  0x4 */
3438 /* enum: XAUI. */
3439 /*               MC_CMD_LOOPBACK_XAUI  0x5 */
3440 /* enum: GMII. */
3441 /*               MC_CMD_LOOPBACK_GMII  0x6 */
3442 /* enum: SGMII. */
3443 /*               MC_CMD_LOOPBACK_SGMII  0x7 */
3444 /* enum: XGBR. */
3445 /*               MC_CMD_LOOPBACK_XGBR  0x8 */
3446 /* enum: XFI. */
3447 /*               MC_CMD_LOOPBACK_XFI  0x9 */
3448 /* enum: XAUI Far. */
3449 /*               MC_CMD_LOOPBACK_XAUI_FAR  0xa */
3450 /* enum: GMII Far. */
3451 /*               MC_CMD_LOOPBACK_GMII_FAR  0xb */
3452 /* enum: SGMII Far. */
3453 /*               MC_CMD_LOOPBACK_SGMII_FAR  0xc */
3454 /* enum: XFI Far. */
3455 /*               MC_CMD_LOOPBACK_XFI_FAR  0xd */
3456 /* enum: GPhy. */
3457 /*               MC_CMD_LOOPBACK_GPHY  0xe */
3458 /* enum: PhyXS. */
3459 /*               MC_CMD_LOOPBACK_PHYXS  0xf */
3460 /* enum: PCS. */
3461 /*               MC_CMD_LOOPBACK_PCS  0x10 */
3462 /* enum: PMA-PMD. */
3463 /*               MC_CMD_LOOPBACK_PMAPMD  0x11 */
3464 /* enum: Cross-Port. */
3465 /*               MC_CMD_LOOPBACK_XPORT  0x12 */
3466 /* enum: XGMII-Wireside. */
3467 /*               MC_CMD_LOOPBACK_XGMII_WS  0x13 */
3468 /* enum: XAUI Wireside. */
3469 /*               MC_CMD_LOOPBACK_XAUI_WS  0x14 */
3470 /* enum: XAUI Wireside Far. */
3471 /*               MC_CMD_LOOPBACK_XAUI_WS_FAR  0x15 */
3472 /* enum: XAUI Wireside near. */
3473 /*               MC_CMD_LOOPBACK_XAUI_WS_NEAR  0x16 */
3474 /* enum: GMII Wireside. */
3475 /*               MC_CMD_LOOPBACK_GMII_WS  0x17 */
3476 /* enum: XFI Wireside. */
3477 /*               MC_CMD_LOOPBACK_XFI_WS  0x18 */
3478 /* enum: XFI Wireside Far. */
3479 /*               MC_CMD_LOOPBACK_XFI_WS_FAR  0x19 */
3480 /* enum: PhyXS Wireside. */
3481 /*               MC_CMD_LOOPBACK_PHYXS_WS  0x1a */
3482 /* enum: PMA lanes MAC-Serdes. */
3483 /*               MC_CMD_LOOPBACK_PMA_INT  0x1b */
3484 /* enum: KR Serdes Parallel (Encoder). */
3485 /*               MC_CMD_LOOPBACK_SD_NEAR  0x1c */
3486 /* enum: KR Serdes Serial. */
3487 /*               MC_CMD_LOOPBACK_SD_FAR  0x1d */
3488 /* enum: PMA lanes MAC-Serdes Wireside. */
3489 /*               MC_CMD_LOOPBACK_PMA_INT_WS  0x1e */
3490 /* enum: KR Serdes Parallel Wireside (Full PCS). */
3491 /*               MC_CMD_LOOPBACK_SD_FEP2_WS  0x1f */
3492 /* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */
3493 /*               MC_CMD_LOOPBACK_SD_FEP1_5_WS  0x20 */
3494 /* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */
3495 /*               MC_CMD_LOOPBACK_SD_FEP_WS  0x21 */
3496 /* enum: KR Serdes Serial Wireside. */
3497 /*               MC_CMD_LOOPBACK_SD_FES_WS  0x22 */
3498 /* enum: Near side of AOE Siena side port */
3499 /*               MC_CMD_LOOPBACK_AOE_INT_NEAR  0x23 */
3500 /* enum: Medford Wireside datapath loopback */
3501 /*               MC_CMD_LOOPBACK_DATA_WS  0x24 */
3502 /* enum: Force link up without setting up any physical loopback (snapper use
3503  * only)
3504  */
3505 /*               MC_CMD_LOOPBACK_FORCE_EXT_LINK  0x25 */
3506 /* Supported loopbacks. */
3507 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_OFST 8
3508 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_LEN 8
3509 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_LO_OFST 8
3510 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_HI_OFST 12
3511 /*            Enum values, see field(s): */
3512 /*               100M */
3513 /* Supported loopbacks. */
3514 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_OFST 16
3515 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_LEN 8
3516 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_LO_OFST 16
3517 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_HI_OFST 20
3518 /*            Enum values, see field(s): */
3519 /*               100M */
3520 /* Supported loopbacks. */
3521 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_OFST 24
3522 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_LEN 8
3523 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_LO_OFST 24
3524 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_HI_OFST 28
3525 /*            Enum values, see field(s): */
3526 /*               100M */
3527 /* Supported loopbacks. */
3528 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_OFST 32
3529 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_LEN 8
3530 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_LO_OFST 32
3531 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_HI_OFST 36
3532 /*            Enum values, see field(s): */
3533 /*               100M */
3534 /* Supported 25G loopbacks. */
3535 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_OFST 40
3536 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_LEN 8
3537 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_LO_OFST 40
3538 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_HI_OFST 44
3539 /*            Enum values, see field(s): */
3540 /*               100M */
3541 /* Supported 50 loopbacks. */
3542 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_OFST 48
3543 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_LEN 8
3544 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_LO_OFST 48
3545 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_HI_OFST 52
3546 /*            Enum values, see field(s): */
3547 /*               100M */
3548 /* Supported 100G loopbacks. */
3549 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_OFST 56
3550 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_LEN 8
3551 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_LO_OFST 56
3552 #define MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_HI_OFST 60
3553 /*            Enum values, see field(s): */
3554 /*               100M */
3555
3556
3557 /***********************************/
3558 /* MC_CMD_GET_LINK
3559  * Read the unified MAC/PHY link state. Locks required: None Return code: 0,
3560  * ETIME.
3561  */
3562 #define MC_CMD_GET_LINK 0x29
3563 #undef  MC_CMD_0x29_PRIVILEGE_CTG
3564
3565 #define MC_CMD_0x29_PRIVILEGE_CTG SRIOV_CTG_GENERAL
3566
3567 /* MC_CMD_GET_LINK_IN msgrequest */
3568 #define MC_CMD_GET_LINK_IN_LEN 0
3569
3570 /* MC_CMD_GET_LINK_OUT msgresponse */
3571 #define MC_CMD_GET_LINK_OUT_LEN 28
3572 /* near-side advertised capabilities */
3573 #define MC_CMD_GET_LINK_OUT_CAP_OFST 0
3574 #define MC_CMD_GET_LINK_OUT_CAP_LEN 4
3575 /* link-partner advertised capabilities */
3576 #define MC_CMD_GET_LINK_OUT_LP_CAP_OFST 4
3577 #define MC_CMD_GET_LINK_OUT_LP_CAP_LEN 4
3578 /* Autonegotiated speed in mbit/s. The link may still be down even if this
3579  * reads non-zero.
3580  */
3581 #define MC_CMD_GET_LINK_OUT_LINK_SPEED_OFST 8
3582 #define MC_CMD_GET_LINK_OUT_LINK_SPEED_LEN 4
3583 /* Current loopback setting. */
3584 #define MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_OFST 12
3585 #define MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_LEN 4
3586 /*            Enum values, see field(s): */
3587 /*               MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */
3588 #define MC_CMD_GET_LINK_OUT_FLAGS_OFST 16
3589 #define MC_CMD_GET_LINK_OUT_FLAGS_LEN 4
3590 #define MC_CMD_GET_LINK_OUT_LINK_UP_LBN 0
3591 #define MC_CMD_GET_LINK_OUT_LINK_UP_WIDTH 1
3592 #define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_LBN 1
3593 #define MC_CMD_GET_LINK_OUT_FULL_DUPLEX_WIDTH 1
3594 #define MC_CMD_GET_LINK_OUT_BPX_LINK_LBN 2
3595 #define MC_CMD_GET_LINK_OUT_BPX_LINK_WIDTH 1
3596 #define MC_CMD_GET_LINK_OUT_PHY_LINK_LBN 3
3597 #define MC_CMD_GET_LINK_OUT_PHY_LINK_WIDTH 1
3598 #define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_LBN 6
3599 #define MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_WIDTH 1
3600 #define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_LBN 7
3601 #define MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_WIDTH 1
3602 /* This returns the negotiated flow control value. */
3603 #define MC_CMD_GET_LINK_OUT_FCNTL_OFST 20
3604 #define MC_CMD_GET_LINK_OUT_FCNTL_LEN 4
3605 /*            Enum values, see field(s): */
3606 /*               MC_CMD_SET_MAC/MC_CMD_SET_MAC_IN/FCNTL */
3607 #define MC_CMD_GET_LINK_OUT_MAC_FAULT_OFST 24
3608 #define MC_CMD_GET_LINK_OUT_MAC_FAULT_LEN 4
3609 #define MC_CMD_MAC_FAULT_XGMII_LOCAL_LBN 0
3610 #define MC_CMD_MAC_FAULT_XGMII_LOCAL_WIDTH 1
3611 #define MC_CMD_MAC_FAULT_XGMII_REMOTE_LBN 1
3612 #define MC_CMD_MAC_FAULT_XGMII_REMOTE_WIDTH 1
3613 #define MC_CMD_MAC_FAULT_SGMII_REMOTE_LBN 2
3614 #define MC_CMD_MAC_FAULT_SGMII_REMOTE_WIDTH 1
3615 #define MC_CMD_MAC_FAULT_PENDING_RECONFIG_LBN 3
3616 #define MC_CMD_MAC_FAULT_PENDING_RECONFIG_WIDTH 1
3617
3618
3619 /***********************************/
3620 /* MC_CMD_SET_LINK
3621  * Write the unified MAC/PHY link configuration. Locks required: None. Return
3622  * code: 0, EINVAL, ETIME
3623  */
3624 #define MC_CMD_SET_LINK 0x2a
3625 #undef  MC_CMD_0x2a_PRIVILEGE_CTG
3626
3627 #define MC_CMD_0x2a_PRIVILEGE_CTG SRIOV_CTG_LINK
3628
3629 /* MC_CMD_SET_LINK_IN msgrequest */
3630 #define MC_CMD_SET_LINK_IN_LEN 16
3631 /* ??? */
3632 #define MC_CMD_SET_LINK_IN_CAP_OFST 0
3633 #define MC_CMD_SET_LINK_IN_CAP_LEN 4
3634 /* Flags */
3635 #define MC_CMD_SET_LINK_IN_FLAGS_OFST 4
3636 #define MC_CMD_SET_LINK_IN_FLAGS_LEN 4
3637 #define MC_CMD_SET_LINK_IN_LOWPOWER_LBN 0
3638 #define MC_CMD_SET_LINK_IN_LOWPOWER_WIDTH 1
3639 #define MC_CMD_SET_LINK_IN_POWEROFF_LBN 1
3640 #define MC_CMD_SET_LINK_IN_POWEROFF_WIDTH 1
3641 #define MC_CMD_SET_LINK_IN_TXDIS_LBN 2
3642 #define MC_CMD_SET_LINK_IN_TXDIS_WIDTH 1
3643 /* Loopback mode. */
3644 #define MC_CMD_SET_LINK_IN_LOOPBACK_MODE_OFST 8
3645 #define MC_CMD_SET_LINK_IN_LOOPBACK_MODE_LEN 4
3646 /*            Enum values, see field(s): */
3647 /*               MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */
3648 /* A loopback speed of "0" is supported, and means (choose any available
3649  * speed).
3650  */
3651 #define MC_CMD_SET_LINK_IN_LOOPBACK_SPEED_OFST 12
3652 #define MC_CMD_SET_LINK_IN_LOOPBACK_SPEED_LEN 4
3653
3654 /* MC_CMD_SET_LINK_OUT msgresponse */
3655 #define MC_CMD_SET_LINK_OUT_LEN 0
3656
3657
3658 /***********************************/
3659 /* MC_CMD_SET_ID_LED
3660  * Set identification LED state. Locks required: None. Return code: 0, EINVAL
3661  */
3662 #define MC_CMD_SET_ID_LED 0x2b
3663 #undef  MC_CMD_0x2b_PRIVILEGE_CTG
3664
3665 #define MC_CMD_0x2b_PRIVILEGE_CTG SRIOV_CTG_LINK
3666
3667 /* MC_CMD_SET_ID_LED_IN msgrequest */
3668 #define MC_CMD_SET_ID_LED_IN_LEN 4
3669 /* Set LED state. */
3670 #define MC_CMD_SET_ID_LED_IN_STATE_OFST 0
3671 #define MC_CMD_SET_ID_LED_IN_STATE_LEN 4
3672 #define MC_CMD_LED_OFF  0x0 /* enum */
3673 #define MC_CMD_LED_ON  0x1 /* enum */
3674 #define MC_CMD_LED_DEFAULT  0x2 /* enum */
3675
3676 /* MC_CMD_SET_ID_LED_OUT msgresponse */
3677 #define MC_CMD_SET_ID_LED_OUT_LEN 0
3678
3679
3680 /***********************************/
3681 /* MC_CMD_SET_MAC
3682  * Set MAC configuration. Locks required: None. Return code: 0, EINVAL
3683  */
3684 #define MC_CMD_SET_MAC 0x2c
3685 #undef  MC_CMD_0x2c_PRIVILEGE_CTG
3686
3687 #define MC_CMD_0x2c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
3688
3689 /* MC_CMD_SET_MAC_IN msgrequest */
3690 #define MC_CMD_SET_MAC_IN_LEN 28
3691 /* The MTU is the MTU programmed directly into the XMAC/GMAC (inclusive of
3692  * EtherII, VLAN, bug16011 padding).
3693  */
3694 #define MC_CMD_SET_MAC_IN_MTU_OFST 0
3695 #define MC_CMD_SET_MAC_IN_MTU_LEN 4
3696 #define MC_CMD_SET_MAC_IN_DRAIN_OFST 4
3697 #define MC_CMD_SET_MAC_IN_DRAIN_LEN 4
3698 #define MC_CMD_SET_MAC_IN_ADDR_OFST 8
3699 #define MC_CMD_SET_MAC_IN_ADDR_LEN 8
3700 #define MC_CMD_SET_MAC_IN_ADDR_LO_OFST 8
3701 #define MC_CMD_SET_MAC_IN_ADDR_HI_OFST 12
3702 #define MC_CMD_SET_MAC_IN_REJECT_OFST 16
3703 #define MC_CMD_SET_MAC_IN_REJECT_LEN 4
3704 #define MC_CMD_SET_MAC_IN_REJECT_UNCST_LBN 0
3705 #define MC_CMD_SET_MAC_IN_REJECT_UNCST_WIDTH 1
3706 #define MC_CMD_SET_MAC_IN_REJECT_BRDCST_LBN 1
3707 #define MC_CMD_SET_MAC_IN_REJECT_BRDCST_WIDTH 1
3708 #define MC_CMD_SET_MAC_IN_FCNTL_OFST 20
3709 #define MC_CMD_SET_MAC_IN_FCNTL_LEN 4
3710 /* enum: Flow control is off. */
3711 #define MC_CMD_FCNTL_OFF 0x0
3712 /* enum: Respond to flow control. */
3713 #define MC_CMD_FCNTL_RESPOND 0x1
3714 /* enum: Respond to and Issue flow control. */
3715 #define MC_CMD_FCNTL_BIDIR 0x2
3716 /* enum: Auto neg flow control. */
3717 #define MC_CMD_FCNTL_AUTO 0x3
3718 /* enum: Priority flow control (eftest builds only). */
3719 #define MC_CMD_FCNTL_QBB 0x4
3720 /* enum: Issue flow control. */
3721 #define MC_CMD_FCNTL_GENERATE 0x5
3722 #define MC_CMD_SET_MAC_IN_FLAGS_OFST 24
3723 #define MC_CMD_SET_MAC_IN_FLAGS_LEN 4
3724 #define MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_LBN 0
3725 #define MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_WIDTH 1
3726
3727 /* MC_CMD_SET_MAC_EXT_IN msgrequest */
3728 #define MC_CMD_SET_MAC_EXT_IN_LEN 32
3729 /* The MTU is the MTU programmed directly into the XMAC/GMAC (inclusive of
3730  * EtherII, VLAN, bug16011 padding).
3731  */
3732 #define MC_CMD_SET_MAC_EXT_IN_MTU_OFST 0
3733 #define MC_CMD_SET_MAC_EXT_IN_MTU_LEN 4
3734 #define MC_CMD_SET_MAC_EXT_IN_DRAIN_OFST 4
3735 #define MC_CMD_SET_MAC_EXT_IN_DRAIN_LEN 4
3736 #define MC_CMD_SET_MAC_EXT_IN_ADDR_OFST 8
3737 #define MC_CMD_SET_MAC_EXT_IN_ADDR_LEN 8
3738 #define MC_CMD_SET_MAC_EXT_IN_ADDR_LO_OFST 8
3739 #define MC_CMD_SET_MAC_EXT_IN_ADDR_HI_OFST 12
3740 #define MC_CMD_SET_MAC_EXT_IN_REJECT_OFST 16
3741 #define MC_CMD_SET_MAC_EXT_IN_REJECT_LEN 4
3742 #define MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_LBN 0
3743 #define MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_WIDTH 1
3744 #define MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_LBN 1
3745 #define MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_WIDTH 1
3746 #define MC_CMD_SET_MAC_EXT_IN_FCNTL_OFST 20
3747 #define MC_CMD_SET_MAC_EXT_IN_FCNTL_LEN 4
3748 /* enum: Flow control is off. */
3749 /*               MC_CMD_FCNTL_OFF 0x0 */
3750 /* enum: Respond to flow control. */
3751 /*               MC_CMD_FCNTL_RESPOND 0x1 */
3752 /* enum: Respond to and Issue flow control. */
3753 /*               MC_CMD_FCNTL_BIDIR 0x2 */
3754 /* enum: Auto neg flow control. */
3755 /*               MC_CMD_FCNTL_AUTO 0x3 */
3756 /* enum: Priority flow control (eftest builds only). */
3757 /*               MC_CMD_FCNTL_QBB 0x4 */
3758 /* enum: Issue flow control. */
3759 /*               MC_CMD_FCNTL_GENERATE 0x5 */
3760 #define MC_CMD_SET_MAC_EXT_IN_FLAGS_OFST 24
3761 #define MC_CMD_SET_MAC_EXT_IN_FLAGS_LEN 4
3762 #define MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_LBN 0
3763 #define MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_WIDTH 1
3764 /* Select which parameters to configure. A parameter will only be modified if
3765  * the corresponding control flag is set. If SET_MAC_ENHANCED is not set in
3766  * capabilities then this field is ignored (and all flags are assumed to be
3767  * set).
3768  */
3769 #define MC_CMD_SET_MAC_EXT_IN_CONTROL_OFST 28
3770 #define MC_CMD_SET_MAC_EXT_IN_CONTROL_LEN 4
3771 #define MC_CMD_SET_MAC_EXT_IN_CFG_MTU_LBN 0
3772 #define MC_CMD_SET_MAC_EXT_IN_CFG_MTU_WIDTH 1
3773 #define MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_LBN 1
3774 #define MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_WIDTH 1
3775 #define MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_LBN 2
3776 #define MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_WIDTH 1
3777 #define MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_LBN 3
3778 #define MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_WIDTH 1
3779 #define MC_CMD_SET_MAC_EXT_IN_CFG_FCS_LBN 4
3780 #define MC_CMD_SET_MAC_EXT_IN_CFG_FCS_WIDTH 1
3781
3782 /* MC_CMD_SET_MAC_OUT msgresponse */
3783 #define MC_CMD_SET_MAC_OUT_LEN 0
3784
3785 /* MC_CMD_SET_MAC_V2_OUT msgresponse */
3786 #define MC_CMD_SET_MAC_V2_OUT_LEN 4
3787 /* MTU as configured after processing the request. See comment at
3788  * MC_CMD_SET_MAC_IN/MTU. To query MTU without doing any changes, set CONTROL
3789  * to 0.
3790  */
3791 #define MC_CMD_SET_MAC_V2_OUT_MTU_OFST 0
3792 #define MC_CMD_SET_MAC_V2_OUT_MTU_LEN 4
3793
3794
3795 /***********************************/
3796 /* MC_CMD_PHY_STATS
3797  * Get generic PHY statistics. This call returns the statistics for a generic
3798  * PHY in a sparse array (indexed by the enumerate). Each value is represented
3799  * by a 32bit number. If the DMA_ADDR is 0, then no DMA is performed, and the
3800  * statistics may be read from the message response. If DMA_ADDR != 0, then the
3801  * statistics are dmad to that (page-aligned location). Locks required: None.
3802  * Returns: 0, ETIME
3803  */
3804 #define MC_CMD_PHY_STATS 0x2d
3805 #undef  MC_CMD_0x2d_PRIVILEGE_CTG
3806
3807 #define MC_CMD_0x2d_PRIVILEGE_CTG SRIOV_CTG_LINK
3808
3809 /* MC_CMD_PHY_STATS_IN msgrequest */
3810 #define MC_CMD_PHY_STATS_IN_LEN 8
3811 /* ??? */
3812 #define MC_CMD_PHY_STATS_IN_DMA_ADDR_OFST 0
3813 #define MC_CMD_PHY_STATS_IN_DMA_ADDR_LEN 8
3814 #define MC_CMD_PHY_STATS_IN_DMA_ADDR_LO_OFST 0
3815 #define MC_CMD_PHY_STATS_IN_DMA_ADDR_HI_OFST 4
3816
3817 /* MC_CMD_PHY_STATS_OUT_DMA msgresponse */
3818 #define MC_CMD_PHY_STATS_OUT_DMA_LEN 0
3819
3820 /* MC_CMD_PHY_STATS_OUT_NO_DMA msgresponse */
3821 #define MC_CMD_PHY_STATS_OUT_NO_DMA_LEN (((MC_CMD_PHY_NSTATS*32))>>3)
3822 #define MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_OFST 0
3823 #define MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_LEN 4
3824 #define MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_NUM MC_CMD_PHY_NSTATS
3825 /* enum: OUI. */
3826 #define MC_CMD_OUI  0x0
3827 /* enum: PMA-PMD Link Up. */
3828 #define MC_CMD_PMA_PMD_LINK_UP  0x1
3829 /* enum: PMA-PMD RX Fault. */
3830 #define MC_CMD_PMA_PMD_RX_FAULT  0x2
3831 /* enum: PMA-PMD TX Fault. */
3832 #define MC_CMD_PMA_PMD_TX_FAULT  0x3
3833 /* enum: PMA-PMD Signal */
3834 #define MC_CMD_PMA_PMD_SIGNAL  0x4
3835 /* enum: PMA-PMD SNR A. */
3836 #define MC_CMD_PMA_PMD_SNR_A  0x5
3837 /* enum: PMA-PMD SNR B. */
3838 #define MC_CMD_PMA_PMD_SNR_B  0x6
3839 /* enum: PMA-PMD SNR C. */
3840 #define MC_CMD_PMA_PMD_SNR_C  0x7
3841 /* enum: PMA-PMD SNR D. */
3842 #define MC_CMD_PMA_PMD_SNR_D  0x8
3843 /* enum: PCS Link Up. */
3844 #define MC_CMD_PCS_LINK_UP  0x9
3845 /* enum: PCS RX Fault. */
3846 #define MC_CMD_PCS_RX_FAULT  0xa
3847 /* enum: PCS TX Fault. */
3848 #define MC_CMD_PCS_TX_FAULT  0xb
3849 /* enum: PCS BER. */
3850 #define MC_CMD_PCS_BER  0xc
3851 /* enum: PCS Block Errors. */
3852 #define MC_CMD_PCS_BLOCK_ERRORS  0xd
3853 /* enum: PhyXS Link Up. */
3854 #define MC_CMD_PHYXS_LINK_UP  0xe
3855 /* enum: PhyXS RX Fault. */
3856 #define MC_CMD_PHYXS_RX_FAULT  0xf
3857 /* enum: PhyXS TX Fault. */
3858 #define MC_CMD_PHYXS_TX_FAULT  0x10
3859 /* enum: PhyXS Align. */
3860 #define MC_CMD_PHYXS_ALIGN  0x11
3861 /* enum: PhyXS Sync. */
3862 #define MC_CMD_PHYXS_SYNC  0x12
3863 /* enum: AN link-up. */
3864 #define MC_CMD_AN_LINK_UP  0x13
3865 /* enum: AN Complete. */
3866 #define MC_CMD_AN_COMPLETE  0x14
3867 /* enum: AN 10GBaseT Status. */
3868 #define MC_CMD_AN_10GBT_STATUS  0x15
3869 /* enum: Clause 22 Link-Up. */
3870 #define MC_CMD_CL22_LINK_UP  0x16
3871 /* enum: (Last entry) */
3872 #define MC_CMD_PHY_NSTATS  0x17
3873
3874
3875 /***********************************/
3876 /* MC_CMD_MAC_STATS
3877  * Get generic MAC statistics. This call returns unified statistics maintained
3878  * by the MC as it switches between the GMAC and XMAC. The MC will write out
3879  * all supported stats. The driver should zero initialise the buffer to
3880  * guarantee consistent results. If the DMA_ADDR is 0, then no DMA is
3881  * performed, and the statistics may be read from the message response. If
3882  * DMA_ADDR != 0, then the statistics are dmad to that (page-aligned location).
3883  * Locks required: None. The PERIODIC_CLEAR option is not used and now has no
3884  * effect. Returns: 0, ETIME
3885  */
3886 #define MC_CMD_MAC_STATS 0x2e
3887 #undef  MC_CMD_0x2e_PRIVILEGE_CTG
3888
3889 #define MC_CMD_0x2e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
3890
3891 /* MC_CMD_MAC_STATS_IN msgrequest */
3892 #define MC_CMD_MAC_STATS_IN_LEN 20
3893 /* ??? */
3894 #define MC_CMD_MAC_STATS_IN_DMA_ADDR_OFST 0
3895 #define MC_CMD_MAC_STATS_IN_DMA_ADDR_LEN 8
3896 #define MC_CMD_MAC_STATS_IN_DMA_ADDR_LO_OFST 0
3897 #define MC_CMD_MAC_STATS_IN_DMA_ADDR_HI_OFST 4
3898 #define MC_CMD_MAC_STATS_IN_CMD_OFST 8
3899 #define MC_CMD_MAC_STATS_IN_CMD_LEN 4
3900 #define MC_CMD_MAC_STATS_IN_DMA_LBN 0
3901 #define MC_CMD_MAC_STATS_IN_DMA_WIDTH 1
3902 #define MC_CMD_MAC_STATS_IN_CLEAR_LBN 1
3903 #define MC_CMD_MAC_STATS_IN_CLEAR_WIDTH 1
3904 #define MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_LBN 2
3905 #define MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_WIDTH 1
3906 #define MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_LBN 3
3907 #define MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_WIDTH 1
3908 #define MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_LBN 4
3909 #define MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_WIDTH 1
3910 #define MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_LBN 5
3911 #define MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_WIDTH 1
3912 #define MC_CMD_MAC_STATS_IN_PERIOD_MS_LBN 16
3913 #define MC_CMD_MAC_STATS_IN_PERIOD_MS_WIDTH 16
3914 /* DMA length. Should be set to MAC_STATS_NUM_STATS * sizeof(uint64_t), as
3915  * returned by MC_CMD_GET_CAPABILITIES_V4_OUT. For legacy firmware not
3916  * supporting MC_CMD_GET_CAPABILITIES_V4_OUT, DMA_LEN should be set to
3917  * MC_CMD_MAC_NSTATS * sizeof(uint64_t)
3918  */
3919 #define MC_CMD_MAC_STATS_IN_DMA_LEN_OFST 12
3920 #define MC_CMD_MAC_STATS_IN_DMA_LEN_LEN 4
3921 /* port id so vadapter stats can be provided */
3922 #define MC_CMD_MAC_STATS_IN_PORT_ID_OFST 16
3923 #define MC_CMD_MAC_STATS_IN_PORT_ID_LEN 4
3924
3925 /* MC_CMD_MAC_STATS_OUT_DMA msgresponse */
3926 #define MC_CMD_MAC_STATS_OUT_DMA_LEN 0
3927
3928 /* MC_CMD_MAC_STATS_OUT_NO_DMA msgresponse */
3929 #define MC_CMD_MAC_STATS_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS*64))>>3)
3930 #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_OFST 0
3931 #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_LEN 8
3932 #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_LO_OFST 0
3933 #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_HI_OFST 4
3934 #define MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS
3935 #define MC_CMD_MAC_GENERATION_START  0x0 /* enum */
3936 #define MC_CMD_MAC_DMABUF_START  0x1 /* enum */
3937 #define MC_CMD_MAC_TX_PKTS  0x1 /* enum */
3938 #define MC_CMD_MAC_TX_PAUSE_PKTS  0x2 /* enum */
3939 #define MC_CMD_MAC_TX_CONTROL_PKTS  0x3 /* enum */
3940 #define MC_CMD_MAC_TX_UNICAST_PKTS  0x4 /* enum */
3941 #define MC_CMD_MAC_TX_MULTICAST_PKTS  0x5 /* enum */
3942 #define MC_CMD_MAC_TX_BROADCAST_PKTS  0x6 /* enum */
3943 #define MC_CMD_MAC_TX_BYTES  0x7 /* enum */
3944 #define MC_CMD_MAC_TX_BAD_BYTES  0x8 /* enum */
3945 #define MC_CMD_MAC_TX_LT64_PKTS  0x9 /* enum */
3946 #define MC_CMD_MAC_TX_64_PKTS  0xa /* enum */
3947 #define MC_CMD_MAC_TX_65_TO_127_PKTS  0xb /* enum */
3948 #define MC_CMD_MAC_TX_128_TO_255_PKTS  0xc /* enum */
3949 #define MC_CMD_MAC_TX_256_TO_511_PKTS  0xd /* enum */
3950 #define MC_CMD_MAC_TX_512_TO_1023_PKTS  0xe /* enum */
3951 #define MC_CMD_MAC_TX_1024_TO_15XX_PKTS  0xf /* enum */
3952 #define MC_CMD_MAC_TX_15XX_TO_JUMBO_PKTS  0x10 /* enum */
3953 #define MC_CMD_MAC_TX_GTJUMBO_PKTS  0x11 /* enum */
3954 #define MC_CMD_MAC_TX_BAD_FCS_PKTS  0x12 /* enum */
3955 #define MC_CMD_MAC_TX_SINGLE_COLLISION_PKTS  0x13 /* enum */
3956 #define MC_CMD_MAC_TX_MULTIPLE_COLLISION_PKTS  0x14 /* enum */
3957 #define MC_CMD_MAC_TX_EXCESSIVE_COLLISION_PKTS  0x15 /* enum */
3958 #define MC_CMD_MAC_TX_LATE_COLLISION_PKTS  0x16 /* enum */
3959 #define MC_CMD_MAC_TX_DEFERRED_PKTS  0x17 /* enum */
3960 #define MC_CMD_MAC_TX_EXCESSIVE_DEFERRED_PKTS  0x18 /* enum */
3961 #define MC_CMD_MAC_TX_NON_TCPUDP_PKTS  0x19 /* enum */
3962 #define MC_CMD_MAC_TX_MAC_SRC_ERR_PKTS  0x1a /* enum */
3963 #define MC_CMD_MAC_TX_IP_SRC_ERR_PKTS  0x1b /* enum */
3964 #define MC_CMD_MAC_RX_PKTS  0x1c /* enum */
3965 #define MC_CMD_MAC_RX_PAUSE_PKTS  0x1d /* enum */
3966 #define MC_CMD_MAC_RX_GOOD_PKTS  0x1e /* enum */
3967 #define MC_CMD_MAC_RX_CONTROL_PKTS  0x1f /* enum */
3968 #define MC_CMD_MAC_RX_UNICAST_PKTS  0x20 /* enum */
3969 #define MC_CMD_MAC_RX_MULTICAST_PKTS  0x21 /* enum */
3970 #define MC_CMD_MAC_RX_BROADCAST_PKTS  0x22 /* enum */
3971 #define MC_CMD_MAC_RX_BYTES  0x23 /* enum */
3972 #define MC_CMD_MAC_RX_BAD_BYTES  0x24 /* enum */
3973 #define MC_CMD_MAC_RX_64_PKTS  0x25 /* enum */
3974 #define MC_CMD_MAC_RX_65_TO_127_PKTS  0x26 /* enum */
3975 #define MC_CMD_MAC_RX_128_TO_255_PKTS  0x27 /* enum */
3976 #define MC_CMD_MAC_RX_256_TO_511_PKTS  0x28 /* enum */
3977 #define MC_CMD_MAC_RX_512_TO_1023_PKTS  0x29 /* enum */
3978 #define MC_CMD_MAC_RX_1024_TO_15XX_PKTS  0x2a /* enum */
3979 #define MC_CMD_MAC_RX_15XX_TO_JUMBO_PKTS  0x2b /* enum */
3980 #define MC_CMD_MAC_RX_GTJUMBO_PKTS  0x2c /* enum */
3981 #define MC_CMD_MAC_RX_UNDERSIZE_PKTS  0x2d /* enum */
3982 #define MC_CMD_MAC_RX_BAD_FCS_PKTS  0x2e /* enum */
3983 #define MC_CMD_MAC_RX_OVERFLOW_PKTS  0x2f /* enum */
3984 #define MC_CMD_MAC_RX_FALSE_CARRIER_PKTS  0x30 /* enum */
3985 #define MC_CMD_MAC_RX_SYMBOL_ERROR_PKTS  0x31 /* enum */
3986 #define MC_CMD_MAC_RX_ALIGN_ERROR_PKTS  0x32 /* enum */
3987 #define MC_CMD_MAC_RX_LENGTH_ERROR_PKTS  0x33 /* enum */
3988 #define MC_CMD_MAC_RX_INTERNAL_ERROR_PKTS  0x34 /* enum */
3989 #define MC_CMD_MAC_RX_JABBER_PKTS  0x35 /* enum */
3990 #define MC_CMD_MAC_RX_NODESC_DROPS  0x36 /* enum */
3991 #define MC_CMD_MAC_RX_LANES01_CHAR_ERR  0x37 /* enum */
3992 #define MC_CMD_MAC_RX_LANES23_CHAR_ERR  0x38 /* enum */
3993 #define MC_CMD_MAC_RX_LANES01_DISP_ERR  0x39 /* enum */
3994 #define MC_CMD_MAC_RX_LANES23_DISP_ERR  0x3a /* enum */
3995 #define MC_CMD_MAC_RX_MATCH_FAULT  0x3b /* enum */
3996 /* enum: PM trunc_bb_overflow counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
3997  * capability only.
3998  */
3999 #define MC_CMD_MAC_PM_TRUNC_BB_OVERFLOW  0x3c
4000 /* enum: PM discard_bb_overflow counter. Valid for EF10 with
4001  * PM_AND_RXDP_COUNTERS capability only.
4002  */
4003 #define MC_CMD_MAC_PM_DISCARD_BB_OVERFLOW  0x3d
4004 /* enum: PM trunc_vfifo_full counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
4005  * capability only.
4006  */
4007 #define MC_CMD_MAC_PM_TRUNC_VFIFO_FULL  0x3e
4008 /* enum: PM discard_vfifo_full counter. Valid for EF10 with
4009  * PM_AND_RXDP_COUNTERS capability only.
4010  */
4011 #define MC_CMD_MAC_PM_DISCARD_VFIFO_FULL  0x3f
4012 /* enum: PM trunc_qbb counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
4013  * capability only.
4014  */
4015 #define MC_CMD_MAC_PM_TRUNC_QBB  0x40
4016 /* enum: PM discard_qbb counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
4017  * capability only.
4018  */
4019 #define MC_CMD_MAC_PM_DISCARD_QBB  0x41
4020 /* enum: PM discard_mapping counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
4021  * capability only.
4022  */
4023 #define MC_CMD_MAC_PM_DISCARD_MAPPING  0x42
4024 /* enum: RXDP counter: Number of packets dropped due to the queue being
4025  * disabled. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only.
4026  */
4027 #define MC_CMD_MAC_RXDP_Q_DISABLED_PKTS  0x43
4028 /* enum: RXDP counter: Number of packets dropped by the DICPU. Valid for EF10
4029  * with PM_AND_RXDP_COUNTERS capability only.
4030  */
4031 #define MC_CMD_MAC_RXDP_DI_DROPPED_PKTS  0x45
4032 /* enum: RXDP counter: Number of non-host packets. Valid for EF10 with
4033  * PM_AND_RXDP_COUNTERS capability only.
4034  */
4035 #define MC_CMD_MAC_RXDP_STREAMING_PKTS  0x46
4036 /* enum: RXDP counter: Number of times an hlb descriptor fetch was performed.
4037  * Valid for EF10 with PM_AND_RXDP_COUNTERS capability only.
4038  */
4039 #define MC_CMD_MAC_RXDP_HLB_FETCH_CONDITIONS  0x47
4040 /* enum: RXDP counter: Number of times the DPCPU waited for an existing
4041  * descriptor fetch. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only.
4042  */
4043 #define MC_CMD_MAC_RXDP_HLB_WAIT_CONDITIONS  0x48
4044 #define MC_CMD_MAC_VADAPTER_RX_DMABUF_START  0x4c /* enum */
4045 #define MC_CMD_MAC_VADAPTER_RX_UNICAST_PACKETS  0x4c /* enum */
4046 #define MC_CMD_MAC_VADAPTER_RX_UNICAST_BYTES  0x4d /* enum */
4047 #define MC_CMD_MAC_VADAPTER_RX_MULTICAST_PACKETS  0x4e /* enum */
4048 #define MC_CMD_MAC_VADAPTER_RX_MULTICAST_BYTES  0x4f /* enum */
4049 #define MC_CMD_MAC_VADAPTER_RX_BROADCAST_PACKETS  0x50 /* enum */
4050 #define MC_CMD_MAC_VADAPTER_RX_BROADCAST_BYTES  0x51 /* enum */
4051 #define MC_CMD_MAC_VADAPTER_RX_BAD_PACKETS  0x52 /* enum */
4052 #define MC_CMD_MAC_VADAPTER_RX_BAD_BYTES  0x53 /* enum */
4053 #define MC_CMD_MAC_VADAPTER_RX_OVERFLOW  0x54 /* enum */
4054 #define MC_CMD_MAC_VADAPTER_TX_DMABUF_START  0x57 /* enum */
4055 #define MC_CMD_MAC_VADAPTER_TX_UNICAST_PACKETS  0x57 /* enum */
4056 #define MC_CMD_MAC_VADAPTER_TX_UNICAST_BYTES  0x58 /* enum */
4057 #define MC_CMD_MAC_VADAPTER_TX_MULTICAST_PACKETS  0x59 /* enum */
4058 #define MC_CMD_MAC_VADAPTER_TX_MULTICAST_BYTES  0x5a /* enum */
4059 #define MC_CMD_MAC_VADAPTER_TX_BROADCAST_PACKETS  0x5b /* enum */
4060 #define MC_CMD_MAC_VADAPTER_TX_BROADCAST_BYTES  0x5c /* enum */
4061 #define MC_CMD_MAC_VADAPTER_TX_BAD_PACKETS  0x5d /* enum */
4062 #define MC_CMD_MAC_VADAPTER_TX_BAD_BYTES  0x5e /* enum */
4063 #define MC_CMD_MAC_VADAPTER_TX_OVERFLOW  0x5f /* enum */
4064 /* enum: Start of GMAC stats buffer space, for Siena only. */
4065 #define MC_CMD_GMAC_DMABUF_START  0x40
4066 /* enum: End of GMAC stats buffer space, for Siena only. */
4067 #define MC_CMD_GMAC_DMABUF_END    0x5f
4068 /* enum: GENERATION_END value, used together with GENERATION_START to verify
4069  * consistency of DMAd data. For legacy firmware / drivers without extended
4070  * stats (more precisely, when DMA_LEN == MC_CMD_MAC_NSTATS *
4071  * sizeof(uint64_t)), this entry holds the GENERATION_END value. Otherwise,
4072  * this value is invalid/ reserved and GENERATION_END is written as the last
4073  * 64-bit word of the DMA buffer (at DMA_LEN - sizeof(uint64_t)). Note that
4074  * this is consistent with the legacy behaviour, in the sense that entry 96 is
4075  * the last 64-bit word in the buffer when DMA_LEN == MC_CMD_MAC_NSTATS *
4076  * sizeof(uint64_t). See SF-109306-TC, Section 9.2 for details.
4077  */
4078 #define MC_CMD_MAC_GENERATION_END 0x60
4079 #define MC_CMD_MAC_NSTATS  0x61 /* enum */
4080
4081 /* MC_CMD_MAC_STATS_V2_OUT_DMA msgresponse */
4082 #define MC_CMD_MAC_STATS_V2_OUT_DMA_LEN 0
4083
4084 /* MC_CMD_MAC_STATS_V2_OUT_NO_DMA msgresponse */
4085 #define MC_CMD_MAC_STATS_V2_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS_V2*64))>>3)
4086 #define MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_OFST 0
4087 #define MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_LEN 8
4088 #define MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_LO_OFST 0
4089 #define MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_HI_OFST 4
4090 #define MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS_V2
4091 /* enum: Start of FEC stats buffer space, Medford2 and up */
4092 #define MC_CMD_MAC_FEC_DMABUF_START  0x61
4093 /* enum: Number of uncorrected FEC codewords on link (RS-FEC only for Medford2)
4094  */
4095 #define MC_CMD_MAC_FEC_UNCORRECTED_ERRORS  0x61
4096 /* enum: Number of corrected FEC codewords on link (RS-FEC only for Medford2)
4097  */
4098 #define MC_CMD_MAC_FEC_CORRECTED_ERRORS  0x62
4099 /* enum: Number of corrected 10-bit symbol errors, lane 0 (RS-FEC only) */
4100 #define MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE0  0x63
4101 /* enum: Number of corrected 10-bit symbol errors, lane 1 (RS-FEC only) */
4102 #define MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE1  0x64
4103 /* enum: Number of corrected 10-bit symbol errors, lane 2 (RS-FEC only) */
4104 #define MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE2  0x65
4105 /* enum: Number of corrected 10-bit symbol errors, lane 3 (RS-FEC only) */
4106 #define MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE3  0x66
4107 /* enum: This includes the space at offset 103 which is the final
4108  * GENERATION_END in a MAC_STATS_V2 response and otherwise unused.
4109  */
4110 #define MC_CMD_MAC_NSTATS_V2  0x68
4111 /*            Other enum values, see field(s): */
4112 /*               MC_CMD_MAC_STATS_OUT_NO_DMA/STATISTICS */
4113
4114 /* MC_CMD_MAC_STATS_V3_OUT_DMA msgresponse */
4115 #define MC_CMD_MAC_STATS_V3_OUT_DMA_LEN 0
4116
4117 /* MC_CMD_MAC_STATS_V3_OUT_NO_DMA msgresponse */
4118 #define MC_CMD_MAC_STATS_V3_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS_V3*64))>>3)
4119 #define MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_OFST 0
4120 #define MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_LEN 8
4121 #define MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_LO_OFST 0
4122 #define MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_HI_OFST 4
4123 #define MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS_V3
4124 /* enum: Start of CTPIO stats buffer space, Medford2 and up */
4125 #define MC_CMD_MAC_CTPIO_DMABUF_START  0x68
4126 /* enum: Number of CTPIO fallbacks because a DMA packet was in progress on the
4127  * target VI
4128  */
4129 #define MC_CMD_MAC_CTPIO_VI_BUSY_FALLBACK  0x68
4130 /* enum: Number of times a CTPIO send wrote beyond frame end (informational
4131  * only)
4132  */
4133 #define MC_CMD_MAC_CTPIO_LONG_WRITE_SUCCESS  0x69
4134 /* enum: Number of CTPIO failures because the TX doorbell was written before
4135  * the end of the frame data
4136  */
4137 #define MC_CMD_MAC_CTPIO_MISSING_DBELL_FAIL  0x6a
4138 /* enum: Number of CTPIO failures because the internal FIFO overflowed */
4139 #define MC_CMD_MAC_CTPIO_OVERFLOW_FAIL  0x6b
4140 /* enum: Number of CTPIO failures because the host did not deliver data fast
4141  * enough to avoid MAC underflow
4142  */
4143 #define MC_CMD_MAC_CTPIO_UNDERFLOW_FAIL  0x6c
4144 /* enum: Number of CTPIO failures because the host did not deliver all the
4145  * frame data within the timeout
4146  */
4147 #define MC_CMD_MAC_CTPIO_TIMEOUT_FAIL  0x6d
4148 /* enum: Number of CTPIO failures because the frame data arrived out of order
4149  * or with gaps
4150  */
4151 #define MC_CMD_MAC_CTPIO_NONCONTIG_WR_FAIL  0x6e
4152 /* enum: Number of CTPIO failures because the host started a new frame before
4153  * completing the previous one
4154  */
4155 #define MC_CMD_MAC_CTPIO_FRM_CLOBBER_FAIL  0x6f
4156 /* enum: Number of CTPIO failures because a write was not a multiple of 32 bits
4157  * or not 32-bit aligned
4158  */
4159 #define MC_CMD_MAC_CTPIO_INVALID_WR_FAIL  0x70
4160 /* enum: Number of CTPIO fallbacks because another VI on the same port was
4161  * sending a CTPIO frame
4162  */
4163 #define MC_CMD_MAC_CTPIO_VI_CLOBBER_FALLBACK  0x71
4164 /* enum: Number of CTPIO fallbacks because target VI did not have CTPIO enabled
4165  */
4166 #define MC_CMD_MAC_CTPIO_UNQUALIFIED_FALLBACK  0x72
4167 /* enum: Number of CTPIO fallbacks because length in header was less than 29
4168  * bytes
4169  */
4170 #define MC_CMD_MAC_CTPIO_RUNT_FALLBACK  0x73
4171 /* enum: Total number of successful CTPIO sends on this port */
4172 #define MC_CMD_MAC_CTPIO_SUCCESS  0x74
4173 /* enum: Total number of CTPIO fallbacks on this port */
4174 #define MC_CMD_MAC_CTPIO_FALLBACK  0x75
4175 /* enum: Total number of CTPIO poisoned frames on this port, whether erased or
4176  * not
4177  */
4178 #define MC_CMD_MAC_CTPIO_POISON  0x76
4179 /* enum: Total number of CTPIO erased frames on this port */
4180 #define MC_CMD_MAC_CTPIO_ERASE  0x77
4181 /* enum: This includes the space at offset 120 which is the final
4182  * GENERATION_END in a MAC_STATS_V3 response and otherwise unused.
4183  */
4184 #define MC_CMD_MAC_NSTATS_V3  0x79
4185 /*            Other enum values, see field(s): */
4186 /*               MC_CMD_MAC_STATS_V2_OUT_NO_DMA/STATISTICS */
4187
4188
4189 /***********************************/
4190 /* MC_CMD_SRIOV
4191  * to be documented
4192  */
4193 #define MC_CMD_SRIOV 0x30
4194
4195 /* MC_CMD_SRIOV_IN msgrequest */
4196 #define MC_CMD_SRIOV_IN_LEN 12
4197 #define MC_CMD_SRIOV_IN_ENABLE_OFST 0
4198 #define MC_CMD_SRIOV_IN_ENABLE_LEN 4
4199 #define MC_CMD_SRIOV_IN_VI_BASE_OFST 4
4200 #define MC_CMD_SRIOV_IN_VI_BASE_LEN 4
4201 #define MC_CMD_SRIOV_IN_VF_COUNT_OFST 8
4202 #define MC_CMD_SRIOV_IN_VF_COUNT_LEN 4
4203
4204 /* MC_CMD_SRIOV_OUT msgresponse */
4205 #define MC_CMD_SRIOV_OUT_LEN 8
4206 #define MC_CMD_SRIOV_OUT_VI_SCALE_OFST 0
4207 #define MC_CMD_SRIOV_OUT_VI_SCALE_LEN 4
4208 #define MC_CMD_SRIOV_OUT_VF_TOTAL_OFST 4
4209 #define MC_CMD_SRIOV_OUT_VF_TOTAL_LEN 4
4210
4211 /* MC_CMD_MEMCPY_RECORD_TYPEDEF structuredef */
4212 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LEN 32
4213 /* this is only used for the first record */
4214 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_OFST 0
4215 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_LEN 4
4216 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_LBN 0
4217 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_WIDTH 32
4218 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_OFST 4
4219 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_LEN 4
4220 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_LBN 32
4221 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_WIDTH 32
4222 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_OFST 8
4223 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LEN 8
4224 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LO_OFST 8
4225 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_HI_OFST 12
4226 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LBN 64
4227 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_WIDTH 64
4228 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_OFST 16
4229 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_LEN 4
4230 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_RID_INLINE 0x100 /* enum */
4231 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_LBN 128
4232 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_WIDTH 32
4233 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_OFST 20
4234 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LEN 8
4235 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LO_OFST 20
4236 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_HI_OFST 24
4237 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LBN 160
4238 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_WIDTH 64
4239 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_OFST 28
4240 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_LEN 4
4241 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_LBN 224
4242 #define MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_WIDTH 32
4243
4244
4245 /***********************************/
4246 /* MC_CMD_MEMCPY
4247  * DMA write data into (Rid,Addr), either by dma reading (Rid,Addr), or by data
4248  * embedded directly in the command.
4249  *
4250  * A common pattern is for a client to use generation counts to signal a dma
4251  * update of a datastructure. To facilitate this, this MCDI operation can
4252  * contain multiple requests which are executed in strict order. Requests take
4253  * the form of duplicating the entire MCDI request continuously (including the
4254  * requests record, which is ignored in all but the first structure)
4255  *
4256  * The source data can either come from a DMA from the host, or it can be
4257  * embedded within the request directly, thereby eliminating a DMA read. To
4258  * indicate this, the client sets FROM_RID=%RID_INLINE, ADDR_HI=0, and
4259  * ADDR_LO=offset, and inserts the data at %offset from the start of the
4260  * payload. It's the callers responsibility to ensure that the embedded data
4261  * doesn't overlap the records.
4262  *
4263  * Returns: 0, EINVAL (invalid RID)
4264  */
4265 #define MC_CMD_MEMCPY 0x31
4266
4267 /* MC_CMD_MEMCPY_IN msgrequest */
4268 #define MC_CMD_MEMCPY_IN_LENMIN 32
4269 #define MC_CMD_MEMCPY_IN_LENMAX 224
4270 #define MC_CMD_MEMCPY_IN_LEN(num) (0+32*(num))
4271 /* see MC_CMD_MEMCPY_RECORD_TYPEDEF */
4272 #define MC_CMD_MEMCPY_IN_RECORD_OFST 0
4273 #define MC_CMD_MEMCPY_IN_RECORD_LEN 32
4274 #define MC_CMD_MEMCPY_IN_RECORD_MINNUM 1
4275 #define MC_CMD_MEMCPY_IN_RECORD_MAXNUM 7
4276
4277 /* MC_CMD_MEMCPY_OUT msgresponse */
4278 #define MC_CMD_MEMCPY_OUT_LEN 0
4279
4280
4281 /***********************************/
4282 /* MC_CMD_WOL_FILTER_SET
4283  * Set a WoL filter.
4284  */
4285 #define MC_CMD_WOL_FILTER_SET 0x32
4286 #undef  MC_CMD_0x32_PRIVILEGE_CTG
4287
4288 #define MC_CMD_0x32_PRIVILEGE_CTG SRIOV_CTG_LINK
4289
4290 /* MC_CMD_WOL_FILTER_SET_IN msgrequest */
4291 #define MC_CMD_WOL_FILTER_SET_IN_LEN 192
4292 #define MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0
4293 #define MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4
4294 #define MC_CMD_FILTER_MODE_SIMPLE    0x0 /* enum */
4295 #define MC_CMD_FILTER_MODE_STRUCTURED 0xffffffff /* enum */
4296 /* A type value of 1 is unused. */
4297 #define MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4
4298 #define MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4
4299 /* enum: Magic */
4300 #define MC_CMD_WOL_TYPE_MAGIC      0x0
4301 /* enum: MS Windows Magic */
4302 #define MC_CMD_WOL_TYPE_WIN_MAGIC 0x2
4303 /* enum: IPv4 Syn */
4304 #define MC_CMD_WOL_TYPE_IPV4_SYN   0x3
4305 /* enum: IPv6 Syn */
4306 #define MC_CMD_WOL_TYPE_IPV6_SYN   0x4
4307 /* enum: Bitmap */
4308 #define MC_CMD_WOL_TYPE_BITMAP     0x5
4309 /* enum: Link */
4310 #define MC_CMD_WOL_TYPE_LINK       0x6
4311 /* enum: (Above this for future use) */
4312 #define MC_CMD_WOL_TYPE_MAX        0x7
4313 #define MC_CMD_WOL_FILTER_SET_IN_DATA_OFST 8
4314 #define MC_CMD_WOL_FILTER_SET_IN_DATA_LEN 4
4315 #define MC_CMD_WOL_FILTER_SET_IN_DATA_NUM 46
4316
4317 /* MC_CMD_WOL_FILTER_SET_IN_MAGIC msgrequest */
4318 #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_LEN 16
4319 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
4320 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
4321 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
4322 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
4323 #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_OFST 8
4324 #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_LEN 8
4325 #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_LO_OFST 8
4326 #define MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_HI_OFST 12
4327
4328 /* MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN msgrequest */
4329 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_LEN 20
4330 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
4331 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
4332 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
4333 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
4334 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_IP_OFST 8
4335 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_IP_LEN 4
4336 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_IP_OFST 12
4337 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_IP_LEN 4
4338 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_PORT_OFST 16
4339 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_PORT_LEN 2
4340 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_PORT_OFST 18
4341 #define MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_PORT_LEN 2
4342
4343 /* MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN msgrequest */
4344 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_LEN 44
4345 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
4346 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
4347 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
4348 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
4349 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_IP_OFST 8
4350 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_IP_LEN 16
4351 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_IP_OFST 24
4352 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_IP_LEN 16
4353 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_PORT_OFST 40
4354 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_PORT_LEN 2
4355 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_PORT_OFST 42
4356 #define MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_PORT_LEN 2
4357
4358 /* MC_CMD_WOL_FILTER_SET_IN_BITMAP msgrequest */
4359 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN 187
4360 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
4361 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
4362 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
4363 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
4364 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_MASK_OFST 8
4365 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_MASK_LEN 48
4366 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_BITMAP_OFST 56
4367 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_BITMAP_LEN 128
4368 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN_OFST 184
4369 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN_LEN 1
4370 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER3_OFST 185
4371 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER3_LEN 1
4372 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER4_OFST 186
4373 #define MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER4_LEN 1
4374
4375 /* MC_CMD_WOL_FILTER_SET_IN_LINK msgrequest */
4376 #define MC_CMD_WOL_FILTER_SET_IN_LINK_LEN 12
4377 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
4378 /*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
4379 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
4380 /*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
4381 #define MC_CMD_WOL_FILTER_SET_IN_LINK_MASK_OFST 8
4382 #define MC_CMD_WOL_FILTER_SET_IN_LINK_MASK_LEN 4
4383 #define MC_CMD_WOL_FILTER_SET_IN_LINK_UP_LBN 0
4384 #define MC_CMD_WOL_FILTER_SET_IN_LINK_UP_WIDTH 1
4385 #define MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_LBN 1
4386 #define MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_WIDTH 1
4387
4388 /* MC_CMD_WOL_FILTER_SET_OUT msgresponse */
4389 #define MC_CMD_WOL_FILTER_SET_OUT_LEN 4
4390 #define MC_CMD_WOL_FILTER_SET_OUT_FILTER_ID_OFST 0
4391 #define MC_CMD_WOL_FILTER_SET_OUT_FILTER_ID_LEN 4
4392
4393
4394 /***********************************/
4395 /* MC_CMD_WOL_FILTER_REMOVE
4396  * Remove a WoL filter. Locks required: None. Returns: 0, EINVAL, ENOSYS
4397  */
4398 #define MC_CMD_WOL_FILTER_REMOVE 0x33
4399 #undef  MC_CMD_0x33_PRIVILEGE_CTG
4400
4401 #define MC_CMD_0x33_PRIVILEGE_CTG SRIOV_CTG_LINK
4402
4403 /* MC_CMD_WOL_FILTER_REMOVE_IN msgrequest */
4404 #define MC_CMD_WOL_FILTER_REMOVE_IN_LEN 4
4405 #define MC_CMD_WOL_FILTER_REMOVE_IN_FILTER_ID_OFST 0
4406 #define MC_CMD_WOL_FILTER_REMOVE_IN_FILTER_ID_LEN 4
4407
4408 /* MC_CMD_WOL_FILTER_REMOVE_OUT msgresponse */
4409 #define MC_CMD_WOL_FILTER_REMOVE_OUT_LEN 0
4410
4411
4412 /***********************************/
4413 /* MC_CMD_WOL_FILTER_RESET
4414  * Reset (i.e. remove all) WoL filters. Locks required: None. Returns: 0,
4415  * ENOSYS
4416  */
4417 #define MC_CMD_WOL_FILTER_RESET 0x34
4418 #undef  MC_CMD_0x34_PRIVILEGE_CTG
4419
4420 #define MC_CMD_0x34_PRIVILEGE_CTG SRIOV_CTG_LINK
4421
4422 /* MC_CMD_WOL_FILTER_RESET_IN msgrequest */
4423 #define MC_CMD_WOL_FILTER_RESET_IN_LEN 4
4424 #define MC_CMD_WOL_FILTER_RESET_IN_MASK_OFST 0
4425 #define MC_CMD_WOL_FILTER_RESET_IN_MASK_LEN 4
4426 #define MC_CMD_WOL_FILTER_RESET_IN_WAKE_FILTERS 0x1 /* enum */
4427 #define MC_CMD_WOL_FILTER_RESET_IN_LIGHTSOUT_OFFLOADS 0x2 /* enum */
4428
4429 /* MC_CMD_WOL_FILTER_RESET_OUT msgresponse */
4430 #define MC_CMD_WOL_FILTER_RESET_OUT_LEN 0
4431
4432
4433 /***********************************/
4434 /* MC_CMD_SET_MCAST_HASH
4435  * Set the MCAST hash value without otherwise reconfiguring the MAC
4436  */
4437 #define MC_CMD_SET_MCAST_HASH 0x35
4438
4439 /* MC_CMD_SET_MCAST_HASH_IN msgrequest */
4440 #define MC_CMD_SET_MCAST_HASH_IN_LEN 32
4441 #define MC_CMD_SET_MCAST_HASH_IN_HASH0_OFST 0
4442 #define MC_CMD_SET_MCAST_HASH_IN_HASH0_LEN 16
4443 #define MC_CMD_SET_MCAST_HASH_IN_HASH1_OFST 16
4444 #define MC_CMD_SET_MCAST_HASH_IN_HASH1_LEN 16
4445
4446 /* MC_CMD_SET_MCAST_HASH_OUT msgresponse */
4447 #define MC_CMD_SET_MCAST_HASH_OUT_LEN 0
4448
4449
4450 /***********************************/
4451 /* MC_CMD_NVRAM_TYPES
4452  * Return bitfield indicating available types of virtual NVRAM partitions.
4453  * Locks required: none. Returns: 0
4454  */
4455 #define MC_CMD_NVRAM_TYPES 0x36
4456 #undef  MC_CMD_0x36_PRIVILEGE_CTG
4457
4458 #define MC_CMD_0x36_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4459
4460 /* MC_CMD_NVRAM_TYPES_IN msgrequest */
4461 #define MC_CMD_NVRAM_TYPES_IN_LEN 0
4462
4463 /* MC_CMD_NVRAM_TYPES_OUT msgresponse */
4464 #define MC_CMD_NVRAM_TYPES_OUT_LEN 4
4465 /* Bit mask of supported types. */
4466 #define MC_CMD_NVRAM_TYPES_OUT_TYPES_OFST 0
4467 #define MC_CMD_NVRAM_TYPES_OUT_TYPES_LEN 4
4468 /* enum: Disabled callisto. */
4469 #define MC_CMD_NVRAM_TYPE_DISABLED_CALLISTO 0x0
4470 /* enum: MC firmware. */
4471 #define MC_CMD_NVRAM_TYPE_MC_FW 0x1
4472 /* enum: MC backup firmware. */
4473 #define MC_CMD_NVRAM_TYPE_MC_FW_BACKUP 0x2
4474 /* enum: Static configuration Port0. */
4475 #define MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT0 0x3
4476 /* enum: Static configuration Port1. */
4477 #define MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT1 0x4
4478 /* enum: Dynamic configuration Port0. */
4479 #define MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT0 0x5
4480 /* enum: Dynamic configuration Port1. */
4481 #define MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1 0x6
4482 /* enum: Expansion Rom. */
4483 #define MC_CMD_NVRAM_TYPE_EXP_ROM 0x7
4484 /* enum: Expansion Rom Configuration Port0. */
4485 #define MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT0 0x8
4486 /* enum: Expansion Rom Configuration Port1. */
4487 #define MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1 0x9
4488 /* enum: Phy Configuration Port0. */
4489 #define MC_CMD_NVRAM_TYPE_PHY_PORT0 0xa
4490 /* enum: Phy Configuration Port1. */
4491 #define MC_CMD_NVRAM_TYPE_PHY_PORT1 0xb
4492 /* enum: Log. */
4493 #define MC_CMD_NVRAM_TYPE_LOG 0xc
4494 /* enum: FPGA image. */
4495 #define MC_CMD_NVRAM_TYPE_FPGA 0xd
4496 /* enum: FPGA backup image */
4497 #define MC_CMD_NVRAM_TYPE_FPGA_BACKUP 0xe
4498 /* enum: FC firmware. */
4499 #define MC_CMD_NVRAM_TYPE_FC_FW 0xf
4500 /* enum: FC backup firmware. */
4501 #define MC_CMD_NVRAM_TYPE_FC_FW_BACKUP 0x10
4502 /* enum: CPLD image. */
4503 #define MC_CMD_NVRAM_TYPE_CPLD 0x11
4504 /* enum: Licensing information. */
4505 #define MC_CMD_NVRAM_TYPE_LICENSE 0x12
4506 /* enum: FC Log. */
4507 #define MC_CMD_NVRAM_TYPE_FC_LOG 0x13
4508 /* enum: Additional flash on FPGA. */
4509 #define MC_CMD_NVRAM_TYPE_FC_EXTRA 0x14
4510
4511
4512 /***********************************/
4513 /* MC_CMD_NVRAM_INFO
4514  * Read info about a virtual NVRAM partition. Locks required: none. Returns: 0,
4515  * EINVAL (bad type).
4516  */
4517 #define MC_CMD_NVRAM_INFO 0x37
4518 #undef  MC_CMD_0x37_PRIVILEGE_CTG
4519
4520 #define MC_CMD_0x37_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4521
4522 /* MC_CMD_NVRAM_INFO_IN msgrequest */
4523 #define MC_CMD_NVRAM_INFO_IN_LEN 4
4524 #define MC_CMD_NVRAM_INFO_IN_TYPE_OFST 0
4525 #define MC_CMD_NVRAM_INFO_IN_TYPE_LEN 4
4526 /*            Enum values, see field(s): */
4527 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4528
4529 /* MC_CMD_NVRAM_INFO_OUT msgresponse */
4530 #define MC_CMD_NVRAM_INFO_OUT_LEN 24
4531 #define MC_CMD_NVRAM_INFO_OUT_TYPE_OFST 0
4532 #define MC_CMD_NVRAM_INFO_OUT_TYPE_LEN 4
4533 /*            Enum values, see field(s): */
4534 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4535 #define MC_CMD_NVRAM_INFO_OUT_SIZE_OFST 4
4536 #define MC_CMD_NVRAM_INFO_OUT_SIZE_LEN 4
4537 #define MC_CMD_NVRAM_INFO_OUT_ERASESIZE_OFST 8
4538 #define MC_CMD_NVRAM_INFO_OUT_ERASESIZE_LEN 4
4539 #define MC_CMD_NVRAM_INFO_OUT_FLAGS_OFST 12
4540 #define MC_CMD_NVRAM_INFO_OUT_FLAGS_LEN 4
4541 #define MC_CMD_NVRAM_INFO_OUT_PROTECTED_LBN 0
4542 #define MC_CMD_NVRAM_INFO_OUT_PROTECTED_WIDTH 1
4543 #define MC_CMD_NVRAM_INFO_OUT_TLV_LBN 1
4544 #define MC_CMD_NVRAM_INFO_OUT_TLV_WIDTH 1
4545 #define MC_CMD_NVRAM_INFO_OUT_READ_ONLY_LBN 5
4546 #define MC_CMD_NVRAM_INFO_OUT_READ_ONLY_WIDTH 1
4547 #define MC_CMD_NVRAM_INFO_OUT_CMAC_LBN 6
4548 #define MC_CMD_NVRAM_INFO_OUT_CMAC_WIDTH 1
4549 #define MC_CMD_NVRAM_INFO_OUT_A_B_LBN 7
4550 #define MC_CMD_NVRAM_INFO_OUT_A_B_WIDTH 1
4551 #define MC_CMD_NVRAM_INFO_OUT_PHYSDEV_OFST 16
4552 #define MC_CMD_NVRAM_INFO_OUT_PHYSDEV_LEN 4
4553 #define MC_CMD_NVRAM_INFO_OUT_PHYSADDR_OFST 20
4554 #define MC_CMD_NVRAM_INFO_OUT_PHYSADDR_LEN 4
4555
4556 /* MC_CMD_NVRAM_INFO_V2_OUT msgresponse */
4557 #define MC_CMD_NVRAM_INFO_V2_OUT_LEN 28
4558 #define MC_CMD_NVRAM_INFO_V2_OUT_TYPE_OFST 0
4559 #define MC_CMD_NVRAM_INFO_V2_OUT_TYPE_LEN 4
4560 /*            Enum values, see field(s): */
4561 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4562 #define MC_CMD_NVRAM_INFO_V2_OUT_SIZE_OFST 4
4563 #define MC_CMD_NVRAM_INFO_V2_OUT_SIZE_LEN 4
4564 #define MC_CMD_NVRAM_INFO_V2_OUT_ERASESIZE_OFST 8
4565 #define MC_CMD_NVRAM_INFO_V2_OUT_ERASESIZE_LEN 4
4566 #define MC_CMD_NVRAM_INFO_V2_OUT_FLAGS_OFST 12
4567 #define MC_CMD_NVRAM_INFO_V2_OUT_FLAGS_LEN 4
4568 #define MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_LBN 0
4569 #define MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_WIDTH 1
4570 #define MC_CMD_NVRAM_INFO_V2_OUT_TLV_LBN 1
4571 #define MC_CMD_NVRAM_INFO_V2_OUT_TLV_WIDTH 1
4572 #define MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_LBN 5
4573 #define MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_WIDTH 1
4574 #define MC_CMD_NVRAM_INFO_V2_OUT_A_B_LBN 7
4575 #define MC_CMD_NVRAM_INFO_V2_OUT_A_B_WIDTH 1
4576 #define MC_CMD_NVRAM_INFO_V2_OUT_PHYSDEV_OFST 16
4577 #define MC_CMD_NVRAM_INFO_V2_OUT_PHYSDEV_LEN 4
4578 #define MC_CMD_NVRAM_INFO_V2_OUT_PHYSADDR_OFST 20
4579 #define MC_CMD_NVRAM_INFO_V2_OUT_PHYSADDR_LEN 4
4580 /* Writes must be multiples of this size. Added to support the MUM on Sorrento.
4581  */
4582 #define MC_CMD_NVRAM_INFO_V2_OUT_WRITESIZE_OFST 24
4583 #define MC_CMD_NVRAM_INFO_V2_OUT_WRITESIZE_LEN 4
4584
4585
4586 /***********************************/
4587 /* MC_CMD_NVRAM_UPDATE_START
4588  * Start a group of update operations on a virtual NVRAM partition. Locks
4589  * required: PHY_LOCK if type==*PHY*. Returns: 0, EINVAL (bad type), EACCES (if
4590  * PHY_LOCK required and not held).
4591  */
4592 #define MC_CMD_NVRAM_UPDATE_START 0x38
4593 #undef  MC_CMD_0x38_PRIVILEGE_CTG
4594
4595 #define MC_CMD_0x38_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4596
4597 /* MC_CMD_NVRAM_UPDATE_START_IN msgrequest: Legacy NVRAM_UPDATE_START request.
4598  * Use NVRAM_UPDATE_START_V2_IN in new code
4599  */
4600 #define MC_CMD_NVRAM_UPDATE_START_IN_LEN 4
4601 #define MC_CMD_NVRAM_UPDATE_START_IN_TYPE_OFST 0
4602 #define MC_CMD_NVRAM_UPDATE_START_IN_TYPE_LEN 4
4603 /*            Enum values, see field(s): */
4604 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4605
4606 /* MC_CMD_NVRAM_UPDATE_START_V2_IN msgrequest: Extended NVRAM_UPDATE_START
4607  * request with additional flags indicating version of command in use. See
4608  * MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT for details of extended functionality. Use
4609  * paired up with NVRAM_UPDATE_FINISH_V2_IN.
4610  */
4611 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_LEN 8
4612 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_TYPE_OFST 0
4613 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_TYPE_LEN 4
4614 /*            Enum values, see field(s): */
4615 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4616 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAGS_OFST 4
4617 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAGS_LEN 4
4618 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAG_REPORT_VERIFY_RESULT_LBN 0
4619 #define MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAG_REPORT_VERIFY_RESULT_WIDTH 1
4620
4621 /* MC_CMD_NVRAM_UPDATE_START_OUT msgresponse */
4622 #define MC_CMD_NVRAM_UPDATE_START_OUT_LEN 0
4623
4624
4625 /***********************************/
4626 /* MC_CMD_NVRAM_READ
4627  * Read data from a virtual NVRAM partition. Locks required: PHY_LOCK if
4628  * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if
4629  * PHY_LOCK required and not held)
4630  */
4631 #define MC_CMD_NVRAM_READ 0x39
4632 #undef  MC_CMD_0x39_PRIVILEGE_CTG
4633
4634 #define MC_CMD_0x39_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4635
4636 /* MC_CMD_NVRAM_READ_IN msgrequest */
4637 #define MC_CMD_NVRAM_READ_IN_LEN 12
4638 #define MC_CMD_NVRAM_READ_IN_TYPE_OFST 0
4639 #define MC_CMD_NVRAM_READ_IN_TYPE_LEN 4
4640 /*            Enum values, see field(s): */
4641 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4642 #define MC_CMD_NVRAM_READ_IN_OFFSET_OFST 4
4643 #define MC_CMD_NVRAM_READ_IN_OFFSET_LEN 4
4644 /* amount to read in bytes */
4645 #define MC_CMD_NVRAM_READ_IN_LENGTH_OFST 8
4646 #define MC_CMD_NVRAM_READ_IN_LENGTH_LEN 4
4647
4648 /* MC_CMD_NVRAM_READ_IN_V2 msgrequest */
4649 #define MC_CMD_NVRAM_READ_IN_V2_LEN 16
4650 #define MC_CMD_NVRAM_READ_IN_V2_TYPE_OFST 0
4651 #define MC_CMD_NVRAM_READ_IN_V2_TYPE_LEN 4
4652 /*            Enum values, see field(s): */
4653 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4654 #define MC_CMD_NVRAM_READ_IN_V2_OFFSET_OFST 4
4655 #define MC_CMD_NVRAM_READ_IN_V2_OFFSET_LEN 4
4656 /* amount to read in bytes */
4657 #define MC_CMD_NVRAM_READ_IN_V2_LENGTH_OFST 8
4658 #define MC_CMD_NVRAM_READ_IN_V2_LENGTH_LEN 4
4659 /* Optional control info. If a partition is stored with an A/B versioning
4660  * scheme (i.e. in more than one physical partition in NVRAM) the host can set
4661  * this to control which underlying physical partition is used to read data
4662  * from. This allows it to perform a read-modify-write-verify with the write
4663  * lock continuously held by calling NVRAM_UPDATE_START, reading the old
4664  * contents using MODE=TARGET_CURRENT, overwriting the old partition and then
4665  * verifying by reading with MODE=TARGET_BACKUP.
4666  */
4667 #define MC_CMD_NVRAM_READ_IN_V2_MODE_OFST 12
4668 #define MC_CMD_NVRAM_READ_IN_V2_MODE_LEN 4
4669 /* enum: Same as omitting MODE: caller sees data in current partition unless it
4670  * holds the write lock in which case it sees data in the partition it is
4671  * updating.
4672  */
4673 #define MC_CMD_NVRAM_READ_IN_V2_DEFAULT 0x0
4674 /* enum: Read from the current partition of an A/B pair, even if holding the
4675  * write lock.
4676  */
4677 #define MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT 0x1
4678 /* enum: Read from the non-current (i.e. to be updated) partition of an A/B
4679  * pair
4680  */
4681 #define MC_CMD_NVRAM_READ_IN_V2_TARGET_BACKUP 0x2
4682
4683 /* MC_CMD_NVRAM_READ_OUT msgresponse */
4684 #define MC_CMD_NVRAM_READ_OUT_LENMIN 1
4685 #define MC_CMD_NVRAM_READ_OUT_LENMAX 252
4686 #define MC_CMD_NVRAM_READ_OUT_LEN(num) (0+1*(num))
4687 #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_OFST 0
4688 #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_LEN 1
4689 #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MINNUM 1
4690 #define MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MAXNUM 252
4691
4692
4693 /***********************************/
4694 /* MC_CMD_NVRAM_WRITE
4695  * Write data to a virtual NVRAM partition. Locks required: PHY_LOCK if
4696  * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if
4697  * PHY_LOCK required and not held)
4698  */
4699 #define MC_CMD_NVRAM_WRITE 0x3a
4700 #undef  MC_CMD_0x3a_PRIVILEGE_CTG
4701
4702 #define MC_CMD_0x3a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4703
4704 /* MC_CMD_NVRAM_WRITE_IN msgrequest */
4705 #define MC_CMD_NVRAM_WRITE_IN_LENMIN 13
4706 #define MC_CMD_NVRAM_WRITE_IN_LENMAX 252
4707 #define MC_CMD_NVRAM_WRITE_IN_LEN(num) (12+1*(num))
4708 #define MC_CMD_NVRAM_WRITE_IN_TYPE_OFST 0
4709 #define MC_CMD_NVRAM_WRITE_IN_TYPE_LEN 4
4710 /*            Enum values, see field(s): */
4711 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4712 #define MC_CMD_NVRAM_WRITE_IN_OFFSET_OFST 4
4713 #define MC_CMD_NVRAM_WRITE_IN_OFFSET_LEN 4
4714 #define MC_CMD_NVRAM_WRITE_IN_LENGTH_OFST 8
4715 #define MC_CMD_NVRAM_WRITE_IN_LENGTH_LEN 4
4716 #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_OFST 12
4717 #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_LEN 1
4718 #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MINNUM 1
4719 #define MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MAXNUM 240
4720
4721 /* MC_CMD_NVRAM_WRITE_OUT msgresponse */
4722 #define MC_CMD_NVRAM_WRITE_OUT_LEN 0
4723
4724
4725 /***********************************/
4726 /* MC_CMD_NVRAM_ERASE
4727  * Erase sector(s) from a virtual NVRAM partition. Locks required: PHY_LOCK if
4728  * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if
4729  * PHY_LOCK required and not held)
4730  */
4731 #define MC_CMD_NVRAM_ERASE 0x3b
4732 #undef  MC_CMD_0x3b_PRIVILEGE_CTG
4733
4734 #define MC_CMD_0x3b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4735
4736 /* MC_CMD_NVRAM_ERASE_IN msgrequest */
4737 #define MC_CMD_NVRAM_ERASE_IN_LEN 12
4738 #define MC_CMD_NVRAM_ERASE_IN_TYPE_OFST 0
4739 #define MC_CMD_NVRAM_ERASE_IN_TYPE_LEN 4
4740 /*            Enum values, see field(s): */
4741 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4742 #define MC_CMD_NVRAM_ERASE_IN_OFFSET_OFST 4
4743 #define MC_CMD_NVRAM_ERASE_IN_OFFSET_LEN 4
4744 #define MC_CMD_NVRAM_ERASE_IN_LENGTH_OFST 8
4745 #define MC_CMD_NVRAM_ERASE_IN_LENGTH_LEN 4
4746
4747 /* MC_CMD_NVRAM_ERASE_OUT msgresponse */
4748 #define MC_CMD_NVRAM_ERASE_OUT_LEN 0
4749
4750
4751 /***********************************/
4752 /* MC_CMD_NVRAM_UPDATE_FINISH
4753  * Finish a group of update operations on a virtual NVRAM partition. Locks
4754  * required: PHY_LOCK if type==*PHY*. Returns: 0, EINVAL (bad
4755  * type/offset/length), EACCES (if PHY_LOCK required and not held)
4756  */
4757 #define MC_CMD_NVRAM_UPDATE_FINISH 0x3c
4758 #undef  MC_CMD_0x3c_PRIVILEGE_CTG
4759
4760 #define MC_CMD_0x3c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4761
4762 /* MC_CMD_NVRAM_UPDATE_FINISH_IN msgrequest: Legacy NVRAM_UPDATE_FINISH
4763  * request. Use NVRAM_UPDATE_FINISH_V2_IN in new code
4764  */
4765 #define MC_CMD_NVRAM_UPDATE_FINISH_IN_LEN 8
4766 #define MC_CMD_NVRAM_UPDATE_FINISH_IN_TYPE_OFST 0
4767 #define MC_CMD_NVRAM_UPDATE_FINISH_IN_TYPE_LEN 4
4768 /*            Enum values, see field(s): */
4769 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4770 #define MC_CMD_NVRAM_UPDATE_FINISH_IN_REBOOT_OFST 4
4771 #define MC_CMD_NVRAM_UPDATE_FINISH_IN_REBOOT_LEN 4
4772
4773 /* MC_CMD_NVRAM_UPDATE_FINISH_V2_IN msgrequest: Extended NVRAM_UPDATE_FINISH
4774  * request with additional flags indicating version of NVRAM_UPDATE commands in
4775  * use. See MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT for details of extended
4776  * functionality. Use paired up with NVRAM_UPDATE_START_V2_IN.
4777  */
4778 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_LEN 12
4779 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_TYPE_OFST 0
4780 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_TYPE_LEN 4
4781 /*            Enum values, see field(s): */
4782 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
4783 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_REBOOT_OFST 4
4784 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_REBOOT_LEN 4
4785 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAGS_OFST 8
4786 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAGS_LEN 4
4787 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_REPORT_VERIFY_RESULT_LBN 0
4788 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_REPORT_VERIFY_RESULT_WIDTH 1
4789
4790 /* MC_CMD_NVRAM_UPDATE_FINISH_OUT msgresponse: Legacy NVRAM_UPDATE_FINISH
4791  * response. Use NVRAM_UPDATE_FINISH_V2_OUT in new code
4792  */
4793 #define MC_CMD_NVRAM_UPDATE_FINISH_OUT_LEN 0
4794
4795 /* MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT msgresponse:
4796  *
4797  * Extended NVRAM_UPDATE_FINISH response that communicates the result of secure
4798  * firmware validation where applicable back to the host.
4799  *
4800  * Medford only: For signed firmware images, such as those for medford, the MC
4801  * firmware verifies the signature before marking the firmware image as valid.
4802  * This process takes a few seconds to complete. So is likely to take more than
4803  * the MCDI timeout. Hence signature verification is initiated when
4804  * MC_CMD_NVRAM_UPDATE_FINISH_V2_IN is received by the firmware, however, the
4805  * MCDI command is run in a background MCDI processing thread. This response
4806  * payload includes the results of the signature verification. Note that the
4807  * per-partition nvram lock in firmware is only released after the verification
4808  * has completed.
4809  */
4810 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_LEN 4
4811 /* Result of nvram update completion processing */
4812 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_RESULT_CODE_OFST 0
4813 #define MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_RESULT_CODE_LEN 4
4814 /* enum: Invalid return code; only non-zero values are defined. Defined as
4815  * unknown for backwards compatibility with NVRAM_UPDATE_FINISH_OUT.
4816  */
4817 #define MC_CMD_NVRAM_VERIFY_RC_UNKNOWN 0x0
4818 /* enum: Verify succeeded without any errors. */
4819 #define MC_CMD_NVRAM_VERIFY_RC_SUCCESS 0x1
4820 /* enum: CMS format verification failed due to an internal error. */
4821 #define MC_CMD_NVRAM_VERIFY_RC_CMS_CHECK_FAILED 0x2
4822 /* enum: Invalid CMS format in image metadata. */
4823 #define MC_CMD_NVRAM_VERIFY_RC_INVALID_CMS_FORMAT 0x3
4824 /* enum: Message digest verification failed due to an internal error. */
4825 #define MC_CMD_NVRAM_VERIFY_RC_MESSAGE_DIGEST_CHECK_FAILED 0x4
4826 /* enum: Error in message digest calculated over the reflash-header, payload
4827  * and reflash-trailer.
4828  */
4829 #define MC_CMD_NVRAM_VERIFY_RC_BAD_MESSAGE_DIGEST 0x5
4830 /* enum: Signature verification failed due to an internal error. */
4831 #define MC_CMD_NVRAM_VERIFY_RC_SIGNATURE_CHECK_FAILED 0x6
4832 /* enum: There are no valid signatures in the image. */
4833 #define MC_CMD_NVRAM_VERIFY_RC_NO_VALID_SIGNATURES 0x7
4834 /* enum: Trusted approvers verification failed due to an internal error. */
4835 #define MC_CMD_NVRAM_VERIFY_RC_TRUSTED_APPROVERS_CHECK_FAILED 0x8
4836 /* enum: The Trusted approver's list is empty. */
4837 #define MC_CMD_NVRAM_VERIFY_RC_NO_TRUSTED_APPROVERS 0x9
4838 /* enum: Signature chain verification failed due to an internal error. */
4839 #define MC_CMD_NVRAM_VERIFY_RC_SIGNATURE_CHAIN_CHECK_FAILED 0xa
4840 /* enum: The signers of the signatures in the image are not listed in the
4841  * Trusted approver's list.
4842  */
4843 #define MC_CMD_NVRAM_VERIFY_RC_NO_SIGNATURE_MATCH 0xb
4844 /* enum: The image contains a test-signed certificate, but the adapter accepts
4845  * only production signed images.
4846  */
4847 #define MC_CMD_NVRAM_VERIFY_RC_REJECT_TEST_SIGNED 0xc
4848 /* enum: The image has a lower security level than the current firmware. */
4849 #define MC_CMD_NVRAM_VERIFY_RC_SECURITY_LEVEL_DOWNGRADE 0xd
4850
4851
4852 /***********************************/
4853 /* MC_CMD_REBOOT
4854  * Reboot the MC.
4855  *
4856  * The AFTER_ASSERTION flag is intended to be used when the driver notices an
4857  * assertion failure (at which point it is expected to perform a complete tear
4858  * down and reinitialise), to allow both ports to reset the MC once in an
4859  * atomic fashion.
4860  *
4861  * Production mc firmwares are generally compiled with REBOOT_ON_ASSERT=1,
4862  * which means that they will automatically reboot out of the assertion
4863  * handler, so this is in practise an optional operation. It is still
4864  * recommended that drivers execute this to support custom firmwares with
4865  * REBOOT_ON_ASSERT=0.
4866  *
4867  * Locks required: NONE Returns: Nothing. You get back a response with ERR=1,
4868  * DATALEN=0
4869  */
4870 #define MC_CMD_REBOOT 0x3d
4871 #undef  MC_CMD_0x3d_PRIVILEGE_CTG
4872
4873 #define MC_CMD_0x3d_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4874
4875 /* MC_CMD_REBOOT_IN msgrequest */
4876 #define MC_CMD_REBOOT_IN_LEN 4
4877 #define MC_CMD_REBOOT_IN_FLAGS_OFST 0
4878 #define MC_CMD_REBOOT_IN_FLAGS_LEN 4
4879 #define MC_CMD_REBOOT_FLAGS_AFTER_ASSERTION 0x1 /* enum */
4880
4881 /* MC_CMD_REBOOT_OUT msgresponse */
4882 #define MC_CMD_REBOOT_OUT_LEN 0
4883
4884
4885 /***********************************/
4886 /* MC_CMD_SCHEDINFO
4887  * Request scheduler info. Locks required: NONE. Returns: An array of
4888  * (timeslice,maximum overrun), one for each thread, in ascending order of
4889  * thread address.
4890  */
4891 #define MC_CMD_SCHEDINFO 0x3e
4892 #undef  MC_CMD_0x3e_PRIVILEGE_CTG
4893
4894 #define MC_CMD_0x3e_PRIVILEGE_CTG SRIOV_CTG_ADMIN
4895
4896 /* MC_CMD_SCHEDINFO_IN msgrequest */
4897 #define MC_CMD_SCHEDINFO_IN_LEN 0
4898
4899 /* MC_CMD_SCHEDINFO_OUT msgresponse */
4900 #define MC_CMD_SCHEDINFO_OUT_LENMIN 4
4901 #define MC_CMD_SCHEDINFO_OUT_LENMAX 252
4902 #define MC_CMD_SCHEDINFO_OUT_LEN(num) (0+4*(num))
4903 #define MC_CMD_SCHEDINFO_OUT_DATA_OFST 0
4904 #define MC_CMD_SCHEDINFO_OUT_DATA_LEN 4
4905 #define MC_CMD_SCHEDINFO_OUT_DATA_MINNUM 1
4906 #define MC_CMD_SCHEDINFO_OUT_DATA_MAXNUM 63
4907
4908
4909 /***********************************/
4910 /* MC_CMD_REBOOT_MODE
4911  * Set the mode for the next MC reboot. Locks required: NONE. Sets the reboot
4912  * mode to the specified value. Returns the old mode.
4913  */
4914 #define MC_CMD_REBOOT_MODE 0x3f
4915 #undef  MC_CMD_0x3f_PRIVILEGE_CTG
4916
4917 #define MC_CMD_0x3f_PRIVILEGE_CTG SRIOV_CTG_INSECURE
4918
4919 /* MC_CMD_REBOOT_MODE_IN msgrequest */
4920 #define MC_CMD_REBOOT_MODE_IN_LEN 4
4921 #define MC_CMD_REBOOT_MODE_IN_VALUE_OFST 0
4922 #define MC_CMD_REBOOT_MODE_IN_VALUE_LEN 4
4923 /* enum: Normal. */
4924 #define MC_CMD_REBOOT_MODE_NORMAL 0x0
4925 /* enum: Power-on Reset. */
4926 #define MC_CMD_REBOOT_MODE_POR 0x2
4927 /* enum: Snapper. */
4928 #define MC_CMD_REBOOT_MODE_SNAPPER 0x3
4929 /* enum: snapper fake POR */
4930 #define MC_CMD_REBOOT_MODE_SNAPPER_POR 0x4
4931 #define MC_CMD_REBOOT_MODE_IN_FAKE_LBN 7
4932 #define MC_CMD_REBOOT_MODE_IN_FAKE_WIDTH 1
4933
4934 /* MC_CMD_REBOOT_MODE_OUT msgresponse */
4935 #define MC_CMD_REBOOT_MODE_OUT_LEN 4
4936 #define MC_CMD_REBOOT_MODE_OUT_VALUE_OFST 0
4937 #define MC_CMD_REBOOT_MODE_OUT_VALUE_LEN 4
4938
4939
4940 /***********************************/
4941 /* MC_CMD_SENSOR_INFO
4942  * Returns information about every available sensor.
4943  *
4944  * Each sensor has a single (16bit) value, and a corresponding state. The
4945  * mapping between value and state is nominally determined by the MC, but may
4946  * be implemented using up to 2 ranges per sensor.
4947  *
4948  * This call returns a mask (32bit) of the sensors that are supported by this
4949  * platform, then an array of sensor information structures, in order of sensor
4950  * type (but without gaps for unimplemented sensors). Each structure defines
4951  * the ranges for the corresponding sensor. An unused range is indicated by
4952  * equal limit values. If one range is used, a value outside that range results
4953  * in STATE_FATAL. If two ranges are used, a value outside the second range
4954  * results in STATE_FATAL while a value outside the first and inside the second
4955  * range results in STATE_WARNING.
4956  *
4957  * Sensor masks and sensor information arrays are organised into pages. For
4958  * backward compatibility, older host software can only use sensors in page 0.
4959  * Bit 32 in the sensor mask was previously unused, and is no reserved for use
4960  * as the next page flag.
4961  *
4962  * If the request does not contain a PAGE value then firmware will only return
4963  * page 0 of sensor information, with bit 31 in the sensor mask cleared.
4964  *
4965  * If the request contains a PAGE value then firmware responds with the sensor
4966  * mask and sensor information array for that page of sensors. In this case bit
4967  * 31 in the mask is set if another page exists.
4968  *
4969  * Locks required: None Returns: 0
4970  */
4971 #define MC_CMD_SENSOR_INFO 0x41
4972 #undef  MC_CMD_0x41_PRIVILEGE_CTG
4973
4974 #define MC_CMD_0x41_PRIVILEGE_CTG SRIOV_CTG_GENERAL
4975
4976 /* MC_CMD_SENSOR_INFO_IN msgrequest */
4977 #define MC_CMD_SENSOR_INFO_IN_LEN 0
4978
4979 /* MC_CMD_SENSOR_INFO_EXT_IN msgrequest */
4980 #define MC_CMD_SENSOR_INFO_EXT_IN_LEN 4
4981 /* Which page of sensors to report.
4982  *
4983  * Page 0 contains sensors 0 to 30 (sensor 31 is the next page bit).
4984  *
4985  * Page 1 contains sensors 32 to 62 (sensor 63 is the next page bit). etc.
4986  */
4987 #define MC_CMD_SENSOR_INFO_EXT_IN_PAGE_OFST 0
4988 #define MC_CMD_SENSOR_INFO_EXT_IN_PAGE_LEN 4
4989
4990 /* MC_CMD_SENSOR_INFO_OUT msgresponse */
4991 #define MC_CMD_SENSOR_INFO_OUT_LENMIN 4
4992 #define MC_CMD_SENSOR_INFO_OUT_LENMAX 252
4993 #define MC_CMD_SENSOR_INFO_OUT_LEN(num) (4+8*(num))
4994 #define MC_CMD_SENSOR_INFO_OUT_MASK_OFST 0
4995 #define MC_CMD_SENSOR_INFO_OUT_MASK_LEN 4
4996 /* enum: Controller temperature: degC */
4997 #define MC_CMD_SENSOR_CONTROLLER_TEMP  0x0
4998 /* enum: Phy common temperature: degC */
4999 #define MC_CMD_SENSOR_PHY_COMMON_TEMP  0x1
5000 /* enum: Controller cooling: bool */
5001 #define MC_CMD_SENSOR_CONTROLLER_COOLING  0x2
5002 /* enum: Phy 0 temperature: degC */
5003 #define MC_CMD_SENSOR_PHY0_TEMP  0x3
5004 /* enum: Phy 0 cooling: bool */
5005 #define MC_CMD_SENSOR_PHY0_COOLING  0x4
5006 /* enum: Phy 1 temperature: degC */
5007 #define MC_CMD_SENSOR_PHY1_TEMP  0x5
5008 /* enum: Phy 1 cooling: bool */
5009 #define MC_CMD_SENSOR_PHY1_COOLING  0x6
5010 /* enum: 1.0v power: mV */
5011 #define MC_CMD_SENSOR_IN_1V0  0x7
5012 /* enum: 1.2v power: mV */
5013 #define MC_CMD_SENSOR_IN_1V2  0x8
5014 /* enum: 1.8v power: mV */
5015 #define MC_CMD_SENSOR_IN_1V8  0x9
5016 /* enum: 2.5v power: mV */
5017 #define MC_CMD_SENSOR_IN_2V5  0xa
5018 /* enum: 3.3v power: mV */
5019 #define MC_CMD_SENSOR_IN_3V3  0xb
5020 /* enum: 12v power: mV */
5021 #define MC_CMD_SENSOR_IN_12V0  0xc
5022 /* enum: 1.2v analogue power: mV */
5023 #define MC_CMD_SENSOR_IN_1V2A  0xd
5024 /* enum: reference voltage: mV */
5025 #define MC_CMD_SENSOR_IN_VREF  0xe
5026 /* enum: AOE FPGA power: mV */
5027 #define MC_CMD_SENSOR_OUT_VAOE  0xf
5028 /* enum: AOE FPGA temperature: degC */
5029 #define MC_CMD_SENSOR_AOE_TEMP  0x10
5030 /* enum: AOE FPGA PSU temperature: degC */
5031 #define MC_CMD_SENSOR_PSU_AOE_TEMP  0x11
5032 /* enum: AOE PSU temperature: degC */
5033 #define MC_CMD_SENSOR_PSU_TEMP  0x12
5034 /* enum: Fan 0 speed: RPM */
5035 #define MC_CMD_SENSOR_FAN_0  0x13
5036 /* enum: Fan 1 speed: RPM */
5037 #define MC_CMD_SENSOR_FAN_1  0x14
5038 /* enum: Fan 2 speed: RPM */
5039 #define MC_CMD_SENSOR_FAN_2  0x15
5040 /* enum: Fan 3 speed: RPM */
5041 #define MC_CMD_SENSOR_FAN_3  0x16
5042 /* enum: Fan 4 speed: RPM */
5043 #define MC_CMD_SENSOR_FAN_4  0x17
5044 /* enum: AOE FPGA input power: mV */
5045 #define MC_CMD_SENSOR_IN_VAOE  0x18
5046 /* enum: AOE FPGA current: mA */
5047 #define MC_CMD_SENSOR_OUT_IAOE  0x19
5048 /* enum: AOE FPGA input current: mA */
5049 #define MC_CMD_SENSOR_IN_IAOE  0x1a
5050 /* enum: NIC power consumption: W */
5051 #define MC_CMD_SENSOR_NIC_POWER  0x1b
5052 /* enum: 0.9v power voltage: mV */
5053 #define MC_CMD_SENSOR_IN_0V9  0x1c
5054 /* enum: 0.9v power current: mA */
5055 #define MC_CMD_SENSOR_IN_I0V9  0x1d
5056 /* enum: 1.2v power current: mA */
5057 #define MC_CMD_SENSOR_IN_I1V2  0x1e
5058 /* enum: Not a sensor: reserved for the next page flag */
5059 #define MC_CMD_SENSOR_PAGE0_NEXT  0x1f
5060 /* enum: 0.9v power voltage (at ADC): mV */
5061 #define MC_CMD_SENSOR_IN_0V9_ADC  0x20
5062 /* enum: Controller temperature 2: degC */
5063 #define MC_CMD_SENSOR_CONTROLLER_2_TEMP  0x21
5064 /* enum: Voltage regulator internal temperature: degC */
5065 #define MC_CMD_SENSOR_VREG_INTERNAL_TEMP  0x22
5066 /* enum: 0.9V voltage regulator temperature: degC */
5067 #define MC_CMD_SENSOR_VREG_0V9_TEMP  0x23
5068 /* enum: 1.2V voltage regulator temperature: degC */
5069 #define MC_CMD_SENSOR_VREG_1V2_TEMP  0x24
5070 /* enum: controller internal temperature sensor voltage (internal ADC): mV */
5071 #define MC_CMD_SENSOR_CONTROLLER_VPTAT  0x25
5072 /* enum: controller internal temperature (internal ADC): degC */
5073 #define MC_CMD_SENSOR_CONTROLLER_INTERNAL_TEMP  0x26
5074 /* enum: controller internal temperature sensor voltage (external ADC): mV */
5075 #define MC_CMD_SENSOR_CONTROLLER_VPTAT_EXTADC  0x27
5076 /* enum: controller internal temperature (external ADC): degC */
5077 #define MC_CMD_SENSOR_CONTROLLER_INTERNAL_TEMP_EXTADC  0x28
5078 /* enum: ambient temperature: degC */
5079 #define MC_CMD_SENSOR_AMBIENT_TEMP  0x29
5080 /* enum: air flow: bool */
5081 #define MC_CMD_SENSOR_AIRFLOW  0x2a
5082 /* enum: voltage between VSS08D and VSS08D at CSR: mV */
5083 #define MC_CMD_SENSOR_VDD08D_VSS08D_CSR  0x2b
5084 /* enum: voltage between VSS08D and VSS08D at CSR (external ADC): mV */
5085 #define MC_CMD_SENSOR_VDD08D_VSS08D_CSR_EXTADC  0x2c
5086 /* enum: Hotpoint temperature: degC */
5087 #define MC_CMD_SENSOR_HOTPOINT_TEMP  0x2d
5088 /* enum: Port 0 PHY power switch over-current: bool */
5089 #define MC_CMD_SENSOR_PHY_POWER_PORT0  0x2e
5090 /* enum: Port 1 PHY power switch over-current: bool */
5091 #define MC_CMD_SENSOR_PHY_POWER_PORT1  0x2f
5092 /* enum: Mop-up microcontroller reference voltage (millivolts) */
5093 #define MC_CMD_SENSOR_MUM_VCC  0x30
5094 /* enum: 0.9v power phase A voltage: mV */
5095 #define MC_CMD_SENSOR_IN_0V9_A  0x31
5096 /* enum: 0.9v power phase A current: mA */
5097 #define MC_CMD_SENSOR_IN_I0V9_A  0x32
5098 /* enum: 0.9V voltage regulator phase A temperature: degC */
5099 #define MC_CMD_SENSOR_VREG_0V9_A_TEMP  0x33
5100 /* enum: 0.9v power phase B voltage: mV */
5101 #define MC_CMD_SENSOR_IN_0V9_B  0x34
5102 /* enum: 0.9v power phase B current: mA */
5103 #define MC_CMD_SENSOR_IN_I0V9_B  0x35
5104 /* enum: 0.9V voltage regulator phase B temperature: degC */
5105 #define MC_CMD_SENSOR_VREG_0V9_B_TEMP  0x36
5106 /* enum: CCOM AVREG 1v2 supply (interval ADC): mV */
5107 #define MC_CMD_SENSOR_CCOM_AVREG_1V2_SUPPLY  0x37
5108 /* enum: CCOM AVREG 1v2 supply (external ADC): mV */
5109 #define MC_CMD_SENSOR_CCOM_AVREG_1V2_SUPPLY_EXTADC  0x38
5110 /* enum: CCOM AVREG 1v8 supply (interval ADC): mV */
5111 #define MC_CMD_SENSOR_CCOM_AVREG_1V8_SUPPLY  0x39
5112 /* enum: CCOM AVREG 1v8 supply (external ADC): mV */
5113 #define MC_CMD_SENSOR_CCOM_AVREG_1V8_SUPPLY_EXTADC  0x3a
5114 /* enum: CCOM RTS temperature: degC */
5115 #define MC_CMD_SENSOR_CONTROLLER_RTS  0x3b
5116 /* enum: Not a sensor: reserved for the next page flag */
5117 #define MC_CMD_SENSOR_PAGE1_NEXT  0x3f
5118 /* enum: controller internal temperature sensor voltage on master core
5119  * (internal ADC): mV
5120  */
5121 #define MC_CMD_SENSOR_CONTROLLER_MASTER_VPTAT  0x40
5122 /* enum: controller internal temperature on master core (internal ADC): degC */
5123 #define MC_CMD_SENSOR_CONTROLLER_MASTER_INTERNAL_TEMP  0x41
5124 /* enum: controller internal temperature sensor voltage on master core
5125  * (external ADC): mV
5126  */
5127 #define MC_CMD_SENSOR_CONTROLLER_MASTER_VPTAT_EXTADC  0x42
5128 /* enum: controller internal temperature on master core (external ADC): degC */
5129 #define MC_CMD_SENSOR_CONTROLLER_MASTER_INTERNAL_TEMP_EXTADC  0x43
5130 /* enum: controller internal temperature on slave core sensor voltage (internal
5131  * ADC): mV
5132  */
5133 #define MC_CMD_SENSOR_CONTROLLER_SLAVE_VPTAT  0x44
5134 /* enum: controller internal temperature on slave core (internal ADC): degC */
5135 #define MC_CMD_SENSOR_CONTROLLER_SLAVE_INTERNAL_TEMP  0x45
5136 /* enum: controller internal temperature on slave core sensor voltage (external
5137  * ADC): mV
5138  */
5139 #define MC_CMD_SENSOR_CONTROLLER_SLAVE_VPTAT_EXTADC  0x46
5140 /* enum: controller internal temperature on slave core (external ADC): degC */
5141 #define MC_CMD_SENSOR_CONTROLLER_SLAVE_INTERNAL_TEMP_EXTADC  0x47
5142 /* enum: Voltage supplied to the SODIMMs from their power supply: mV */
5143 #define MC_CMD_SENSOR_SODIMM_VOUT  0x49
5144 /* enum: Temperature of SODIMM 0 (if installed): degC */
5145 #define MC_CMD_SENSOR_SODIMM_0_TEMP  0x4a
5146 /* enum: Temperature of SODIMM 1 (if installed): degC */
5147 #define MC_CMD_SENSOR_SODIMM_1_TEMP  0x4b
5148 /* enum: Voltage supplied to the QSFP #0 from their power supply: mV */
5149 #define MC_CMD_SENSOR_PHY0_VCC  0x4c
5150 /* enum: Voltage supplied to the QSFP #1 from their power supply: mV */
5151 #define MC_CMD_SENSOR_PHY1_VCC  0x4d
5152 /* enum: Controller die temperature (TDIODE): degC */
5153 #define MC_CMD_SENSOR_CONTROLLER_TDIODE_TEMP  0x4e
5154 /* enum: Board temperature (front): degC */
5155 #define MC_CMD_SENSOR_BOARD_FRONT_TEMP  0x4f
5156 /* enum: Board temperature (back): degC */
5157 #define MC_CMD_SENSOR_BOARD_BACK_TEMP  0x50
5158 /* enum: 1.8v power current: mA */
5159 #define MC_CMD_SENSOR_IN_I1V8  0x51
5160 /* enum: 2.5v power current: mA */
5161 #define MC_CMD_SENSOR_IN_I2V5  0x52
5162 /* enum: 3.3v power current: mA */
5163 #define MC_CMD_SENSOR_IN_I3V3  0x53
5164 /* enum: 12v power current: mA */
5165 #define MC_CMD_SENSOR_IN_I12V0  0x54
5166 /* enum: Not a sensor: reserved for the next page flag */
5167 #define MC_CMD_SENSOR_PAGE2_NEXT  0x5f
5168 /* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF */
5169 #define MC_CMD_SENSOR_ENTRY_OFST 4
5170 #define MC_CMD_SENSOR_ENTRY_LEN 8
5171 #define MC_CMD_SENSOR_ENTRY_LO_OFST 4
5172 #define MC_CMD_SENSOR_ENTRY_HI_OFST 8
5173 #define MC_CMD_SENSOR_ENTRY_MINNUM 0
5174 #define MC_CMD_SENSOR_ENTRY_MAXNUM 31
5175
5176 /* MC_CMD_SENSOR_INFO_EXT_OUT msgresponse */
5177 #define MC_CMD_SENSOR_INFO_EXT_OUT_LENMIN 4
5178 #define MC_CMD_SENSOR_INFO_EXT_OUT_LENMAX 252
5179 #define MC_CMD_SENSOR_INFO_EXT_OUT_LEN(num) (4+8*(num))
5180 #define MC_CMD_SENSOR_INFO_EXT_OUT_MASK_OFST 0
5181 #define MC_CMD_SENSOR_INFO_EXT_OUT_MASK_LEN 4
5182 /*            Enum values, see field(s): */
5183 /*               MC_CMD_SENSOR_INFO_OUT */
5184 #define MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_LBN 31
5185 #define MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_WIDTH 1
5186 /* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF */
5187 /*            MC_CMD_SENSOR_ENTRY_OFST 4 */
5188 /*            MC_CMD_SENSOR_ENTRY_LEN 8 */
5189 /*            MC_CMD_SENSOR_ENTRY_LO_OFST 4 */
5190 /*            MC_CMD_SENSOR_ENTRY_HI_OFST 8 */
5191 /*            MC_CMD_SENSOR_ENTRY_MINNUM 0 */
5192 /*            MC_CMD_SENSOR_ENTRY_MAXNUM 31 */
5193
5194 /* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF structuredef */
5195 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_LEN 8
5196 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_OFST 0
5197 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_LEN 2
5198 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_LBN 0
5199 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_WIDTH 16
5200 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_OFST 2
5201 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_LEN 2
5202 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_LBN 16
5203 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_WIDTH 16
5204 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_OFST 4
5205 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_LEN 2
5206 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_LBN 32
5207 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_WIDTH 16
5208 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_OFST 6
5209 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_LEN 2
5210 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_LBN 48
5211 #define MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_WIDTH 16
5212
5213
5214 /***********************************/
5215 /* MC_CMD_READ_SENSORS
5216  * Returns the current reading from each sensor. DMAs an array of sensor
5217  * readings, in order of sensor type (but without gaps for unimplemented
5218  * sensors), into host memory. Each array element is a
5219  * MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF dword.
5220  *
5221  * If the request does not contain the LENGTH field then only sensors 0 to 30
5222  * are reported, to avoid DMA buffer overflow in older host software. If the
5223  * sensor reading require more space than the LENGTH allows, then return
5224  * EINVAL.
5225  *
5226  * The MC will send a SENSOREVT event every time any sensor changes state. The
5227  * driver is responsible for ensuring that it doesn't miss any events. The
5228  * board will function normally if all sensors are in STATE_OK or
5229  * STATE_WARNING. Otherwise the board should not be expected to function.
5230  */
5231 #define MC_CMD_READ_SENSORS 0x42
5232 #undef  MC_CMD_0x42_PRIVILEGE_CTG
5233
5234 #define MC_CMD_0x42_PRIVILEGE_CTG SRIOV_CTG_GENERAL
5235
5236 /* MC_CMD_READ_SENSORS_IN msgrequest */
5237 #define MC_CMD_READ_SENSORS_IN_LEN 8
5238 /* DMA address of host buffer for sensor readings (must be 4Kbyte aligned). */
5239 #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_OFST 0
5240 #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_LEN 8
5241 #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_LO_OFST 0
5242 #define MC_CMD_READ_SENSORS_IN_DMA_ADDR_HI_OFST 4
5243
5244 /* MC_CMD_READ_SENSORS_EXT_IN msgrequest */
5245 #define MC_CMD_READ_SENSORS_EXT_IN_LEN 12
5246 /* DMA address of host buffer for sensor readings (must be 4Kbyte aligned). */
5247 #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_OFST 0
5248 #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_LEN 8
5249 #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_LO_OFST 0
5250 #define MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_HI_OFST 4
5251 /* Size in bytes of host buffer. */
5252 #define MC_CMD_READ_SENSORS_EXT_IN_LENGTH_OFST 8
5253 #define MC_CMD_READ_SENSORS_EXT_IN_LENGTH_LEN 4
5254
5255 /* MC_CMD_READ_SENSORS_OUT msgresponse */
5256 #define MC_CMD_READ_SENSORS_OUT_LEN 0
5257
5258 /* MC_CMD_READ_SENSORS_EXT_OUT msgresponse */
5259 #define MC_CMD_READ_SENSORS_EXT_OUT_LEN 0
5260
5261 /* MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF structuredef */
5262 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_LEN 4
5263 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_OFST 0
5264 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_LEN 2
5265 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_LBN 0
5266 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_WIDTH 16
5267 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_OFST 2
5268 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_LEN 1
5269 /* enum: Ok. */
5270 #define MC_CMD_SENSOR_STATE_OK  0x0
5271 /* enum: Breached warning threshold. */
5272 #define MC_CMD_SENSOR_STATE_WARNING  0x1
5273 /* enum: Breached fatal threshold. */
5274 #define MC_CMD_SENSOR_STATE_FATAL  0x2
5275 /* enum: Fault with sensor. */
5276 #define MC_CMD_SENSOR_STATE_BROKEN  0x3
5277 /* enum: Sensor is working but does not currently have a reading. */
5278 #define MC_CMD_SENSOR_STATE_NO_READING  0x4
5279 /* enum: Sensor initialisation failed. */
5280 #define MC_CMD_SENSOR_STATE_INIT_FAILED  0x5
5281 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_LBN 16
5282 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_WIDTH 8
5283 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_OFST 3
5284 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_LEN 1
5285 /*            Enum values, see field(s): */
5286 /*               MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
5287 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_LBN 24
5288 #define MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_WIDTH 8
5289
5290
5291 /***********************************/
5292 /* MC_CMD_GET_PHY_STATE
5293  * Report current state of PHY. A 'zombie' PHY is a PHY that has failed to boot
5294  * (e.g. due to missing or corrupted firmware). Locks required: None. Return
5295  * code: 0
5296  */
5297 #define MC_CMD_GET_PHY_STATE 0x43
5298 #undef  MC_CMD_0x43_PRIVILEGE_CTG
5299
5300 #define MC_CMD_0x43_PRIVILEGE_CTG SRIOV_CTG_GENERAL
5301
5302 /* MC_CMD_GET_PHY_STATE_IN msgrequest */
5303 #define MC_CMD_GET_PHY_STATE_IN_LEN 0
5304
5305 /* MC_CMD_GET_PHY_STATE_OUT msgresponse */
5306 #define MC_CMD_GET_PHY_STATE_OUT_LEN 4
5307 #define MC_CMD_GET_PHY_STATE_OUT_STATE_OFST 0
5308 #define MC_CMD_GET_PHY_STATE_OUT_STATE_LEN 4
5309 /* enum: Ok. */
5310 #define MC_CMD_PHY_STATE_OK 0x1
5311 /* enum: Faulty. */
5312 #define MC_CMD_PHY_STATE_ZOMBIE 0x2
5313
5314
5315 /***********************************/
5316 /* MC_CMD_SETUP_8021QBB
5317  * 802.1Qbb control. 8 Tx queues that map to priorities 0 - 7. Use all 1s to
5318  * disable 802.Qbb for a given priority.
5319  */
5320 #define MC_CMD_SETUP_8021QBB 0x44
5321
5322 /* MC_CMD_SETUP_8021QBB_IN msgrequest */
5323 #define MC_CMD_SETUP_8021QBB_IN_LEN 32
5324 #define MC_CMD_SETUP_8021QBB_IN_TXQS_OFST 0
5325 #define MC_CMD_SETUP_8021QBB_IN_TXQS_LEN 32
5326
5327 /* MC_CMD_SETUP_8021QBB_OUT msgresponse */
5328 #define MC_CMD_SETUP_8021QBB_OUT_LEN 0
5329
5330
5331 /***********************************/
5332 /* MC_CMD_WOL_FILTER_GET
5333  * Retrieve ID of any WoL filters. Locks required: None. Returns: 0, ENOSYS
5334  */
5335 #define MC_CMD_WOL_FILTER_GET 0x45
5336 #undef  MC_CMD_0x45_PRIVILEGE_CTG
5337
5338 #define MC_CMD_0x45_PRIVILEGE_CTG SRIOV_CTG_LINK
5339
5340 /* MC_CMD_WOL_FILTER_GET_IN msgrequest */
5341 #define MC_CMD_WOL_FILTER_GET_IN_LEN 0
5342
5343 /* MC_CMD_WOL_FILTER_GET_OUT msgresponse */
5344 #define MC_CMD_WOL_FILTER_GET_OUT_LEN 4
5345 #define MC_CMD_WOL_FILTER_GET_OUT_FILTER_ID_OFST 0
5346 #define MC_CMD_WOL_FILTER_GET_OUT_FILTER_ID_LEN 4
5347
5348
5349 /***********************************/
5350 /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD
5351  * Add a protocol offload to NIC for lights-out state. Locks required: None.
5352  * Returns: 0, ENOSYS
5353  */
5354 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD 0x46
5355 #undef  MC_CMD_0x46_PRIVILEGE_CTG
5356
5357 #define MC_CMD_0x46_PRIVILEGE_CTG SRIOV_CTG_LINK
5358
5359 /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN msgrequest */
5360 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMIN 8
5361 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMAX 252
5362 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LEN(num) (4+4*(num))
5363 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0
5364 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4
5365 #define MC_CMD_LIGHTSOUT_OFFLOAD_PROTOCOL_ARP 0x1 /* enum */
5366 #define MC_CMD_LIGHTSOUT_OFFLOAD_PROTOCOL_NS  0x2 /* enum */
5367 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_OFST 4
5368 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_LEN 4
5369 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MINNUM 1
5370 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MAXNUM 62
5371
5372 /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP msgrequest */
5373 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_LEN 14
5374 /*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 */
5375 /*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4 */
5376 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_MAC_OFST 4
5377 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_MAC_LEN 6
5378 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_IP_OFST 10
5379 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_IP_LEN 4
5380
5381 /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS msgrequest */
5382 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_LEN 42
5383 /*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 */
5384 /*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4 */
5385 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_MAC_OFST 4
5386 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_MAC_LEN 6
5387 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_SNIPV6_OFST 10
5388 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_SNIPV6_LEN 16
5389 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_IPV6_OFST 26
5390 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_IPV6_LEN 16
5391
5392 /* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT msgresponse */
5393 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_LEN 4
5394 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_FILTER_ID_OFST 0
5395 #define MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_FILTER_ID_LEN 4
5396
5397
5398 /***********************************/
5399 /* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD
5400  * Remove a protocol offload from NIC for lights-out state. Locks required:
5401  * None. Returns: 0, ENOSYS
5402  */
5403 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD 0x47
5404 #undef  MC_CMD_0x47_PRIVILEGE_CTG
5405
5406 #define MC_CMD_0x47_PRIVILEGE_CTG SRIOV_CTG_LINK
5407
5408 /* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN msgrequest */
5409 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_LEN 8
5410 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0
5411 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4
5412 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_FILTER_ID_OFST 4
5413 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_FILTER_ID_LEN 4
5414
5415 /* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT msgresponse */
5416 #define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT_LEN 0
5417
5418
5419 /***********************************/
5420 /* MC_CMD_MAC_RESET_RESTORE
5421  * Restore MAC after block reset. Locks required: None. Returns: 0.
5422  */
5423 #define MC_CMD_MAC_RESET_RESTORE 0x48
5424
5425 /* MC_CMD_MAC_RESET_RESTORE_IN msgrequest */
5426 #define MC_CMD_MAC_RESET_RESTORE_IN_LEN 0
5427
5428 /* MC_CMD_MAC_RESET_RESTORE_OUT msgresponse */
5429 #define MC_CMD_MAC_RESET_RESTORE_OUT_LEN 0
5430
5431
5432 /***********************************/
5433 /* MC_CMD_TESTASSERT
5434  * Deliberately trigger an assert-detonation in the firmware for testing
5435  * purposes (i.e. to allow tests that the driver copes gracefully). Locks
5436  * required: None Returns: 0
5437  */
5438 #define MC_CMD_TESTASSERT 0x49
5439 #undef  MC_CMD_0x49_PRIVILEGE_CTG
5440
5441 #define MC_CMD_0x49_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5442
5443 /* MC_CMD_TESTASSERT_IN msgrequest */
5444 #define MC_CMD_TESTASSERT_IN_LEN 0
5445
5446 /* MC_CMD_TESTASSERT_OUT msgresponse */
5447 #define MC_CMD_TESTASSERT_OUT_LEN 0
5448
5449 /* MC_CMD_TESTASSERT_V2_IN msgrequest */
5450 #define MC_CMD_TESTASSERT_V2_IN_LEN 4
5451 /* How to provoke the assertion */
5452 #define MC_CMD_TESTASSERT_V2_IN_TYPE_OFST 0
5453 #define MC_CMD_TESTASSERT_V2_IN_TYPE_LEN 4
5454 /* enum: Assert using the FAIL_ASSERTION_WITH_USEFUL_VALUES macro. Unless
5455  * you're testing firmware, this is what you want.
5456  */
5457 #define MC_CMD_TESTASSERT_V2_IN_FAIL_ASSERTION_WITH_USEFUL_VALUES  0x0
5458 /* enum: Assert using assert(0); */
5459 #define MC_CMD_TESTASSERT_V2_IN_ASSERT_FALSE  0x1
5460 /* enum: Deliberately trigger a watchdog */
5461 #define MC_CMD_TESTASSERT_V2_IN_WATCHDOG  0x2
5462 /* enum: Deliberately trigger a trap by loading from an invalid address */
5463 #define MC_CMD_TESTASSERT_V2_IN_LOAD_TRAP  0x3
5464 /* enum: Deliberately trigger a trap by storing to an invalid address */
5465 #define MC_CMD_TESTASSERT_V2_IN_STORE_TRAP  0x4
5466 /* enum: Jump to an invalid address */
5467 #define MC_CMD_TESTASSERT_V2_IN_JUMP_TRAP  0x5
5468
5469 /* MC_CMD_TESTASSERT_V2_OUT msgresponse */
5470 #define MC_CMD_TESTASSERT_V2_OUT_LEN 0
5471
5472
5473 /***********************************/
5474 /* MC_CMD_WORKAROUND
5475  * Enable/Disable a given workaround. The mcfw will return EINVAL if it doesn't
5476  * understand the given workaround number - which should not be treated as a
5477  * hard error by client code. This op does not imply any semantics about each
5478  * workaround, that's between the driver and the mcfw on a per-workaround
5479  * basis. Locks required: None. Returns: 0, EINVAL .
5480  */
5481 #define MC_CMD_WORKAROUND 0x4a
5482 #undef  MC_CMD_0x4a_PRIVILEGE_CTG
5483
5484 #define MC_CMD_0x4a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5485
5486 /* MC_CMD_WORKAROUND_IN msgrequest */
5487 #define MC_CMD_WORKAROUND_IN_LEN 8
5488 /* The enums here must correspond with those in MC_CMD_GET_WORKAROUND. */
5489 #define MC_CMD_WORKAROUND_IN_TYPE_OFST 0
5490 #define MC_CMD_WORKAROUND_IN_TYPE_LEN 4
5491 /* enum: Bug 17230 work around. */
5492 #define MC_CMD_WORKAROUND_BUG17230 0x1
5493 /* enum: Bug 35388 work around (unsafe EVQ writes). */
5494 #define MC_CMD_WORKAROUND_BUG35388 0x2
5495 /* enum: Bug35017 workaround (A64 tables must be identity map) */
5496 #define MC_CMD_WORKAROUND_BUG35017 0x3
5497 /* enum: Bug 41750 present (MC_CMD_TRIGGER_INTERRUPT won't work) */
5498 #define MC_CMD_WORKAROUND_BUG41750 0x4
5499 /* enum: Bug 42008 present (Interrupts can overtake associated events). Caution
5500  * - before adding code that queries this workaround, remember that there's
5501  * released Monza firmware that doesn't understand MC_CMD_WORKAROUND_BUG42008,
5502  * and will hence (incorrectly) report that the bug doesn't exist.
5503  */
5504 #define MC_CMD_WORKAROUND_BUG42008 0x5
5505 /* enum: Bug 26807 features present in firmware (multicast filter chaining)
5506  * This feature cannot be turned on/off while there are any filters already
5507  * present. The behaviour in such case depends on the acting client's privilege
5508  * level. If the client has the admin privilege, then all functions that have
5509  * filters installed will be FLRed and the FLR_DONE flag will be set. Otherwise
5510  * the command will fail with MC_CMD_ERR_FILTERS_PRESENT.
5511  */
5512 #define MC_CMD_WORKAROUND_BUG26807 0x6
5513 /* enum: Bug 61265 work around (broken EVQ TMR writes). */
5514 #define MC_CMD_WORKAROUND_BUG61265 0x7
5515 /* 0 = disable the workaround indicated by TYPE; any non-zero value = enable
5516  * the workaround
5517  */
5518 #define MC_CMD_WORKAROUND_IN_ENABLED_OFST 4
5519 #define MC_CMD_WORKAROUND_IN_ENABLED_LEN 4
5520
5521 /* MC_CMD_WORKAROUND_OUT msgresponse */
5522 #define MC_CMD_WORKAROUND_OUT_LEN 0
5523
5524 /* MC_CMD_WORKAROUND_EXT_OUT msgresponse: This response format will be used
5525  * when (TYPE == MC_CMD_WORKAROUND_BUG26807)
5526  */
5527 #define MC_CMD_WORKAROUND_EXT_OUT_LEN 4
5528 #define MC_CMD_WORKAROUND_EXT_OUT_FLAGS_OFST 0
5529 #define MC_CMD_WORKAROUND_EXT_OUT_FLAGS_LEN 4
5530 #define MC_CMD_WORKAROUND_EXT_OUT_FLR_DONE_LBN 0
5531 #define MC_CMD_WORKAROUND_EXT_OUT_FLR_DONE_WIDTH 1
5532
5533
5534 /***********************************/
5535 /* MC_CMD_GET_PHY_MEDIA_INFO
5536  * Read media-specific data from PHY (e.g. SFP/SFP+ module ID information for
5537  * SFP+ PHYs). The 'media type' can be found via GET_PHY_CFG
5538  * (GET_PHY_CFG_OUT_MEDIA_TYPE); the valid 'page number' input values, and the
5539  * output data, are interpreted on a per-type basis. For SFP+: PAGE=0 or 1
5540  * returns a 128-byte block read from module I2C address 0xA0 offset 0 or 0x80.
5541  * Anything else: currently undefined. Locks required: None. Return code: 0.
5542  */
5543 #define MC_CMD_GET_PHY_MEDIA_INFO 0x4b
5544 #undef  MC_CMD_0x4b_PRIVILEGE_CTG
5545
5546 #define MC_CMD_0x4b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5547
5548 /* MC_CMD_GET_PHY_MEDIA_INFO_IN msgrequest */
5549 #define MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN 4
5550 #define MC_CMD_GET_PHY_MEDIA_INFO_IN_PAGE_OFST 0
5551 #define MC_CMD_GET_PHY_MEDIA_INFO_IN_PAGE_LEN 4
5552
5553 /* MC_CMD_GET_PHY_MEDIA_INFO_OUT msgresponse */
5554 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMIN 5
5555 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX 252
5556 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(num) (4+1*(num))
5557 /* in bytes */
5558 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_OFST 0
5559 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_LEN 4
5560 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_OFST 4
5561 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_LEN 1
5562 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MINNUM 1
5563 #define MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MAXNUM 248
5564
5565
5566 /***********************************/
5567 /* MC_CMD_NVRAM_TEST
5568  * Test a particular NVRAM partition for valid contents (where "valid" depends
5569  * on the type of partition).
5570  */
5571 #define MC_CMD_NVRAM_TEST 0x4c
5572 #undef  MC_CMD_0x4c_PRIVILEGE_CTG
5573
5574 #define MC_CMD_0x4c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5575
5576 /* MC_CMD_NVRAM_TEST_IN msgrequest */
5577 #define MC_CMD_NVRAM_TEST_IN_LEN 4
5578 #define MC_CMD_NVRAM_TEST_IN_TYPE_OFST 0
5579 #define MC_CMD_NVRAM_TEST_IN_TYPE_LEN 4
5580 /*            Enum values, see field(s): */
5581 /*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
5582
5583 /* MC_CMD_NVRAM_TEST_OUT msgresponse */
5584 #define MC_CMD_NVRAM_TEST_OUT_LEN 4
5585 #define MC_CMD_NVRAM_TEST_OUT_RESULT_OFST 0
5586 #define MC_CMD_NVRAM_TEST_OUT_RESULT_LEN 4
5587 /* enum: Passed. */
5588 #define MC_CMD_NVRAM_TEST_PASS 0x0
5589 /* enum: Failed. */
5590 #define MC_CMD_NVRAM_TEST_FAIL 0x1
5591 /* enum: Not supported. */
5592 #define MC_CMD_NVRAM_TEST_NOTSUPP 0x2
5593
5594
5595 /***********************************/
5596 /* MC_CMD_MRSFP_TWEAK
5597  * Read status and/or set parameters for the 'mrsfp' driver in mr_rusty builds.
5598  * I2C I/O expander bits are always read; if equaliser parameters are supplied,
5599  * they are configured first. Locks required: None. Return code: 0, EINVAL.
5600  */
5601 #define MC_CMD_MRSFP_TWEAK 0x4d
5602
5603 /* MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG msgrequest */
5604 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_LEN 16
5605 /* 0-6 low->high de-emph. */
5606 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_LEVEL_OFST 0
5607 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_LEVEL_LEN 4
5608 /* 0-8 low->high ref.V */
5609 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_DT_CFG_OFST 4
5610 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_DT_CFG_LEN 4
5611 /* 0-8 0-8 low->high boost */
5612 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_BOOST_OFST 8
5613 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_BOOST_LEN 4
5614 /* 0-8 low->high ref.V */
5615 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_DT_CFG_OFST 12
5616 #define MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_DT_CFG_LEN 4
5617
5618 /* MC_CMD_MRSFP_TWEAK_IN_READ_ONLY msgrequest */
5619 #define MC_CMD_MRSFP_TWEAK_IN_READ_ONLY_LEN 0
5620
5621 /* MC_CMD_MRSFP_TWEAK_OUT msgresponse */
5622 #define MC_CMD_MRSFP_TWEAK_OUT_LEN 12
5623 /* input bits */
5624 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_INPUTS_OFST 0
5625 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_INPUTS_LEN 4
5626 /* output bits */
5627 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_OFST 4
5628 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_LEN 4
5629 /* direction */
5630 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OFST 8
5631 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_LEN 4
5632 /* enum: Out. */
5633 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OUT 0x0
5634 /* enum: In. */
5635 #define MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_IN 0x1
5636
5637
5638 /***********************************/
5639 /* MC_CMD_SENSOR_SET_LIMS
5640  * Adjusts the sensor limits. This is a warranty-voiding operation. Returns:
5641  * ENOENT if the sensor specified does not exist, EINVAL if the limits are out
5642  * of range.
5643  */
5644 #define MC_CMD_SENSOR_SET_LIMS 0x4e
5645 #undef  MC_CMD_0x4e_PRIVILEGE_CTG
5646
5647 #define MC_CMD_0x4e_PRIVILEGE_CTG SRIOV_CTG_INSECURE
5648
5649 /* MC_CMD_SENSOR_SET_LIMS_IN msgrequest */
5650 #define MC_CMD_SENSOR_SET_LIMS_IN_LEN 20
5651 #define MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_OFST 0
5652 #define MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_LEN 4
5653 /*            Enum values, see field(s): */
5654 /*               MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
5655 /* interpretation is is sensor-specific. */
5656 #define MC_CMD_SENSOR_SET_LIMS_IN_LOW0_OFST 4
5657 #define MC_CMD_SENSOR_SET_LIMS_IN_LOW0_LEN 4
5658 /* interpretation is is sensor-specific. */
5659 #define MC_CMD_SENSOR_SET_LIMS_IN_HI0_OFST 8
5660 #define MC_CMD_SENSOR_SET_LIMS_IN_HI0_LEN 4
5661 /* interpretation is is sensor-specific. */
5662 #define MC_CMD_SENSOR_SET_LIMS_IN_LOW1_OFST 12
5663 #define MC_CMD_SENSOR_SET_LIMS_IN_LOW1_LEN 4
5664 /* interpretation is is sensor-specific. */
5665 #define MC_CMD_SENSOR_SET_LIMS_IN_HI1_OFST 16
5666 #define MC_CMD_SENSOR_SET_LIMS_IN_HI1_LEN 4
5667
5668 /* MC_CMD_SENSOR_SET_LIMS_OUT msgresponse */
5669 #define MC_CMD_SENSOR_SET_LIMS_OUT_LEN 0
5670
5671
5672 /***********************************/
5673 /* MC_CMD_GET_RESOURCE_LIMITS
5674  */
5675 #define MC_CMD_GET_RESOURCE_LIMITS 0x4f
5676
5677 /* MC_CMD_GET_RESOURCE_LIMITS_IN msgrequest */
5678 #define MC_CMD_GET_RESOURCE_LIMITS_IN_LEN 0
5679
5680 /* MC_CMD_GET_RESOURCE_LIMITS_OUT msgresponse */
5681 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN 16
5682 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_BUFTBL_OFST 0
5683 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_BUFTBL_LEN 4
5684 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_EVQ_OFST 4
5685 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_EVQ_LEN 4
5686 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_RXQ_OFST 8
5687 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_RXQ_LEN 4
5688 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_TXQ_OFST 12
5689 #define MC_CMD_GET_RESOURCE_LIMITS_OUT_TXQ_LEN 4
5690
5691
5692 /***********************************/
5693 /* MC_CMD_NVRAM_PARTITIONS
5694  * Reads the list of available virtual NVRAM partition types. Locks required:
5695  * none. Returns: 0, EINVAL (bad type).
5696  */
5697 #define MC_CMD_NVRAM_PARTITIONS 0x51
5698 #undef  MC_CMD_0x51_PRIVILEGE_CTG
5699
5700 #define MC_CMD_0x51_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5701
5702 /* MC_CMD_NVRAM_PARTITIONS_IN msgrequest */
5703 #define MC_CMD_NVRAM_PARTITIONS_IN_LEN 0
5704
5705 /* MC_CMD_NVRAM_PARTITIONS_OUT msgresponse */
5706 #define MC_CMD_NVRAM_PARTITIONS_OUT_LENMIN 4
5707 #define MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX 252
5708 #define MC_CMD_NVRAM_PARTITIONS_OUT_LEN(num) (4+4*(num))
5709 /* total number of partitions */
5710 #define MC_CMD_NVRAM_PARTITIONS_OUT_NUM_PARTITIONS_OFST 0
5711 #define MC_CMD_NVRAM_PARTITIONS_OUT_NUM_PARTITIONS_LEN 4
5712 /* type ID code for each of NUM_PARTITIONS partitions */
5713 #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_OFST 4
5714 #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_LEN 4
5715 #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MINNUM 0
5716 #define MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MAXNUM 62
5717
5718
5719 /***********************************/
5720 /* MC_CMD_NVRAM_METADATA
5721  * Reads soft metadata for a virtual NVRAM partition type. Locks required:
5722  * none. Returns: 0, EINVAL (bad type).
5723  */
5724 #define MC_CMD_NVRAM_METADATA 0x52
5725 #undef  MC_CMD_0x52_PRIVILEGE_CTG
5726
5727 #define MC_CMD_0x52_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5728
5729 /* MC_CMD_NVRAM_METADATA_IN msgrequest */
5730 #define MC_CMD_NVRAM_METADATA_IN_LEN 4
5731 /* Partition type ID code */
5732 #define MC_CMD_NVRAM_METADATA_IN_TYPE_OFST 0
5733 #define MC_CMD_NVRAM_METADATA_IN_TYPE_LEN 4
5734
5735 /* MC_CMD_NVRAM_METADATA_OUT msgresponse */
5736 #define MC_CMD_NVRAM_METADATA_OUT_LENMIN 20
5737 #define MC_CMD_NVRAM_METADATA_OUT_LENMAX 252
5738 #define MC_CMD_NVRAM_METADATA_OUT_LEN(num) (20+1*(num))
5739 /* Partition type ID code */
5740 #define MC_CMD_NVRAM_METADATA_OUT_TYPE_OFST 0
5741 #define MC_CMD_NVRAM_METADATA_OUT_TYPE_LEN 4
5742 #define MC_CMD_NVRAM_METADATA_OUT_FLAGS_OFST 4
5743 #define MC_CMD_NVRAM_METADATA_OUT_FLAGS_LEN 4
5744 #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_LBN 0
5745 #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_WIDTH 1
5746 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_LBN 1
5747 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_WIDTH 1
5748 #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_LBN 2
5749 #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_WIDTH 1
5750 /* Subtype ID code for content of this partition */
5751 #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_OFST 8
5752 #define MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_LEN 4
5753 /* 1st component of W.X.Y.Z version number for content of this partition */
5754 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_W_OFST 12
5755 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_W_LEN 2
5756 /* 2nd component of W.X.Y.Z version number for content of this partition */
5757 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_X_OFST 14
5758 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_X_LEN 2
5759 /* 3rd component of W.X.Y.Z version number for content of this partition */
5760 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Y_OFST 16
5761 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Y_LEN 2
5762 /* 4th component of W.X.Y.Z version number for content of this partition */
5763 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Z_OFST 18
5764 #define MC_CMD_NVRAM_METADATA_OUT_VERSION_Z_LEN 2
5765 /* Zero-terminated string describing the content of this partition */
5766 #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_OFST 20
5767 #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_LEN 1
5768 #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MINNUM 0
5769 #define MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MAXNUM 232
5770
5771
5772 /***********************************/
5773 /* MC_CMD_GET_MAC_ADDRESSES
5774  * Returns the base MAC, count and stride for the requesting function
5775  */
5776 #define MC_CMD_GET_MAC_ADDRESSES 0x55
5777 #undef  MC_CMD_0x55_PRIVILEGE_CTG
5778
5779 #define MC_CMD_0x55_PRIVILEGE_CTG SRIOV_CTG_GENERAL
5780
5781 /* MC_CMD_GET_MAC_ADDRESSES_IN msgrequest */
5782 #define MC_CMD_GET_MAC_ADDRESSES_IN_LEN 0
5783
5784 /* MC_CMD_GET_MAC_ADDRESSES_OUT msgresponse */
5785 #define MC_CMD_GET_MAC_ADDRESSES_OUT_LEN 16
5786 /* Base MAC address */
5787 #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE_OFST 0
5788 #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE_LEN 6
5789 /* Padding */
5790 #define MC_CMD_GET_MAC_ADDRESSES_OUT_RESERVED_OFST 6
5791 #define MC_CMD_GET_MAC_ADDRESSES_OUT_RESERVED_LEN 2
5792 /* Number of allocated MAC addresses */
5793 #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_COUNT_OFST 8
5794 #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_COUNT_LEN 4
5795 /* Spacing of allocated MAC addresses */
5796 #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_STRIDE_OFST 12
5797 #define MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_STRIDE_LEN 4
5798
5799
5800 /***********************************/
5801 /* MC_CMD_CLP
5802  * Perform a CLP related operation
5803  */
5804 #define MC_CMD_CLP 0x56
5805 #undef  MC_CMD_0x56_PRIVILEGE_CTG
5806
5807 #define MC_CMD_0x56_PRIVILEGE_CTG SRIOV_CTG_ADMIN
5808
5809 /* MC_CMD_CLP_IN msgrequest */
5810 #define MC_CMD_CLP_IN_LEN 4
5811 /* Sub operation */
5812 #define MC_CMD_CLP_IN_OP_OFST 0
5813 #define MC_CMD_CLP_IN_OP_LEN 4
5814 /* enum: Return to factory default settings */
5815 #define MC_CMD_CLP_OP_DEFAULT 0x1
5816 /* enum: Set MAC address */
5817 #define MC_CMD_CLP_OP_SET_MAC 0x2
5818 /* enum: Get MAC address */
5819 #define MC_CMD_CLP_OP_GET_MAC 0x3
5820 /* enum: Set UEFI/GPXE boot mode */
5821 #define MC_CMD_CLP_OP_SET_BOOT 0x4
5822 /* enum: Get UEFI/GPXE boot mode */
5823 #define MC_CMD_CLP_OP_GET_BOOT 0x5
5824
5825 /* MC_CMD_CLP_OUT msgresponse */
5826 #define MC_CMD_CLP_OUT_LEN 0
5827
5828 /* MC_CMD_CLP_IN_DEFAULT msgrequest */
5829 #define MC_CMD_CLP_IN_DEFAULT_LEN 4
5830 /*            MC_CMD_CLP_IN_OP_OFST 0 */
5831 /*            MC_CMD_CLP_IN_OP_LEN 4 */
5832
5833 /* MC_CMD_CLP_OUT_DEFAULT msgresponse */
5834 #define MC_CMD_CLP_OUT_DEFAULT_LEN 0
5835
5836 /* MC_CMD_CLP_IN_SET_MAC msgrequest */
5837 #define MC_CMD_CLP_IN_SET_MAC_LEN 12
5838 /*            MC_CMD_CLP_IN_OP_OFST 0 */
5839 /*            MC_CMD_CLP_IN_OP_LEN 4 */
5840 /* MAC address assigned to port */
5841 #define MC_CMD_CLP_IN_SET_MAC_ADDR_OFST 4
5842 #define MC_CMD_CLP_IN_SET_MAC_ADDR_LEN 6
5843 /* Padding */
5844 #define MC_CMD_CLP_IN_SET_MAC_RESERVED_OFST 10
5845 #define MC_CMD_CLP_IN_SET_MAC_RESERVED_LEN 2
5846
5847 /* MC_CMD_CLP_OUT_SET_MAC msgresponse */
5848 #define MC_CMD_CLP_OUT_SET_MAC_LEN 0
5849
5850 /* MC_CMD_CLP_IN_GET_MAC msgrequest */
5851 #define MC_CMD_CLP_IN_GET_MAC_LEN 4
5852 /*            MC_CMD_CLP_IN_OP_OFST 0 */
5853 /*            MC_CMD_CLP_IN_OP_LEN 4 */
5854
5855 /* MC_CMD_CLP_OUT_GET_MAC msgresponse */
5856 #define MC_CMD_CLP_OUT_GET_MAC_LEN 8
5857 /* MAC address assigned to port */
5858 #define MC_CMD_CLP_OUT_GET_MAC_ADDR_OFST 0
5859 #define MC_CMD_CLP_OUT_GET_MAC_ADDR_LEN 6
5860 /* Padding */
5861 #define MC_CMD_CLP_OUT_GET_MAC_RESERVED_OFST 6
5862 #define MC_CMD_CLP_OUT_GET_MAC_RESERVED_LEN 2
5863
5864 /* MC_CMD_CLP_IN_SET_BOOT msgrequest */
5865 #define MC_CMD_CLP_IN_SET_BOOT_LEN 5
5866 /*            MC_CMD_CLP_IN_OP_OFST 0 */
5867 /*            MC_CMD_CLP_IN_OP_LEN 4 */
5868 /* Boot flag */
5869 #define MC_CMD_CLP_IN_SET_BOOT_FLAG_OFST 4
5870 #define MC_CMD_CLP_IN_SET_BOOT_FLAG_LEN 1
5871
5872 /* MC_CMD_CLP_OUT_SET_BOOT msgresponse */
5873 #define MC_CMD_CLP_OUT_SET_BOOT_LEN 0
5874
5875 /* MC_CMD_CLP_IN_GET_BOOT msgrequest */
5876 #define MC_CMD_CLP_IN_GET_BOOT_LEN 4
5877 /*            MC_CMD_CLP_IN_OP_OFST 0 */
5878 /*            MC_CMD_CLP_IN_OP_LEN 4 */
5879
5880 /* MC_CMD_CLP_OUT_GET_BOOT msgresponse */
5881 #define MC_CMD_CLP_OUT_GET_BOOT_LEN 4
5882 /* Boot flag */
5883 #define MC_CMD_CLP_OUT_GET_BOOT_FLAG_OFST 0
5884 #define MC_CMD_CLP_OUT_GET_BOOT_FLAG_LEN 1
5885 /* Padding */
5886 #define MC_CMD_CLP_OUT_GET_BOOT_RESERVED_OFST 1
5887 #define MC_CMD_CLP_OUT_GET_BOOT_RESERVED_LEN 3
5888
5889
5890 /***********************************/
5891 /* MC_CMD_MUM
5892  * Perform a MUM operation
5893  */
5894 #define MC_CMD_MUM 0x57
5895 #undef  MC_CMD_0x57_PRIVILEGE_CTG
5896
5897 #define MC_CMD_0x57_PRIVILEGE_CTG SRIOV_CTG_INSECURE
5898
5899 /* MC_CMD_MUM_IN msgrequest */
5900 #define MC_CMD_MUM_IN_LEN 4
5901 #define MC_CMD_MUM_IN_OP_HDR_OFST 0
5902 #define MC_CMD_MUM_IN_OP_HDR_LEN 4
5903 #define MC_CMD_MUM_IN_OP_LBN 0
5904 #define MC_CMD_MUM_IN_OP_WIDTH 8
5905 /* enum: NULL MCDI command to MUM */
5906 #define MC_CMD_MUM_OP_NULL 0x1
5907 /* enum: Get MUM version */
5908 #define MC_CMD_MUM_OP_GET_VERSION 0x2
5909 /* enum: Issue raw I2C command to MUM */
5910 #define MC_CMD_MUM_OP_RAW_CMD 0x3
5911 /* enum: Read from registers on devices connected to MUM. */
5912 #define MC_CMD_MUM_OP_READ 0x4
5913 /* enum: Write to registers on devices connected to MUM. */
5914 #define MC_CMD_MUM_OP_WRITE 0x5
5915 /* enum: Control UART logging. */
5916 #define MC_CMD_MUM_OP_LOG 0x6
5917 /* enum: Operations on MUM GPIO lines */
5918 #define MC_CMD_MUM_OP_GPIO 0x7
5919 /* enum: Get sensor readings from MUM */
5920 #define MC_CMD_MUM_OP_READ_SENSORS 0x8
5921 /* enum: Initiate clock programming on the MUM */
5922 #define MC_CMD_MUM_OP_PROGRAM_CLOCKS 0x9
5923 /* enum: Initiate FPGA load from flash on the MUM */
5924 #define MC_CMD_MUM_OP_FPGA_LOAD 0xa
5925 /* enum: Request sensor reading from MUM ADC resulting from earlier request via
5926  * MUM ATB
5927  */
5928 #define MC_CMD_MUM_OP_READ_ATB_SENSOR 0xb
5929 /* enum: Send commands relating to the QSFP ports via the MUM for PHY
5930  * operations
5931  */
5932 #define MC_CMD_MUM_OP_QSFP 0xc
5933 /* enum: Request discrete and SODIMM DDR info (type, size, speed grade, voltage
5934  * level) from MUM
5935  */
5936 #define MC_CMD_MUM_OP_READ_DDR_INFO 0xd
5937
5938 /* MC_CMD_MUM_IN_NULL msgrequest */
5939 #define MC_CMD_MUM_IN_NULL_LEN 4
5940 /* MUM cmd header */
5941 #define MC_CMD_MUM_IN_CMD_OFST 0
5942 #define MC_CMD_MUM_IN_CMD_LEN 4
5943
5944 /* MC_CMD_MUM_IN_GET_VERSION msgrequest */
5945 #define MC_CMD_MUM_IN_GET_VERSION_LEN 4
5946 /* MUM cmd header */
5947 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
5948 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
5949
5950 /* MC_CMD_MUM_IN_READ msgrequest */
5951 #define MC_CMD_MUM_IN_READ_LEN 16
5952 /* MUM cmd header */
5953 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
5954 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
5955 /* ID of (device connected to MUM) to read from registers of */
5956 #define MC_CMD_MUM_IN_READ_DEVICE_OFST 4
5957 #define MC_CMD_MUM_IN_READ_DEVICE_LEN 4
5958 /* enum: Hittite HMC1035 clock generator on Sorrento board */
5959 #define MC_CMD_MUM_DEV_HITTITE 0x1
5960 /* enum: Hittite HMC1035 clock generator for NIC-side on Sorrento board */
5961 #define MC_CMD_MUM_DEV_HITTITE_NIC 0x2
5962 /* 32-bit address to read from */
5963 #define MC_CMD_MUM_IN_READ_ADDR_OFST 8
5964 #define MC_CMD_MUM_IN_READ_ADDR_LEN 4
5965 /* Number of words to read. */
5966 #define MC_CMD_MUM_IN_READ_NUMWORDS_OFST 12
5967 #define MC_CMD_MUM_IN_READ_NUMWORDS_LEN 4
5968
5969 /* MC_CMD_MUM_IN_WRITE msgrequest */
5970 #define MC_CMD_MUM_IN_WRITE_LENMIN 16
5971 #define MC_CMD_MUM_IN_WRITE_LENMAX 252
5972 #define MC_CMD_MUM_IN_WRITE_LEN(num) (12+4*(num))
5973 /* MUM cmd header */
5974 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
5975 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
5976 /* ID of (device connected to MUM) to write to registers of */
5977 #define MC_CMD_MUM_IN_WRITE_DEVICE_OFST 4
5978 #define MC_CMD_MUM_IN_WRITE_DEVICE_LEN 4
5979 /* enum: Hittite HMC1035 clock generator on Sorrento board */
5980 /*               MC_CMD_MUM_DEV_HITTITE 0x1 */
5981 /* 32-bit address to write to */
5982 #define MC_CMD_MUM_IN_WRITE_ADDR_OFST 8
5983 #define MC_CMD_MUM_IN_WRITE_ADDR_LEN 4
5984 /* Words to write */
5985 #define MC_CMD_MUM_IN_WRITE_BUFFER_OFST 12
5986 #define MC_CMD_MUM_IN_WRITE_BUFFER_LEN 4
5987 #define MC_CMD_MUM_IN_WRITE_BUFFER_MINNUM 1
5988 #define MC_CMD_MUM_IN_WRITE_BUFFER_MAXNUM 60
5989
5990 /* MC_CMD_MUM_IN_RAW_CMD msgrequest */
5991 #define MC_CMD_MUM_IN_RAW_CMD_LENMIN 17
5992 #define MC_CMD_MUM_IN_RAW_CMD_LENMAX 252
5993 #define MC_CMD_MUM_IN_RAW_CMD_LEN(num) (16+1*(num))
5994 /* MUM cmd header */
5995 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
5996 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
5997 /* MUM I2C cmd code */
5998 #define MC_CMD_MUM_IN_RAW_CMD_CMD_CODE_OFST 4
5999 #define MC_CMD_MUM_IN_RAW_CMD_CMD_CODE_LEN 4
6000 /* Number of bytes to write */
6001 #define MC_CMD_MUM_IN_RAW_CMD_NUM_WRITE_OFST 8
6002 #define MC_CMD_MUM_IN_RAW_CMD_NUM_WRITE_LEN 4
6003 /* Number of bytes to read */
6004 #define MC_CMD_MUM_IN_RAW_CMD_NUM_READ_OFST 12
6005 #define MC_CMD_MUM_IN_RAW_CMD_NUM_READ_LEN 4
6006 /* Bytes to write */
6007 #define MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_OFST 16
6008 #define MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_LEN 1
6009 #define MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_MINNUM 1
6010 #define MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_MAXNUM 236
6011
6012 /* MC_CMD_MUM_IN_LOG msgrequest */
6013 #define MC_CMD_MUM_IN_LOG_LEN 8
6014 /* MUM cmd header */
6015 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6016 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6017 #define MC_CMD_MUM_IN_LOG_OP_OFST 4
6018 #define MC_CMD_MUM_IN_LOG_OP_LEN 4
6019 #define MC_CMD_MUM_IN_LOG_OP_UART  0x1 /* enum */
6020
6021 /* MC_CMD_MUM_IN_LOG_OP_UART msgrequest */
6022 #define MC_CMD_MUM_IN_LOG_OP_UART_LEN 12
6023 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6024 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6025 /*            MC_CMD_MUM_IN_LOG_OP_OFST 4 */
6026 /*            MC_CMD_MUM_IN_LOG_OP_LEN 4 */
6027 /* Enable/disable debug output to UART */
6028 #define MC_CMD_MUM_IN_LOG_OP_UART_ENABLE_OFST 8
6029 #define MC_CMD_MUM_IN_LOG_OP_UART_ENABLE_LEN 4
6030
6031 /* MC_CMD_MUM_IN_GPIO msgrequest */
6032 #define MC_CMD_MUM_IN_GPIO_LEN 8
6033 /* MUM cmd header */
6034 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6035 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6036 #define MC_CMD_MUM_IN_GPIO_HDR_OFST 4
6037 #define MC_CMD_MUM_IN_GPIO_HDR_LEN 4
6038 #define MC_CMD_MUM_IN_GPIO_OPCODE_LBN 0
6039 #define MC_CMD_MUM_IN_GPIO_OPCODE_WIDTH 8
6040 #define MC_CMD_MUM_IN_GPIO_IN_READ 0x0 /* enum */
6041 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE 0x1 /* enum */
6042 #define MC_CMD_MUM_IN_GPIO_OUT_READ 0x2 /* enum */
6043 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE 0x3 /* enum */
6044 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ 0x4 /* enum */
6045 #define MC_CMD_MUM_IN_GPIO_OP 0x5 /* enum */
6046
6047 /* MC_CMD_MUM_IN_GPIO_IN_READ msgrequest */
6048 #define MC_CMD_MUM_IN_GPIO_IN_READ_LEN 8
6049 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6050 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6051 #define MC_CMD_MUM_IN_GPIO_IN_READ_HDR_OFST 4
6052 #define MC_CMD_MUM_IN_GPIO_IN_READ_HDR_LEN 4
6053
6054 /* MC_CMD_MUM_IN_GPIO_OUT_WRITE msgrequest */
6055 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_LEN 16
6056 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6057 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6058 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_HDR_OFST 4
6059 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_HDR_LEN 4
6060 /* The first 32-bit word to be written to the GPIO OUT register. */
6061 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK1_OFST 8
6062 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK1_LEN 4
6063 /* The second 32-bit word to be written to the GPIO OUT register. */
6064 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK2_OFST 12
6065 #define MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK2_LEN 4
6066
6067 /* MC_CMD_MUM_IN_GPIO_OUT_READ msgrequest */
6068 #define MC_CMD_MUM_IN_GPIO_OUT_READ_LEN 8
6069 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6070 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6071 #define MC_CMD_MUM_IN_GPIO_OUT_READ_HDR_OFST 4
6072 #define MC_CMD_MUM_IN_GPIO_OUT_READ_HDR_LEN 4
6073
6074 /* MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE msgrequest */
6075 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_LEN 16
6076 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6077 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6078 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_HDR_OFST 4
6079 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_HDR_LEN 4
6080 /* The first 32-bit word to be written to the GPIO OUT ENABLE register. */
6081 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK1_OFST 8
6082 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK1_LEN 4
6083 /* The second 32-bit word to be written to the GPIO OUT ENABLE register. */
6084 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK2_OFST 12
6085 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK2_LEN 4
6086
6087 /* MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ msgrequest */
6088 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ_LEN 8
6089 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6090 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6091 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ_HDR_OFST 4
6092 #define MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ_HDR_LEN 4
6093
6094 /* MC_CMD_MUM_IN_GPIO_OP msgrequest */
6095 #define MC_CMD_MUM_IN_GPIO_OP_LEN 8
6096 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6097 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6098 #define MC_CMD_MUM_IN_GPIO_OP_HDR_OFST 4
6099 #define MC_CMD_MUM_IN_GPIO_OP_HDR_LEN 4
6100 #define MC_CMD_MUM_IN_GPIO_OP_BITWISE_OP_LBN 8
6101 #define MC_CMD_MUM_IN_GPIO_OP_BITWISE_OP_WIDTH 8
6102 #define MC_CMD_MUM_IN_GPIO_OP_OUT_READ 0x0 /* enum */
6103 #define MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE 0x1 /* enum */
6104 #define MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG 0x2 /* enum */
6105 #define MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE 0x3 /* enum */
6106 #define MC_CMD_MUM_IN_GPIO_OP_GPIO_NUMBER_LBN 16
6107 #define MC_CMD_MUM_IN_GPIO_OP_GPIO_NUMBER_WIDTH 8
6108
6109 /* MC_CMD_MUM_IN_GPIO_OP_OUT_READ msgrequest */
6110 #define MC_CMD_MUM_IN_GPIO_OP_OUT_READ_LEN 8
6111 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6112 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6113 #define MC_CMD_MUM_IN_GPIO_OP_OUT_READ_HDR_OFST 4
6114 #define MC_CMD_MUM_IN_GPIO_OP_OUT_READ_HDR_LEN 4
6115
6116 /* MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE msgrequest */
6117 #define MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_LEN 8
6118 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6119 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6120 #define MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_HDR_OFST 4
6121 #define MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_HDR_LEN 4
6122 #define MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_WRITEBIT_LBN 24
6123 #define MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_WRITEBIT_WIDTH 8
6124
6125 /* MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG msgrequest */
6126 #define MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_LEN 8
6127 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6128 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6129 #define MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_HDR_OFST 4
6130 #define MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_HDR_LEN 4
6131 #define MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_CFG_LBN 24
6132 #define MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_CFG_WIDTH 8
6133
6134 /* MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE msgrequest */
6135 #define MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_LEN 8
6136 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6137 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6138 #define MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_HDR_OFST 4
6139 #define MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_HDR_LEN 4
6140 #define MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_ENABLEBIT_LBN 24
6141 #define MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_ENABLEBIT_WIDTH 8
6142
6143 /* MC_CMD_MUM_IN_READ_SENSORS msgrequest */
6144 #define MC_CMD_MUM_IN_READ_SENSORS_LEN 8
6145 /* MUM cmd header */
6146 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6147 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6148 #define MC_CMD_MUM_IN_READ_SENSORS_PARAMS_OFST 4
6149 #define MC_CMD_MUM_IN_READ_SENSORS_PARAMS_LEN 4
6150 #define MC_CMD_MUM_IN_READ_SENSORS_SENSOR_ID_LBN 0
6151 #define MC_CMD_MUM_IN_READ_SENSORS_SENSOR_ID_WIDTH 8
6152 #define MC_CMD_MUM_IN_READ_SENSORS_NUM_SENSORS_LBN 8
6153 #define MC_CMD_MUM_IN_READ_SENSORS_NUM_SENSORS_WIDTH 8
6154
6155 /* MC_CMD_MUM_IN_PROGRAM_CLOCKS msgrequest */
6156 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_LEN 12
6157 /* MUM cmd header */
6158 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6159 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6160 /* Bit-mask of clocks to be programmed */
6161 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_MASK_OFST 4
6162 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_MASK_LEN 4
6163 #define MC_CMD_MUM_CLOCK_ID_FPGA 0x0 /* enum */
6164 #define MC_CMD_MUM_CLOCK_ID_DDR 0x1 /* enum */
6165 #define MC_CMD_MUM_CLOCK_ID_NIC 0x2 /* enum */
6166 /* Control flags for clock programming */
6167 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_FLAGS_OFST 8
6168 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_FLAGS_LEN 4
6169 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_LBN 0
6170 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_WIDTH 1
6171 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_LBN 1
6172 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_WIDTH 1
6173 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_LBN 2
6174 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_WIDTH 1
6175
6176 /* MC_CMD_MUM_IN_FPGA_LOAD msgrequest */
6177 #define MC_CMD_MUM_IN_FPGA_LOAD_LEN 8
6178 /* MUM cmd header */
6179 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6180 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6181 /* Enable/Disable FPGA config from flash */
6182 #define MC_CMD_MUM_IN_FPGA_LOAD_ENABLE_OFST 4
6183 #define MC_CMD_MUM_IN_FPGA_LOAD_ENABLE_LEN 4
6184
6185 /* MC_CMD_MUM_IN_READ_ATB_SENSOR msgrequest */
6186 #define MC_CMD_MUM_IN_READ_ATB_SENSOR_LEN 4
6187 /* MUM cmd header */
6188 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6189 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6190
6191 /* MC_CMD_MUM_IN_QSFP msgrequest */
6192 #define MC_CMD_MUM_IN_QSFP_LEN 12
6193 /* MUM cmd header */
6194 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6195 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6196 #define MC_CMD_MUM_IN_QSFP_HDR_OFST 4
6197 #define MC_CMD_MUM_IN_QSFP_HDR_LEN 4
6198 #define MC_CMD_MUM_IN_QSFP_OPCODE_LBN 0
6199 #define MC_CMD_MUM_IN_QSFP_OPCODE_WIDTH 4
6200 #define MC_CMD_MUM_IN_QSFP_INIT 0x0 /* enum */
6201 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE 0x1 /* enum */
6202 #define MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP 0x2 /* enum */
6203 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO 0x3 /* enum */
6204 #define MC_CMD_MUM_IN_QSFP_FILL_STATS 0x4 /* enum */
6205 #define MC_CMD_MUM_IN_QSFP_POLL_BIST 0x5 /* enum */
6206 #define MC_CMD_MUM_IN_QSFP_IDX_OFST 8
6207 #define MC_CMD_MUM_IN_QSFP_IDX_LEN 4
6208
6209 /* MC_CMD_MUM_IN_QSFP_INIT msgrequest */
6210 #define MC_CMD_MUM_IN_QSFP_INIT_LEN 16
6211 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6212 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6213 #define MC_CMD_MUM_IN_QSFP_INIT_HDR_OFST 4
6214 #define MC_CMD_MUM_IN_QSFP_INIT_HDR_LEN 4
6215 #define MC_CMD_MUM_IN_QSFP_INIT_IDX_OFST 8
6216 #define MC_CMD_MUM_IN_QSFP_INIT_IDX_LEN 4
6217 #define MC_CMD_MUM_IN_QSFP_INIT_CAGE_OFST 12
6218 #define MC_CMD_MUM_IN_QSFP_INIT_CAGE_LEN 4
6219
6220 /* MC_CMD_MUM_IN_QSFP_RECONFIGURE msgrequest */
6221 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_LEN 24
6222 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6223 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6224 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_HDR_OFST 4
6225 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_HDR_LEN 4
6226 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_IDX_OFST 8
6227 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_IDX_LEN 4
6228 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_TX_DISABLE_OFST 12
6229 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_TX_DISABLE_LEN 4
6230 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LANES_OFST 16
6231 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LANES_LEN 4
6232 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LINK_SPEED_OFST 20
6233 #define MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LINK_SPEED_LEN 4
6234
6235 /* MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP msgrequest */
6236 #define MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_LEN 12
6237 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6238 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6239 #define MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_HDR_OFST 4
6240 #define MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_HDR_LEN 4
6241 #define MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_IDX_OFST 8
6242 #define MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_IDX_LEN 4
6243
6244 /* MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO msgrequest */
6245 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_LEN 16
6246 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6247 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6248 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_HDR_OFST 4
6249 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_HDR_LEN 4
6250 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_IDX_OFST 8
6251 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_IDX_LEN 4
6252 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_PAGE_OFST 12
6253 #define MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_PAGE_LEN 4
6254
6255 /* MC_CMD_MUM_IN_QSFP_FILL_STATS msgrequest */
6256 #define MC_CMD_MUM_IN_QSFP_FILL_STATS_LEN 12
6257 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6258 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6259 #define MC_CMD_MUM_IN_QSFP_FILL_STATS_HDR_OFST 4
6260 #define MC_CMD_MUM_IN_QSFP_FILL_STATS_HDR_LEN 4
6261 #define MC_CMD_MUM_IN_QSFP_FILL_STATS_IDX_OFST 8
6262 #define MC_CMD_MUM_IN_QSFP_FILL_STATS_IDX_LEN 4
6263
6264 /* MC_CMD_MUM_IN_QSFP_POLL_BIST msgrequest */
6265 #define MC_CMD_MUM_IN_QSFP_POLL_BIST_LEN 12
6266 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6267 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6268 #define MC_CMD_MUM_IN_QSFP_POLL_BIST_HDR_OFST 4
6269 #define MC_CMD_MUM_IN_QSFP_POLL_BIST_HDR_LEN 4
6270 #define MC_CMD_MUM_IN_QSFP_POLL_BIST_IDX_OFST 8
6271 #define MC_CMD_MUM_IN_QSFP_POLL_BIST_IDX_LEN 4
6272
6273 /* MC_CMD_MUM_IN_READ_DDR_INFO msgrequest */
6274 #define MC_CMD_MUM_IN_READ_DDR_INFO_LEN 4
6275 /* MUM cmd header */
6276 /*            MC_CMD_MUM_IN_CMD_OFST 0 */
6277 /*            MC_CMD_MUM_IN_CMD_LEN 4 */
6278
6279 /* MC_CMD_MUM_OUT msgresponse */
6280 #define MC_CMD_MUM_OUT_LEN 0
6281
6282 /* MC_CMD_MUM_OUT_NULL msgresponse */
6283 #define MC_CMD_MUM_OUT_NULL_LEN 0
6284
6285 /* MC_CMD_MUM_OUT_GET_VERSION msgresponse */
6286 #define MC_CMD_MUM_OUT_GET_VERSION_LEN 12
6287 #define MC_CMD_MUM_OUT_GET_VERSION_FIRMWARE_OFST 0
6288 #define MC_CMD_MUM_OUT_GET_VERSION_FIRMWARE_LEN 4
6289 #define MC_CMD_MUM_OUT_GET_VERSION_VERSION_OFST 4
6290 #define MC_CMD_MUM_OUT_GET_VERSION_VERSION_LEN 8
6291 #define MC_CMD_MUM_OUT_GET_VERSION_VERSION_LO_OFST 4
6292 #define MC_CMD_MUM_OUT_GET_VERSION_VERSION_HI_OFST 8
6293
6294 /* MC_CMD_MUM_OUT_RAW_CMD msgresponse */
6295 #define MC_CMD_MUM_OUT_RAW_CMD_LENMIN 1
6296 #define MC_CMD_MUM_OUT_RAW_CMD_LENMAX 252
6297 #define MC_CMD_MUM_OUT_RAW_CMD_LEN(num) (0+1*(num))
6298 /* returned data */
6299 #define MC_CMD_MUM_OUT_RAW_CMD_DATA_OFST 0
6300 #define MC_CMD_MUM_OUT_RAW_CMD_DATA_LEN 1
6301 #define MC_CMD_MUM_OUT_RAW_CMD_DATA_MINNUM 1
6302 #define MC_CMD_MUM_OUT_RAW_CMD_DATA_MAXNUM 252
6303
6304 /* MC_CMD_MUM_OUT_READ msgresponse */
6305 #define MC_CMD_MUM_OUT_READ_LENMIN 4
6306 #define MC_CMD_MUM_OUT_READ_LENMAX 252
6307 #define MC_CMD_MUM_OUT_READ_LEN(num) (0+4*(num))
6308 #define MC_CMD_MUM_OUT_READ_BUFFER_OFST 0
6309 #define MC_CMD_MUM_OUT_READ_BUFFER_LEN 4
6310 #define MC_CMD_MUM_OUT_READ_BUFFER_MINNUM 1
6311 #define MC_CMD_MUM_OUT_READ_BUFFER_MAXNUM 63
6312
6313 /* MC_CMD_MUM_OUT_WRITE msgresponse */
6314 #define MC_CMD_MUM_OUT_WRITE_LEN 0
6315
6316 /* MC_CMD_MUM_OUT_LOG msgresponse */
6317 #define MC_CMD_MUM_OUT_LOG_LEN 0
6318
6319 /* MC_CMD_MUM_OUT_LOG_OP_UART msgresponse */
6320 #define MC_CMD_MUM_OUT_LOG_OP_UART_LEN 0
6321
6322 /* MC_CMD_MUM_OUT_GPIO_IN_READ msgresponse */
6323 #define MC_CMD_MUM_OUT_GPIO_IN_READ_LEN 8
6324 /* The first 32-bit word read from the GPIO IN register. */
6325 #define MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK1_OFST 0
6326 #define MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK1_LEN 4
6327 /* The second 32-bit word read from the GPIO IN register. */
6328 #define MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK2_OFST 4
6329 #define MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK2_LEN 4
6330
6331 /* MC_CMD_MUM_OUT_GPIO_OUT_WRITE msgresponse */
6332 #define MC_CMD_MUM_OUT_GPIO_OUT_WRITE_LEN 0
6333
6334 /* MC_CMD_MUM_OUT_GPIO_OUT_READ msgresponse */
6335 #define MC_CMD_MUM_OUT_GPIO_OUT_READ_LEN 8
6336 /* The first 32-bit word read from the GPIO OUT register. */
6337 #define MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK1_OFST 0
6338 #define MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK1_LEN 4
6339 /* The second 32-bit word read from the GPIO OUT register. */
6340 #define MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK2_OFST 4
6341 #define MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK2_LEN 4
6342
6343 /* MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_WRITE msgresponse */
6344 #define MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_WRITE_LEN 0
6345
6346 /* MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ msgresponse */
6347 #define MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_LEN 8
6348 #define MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK1_OFST 0
6349 #define MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK1_LEN 4
6350 #define MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK2_OFST 4
6351 #define MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK2_LEN 4
6352
6353 /* MC_CMD_MUM_OUT_GPIO_OP_OUT_READ msgresponse */
6354 #define MC_CMD_MUM_OUT_GPIO_OP_OUT_READ_LEN 4
6355 #define MC_CMD_MUM_OUT_GPIO_OP_OUT_READ_BIT_READ_OFST 0
6356 #define MC_CMD_MUM_OUT_GPIO_OP_OUT_READ_BIT_READ_LEN 4
6357
6358 /* MC_CMD_MUM_OUT_GPIO_OP_OUT_WRITE msgresponse */
6359 #define MC_CMD_MUM_OUT_GPIO_OP_OUT_WRITE_LEN 0
6360
6361 /* MC_CMD_MUM_OUT_GPIO_OP_OUT_CONFIG msgresponse */
6362 #define MC_CMD_MUM_OUT_GPIO_OP_OUT_CONFIG_LEN 0
6363
6364 /* MC_CMD_MUM_OUT_GPIO_OP_OUT_ENABLE msgresponse */
6365 #define MC_CMD_MUM_OUT_GPIO_OP_OUT_ENABLE_LEN 0
6366
6367 /* MC_CMD_MUM_OUT_READ_SENSORS msgresponse */
6368 #define MC_CMD_MUM_OUT_READ_SENSORS_LENMIN 4
6369 #define MC_CMD_MUM_OUT_READ_SENSORS_LENMAX 252
6370 #define MC_CMD_MUM_OUT_READ_SENSORS_LEN(num) (0+4*(num))
6371 #define MC_CMD_MUM_OUT_READ_SENSORS_DATA_OFST 0
6372 #define MC_CMD_MUM_OUT_READ_SENSORS_DATA_LEN 4
6373 #define MC_CMD_MUM_OUT_READ_SENSORS_DATA_MINNUM 1
6374 #define MC_CMD_MUM_OUT_READ_SENSORS_DATA_MAXNUM 63
6375 #define MC_CMD_MUM_OUT_READ_SENSORS_READING_LBN 0
6376 #define MC_CMD_MUM_OUT_READ_SENSORS_READING_WIDTH 16
6377 #define MC_CMD_MUM_OUT_READ_SENSORS_STATE_LBN 16
6378 #define MC_CMD_MUM_OUT_READ_SENSORS_STATE_WIDTH 8
6379 #define MC_CMD_MUM_OUT_READ_SENSORS_TYPE_LBN 24
6380 #define MC_CMD_MUM_OUT_READ_SENSORS_TYPE_WIDTH 8
6381
6382 /* MC_CMD_MUM_OUT_PROGRAM_CLOCKS msgresponse */
6383 #define MC_CMD_MUM_OUT_PROGRAM_CLOCKS_LEN 4
6384 #define MC_CMD_MUM_OUT_PROGRAM_CLOCKS_OK_MASK_OFST 0
6385 #define MC_CMD_MUM_OUT_PROGRAM_CLOCKS_OK_MASK_LEN 4
6386
6387 /* MC_CMD_MUM_OUT_FPGA_LOAD msgresponse */
6388 #define MC_CMD_MUM_OUT_FPGA_LOAD_LEN 0
6389
6390 /* MC_CMD_MUM_OUT_READ_ATB_SENSOR msgresponse */
6391 #define MC_CMD_MUM_OUT_READ_ATB_SENSOR_LEN 4
6392 #define MC_CMD_MUM_OUT_READ_ATB_SENSOR_RESULT_OFST 0
6393 #define MC_CMD_MUM_OUT_READ_ATB_SENSOR_RESULT_LEN 4
6394
6395 /* MC_CMD_MUM_OUT_QSFP_INIT msgresponse */
6396 #define MC_CMD_MUM_OUT_QSFP_INIT_LEN 0
6397
6398 /* MC_CMD_MUM_OUT_QSFP_RECONFIGURE msgresponse */
6399 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_LEN 8
6400 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LP_CAP_OFST 0
6401 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LP_CAP_LEN 4
6402 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_FLAGS_OFST 4
6403 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_FLAGS_LEN 4
6404 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_READY_LBN 0
6405 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_READY_WIDTH 1
6406 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LINK_UP_LBN 1
6407 #define MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LINK_UP_WIDTH 1
6408
6409 /* MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP msgresponse */
6410 #define MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP_LEN 4
6411 #define MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP_PORT_PHY_LP_CAP_OFST 0
6412 #define MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP_PORT_PHY_LP_CAP_LEN 4
6413
6414 /* MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO msgresponse */
6415 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LENMIN 5
6416 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LENMAX 252
6417 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LEN(num) (4+1*(num))
6418 /* in bytes */
6419 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATALEN_OFST 0
6420 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATALEN_LEN 4
6421 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_OFST 4
6422 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_LEN 1
6423 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_MINNUM 1
6424 #define MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_MAXNUM 248
6425
6426 /* MC_CMD_MUM_OUT_QSFP_FILL_STATS msgresponse */
6427 #define MC_CMD_MUM_OUT_QSFP_FILL_STATS_LEN 8
6428 #define MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PMA_PMD_LINK_UP_OFST 0
6429 #define MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PMA_PMD_LINK_UP_LEN 4
6430 #define MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PCS_LINK_UP_OFST 4
6431 #define MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PCS_LINK_UP_LEN 4
6432
6433 /* MC_CMD_MUM_OUT_QSFP_POLL_BIST msgresponse */
6434 #define MC_CMD_MUM_OUT_QSFP_POLL_BIST_LEN 4
6435 #define MC_CMD_MUM_OUT_QSFP_POLL_BIST_TEST_OFST 0
6436 #define MC_CMD_MUM_OUT_QSFP_POLL_BIST_TEST_LEN 4
6437
6438 /* MC_CMD_MUM_OUT_READ_DDR_INFO msgresponse */
6439 #define MC_CMD_MUM_OUT_READ_DDR_INFO_LENMIN 24
6440 #define MC_CMD_MUM_OUT_READ_DDR_INFO_LENMAX 248
6441 #define MC_CMD_MUM_OUT_READ_DDR_INFO_LEN(num) (8+8*(num))
6442 /* Discrete (soldered) DDR resistor strap info */
6443 #define MC_CMD_MUM_OUT_READ_DDR_INFO_DISCRETE_DDR_INFO_OFST 0
6444 #define MC_CMD_MUM_OUT_READ_DDR_INFO_DISCRETE_DDR_INFO_LEN 4
6445 #define MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_LBN 0
6446 #define MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_WIDTH 16
6447 #define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_LBN 16
6448 #define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_WIDTH 16
6449 /* Number of SODIMM info records */
6450 #define MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_RECORDS_OFST 4
6451 #define MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_RECORDS_LEN 4
6452 /* Array of SODIMM info records */
6453 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_OFST 8
6454 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_LEN 8
6455 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_LO_OFST 8
6456 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_HI_OFST 12
6457 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MINNUM 2
6458 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MAXNUM 30
6459 #define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_LBN 0
6460 #define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_WIDTH 8
6461 /* enum: SODIMM bank 1 (Top SODIMM for Sorrento) */
6462 #define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK1 0x0
6463 /* enum: SODIMM bank 2 (Bottom SODDIMM for Sorrento) */
6464 #define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK2 0x1
6465 /* enum: Total number of SODIMM banks */
6466 #define MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_BANKS 0x2
6467 #define MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_LBN 8
6468 #define MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_WIDTH 8
6469 #define MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_LBN 16
6470 #define MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_WIDTH 4
6471 #define MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_LBN 20
6472 #define MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_WIDTH 4
6473 #define MC_CMD_MUM_OUT_READ_DDR_INFO_NOT_POWERED 0x0 /* enum */
6474 #define MC_CMD_MUM_OUT_READ_DDR_INFO_1V25 0x1 /* enum */
6475 #define MC_CMD_MUM_OUT_READ_DDR_INFO_1V35 0x2 /* enum */
6476 #define MC_CMD_MUM_OUT_READ_DDR_INFO_1V5 0x3 /* enum */
6477 /* enum: Values 5-15 are reserved for future usage */
6478 #define MC_CMD_MUM_OUT_READ_DDR_INFO_1V8 0x4
6479 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_LBN 24
6480 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_WIDTH 8
6481 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_LBN 32
6482 #define MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_WIDTH 16
6483 #define MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_LBN 48
6484 #define MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_WIDTH 4
6485 /* enum: No module present */
6486 #define MC_CMD_MUM_OUT_READ_DDR_INFO_ABSENT 0x0
6487 /* enum: Module present supported and powered on */
6488 #define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_POWERED 0x1
6489 /* enum: Module present but bad type */
6490 #define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_TYPE 0x2
6491 /* enum: Module present but incompatible voltage */
6492 #define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_VOLTAGE 0x3
6493 /* enum: Module present but unknown SPD */
6494 #define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_SPD 0x4
6495 /* enum: Module present but slot cannot support it */
6496 #define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_SLOT 0x5
6497 /* enum: Modules may or may not be present, but cannot establish contact by I2C
6498  */
6499 #define MC_CMD_MUM_OUT_READ_DDR_INFO_NOT_REACHABLE 0x6
6500 #define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_LBN 52
6501 #define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_WIDTH 12
6502
6503 /* MC_CMD_RESOURCE_SPECIFIER enum */
6504 /* enum: Any */
6505 #define MC_CMD_RESOURCE_INSTANCE_ANY 0xffffffff
6506 /* enum: None */
6507 #define MC_CMD_RESOURCE_INSTANCE_NONE 0xfffffffe
6508
6509 /* EVB_PORT_ID structuredef */
6510 #define EVB_PORT_ID_LEN 4
6511 #define EVB_PORT_ID_PORT_ID_OFST 0
6512 #define EVB_PORT_ID_PORT_ID_LEN 4
6513 /* enum: An invalid port handle. */
6514 #define EVB_PORT_ID_NULL  0x0
6515 /* enum: The port assigned to this function.. */
6516 #define EVB_PORT_ID_ASSIGNED  0x1000000
6517 /* enum: External network port 0 */
6518 #define EVB_PORT_ID_MAC0  0x2000000
6519 /* enum: External network port 1 */
6520 #define EVB_PORT_ID_MAC1  0x2000001
6521 /* enum: External network port 2 */
6522 #define EVB_PORT_ID_MAC2  0x2000002
6523 /* enum: External network port 3 */
6524 #define EVB_PORT_ID_MAC3  0x2000003
6525 #define EVB_PORT_ID_PORT_ID_LBN 0
6526 #define EVB_PORT_ID_PORT_ID_WIDTH 32
6527
6528 /* EVB_VLAN_TAG structuredef */
6529 #define EVB_VLAN_TAG_LEN 2
6530 /* The VLAN tag value */
6531 #define EVB_VLAN_TAG_VLAN_ID_LBN 0
6532 #define EVB_VLAN_TAG_VLAN_ID_WIDTH 12
6533 #define EVB_VLAN_TAG_MODE_LBN 12
6534 #define EVB_VLAN_TAG_MODE_WIDTH 4
6535 /* enum: Insert the VLAN. */
6536 #define EVB_VLAN_TAG_INSERT  0x0
6537 /* enum: Replace the VLAN if already present. */
6538 #define EVB_VLAN_TAG_REPLACE 0x1
6539
6540 /* BUFTBL_ENTRY structuredef */
6541 #define BUFTBL_ENTRY_LEN 12
6542 /* the owner ID */
6543 #define BUFTBL_ENTRY_OID_OFST 0
6544 #define BUFTBL_ENTRY_OID_LEN 2
6545 #define BUFTBL_ENTRY_OID_LBN 0
6546 #define BUFTBL_ENTRY_OID_WIDTH 16
6547 /* the page parameter as one of ESE_DZ_SMC_PAGE_SIZE_ */
6548 #define BUFTBL_ENTRY_PGSZ_OFST 2
6549 #define BUFTBL_ENTRY_PGSZ_LEN 2
6550 #define BUFTBL_ENTRY_PGSZ_LBN 16
6551 #define BUFTBL_ENTRY_PGSZ_WIDTH 16
6552 /* the raw 64-bit address field from the SMC, not adjusted for page size */
6553 #define BUFTBL_ENTRY_RAWADDR_OFST 4
6554 #define BUFTBL_ENTRY_RAWADDR_LEN 8
6555 #define BUFTBL_ENTRY_RAWADDR_LO_OFST 4
6556 #define BUFTBL_ENTRY_RAWADDR_HI_OFST 8
6557 #define BUFTBL_ENTRY_RAWADDR_LBN 32
6558 #define BUFTBL_ENTRY_RAWADDR_WIDTH 64
6559
6560 /* NVRAM_PARTITION_TYPE structuredef */
6561 #define NVRAM_PARTITION_TYPE_LEN 2
6562 #define NVRAM_PARTITION_TYPE_ID_OFST 0
6563 #define NVRAM_PARTITION_TYPE_ID_LEN 2
6564 /* enum: Primary MC firmware partition */
6565 #define NVRAM_PARTITION_TYPE_MC_FIRMWARE          0x100
6566 /* enum: Secondary MC firmware partition */
6567 #define NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP   0x200
6568 /* enum: Expansion ROM partition */
6569 #define NVRAM_PARTITION_TYPE_EXPANSION_ROM        0x300
6570 /* enum: Static configuration TLV partition */
6571 #define NVRAM_PARTITION_TYPE_STATIC_CONFIG        0x400
6572 /* enum: Dynamic configuration TLV partition */
6573 #define NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG       0x500
6574 /* enum: Expansion ROM configuration data for port 0 */
6575 #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0  0x600
6576 /* enum: Synonym for EXPROM_CONFIG_PORT0 as used in pmap files */
6577 #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG        0x600
6578 /* enum: Expansion ROM configuration data for port 1 */
6579 #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT1  0x601
6580 /* enum: Expansion ROM configuration data for port 2 */
6581 #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT2  0x602
6582 /* enum: Expansion ROM configuration data for port 3 */
6583 #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT3  0x603
6584 /* enum: Non-volatile log output partition */
6585 #define NVRAM_PARTITION_TYPE_LOG                  0x700
6586 /* enum: Non-volatile log output of second core on dual-core device */
6587 #define NVRAM_PARTITION_TYPE_LOG_SLAVE            0x701
6588 /* enum: Device state dump output partition */
6589 #define NVRAM_PARTITION_TYPE_DUMP                 0x800
6590 /* enum: Application license key storage partition */
6591 #define NVRAM_PARTITION_TYPE_LICENSE              0x900
6592 /* enum: Start of range used for PHY partitions (low 8 bits are the PHY ID) */
6593 #define NVRAM_PARTITION_TYPE_PHY_MIN              0xa00
6594 /* enum: End of range used for PHY partitions (low 8 bits are the PHY ID) */
6595 #define NVRAM_PARTITION_TYPE_PHY_MAX              0xaff
6596 /* enum: Primary FPGA partition */
6597 #define NVRAM_PARTITION_TYPE_FPGA                 0xb00
6598 /* enum: Secondary FPGA partition */
6599 #define NVRAM_PARTITION_TYPE_FPGA_BACKUP          0xb01
6600 /* enum: FC firmware partition */
6601 #define NVRAM_PARTITION_TYPE_FC_FIRMWARE          0xb02
6602 /* enum: FC License partition */
6603 #define NVRAM_PARTITION_TYPE_FC_LICENSE           0xb03
6604 /* enum: Non-volatile log output partition for FC */
6605 #define NVRAM_PARTITION_TYPE_FC_LOG               0xb04
6606 /* enum: MUM firmware partition */
6607 #define NVRAM_PARTITION_TYPE_MUM_FIRMWARE         0xc00
6608 /* enum: SUC firmware partition (this is intentionally an alias of
6609  * MUM_FIRMWARE)
6610  */
6611 #define NVRAM_PARTITION_TYPE_SUC_FIRMWARE         0xc00
6612 /* enum: MUM Non-volatile log output partition. */
6613 #define NVRAM_PARTITION_TYPE_MUM_LOG              0xc01
6614 /* enum: MUM Application table partition. */
6615 #define NVRAM_PARTITION_TYPE_MUM_APPTABLE         0xc02
6616 /* enum: MUM boot rom partition. */
6617 #define NVRAM_PARTITION_TYPE_MUM_BOOT_ROM         0xc03
6618 /* enum: MUM production signatures & calibration rom partition. */
6619 #define NVRAM_PARTITION_TYPE_MUM_PROD_ROM         0xc04
6620 /* enum: MUM user signatures & calibration rom partition. */
6621 #define NVRAM_PARTITION_TYPE_MUM_USER_ROM         0xc05
6622 /* enum: MUM fuses and lockbits partition. */
6623 #define NVRAM_PARTITION_TYPE_MUM_FUSELOCK         0xc06
6624 /* enum: UEFI expansion ROM if separate from PXE */
6625 #define NVRAM_PARTITION_TYPE_EXPANSION_UEFI       0xd00
6626 /* enum: Used by the expansion ROM for logging */
6627 #define NVRAM_PARTITION_TYPE_PXE_LOG              0x1000
6628 /* enum: Used for XIP code of shmbooted images */
6629 #define NVRAM_PARTITION_TYPE_XIP_SCRATCH          0x1100
6630 /* enum: Spare partition 2 */
6631 #define NVRAM_PARTITION_TYPE_SPARE_2              0x1200
6632 /* enum: Manufacturing partition. Used during manufacture to pass information
6633  * between XJTAG and Manftest.
6634  */
6635 #define NVRAM_PARTITION_TYPE_MANUFACTURING        0x1300
6636 /* enum: Spare partition 4 */
6637 #define NVRAM_PARTITION_TYPE_SPARE_4              0x1400
6638 /* enum: Spare partition 5 */
6639 #define NVRAM_PARTITION_TYPE_SPARE_5              0x1500
6640 /* enum: Partition for reporting MC status. See mc_flash_layout.h
6641  * medford_mc_status_hdr_t for layout on Medford.
6642  */
6643 #define NVRAM_PARTITION_TYPE_STATUS               0x1600
6644 /* enum: Spare partition 13 */
6645 #define NVRAM_PARTITION_TYPE_SPARE_13              0x1700
6646 /* enum: Spare partition 14 */
6647 #define NVRAM_PARTITION_TYPE_SPARE_14              0x1800
6648 /* enum: Spare partition 15 */
6649 #define NVRAM_PARTITION_TYPE_SPARE_15              0x1900
6650 /* enum: Spare partition 16 */
6651 #define NVRAM_PARTITION_TYPE_SPARE_16              0x1a00
6652 /* enum: Factory defaults for dynamic configuration */
6653 #define NVRAM_PARTITION_TYPE_DYNCONFIG_DEFAULTS    0x1b00
6654 /* enum: Factory defaults for expansion ROM configuration */
6655 #define NVRAM_PARTITION_TYPE_ROMCONFIG_DEFAULTS    0x1c00
6656 /* enum: Start of reserved value range (firmware may use for any purpose) */
6657 #define NVRAM_PARTITION_TYPE_RESERVED_VALUES_MIN  0xff00
6658 /* enum: End of reserved value range (firmware may use for any purpose) */
6659 #define NVRAM_PARTITION_TYPE_RESERVED_VALUES_MAX  0xfffd
6660 /* enum: Recovery partition map (provided if real map is missing or corrupt) */
6661 #define NVRAM_PARTITION_TYPE_RECOVERY_MAP         0xfffe
6662 /* enum: Partition map (real map as stored in flash) */
6663 #define NVRAM_PARTITION_TYPE_PARTITION_MAP        0xffff
6664 #define NVRAM_PARTITION_TYPE_ID_LBN 0
6665 #define NVRAM_PARTITION_TYPE_ID_WIDTH 16
6666
6667 /* LICENSED_APP_ID structuredef */
6668 #define LICENSED_APP_ID_LEN 4
6669 #define LICENSED_APP_ID_ID_OFST 0
6670 #define LICENSED_APP_ID_ID_LEN 4
6671 /* enum: OpenOnload */
6672 #define LICENSED_APP_ID_ONLOAD                  0x1
6673 /* enum: PTP timestamping */
6674 #define LICENSED_APP_ID_PTP                     0x2
6675 /* enum: SolarCapture Pro */
6676 #define LICENSED_APP_ID_SOLARCAPTURE_PRO        0x4
6677 /* enum: SolarSecure filter engine */
6678 #define LICENSED_APP_ID_SOLARSECURE             0x8
6679 /* enum: Performance monitor */
6680 #define LICENSED_APP_ID_PERF_MONITOR            0x10
6681 /* enum: SolarCapture Live */
6682 #define LICENSED_APP_ID_SOLARCAPTURE_LIVE       0x20
6683 /* enum: Capture SolarSystem */
6684 #define LICENSED_APP_ID_CAPTURE_SOLARSYSTEM     0x40
6685 /* enum: Network Access Control */
6686 #define LICENSED_APP_ID_NETWORK_ACCESS_CONTROL  0x80
6687 /* enum: TCP Direct */
6688 #define LICENSED_APP_ID_TCP_DIRECT              0x100
6689 /* enum: Low Latency */
6690 #define LICENSED_APP_ID_LOW_LATENCY             0x200
6691 /* enum: SolarCapture Tap */
6692 #define LICENSED_APP_ID_SOLARCAPTURE_TAP        0x400
6693 /* enum: Capture SolarSystem 40G */
6694 #define LICENSED_APP_ID_CAPTURE_SOLARSYSTEM_40G 0x800
6695 /* enum: Capture SolarSystem 1G */
6696 #define LICENSED_APP_ID_CAPTURE_SOLARSYSTEM_1G  0x1000
6697 #define LICENSED_APP_ID_ID_LBN 0
6698 #define LICENSED_APP_ID_ID_WIDTH 32
6699
6700 /* LICENSED_FEATURES structuredef */
6701 #define LICENSED_FEATURES_LEN 8
6702 /* Bitmask of licensed firmware features */
6703 #define LICENSED_FEATURES_MASK_OFST 0
6704 #define LICENSED_FEATURES_MASK_LEN 8
6705 #define LICENSED_FEATURES_MASK_LO_OFST 0
6706 #define LICENSED_FEATURES_MASK_HI_OFST 4
6707 #define LICENSED_FEATURES_RX_CUT_THROUGH_LBN 0
6708 #define LICENSED_FEATURES_RX_CUT_THROUGH_WIDTH 1
6709 #define LICENSED_FEATURES_PIO_LBN 1
6710 #define LICENSED_FEATURES_PIO_WIDTH 1
6711 #define LICENSED_FEATURES_EVQ_TIMER_LBN 2
6712 #define LICENSED_FEATURES_EVQ_TIMER_WIDTH 1
6713 #define LICENSED_FEATURES_CLOCK_LBN 3
6714 #define LICENSED_FEATURES_CLOCK_WIDTH 1
6715 #define LICENSED_FEATURES_RX_TIMESTAMPS_LBN 4
6716 #define LICENSED_FEATURES_RX_TIMESTAMPS_WIDTH 1
6717 #define LICENSED_FEATURES_TX_TIMESTAMPS_LBN 5
6718 #define LICENSED_FEATURES_TX_TIMESTAMPS_WIDTH 1
6719 #define LICENSED_FEATURES_RX_SNIFF_LBN 6
6720 #define LICENSED_FEATURES_RX_SNIFF_WIDTH 1
6721 #define LICENSED_FEATURES_TX_SNIFF_LBN 7
6722 #define LICENSED_FEATURES_TX_SNIFF_WIDTH 1
6723 #define LICENSED_FEATURES_PROXY_FILTER_OPS_LBN 8
6724 #define LICENSED_FEATURES_PROXY_FILTER_OPS_WIDTH 1
6725 #define LICENSED_FEATURES_EVENT_CUT_THROUGH_LBN 9
6726 #define LICENSED_FEATURES_EVENT_CUT_THROUGH_WIDTH 1
6727 #define LICENSED_FEATURES_MASK_LBN 0
6728 #define LICENSED_FEATURES_MASK_WIDTH 64
6729
6730 /* LICENSED_V3_APPS structuredef */
6731 #define LICENSED_V3_APPS_LEN 8
6732 /* Bitmask of licensed applications */
6733 #define LICENSED_V3_APPS_MASK_OFST 0
6734 #define LICENSED_V3_APPS_MASK_LEN 8
6735 #define LICENSED_V3_APPS_MASK_LO_OFST 0
6736 #define LICENSED_V3_APPS_MASK_HI_OFST 4
6737 #define LICENSED_V3_APPS_ONLOAD_LBN 0
6738 #define LICENSED_V3_APPS_ONLOAD_WIDTH 1
6739 #define LICENSED_V3_APPS_PTP_LBN 1
6740 #define LICENSED_V3_APPS_PTP_WIDTH 1
6741 #define LICENSED_V3_APPS_SOLARCAPTURE_PRO_LBN 2
6742 #define LICENSED_V3_APPS_SOLARCAPTURE_PRO_WIDTH 1
6743 #define LICENSED_V3_APPS_SOLARSECURE_LBN 3
6744 #define LICENSED_V3_APPS_SOLARSECURE_WIDTH 1
6745 #define LICENSED_V3_APPS_PERF_MONITOR_LBN 4
6746 #define LICENSED_V3_APPS_PERF_MONITOR_WIDTH 1
6747 #define LICENSED_V3_APPS_SOLARCAPTURE_LIVE_LBN 5
6748 #define LICENSED_V3_APPS_SOLARCAPTURE_LIVE_WIDTH 1
6749 #define LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_LBN 6
6750 #define LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_WIDTH 1
6751 #define LICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_LBN 7
6752 #define LICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_WIDTH 1
6753 #define LICENSED_V3_APPS_TCP_DIRECT_LBN 8
6754 #define LICENSED_V3_APPS_TCP_DIRECT_WIDTH 1
6755 #define LICENSED_V3_APPS_LOW_LATENCY_LBN 9
6756 #define LICENSED_V3_APPS_LOW_LATENCY_WIDTH 1
6757 #define LICENSED_V3_APPS_SOLARCAPTURE_TAP_LBN 10
6758 #define LICENSED_V3_APPS_SOLARCAPTURE_TAP_WIDTH 1
6759 #define LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_40G_LBN 11
6760 #define LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_40G_WIDTH 1
6761 #define LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_1G_LBN 12
6762 #define LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_1G_WIDTH 1
6763 #define LICENSED_V3_APPS_MASK_LBN 0
6764 #define LICENSED_V3_APPS_MASK_WIDTH 64
6765
6766 /* LICENSED_V3_FEATURES structuredef */
6767 #define LICENSED_V3_FEATURES_LEN 8
6768 /* Bitmask of licensed firmware features */
6769 #define LICENSED_V3_FEATURES_MASK_OFST 0
6770 #define LICENSED_V3_FEATURES_MASK_LEN 8
6771 #define LICENSED_V3_FEATURES_MASK_LO_OFST 0
6772 #define LICENSED_V3_FEATURES_MASK_HI_OFST 4
6773 #define LICENSED_V3_FEATURES_RX_CUT_THROUGH_LBN 0
6774 #define LICENSED_V3_FEATURES_RX_CUT_THROUGH_WIDTH 1
6775 #define LICENSED_V3_FEATURES_PIO_LBN 1
6776 #define LICENSED_V3_FEATURES_PIO_WIDTH 1
6777 #define LICENSED_V3_FEATURES_EVQ_TIMER_LBN 2
6778 #define LICENSED_V3_FEATURES_EVQ_TIMER_WIDTH 1
6779 #define LICENSED_V3_FEATURES_CLOCK_LBN 3
6780 #define LICENSED_V3_FEATURES_CLOCK_WIDTH 1
6781 #define LICENSED_V3_FEATURES_RX_TIMESTAMPS_LBN 4
6782 #define LICENSED_V3_FEATURES_RX_TIMESTAMPS_WIDTH 1
6783 #define LICENSED_V3_FEATURES_TX_TIMESTAMPS_LBN 5
6784 #define LICENSED_V3_FEATURES_TX_TIMESTAMPS_WIDTH 1
6785 #define LICENSED_V3_FEATURES_RX_SNIFF_LBN 6
6786 #define LICENSED_V3_FEATURES_RX_SNIFF_WIDTH 1
6787 #define LICENSED_V3_FEATURES_TX_SNIFF_LBN 7
6788 #define LICENSED_V3_FEATURES_TX_SNIFF_WIDTH 1
6789 #define LICENSED_V3_FEATURES_PROXY_FILTER_OPS_LBN 8
6790 #define LICENSED_V3_FEATURES_PROXY_FILTER_OPS_WIDTH 1
6791 #define LICENSED_V3_FEATURES_EVENT_CUT_THROUGH_LBN 9
6792 #define LICENSED_V3_FEATURES_EVENT_CUT_THROUGH_WIDTH 1
6793 #define LICENSED_V3_FEATURES_MASK_LBN 0
6794 #define LICENSED_V3_FEATURES_MASK_WIDTH 64
6795
6796 /* TX_TIMESTAMP_EVENT structuredef */
6797 #define TX_TIMESTAMP_EVENT_LEN 6
6798 /* lower 16 bits of timestamp data */
6799 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_OFST 0
6800 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_LEN 2
6801 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_LBN 0
6802 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_WIDTH 16
6803 /* Type of TX event, ordinary TX completion, low or high part of TX timestamp
6804  */
6805 #define TX_TIMESTAMP_EVENT_TX_EV_TYPE_OFST 3
6806 #define TX_TIMESTAMP_EVENT_TX_EV_TYPE_LEN 1
6807 /* enum: This is a TX completion event, not a timestamp */
6808 #define TX_TIMESTAMP_EVENT_TX_EV_COMPLETION  0x0
6809 /* enum: This is a TX completion event for a CTPIO transmit. The event format
6810  * is the same as for TX_EV_COMPLETION.
6811  */
6812 #define TX_TIMESTAMP_EVENT_TX_EV_CTPIO_COMPLETION  0x11
6813 /* enum: This is the low part of a TX timestamp event */
6814 #define TX_TIMESTAMP_EVENT_TX_EV_TSTAMP_LO  0x51
6815 /* enum: This is the high part of a TX timestamp event */
6816 #define TX_TIMESTAMP_EVENT_TX_EV_TSTAMP_HI  0x52
6817 #define TX_TIMESTAMP_EVENT_TX_EV_TYPE_LBN 24
6818 #define TX_TIMESTAMP_EVENT_TX_EV_TYPE_WIDTH 8
6819 /* upper 16 bits of timestamp data */
6820 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_OFST 4
6821 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_LEN 2
6822 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_LBN 32
6823 #define TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_WIDTH 16
6824
6825 /* RSS_MODE structuredef */
6826 #define RSS_MODE_LEN 1
6827 /* The RSS mode for a particular packet type is a value from 0 - 15 which can
6828  * be considered as 4 bits selecting which fields are included in the hash. (A
6829  * value 0 effectively disables RSS spreading for the packet type.) The YAML
6830  * generation tools require this structure to be a whole number of bytes wide,
6831  * but only 4 bits are relevant.
6832  */
6833 #define RSS_MODE_HASH_SELECTOR_OFST 0
6834 #define RSS_MODE_HASH_SELECTOR_LEN 1
6835 #define RSS_MODE_HASH_SRC_ADDR_LBN 0
6836 #define RSS_MODE_HASH_SRC_ADDR_WIDTH 1
6837 #define RSS_MODE_HASH_DST_ADDR_LBN 1
6838 #define RSS_MODE_HASH_DST_ADDR_WIDTH 1
6839 #define RSS_MODE_HASH_SRC_PORT_LBN 2
6840 #define RSS_MODE_HASH_SRC_PORT_WIDTH 1
6841 #define RSS_MODE_HASH_DST_PORT_LBN 3
6842 #define RSS_MODE_HASH_DST_PORT_WIDTH 1
6843 #define RSS_MODE_HASH_SELECTOR_LBN 0
6844 #define RSS_MODE_HASH_SELECTOR_WIDTH 8
6845
6846 /* CTPIO_STATS_MAP structuredef */
6847 #define CTPIO_STATS_MAP_LEN 4
6848 /* The (function relative) VI number */
6849 #define CTPIO_STATS_MAP_VI_OFST 0
6850 #define CTPIO_STATS_MAP_VI_LEN 2
6851 #define CTPIO_STATS_MAP_VI_LBN 0
6852 #define CTPIO_STATS_MAP_VI_WIDTH 16
6853 /* The target bucket for the VI */
6854 #define CTPIO_STATS_MAP_BUCKET_OFST 2
6855 #define CTPIO_STATS_MAP_BUCKET_LEN 2
6856 #define CTPIO_STATS_MAP_BUCKET_LBN 16
6857 #define CTPIO_STATS_MAP_BUCKET_WIDTH 16
6858
6859
6860 /***********************************/
6861 /* MC_CMD_READ_REGS
6862  * Get a dump of the MCPU registers
6863  */
6864 #define MC_CMD_READ_REGS 0x50
6865 #undef  MC_CMD_0x50_PRIVILEGE_CTG
6866
6867 #define MC_CMD_0x50_PRIVILEGE_CTG SRIOV_CTG_INSECURE
6868
6869 /* MC_CMD_READ_REGS_IN msgrequest */
6870 #define MC_CMD_READ_REGS_IN_LEN 0
6871
6872 /* MC_CMD_READ_REGS_OUT msgresponse */
6873 #define MC_CMD_READ_REGS_OUT_LEN 308
6874 /* Whether the corresponding register entry contains a valid value */
6875 #define MC_CMD_READ_REGS_OUT_MASK_OFST 0
6876 #define MC_CMD_READ_REGS_OUT_MASK_LEN 16
6877 /* Same order as MIPS GDB (r0-r31, sr, lo, hi, bad, cause, 32 x float, fsr,
6878  * fir, fp)
6879  */
6880 #define MC_CMD_READ_REGS_OUT_REGS_OFST 16
6881 #define MC_CMD_READ_REGS_OUT_REGS_LEN 4
6882 #define MC_CMD_READ_REGS_OUT_REGS_NUM 73
6883
6884
6885 /***********************************/
6886 /* MC_CMD_INIT_EVQ
6887  * Set up an event queue according to the supplied parameters. The IN arguments
6888  * end with an address for each 4k of host memory required to back the EVQ.
6889  */
6890 #define MC_CMD_INIT_EVQ 0x80
6891 #undef  MC_CMD_0x80_PRIVILEGE_CTG
6892
6893 #define MC_CMD_0x80_PRIVILEGE_CTG SRIOV_CTG_GENERAL
6894
6895 /* MC_CMD_INIT_EVQ_IN msgrequest */
6896 #define MC_CMD_INIT_EVQ_IN_LENMIN 44
6897 #define MC_CMD_INIT_EVQ_IN_LENMAX 548
6898 #define MC_CMD_INIT_EVQ_IN_LEN(num) (36+8*(num))
6899 /* Size, in entries */
6900 #define MC_CMD_INIT_EVQ_IN_SIZE_OFST 0
6901 #define MC_CMD_INIT_EVQ_IN_SIZE_LEN 4
6902 /* Desired instance. Must be set to a specific instance, which is a function
6903  * local queue index.
6904  */
6905 #define MC_CMD_INIT_EVQ_IN_INSTANCE_OFST 4
6906 #define MC_CMD_INIT_EVQ_IN_INSTANCE_LEN 4
6907 /* The initial timer value. The load value is ignored if the timer mode is DIS.
6908  */
6909 #define MC_CMD_INIT_EVQ_IN_TMR_LOAD_OFST 8
6910 #define MC_CMD_INIT_EVQ_IN_TMR_LOAD_LEN 4
6911 /* The reload value is ignored in one-shot modes */
6912 #define MC_CMD_INIT_EVQ_IN_TMR_RELOAD_OFST 12
6913 #define MC_CMD_INIT_EVQ_IN_TMR_RELOAD_LEN 4
6914 /* tbd */
6915 #define MC_CMD_INIT_EVQ_IN_FLAGS_OFST 16
6916 #define MC_CMD_INIT_EVQ_IN_FLAGS_LEN 4
6917 #define MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_LBN 0
6918 #define MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_WIDTH 1
6919 #define MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_LBN 1
6920 #define MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_WIDTH 1
6921 #define MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_LBN 2
6922 #define MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_WIDTH 1
6923 #define MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_LBN 3
6924 #define MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_WIDTH 1
6925 #define MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_LBN 4
6926 #define MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_WIDTH 1
6927 #define MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_LBN 5
6928 #define MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_WIDTH 1
6929 #define MC_CMD_INIT_EVQ_IN_FLAG_USE_TIMER_LBN 6
6930 #define MC_CMD_INIT_EVQ_IN_FLAG_USE_TIMER_WIDTH 1
6931 #define MC_CMD_INIT_EVQ_IN_TMR_MODE_OFST 20
6932 #define MC_CMD_INIT_EVQ_IN_TMR_MODE_LEN 4
6933 /* enum: Disabled */
6934 #define MC_CMD_INIT_EVQ_IN_TMR_MODE_DIS 0x0
6935 /* enum: Immediate */
6936 #define MC_CMD_INIT_EVQ_IN_TMR_IMMED_START 0x1
6937 /* enum: Triggered */
6938 #define MC_CMD_INIT_EVQ_IN_TMR_TRIG_START 0x2
6939 /* enum: Hold-off */
6940 #define MC_CMD_INIT_EVQ_IN_TMR_INT_HLDOFF 0x3
6941 /* Target EVQ for wakeups if in wakeup mode. */
6942 #define MC_CMD_INIT_EVQ_IN_TARGET_EVQ_OFST 24
6943 #define MC_CMD_INIT_EVQ_IN_TARGET_EVQ_LEN 4
6944 /* Target interrupt if in interrupting mode (note union with target EVQ). Use
6945  * MC_CMD_RESOURCE_INSTANCE_ANY unless a specific one required for test
6946  * purposes.
6947  */
6948 #define MC_CMD_INIT_EVQ_IN_IRQ_NUM_OFST 24
6949 #define MC_CMD_INIT_EVQ_IN_IRQ_NUM_LEN 4
6950 /* Event Counter Mode. */
6951 #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_OFST 28
6952 #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_LEN 4
6953 /* enum: Disabled */
6954 #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_DIS 0x0
6955 /* enum: Disabled */
6956 #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_RX 0x1
6957 /* enum: Disabled */
6958 #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_TX 0x2
6959 /* enum: Disabled */
6960 #define MC_CMD_INIT_EVQ_IN_COUNT_MODE_RXTX 0x3
6961 /* Event queue packet count threshold. */
6962 #define MC_CMD_INIT_EVQ_IN_COUNT_THRSHLD_OFST 32
6963 #define MC_CMD_INIT_EVQ_IN_COUNT_THRSHLD_LEN 4
6964 /* 64-bit address of 4k of 4k-aligned host memory buffer */
6965 #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_OFST 36
6966 #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_LEN 8
6967 #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_LO_OFST 36
6968 #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_HI_OFST 40
6969 #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_MINNUM 1
6970 #define MC_CMD_INIT_EVQ_IN_DMA_ADDR_MAXNUM 64
6971
6972 /* MC_CMD_INIT_EVQ_OUT msgresponse */
6973 #define MC_CMD_INIT_EVQ_OUT_LEN 4
6974 /* Only valid if INTRFLAG was true */
6975 #define MC_CMD_INIT_EVQ_OUT_IRQ_OFST 0
6976 #define MC_CMD_INIT_EVQ_OUT_IRQ_LEN 4
6977
6978 /* MC_CMD_INIT_EVQ_V2_IN msgrequest */
6979 #define MC_CMD_INIT_EVQ_V2_IN_LENMIN 44
6980 #define MC_CMD_INIT_EVQ_V2_IN_LENMAX 548
6981 #define MC_CMD_INIT_EVQ_V2_IN_LEN(num) (36+8*(num))
6982 /* Size, in entries */
6983 #define MC_CMD_INIT_EVQ_V2_IN_SIZE_OFST 0
6984 #define MC_CMD_INIT_EVQ_V2_IN_SIZE_LEN 4
6985 /* Desired instance. Must be set to a specific instance, which is a function
6986  * local queue index.
6987  */
6988 #define MC_CMD_INIT_EVQ_V2_IN_INSTANCE_OFST 4
6989 #define MC_CMD_INIT_EVQ_V2_IN_INSTANCE_LEN 4
6990 /* The initial timer value. The load value is ignored if the timer mode is DIS.
6991  */
6992 #define MC_CMD_INIT_EVQ_V2_IN_TMR_LOAD_OFST 8
6993 #define MC_CMD_INIT_EVQ_V2_IN_TMR_LOAD_LEN 4
6994 /* The reload value is ignored in one-shot modes */
6995 #define MC_CMD_INIT_EVQ_V2_IN_TMR_RELOAD_OFST 12
6996 #define MC_CMD_INIT_EVQ_V2_IN_TMR_RELOAD_LEN 4
6997 /* tbd */
6998 #define MC_CMD_INIT_EVQ_V2_IN_FLAGS_OFST 16
6999 #define MC_CMD_INIT_EVQ_V2_IN_FLAGS_LEN 4
7000 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_INTERRUPTING_LBN 0
7001 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_INTERRUPTING_WIDTH 1
7002 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_RPTR_DOS_LBN 1
7003 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_RPTR_DOS_WIDTH 1
7004 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_INT_ARMD_LBN 2
7005 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_INT_ARMD_WIDTH 1
7006 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_CUT_THRU_LBN 3
7007 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_CUT_THRU_WIDTH 1
7008 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_RX_MERGE_LBN 4
7009 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_RX_MERGE_WIDTH 1
7010 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TX_MERGE_LBN 5
7011 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TX_MERGE_WIDTH 1
7012 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_USE_TIMER_LBN 6
7013 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_USE_TIMER_WIDTH 1
7014 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_LBN 7
7015 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_WIDTH 4
7016 /* enum: All initialisation flags specified by host. */
7017 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_MANUAL 0x0
7018 /* enum: MEDFORD only. Certain initialisation flags specified by host may be
7019  * over-ridden by firmware based on licenses and firmware variant in order to
7020  * provide the lowest latency achievable. See
7021  * MC_CMD_INIT_EVQ_V2/MC_CMD_INIT_EVQ_V2_OUT/FLAGS for list of affected flags.
7022  */
7023 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_LOW_LATENCY 0x1
7024 /* enum: MEDFORD only. Certain initialisation flags specified by host may be
7025  * over-ridden by firmware based on licenses and firmware variant in order to
7026  * provide the best throughput achievable. See
7027  * MC_CMD_INIT_EVQ_V2/MC_CMD_INIT_EVQ_V2_OUT/FLAGS for list of affected flags.
7028  */
7029 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_THROUGHPUT 0x2
7030 /* enum: MEDFORD only. Certain initialisation flags may be over-ridden by
7031  * firmware based on licenses and firmware variant. See
7032  * MC_CMD_INIT_EVQ_V2/MC_CMD_INIT_EVQ_V2_OUT/FLAGS for list of affected flags.
7033  */
7034 #define MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_AUTO 0x3
7035 #define MC_CMD_INIT_EVQ_V2_IN_TMR_MODE_OFST 20
7036 #define MC_CMD_INIT_EVQ_V2_IN_TMR_MODE_LEN 4
7037 /* enum: Disabled */
7038 #define MC_CMD_INIT_EVQ_V2_IN_TMR_MODE_DIS 0x0
7039 /* enum: Immediate */
7040 #define MC_CMD_INIT_EVQ_V2_IN_TMR_IMMED_START 0x1
7041 /* enum: Triggered */
7042 #define MC_CMD_INIT_EVQ_V2_IN_TMR_TRIG_START 0x2
7043 /* enum: Hold-off */
7044 #define MC_CMD_INIT_EVQ_V2_IN_TMR_INT_HLDOFF 0x3
7045 /* Target EVQ for wakeups if in wakeup mode. */
7046 #define MC_CMD_INIT_EVQ_V2_IN_TARGET_EVQ_OFST 24
7047 #define MC_CMD_INIT_EVQ_V2_IN_TARGET_EVQ_LEN 4
7048 /* Target interrupt if in interrupting mode (note union with target EVQ). Use
7049  * MC_CMD_RESOURCE_INSTANCE_ANY unless a specific one required for test
7050  * purposes.
7051  */
7052 #define MC_CMD_INIT_EVQ_V2_IN_IRQ_NUM_OFST 24
7053 #define MC_CMD_INIT_EVQ_V2_IN_IRQ_NUM_LEN 4
7054 /* Event Counter Mode. */
7055 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_OFST 28
7056 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_LEN 4
7057 /* enum: Disabled */
7058 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_DIS 0x0
7059 /* enum: Disabled */
7060 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_RX 0x1
7061 /* enum: Disabled */
7062 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_TX 0x2
7063 /* enum: Disabled */
7064 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_RXTX 0x3
7065 /* Event queue packet count threshold. */
7066 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_THRSHLD_OFST 32
7067 #define MC_CMD_INIT_EVQ_V2_IN_COUNT_THRSHLD_LEN 4
7068 /* 64-bit address of 4k of 4k-aligned host memory buffer */
7069 #define MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_OFST 36
7070 #define MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_LEN 8
7071 #define MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_LO_OFST 36
7072 #define MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_HI_OFST 40
7073 #define MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_MINNUM 1
7074 #define MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_MAXNUM 64
7075
7076 /* MC_CMD_INIT_EVQ_V2_OUT msgresponse */
7077 #define MC_CMD_INIT_EVQ_V2_OUT_LEN 8
7078 /* Only valid if INTRFLAG was true */
7079 #define MC_CMD_INIT_EVQ_V2_OUT_IRQ_OFST 0
7080 #define MC_CMD_INIT_EVQ_V2_OUT_IRQ_LEN 4
7081 /* Actual configuration applied on the card */
7082 #define MC_CMD_INIT_EVQ_V2_OUT_FLAGS_OFST 4
7083 #define MC_CMD_INIT_EVQ_V2_OUT_FLAGS_LEN 4
7084 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_CUT_THRU_LBN 0
7085 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_CUT_THRU_WIDTH 1
7086 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_RX_MERGE_LBN 1
7087 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_RX_MERGE_WIDTH 1
7088 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_TX_MERGE_LBN 2
7089 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_TX_MERGE_WIDTH 1
7090 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_RXQ_FORCE_EV_MERGING_LBN 3
7091 #define MC_CMD_INIT_EVQ_V2_OUT_FLAG_RXQ_FORCE_EV_MERGING_WIDTH 1
7092
7093 /* QUEUE_CRC_MODE structuredef */
7094 #define QUEUE_CRC_MODE_LEN 1
7095 #define QUEUE_CRC_MODE_MODE_LBN 0
7096 #define QUEUE_CRC_MODE_MODE_WIDTH 4
7097 /* enum: No CRC. */
7098 #define QUEUE_CRC_MODE_NONE  0x0
7099 /* enum: CRC Fiber channel over ethernet. */
7100 #define QUEUE_CRC_MODE_FCOE  0x1
7101 /* enum: CRC (digest) iSCSI header only. */
7102 #define QUEUE_CRC_MODE_ISCSI_HDR  0x2
7103 /* enum: CRC (digest) iSCSI header and payload. */
7104 #define QUEUE_CRC_MODE_ISCSI  0x3
7105 /* enum: CRC Fiber channel over IP over ethernet. */
7106 #define QUEUE_CRC_MODE_FCOIPOE  0x4
7107 /* enum: CRC MPA. */
7108 #define QUEUE_CRC_MODE_MPA  0x5
7109 #define QUEUE_CRC_MODE_SPARE_LBN 4
7110 #define QUEUE_CRC_MODE_SPARE_WIDTH 4
7111
7112
7113 /***********************************/
7114 /* MC_CMD_INIT_RXQ
7115  * set up a receive queue according to the supplied parameters. The IN
7116  * arguments end with an address for each 4k of host memory required to back
7117  * the RXQ.
7118  */
7119 #define MC_CMD_INIT_RXQ 0x81
7120 #undef  MC_CMD_0x81_PRIVILEGE_CTG
7121
7122 #define MC_CMD_0x81_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7123
7124 /* MC_CMD_INIT_RXQ_IN msgrequest: Legacy RXQ_INIT request. Use extended version
7125  * in new code.
7126  */
7127 #define MC_CMD_INIT_RXQ_IN_LENMIN 36
7128 #define MC_CMD_INIT_RXQ_IN_LENMAX 252
7129 #define MC_CMD_INIT_RXQ_IN_LEN(num) (28+8*(num))
7130 /* Size, in entries */
7131 #define MC_CMD_INIT_RXQ_IN_SIZE_OFST 0
7132 #define MC_CMD_INIT_RXQ_IN_SIZE_LEN 4
7133 /* The EVQ to send events to. This is an index originally specified to INIT_EVQ
7134  */
7135 #define MC_CMD_INIT_RXQ_IN_TARGET_EVQ_OFST 4
7136 #define MC_CMD_INIT_RXQ_IN_TARGET_EVQ_LEN 4
7137 /* The value to put in the event data. Check hardware spec. for valid range. */
7138 #define MC_CMD_INIT_RXQ_IN_LABEL_OFST 8
7139 #define MC_CMD_INIT_RXQ_IN_LABEL_LEN 4
7140 /* Desired instance. Must be set to a specific instance, which is a function
7141  * local queue index.
7142  */
7143 #define MC_CMD_INIT_RXQ_IN_INSTANCE_OFST 12
7144 #define MC_CMD_INIT_RXQ_IN_INSTANCE_LEN 4
7145 /* There will be more flags here. */
7146 #define MC_CMD_INIT_RXQ_IN_FLAGS_OFST 16
7147 #define MC_CMD_INIT_RXQ_IN_FLAGS_LEN 4
7148 #define MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_LBN 0
7149 #define MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_WIDTH 1
7150 #define MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_LBN 1
7151 #define MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_WIDTH 1
7152 #define MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_LBN 2
7153 #define MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_WIDTH 1
7154 #define MC_CMD_INIT_RXQ_IN_CRC_MODE_LBN 3
7155 #define MC_CMD_INIT_RXQ_IN_CRC_MODE_WIDTH 4
7156 #define MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_LBN 7
7157 #define MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_WIDTH 1
7158 #define MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_LBN 8
7159 #define MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_WIDTH 1
7160 #define MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_LBN 9
7161 #define MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_WIDTH 1
7162 #define MC_CMD_INIT_RXQ_IN_UNUSED_LBN 10
7163 #define MC_CMD_INIT_RXQ_IN_UNUSED_WIDTH 1
7164 /* Owner ID to use if in buffer mode (zero if physical) */
7165 #define MC_CMD_INIT_RXQ_IN_OWNER_ID_OFST 20
7166 #define MC_CMD_INIT_RXQ_IN_OWNER_ID_LEN 4
7167 /* The port ID associated with the v-adaptor which should contain this DMAQ. */
7168 #define MC_CMD_INIT_RXQ_IN_PORT_ID_OFST 24
7169 #define MC_CMD_INIT_RXQ_IN_PORT_ID_LEN 4
7170 /* 64-bit address of 4k of 4k-aligned host memory buffer */
7171 #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_OFST 28
7172 #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_LEN 8
7173 #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_LO_OFST 28
7174 #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_HI_OFST 32
7175 #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_MINNUM 1
7176 #define MC_CMD_INIT_RXQ_IN_DMA_ADDR_MAXNUM 28
7177
7178 /* MC_CMD_INIT_RXQ_EXT_IN msgrequest: Extended RXQ_INIT with additional mode
7179  * flags
7180  */
7181 #define MC_CMD_INIT_RXQ_EXT_IN_LEN 544
7182 /* Size, in entries */
7183 #define MC_CMD_INIT_RXQ_EXT_IN_SIZE_OFST 0
7184 #define MC_CMD_INIT_RXQ_EXT_IN_SIZE_LEN 4
7185 /* The EVQ to send events to. This is an index originally specified to INIT_EVQ
7186  */
7187 #define MC_CMD_INIT_RXQ_EXT_IN_TARGET_EVQ_OFST 4
7188 #define MC_CMD_INIT_RXQ_EXT_IN_TARGET_EVQ_LEN 4
7189 /* The value to put in the event data. Check hardware spec. for valid range. */
7190 #define MC_CMD_INIT_RXQ_EXT_IN_LABEL_OFST 8
7191 #define MC_CMD_INIT_RXQ_EXT_IN_LABEL_LEN 4
7192 /* Desired instance. Must be set to a specific instance, which is a function
7193  * local queue index.
7194  */
7195 #define MC_CMD_INIT_RXQ_EXT_IN_INSTANCE_OFST 12
7196 #define MC_CMD_INIT_RXQ_EXT_IN_INSTANCE_LEN 4
7197 /* There will be more flags here. */
7198 #define MC_CMD_INIT_RXQ_EXT_IN_FLAGS_OFST 16
7199 #define MC_CMD_INIT_RXQ_EXT_IN_FLAGS_LEN 4
7200 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_BUFF_MODE_LBN 0
7201 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_BUFF_MODE_WIDTH 1
7202 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_HDR_SPLIT_LBN 1
7203 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_HDR_SPLIT_WIDTH 1
7204 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_TIMESTAMP_LBN 2
7205 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_TIMESTAMP_WIDTH 1
7206 #define MC_CMD_INIT_RXQ_EXT_IN_CRC_MODE_LBN 3
7207 #define MC_CMD_INIT_RXQ_EXT_IN_CRC_MODE_WIDTH 4
7208 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_CHAIN_LBN 7
7209 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_CHAIN_WIDTH 1
7210 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_PREFIX_LBN 8
7211 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_PREFIX_WIDTH 1
7212 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_DISABLE_SCATTER_LBN 9
7213 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_DISABLE_SCATTER_WIDTH 1
7214 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_MODE_LBN 10
7215 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_MODE_WIDTH 4
7216 /* enum: One packet per descriptor (for normal networking) */
7217 #define MC_CMD_INIT_RXQ_EXT_IN_SINGLE_PACKET  0x0
7218 /* enum: Pack multiple packets into large descriptors (for SolarCapture) */
7219 #define MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM  0x1
7220 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_SNAPSHOT_MODE_LBN 14
7221 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_SNAPSHOT_MODE_WIDTH 1
7222 #define MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM_BUFF_SIZE_LBN 15
7223 #define MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM_BUFF_SIZE_WIDTH 3
7224 #define MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_1M  0x0 /* enum */
7225 #define MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_512K  0x1 /* enum */
7226 #define MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_256K  0x2 /* enum */
7227 #define MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_128K  0x3 /* enum */
7228 #define MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_64K  0x4 /* enum */
7229 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_LBN 18
7230 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_WIDTH 1
7231 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_LBN 19
7232 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_WIDTH 1
7233 /* Owner ID to use if in buffer mode (zero if physical) */
7234 #define MC_CMD_INIT_RXQ_EXT_IN_OWNER_ID_OFST 20
7235 #define MC_CMD_INIT_RXQ_EXT_IN_OWNER_ID_LEN 4
7236 /* The port ID associated with the v-adaptor which should contain this DMAQ. */
7237 #define MC_CMD_INIT_RXQ_EXT_IN_PORT_ID_OFST 24
7238 #define MC_CMD_INIT_RXQ_EXT_IN_PORT_ID_LEN 4
7239 /* 64-bit address of 4k of 4k-aligned host memory buffer */
7240 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_OFST 28
7241 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_LEN 8
7242 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_LO_OFST 28
7243 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_HI_OFST 32
7244 #define MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_NUM 64
7245 /* Maximum length of packet to receive, if SNAPSHOT_MODE flag is set */
7246 #define MC_CMD_INIT_RXQ_EXT_IN_SNAPSHOT_LENGTH_OFST 540
7247 #define MC_CMD_INIT_RXQ_EXT_IN_SNAPSHOT_LENGTH_LEN 4
7248
7249 /* MC_CMD_INIT_RXQ_OUT msgresponse */
7250 #define MC_CMD_INIT_RXQ_OUT_LEN 0
7251
7252 /* MC_CMD_INIT_RXQ_EXT_OUT msgresponse */
7253 #define MC_CMD_INIT_RXQ_EXT_OUT_LEN 0
7254
7255
7256 /***********************************/
7257 /* MC_CMD_INIT_TXQ
7258  */
7259 #define MC_CMD_INIT_TXQ 0x82
7260 #undef  MC_CMD_0x82_PRIVILEGE_CTG
7261
7262 #define MC_CMD_0x82_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7263
7264 /* MC_CMD_INIT_TXQ_IN msgrequest: Legacy INIT_TXQ request. Use extended version
7265  * in new code.
7266  */
7267 #define MC_CMD_INIT_TXQ_IN_LENMIN 36
7268 #define MC_CMD_INIT_TXQ_IN_LENMAX 252
7269 #define MC_CMD_INIT_TXQ_IN_LEN(num) (28+8*(num))
7270 /* Size, in entries */
7271 #define MC_CMD_INIT_TXQ_IN_SIZE_OFST 0
7272 #define MC_CMD_INIT_TXQ_IN_SIZE_LEN 4
7273 /* The EVQ to send events to. This is an index originally specified to
7274  * INIT_EVQ.
7275  */
7276 #define MC_CMD_INIT_TXQ_IN_TARGET_EVQ_OFST 4
7277 #define MC_CMD_INIT_TXQ_IN_TARGET_EVQ_LEN 4
7278 /* The value to put in the event data. Check hardware spec. for valid range. */
7279 #define MC_CMD_INIT_TXQ_IN_LABEL_OFST 8
7280 #define MC_CMD_INIT_TXQ_IN_LABEL_LEN 4
7281 /* Desired instance. Must be set to a specific instance, which is a function
7282  * local queue index.
7283  */
7284 #define MC_CMD_INIT_TXQ_IN_INSTANCE_OFST 12
7285 #define MC_CMD_INIT_TXQ_IN_INSTANCE_LEN 4
7286 /* There will be more flags here. */
7287 #define MC_CMD_INIT_TXQ_IN_FLAGS_OFST 16
7288 #define MC_CMD_INIT_TXQ_IN_FLAGS_LEN 4
7289 #define MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_LBN 0
7290 #define MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_WIDTH 1
7291 #define MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_LBN 1
7292 #define MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_WIDTH 1
7293 #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_LBN 2
7294 #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_WIDTH 1
7295 #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_LBN 3
7296 #define MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_WIDTH 1
7297 #define MC_CMD_INIT_TXQ_IN_CRC_MODE_LBN 4
7298 #define MC_CMD_INIT_TXQ_IN_CRC_MODE_WIDTH 4
7299 #define MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_LBN 8
7300 #define MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_WIDTH 1
7301 #define MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_LBN 9
7302 #define MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_WIDTH 1
7303 #define MC_CMD_INIT_TXQ_IN_FLAG_INNER_IP_CSUM_EN_LBN 10
7304 #define MC_CMD_INIT_TXQ_IN_FLAG_INNER_IP_CSUM_EN_WIDTH 1
7305 #define MC_CMD_INIT_TXQ_IN_FLAG_INNER_TCP_CSUM_EN_LBN 11
7306 #define MC_CMD_INIT_TXQ_IN_FLAG_INNER_TCP_CSUM_EN_WIDTH 1
7307 /* Owner ID to use if in buffer mode (zero if physical) */
7308 #define MC_CMD_INIT_TXQ_IN_OWNER_ID_OFST 20
7309 #define MC_CMD_INIT_TXQ_IN_OWNER_ID_LEN 4
7310 /* The port ID associated with the v-adaptor which should contain this DMAQ. */
7311 #define MC_CMD_INIT_TXQ_IN_PORT_ID_OFST 24
7312 #define MC_CMD_INIT_TXQ_IN_PORT_ID_LEN 4
7313 /* 64-bit address of 4k of 4k-aligned host memory buffer */
7314 #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_OFST 28
7315 #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_LEN 8
7316 #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_LO_OFST 28
7317 #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_HI_OFST 32
7318 #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_MINNUM 1
7319 #define MC_CMD_INIT_TXQ_IN_DMA_ADDR_MAXNUM 28
7320
7321 /* MC_CMD_INIT_TXQ_EXT_IN msgrequest: Extended INIT_TXQ with additional mode
7322  * flags
7323  */
7324 #define MC_CMD_INIT_TXQ_EXT_IN_LEN 544
7325 /* Size, in entries */
7326 #define MC_CMD_INIT_TXQ_EXT_IN_SIZE_OFST 0
7327 #define MC_CMD_INIT_TXQ_EXT_IN_SIZE_LEN 4
7328 /* The EVQ to send events to. This is an index originally specified to
7329  * INIT_EVQ.
7330  */
7331 #define MC_CMD_INIT_TXQ_EXT_IN_TARGET_EVQ_OFST 4
7332 #define MC_CMD_INIT_TXQ_EXT_IN_TARGET_EVQ_LEN 4
7333 /* The value to put in the event data. Check hardware spec. for valid range. */
7334 #define MC_CMD_INIT_TXQ_EXT_IN_LABEL_OFST 8
7335 #define MC_CMD_INIT_TXQ_EXT_IN_LABEL_LEN 4
7336 /* Desired instance. Must be set to a specific instance, which is a function
7337  * local queue index.
7338  */
7339 #define MC_CMD_INIT_TXQ_EXT_IN_INSTANCE_OFST 12
7340 #define MC_CMD_INIT_TXQ_EXT_IN_INSTANCE_LEN 4
7341 /* There will be more flags here. */
7342 #define MC_CMD_INIT_TXQ_EXT_IN_FLAGS_OFST 16
7343 #define MC_CMD_INIT_TXQ_EXT_IN_FLAGS_LEN 4
7344 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_BUFF_MODE_LBN 0
7345 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_BUFF_MODE_WIDTH 1
7346 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_IP_CSUM_DIS_LBN 1
7347 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_IP_CSUM_DIS_WIDTH 1
7348 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_CSUM_DIS_LBN 2
7349 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_CSUM_DIS_WIDTH 1
7350 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_UDP_ONLY_LBN 3
7351 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_UDP_ONLY_WIDTH 1
7352 #define MC_CMD_INIT_TXQ_EXT_IN_CRC_MODE_LBN 4
7353 #define MC_CMD_INIT_TXQ_EXT_IN_CRC_MODE_WIDTH 4
7354 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TIMESTAMP_LBN 8
7355 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TIMESTAMP_WIDTH 1
7356 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_PACER_BYPASS_LBN 9
7357 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_PACER_BYPASS_WIDTH 1
7358 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_IP_CSUM_EN_LBN 10
7359 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_IP_CSUM_EN_WIDTH 1
7360 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_TCP_CSUM_EN_LBN 11
7361 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_TCP_CSUM_EN_WIDTH 1
7362 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TSOV2_EN_LBN 12
7363 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_TSOV2_EN_WIDTH 1
7364 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_LBN 13
7365 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_WIDTH 1
7366 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_UTHRESH_LBN 14
7367 #define MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_UTHRESH_WIDTH 1
7368 /* Owner ID to use if in buffer mode (zero if physical) */
7369 #define MC_CMD_INIT_TXQ_EXT_IN_OWNER_ID_OFST 20
7370 #define MC_CMD_INIT_TXQ_EXT_IN_OWNER_ID_LEN 4
7371 /* The port ID associated with the v-adaptor which should contain this DMAQ. */
7372 #define MC_CMD_INIT_TXQ_EXT_IN_PORT_ID_OFST 24
7373 #define MC_CMD_INIT_TXQ_EXT_IN_PORT_ID_LEN 4
7374 /* 64-bit address of 4k of 4k-aligned host memory buffer */
7375 #define MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_OFST 28
7376 #define MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_LEN 8
7377 #define MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_LO_OFST 28
7378 #define MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_HI_OFST 32
7379 #define MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_MINNUM 1
7380 #define MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_MAXNUM 64
7381 /* Flags related to Qbb flow control mode. */
7382 #define MC_CMD_INIT_TXQ_EXT_IN_QBB_FLAGS_OFST 540
7383 #define MC_CMD_INIT_TXQ_EXT_IN_QBB_FLAGS_LEN 4
7384 #define MC_CMD_INIT_TXQ_EXT_IN_QBB_ENABLE_LBN 0
7385 #define MC_CMD_INIT_TXQ_EXT_IN_QBB_ENABLE_WIDTH 1
7386 #define MC_CMD_INIT_TXQ_EXT_IN_QBB_PRIORITY_LBN 1
7387 #define MC_CMD_INIT_TXQ_EXT_IN_QBB_PRIORITY_WIDTH 3
7388
7389 /* MC_CMD_INIT_TXQ_OUT msgresponse */
7390 #define MC_CMD_INIT_TXQ_OUT_LEN 0
7391
7392
7393 /***********************************/
7394 /* MC_CMD_FINI_EVQ
7395  * Teardown an EVQ.
7396  *
7397  * All DMAQs or EVQs that point to the EVQ to tear down must be torn down first
7398  * or the operation will fail with EBUSY
7399  */
7400 #define MC_CMD_FINI_EVQ 0x83
7401 #undef  MC_CMD_0x83_PRIVILEGE_CTG
7402
7403 #define MC_CMD_0x83_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7404
7405 /* MC_CMD_FINI_EVQ_IN msgrequest */
7406 #define MC_CMD_FINI_EVQ_IN_LEN 4
7407 /* Instance of EVQ to destroy. Should be the same instance as that previously
7408  * passed to INIT_EVQ
7409  */
7410 #define MC_CMD_FINI_EVQ_IN_INSTANCE_OFST 0
7411 #define MC_CMD_FINI_EVQ_IN_INSTANCE_LEN 4
7412
7413 /* MC_CMD_FINI_EVQ_OUT msgresponse */
7414 #define MC_CMD_FINI_EVQ_OUT_LEN 0
7415
7416
7417 /***********************************/
7418 /* MC_CMD_FINI_RXQ
7419  * Teardown a RXQ.
7420  */
7421 #define MC_CMD_FINI_RXQ 0x84
7422 #undef  MC_CMD_0x84_PRIVILEGE_CTG
7423
7424 #define MC_CMD_0x84_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7425
7426 /* MC_CMD_FINI_RXQ_IN msgrequest */
7427 #define MC_CMD_FINI_RXQ_IN_LEN 4
7428 /* Instance of RXQ to destroy */
7429 #define MC_CMD_FINI_RXQ_IN_INSTANCE_OFST 0
7430 #define MC_CMD_FINI_RXQ_IN_INSTANCE_LEN 4
7431
7432 /* MC_CMD_FINI_RXQ_OUT msgresponse */
7433 #define MC_CMD_FINI_RXQ_OUT_LEN 0
7434
7435
7436 /***********************************/
7437 /* MC_CMD_FINI_TXQ
7438  * Teardown a TXQ.
7439  */
7440 #define MC_CMD_FINI_TXQ 0x85
7441 #undef  MC_CMD_0x85_PRIVILEGE_CTG
7442
7443 #define MC_CMD_0x85_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7444
7445 /* MC_CMD_FINI_TXQ_IN msgrequest */
7446 #define MC_CMD_FINI_TXQ_IN_LEN 4
7447 /* Instance of TXQ to destroy */
7448 #define MC_CMD_FINI_TXQ_IN_INSTANCE_OFST 0
7449 #define MC_CMD_FINI_TXQ_IN_INSTANCE_LEN 4
7450
7451 /* MC_CMD_FINI_TXQ_OUT msgresponse */
7452 #define MC_CMD_FINI_TXQ_OUT_LEN 0
7453
7454
7455 /***********************************/
7456 /* MC_CMD_DRIVER_EVENT
7457  * Generate an event on an EVQ belonging to the function issuing the command.
7458  */
7459 #define MC_CMD_DRIVER_EVENT 0x86
7460 #undef  MC_CMD_0x86_PRIVILEGE_CTG
7461
7462 #define MC_CMD_0x86_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7463
7464 /* MC_CMD_DRIVER_EVENT_IN msgrequest */
7465 #define MC_CMD_DRIVER_EVENT_IN_LEN 12
7466 /* Handle of target EVQ */
7467 #define MC_CMD_DRIVER_EVENT_IN_EVQ_OFST 0
7468 #define MC_CMD_DRIVER_EVENT_IN_EVQ_LEN 4
7469 /* Bits 0 - 63 of event */
7470 #define MC_CMD_DRIVER_EVENT_IN_DATA_OFST 4
7471 #define MC_CMD_DRIVER_EVENT_IN_DATA_LEN 8
7472 #define MC_CMD_DRIVER_EVENT_IN_DATA_LO_OFST 4
7473 #define MC_CMD_DRIVER_EVENT_IN_DATA_HI_OFST 8
7474
7475 /* MC_CMD_DRIVER_EVENT_OUT msgresponse */
7476 #define MC_CMD_DRIVER_EVENT_OUT_LEN 0
7477
7478
7479 /***********************************/
7480 /* MC_CMD_PROXY_CMD
7481  * Execute an arbitrary MCDI command on behalf of a different function, subject
7482  * to security restrictions. The command to be proxied follows immediately
7483  * afterward in the host buffer (or on the UART). This command supercedes
7484  * MC_CMD_SET_FUNC, which remains available for Siena but now deprecated.
7485  */
7486 #define MC_CMD_PROXY_CMD 0x5b
7487 #undef  MC_CMD_0x5b_PRIVILEGE_CTG
7488
7489 #define MC_CMD_0x5b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
7490
7491 /* MC_CMD_PROXY_CMD_IN msgrequest */
7492 #define MC_CMD_PROXY_CMD_IN_LEN 4
7493 /* The handle of the target function. */
7494 #define MC_CMD_PROXY_CMD_IN_TARGET_OFST 0
7495 #define MC_CMD_PROXY_CMD_IN_TARGET_LEN 4
7496 #define MC_CMD_PROXY_CMD_IN_TARGET_PF_LBN 0
7497 #define MC_CMD_PROXY_CMD_IN_TARGET_PF_WIDTH 16
7498 #define MC_CMD_PROXY_CMD_IN_TARGET_VF_LBN 16
7499 #define MC_CMD_PROXY_CMD_IN_TARGET_VF_WIDTH 16
7500 #define MC_CMD_PROXY_CMD_IN_VF_NULL  0xffff /* enum */
7501
7502 /* MC_CMD_PROXY_CMD_OUT msgresponse */
7503 #define MC_CMD_PROXY_CMD_OUT_LEN 0
7504
7505 /* MC_PROXY_STATUS_BUFFER structuredef: Host memory status buffer used to
7506  * manage proxied requests
7507  */
7508 #define MC_PROXY_STATUS_BUFFER_LEN 16
7509 /* Handle allocated by the firmware for this proxy transaction */
7510 #define MC_PROXY_STATUS_BUFFER_HANDLE_OFST 0
7511 #define MC_PROXY_STATUS_BUFFER_HANDLE_LEN 4
7512 /* enum: An invalid handle. */
7513 #define MC_PROXY_STATUS_BUFFER_HANDLE_INVALID  0x0
7514 #define MC_PROXY_STATUS_BUFFER_HANDLE_LBN 0
7515 #define MC_PROXY_STATUS_BUFFER_HANDLE_WIDTH 32
7516 /* The requesting physical function number */
7517 #define MC_PROXY_STATUS_BUFFER_PF_OFST 4
7518 #define MC_PROXY_STATUS_BUFFER_PF_LEN 2
7519 #define MC_PROXY_STATUS_BUFFER_PF_LBN 32
7520 #define MC_PROXY_STATUS_BUFFER_PF_WIDTH 16
7521 /* The requesting virtual function number. Set to VF_NULL if the target is a
7522  * PF.
7523  */
7524 #define MC_PROXY_STATUS_BUFFER_VF_OFST 6
7525 #define MC_PROXY_STATUS_BUFFER_VF_LEN 2
7526 #define MC_PROXY_STATUS_BUFFER_VF_LBN 48
7527 #define MC_PROXY_STATUS_BUFFER_VF_WIDTH 16
7528 /* The target function RID. */
7529 #define MC_PROXY_STATUS_BUFFER_RID_OFST 8
7530 #define MC_PROXY_STATUS_BUFFER_RID_LEN 2
7531 #define MC_PROXY_STATUS_BUFFER_RID_LBN 64
7532 #define MC_PROXY_STATUS_BUFFER_RID_WIDTH 16
7533 /* The status of the proxy as described in MC_CMD_PROXY_COMPLETE. */
7534 #define MC_PROXY_STATUS_BUFFER_STATUS_OFST 10
7535 #define MC_PROXY_STATUS_BUFFER_STATUS_LEN 2
7536 #define MC_PROXY_STATUS_BUFFER_STATUS_LBN 80
7537 #define MC_PROXY_STATUS_BUFFER_STATUS_WIDTH 16
7538 /* If a request is authorized rather than carried out by the host, this is the
7539  * elevated privilege mask granted to the requesting function.
7540  */
7541 #define MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_OFST 12
7542 #define MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_LEN 4
7543 #define MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_LBN 96
7544 #define MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_WIDTH 32
7545
7546
7547 /***********************************/
7548 /* MC_CMD_PROXY_CONFIGURE
7549  * Enable/disable authorization of MCDI requests from unprivileged functions by
7550  * a designated admin function
7551  */
7552 #define MC_CMD_PROXY_CONFIGURE 0x58
7553 #undef  MC_CMD_0x58_PRIVILEGE_CTG
7554
7555 #define MC_CMD_0x58_PRIVILEGE_CTG SRIOV_CTG_ADMIN
7556
7557 /* MC_CMD_PROXY_CONFIGURE_IN msgrequest */
7558 #define MC_CMD_PROXY_CONFIGURE_IN_LEN 108
7559 #define MC_CMD_PROXY_CONFIGURE_IN_FLAGS_OFST 0
7560 #define MC_CMD_PROXY_CONFIGURE_IN_FLAGS_LEN 4
7561 #define MC_CMD_PROXY_CONFIGURE_IN_ENABLE_LBN 0
7562 #define MC_CMD_PROXY_CONFIGURE_IN_ENABLE_WIDTH 1
7563 /* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
7564  * of blocks, each of the size REQUEST_BLOCK_SIZE.
7565  */
7566 #define MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_OFST 4
7567 #define MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_LEN 8
7568 #define MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_LO_OFST 4
7569 #define MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_HI_OFST 8
7570 /* Must be a power of 2 */
7571 #define MC_CMD_PROXY_CONFIGURE_IN_STATUS_BLOCK_SIZE_OFST 12
7572 #define MC_CMD_PROXY_CONFIGURE_IN_STATUS_BLOCK_SIZE_LEN 4
7573 /* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
7574  * of blocks, each of the size REPLY_BLOCK_SIZE.
7575  */
7576 #define MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_OFST 16
7577 #define MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_LEN 8
7578 #define MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_LO_OFST 16
7579 #define MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_HI_OFST 20
7580 /* Must be a power of 2 */
7581 #define MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BLOCK_SIZE_OFST 24
7582 #define MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BLOCK_SIZE_LEN 4
7583 /* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
7584  * of blocks, each of the size STATUS_BLOCK_SIZE. This buffer is only needed if
7585  * host intends to complete proxied operations by using MC_CMD_PROXY_CMD.
7586  */
7587 #define MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_OFST 28
7588 #define MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_LEN 8
7589 #define MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_LO_OFST 28
7590 #define MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_HI_OFST 32
7591 /* Must be a power of 2, or zero if this buffer is not provided */
7592 #define MC_CMD_PROXY_CONFIGURE_IN_REPLY_BLOCK_SIZE_OFST 36
7593 #define MC_CMD_PROXY_CONFIGURE_IN_REPLY_BLOCK_SIZE_LEN 4
7594 /* Applies to all three buffers */
7595 #define MC_CMD_PROXY_CONFIGURE_IN_NUM_BLOCKS_OFST 40
7596 #define MC_CMD_PROXY_CONFIGURE_IN_NUM_BLOCKS_LEN 4
7597 /* A bit mask defining which MCDI operations may be proxied */
7598 #define MC_CMD_PROXY_CONFIGURE_IN_ALLOWED_MCDI_MASK_OFST 44
7599 #define MC_CMD_PROXY_CONFIGURE_IN_ALLOWED_MCDI_MASK_LEN 64
7600
7601 /* MC_CMD_PROXY_CONFIGURE_EXT_IN msgrequest */
7602 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_LEN 112
7603 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_FLAGS_OFST 0
7604 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_FLAGS_LEN 4
7605 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_LBN 0
7606 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_WIDTH 1
7607 /* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
7608  * of blocks, each of the size REQUEST_BLOCK_SIZE.
7609  */
7610 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_OFST 4
7611 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_LEN 8
7612 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_LO_OFST 4
7613 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_HI_OFST 8
7614 /* Must be a power of 2 */
7615 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BLOCK_SIZE_OFST 12
7616 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BLOCK_SIZE_LEN 4
7617 /* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
7618  * of blocks, each of the size REPLY_BLOCK_SIZE.
7619  */
7620 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_OFST 16
7621 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_LEN 8
7622 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_LO_OFST 16
7623 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_HI_OFST 20
7624 /* Must be a power of 2 */
7625 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BLOCK_SIZE_OFST 24
7626 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BLOCK_SIZE_LEN 4
7627 /* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
7628  * of blocks, each of the size STATUS_BLOCK_SIZE. This buffer is only needed if
7629  * host intends to complete proxied operations by using MC_CMD_PROXY_CMD.
7630  */
7631 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_OFST 28
7632 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_LEN 8
7633 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_LO_OFST 28
7634 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_HI_OFST 32
7635 /* Must be a power of 2, or zero if this buffer is not provided */
7636 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BLOCK_SIZE_OFST 36
7637 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BLOCK_SIZE_LEN 4
7638 /* Applies to all three buffers */
7639 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_NUM_BLOCKS_OFST 40
7640 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_NUM_BLOCKS_LEN 4
7641 /* A bit mask defining which MCDI operations may be proxied */
7642 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_ALLOWED_MCDI_MASK_OFST 44
7643 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_ALLOWED_MCDI_MASK_LEN 64
7644 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_RESERVED_OFST 108
7645 #define MC_CMD_PROXY_CONFIGURE_EXT_IN_RESERVED_LEN 4
7646
7647 /* MC_CMD_PROXY_CONFIGURE_OUT msgresponse */
7648 #define MC_CMD_PROXY_CONFIGURE_OUT_LEN 0
7649
7650
7651 /***********************************/
7652 /* MC_CMD_PROXY_COMPLETE
7653  * Tells FW that a requested proxy operation has either been completed (by
7654  * using MC_CMD_PROXY_CMD) or authorized/declined. May only be sent by the
7655  * function that enabled proxying/authorization (by using
7656  * MC_CMD_PROXY_CONFIGURE).
7657  */
7658 #define MC_CMD_PROXY_COMPLETE 0x5f
7659 #undef  MC_CMD_0x5f_PRIVILEGE_CTG
7660
7661 #define MC_CMD_0x5f_PRIVILEGE_CTG SRIOV_CTG_ADMIN
7662
7663 /* MC_CMD_PROXY_COMPLETE_IN msgrequest */
7664 #define MC_CMD_PROXY_COMPLETE_IN_LEN 12
7665 #define MC_CMD_PROXY_COMPLETE_IN_BLOCK_INDEX_OFST 0
7666 #define MC_CMD_PROXY_COMPLETE_IN_BLOCK_INDEX_LEN 4
7667 #define MC_CMD_PROXY_COMPLETE_IN_STATUS_OFST 4
7668 #define MC_CMD_PROXY_COMPLETE_IN_STATUS_LEN 4
7669 /* enum: The operation has been completed by using MC_CMD_PROXY_CMD, the reply
7670  * is stored in the REPLY_BUFF.
7671  */
7672 #define MC_CMD_PROXY_COMPLETE_IN_COMPLETE 0x0
7673 /* enum: The operation has been authorized. The originating function may now
7674  * try again.
7675  */
7676 #define MC_CMD_PROXY_COMPLETE_IN_AUTHORIZED 0x1
7677 /* enum: The operation has been declined. */
7678 #define MC_CMD_PROXY_COMPLETE_IN_DECLINED 0x2
7679 /* enum: The authorization failed because the relevant application did not
7680  * respond in time.
7681  */
7682 #define MC_CMD_PROXY_COMPLETE_IN_TIMEDOUT 0x3
7683 #define MC_CMD_PROXY_COMPLETE_IN_HANDLE_OFST 8
7684 #define MC_CMD_PROXY_COMPLETE_IN_HANDLE_LEN 4
7685
7686 /* MC_CMD_PROXY_COMPLETE_OUT msgresponse */
7687 #define MC_CMD_PROXY_COMPLETE_OUT_LEN 0
7688
7689
7690 /***********************************/
7691 /* MC_CMD_ALLOC_BUFTBL_CHUNK
7692  * Allocate a set of buffer table entries using the specified owner ID. This
7693  * operation allocates the required buffer table entries (and fails if it
7694  * cannot do so). The buffer table entries will initially be zeroed.
7695  */
7696 #define MC_CMD_ALLOC_BUFTBL_CHUNK 0x87
7697 #undef  MC_CMD_0x87_PRIVILEGE_CTG
7698
7699 #define MC_CMD_0x87_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
7700
7701 /* MC_CMD_ALLOC_BUFTBL_CHUNK_IN msgrequest */
7702 #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_LEN 8
7703 /* Owner ID to use */
7704 #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_OWNER_OFST 0
7705 #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_OWNER_LEN 4
7706 /* Size of buffer table pages to use, in bytes (note that only a few values are
7707  * legal on any specific hardware).
7708  */
7709 #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_PAGE_SIZE_OFST 4
7710 #define MC_CMD_ALLOC_BUFTBL_CHUNK_IN_PAGE_SIZE_LEN 4
7711
7712 /* MC_CMD_ALLOC_BUFTBL_CHUNK_OUT msgresponse */
7713 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_LEN 12
7714 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_HANDLE_OFST 0
7715 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_HANDLE_LEN 4
7716 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_NUMENTRIES_OFST 4
7717 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_NUMENTRIES_LEN 4
7718 /* Buffer table IDs for use in DMA descriptors. */
7719 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_ID_OFST 8
7720 #define MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_ID_LEN 4
7721
7722
7723 /***********************************/
7724 /* MC_CMD_PROGRAM_BUFTBL_ENTRIES
7725  * Reprogram a set of buffer table entries in the specified chunk.
7726  */
7727 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES 0x88
7728 #undef  MC_CMD_0x88_PRIVILEGE_CTG
7729
7730 #define MC_CMD_0x88_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
7731
7732 /* MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN msgrequest */
7733 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMIN 20
7734 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMAX 268
7735 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LEN(num) (12+8*(num))
7736 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_HANDLE_OFST 0
7737 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_HANDLE_LEN 4
7738 /* ID */
7739 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_FIRSTID_OFST 4
7740 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_FIRSTID_LEN 4
7741 /* Num entries */
7742 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_NUMENTRIES_OFST 8
7743 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_NUMENTRIES_LEN 4
7744 /* Buffer table entry address */
7745 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_OFST 12
7746 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_LEN 8
7747 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_LO_OFST 12
7748 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_HI_OFST 16
7749 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MINNUM 1
7750 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MAXNUM 32
7751
7752 /* MC_CMD_PROGRAM_BUFTBL_ENTRIES_OUT msgresponse */
7753 #define MC_CMD_PROGRAM_BUFTBL_ENTRIES_OUT_LEN 0
7754
7755
7756 /***********************************/
7757 /* MC_CMD_FREE_BUFTBL_CHUNK
7758  */
7759 #define MC_CMD_FREE_BUFTBL_CHUNK 0x89
7760 #undef  MC_CMD_0x89_PRIVILEGE_CTG
7761
7762 #define MC_CMD_0x89_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
7763
7764 /* MC_CMD_FREE_BUFTBL_CHUNK_IN msgrequest */
7765 #define MC_CMD_FREE_BUFTBL_CHUNK_IN_LEN 4
7766 #define MC_CMD_FREE_BUFTBL_CHUNK_IN_HANDLE_OFST 0
7767 #define MC_CMD_FREE_BUFTBL_CHUNK_IN_HANDLE_LEN 4
7768
7769 /* MC_CMD_FREE_BUFTBL_CHUNK_OUT msgresponse */
7770 #define MC_CMD_FREE_BUFTBL_CHUNK_OUT_LEN 0
7771
7772
7773 /***********************************/
7774 /* MC_CMD_FILTER_OP
7775  * Multiplexed MCDI call for filter operations
7776  */
7777 #define MC_CMD_FILTER_OP 0x8a
7778 #undef  MC_CMD_0x8a_PRIVILEGE_CTG
7779
7780 #define MC_CMD_0x8a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
7781
7782 /* MC_CMD_FILTER_OP_IN msgrequest */
7783 #define MC_CMD_FILTER_OP_IN_LEN 108
7784 /* identifies the type of operation requested */
7785 #define MC_CMD_FILTER_OP_IN_OP_OFST 0
7786 #define MC_CMD_FILTER_OP_IN_OP_LEN 4
7787 /* enum: single-recipient filter insert */
7788 #define MC_CMD_FILTER_OP_IN_OP_INSERT  0x0
7789 /* enum: single-recipient filter remove */
7790 #define MC_CMD_FILTER_OP_IN_OP_REMOVE  0x1
7791 /* enum: multi-recipient filter subscribe */
7792 #define MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE  0x2
7793 /* enum: multi-recipient filter unsubscribe */
7794 #define MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE  0x3
7795 /* enum: replace one recipient with another (warning - the filter handle may
7796  * change)
7797  */
7798 #define MC_CMD_FILTER_OP_IN_OP_REPLACE  0x4
7799 /* filter handle (for remove / unsubscribe operations) */
7800 #define MC_CMD_FILTER_OP_IN_HANDLE_OFST 4
7801 #define MC_CMD_FILTER_OP_IN_HANDLE_LEN 8
7802 #define MC_CMD_FILTER_OP_IN_HANDLE_LO_OFST 4
7803 #define MC_CMD_FILTER_OP_IN_HANDLE_HI_OFST 8
7804 /* The port ID associated with the v-adaptor which should contain this filter.
7805  */
7806 #define MC_CMD_FILTER_OP_IN_PORT_ID_OFST 12
7807 #define MC_CMD_FILTER_OP_IN_PORT_ID_LEN 4
7808 /* fields to include in match criteria */
7809 #define MC_CMD_FILTER_OP_IN_MATCH_FIELDS_OFST 16
7810 #define MC_CMD_FILTER_OP_IN_MATCH_FIELDS_LEN 4
7811 #define MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_LBN 0
7812 #define MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_WIDTH 1
7813 #define MC_CMD_FILTER_OP_IN_MATCH_DST_IP_LBN 1
7814 #define MC_CMD_FILTER_OP_IN_MATCH_DST_IP_WIDTH 1
7815 #define MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_LBN 2
7816 #define MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_WIDTH 1
7817 #define MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_LBN 3
7818 #define MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_WIDTH 1
7819 #define MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_LBN 4
7820 #define MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_WIDTH 1
7821 #define MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_LBN 5
7822 #define MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_WIDTH 1
7823 #define MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_LBN 6
7824 #define MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_WIDTH 1
7825 #define MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_LBN 7
7826 #define MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_WIDTH 1
7827 #define MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_LBN 8
7828 #define MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_WIDTH 1
7829 #define MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_LBN 9
7830 #define MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_WIDTH 1
7831 #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_LBN 10
7832 #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_WIDTH 1
7833 #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_LBN 11
7834 #define MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_WIDTH 1
7835 #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_LBN 30
7836 #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_WIDTH 1
7837 #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_LBN 31
7838 #define MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_WIDTH 1
7839 /* receive destination */
7840 #define MC_CMD_FILTER_OP_IN_RX_DEST_OFST 20
7841 #define MC_CMD_FILTER_OP_IN_RX_DEST_LEN 4
7842 /* enum: drop packets */
7843 #define MC_CMD_FILTER_OP_IN_RX_DEST_DROP  0x0
7844 /* enum: receive to host */
7845 #define MC_CMD_FILTER_OP_IN_RX_DEST_HOST  0x1
7846 /* enum: receive to MC */
7847 #define MC_CMD_FILTER_OP_IN_RX_DEST_MC  0x2
7848 /* enum: loop back to TXDP 0 */
7849 #define MC_CMD_FILTER_OP_IN_RX_DEST_TX0  0x3
7850 /* enum: loop back to TXDP 1 */
7851 #define MC_CMD_FILTER_OP_IN_RX_DEST_TX1  0x4
7852 /* receive queue handle (for multiple queue modes, this is the base queue) */
7853 #define MC_CMD_FILTER_OP_IN_RX_QUEUE_OFST 24
7854 #define MC_CMD_FILTER_OP_IN_RX_QUEUE_LEN 4
7855 /* receive mode */
7856 #define MC_CMD_FILTER_OP_IN_RX_MODE_OFST 28
7857 #define MC_CMD_FILTER_OP_IN_RX_MODE_LEN 4
7858 /* enum: receive to just the specified queue */
7859 #define MC_CMD_FILTER_OP_IN_RX_MODE_SIMPLE  0x0
7860 /* enum: receive to multiple queues using RSS context */
7861 #define MC_CMD_FILTER_OP_IN_RX_MODE_RSS  0x1
7862 /* enum: receive to multiple queues using .1p mapping */
7863 #define MC_CMD_FILTER_OP_IN_RX_MODE_DOT1P_MAPPING  0x2
7864 /* enum: install a filter entry that will never match; for test purposes only
7865  */
7866 #define MC_CMD_FILTER_OP_IN_RX_MODE_TEST_NEVER_MATCH  0x80000000
7867 /* RSS context (for RX_MODE_RSS) or .1p mapping handle (for
7868  * RX_MODE_DOT1P_MAPPING), as returned by MC_CMD_RSS_CONTEXT_ALLOC or
7869  * MC_CMD_DOT1P_MAPPING_ALLOC.
7870  */
7871 #define MC_CMD_FILTER_OP_IN_RX_CONTEXT_OFST 32
7872 #define MC_CMD_FILTER_OP_IN_RX_CONTEXT_LEN 4
7873 /* transmit domain (reserved; set to 0) */
7874 #define MC_CMD_FILTER_OP_IN_TX_DOMAIN_OFST 36
7875 #define MC_CMD_FILTER_OP_IN_TX_DOMAIN_LEN 4
7876 /* transmit destination (either set the MAC and/or PM bits for explicit
7877  * control, or set this field to TX_DEST_DEFAULT for sensible default
7878  * behaviour)
7879  */
7880 #define MC_CMD_FILTER_OP_IN_TX_DEST_OFST 40
7881 #define MC_CMD_FILTER_OP_IN_TX_DEST_LEN 4
7882 /* enum: request default behaviour (based on filter type) */
7883 #define MC_CMD_FILTER_OP_IN_TX_DEST_DEFAULT  0xffffffff
7884 #define MC_CMD_FILTER_OP_IN_TX_DEST_MAC_LBN 0
7885 #define MC_CMD_FILTER_OP_IN_TX_DEST_MAC_WIDTH 1
7886 #define MC_CMD_FILTER_OP_IN_TX_DEST_PM_LBN 1
7887 #define MC_CMD_FILTER_OP_IN_TX_DEST_PM_WIDTH 1
7888 /* source MAC address to match (as bytes in network order) */
7889 #define MC_CMD_FILTER_OP_IN_SRC_MAC_OFST 44
7890 #define MC_CMD_FILTER_OP_IN_SRC_MAC_LEN 6
7891 /* source port to match (as bytes in network order) */
7892 #define MC_CMD_FILTER_OP_IN_SRC_PORT_OFST 50
7893 #define MC_CMD_FILTER_OP_IN_SRC_PORT_LEN 2
7894 /* destination MAC address to match (as bytes in network order) */
7895 #define MC_CMD_FILTER_OP_IN_DST_MAC_OFST 52
7896 #define MC_CMD_FILTER_OP_IN_DST_MAC_LEN 6
7897 /* destination port to match (as bytes in network order) */
7898 #define MC_CMD_FILTER_OP_IN_DST_PORT_OFST 58
7899 #define MC_CMD_FILTER_OP_IN_DST_PORT_LEN 2
7900 /* Ethernet type to match (as bytes in network order) */
7901 #define MC_CMD_FILTER_OP_IN_ETHER_TYPE_OFST 60
7902 #define MC_CMD_FILTER_OP_IN_ETHER_TYPE_LEN 2
7903 /* Inner VLAN tag to match (as bytes in network order) */
7904 #define MC_CMD_FILTER_OP_IN_INNER_VLAN_OFST 62
7905 #define MC_CMD_FILTER_OP_IN_INNER_VLAN_LEN 2
7906 /* Outer VLAN tag to match (as bytes in network order) */
7907 #define MC_CMD_FILTER_OP_IN_OUTER_VLAN_OFST 64
7908 #define MC_CMD_FILTER_OP_IN_OUTER_VLAN_LEN 2
7909 /* IP protocol to match (in low byte; set high byte to 0) */
7910 #define MC_CMD_FILTER_OP_IN_IP_PROTO_OFST 66
7911 #define MC_CMD_FILTER_OP_IN_IP_PROTO_LEN 2
7912 /* Firmware defined register 0 to match (reserved; set to 0) */
7913 #define MC_CMD_FILTER_OP_IN_FWDEF0_OFST 68
7914 #define MC_CMD_FILTER_OP_IN_FWDEF0_LEN 4
7915 /* Firmware defined register 1 to match (reserved; set to 0) */
7916 #define MC_CMD_FILTER_OP_IN_FWDEF1_OFST 72
7917 #define MC_CMD_FILTER_OP_IN_FWDEF1_LEN 4
7918 /* source IP address to match (as bytes in network order; set last 12 bytes to
7919  * 0 for IPv4 address)
7920  */
7921 #define MC_CMD_FILTER_OP_IN_SRC_IP_OFST 76
7922 #define MC_CMD_FILTER_OP_IN_SRC_IP_LEN 16
7923 /* destination IP address to match (as bytes in network order; set last 12
7924  * bytes to 0 for IPv4 address)
7925  */
7926 #define MC_CMD_FILTER_OP_IN_DST_IP_OFST 92
7927 #define MC_CMD_FILTER_OP_IN_DST_IP_LEN 16
7928
7929 /* MC_CMD_FILTER_OP_EXT_IN msgrequest: Extension to MC_CMD_FILTER_OP_IN to
7930  * include handling of VXLAN/NVGRE encapsulated frame filtering (which is
7931  * supported on Medford only).
7932  */
7933 #define MC_CMD_FILTER_OP_EXT_IN_LEN 172
7934 /* identifies the type of operation requested */
7935 #define MC_CMD_FILTER_OP_EXT_IN_OP_OFST 0
7936 #define MC_CMD_FILTER_OP_EXT_IN_OP_LEN 4
7937 /*            Enum values, see field(s): */
7938 /*               MC_CMD_FILTER_OP_IN/OP */
7939 /* filter handle (for remove / unsubscribe operations) */
7940 #define MC_CMD_FILTER_OP_EXT_IN_HANDLE_OFST 4
7941 #define MC_CMD_FILTER_OP_EXT_IN_HANDLE_LEN 8
7942 #define MC_CMD_FILTER_OP_EXT_IN_HANDLE_LO_OFST 4
7943 #define MC_CMD_FILTER_OP_EXT_IN_HANDLE_HI_OFST 8
7944 /* The port ID associated with the v-adaptor which should contain this filter.
7945  */
7946 #define MC_CMD_FILTER_OP_EXT_IN_PORT_ID_OFST 12
7947 #define MC_CMD_FILTER_OP_EXT_IN_PORT_ID_LEN 4
7948 /* fields to include in match criteria */
7949 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_FIELDS_OFST 16
7950 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_FIELDS_LEN 4
7951 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_IP_LBN 0
7952 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_IP_WIDTH 1
7953 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_IP_LBN 1
7954 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_IP_WIDTH 1
7955 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_MAC_LBN 2
7956 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_MAC_WIDTH 1
7957 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_PORT_LBN 3
7958 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_PORT_WIDTH 1
7959 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_MAC_LBN 4
7960 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_MAC_WIDTH 1
7961 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_PORT_LBN 5
7962 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_PORT_WIDTH 1
7963 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_ETHER_TYPE_LBN 6
7964 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_ETHER_TYPE_WIDTH 1
7965 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_INNER_VLAN_LBN 7
7966 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_INNER_VLAN_WIDTH 1
7967 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_OUTER_VLAN_LBN 8
7968 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_OUTER_VLAN_WIDTH 1
7969 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IP_PROTO_LBN 9
7970 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IP_PROTO_WIDTH 1
7971 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_FWDEF0_LBN 10
7972 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_FWDEF0_WIDTH 1
7973 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_VNI_OR_VSID_LBN 11
7974 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_VNI_OR_VSID_WIDTH 1
7975 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_IP_LBN 12
7976 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_IP_WIDTH 1
7977 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_IP_LBN 13
7978 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_IP_WIDTH 1
7979 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_MAC_LBN 14
7980 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_MAC_WIDTH 1
7981 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_PORT_LBN 15
7982 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_PORT_WIDTH 1
7983 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_MAC_LBN 16
7984 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_MAC_WIDTH 1
7985 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_PORT_LBN 17
7986 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_PORT_WIDTH 1
7987 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_ETHER_TYPE_LBN 18
7988 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_ETHER_TYPE_WIDTH 1
7989 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_INNER_VLAN_LBN 19
7990 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_INNER_VLAN_WIDTH 1
7991 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_OUTER_VLAN_LBN 20
7992 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_OUTER_VLAN_WIDTH 1
7993 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_IP_PROTO_LBN 21
7994 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_IP_PROTO_WIDTH 1
7995 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF0_LBN 22
7996 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF0_WIDTH 1
7997 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF1_LBN 23
7998 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF1_WIDTH 1
7999 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_LBN 24
8000 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_WIDTH 1
8001 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_LBN 25
8002 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_WIDTH 1
8003 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_MCAST_DST_LBN 30
8004 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_MCAST_DST_WIDTH 1
8005 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_UCAST_DST_LBN 31
8006 #define MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_UCAST_DST_WIDTH 1
8007 /* receive destination */
8008 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_OFST 20
8009 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_LEN 4
8010 /* enum: drop packets */
8011 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_DROP  0x0
8012 /* enum: receive to host */
8013 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_HOST  0x1
8014 /* enum: receive to MC */
8015 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_MC  0x2
8016 /* enum: loop back to TXDP 0 */
8017 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_TX0  0x3
8018 /* enum: loop back to TXDP 1 */
8019 #define MC_CMD_FILTER_OP_EXT_IN_RX_DEST_TX1  0x4
8020 /* receive queue handle (for multiple queue modes, this is the base queue) */
8021 #define MC_CMD_FILTER_OP_EXT_IN_RX_QUEUE_OFST 24
8022 #define MC_CMD_FILTER_OP_EXT_IN_RX_QUEUE_LEN 4
8023 /* receive mode */
8024 #define MC_CMD_FILTER_OP_EXT_IN_RX_MODE_OFST 28
8025 #define MC_CMD_FILTER_OP_EXT_IN_RX_MODE_LEN 4
8026 /* enum: receive to just the specified queue */
8027 #define MC_CMD_FILTER_OP_EXT_IN_RX_MODE_SIMPLE  0x0
8028 /* enum: receive to multiple queues using RSS context */
8029 #define MC_CMD_FILTER_OP_EXT_IN_RX_MODE_RSS  0x1
8030 /* enum: receive to multiple queues using .1p mapping */
8031 #define MC_CMD_FILTER_OP_EXT_IN_RX_MODE_DOT1P_MAPPING  0x2
8032 /* enum: install a filter entry that will never match; for test purposes only
8033  */
8034 #define MC_CMD_FILTER_OP_EXT_IN_RX_MODE_TEST_NEVER_MATCH  0x80000000
8035 /* RSS context (for RX_MODE_RSS) or .1p mapping handle (for
8036  * RX_MODE_DOT1P_MAPPING), as returned by MC_CMD_RSS_CONTEXT_ALLOC or
8037  * MC_CMD_DOT1P_MAPPING_ALLOC.
8038  */
8039 #define MC_CMD_FILTER_OP_EXT_IN_RX_CONTEXT_OFST 32
8040 #define MC_CMD_FILTER_OP_EXT_IN_RX_CONTEXT_LEN 4
8041 /* transmit domain (reserved; set to 0) */
8042 #define MC_CMD_FILTER_OP_EXT_IN_TX_DOMAIN_OFST 36
8043 #define MC_CMD_FILTER_OP_EXT_IN_TX_DOMAIN_LEN 4
8044 /* transmit destination (either set the MAC and/or PM bits for explicit
8045  * control, or set this field to TX_DEST_DEFAULT for sensible default
8046  * behaviour)
8047  */
8048 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_OFST 40
8049 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_LEN 4
8050 /* enum: request default behaviour (based on filter type) */
8051 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_DEFAULT  0xffffffff
8052 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_MAC_LBN 0
8053 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_MAC_WIDTH 1
8054 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_PM_LBN 1
8055 #define MC_CMD_FILTER_OP_EXT_IN_TX_DEST_PM_WIDTH 1
8056 /* source MAC address to match (as bytes in network order) */
8057 #define MC_CMD_FILTER_OP_EXT_IN_SRC_MAC_OFST 44
8058 #define MC_CMD_FILTER_OP_EXT_IN_SRC_MAC_LEN 6
8059 /* source port to match (as bytes in network order) */
8060 #define MC_CMD_FILTER_OP_EXT_IN_SRC_PORT_OFST 50
8061 #define MC_CMD_FILTER_OP_EXT_IN_SRC_PORT_LEN 2
8062 /* destination MAC address to match (as bytes in network order) */
8063 #define MC_CMD_FILTER_OP_EXT_IN_DST_MAC_OFST 52
8064 #define MC_CMD_FILTER_OP_EXT_IN_DST_MAC_LEN 6
8065 /* destination port to match (as bytes in network order) */
8066 #define MC_CMD_FILTER_OP_EXT_IN_DST_PORT_OFST 58
8067 #define MC_CMD_FILTER_OP_EXT_IN_DST_PORT_LEN 2
8068 /* Ethernet type to match (as bytes in network order) */
8069 #define MC_CMD_FILTER_OP_EXT_IN_ETHER_TYPE_OFST 60
8070 #define MC_CMD_FILTER_OP_EXT_IN_ETHER_TYPE_LEN 2
8071 /* Inner VLAN tag to match (as bytes in network order) */
8072 #define MC_CMD_FILTER_OP_EXT_IN_INNER_VLAN_OFST 62
8073 #define MC_CMD_FILTER_OP_EXT_IN_INNER_VLAN_LEN 2
8074 /* Outer VLAN tag to match (as bytes in network order) */
8075 #define MC_CMD_FILTER_OP_EXT_IN_OUTER_VLAN_OFST 64
8076 #define MC_CMD_FILTER_OP_EXT_IN_OUTER_VLAN_LEN 2
8077 /* IP protocol to match (in low byte; set high byte to 0) */
8078 #define MC_CMD_FILTER_OP_EXT_IN_IP_PROTO_OFST 66
8079 #define MC_CMD_FILTER_OP_EXT_IN_IP_PROTO_LEN 2
8080 /* Firmware defined register 0 to match (reserved; set to 0) */
8081 #define MC_CMD_FILTER_OP_EXT_IN_FWDEF0_OFST 68
8082 #define MC_CMD_FILTER_OP_EXT_IN_FWDEF0_LEN 4
8083 /* VNI (for VXLAN/Geneve, when IP protocol is UDP) or VSID (for NVGRE, when IP
8084  * protocol is GRE) to match (as bytes in network order; set last byte to 0 for
8085  * VXLAN/NVGRE, or 1 for Geneve)
8086  */
8087 #define MC_CMD_FILTER_OP_EXT_IN_VNI_OR_VSID_OFST 72
8088 #define MC_CMD_FILTER_OP_EXT_IN_VNI_OR_VSID_LEN 4
8089 #define MC_CMD_FILTER_OP_EXT_IN_VNI_VALUE_LBN 0
8090 #define MC_CMD_FILTER_OP_EXT_IN_VNI_VALUE_WIDTH 24
8091 #define MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_LBN 24
8092 #define MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_WIDTH 8
8093 /* enum: Match VXLAN traffic with this VNI */
8094 #define MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_VXLAN  0x0
8095 /* enum: Match Geneve traffic with this VNI */
8096 #define MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_GENEVE  0x1
8097 /* enum: Reserved for experimental development use */
8098 #define MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_EXPERIMENTAL  0xfe
8099 #define MC_CMD_FILTER_OP_EXT_IN_VSID_VALUE_LBN 0
8100 #define MC_CMD_FILTER_OP_EXT_IN_VSID_VALUE_WIDTH 24
8101 #define MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_LBN 24
8102 #define MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_WIDTH 8
8103 /* enum: Match NVGRE traffic with this VSID */
8104 #define MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_NVGRE  0x0
8105 /* source IP address to match (as bytes in network order; set last 12 bytes to
8106  * 0 for IPv4 address)
8107  */
8108 #define MC_CMD_FILTER_OP_EXT_IN_SRC_IP_OFST 76
8109 #define MC_CMD_FILTER_OP_EXT_IN_SRC_IP_LEN 16
8110 /* destination IP address to match (as bytes in network order; set last 12
8111  * bytes to 0 for IPv4 address)
8112  */
8113 #define MC_CMD_FILTER_OP_EXT_IN_DST_IP_OFST 92
8114 #define MC_CMD_FILTER_OP_EXT_IN_DST_IP_LEN 16
8115 /* VXLAN/NVGRE inner frame source MAC address to match (as bytes in network
8116  * order)
8117  */
8118 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_MAC_OFST 108
8119 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_MAC_LEN 6
8120 /* VXLAN/NVGRE inner frame source port to match (as bytes in network order) */
8121 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_PORT_OFST 114
8122 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_PORT_LEN 2
8123 /* VXLAN/NVGRE inner frame destination MAC address to match (as bytes in
8124  * network order)
8125  */
8126 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_MAC_OFST 116
8127 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_MAC_LEN 6
8128 /* VXLAN/NVGRE inner frame destination port to match (as bytes in network
8129  * order)
8130  */
8131 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_PORT_OFST 122
8132 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_PORT_LEN 2
8133 /* VXLAN/NVGRE inner frame Ethernet type to match (as bytes in network order)
8134  */
8135 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_ETHER_TYPE_OFST 124
8136 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_ETHER_TYPE_LEN 2
8137 /* VXLAN/NVGRE inner frame Inner VLAN tag to match (as bytes in network order)
8138  */
8139 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_INNER_VLAN_OFST 126
8140 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_INNER_VLAN_LEN 2
8141 /* VXLAN/NVGRE inner frame Outer VLAN tag to match (as bytes in network order)
8142  */
8143 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_OUTER_VLAN_OFST 128
8144 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_OUTER_VLAN_LEN 2
8145 /* VXLAN/NVGRE inner frame IP protocol to match (in low byte; set high byte to
8146  * 0)
8147  */
8148 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_IP_PROTO_OFST 130
8149 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_IP_PROTO_LEN 2
8150 /* VXLAN/NVGRE inner frame Firmware defined register 0 to match (reserved; set
8151  * to 0)
8152  */
8153 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF0_OFST 132
8154 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF0_LEN 4
8155 /* VXLAN/NVGRE inner frame Firmware defined register 1 to match (reserved; set
8156  * to 0)
8157  */
8158 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF1_OFST 136
8159 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF1_LEN 4
8160 /* VXLAN/NVGRE inner frame source IP address to match (as bytes in network
8161  * order; set last 12 bytes to 0 for IPv4 address)
8162  */
8163 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_IP_OFST 140
8164 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_IP_LEN 16
8165 /* VXLAN/NVGRE inner frame destination IP address to match (as bytes in network
8166  * order; set last 12 bytes to 0 for IPv4 address)
8167  */
8168 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_IP_OFST 156
8169 #define MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_IP_LEN 16
8170
8171 /* MC_CMD_FILTER_OP_OUT msgresponse */
8172 #define MC_CMD_FILTER_OP_OUT_LEN 12
8173 /* identifies the type of operation requested */
8174 #define MC_CMD_FILTER_OP_OUT_OP_OFST 0
8175 #define MC_CMD_FILTER_OP_OUT_OP_LEN 4
8176 /*            Enum values, see field(s): */
8177 /*               MC_CMD_FILTER_OP_IN/OP */
8178 /* Returned filter handle (for insert / subscribe operations). Note that these
8179  * handles should be considered opaque to the host, although a value of
8180  * 0xFFFFFFFF_FFFFFFFF is guaranteed never to be a valid handle.
8181  */
8182 #define MC_CMD_FILTER_OP_OUT_HANDLE_OFST 4
8183 #define MC_CMD_FILTER_OP_OUT_HANDLE_LEN 8
8184 #define MC_CMD_FILTER_OP_OUT_HANDLE_LO_OFST 4
8185 #define MC_CMD_FILTER_OP_OUT_HANDLE_HI_OFST 8
8186 /* enum: guaranteed invalid filter handle (low 32 bits) */
8187 #define MC_CMD_FILTER_OP_OUT_HANDLE_LO_INVALID  0xffffffff
8188 /* enum: guaranteed invalid filter handle (high 32 bits) */
8189 #define MC_CMD_FILTER_OP_OUT_HANDLE_HI_INVALID  0xffffffff
8190
8191 /* MC_CMD_FILTER_OP_EXT_OUT msgresponse */
8192 #define MC_CMD_FILTER_OP_EXT_OUT_LEN 12
8193 /* identifies the type of operation requested */
8194 #define MC_CMD_FILTER_OP_EXT_OUT_OP_OFST 0
8195 #define MC_CMD_FILTER_OP_EXT_OUT_OP_LEN 4
8196 /*            Enum values, see field(s): */
8197 /*               MC_CMD_FILTER_OP_EXT_IN/OP */
8198 /* Returned filter handle (for insert / subscribe operations). Note that these
8199  * handles should be considered opaque to the host, although a value of
8200  * 0xFFFFFFFF_FFFFFFFF is guaranteed never to be a valid handle.
8201  */
8202 #define MC_CMD_FILTER_OP_EXT_OUT_HANDLE_OFST 4
8203 #define MC_CMD_FILTER_OP_EXT_OUT_HANDLE_LEN 8
8204 #define MC_CMD_FILTER_OP_EXT_OUT_HANDLE_LO_OFST 4
8205 #define MC_CMD_FILTER_OP_EXT_OUT_HANDLE_HI_OFST 8
8206 /*            Enum values, see field(s): */
8207 /*               MC_CMD_FILTER_OP_OUT/HANDLE */
8208
8209
8210 /***********************************/
8211 /* MC_CMD_GET_PARSER_DISP_INFO
8212  * Get information related to the parser-dispatcher subsystem
8213  */
8214 #define MC_CMD_GET_PARSER_DISP_INFO 0xe4
8215 #undef  MC_CMD_0xe4_PRIVILEGE_CTG
8216
8217 #define MC_CMD_0xe4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8218
8219 /* MC_CMD_GET_PARSER_DISP_INFO_IN msgrequest */
8220 #define MC_CMD_GET_PARSER_DISP_INFO_IN_LEN 4
8221 /* identifies the type of operation requested */
8222 #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_OFST 0
8223 #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_LEN 4
8224 /* enum: read the list of supported RX filter matches */
8225 #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SUPPORTED_RX_MATCHES  0x1
8226 /* enum: read flags indicating restrictions on filter insertion for the calling
8227  * client
8228  */
8229 #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_RESTRICTIONS  0x2
8230 /* enum: read properties relating to security rules (Medford-only; for use by
8231  * SolarSecure apps, not directly by drivers. See SF-114946-SW.)
8232  */
8233 #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SECURITY_RULE_INFO  0x3
8234 /* enum: read the list of supported RX filter matches for VXLAN/NVGRE
8235  * encapsulated frames, which follow a different match sequence to normal
8236  * frames (Medford only)
8237  */
8238 #define MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SUPPORTED_ENCAP_RX_MATCHES  0x4
8239
8240 /* MC_CMD_GET_PARSER_DISP_INFO_OUT msgresponse */
8241 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMIN 8
8242 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX 252
8243 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_LEN(num) (8+4*(num))
8244 /* identifies the type of operation requested */
8245 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_OP_OFST 0
8246 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_OP_LEN 4
8247 /*            Enum values, see field(s): */
8248 /*               MC_CMD_GET_PARSER_DISP_INFO_IN/OP */
8249 /* number of supported match types */
8250 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_NUM_SUPPORTED_MATCHES_OFST 4
8251 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_NUM_SUPPORTED_MATCHES_LEN 4
8252 /* array of supported match types (valid MATCH_FIELDS values for
8253  * MC_CMD_FILTER_OP) sorted in decreasing priority order
8254  */
8255 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_OFST 8
8256 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_LEN 4
8257 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MINNUM 0
8258 #define MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MAXNUM 61
8259
8260 /* MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT msgresponse */
8261 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_LEN 8
8262 /* identifies the type of operation requested */
8263 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_OP_OFST 0
8264 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_OP_LEN 4
8265 /*            Enum values, see field(s): */
8266 /*               MC_CMD_GET_PARSER_DISP_INFO_IN/OP */
8267 /* bitfield of filter insertion restrictions */
8268 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_RESTRICTION_FLAGS_OFST 4
8269 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_RESTRICTION_FLAGS_LEN 4
8270 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_DST_IP_MCAST_ONLY_LBN 0
8271 #define MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_DST_IP_MCAST_ONLY_WIDTH 1
8272
8273 /* MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT msgresponse:
8274  * GET_PARSER_DISP_INFO response format for OP_GET_SECURITY_RULE_INFO.
8275  * (Medford-only; for use by SolarSecure apps, not directly by drivers. See
8276  * SF-114946-SW.) NOTE - this message definition is provisional. It has not yet
8277  * been used in any released code and may change during development. This note
8278  * will be removed once it is regarded as stable.
8279  */
8280 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_LEN 36
8281 /* identifies the type of operation requested */
8282 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_OP_OFST 0
8283 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_OP_LEN 4
8284 /*            Enum values, see field(s): */
8285 /*               MC_CMD_GET_PARSER_DISP_INFO_IN/OP */
8286 /* a version number representing the set of rule lookups that are implemented
8287  * by the currently running firmware
8288  */
8289 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_RULES_VERSION_OFST 4
8290 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_RULES_VERSION_LEN 4
8291 /* enum: implements lookup sequences described in SF-114946-SW draft C */
8292 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_RULES_VERSION_SF_114946_SW_C  0x0
8293 /* the number of nodes in the subnet map */
8294 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_MAP_NUM_NODES_OFST 8
8295 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_MAP_NUM_NODES_LEN 4
8296 /* the number of entries in one subnet map node */
8297 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_MAP_NUM_ENTRIES_PER_NODE_OFST 12
8298 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_MAP_NUM_ENTRIES_PER_NODE_LEN 4
8299 /* minimum valid value for a subnet ID in a subnet map leaf */
8300 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_ID_MIN_OFST 16
8301 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_ID_MIN_LEN 4
8302 /* maximum valid value for a subnet ID in a subnet map leaf */
8303 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_ID_MAX_OFST 20
8304 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_SUBNET_ID_MAX_LEN 4
8305 /* the number of entries in the local and remote port range maps */
8306 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_PORTRANGE_TREE_NUM_ENTRIES_OFST 24
8307 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_PORTRANGE_TREE_NUM_ENTRIES_LEN 4
8308 /* minimum valid value for a portrange ID in a port range map leaf */
8309 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_PORTRANGE_ID_MIN_OFST 28
8310 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_PORTRANGE_ID_MIN_LEN 4
8311 /* maximum valid value for a portrange ID in a port range map leaf */
8312 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_PORTRANGE_ID_MAX_OFST 32
8313 #define MC_CMD_GET_PARSER_DISP_SECURITY_RULE_INFO_OUT_PORTRANGE_ID_MAX_LEN 4
8314
8315
8316 /***********************************/
8317 /* MC_CMD_PARSER_DISP_RW
8318  * Direct read/write of parser-dispatcher state (DICPUs and LUE) for debugging.
8319  * Please note that this interface is only of use to debug tools which have
8320  * knowledge of firmware and hardware data structures; nothing here is intended
8321  * for use by normal driver code. Note that although this command is in the
8322  * Admin privilege group, in tamperproof adapters, only read operations are
8323  * permitted.
8324  */
8325 #define MC_CMD_PARSER_DISP_RW 0xe5
8326 #undef  MC_CMD_0xe5_PRIVILEGE_CTG
8327
8328 #define MC_CMD_0xe5_PRIVILEGE_CTG SRIOV_CTG_ADMIN
8329
8330 /* MC_CMD_PARSER_DISP_RW_IN msgrequest */
8331 #define MC_CMD_PARSER_DISP_RW_IN_LEN 32
8332 /* identifies the target of the operation */
8333 #define MC_CMD_PARSER_DISP_RW_IN_TARGET_OFST 0
8334 #define MC_CMD_PARSER_DISP_RW_IN_TARGET_LEN 4
8335 /* enum: RX dispatcher CPU */
8336 #define MC_CMD_PARSER_DISP_RW_IN_RX_DICPU  0x0
8337 /* enum: TX dispatcher CPU */
8338 #define MC_CMD_PARSER_DISP_RW_IN_TX_DICPU  0x1
8339 /* enum: Lookup engine (with original metadata format). Deprecated; used only
8340  * by cmdclient as a fallback for very old Huntington firmware, and not
8341  * supported in firmware beyond v6.4.0.1005. Use LUE_VERSIONED_METADATA
8342  * instead.
8343  */
8344 #define MC_CMD_PARSER_DISP_RW_IN_LUE  0x2
8345 /* enum: Lookup engine (with requested metadata format) */
8346 #define MC_CMD_PARSER_DISP_RW_IN_LUE_VERSIONED_METADATA  0x3
8347 /* enum: RX0 dispatcher CPU (alias for RX_DICPU; Medford has 2 RX DICPUs) */
8348 #define MC_CMD_PARSER_DISP_RW_IN_RX0_DICPU  0x0
8349 /* enum: RX1 dispatcher CPU (only valid for Medford) */
8350 #define MC_CMD_PARSER_DISP_RW_IN_RX1_DICPU  0x4
8351 /* enum: Miscellaneous other state (only valid for Medford) */
8352 #define MC_CMD_PARSER_DISP_RW_IN_MISC_STATE  0x5
8353 /* identifies the type of operation requested */
8354 #define MC_CMD_PARSER_DISP_RW_IN_OP_OFST 4
8355 #define MC_CMD_PARSER_DISP_RW_IN_OP_LEN 4
8356 /* enum: Read a word of DICPU DMEM or a LUE entry */
8357 #define MC_CMD_PARSER_DISP_RW_IN_READ  0x0
8358 /* enum: Write a word of DICPU DMEM or a LUE entry. Not permitted on
8359  * tamperproof adapters.
8360  */
8361 #define MC_CMD_PARSER_DISP_RW_IN_WRITE  0x1
8362 /* enum: Read-modify-write a word of DICPU DMEM (not valid for LUE). Not
8363  * permitted on tamperproof adapters.
8364  */
8365 #define MC_CMD_PARSER_DISP_RW_IN_RMW  0x2
8366 /* data memory address (DICPU targets) or LUE index (LUE targets) */
8367 #define MC_CMD_PARSER_DISP_RW_IN_ADDRESS_OFST 8
8368 #define MC_CMD_PARSER_DISP_RW_IN_ADDRESS_LEN 4
8369 /* selector (for MISC_STATE target) */
8370 #define MC_CMD_PARSER_DISP_RW_IN_SELECTOR_OFST 8
8371 #define MC_CMD_PARSER_DISP_RW_IN_SELECTOR_LEN 4
8372 /* enum: Port to datapath mapping */
8373 #define MC_CMD_PARSER_DISP_RW_IN_PORT_DP_MAPPING  0x1
8374 /* value to write (for DMEM writes) */
8375 #define MC_CMD_PARSER_DISP_RW_IN_DMEM_WRITE_VALUE_OFST 12
8376 #define MC_CMD_PARSER_DISP_RW_IN_DMEM_WRITE_VALUE_LEN 4
8377 /* XOR value (for DMEM read-modify-writes: new = (old & mask) ^ value) */
8378 #define MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_XOR_VALUE_OFST 12
8379 #define MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_XOR_VALUE_LEN 4
8380 /* AND mask (for DMEM read-modify-writes: new = (old & mask) ^ value) */
8381 #define MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_AND_MASK_OFST 16
8382 #define MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_AND_MASK_LEN 4
8383 /* metadata format (for LUE reads using LUE_VERSIONED_METADATA) */
8384 #define MC_CMD_PARSER_DISP_RW_IN_LUE_READ_METADATA_VERSION_OFST 12
8385 #define MC_CMD_PARSER_DISP_RW_IN_LUE_READ_METADATA_VERSION_LEN 4
8386 /* value to write (for LUE writes) */
8387 #define MC_CMD_PARSER_DISP_RW_IN_LUE_WRITE_VALUE_OFST 12
8388 #define MC_CMD_PARSER_DISP_RW_IN_LUE_WRITE_VALUE_LEN 20
8389
8390 /* MC_CMD_PARSER_DISP_RW_OUT msgresponse */
8391 #define MC_CMD_PARSER_DISP_RW_OUT_LEN 52
8392 /* value read (for DMEM reads) */
8393 #define MC_CMD_PARSER_DISP_RW_OUT_DMEM_READ_VALUE_OFST 0
8394 #define MC_CMD_PARSER_DISP_RW_OUT_DMEM_READ_VALUE_LEN 4
8395 /* value read (for LUE reads) */
8396 #define MC_CMD_PARSER_DISP_RW_OUT_LUE_READ_VALUE_OFST 0
8397 #define MC_CMD_PARSER_DISP_RW_OUT_LUE_READ_VALUE_LEN 20
8398 /* up to 8 32-bit words of additional soft state from the LUE manager (the
8399  * exact content is firmware-dependent and intended only for debug use)
8400  */
8401 #define MC_CMD_PARSER_DISP_RW_OUT_LUE_MGR_STATE_OFST 20
8402 #define MC_CMD_PARSER_DISP_RW_OUT_LUE_MGR_STATE_LEN 32
8403 /* datapath(s) used for each port (for MISC_STATE PORT_DP_MAPPING selector) */
8404 #define MC_CMD_PARSER_DISP_RW_OUT_PORT_DP_MAPPING_OFST 0
8405 #define MC_CMD_PARSER_DISP_RW_OUT_PORT_DP_MAPPING_LEN 4
8406 #define MC_CMD_PARSER_DISP_RW_OUT_PORT_DP_MAPPING_NUM 4
8407 #define MC_CMD_PARSER_DISP_RW_OUT_DP0  0x1 /* enum */
8408 #define MC_CMD_PARSER_DISP_RW_OUT_DP1  0x2 /* enum */
8409
8410
8411 /***********************************/
8412 /* MC_CMD_GET_PF_COUNT
8413  * Get number of PFs on the device.
8414  */
8415 #define MC_CMD_GET_PF_COUNT 0xb6
8416 #undef  MC_CMD_0xb6_PRIVILEGE_CTG
8417
8418 #define MC_CMD_0xb6_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8419
8420 /* MC_CMD_GET_PF_COUNT_IN msgrequest */
8421 #define MC_CMD_GET_PF_COUNT_IN_LEN 0
8422
8423 /* MC_CMD_GET_PF_COUNT_OUT msgresponse */
8424 #define MC_CMD_GET_PF_COUNT_OUT_LEN 1
8425 /* Identifies the number of PFs on the device. */
8426 #define MC_CMD_GET_PF_COUNT_OUT_PF_COUNT_OFST 0
8427 #define MC_CMD_GET_PF_COUNT_OUT_PF_COUNT_LEN 1
8428
8429
8430 /***********************************/
8431 /* MC_CMD_SET_PF_COUNT
8432  * Set number of PFs on the device.
8433  */
8434 #define MC_CMD_SET_PF_COUNT 0xb7
8435
8436 /* MC_CMD_SET_PF_COUNT_IN msgrequest */
8437 #define MC_CMD_SET_PF_COUNT_IN_LEN 4
8438 /* New number of PFs on the device. */
8439 #define MC_CMD_SET_PF_COUNT_IN_PF_COUNT_OFST 0
8440 #define MC_CMD_SET_PF_COUNT_IN_PF_COUNT_LEN 4
8441
8442 /* MC_CMD_SET_PF_COUNT_OUT msgresponse */
8443 #define MC_CMD_SET_PF_COUNT_OUT_LEN 0
8444
8445
8446 /***********************************/
8447 /* MC_CMD_GET_PORT_ASSIGNMENT
8448  * Get port assignment for current PCI function.
8449  */
8450 #define MC_CMD_GET_PORT_ASSIGNMENT 0xb8
8451 #undef  MC_CMD_0xb8_PRIVILEGE_CTG
8452
8453 #define MC_CMD_0xb8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8454
8455 /* MC_CMD_GET_PORT_ASSIGNMENT_IN msgrequest */
8456 #define MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN 0
8457
8458 /* MC_CMD_GET_PORT_ASSIGNMENT_OUT msgresponse */
8459 #define MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN 4
8460 /* Identifies the port assignment for this function. */
8461 #define MC_CMD_GET_PORT_ASSIGNMENT_OUT_PORT_OFST 0
8462 #define MC_CMD_GET_PORT_ASSIGNMENT_OUT_PORT_LEN 4
8463
8464
8465 /***********************************/
8466 /* MC_CMD_SET_PORT_ASSIGNMENT
8467  * Set port assignment for current PCI function.
8468  */
8469 #define MC_CMD_SET_PORT_ASSIGNMENT 0xb9
8470 #undef  MC_CMD_0xb9_PRIVILEGE_CTG
8471
8472 #define MC_CMD_0xb9_PRIVILEGE_CTG SRIOV_CTG_ADMIN
8473
8474 /* MC_CMD_SET_PORT_ASSIGNMENT_IN msgrequest */
8475 #define MC_CMD_SET_PORT_ASSIGNMENT_IN_LEN 4
8476 /* Identifies the port assignment for this function. */
8477 #define MC_CMD_SET_PORT_ASSIGNMENT_IN_PORT_OFST 0
8478 #define MC_CMD_SET_PORT_ASSIGNMENT_IN_PORT_LEN 4
8479
8480 /* MC_CMD_SET_PORT_ASSIGNMENT_OUT msgresponse */
8481 #define MC_CMD_SET_PORT_ASSIGNMENT_OUT_LEN 0
8482
8483
8484 /***********************************/
8485 /* MC_CMD_ALLOC_VIS
8486  * Allocate VIs for current PCI function.
8487  */
8488 #define MC_CMD_ALLOC_VIS 0x8b
8489 #undef  MC_CMD_0x8b_PRIVILEGE_CTG
8490
8491 #define MC_CMD_0x8b_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8492
8493 /* MC_CMD_ALLOC_VIS_IN msgrequest */
8494 #define MC_CMD_ALLOC_VIS_IN_LEN 8
8495 /* The minimum number of VIs that is acceptable */
8496 #define MC_CMD_ALLOC_VIS_IN_MIN_VI_COUNT_OFST 0
8497 #define MC_CMD_ALLOC_VIS_IN_MIN_VI_COUNT_LEN 4
8498 /* The maximum number of VIs that would be useful */
8499 #define MC_CMD_ALLOC_VIS_IN_MAX_VI_COUNT_OFST 4
8500 #define MC_CMD_ALLOC_VIS_IN_MAX_VI_COUNT_LEN 4
8501
8502 /* MC_CMD_ALLOC_VIS_OUT msgresponse: Huntington-compatible VI_ALLOC request.
8503  * Use extended version in new code.
8504  */
8505 #define MC_CMD_ALLOC_VIS_OUT_LEN 8
8506 /* The number of VIs allocated on this function */
8507 #define MC_CMD_ALLOC_VIS_OUT_VI_COUNT_OFST 0
8508 #define MC_CMD_ALLOC_VIS_OUT_VI_COUNT_LEN 4
8509 /* The base absolute VI number allocated to this function. Required to
8510  * correctly interpret wakeup events.
8511  */
8512 #define MC_CMD_ALLOC_VIS_OUT_VI_BASE_OFST 4
8513 #define MC_CMD_ALLOC_VIS_OUT_VI_BASE_LEN 4
8514
8515 /* MC_CMD_ALLOC_VIS_EXT_OUT msgresponse */
8516 #define MC_CMD_ALLOC_VIS_EXT_OUT_LEN 12
8517 /* The number of VIs allocated on this function */
8518 #define MC_CMD_ALLOC_VIS_EXT_OUT_VI_COUNT_OFST 0
8519 #define MC_CMD_ALLOC_VIS_EXT_OUT_VI_COUNT_LEN 4
8520 /* The base absolute VI number allocated to this function. Required to
8521  * correctly interpret wakeup events.
8522  */
8523 #define MC_CMD_ALLOC_VIS_EXT_OUT_VI_BASE_OFST 4
8524 #define MC_CMD_ALLOC_VIS_EXT_OUT_VI_BASE_LEN 4
8525 /* Function's port vi_shift value (always 0 on Huntington) */
8526 #define MC_CMD_ALLOC_VIS_EXT_OUT_VI_SHIFT_OFST 8
8527 #define MC_CMD_ALLOC_VIS_EXT_OUT_VI_SHIFT_LEN 4
8528
8529
8530 /***********************************/
8531 /* MC_CMD_FREE_VIS
8532  * Free VIs for current PCI function. Any linked PIO buffers will be unlinked,
8533  * but not freed.
8534  */
8535 #define MC_CMD_FREE_VIS 0x8c
8536 #undef  MC_CMD_0x8c_PRIVILEGE_CTG
8537
8538 #define MC_CMD_0x8c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8539
8540 /* MC_CMD_FREE_VIS_IN msgrequest */
8541 #define MC_CMD_FREE_VIS_IN_LEN 0
8542
8543 /* MC_CMD_FREE_VIS_OUT msgresponse */
8544 #define MC_CMD_FREE_VIS_OUT_LEN 0
8545
8546
8547 /***********************************/
8548 /* MC_CMD_GET_SRIOV_CFG
8549  * Get SRIOV config for this PF.
8550  */
8551 #define MC_CMD_GET_SRIOV_CFG 0xba
8552 #undef  MC_CMD_0xba_PRIVILEGE_CTG
8553
8554 #define MC_CMD_0xba_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8555
8556 /* MC_CMD_GET_SRIOV_CFG_IN msgrequest */
8557 #define MC_CMD_GET_SRIOV_CFG_IN_LEN 0
8558
8559 /* MC_CMD_GET_SRIOV_CFG_OUT msgresponse */
8560 #define MC_CMD_GET_SRIOV_CFG_OUT_LEN 20
8561 /* Number of VFs currently enabled. */
8562 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_CURRENT_OFST 0
8563 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_CURRENT_LEN 4
8564 /* Max number of VFs before sriov stride and offset may need to be changed. */
8565 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_MAX_OFST 4
8566 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_MAX_LEN 4
8567 #define MC_CMD_GET_SRIOV_CFG_OUT_FLAGS_OFST 8
8568 #define MC_CMD_GET_SRIOV_CFG_OUT_FLAGS_LEN 4
8569 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_LBN 0
8570 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_WIDTH 1
8571 /* RID offset of first VF from PF. */
8572 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_OFFSET_OFST 12
8573 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_OFFSET_LEN 4
8574 /* RID offset of each subsequent VF from the previous. */
8575 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_STRIDE_OFST 16
8576 #define MC_CMD_GET_SRIOV_CFG_OUT_VF_STRIDE_LEN 4
8577
8578
8579 /***********************************/
8580 /* MC_CMD_SET_SRIOV_CFG
8581  * Set SRIOV config for this PF.
8582  */
8583 #define MC_CMD_SET_SRIOV_CFG 0xbb
8584 #undef  MC_CMD_0xbb_PRIVILEGE_CTG
8585
8586 #define MC_CMD_0xbb_PRIVILEGE_CTG SRIOV_CTG_ADMIN
8587
8588 /* MC_CMD_SET_SRIOV_CFG_IN msgrequest */
8589 #define MC_CMD_SET_SRIOV_CFG_IN_LEN 20
8590 /* Number of VFs currently enabled. */
8591 #define MC_CMD_SET_SRIOV_CFG_IN_VF_CURRENT_OFST 0
8592 #define MC_CMD_SET_SRIOV_CFG_IN_VF_CURRENT_LEN 4
8593 /* Max number of VFs before sriov stride and offset may need to be changed. */
8594 #define MC_CMD_SET_SRIOV_CFG_IN_VF_MAX_OFST 4
8595 #define MC_CMD_SET_SRIOV_CFG_IN_VF_MAX_LEN 4
8596 #define MC_CMD_SET_SRIOV_CFG_IN_FLAGS_OFST 8
8597 #define MC_CMD_SET_SRIOV_CFG_IN_FLAGS_LEN 4
8598 #define MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_LBN 0
8599 #define MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_WIDTH 1
8600 /* RID offset of first VF from PF, or 0 for no change, or
8601  * MC_CMD_RESOURCE_INSTANCE_ANY to allow the system to allocate an offset.
8602  */
8603 #define MC_CMD_SET_SRIOV_CFG_IN_VF_OFFSET_OFST 12
8604 #define MC_CMD_SET_SRIOV_CFG_IN_VF_OFFSET_LEN 4
8605 /* RID offset of each subsequent VF from the previous, 0 for no change, or
8606  * MC_CMD_RESOURCE_INSTANCE_ANY to allow the system to allocate a stride.
8607  */
8608 #define MC_CMD_SET_SRIOV_CFG_IN_VF_STRIDE_OFST 16
8609 #define MC_CMD_SET_SRIOV_CFG_IN_VF_STRIDE_LEN 4
8610
8611 /* MC_CMD_SET_SRIOV_CFG_OUT msgresponse */
8612 #define MC_CMD_SET_SRIOV_CFG_OUT_LEN 0
8613
8614
8615 /***********************************/
8616 /* MC_CMD_GET_VI_ALLOC_INFO
8617  * Get information about number of VI's and base VI number allocated to this
8618  * function.
8619  */
8620 #define MC_CMD_GET_VI_ALLOC_INFO 0x8d
8621 #undef  MC_CMD_0x8d_PRIVILEGE_CTG
8622
8623 #define MC_CMD_0x8d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8624
8625 /* MC_CMD_GET_VI_ALLOC_INFO_IN msgrequest */
8626 #define MC_CMD_GET_VI_ALLOC_INFO_IN_LEN 0
8627
8628 /* MC_CMD_GET_VI_ALLOC_INFO_OUT msgresponse */
8629 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_LEN 12
8630 /* The number of VIs allocated on this function */
8631 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_COUNT_OFST 0
8632 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_COUNT_LEN 4
8633 /* The base absolute VI number allocated to this function. Required to
8634  * correctly interpret wakeup events.
8635  */
8636 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_BASE_OFST 4
8637 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_BASE_LEN 4
8638 /* Function's port vi_shift value (always 0 on Huntington) */
8639 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_SHIFT_OFST 8
8640 #define MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_SHIFT_LEN 4
8641
8642
8643 /***********************************/
8644 /* MC_CMD_DUMP_VI_STATE
8645  * For CmdClient use. Dump pertinent information on a specific absolute VI.
8646  */
8647 #define MC_CMD_DUMP_VI_STATE 0x8e
8648 #undef  MC_CMD_0x8e_PRIVILEGE_CTG
8649
8650 #define MC_CMD_0x8e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8651
8652 /* MC_CMD_DUMP_VI_STATE_IN msgrequest */
8653 #define MC_CMD_DUMP_VI_STATE_IN_LEN 4
8654 /* The VI number to query. */
8655 #define MC_CMD_DUMP_VI_STATE_IN_VI_NUMBER_OFST 0
8656 #define MC_CMD_DUMP_VI_STATE_IN_VI_NUMBER_LEN 4
8657
8658 /* MC_CMD_DUMP_VI_STATE_OUT msgresponse */
8659 #define MC_CMD_DUMP_VI_STATE_OUT_LEN 96
8660 /* The PF part of the function owning this VI. */
8661 #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_PF_OFST 0
8662 #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_PF_LEN 2
8663 /* The VF part of the function owning this VI. */
8664 #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_VF_OFST 2
8665 #define MC_CMD_DUMP_VI_STATE_OUT_OWNER_VF_LEN 2
8666 /* Base of VIs allocated to this function. */
8667 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_BASE_OFST 4
8668 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_BASE_LEN 2
8669 /* Count of VIs allocated to the owner function. */
8670 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_COUNT_OFST 6
8671 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_COUNT_LEN 2
8672 /* Base interrupt vector allocated to this function. */
8673 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_BASE_OFST 8
8674 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_BASE_LEN 2
8675 /* Number of interrupt vectors allocated to this function. */
8676 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_COUNT_OFST 10
8677 #define MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_COUNT_LEN 2
8678 /* Raw evq ptr table data. */
8679 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_OFST 12
8680 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_LEN 8
8681 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_LO_OFST 12
8682 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_HI_OFST 16
8683 /* Raw evq timer table data. */
8684 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_OFST 20
8685 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_LEN 8
8686 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_LO_OFST 20
8687 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_HI_OFST 24
8688 /* Combined metadata field. */
8689 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_OFST 28
8690 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_LEN 4
8691 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_LBN 0
8692 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_WIDTH 16
8693 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_LBN 16
8694 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_WIDTH 8
8695 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_LBN 24
8696 #define MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_WIDTH 8
8697 /* TXDPCPU raw table data for queue. */
8698 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_OFST 32
8699 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_LEN 8
8700 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_LO_OFST 32
8701 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_HI_OFST 36
8702 /* TXDPCPU raw table data for queue. */
8703 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_OFST 40
8704 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_LEN 8
8705 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_LO_OFST 40
8706 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_HI_OFST 44
8707 /* TXDPCPU raw table data for queue. */
8708 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_OFST 48
8709 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_LEN 8
8710 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_LO_OFST 48
8711 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_HI_OFST 52
8712 /* Combined metadata field. */
8713 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_OFST 56
8714 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_LEN 8
8715 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_LO_OFST 56
8716 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_HI_OFST 60
8717 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_LBN 0
8718 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_WIDTH 16
8719 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_LBN 16
8720 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_WIDTH 8
8721 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_LBN 24
8722 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_WIDTH 8
8723 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_LBN 32
8724 #define MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_WIDTH 8
8725 #define MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_LBN 40
8726 #define MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_WIDTH 24
8727 /* RXDPCPU raw table data for queue. */
8728 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_OFST 64
8729 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_LEN 8
8730 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_LO_OFST 64
8731 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_HI_OFST 68
8732 /* RXDPCPU raw table data for queue. */
8733 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_OFST 72
8734 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_LEN 8
8735 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_LO_OFST 72
8736 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_HI_OFST 76
8737 /* Reserved, currently 0. */
8738 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_OFST 80
8739 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_LEN 8
8740 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_LO_OFST 80
8741 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_HI_OFST 84
8742 /* Combined metadata field. */
8743 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_OFST 88
8744 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_LEN 8
8745 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_LO_OFST 88
8746 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_HI_OFST 92
8747 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_LBN 0
8748 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_WIDTH 16
8749 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_LBN 16
8750 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_WIDTH 8
8751 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_LBN 24
8752 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_WIDTH 8
8753 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_LBN 32
8754 #define MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_WIDTH 8
8755
8756
8757 /***********************************/
8758 /* MC_CMD_ALLOC_PIOBUF
8759  * Allocate a push I/O buffer for later use with a tx queue.
8760  */
8761 #define MC_CMD_ALLOC_PIOBUF 0x8f
8762 #undef  MC_CMD_0x8f_PRIVILEGE_CTG
8763
8764 #define MC_CMD_0x8f_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
8765
8766 /* MC_CMD_ALLOC_PIOBUF_IN msgrequest */
8767 #define MC_CMD_ALLOC_PIOBUF_IN_LEN 0
8768
8769 /* MC_CMD_ALLOC_PIOBUF_OUT msgresponse */
8770 #define MC_CMD_ALLOC_PIOBUF_OUT_LEN 4
8771 /* Handle for allocated push I/O buffer. */
8772 #define MC_CMD_ALLOC_PIOBUF_OUT_PIOBUF_HANDLE_OFST 0
8773 #define MC_CMD_ALLOC_PIOBUF_OUT_PIOBUF_HANDLE_LEN 4
8774
8775
8776 /***********************************/
8777 /* MC_CMD_FREE_PIOBUF
8778  * Free a push I/O buffer.
8779  */
8780 #define MC_CMD_FREE_PIOBUF 0x90
8781 #undef  MC_CMD_0x90_PRIVILEGE_CTG
8782
8783 #define MC_CMD_0x90_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
8784
8785 /* MC_CMD_FREE_PIOBUF_IN msgrequest */
8786 #define MC_CMD_FREE_PIOBUF_IN_LEN 4
8787 /* Handle for allocated push I/O buffer. */
8788 #define MC_CMD_FREE_PIOBUF_IN_PIOBUF_HANDLE_OFST 0
8789 #define MC_CMD_FREE_PIOBUF_IN_PIOBUF_HANDLE_LEN 4
8790
8791 /* MC_CMD_FREE_PIOBUF_OUT msgresponse */
8792 #define MC_CMD_FREE_PIOBUF_OUT_LEN 0
8793
8794
8795 /***********************************/
8796 /* MC_CMD_GET_VI_TLP_PROCESSING
8797  * Get TLP steering and ordering information for a VI.
8798  */
8799 #define MC_CMD_GET_VI_TLP_PROCESSING 0xb0
8800 #undef  MC_CMD_0xb0_PRIVILEGE_CTG
8801
8802 #define MC_CMD_0xb0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8803
8804 /* MC_CMD_GET_VI_TLP_PROCESSING_IN msgrequest */
8805 #define MC_CMD_GET_VI_TLP_PROCESSING_IN_LEN 4
8806 /* VI number to get information for. */
8807 #define MC_CMD_GET_VI_TLP_PROCESSING_IN_INSTANCE_OFST 0
8808 #define MC_CMD_GET_VI_TLP_PROCESSING_IN_INSTANCE_LEN 4
8809
8810 /* MC_CMD_GET_VI_TLP_PROCESSING_OUT msgresponse */
8811 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_LEN 4
8812 /* Transaction processing steering hint 1 for use with the Rx Queue. */
8813 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG1_RX_OFST 0
8814 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG1_RX_LEN 1
8815 /* Transaction processing steering hint 2 for use with the Ev Queue. */
8816 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG2_EV_OFST 1
8817 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG2_EV_LEN 1
8818 /* Use Relaxed ordering model for TLPs on this VI. */
8819 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_RELAXED_ORDERING_LBN 16
8820 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_RELAXED_ORDERING_WIDTH 1
8821 /* Use ID based ordering for TLPs on this VI. */
8822 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_ID_BASED_ORDERING_LBN 17
8823 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_ID_BASED_ORDERING_WIDTH 1
8824 /* Set no snoop bit for TLPs on this VI. */
8825 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_NO_SNOOP_LBN 18
8826 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_NO_SNOOP_WIDTH 1
8827 /* Enable TPH for TLPs on this VI. */
8828 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_ON_LBN 19
8829 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_ON_WIDTH 1
8830 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_DATA_OFST 0
8831 #define MC_CMD_GET_VI_TLP_PROCESSING_OUT_DATA_LEN 4
8832
8833
8834 /***********************************/
8835 /* MC_CMD_SET_VI_TLP_PROCESSING
8836  * Set TLP steering and ordering information for a VI.
8837  */
8838 #define MC_CMD_SET_VI_TLP_PROCESSING 0xb1
8839 #undef  MC_CMD_0xb1_PRIVILEGE_CTG
8840
8841 #define MC_CMD_0xb1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
8842
8843 /* MC_CMD_SET_VI_TLP_PROCESSING_IN msgrequest */
8844 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_LEN 8
8845 /* VI number to set information for. */
8846 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_INSTANCE_OFST 0
8847 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_INSTANCE_LEN 4
8848 /* Transaction processing steering hint 1 for use with the Rx Queue. */
8849 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG1_RX_OFST 4
8850 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG1_RX_LEN 1
8851 /* Transaction processing steering hint 2 for use with the Ev Queue. */
8852 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG2_EV_OFST 5
8853 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG2_EV_LEN 1
8854 /* Use Relaxed ordering model for TLPs on this VI. */
8855 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_RELAXED_ORDERING_LBN 48
8856 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_RELAXED_ORDERING_WIDTH 1
8857 /* Use ID based ordering for TLPs on this VI. */
8858 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_ID_BASED_ORDERING_LBN 49
8859 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_ID_BASED_ORDERING_WIDTH 1
8860 /* Set the no snoop bit for TLPs on this VI. */
8861 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_NO_SNOOP_LBN 50
8862 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_NO_SNOOP_WIDTH 1
8863 /* Enable TPH for TLPs on this VI. */
8864 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_ON_LBN 51
8865 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_ON_WIDTH 1
8866 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_DATA_OFST 4
8867 #define MC_CMD_SET_VI_TLP_PROCESSING_IN_DATA_LEN 4
8868
8869 /* MC_CMD_SET_VI_TLP_PROCESSING_OUT msgresponse */
8870 #define MC_CMD_SET_VI_TLP_PROCESSING_OUT_LEN 0
8871
8872
8873 /***********************************/
8874 /* MC_CMD_GET_TLP_PROCESSING_GLOBALS
8875  * Get global PCIe steering and transaction processing configuration.
8876  */
8877 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS 0xbc
8878 #undef  MC_CMD_0xbc_PRIVILEGE_CTG
8879
8880 #define MC_CMD_0xbc_PRIVILEGE_CTG SRIOV_CTG_ADMIN
8881
8882 /* MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN msgrequest */
8883 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_LEN 4
8884 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_OFST 0
8885 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_LEN 4
8886 /* enum: MISC. */
8887 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_MISC  0x0
8888 /* enum: IDO. */
8889 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_IDO  0x1
8890 /* enum: RO. */
8891 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_RO  0x2
8892 /* enum: TPH Type. */
8893 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_TPH_TYPE  0x3
8894
8895 /* MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT msgresponse */
8896 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_LEN 8
8897 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_GLOBAL_CATEGORY_OFST 0
8898 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_GLOBAL_CATEGORY_LEN 4
8899 /*            Enum values, see field(s): */
8900 /*               MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN/TLP_GLOBAL_CATEGORY */
8901 /* Amalgamated TLP info word. */
8902 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_WORD_OFST 4
8903 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_WORD_LEN 4
8904 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_LBN 0
8905 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_WIDTH 1
8906 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_LBN 1
8907 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_WIDTH 31
8908 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_LBN 0
8909 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_WIDTH 1
8910 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_LBN 1
8911 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_WIDTH 1
8912 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_LBN 2
8913 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_WIDTH 1
8914 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_LBN 3
8915 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_WIDTH 1
8916 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_LBN 4
8917 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_WIDTH 28
8918 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_LBN 0
8919 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_WIDTH 1
8920 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_LBN 1
8921 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_WIDTH 1
8922 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_LBN 2
8923 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_WIDTH 1
8924 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_LBN 3
8925 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_WIDTH 29
8926 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_LBN 0
8927 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_WIDTH 2
8928 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_LBN 2
8929 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_WIDTH 2
8930 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_LBN 4
8931 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_WIDTH 2
8932 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_LBN 6
8933 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_WIDTH 2
8934 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_LBN 8
8935 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_WIDTH 2
8936 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_LBN 9
8937 #define MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_WIDTH 23
8938
8939
8940 /***********************************/
8941 /* MC_CMD_SET_TLP_PROCESSING_GLOBALS
8942  * Set global PCIe steering and transaction processing configuration.
8943  */
8944 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS 0xbd
8945 #undef  MC_CMD_0xbd_PRIVILEGE_CTG
8946
8947 #define MC_CMD_0xbd_PRIVILEGE_CTG SRIOV_CTG_ADMIN
8948
8949 /* MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN msgrequest */
8950 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_LEN 8
8951 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_OFST 0
8952 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_LEN 4
8953 /*            Enum values, see field(s): */
8954 /*               MC_CMD_GET_TLP_PROCESSING_GLOBALS/MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN/TLP_GLOBAL_CATEGORY */
8955 /* Amalgamated TLP info word. */
8956 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_WORD_OFST 4
8957 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_WORD_LEN 4
8958 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_LBN 0
8959 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_WIDTH 1
8960 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_LBN 0
8961 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_WIDTH 1
8962 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_LBN 1
8963 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_WIDTH 1
8964 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_LBN 2
8965 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_WIDTH 1
8966 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_LBN 3
8967 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_WIDTH 1
8968 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_LBN 0
8969 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_WIDTH 1
8970 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_LBN 1
8971 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_WIDTH 1
8972 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_LBN 2
8973 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_WIDTH 1
8974 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_LBN 0
8975 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_WIDTH 2
8976 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_LBN 2
8977 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_WIDTH 2
8978 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_LBN 4
8979 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_WIDTH 2
8980 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_LBN 6
8981 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_WIDTH 2
8982 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_LBN 8
8983 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_WIDTH 2
8984 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_LBN 10
8985 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_WIDTH 22
8986
8987 /* MC_CMD_SET_TLP_PROCESSING_GLOBALS_OUT msgresponse */
8988 #define MC_CMD_SET_TLP_PROCESSING_GLOBALS_OUT_LEN 0
8989
8990
8991 /***********************************/
8992 /* MC_CMD_SATELLITE_DOWNLOAD
8993  * Download a new set of images to the satellite CPUs from the host.
8994  */
8995 #define MC_CMD_SATELLITE_DOWNLOAD 0x91
8996 #undef  MC_CMD_0x91_PRIVILEGE_CTG
8997
8998 #define MC_CMD_0x91_PRIVILEGE_CTG SRIOV_CTG_ADMIN
8999
9000 /* MC_CMD_SATELLITE_DOWNLOAD_IN msgrequest: The reset requirements for the CPUs
9001  * are subtle, and so downloads must proceed in a number of phases.
9002  *
9003  * 1) PHASE_RESET with a target of TARGET_ALL and chunk ID/length of 0.
9004  *
9005  * 2) PHASE_IMEMS for each of the IMEM targets (target IDs 0-11). Each download
9006  * may consist of multiple chunks. The final chunk (with CHUNK_ID_LAST) should
9007  * be a checksum (a simple 32-bit sum) of the transferred data. An individual
9008  * download may be aborted using CHUNK_ID_ABORT.
9009  *
9010  * 3) PHASE_VECTORS for each of the vector table targets (target IDs 12-15),
9011  * similar to PHASE_IMEMS.
9012  *
9013  * 4) PHASE_READY with a target of TARGET_ALL and chunk ID/length of 0.
9014  *
9015  * After any error (a requested abort is not considered to be an error) the
9016  * sequence must be restarted from PHASE_RESET.
9017  */
9018 #define MC_CMD_SATELLITE_DOWNLOAD_IN_LENMIN 20
9019 #define MC_CMD_SATELLITE_DOWNLOAD_IN_LENMAX 252
9020 #define MC_CMD_SATELLITE_DOWNLOAD_IN_LEN(num) (16+4*(num))
9021 /* Download phase. (Note: the IDLE phase is used internally and is never valid
9022  * in a command from the host.)
9023  */
9024 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_OFST 0
9025 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_LEN 4
9026 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_IDLE     0x0 /* enum */
9027 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_RESET    0x1 /* enum */
9028 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_IMEMS    0x2 /* enum */
9029 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_VECTORS  0x3 /* enum */
9030 #define MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_READY    0x4 /* enum */
9031 /* Target for download. (These match the blob numbers defined in
9032  * mc_flash_layout.h.)
9033  */
9034 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_OFST 4
9035 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_LEN 4
9036 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9037 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_TEXT  0x0
9038 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9039 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_TEXT  0x1
9040 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9041 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDP_TEXT  0x2
9042 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9043 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDP_TEXT  0x3
9044 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9045 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_LUT  0x4
9046 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9047 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_LUT_CFG  0x5
9048 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9049 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_LUT  0x6
9050 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9051 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_LUT_CFG  0x7
9052 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9053 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_PGM  0x8
9054 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9055 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_SL_PGM  0x9
9056 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9057 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_PGM  0xa
9058 /* enum: Valid in phase 2 (PHASE_IMEMS) only */
9059 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_SL_PGM  0xb
9060 /* enum: Valid in phase 3 (PHASE_VECTORS) only */
9061 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_VTBL0  0xc
9062 /* enum: Valid in phase 3 (PHASE_VECTORS) only */
9063 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_VTBL0  0xd
9064 /* enum: Valid in phase 3 (PHASE_VECTORS) only */
9065 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_VTBL1  0xe
9066 /* enum: Valid in phase 3 (PHASE_VECTORS) only */
9067 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_VTBL1  0xf
9068 /* enum: Valid in phases 1 (PHASE_RESET) and 4 (PHASE_READY) only */
9069 #define MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_ALL  0xffffffff
9070 /* Chunk ID, or CHUNK_ID_LAST or CHUNK_ID_ABORT */
9071 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_OFST 8
9072 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_LEN 4
9073 /* enum: Last chunk, containing checksum rather than data */
9074 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_LAST  0xffffffff
9075 /* enum: Abort download of this item */
9076 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_ABORT  0xfffffffe
9077 /* Length of this chunk in bytes */
9078 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_LEN_OFST 12
9079 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_LEN_LEN 4
9080 /* Data for this chunk */
9081 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_OFST 16
9082 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_LEN 4
9083 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MINNUM 1
9084 #define MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MAXNUM 59
9085
9086 /* MC_CMD_SATELLITE_DOWNLOAD_OUT msgresponse */
9087 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_LEN 8
9088 /* Same as MC_CMD_ERR field, but included as 0 in success cases */
9089 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_RESULT_OFST 0
9090 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_RESULT_LEN 4
9091 /* Extra status information */
9092 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_INFO_OFST 4
9093 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_INFO_LEN 4
9094 /* enum: Code download OK, completed. */
9095 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_COMPLETE  0x0
9096 /* enum: Code download aborted as requested. */
9097 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_ABORTED  0x1
9098 /* enum: Code download OK so far, send next chunk. */
9099 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_NEXT_CHUNK  0x2
9100 /* enum: Download phases out of sequence */
9101 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_PHASE  0x100
9102 /* enum: Bad target for this phase */
9103 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_TARGET  0x101
9104 /* enum: Chunk ID out of sequence */
9105 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHUNK_ID  0x200
9106 /* enum: Chunk length zero or too large */
9107 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHUNK_LEN  0x201
9108 /* enum: Checksum was incorrect */
9109 #define MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHECKSUM  0x300
9110
9111
9112 /***********************************/
9113 /* MC_CMD_GET_CAPABILITIES
9114  * Get device capabilities.
9115  *
9116  * This is supplementary to the MC_CMD_GET_BOARD_CFG command, and intended to
9117  * reference inherent device capabilities as opposed to current NVRAM config.
9118  */
9119 #define MC_CMD_GET_CAPABILITIES 0xbe
9120 #undef  MC_CMD_0xbe_PRIVILEGE_CTG
9121
9122 #define MC_CMD_0xbe_PRIVILEGE_CTG SRIOV_CTG_GENERAL
9123
9124 /* MC_CMD_GET_CAPABILITIES_IN msgrequest */
9125 #define MC_CMD_GET_CAPABILITIES_IN_LEN 0
9126
9127 /* MC_CMD_GET_CAPABILITIES_OUT msgresponse */
9128 #define MC_CMD_GET_CAPABILITIES_OUT_LEN 20
9129 /* First word of flags. */
9130 #define MC_CMD_GET_CAPABILITIES_OUT_FLAGS1_OFST 0
9131 #define MC_CMD_GET_CAPABILITIES_OUT_FLAGS1_LEN 4
9132 #define MC_CMD_GET_CAPABILITIES_OUT_VPORT_RECONFIGURE_LBN 3
9133 #define MC_CMD_GET_CAPABILITIES_OUT_VPORT_RECONFIGURE_WIDTH 1
9134 #define MC_CMD_GET_CAPABILITIES_OUT_TX_STRIPING_LBN 4
9135 #define MC_CMD_GET_CAPABILITIES_OUT_TX_STRIPING_WIDTH 1
9136 #define MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_QUERY_LBN 5
9137 #define MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_QUERY_WIDTH 1
9138 #define MC_CMD_GET_CAPABILITIES_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
9139 #define MC_CMD_GET_CAPABILITIES_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
9140 #define MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_LBN 7
9141 #define MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
9142 #define MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_LBN 8
9143 #define MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
9144 #define MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_LBN 9
9145 #define MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_WIDTH 1
9146 #define MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
9147 #define MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
9148 #define MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
9149 #define MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
9150 #define MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
9151 #define MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
9152 #define MC_CMD_GET_CAPABILITIES_OUT_ADDITIONAL_RSS_MODES_LBN 13
9153 #define MC_CMD_GET_CAPABILITIES_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
9154 #define MC_CMD_GET_CAPABILITIES_OUT_QBB_LBN 14
9155 #define MC_CMD_GET_CAPABILITIES_OUT_QBB_WIDTH 1
9156 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
9157 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
9158 #define MC_CMD_GET_CAPABILITIES_OUT_RX_RSS_LIMITED_LBN 16
9159 #define MC_CMD_GET_CAPABILITIES_OUT_RX_RSS_LIMITED_WIDTH 1
9160 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_LBN 17
9161 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_WIDTH 1
9162 #define MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS_LBN 18
9163 #define MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS_WIDTH 1
9164 #define MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_LBN 19
9165 #define MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_WIDTH 1
9166 #define MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_LBN 20
9167 #define MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_WIDTH 1
9168 #define MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_LBN 21
9169 #define MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_WIDTH 1
9170 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_LBN 22
9171 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_WIDTH 1
9172 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_LBN 23
9173 #define MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_WIDTH 1
9174 #define MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_LBN 24
9175 #define MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_WIDTH 1
9176 #define MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_LBN 25
9177 #define MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_WIDTH 1
9178 #define MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_LBN 26
9179 #define MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_WIDTH 1
9180 #define MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_LBN 27
9181 #define MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
9182 #define MC_CMD_GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER_LBN 28
9183 #define MC_CMD_GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER_WIDTH 1
9184 #define MC_CMD_GET_CAPABILITIES_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
9185 #define MC_CMD_GET_CAPABILITIES_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
9186 #define MC_CMD_GET_CAPABILITIES_OUT_EVB_LBN 30
9187 #define MC_CMD_GET_CAPABILITIES_OUT_EVB_WIDTH 1
9188 #define MC_CMD_GET_CAPABILITIES_OUT_VXLAN_NVGRE_LBN 31
9189 #define MC_CMD_GET_CAPABILITIES_OUT_VXLAN_NVGRE_WIDTH 1
9190 /* RxDPCPU firmware id. */
9191 #define MC_CMD_GET_CAPABILITIES_OUT_RX_DPCPU_FW_ID_OFST 4
9192 #define MC_CMD_GET_CAPABILITIES_OUT_RX_DPCPU_FW_ID_LEN 2
9193 /* enum: Standard RXDP firmware */
9194 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP  0x0
9195 /* enum: Low latency RXDP firmware */
9196 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_LOW_LATENCY  0x1
9197 /* enum: Packed stream RXDP firmware */
9198 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_PACKED_STREAM  0x2
9199 /* enum: Rules engine RXDP firmware */
9200 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_RULES_ENGINE  0x5
9201 /* enum: BIST RXDP firmware */
9202 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_BIST  0x10a
9203 /* enum: RXDP Test firmware image 1 */
9204 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH  0x101
9205 /* enum: RXDP Test firmware image 2 */
9206 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD  0x102
9207 /* enum: RXDP Test firmware image 3 */
9208 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST  0x103
9209 /* enum: RXDP Test firmware image 4 */
9210 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE  0x104
9211 /* enum: RXDP Test firmware image 5 */
9212 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_BACKPRESSURE  0x105
9213 /* enum: RXDP Test firmware image 6 */
9214 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_PACKET_EDITS  0x106
9215 /* enum: RXDP Test firmware image 7 */
9216 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_RX_HDR_SPLIT  0x107
9217 /* enum: RXDP Test firmware image 8 */
9218 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DISABLE_DL  0x108
9219 /* enum: RXDP Test firmware image 9 */
9220 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DOORBELL_DELAY  0x10b
9221 /* enum: RXDP Test firmware image 10 */
9222 #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_SLOW  0x10c
9223 /* TxDPCPU firmware id. */
9224 #define MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_OFST 6
9225 #define MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_LEN 2
9226 /* enum: Standard TXDP firmware */
9227 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP  0x0
9228 /* enum: Low latency TXDP firmware */
9229 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_LOW_LATENCY  0x1
9230 /* enum: High packet rate TXDP firmware */
9231 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_HIGH_PACKET_RATE  0x3
9232 /* enum: Rules engine TXDP firmware */
9233 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_RULES_ENGINE  0x5
9234 /* enum: BIST TXDP firmware */
9235 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_BIST  0x12d
9236 /* enum: TXDP Test firmware image 1 */
9237 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_TSO_EDIT  0x101
9238 /* enum: TXDP Test firmware image 2 */
9239 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_PACKET_EDITS  0x102
9240 /* enum: TXDP CSR bus test firmware */
9241 #define MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_CSR  0x103
9242 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_OFST 8
9243 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_LEN 2
9244 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_LBN 0
9245 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_WIDTH 12
9246 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_LBN 12
9247 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
9248 /* enum: reserved value - do not use (may indicate alternative interpretation
9249  * of REV field in future)
9250  */
9251 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_RESERVED  0x0
9252 /* enum: Trivial RX PD firmware for early Huntington development (Huntington
9253  * development only)
9254  */
9255 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_FIRST_PKT  0x1
9256 /* enum: RX PD firmware with approximately Siena-compatible behaviour
9257  * (Huntington development only)
9258  */
9259 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_SIENA_COMPAT  0x2
9260 /* enum: Full featured RX PD production firmware */
9261 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_FULL_FEATURED  0x3
9262 /* enum: (deprecated original name for the FULL_FEATURED variant) */
9263 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_VSWITCH  0x3
9264 /* enum: siena_compat variant RX PD firmware using PM rather than MAC
9265  * (Huntington development only)
9266  */
9267 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
9268 /* enum: Low latency RX PD production firmware */
9269 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_LOW_LATENCY  0x5
9270 /* enum: Packed stream RX PD production firmware */
9271 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_PACKED_STREAM  0x6
9272 /* enum: RX PD firmware handling layer 2 only for high packet rate performance
9273  * tests (Medford development only)
9274  */
9275 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_LAYER2_PERF  0x7
9276 /* enum: Rules engine RX PD production firmware */
9277 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_RULES_ENGINE  0x8
9278 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
9279 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
9280 /* enum: RX PD firmware parsing but not filtering network overlay tunnel
9281  * encapsulations (Medford development only)
9282  */
9283 #define MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY  0xf
9284 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_OFST 10
9285 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_LEN 2
9286 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_LBN 0
9287 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_WIDTH 12
9288 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_LBN 12
9289 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
9290 /* enum: reserved value - do not use (may indicate alternative interpretation
9291  * of REV field in future)
9292  */
9293 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_RESERVED  0x0
9294 /* enum: Trivial TX PD firmware for early Huntington development (Huntington
9295  * development only)
9296  */
9297 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_FIRST_PKT  0x1
9298 /* enum: TX PD firmware with approximately Siena-compatible behaviour
9299  * (Huntington development only)
9300  */
9301 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_SIENA_COMPAT  0x2
9302 /* enum: Full featured TX PD production firmware */
9303 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_FULL_FEATURED  0x3
9304 /* enum: (deprecated original name for the FULL_FEATURED variant) */
9305 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_VSWITCH  0x3
9306 /* enum: siena_compat variant TX PD firmware using PM rather than MAC
9307  * (Huntington development only)
9308  */
9309 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
9310 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_LOW_LATENCY  0x5 /* enum */
9311 /* enum: TX PD firmware handling layer 2 only for high packet rate performance
9312  * tests (Medford development only)
9313  */
9314 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_LAYER2_PERF  0x7
9315 /* enum: Rules engine TX PD production firmware */
9316 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_RULES_ENGINE  0x8
9317 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
9318 #define MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
9319 /* Hardware capabilities of NIC */
9320 #define MC_CMD_GET_CAPABILITIES_OUT_HW_CAPABILITIES_OFST 12
9321 #define MC_CMD_GET_CAPABILITIES_OUT_HW_CAPABILITIES_LEN 4
9322 /* Licensed capabilities */
9323 #define MC_CMD_GET_CAPABILITIES_OUT_LICENSE_CAPABILITIES_OFST 16
9324 #define MC_CMD_GET_CAPABILITIES_OUT_LICENSE_CAPABILITIES_LEN 4
9325
9326 /* MC_CMD_GET_CAPABILITIES_V2_IN msgrequest */
9327 #define MC_CMD_GET_CAPABILITIES_V2_IN_LEN 0
9328
9329 /* MC_CMD_GET_CAPABILITIES_V2_OUT msgresponse */
9330 #define MC_CMD_GET_CAPABILITIES_V2_OUT_LEN 72
9331 /* First word of flags. */
9332 #define MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS1_OFST 0
9333 #define MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS1_LEN 4
9334 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VPORT_RECONFIGURE_LBN 3
9335 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VPORT_RECONFIGURE_WIDTH 1
9336 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_STRIPING_LBN 4
9337 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_STRIPING_WIDTH 1
9338 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_QUERY_LBN 5
9339 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_QUERY_WIDTH 1
9340 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
9341 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
9342 #define MC_CMD_GET_CAPABILITIES_V2_OUT_DRV_ATTACH_PREBOOT_LBN 7
9343 #define MC_CMD_GET_CAPABILITIES_V2_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
9344 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_FORCE_EVENT_MERGING_LBN 8
9345 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
9346 #define MC_CMD_GET_CAPABILITIES_V2_OUT_SET_MAC_ENHANCED_LBN 9
9347 #define MC_CMD_GET_CAPABILITIES_V2_OUT_SET_MAC_ENHANCED_WIDTH 1
9348 #define MC_CMD_GET_CAPABILITIES_V2_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
9349 #define MC_CMD_GET_CAPABILITIES_V2_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
9350 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
9351 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
9352 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
9353 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
9354 #define MC_CMD_GET_CAPABILITIES_V2_OUT_ADDITIONAL_RSS_MODES_LBN 13
9355 #define MC_CMD_GET_CAPABILITIES_V2_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
9356 #define MC_CMD_GET_CAPABILITIES_V2_OUT_QBB_LBN 14
9357 #define MC_CMD_GET_CAPABILITIES_V2_OUT_QBB_WIDTH 1
9358 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
9359 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
9360 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_RSS_LIMITED_LBN 16
9361 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_RSS_LIMITED_WIDTH 1
9362 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_LBN 17
9363 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_WIDTH 1
9364 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_INCLUDE_FCS_LBN 18
9365 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_INCLUDE_FCS_WIDTH 1
9366 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VLAN_INSERTION_LBN 19
9367 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VLAN_INSERTION_WIDTH 1
9368 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_VLAN_STRIPPING_LBN 20
9369 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_VLAN_STRIPPING_WIDTH 1
9370 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_LBN 21
9371 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_WIDTH 1
9372 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_0_LBN 22
9373 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_0_WIDTH 1
9374 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_14_LBN 23
9375 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_14_WIDTH 1
9376 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_TIMESTAMP_LBN 24
9377 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_TIMESTAMP_WIDTH 1
9378 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_BATCHING_LBN 25
9379 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_BATCHING_WIDTH 1
9380 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MCAST_FILTER_CHAINING_LBN 26
9381 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MCAST_FILTER_CHAINING_WIDTH 1
9382 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PM_AND_RXDP_COUNTERS_LBN 27
9383 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
9384 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DISABLE_SCATTER_LBN 28
9385 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DISABLE_SCATTER_WIDTH 1
9386 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
9387 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
9388 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_LBN 30
9389 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_WIDTH 1
9390 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VXLAN_NVGRE_LBN 31
9391 #define MC_CMD_GET_CAPABILITIES_V2_OUT_VXLAN_NVGRE_WIDTH 1
9392 /* RxDPCPU firmware id. */
9393 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DPCPU_FW_ID_OFST 4
9394 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DPCPU_FW_ID_LEN 2
9395 /* enum: Standard RXDP firmware */
9396 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP  0x0
9397 /* enum: Low latency RXDP firmware */
9398 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_LOW_LATENCY  0x1
9399 /* enum: Packed stream RXDP firmware */
9400 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_PACKED_STREAM  0x2
9401 /* enum: Rules engine RXDP firmware */
9402 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_RULES_ENGINE  0x5
9403 /* enum: BIST RXDP firmware */
9404 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_BIST  0x10a
9405 /* enum: RXDP Test firmware image 1 */
9406 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH  0x101
9407 /* enum: RXDP Test firmware image 2 */
9408 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD  0x102
9409 /* enum: RXDP Test firmware image 3 */
9410 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST  0x103
9411 /* enum: RXDP Test firmware image 4 */
9412 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE  0x104
9413 /* enum: RXDP Test firmware image 5 */
9414 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_BACKPRESSURE  0x105
9415 /* enum: RXDP Test firmware image 6 */
9416 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_PACKET_EDITS  0x106
9417 /* enum: RXDP Test firmware image 7 */
9418 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_RX_HDR_SPLIT  0x107
9419 /* enum: RXDP Test firmware image 8 */
9420 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_DISABLE_DL  0x108
9421 /* enum: RXDP Test firmware image 9 */
9422 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_DOORBELL_DELAY  0x10b
9423 /* enum: RXDP Test firmware image 10 */
9424 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_SLOW  0x10c
9425 /* TxDPCPU firmware id. */
9426 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DPCPU_FW_ID_OFST 6
9427 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DPCPU_FW_ID_LEN 2
9428 /* enum: Standard TXDP firmware */
9429 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP  0x0
9430 /* enum: Low latency TXDP firmware */
9431 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_LOW_LATENCY  0x1
9432 /* enum: High packet rate TXDP firmware */
9433 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_HIGH_PACKET_RATE  0x3
9434 /* enum: Rules engine TXDP firmware */
9435 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_RULES_ENGINE  0x5
9436 /* enum: BIST TXDP firmware */
9437 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_BIST  0x12d
9438 /* enum: TXDP Test firmware image 1 */
9439 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_TEST_FW_TSO_EDIT  0x101
9440 /* enum: TXDP Test firmware image 2 */
9441 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_TEST_FW_PACKET_EDITS  0x102
9442 /* enum: TXDP CSR bus test firmware */
9443 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_TEST_FW_CSR  0x103
9444 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_OFST 8
9445 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_LEN 2
9446 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_REV_LBN 0
9447 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_REV_WIDTH 12
9448 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_TYPE_LBN 12
9449 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
9450 /* enum: reserved value - do not use (may indicate alternative interpretation
9451  * of REV field in future)
9452  */
9453 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_RESERVED  0x0
9454 /* enum: Trivial RX PD firmware for early Huntington development (Huntington
9455  * development only)
9456  */
9457 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_FIRST_PKT  0x1
9458 /* enum: RX PD firmware with approximately Siena-compatible behaviour
9459  * (Huntington development only)
9460  */
9461 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_SIENA_COMPAT  0x2
9462 /* enum: Full featured RX PD production firmware */
9463 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_FULL_FEATURED  0x3
9464 /* enum: (deprecated original name for the FULL_FEATURED variant) */
9465 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_VSWITCH  0x3
9466 /* enum: siena_compat variant RX PD firmware using PM rather than MAC
9467  * (Huntington development only)
9468  */
9469 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
9470 /* enum: Low latency RX PD production firmware */
9471 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_LOW_LATENCY  0x5
9472 /* enum: Packed stream RX PD production firmware */
9473 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_PACKED_STREAM  0x6
9474 /* enum: RX PD firmware handling layer 2 only for high packet rate performance
9475  * tests (Medford development only)
9476  */
9477 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_LAYER2_PERF  0x7
9478 /* enum: Rules engine RX PD production firmware */
9479 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_RULES_ENGINE  0x8
9480 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
9481 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
9482 /* enum: RX PD firmware parsing but not filtering network overlay tunnel
9483  * encapsulations (Medford development only)
9484  */
9485 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY  0xf
9486 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_OFST 10
9487 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_LEN 2
9488 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_REV_LBN 0
9489 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_REV_WIDTH 12
9490 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_TYPE_LBN 12
9491 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
9492 /* enum: reserved value - do not use (may indicate alternative interpretation
9493  * of REV field in future)
9494  */
9495 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_RESERVED  0x0
9496 /* enum: Trivial TX PD firmware for early Huntington development (Huntington
9497  * development only)
9498  */
9499 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_FIRST_PKT  0x1
9500 /* enum: TX PD firmware with approximately Siena-compatible behaviour
9501  * (Huntington development only)
9502  */
9503 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_SIENA_COMPAT  0x2
9504 /* enum: Full featured TX PD production firmware */
9505 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_FULL_FEATURED  0x3
9506 /* enum: (deprecated original name for the FULL_FEATURED variant) */
9507 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_VSWITCH  0x3
9508 /* enum: siena_compat variant TX PD firmware using PM rather than MAC
9509  * (Huntington development only)
9510  */
9511 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
9512 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_LOW_LATENCY  0x5 /* enum */
9513 /* enum: TX PD firmware handling layer 2 only for high packet rate performance
9514  * tests (Medford development only)
9515  */
9516 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_LAYER2_PERF  0x7
9517 /* enum: Rules engine TX PD production firmware */
9518 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_RULES_ENGINE  0x8
9519 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
9520 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
9521 /* Hardware capabilities of NIC */
9522 #define MC_CMD_GET_CAPABILITIES_V2_OUT_HW_CAPABILITIES_OFST 12
9523 #define MC_CMD_GET_CAPABILITIES_V2_OUT_HW_CAPABILITIES_LEN 4
9524 /* Licensed capabilities */
9525 #define MC_CMD_GET_CAPABILITIES_V2_OUT_LICENSE_CAPABILITIES_OFST 16
9526 #define MC_CMD_GET_CAPABILITIES_V2_OUT_LICENSE_CAPABILITIES_LEN 4
9527 /* Second word of flags. Not present on older firmware (check the length). */
9528 #define MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS2_OFST 20
9529 #define MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS2_LEN 4
9530 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_LBN 0
9531 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_WIDTH 1
9532 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_ENCAP_LBN 1
9533 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_ENCAP_WIDTH 1
9534 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVQ_TIMER_CTRL_LBN 2
9535 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVQ_TIMER_CTRL_WIDTH 1
9536 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVENT_CUT_THROUGH_LBN 3
9537 #define MC_CMD_GET_CAPABILITIES_V2_OUT_EVENT_CUT_THROUGH_WIDTH 1
9538 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_CUT_THROUGH_LBN 4
9539 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_CUT_THROUGH_WIDTH 1
9540 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VFIFO_ULL_MODE_LBN 5
9541 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
9542 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
9543 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
9544 #define MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_V2_LBN 7
9545 #define MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_V2_WIDTH 1
9546 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING_LBN 8
9547 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
9548 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TIMESTAMP_LBN 9
9549 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TIMESTAMP_WIDTH 1
9550 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_SNIFF_LBN 10
9551 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_SNIFF_WIDTH 1
9552 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_SNIFF_LBN 11
9553 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_SNIFF_WIDTH 1
9554 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
9555 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
9556 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_BACKGROUND_LBN 13
9557 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_BACKGROUND_WIDTH 1
9558 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_DB_RETURN_LBN 14
9559 #define MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_DB_RETURN_WIDTH 1
9560 /* Number of FATSOv2 contexts per datapath supported by this NIC. Not present
9561  * on older firmware (check the length).
9562  */
9563 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
9564 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
9565 /* One byte per PF containing the number of the external port assigned to this
9566  * PF, indexed by PF number. Special values indicate that a PF is either not
9567  * present or not assigned.
9568  */
9569 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
9570 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
9571 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
9572 /* enum: The caller is not permitted to access information on this PF. */
9573 #define MC_CMD_GET_CAPABILITIES_V2_OUT_ACCESS_NOT_PERMITTED  0xff
9574 /* enum: PF does not exist. */
9575 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PF_NOT_PRESENT  0xfe
9576 /* enum: PF does exist but is not assigned to any external port. */
9577 #define MC_CMD_GET_CAPABILITIES_V2_OUT_PF_NOT_ASSIGNED  0xfd
9578 /* enum: This value indicates that PF is assigned, but it cannot be expressed
9579  * in this field. It is intended for a possible future situation where a more
9580  * complex scheme of PFs to ports mapping is being used. The future driver
9581  * should look for a new field supporting the new scheme. The current/old
9582  * driver should treat this value as PF_NOT_ASSIGNED.
9583  */
9584 #define MC_CMD_GET_CAPABILITIES_V2_OUT_INCOMPATIBLE_ASSIGNMENT  0xfc
9585 /* One byte per PF containing the number of its VFs, indexed by PF number. A
9586  * special value indicates that a PF is not present.
9587  */
9588 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VFS_PER_PF_OFST 42
9589 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VFS_PER_PF_LEN 1
9590 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VFS_PER_PF_NUM 16
9591 /* enum: The caller is not permitted to access information on this PF. */
9592 /*               MC_CMD_GET_CAPABILITIES_V2_OUT_ACCESS_NOT_PERMITTED  0xff */
9593 /* enum: PF does not exist. */
9594 /*               MC_CMD_GET_CAPABILITIES_V2_OUT_PF_NOT_PRESENT  0xfe */
9595 /* Number of VIs available for each external port */
9596 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VIS_PER_PORT_OFST 58
9597 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VIS_PER_PORT_LEN 2
9598 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VIS_PER_PORT_NUM 4
9599 /* Size of RX descriptor cache expressed as binary logarithm The actual size
9600  * equals (2 ^ RX_DESC_CACHE_SIZE)
9601  */
9602 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DESC_CACHE_SIZE_OFST 66
9603 #define MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DESC_CACHE_SIZE_LEN 1
9604 /* Size of TX descriptor cache expressed as binary logarithm The actual size
9605  * equals (2 ^ TX_DESC_CACHE_SIZE)
9606  */
9607 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DESC_CACHE_SIZE_OFST 67
9608 #define MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DESC_CACHE_SIZE_LEN 1
9609 /* Total number of available PIO buffers */
9610 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_PIO_BUFFS_OFST 68
9611 #define MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_PIO_BUFFS_LEN 2
9612 /* Size of a single PIO buffer */
9613 #define MC_CMD_GET_CAPABILITIES_V2_OUT_SIZE_PIO_BUFF_OFST 70
9614 #define MC_CMD_GET_CAPABILITIES_V2_OUT_SIZE_PIO_BUFF_LEN 2
9615
9616 /* MC_CMD_GET_CAPABILITIES_V3_OUT msgresponse */
9617 #define MC_CMD_GET_CAPABILITIES_V3_OUT_LEN 76
9618 /* First word of flags. */
9619 #define MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS1_OFST 0
9620 #define MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS1_LEN 4
9621 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VPORT_RECONFIGURE_LBN 3
9622 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VPORT_RECONFIGURE_WIDTH 1
9623 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_STRIPING_LBN 4
9624 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_STRIPING_WIDTH 1
9625 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_QUERY_LBN 5
9626 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_QUERY_WIDTH 1
9627 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
9628 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
9629 #define MC_CMD_GET_CAPABILITIES_V3_OUT_DRV_ATTACH_PREBOOT_LBN 7
9630 #define MC_CMD_GET_CAPABILITIES_V3_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
9631 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_FORCE_EVENT_MERGING_LBN 8
9632 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
9633 #define MC_CMD_GET_CAPABILITIES_V3_OUT_SET_MAC_ENHANCED_LBN 9
9634 #define MC_CMD_GET_CAPABILITIES_V3_OUT_SET_MAC_ENHANCED_WIDTH 1
9635 #define MC_CMD_GET_CAPABILITIES_V3_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
9636 #define MC_CMD_GET_CAPABILITIES_V3_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
9637 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
9638 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
9639 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
9640 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
9641 #define MC_CMD_GET_CAPABILITIES_V3_OUT_ADDITIONAL_RSS_MODES_LBN 13
9642 #define MC_CMD_GET_CAPABILITIES_V3_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
9643 #define MC_CMD_GET_CAPABILITIES_V3_OUT_QBB_LBN 14
9644 #define MC_CMD_GET_CAPABILITIES_V3_OUT_QBB_WIDTH 1
9645 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
9646 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
9647 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_RSS_LIMITED_LBN 16
9648 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_RSS_LIMITED_WIDTH 1
9649 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_LBN 17
9650 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_WIDTH 1
9651 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_INCLUDE_FCS_LBN 18
9652 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_INCLUDE_FCS_WIDTH 1
9653 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VLAN_INSERTION_LBN 19
9654 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VLAN_INSERTION_WIDTH 1
9655 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_VLAN_STRIPPING_LBN 20
9656 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_VLAN_STRIPPING_WIDTH 1
9657 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_LBN 21
9658 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_WIDTH 1
9659 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_0_LBN 22
9660 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_0_WIDTH 1
9661 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_14_LBN 23
9662 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_14_WIDTH 1
9663 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_TIMESTAMP_LBN 24
9664 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_TIMESTAMP_WIDTH 1
9665 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_BATCHING_LBN 25
9666 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_BATCHING_WIDTH 1
9667 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MCAST_FILTER_CHAINING_LBN 26
9668 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MCAST_FILTER_CHAINING_WIDTH 1
9669 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PM_AND_RXDP_COUNTERS_LBN 27
9670 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
9671 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DISABLE_SCATTER_LBN 28
9672 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DISABLE_SCATTER_WIDTH 1
9673 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
9674 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
9675 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_LBN 30
9676 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_WIDTH 1
9677 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VXLAN_NVGRE_LBN 31
9678 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VXLAN_NVGRE_WIDTH 1
9679 /* RxDPCPU firmware id. */
9680 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DPCPU_FW_ID_OFST 4
9681 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DPCPU_FW_ID_LEN 2
9682 /* enum: Standard RXDP firmware */
9683 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP  0x0
9684 /* enum: Low latency RXDP firmware */
9685 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_LOW_LATENCY  0x1
9686 /* enum: Packed stream RXDP firmware */
9687 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_PACKED_STREAM  0x2
9688 /* enum: Rules engine RXDP firmware */
9689 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_RULES_ENGINE  0x5
9690 /* enum: BIST RXDP firmware */
9691 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_BIST  0x10a
9692 /* enum: RXDP Test firmware image 1 */
9693 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH  0x101
9694 /* enum: RXDP Test firmware image 2 */
9695 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD  0x102
9696 /* enum: RXDP Test firmware image 3 */
9697 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST  0x103
9698 /* enum: RXDP Test firmware image 4 */
9699 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE  0x104
9700 /* enum: RXDP Test firmware image 5 */
9701 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_BACKPRESSURE  0x105
9702 /* enum: RXDP Test firmware image 6 */
9703 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_PACKET_EDITS  0x106
9704 /* enum: RXDP Test firmware image 7 */
9705 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_RX_HDR_SPLIT  0x107
9706 /* enum: RXDP Test firmware image 8 */
9707 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_DISABLE_DL  0x108
9708 /* enum: RXDP Test firmware image 9 */
9709 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_DOORBELL_DELAY  0x10b
9710 /* enum: RXDP Test firmware image 10 */
9711 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_SLOW  0x10c
9712 /* TxDPCPU firmware id. */
9713 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DPCPU_FW_ID_OFST 6
9714 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DPCPU_FW_ID_LEN 2
9715 /* enum: Standard TXDP firmware */
9716 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP  0x0
9717 /* enum: Low latency TXDP firmware */
9718 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_LOW_LATENCY  0x1
9719 /* enum: High packet rate TXDP firmware */
9720 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_HIGH_PACKET_RATE  0x3
9721 /* enum: Rules engine TXDP firmware */
9722 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_RULES_ENGINE  0x5
9723 /* enum: BIST TXDP firmware */
9724 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_BIST  0x12d
9725 /* enum: TXDP Test firmware image 1 */
9726 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_TEST_FW_TSO_EDIT  0x101
9727 /* enum: TXDP Test firmware image 2 */
9728 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_TEST_FW_PACKET_EDITS  0x102
9729 /* enum: TXDP CSR bus test firmware */
9730 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_TEST_FW_CSR  0x103
9731 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_OFST 8
9732 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_LEN 2
9733 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_REV_LBN 0
9734 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_REV_WIDTH 12
9735 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_TYPE_LBN 12
9736 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
9737 /* enum: reserved value - do not use (may indicate alternative interpretation
9738  * of REV field in future)
9739  */
9740 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_RESERVED  0x0
9741 /* enum: Trivial RX PD firmware for early Huntington development (Huntington
9742  * development only)
9743  */
9744 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_FIRST_PKT  0x1
9745 /* enum: RX PD firmware with approximately Siena-compatible behaviour
9746  * (Huntington development only)
9747  */
9748 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_SIENA_COMPAT  0x2
9749 /* enum: Full featured RX PD production firmware */
9750 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_FULL_FEATURED  0x3
9751 /* enum: (deprecated original name for the FULL_FEATURED variant) */
9752 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_VSWITCH  0x3
9753 /* enum: siena_compat variant RX PD firmware using PM rather than MAC
9754  * (Huntington development only)
9755  */
9756 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
9757 /* enum: Low latency RX PD production firmware */
9758 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_LOW_LATENCY  0x5
9759 /* enum: Packed stream RX PD production firmware */
9760 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_PACKED_STREAM  0x6
9761 /* enum: RX PD firmware handling layer 2 only for high packet rate performance
9762  * tests (Medford development only)
9763  */
9764 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_LAYER2_PERF  0x7
9765 /* enum: Rules engine RX PD production firmware */
9766 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_RULES_ENGINE  0x8
9767 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
9768 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
9769 /* enum: RX PD firmware parsing but not filtering network overlay tunnel
9770  * encapsulations (Medford development only)
9771  */
9772 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY  0xf
9773 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_OFST 10
9774 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_LEN 2
9775 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_REV_LBN 0
9776 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_REV_WIDTH 12
9777 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_TYPE_LBN 12
9778 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
9779 /* enum: reserved value - do not use (may indicate alternative interpretation
9780  * of REV field in future)
9781  */
9782 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_RESERVED  0x0
9783 /* enum: Trivial TX PD firmware for early Huntington development (Huntington
9784  * development only)
9785  */
9786 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_FIRST_PKT  0x1
9787 /* enum: TX PD firmware with approximately Siena-compatible behaviour
9788  * (Huntington development only)
9789  */
9790 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_SIENA_COMPAT  0x2
9791 /* enum: Full featured TX PD production firmware */
9792 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_FULL_FEATURED  0x3
9793 /* enum: (deprecated original name for the FULL_FEATURED variant) */
9794 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_VSWITCH  0x3
9795 /* enum: siena_compat variant TX PD firmware using PM rather than MAC
9796  * (Huntington development only)
9797  */
9798 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
9799 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_LOW_LATENCY  0x5 /* enum */
9800 /* enum: TX PD firmware handling layer 2 only for high packet rate performance
9801  * tests (Medford development only)
9802  */
9803 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_LAYER2_PERF  0x7
9804 /* enum: Rules engine TX PD production firmware */
9805 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_RULES_ENGINE  0x8
9806 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
9807 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
9808 /* Hardware capabilities of NIC */
9809 #define MC_CMD_GET_CAPABILITIES_V3_OUT_HW_CAPABILITIES_OFST 12
9810 #define MC_CMD_GET_CAPABILITIES_V3_OUT_HW_CAPABILITIES_LEN 4
9811 /* Licensed capabilities */
9812 #define MC_CMD_GET_CAPABILITIES_V3_OUT_LICENSE_CAPABILITIES_OFST 16
9813 #define MC_CMD_GET_CAPABILITIES_V3_OUT_LICENSE_CAPABILITIES_LEN 4
9814 /* Second word of flags. Not present on older firmware (check the length). */
9815 #define MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS2_OFST 20
9816 #define MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS2_LEN 4
9817 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_LBN 0
9818 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_WIDTH 1
9819 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_ENCAP_LBN 1
9820 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_ENCAP_WIDTH 1
9821 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVQ_TIMER_CTRL_LBN 2
9822 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVQ_TIMER_CTRL_WIDTH 1
9823 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVENT_CUT_THROUGH_LBN 3
9824 #define MC_CMD_GET_CAPABILITIES_V3_OUT_EVENT_CUT_THROUGH_WIDTH 1
9825 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_CUT_THROUGH_LBN 4
9826 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_CUT_THROUGH_WIDTH 1
9827 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VFIFO_ULL_MODE_LBN 5
9828 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
9829 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
9830 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
9831 #define MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_V2_LBN 7
9832 #define MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_V2_WIDTH 1
9833 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_TIMESTAMPING_LBN 8
9834 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
9835 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TIMESTAMP_LBN 9
9836 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TIMESTAMP_WIDTH 1
9837 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_SNIFF_LBN 10
9838 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_SNIFF_WIDTH 1
9839 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_SNIFF_LBN 11
9840 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_SNIFF_WIDTH 1
9841 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
9842 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
9843 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_BACKGROUND_LBN 13
9844 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_BACKGROUND_WIDTH 1
9845 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_DB_RETURN_LBN 14
9846 #define MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_DB_RETURN_WIDTH 1
9847 /* Number of FATSOv2 contexts per datapath supported by this NIC. Not present
9848  * on older firmware (check the length).
9849  */
9850 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
9851 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
9852 /* One byte per PF containing the number of the external port assigned to this
9853  * PF, indexed by PF number. Special values indicate that a PF is either not
9854  * present or not assigned.
9855  */
9856 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
9857 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
9858 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
9859 /* enum: The caller is not permitted to access information on this PF. */
9860 #define MC_CMD_GET_CAPABILITIES_V3_OUT_ACCESS_NOT_PERMITTED  0xff
9861 /* enum: PF does not exist. */
9862 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PF_NOT_PRESENT  0xfe
9863 /* enum: PF does exist but is not assigned to any external port. */
9864 #define MC_CMD_GET_CAPABILITIES_V3_OUT_PF_NOT_ASSIGNED  0xfd
9865 /* enum: This value indicates that PF is assigned, but it cannot be expressed
9866  * in this field. It is intended for a possible future situation where a more
9867  * complex scheme of PFs to ports mapping is being used. The future driver
9868  * should look for a new field supporting the new scheme. The current/old
9869  * driver should treat this value as PF_NOT_ASSIGNED.
9870  */
9871 #define MC_CMD_GET_CAPABILITIES_V3_OUT_INCOMPATIBLE_ASSIGNMENT  0xfc
9872 /* One byte per PF containing the number of its VFs, indexed by PF number. A
9873  * special value indicates that a PF is not present.
9874  */
9875 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VFS_PER_PF_OFST 42
9876 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VFS_PER_PF_LEN 1
9877 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VFS_PER_PF_NUM 16
9878 /* enum: The caller is not permitted to access information on this PF. */
9879 /*               MC_CMD_GET_CAPABILITIES_V3_OUT_ACCESS_NOT_PERMITTED  0xff */
9880 /* enum: PF does not exist. */
9881 /*               MC_CMD_GET_CAPABILITIES_V3_OUT_PF_NOT_PRESENT  0xfe */
9882 /* Number of VIs available for each external port */
9883 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VIS_PER_PORT_OFST 58
9884 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VIS_PER_PORT_LEN 2
9885 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VIS_PER_PORT_NUM 4
9886 /* Size of RX descriptor cache expressed as binary logarithm The actual size
9887  * equals (2 ^ RX_DESC_CACHE_SIZE)
9888  */
9889 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DESC_CACHE_SIZE_OFST 66
9890 #define MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DESC_CACHE_SIZE_LEN 1
9891 /* Size of TX descriptor cache expressed as binary logarithm The actual size
9892  * equals (2 ^ TX_DESC_CACHE_SIZE)
9893  */
9894 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DESC_CACHE_SIZE_OFST 67
9895 #define MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DESC_CACHE_SIZE_LEN 1
9896 /* Total number of available PIO buffers */
9897 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_PIO_BUFFS_OFST 68
9898 #define MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_PIO_BUFFS_LEN 2
9899 /* Size of a single PIO buffer */
9900 #define MC_CMD_GET_CAPABILITIES_V3_OUT_SIZE_PIO_BUFF_OFST 70
9901 #define MC_CMD_GET_CAPABILITIES_V3_OUT_SIZE_PIO_BUFF_LEN 2
9902 /* On chips later than Medford the amount of address space assigned to each VI
9903  * is configurable. This is a global setting that the driver must query to
9904  * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
9905  * with 8k VI windows.
9906  */
9907 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_OFST 72
9908 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_LEN 1
9909 /* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
9910  * CTPIO is not mapped.
9911  */
9912 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_8K   0x0
9913 /* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
9914 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_16K  0x1
9915 /* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
9916 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_64K  0x2
9917 /* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
9918  * (SF-115995-SW) in the present configuration of firmware and port mode.
9919  */
9920 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
9921 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
9922 /* Number of buffers per adapter that can be used for VFIFO Stuffing
9923  * (SF-115995-SW) in the present configuration of firmware and port mode.
9924  */
9925 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
9926 #define MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
9927
9928 /* MC_CMD_GET_CAPABILITIES_V4_OUT msgresponse */
9929 #define MC_CMD_GET_CAPABILITIES_V4_OUT_LEN 78
9930 /* First word of flags. */
9931 #define MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS1_OFST 0
9932 #define MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS1_LEN 4
9933 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VPORT_RECONFIGURE_LBN 3
9934 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VPORT_RECONFIGURE_WIDTH 1
9935 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_STRIPING_LBN 4
9936 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_STRIPING_WIDTH 1
9937 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_QUERY_LBN 5
9938 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_QUERY_WIDTH 1
9939 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
9940 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
9941 #define MC_CMD_GET_CAPABILITIES_V4_OUT_DRV_ATTACH_PREBOOT_LBN 7
9942 #define MC_CMD_GET_CAPABILITIES_V4_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
9943 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_FORCE_EVENT_MERGING_LBN 8
9944 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
9945 #define MC_CMD_GET_CAPABILITIES_V4_OUT_SET_MAC_ENHANCED_LBN 9
9946 #define MC_CMD_GET_CAPABILITIES_V4_OUT_SET_MAC_ENHANCED_WIDTH 1
9947 #define MC_CMD_GET_CAPABILITIES_V4_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
9948 #define MC_CMD_GET_CAPABILITIES_V4_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
9949 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
9950 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
9951 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
9952 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
9953 #define MC_CMD_GET_CAPABILITIES_V4_OUT_ADDITIONAL_RSS_MODES_LBN 13
9954 #define MC_CMD_GET_CAPABILITIES_V4_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
9955 #define MC_CMD_GET_CAPABILITIES_V4_OUT_QBB_LBN 14
9956 #define MC_CMD_GET_CAPABILITIES_V4_OUT_QBB_WIDTH 1
9957 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
9958 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
9959 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_RSS_LIMITED_LBN 16
9960 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_RSS_LIMITED_WIDTH 1
9961 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_LBN 17
9962 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_WIDTH 1
9963 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_INCLUDE_FCS_LBN 18
9964 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_INCLUDE_FCS_WIDTH 1
9965 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VLAN_INSERTION_LBN 19
9966 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VLAN_INSERTION_WIDTH 1
9967 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_VLAN_STRIPPING_LBN 20
9968 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_VLAN_STRIPPING_WIDTH 1
9969 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_LBN 21
9970 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_WIDTH 1
9971 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_0_LBN 22
9972 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_0_WIDTH 1
9973 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_14_LBN 23
9974 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_14_WIDTH 1
9975 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_TIMESTAMP_LBN 24
9976 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_TIMESTAMP_WIDTH 1
9977 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_BATCHING_LBN 25
9978 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_BATCHING_WIDTH 1
9979 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MCAST_FILTER_CHAINING_LBN 26
9980 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MCAST_FILTER_CHAINING_WIDTH 1
9981 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PM_AND_RXDP_COUNTERS_LBN 27
9982 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
9983 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DISABLE_SCATTER_LBN 28
9984 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DISABLE_SCATTER_WIDTH 1
9985 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
9986 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
9987 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_LBN 30
9988 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_WIDTH 1
9989 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VXLAN_NVGRE_LBN 31
9990 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VXLAN_NVGRE_WIDTH 1
9991 /* RxDPCPU firmware id. */
9992 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DPCPU_FW_ID_OFST 4
9993 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DPCPU_FW_ID_LEN 2
9994 /* enum: Standard RXDP firmware */
9995 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP  0x0
9996 /* enum: Low latency RXDP firmware */
9997 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_LOW_LATENCY  0x1
9998 /* enum: Packed stream RXDP firmware */
9999 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_PACKED_STREAM  0x2
10000 /* enum: Rules engine RXDP firmware */
10001 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_RULES_ENGINE  0x5
10002 /* enum: BIST RXDP firmware */
10003 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_BIST  0x10a
10004 /* enum: RXDP Test firmware image 1 */
10005 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH  0x101
10006 /* enum: RXDP Test firmware image 2 */
10007 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD  0x102
10008 /* enum: RXDP Test firmware image 3 */
10009 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST  0x103
10010 /* enum: RXDP Test firmware image 4 */
10011 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE  0x104
10012 /* enum: RXDP Test firmware image 5 */
10013 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_BACKPRESSURE  0x105
10014 /* enum: RXDP Test firmware image 6 */
10015 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_PACKET_EDITS  0x106
10016 /* enum: RXDP Test firmware image 7 */
10017 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_RX_HDR_SPLIT  0x107
10018 /* enum: RXDP Test firmware image 8 */
10019 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_DISABLE_DL  0x108
10020 /* enum: RXDP Test firmware image 9 */
10021 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_DOORBELL_DELAY  0x10b
10022 /* enum: RXDP Test firmware image 10 */
10023 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_SLOW  0x10c
10024 /* TxDPCPU firmware id. */
10025 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DPCPU_FW_ID_OFST 6
10026 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DPCPU_FW_ID_LEN 2
10027 /* enum: Standard TXDP firmware */
10028 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP  0x0
10029 /* enum: Low latency TXDP firmware */
10030 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_LOW_LATENCY  0x1
10031 /* enum: High packet rate TXDP firmware */
10032 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_HIGH_PACKET_RATE  0x3
10033 /* enum: Rules engine TXDP firmware */
10034 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_RULES_ENGINE  0x5
10035 /* enum: BIST TXDP firmware */
10036 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_BIST  0x12d
10037 /* enum: TXDP Test firmware image 1 */
10038 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_TEST_FW_TSO_EDIT  0x101
10039 /* enum: TXDP Test firmware image 2 */
10040 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_TEST_FW_PACKET_EDITS  0x102
10041 /* enum: TXDP CSR bus test firmware */
10042 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_TEST_FW_CSR  0x103
10043 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_OFST 8
10044 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_LEN 2
10045 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_REV_LBN 0
10046 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_REV_WIDTH 12
10047 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_TYPE_LBN 12
10048 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
10049 /* enum: reserved value - do not use (may indicate alternative interpretation
10050  * of REV field in future)
10051  */
10052 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_RESERVED  0x0
10053 /* enum: Trivial RX PD firmware for early Huntington development (Huntington
10054  * development only)
10055  */
10056 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_FIRST_PKT  0x1
10057 /* enum: RX PD firmware with approximately Siena-compatible behaviour
10058  * (Huntington development only)
10059  */
10060 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_SIENA_COMPAT  0x2
10061 /* enum: Full featured RX PD production firmware */
10062 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_FULL_FEATURED  0x3
10063 /* enum: (deprecated original name for the FULL_FEATURED variant) */
10064 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_VSWITCH  0x3
10065 /* enum: siena_compat variant RX PD firmware using PM rather than MAC
10066  * (Huntington development only)
10067  */
10068 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
10069 /* enum: Low latency RX PD production firmware */
10070 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_LOW_LATENCY  0x5
10071 /* enum: Packed stream RX PD production firmware */
10072 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_PACKED_STREAM  0x6
10073 /* enum: RX PD firmware handling layer 2 only for high packet rate performance
10074  * tests (Medford development only)
10075  */
10076 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_LAYER2_PERF  0x7
10077 /* enum: Rules engine RX PD production firmware */
10078 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_RULES_ENGINE  0x8
10079 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
10080 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
10081 /* enum: RX PD firmware parsing but not filtering network overlay tunnel
10082  * encapsulations (Medford development only)
10083  */
10084 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY  0xf
10085 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_OFST 10
10086 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_LEN 2
10087 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_REV_LBN 0
10088 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_REV_WIDTH 12
10089 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_TYPE_LBN 12
10090 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
10091 /* enum: reserved value - do not use (may indicate alternative interpretation
10092  * of REV field in future)
10093  */
10094 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_RESERVED  0x0
10095 /* enum: Trivial TX PD firmware for early Huntington development (Huntington
10096  * development only)
10097  */
10098 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_FIRST_PKT  0x1
10099 /* enum: TX PD firmware with approximately Siena-compatible behaviour
10100  * (Huntington development only)
10101  */
10102 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_SIENA_COMPAT  0x2
10103 /* enum: Full featured TX PD production firmware */
10104 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_FULL_FEATURED  0x3
10105 /* enum: (deprecated original name for the FULL_FEATURED variant) */
10106 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_VSWITCH  0x3
10107 /* enum: siena_compat variant TX PD firmware using PM rather than MAC
10108  * (Huntington development only)
10109  */
10110 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM  0x4
10111 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_LOW_LATENCY  0x5 /* enum */
10112 /* enum: TX PD firmware handling layer 2 only for high packet rate performance
10113  * tests (Medford development only)
10114  */
10115 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_LAYER2_PERF  0x7
10116 /* enum: Rules engine TX PD production firmware */
10117 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_RULES_ENGINE  0x8
10118 /* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
10119 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE  0xe
10120 /* Hardware capabilities of NIC */
10121 #define MC_CMD_GET_CAPABILITIES_V4_OUT_HW_CAPABILITIES_OFST 12
10122 #define MC_CMD_GET_CAPABILITIES_V4_OUT_HW_CAPABILITIES_LEN 4
10123 /* Licensed capabilities */
10124 #define MC_CMD_GET_CAPABILITIES_V4_OUT_LICENSE_CAPABILITIES_OFST 16
10125 #define MC_CMD_GET_CAPABILITIES_V4_OUT_LICENSE_CAPABILITIES_LEN 4
10126 /* Second word of flags. Not present on older firmware (check the length). */
10127 #define MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS2_OFST 20
10128 #define MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS2_LEN 4
10129 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_LBN 0
10130 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_WIDTH 1
10131 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_ENCAP_LBN 1
10132 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_ENCAP_WIDTH 1
10133 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVQ_TIMER_CTRL_LBN 2
10134 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVQ_TIMER_CTRL_WIDTH 1
10135 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVENT_CUT_THROUGH_LBN 3
10136 #define MC_CMD_GET_CAPABILITIES_V4_OUT_EVENT_CUT_THROUGH_WIDTH 1
10137 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_CUT_THROUGH_LBN 4
10138 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_CUT_THROUGH_WIDTH 1
10139 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VFIFO_ULL_MODE_LBN 5
10140 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
10141 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
10142 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
10143 #define MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_V2_LBN 7
10144 #define MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_V2_WIDTH 1
10145 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_TIMESTAMPING_LBN 8
10146 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
10147 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TIMESTAMP_LBN 9
10148 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TIMESTAMP_WIDTH 1
10149 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_SNIFF_LBN 10
10150 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_SNIFF_WIDTH 1
10151 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_SNIFF_LBN 11
10152 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_SNIFF_WIDTH 1
10153 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
10154 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
10155 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_BACKGROUND_LBN 13
10156 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_BACKGROUND_WIDTH 1
10157 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_DB_RETURN_LBN 14
10158 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_DB_RETURN_WIDTH 1
10159 /* Number of FATSOv2 contexts per datapath supported by this NIC. Not present
10160  * on older firmware (check the length).
10161  */
10162 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
10163 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
10164 /* One byte per PF containing the number of the external port assigned to this
10165  * PF, indexed by PF number. Special values indicate that a PF is either not
10166  * present or not assigned.
10167  */
10168 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
10169 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
10170 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
10171 /* enum: The caller is not permitted to access information on this PF. */
10172 #define MC_CMD_GET_CAPABILITIES_V4_OUT_ACCESS_NOT_PERMITTED  0xff
10173 /* enum: PF does not exist. */
10174 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PF_NOT_PRESENT  0xfe
10175 /* enum: PF does exist but is not assigned to any external port. */
10176 #define MC_CMD_GET_CAPABILITIES_V4_OUT_PF_NOT_ASSIGNED  0xfd
10177 /* enum: This value indicates that PF is assigned, but it cannot be expressed
10178  * in this field. It is intended for a possible future situation where a more
10179  * complex scheme of PFs to ports mapping is being used. The future driver
10180  * should look for a new field supporting the new scheme. The current/old
10181  * driver should treat this value as PF_NOT_ASSIGNED.
10182  */
10183 #define MC_CMD_GET_CAPABILITIES_V4_OUT_INCOMPATIBLE_ASSIGNMENT  0xfc
10184 /* One byte per PF containing the number of its VFs, indexed by PF number. A
10185  * special value indicates that a PF is not present.
10186  */
10187 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VFS_PER_PF_OFST 42
10188 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VFS_PER_PF_LEN 1
10189 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VFS_PER_PF_NUM 16
10190 /* enum: The caller is not permitted to access information on this PF. */
10191 /*               MC_CMD_GET_CAPABILITIES_V4_OUT_ACCESS_NOT_PERMITTED  0xff */
10192 /* enum: PF does not exist. */
10193 /*               MC_CMD_GET_CAPABILITIES_V4_OUT_PF_NOT_PRESENT  0xfe */
10194 /* Number of VIs available for each external port */
10195 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VIS_PER_PORT_OFST 58
10196 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VIS_PER_PORT_LEN 2
10197 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VIS_PER_PORT_NUM 4
10198 /* Size of RX descriptor cache expressed as binary logarithm The actual size
10199  * equals (2 ^ RX_DESC_CACHE_SIZE)
10200  */
10201 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DESC_CACHE_SIZE_OFST 66
10202 #define MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DESC_CACHE_SIZE_LEN 1
10203 /* Size of TX descriptor cache expressed as binary logarithm The actual size
10204  * equals (2 ^ TX_DESC_CACHE_SIZE)
10205  */
10206 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DESC_CACHE_SIZE_OFST 67
10207 #define MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DESC_CACHE_SIZE_LEN 1
10208 /* Total number of available PIO buffers */
10209 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_PIO_BUFFS_OFST 68
10210 #define MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_PIO_BUFFS_LEN 2
10211 /* Size of a single PIO buffer */
10212 #define MC_CMD_GET_CAPABILITIES_V4_OUT_SIZE_PIO_BUFF_OFST 70
10213 #define MC_CMD_GET_CAPABILITIES_V4_OUT_SIZE_PIO_BUFF_LEN 2
10214 /* On chips later than Medford the amount of address space assigned to each VI
10215  * is configurable. This is a global setting that the driver must query to
10216  * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
10217  * with 8k VI windows.
10218  */
10219 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_OFST 72
10220 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_LEN 1
10221 /* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
10222  * CTPIO is not mapped.
10223  */
10224 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_8K   0x0
10225 /* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
10226 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_16K  0x1
10227 /* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
10228 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_64K  0x2
10229 /* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
10230  * (SF-115995-SW) in the present configuration of firmware and port mode.
10231  */
10232 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
10233 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
10234 /* Number of buffers per adapter that can be used for VFIFO Stuffing
10235  * (SF-115995-SW) in the present configuration of firmware and port mode.
10236  */
10237 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
10238 #define MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
10239 /* Entry count in the MAC stats array, including the final GENERATION_END
10240  * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
10241  * hold at least this many 64-bit stats values, if they wish to receive all
10242  * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
10243  * stats array returned will be truncated.
10244  */
10245 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_NUM_STATS_OFST 76
10246 #define MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_NUM_STATS_LEN 2
10247
10248
10249 /***********************************/
10250 /* MC_CMD_V2_EXTN
10251  * Encapsulation for a v2 extended command
10252  */
10253 #define MC_CMD_V2_EXTN 0x7f
10254
10255 /* MC_CMD_V2_EXTN_IN msgrequest */
10256 #define MC_CMD_V2_EXTN_IN_LEN 4
10257 /* the extended command number */
10258 #define MC_CMD_V2_EXTN_IN_EXTENDED_CMD_LBN 0
10259 #define MC_CMD_V2_EXTN_IN_EXTENDED_CMD_WIDTH 15
10260 #define MC_CMD_V2_EXTN_IN_UNUSED_LBN 15
10261 #define MC_CMD_V2_EXTN_IN_UNUSED_WIDTH 1
10262 /* the actual length of the encapsulated command (which is not in the v1
10263  * header)
10264  */
10265 #define MC_CMD_V2_EXTN_IN_ACTUAL_LEN_LBN 16
10266 #define MC_CMD_V2_EXTN_IN_ACTUAL_LEN_WIDTH 10
10267 #define MC_CMD_V2_EXTN_IN_UNUSED2_LBN 26
10268 #define MC_CMD_V2_EXTN_IN_UNUSED2_WIDTH 2
10269 /* Type of command/response */
10270 #define MC_CMD_V2_EXTN_IN_MESSAGE_TYPE_LBN 28
10271 #define MC_CMD_V2_EXTN_IN_MESSAGE_TYPE_WIDTH 4
10272 /* enum: MCDI command directed to or response originating from the MC. */
10273 #define MC_CMD_V2_EXTN_IN_MCDI_MESSAGE_TYPE_MC  0x0
10274 /* enum: MCDI command directed to a TSA controller. MCDI responses of this type
10275  * are not defined.
10276  */
10277 #define MC_CMD_V2_EXTN_IN_MCDI_MESSAGE_TYPE_TSA  0x1
10278
10279
10280 /***********************************/
10281 /* MC_CMD_TCM_BUCKET_ALLOC
10282  * Allocate a pacer bucket (for qau rp or a snapper test)
10283  */
10284 #define MC_CMD_TCM_BUCKET_ALLOC 0xb2
10285 #undef  MC_CMD_0xb2_PRIVILEGE_CTG
10286
10287 #define MC_CMD_0xb2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10288
10289 /* MC_CMD_TCM_BUCKET_ALLOC_IN msgrequest */
10290 #define MC_CMD_TCM_BUCKET_ALLOC_IN_LEN 0
10291
10292 /* MC_CMD_TCM_BUCKET_ALLOC_OUT msgresponse */
10293 #define MC_CMD_TCM_BUCKET_ALLOC_OUT_LEN 4
10294 /* the bucket id */
10295 #define MC_CMD_TCM_BUCKET_ALLOC_OUT_BUCKET_OFST 0
10296 #define MC_CMD_TCM_BUCKET_ALLOC_OUT_BUCKET_LEN 4
10297
10298
10299 /***********************************/
10300 /* MC_CMD_TCM_BUCKET_FREE
10301  * Free a pacer bucket
10302  */
10303 #define MC_CMD_TCM_BUCKET_FREE 0xb3
10304 #undef  MC_CMD_0xb3_PRIVILEGE_CTG
10305
10306 #define MC_CMD_0xb3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10307
10308 /* MC_CMD_TCM_BUCKET_FREE_IN msgrequest */
10309 #define MC_CMD_TCM_BUCKET_FREE_IN_LEN 4
10310 /* the bucket id */
10311 #define MC_CMD_TCM_BUCKET_FREE_IN_BUCKET_OFST 0
10312 #define MC_CMD_TCM_BUCKET_FREE_IN_BUCKET_LEN 4
10313
10314 /* MC_CMD_TCM_BUCKET_FREE_OUT msgresponse */
10315 #define MC_CMD_TCM_BUCKET_FREE_OUT_LEN 0
10316
10317
10318 /***********************************/
10319 /* MC_CMD_TCM_BUCKET_INIT
10320  * Initialise pacer bucket with a given rate
10321  */
10322 #define MC_CMD_TCM_BUCKET_INIT 0xb4
10323 #undef  MC_CMD_0xb4_PRIVILEGE_CTG
10324
10325 #define MC_CMD_0xb4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10326
10327 /* MC_CMD_TCM_BUCKET_INIT_IN msgrequest */
10328 #define MC_CMD_TCM_BUCKET_INIT_IN_LEN 8
10329 /* the bucket id */
10330 #define MC_CMD_TCM_BUCKET_INIT_IN_BUCKET_OFST 0
10331 #define MC_CMD_TCM_BUCKET_INIT_IN_BUCKET_LEN 4
10332 /* the rate in mbps */
10333 #define MC_CMD_TCM_BUCKET_INIT_IN_RATE_OFST 4
10334 #define MC_CMD_TCM_BUCKET_INIT_IN_RATE_LEN 4
10335
10336 /* MC_CMD_TCM_BUCKET_INIT_EXT_IN msgrequest */
10337 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_LEN 12
10338 /* the bucket id */
10339 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_BUCKET_OFST 0
10340 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_BUCKET_LEN 4
10341 /* the rate in mbps */
10342 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_RATE_OFST 4
10343 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_RATE_LEN 4
10344 /* the desired maximum fill level */
10345 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_MAX_FILL_OFST 8
10346 #define MC_CMD_TCM_BUCKET_INIT_EXT_IN_MAX_FILL_LEN 4
10347
10348 /* MC_CMD_TCM_BUCKET_INIT_OUT msgresponse */
10349 #define MC_CMD_TCM_BUCKET_INIT_OUT_LEN 0
10350
10351
10352 /***********************************/
10353 /* MC_CMD_TCM_TXQ_INIT
10354  * Initialise txq in pacer with given options or set options
10355  */
10356 #define MC_CMD_TCM_TXQ_INIT 0xb5
10357 #undef  MC_CMD_0xb5_PRIVILEGE_CTG
10358
10359 #define MC_CMD_0xb5_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10360
10361 /* MC_CMD_TCM_TXQ_INIT_IN msgrequest */
10362 #define MC_CMD_TCM_TXQ_INIT_IN_LEN 28
10363 /* the txq id */
10364 #define MC_CMD_TCM_TXQ_INIT_IN_QID_OFST 0
10365 #define MC_CMD_TCM_TXQ_INIT_IN_QID_LEN 4
10366 /* the static priority associated with the txq */
10367 #define MC_CMD_TCM_TXQ_INIT_IN_LABEL_OFST 4
10368 #define MC_CMD_TCM_TXQ_INIT_IN_LABEL_LEN 4
10369 /* bitmask of the priority queues this txq is inserted into when inserted. */
10370 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAGS_OFST 8
10371 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAGS_LEN 4
10372 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_GUARANTEED_LBN 0
10373 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_GUARANTEED_WIDTH 1
10374 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_NORMAL_LBN 1
10375 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_NORMAL_WIDTH 1
10376 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_LOW_LBN 2
10377 #define MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_LOW_WIDTH 1
10378 /* the reaction point (RP) bucket */
10379 #define MC_CMD_TCM_TXQ_INIT_IN_RP_BKT_OFST 12
10380 #define MC_CMD_TCM_TXQ_INIT_IN_RP_BKT_LEN 4
10381 /* an already reserved bucket (typically set to bucket associated with outer
10382  * vswitch)
10383  */
10384 #define MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT1_OFST 16
10385 #define MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT1_LEN 4
10386 /* an already reserved bucket (typically set to bucket associated with inner
10387  * vswitch)
10388  */
10389 #define MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT2_OFST 20
10390 #define MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT2_LEN 4
10391 /* the min bucket (typically for ETS/minimum bandwidth) */
10392 #define MC_CMD_TCM_TXQ_INIT_IN_MIN_BKT_OFST 24
10393 #define MC_CMD_TCM_TXQ_INIT_IN_MIN_BKT_LEN 4
10394
10395 /* MC_CMD_TCM_TXQ_INIT_EXT_IN msgrequest */
10396 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_LEN 32
10397 /* the txq id */
10398 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_QID_OFST 0
10399 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_QID_LEN 4
10400 /* the static priority associated with the txq */
10401 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_NORMAL_OFST 4
10402 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_NORMAL_LEN 4
10403 /* bitmask of the priority queues this txq is inserted into when inserted. */
10404 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAGS_OFST 8
10405 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAGS_LEN 4
10406 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_GUARANTEED_LBN 0
10407 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_GUARANTEED_WIDTH 1
10408 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_NORMAL_LBN 1
10409 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_NORMAL_WIDTH 1
10410 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_LOW_LBN 2
10411 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_LOW_WIDTH 1
10412 /* the reaction point (RP) bucket */
10413 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_RP_BKT_OFST 12
10414 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_RP_BKT_LEN 4
10415 /* an already reserved bucket (typically set to bucket associated with outer
10416  * vswitch)
10417  */
10418 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT1_OFST 16
10419 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT1_LEN 4
10420 /* an already reserved bucket (typically set to bucket associated with inner
10421  * vswitch)
10422  */
10423 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT2_OFST 20
10424 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT2_LEN 4
10425 /* the min bucket (typically for ETS/minimum bandwidth) */
10426 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_MIN_BKT_OFST 24
10427 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_MIN_BKT_LEN 4
10428 /* the static priority associated with the txq */
10429 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_GUARANTEED_OFST 28
10430 #define MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_GUARANTEED_LEN 4
10431
10432 /* MC_CMD_TCM_TXQ_INIT_OUT msgresponse */
10433 #define MC_CMD_TCM_TXQ_INIT_OUT_LEN 0
10434
10435
10436 /***********************************/
10437 /* MC_CMD_LINK_PIOBUF
10438  * Link a push I/O buffer to a TxQ
10439  */
10440 #define MC_CMD_LINK_PIOBUF 0x92
10441 #undef  MC_CMD_0x92_PRIVILEGE_CTG
10442
10443 #define MC_CMD_0x92_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
10444
10445 /* MC_CMD_LINK_PIOBUF_IN msgrequest */
10446 #define MC_CMD_LINK_PIOBUF_IN_LEN 8
10447 /* Handle for allocated push I/O buffer. */
10448 #define MC_CMD_LINK_PIOBUF_IN_PIOBUF_HANDLE_OFST 0
10449 #define MC_CMD_LINK_PIOBUF_IN_PIOBUF_HANDLE_LEN 4
10450 /* Function Local Instance (VI) number. */
10451 #define MC_CMD_LINK_PIOBUF_IN_TXQ_INSTANCE_OFST 4
10452 #define MC_CMD_LINK_PIOBUF_IN_TXQ_INSTANCE_LEN 4
10453
10454 /* MC_CMD_LINK_PIOBUF_OUT msgresponse */
10455 #define MC_CMD_LINK_PIOBUF_OUT_LEN 0
10456
10457
10458 /***********************************/
10459 /* MC_CMD_UNLINK_PIOBUF
10460  * Unlink a push I/O buffer from a TxQ
10461  */
10462 #define MC_CMD_UNLINK_PIOBUF 0x93
10463 #undef  MC_CMD_0x93_PRIVILEGE_CTG
10464
10465 #define MC_CMD_0x93_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
10466
10467 /* MC_CMD_UNLINK_PIOBUF_IN msgrequest */
10468 #define MC_CMD_UNLINK_PIOBUF_IN_LEN 4
10469 /* Function Local Instance (VI) number. */
10470 #define MC_CMD_UNLINK_PIOBUF_IN_TXQ_INSTANCE_OFST 0
10471 #define MC_CMD_UNLINK_PIOBUF_IN_TXQ_INSTANCE_LEN 4
10472
10473 /* MC_CMD_UNLINK_PIOBUF_OUT msgresponse */
10474 #define MC_CMD_UNLINK_PIOBUF_OUT_LEN 0
10475
10476
10477 /***********************************/
10478 /* MC_CMD_VSWITCH_ALLOC
10479  * allocate and initialise a v-switch.
10480  */
10481 #define MC_CMD_VSWITCH_ALLOC 0x94
10482 #undef  MC_CMD_0x94_PRIVILEGE_CTG
10483
10484 #define MC_CMD_0x94_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10485
10486 /* MC_CMD_VSWITCH_ALLOC_IN msgrequest */
10487 #define MC_CMD_VSWITCH_ALLOC_IN_LEN 16
10488 /* The port to connect to the v-switch's upstream port. */
10489 #define MC_CMD_VSWITCH_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
10490 #define MC_CMD_VSWITCH_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
10491 /* The type of v-switch to create. */
10492 #define MC_CMD_VSWITCH_ALLOC_IN_TYPE_OFST 4
10493 #define MC_CMD_VSWITCH_ALLOC_IN_TYPE_LEN 4
10494 /* enum: VLAN */
10495 #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VLAN  0x1
10496 /* enum: VEB */
10497 #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VEB  0x2
10498 /* enum: VEPA (obsolete) */
10499 #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VEPA  0x3
10500 /* enum: MUX */
10501 #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_MUX  0x4
10502 /* enum: Snapper specific; semantics TBD */
10503 #define MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_TEST  0x5
10504 /* Flags controlling v-port creation */
10505 #define MC_CMD_VSWITCH_ALLOC_IN_FLAGS_OFST 8
10506 #define MC_CMD_VSWITCH_ALLOC_IN_FLAGS_LEN 4
10507 #define MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_LBN 0
10508 #define MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1
10509 /* The number of VLAN tags to allow for attached v-ports. For VLAN aggregators,
10510  * this must be one or greated, and the attached v-ports must have exactly this
10511  * number of tags. For other v-switch types, this must be zero of greater, and
10512  * is an upper limit on the number of VLAN tags for attached v-ports. An error
10513  * will be returned if existing configuration means we can't support attached
10514  * v-ports with this number of tags.
10515  */
10516 #define MC_CMD_VSWITCH_ALLOC_IN_NUM_VLAN_TAGS_OFST 12
10517 #define MC_CMD_VSWITCH_ALLOC_IN_NUM_VLAN_TAGS_LEN 4
10518
10519 /* MC_CMD_VSWITCH_ALLOC_OUT msgresponse */
10520 #define MC_CMD_VSWITCH_ALLOC_OUT_LEN 0
10521
10522
10523 /***********************************/
10524 /* MC_CMD_VSWITCH_FREE
10525  * de-allocate a v-switch.
10526  */
10527 #define MC_CMD_VSWITCH_FREE 0x95
10528 #undef  MC_CMD_0x95_PRIVILEGE_CTG
10529
10530 #define MC_CMD_0x95_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10531
10532 /* MC_CMD_VSWITCH_FREE_IN msgrequest */
10533 #define MC_CMD_VSWITCH_FREE_IN_LEN 4
10534 /* The port to which the v-switch is connected. */
10535 #define MC_CMD_VSWITCH_FREE_IN_UPSTREAM_PORT_ID_OFST 0
10536 #define MC_CMD_VSWITCH_FREE_IN_UPSTREAM_PORT_ID_LEN 4
10537
10538 /* MC_CMD_VSWITCH_FREE_OUT msgresponse */
10539 #define MC_CMD_VSWITCH_FREE_OUT_LEN 0
10540
10541
10542 /***********************************/
10543 /* MC_CMD_VSWITCH_QUERY
10544  * read some config of v-switch. For now this command is an empty placeholder.
10545  * It may be used to check if a v-switch is connected to a given EVB port (if
10546  * not, then the command returns ENOENT).
10547  */
10548 #define MC_CMD_VSWITCH_QUERY 0x63
10549 #undef  MC_CMD_0x63_PRIVILEGE_CTG
10550
10551 #define MC_CMD_0x63_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10552
10553 /* MC_CMD_VSWITCH_QUERY_IN msgrequest */
10554 #define MC_CMD_VSWITCH_QUERY_IN_LEN 4
10555 /* The port to which the v-switch is connected. */
10556 #define MC_CMD_VSWITCH_QUERY_IN_UPSTREAM_PORT_ID_OFST 0
10557 #define MC_CMD_VSWITCH_QUERY_IN_UPSTREAM_PORT_ID_LEN 4
10558
10559 /* MC_CMD_VSWITCH_QUERY_OUT msgresponse */
10560 #define MC_CMD_VSWITCH_QUERY_OUT_LEN 0
10561
10562
10563 /***********************************/
10564 /* MC_CMD_VPORT_ALLOC
10565  * allocate a v-port.
10566  */
10567 #define MC_CMD_VPORT_ALLOC 0x96
10568 #undef  MC_CMD_0x96_PRIVILEGE_CTG
10569
10570 #define MC_CMD_0x96_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10571
10572 /* MC_CMD_VPORT_ALLOC_IN msgrequest */
10573 #define MC_CMD_VPORT_ALLOC_IN_LEN 20
10574 /* The port to which the v-switch is connected. */
10575 #define MC_CMD_VPORT_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
10576 #define MC_CMD_VPORT_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
10577 /* The type of the new v-port. */
10578 #define MC_CMD_VPORT_ALLOC_IN_TYPE_OFST 4
10579 #define MC_CMD_VPORT_ALLOC_IN_TYPE_LEN 4
10580 /* enum: VLAN (obsolete) */
10581 #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VLAN  0x1
10582 /* enum: VEB (obsolete) */
10583 #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VEB  0x2
10584 /* enum: VEPA (obsolete) */
10585 #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VEPA  0x3
10586 /* enum: A normal v-port receives packets which match a specified MAC and/or
10587  * VLAN.
10588  */
10589 #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_NORMAL  0x4
10590 /* enum: An expansion v-port packets traffic which don't match any other
10591  * v-port.
10592  */
10593 #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_EXPANSION  0x5
10594 /* enum: An test v-port receives packets which match any filters installed by
10595  * its downstream components.
10596  */
10597 #define MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_TEST  0x6
10598 /* Flags controlling v-port creation */
10599 #define MC_CMD_VPORT_ALLOC_IN_FLAGS_OFST 8
10600 #define MC_CMD_VPORT_ALLOC_IN_FLAGS_LEN 4
10601 #define MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_LBN 0
10602 #define MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1
10603 #define MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_LBN 1
10604 #define MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_WIDTH 1
10605 /* The number of VLAN tags to insert/remove. An error will be returned if
10606  * incompatible with the number of VLAN tags specified for the upstream
10607  * v-switch.
10608  */
10609 #define MC_CMD_VPORT_ALLOC_IN_NUM_VLAN_TAGS_OFST 12
10610 #define MC_CMD_VPORT_ALLOC_IN_NUM_VLAN_TAGS_LEN 4
10611 /* The actual VLAN tags to insert/remove */
10612 #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAGS_OFST 16
10613 #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAGS_LEN 4
10614 #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_LBN 0
10615 #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_WIDTH 16
10616 #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_LBN 16
10617 #define MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_WIDTH 16
10618
10619 /* MC_CMD_VPORT_ALLOC_OUT msgresponse */
10620 #define MC_CMD_VPORT_ALLOC_OUT_LEN 4
10621 /* The handle of the new v-port */
10622 #define MC_CMD_VPORT_ALLOC_OUT_VPORT_ID_OFST 0
10623 #define MC_CMD_VPORT_ALLOC_OUT_VPORT_ID_LEN 4
10624
10625
10626 /***********************************/
10627 /* MC_CMD_VPORT_FREE
10628  * de-allocate a v-port.
10629  */
10630 #define MC_CMD_VPORT_FREE 0x97
10631 #undef  MC_CMD_0x97_PRIVILEGE_CTG
10632
10633 #define MC_CMD_0x97_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10634
10635 /* MC_CMD_VPORT_FREE_IN msgrequest */
10636 #define MC_CMD_VPORT_FREE_IN_LEN 4
10637 /* The handle of the v-port */
10638 #define MC_CMD_VPORT_FREE_IN_VPORT_ID_OFST 0
10639 #define MC_CMD_VPORT_FREE_IN_VPORT_ID_LEN 4
10640
10641 /* MC_CMD_VPORT_FREE_OUT msgresponse */
10642 #define MC_CMD_VPORT_FREE_OUT_LEN 0
10643
10644
10645 /***********************************/
10646 /* MC_CMD_VADAPTOR_ALLOC
10647  * allocate a v-adaptor.
10648  */
10649 #define MC_CMD_VADAPTOR_ALLOC 0x98
10650 #undef  MC_CMD_0x98_PRIVILEGE_CTG
10651
10652 #define MC_CMD_0x98_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10653
10654 /* MC_CMD_VADAPTOR_ALLOC_IN msgrequest */
10655 #define MC_CMD_VADAPTOR_ALLOC_IN_LEN 30
10656 /* The port to connect to the v-adaptor's port. */
10657 #define MC_CMD_VADAPTOR_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
10658 #define MC_CMD_VADAPTOR_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
10659 /* Flags controlling v-adaptor creation */
10660 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAGS_OFST 8
10661 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAGS_LEN 4
10662 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_LBN 0
10663 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_WIDTH 1
10664 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 1
10665 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
10666 /* The number of VLAN tags to strip on receive */
10667 #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLANS_OFST 12
10668 #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLANS_LEN 4
10669 /* The number of VLAN tags to transparently insert/remove. */
10670 #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLAN_TAGS_OFST 16
10671 #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLAN_TAGS_LEN 4
10672 /* The actual VLAN tags to insert/remove */
10673 #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAGS_OFST 20
10674 #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAGS_LEN 4
10675 #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_LBN 0
10676 #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_WIDTH 16
10677 #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_LBN 16
10678 #define MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_WIDTH 16
10679 /* The MAC address to assign to this v-adaptor */
10680 #define MC_CMD_VADAPTOR_ALLOC_IN_MACADDR_OFST 24
10681 #define MC_CMD_VADAPTOR_ALLOC_IN_MACADDR_LEN 6
10682 /* enum: Derive the MAC address from the upstream port */
10683 #define MC_CMD_VADAPTOR_ALLOC_IN_AUTO_MAC  0x0
10684
10685 /* MC_CMD_VADAPTOR_ALLOC_OUT msgresponse */
10686 #define MC_CMD_VADAPTOR_ALLOC_OUT_LEN 0
10687
10688
10689 /***********************************/
10690 /* MC_CMD_VADAPTOR_FREE
10691  * de-allocate a v-adaptor.
10692  */
10693 #define MC_CMD_VADAPTOR_FREE 0x99
10694 #undef  MC_CMD_0x99_PRIVILEGE_CTG
10695
10696 #define MC_CMD_0x99_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10697
10698 /* MC_CMD_VADAPTOR_FREE_IN msgrequest */
10699 #define MC_CMD_VADAPTOR_FREE_IN_LEN 4
10700 /* The port to which the v-adaptor is connected. */
10701 #define MC_CMD_VADAPTOR_FREE_IN_UPSTREAM_PORT_ID_OFST 0
10702 #define MC_CMD_VADAPTOR_FREE_IN_UPSTREAM_PORT_ID_LEN 4
10703
10704 /* MC_CMD_VADAPTOR_FREE_OUT msgresponse */
10705 #define MC_CMD_VADAPTOR_FREE_OUT_LEN 0
10706
10707
10708 /***********************************/
10709 /* MC_CMD_VADAPTOR_SET_MAC
10710  * assign a new MAC address to a v-adaptor.
10711  */
10712 #define MC_CMD_VADAPTOR_SET_MAC 0x5d
10713 #undef  MC_CMD_0x5d_PRIVILEGE_CTG
10714
10715 #define MC_CMD_0x5d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10716
10717 /* MC_CMD_VADAPTOR_SET_MAC_IN msgrequest */
10718 #define MC_CMD_VADAPTOR_SET_MAC_IN_LEN 10
10719 /* The port to which the v-adaptor is connected. */
10720 #define MC_CMD_VADAPTOR_SET_MAC_IN_UPSTREAM_PORT_ID_OFST 0
10721 #define MC_CMD_VADAPTOR_SET_MAC_IN_UPSTREAM_PORT_ID_LEN 4
10722 /* The new MAC address to assign to this v-adaptor */
10723 #define MC_CMD_VADAPTOR_SET_MAC_IN_MACADDR_OFST 4
10724 #define MC_CMD_VADAPTOR_SET_MAC_IN_MACADDR_LEN 6
10725
10726 /* MC_CMD_VADAPTOR_SET_MAC_OUT msgresponse */
10727 #define MC_CMD_VADAPTOR_SET_MAC_OUT_LEN 0
10728
10729
10730 /***********************************/
10731 /* MC_CMD_VADAPTOR_GET_MAC
10732  * read the MAC address assigned to a v-adaptor.
10733  */
10734 #define MC_CMD_VADAPTOR_GET_MAC 0x5e
10735 #undef  MC_CMD_0x5e_PRIVILEGE_CTG
10736
10737 #define MC_CMD_0x5e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10738
10739 /* MC_CMD_VADAPTOR_GET_MAC_IN msgrequest */
10740 #define MC_CMD_VADAPTOR_GET_MAC_IN_LEN 4
10741 /* The port to which the v-adaptor is connected. */
10742 #define MC_CMD_VADAPTOR_GET_MAC_IN_UPSTREAM_PORT_ID_OFST 0
10743 #define MC_CMD_VADAPTOR_GET_MAC_IN_UPSTREAM_PORT_ID_LEN 4
10744
10745 /* MC_CMD_VADAPTOR_GET_MAC_OUT msgresponse */
10746 #define MC_CMD_VADAPTOR_GET_MAC_OUT_LEN 6
10747 /* The MAC address assigned to this v-adaptor */
10748 #define MC_CMD_VADAPTOR_GET_MAC_OUT_MACADDR_OFST 0
10749 #define MC_CMD_VADAPTOR_GET_MAC_OUT_MACADDR_LEN 6
10750
10751
10752 /***********************************/
10753 /* MC_CMD_VADAPTOR_QUERY
10754  * read some config of v-adaptor.
10755  */
10756 #define MC_CMD_VADAPTOR_QUERY 0x61
10757 #undef  MC_CMD_0x61_PRIVILEGE_CTG
10758
10759 #define MC_CMD_0x61_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10760
10761 /* MC_CMD_VADAPTOR_QUERY_IN msgrequest */
10762 #define MC_CMD_VADAPTOR_QUERY_IN_LEN 4
10763 /* The port to which the v-adaptor is connected. */
10764 #define MC_CMD_VADAPTOR_QUERY_IN_UPSTREAM_PORT_ID_OFST 0
10765 #define MC_CMD_VADAPTOR_QUERY_IN_UPSTREAM_PORT_ID_LEN 4
10766
10767 /* MC_CMD_VADAPTOR_QUERY_OUT msgresponse */
10768 #define MC_CMD_VADAPTOR_QUERY_OUT_LEN 12
10769 /* The EVB port flags as defined at MC_CMD_VPORT_ALLOC. */
10770 #define MC_CMD_VADAPTOR_QUERY_OUT_PORT_FLAGS_OFST 0
10771 #define MC_CMD_VADAPTOR_QUERY_OUT_PORT_FLAGS_LEN 4
10772 /* The v-adaptor flags as defined at MC_CMD_VADAPTOR_ALLOC. */
10773 #define MC_CMD_VADAPTOR_QUERY_OUT_VADAPTOR_FLAGS_OFST 4
10774 #define MC_CMD_VADAPTOR_QUERY_OUT_VADAPTOR_FLAGS_LEN 4
10775 /* The number of VLAN tags that may still be added */
10776 #define MC_CMD_VADAPTOR_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_OFST 8
10777 #define MC_CMD_VADAPTOR_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_LEN 4
10778
10779
10780 /***********************************/
10781 /* MC_CMD_EVB_PORT_ASSIGN
10782  * assign a port to a PCI function.
10783  */
10784 #define MC_CMD_EVB_PORT_ASSIGN 0x9a
10785 #undef  MC_CMD_0x9a_PRIVILEGE_CTG
10786
10787 #define MC_CMD_0x9a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10788
10789 /* MC_CMD_EVB_PORT_ASSIGN_IN msgrequest */
10790 #define MC_CMD_EVB_PORT_ASSIGN_IN_LEN 8
10791 /* The port to assign. */
10792 #define MC_CMD_EVB_PORT_ASSIGN_IN_PORT_ID_OFST 0
10793 #define MC_CMD_EVB_PORT_ASSIGN_IN_PORT_ID_LEN 4
10794 /* The target function to modify. */
10795 #define MC_CMD_EVB_PORT_ASSIGN_IN_FUNCTION_OFST 4
10796 #define MC_CMD_EVB_PORT_ASSIGN_IN_FUNCTION_LEN 4
10797 #define MC_CMD_EVB_PORT_ASSIGN_IN_PF_LBN 0
10798 #define MC_CMD_EVB_PORT_ASSIGN_IN_PF_WIDTH 16
10799 #define MC_CMD_EVB_PORT_ASSIGN_IN_VF_LBN 16
10800 #define MC_CMD_EVB_PORT_ASSIGN_IN_VF_WIDTH 16
10801
10802 /* MC_CMD_EVB_PORT_ASSIGN_OUT msgresponse */
10803 #define MC_CMD_EVB_PORT_ASSIGN_OUT_LEN 0
10804
10805
10806 /***********************************/
10807 /* MC_CMD_RDWR_A64_REGIONS
10808  * Assign the 64 bit region addresses.
10809  */
10810 #define MC_CMD_RDWR_A64_REGIONS 0x9b
10811 #undef  MC_CMD_0x9b_PRIVILEGE_CTG
10812
10813 #define MC_CMD_0x9b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
10814
10815 /* MC_CMD_RDWR_A64_REGIONS_IN msgrequest */
10816 #define MC_CMD_RDWR_A64_REGIONS_IN_LEN 17
10817 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION0_OFST 0
10818 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION0_LEN 4
10819 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION1_OFST 4
10820 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION1_LEN 4
10821 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION2_OFST 8
10822 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION2_LEN 4
10823 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION3_OFST 12
10824 #define MC_CMD_RDWR_A64_REGIONS_IN_REGION3_LEN 4
10825 /* Write enable bits 0-3, set to write, clear to read. */
10826 #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_LBN 128
10827 #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_WIDTH 4
10828 #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_BYTE_OFST 16
10829 #define MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_BYTE_LEN 1
10830
10831 /* MC_CMD_RDWR_A64_REGIONS_OUT msgresponse: This data always included
10832  * regardless of state of write bits in the request.
10833  */
10834 #define MC_CMD_RDWR_A64_REGIONS_OUT_LEN 16
10835 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION0_OFST 0
10836 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION0_LEN 4
10837 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION1_OFST 4
10838 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION1_LEN 4
10839 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION2_OFST 8
10840 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION2_LEN 4
10841 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION3_OFST 12
10842 #define MC_CMD_RDWR_A64_REGIONS_OUT_REGION3_LEN 4
10843
10844
10845 /***********************************/
10846 /* MC_CMD_ONLOAD_STACK_ALLOC
10847  * Allocate an Onload stack ID.
10848  */
10849 #define MC_CMD_ONLOAD_STACK_ALLOC 0x9c
10850 #undef  MC_CMD_0x9c_PRIVILEGE_CTG
10851
10852 #define MC_CMD_0x9c_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
10853
10854 /* MC_CMD_ONLOAD_STACK_ALLOC_IN msgrequest */
10855 #define MC_CMD_ONLOAD_STACK_ALLOC_IN_LEN 4
10856 /* The handle of the owning upstream port */
10857 #define MC_CMD_ONLOAD_STACK_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
10858 #define MC_CMD_ONLOAD_STACK_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
10859
10860 /* MC_CMD_ONLOAD_STACK_ALLOC_OUT msgresponse */
10861 #define MC_CMD_ONLOAD_STACK_ALLOC_OUT_LEN 4
10862 /* The handle of the new Onload stack */
10863 #define MC_CMD_ONLOAD_STACK_ALLOC_OUT_ONLOAD_STACK_ID_OFST 0
10864 #define MC_CMD_ONLOAD_STACK_ALLOC_OUT_ONLOAD_STACK_ID_LEN 4
10865
10866
10867 /***********************************/
10868 /* MC_CMD_ONLOAD_STACK_FREE
10869  * Free an Onload stack ID.
10870  */
10871 #define MC_CMD_ONLOAD_STACK_FREE 0x9d
10872 #undef  MC_CMD_0x9d_PRIVILEGE_CTG
10873
10874 #define MC_CMD_0x9d_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
10875
10876 /* MC_CMD_ONLOAD_STACK_FREE_IN msgrequest */
10877 #define MC_CMD_ONLOAD_STACK_FREE_IN_LEN 4
10878 /* The handle of the Onload stack */
10879 #define MC_CMD_ONLOAD_STACK_FREE_IN_ONLOAD_STACK_ID_OFST 0
10880 #define MC_CMD_ONLOAD_STACK_FREE_IN_ONLOAD_STACK_ID_LEN 4
10881
10882 /* MC_CMD_ONLOAD_STACK_FREE_OUT msgresponse */
10883 #define MC_CMD_ONLOAD_STACK_FREE_OUT_LEN 0
10884
10885
10886 /***********************************/
10887 /* MC_CMD_RSS_CONTEXT_ALLOC
10888  * Allocate an RSS context.
10889  */
10890 #define MC_CMD_RSS_CONTEXT_ALLOC 0x9e
10891 #undef  MC_CMD_0x9e_PRIVILEGE_CTG
10892
10893 #define MC_CMD_0x9e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10894
10895 /* MC_CMD_RSS_CONTEXT_ALLOC_IN msgrequest */
10896 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN 12
10897 /* The handle of the owning upstream port */
10898 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
10899 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
10900 /* The type of context to allocate */
10901 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_OFST 4
10902 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_LEN 4
10903 /* enum: Allocate a context for exclusive use. The key and indirection table
10904  * must be explicitly configured.
10905  */
10906 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_EXCLUSIVE  0x0
10907 /* enum: Allocate a context for shared use; this will spread across a range of
10908  * queues, but the key and indirection table are pre-configured and may not be
10909  * changed. For this mode, NUM_QUEUES must 2, 4, 8, 16, 32 or 64.
10910  */
10911 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_SHARED  0x1
10912 /* Number of queues spanned by this context, in the range 1-64; valid offsets
10913  * in the indirection table will be in the range 0 to NUM_QUEUES-1.
10914  */
10915 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_NUM_QUEUES_OFST 8
10916 #define MC_CMD_RSS_CONTEXT_ALLOC_IN_NUM_QUEUES_LEN 4
10917
10918 /* MC_CMD_RSS_CONTEXT_ALLOC_OUT msgresponse */
10919 #define MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN 4
10920 /* The handle of the new RSS context. This should be considered opaque to the
10921  * host, although a value of 0xFFFFFFFF is guaranteed never to be a valid
10922  * handle.
10923  */
10924 #define MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_OFST 0
10925 #define MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_LEN 4
10926 /* enum: guaranteed invalid RSS context handle value */
10927 #define MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID  0xffffffff
10928
10929
10930 /***********************************/
10931 /* MC_CMD_RSS_CONTEXT_FREE
10932  * Free an RSS context.
10933  */
10934 #define MC_CMD_RSS_CONTEXT_FREE 0x9f
10935 #undef  MC_CMD_0x9f_PRIVILEGE_CTG
10936
10937 #define MC_CMD_0x9f_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10938
10939 /* MC_CMD_RSS_CONTEXT_FREE_IN msgrequest */
10940 #define MC_CMD_RSS_CONTEXT_FREE_IN_LEN 4
10941 /* The handle of the RSS context */
10942 #define MC_CMD_RSS_CONTEXT_FREE_IN_RSS_CONTEXT_ID_OFST 0
10943 #define MC_CMD_RSS_CONTEXT_FREE_IN_RSS_CONTEXT_ID_LEN 4
10944
10945 /* MC_CMD_RSS_CONTEXT_FREE_OUT msgresponse */
10946 #define MC_CMD_RSS_CONTEXT_FREE_OUT_LEN 0
10947
10948
10949 /***********************************/
10950 /* MC_CMD_RSS_CONTEXT_SET_KEY
10951  * Set the Toeplitz hash key for an RSS context.
10952  */
10953 #define MC_CMD_RSS_CONTEXT_SET_KEY 0xa0
10954 #undef  MC_CMD_0xa0_PRIVILEGE_CTG
10955
10956 #define MC_CMD_0xa0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10957
10958 /* MC_CMD_RSS_CONTEXT_SET_KEY_IN msgrequest */
10959 #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_LEN 44
10960 /* The handle of the RSS context */
10961 #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_RSS_CONTEXT_ID_OFST 0
10962 #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_RSS_CONTEXT_ID_LEN 4
10963 /* The 40-byte Toeplitz hash key (TBD endianness issues?) */
10964 #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_OFST 4
10965 #define MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_LEN 40
10966
10967 /* MC_CMD_RSS_CONTEXT_SET_KEY_OUT msgresponse */
10968 #define MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN 0
10969
10970
10971 /***********************************/
10972 /* MC_CMD_RSS_CONTEXT_GET_KEY
10973  * Get the Toeplitz hash key for an RSS context.
10974  */
10975 #define MC_CMD_RSS_CONTEXT_GET_KEY 0xa1
10976 #undef  MC_CMD_0xa1_PRIVILEGE_CTG
10977
10978 #define MC_CMD_0xa1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
10979
10980 /* MC_CMD_RSS_CONTEXT_GET_KEY_IN msgrequest */
10981 #define MC_CMD_RSS_CONTEXT_GET_KEY_IN_LEN 4
10982 /* The handle of the RSS context */
10983 #define MC_CMD_RSS_CONTEXT_GET_KEY_IN_RSS_CONTEXT_ID_OFST 0
10984 #define MC_CMD_RSS_CONTEXT_GET_KEY_IN_RSS_CONTEXT_ID_LEN 4
10985
10986 /* MC_CMD_RSS_CONTEXT_GET_KEY_OUT msgresponse */
10987 #define MC_CMD_RSS_CONTEXT_GET_KEY_OUT_LEN 44
10988 /* The 40-byte Toeplitz hash key (TBD endianness issues?) */
10989 #define MC_CMD_RSS_CONTEXT_GET_KEY_OUT_TOEPLITZ_KEY_OFST 4
10990 #define MC_CMD_RSS_CONTEXT_GET_KEY_OUT_TOEPLITZ_KEY_LEN 40
10991
10992
10993 /***********************************/
10994 /* MC_CMD_RSS_CONTEXT_SET_TABLE
10995  * Set the indirection table for an RSS context.
10996  */
10997 #define MC_CMD_RSS_CONTEXT_SET_TABLE 0xa2
10998 #undef  MC_CMD_0xa2_PRIVILEGE_CTG
10999
11000 #define MC_CMD_0xa2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11001
11002 /* MC_CMD_RSS_CONTEXT_SET_TABLE_IN msgrequest */
11003 #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_LEN 132
11004 /* The handle of the RSS context */
11005 #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_RSS_CONTEXT_ID_OFST 0
11006 #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_RSS_CONTEXT_ID_LEN 4
11007 /* The 128-byte indirection table (1 byte per entry) */
11008 #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_INDIRECTION_TABLE_OFST 4
11009 #define MC_CMD_RSS_CONTEXT_SET_TABLE_IN_INDIRECTION_TABLE_LEN 128
11010
11011 /* MC_CMD_RSS_CONTEXT_SET_TABLE_OUT msgresponse */
11012 #define MC_CMD_RSS_CONTEXT_SET_TABLE_OUT_LEN 0
11013
11014
11015 /***********************************/
11016 /* MC_CMD_RSS_CONTEXT_GET_TABLE
11017  * Get the indirection table for an RSS context.
11018  */
11019 #define MC_CMD_RSS_CONTEXT_GET_TABLE 0xa3
11020 #undef  MC_CMD_0xa3_PRIVILEGE_CTG
11021
11022 #define MC_CMD_0xa3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11023
11024 /* MC_CMD_RSS_CONTEXT_GET_TABLE_IN msgrequest */
11025 #define MC_CMD_RSS_CONTEXT_GET_TABLE_IN_LEN 4
11026 /* The handle of the RSS context */
11027 #define MC_CMD_RSS_CONTEXT_GET_TABLE_IN_RSS_CONTEXT_ID_OFST 0
11028 #define MC_CMD_RSS_CONTEXT_GET_TABLE_IN_RSS_CONTEXT_ID_LEN 4
11029
11030 /* MC_CMD_RSS_CONTEXT_GET_TABLE_OUT msgresponse */
11031 #define MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_LEN 132
11032 /* The 128-byte indirection table (1 byte per entry) */
11033 #define MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_INDIRECTION_TABLE_OFST 4
11034 #define MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_INDIRECTION_TABLE_LEN 128
11035
11036
11037 /***********************************/
11038 /* MC_CMD_RSS_CONTEXT_SET_FLAGS
11039  * Set various control flags for an RSS context.
11040  */
11041 #define MC_CMD_RSS_CONTEXT_SET_FLAGS 0xe1
11042 #undef  MC_CMD_0xe1_PRIVILEGE_CTG
11043
11044 #define MC_CMD_0xe1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11045
11046 /* MC_CMD_RSS_CONTEXT_SET_FLAGS_IN msgrequest */
11047 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_LEN 8
11048 /* The handle of the RSS context */
11049 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RSS_CONTEXT_ID_OFST 0
11050 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RSS_CONTEXT_ID_LEN 4
11051 /* Hash control flags. The _EN bits are always supported, but new modes are
11052  * available when ADDITIONAL_RSS_MODES is reported by MC_CMD_GET_CAPABILITIES:
11053  * in this case, the MODE fields may be set to non-zero values, and will take
11054  * effect regardless of the settings of the _EN flags. See the RSS_MODE
11055  * structure for the meaning of the mode bits. Drivers must check the
11056  * capability before trying to set any _MODE fields, as older firmware will
11057  * reject any attempt to set the FLAGS field to a value > 0xff with EINVAL. In
11058  * the case where all the _MODE flags are zero, the _EN flags take effect,
11059  * providing backward compatibility for existing drivers. (Setting all _MODE
11060  * *and* all _EN flags to zero is valid, to disable RSS spreading for that
11061  * particular packet type.)
11062  */
11063 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_FLAGS_OFST 4
11064 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_FLAGS_LEN 4
11065 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_LBN 0
11066 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_WIDTH 1
11067 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_LBN 1
11068 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_WIDTH 1
11069 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_LBN 2
11070 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_WIDTH 1
11071 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_LBN 3
11072 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_WIDTH 1
11073 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RESERVED_LBN 4
11074 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RESERVED_WIDTH 4
11075 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE_LBN 8
11076 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE_WIDTH 4
11077 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV4_RSS_MODE_LBN 12
11078 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV4_RSS_MODE_WIDTH 4
11079 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV4_RSS_MODE_LBN 16
11080 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV4_RSS_MODE_WIDTH 4
11081 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV6_RSS_MODE_LBN 20
11082 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV6_RSS_MODE_WIDTH 4
11083 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV6_RSS_MODE_LBN 24
11084 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV6_RSS_MODE_WIDTH 4
11085 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV6_RSS_MODE_LBN 28
11086 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV6_RSS_MODE_WIDTH 4
11087
11088 /* MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT msgresponse */
11089 #define MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN 0
11090
11091
11092 /***********************************/
11093 /* MC_CMD_RSS_CONTEXT_GET_FLAGS
11094  * Get various control flags for an RSS context.
11095  */
11096 #define MC_CMD_RSS_CONTEXT_GET_FLAGS 0xe2
11097 #undef  MC_CMD_0xe2_PRIVILEGE_CTG
11098
11099 #define MC_CMD_0xe2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11100
11101 /* MC_CMD_RSS_CONTEXT_GET_FLAGS_IN msgrequest */
11102 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_LEN 4
11103 /* The handle of the RSS context */
11104 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_RSS_CONTEXT_ID_OFST 0
11105 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_RSS_CONTEXT_ID_LEN 4
11106
11107 /* MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT msgresponse */
11108 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_LEN 8
11109 /* Hash control flags. If all _MODE bits are zero (which will always be true
11110  * for older firmware which does not report the ADDITIONAL_RSS_MODES
11111  * capability), the _EN bits report the state. If any _MODE bits are non-zero
11112  * (which will only be true when the firmware reports ADDITIONAL_RSS_MODES)
11113  * then the _EN bits should be disregarded, although the _MODE flags are
11114  * guaranteed to be consistent with the _EN flags for a freshly-allocated RSS
11115  * context and in the case where the _EN flags were used in the SET. This
11116  * provides backward compatibility: old drivers will not be attempting to
11117  * derive any meaning from the _MODE bits (and can never set them to any value
11118  * not representable by the _EN bits); new drivers can always determine the
11119  * mode by looking only at the _MODE bits; the value returned by a GET can
11120  * always be used for a SET regardless of old/new driver vs. old/new firmware.
11121  */
11122 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_FLAGS_OFST 4
11123 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_FLAGS_LEN 4
11124 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_LBN 0
11125 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_WIDTH 1
11126 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_LBN 1
11127 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_WIDTH 1
11128 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_LBN 2
11129 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_WIDTH 1
11130 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_LBN 3
11131 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_WIDTH 1
11132 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_RESERVED_LBN 4
11133 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_RESERVED_WIDTH 4
11134 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV4_RSS_MODE_LBN 8
11135 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV4_RSS_MODE_WIDTH 4
11136 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV4_RSS_MODE_LBN 12
11137 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV4_RSS_MODE_WIDTH 4
11138 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV4_RSS_MODE_LBN 16
11139 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV4_RSS_MODE_WIDTH 4
11140 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV6_RSS_MODE_LBN 20
11141 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV6_RSS_MODE_WIDTH 4
11142 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV6_RSS_MODE_LBN 24
11143 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV6_RSS_MODE_WIDTH 4
11144 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV6_RSS_MODE_LBN 28
11145 #define MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV6_RSS_MODE_WIDTH 4
11146
11147
11148 /***********************************/
11149 /* MC_CMD_DOT1P_MAPPING_ALLOC
11150  * Allocate a .1p mapping.
11151  */
11152 #define MC_CMD_DOT1P_MAPPING_ALLOC 0xa4
11153 #undef  MC_CMD_0xa4_PRIVILEGE_CTG
11154
11155 #define MC_CMD_0xa4_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11156
11157 /* MC_CMD_DOT1P_MAPPING_ALLOC_IN msgrequest */
11158 #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_LEN 8
11159 /* The handle of the owning upstream port */
11160 #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
11161 #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
11162 /* Number of queues spanned by this mapping, in the range 1-64; valid fixed
11163  * offsets in the mapping table will be in the range 0 to NUM_QUEUES-1, and
11164  * referenced RSS contexts must span no more than this number.
11165  */
11166 #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_NUM_QUEUES_OFST 4
11167 #define MC_CMD_DOT1P_MAPPING_ALLOC_IN_NUM_QUEUES_LEN 4
11168
11169 /* MC_CMD_DOT1P_MAPPING_ALLOC_OUT msgresponse */
11170 #define MC_CMD_DOT1P_MAPPING_ALLOC_OUT_LEN 4
11171 /* The handle of the new .1p mapping. This should be considered opaque to the
11172  * host, although a value of 0xFFFFFFFF is guaranteed never to be a valid
11173  * handle.
11174  */
11175 #define MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_OFST 0
11176 #define MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_LEN 4
11177 /* enum: guaranteed invalid .1p mapping handle value */
11178 #define MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_INVALID  0xffffffff
11179
11180
11181 /***********************************/
11182 /* MC_CMD_DOT1P_MAPPING_FREE
11183  * Free a .1p mapping.
11184  */
11185 #define MC_CMD_DOT1P_MAPPING_FREE 0xa5
11186 #undef  MC_CMD_0xa5_PRIVILEGE_CTG
11187
11188 #define MC_CMD_0xa5_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11189
11190 /* MC_CMD_DOT1P_MAPPING_FREE_IN msgrequest */
11191 #define MC_CMD_DOT1P_MAPPING_FREE_IN_LEN 4
11192 /* The handle of the .1p mapping */
11193 #define MC_CMD_DOT1P_MAPPING_FREE_IN_DOT1P_MAPPING_ID_OFST 0
11194 #define MC_CMD_DOT1P_MAPPING_FREE_IN_DOT1P_MAPPING_ID_LEN 4
11195
11196 /* MC_CMD_DOT1P_MAPPING_FREE_OUT msgresponse */
11197 #define MC_CMD_DOT1P_MAPPING_FREE_OUT_LEN 0
11198
11199
11200 /***********************************/
11201 /* MC_CMD_DOT1P_MAPPING_SET_TABLE
11202  * Set the mapping table for a .1p mapping.
11203  */
11204 #define MC_CMD_DOT1P_MAPPING_SET_TABLE 0xa6
11205 #undef  MC_CMD_0xa6_PRIVILEGE_CTG
11206
11207 #define MC_CMD_0xa6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11208
11209 /* MC_CMD_DOT1P_MAPPING_SET_TABLE_IN msgrequest */
11210 #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_LEN 36
11211 /* The handle of the .1p mapping */
11212 #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_DOT1P_MAPPING_ID_OFST 0
11213 #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_DOT1P_MAPPING_ID_LEN 4
11214 /* Per-priority mappings (1 32-bit word per entry - an offset or RSS context
11215  * handle)
11216  */
11217 #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_MAPPING_TABLE_OFST 4
11218 #define MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_MAPPING_TABLE_LEN 32
11219
11220 /* MC_CMD_DOT1P_MAPPING_SET_TABLE_OUT msgresponse */
11221 #define MC_CMD_DOT1P_MAPPING_SET_TABLE_OUT_LEN 0
11222
11223
11224 /***********************************/
11225 /* MC_CMD_DOT1P_MAPPING_GET_TABLE
11226  * Get the mapping table for a .1p mapping.
11227  */
11228 #define MC_CMD_DOT1P_MAPPING_GET_TABLE 0xa7
11229 #undef  MC_CMD_0xa7_PRIVILEGE_CTG
11230
11231 #define MC_CMD_0xa7_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11232
11233 /* MC_CMD_DOT1P_MAPPING_GET_TABLE_IN msgrequest */
11234 #define MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_LEN 4
11235 /* The handle of the .1p mapping */
11236 #define MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_DOT1P_MAPPING_ID_OFST 0
11237 #define MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_DOT1P_MAPPING_ID_LEN 4
11238
11239 /* MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT msgresponse */
11240 #define MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_LEN 36
11241 /* Per-priority mappings (1 32-bit word per entry - an offset or RSS context
11242  * handle)
11243  */
11244 #define MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_MAPPING_TABLE_OFST 4
11245 #define MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_MAPPING_TABLE_LEN 32
11246
11247
11248 /***********************************/
11249 /* MC_CMD_GET_VECTOR_CFG
11250  * Get Interrupt Vector config for this PF.
11251  */
11252 #define MC_CMD_GET_VECTOR_CFG 0xbf
11253 #undef  MC_CMD_0xbf_PRIVILEGE_CTG
11254
11255 #define MC_CMD_0xbf_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11256
11257 /* MC_CMD_GET_VECTOR_CFG_IN msgrequest */
11258 #define MC_CMD_GET_VECTOR_CFG_IN_LEN 0
11259
11260 /* MC_CMD_GET_VECTOR_CFG_OUT msgresponse */
11261 #define MC_CMD_GET_VECTOR_CFG_OUT_LEN 12
11262 /* Base absolute interrupt vector number. */
11263 #define MC_CMD_GET_VECTOR_CFG_OUT_VEC_BASE_OFST 0
11264 #define MC_CMD_GET_VECTOR_CFG_OUT_VEC_BASE_LEN 4
11265 /* Number of interrupt vectors allocate to this PF. */
11266 #define MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_PF_OFST 4
11267 #define MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_PF_LEN 4
11268 /* Number of interrupt vectors to allocate per VF. */
11269 #define MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_VF_OFST 8
11270 #define MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_VF_LEN 4
11271
11272
11273 /***********************************/
11274 /* MC_CMD_SET_VECTOR_CFG
11275  * Set Interrupt Vector config for this PF.
11276  */
11277 #define MC_CMD_SET_VECTOR_CFG 0xc0
11278 #undef  MC_CMD_0xc0_PRIVILEGE_CTG
11279
11280 #define MC_CMD_0xc0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11281
11282 /* MC_CMD_SET_VECTOR_CFG_IN msgrequest */
11283 #define MC_CMD_SET_VECTOR_CFG_IN_LEN 12
11284 /* Base absolute interrupt vector number, or MC_CMD_RESOURCE_INSTANCE_ANY to
11285  * let the system find a suitable base.
11286  */
11287 #define MC_CMD_SET_VECTOR_CFG_IN_VEC_BASE_OFST 0
11288 #define MC_CMD_SET_VECTOR_CFG_IN_VEC_BASE_LEN 4
11289 /* Number of interrupt vectors allocate to this PF. */
11290 #define MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_PF_OFST 4
11291 #define MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_PF_LEN 4
11292 /* Number of interrupt vectors to allocate per VF. */
11293 #define MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_VF_OFST 8
11294 #define MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_VF_LEN 4
11295
11296 /* MC_CMD_SET_VECTOR_CFG_OUT msgresponse */
11297 #define MC_CMD_SET_VECTOR_CFG_OUT_LEN 0
11298
11299
11300 /***********************************/
11301 /* MC_CMD_VPORT_ADD_MAC_ADDRESS
11302  * Add a MAC address to a v-port
11303  */
11304 #define MC_CMD_VPORT_ADD_MAC_ADDRESS 0xa8
11305 #undef  MC_CMD_0xa8_PRIVILEGE_CTG
11306
11307 #define MC_CMD_0xa8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11308
11309 /* MC_CMD_VPORT_ADD_MAC_ADDRESS_IN msgrequest */
11310 #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_LEN 10
11311 /* The handle of the v-port */
11312 #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_VPORT_ID_OFST 0
11313 #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_VPORT_ID_LEN 4
11314 /* MAC address to add */
11315 #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_MACADDR_OFST 4
11316 #define MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_MACADDR_LEN 6
11317
11318 /* MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT msgresponse */
11319 #define MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT_LEN 0
11320
11321
11322 /***********************************/
11323 /* MC_CMD_VPORT_DEL_MAC_ADDRESS
11324  * Delete a MAC address from a v-port
11325  */
11326 #define MC_CMD_VPORT_DEL_MAC_ADDRESS 0xa9
11327 #undef  MC_CMD_0xa9_PRIVILEGE_CTG
11328
11329 #define MC_CMD_0xa9_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11330
11331 /* MC_CMD_VPORT_DEL_MAC_ADDRESS_IN msgrequest */
11332 #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_LEN 10
11333 /* The handle of the v-port */
11334 #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID_OFST 0
11335 #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID_LEN 4
11336 /* MAC address to add */
11337 #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_MACADDR_OFST 4
11338 #define MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_MACADDR_LEN 6
11339
11340 /* MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT msgresponse */
11341 #define MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT_LEN 0
11342
11343
11344 /***********************************/
11345 /* MC_CMD_VPORT_GET_MAC_ADDRESSES
11346  * Delete a MAC address from a v-port
11347  */
11348 #define MC_CMD_VPORT_GET_MAC_ADDRESSES 0xaa
11349 #undef  MC_CMD_0xaa_PRIVILEGE_CTG
11350
11351 #define MC_CMD_0xaa_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11352
11353 /* MC_CMD_VPORT_GET_MAC_ADDRESSES_IN msgrequest */
11354 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN 4
11355 /* The handle of the v-port */
11356 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_VPORT_ID_OFST 0
11357 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_VPORT_ID_LEN 4
11358
11359 /* MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT msgresponse */
11360 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMIN 4
11361 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX 250
11362 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LEN(num) (4+6*(num))
11363 /* The number of MAC addresses returned */
11364 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_COUNT_OFST 0
11365 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_COUNT_LEN 4
11366 /* Array of MAC addresses */
11367 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_OFST 4
11368 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_LEN 6
11369 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MINNUM 0
11370 #define MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MAXNUM 41
11371
11372
11373 /***********************************/
11374 /* MC_CMD_VPORT_RECONFIGURE
11375  * Replace VLAN tags and/or MAC addresses of an existing v-port. If the v-port
11376  * has already been passed to another function (v-port's user), then that
11377  * function will be reset before applying the changes.
11378  */
11379 #define MC_CMD_VPORT_RECONFIGURE 0xeb
11380 #undef  MC_CMD_0xeb_PRIVILEGE_CTG
11381
11382 #define MC_CMD_0xeb_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11383
11384 /* MC_CMD_VPORT_RECONFIGURE_IN msgrequest */
11385 #define MC_CMD_VPORT_RECONFIGURE_IN_LEN 44
11386 /* The handle of the v-port */
11387 #define MC_CMD_VPORT_RECONFIGURE_IN_VPORT_ID_OFST 0
11388 #define MC_CMD_VPORT_RECONFIGURE_IN_VPORT_ID_LEN 4
11389 /* Flags requesting what should be changed. */
11390 #define MC_CMD_VPORT_RECONFIGURE_IN_FLAGS_OFST 4
11391 #define MC_CMD_VPORT_RECONFIGURE_IN_FLAGS_LEN 4
11392 #define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_LBN 0
11393 #define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_WIDTH 1
11394 #define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_LBN 1
11395 #define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_WIDTH 1
11396 /* The number of VLAN tags to insert/remove. An error will be returned if
11397  * incompatible with the number of VLAN tags specified for the upstream
11398  * v-switch.
11399  */
11400 #define MC_CMD_VPORT_RECONFIGURE_IN_NUM_VLAN_TAGS_OFST 8
11401 #define MC_CMD_VPORT_RECONFIGURE_IN_NUM_VLAN_TAGS_LEN 4
11402 /* The actual VLAN tags to insert/remove */
11403 #define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAGS_OFST 12
11404 #define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAGS_LEN 4
11405 #define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_LBN 0
11406 #define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_WIDTH 16
11407 #define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_LBN 16
11408 #define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_WIDTH 16
11409 /* The number of MAC addresses to add */
11410 #define MC_CMD_VPORT_RECONFIGURE_IN_NUM_MACADDRS_OFST 16
11411 #define MC_CMD_VPORT_RECONFIGURE_IN_NUM_MACADDRS_LEN 4
11412 /* MAC addresses to add */
11413 #define MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_OFST 20
11414 #define MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_LEN 6
11415 #define MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_NUM 4
11416
11417 /* MC_CMD_VPORT_RECONFIGURE_OUT msgresponse */
11418 #define MC_CMD_VPORT_RECONFIGURE_OUT_LEN 4
11419 #define MC_CMD_VPORT_RECONFIGURE_OUT_FLAGS_OFST 0
11420 #define MC_CMD_VPORT_RECONFIGURE_OUT_FLAGS_LEN 4
11421 #define MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_LBN 0
11422 #define MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_WIDTH 1
11423
11424
11425 /***********************************/
11426 /* MC_CMD_EVB_PORT_QUERY
11427  * read some config of v-port.
11428  */
11429 #define MC_CMD_EVB_PORT_QUERY 0x62
11430 #undef  MC_CMD_0x62_PRIVILEGE_CTG
11431
11432 #define MC_CMD_0x62_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11433
11434 /* MC_CMD_EVB_PORT_QUERY_IN msgrequest */
11435 #define MC_CMD_EVB_PORT_QUERY_IN_LEN 4
11436 /* The handle of the v-port */
11437 #define MC_CMD_EVB_PORT_QUERY_IN_PORT_ID_OFST 0
11438 #define MC_CMD_EVB_PORT_QUERY_IN_PORT_ID_LEN 4
11439
11440 /* MC_CMD_EVB_PORT_QUERY_OUT msgresponse */
11441 #define MC_CMD_EVB_PORT_QUERY_OUT_LEN 8
11442 /* The EVB port flags as defined at MC_CMD_VPORT_ALLOC. */
11443 #define MC_CMD_EVB_PORT_QUERY_OUT_PORT_FLAGS_OFST 0
11444 #define MC_CMD_EVB_PORT_QUERY_OUT_PORT_FLAGS_LEN 4
11445 /* The number of VLAN tags that may be used on a v-adaptor connected to this
11446  * EVB port.
11447  */
11448 #define MC_CMD_EVB_PORT_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_OFST 4
11449 #define MC_CMD_EVB_PORT_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_LEN 4
11450
11451
11452 /***********************************/
11453 /* MC_CMD_DUMP_BUFTBL_ENTRIES
11454  * Dump buffer table entries, mainly for command client debug use. Dumps
11455  * absolute entries, and does not use chunk handles. All entries must be in
11456  * range, and used for q page mapping, Although the latter restriction may be
11457  * lifted in future.
11458  */
11459 #define MC_CMD_DUMP_BUFTBL_ENTRIES 0xab
11460 #undef  MC_CMD_0xab_PRIVILEGE_CTG
11461
11462 #define MC_CMD_0xab_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11463
11464 /* MC_CMD_DUMP_BUFTBL_ENTRIES_IN msgrequest */
11465 #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_LEN 8
11466 /* Index of the first buffer table entry. */
11467 #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_FIRSTID_OFST 0
11468 #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_FIRSTID_LEN 4
11469 /* Number of buffer table entries to dump. */
11470 #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_NUMENTRIES_OFST 4
11471 #define MC_CMD_DUMP_BUFTBL_ENTRIES_IN_NUMENTRIES_LEN 4
11472
11473 /* MC_CMD_DUMP_BUFTBL_ENTRIES_OUT msgresponse */
11474 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMIN 12
11475 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMAX 252
11476 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LEN(num) (0+12*(num))
11477 /* Raw buffer table entries, layed out as BUFTBL_ENTRY. */
11478 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_OFST 0
11479 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_LEN 12
11480 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MINNUM 1
11481 #define MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MAXNUM 21
11482
11483
11484 /***********************************/
11485 /* MC_CMD_SET_RXDP_CONFIG
11486  * Set global RXDP configuration settings
11487  */
11488 #define MC_CMD_SET_RXDP_CONFIG 0xc1
11489 #undef  MC_CMD_0xc1_PRIVILEGE_CTG
11490
11491 #define MC_CMD_0xc1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11492
11493 /* MC_CMD_SET_RXDP_CONFIG_IN msgrequest */
11494 #define MC_CMD_SET_RXDP_CONFIG_IN_LEN 4
11495 #define MC_CMD_SET_RXDP_CONFIG_IN_DATA_OFST 0
11496 #define MC_CMD_SET_RXDP_CONFIG_IN_DATA_LEN 4
11497 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_LBN 0
11498 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_WIDTH 1
11499 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_LBN 1
11500 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_WIDTH 2
11501 /* enum: pad to 64 bytes */
11502 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_64  0x0
11503 /* enum: pad to 128 bytes (Medford only) */
11504 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_128  0x1
11505 /* enum: pad to 256 bytes (Medford only) */
11506 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_256   0x2
11507
11508 /* MC_CMD_SET_RXDP_CONFIG_OUT msgresponse */
11509 #define MC_CMD_SET_RXDP_CONFIG_OUT_LEN 0
11510
11511
11512 /***********************************/
11513 /* MC_CMD_GET_RXDP_CONFIG
11514  * Get global RXDP configuration settings
11515  */
11516 #define MC_CMD_GET_RXDP_CONFIG 0xc2
11517 #undef  MC_CMD_0xc2_PRIVILEGE_CTG
11518
11519 #define MC_CMD_0xc2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11520
11521 /* MC_CMD_GET_RXDP_CONFIG_IN msgrequest */
11522 #define MC_CMD_GET_RXDP_CONFIG_IN_LEN 0
11523
11524 /* MC_CMD_GET_RXDP_CONFIG_OUT msgresponse */
11525 #define MC_CMD_GET_RXDP_CONFIG_OUT_LEN 4
11526 #define MC_CMD_GET_RXDP_CONFIG_OUT_DATA_OFST 0
11527 #define MC_CMD_GET_RXDP_CONFIG_OUT_DATA_LEN 4
11528 #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_LBN 0
11529 #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_WIDTH 1
11530 #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_LBN 1
11531 #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_WIDTH 2
11532 /*             Enum values, see field(s): */
11533 /*                MC_CMD_SET_RXDP_CONFIG/MC_CMD_SET_RXDP_CONFIG_IN/PAD_HOST_LEN */
11534
11535
11536 /***********************************/
11537 /* MC_CMD_GET_CLOCK
11538  * Return the system and PDCPU clock frequencies.
11539  */
11540 #define MC_CMD_GET_CLOCK 0xac
11541 #undef  MC_CMD_0xac_PRIVILEGE_CTG
11542
11543 #define MC_CMD_0xac_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11544
11545 /* MC_CMD_GET_CLOCK_IN msgrequest */
11546 #define MC_CMD_GET_CLOCK_IN_LEN 0
11547
11548 /* MC_CMD_GET_CLOCK_OUT msgresponse */
11549 #define MC_CMD_GET_CLOCK_OUT_LEN 8
11550 /* System frequency, MHz */
11551 #define MC_CMD_GET_CLOCK_OUT_SYS_FREQ_OFST 0
11552 #define MC_CMD_GET_CLOCK_OUT_SYS_FREQ_LEN 4
11553 /* DPCPU frequency, MHz */
11554 #define MC_CMD_GET_CLOCK_OUT_DPCPU_FREQ_OFST 4
11555 #define MC_CMD_GET_CLOCK_OUT_DPCPU_FREQ_LEN 4
11556
11557
11558 /***********************************/
11559 /* MC_CMD_SET_CLOCK
11560  * Control the system and DPCPU clock frequencies. Changes are lost reboot.
11561  */
11562 #define MC_CMD_SET_CLOCK 0xad
11563 #undef  MC_CMD_0xad_PRIVILEGE_CTG
11564
11565 #define MC_CMD_0xad_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11566
11567 /* MC_CMD_SET_CLOCK_IN msgrequest */
11568 #define MC_CMD_SET_CLOCK_IN_LEN 28
11569 /* Requested frequency in MHz for system clock domain */
11570 #define MC_CMD_SET_CLOCK_IN_SYS_FREQ_OFST 0
11571 #define MC_CMD_SET_CLOCK_IN_SYS_FREQ_LEN 4
11572 /* enum: Leave the system clock domain frequency unchanged */
11573 #define MC_CMD_SET_CLOCK_IN_SYS_DOMAIN_DONT_CHANGE  0x0
11574 /* Requested frequency in MHz for inter-core clock domain */
11575 #define MC_CMD_SET_CLOCK_IN_ICORE_FREQ_OFST 4
11576 #define MC_CMD_SET_CLOCK_IN_ICORE_FREQ_LEN 4
11577 /* enum: Leave the inter-core clock domain frequency unchanged */
11578 #define MC_CMD_SET_CLOCK_IN_ICORE_DOMAIN_DONT_CHANGE  0x0
11579 /* Requested frequency in MHz for DPCPU clock domain */
11580 #define MC_CMD_SET_CLOCK_IN_DPCPU_FREQ_OFST 8
11581 #define MC_CMD_SET_CLOCK_IN_DPCPU_FREQ_LEN 4
11582 /* enum: Leave the DPCPU clock domain frequency unchanged */
11583 #define MC_CMD_SET_CLOCK_IN_DPCPU_DOMAIN_DONT_CHANGE  0x0
11584 /* Requested frequency in MHz for PCS clock domain */
11585 #define MC_CMD_SET_CLOCK_IN_PCS_FREQ_OFST 12
11586 #define MC_CMD_SET_CLOCK_IN_PCS_FREQ_LEN 4
11587 /* enum: Leave the PCS clock domain frequency unchanged */
11588 #define MC_CMD_SET_CLOCK_IN_PCS_DOMAIN_DONT_CHANGE  0x0
11589 /* Requested frequency in MHz for MC clock domain */
11590 #define MC_CMD_SET_CLOCK_IN_MC_FREQ_OFST 16
11591 #define MC_CMD_SET_CLOCK_IN_MC_FREQ_LEN 4
11592 /* enum: Leave the MC clock domain frequency unchanged */
11593 #define MC_CMD_SET_CLOCK_IN_MC_DOMAIN_DONT_CHANGE  0x0
11594 /* Requested frequency in MHz for rmon clock domain */
11595 #define MC_CMD_SET_CLOCK_IN_RMON_FREQ_OFST 20
11596 #define MC_CMD_SET_CLOCK_IN_RMON_FREQ_LEN 4
11597 /* enum: Leave the rmon clock domain frequency unchanged */
11598 #define MC_CMD_SET_CLOCK_IN_RMON_DOMAIN_DONT_CHANGE  0x0
11599 /* Requested frequency in MHz for vswitch clock domain */
11600 #define MC_CMD_SET_CLOCK_IN_VSWITCH_FREQ_OFST 24
11601 #define MC_CMD_SET_CLOCK_IN_VSWITCH_FREQ_LEN 4
11602 /* enum: Leave the vswitch clock domain frequency unchanged */
11603 #define MC_CMD_SET_CLOCK_IN_VSWITCH_DOMAIN_DONT_CHANGE  0x0
11604
11605 /* MC_CMD_SET_CLOCK_OUT msgresponse */
11606 #define MC_CMD_SET_CLOCK_OUT_LEN 28
11607 /* Resulting system frequency in MHz */
11608 #define MC_CMD_SET_CLOCK_OUT_SYS_FREQ_OFST 0
11609 #define MC_CMD_SET_CLOCK_OUT_SYS_FREQ_LEN 4
11610 /* enum: The system clock domain doesn't exist */
11611 #define MC_CMD_SET_CLOCK_OUT_SYS_DOMAIN_UNSUPPORTED  0x0
11612 /* Resulting inter-core frequency in MHz */
11613 #define MC_CMD_SET_CLOCK_OUT_ICORE_FREQ_OFST 4
11614 #define MC_CMD_SET_CLOCK_OUT_ICORE_FREQ_LEN 4
11615 /* enum: The inter-core clock domain doesn't exist / isn't used */
11616 #define MC_CMD_SET_CLOCK_OUT_ICORE_DOMAIN_UNSUPPORTED  0x0
11617 /* Resulting DPCPU frequency in MHz */
11618 #define MC_CMD_SET_CLOCK_OUT_DPCPU_FREQ_OFST 8
11619 #define MC_CMD_SET_CLOCK_OUT_DPCPU_FREQ_LEN 4
11620 /* enum: The dpcpu clock domain doesn't exist */
11621 #define MC_CMD_SET_CLOCK_OUT_DPCPU_DOMAIN_UNSUPPORTED  0x0
11622 /* Resulting PCS frequency in MHz */
11623 #define MC_CMD_SET_CLOCK_OUT_PCS_FREQ_OFST 12
11624 #define MC_CMD_SET_CLOCK_OUT_PCS_FREQ_LEN 4
11625 /* enum: The PCS clock domain doesn't exist / isn't controlled */
11626 #define MC_CMD_SET_CLOCK_OUT_PCS_DOMAIN_UNSUPPORTED  0x0
11627 /* Resulting MC frequency in MHz */
11628 #define MC_CMD_SET_CLOCK_OUT_MC_FREQ_OFST 16
11629 #define MC_CMD_SET_CLOCK_OUT_MC_FREQ_LEN 4
11630 /* enum: The MC clock domain doesn't exist / isn't controlled */
11631 #define MC_CMD_SET_CLOCK_OUT_MC_DOMAIN_UNSUPPORTED  0x0
11632 /* Resulting rmon frequency in MHz */
11633 #define MC_CMD_SET_CLOCK_OUT_RMON_FREQ_OFST 20
11634 #define MC_CMD_SET_CLOCK_OUT_RMON_FREQ_LEN 4
11635 /* enum: The rmon clock domain doesn't exist / isn't controlled */
11636 #define MC_CMD_SET_CLOCK_OUT_RMON_DOMAIN_UNSUPPORTED  0x0
11637 /* Resulting vswitch frequency in MHz */
11638 #define MC_CMD_SET_CLOCK_OUT_VSWITCH_FREQ_OFST 24
11639 #define MC_CMD_SET_CLOCK_OUT_VSWITCH_FREQ_LEN 4
11640 /* enum: The vswitch clock domain doesn't exist / isn't controlled */
11641 #define MC_CMD_SET_CLOCK_OUT_VSWITCH_DOMAIN_UNSUPPORTED  0x0
11642
11643
11644 /***********************************/
11645 /* MC_CMD_DPCPU_RPC
11646  * Send an arbitrary DPCPU message.
11647  */
11648 #define MC_CMD_DPCPU_RPC 0xae
11649 #undef  MC_CMD_0xae_PRIVILEGE_CTG
11650
11651 #define MC_CMD_0xae_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11652
11653 /* MC_CMD_DPCPU_RPC_IN msgrequest */
11654 #define MC_CMD_DPCPU_RPC_IN_LEN 36
11655 #define MC_CMD_DPCPU_RPC_IN_CPU_OFST 0
11656 #define MC_CMD_DPCPU_RPC_IN_CPU_LEN 4
11657 /* enum: RxDPCPU0 */
11658 #define MC_CMD_DPCPU_RPC_IN_DPCPU_RX0  0x0
11659 /* enum: TxDPCPU0 */
11660 #define MC_CMD_DPCPU_RPC_IN_DPCPU_TX0  0x1
11661 /* enum: TxDPCPU1 */
11662 #define MC_CMD_DPCPU_RPC_IN_DPCPU_TX1  0x2
11663 /* enum: RxDPCPU1 (Medford only) */
11664 #define MC_CMD_DPCPU_RPC_IN_DPCPU_RX1   0x3
11665 /* enum: RxDPCPU (will be for the calling function; for now, just an alias of
11666  * DPCPU_RX0)
11667  */
11668 #define MC_CMD_DPCPU_RPC_IN_DPCPU_RX   0x80
11669 /* enum: TxDPCPU (will be for the calling function; for now, just an alias of
11670  * DPCPU_TX0)
11671  */
11672 #define MC_CMD_DPCPU_RPC_IN_DPCPU_TX   0x81
11673 /* First 8 bits [39:32] of DATA are consumed by MC-DPCPU protocol and must be
11674  * initialised to zero
11675  */
11676 #define MC_CMD_DPCPU_RPC_IN_DATA_OFST 4
11677 #define MC_CMD_DPCPU_RPC_IN_DATA_LEN 32
11678 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_LBN 8
11679 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_WIDTH 8
11680 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_READ  0x6 /* enum */
11681 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_WRITE  0x7 /* enum */
11682 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_SELF_TEST  0xc /* enum */
11683 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_CSR_ACCESS  0xe /* enum */
11684 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_READ  0x46 /* enum */
11685 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_WRITE  0x47 /* enum */
11686 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_SELF_TEST  0x4a /* enum */
11687 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_CSR_ACCESS  0x4c /* enum */
11688 #define MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_SET_MC_REPLAY_CNTXT  0x4d /* enum */
11689 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_LBN 16
11690 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_WIDTH 16
11691 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_LBN 16
11692 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_WIDTH 16
11693 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_LBN 48
11694 #define MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_WIDTH 16
11695 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_LBN 16
11696 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_WIDTH 240
11697 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_LBN 16
11698 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_WIDTH 16
11699 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_STOP_RETURN_RESULT  0x0 /* enum */
11700 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_READ  0x1 /* enum */
11701 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_WRITE  0x2 /* enum */
11702 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_WRITE_READ  0x3 /* enum */
11703 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_PIPELINED_READ  0x4 /* enum */
11704 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_LBN 48
11705 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_WIDTH 16
11706 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_LBN 64
11707 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_WIDTH 16
11708 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_LBN 80
11709 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_WIDTH 16
11710 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_LBN 16
11711 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_WIDTH 16
11712 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_CUT_THROUGH  0x1 /* enum */
11713 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_STORE_FORWARD  0x2 /* enum */
11714 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_STORE_FORWARD_FIRST  0x3 /* enum */
11715 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_LBN 64
11716 #define MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_WIDTH 16
11717 #define MC_CMD_DPCPU_RPC_IN_WDATA_OFST 12
11718 #define MC_CMD_DPCPU_RPC_IN_WDATA_LEN 24
11719 /* Register data to write. Only valid in write/write-read. */
11720 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_DATA_OFST 16
11721 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_DATA_LEN 4
11722 /* Register address. */
11723 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_ADDRESS_OFST 20
11724 #define MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_ADDRESS_LEN 4
11725
11726 /* MC_CMD_DPCPU_RPC_OUT msgresponse */
11727 #define MC_CMD_DPCPU_RPC_OUT_LEN 36
11728 #define MC_CMD_DPCPU_RPC_OUT_RC_OFST 0
11729 #define MC_CMD_DPCPU_RPC_OUT_RC_LEN 4
11730 /* DATA */
11731 #define MC_CMD_DPCPU_RPC_OUT_DATA_OFST 4
11732 #define MC_CMD_DPCPU_RPC_OUT_DATA_LEN 32
11733 #define MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_LBN 32
11734 #define MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_WIDTH 16
11735 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_LBN 48
11736 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_WIDTH 16
11737 #define MC_CMD_DPCPU_RPC_OUT_RDATA_OFST 12
11738 #define MC_CMD_DPCPU_RPC_OUT_RDATA_LEN 24
11739 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_1_OFST 12
11740 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_1_LEN 4
11741 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_2_OFST 16
11742 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_2_LEN 4
11743 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_3_OFST 20
11744 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_3_LEN 4
11745 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_4_OFST 24
11746 #define MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_4_LEN 4
11747
11748
11749 /***********************************/
11750 /* MC_CMD_TRIGGER_INTERRUPT
11751  * Trigger an interrupt by prodding the BIU.
11752  */
11753 #define MC_CMD_TRIGGER_INTERRUPT 0xe3
11754 #undef  MC_CMD_0xe3_PRIVILEGE_CTG
11755
11756 #define MC_CMD_0xe3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
11757
11758 /* MC_CMD_TRIGGER_INTERRUPT_IN msgrequest */
11759 #define MC_CMD_TRIGGER_INTERRUPT_IN_LEN 4
11760 /* Interrupt level relative to base for function. */
11761 #define MC_CMD_TRIGGER_INTERRUPT_IN_INTR_LEVEL_OFST 0
11762 #define MC_CMD_TRIGGER_INTERRUPT_IN_INTR_LEVEL_LEN 4
11763
11764 /* MC_CMD_TRIGGER_INTERRUPT_OUT msgresponse */
11765 #define MC_CMD_TRIGGER_INTERRUPT_OUT_LEN 0
11766
11767
11768 /***********************************/
11769 /* MC_CMD_SHMBOOT_OP
11770  * Special operations to support (for now) shmboot.
11771  */
11772 #define MC_CMD_SHMBOOT_OP 0xe6
11773 #undef  MC_CMD_0xe6_PRIVILEGE_CTG
11774
11775 #define MC_CMD_0xe6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11776
11777 /* MC_CMD_SHMBOOT_OP_IN msgrequest */
11778 #define MC_CMD_SHMBOOT_OP_IN_LEN 4
11779 /* Identifies the operation to perform */
11780 #define MC_CMD_SHMBOOT_OP_IN_SHMBOOT_OP_OFST 0
11781 #define MC_CMD_SHMBOOT_OP_IN_SHMBOOT_OP_LEN 4
11782 /* enum: Copy slave_data section to the slave core. (Greenport only) */
11783 #define MC_CMD_SHMBOOT_OP_IN_PUSH_SLAVE_DATA  0x0
11784
11785 /* MC_CMD_SHMBOOT_OP_OUT msgresponse */
11786 #define MC_CMD_SHMBOOT_OP_OUT_LEN 0
11787
11788
11789 /***********************************/
11790 /* MC_CMD_CAP_BLK_READ
11791  * Read multiple 64bit words from capture block memory
11792  */
11793 #define MC_CMD_CAP_BLK_READ 0xe7
11794 #undef  MC_CMD_0xe7_PRIVILEGE_CTG
11795
11796 #define MC_CMD_0xe7_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11797
11798 /* MC_CMD_CAP_BLK_READ_IN msgrequest */
11799 #define MC_CMD_CAP_BLK_READ_IN_LEN 12
11800 #define MC_CMD_CAP_BLK_READ_IN_CAP_REG_OFST 0
11801 #define MC_CMD_CAP_BLK_READ_IN_CAP_REG_LEN 4
11802 #define MC_CMD_CAP_BLK_READ_IN_ADDR_OFST 4
11803 #define MC_CMD_CAP_BLK_READ_IN_ADDR_LEN 4
11804 #define MC_CMD_CAP_BLK_READ_IN_COUNT_OFST 8
11805 #define MC_CMD_CAP_BLK_READ_IN_COUNT_LEN 4
11806
11807 /* MC_CMD_CAP_BLK_READ_OUT msgresponse */
11808 #define MC_CMD_CAP_BLK_READ_OUT_LENMIN 8
11809 #define MC_CMD_CAP_BLK_READ_OUT_LENMAX 248
11810 #define MC_CMD_CAP_BLK_READ_OUT_LEN(num) (0+8*(num))
11811 #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_OFST 0
11812 #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_LEN 8
11813 #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_LO_OFST 0
11814 #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_HI_OFST 4
11815 #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_MINNUM 1
11816 #define MC_CMD_CAP_BLK_READ_OUT_BUFFER_MAXNUM 31
11817
11818
11819 /***********************************/
11820 /* MC_CMD_DUMP_DO
11821  * Take a dump of the DUT state
11822  */
11823 #define MC_CMD_DUMP_DO 0xe8
11824 #undef  MC_CMD_0xe8_PRIVILEGE_CTG
11825
11826 #define MC_CMD_0xe8_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11827
11828 /* MC_CMD_DUMP_DO_IN msgrequest */
11829 #define MC_CMD_DUMP_DO_IN_LEN 52
11830 #define MC_CMD_DUMP_DO_IN_PADDING_OFST 0
11831 #define MC_CMD_DUMP_DO_IN_PADDING_LEN 4
11832 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_OFST 4
11833 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_LEN 4
11834 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM  0x0 /* enum */
11835 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_DEFAULT  0x1 /* enum */
11836 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_TYPE_OFST 8
11837 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_TYPE_LEN 4
11838 #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_NVRAM  0x1 /* enum */
11839 #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_HOST_MEMORY  0x2 /* enum */
11840 #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_HOST_MEMORY_MLI  0x3 /* enum */
11841 #define MC_CMD_DUMP_DO_IN_DUMP_LOCATION_UART  0x4 /* enum */
11842 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 12
11843 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
11844 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_OFST 16
11845 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_LEN 4
11846 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 12
11847 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
11848 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 16
11849 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
11850 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 12
11851 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
11852 #define MC_CMD_DUMP_DO_IN_HOST_MEMORY_MLI_PAGE_SIZE  0x1000 /* enum */
11853 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 16
11854 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
11855 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 20
11856 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
11857 #define MC_CMD_DUMP_DO_IN_HOST_MEMORY_MLI_MAX_DEPTH  0x2 /* enum */
11858 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_OFST 12
11859 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_LEN 4
11860 /* enum: The uart port this command was received over (if using a uart
11861  * transport)
11862  */
11863 #define MC_CMD_DUMP_DO_IN_UART_PORT_SRC  0xff
11864 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_SIZE_OFST 24
11865 #define MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_SIZE_LEN 4
11866 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_OFST 28
11867 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_LEN 4
11868 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM  0x0 /* enum */
11869 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_NVRAM_DUMP_PARTITION  0x1 /* enum */
11870 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_TYPE_OFST 32
11871 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_TYPE_LEN 4
11872 /*            Enum values, see field(s): */
11873 /*               MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */
11874 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 36
11875 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
11876 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_OFST 40
11877 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_LEN 4
11878 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 36
11879 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
11880 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 40
11881 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
11882 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 36
11883 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
11884 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 40
11885 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
11886 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 44
11887 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
11888 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_UART_PORT_OFST 36
11889 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_UART_PORT_LEN 4
11890 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_SIZE_OFST 48
11891 #define MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_SIZE_LEN 4
11892
11893 /* MC_CMD_DUMP_DO_OUT msgresponse */
11894 #define MC_CMD_DUMP_DO_OUT_LEN 4
11895 #define MC_CMD_DUMP_DO_OUT_DUMPFILE_SIZE_OFST 0
11896 #define MC_CMD_DUMP_DO_OUT_DUMPFILE_SIZE_LEN 4
11897
11898
11899 /***********************************/
11900 /* MC_CMD_DUMP_CONFIGURE_UNSOLICITED
11901  * Configure unsolicited dumps
11902  */
11903 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED 0xe9
11904 #undef  MC_CMD_0xe9_PRIVILEGE_CTG
11905
11906 #define MC_CMD_0xe9_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11907
11908 /* MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN msgrequest */
11909 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_LEN 52
11910 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_ENABLE_OFST 0
11911 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_ENABLE_LEN 4
11912 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_OFST 4
11913 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_LEN 4
11914 /*            Enum values, see field(s): */
11915 /*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC */
11916 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_TYPE_OFST 8
11917 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_TYPE_LEN 4
11918 /*            Enum values, see field(s): */
11919 /*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */
11920 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 12
11921 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
11922 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_OFST 16
11923 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_LEN 4
11924 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 12
11925 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
11926 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 16
11927 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
11928 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 12
11929 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
11930 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 16
11931 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
11932 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 20
11933 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
11934 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_OFST 12
11935 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_LEN 4
11936 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_SIZE_OFST 24
11937 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_SIZE_LEN 4
11938 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_OFST 28
11939 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_LEN 4
11940 /*            Enum values, see field(s): */
11941 /*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPFILE_DST */
11942 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_TYPE_OFST 32
11943 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_TYPE_LEN 4
11944 /*            Enum values, see field(s): */
11945 /*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */
11946 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 36
11947 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
11948 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_OFST 40
11949 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_LEN 4
11950 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 36
11951 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
11952 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 40
11953 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
11954 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 36
11955 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
11956 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 40
11957 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
11958 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 44
11959 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
11960 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_UART_PORT_OFST 36
11961 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_UART_PORT_LEN 4
11962 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_SIZE_OFST 48
11963 #define MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_SIZE_LEN 4
11964
11965
11966 /***********************************/
11967 /* MC_CMD_SET_PSU
11968  * Adjusts power supply parameters. This is a warranty-voiding operation.
11969  * Returns: ENOENT if the parameter or rail specified does not exist, EINVAL if
11970  * the parameter is out of range.
11971  */
11972 #define MC_CMD_SET_PSU 0xea
11973 #undef  MC_CMD_0xea_PRIVILEGE_CTG
11974
11975 #define MC_CMD_0xea_PRIVILEGE_CTG SRIOV_CTG_INSECURE
11976
11977 /* MC_CMD_SET_PSU_IN msgrequest */
11978 #define MC_CMD_SET_PSU_IN_LEN 12
11979 #define MC_CMD_SET_PSU_IN_PARAM_OFST 0
11980 #define MC_CMD_SET_PSU_IN_PARAM_LEN 4
11981 #define MC_CMD_SET_PSU_IN_PARAM_SUPPLY_VOLTAGE  0x0 /* enum */
11982 #define MC_CMD_SET_PSU_IN_RAIL_OFST 4
11983 #define MC_CMD_SET_PSU_IN_RAIL_LEN 4
11984 #define MC_CMD_SET_PSU_IN_RAIL_0V9  0x0 /* enum */
11985 #define MC_CMD_SET_PSU_IN_RAIL_1V2  0x1 /* enum */
11986 /* desired value, eg voltage in mV */
11987 #define MC_CMD_SET_PSU_IN_VALUE_OFST 8
11988 #define MC_CMD_SET_PSU_IN_VALUE_LEN 4
11989
11990 /* MC_CMD_SET_PSU_OUT msgresponse */
11991 #define MC_CMD_SET_PSU_OUT_LEN 0
11992
11993
11994 /***********************************/
11995 /* MC_CMD_GET_FUNCTION_INFO
11996  * Get function information. PF and VF number.
11997  */
11998 #define MC_CMD_GET_FUNCTION_INFO 0xec
11999 #undef  MC_CMD_0xec_PRIVILEGE_CTG
12000
12001 #define MC_CMD_0xec_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12002
12003 /* MC_CMD_GET_FUNCTION_INFO_IN msgrequest */
12004 #define MC_CMD_GET_FUNCTION_INFO_IN_LEN 0
12005
12006 /* MC_CMD_GET_FUNCTION_INFO_OUT msgresponse */
12007 #define MC_CMD_GET_FUNCTION_INFO_OUT_LEN 8
12008 #define MC_CMD_GET_FUNCTION_INFO_OUT_PF_OFST 0
12009 #define MC_CMD_GET_FUNCTION_INFO_OUT_PF_LEN 4
12010 #define MC_CMD_GET_FUNCTION_INFO_OUT_VF_OFST 4
12011 #define MC_CMD_GET_FUNCTION_INFO_OUT_VF_LEN 4
12012
12013
12014 /***********************************/
12015 /* MC_CMD_ENABLE_OFFLINE_BIST
12016  * Enters offline BIST mode. All queues are torn down, chip enters quiescent
12017  * mode, calling function gets exclusive MCDI ownership. The only way out is
12018  * reboot.
12019  */
12020 #define MC_CMD_ENABLE_OFFLINE_BIST 0xed
12021 #undef  MC_CMD_0xed_PRIVILEGE_CTG
12022
12023 #define MC_CMD_0xed_PRIVILEGE_CTG SRIOV_CTG_ADMIN
12024
12025 /* MC_CMD_ENABLE_OFFLINE_BIST_IN msgrequest */
12026 #define MC_CMD_ENABLE_OFFLINE_BIST_IN_LEN 0
12027
12028 /* MC_CMD_ENABLE_OFFLINE_BIST_OUT msgresponse */
12029 #define MC_CMD_ENABLE_OFFLINE_BIST_OUT_LEN 0
12030
12031
12032 /***********************************/
12033 /* MC_CMD_UART_SEND_DATA
12034  * Send checksummed[sic] block of data over the uart. Response is a placeholder
12035  * should we wish to make this reliable; currently requests are fire-and-
12036  * forget.
12037  */
12038 #define MC_CMD_UART_SEND_DATA 0xee
12039 #undef  MC_CMD_0xee_PRIVILEGE_CTG
12040
12041 #define MC_CMD_0xee_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12042
12043 /* MC_CMD_UART_SEND_DATA_OUT msgrequest */
12044 #define MC_CMD_UART_SEND_DATA_OUT_LENMIN 16
12045 #define MC_CMD_UART_SEND_DATA_OUT_LENMAX 252
12046 #define MC_CMD_UART_SEND_DATA_OUT_LEN(num) (16+1*(num))
12047 /* CRC32 over OFFSET, LENGTH, RESERVED, DATA */
12048 #define MC_CMD_UART_SEND_DATA_OUT_CHECKSUM_OFST 0
12049 #define MC_CMD_UART_SEND_DATA_OUT_CHECKSUM_LEN 4
12050 /* Offset at which to write the data */
12051 #define MC_CMD_UART_SEND_DATA_OUT_OFFSET_OFST 4
12052 #define MC_CMD_UART_SEND_DATA_OUT_OFFSET_LEN 4
12053 /* Length of data */
12054 #define MC_CMD_UART_SEND_DATA_OUT_LENGTH_OFST 8
12055 #define MC_CMD_UART_SEND_DATA_OUT_LENGTH_LEN 4
12056 /* Reserved for future use */
12057 #define MC_CMD_UART_SEND_DATA_OUT_RESERVED_OFST 12
12058 #define MC_CMD_UART_SEND_DATA_OUT_RESERVED_LEN 4
12059 #define MC_CMD_UART_SEND_DATA_OUT_DATA_OFST 16
12060 #define MC_CMD_UART_SEND_DATA_OUT_DATA_LEN 1
12061 #define MC_CMD_UART_SEND_DATA_OUT_DATA_MINNUM 0
12062 #define MC_CMD_UART_SEND_DATA_OUT_DATA_MAXNUM 236
12063
12064 /* MC_CMD_UART_SEND_DATA_IN msgresponse */
12065 #define MC_CMD_UART_SEND_DATA_IN_LEN 0
12066
12067
12068 /***********************************/
12069 /* MC_CMD_UART_RECV_DATA
12070  * Request checksummed[sic] block of data over the uart. Only a placeholder,
12071  * subject to change and not currently implemented.
12072  */
12073 #define MC_CMD_UART_RECV_DATA 0xef
12074 #undef  MC_CMD_0xef_PRIVILEGE_CTG
12075
12076 #define MC_CMD_0xef_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12077
12078 /* MC_CMD_UART_RECV_DATA_OUT msgrequest */
12079 #define MC_CMD_UART_RECV_DATA_OUT_LEN 16
12080 /* CRC32 over OFFSET, LENGTH, RESERVED */
12081 #define MC_CMD_UART_RECV_DATA_OUT_CHECKSUM_OFST 0
12082 #define MC_CMD_UART_RECV_DATA_OUT_CHECKSUM_LEN 4
12083 /* Offset from which to read the data */
12084 #define MC_CMD_UART_RECV_DATA_OUT_OFFSET_OFST 4
12085 #define MC_CMD_UART_RECV_DATA_OUT_OFFSET_LEN 4
12086 /* Length of data */
12087 #define MC_CMD_UART_RECV_DATA_OUT_LENGTH_OFST 8
12088 #define MC_CMD_UART_RECV_DATA_OUT_LENGTH_LEN 4
12089 /* Reserved for future use */
12090 #define MC_CMD_UART_RECV_DATA_OUT_RESERVED_OFST 12
12091 #define MC_CMD_UART_RECV_DATA_OUT_RESERVED_LEN 4
12092
12093 /* MC_CMD_UART_RECV_DATA_IN msgresponse */
12094 #define MC_CMD_UART_RECV_DATA_IN_LENMIN 16
12095 #define MC_CMD_UART_RECV_DATA_IN_LENMAX 252
12096 #define MC_CMD_UART_RECV_DATA_IN_LEN(num) (16+1*(num))
12097 /* CRC32 over RESERVED1, RESERVED2, RESERVED3, DATA */
12098 #define MC_CMD_UART_RECV_DATA_IN_CHECKSUM_OFST 0
12099 #define MC_CMD_UART_RECV_DATA_IN_CHECKSUM_LEN 4
12100 /* Offset at which to write the data */
12101 #define MC_CMD_UART_RECV_DATA_IN_RESERVED1_OFST 4
12102 #define MC_CMD_UART_RECV_DATA_IN_RESERVED1_LEN 4
12103 /* Length of data */
12104 #define MC_CMD_UART_RECV_DATA_IN_RESERVED2_OFST 8
12105 #define MC_CMD_UART_RECV_DATA_IN_RESERVED2_LEN 4
12106 /* Reserved for future use */
12107 #define MC_CMD_UART_RECV_DATA_IN_RESERVED3_OFST 12
12108 #define MC_CMD_UART_RECV_DATA_IN_RESERVED3_LEN 4
12109 #define MC_CMD_UART_RECV_DATA_IN_DATA_OFST 16
12110 #define MC_CMD_UART_RECV_DATA_IN_DATA_LEN 1
12111 #define MC_CMD_UART_RECV_DATA_IN_DATA_MINNUM 0
12112 #define MC_CMD_UART_RECV_DATA_IN_DATA_MAXNUM 236
12113
12114
12115 /***********************************/
12116 /* MC_CMD_READ_FUSES
12117  * Read data programmed into the device One-Time-Programmable (OTP) Fuses
12118  */
12119 #define MC_CMD_READ_FUSES 0xf0
12120 #undef  MC_CMD_0xf0_PRIVILEGE_CTG
12121
12122 #define MC_CMD_0xf0_PRIVILEGE_CTG SRIOV_CTG_INSECURE
12123
12124 /* MC_CMD_READ_FUSES_IN msgrequest */
12125 #define MC_CMD_READ_FUSES_IN_LEN 8
12126 /* Offset in OTP to read */
12127 #define MC_CMD_READ_FUSES_IN_OFFSET_OFST 0
12128 #define MC_CMD_READ_FUSES_IN_OFFSET_LEN 4
12129 /* Length of data to read in bytes */
12130 #define MC_CMD_READ_FUSES_IN_LENGTH_OFST 4
12131 #define MC_CMD_READ_FUSES_IN_LENGTH_LEN 4
12132
12133 /* MC_CMD_READ_FUSES_OUT msgresponse */
12134 #define MC_CMD_READ_FUSES_OUT_LENMIN 4
12135 #define MC_CMD_READ_FUSES_OUT_LENMAX 252
12136 #define MC_CMD_READ_FUSES_OUT_LEN(num) (4+1*(num))
12137 /* Length of returned OTP data in bytes */
12138 #define MC_CMD_READ_FUSES_OUT_LENGTH_OFST 0
12139 #define MC_CMD_READ_FUSES_OUT_LENGTH_LEN 4
12140 /* Returned data */
12141 #define MC_CMD_READ_FUSES_OUT_DATA_OFST 4
12142 #define MC_CMD_READ_FUSES_OUT_DATA_LEN 1
12143 #define MC_CMD_READ_FUSES_OUT_DATA_MINNUM 0
12144 #define MC_CMD_READ_FUSES_OUT_DATA_MAXNUM 248
12145
12146
12147 /***********************************/
12148 /* MC_CMD_KR_TUNE
12149  * Get or set KR Serdes RXEQ and TX Driver settings
12150  */
12151 #define MC_CMD_KR_TUNE 0xf1
12152 #undef  MC_CMD_0xf1_PRIVILEGE_CTG
12153
12154 #define MC_CMD_0xf1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
12155
12156 /* MC_CMD_KR_TUNE_IN msgrequest */
12157 #define MC_CMD_KR_TUNE_IN_LENMIN 4
12158 #define MC_CMD_KR_TUNE_IN_LENMAX 252
12159 #define MC_CMD_KR_TUNE_IN_LEN(num) (4+4*(num))
12160 /* Requested operation */
12161 #define MC_CMD_KR_TUNE_IN_KR_TUNE_OP_OFST 0
12162 #define MC_CMD_KR_TUNE_IN_KR_TUNE_OP_LEN 1
12163 /* enum: Get current RXEQ settings */
12164 #define MC_CMD_KR_TUNE_IN_RXEQ_GET  0x0
12165 /* enum: Override RXEQ settings */
12166 #define MC_CMD_KR_TUNE_IN_RXEQ_SET  0x1
12167 /* enum: Get current TX Driver settings */
12168 #define MC_CMD_KR_TUNE_IN_TXEQ_GET  0x2
12169 /* enum: Override TX Driver settings */
12170 #define MC_CMD_KR_TUNE_IN_TXEQ_SET  0x3
12171 /* enum: Force KR Serdes reset / recalibration */
12172 #define MC_CMD_KR_TUNE_IN_RECAL  0x4
12173 /* enum: Start KR Serdes Eye diagram plot on a given lane. Lane must have valid
12174  * signal.
12175  */
12176 #define MC_CMD_KR_TUNE_IN_START_EYE_PLOT  0x5
12177 /* enum: Poll KR Serdes Eye diagram plot. Returns one row of BER data. The
12178  * caller should call this command repeatedly after starting eye plot, until no
12179  * more data is returned.
12180  */
12181 #define MC_CMD_KR_TUNE_IN_POLL_EYE_PLOT  0x6
12182 /* enum: Read Figure Of Merit (eye quality, higher is better). */
12183 #define MC_CMD_KR_TUNE_IN_READ_FOM  0x7
12184 /* Align the arguments to 32 bits */
12185 #define MC_CMD_KR_TUNE_IN_KR_TUNE_RSVD_OFST 1
12186 #define MC_CMD_KR_TUNE_IN_KR_TUNE_RSVD_LEN 3
12187 /* Arguments specific to the operation */
12188 #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_OFST 4
12189 #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_LEN 4
12190 #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MINNUM 0
12191 #define MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MAXNUM 62
12192
12193 /* MC_CMD_KR_TUNE_OUT msgresponse */
12194 #define MC_CMD_KR_TUNE_OUT_LEN 0
12195
12196 /* MC_CMD_KR_TUNE_RXEQ_GET_IN msgrequest */
12197 #define MC_CMD_KR_TUNE_RXEQ_GET_IN_LEN 4
12198 /* Requested operation */
12199 #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_OP_OFST 0
12200 #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_OP_LEN 1
12201 /* Align the arguments to 32 bits */
12202 #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_RSVD_OFST 1
12203 #define MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_RSVD_LEN 3
12204
12205 /* MC_CMD_KR_TUNE_RXEQ_GET_OUT msgresponse */
12206 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMIN 4
12207 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMAX 252
12208 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LEN(num) (0+4*(num))
12209 /* RXEQ Parameter */
12210 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_OFST 0
12211 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LEN 4
12212 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MINNUM 1
12213 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM 63
12214 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_LBN 0
12215 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_WIDTH 8
12216 /* enum: Attenuation (0-15, Huntington) */
12217 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_ATT  0x0
12218 /* enum: CTLE Boost (0-15, Huntington) */
12219 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_BOOST  0x1
12220 /* enum: Edge DFE Tap1 (Huntington - 0 - max negative, 64 - zero, 127 - max
12221  * positive, Medford - 0-31)
12222  */
12223 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP1  0x2
12224 /* enum: Edge DFE Tap2 (Huntington - 0 - max negative, 32 - zero, 63 - max
12225  * positive, Medford - 0-31)
12226  */
12227 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP2  0x3
12228 /* enum: Edge DFE Tap3 (Huntington - 0 - max negative, 32 - zero, 63 - max
12229  * positive, Medford - 0-16)
12230  */
12231 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP3  0x4
12232 /* enum: Edge DFE Tap4 (Huntington - 0 - max negative, 32 - zero, 63 - max
12233  * positive, Medford - 0-16)
12234  */
12235 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP4  0x5
12236 /* enum: Edge DFE Tap5 (Huntington - 0 - max negative, 32 - zero, 63 - max
12237  * positive, Medford - 0-16)
12238  */
12239 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP5  0x6
12240 /* enum: Edge DFE DLEV (0-128 for Medford) */
12241 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_DLEV  0x7
12242 /* enum: Variable Gain Amplifier (0-15, Medford) */
12243 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_VGA  0x8
12244 /* enum: CTLE EQ Capacitor (0-15, Medford) */
12245 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_EQC  0x9
12246 /* enum: CTLE EQ Resistor (0-7, Medford) */
12247 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_EQRES  0xa
12248 /* enum: CTLE gain (0-31, Medford2) */
12249 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_GAIN  0xb
12250 /* enum: CTLE pole (0-31, Medford2) */
12251 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_POLE  0xc
12252 /* enum: CTLE peaking (0-31, Medford2) */
12253 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_PEAK  0xd
12254 /* enum: DFE Tap1 - even path (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12255 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP1_EVEN  0xe
12256 /* enum: DFE Tap1 - odd path (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12257 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP1_ODD  0xf
12258 /* enum: DFE Tap2 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12259 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP2  0x10
12260 /* enum: DFE Tap3 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12261 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP3  0x11
12262 /* enum: DFE Tap4 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12263 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP4  0x12
12264 /* enum: DFE Tap5 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12265 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP5  0x13
12266 /* enum: DFE Tap6 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12267 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP6  0x14
12268 /* enum: DFE Tap7 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12269 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP7  0x15
12270 /* enum: DFE Tap8 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12271 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP8  0x16
12272 /* enum: DFE Tap9 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12273 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP9  0x17
12274 /* enum: DFE Tap10 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12275 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP10  0x18
12276 /* enum: DFE Tap11 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12277 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP11  0x19
12278 /* enum: DFE Tap12 (Medford2 - 0-63, sign-magnitude (-31 - +31)) */
12279 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP12  0x1a
12280 /* enum: I/Q clk offset (Medford2 - 0-5, sign-magnitude (-5 - +5)) */
12281 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_IQ_OFF  0x1b
12282 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8
12283 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 3
12284 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_0  0x0 /* enum */
12285 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_1  0x1 /* enum */
12286 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_2  0x2 /* enum */
12287 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_3  0x3 /* enum */
12288 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_ALL  0x4 /* enum */
12289 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_LBN 11
12290 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_WIDTH 1
12291 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_LBN 12
12292 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_WIDTH 4
12293 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_LBN 16
12294 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_WIDTH 8
12295 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_LBN 24
12296 #define MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8
12297
12298 /* MC_CMD_KR_TUNE_RXEQ_SET_IN msgrequest */
12299 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMIN 8
12300 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMAX 252
12301 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_LEN(num) (4+4*(num))
12302 /* Requested operation */
12303 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_OP_OFST 0
12304 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_OP_LEN 1
12305 /* Align the arguments to 32 bits */
12306 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_RSVD_OFST 1
12307 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_RSVD_LEN 3
12308 /* RXEQ Parameter */
12309 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_OFST 4
12310 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LEN 4
12311 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MINNUM 1
12312 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MAXNUM 62
12313 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_LBN 0
12314 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_WIDTH 8
12315 /*             Enum values, see field(s): */
12316 /*                MC_CMD_KR_TUNE_RXEQ_GET_OUT/PARAM_ID */
12317 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_LBN 8
12318 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_WIDTH 3
12319 /*             Enum values, see field(s): */
12320 /*                MC_CMD_KR_TUNE_RXEQ_GET_OUT/PARAM_LANE */
12321 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_LBN 11
12322 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_WIDTH 1
12323 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_LBN 12
12324 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_WIDTH 4
12325 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_LBN 16
12326 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_WIDTH 8
12327 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_LBN 24
12328 #define MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_WIDTH 8
12329
12330 /* MC_CMD_KR_TUNE_RXEQ_SET_OUT msgresponse */
12331 #define MC_CMD_KR_TUNE_RXEQ_SET_OUT_LEN 0
12332
12333 /* MC_CMD_KR_TUNE_TXEQ_GET_IN msgrequest */
12334 #define MC_CMD_KR_TUNE_TXEQ_GET_IN_LEN 4
12335 /* Requested operation */
12336 #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_OP_OFST 0
12337 #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_OP_LEN 1
12338 /* Align the arguments to 32 bits */
12339 #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_RSVD_OFST 1
12340 #define MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_RSVD_LEN 3
12341
12342 /* MC_CMD_KR_TUNE_TXEQ_GET_OUT msgresponse */
12343 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMIN 4
12344 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMAX 252
12345 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LEN(num) (0+4*(num))
12346 /* TXEQ Parameter */
12347 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_OFST 0
12348 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LEN 4
12349 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MINNUM 1
12350 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM 63
12351 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_LBN 0
12352 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_WIDTH 8
12353 /* enum: TX Amplitude (Huntington, Medford, Medford2) */
12354 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV  0x0
12355 /* enum: De-Emphasis Tap1 Magnitude (0-7) (Huntington) */
12356 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_MODE  0x1
12357 /* enum: De-Emphasis Tap1 Fine */
12358 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_DTLEV  0x2
12359 /* enum: De-Emphasis Tap2 Magnitude (0-6) (Huntington) */
12360 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_D2  0x3
12361 /* enum: De-Emphasis Tap2 Fine (Huntington) */
12362 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_D2TLEV  0x4
12363 /* enum: Pre-Emphasis Magnitude (Huntington) */
12364 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_E  0x5
12365 /* enum: Pre-Emphasis Fine (Huntington) */
12366 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_ETLEV  0x6
12367 /* enum: TX Slew Rate Coarse control (Huntington) */
12368 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_PREDRV_DLY  0x7
12369 /* enum: TX Slew Rate Fine control (Huntington) */
12370 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_SR_SET  0x8
12371 /* enum: TX Termination Impedance control (Huntington) */
12372 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_RT_SET  0x9
12373 /* enum: TX Amplitude Fine control (Medford) */
12374 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV_FINE  0xa
12375 /* enum: Pre-shoot Tap (Medford, Medford2) */
12376 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_ADV  0xb
12377 /* enum: De-emphasis Tap (Medford, Medford2) */
12378 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_DLY  0xc
12379 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_LBN 8
12380 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_WIDTH 3
12381 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_0  0x0 /* enum */
12382 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_1  0x1 /* enum */
12383 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_2  0x2 /* enum */
12384 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_3  0x3 /* enum */
12385 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_ALL  0x4 /* enum */
12386 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_LBN 11
12387 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_WIDTH 5
12388 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_LBN 16
12389 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_WIDTH 8
12390 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_LBN 24
12391 #define MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_WIDTH 8
12392
12393 /* MC_CMD_KR_TUNE_TXEQ_SET_IN msgrequest */
12394 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMIN 8
12395 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMAX 252
12396 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_LEN(num) (4+4*(num))
12397 /* Requested operation */
12398 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_OP_OFST 0
12399 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_OP_LEN 1
12400 /* Align the arguments to 32 bits */
12401 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_RSVD_OFST 1
12402 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_RSVD_LEN 3
12403 /* TXEQ Parameter */
12404 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_OFST 4
12405 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LEN 4
12406 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MINNUM 1
12407 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MAXNUM 62
12408 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_LBN 0
12409 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_WIDTH 8
12410 /*             Enum values, see field(s): */
12411 /*                MC_CMD_KR_TUNE_TXEQ_GET_OUT/PARAM_ID */
12412 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_LBN 8
12413 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_WIDTH 3
12414 /*             Enum values, see field(s): */
12415 /*                MC_CMD_KR_TUNE_TXEQ_GET_OUT/PARAM_LANE */
12416 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_LBN 11
12417 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_WIDTH 5
12418 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_LBN 16
12419 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_WIDTH 8
12420 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_LBN 24
12421 #define MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_WIDTH 8
12422
12423 /* MC_CMD_KR_TUNE_TXEQ_SET_OUT msgresponse */
12424 #define MC_CMD_KR_TUNE_TXEQ_SET_OUT_LEN 0
12425
12426 /* MC_CMD_KR_TUNE_RECAL_IN msgrequest */
12427 #define MC_CMD_KR_TUNE_RECAL_IN_LEN 4
12428 /* Requested operation */
12429 #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_OP_OFST 0
12430 #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_OP_LEN 1
12431 /* Align the arguments to 32 bits */
12432 #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_RSVD_OFST 1
12433 #define MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_RSVD_LEN 3
12434
12435 /* MC_CMD_KR_TUNE_RECAL_OUT msgresponse */
12436 #define MC_CMD_KR_TUNE_RECAL_OUT_LEN 0
12437
12438 /* MC_CMD_KR_TUNE_START_EYE_PLOT_IN msgrequest */
12439 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LEN 8
12440 /* Requested operation */
12441 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_OP_OFST 0
12442 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_OP_LEN 1
12443 /* Align the arguments to 32 bits */
12444 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_RSVD_OFST 1
12445 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_RSVD_LEN 3
12446 /* Port-relative lane to scan eye on */
12447 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LANE_OFST 4
12448 #define MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LANE_LEN 4
12449
12450 /* MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN msgrequest */
12451 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LEN 12
12452 /* Requested operation */
12453 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_OP_OFST 0
12454 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_OP_LEN 1
12455 /* Align the arguments to 32 bits */
12456 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_RSVD_OFST 1
12457 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_RSVD_LEN 3
12458 /* Port-relative lane to scan eye on */
12459 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_OFST 4
12460 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_LEN 4
12461 /* Scan duration / cycle count */
12462 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_BER_OFST 8
12463 #define MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_BER_LEN 4
12464
12465 /* MC_CMD_KR_TUNE_START_EYE_PLOT_OUT msgresponse */
12466 #define MC_CMD_KR_TUNE_START_EYE_PLOT_OUT_LEN 0
12467
12468 /* MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN msgrequest */
12469 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_LEN 4
12470 /* Requested operation */
12471 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_OP_OFST 0
12472 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_OP_LEN 1
12473 /* Align the arguments to 32 bits */
12474 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_RSVD_OFST 1
12475 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_RSVD_LEN 3
12476
12477 /* MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT msgresponse */
12478 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMIN 0
12479 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMAX 252
12480 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LEN(num) (0+2*(num))
12481 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_OFST 0
12482 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_LEN 2
12483 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MINNUM 0
12484 #define MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM 126
12485
12486 /* MC_CMD_KR_TUNE_READ_FOM_IN msgrequest */
12487 #define MC_CMD_KR_TUNE_READ_FOM_IN_LEN 8
12488 /* Requested operation */
12489 #define MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_OP_OFST 0
12490 #define MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_OP_LEN 1
12491 /* Align the arguments to 32 bits */
12492 #define MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_RSVD_OFST 1
12493 #define MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_RSVD_LEN 3
12494 #define MC_CMD_KR_TUNE_READ_FOM_IN_LANE_OFST 4
12495 #define MC_CMD_KR_TUNE_READ_FOM_IN_LANE_LEN 4
12496
12497 /* MC_CMD_KR_TUNE_READ_FOM_OUT msgresponse */
12498 #define MC_CMD_KR_TUNE_READ_FOM_OUT_LEN 4
12499 #define MC_CMD_KR_TUNE_READ_FOM_OUT_FOM_OFST 0
12500 #define MC_CMD_KR_TUNE_READ_FOM_OUT_FOM_LEN 4
12501
12502
12503 /***********************************/
12504 /* MC_CMD_PCIE_TUNE
12505  * Get or set PCIE Serdes RXEQ and TX Driver settings
12506  */
12507 #define MC_CMD_PCIE_TUNE 0xf2
12508 #undef  MC_CMD_0xf2_PRIVILEGE_CTG
12509
12510 #define MC_CMD_0xf2_PRIVILEGE_CTG SRIOV_CTG_ADMIN
12511
12512 /* MC_CMD_PCIE_TUNE_IN msgrequest */
12513 #define MC_CMD_PCIE_TUNE_IN_LENMIN 4
12514 #define MC_CMD_PCIE_TUNE_IN_LENMAX 252
12515 #define MC_CMD_PCIE_TUNE_IN_LEN(num) (4+4*(num))
12516 /* Requested operation */
12517 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_OP_OFST 0
12518 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_OP_LEN 1
12519 /* enum: Get current RXEQ settings */
12520 #define MC_CMD_PCIE_TUNE_IN_RXEQ_GET  0x0
12521 /* enum: Override RXEQ settings */
12522 #define MC_CMD_PCIE_TUNE_IN_RXEQ_SET  0x1
12523 /* enum: Get current TX Driver settings */
12524 #define MC_CMD_PCIE_TUNE_IN_TXEQ_GET  0x2
12525 /* enum: Override TX Driver settings */
12526 #define MC_CMD_PCIE_TUNE_IN_TXEQ_SET  0x3
12527 /* enum: Start PCIe Serdes Eye diagram plot on a given lane. */
12528 #define MC_CMD_PCIE_TUNE_IN_START_EYE_PLOT  0x5
12529 /* enum: Poll PCIe Serdes Eye diagram plot. Returns one row of BER data. The
12530  * caller should call this command repeatedly after starting eye plot, until no
12531  * more data is returned.
12532  */
12533 #define MC_CMD_PCIE_TUNE_IN_POLL_EYE_PLOT  0x6
12534 /* enum: Enable the SERDES BIST and set it to generate a 200MHz square wave */
12535 #define MC_CMD_PCIE_TUNE_IN_BIST_SQUARE_WAVE  0x7
12536 /* Align the arguments to 32 bits */
12537 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_RSVD_OFST 1
12538 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_RSVD_LEN 3
12539 /* Arguments specific to the operation */
12540 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_OFST 4
12541 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_LEN 4
12542 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MINNUM 0
12543 #define MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MAXNUM 62
12544
12545 /* MC_CMD_PCIE_TUNE_OUT msgresponse */
12546 #define MC_CMD_PCIE_TUNE_OUT_LEN 0
12547
12548 /* MC_CMD_PCIE_TUNE_RXEQ_GET_IN msgrequest */
12549 #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_LEN 4
12550 /* Requested operation */
12551 #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_OP_OFST 0
12552 #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_OP_LEN 1
12553 /* Align the arguments to 32 bits */
12554 #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_RSVD_OFST 1
12555 #define MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_RSVD_LEN 3
12556
12557 /* MC_CMD_PCIE_TUNE_RXEQ_GET_OUT msgresponse */
12558 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMIN 4
12559 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMAX 252
12560 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LEN(num) (0+4*(num))
12561 /* RXEQ Parameter */
12562 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_OFST 0
12563 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LEN 4
12564 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MINNUM 1
12565 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM 63
12566 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_LBN 0
12567 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_WIDTH 8
12568 /* enum: Attenuation (0-15) */
12569 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_ATT  0x0
12570 /* enum: CTLE Boost (0-15) */
12571 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_BOOST  0x1
12572 /* enum: DFE Tap1 (0 - max negative, 64 - zero, 127 - max positive) */
12573 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP1  0x2
12574 /* enum: DFE Tap2 (0 - max negative, 32 - zero, 63 - max positive) */
12575 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP2  0x3
12576 /* enum: DFE Tap3 (0 - max negative, 32 - zero, 63 - max positive) */
12577 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP3  0x4
12578 /* enum: DFE Tap4 (0 - max negative, 32 - zero, 63 - max positive) */
12579 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP4  0x5
12580 /* enum: DFE Tap5 (0 - max negative, 32 - zero, 63 - max positive) */
12581 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP5  0x6
12582 /* enum: DFE DLev */
12583 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_DLEV  0x7
12584 /* enum: Figure of Merit */
12585 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_FOM  0x8
12586 /* enum: CTLE EQ Capacitor (HF Gain) */
12587 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_CTLE_EQC  0x9
12588 /* enum: CTLE EQ Resistor (DC Gain) */
12589 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_CTLE_EQRES  0xa
12590 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8
12591 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 5
12592 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_0  0x0 /* enum */
12593 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_1  0x1 /* enum */
12594 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_2  0x2 /* enum */
12595 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_3  0x3 /* enum */
12596 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_4  0x4 /* enum */
12597 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_5  0x5 /* enum */
12598 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_6  0x6 /* enum */
12599 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_7  0x7 /* enum */
12600 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_8  0x8 /* enum */
12601 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_9  0x9 /* enum */
12602 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_10  0xa /* enum */
12603 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_11  0xb /* enum */
12604 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_12  0xc /* enum */
12605 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_13  0xd /* enum */
12606 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_14  0xe /* enum */
12607 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_15  0xf /* enum */
12608 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_ALL  0x10 /* enum */
12609 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_LBN 13
12610 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_WIDTH 1
12611 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_LBN 14
12612 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_WIDTH 10
12613 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_LBN 24
12614 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8
12615
12616 /* MC_CMD_PCIE_TUNE_RXEQ_SET_IN msgrequest */
12617 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LENMIN 8
12618 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LENMAX 252
12619 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LEN(num) (4+4*(num))
12620 /* Requested operation */
12621 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_OP_OFST 0
12622 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_OP_LEN 1
12623 /* Align the arguments to 32 bits */
12624 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_RSVD_OFST 1
12625 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_RSVD_LEN 3
12626 /* RXEQ Parameter */
12627 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_OFST 4
12628 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LEN 4
12629 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_MINNUM 1
12630 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_MAXNUM 62
12631 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_ID_LBN 0
12632 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_ID_WIDTH 8
12633 /*             Enum values, see field(s): */
12634 /*                MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_ID */
12635 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LANE_LBN 8
12636 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LANE_WIDTH 5
12637 /*             Enum values, see field(s): */
12638 /*                MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_LANE */
12639 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_LBN 13
12640 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_WIDTH 1
12641 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED_LBN 14
12642 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED_WIDTH 2
12643 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_INITIAL_LBN 16
12644 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_INITIAL_WIDTH 8
12645 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED2_LBN 24
12646 #define MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED2_WIDTH 8
12647
12648 /* MC_CMD_PCIE_TUNE_RXEQ_SET_OUT msgresponse */
12649 #define MC_CMD_PCIE_TUNE_RXEQ_SET_OUT_LEN 0
12650
12651 /* MC_CMD_PCIE_TUNE_TXEQ_GET_IN msgrequest */
12652 #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_LEN 4
12653 /* Requested operation */
12654 #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_OP_OFST 0
12655 #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_OP_LEN 1
12656 /* Align the arguments to 32 bits */
12657 #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_RSVD_OFST 1
12658 #define MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_RSVD_LEN 3
12659
12660 /* MC_CMD_PCIE_TUNE_TXEQ_GET_OUT msgresponse */
12661 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMIN 4
12662 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMAX 252
12663 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LEN(num) (0+4*(num))
12664 /* RXEQ Parameter */
12665 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_OFST 0
12666 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LEN 4
12667 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MINNUM 1
12668 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM 63
12669 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_LBN 0
12670 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_WIDTH 8
12671 /* enum: TxMargin (PIPE) */
12672 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_TXMARGIN  0x0
12673 /* enum: TxSwing (PIPE) */
12674 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_TXSWING  0x1
12675 /* enum: De-emphasis coefficient C(-1) (PIPE) */
12676 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_CM1  0x2
12677 /* enum: De-emphasis coefficient C(0) (PIPE) */
12678 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_C0  0x3
12679 /* enum: De-emphasis coefficient C(+1) (PIPE) */
12680 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_CP1  0x4
12681 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_LBN 8
12682 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_WIDTH 4
12683 /*             Enum values, see field(s): */
12684 /*                MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_LANE */
12685 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_LBN 12
12686 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_WIDTH 12
12687 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_LBN 24
12688 #define MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8
12689
12690 /* MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN msgrequest */
12691 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LEN 8
12692 /* Requested operation */
12693 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_OP_OFST 0
12694 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_OP_LEN 1
12695 /* Align the arguments to 32 bits */
12696 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_RSVD_OFST 1
12697 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_RSVD_LEN 3
12698 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LANE_OFST 4
12699 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LANE_LEN 4
12700
12701 /* MC_CMD_PCIE_TUNE_START_EYE_PLOT_OUT msgresponse */
12702 #define MC_CMD_PCIE_TUNE_START_EYE_PLOT_OUT_LEN 0
12703
12704 /* MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN msgrequest */
12705 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_LEN 4
12706 /* Requested operation */
12707 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_OP_OFST 0
12708 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_OP_LEN 1
12709 /* Align the arguments to 32 bits */
12710 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_RSVD_OFST 1
12711 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_RSVD_LEN 3
12712
12713 /* MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT msgresponse */
12714 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMIN 0
12715 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMAX 252
12716 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LEN(num) (0+2*(num))
12717 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_OFST 0
12718 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_LEN 2
12719 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MINNUM 0
12720 #define MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM 126
12721
12722 /* MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_IN msgrequest */
12723 #define MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_IN_LEN 0
12724
12725 /* MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_OUT msgrequest */
12726 #define MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_OUT_LEN 0
12727
12728
12729 /***********************************/
12730 /* MC_CMD_LICENSING
12731  * Operations on the NVRAM_PARTITION_TYPE_LICENSE application license partition
12732  * - not used for V3 licensing
12733  */
12734 #define MC_CMD_LICENSING 0xf3
12735 #undef  MC_CMD_0xf3_PRIVILEGE_CTG
12736
12737 #define MC_CMD_0xf3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12738
12739 /* MC_CMD_LICENSING_IN msgrequest */
12740 #define MC_CMD_LICENSING_IN_LEN 4
12741 /* identifies the type of operation requested */
12742 #define MC_CMD_LICENSING_IN_OP_OFST 0
12743 #define MC_CMD_LICENSING_IN_OP_LEN 4
12744 /* enum: re-read and apply licenses after a license key partition update; note
12745  * that this operation returns a zero-length response
12746  */
12747 #define MC_CMD_LICENSING_IN_OP_UPDATE_LICENSE  0x0
12748 /* enum: report counts of installed licenses */
12749 #define MC_CMD_LICENSING_IN_OP_GET_KEY_STATS  0x1
12750
12751 /* MC_CMD_LICENSING_OUT msgresponse */
12752 #define MC_CMD_LICENSING_OUT_LEN 28
12753 /* count of application keys which are valid */
12754 #define MC_CMD_LICENSING_OUT_VALID_APP_KEYS_OFST 0
12755 #define MC_CMD_LICENSING_OUT_VALID_APP_KEYS_LEN 4
12756 /* sum of UNVERIFIABLE_APP_KEYS + WRONG_NODE_APP_KEYS (for compatibility with
12757  * MC_CMD_FC_OP_LICENSE)
12758  */
12759 #define MC_CMD_LICENSING_OUT_INVALID_APP_KEYS_OFST 4
12760 #define MC_CMD_LICENSING_OUT_INVALID_APP_KEYS_LEN 4
12761 /* count of application keys which are invalid due to being blacklisted */
12762 #define MC_CMD_LICENSING_OUT_BLACKLISTED_APP_KEYS_OFST 8
12763 #define MC_CMD_LICENSING_OUT_BLACKLISTED_APP_KEYS_LEN 4
12764 /* count of application keys which are invalid due to being unverifiable */
12765 #define MC_CMD_LICENSING_OUT_UNVERIFIABLE_APP_KEYS_OFST 12
12766 #define MC_CMD_LICENSING_OUT_UNVERIFIABLE_APP_KEYS_LEN 4
12767 /* count of application keys which are invalid due to being for the wrong node
12768  */
12769 #define MC_CMD_LICENSING_OUT_WRONG_NODE_APP_KEYS_OFST 16
12770 #define MC_CMD_LICENSING_OUT_WRONG_NODE_APP_KEYS_LEN 4
12771 /* licensing state (for diagnostics; the exact meaning of the bits in this
12772  * field are private to the firmware)
12773  */
12774 #define MC_CMD_LICENSING_OUT_LICENSING_STATE_OFST 20
12775 #define MC_CMD_LICENSING_OUT_LICENSING_STATE_LEN 4
12776 /* licensing subsystem self-test report (for manftest) */
12777 #define MC_CMD_LICENSING_OUT_LICENSING_SELF_TEST_OFST 24
12778 #define MC_CMD_LICENSING_OUT_LICENSING_SELF_TEST_LEN 4
12779 /* enum: licensing subsystem self-test failed */
12780 #define MC_CMD_LICENSING_OUT_SELF_TEST_FAIL  0x0
12781 /* enum: licensing subsystem self-test passed */
12782 #define MC_CMD_LICENSING_OUT_SELF_TEST_PASS  0x1
12783
12784
12785 /***********************************/
12786 /* MC_CMD_LICENSING_V3
12787  * Operations on the NVRAM_PARTITION_TYPE_LICENSE application license partition
12788  * - V3 licensing (Medford)
12789  */
12790 #define MC_CMD_LICENSING_V3 0xd0
12791 #undef  MC_CMD_0xd0_PRIVILEGE_CTG
12792
12793 #define MC_CMD_0xd0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12794
12795 /* MC_CMD_LICENSING_V3_IN msgrequest */
12796 #define MC_CMD_LICENSING_V3_IN_LEN 4
12797 /* identifies the type of operation requested */
12798 #define MC_CMD_LICENSING_V3_IN_OP_OFST 0
12799 #define MC_CMD_LICENSING_V3_IN_OP_LEN 4
12800 /* enum: re-read and apply licenses after a license key partition update; note
12801  * that this operation returns a zero-length response
12802  */
12803 #define MC_CMD_LICENSING_V3_IN_OP_UPDATE_LICENSE  0x0
12804 /* enum: report counts of installed licenses Returns EAGAIN if license
12805  * processing (updating) has been started but not yet completed.
12806  */
12807 #define MC_CMD_LICENSING_V3_IN_OP_REPORT_LICENSE  0x1
12808
12809 /* MC_CMD_LICENSING_V3_OUT msgresponse */
12810 #define MC_CMD_LICENSING_V3_OUT_LEN 88
12811 /* count of keys which are valid */
12812 #define MC_CMD_LICENSING_V3_OUT_VALID_KEYS_OFST 0
12813 #define MC_CMD_LICENSING_V3_OUT_VALID_KEYS_LEN 4
12814 /* sum of UNVERIFIABLE_KEYS + WRONG_NODE_KEYS (for compatibility with
12815  * MC_CMD_FC_OP_LICENSE)
12816  */
12817 #define MC_CMD_LICENSING_V3_OUT_INVALID_KEYS_OFST 4
12818 #define MC_CMD_LICENSING_V3_OUT_INVALID_KEYS_LEN 4
12819 /* count of keys which are invalid due to being unverifiable */
12820 #define MC_CMD_LICENSING_V3_OUT_UNVERIFIABLE_KEYS_OFST 8
12821 #define MC_CMD_LICENSING_V3_OUT_UNVERIFIABLE_KEYS_LEN 4
12822 /* count of keys which are invalid due to being for the wrong node */
12823 #define MC_CMD_LICENSING_V3_OUT_WRONG_NODE_KEYS_OFST 12
12824 #define MC_CMD_LICENSING_V3_OUT_WRONG_NODE_KEYS_LEN 4
12825 /* licensing state (for diagnostics; the exact meaning of the bits in this
12826  * field are private to the firmware)
12827  */
12828 #define MC_CMD_LICENSING_V3_OUT_LICENSING_STATE_OFST 16
12829 #define MC_CMD_LICENSING_V3_OUT_LICENSING_STATE_LEN 4
12830 /* licensing subsystem self-test report (for manftest) */
12831 #define MC_CMD_LICENSING_V3_OUT_LICENSING_SELF_TEST_OFST 20
12832 #define MC_CMD_LICENSING_V3_OUT_LICENSING_SELF_TEST_LEN 4
12833 /* enum: licensing subsystem self-test failed */
12834 #define MC_CMD_LICENSING_V3_OUT_SELF_TEST_FAIL  0x0
12835 /* enum: licensing subsystem self-test passed */
12836 #define MC_CMD_LICENSING_V3_OUT_SELF_TEST_PASS  0x1
12837 /* bitmask of licensed applications */
12838 #define MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_OFST 24
12839 #define MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_LEN 8
12840 #define MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_LO_OFST 24
12841 #define MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_HI_OFST 28
12842 /* reserved for future use */
12843 #define MC_CMD_LICENSING_V3_OUT_RESERVED_0_OFST 32
12844 #define MC_CMD_LICENSING_V3_OUT_RESERVED_0_LEN 24
12845 /* bitmask of licensed features */
12846 #define MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_OFST 56
12847 #define MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_LEN 8
12848 #define MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_LO_OFST 56
12849 #define MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_HI_OFST 60
12850 /* reserved for future use */
12851 #define MC_CMD_LICENSING_V3_OUT_RESERVED_1_OFST 64
12852 #define MC_CMD_LICENSING_V3_OUT_RESERVED_1_LEN 24
12853
12854
12855 /***********************************/
12856 /* MC_CMD_LICENSING_GET_ID_V3
12857  * Get ID and type from the NVRAM_PARTITION_TYPE_LICENSE application license
12858  * partition - V3 licensing (Medford)
12859  */
12860 #define MC_CMD_LICENSING_GET_ID_V3 0xd1
12861 #undef  MC_CMD_0xd1_PRIVILEGE_CTG
12862
12863 #define MC_CMD_0xd1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12864
12865 /* MC_CMD_LICENSING_GET_ID_V3_IN msgrequest */
12866 #define MC_CMD_LICENSING_GET_ID_V3_IN_LEN 0
12867
12868 /* MC_CMD_LICENSING_GET_ID_V3_OUT msgresponse */
12869 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN 8
12870 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX 252
12871 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LEN(num) (8+1*(num))
12872 /* type of license (eg 3) */
12873 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_TYPE_OFST 0
12874 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_TYPE_LEN 4
12875 /* length of the license ID (in bytes) */
12876 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH_OFST 4
12877 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH_LEN 4
12878 /* the unique license ID of the adapter */
12879 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST 8
12880 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_LEN 1
12881 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_MINNUM 0
12882 #define MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_MAXNUM 244
12883
12884
12885 /***********************************/
12886 /* MC_CMD_MC2MC_PROXY
12887  * Execute an arbitrary MCDI command on the slave MC of a dual-core device.
12888  * This will fail on a single-core system.
12889  */
12890 #define MC_CMD_MC2MC_PROXY 0xf4
12891 #undef  MC_CMD_0xf4_PRIVILEGE_CTG
12892
12893 #define MC_CMD_0xf4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12894
12895 /* MC_CMD_MC2MC_PROXY_IN msgrequest */
12896 #define MC_CMD_MC2MC_PROXY_IN_LEN 0
12897
12898 /* MC_CMD_MC2MC_PROXY_OUT msgresponse */
12899 #define MC_CMD_MC2MC_PROXY_OUT_LEN 0
12900
12901
12902 /***********************************/
12903 /* MC_CMD_GET_LICENSED_APP_STATE
12904  * Query the state of an individual licensed application. (Note that the actual
12905  * state may be invalidated by the MC_CMD_LICENSING OP_UPDATE_LICENSE operation
12906  * or a reboot of the MC.) Not used for V3 licensing
12907  */
12908 #define MC_CMD_GET_LICENSED_APP_STATE 0xf5
12909 #undef  MC_CMD_0xf5_PRIVILEGE_CTG
12910
12911 #define MC_CMD_0xf5_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12912
12913 /* MC_CMD_GET_LICENSED_APP_STATE_IN msgrequest */
12914 #define MC_CMD_GET_LICENSED_APP_STATE_IN_LEN 4
12915 /* application ID to query (LICENSED_APP_ID_xxx) */
12916 #define MC_CMD_GET_LICENSED_APP_STATE_IN_APP_ID_OFST 0
12917 #define MC_CMD_GET_LICENSED_APP_STATE_IN_APP_ID_LEN 4
12918
12919 /* MC_CMD_GET_LICENSED_APP_STATE_OUT msgresponse */
12920 #define MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN 4
12921 /* state of this application */
12922 #define MC_CMD_GET_LICENSED_APP_STATE_OUT_STATE_OFST 0
12923 #define MC_CMD_GET_LICENSED_APP_STATE_OUT_STATE_LEN 4
12924 /* enum: no (or invalid) license is present for the application */
12925 #define MC_CMD_GET_LICENSED_APP_STATE_OUT_NOT_LICENSED  0x0
12926 /* enum: a valid license is present for the application */
12927 #define MC_CMD_GET_LICENSED_APP_STATE_OUT_LICENSED  0x1
12928
12929
12930 /***********************************/
12931 /* MC_CMD_GET_LICENSED_V3_APP_STATE
12932  * Query the state of an individual licensed application. (Note that the actual
12933  * state may be invalidated by the MC_CMD_LICENSING_V3 OP_UPDATE_LICENSE
12934  * operation or a reboot of the MC.) Used for V3 licensing (Medford)
12935  */
12936 #define MC_CMD_GET_LICENSED_V3_APP_STATE 0xd2
12937 #undef  MC_CMD_0xd2_PRIVILEGE_CTG
12938
12939 #define MC_CMD_0xd2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12940
12941 /* MC_CMD_GET_LICENSED_V3_APP_STATE_IN msgrequest */
12942 #define MC_CMD_GET_LICENSED_V3_APP_STATE_IN_LEN 8
12943 /* application ID to query (LICENSED_V3_APPS_xxx) expressed as a single bit
12944  * mask
12945  */
12946 #define MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_OFST 0
12947 #define MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_LEN 8
12948 #define MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_LO_OFST 0
12949 #define MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_HI_OFST 4
12950
12951 /* MC_CMD_GET_LICENSED_V3_APP_STATE_OUT msgresponse */
12952 #define MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN 4
12953 /* state of this application */
12954 #define MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_STATE_OFST 0
12955 #define MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_STATE_LEN 4
12956 /* enum: no (or invalid) license is present for the application */
12957 #define MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_NOT_LICENSED  0x0
12958 /* enum: a valid license is present for the application */
12959 #define MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LICENSED  0x1
12960
12961
12962 /***********************************/
12963 /* MC_CMD_GET_LICENSED_V3_FEATURE_STATES
12964  * Query the state of an one or more licensed features. (Note that the actual
12965  * state may be invalidated by the MC_CMD_LICENSING_V3 OP_UPDATE_LICENSE
12966  * operation or a reboot of the MC.) Used for V3 licensing (Medford)
12967  */
12968 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES 0xd3
12969 #undef  MC_CMD_0xd3_PRIVILEGE_CTG
12970
12971 #define MC_CMD_0xd3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
12972
12973 /* MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN msgrequest */
12974 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_LEN 8
12975 /* features to query (LICENSED_V3_FEATURES_xxx) expressed as a mask with one or
12976  * more bits set
12977  */
12978 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_OFST 0
12979 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_LEN 8
12980 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_LO_OFST 0
12981 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_HI_OFST 4
12982
12983 /* MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT msgresponse */
12984 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_LEN 8
12985 /* states of these features - bit set for licensed, clear for not licensed */
12986 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_OFST 0
12987 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_LEN 8
12988 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_LO_OFST 0
12989 #define MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_HI_OFST 4
12990
12991
12992 /***********************************/
12993 /* MC_CMD_LICENSED_APP_OP
12994  * Perform an action for an individual licensed application - not used for V3
12995  * licensing.
12996  */
12997 #define MC_CMD_LICENSED_APP_OP 0xf6
12998 #undef  MC_CMD_0xf6_PRIVILEGE_CTG
12999
13000 #define MC_CMD_0xf6_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13001
13002 /* MC_CMD_LICENSED_APP_OP_IN msgrequest */
13003 #define MC_CMD_LICENSED_APP_OP_IN_LENMIN 8
13004 #define MC_CMD_LICENSED_APP_OP_IN_LENMAX 252
13005 #define MC_CMD_LICENSED_APP_OP_IN_LEN(num) (8+4*(num))
13006 /* application ID */
13007 #define MC_CMD_LICENSED_APP_OP_IN_APP_ID_OFST 0
13008 #define MC_CMD_LICENSED_APP_OP_IN_APP_ID_LEN 4
13009 /* the type of operation requested */
13010 #define MC_CMD_LICENSED_APP_OP_IN_OP_OFST 4
13011 #define MC_CMD_LICENSED_APP_OP_IN_OP_LEN 4
13012 /* enum: validate application */
13013 #define MC_CMD_LICENSED_APP_OP_IN_OP_VALIDATE  0x0
13014 /* enum: mask application */
13015 #define MC_CMD_LICENSED_APP_OP_IN_OP_MASK  0x1
13016 /* arguments specific to this particular operation */
13017 #define MC_CMD_LICENSED_APP_OP_IN_ARGS_OFST 8
13018 #define MC_CMD_LICENSED_APP_OP_IN_ARGS_LEN 4
13019 #define MC_CMD_LICENSED_APP_OP_IN_ARGS_MINNUM 0
13020 #define MC_CMD_LICENSED_APP_OP_IN_ARGS_MAXNUM 61
13021
13022 /* MC_CMD_LICENSED_APP_OP_OUT msgresponse */
13023 #define MC_CMD_LICENSED_APP_OP_OUT_LENMIN 0
13024 #define MC_CMD_LICENSED_APP_OP_OUT_LENMAX 252
13025 #define MC_CMD_LICENSED_APP_OP_OUT_LEN(num) (0+4*(num))
13026 /* result specific to this particular operation */
13027 #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_OFST 0
13028 #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_LEN 4
13029 #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_MINNUM 0
13030 #define MC_CMD_LICENSED_APP_OP_OUT_RESULT_MAXNUM 63
13031
13032 /* MC_CMD_LICENSED_APP_OP_VALIDATE_IN msgrequest */
13033 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_LEN 72
13034 /* application ID */
13035 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_APP_ID_OFST 0
13036 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_APP_ID_LEN 4
13037 /* the type of operation requested */
13038 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_OP_OFST 4
13039 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_OP_LEN 4
13040 /* validation challenge */
13041 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_CHALLENGE_OFST 8
13042 #define MC_CMD_LICENSED_APP_OP_VALIDATE_IN_CHALLENGE_LEN 64
13043
13044 /* MC_CMD_LICENSED_APP_OP_VALIDATE_OUT msgresponse */
13045 #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_LEN 68
13046 /* feature expiry (time_t) */
13047 #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_EXPIRY_OFST 0
13048 #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_EXPIRY_LEN 4
13049 /* validation response */
13050 #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_RESPONSE_OFST 4
13051 #define MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_RESPONSE_LEN 64
13052
13053 /* MC_CMD_LICENSED_APP_OP_MASK_IN msgrequest */
13054 #define MC_CMD_LICENSED_APP_OP_MASK_IN_LEN 12
13055 /* application ID */
13056 #define MC_CMD_LICENSED_APP_OP_MASK_IN_APP_ID_OFST 0
13057 #define MC_CMD_LICENSED_APP_OP_MASK_IN_APP_ID_LEN 4
13058 /* the type of operation requested */
13059 #define MC_CMD_LICENSED_APP_OP_MASK_IN_OP_OFST 4
13060 #define MC_CMD_LICENSED_APP_OP_MASK_IN_OP_LEN 4
13061 /* flag */
13062 #define MC_CMD_LICENSED_APP_OP_MASK_IN_FLAG_OFST 8
13063 #define MC_CMD_LICENSED_APP_OP_MASK_IN_FLAG_LEN 4
13064
13065 /* MC_CMD_LICENSED_APP_OP_MASK_OUT msgresponse */
13066 #define MC_CMD_LICENSED_APP_OP_MASK_OUT_LEN 0
13067
13068
13069 /***********************************/
13070 /* MC_CMD_LICENSED_V3_VALIDATE_APP
13071  * Perform validation for an individual licensed application - V3 licensing
13072  * (Medford)
13073  */
13074 #define MC_CMD_LICENSED_V3_VALIDATE_APP 0xd4
13075 #undef  MC_CMD_0xd4_PRIVILEGE_CTG
13076
13077 #define MC_CMD_0xd4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13078
13079 /* MC_CMD_LICENSED_V3_VALIDATE_APP_IN msgrequest */
13080 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_LEN 56
13081 /* challenge for validation (384 bits) */
13082 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_CHALLENGE_OFST 0
13083 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_CHALLENGE_LEN 48
13084 /* application ID expressed as a single bit mask */
13085 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_OFST 48
13086 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_LEN 8
13087 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_LO_OFST 48
13088 #define MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_HI_OFST 52
13089
13090 /* MC_CMD_LICENSED_V3_VALIDATE_APP_OUT msgresponse */
13091 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_LEN 116
13092 /* validation response to challenge in the form of ECDSA signature consisting
13093  * of two 384-bit integers, r and s, in big-endian order. The signature signs a
13094  * SHA-384 digest of a message constructed from the concatenation of the input
13095  * message and the remaining fields of this output message, e.g. challenge[48
13096  * bytes] ... expiry_time[4 bytes] ...
13097  */
13098 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_RESPONSE_OFST 0
13099 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_RESPONSE_LEN 96
13100 /* application expiry time */
13101 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_TIME_OFST 96
13102 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_TIME_LEN 4
13103 /* application expiry units */
13104 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNITS_OFST 100
13105 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNITS_LEN 4
13106 /* enum: expiry units are accounting units */
13107 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNIT_ACC  0x0
13108 /* enum: expiry units are calendar days */
13109 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNIT_DAYS  0x1
13110 /* base MAC address of the NIC stored in NVRAM (note that this is a constant
13111  * value for a given NIC regardless which function is calling, effectively this
13112  * is PF0 base MAC address)
13113  */
13114 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_BASE_MACADDR_OFST 104
13115 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_BASE_MACADDR_LEN 6
13116 /* MAC address of v-adaptor associated with the client. If no such v-adapator
13117  * exists, then the field is filled with 0xFF.
13118  */
13119 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_VADAPTOR_MACADDR_OFST 110
13120 #define MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_VADAPTOR_MACADDR_LEN 6
13121
13122
13123 /***********************************/
13124 /* MC_CMD_LICENSED_V3_MASK_FEATURES
13125  * Mask features - V3 licensing (Medford)
13126  */
13127 #define MC_CMD_LICENSED_V3_MASK_FEATURES 0xd5
13128 #undef  MC_CMD_0xd5_PRIVILEGE_CTG
13129
13130 #define MC_CMD_0xd5_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13131
13132 /* MC_CMD_LICENSED_V3_MASK_FEATURES_IN msgrequest */
13133 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_LEN 12
13134 /* mask to be applied to features to be changed */
13135 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_OFST 0
13136 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_LEN 8
13137 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_LO_OFST 0
13138 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_HI_OFST 4
13139 /* whether to turn on or turn off the masked features */
13140 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_FLAG_OFST 8
13141 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_FLAG_LEN 4
13142 /* enum: turn the features off */
13143 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_OFF  0x0
13144 /* enum: turn the features back on */
13145 #define MC_CMD_LICENSED_V3_MASK_FEATURES_IN_ON  0x1
13146
13147 /* MC_CMD_LICENSED_V3_MASK_FEATURES_OUT msgresponse */
13148 #define MC_CMD_LICENSED_V3_MASK_FEATURES_OUT_LEN 0
13149
13150
13151 /***********************************/
13152 /* MC_CMD_LICENSING_V3_TEMPORARY
13153  * Perform operations to support installation of a single temporary license in
13154  * the adapter, in addition to those found in the licensing partition. See
13155  * SF-116124-SW for an overview of how this could be used. The license is
13156  * stored in MC persistent data and so will survive a MC reboot, but will be
13157  * erased when the adapter is power cycled
13158  */
13159 #define MC_CMD_LICENSING_V3_TEMPORARY 0xd6
13160 #undef  MC_CMD_0xd6_PRIVILEGE_CTG
13161
13162 #define MC_CMD_0xd6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13163
13164 /* MC_CMD_LICENSING_V3_TEMPORARY_IN msgrequest */
13165 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_LEN 4
13166 /* operation code */
13167 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_OP_OFST 0
13168 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_OP_LEN 4
13169 /* enum: install a new license, overwriting any existing temporary license.
13170  * This is an asynchronous operation owing to the time taken to validate an
13171  * ECDSA license
13172  */
13173 #define MC_CMD_LICENSING_V3_TEMPORARY_SET  0x0
13174 /* enum: clear the license immediately rather than waiting for the next power
13175  * cycle
13176  */
13177 #define MC_CMD_LICENSING_V3_TEMPORARY_CLEAR  0x1
13178 /* enum: get the status of the asynchronous MC_CMD_LICENSING_V3_TEMPORARY_SET
13179  * operation
13180  */
13181 #define MC_CMD_LICENSING_V3_TEMPORARY_STATUS  0x2
13182
13183 /* MC_CMD_LICENSING_V3_TEMPORARY_IN_SET msgrequest */
13184 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_LEN 164
13185 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_OP_OFST 0
13186 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_OP_LEN 4
13187 /* ECDSA license and signature */
13188 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_LICENSE_OFST 4
13189 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_LICENSE_LEN 160
13190
13191 /* MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR msgrequest */
13192 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR_LEN 4
13193 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR_OP_OFST 0
13194 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR_OP_LEN 4
13195
13196 /* MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS msgrequest */
13197 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS_LEN 4
13198 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS_OP_OFST 0
13199 #define MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS_OP_LEN 4
13200
13201 /* MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS msgresponse */
13202 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LEN 12
13203 /* status code */
13204 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_STATUS_OFST 0
13205 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_STATUS_LEN 4
13206 /* enum: finished validating and installing license */
13207 #define MC_CMD_LICENSING_V3_TEMPORARY_STATUS_OK  0x0
13208 /* enum: license validation and installation in progress */
13209 #define MC_CMD_LICENSING_V3_TEMPORARY_STATUS_IN_PROGRESS  0x1
13210 /* enum: licensing error. More specific error messages are not provided to
13211  * avoid exposing details of the licensing system to the client
13212  */
13213 #define MC_CMD_LICENSING_V3_TEMPORARY_STATUS_ERROR  0x2
13214 /* bitmask of licensed features */
13215 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_OFST 4
13216 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_LEN 8
13217 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_LO_OFST 4
13218 #define MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_HI_OFST 8
13219
13220
13221 /***********************************/
13222 /* MC_CMD_SET_PORT_SNIFF_CONFIG
13223  * Configure RX port sniffing for the physical port associated with the calling
13224  * function. Only a privileged function may change the port sniffing
13225  * configuration. A copy of all traffic delivered to the host (non-promiscuous
13226  * mode) or all traffic arriving at the port (promiscuous mode) may be
13227  * delivered to a specific queue, or a set of queues with RSS.
13228  */
13229 #define MC_CMD_SET_PORT_SNIFF_CONFIG 0xf7
13230 #undef  MC_CMD_0xf7_PRIVILEGE_CTG
13231
13232 #define MC_CMD_0xf7_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13233
13234 /* MC_CMD_SET_PORT_SNIFF_CONFIG_IN msgrequest */
13235 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_LEN 16
13236 /* configuration flags */
13237 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_FLAGS_OFST 0
13238 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_FLAGS_LEN 4
13239 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_LBN 0
13240 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_WIDTH 1
13241 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_LBN 1
13242 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_WIDTH 1
13243 /* receive queue handle (for RSS mode, this is the base queue) */
13244 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_QUEUE_OFST 4
13245 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_QUEUE_LEN 4
13246 /* receive mode */
13247 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_OFST 8
13248 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_LEN 4
13249 /* enum: receive to just the specified queue */
13250 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_SIMPLE  0x0
13251 /* enum: receive to multiple queues using RSS context */
13252 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_RSS  0x1
13253 /* RSS context (for RX_MODE_RSS) as returned by MC_CMD_RSS_CONTEXT_ALLOC. Note
13254  * that these handles should be considered opaque to the host, although a value
13255  * of 0xFFFFFFFF is guaranteed never to be a valid handle.
13256  */
13257 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_OFST 12
13258 #define MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_LEN 4
13259
13260 /* MC_CMD_SET_PORT_SNIFF_CONFIG_OUT msgresponse */
13261 #define MC_CMD_SET_PORT_SNIFF_CONFIG_OUT_LEN 0
13262
13263
13264 /***********************************/
13265 /* MC_CMD_GET_PORT_SNIFF_CONFIG
13266  * Obtain the current RX port sniffing configuration for the physical port
13267  * associated with the calling function. Only a privileged function may read
13268  * the configuration.
13269  */
13270 #define MC_CMD_GET_PORT_SNIFF_CONFIG 0xf8
13271 #undef  MC_CMD_0xf8_PRIVILEGE_CTG
13272
13273 #define MC_CMD_0xf8_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13274
13275 /* MC_CMD_GET_PORT_SNIFF_CONFIG_IN msgrequest */
13276 #define MC_CMD_GET_PORT_SNIFF_CONFIG_IN_LEN 0
13277
13278 /* MC_CMD_GET_PORT_SNIFF_CONFIG_OUT msgresponse */
13279 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_LEN 16
13280 /* configuration flags */
13281 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_FLAGS_OFST 0
13282 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_FLAGS_LEN 4
13283 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_LBN 0
13284 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_WIDTH 1
13285 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_LBN 1
13286 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_WIDTH 1
13287 /* receiving queue handle (for RSS mode, this is the base queue) */
13288 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_OFST 4
13289 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_LEN 4
13290 /* receive mode */
13291 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_OFST 8
13292 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_LEN 4
13293 /* enum: receiving to just the specified queue */
13294 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_SIMPLE  0x0
13295 /* enum: receiving to multiple queues using RSS context */
13296 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_RSS  0x1
13297 /* RSS context (for RX_MODE_RSS) */
13298 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_OFST 12
13299 #define MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_LEN 4
13300
13301
13302 /***********************************/
13303 /* MC_CMD_SET_PARSER_DISP_CONFIG
13304  * Change configuration related to the parser-dispatcher subsystem.
13305  */
13306 #define MC_CMD_SET_PARSER_DISP_CONFIG 0xf9
13307 #undef  MC_CMD_0xf9_PRIVILEGE_CTG
13308
13309 #define MC_CMD_0xf9_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13310
13311 /* MC_CMD_SET_PARSER_DISP_CONFIG_IN msgrequest */
13312 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_LENMIN 12
13313 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_LENMAX 252
13314 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_LEN(num) (8+4*(num))
13315 /* the type of configuration setting to change */
13316 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_TYPE_OFST 0
13317 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_TYPE_LEN 4
13318 /* enum: Per-TXQ enable for multicast UDP destination lookup for possible
13319  * internal loopback. (ENTITY is a queue handle, VALUE is a single boolean.)
13320  */
13321 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_TXQ_MCAST_UDP_DST_LOOKUP_EN  0x0
13322 /* enum: Per-v-adaptor enable for suppression of self-transmissions on the
13323  * internal loopback path. (ENTITY is an EVB_PORT_ID, VALUE is a single
13324  * boolean.)
13325  */
13326 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_VADAPTOR_SUPPRESS_SELF_TX  0x1
13327 /* handle for the entity to update: queue handle, EVB port ID, etc. depending
13328  * on the type of configuration setting being changed
13329  */
13330 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_ENTITY_OFST 4
13331 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_ENTITY_LEN 4
13332 /* new value: the details depend on the type of configuration setting being
13333  * changed
13334  */
13335 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_OFST 8
13336 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_LEN 4
13337 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_MINNUM 1
13338 #define MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_MAXNUM 61
13339
13340 /* MC_CMD_SET_PARSER_DISP_CONFIG_OUT msgresponse */
13341 #define MC_CMD_SET_PARSER_DISP_CONFIG_OUT_LEN 0
13342
13343
13344 /***********************************/
13345 /* MC_CMD_GET_PARSER_DISP_CONFIG
13346  * Read configuration related to the parser-dispatcher subsystem.
13347  */
13348 #define MC_CMD_GET_PARSER_DISP_CONFIG 0xfa
13349 #undef  MC_CMD_0xfa_PRIVILEGE_CTG
13350
13351 #define MC_CMD_0xfa_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13352
13353 /* MC_CMD_GET_PARSER_DISP_CONFIG_IN msgrequest */
13354 #define MC_CMD_GET_PARSER_DISP_CONFIG_IN_LEN 8
13355 /* the type of configuration setting to read */
13356 #define MC_CMD_GET_PARSER_DISP_CONFIG_IN_TYPE_OFST 0
13357 #define MC_CMD_GET_PARSER_DISP_CONFIG_IN_TYPE_LEN 4
13358 /*            Enum values, see field(s): */
13359 /*               MC_CMD_SET_PARSER_DISP_CONFIG/MC_CMD_SET_PARSER_DISP_CONFIG_IN/TYPE */
13360 /* handle for the entity to query: queue handle, EVB port ID, etc. depending on
13361  * the type of configuration setting being read
13362  */
13363 #define MC_CMD_GET_PARSER_DISP_CONFIG_IN_ENTITY_OFST 4
13364 #define MC_CMD_GET_PARSER_DISP_CONFIG_IN_ENTITY_LEN 4
13365
13366 /* MC_CMD_GET_PARSER_DISP_CONFIG_OUT msgresponse */
13367 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LENMIN 4
13368 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LENMAX 252
13369 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LEN(num) (0+4*(num))
13370 /* current value: the details depend on the type of configuration setting being
13371  * read
13372  */
13373 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_OFST 0
13374 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_LEN 4
13375 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_MINNUM 1
13376 #define MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_MAXNUM 63
13377
13378
13379 /***********************************/
13380 /* MC_CMD_SET_TX_PORT_SNIFF_CONFIG
13381  * Configure TX port sniffing for the physical port associated with the calling
13382  * function. Only a privileged function may change the port sniffing
13383  * configuration. A copy of all traffic transmitted through the port may be
13384  * delivered to a specific queue, or a set of queues with RSS. Note that these
13385  * packets are delivered with transmit timestamps in the packet prefix, not
13386  * receive timestamps, so it is likely that the queue(s) will need to be
13387  * dedicated as TX sniff receivers.
13388  */
13389 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG 0xfb
13390 #undef  MC_CMD_0xfb_PRIVILEGE_CTG
13391
13392 #define MC_CMD_0xfb_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13393
13394 /* MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN msgrequest */
13395 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_LEN 16
13396 /* configuration flags */
13397 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_FLAGS_OFST 0
13398 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_FLAGS_LEN 4
13399 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_ENABLE_LBN 0
13400 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_ENABLE_WIDTH 1
13401 /* receive queue handle (for RSS mode, this is the base queue) */
13402 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_QUEUE_OFST 4
13403 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_QUEUE_LEN 4
13404 /* receive mode */
13405 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_OFST 8
13406 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_LEN 4
13407 /* enum: receive to just the specified queue */
13408 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_SIMPLE  0x0
13409 /* enum: receive to multiple queues using RSS context */
13410 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_RSS  0x1
13411 /* RSS context (for RX_MODE_RSS) as returned by MC_CMD_RSS_CONTEXT_ALLOC. Note
13412  * that these handles should be considered opaque to the host, although a value
13413  * of 0xFFFFFFFF is guaranteed never to be a valid handle.
13414  */
13415 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_OFST 12
13416 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_LEN 4
13417
13418 /* MC_CMD_SET_TX_PORT_SNIFF_CONFIG_OUT msgresponse */
13419 #define MC_CMD_SET_TX_PORT_SNIFF_CONFIG_OUT_LEN 0
13420
13421
13422 /***********************************/
13423 /* MC_CMD_GET_TX_PORT_SNIFF_CONFIG
13424  * Obtain the current TX port sniffing configuration for the physical port
13425  * associated with the calling function. Only a privileged function may read
13426  * the configuration.
13427  */
13428 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG 0xfc
13429 #undef  MC_CMD_0xfc_PRIVILEGE_CTG
13430
13431 #define MC_CMD_0xfc_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13432
13433 /* MC_CMD_GET_TX_PORT_SNIFF_CONFIG_IN msgrequest */
13434 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_IN_LEN 0
13435
13436 /* MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT msgresponse */
13437 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_LEN 16
13438 /* configuration flags */
13439 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_FLAGS_OFST 0
13440 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_FLAGS_LEN 4
13441 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_ENABLE_LBN 0
13442 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_ENABLE_WIDTH 1
13443 /* receiving queue handle (for RSS mode, this is the base queue) */
13444 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_OFST 4
13445 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_LEN 4
13446 /* receive mode */
13447 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_OFST 8
13448 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_LEN 4
13449 /* enum: receiving to just the specified queue */
13450 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_SIMPLE  0x0
13451 /* enum: receiving to multiple queues using RSS context */
13452 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_RSS  0x1
13453 /* RSS context (for RX_MODE_RSS) */
13454 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_OFST 12
13455 #define MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_LEN 4
13456
13457
13458 /***********************************/
13459 /* MC_CMD_RMON_STATS_RX_ERRORS
13460  * Per queue rx error stats.
13461  */
13462 #define MC_CMD_RMON_STATS_RX_ERRORS 0xfe
13463 #undef  MC_CMD_0xfe_PRIVILEGE_CTG
13464
13465 #define MC_CMD_0xfe_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13466
13467 /* MC_CMD_RMON_STATS_RX_ERRORS_IN msgrequest */
13468 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_LEN 8
13469 /* The rx queue to get stats for. */
13470 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_RX_QUEUE_OFST 0
13471 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_RX_QUEUE_LEN 4
13472 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_FLAGS_OFST 4
13473 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_FLAGS_LEN 4
13474 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_RST_LBN 0
13475 #define MC_CMD_RMON_STATS_RX_ERRORS_IN_RST_WIDTH 1
13476
13477 /* MC_CMD_RMON_STATS_RX_ERRORS_OUT msgresponse */
13478 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_LEN 16
13479 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_CRC_ERRORS_OFST 0
13480 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_CRC_ERRORS_LEN 4
13481 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_TRUNC_ERRORS_OFST 4
13482 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_TRUNC_ERRORS_LEN 4
13483 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_NO_DESC_DROPS_OFST 8
13484 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_NO_DESC_DROPS_LEN 4
13485 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_ABORT_OFST 12
13486 #define MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_ABORT_LEN 4
13487
13488
13489 /***********************************/
13490 /* MC_CMD_GET_PCIE_RESOURCE_INFO
13491  * Find out about available PCIE resources
13492  */
13493 #define MC_CMD_GET_PCIE_RESOURCE_INFO 0xfd
13494 #undef  MC_CMD_0xfd_PRIVILEGE_CTG
13495
13496 #define MC_CMD_0xfd_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13497
13498 /* MC_CMD_GET_PCIE_RESOURCE_INFO_IN msgrequest */
13499 #define MC_CMD_GET_PCIE_RESOURCE_INFO_IN_LEN 0
13500
13501 /* MC_CMD_GET_PCIE_RESOURCE_INFO_OUT msgresponse */
13502 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_LEN 28
13503 /* The maximum number of PFs the device can expose */
13504 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PFS_OFST 0
13505 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PFS_LEN 4
13506 /* The maximum number of VFs the device can expose in total */
13507 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VFS_OFST 4
13508 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VFS_LEN 4
13509 /* The maximum number of MSI-X vectors the device can provide in total */
13510 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VECTORS_OFST 8
13511 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VECTORS_LEN 4
13512 /* the number of MSI-X vectors the device will allocate by default to each PF
13513  */
13514 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_PF_VECTORS_OFST 12
13515 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_PF_VECTORS_LEN 4
13516 /* the number of MSI-X vectors the device will allocate by default to each VF
13517  */
13518 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_VF_VECTORS_OFST 16
13519 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_VF_VECTORS_LEN 4
13520 /* the maximum number of MSI-X vectors the device can allocate to any one PF */
13521 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PF_VECTORS_OFST 20
13522 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PF_VECTORS_LEN 4
13523 /* the maximum number of MSI-X vectors the device can allocate to any one VF */
13524 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VF_VECTORS_OFST 24
13525 #define MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VF_VECTORS_LEN 4
13526
13527
13528 /***********************************/
13529 /* MC_CMD_GET_PORT_MODES
13530  * Find out about available port modes
13531  */
13532 #define MC_CMD_GET_PORT_MODES 0xff
13533 #undef  MC_CMD_0xff_PRIVILEGE_CTG
13534
13535 #define MC_CMD_0xff_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13536
13537 /* MC_CMD_GET_PORT_MODES_IN msgrequest */
13538 #define MC_CMD_GET_PORT_MODES_IN_LEN 0
13539
13540 /* MC_CMD_GET_PORT_MODES_OUT msgresponse */
13541 #define MC_CMD_GET_PORT_MODES_OUT_LEN 12
13542 /* Bitmask of port modes available on the board (indexed by TLV_PORT_MODE_*) */
13543 #define MC_CMD_GET_PORT_MODES_OUT_MODES_OFST 0
13544 #define MC_CMD_GET_PORT_MODES_OUT_MODES_LEN 4
13545 /* Default (canonical) board mode */
13546 #define MC_CMD_GET_PORT_MODES_OUT_DEFAULT_MODE_OFST 4
13547 #define MC_CMD_GET_PORT_MODES_OUT_DEFAULT_MODE_LEN 4
13548 /* Current board mode */
13549 #define MC_CMD_GET_PORT_MODES_OUT_CURRENT_MODE_OFST 8
13550 #define MC_CMD_GET_PORT_MODES_OUT_CURRENT_MODE_LEN 4
13551
13552
13553 /***********************************/
13554 /* MC_CMD_READ_ATB
13555  * Sample voltages on the ATB
13556  */
13557 #define MC_CMD_READ_ATB 0x100
13558 #undef  MC_CMD_0x100_PRIVILEGE_CTG
13559
13560 #define MC_CMD_0x100_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13561
13562 /* MC_CMD_READ_ATB_IN msgrequest */
13563 #define MC_CMD_READ_ATB_IN_LEN 16
13564 #define MC_CMD_READ_ATB_IN_SIGNAL_BUS_OFST 0
13565 #define MC_CMD_READ_ATB_IN_SIGNAL_BUS_LEN 4
13566 #define MC_CMD_READ_ATB_IN_BUS_CCOM  0x0 /* enum */
13567 #define MC_CMD_READ_ATB_IN_BUS_CKR  0x1 /* enum */
13568 #define MC_CMD_READ_ATB_IN_BUS_CPCIE  0x8 /* enum */
13569 #define MC_CMD_READ_ATB_IN_SIGNAL_EN_BITNO_OFST 4
13570 #define MC_CMD_READ_ATB_IN_SIGNAL_EN_BITNO_LEN 4
13571 #define MC_CMD_READ_ATB_IN_SIGNAL_SEL_OFST 8
13572 #define MC_CMD_READ_ATB_IN_SIGNAL_SEL_LEN 4
13573 #define MC_CMD_READ_ATB_IN_SETTLING_TIME_US_OFST 12
13574 #define MC_CMD_READ_ATB_IN_SETTLING_TIME_US_LEN 4
13575
13576 /* MC_CMD_READ_ATB_OUT msgresponse */
13577 #define MC_CMD_READ_ATB_OUT_LEN 4
13578 #define MC_CMD_READ_ATB_OUT_SAMPLE_MV_OFST 0
13579 #define MC_CMD_READ_ATB_OUT_SAMPLE_MV_LEN 4
13580
13581
13582 /***********************************/
13583 /* MC_CMD_GET_WORKAROUNDS
13584  * Read the list of all implemented and all currently enabled workarounds. The
13585  * enums here must correspond with those in MC_CMD_WORKAROUND.
13586  */
13587 #define MC_CMD_GET_WORKAROUNDS 0x59
13588 #undef  MC_CMD_0x59_PRIVILEGE_CTG
13589
13590 #define MC_CMD_0x59_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13591
13592 /* MC_CMD_GET_WORKAROUNDS_OUT msgresponse */
13593 #define MC_CMD_GET_WORKAROUNDS_OUT_LEN 8
13594 /* Each workaround is represented by a single bit according to the enums below.
13595  */
13596 #define MC_CMD_GET_WORKAROUNDS_OUT_IMPLEMENTED_OFST 0
13597 #define MC_CMD_GET_WORKAROUNDS_OUT_IMPLEMENTED_LEN 4
13598 #define MC_CMD_GET_WORKAROUNDS_OUT_ENABLED_OFST 4
13599 #define MC_CMD_GET_WORKAROUNDS_OUT_ENABLED_LEN 4
13600 /* enum: Bug 17230 work around. */
13601 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG17230 0x2
13602 /* enum: Bug 35388 work around (unsafe EVQ writes). */
13603 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG35388 0x4
13604 /* enum: Bug35017 workaround (A64 tables must be identity map) */
13605 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG35017 0x8
13606 /* enum: Bug 41750 present (MC_CMD_TRIGGER_INTERRUPT won't work) */
13607 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG41750 0x10
13608 /* enum: Bug 42008 present (Interrupts can overtake associated events). Caution
13609  * - before adding code that queries this workaround, remember that there's
13610  * released Monza firmware that doesn't understand MC_CMD_WORKAROUND_BUG42008,
13611  * and will hence (incorrectly) report that the bug doesn't exist.
13612  */
13613 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG42008 0x20
13614 /* enum: Bug 26807 features present in firmware (multicast filter chaining) */
13615 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG26807 0x40
13616 /* enum: Bug 61265 work around (broken EVQ TMR writes). */
13617 #define MC_CMD_GET_WORKAROUNDS_OUT_BUG61265 0x80
13618
13619
13620 /***********************************/
13621 /* MC_CMD_PRIVILEGE_MASK
13622  * Read/set privileges of an arbitrary PCIe function
13623  */
13624 #define MC_CMD_PRIVILEGE_MASK 0x5a
13625 #undef  MC_CMD_0x5a_PRIVILEGE_CTG
13626
13627 #define MC_CMD_0x5a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13628
13629 /* MC_CMD_PRIVILEGE_MASK_IN msgrequest */
13630 #define MC_CMD_PRIVILEGE_MASK_IN_LEN 8
13631 /* The target function to have its mask read or set e.g. PF 0 = 0xFFFF0000, VF
13632  * 1,3 = 0x00030001
13633  */
13634 #define MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_OFST 0
13635 #define MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_LEN 4
13636 #define MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_PF_LBN 0
13637 #define MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_PF_WIDTH 16
13638 #define MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_VF_LBN 16
13639 #define MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_VF_WIDTH 16
13640 #define MC_CMD_PRIVILEGE_MASK_IN_VF_NULL  0xffff /* enum */
13641 /* New privilege mask to be set. The mask will only be changed if the MSB is
13642  * set to 1.
13643  */
13644 #define MC_CMD_PRIVILEGE_MASK_IN_NEW_MASK_OFST 4
13645 #define MC_CMD_PRIVILEGE_MASK_IN_NEW_MASK_LEN 4
13646 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN             0x1 /* enum */
13647 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK              0x2 /* enum */
13648 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD            0x4 /* enum */
13649 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP               0x8 /* enum */
13650 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS  0x10 /* enum */
13651 /* enum: Deprecated. Equivalent to MAC_SPOOFING_TX combined with CHANGE_MAC. */
13652 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING      0x20
13653 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST           0x40 /* enum */
13654 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST         0x80 /* enum */
13655 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST         0x100 /* enum */
13656 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST     0x200 /* enum */
13657 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS       0x400 /* enum */
13658 /* enum: Allows to set the TX packets' source MAC address to any arbitrary MAC
13659  * adress.
13660  */
13661 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX   0x800
13662 /* enum: Privilege that allows a Function to change the MAC address configured
13663  * in its associated vAdapter/vPort.
13664  */
13665 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC        0x1000
13666 /* enum: Privilege that allows a Function to install filters that specify VLANs
13667  * that are not in the permit list for the associated vPort. This privilege is
13668  * primarily to support ESX where vPorts are created that restrict traffic to
13669  * only a set of permitted VLANs. See the vPort flag FLAG_VLAN_RESTRICT.
13670  */
13671 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_UNRESTRICTED_VLAN  0x2000
13672 /* enum: Privilege for insecure commands. Commands that belong to this group
13673  * are not permitted on secure adapters regardless of the privilege mask.
13674  */
13675 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE          0x4000
13676 /* enum: Set this bit to indicate that a new privilege mask is to be set,
13677  * otherwise the command will only read the existing mask.
13678  */
13679 #define MC_CMD_PRIVILEGE_MASK_IN_DO_CHANGE             0x80000000
13680
13681 /* MC_CMD_PRIVILEGE_MASK_OUT msgresponse */
13682 #define MC_CMD_PRIVILEGE_MASK_OUT_LEN 4
13683 /* For an admin function, always all the privileges are reported. */
13684 #define MC_CMD_PRIVILEGE_MASK_OUT_OLD_MASK_OFST 0
13685 #define MC_CMD_PRIVILEGE_MASK_OUT_OLD_MASK_LEN 4
13686
13687
13688 /***********************************/
13689 /* MC_CMD_LINK_STATE_MODE
13690  * Read/set link state mode of a VF
13691  */
13692 #define MC_CMD_LINK_STATE_MODE 0x5c
13693 #undef  MC_CMD_0x5c_PRIVILEGE_CTG
13694
13695 #define MC_CMD_0x5c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13696
13697 /* MC_CMD_LINK_STATE_MODE_IN msgrequest */
13698 #define MC_CMD_LINK_STATE_MODE_IN_LEN 8
13699 /* The target function to have its link state mode read or set, must be a VF
13700  * e.g. VF 1,3 = 0x00030001
13701  */
13702 #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_OFST 0
13703 #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_LEN 4
13704 #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_LBN 0
13705 #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_WIDTH 16
13706 #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_LBN 16
13707 #define MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_WIDTH 16
13708 /* New link state mode to be set */
13709 #define MC_CMD_LINK_STATE_MODE_IN_NEW_MODE_OFST 4
13710 #define MC_CMD_LINK_STATE_MODE_IN_NEW_MODE_LEN 4
13711 #define MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_AUTO       0x0 /* enum */
13712 #define MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_UP         0x1 /* enum */
13713 #define MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_DOWN       0x2 /* enum */
13714 /* enum: Use this value to just read the existing setting without modifying it.
13715  */
13716 #define MC_CMD_LINK_STATE_MODE_IN_DO_NOT_CHANGE         0xffffffff
13717
13718 /* MC_CMD_LINK_STATE_MODE_OUT msgresponse */
13719 #define MC_CMD_LINK_STATE_MODE_OUT_LEN 4
13720 #define MC_CMD_LINK_STATE_MODE_OUT_OLD_MODE_OFST 0
13721 #define MC_CMD_LINK_STATE_MODE_OUT_OLD_MODE_LEN 4
13722
13723
13724 /***********************************/
13725 /* MC_CMD_GET_SNAPSHOT_LENGTH
13726  * Obtain the current range of allowable values for the SNAPSHOT_LENGTH
13727  * parameter to MC_CMD_INIT_RXQ.
13728  */
13729 #define MC_CMD_GET_SNAPSHOT_LENGTH 0x101
13730 #undef  MC_CMD_0x101_PRIVILEGE_CTG
13731
13732 #define MC_CMD_0x101_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13733
13734 /* MC_CMD_GET_SNAPSHOT_LENGTH_IN msgrequest */
13735 #define MC_CMD_GET_SNAPSHOT_LENGTH_IN_LEN 0
13736
13737 /* MC_CMD_GET_SNAPSHOT_LENGTH_OUT msgresponse */
13738 #define MC_CMD_GET_SNAPSHOT_LENGTH_OUT_LEN 8
13739 /* Minimum acceptable snapshot length. */
13740 #define MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MIN_OFST 0
13741 #define MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MIN_LEN 4
13742 /* Maximum acceptable snapshot length. */
13743 #define MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MAX_OFST 4
13744 #define MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MAX_LEN 4
13745
13746
13747 /***********************************/
13748 /* MC_CMD_FUSE_DIAGS
13749  * Additional fuse diagnostics
13750  */
13751 #define MC_CMD_FUSE_DIAGS 0x102
13752 #undef  MC_CMD_0x102_PRIVILEGE_CTG
13753
13754 #define MC_CMD_0x102_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13755
13756 /* MC_CMD_FUSE_DIAGS_IN msgrequest */
13757 #define MC_CMD_FUSE_DIAGS_IN_LEN 0
13758
13759 /* MC_CMD_FUSE_DIAGS_OUT msgresponse */
13760 #define MC_CMD_FUSE_DIAGS_OUT_LEN 48
13761 /* Total number of mismatched bits between pairs in area 0 */
13762 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_MISMATCH_BITS_OFST 0
13763 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_MISMATCH_BITS_LEN 4
13764 /* Total number of unexpectedly clear (set in B but not A) bits in area 0 */
13765 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_A_BAD_BITS_OFST 4
13766 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_A_BAD_BITS_LEN 4
13767 /* Total number of unexpectedly clear (set in A but not B) bits in area 0 */
13768 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_B_BAD_BITS_OFST 8
13769 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_B_BAD_BITS_LEN 4
13770 /* Checksum of data after logical OR of pairs in area 0 */
13771 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_CHECKSUM_OFST 12
13772 #define MC_CMD_FUSE_DIAGS_OUT_AREA0_CHECKSUM_LEN 4
13773 /* Total number of mismatched bits between pairs in area 1 */
13774 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_MISMATCH_BITS_OFST 16
13775 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_MISMATCH_BITS_LEN 4
13776 /* Total number of unexpectedly clear (set in B but not A) bits in area 1 */
13777 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_A_BAD_BITS_OFST 20
13778 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_A_BAD_BITS_LEN 4
13779 /* Total number of unexpectedly clear (set in A but not B) bits in area 1 */
13780 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_B_BAD_BITS_OFST 24
13781 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_B_BAD_BITS_LEN 4
13782 /* Checksum of data after logical OR of pairs in area 1 */
13783 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_CHECKSUM_OFST 28
13784 #define MC_CMD_FUSE_DIAGS_OUT_AREA1_CHECKSUM_LEN 4
13785 /* Total number of mismatched bits between pairs in area 2 */
13786 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_MISMATCH_BITS_OFST 32
13787 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_MISMATCH_BITS_LEN 4
13788 /* Total number of unexpectedly clear (set in B but not A) bits in area 2 */
13789 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_A_BAD_BITS_OFST 36
13790 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_A_BAD_BITS_LEN 4
13791 /* Total number of unexpectedly clear (set in A but not B) bits in area 2 */
13792 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_B_BAD_BITS_OFST 40
13793 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_B_BAD_BITS_LEN 4
13794 /* Checksum of data after logical OR of pairs in area 2 */
13795 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_CHECKSUM_OFST 44
13796 #define MC_CMD_FUSE_DIAGS_OUT_AREA2_CHECKSUM_LEN 4
13797
13798
13799 /***********************************/
13800 /* MC_CMD_PRIVILEGE_MODIFY
13801  * Modify the privileges of a set of PCIe functions. Note that this operation
13802  * only effects non-admin functions unless the admin privilege itself is
13803  * included in one of the masks provided.
13804  */
13805 #define MC_CMD_PRIVILEGE_MODIFY 0x60
13806 #undef  MC_CMD_0x60_PRIVILEGE_CTG
13807
13808 #define MC_CMD_0x60_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13809
13810 /* MC_CMD_PRIVILEGE_MODIFY_IN msgrequest */
13811 #define MC_CMD_PRIVILEGE_MODIFY_IN_LEN 16
13812 /* The groups of functions to have their privilege masks modified. */
13813 #define MC_CMD_PRIVILEGE_MODIFY_IN_FN_GROUP_OFST 0
13814 #define MC_CMD_PRIVILEGE_MODIFY_IN_FN_GROUP_LEN 4
13815 #define MC_CMD_PRIVILEGE_MODIFY_IN_NONE       0x0 /* enum */
13816 #define MC_CMD_PRIVILEGE_MODIFY_IN_ALL        0x1 /* enum */
13817 #define MC_CMD_PRIVILEGE_MODIFY_IN_PFS_ONLY   0x2 /* enum */
13818 #define MC_CMD_PRIVILEGE_MODIFY_IN_VFS_ONLY   0x3 /* enum */
13819 #define MC_CMD_PRIVILEGE_MODIFY_IN_VFS_OF_PF  0x4 /* enum */
13820 #define MC_CMD_PRIVILEGE_MODIFY_IN_ONE        0x5 /* enum */
13821 /* For VFS_OF_PF specify the PF, for ONE specify the target function */
13822 #define MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_OFST 4
13823 #define MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_LEN 4
13824 #define MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_PF_LBN 0
13825 #define MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_PF_WIDTH 16
13826 #define MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_VF_LBN 16
13827 #define MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_VF_WIDTH 16
13828 /* Privileges to be added to the target functions. For privilege definitions
13829  * refer to the command MC_CMD_PRIVILEGE_MASK
13830  */
13831 #define MC_CMD_PRIVILEGE_MODIFY_IN_ADD_MASK_OFST 8
13832 #define MC_CMD_PRIVILEGE_MODIFY_IN_ADD_MASK_LEN 4
13833 /* Privileges to be removed from the target functions. For privilege
13834  * definitions refer to the command MC_CMD_PRIVILEGE_MASK
13835  */
13836 #define MC_CMD_PRIVILEGE_MODIFY_IN_REMOVE_MASK_OFST 12
13837 #define MC_CMD_PRIVILEGE_MODIFY_IN_REMOVE_MASK_LEN 4
13838
13839 /* MC_CMD_PRIVILEGE_MODIFY_OUT msgresponse */
13840 #define MC_CMD_PRIVILEGE_MODIFY_OUT_LEN 0
13841
13842
13843 /***********************************/
13844 /* MC_CMD_XPM_READ_BYTES
13845  * Read XPM memory
13846  */
13847 #define MC_CMD_XPM_READ_BYTES 0x103
13848 #undef  MC_CMD_0x103_PRIVILEGE_CTG
13849
13850 #define MC_CMD_0x103_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13851
13852 /* MC_CMD_XPM_READ_BYTES_IN msgrequest */
13853 #define MC_CMD_XPM_READ_BYTES_IN_LEN 8
13854 /* Start address (byte) */
13855 #define MC_CMD_XPM_READ_BYTES_IN_ADDR_OFST 0
13856 #define MC_CMD_XPM_READ_BYTES_IN_ADDR_LEN 4
13857 /* Count (bytes) */
13858 #define MC_CMD_XPM_READ_BYTES_IN_COUNT_OFST 4
13859 #define MC_CMD_XPM_READ_BYTES_IN_COUNT_LEN 4
13860
13861 /* MC_CMD_XPM_READ_BYTES_OUT msgresponse */
13862 #define MC_CMD_XPM_READ_BYTES_OUT_LENMIN 0
13863 #define MC_CMD_XPM_READ_BYTES_OUT_LENMAX 252
13864 #define MC_CMD_XPM_READ_BYTES_OUT_LEN(num) (0+1*(num))
13865 /* Data */
13866 #define MC_CMD_XPM_READ_BYTES_OUT_DATA_OFST 0
13867 #define MC_CMD_XPM_READ_BYTES_OUT_DATA_LEN 1
13868 #define MC_CMD_XPM_READ_BYTES_OUT_DATA_MINNUM 0
13869 #define MC_CMD_XPM_READ_BYTES_OUT_DATA_MAXNUM 252
13870
13871
13872 /***********************************/
13873 /* MC_CMD_XPM_WRITE_BYTES
13874  * Write XPM memory
13875  */
13876 #define MC_CMD_XPM_WRITE_BYTES 0x104
13877 #undef  MC_CMD_0x104_PRIVILEGE_CTG
13878
13879 #define MC_CMD_0x104_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13880
13881 /* MC_CMD_XPM_WRITE_BYTES_IN msgrequest */
13882 #define MC_CMD_XPM_WRITE_BYTES_IN_LENMIN 8
13883 #define MC_CMD_XPM_WRITE_BYTES_IN_LENMAX 252
13884 #define MC_CMD_XPM_WRITE_BYTES_IN_LEN(num) (8+1*(num))
13885 /* Start address (byte) */
13886 #define MC_CMD_XPM_WRITE_BYTES_IN_ADDR_OFST 0
13887 #define MC_CMD_XPM_WRITE_BYTES_IN_ADDR_LEN 4
13888 /* Count (bytes) */
13889 #define MC_CMD_XPM_WRITE_BYTES_IN_COUNT_OFST 4
13890 #define MC_CMD_XPM_WRITE_BYTES_IN_COUNT_LEN 4
13891 /* Data */
13892 #define MC_CMD_XPM_WRITE_BYTES_IN_DATA_OFST 8
13893 #define MC_CMD_XPM_WRITE_BYTES_IN_DATA_LEN 1
13894 #define MC_CMD_XPM_WRITE_BYTES_IN_DATA_MINNUM 0
13895 #define MC_CMD_XPM_WRITE_BYTES_IN_DATA_MAXNUM 244
13896
13897 /* MC_CMD_XPM_WRITE_BYTES_OUT msgresponse */
13898 #define MC_CMD_XPM_WRITE_BYTES_OUT_LEN 0
13899
13900
13901 /***********************************/
13902 /* MC_CMD_XPM_READ_SECTOR
13903  * Read XPM sector
13904  */
13905 #define MC_CMD_XPM_READ_SECTOR 0x105
13906 #undef  MC_CMD_0x105_PRIVILEGE_CTG
13907
13908 #define MC_CMD_0x105_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13909
13910 /* MC_CMD_XPM_READ_SECTOR_IN msgrequest */
13911 #define MC_CMD_XPM_READ_SECTOR_IN_LEN 8
13912 /* Sector index */
13913 #define MC_CMD_XPM_READ_SECTOR_IN_INDEX_OFST 0
13914 #define MC_CMD_XPM_READ_SECTOR_IN_INDEX_LEN 4
13915 /* Sector size */
13916 #define MC_CMD_XPM_READ_SECTOR_IN_SIZE_OFST 4
13917 #define MC_CMD_XPM_READ_SECTOR_IN_SIZE_LEN 4
13918
13919 /* MC_CMD_XPM_READ_SECTOR_OUT msgresponse */
13920 #define MC_CMD_XPM_READ_SECTOR_OUT_LENMIN 4
13921 #define MC_CMD_XPM_READ_SECTOR_OUT_LENMAX 36
13922 #define MC_CMD_XPM_READ_SECTOR_OUT_LEN(num) (4+1*(num))
13923 /* Sector type */
13924 #define MC_CMD_XPM_READ_SECTOR_OUT_TYPE_OFST 0
13925 #define MC_CMD_XPM_READ_SECTOR_OUT_TYPE_LEN 4
13926 #define MC_CMD_XPM_READ_SECTOR_OUT_BLANK            0x0 /* enum */
13927 #define MC_CMD_XPM_READ_SECTOR_OUT_CRYPTO_KEY_128   0x1 /* enum */
13928 #define MC_CMD_XPM_READ_SECTOR_OUT_CRYPTO_KEY_256   0x2 /* enum */
13929 #define MC_CMD_XPM_READ_SECTOR_OUT_CRYPTO_DATA      0x3 /* enum */
13930 #define MC_CMD_XPM_READ_SECTOR_OUT_INVALID          0xff /* enum */
13931 /* Sector data */
13932 #define MC_CMD_XPM_READ_SECTOR_OUT_DATA_OFST 4
13933 #define MC_CMD_XPM_READ_SECTOR_OUT_DATA_LEN 1
13934 #define MC_CMD_XPM_READ_SECTOR_OUT_DATA_MINNUM 0
13935 #define MC_CMD_XPM_READ_SECTOR_OUT_DATA_MAXNUM 32
13936
13937
13938 /***********************************/
13939 /* MC_CMD_XPM_WRITE_SECTOR
13940  * Write XPM sector
13941  */
13942 #define MC_CMD_XPM_WRITE_SECTOR 0x106
13943 #undef  MC_CMD_0x106_PRIVILEGE_CTG
13944
13945 #define MC_CMD_0x106_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13946
13947 /* MC_CMD_XPM_WRITE_SECTOR_IN msgrequest */
13948 #define MC_CMD_XPM_WRITE_SECTOR_IN_LENMIN 12
13949 #define MC_CMD_XPM_WRITE_SECTOR_IN_LENMAX 44
13950 #define MC_CMD_XPM_WRITE_SECTOR_IN_LEN(num) (12+1*(num))
13951 /* If writing fails due to an uncorrectable error, try up to RETRIES following
13952  * sectors (or until no more space available). If 0, only one write attempt is
13953  * made. Note that uncorrectable errors are unlikely, thanks to XPM self-repair
13954  * mechanism.
13955  */
13956 #define MC_CMD_XPM_WRITE_SECTOR_IN_RETRIES_OFST 0
13957 #define MC_CMD_XPM_WRITE_SECTOR_IN_RETRIES_LEN 1
13958 #define MC_CMD_XPM_WRITE_SECTOR_IN_RESERVED_OFST 1
13959 #define MC_CMD_XPM_WRITE_SECTOR_IN_RESERVED_LEN 3
13960 /* Sector type */
13961 #define MC_CMD_XPM_WRITE_SECTOR_IN_TYPE_OFST 4
13962 #define MC_CMD_XPM_WRITE_SECTOR_IN_TYPE_LEN 4
13963 /*            Enum values, see field(s): */
13964 /*               MC_CMD_XPM_READ_SECTOR/MC_CMD_XPM_READ_SECTOR_OUT/TYPE */
13965 /* Sector size */
13966 #define MC_CMD_XPM_WRITE_SECTOR_IN_SIZE_OFST 8
13967 #define MC_CMD_XPM_WRITE_SECTOR_IN_SIZE_LEN 4
13968 /* Sector data */
13969 #define MC_CMD_XPM_WRITE_SECTOR_IN_DATA_OFST 12
13970 #define MC_CMD_XPM_WRITE_SECTOR_IN_DATA_LEN 1
13971 #define MC_CMD_XPM_WRITE_SECTOR_IN_DATA_MINNUM 0
13972 #define MC_CMD_XPM_WRITE_SECTOR_IN_DATA_MAXNUM 32
13973
13974 /* MC_CMD_XPM_WRITE_SECTOR_OUT msgresponse */
13975 #define MC_CMD_XPM_WRITE_SECTOR_OUT_LEN 4
13976 /* New sector index */
13977 #define MC_CMD_XPM_WRITE_SECTOR_OUT_INDEX_OFST 0
13978 #define MC_CMD_XPM_WRITE_SECTOR_OUT_INDEX_LEN 4
13979
13980
13981 /***********************************/
13982 /* MC_CMD_XPM_INVALIDATE_SECTOR
13983  * Invalidate XPM sector
13984  */
13985 #define MC_CMD_XPM_INVALIDATE_SECTOR 0x107
13986 #undef  MC_CMD_0x107_PRIVILEGE_CTG
13987
13988 #define MC_CMD_0x107_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13989
13990 /* MC_CMD_XPM_INVALIDATE_SECTOR_IN msgrequest */
13991 #define MC_CMD_XPM_INVALIDATE_SECTOR_IN_LEN 4
13992 /* Sector index */
13993 #define MC_CMD_XPM_INVALIDATE_SECTOR_IN_INDEX_OFST 0
13994 #define MC_CMD_XPM_INVALIDATE_SECTOR_IN_INDEX_LEN 4
13995
13996 /* MC_CMD_XPM_INVALIDATE_SECTOR_OUT msgresponse */
13997 #define MC_CMD_XPM_INVALIDATE_SECTOR_OUT_LEN 0
13998
13999
14000 /***********************************/
14001 /* MC_CMD_XPM_BLANK_CHECK
14002  * Blank-check XPM memory and report bad locations
14003  */
14004 #define MC_CMD_XPM_BLANK_CHECK 0x108
14005 #undef  MC_CMD_0x108_PRIVILEGE_CTG
14006
14007 #define MC_CMD_0x108_PRIVILEGE_CTG SRIOV_CTG_INSECURE
14008
14009 /* MC_CMD_XPM_BLANK_CHECK_IN msgrequest */
14010 #define MC_CMD_XPM_BLANK_CHECK_IN_LEN 8
14011 /* Start address (byte) */
14012 #define MC_CMD_XPM_BLANK_CHECK_IN_ADDR_OFST 0
14013 #define MC_CMD_XPM_BLANK_CHECK_IN_ADDR_LEN 4
14014 /* Count (bytes) */
14015 #define MC_CMD_XPM_BLANK_CHECK_IN_COUNT_OFST 4
14016 #define MC_CMD_XPM_BLANK_CHECK_IN_COUNT_LEN 4
14017
14018 /* MC_CMD_XPM_BLANK_CHECK_OUT msgresponse */
14019 #define MC_CMD_XPM_BLANK_CHECK_OUT_LENMIN 4
14020 #define MC_CMD_XPM_BLANK_CHECK_OUT_LENMAX 252
14021 #define MC_CMD_XPM_BLANK_CHECK_OUT_LEN(num) (4+2*(num))
14022 /* Total number of bad (non-blank) locations */
14023 #define MC_CMD_XPM_BLANK_CHECK_OUT_BAD_COUNT_OFST 0
14024 #define MC_CMD_XPM_BLANK_CHECK_OUT_BAD_COUNT_LEN 4
14025 /* Addresses of bad locations (may be less than BAD_COUNT, if all cannot fit
14026  * into MCDI response)
14027  */
14028 #define MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_OFST 4
14029 #define MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_LEN 2
14030 #define MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_MINNUM 0
14031 #define MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_MAXNUM 124
14032
14033
14034 /***********************************/
14035 /* MC_CMD_XPM_REPAIR
14036  * Blank-check and repair XPM memory
14037  */
14038 #define MC_CMD_XPM_REPAIR 0x109
14039 #undef  MC_CMD_0x109_PRIVILEGE_CTG
14040
14041 #define MC_CMD_0x109_PRIVILEGE_CTG SRIOV_CTG_INSECURE
14042
14043 /* MC_CMD_XPM_REPAIR_IN msgrequest */
14044 #define MC_CMD_XPM_REPAIR_IN_LEN 8
14045 /* Start address (byte) */
14046 #define MC_CMD_XPM_REPAIR_IN_ADDR_OFST 0
14047 #define MC_CMD_XPM_REPAIR_IN_ADDR_LEN 4
14048 /* Count (bytes) */
14049 #define MC_CMD_XPM_REPAIR_IN_COUNT_OFST 4
14050 #define MC_CMD_XPM_REPAIR_IN_COUNT_LEN 4
14051
14052 /* MC_CMD_XPM_REPAIR_OUT msgresponse */
14053 #define MC_CMD_XPM_REPAIR_OUT_LEN 0
14054
14055
14056 /***********************************/
14057 /* MC_CMD_XPM_DECODER_TEST
14058  * Test XPM memory address decoders for gross manufacturing defects. Can only
14059  * be performed on an unprogrammed part.
14060  */
14061 #define MC_CMD_XPM_DECODER_TEST 0x10a
14062 #undef  MC_CMD_0x10a_PRIVILEGE_CTG
14063
14064 #define MC_CMD_0x10a_PRIVILEGE_CTG SRIOV_CTG_INSECURE
14065
14066 /* MC_CMD_XPM_DECODER_TEST_IN msgrequest */
14067 #define MC_CMD_XPM_DECODER_TEST_IN_LEN 0
14068
14069 /* MC_CMD_XPM_DECODER_TEST_OUT msgresponse */
14070 #define MC_CMD_XPM_DECODER_TEST_OUT_LEN 0
14071
14072
14073 /***********************************/
14074 /* MC_CMD_XPM_WRITE_TEST
14075  * XPM memory write test. Test XPM write logic for gross manufacturing defects
14076  * by writing to a dedicated test row. There are 16 locations in the test row
14077  * and the test can only be performed on locations that have not been
14078  * previously used (i.e. can be run at most 16 times). The test will pick the
14079  * first available location to use, or fail with ENOSPC if none left.
14080  */
14081 #define MC_CMD_XPM_WRITE_TEST 0x10b
14082 #undef  MC_CMD_0x10b_PRIVILEGE_CTG
14083
14084 #define MC_CMD_0x10b_PRIVILEGE_CTG SRIOV_CTG_INSECURE
14085
14086 /* MC_CMD_XPM_WRITE_TEST_IN msgrequest */
14087 #define MC_CMD_XPM_WRITE_TEST_IN_LEN 0
14088
14089 /* MC_CMD_XPM_WRITE_TEST_OUT msgresponse */
14090 #define MC_CMD_XPM_WRITE_TEST_OUT_LEN 0
14091
14092
14093 /***********************************/
14094 /* MC_CMD_EXEC_SIGNED
14095  * Check the CMAC of the contents of IMEM and DMEM against the value supplied
14096  * and if correct begin execution from the start of IMEM. The caller supplies a
14097  * key ID, the length of IMEM and DMEM to validate and the expected CMAC. CMAC
14098  * computation runs from the start of IMEM, and from the start of DMEM + 16k,
14099  * to match flash booting. The command will respond with EINVAL if the CMAC
14100  * does match, otherwise it will respond with success before it jumps to IMEM.
14101  */
14102 #define MC_CMD_EXEC_SIGNED 0x10c
14103 #undef  MC_CMD_0x10c_PRIVILEGE_CTG
14104
14105 #define MC_CMD_0x10c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14106
14107 /* MC_CMD_EXEC_SIGNED_IN msgrequest */
14108 #define MC_CMD_EXEC_SIGNED_IN_LEN 28
14109 /* the length of code to include in the CMAC */
14110 #define MC_CMD_EXEC_SIGNED_IN_CODELEN_OFST 0
14111 #define MC_CMD_EXEC_SIGNED_IN_CODELEN_LEN 4
14112 /* the length of date to include in the CMAC */
14113 #define MC_CMD_EXEC_SIGNED_IN_DATALEN_OFST 4
14114 #define MC_CMD_EXEC_SIGNED_IN_DATALEN_LEN 4
14115 /* the XPM sector containing the key to use */
14116 #define MC_CMD_EXEC_SIGNED_IN_KEYSECTOR_OFST 8
14117 #define MC_CMD_EXEC_SIGNED_IN_KEYSECTOR_LEN 4
14118 /* the expected CMAC value */
14119 #define MC_CMD_EXEC_SIGNED_IN_CMAC_OFST 12
14120 #define MC_CMD_EXEC_SIGNED_IN_CMAC_LEN 16
14121
14122 /* MC_CMD_EXEC_SIGNED_OUT msgresponse */
14123 #define MC_CMD_EXEC_SIGNED_OUT_LEN 0
14124
14125
14126 /***********************************/
14127 /* MC_CMD_PREPARE_SIGNED
14128  * Prepare to upload a signed image. This will scrub the specified length of
14129  * the data region, which must be at least as large as the DATALEN supplied to
14130  * MC_CMD_EXEC_SIGNED.
14131  */
14132 #define MC_CMD_PREPARE_SIGNED 0x10d
14133 #undef  MC_CMD_0x10d_PRIVILEGE_CTG
14134
14135 #define MC_CMD_0x10d_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14136
14137 /* MC_CMD_PREPARE_SIGNED_IN msgrequest */
14138 #define MC_CMD_PREPARE_SIGNED_IN_LEN 4
14139 /* the length of data area to clear */
14140 #define MC_CMD_PREPARE_SIGNED_IN_DATALEN_OFST 0
14141 #define MC_CMD_PREPARE_SIGNED_IN_DATALEN_LEN 4
14142
14143 /* MC_CMD_PREPARE_SIGNED_OUT msgresponse */
14144 #define MC_CMD_PREPARE_SIGNED_OUT_LEN 0
14145
14146
14147 /***********************************/
14148 /* MC_CMD_SET_SECURITY_RULE
14149  * Set blacklist and/or whitelist action for a particular match criteria.
14150  * (Medford-only; for use by SolarSecure apps, not directly by drivers. See
14151  * SF-114946-SW.) NOTE - this message definition is provisional. It has not yet
14152  * been used in any released code and may change during development. This note
14153  * will be removed once it is regarded as stable.
14154  */
14155 #define MC_CMD_SET_SECURITY_RULE 0x10f
14156 #undef  MC_CMD_0x10f_PRIVILEGE_CTG
14157
14158 #define MC_CMD_0x10f_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14159
14160 /* MC_CMD_SET_SECURITY_RULE_IN msgrequest */
14161 #define MC_CMD_SET_SECURITY_RULE_IN_LEN 92
14162 /* fields to include in match criteria */
14163 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_FIELDS_OFST 0
14164 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_FIELDS_LEN 4
14165 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_IP_LBN 0
14166 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_IP_WIDTH 1
14167 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_IP_LBN 1
14168 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_IP_WIDTH 1
14169 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_MAC_LBN 2
14170 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_MAC_WIDTH 1
14171 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_PORT_LBN 3
14172 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_PORT_WIDTH 1
14173 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_MAC_LBN 4
14174 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_MAC_WIDTH 1
14175 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_PORT_LBN 5
14176 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_PORT_WIDTH 1
14177 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_ETHER_TYPE_LBN 6
14178 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_ETHER_TYPE_WIDTH 1
14179 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_INNER_VLAN_LBN 7
14180 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_INNER_VLAN_WIDTH 1
14181 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_OUTER_VLAN_LBN 8
14182 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_OUTER_VLAN_WIDTH 1
14183 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_IP_PROTO_LBN 9
14184 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_IP_PROTO_WIDTH 1
14185 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_PHYSICAL_PORT_LBN 10
14186 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_PHYSICAL_PORT_WIDTH 1
14187 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_RESERVED_LBN 11
14188 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_RESERVED_WIDTH 1
14189 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_SUBNET_ID_LBN 12
14190 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_SUBNET_ID_WIDTH 1
14191 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_PORTRANGE_ID_LBN 13
14192 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_REMOTE_PORTRANGE_ID_WIDTH 1
14193 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_PORTRANGE_ID_LBN 14
14194 #define MC_CMD_SET_SECURITY_RULE_IN_MATCH_LOCAL_PORTRANGE_ID_WIDTH 1
14195 /* remote MAC address to match (as bytes in network order) */
14196 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_MAC_OFST 4
14197 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_MAC_LEN 6
14198 /* remote port to match (as bytes in network order) */
14199 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_PORT_OFST 10
14200 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_PORT_LEN 2
14201 /* local MAC address to match (as bytes in network order) */
14202 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_MAC_OFST 12
14203 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_MAC_LEN 6
14204 /* local port to match (as bytes in network order) */
14205 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_PORT_OFST 18
14206 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_PORT_LEN 2
14207 /* Ethernet type to match (as bytes in network order) */
14208 #define MC_CMD_SET_SECURITY_RULE_IN_ETHER_TYPE_OFST 20
14209 #define MC_CMD_SET_SECURITY_RULE_IN_ETHER_TYPE_LEN 2
14210 /* Inner VLAN tag to match (as bytes in network order) */
14211 #define MC_CMD_SET_SECURITY_RULE_IN_INNER_VLAN_OFST 22
14212 #define MC_CMD_SET_SECURITY_RULE_IN_INNER_VLAN_LEN 2
14213 /* Outer VLAN tag to match (as bytes in network order) */
14214 #define MC_CMD_SET_SECURITY_RULE_IN_OUTER_VLAN_OFST 24
14215 #define MC_CMD_SET_SECURITY_RULE_IN_OUTER_VLAN_LEN 2
14216 /* IP protocol to match (in low byte; set high byte to 0) */
14217 #define MC_CMD_SET_SECURITY_RULE_IN_IP_PROTO_OFST 26
14218 #define MC_CMD_SET_SECURITY_RULE_IN_IP_PROTO_LEN 2
14219 /* Physical port to match (as little-endian 32-bit value) */
14220 #define MC_CMD_SET_SECURITY_RULE_IN_PHYSICAL_PORT_OFST 28
14221 #define MC_CMD_SET_SECURITY_RULE_IN_PHYSICAL_PORT_LEN 4
14222 /* Reserved; set to 0 */
14223 #define MC_CMD_SET_SECURITY_RULE_IN_RESERVED_OFST 32
14224 #define MC_CMD_SET_SECURITY_RULE_IN_RESERVED_LEN 4
14225 /* remote IP address to match (as bytes in network order; set last 12 bytes to
14226  * 0 for IPv4 address)
14227  */
14228 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_IP_OFST 36
14229 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_IP_LEN 16
14230 /* local IP address to match (as bytes in network order; set last 12 bytes to 0
14231  * for IPv4 address)
14232  */
14233 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_IP_OFST 52
14234 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_IP_LEN 16
14235 /* remote subnet ID to match (as little-endian 32-bit value); note that remote
14236  * subnets are matched by mapping the remote IP address to a "subnet ID" via a
14237  * data structure which must already have been configured using
14238  * MC_CMD_SUBNET_MAP_SET_NODE appropriately
14239  */
14240 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_SUBNET_ID_OFST 68
14241 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_SUBNET_ID_LEN 4
14242 /* remote portrange ID to match (as little-endian 32-bit value); note that
14243  * remote port ranges are matched by mapping the remote port to a "portrange
14244  * ID" via a data structure which must already have been configured using
14245  * MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE
14246  */
14247 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_PORTRANGE_ID_OFST 72
14248 #define MC_CMD_SET_SECURITY_RULE_IN_REMOTE_PORTRANGE_ID_LEN 4
14249 /* local portrange ID to match (as little-endian 32-bit value); note that local
14250  * port ranges are matched by mapping the local port to a "portrange ID" via a
14251  * data structure which must already have been configured using
14252  * MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE
14253  */
14254 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_PORTRANGE_ID_OFST 76
14255 #define MC_CMD_SET_SECURITY_RULE_IN_LOCAL_PORTRANGE_ID_LEN 4
14256 /* set the action for transmitted packets matching this rule */
14257 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_OFST 80
14258 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_LEN 4
14259 /* enum: make no decision */
14260 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_NONE  0x0
14261 /* enum: decide to accept the packet */
14262 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_WHITELIST  0x1
14263 /* enum: decide to drop the packet */
14264 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_BLACKLIST  0x2
14265 /* enum: inform the TSA controller about some sample of packets matching this
14266  * rule (via MC_CMD_TSA_INFO_IN_PKT_SAMPLE messages); may be bitwise-ORed with
14267  * either the WHITELIST or BLACKLIST action
14268  */
14269 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_SAMPLE  0x4
14270 /* enum: do not change the current TX action */
14271 #define MC_CMD_SET_SECURITY_RULE_IN_TX_ACTION_UNCHANGED  0xffffffff
14272 /* set the action for received packets matching this rule */
14273 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_OFST 84
14274 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_LEN 4
14275 /* enum: make no decision */
14276 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_NONE  0x0
14277 /* enum: decide to accept the packet */
14278 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_WHITELIST  0x1
14279 /* enum: decide to drop the packet */
14280 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_BLACKLIST  0x2
14281 /* enum: inform the TSA controller about some sample of packets matching this
14282  * rule (via MC_CMD_TSA_INFO_IN_PKT_SAMPLE messages); may be bitwise-ORed with
14283  * either the WHITELIST or BLACKLIST action
14284  */
14285 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_SAMPLE  0x4
14286 /* enum: do not change the current RX action */
14287 #define MC_CMD_SET_SECURITY_RULE_IN_RX_ACTION_UNCHANGED  0xffffffff
14288 /* counter ID to associate with this rule; IDs are allocated using
14289  * MC_CMD_SECURITY_RULE_COUNTER_ALLOC
14290  */
14291 #define MC_CMD_SET_SECURITY_RULE_IN_COUNTER_ID_OFST 88
14292 #define MC_CMD_SET_SECURITY_RULE_IN_COUNTER_ID_LEN 4
14293 /* enum: special value for the null counter ID */
14294 #define MC_CMD_SET_SECURITY_RULE_IN_COUNTER_ID_NONE  0x0
14295 /* enum: special value to tell the MC to allocate an available counter */
14296 #define MC_CMD_SET_SECURITY_RULE_IN_COUNTER_ID_SW_AUTO  0xeeeeeeee
14297 /* enum: special value to request use of hardware counter (Medford2 only) */
14298 #define MC_CMD_SET_SECURITY_RULE_IN_COUNTER_ID_HW  0xffffffff
14299
14300 /* MC_CMD_SET_SECURITY_RULE_OUT msgresponse */
14301 #define MC_CMD_SET_SECURITY_RULE_OUT_LEN 32
14302 /* new reference count for uses of counter ID */
14303 #define MC_CMD_SET_SECURITY_RULE_OUT_COUNTER_REFCNT_OFST 0
14304 #define MC_CMD_SET_SECURITY_RULE_OUT_COUNTER_REFCNT_LEN 4
14305 /* constructed match bits for this rule (as a tracing aid only) */
14306 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_MATCH_BITS_OFST 4
14307 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_MATCH_BITS_LEN 12
14308 /* constructed discriminator bits for this rule (as a tracing aid only) */
14309 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_DISCRIMINATOR_OFST 16
14310 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_DISCRIMINATOR_LEN 4
14311 /* base location for probes for this rule (as a tracing aid only) */
14312 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_PROBE_BASE_OFST 20
14313 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_PROBE_BASE_LEN 4
14314 /* step for probes for this rule (as a tracing aid only) */
14315 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_PROBE_STEP_OFST 24
14316 #define MC_CMD_SET_SECURITY_RULE_OUT_LUE_PROBE_STEP_LEN 4
14317 /* ID for reading back the counter */
14318 #define MC_CMD_SET_SECURITY_RULE_OUT_COUNTER_ID_OFST 28
14319 #define MC_CMD_SET_SECURITY_RULE_OUT_COUNTER_ID_LEN 4
14320
14321
14322 /***********************************/
14323 /* MC_CMD_RESET_SECURITY_RULES
14324  * Reset all blacklist and whitelist actions for a particular physical port, or
14325  * all ports. (Medford-only; for use by SolarSecure apps, not directly by
14326  * drivers. See SF-114946-SW.) NOTE - this message definition is provisional.
14327  * It has not yet been used in any released code and may change during
14328  * development. This note will be removed once it is regarded as stable.
14329  */
14330 #define MC_CMD_RESET_SECURITY_RULES 0x110
14331 #undef  MC_CMD_0x110_PRIVILEGE_CTG
14332
14333 #define MC_CMD_0x110_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14334
14335 /* MC_CMD_RESET_SECURITY_RULES_IN msgrequest */
14336 #define MC_CMD_RESET_SECURITY_RULES_IN_LEN 4
14337 /* index of physical port to reset (or ALL_PHYSICAL_PORTS to reset all) */
14338 #define MC_CMD_RESET_SECURITY_RULES_IN_PHYSICAL_PORT_OFST 0
14339 #define MC_CMD_RESET_SECURITY_RULES_IN_PHYSICAL_PORT_LEN 4
14340 /* enum: special value to reset all physical ports */
14341 #define MC_CMD_RESET_SECURITY_RULES_IN_ALL_PHYSICAL_PORTS  0xffffffff
14342
14343 /* MC_CMD_RESET_SECURITY_RULES_OUT msgresponse */
14344 #define MC_CMD_RESET_SECURITY_RULES_OUT_LEN 0
14345
14346
14347 /***********************************/
14348 /* MC_CMD_GET_SECURITY_RULESET_VERSION
14349  * Return a large hash value representing a "version" of the complete set of
14350  * currently active blacklist / whitelist rules and associated data structures.
14351  * (Medford-only; for use by SolarSecure apps, not directly by drivers. See
14352  * SF-114946-SW.) NOTE - this message definition is provisional. It has not yet
14353  * been used in any released code and may change during development. This note
14354  * will be removed once it is regarded as stable.
14355  */
14356 #define MC_CMD_GET_SECURITY_RULESET_VERSION 0x111
14357 #undef  MC_CMD_0x111_PRIVILEGE_CTG
14358
14359 #define MC_CMD_0x111_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14360
14361 /* MC_CMD_GET_SECURITY_RULESET_VERSION_IN msgrequest */
14362 #define MC_CMD_GET_SECURITY_RULESET_VERSION_IN_LEN 0
14363
14364 /* MC_CMD_GET_SECURITY_RULESET_VERSION_OUT msgresponse */
14365 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_LENMIN 1
14366 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_LENMAX 252
14367 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_LEN(num) (0+1*(num))
14368 /* Opaque hash value; length may vary depending on the hash scheme used */
14369 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_VERSION_OFST 0
14370 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_VERSION_LEN 1
14371 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_VERSION_MINNUM 1
14372 #define MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_VERSION_MAXNUM 252
14373
14374
14375 /***********************************/
14376 /* MC_CMD_SECURITY_RULE_COUNTER_ALLOC
14377  * Allocate counters for use with blacklist / whitelist rules. (Medford-only;
14378  * for use by SolarSecure apps, not directly by drivers. See SF-114946-SW.)
14379  * NOTE - this message definition is provisional. It has not yet been used in
14380  * any released code and may change during development. This note will be
14381  * removed once it is regarded as stable.
14382  */
14383 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC 0x112
14384 #undef  MC_CMD_0x112_PRIVILEGE_CTG
14385
14386 #define MC_CMD_0x112_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14387
14388 /* MC_CMD_SECURITY_RULE_COUNTER_ALLOC_IN msgrequest */
14389 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_IN_LEN 4
14390 /* the number of new counter IDs to request */
14391 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_IN_NUM_COUNTERS_OFST 0
14392 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_IN_NUM_COUNTERS_LEN 4
14393
14394 /* MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT msgresponse */
14395 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_LENMIN 4
14396 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_LENMAX 252
14397 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_LEN(num) (4+4*(num))
14398 /* the number of new counter IDs allocated (may be less than the number
14399  * requested if resources are unavailable)
14400  */
14401 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_NUM_COUNTERS_OFST 0
14402 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_NUM_COUNTERS_LEN 4
14403 /* new counter ID(s) */
14404 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_COUNTER_ID_OFST 4
14405 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_COUNTER_ID_LEN 4
14406 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_COUNTER_ID_MINNUM 0
14407 #define MC_CMD_SECURITY_RULE_COUNTER_ALLOC_OUT_COUNTER_ID_MAXNUM 62
14408
14409
14410 /***********************************/
14411 /* MC_CMD_SECURITY_RULE_COUNTER_FREE
14412  * Allocate counters for use with blacklist / whitelist rules. (Medford-only;
14413  * for use by SolarSecure apps, not directly by drivers. See SF-114946-SW.)
14414  * NOTE - this message definition is provisional. It has not yet been used in
14415  * any released code and may change during development. This note will be
14416  * removed once it is regarded as stable.
14417  */
14418 #define MC_CMD_SECURITY_RULE_COUNTER_FREE 0x113
14419 #undef  MC_CMD_0x113_PRIVILEGE_CTG
14420
14421 #define MC_CMD_0x113_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14422
14423 /* MC_CMD_SECURITY_RULE_COUNTER_FREE_IN msgrequest */
14424 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_LENMIN 4
14425 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_LENMAX 252
14426 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_LEN(num) (4+4*(num))
14427 /* the number of counter IDs to free */
14428 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_NUM_COUNTERS_OFST 0
14429 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_NUM_COUNTERS_LEN 4
14430 /* the counter ID(s) to free */
14431 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_COUNTER_ID_OFST 4
14432 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_COUNTER_ID_LEN 4
14433 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_COUNTER_ID_MINNUM 0
14434 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_IN_COUNTER_ID_MAXNUM 62
14435
14436 /* MC_CMD_SECURITY_RULE_COUNTER_FREE_OUT msgresponse */
14437 #define MC_CMD_SECURITY_RULE_COUNTER_FREE_OUT_LEN 0
14438
14439
14440 /***********************************/
14441 /* MC_CMD_SUBNET_MAP_SET_NODE
14442  * Atomically update a trie node in the map of subnets to subnet IDs. The
14443  * constants in the descriptions of the fields of this message may be retrieved
14444  * by the GET_SECURITY_RULE_INFO op of MC_CMD_GET_PARSER_DISP_INFO. (Medford-
14445  * only; for use by SolarSecure apps, not directly by drivers. See
14446  * SF-114946-SW.) NOTE - this message definition is provisional. It has not yet
14447  * been used in any released code and may change during development. This note
14448  * will be removed once it is regarded as stable.
14449  */
14450 #define MC_CMD_SUBNET_MAP_SET_NODE 0x114
14451 #undef  MC_CMD_0x114_PRIVILEGE_CTG
14452
14453 #define MC_CMD_0x114_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14454
14455 /* MC_CMD_SUBNET_MAP_SET_NODE_IN msgrequest */
14456 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_LENMIN 6
14457 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_LENMAX 252
14458 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_LEN(num) (4+2*(num))
14459 /* node to update in the range 0 .. SUBNET_MAP_NUM_NODES-1 */
14460 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_NODE_ID_OFST 0
14461 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_NODE_ID_LEN 4
14462 /* SUBNET_MAP_NUM_ENTRIES_PER_NODE new entries; each entry is either a pointer
14463  * to the next node, expressed as an offset in the trie memory (i.e. node ID
14464  * multiplied by SUBNET_MAP_NUM_ENTRIES_PER_NODE), or a leaf value in the range
14465  * SUBNET_ID_MIN .. SUBNET_ID_MAX
14466  */
14467 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_ENTRY_OFST 4
14468 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_ENTRY_LEN 2
14469 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_ENTRY_MINNUM 1
14470 #define MC_CMD_SUBNET_MAP_SET_NODE_IN_ENTRY_MAXNUM 124
14471
14472 /* MC_CMD_SUBNET_MAP_SET_NODE_OUT msgresponse */
14473 #define MC_CMD_SUBNET_MAP_SET_NODE_OUT_LEN 0
14474
14475 /* PORTRANGE_TREE_ENTRY structuredef */
14476 #define PORTRANGE_TREE_ENTRY_LEN 4
14477 /* key for branch nodes (<= key takes left branch, > key takes right branch),
14478  * or magic value for leaf nodes
14479  */
14480 #define PORTRANGE_TREE_ENTRY_BRANCH_KEY_OFST 0
14481 #define PORTRANGE_TREE_ENTRY_BRANCH_KEY_LEN 2
14482 #define PORTRANGE_TREE_ENTRY_LEAF_NODE_KEY  0xffff /* enum */
14483 #define PORTRANGE_TREE_ENTRY_BRANCH_KEY_LBN 0
14484 #define PORTRANGE_TREE_ENTRY_BRANCH_KEY_WIDTH 16
14485 /* final portrange ID for leaf nodes (don't care for branch nodes) */
14486 #define PORTRANGE_TREE_ENTRY_LEAF_PORTRANGE_ID_OFST 2
14487 #define PORTRANGE_TREE_ENTRY_LEAF_PORTRANGE_ID_LEN 2
14488 #define PORTRANGE_TREE_ENTRY_LEAF_PORTRANGE_ID_LBN 16
14489 #define PORTRANGE_TREE_ENTRY_LEAF_PORTRANGE_ID_WIDTH 16
14490
14491
14492 /***********************************/
14493 /* MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE
14494  * Atomically update the entire tree mapping remote port ranges to portrange
14495  * IDs. The constants in the descriptions of the fields of this message may be
14496  * retrieved by the GET_SECURITY_RULE_INFO op of MC_CMD_GET_PARSER_DISP_INFO.
14497  * (Medford-only; for use by SolarSecure apps, not directly by drivers. See
14498  * SF-114946-SW.) NOTE - this message definition is provisional. It has not yet
14499  * been used in any released code and may change during development. This note
14500  * will be removed once it is regarded as stable.
14501  */
14502 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE 0x115
14503 #undef  MC_CMD_0x115_PRIVILEGE_CTG
14504
14505 #define MC_CMD_0x115_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14506
14507 /* MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN msgrequest */
14508 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_LENMIN 4
14509 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_LENMAX 252
14510 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_LEN(num) (0+4*(num))
14511 /* PORTRANGE_TREE_NUM_ENTRIES new entries, each laid out as a
14512  * PORTRANGE_TREE_ENTRY
14513  */
14514 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_OFST 0
14515 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_LEN 4
14516 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_MINNUM 1
14517 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_MAXNUM 63
14518
14519 /* MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_OUT msgresponse */
14520 #define MC_CMD_REMOTE_PORTRANGE_MAP_SET_TREE_OUT_LEN 0
14521
14522
14523 /***********************************/
14524 /* MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE
14525  * Atomically update the entire tree mapping remote port ranges to portrange
14526  * IDs. The constants in the descriptions of the fields of this message may be
14527  * retrieved by the GET_SECURITY_RULE_INFO op of MC_CMD_GET_PARSER_DISP_INFO.
14528  * (Medford-only; for use by SolarSecure apps, not directly by drivers. See
14529  * SF-114946-SW.) NOTE - this message definition is provisional. It has not yet
14530  * been used in any released code and may change during development. This note
14531  * will be removed once it is regarded as stable.
14532  */
14533 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE 0x116
14534 #undef  MC_CMD_0x116_PRIVILEGE_CTG
14535
14536 #define MC_CMD_0x116_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14537
14538 /* MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN msgrequest */
14539 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_LENMIN 4
14540 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_LENMAX 252
14541 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_LEN(num) (0+4*(num))
14542 /* PORTRANGE_TREE_NUM_ENTRIES new entries, each laid out as a
14543  * PORTRANGE_TREE_ENTRY
14544  */
14545 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_OFST 0
14546 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_LEN 4
14547 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_MINNUM 1
14548 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_IN_ENTRIES_MAXNUM 63
14549
14550 /* MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_OUT msgresponse */
14551 #define MC_CMD_LOCAL_PORTRANGE_MAP_SET_TREE_OUT_LEN 0
14552
14553 /* TUNNEL_ENCAP_UDP_PORT_ENTRY structuredef */
14554 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_LEN 4
14555 /* UDP port (the standard ports are named below but any port may be used) */
14556 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_OFST 0
14557 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_LEN 2
14558 /* enum: the IANA allocated UDP port for VXLAN */
14559 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_IANA_VXLAN_UDP_PORT  0x12b5
14560 /* enum: the IANA allocated UDP port for Geneve */
14561 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_IANA_GENEVE_UDP_PORT  0x17c1
14562 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_LBN 0
14563 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_WIDTH 16
14564 /* tunnel encapsulation protocol (only those named below are supported) */
14565 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_OFST 2
14566 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_LEN 2
14567 /* enum: This port will be used for VXLAN on both IPv4 and IPv6 */
14568 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_VXLAN  0x0
14569 /* enum: This port will be used for Geneve on both IPv4 and IPv6 */
14570 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_GENEVE  0x1
14571 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_LBN 16
14572 #define TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_WIDTH 16
14573
14574
14575 /***********************************/
14576 /* MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS
14577  * Configure UDP ports for tunnel encapsulation hardware acceleration. The
14578  * parser-dispatcher will attempt to parse traffic on these ports as tunnel
14579  * encapsulation PDUs and filter them using the tunnel encapsulation filter
14580  * chain rather than the standard filter chain. Note that this command can
14581  * cause all functions to see a reset. (Available on Medford only.)
14582  */
14583 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS 0x117
14584 #undef  MC_CMD_0x117_PRIVILEGE_CTG
14585
14586 #define MC_CMD_0x117_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14587
14588 /* MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN msgrequest */
14589 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMIN 4
14590 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMAX 68
14591 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LEN(num) (4+4*(num))
14592 /* Flags */
14593 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_FLAGS_OFST 0
14594 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_FLAGS_LEN 2
14595 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_UNLOADING_LBN 0
14596 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_UNLOADING_WIDTH 1
14597 /* The number of entries in the ENTRIES array */
14598 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_NUM_ENTRIES_OFST 2
14599 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_NUM_ENTRIES_LEN 2
14600 /* Entries defining the UDP port to protocol mapping, each laid out as a
14601  * TUNNEL_ENCAP_UDP_PORT_ENTRY
14602  */
14603 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_OFST 4
14604 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_LEN 4
14605 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MINNUM 0
14606 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MAXNUM 16
14607
14608 /* MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT msgresponse */
14609 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN 2
14610 /* Flags */
14611 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_FLAGS_OFST 0
14612 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_FLAGS_LEN 2
14613 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_RESETTING_LBN 0
14614 #define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_RESETTING_WIDTH 1
14615
14616
14617 /***********************************/
14618 /* MC_CMD_RX_BALANCING
14619  * Configure a port upconverter to distribute the packets on both RX engines.
14620  * Packets are distributed based on a table with the destination vFIFO. The
14621  * index of the table is a hash of source and destination of IPV4 and VLAN
14622  * priority.
14623  */
14624 #define MC_CMD_RX_BALANCING 0x118
14625 #undef  MC_CMD_0x118_PRIVILEGE_CTG
14626
14627 #define MC_CMD_0x118_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14628
14629 /* MC_CMD_RX_BALANCING_IN msgrequest */
14630 #define MC_CMD_RX_BALANCING_IN_LEN 16
14631 /* The RX port whose upconverter table will be modified */
14632 #define MC_CMD_RX_BALANCING_IN_PORT_OFST 0
14633 #define MC_CMD_RX_BALANCING_IN_PORT_LEN 4
14634 /* The VLAN priority associated to the table index and vFIFO */
14635 #define MC_CMD_RX_BALANCING_IN_PRIORITY_OFST 4
14636 #define MC_CMD_RX_BALANCING_IN_PRIORITY_LEN 4
14637 /* The resulting bit of SRC^DST for indexing the table */
14638 #define MC_CMD_RX_BALANCING_IN_SRC_DST_OFST 8
14639 #define MC_CMD_RX_BALANCING_IN_SRC_DST_LEN 4
14640 /* The RX engine to which the vFIFO in the table entry will point to */
14641 #define MC_CMD_RX_BALANCING_IN_ENG_OFST 12
14642 #define MC_CMD_RX_BALANCING_IN_ENG_LEN 4
14643
14644 /* MC_CMD_RX_BALANCING_OUT msgresponse */
14645 #define MC_CMD_RX_BALANCING_OUT_LEN 0
14646
14647
14648 /***********************************/
14649 /* MC_CMD_TSA_BIND
14650  * TSAN - TSAC binding communication protocol. Refer to SF-115479-TC for more
14651  * info in respect to the binding protocol. This MCDI command is only available
14652  * over a TLS secure connection between the TSAN and TSAC, and is not available
14653  * to host software. Note- The messages definitions that do comprise this MCDI
14654  * command deemed as provisional. This MCDI command has not yet been used in
14655  * any released code and may change during development. This note will be
14656  * removed once it is regarded as stable.
14657  */
14658 #define MC_CMD_TSA_BIND 0x119
14659 #undef  MC_CMD_0x119_PRIVILEGE_CTG
14660
14661 #define MC_CMD_0x119_PRIVILEGE_CTG SRIOV_CTG_ADMIN
14662
14663 /* MC_CMD_TSA_BIND_IN msgrequest: Protocol operation code */
14664 #define MC_CMD_TSA_BIND_IN_LEN 4
14665 #define MC_CMD_TSA_BIND_IN_OP_OFST 0
14666 #define MC_CMD_TSA_BIND_IN_OP_LEN 4
14667 /* enum: Retrieve the TSAN ID from a TSAN. TSAN ID is a unique identifier for
14668  * the network adapter. More specifically, TSAN ID equals the MAC address of
14669  * the network adapter. TSAN ID is used as part of the TSAN authentication
14670  * protocol. Refer to SF-114946-SW for more information.
14671  */
14672 #define MC_CMD_TSA_BIND_OP_GET_ID 0x1
14673 /* enum: Get a binding ticket from the TSAN. The binding ticket is used as part
14674  * of the binding procedure to authorize the binding of an adapter to a TSAID.
14675  * Refer to SF-114946-SW for more information.
14676  */
14677 #define MC_CMD_TSA_BIND_OP_GET_TICKET 0x2
14678 /* enum: Opcode associated with the propagation of a private key that TSAN uses
14679  * as part of post-binding authentication procedure. More specifically, TSAN
14680  * uses this key for a signing operation. TSAC uses the counterpart public key
14681  * to verify the signature. Note - The post-binding authentication occurs when
14682  * the TSAN-TSAC connection terminates and TSAN tries to reconnect. Refer to
14683  * SF-114946-SW for more information.
14684  */
14685 #define MC_CMD_TSA_BIND_OP_SET_KEY 0x3
14686 /* enum: Request an unbinding operation. Note- TSAN clears the binding ticket
14687  * from the Nvram section. Deprecated. Use MC_CMD_TSA_BIND_OP_UNBIND_EXT opcode
14688  * as indicated below.
14689  */
14690 #define MC_CMD_TSA_BIND_OP_UNBIND 0x4
14691 /* enum: Opcode associated with the propagation of the unbinding ticket data
14692  * blob. The latest SF-115479-TC spec requires a more secure unbinding
14693  * procedure based on unbinding ticket. Note- The previous unbind operation
14694  * based on MC_CMD_TSA_BIND_OP_UNBIND remains in place but now deprecated.
14695  */
14696 #define MC_CMD_TSA_BIND_OP_UNBIND_EXT 0x5
14697 /* enum: Opcode associated with the propagation of the unbinding secret token.
14698  * TSAN persists the unbinding secret token. Refer to SF-115479-TC for more
14699  * information.
14700  */
14701 #define MC_CMD_TSA_BIND_OP_SET_UNBINDTOKEN 0x6
14702 /* enum: Request a decommissioning operation. This is to force unbinding the
14703  * adapter. Note- This type of operation comes handy when keys other attributes
14704  * get corrupted at the database level on the controller side and not able to
14705  * unbind the adapter as part of a normal unbind procedure. Note- Refer to
14706  * SF-115479-TC for more information.
14707  */
14708 #define MC_CMD_TSA_BIND_OP_DECOMMISSION 0x7
14709 /* enum: Request a certificate. */
14710 #define MC_CMD_TSA_BIND_OP_GET_CERTIFICATE 0x8
14711
14712 /* MC_CMD_TSA_BIND_IN_GET_ID msgrequest */
14713 #define MC_CMD_TSA_BIND_IN_GET_ID_LEN 20
14714 /* The operation requested. */
14715 #define MC_CMD_TSA_BIND_IN_GET_ID_OP_OFST 0
14716 #define MC_CMD_TSA_BIND_IN_GET_ID_OP_LEN 4
14717 /* Cryptographic nonce that TSAC generates and sends to TSAN. TSAC generates
14718  * the nonce every time as part of the TSAN post-binding authentication
14719  * procedure when the TSAN-TSAC connection terminates and TSAN does need to re-
14720  * connect to the TSAC. Refer to SF-114946-SW for more information.
14721  */
14722 #define MC_CMD_TSA_BIND_IN_GET_ID_NONCE_OFST 4
14723 #define MC_CMD_TSA_BIND_IN_GET_ID_NONCE_LEN 16
14724
14725 /* MC_CMD_TSA_BIND_IN_GET_TICKET msgrequest */
14726 #define MC_CMD_TSA_BIND_IN_GET_TICKET_LEN 4
14727 /* The operation requested. */
14728 #define MC_CMD_TSA_BIND_IN_GET_TICKET_OP_OFST 0
14729 #define MC_CMD_TSA_BIND_IN_GET_TICKET_OP_LEN 4
14730
14731 /* MC_CMD_TSA_BIND_IN_SET_KEY msgrequest */
14732 #define MC_CMD_TSA_BIND_IN_SET_KEY_LENMIN 5
14733 #define MC_CMD_TSA_BIND_IN_SET_KEY_LENMAX 252
14734 #define MC_CMD_TSA_BIND_IN_SET_KEY_LEN(num) (4+1*(num))
14735 /* The operation requested. */
14736 #define MC_CMD_TSA_BIND_IN_SET_KEY_OP_OFST 0
14737 #define MC_CMD_TSA_BIND_IN_SET_KEY_OP_LEN 4
14738 /* This data blob contains the private key generated by the TSAC. TSAN uses
14739  * this key for a signing operation. Note- This private key is used in
14740  * conjunction with the post-binding TSAN authentication procedure that occurs
14741  * when the TSAN-TSAC connection terminates and TSAN tries to reconnect. Refer
14742  * to SF-114946-SW for more information.
14743  */
14744 #define MC_CMD_TSA_BIND_IN_SET_KEY_DATKEY_OFST 4
14745 #define MC_CMD_TSA_BIND_IN_SET_KEY_DATKEY_LEN 1
14746 #define MC_CMD_TSA_BIND_IN_SET_KEY_DATKEY_MINNUM 1
14747 #define MC_CMD_TSA_BIND_IN_SET_KEY_DATKEY_MAXNUM 248
14748
14749 /* MC_CMD_TSA_BIND_IN_UNBIND msgrequest: Asks for the un-binding procedure
14750  * Deprecated. Use MC_CMD_TSA_BIND_IN_UNBIND_EXT msgrequest as indicated below.
14751  */
14752 #define MC_CMD_TSA_BIND_IN_UNBIND_LEN 10
14753 /* The operation requested. */
14754 #define MC_CMD_TSA_BIND_IN_UNBIND_OP_OFST 0
14755 #define MC_CMD_TSA_BIND_IN_UNBIND_OP_LEN 4
14756 /* TSAN unique identifier for the network adapter */
14757 #define MC_CMD_TSA_BIND_IN_UNBIND_TSANID_OFST 4
14758 #define MC_CMD_TSA_BIND_IN_UNBIND_TSANID_LEN 6
14759
14760 /* MC_CMD_TSA_BIND_IN_UNBIND_EXT msgrequest: Asks for the un-binding procedure
14761  */
14762 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_LENMIN 93
14763 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_LENMAX 252
14764 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_LEN(num) (92+1*(num))
14765 /* The operation requested. */
14766 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_OP_OFST 0
14767 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_OP_LEN 4
14768 /* TSAN unique identifier for the network adapter */
14769 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSANID_OFST 4
14770 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSANID_LEN 6
14771 /* Align the arguments to 32 bits */
14772 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSANID_RSVD_OFST 10
14773 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSANID_RSVD_LEN 2
14774 /* This attribute identifies the TSA infrastructure domain. The length of the
14775  * TSAID attribute is limited to 64 bytes. This is how TSA SDK defines the max
14776  * length. Note- The TSAID is the Organizational Unit Name filed as part of the
14777  * root and server certificates.
14778  */
14779 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSAID_OFST 12
14780 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSAID_LEN 1
14781 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_TSAID_NUM 64
14782 /* Unbinding secret token. The adapter validates this unbinding token by
14783  * comparing it against the one stored on the adapter as part of the
14784  * MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN msgrequest. Refer to SF-115479-TC for
14785  * more information.
14786  */
14787 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_UNBINDTOKEN_OFST 76
14788 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_UNBINDTOKEN_LEN 16
14789 /* This is the signature of the above mentioned fields- TSANID, TSAID and
14790  * UNBINDTOKEN. As per current requirements, the SIG opaque data blob contains
14791  * ECDSA ECC-384 based signature. The ECC curve is secp384r1. The signature is
14792  * also ASN-1 encoded. Note- The signature is verified based on the public key
14793  * stored into the root certificate that is provisioned on the adapter side.
14794  * This key is known as the PUKtsaid. Refer to SF-115479-TC for more
14795  * information.
14796  */
14797 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_SIG_OFST 92
14798 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_SIG_LEN 1
14799 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_SIG_MINNUM 1
14800 #define MC_CMD_TSA_BIND_IN_UNBIND_EXT_SIG_MAXNUM 160
14801
14802 /* MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN msgrequest */
14803 #define MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN_LEN 20
14804 /* The operation requested. */
14805 #define MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN_OP_OFST 0
14806 #define MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN_OP_LEN 4
14807 /* Unbinding secret token. TSAN persists the unbinding secret token. Refer to
14808  * SF-115479-TC for more information.
14809  */
14810 #define MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN_UNBINDTOKEN_OFST 4
14811 #define MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN_UNBINDTOKEN_LEN 16
14812 /* enum: There are situations when the binding process does not complete
14813  * successfully due to key, other attributes corruption at the database level
14814  * (Controller). Adapter can't connect to the controller anymore. To recover,
14815  * make usage of the decommission command that forces the adapter into
14816  * unbinding state.
14817  */
14818 #define MC_CMD_TSA_BIND_IN_SET_UNBINDTOKEN_ADAPTER_BINDING_FAILURE 0x1
14819
14820 /* MC_CMD_TSA_BIND_IN_DECOMMISSION msgrequest: Asks for the decommissioning
14821  * procedure
14822  */
14823 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_LENMIN 109
14824 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_LENMAX 252
14825 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_LEN(num) (108+1*(num))
14826 /* This is the signature of the above mentioned fields- TSAID, USER and REASON.
14827  * As per current requirements, the SIG opaque data blob contains ECDSA ECC-384
14828  * based signature. The ECC curve is secp384r1. The signature is also ASN-1
14829  * encoded . Note- The signature is verified based on the public key stored
14830  * into the root certificate that is provisioned on the adapter side. This key
14831  * is known as the PUKtsaid. Refer to SF-115479-TC for more information.
14832  */
14833 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_SIG_OFST 108
14834 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_SIG_LEN 1
14835 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_SIG_MINNUM 1
14836 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_SIG_MAXNUM 144
14837 /* The operation requested. */
14838 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_OP_OFST 0
14839 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_OP_LEN 4
14840 /* This attribute identifies the TSA infrastructure domain. The length of the
14841  * TSAID attribute is limited to 64 bytes. This is how TSA SDK defines the max
14842  * length. Note- The TSAID is the Organizational Unit Name filed as part of the
14843  * root and server certificates.
14844  */
14845 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_TSAID_OFST 4
14846 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_TSAID_LEN 1
14847 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_TSAID_NUM 64
14848 /* User ID that comes, as an example, from the Controller. Note- The 33 byte
14849  * length of this attribute is max length of the linux user name plus null
14850  * character.
14851  */
14852 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_USER_OFST 68
14853 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_USER_LEN 1
14854 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_USER_NUM 33
14855 /* Align the arguments to 32 bits */
14856 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_USER_RSVD_OFST 101
14857 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_USER_RSVD_LEN 3
14858 /* Reason of why decommissioning happens Note- The list of reasons, defined as
14859  * part of the enumeration below, can be extended.
14860  */
14861 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_REASON_OFST 104
14862 #define MC_CMD_TSA_BIND_IN_DECOMMISSION_REASON_LEN 4
14863
14864 /* MC_CMD_TSA_BIND_IN_GET_CERTIFICATE msgrequest: Request a certificate. */
14865 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_LEN 8
14866 /* The operation requested, must be MC_CMD_TSA_BIND_OP_GET_CERTIFICATE. */
14867 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_OP_OFST 0
14868 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_OP_LEN 4
14869 /* Type of the certificate to be retrieved. */
14870 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_TYPE_OFST 4
14871 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_TYPE_LEN 4
14872 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_UNUSED  0x0 /* enum */
14873 /* enum: Adapter Authentication Certificate (AAC). The AAC is used by the
14874  * controller to verify the authenticity of the adapter.
14875  */
14876 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_AAC  0x1
14877 /* enum: Adapter Authentication Signing Certificate (AASC). The AASC is used by
14878  * the controller to verify the validity of AAC.
14879  */
14880 #define MC_CMD_TSA_BIND_IN_GET_CERTIFICATE_AASC  0x2
14881
14882 /* MC_CMD_TSA_BIND_OUT_GET_ID msgresponse */
14883 #define MC_CMD_TSA_BIND_OUT_GET_ID_LENMIN 15
14884 #define MC_CMD_TSA_BIND_OUT_GET_ID_LENMAX 252
14885 #define MC_CMD_TSA_BIND_OUT_GET_ID_LEN(num) (14+1*(num))
14886 /* The protocol operation code MC_CMD_TSA_BIND_OP_GET_ID that is sent back to
14887  * the caller.
14888  */
14889 #define MC_CMD_TSA_BIND_OUT_GET_ID_OP_OFST 0
14890 #define MC_CMD_TSA_BIND_OUT_GET_ID_OP_LEN 4
14891 /* Rules engine type. Note- The rules engine type allows TSAC to further
14892  * identify the connected endpoint (e.g. TSAN, NIC Emulator) type and take the
14893  * proper action accordingly. As an example, TSAC uses the rules engine type to
14894  * select the SF key that differs in the case of TSAN vs. NIC Emulator.
14895  */
14896 #define MC_CMD_TSA_BIND_OUT_GET_ID_RULE_ENGINE_OFST 4
14897 #define MC_CMD_TSA_BIND_OUT_GET_ID_RULE_ENGINE_LEN 4
14898 /* enum: Hardware rules engine. */
14899 #define MC_CMD_TSA_BIND_OUT_GET_ID_RULE_ENGINE_TSAN 0x1
14900 /* enum: Nic emulator rules engine. */
14901 #define MC_CMD_TSA_BIND_OUT_GET_ID_RULE_ENGINE_NEMU 0x2
14902 /* enum: SSFE. */
14903 #define MC_CMD_TSA_BIND_OUT_GET_ID_RULE_ENGINE_SSFE 0x3
14904 /* TSAN unique identifier for the network adapter */
14905 #define MC_CMD_TSA_BIND_OUT_GET_ID_TSANID_OFST 8
14906 #define MC_CMD_TSA_BIND_OUT_GET_ID_TSANID_LEN 6
14907 /* The signature data blob. The signature is computed against the message
14908  * formed by TSAN ID concatenated with the NONCE value. Refer to SF-115479-TC
14909  * for more information also in respect to the private keys that are used to
14910  * sign the message based on TSAN pre/post-binding authentication procedure.
14911  */
14912 #define MC_CMD_TSA_BIND_OUT_GET_ID_SIG_OFST 14
14913 #define MC_CMD_TSA_BIND_OUT_GET_ID_SIG_LEN 1
14914 #define MC_CMD_TSA_BIND_OUT_GET_ID_SIG_MINNUM 1
14915 #define MC_CMD_TSA_BIND_OUT_GET_ID_SIG_MAXNUM 238
14916
14917 /* MC_CMD_TSA_BIND_OUT_GET_TICKET msgresponse */
14918 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_LENMIN 5
14919 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_LENMAX 252
14920 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_LEN(num) (4+1*(num))
14921 /* The protocol operation code MC_CMD_TSA_BIND_OP_GET_TICKET that is sent back
14922  * to the caller.
14923  */
14924 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_OP_OFST 0
14925 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_OP_LEN 4
14926 /* The ticket represents the data blob construct that TSAN sends to TSAC as
14927  * part of the binding protocol. From the TSAN perspective the ticket is an
14928  * opaque construct. For more info refer to SF-115479-TC.
14929  */
14930 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_TICKET_OFST 4
14931 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_TICKET_LEN 1
14932 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_TICKET_MINNUM 1
14933 #define MC_CMD_TSA_BIND_OUT_GET_TICKET_TICKET_MAXNUM 248
14934
14935 /* MC_CMD_TSA_BIND_OUT_SET_KEY msgresponse */
14936 #define MC_CMD_TSA_BIND_OUT_SET_KEY_LEN 4
14937 /* The protocol operation code MC_CMD_TSA_BIND_OP_SET_KEY that is sent back to
14938  * the caller.
14939  */
14940 #define MC_CMD_TSA_BIND_OUT_SET_KEY_OP_OFST 0
14941 #define MC_CMD_TSA_BIND_OUT_SET_KEY_OP_LEN 4
14942
14943 /* MC_CMD_TSA_BIND_OUT_UNBIND msgresponse: Response to insecure unbind request.
14944  */
14945 #define MC_CMD_TSA_BIND_OUT_UNBIND_LEN 8
14946 /* Same as MC_CMD_ERR field, but included as 0 in success cases */
14947 #define MC_CMD_TSA_BIND_OUT_UNBIND_RESULT_OFST 0
14948 #define MC_CMD_TSA_BIND_OUT_UNBIND_RESULT_LEN 4
14949 /* Extra status information */
14950 #define MC_CMD_TSA_BIND_OUT_UNBIND_INFO_OFST 4
14951 #define MC_CMD_TSA_BIND_OUT_UNBIND_INFO_LEN 4
14952 /* enum: Unbind successful. */
14953 #define MC_CMD_TSA_BIND_OUT_UNBIND_OK_UNBOUND  0x0
14954 /* enum: TSANID mismatch */
14955 #define MC_CMD_TSA_BIND_OUT_UNBIND_ERR_BAD_TSANID  0x1
14956 /* enum: Unable to remove the binding ticket from persistent storage. */
14957 #define MC_CMD_TSA_BIND_OUT_UNBIND_ERR_REMOVE_TICKET  0x2
14958 /* enum: TSAN is not bound to a binding ticket. */
14959 #define MC_CMD_TSA_BIND_OUT_UNBIND_ERR_NOT_BOUND  0x3
14960
14961 /* MC_CMD_TSA_BIND_OUT_UNBIND_EXT msgresponse: Response to secure unbind
14962  * request. (Note! This has same fields as insecure unbind response but is a
14963  * response to a different command.)
14964  */
14965 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_LEN 8
14966 /* Same as MC_CMD_ERR field, but included as 0 in success cases */
14967 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_RESULT_OFST 0
14968 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_RESULT_LEN 4
14969 /* Extra status information */
14970 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_INFO_OFST 4
14971 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_INFO_LEN 4
14972 /* enum: Unbind successful. */
14973 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_OK_UNBOUND  0x0
14974 /* enum: TSANID mismatch */
14975 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_ERR_BAD_TSANID  0x1
14976 /* enum: Unable to remove the binding ticket from persistent storage. */
14977 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_ERR_REMOVE_TICKET  0x2
14978 /* enum: TSAN is not bound to a binding ticket. */
14979 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_ERR_NOT_BOUND  0x3
14980 /* enum: Invalid unbind token */
14981 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_ERR_BAD_TOKEN  0x4
14982 /* enum: Invalid signature */
14983 #define MC_CMD_TSA_BIND_OUT_UNBIND_EXT_ERR_BAD_SIGNATURE  0x5
14984
14985 /* MC_CMD_TSA_BIND_OUT_SET_UNBINDTOKEN msgresponse */
14986 #define MC_CMD_TSA_BIND_OUT_SET_UNBINDTOKEN_LEN 4
14987 /* The protocol operation code MC_CMD_TSA_BIND_OP_SET_UNBINDTOKEN that is sent
14988  * back to the caller.
14989  */
14990 #define MC_CMD_TSA_BIND_OUT_SET_UNBINDTOKEN_OP_OFST 0
14991 #define MC_CMD_TSA_BIND_OUT_SET_UNBINDTOKEN_OP_LEN 4
14992
14993 /* MC_CMD_TSA_BIND_OUT_DECOMMISSION msgresponse */
14994 #define MC_CMD_TSA_BIND_OUT_DECOMMISSION_LEN 4
14995 /* The protocol operation code MC_CMD_TSA_BIND_OP_DECOMMISSION that is sent
14996  * back to the caller.
14997  */
14998 #define MC_CMD_TSA_BIND_OUT_DECOMMISSION_OP_OFST 0
14999 #define MC_CMD_TSA_BIND_OUT_DECOMMISSION_OP_LEN 4
15000
15001 /* MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE msgresponse */
15002 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_LENMIN 9
15003 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_LENMAX 252
15004 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_LEN(num) (8+1*(num))
15005 /* The protocol operation code MC_CMD_TSA_BIND_OP_GET_CERTIFICATE that is sent
15006  * back to the caller.
15007  */
15008 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_OP_OFST 0
15009 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_OP_LEN 4
15010 /* Type of the certificate. */
15011 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_TYPE_OFST 4
15012 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_TYPE_LEN 4
15013 /*            Enum values, see field(s): */
15014 /*               MC_CMD_TSA_BIND_IN_GET_CERTIFICATE/TYPE */
15015 /* The certificate data. */
15016 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_DATA_OFST 8
15017 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_DATA_LEN 1
15018 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_DATA_MINNUM 1
15019 #define MC_CMD_TSA_BIND_OUT_GET_CERTIFICATE_DATA_MAXNUM 244
15020
15021
15022 /***********************************/
15023 /* MC_CMD_MANAGE_SECURITY_RULESET_CACHE
15024  * Manage the persistent NVRAM cache of security rules created with
15025  * MC_CMD_SET_SECURITY_RULE. Note that the cache is not automatically updated
15026  * as rules are added or removed; the active ruleset must be explicitly
15027  * committed to the cache. The cache may also be explicitly invalidated,
15028  * without affecting the currently active ruleset. When the cache is valid, it
15029  * will be loaded at power on or MC reboot, instead of the default ruleset.
15030  * Rollback of the currently active ruleset to the cached version (when it is
15031  * valid) is also supported. (Medford-only; for use by SolarSecure apps, not
15032  * directly by drivers. See SF-114946-SW.) NOTE - this message definition is
15033  * provisional. It has not yet been used in any released code and may change
15034  * during development. This note will be removed once it is regarded as stable.
15035  */
15036 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE 0x11a
15037 #undef  MC_CMD_0x11a_PRIVILEGE_CTG
15038
15039 #define MC_CMD_0x11a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15040
15041 /* MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN msgrequest */
15042 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_LEN 4
15043 /* the operation to perform */
15044 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_OP_OFST 0
15045 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_OP_LEN 4
15046 /* enum: reports the ruleset version that is cached in persistent storage but
15047  * performs no other action
15048  */
15049 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_OP_GET_CACHED_VERSION  0x0
15050 /* enum: rolls back the active state to the cached version. (May fail with
15051  * ENOENT if there is no valid cached version.)
15052  */
15053 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_OP_ROLLBACK  0x1
15054 /* enum: commits the active state to the persistent cache */
15055 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_OP_COMMIT  0x2
15056 /* enum: invalidates the persistent cache without affecting the active state */
15057 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_IN_OP_INVALIDATE  0x3
15058
15059 /* MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT msgresponse */
15060 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_LENMIN 5
15061 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_LENMAX 252
15062 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_LEN(num) (4+1*(num))
15063 /* indicates whether the persistent cache is valid (after completion of the
15064  * requested operation in the case of rollback, commit, or invalidate)
15065  */
15066 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_STATE_OFST 0
15067 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_STATE_LEN 4
15068 /* enum: persistent cache is invalid (the VERSION field will be empty in this
15069  * case)
15070  */
15071 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_STATE_INVALID  0x0
15072 /* enum: persistent cache is valid */
15073 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_STATE_VALID  0x1
15074 /* cached ruleset version (after completion of the requested operation, in the
15075  * case of rollback, commit, or invalidate) as an opaque hash value in the same
15076  * form as MC_CMD_GET_SECURITY_RULESET_VERSION_OUT_VERSION
15077  */
15078 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_VERSION_OFST 4
15079 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_VERSION_LEN 1
15080 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_VERSION_MINNUM 1
15081 #define MC_CMD_MANAGE_SECURITY_RULESET_CACHE_OUT_VERSION_MAXNUM 248
15082
15083
15084 /***********************************/
15085 /* MC_CMD_NVRAM_PRIVATE_APPEND
15086  * Append a single TLV to the MC_USAGE_TLV partition. Returns MC_CMD_ERR_EEXIST
15087  * if the tag is already present.
15088  */
15089 #define MC_CMD_NVRAM_PRIVATE_APPEND 0x11c
15090 #undef  MC_CMD_0x11c_PRIVILEGE_CTG
15091
15092 #define MC_CMD_0x11c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15093
15094 /* MC_CMD_NVRAM_PRIVATE_APPEND_IN msgrequest */
15095 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENMIN 9
15096 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENMAX 252
15097 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_LEN(num) (8+1*(num))
15098 /* The tag to be appended */
15099 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_TAG_OFST 0
15100 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_TAG_LEN 4
15101 /* The length of the data */
15102 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENGTH_OFST 4
15103 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENGTH_LEN 4
15104 /* The data to be contained in the TLV structure */
15105 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_OFST 8
15106 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_LEN 1
15107 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_MINNUM 1
15108 #define MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_MAXNUM 244
15109
15110 /* MC_CMD_NVRAM_PRIVATE_APPEND_OUT msgresponse */
15111 #define MC_CMD_NVRAM_PRIVATE_APPEND_OUT_LEN 0
15112
15113
15114 /***********************************/
15115 /* MC_CMD_XPM_VERIFY_CONTENTS
15116  * Verify that the contents of the XPM memory is correct (Medford only). This
15117  * is used during manufacture to check that the XPM memory has been programmed
15118  * correctly at ATE.
15119  */
15120 #define MC_CMD_XPM_VERIFY_CONTENTS 0x11b
15121 #undef  MC_CMD_0x11b_PRIVILEGE_CTG
15122
15123 #define MC_CMD_0x11b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15124
15125 /* MC_CMD_XPM_VERIFY_CONTENTS_IN msgrequest */
15126 #define MC_CMD_XPM_VERIFY_CONTENTS_IN_LEN 4
15127 /* Data type to be checked */
15128 #define MC_CMD_XPM_VERIFY_CONTENTS_IN_DATA_TYPE_OFST 0
15129 #define MC_CMD_XPM_VERIFY_CONTENTS_IN_DATA_TYPE_LEN 4
15130
15131 /* MC_CMD_XPM_VERIFY_CONTENTS_OUT msgresponse */
15132 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_LENMIN 12
15133 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_LENMAX 252
15134 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_LEN(num) (12+1*(num))
15135 /* Number of sectors found (test builds only) */
15136 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_SECTORS_OFST 0
15137 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_SECTORS_LEN 4
15138 /* Number of bytes found (test builds only) */
15139 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_BYTES_OFST 4
15140 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_BYTES_LEN 4
15141 /* Length of signature */
15142 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIG_LENGTH_OFST 8
15143 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIG_LENGTH_LEN 4
15144 /* Signature */
15145 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_OFST 12
15146 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_LEN 1
15147 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_MINNUM 0
15148 #define MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_MAXNUM 240
15149
15150
15151 /***********************************/
15152 /* MC_CMD_SET_EVQ_TMR
15153  * Update the timer load, timer reload and timer mode values for a given EVQ.
15154  * The requested timer values (in TMR_LOAD_REQ_NS and TMR_RELOAD_REQ_NS) will
15155  * be rounded up to the granularity supported by the hardware, then truncated
15156  * to the range supported by the hardware. The resulting value after the
15157  * rounding and truncation will be returned to the caller (in TMR_LOAD_ACT_NS
15158  * and TMR_RELOAD_ACT_NS).
15159  */
15160 #define MC_CMD_SET_EVQ_TMR 0x120
15161 #undef  MC_CMD_0x120_PRIVILEGE_CTG
15162
15163 #define MC_CMD_0x120_PRIVILEGE_CTG SRIOV_CTG_GENERAL
15164
15165 /* MC_CMD_SET_EVQ_TMR_IN msgrequest */
15166 #define MC_CMD_SET_EVQ_TMR_IN_LEN 16
15167 /* Function-relative queue instance */
15168 #define MC_CMD_SET_EVQ_TMR_IN_INSTANCE_OFST 0
15169 #define MC_CMD_SET_EVQ_TMR_IN_INSTANCE_LEN 4
15170 /* Requested value for timer load (in nanoseconds) */
15171 #define MC_CMD_SET_EVQ_TMR_IN_TMR_LOAD_REQ_NS_OFST 4
15172 #define MC_CMD_SET_EVQ_TMR_IN_TMR_LOAD_REQ_NS_LEN 4
15173 /* Requested value for timer reload (in nanoseconds) */
15174 #define MC_CMD_SET_EVQ_TMR_IN_TMR_RELOAD_REQ_NS_OFST 8
15175 #define MC_CMD_SET_EVQ_TMR_IN_TMR_RELOAD_REQ_NS_LEN 4
15176 /* Timer mode. Meanings as per EVQ_TMR_REG.TC_TIMER_VAL */
15177 #define MC_CMD_SET_EVQ_TMR_IN_TMR_MODE_OFST 12
15178 #define MC_CMD_SET_EVQ_TMR_IN_TMR_MODE_LEN 4
15179 #define MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_DIS  0x0 /* enum */
15180 #define MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_IMMED_START  0x1 /* enum */
15181 #define MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_TRIG_START  0x2 /* enum */
15182 #define MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_INT_HLDOFF  0x3 /* enum */
15183
15184 /* MC_CMD_SET_EVQ_TMR_OUT msgresponse */
15185 #define MC_CMD_SET_EVQ_TMR_OUT_LEN 8
15186 /* Actual value for timer load (in nanoseconds) */
15187 #define MC_CMD_SET_EVQ_TMR_OUT_TMR_LOAD_ACT_NS_OFST 0
15188 #define MC_CMD_SET_EVQ_TMR_OUT_TMR_LOAD_ACT_NS_LEN 4
15189 /* Actual value for timer reload (in nanoseconds) */
15190 #define MC_CMD_SET_EVQ_TMR_OUT_TMR_RELOAD_ACT_NS_OFST 4
15191 #define MC_CMD_SET_EVQ_TMR_OUT_TMR_RELOAD_ACT_NS_LEN 4
15192
15193
15194 /***********************************/
15195 /* MC_CMD_GET_EVQ_TMR_PROPERTIES
15196  * Query properties about the event queue timers.
15197  */
15198 #define MC_CMD_GET_EVQ_TMR_PROPERTIES 0x122
15199 #undef  MC_CMD_0x122_PRIVILEGE_CTG
15200
15201 #define MC_CMD_0x122_PRIVILEGE_CTG SRIOV_CTG_GENERAL
15202
15203 /* MC_CMD_GET_EVQ_TMR_PROPERTIES_IN msgrequest */
15204 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_IN_LEN 0
15205
15206 /* MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT msgresponse */
15207 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_LEN 36
15208 /* Reserved for future use. */
15209 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_FLAGS_OFST 0
15210 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_FLAGS_LEN 4
15211 /* For timers updated via writes to EVQ_TMR_REG, this is the time interval (in
15212  * nanoseconds) for each increment of the timer load/reload count. The
15213  * requested duration of a timer is this value multiplied by the timer
15214  * load/reload count.
15215  */
15216 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_NS_PER_COUNT_OFST 4
15217 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_NS_PER_COUNT_LEN 4
15218 /* For timers updated via writes to EVQ_TMR_REG, this is the maximum value
15219  * allowed for timer load/reload counts.
15220  */
15221 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_MAX_COUNT_OFST 8
15222 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_MAX_COUNT_LEN 4
15223 /* For timers updated via writes to EVQ_TMR_REG, timer load/reload counts not a
15224  * multiple of this step size will be rounded in an implementation defined
15225  * manner.
15226  */
15227 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_STEP_OFST 12
15228 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_STEP_LEN 4
15229 /* Maximum timer duration (in nanoseconds) for timers updated via MCDI. Only
15230  * meaningful if MC_CMD_SET_EVQ_TMR is implemented.
15231  */
15232 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_MAX_NS_OFST 16
15233 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_MAX_NS_LEN 4
15234 /* Timer durations requested via MCDI that are not a multiple of this step size
15235  * will be rounded up. Only meaningful if MC_CMD_SET_EVQ_TMR is implemented.
15236  */
15237 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_STEP_NS_OFST 20
15238 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_STEP_NS_LEN 4
15239 /* For timers updated using the bug35388 workaround, this is the time interval
15240  * (in nanoseconds) for each increment of the timer load/reload count. The
15241  * requested duration of a timer is this value multiplied by the timer
15242  * load/reload count. This field is only meaningful if the bug35388 workaround
15243  * is enabled.
15244  */
15245 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_NS_PER_COUNT_OFST 24
15246 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_NS_PER_COUNT_LEN 4
15247 /* For timers updated using the bug35388 workaround, this is the maximum value
15248  * allowed for timer load/reload counts. This field is only meaningful if the
15249  * bug35388 workaround is enabled.
15250  */
15251 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_MAX_COUNT_OFST 28
15252 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_MAX_COUNT_LEN 4
15253 /* For timers updated using the bug35388 workaround, timer load/reload counts
15254  * not a multiple of this step size will be rounded in an implementation
15255  * defined manner. This field is only meaningful if the bug35388 workaround is
15256  * enabled.
15257  */
15258 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_STEP_OFST 32
15259 #define MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_STEP_LEN 4
15260
15261
15262 /***********************************/
15263 /* MC_CMD_ALLOCATE_TX_VFIFO_CP
15264  * When we use the TX_vFIFO_ULL mode, we can allocate common pools using the
15265  * non used switch buffers.
15266  */
15267 #define MC_CMD_ALLOCATE_TX_VFIFO_CP 0x11d
15268 #undef  MC_CMD_0x11d_PRIVILEGE_CTG
15269
15270 #define MC_CMD_0x11d_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15271
15272 /* MC_CMD_ALLOCATE_TX_VFIFO_CP_IN msgrequest */
15273 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_LEN 20
15274 /* Desired instance. Must be set to a specific instance, which is a function
15275  * local queue index.
15276  */
15277 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INSTANCE_OFST 0
15278 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INSTANCE_LEN 4
15279 /* Will the common pool be used as TX_vFIFO_ULL (1) */
15280 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_MODE_OFST 4
15281 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_MODE_LEN 4
15282 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_ENABLED       0x1 /* enum */
15283 /* enum: Using this interface without TX_vFIFO_ULL is not supported for now */
15284 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_DISABLED      0x0
15285 /* Number of buffers to reserve for the common pool */
15286 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_SIZE_OFST 8
15287 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_SIZE_LEN 4
15288 /* TX datapath to which the Common Pool is connected to. */
15289 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INGRESS_OFST 12
15290 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INGRESS_LEN 4
15291 /* enum: Extracts information from function */
15292 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_USE_FUNCTION_VALUE          -0x1
15293 /* Network port or RX Engine to which the common pool connects. */
15294 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_EGRESS_OFST 16
15295 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_EGRESS_LEN 4
15296 /* enum: Extracts information from function */
15297 /*               MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_USE_FUNCTION_VALUE          -0x1 */
15298 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT0          0x0 /* enum */
15299 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT1          0x1 /* enum */
15300 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT2          0x2 /* enum */
15301 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT3          0x3 /* enum */
15302 /* enum: To enable Switch loopback with Rx engine 0 */
15303 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_RX_ENGINE0     0x4
15304 /* enum: To enable Switch loopback with Rx engine 1 */
15305 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_RX_ENGINE1     0x5
15306
15307 /* MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT msgresponse */
15308 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT_LEN 4
15309 /* ID of the common pool allocated */
15310 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT_CP_ID_OFST 0
15311 #define MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT_CP_ID_LEN 4
15312
15313
15314 /***********************************/
15315 /* MC_CMD_ALLOCATE_TX_VFIFO_VFIFO
15316  * When we use the TX_vFIFO_ULL mode, we can allocate vFIFOs using the
15317  * previously allocated common pools.
15318  */
15319 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO 0x11e
15320 #undef  MC_CMD_0x11e_PRIVILEGE_CTG
15321
15322 #define MC_CMD_0x11e_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15323
15324 /* MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN msgrequest */
15325 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_LEN 20
15326 /* Common pool previously allocated to which the new vFIFO will be associated
15327  */
15328 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_CP_OFST 0
15329 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_CP_LEN 4
15330 /* Port or RX engine to associate the vFIFO egress */
15331 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_EGRESS_OFST 4
15332 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_EGRESS_LEN 4
15333 /* enum: Extracts information from common pool */
15334 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_USE_CP_VALUE   -0x1
15335 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT0          0x0 /* enum */
15336 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT1          0x1 /* enum */
15337 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT2          0x2 /* enum */
15338 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT3          0x3 /* enum */
15339 /* enum: To enable Switch loopback with Rx engine 0 */
15340 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_RX_ENGINE0     0x4
15341 /* enum: To enable Switch loopback with Rx engine 1 */
15342 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_RX_ENGINE1     0x5
15343 /* Minimum number of buffers that the pool must have */
15344 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_SIZE_OFST 8
15345 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_SIZE_LEN 4
15346 /* enum: Do not check the space available */
15347 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_NO_MINIMUM     0x0
15348 /* Will the vFIFO be used as TX_vFIFO_ULL */
15349 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_MODE_OFST 12
15350 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_MODE_LEN 4
15351 /* Network priority of the vFIFO,if applicable */
15352 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PRIORITY_OFST 16
15353 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PRIORITY_LEN 4
15354 /* enum: Search for the lowest unused priority */
15355 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_LOWEST_AVAILABLE  -0x1
15356
15357 /* MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT msgresponse */
15358 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_LEN 8
15359 /* Short vFIFO ID */
15360 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_VID_OFST 0
15361 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_VID_LEN 4
15362 /* Network priority of the vFIFO */
15363 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_PRIORITY_OFST 4
15364 #define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_PRIORITY_LEN 4
15365
15366
15367 /***********************************/
15368 /* MC_CMD_TEARDOWN_TX_VFIFO_VF
15369  * This interface clears the configuration of the given vFIFO and leaves it
15370  * ready to be re-used.
15371  */
15372 #define MC_CMD_TEARDOWN_TX_VFIFO_VF 0x11f
15373 #undef  MC_CMD_0x11f_PRIVILEGE_CTG
15374
15375 #define MC_CMD_0x11f_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15376
15377 /* MC_CMD_TEARDOWN_TX_VFIFO_VF_IN msgrequest */
15378 #define MC_CMD_TEARDOWN_TX_VFIFO_VF_IN_LEN 4
15379 /* Short vFIFO ID */
15380 #define MC_CMD_TEARDOWN_TX_VFIFO_VF_IN_VFIFO_OFST 0
15381 #define MC_CMD_TEARDOWN_TX_VFIFO_VF_IN_VFIFO_LEN 4
15382
15383 /* MC_CMD_TEARDOWN_TX_VFIFO_VF_OUT msgresponse */
15384 #define MC_CMD_TEARDOWN_TX_VFIFO_VF_OUT_LEN 0
15385
15386
15387 /***********************************/
15388 /* MC_CMD_DEALLOCATE_TX_VFIFO_CP
15389  * This interface clears the configuration of the given common pool and leaves
15390  * it ready to be re-used.
15391  */
15392 #define MC_CMD_DEALLOCATE_TX_VFIFO_CP 0x121
15393 #undef  MC_CMD_0x121_PRIVILEGE_CTG
15394
15395 #define MC_CMD_0x121_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15396
15397 /* MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN msgrequest */
15398 #define MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN_LEN 4
15399 /* Common pool ID given when pool allocated */
15400 #define MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN_POOL_ID_OFST 0
15401 #define MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN_POOL_ID_LEN 4
15402
15403 /* MC_CMD_DEALLOCATE_TX_VFIFO_CP_OUT msgresponse */
15404 #define MC_CMD_DEALLOCATE_TX_VFIFO_CP_OUT_LEN 0
15405
15406
15407 /***********************************/
15408 /* MC_CMD_REKEY
15409  * This request causes the NIC to generate a new per-NIC key and program it
15410  * into the write-once memory. During the process all flash partitions that are
15411  * protected with a CMAC are verified with the old per-NIC key and then signed
15412  * with the new per-NIC key. If the NIC has already reached its rekey limit the
15413  * REKEY op will return MC_CMD_ERR_ERANGE. The REKEY op may block until
15414  * completion or it may return 0 and continue processing, therefore the caller
15415  * must poll at least once to confirm that the rekeying has completed. The POLL
15416  * operation returns MC_CMD_ERR_EBUSY if the rekey process is still running
15417  * otherwise it will return the result of the last completed rekey operation,
15418  * or 0 if there has not been a previous rekey.
15419  */
15420 #define MC_CMD_REKEY 0x123
15421 #undef  MC_CMD_0x123_PRIVILEGE_CTG
15422
15423 #define MC_CMD_0x123_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15424
15425 /* MC_CMD_REKEY_IN msgrequest */
15426 #define MC_CMD_REKEY_IN_LEN 4
15427 /* the type of operation requested */
15428 #define MC_CMD_REKEY_IN_OP_OFST 0
15429 #define MC_CMD_REKEY_IN_OP_LEN 4
15430 /* enum: Start the rekeying operation */
15431 #define MC_CMD_REKEY_IN_OP_REKEY  0x0
15432 /* enum: Poll for completion of the rekeying operation */
15433 #define MC_CMD_REKEY_IN_OP_POLL  0x1
15434
15435 /* MC_CMD_REKEY_OUT msgresponse */
15436 #define MC_CMD_REKEY_OUT_LEN 0
15437
15438
15439 /***********************************/
15440 /* MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS
15441  * This interface allows the host to find out how many common pool buffers are
15442  * not yet assigned.
15443  */
15444 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS 0x124
15445 #undef  MC_CMD_0x124_PRIVILEGE_CTG
15446
15447 #define MC_CMD_0x124_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15448
15449 /* MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_IN msgrequest */
15450 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_IN_LEN 0
15451
15452 /* MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT msgresponse */
15453 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_LEN 8
15454 /* Available buffers for the ENG to NET vFIFOs. */
15455 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_NET_OFST 0
15456 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_NET_LEN 4
15457 /* Available buffers for the ENG to ENG and NET to ENG vFIFOs. */
15458 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_ENG_OFST 4
15459 #define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_ENG_LEN 4
15460
15461
15462 /***********************************/
15463 /* MC_CMD_SET_SECURITY_FUSES
15464  * Change the security level of the adapter by setting bits in the write-once
15465  * memory. The firmware maps each flag in the message to a set of one or more
15466  * hardware-defined or software-defined bits and sets these bits in the write-
15467  * once memory. For Medford the hardware-defined bits are defined in
15468  * SF-112079-PS 5.3, the software-defined bits are defined in xpm.h. Returns 0
15469  * if all of the required bits were set and returns MC_CMD_ERR_EIO if any of
15470  * the required bits were not set.
15471  */
15472 #define MC_CMD_SET_SECURITY_FUSES 0x126
15473 #undef  MC_CMD_0x126_PRIVILEGE_CTG
15474
15475 #define MC_CMD_0x126_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15476
15477 /* MC_CMD_SET_SECURITY_FUSES_IN msgrequest */
15478 #define MC_CMD_SET_SECURITY_FUSES_IN_LEN 4
15479 /* Flags specifying what type of security features are being set */
15480 #define MC_CMD_SET_SECURITY_FUSES_IN_FLAGS_OFST 0
15481 #define MC_CMD_SET_SECURITY_FUSES_IN_FLAGS_LEN 4
15482 #define MC_CMD_SET_SECURITY_FUSES_IN_SECURE_BOOT_LBN 0
15483 #define MC_CMD_SET_SECURITY_FUSES_IN_SECURE_BOOT_WIDTH 1
15484 #define MC_CMD_SET_SECURITY_FUSES_IN_REJECT_TEST_SIGNED_LBN 1
15485 #define MC_CMD_SET_SECURITY_FUSES_IN_REJECT_TEST_SIGNED_WIDTH 1
15486 #define MC_CMD_SET_SECURITY_FUSES_IN_SOFT_CONFIG_LBN 31
15487 #define MC_CMD_SET_SECURITY_FUSES_IN_SOFT_CONFIG_WIDTH 1
15488
15489 /* MC_CMD_SET_SECURITY_FUSES_OUT msgresponse */
15490 #define MC_CMD_SET_SECURITY_FUSES_OUT_LEN 0
15491
15492 /* MC_CMD_SET_SECURITY_FUSES_V2_OUT msgresponse */
15493 #define MC_CMD_SET_SECURITY_FUSES_V2_OUT_LEN 4
15494 /* Flags specifying which security features are enforced on the NIC after the
15495  * flags in the request have been applied. See
15496  * MC_CMD_SET_SECURITY_FUSES_IN/FLAGS for flag definitions.
15497  */
15498 #define MC_CMD_SET_SECURITY_FUSES_V2_OUT_FLAGS_OFST 0
15499 #define MC_CMD_SET_SECURITY_FUSES_V2_OUT_FLAGS_LEN 4
15500
15501
15502 /***********************************/
15503 /* MC_CMD_TSA_INFO
15504  * Messages sent from TSA adapter to TSA controller. This command is only valid
15505  * when the MCDI header has MESSAGE_TYPE set to MCDI_MESSAGE_TYPE_TSA. This
15506  * command is not sent by the driver to the MC; it is sent from the MC to a TSA
15507  * controller, being treated more like an alert message rather than a command;
15508  * hence the MC does not expect a response in return. Doxbox reference
15509  * SF-117371-SW
15510  */
15511 #define MC_CMD_TSA_INFO 0x127
15512 #undef  MC_CMD_0x127_PRIVILEGE_CTG
15513
15514 #define MC_CMD_0x127_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15515
15516 /* MC_CMD_TSA_INFO_IN msgrequest */
15517 #define MC_CMD_TSA_INFO_IN_LEN 4
15518 #define MC_CMD_TSA_INFO_IN_OP_HDR_OFST 0
15519 #define MC_CMD_TSA_INFO_IN_OP_HDR_LEN 4
15520 #define MC_CMD_TSA_INFO_IN_OP_LBN 0
15521 #define MC_CMD_TSA_INFO_IN_OP_WIDTH 16
15522 /* enum: Information about recently discovered local IP address of the adapter
15523  */
15524 #define MC_CMD_TSA_INFO_OP_LOCAL_IP 0x1
15525 /* enum: Information about a sampled packet that either - did not match any
15526  * black/white-list filters and was allowed by the default filter or - did not
15527  * match any black/white-list filters and was denied by the default filter
15528  */
15529 #define MC_CMD_TSA_INFO_OP_PKT_SAMPLE 0x2
15530
15531 /* MC_CMD_TSA_INFO_IN_LOCAL_IP msgrequest:
15532  *
15533  * The TSA controller maintains a list of IP addresses valid for each port of a
15534  * TSA adapter. The TSA controller requires information from the adapter
15535  * inorder to learn new IP addresses assigned to a physical port and to
15536  * identify those that are no longer assigned to the physical port. For this
15537  * purpose, the TSA adapter snoops ARP replys, gratuitous ARP requests and ARP
15538  * probe packets seen on each physical port. This definition describes the
15539  * format of the notification message sent from a TSA adapter to a TSA
15540  * controller related to any information related to a change in IP address
15541  * assignment for a port. Doxbox reference SF-117371.
15542  *
15543  * There may be a possibility of combining multiple notifications in a single
15544  * message in future. When that happens, a new flag can be defined using the
15545  * reserved bits to describe the extended format of this notification.
15546  */
15547 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_LEN 18
15548 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_OP_HDR_OFST 0
15549 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_OP_HDR_LEN 4
15550 /* Additional metadata describing the IP address information such as source of
15551  * information retrieval, type of IP address, physical port number.
15552  */
15553 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_OFST 4
15554 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_LEN 4
15555 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_PORT_INDEX_LBN 0
15556 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_PORT_INDEX_WIDTH 8
15557 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_RESERVED_LBN 8
15558 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_RESERVED_WIDTH 8
15559 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_REASON_LBN 16
15560 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_REASON_WIDTH 8
15561 /* enum: ARP reply sent out of the physical port */
15562 #define MC_CMD_TSA_INFO_IP_REASON_TX_ARP 0x0
15563 /* enum: ARP probe packet received on the physical port */
15564 #define MC_CMD_TSA_INFO_IP_REASON_RX_ARP_PROBE 0x1
15565 /* enum: Gratuitous ARP packet received on the physical port */
15566 #define MC_CMD_TSA_INFO_IP_REASON_RX_GRATUITOUS_ARP 0x2
15567 /* enum: DHCP ACK packet received on the physical port */
15568 #define MC_CMD_TSA_INFO_IP_REASON_RX_DHCP_ACK 0x3
15569 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_IPV4_LBN 24
15570 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_META_IPV4_WIDTH 1
15571 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_RESERVED1_LBN 25
15572 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_RESERVED1_WIDTH 7
15573 /* IPV4 address retrieved from the sampled packets. This field is relevant only
15574  * when META_IPV4 is set to 1.
15575  */
15576 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_IPV4_ADDR_OFST 8
15577 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_IPV4_ADDR_LEN 4
15578 /* Target MAC address retrieved from the sampled packet. */
15579 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_MAC_ADDR_OFST 12
15580 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_MAC_ADDR_LEN 1
15581 #define MC_CMD_TSA_INFO_IN_LOCAL_IP_MAC_ADDR_NUM 6
15582
15583 /* MC_CMD_TSA_INFO_IN_PKT_SAMPLE msgrequest:
15584  *
15585  * It is desireable for the TSA controller to learn the traffic pattern of
15586  * packets seen at the network port being monitored. In order to learn about
15587  * the traffic pattern, the TSA controller may want to sample packets seen at
15588  * the network port. Based on the packet samples that the TSA controller
15589  * receives from the adapter, the controller may choose to configure additional
15590  * black-list or white-list rules to allow or block packets as required.
15591  *
15592  * Although the entire sampled packet as seen on the network port is available
15593  * to the MC the length of sampled packet sent to controller is restricted by
15594  * MCDI payload size. Besides, the TSA controller does not require the entire
15595  * packet to make decisions about filter updates. Hence the packet sample being
15596  * passed to the controller is truncated to 128 bytes. This length is large
15597  * enough to hold the ethernet header, IP header and maximum length of
15598  * supported L4 protocol headers (IPv4 only, but can hold IPv6 header too, if
15599  * required in future).
15600  *
15601  * The intention is that any future changes to this message format that are not
15602  * backwards compatible will be defined with a new operation code.
15603  */
15604 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_LEN 136
15605 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_OP_HDR_OFST 0
15606 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_OP_HDR_LEN 4
15607 /* Additional metadata describing the sampled packet */
15608 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_OFST 4
15609 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_LEN 4
15610 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_PORT_INDEX_LBN 0
15611 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_PORT_INDEX_WIDTH 8
15612 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_DIRECTION_LBN 8
15613 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_DIRECTION_WIDTH 1
15614 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_RESERVED_LBN 9
15615 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_RESERVED_WIDTH 7
15616 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_MASK_LBN 16
15617 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_MASK_WIDTH 4
15618 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_ALLOW_LBN 16
15619 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_ALLOW_WIDTH 1
15620 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_DENY_LBN 17
15621 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_DENY_WIDTH 1
15622 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_COUNT_LBN 18
15623 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_META_ACTION_COUNT_WIDTH 1
15624 /* 128-byte raw prefix of the sampled packet which includes the ethernet
15625  * header, IP header and L4 protocol header (only IPv4 supported initially).
15626  * This provides the controller enough information about the packet sample to
15627  * report traffic patterns seen on a network port and to make decisions
15628  * concerning rule-set updates.
15629  */
15630 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_PACKET_DATA_OFST 8
15631 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_PACKET_DATA_LEN 1
15632 #define MC_CMD_TSA_INFO_IN_PKT_SAMPLE_PACKET_DATA_NUM 128
15633
15634 /* MC_CMD_TSA_INFO_OUT msgresponse */
15635 #define MC_CMD_TSA_INFO_OUT_LEN 0
15636
15637
15638 /***********************************/
15639 /* MC_CMD_HOST_INFO
15640  * Commands to appply or retrieve host-related information from an adapter.
15641  * Doxbox reference SF-117371-SW
15642  */
15643 #define MC_CMD_HOST_INFO 0x128
15644 #undef  MC_CMD_0x128_PRIVILEGE_CTG
15645
15646 #define MC_CMD_0x128_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15647
15648 /* MC_CMD_HOST_INFO_IN msgrequest */
15649 #define MC_CMD_HOST_INFO_IN_LEN 4
15650 /* sub-operation code info */
15651 #define MC_CMD_HOST_INFO_IN_OP_HDR_OFST 0
15652 #define MC_CMD_HOST_INFO_IN_OP_HDR_LEN 4
15653 #define MC_CMD_HOST_INFO_IN_OP_LBN 0
15654 #define MC_CMD_HOST_INFO_IN_OP_WIDTH 16
15655 /* enum: Read a 16-byte unique host identifier from the adapter. This UUID
15656  * helps to identify the host that an adapter is plugged into. This identifier
15657  * is ideally the system UUID retrieved and set by the UEFI driver. If the UEFI
15658  * driver is unable to extract the system UUID, it would still set a random
15659  * 16-byte value into each supported SF adapter plugged into it. Host UUIDs may
15660  * change if the system is power-cycled, however, they persist across adapter
15661  * resets. If the host UUID was not set on an adapter, due to an unsupported
15662  * version of UEFI driver, then this command returns an error. Doxbox reference
15663  * - SF-117371-SW section 'Host UUID'.
15664  */
15665 #define MC_CMD_HOST_INFO_OP_GET_UUID 0x0
15666 /* enum: Set a 16-byte unique host identifier on the adapter to identify the
15667  * host that the adapter is plugged into. See MC_CMD_HOST_INFO_OP_GET_UUID for
15668  * further details.
15669  */
15670 #define MC_CMD_HOST_INFO_OP_SET_UUID 0x1
15671
15672 /* MC_CMD_HOST_INFO_IN_GET_UUID msgrequest */
15673 #define MC_CMD_HOST_INFO_IN_GET_UUID_LEN 4
15674 /* sub-operation code info */
15675 #define MC_CMD_HOST_INFO_IN_GET_UUID_OP_HDR_OFST 0
15676 #define MC_CMD_HOST_INFO_IN_GET_UUID_OP_HDR_LEN 4
15677
15678 /* MC_CMD_HOST_INFO_OUT_GET_UUID msgresponse */
15679 #define MC_CMD_HOST_INFO_OUT_GET_UUID_LEN 16
15680 /* 16-byte host UUID read out of the adapter. See MC_CMD_HOST_INFO_OP_GET_UUID
15681  * for further details.
15682  */
15683 #define MC_CMD_HOST_INFO_OUT_GET_UUID_HOST_UUID_OFST 0
15684 #define MC_CMD_HOST_INFO_OUT_GET_UUID_HOST_UUID_LEN 1
15685 #define MC_CMD_HOST_INFO_OUT_GET_UUID_HOST_UUID_NUM 16
15686
15687 /* MC_CMD_HOST_INFO_IN_SET_UUID msgrequest */
15688 #define MC_CMD_HOST_INFO_IN_SET_UUID_LEN 20
15689 /* sub-operation code info */
15690 #define MC_CMD_HOST_INFO_IN_SET_UUID_OP_HDR_OFST 0
15691 #define MC_CMD_HOST_INFO_IN_SET_UUID_OP_HDR_LEN 4
15692 /* 16-byte host UUID set on the adapter. See MC_CMD_HOST_INFO_OP_GET_UUID for
15693  * further details.
15694  */
15695 #define MC_CMD_HOST_INFO_IN_SET_UUID_HOST_UUID_OFST 4
15696 #define MC_CMD_HOST_INFO_IN_SET_UUID_HOST_UUID_LEN 1
15697 #define MC_CMD_HOST_INFO_IN_SET_UUID_HOST_UUID_NUM 16
15698
15699 /* MC_CMD_HOST_INFO_OUT_SET_UUID msgresponse */
15700 #define MC_CMD_HOST_INFO_OUT_SET_UUID_LEN 0
15701
15702
15703 /***********************************/
15704 /* MC_CMD_TSAN_INFO
15705  * Get TSA adapter information. TSA controllers query each TSA adapter to learn
15706  * some configuration parameters of each adapter. Doxbox reference SF-117371-SW
15707  * section 'Adapter Information'
15708  */
15709 #define MC_CMD_TSAN_INFO 0x129
15710 #undef  MC_CMD_0x129_PRIVILEGE_CTG
15711
15712 #define MC_CMD_0x129_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15713
15714 /* MC_CMD_TSAN_INFO_IN msgrequest */
15715 #define MC_CMD_TSAN_INFO_IN_LEN 4
15716 /* sub-operation code info */
15717 #define MC_CMD_TSAN_INFO_IN_OP_HDR_OFST 0
15718 #define MC_CMD_TSAN_INFO_IN_OP_HDR_LEN 4
15719 #define MC_CMD_TSAN_INFO_IN_OP_LBN 0
15720 #define MC_CMD_TSAN_INFO_IN_OP_WIDTH 16
15721 /* enum: Read configuration parameters and IDs that uniquely identify an
15722  * adapter. The parameters include - host identification, adapter
15723  * identification string and number of physical ports on the adapter.
15724  */
15725 #define MC_CMD_TSAN_INFO_OP_GET_CFG 0x0
15726
15727 /* MC_CMD_TSAN_INFO_IN_GET_CFG msgrequest */
15728 #define MC_CMD_TSAN_INFO_IN_GET_CFG_LEN 4
15729 /* sub-operation code info */
15730 #define MC_CMD_TSAN_INFO_IN_GET_CFG_OP_HDR_OFST 0
15731 #define MC_CMD_TSAN_INFO_IN_GET_CFG_OP_HDR_LEN 4
15732
15733 /* MC_CMD_TSAN_INFO_OUT_GET_CFG msgresponse */
15734 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_LEN 26
15735 /* Information about the configuration parameters returned in this response. */
15736 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_CONFIG_WORD_OFST 0
15737 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_CONFIG_WORD_LEN 4
15738 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_CAP_FLAGS_LBN 0
15739 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_CAP_FLAGS_WIDTH 16
15740 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_FLAG_HOST_UUID_VALID_LBN 0
15741 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_FLAG_HOST_UUID_VALID_WIDTH 1
15742 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_NUM_PORTS_LBN 16
15743 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_NUM_PORTS_WIDTH 8
15744 /* 16-byte host UUID read out of the adapter. See MC_CMD_HOST_INFO_OP_GET_UUID
15745  * for further details.
15746  */
15747 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_HOST_UUID_OFST 4
15748 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_HOST_UUID_LEN 1
15749 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_HOST_UUID_NUM 16
15750 /* A unique identifier per adapter. The base MAC address of the card is used
15751  * for this purpose.
15752  */
15753 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_GUID_OFST 20
15754 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_GUID_LEN 1
15755 #define MC_CMD_TSAN_INFO_OUT_GET_CFG_GUID_NUM 6
15756
15757
15758 /***********************************/
15759 /* MC_CMD_TSA_STATISTICS
15760  * TSA adapter statistics operations.
15761  */
15762 #define MC_CMD_TSA_STATISTICS 0x130
15763 #undef  MC_CMD_0x130_PRIVILEGE_CTG
15764
15765 #define MC_CMD_0x130_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15766
15767 /* MC_CMD_TSA_STATISTICS_IN msgrequest */
15768 #define MC_CMD_TSA_STATISTICS_IN_LEN 4
15769 /* TSA statistics sub-operation code */
15770 #define MC_CMD_TSA_STATISTICS_IN_OP_CODE_OFST 0
15771 #define MC_CMD_TSA_STATISTICS_IN_OP_CODE_LEN 4
15772 /* enum: Get the configuration parameters that describe the TSA statistics
15773  * layout on the adapter.
15774  */
15775 #define MC_CMD_TSA_STATISTICS_OP_GET_CONFIG  0x0
15776 /* enum: Read and/or clear TSA statistics counters. */
15777 #define MC_CMD_TSA_STATISTICS_OP_READ_CLEAR  0x1
15778
15779 /* MC_CMD_TSA_STATISTICS_IN_GET_CONFIG msgrequest */
15780 #define MC_CMD_TSA_STATISTICS_IN_GET_CONFIG_LEN 4
15781 /* TSA statistics sub-operation code */
15782 #define MC_CMD_TSA_STATISTICS_IN_GET_CONFIG_OP_CODE_OFST 0
15783 #define MC_CMD_TSA_STATISTICS_IN_GET_CONFIG_OP_CODE_LEN 4
15784
15785 /* MC_CMD_TSA_STATISTICS_OUT_GET_CONFIG msgresponse */
15786 #define MC_CMD_TSA_STATISTICS_OUT_GET_CONFIG_LEN 8
15787 /* Maximum number of TSA statistics counters in each direction of dataflow
15788  * supported on the card. Note that the statistics counters are always
15789  * allocated in pairs, i.e. a counter ID is associated with one Tx and one Rx
15790  * counter.
15791  */
15792 #define MC_CMD_TSA_STATISTICS_OUT_GET_CONFIG_MAX_STATS_OFST 0
15793 #define MC_CMD_TSA_STATISTICS_OUT_GET_CONFIG_MAX_STATS_LEN 4
15794 /* Width of each statistics counter (represented in bits). This gives an
15795  * indication of wrap point to the user.
15796  */
15797 #define MC_CMD_TSA_STATISTICS_OUT_GET_CONFIG_STATS_WIDTH_OFST 4
15798 #define MC_CMD_TSA_STATISTICS_OUT_GET_CONFIG_STATS_WIDTH_LEN 4
15799
15800 /* MC_CMD_TSA_STATISTICS_IN_READ_CLEAR msgrequest */
15801 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_LENMIN 20
15802 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_LENMAX 252
15803 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_LEN(num) (16+4*(num))
15804 /* TSA statistics sub-operation code */
15805 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_OP_CODE_OFST 0
15806 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_OP_CODE_LEN 4
15807 /* Parameters describing the statistics operation */
15808 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_FLAGS_OFST 4
15809 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_FLAGS_LEN 4
15810 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_READ_LBN 0
15811 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_READ_WIDTH 1
15812 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_CLEAR_LBN 1
15813 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_CLEAR_WIDTH 1
15814 /* Counter ID list specification type */
15815 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_MODE_OFST 8
15816 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_MODE_LEN 4
15817 /* enum: The statistics counters are specified as an unordered list of
15818  * individual counter ID.
15819  */
15820 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_LIST  0x0
15821 /* enum: The statistics counters are specified as a range of consecutive
15822  * counter IDs.
15823  */
15824 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_RANGE  0x1
15825 /* Number of statistics counters */
15826 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_NUM_STATS_OFST 12
15827 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_NUM_STATS_LEN 4
15828 /* Counter IDs to be read/cleared. When mode is set to LIST, this entry holds a
15829  * list of counter IDs to be operated on. When mode is set to RANGE, this entry
15830  * holds a single counter ID representing the start of the range of counter IDs
15831  * to be operated on.
15832  */
15833 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_COUNTER_ID_OFST 16
15834 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_COUNTER_ID_LEN 4
15835 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_COUNTER_ID_MINNUM 1
15836 #define MC_CMD_TSA_STATISTICS_IN_READ_CLEAR_COUNTER_ID_MAXNUM 59
15837
15838 /* MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR msgresponse */
15839 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_LENMIN 24
15840 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_LENMAX 248
15841 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_LEN(num) (8+16*(num))
15842 /* Number of statistics counters returned in this response */
15843 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_NUM_STATS_OFST 0
15844 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_NUM_STATS_LEN 4
15845 /* MC_TSA_STATISTICS_ENTRY Note that this field is expected to start at a
15846  * 64-bit aligned offset
15847  */
15848 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_STATS_COUNTERS_OFST 8
15849 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_STATS_COUNTERS_LEN 16
15850 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_STATS_COUNTERS_MINNUM 1
15851 #define MC_CMD_TSA_STATISTICS_OUT_READ_CLEAR_STATS_COUNTERS_MAXNUM 15
15852
15853 /* MC_TSA_STATISTICS_ENTRY structuredef */
15854 #define MC_TSA_STATISTICS_ENTRY_LEN 16
15855 /* Tx statistics counter */
15856 #define MC_TSA_STATISTICS_ENTRY_TX_STAT_OFST 0
15857 #define MC_TSA_STATISTICS_ENTRY_TX_STAT_LEN 8
15858 #define MC_TSA_STATISTICS_ENTRY_TX_STAT_LO_OFST 0
15859 #define MC_TSA_STATISTICS_ENTRY_TX_STAT_HI_OFST 4
15860 #define MC_TSA_STATISTICS_ENTRY_TX_STAT_LBN 0
15861 #define MC_TSA_STATISTICS_ENTRY_TX_STAT_WIDTH 64
15862 /* Rx statistics counter */
15863 #define MC_TSA_STATISTICS_ENTRY_RX_STAT_OFST 8
15864 #define MC_TSA_STATISTICS_ENTRY_RX_STAT_LEN 8
15865 #define MC_TSA_STATISTICS_ENTRY_RX_STAT_LO_OFST 8
15866 #define MC_TSA_STATISTICS_ENTRY_RX_STAT_HI_OFST 12
15867 #define MC_TSA_STATISTICS_ENTRY_RX_STAT_LBN 64
15868 #define MC_TSA_STATISTICS_ENTRY_RX_STAT_WIDTH 64
15869
15870
15871 /***********************************/
15872 /* MC_CMD_ERASE_INITIAL_NIC_SECRET
15873  * This request causes the NIC to find the initial NIC secret (programmed
15874  * during ATE) in XPM memory and if and only if the NIC has already been
15875  * rekeyed with MC_CMD_REKEY, erase it. This is used by manftest after
15876  * installing TSA binding certificates. See SF-117631-TC.
15877  */
15878 #define MC_CMD_ERASE_INITIAL_NIC_SECRET 0x131
15879 #undef  MC_CMD_0x131_PRIVILEGE_CTG
15880
15881 #define MC_CMD_0x131_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15882
15883 /* MC_CMD_ERASE_INITIAL_NIC_SECRET_IN msgrequest */
15884 #define MC_CMD_ERASE_INITIAL_NIC_SECRET_IN_LEN 0
15885
15886 /* MC_CMD_ERASE_INITIAL_NIC_SECRET_OUT msgresponse */
15887 #define MC_CMD_ERASE_INITIAL_NIC_SECRET_OUT_LEN 0
15888
15889
15890 /***********************************/
15891 /* MC_CMD_TSA_CONFIG
15892  * TSA adapter configuration operations. This command is used to prepare the
15893  * NIC for TSA binding.
15894  */
15895 #define MC_CMD_TSA_CONFIG 0x64
15896 #undef  MC_CMD_0x64_PRIVILEGE_CTG
15897
15898 #define MC_CMD_0x64_PRIVILEGE_CTG SRIOV_CTG_ADMIN
15899
15900 /* MC_CMD_TSA_CONFIG_IN msgrequest */
15901 #define MC_CMD_TSA_CONFIG_IN_LEN 4
15902 /* TSA configuration sub-operation code */
15903 #define MC_CMD_TSA_CONFIG_IN_OP_OFST 0
15904 #define MC_CMD_TSA_CONFIG_IN_OP_LEN 4
15905 /* enum: Append a single item to the tsa_config partition. Items will be
15906  * encrypted unless they are declared as non-sensitive. Returns
15907  * MC_CMD_ERR_EEXIST if the tag is already present.
15908  */
15909 #define MC_CMD_TSA_CONFIG_OP_APPEND  0x1
15910 /* enum: Reset the tsa_config partition to a clean state. */
15911 #define MC_CMD_TSA_CONFIG_OP_RESET  0x2
15912 /* enum: Read back a configured item from tsa_config partition. Returns
15913  * MC_CMD_ERR_ENOENT if the item doesn't exist, or MC_CMD_ERR_EPERM if the item
15914  * is declared as sensitive (i.e. is encrypted).
15915  */
15916 #define MC_CMD_TSA_CONFIG_OP_READ  0x3
15917
15918 /* MC_CMD_TSA_CONFIG_IN_APPEND msgrequest */
15919 #define MC_CMD_TSA_CONFIG_IN_APPEND_LENMIN 12
15920 #define MC_CMD_TSA_CONFIG_IN_APPEND_LENMAX 252
15921 #define MC_CMD_TSA_CONFIG_IN_APPEND_LEN(num) (12+1*(num))
15922 /* TSA configuration sub-operation code. The value shall be
15923  * MC_CMD_TSA_CONFIG_OP_APPEND.
15924  */
15925 #define MC_CMD_TSA_CONFIG_IN_APPEND_OP_OFST 0
15926 #define MC_CMD_TSA_CONFIG_IN_APPEND_OP_LEN 4
15927 /* The tag to be appended */
15928 #define MC_CMD_TSA_CONFIG_IN_APPEND_TAG_OFST 4
15929 #define MC_CMD_TSA_CONFIG_IN_APPEND_TAG_LEN 4
15930 /* The length of the data in bytes */
15931 #define MC_CMD_TSA_CONFIG_IN_APPEND_LENGTH_OFST 8
15932 #define MC_CMD_TSA_CONFIG_IN_APPEND_LENGTH_LEN 4
15933 /* The item data */
15934 #define MC_CMD_TSA_CONFIG_IN_APPEND_DATA_OFST 12
15935 #define MC_CMD_TSA_CONFIG_IN_APPEND_DATA_LEN 1
15936 #define MC_CMD_TSA_CONFIG_IN_APPEND_DATA_MINNUM 0
15937 #define MC_CMD_TSA_CONFIG_IN_APPEND_DATA_MAXNUM 240
15938
15939 /* MC_CMD_TSA_CONFIG_OUT_APPEND msgresponse */
15940 #define MC_CMD_TSA_CONFIG_OUT_APPEND_LEN 0
15941
15942 /* MC_CMD_TSA_CONFIG_IN_RESET msgrequest */
15943 #define MC_CMD_TSA_CONFIG_IN_RESET_LEN 4
15944 /* TSA configuration sub-operation code. The value shall be
15945  * MC_CMD_TSA_CONFIG_OP_RESET.
15946  */
15947 #define MC_CMD_TSA_CONFIG_IN_RESET_OP_OFST 0
15948 #define MC_CMD_TSA_CONFIG_IN_RESET_OP_LEN 4
15949
15950 /* MC_CMD_TSA_CONFIG_OUT_RESET msgresponse */
15951 #define MC_CMD_TSA_CONFIG_OUT_RESET_LEN 0
15952
15953 /* MC_CMD_TSA_CONFIG_IN_READ msgrequest */
15954 #define MC_CMD_TSA_CONFIG_IN_READ_LEN 8
15955 /* TSA configuration sub-operation code. The value shall be
15956  * MC_CMD_TSA_CONFIG_OP_READ.
15957  */
15958 #define MC_CMD_TSA_CONFIG_IN_READ_OP_OFST 0
15959 #define MC_CMD_TSA_CONFIG_IN_READ_OP_LEN 4
15960 /* The tag to be read */
15961 #define MC_CMD_TSA_CONFIG_IN_READ_TAG_OFST 4
15962 #define MC_CMD_TSA_CONFIG_IN_READ_TAG_LEN 4
15963
15964 /* MC_CMD_TSA_CONFIG_OUT_READ msgresponse */
15965 #define MC_CMD_TSA_CONFIG_OUT_READ_LENMIN 8
15966 #define MC_CMD_TSA_CONFIG_OUT_READ_LENMAX 252
15967 #define MC_CMD_TSA_CONFIG_OUT_READ_LEN(num) (8+1*(num))
15968 /* The tag that was read */
15969 #define MC_CMD_TSA_CONFIG_OUT_READ_TAG_OFST 0
15970 #define MC_CMD_TSA_CONFIG_OUT_READ_TAG_LEN 4
15971 /* The length of the data in bytes */
15972 #define MC_CMD_TSA_CONFIG_OUT_READ_LENGTH_OFST 4
15973 #define MC_CMD_TSA_CONFIG_OUT_READ_LENGTH_LEN 4
15974 /* The data of the item. */
15975 #define MC_CMD_TSA_CONFIG_OUT_READ_DATA_OFST 8
15976 #define MC_CMD_TSA_CONFIG_OUT_READ_DATA_LEN 1
15977 #define MC_CMD_TSA_CONFIG_OUT_READ_DATA_MINNUM 0
15978 #define MC_CMD_TSA_CONFIG_OUT_READ_DATA_MAXNUM 244
15979
15980 /* MC_TSA_IPV4_ITEM structuredef */
15981 #define MC_TSA_IPV4_ITEM_LEN 8
15982 /* Additional metadata describing the IP address information such as the
15983  * physical port number the address is being used on. Unused space in this
15984  * field is reserved for future expansion.
15985  */
15986 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_META_OFST 0
15987 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_META_LEN 4
15988 #define MC_TSA_IPV4_ITEM_PORT_IDX_LBN 0
15989 #define MC_TSA_IPV4_ITEM_PORT_IDX_WIDTH 8
15990 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_META_LBN 0
15991 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_META_WIDTH 32
15992 /* The IPv4 address in little endian byte order. */
15993 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_OFST 4
15994 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_LEN 4
15995 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_LBN 32
15996 #define MC_TSA_IPV4_ITEM_IPV4_ADDR_WIDTH 32
15997
15998
15999 /***********************************/
16000 /* MC_CMD_TSA_IPADDR
16001  * TSA operations relating to the monitoring and expiry of local IP addresses
16002  * discovered by the controller. These commands are sent from a TSA controller
16003  * to a TSA adapter.
16004  */
16005 #define MC_CMD_TSA_IPADDR 0x65
16006 #undef  MC_CMD_0x65_PRIVILEGE_CTG
16007
16008 #define MC_CMD_0x65_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16009
16010 /* MC_CMD_TSA_IPADDR_IN msgrequest */
16011 #define MC_CMD_TSA_IPADDR_IN_LEN 4
16012 /* Header containing information to identify which sub-operation of this
16013  * command to perform. The header contains a 16-bit op-code. Unused space in
16014  * this field is reserved for future expansion.
16015  */
16016 #define MC_CMD_TSA_IPADDR_IN_OP_HDR_OFST 0
16017 #define MC_CMD_TSA_IPADDR_IN_OP_HDR_LEN 4
16018 #define MC_CMD_TSA_IPADDR_IN_OP_LBN 0
16019 #define MC_CMD_TSA_IPADDR_IN_OP_WIDTH 16
16020 /* enum: Request that the adapter verifies that the IPv4 addresses supplied are
16021  * still in use by the host by sending ARP probes to the host. The MC does not
16022  * wait for a response to the probes and sends an MCDI response to the
16023  * controller once the probes have been sent to the host. The response to the
16024  * probes (if there are any) will be forwarded to the controller using
16025  * MC_CMD_TSA_INFO alerts.
16026  */
16027 #define MC_CMD_TSA_IPADDR_OP_VALIDATE_IPV4  0x1
16028 /* enum: Notify the adapter that one or more IPv4 addresses are no longer valid
16029  * for the host of the adapter. The adapter should remove the IPv4 addresses
16030  * from its local cache.
16031  */
16032 #define MC_CMD_TSA_IPADDR_OP_REMOVE_IPV4  0x2
16033
16034 /* MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4 msgrequest */
16035 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_LENMIN 16
16036 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_LENMAX 248
16037 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_LEN(num) (8+8*(num))
16038 /* Header containing information to identify which sub-operation of this
16039  * command to perform. The header contains a 16-bit op-code. Unused space in
16040  * this field is reserved for future expansion.
16041  */
16042 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_OP_HDR_OFST 0
16043 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_OP_HDR_LEN 4
16044 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_OP_LBN 0
16045 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_OP_WIDTH 16
16046 /* Number of IPv4 addresses to validate. */
16047 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_NUM_ITEMS_OFST 4
16048 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_NUM_ITEMS_LEN 4
16049 /* The IPv4 addresses to validate, in struct MC_TSA_IPV4_ITEM format. */
16050 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_IPV4_ITEM_OFST 8
16051 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_IPV4_ITEM_LEN 8
16052 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_IPV4_ITEM_LO_OFST 8
16053 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_IPV4_ITEM_HI_OFST 12
16054 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_IPV4_ITEM_MINNUM 1
16055 #define MC_CMD_TSA_IPADDR_IN_VALIDATE_IPV4_IPV4_ITEM_MAXNUM 30
16056
16057 /* MC_CMD_TSA_IPADDR_OUT_VALIDATE_IPV4 msgresponse */
16058 #define MC_CMD_TSA_IPADDR_OUT_VALIDATE_IPV4_LEN 0
16059
16060 /* MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4 msgrequest */
16061 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_LENMIN 16
16062 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_LENMAX 248
16063 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_LEN(num) (8+8*(num))
16064 /* Header containing information to identify which sub-operation of this
16065  * command to perform. The header contains a 16-bit op-code. Unused space in
16066  * this field is reserved for future expansion.
16067  */
16068 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_OP_HDR_OFST 0
16069 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_OP_HDR_LEN 4
16070 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_OP_LBN 0
16071 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_OP_WIDTH 16
16072 /* Number of IPv4 addresses to remove. */
16073 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_NUM_ITEMS_OFST 4
16074 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_NUM_ITEMS_LEN 4
16075 /* The IPv4 addresses that have expired, in struct MC_TSA_IPV4_ITEM format. */
16076 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_IPV4_ITEM_OFST 8
16077 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_IPV4_ITEM_LEN 8
16078 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_IPV4_ITEM_LO_OFST 8
16079 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_IPV4_ITEM_HI_OFST 12
16080 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_IPV4_ITEM_MINNUM 1
16081 #define MC_CMD_TSA_IPADDR_IN_REMOVE_IPV4_IPV4_ITEM_MAXNUM 30
16082
16083 /* MC_CMD_TSA_IPADDR_OUT_REMOVE_IPV4 msgresponse */
16084 #define MC_CMD_TSA_IPADDR_OUT_REMOVE_IPV4_LEN 0
16085
16086
16087 /***********************************/
16088 /* MC_CMD_SECURE_NIC_INFO
16089  * Get secure NIC information. While many of the features reported by these
16090  * commands are related to TSA, they must be supported in firmware where TSA is
16091  * disabled.
16092  */
16093 #define MC_CMD_SECURE_NIC_INFO 0x132
16094 #undef  MC_CMD_0x132_PRIVILEGE_CTG
16095
16096 #define MC_CMD_0x132_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16097
16098 /* MC_CMD_SECURE_NIC_INFO_IN msgrequest */
16099 #define MC_CMD_SECURE_NIC_INFO_IN_LEN 4
16100 /* sub-operation code info */
16101 #define MC_CMD_SECURE_NIC_INFO_IN_OP_HDR_OFST 0
16102 #define MC_CMD_SECURE_NIC_INFO_IN_OP_HDR_LEN 4
16103 #define MC_CMD_SECURE_NIC_INFO_IN_OP_LBN 0
16104 #define MC_CMD_SECURE_NIC_INFO_IN_OP_WIDTH 16
16105 /* enum: Get the status of various security settings, all signed along with a
16106  * challenge chosen by the host.
16107  */
16108 #define MC_CMD_SECURE_NIC_INFO_OP_STATUS  0x0
16109
16110 /* MC_CMD_SECURE_NIC_INFO_IN_STATUS msgrequest */
16111 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_LEN 24
16112 /* sub-operation code, must be MC_CMD_SECURE_NIC_INFO_OP_STATUS */
16113 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_OP_HDR_OFST 0
16114 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_OP_HDR_LEN 4
16115 /* Type of key to be used to sign response. */
16116 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_KEY_TYPE_OFST 4
16117 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_KEY_TYPE_LEN 4
16118 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_UNUSED  0x0 /* enum */
16119 /* enum: Solarflare adapter authentication key, installed by Manftest. */
16120 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_SF_ADAPTER_AUTH  0x1
16121 /* enum: TSA binding key, installed after adapter is bound to a TSA controller.
16122  * This is not supported in firmware which does not support TSA.
16123  */
16124 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_TSA_BINDING  0x2
16125 /* enum: Customer adapter authentication key. Installed by the customer in the
16126  * field, but otherwise similar to the Solarflare adapter authentication key.
16127  */
16128 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_CUSTOMER_ADAPTER_AUTH  0x3
16129 /* Random challenge generated by the host. */
16130 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_CHALLENGE_OFST 8
16131 #define MC_CMD_SECURE_NIC_INFO_IN_STATUS_CHALLENGE_LEN 16
16132
16133 /* MC_CMD_SECURE_NIC_INFO_OUT_STATUS msgresponse */
16134 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_LEN 420
16135 /* Length of the signature in MSG_SIGNATURE. */
16136 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_MSG_SIGNATURE_LEN_OFST 0
16137 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_MSG_SIGNATURE_LEN_LEN 4
16138 /* Signature over the message, starting at MESSAGE_TYPE and continuing to the
16139  * end of the MCDI response, allowing the message format to be extended. The
16140  * signature uses ECDSA 384 encoding in ASN.1 format. It has variable length,
16141  * with a maximum of 384 bytes.
16142  */
16143 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_MSG_SIGNATURE_OFST 4
16144 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_MSG_SIGNATURE_LEN 384
16145 /* Enum value indicating the type of response. This protects against chosen
16146  * message attacks. The enum values are random rather than sequential to make
16147  * it unlikely that values will be reused should other commands in a different
16148  * namespace need to create signed messages.
16149  */
16150 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_MESSAGE_TYPE_OFST 388
16151 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_MESSAGE_TYPE_LEN 4
16152 /* enum: Message type value for the response to a
16153  * MC_CMD_SECURE_NIC_INFO_IN_STATUS message.
16154  */
16155 #define MC_CMD_SECURE_NIC_INFO_STATUS  0xdb4
16156 /* The challenge provided by the host in the MC_CMD_SECURE_NIC_INFO_IN_STATUS
16157  * message
16158  */
16159 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_CHALLENGE_OFST 392
16160 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_CHALLENGE_LEN 16
16161 /* The first 32 bits of XPM memory, which include security and flag bits, die
16162  * ID and chip ID revision. The meaning of these bits is defined in
16163  * mc/include/mc/xpm.h in the firmwaresrc repository.
16164  */
16165 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_XPM_STATUS_BITS_OFST 408
16166 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_XPM_STATUS_BITS_LEN 4
16167 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_A_OFST 412
16168 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_A_LEN 2
16169 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_B_OFST 414
16170 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_B_LEN 2
16171 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_C_OFST 416
16172 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_C_LEN 2
16173 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_D_OFST 418
16174 #define MC_CMD_SECURE_NIC_INFO_OUT_STATUS_FIRMWARE_VERSION_D_LEN 2
16175
16176
16177 /***********************************/
16178 /* MC_CMD_TSA_TEST
16179  * A simple ping-pong command just to test the adapter<>controller MCDI
16180  * communication channel. This command makes not changes to the TSA adapter's
16181  * internal state. It is used by the controller just to verify that the MCDI
16182  * communication channel is working fine. This command takes no additonal
16183  * parameters in request or response.
16184  */
16185 #define MC_CMD_TSA_TEST 0x125
16186 #undef  MC_CMD_0x125_PRIVILEGE_CTG
16187
16188 #define MC_CMD_0x125_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16189
16190 /* MC_CMD_TSA_TEST_IN msgrequest */
16191 #define MC_CMD_TSA_TEST_IN_LEN 0
16192
16193 /* MC_CMD_TSA_TEST_OUT msgresponse */
16194 #define MC_CMD_TSA_TEST_OUT_LEN 0
16195
16196
16197 /***********************************/
16198 /* MC_CMD_TSA_RULESET_OVERRIDE
16199  * Override TSA ruleset that is currently active on the adapter. This operation
16200  * does not modify the ruleset itself. This operation provides a mechanism to
16201  * apply an allow-all or deny-all operation on all packets, thereby completely
16202  * ignoring the rule-set configured on the adapter. The main purpose of this
16203  * operation is to provide a deterministic state to the TSA firewall during
16204  * rule-set transitions.
16205  */
16206 #define MC_CMD_TSA_RULESET_OVERRIDE 0x12a
16207 #undef  MC_CMD_0x12a_PRIVILEGE_CTG
16208
16209 #define MC_CMD_0x12a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16210
16211 /* MC_CMD_TSA_RULESET_OVERRIDE_IN msgrequest */
16212 #define MC_CMD_TSA_RULESET_OVERRIDE_IN_LEN 4
16213 /* The override state to apply. */
16214 #define MC_CMD_TSA_RULESET_OVERRIDE_IN_STATE_OFST 0
16215 #define MC_CMD_TSA_RULESET_OVERRIDE_IN_STATE_LEN 4
16216 /* enum: No override in place - the existing ruleset is in operation. */
16217 #define MC_CMD_TSA_RULESET_OVERRIDE_NONE  0x0
16218 /* enum: Block all packets seen on all datapath channel except those packets
16219  * required for basic configuration of the TSA NIC such as ARPs and TSA-
16220  * communication traffic. Such exceptional traffic is handled differently
16221  * compared to TSA rulesets.
16222  */
16223 #define MC_CMD_TSA_RULESET_OVERRIDE_BLOCK  0x1
16224 /* enum: Allow all packets through all datapath channel. The TSA adapter
16225  * behaves like a normal NIC without any firewalls.
16226  */
16227 #define MC_CMD_TSA_RULESET_OVERRIDE_ALLOW  0x2
16228
16229 /* MC_CMD_TSA_RULESET_OVERRIDE_OUT msgresponse */
16230 #define MC_CMD_TSA_RULESET_OVERRIDE_OUT_LEN 0
16231
16232
16233 /***********************************/
16234 /* MC_CMD_TSAC_REQUEST
16235  * Generic command to send requests from a TSA controller to a TSA adapter.
16236  * Specific usage is determined by the TYPE field.
16237  */
16238 #define MC_CMD_TSAC_REQUEST 0x12b
16239 #undef  MC_CMD_0x12b_PRIVILEGE_CTG
16240
16241 #define MC_CMD_0x12b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16242
16243 /* MC_CMD_TSAC_REQUEST_IN msgrequest */
16244 #define MC_CMD_TSAC_REQUEST_IN_LEN 4
16245 /* The type of request from the controller. */
16246 #define MC_CMD_TSAC_REQUEST_IN_TYPE_OFST 0
16247 #define MC_CMD_TSAC_REQUEST_IN_TYPE_LEN 4
16248 /* enum: Request the adapter to resend localIP information from it's cache. The
16249  * command does not return any IP address information; IP addresses are sent as
16250  * TSA notifications as descibed in MC_CMD_TSA_INFO_IN_LOCAL_IP.
16251  */
16252 #define MC_CMD_TSAC_REQUEST_LOCALIP  0x0
16253
16254 /* MC_CMD_TSAC_REQUEST_OUT msgresponse */
16255 #define MC_CMD_TSAC_REQUEST_OUT_LEN 0
16256
16257
16258 /***********************************/
16259 /* MC_CMD_SUC_VERSION
16260  * Get the version of the SUC
16261  */
16262 #define MC_CMD_SUC_VERSION 0x134
16263 #undef  MC_CMD_0x134_PRIVILEGE_CTG
16264
16265 #define MC_CMD_0x134_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16266
16267 /* MC_CMD_SUC_VERSION_IN msgrequest */
16268 #define MC_CMD_SUC_VERSION_IN_LEN 0
16269
16270 /* MC_CMD_SUC_VERSION_OUT msgresponse */
16271 #define MC_CMD_SUC_VERSION_OUT_LEN 24
16272 /* The SUC firmware version as four numbers - a.b.c.d */
16273 #define MC_CMD_SUC_VERSION_OUT_VERSION_OFST 0
16274 #define MC_CMD_SUC_VERSION_OUT_VERSION_LEN 4
16275 #define MC_CMD_SUC_VERSION_OUT_VERSION_NUM 4
16276 /* The date, in seconds since the Unix epoch, when the firmware image was
16277  * built.
16278  */
16279 #define MC_CMD_SUC_VERSION_OUT_BUILD_DATE_OFST 16
16280 #define MC_CMD_SUC_VERSION_OUT_BUILD_DATE_LEN 4
16281 /* The ID of the SUC chip. This is specific to the platform but typically
16282  * indicates family, memory sizes etc. See SF-116728-SW for further details.
16283  */
16284 #define MC_CMD_SUC_VERSION_OUT_CHIP_ID_OFST 20
16285 #define MC_CMD_SUC_VERSION_OUT_CHIP_ID_LEN 4
16286
16287
16288 /***********************************/
16289 /* MC_CMD_SUC_MANFTEST
16290  * Operations to support manftest on SUC based systems.
16291  */
16292 #define MC_CMD_SUC_MANFTEST 0x135
16293 #undef  MC_CMD_0x135_PRIVILEGE_CTG
16294
16295 #define MC_CMD_0x135_PRIVILEGE_CTG SRIOV_CTG_ADMIN
16296
16297 /* MC_CMD_SUC_MANFTEST_IN msgrequest */
16298 #define MC_CMD_SUC_MANFTEST_IN_LEN 4
16299 /* The manftest operation to be performed. */
16300 #define MC_CMD_SUC_MANFTEST_IN_OP_OFST 0
16301 #define MC_CMD_SUC_MANFTEST_IN_OP_LEN 4
16302 /* enum: Read serial number and use count. */
16303 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ  0x0
16304 /* enum: Update use count on wearout adapter. */
16305 #define MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE  0x1
16306 /* enum: Start an ADC calibration. */
16307 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START  0x2
16308 /* enum: Read the status of an ADC calibration. */
16309 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS  0x3
16310 /* enum: Read the results of an ADC calibration. */
16311 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_RESULT  0x4
16312 /* enum: Read the PCIe configuration. */
16313 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_READ  0x5
16314 /* enum: Write the PCIe configuration. */
16315 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE  0x6
16316
16317 /* MC_CMD_SUC_MANFTEST_OUT msgresponse */
16318 #define MC_CMD_SUC_MANFTEST_OUT_LEN 0
16319
16320 /* MC_CMD_SUC_MANFTEST_WEAROUT_READ_IN msgrequest */
16321 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_IN_LEN 4
16322 /* The manftest operation to be performed. This must be
16323  * MC_CMD_SUC_MANFTEST_WEAROUT_READ.
16324  */
16325 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_IN_OP_OFST 0
16326 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_IN_OP_LEN 4
16327
16328 /* MC_CMD_SUC_MANFTEST_WEAROUT_READ_OUT msgresponse */
16329 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_OUT_LEN 20
16330 /* The serial number of the wearout adapter, see SF-112717-PR for format. */
16331 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_OUT_SERIAL_NUMBER_OFST 0
16332 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_OUT_SERIAL_NUMBER_LEN 16
16333 /* The use count of the wearout adapter. */
16334 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_OUT_USE_COUNT_OFST 16
16335 #define MC_CMD_SUC_MANFTEST_WEAROUT_READ_OUT_USE_COUNT_LEN 4
16336
16337 /* MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE_IN msgrequest */
16338 #define MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE_IN_LEN 4
16339 /* The manftest operation to be performed. This must be
16340  * MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE.
16341  */
16342 #define MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE_IN_OP_OFST 0
16343 #define MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE_IN_OP_LEN 4
16344
16345 /* MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE_OUT msgresponse */
16346 #define MC_CMD_SUC_MANFTEST_WEAROUT_UPDATE_OUT_LEN 0
16347
16348 /* MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START_IN msgrequest */
16349 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START_IN_LEN 4
16350 /* The manftest operation to be performed. This must be
16351  * MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START.
16352  */
16353 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START_IN_OP_OFST 0
16354 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START_IN_OP_LEN 4
16355
16356 /* MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START_OUT msgresponse */
16357 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_START_OUT_LEN 0
16358
16359 /* MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_IN msgrequest */
16360 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_IN_LEN 4
16361 /* The manftest operation to be performed. This must be
16362  * MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS.
16363  */
16364 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_IN_OP_OFST 0
16365 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_IN_OP_LEN 4
16366
16367 /* MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT msgresponse */
16368 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_LEN 4
16369 /* The combined status of the calibration operation. */
16370 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_FLAGS_OFST 0
16371 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_FLAGS_LEN 4
16372 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_CALIBRATING_LBN 0
16373 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_CALIBRATING_WIDTH 1
16374 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_FAILED_LBN 1
16375 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_FAILED_WIDTH 1
16376 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_RESULT_LBN 2
16377 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_RESULT_WIDTH 4
16378 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_INDEX_LBN 6
16379 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_STATUS_OUT_INDEX_WIDTH 2
16380
16381 /* MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_RESULT_IN msgrequest */
16382 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_RESULT_IN_LEN 4
16383 /* The manftest operation to be performed. This must be
16384  * MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_RESULT.
16385  */
16386 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_RESULT_IN_OP_OFST 0
16387 #define MC_CMD_SUC_MANFTEST_ADC_CALIBRATE_RESULT_IN_OP_LEN 4
16388
16389 /* MC_CMD_SUC_WEAROUT_ADC_CALIBRATE_RESULT_OUT msgresponse */
16390 #define MC_CMD_SUC_WEAROUT_ADC_CALIBRATE_RESULT_OUT_LEN 12
16391 /* The set of calibration results. */
16392 #define MC_CMD_SUC_WEAROUT_ADC_CALIBRATE_RESULT_OUT_VALUE_OFST 0
16393 #define MC_CMD_SUC_WEAROUT_ADC_CALIBRATE_RESULT_OUT_VALUE_LEN 4
16394 #define MC_CMD_SUC_WEAROUT_ADC_CALIBRATE_RESULT_OUT_VALUE_NUM 3
16395
16396 /* MC_CMD_SUC_MANFTEST_CONFIG_PCIE_READ_IN msgrequest */
16397 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_READ_IN_LEN 4
16398 /* The manftest operation to be performed. This must be
16399  * MC_CMD_SUC_MANFTEST_CONFIG_PCIE_READ.
16400  */
16401 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_READ_IN_OP_OFST 0
16402 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_READ_IN_OP_LEN 4
16403
16404 /* MC_CMD_SUC_WEAROUT_CONFIG_PCIE_READ_OUT msgresponse */
16405 #define MC_CMD_SUC_WEAROUT_CONFIG_PCIE_READ_OUT_LEN 4
16406 /* The PCIe vendor ID. */
16407 #define MC_CMD_SUC_WEAROUT_CONFIG_PCIE_READ_OUT_VENDOR_ID_OFST 0
16408 #define MC_CMD_SUC_WEAROUT_CONFIG_PCIE_READ_OUT_VENDOR_ID_LEN 2
16409 /* The PCIe device ID. */
16410 #define MC_CMD_SUC_WEAROUT_CONFIG_PCIE_READ_OUT_DEVICE_ID_OFST 2
16411 #define MC_CMD_SUC_WEAROUT_CONFIG_PCIE_READ_OUT_DEVICE_ID_LEN 2
16412
16413 /* MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN msgrequest */
16414 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_LEN 8
16415 /* The manftest operation to be performed. This must be
16416  * MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE.
16417  */
16418 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_OP_OFST 0
16419 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_OP_LEN 4
16420 /* The PCIe vendor ID. */
16421 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_VENDOR_ID_OFST 4
16422 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_VENDOR_ID_LEN 2
16423 /* The PCIe device ID. */
16424 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_DEVICE_ID_OFST 6
16425 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_IN_DEVICE_ID_LEN 2
16426
16427 /* MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_OUT msgresponse */
16428 #define MC_CMD_SUC_MANFTEST_CONFIG_PCIE_WRITE_OUT_LEN 0
16429
16430 #endif /* _SIENA_MC_DRIVER_PCOL_H */
16431 /*! \cidoxg_end */