18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/****************************************************************************
38c2ecf20Sopenharmony_ci * Driver for Solarflare network controllers and boards
48c2ecf20Sopenharmony_ci * Copyright 2009-2018 Solarflare Communications Inc.
58c2ecf20Sopenharmony_ci * Copyright 2019-2020 Xilinx Inc.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef MCDI_PCOL_H
108c2ecf20Sopenharmony_ci#define MCDI_PCOL_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci/* Values to be written into FMCR_CZ_RESET_STATE_REG to control boot. */
138c2ecf20Sopenharmony_ci/* Power-on reset state */
148c2ecf20Sopenharmony_ci#define MC_FW_STATE_POR (1)
158c2ecf20Sopenharmony_ci/* If this is set in MC_RESET_STATE_REG then it should be
168c2ecf20Sopenharmony_ci * possible to jump into IMEM without loading code from flash. */
178c2ecf20Sopenharmony_ci#define MC_FW_WARM_BOOT_OK (2)
188c2ecf20Sopenharmony_ci/* The MC main image has started to boot. */
198c2ecf20Sopenharmony_ci#define MC_FW_STATE_BOOTING (4)
208c2ecf20Sopenharmony_ci/* The Scheduler has started. */
218c2ecf20Sopenharmony_ci#define MC_FW_STATE_SCHED (8)
228c2ecf20Sopenharmony_ci/* If this is set in MC_RESET_STATE_REG then it should be
238c2ecf20Sopenharmony_ci * possible to jump into IMEM without loading code from flash.
248c2ecf20Sopenharmony_ci * Unlike a warm boot, assume DMEM has been reloaded, so that
258c2ecf20Sopenharmony_ci * the MC persistent data must be reinitialised. */
268c2ecf20Sopenharmony_ci#define MC_FW_TEPID_BOOT_OK (16)
278c2ecf20Sopenharmony_ci/* We have entered the main firmware via recovery mode.  This
288c2ecf20Sopenharmony_ci * means that MC persistent data must be reinitialised, but that
298c2ecf20Sopenharmony_ci * we shouldn't touch PCIe config. */
308c2ecf20Sopenharmony_ci#define MC_FW_RECOVERY_MODE_PCIE_INIT_OK (32)
318c2ecf20Sopenharmony_ci/* BIST state has been initialized */
328c2ecf20Sopenharmony_ci#define MC_FW_BIST_INIT_OK (128)
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci/* Siena MC shared memmory offsets */
358c2ecf20Sopenharmony_ci/* The 'doorbell' addresses are hard-wired to alert the MC when written */
368c2ecf20Sopenharmony_ci#define	MC_SMEM_P0_DOORBELL_OFST	0x000
378c2ecf20Sopenharmony_ci#define	MC_SMEM_P1_DOORBELL_OFST	0x004
388c2ecf20Sopenharmony_ci/* The rest of these are firmware-defined */
398c2ecf20Sopenharmony_ci#define	MC_SMEM_P0_PDU_OFST		0x008
408c2ecf20Sopenharmony_ci#define	MC_SMEM_P1_PDU_OFST		0x108
418c2ecf20Sopenharmony_ci#define	MC_SMEM_PDU_LEN			0x100
428c2ecf20Sopenharmony_ci#define	MC_SMEM_P0_PTP_TIME_OFST	0x7f0
438c2ecf20Sopenharmony_ci#define	MC_SMEM_P0_STATUS_OFST		0x7f8
448c2ecf20Sopenharmony_ci#define	MC_SMEM_P1_STATUS_OFST		0x7fc
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci/* Values to be written to the per-port status dword in shared
478c2ecf20Sopenharmony_ci * memory on reboot and assert */
488c2ecf20Sopenharmony_ci#define MC_STATUS_DWORD_REBOOT (0xb007b007)
498c2ecf20Sopenharmony_ci#define MC_STATUS_DWORD_ASSERT (0xdeaddead)
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ci/* Check whether an mcfw version (in host order) belongs to a bootloader */
528c2ecf20Sopenharmony_ci#define MC_FW_VERSION_IS_BOOTLOADER(_v) (((_v) >> 16) == 0xb007)
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci/* The current version of the MCDI protocol.
558c2ecf20Sopenharmony_ci *
568c2ecf20Sopenharmony_ci * Note that the ROM burnt into the card only talks V0, so at the very
578c2ecf20Sopenharmony_ci * least every driver must support version 0 and MCDI_PCOL_VERSION
588c2ecf20Sopenharmony_ci */
598c2ecf20Sopenharmony_ci#define MCDI_PCOL_VERSION 2
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci/* Unused commands: 0x23, 0x27, 0x30, 0x31 */
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci/* MCDI version 1
648c2ecf20Sopenharmony_ci *
658c2ecf20Sopenharmony_ci * Each MCDI request starts with an MCDI_HEADER, which is a 32bit
668c2ecf20Sopenharmony_ci * structure, filled in by the client.
678c2ecf20Sopenharmony_ci *
688c2ecf20Sopenharmony_ci *       0       7  8     16    20     22  23  24    31
698c2ecf20Sopenharmony_ci *      | CODE | R | LEN | SEQ | Rsvd | E | R | XFLAGS |
708c2ecf20Sopenharmony_ci *               |                      |   |
718c2ecf20Sopenharmony_ci *               |                      |   \--- Response
728c2ecf20Sopenharmony_ci *               |                      \------- Error
738c2ecf20Sopenharmony_ci *               \------------------------------ Resync (always set)
748c2ecf20Sopenharmony_ci *
758c2ecf20Sopenharmony_ci * The client writes it's request into MC shared memory, and rings the
768c2ecf20Sopenharmony_ci * doorbell. Each request is completed by either by the MC writting
778c2ecf20Sopenharmony_ci * back into shared memory, or by writting out an event.
788c2ecf20Sopenharmony_ci *
798c2ecf20Sopenharmony_ci * All MCDI commands support completion by shared memory response. Each
808c2ecf20Sopenharmony_ci * request may also contain additional data (accounted for by HEADER.LEN),
818c2ecf20Sopenharmony_ci * and some response's may also contain additional data (again, accounted
828c2ecf20Sopenharmony_ci * for by HEADER.LEN).
838c2ecf20Sopenharmony_ci *
848c2ecf20Sopenharmony_ci * Some MCDI commands support completion by event, in which any associated
858c2ecf20Sopenharmony_ci * response data is included in the event.
868c2ecf20Sopenharmony_ci *
878c2ecf20Sopenharmony_ci * The protocol requires one response to be delivered for every request, a
888c2ecf20Sopenharmony_ci * request should not be sent unless the response for the previous request
898c2ecf20Sopenharmony_ci * has been received (either by polling shared memory, or by receiving
908c2ecf20Sopenharmony_ci * an event).
918c2ecf20Sopenharmony_ci */
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci/** Request/Response structure */
948c2ecf20Sopenharmony_ci#define MCDI_HEADER_OFST 0
958c2ecf20Sopenharmony_ci#define MCDI_HEADER_CODE_LBN 0
968c2ecf20Sopenharmony_ci#define MCDI_HEADER_CODE_WIDTH 7
978c2ecf20Sopenharmony_ci#define MCDI_HEADER_RESYNC_LBN 7
988c2ecf20Sopenharmony_ci#define MCDI_HEADER_RESYNC_WIDTH 1
998c2ecf20Sopenharmony_ci#define MCDI_HEADER_DATALEN_LBN 8
1008c2ecf20Sopenharmony_ci#define MCDI_HEADER_DATALEN_WIDTH 8
1018c2ecf20Sopenharmony_ci#define MCDI_HEADER_SEQ_LBN 16
1028c2ecf20Sopenharmony_ci#define MCDI_HEADER_SEQ_WIDTH 4
1038c2ecf20Sopenharmony_ci#define MCDI_HEADER_RSVD_LBN 20
1048c2ecf20Sopenharmony_ci#define MCDI_HEADER_RSVD_WIDTH 1
1058c2ecf20Sopenharmony_ci#define MCDI_HEADER_NOT_EPOCH_LBN 21
1068c2ecf20Sopenharmony_ci#define MCDI_HEADER_NOT_EPOCH_WIDTH 1
1078c2ecf20Sopenharmony_ci#define MCDI_HEADER_ERROR_LBN 22
1088c2ecf20Sopenharmony_ci#define MCDI_HEADER_ERROR_WIDTH 1
1098c2ecf20Sopenharmony_ci#define MCDI_HEADER_RESPONSE_LBN 23
1108c2ecf20Sopenharmony_ci#define MCDI_HEADER_RESPONSE_WIDTH 1
1118c2ecf20Sopenharmony_ci#define MCDI_HEADER_XFLAGS_LBN 24
1128c2ecf20Sopenharmony_ci#define MCDI_HEADER_XFLAGS_WIDTH 8
1138c2ecf20Sopenharmony_ci/* Request response using event */
1148c2ecf20Sopenharmony_ci#define MCDI_HEADER_XFLAGS_EVREQ 0x01
1158c2ecf20Sopenharmony_ci/* Request (and signal) early doorbell return */
1168c2ecf20Sopenharmony_ci#define MCDI_HEADER_XFLAGS_DBRET 0x02
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci/* Maximum number of payload bytes */
1198c2ecf20Sopenharmony_ci#define MCDI_CTL_SDU_LEN_MAX_V1 0xfc
1208c2ecf20Sopenharmony_ci#define MCDI_CTL_SDU_LEN_MAX_V2 0x400
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci#define MCDI_CTL_SDU_LEN_MAX MCDI_CTL_SDU_LEN_MAX_V2
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci
1258c2ecf20Sopenharmony_ci/* The MC can generate events for two reasons:
1268c2ecf20Sopenharmony_ci *   - To advance a shared memory request if XFLAGS_EVREQ was set
1278c2ecf20Sopenharmony_ci *   - As a notification (link state, i2c event), controlled
1288c2ecf20Sopenharmony_ci *     via MC_CMD_LOG_CTRL
1298c2ecf20Sopenharmony_ci *
1308c2ecf20Sopenharmony_ci * Both events share a common structure:
1318c2ecf20Sopenharmony_ci *
1328c2ecf20Sopenharmony_ci *  0      32     33      36    44     52     60
1338c2ecf20Sopenharmony_ci * | Data | Cont | Level | Src | Code | Rsvd |
1348c2ecf20Sopenharmony_ci *           |
1358c2ecf20Sopenharmony_ci *           \ There is another event pending in this notification
1368c2ecf20Sopenharmony_ci *
1378c2ecf20Sopenharmony_ci * If Code==CMDDONE, then the fields are further interpreted as:
1388c2ecf20Sopenharmony_ci *
1398c2ecf20Sopenharmony_ci *   - LEVEL==INFO    Command succeeded
1408c2ecf20Sopenharmony_ci *   - LEVEL==ERR     Command failed
1418c2ecf20Sopenharmony_ci *
1428c2ecf20Sopenharmony_ci *    0     8         16      24     32
1438c2ecf20Sopenharmony_ci *   | Seq | Datalen | Errno | Rsvd |
1448c2ecf20Sopenharmony_ci *
1458c2ecf20Sopenharmony_ci *   These fields are taken directly out of the standard MCDI header, i.e.,
1468c2ecf20Sopenharmony_ci *   LEVEL==ERR, Datalen == 0 => Reboot
1478c2ecf20Sopenharmony_ci *
1488c2ecf20Sopenharmony_ci * Events can be squirted out of the UART (using LOG_CTRL) without a
1498c2ecf20Sopenharmony_ci * MCDI header.  An event can be distinguished from a MCDI response by
1508c2ecf20Sopenharmony_ci * examining the first byte which is 0xc0.  This corresponds to the
1518c2ecf20Sopenharmony_ci * non-existent MCDI command MC_CMD_DEBUG_LOG.
1528c2ecf20Sopenharmony_ci *
1538c2ecf20Sopenharmony_ci *      0         7        8
1548c2ecf20Sopenharmony_ci *     | command | Resync |     = 0xc0
1558c2ecf20Sopenharmony_ci *
1568c2ecf20Sopenharmony_ci * Since the event is written in big-endian byte order, this works
1578c2ecf20Sopenharmony_ci * providing bits 56-63 of the event are 0xc0.
1588c2ecf20Sopenharmony_ci *
1598c2ecf20Sopenharmony_ci *      56     60  63
1608c2ecf20Sopenharmony_ci *     | Rsvd | Code |    = 0xc0
1618c2ecf20Sopenharmony_ci *
1628c2ecf20Sopenharmony_ci * Which means for convenience the event code is 0xc for all MC
1638c2ecf20Sopenharmony_ci * generated events.
1648c2ecf20Sopenharmony_ci */
1658c2ecf20Sopenharmony_ci#define FSE_AZ_EV_CODE_MCDI_EVRESPONSE 0xc
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci
1688c2ecf20Sopenharmony_ci/* Operation not permitted. */
1698c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EPERM 1
1708c2ecf20Sopenharmony_ci/* Non-existent command target */
1718c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOENT 2
1728c2ecf20Sopenharmony_ci/* assert() has killed the MC */
1738c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EINTR 4
1748c2ecf20Sopenharmony_ci/* I/O failure */
1758c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EIO 5
1768c2ecf20Sopenharmony_ci/* Already exists */
1778c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EEXIST 6
1788c2ecf20Sopenharmony_ci/* Try again */
1798c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EAGAIN 11
1808c2ecf20Sopenharmony_ci/* Out of memory */
1818c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOMEM 12
1828c2ecf20Sopenharmony_ci/* Caller does not hold required locks */
1838c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EACCES 13
1848c2ecf20Sopenharmony_ci/* Resource is currently unavailable (e.g. lock contention) */
1858c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EBUSY 16
1868c2ecf20Sopenharmony_ci/* No such device */
1878c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENODEV 19
1888c2ecf20Sopenharmony_ci/* Invalid argument to target */
1898c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EINVAL 22
1908c2ecf20Sopenharmony_ci/* Broken pipe */
1918c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EPIPE 32
1928c2ecf20Sopenharmony_ci/* Read-only */
1938c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EROFS 30
1948c2ecf20Sopenharmony_ci/* Out of range */
1958c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ERANGE 34
1968c2ecf20Sopenharmony_ci/* Non-recursive resource is already acquired */
1978c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EDEADLK 35
1988c2ecf20Sopenharmony_ci/* Operation not implemented */
1998c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOSYS 38
2008c2ecf20Sopenharmony_ci/* Operation timed out */
2018c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ETIME 62
2028c2ecf20Sopenharmony_ci/* Link has been severed */
2038c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOLINK 67
2048c2ecf20Sopenharmony_ci/* Protocol error */
2058c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EPROTO 71
2068c2ecf20Sopenharmony_ci/* Operation not supported */
2078c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOTSUP 95
2088c2ecf20Sopenharmony_ci/* Address not available */
2098c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EADDRNOTAVAIL 99
2108c2ecf20Sopenharmony_ci/* Not connected */
2118c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOTCONN 107
2128c2ecf20Sopenharmony_ci/* Operation already in progress */
2138c2ecf20Sopenharmony_ci#define MC_CMD_ERR_EALREADY 114
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci/* Resource allocation failed. */
2168c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ALLOC_FAIL  0x1000
2178c2ecf20Sopenharmony_ci/* V-adaptor not found. */
2188c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_VADAPTOR 0x1001
2198c2ecf20Sopenharmony_ci/* EVB port not found. */
2208c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_EVB_PORT 0x1002
2218c2ecf20Sopenharmony_ci/* V-switch not found. */
2228c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_VSWITCH  0x1003
2238c2ecf20Sopenharmony_ci/* Too many VLAN tags. */
2248c2ecf20Sopenharmony_ci#define MC_CMD_ERR_VLAN_LIMIT  0x1004
2258c2ecf20Sopenharmony_ci/* Bad PCI function number. */
2268c2ecf20Sopenharmony_ci#define MC_CMD_ERR_BAD_PCI_FUNC 0x1005
2278c2ecf20Sopenharmony_ci/* Invalid VLAN mode. */
2288c2ecf20Sopenharmony_ci#define MC_CMD_ERR_BAD_VLAN_MODE 0x1006
2298c2ecf20Sopenharmony_ci/* Invalid v-switch type. */
2308c2ecf20Sopenharmony_ci#define MC_CMD_ERR_BAD_VSWITCH_TYPE 0x1007
2318c2ecf20Sopenharmony_ci/* Invalid v-port type. */
2328c2ecf20Sopenharmony_ci#define MC_CMD_ERR_BAD_VPORT_TYPE 0x1008
2338c2ecf20Sopenharmony_ci/* MAC address exists. */
2348c2ecf20Sopenharmony_ci#define MC_CMD_ERR_MAC_EXIST 0x1009
2358c2ecf20Sopenharmony_ci/* Slave core not present */
2368c2ecf20Sopenharmony_ci#define MC_CMD_ERR_SLAVE_NOT_PRESENT 0x100a
2378c2ecf20Sopenharmony_ci/* The datapath is disabled. */
2388c2ecf20Sopenharmony_ci#define MC_CMD_ERR_DATAPATH_DISABLED 0x100b
2398c2ecf20Sopenharmony_ci/* The requesting client is not a function */
2408c2ecf20Sopenharmony_ci#define MC_CMD_ERR_CLIENT_NOT_FN  0x100c
2418c2ecf20Sopenharmony_ci/* The requested operation might require the
2428c2ecf20Sopenharmony_ci   command to be passed between MCs, and the
2438c2ecf20Sopenharmony_ci   transport doesn't support that.  Should
2448c2ecf20Sopenharmony_ci   only ever been seen over the UART. */
2458c2ecf20Sopenharmony_ci#define MC_CMD_ERR_TRANSPORT_NOPROXY 0x100d
2468c2ecf20Sopenharmony_ci/* VLAN tag(s) exists */
2478c2ecf20Sopenharmony_ci#define MC_CMD_ERR_VLAN_EXIST 0x100e
2488c2ecf20Sopenharmony_ci/* No MAC address assigned to an EVB port */
2498c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_MAC_ADDR 0x100f
2508c2ecf20Sopenharmony_ci/* Notifies the driver that the request has been relayed
2518c2ecf20Sopenharmony_ci * to an admin function for authorization. The driver should
2528c2ecf20Sopenharmony_ci * wait for a PROXY_RESPONSE event and then resend its request.
2538c2ecf20Sopenharmony_ci * This error code is followed by a 32-bit handle that
2548c2ecf20Sopenharmony_ci * helps matching it with the respective PROXY_RESPONSE event. */
2558c2ecf20Sopenharmony_ci#define MC_CMD_ERR_PROXY_PENDING 0x1010
2568c2ecf20Sopenharmony_ci#define MC_CMD_ERR_PROXY_PENDING_HANDLE_OFST 4
2578c2ecf20Sopenharmony_ci/* The request cannot be passed for authorization because
2588c2ecf20Sopenharmony_ci * another request from the same function is currently being
2598c2ecf20Sopenharmony_ci * authorized. The drvier should try again later. */
2608c2ecf20Sopenharmony_ci#define MC_CMD_ERR_PROXY_INPROGRESS 0x1011
2618c2ecf20Sopenharmony_ci/* Returned by MC_CMD_PROXY_COMPLETE if the caller is not the function
2628c2ecf20Sopenharmony_ci * that has enabled proxying or BLOCK_INDEX points to a function that
2638c2ecf20Sopenharmony_ci * doesn't await an authorization. */
2648c2ecf20Sopenharmony_ci#define MC_CMD_ERR_PROXY_UNEXPECTED 0x1012
2658c2ecf20Sopenharmony_ci/* This code is currently only used internally in FW. Its meaning is that
2668c2ecf20Sopenharmony_ci * an operation failed due to lack of SR-IOV privilege.
2678c2ecf20Sopenharmony_ci * Normally it is translated to EPERM by send_cmd_err(),
2688c2ecf20Sopenharmony_ci * but it may also be used to trigger some special mechanism
2698c2ecf20Sopenharmony_ci * for handling such case, e.g. to relay the failed request
2708c2ecf20Sopenharmony_ci * to a designated admin function for authorization. */
2718c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_PRIVILEGE 0x1013
2728c2ecf20Sopenharmony_ci/* Workaround 26807 could not be turned on/off because some functions
2738c2ecf20Sopenharmony_ci * have already installed filters. See the comment at
2748c2ecf20Sopenharmony_ci * MC_CMD_WORKAROUND_BUG26807.
2758c2ecf20Sopenharmony_ci * May also returned for other operations such as sub-variant switching. */
2768c2ecf20Sopenharmony_ci#define MC_CMD_ERR_FILTERS_PRESENT 0x1014
2778c2ecf20Sopenharmony_ci/* The clock whose frequency you've attempted to set set
2788c2ecf20Sopenharmony_ci * doesn't exist on this NIC */
2798c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_CLOCK 0x1015
2808c2ecf20Sopenharmony_ci/* Returned by MC_CMD_TESTASSERT if the action that should
2818c2ecf20Sopenharmony_ci * have caused an assertion failed to do so.  */
2828c2ecf20Sopenharmony_ci#define MC_CMD_ERR_UNREACHABLE 0x1016
2838c2ecf20Sopenharmony_ci/* This command needs to be processed in the background but there were no
2848c2ecf20Sopenharmony_ci * resources to do so. Send it again after a command has completed. */
2858c2ecf20Sopenharmony_ci#define MC_CMD_ERR_QUEUE_FULL 0x1017
2868c2ecf20Sopenharmony_ci/* The operation could not be completed because the PCIe link has gone
2878c2ecf20Sopenharmony_ci * away.  This error code is never expected to be returned over the TLP
2888c2ecf20Sopenharmony_ci * transport. */
2898c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_PCIE 0x1018
2908c2ecf20Sopenharmony_ci/* The operation could not be completed because the datapath has gone
2918c2ecf20Sopenharmony_ci * away.  This is distinct from MC_CMD_ERR_DATAPATH_DISABLED in that the
2928c2ecf20Sopenharmony_ci * datapath absence may be temporary*/
2938c2ecf20Sopenharmony_ci#define MC_CMD_ERR_NO_DATAPATH 0x1019
2948c2ecf20Sopenharmony_ci/* The operation could not complete because some VIs are allocated */
2958c2ecf20Sopenharmony_ci#define MC_CMD_ERR_VIS_PRESENT 0x101a
2968c2ecf20Sopenharmony_ci/* The operation could not complete because some PIO buffers are allocated */
2978c2ecf20Sopenharmony_ci#define MC_CMD_ERR_PIOBUFS_PRESENT 0x101b
2988c2ecf20Sopenharmony_ci
2998c2ecf20Sopenharmony_ci#define MC_CMD_ERR_CODE_OFST 0
3008c2ecf20Sopenharmony_ci
3018c2ecf20Sopenharmony_ci/* We define 8 "escape" commands to allow
3028c2ecf20Sopenharmony_ci   for command number space extension */
3038c2ecf20Sopenharmony_ci
3048c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_0	      0x78
3058c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_1	      0x79
3068c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_2	      0x7A
3078c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_3	      0x7B
3088c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_4	      0x7C
3098c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_5	      0x7D
3108c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_6	      0x7E
3118c2ecf20Sopenharmony_ci#define MC_CMD_CMD_SPACE_ESCAPE_7	      0x7F
3128c2ecf20Sopenharmony_ci
3138c2ecf20Sopenharmony_ci/* Vectors in the boot ROM */
3148c2ecf20Sopenharmony_ci/* Point to the copycode entry point. */
3158c2ecf20Sopenharmony_ci#define SIENA_MC_BOOTROM_COPYCODE_VEC (0x800 - 3 * 0x4)
3168c2ecf20Sopenharmony_ci#define HUNT_MC_BOOTROM_COPYCODE_VEC (0x8000 - 3 * 0x4)
3178c2ecf20Sopenharmony_ci#define MEDFORD_MC_BOOTROM_COPYCODE_VEC (0x10000 - 3 * 0x4)
3188c2ecf20Sopenharmony_ci/* Points to the recovery mode entry point. Misnamed but kept for compatibility. */
3198c2ecf20Sopenharmony_ci#define SIENA_MC_BOOTROM_NOFLASH_VEC (0x800 - 2 * 0x4)
3208c2ecf20Sopenharmony_ci#define HUNT_MC_BOOTROM_NOFLASH_VEC (0x8000 - 2 * 0x4)
3218c2ecf20Sopenharmony_ci#define MEDFORD_MC_BOOTROM_NOFLASH_VEC (0x10000 - 2 * 0x4)
3228c2ecf20Sopenharmony_ci/* Points to the recovery mode entry point. Same as above, but the right name. */
3238c2ecf20Sopenharmony_ci#define SIENA_MC_BOOTROM_RECOVERY_VEC (0x800 - 2 * 0x4)
3248c2ecf20Sopenharmony_ci#define HUNT_MC_BOOTROM_RECOVERY_VEC (0x8000 - 2 * 0x4)
3258c2ecf20Sopenharmony_ci#define MEDFORD_MC_BOOTROM_RECOVERY_VEC (0x10000 - 2 * 0x4)
3268c2ecf20Sopenharmony_ci
3278c2ecf20Sopenharmony_ci/* Points to noflash mode entry point. */
3288c2ecf20Sopenharmony_ci#define MEDFORD_MC_BOOTROM_REAL_NOFLASH_VEC (0x10000 - 4 * 0x4)
3298c2ecf20Sopenharmony_ci
3308c2ecf20Sopenharmony_ci/* The command set exported by the boot ROM (MCDI v0) */
3318c2ecf20Sopenharmony_ci#define MC_CMD_GET_VERSION_V0_SUPPORTED_FUNCS {		\
3328c2ecf20Sopenharmony_ci	(1 << MC_CMD_READ32)	|			\
3338c2ecf20Sopenharmony_ci	(1 << MC_CMD_WRITE32)	|			\
3348c2ecf20Sopenharmony_ci	(1 << MC_CMD_COPYCODE)	|			\
3358c2ecf20Sopenharmony_ci	(1 << MC_CMD_GET_VERSION),			\
3368c2ecf20Sopenharmony_ci	0, 0, 0 }
3378c2ecf20Sopenharmony_ci
3388c2ecf20Sopenharmony_ci#define MC_CMD_SENSOR_INFO_OUT_OFFSET_OFST(_x)		\
3398c2ecf20Sopenharmony_ci	(MC_CMD_SENSOR_ENTRY_OFST + (_x))
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_ci#define MC_CMD_DBI_WRITE_IN_ADDRESS_OFST(n)		\
3428c2ecf20Sopenharmony_ci	(MC_CMD_DBI_WRITE_IN_DBIWROP_OFST +		\
3438c2ecf20Sopenharmony_ci	 MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST +		\
3448c2ecf20Sopenharmony_ci	 (n) * MC_CMD_DBIWROP_TYPEDEF_LEN)
3458c2ecf20Sopenharmony_ci
3468c2ecf20Sopenharmony_ci#define MC_CMD_DBI_WRITE_IN_BYTE_MASK_OFST(n)		\
3478c2ecf20Sopenharmony_ci	(MC_CMD_DBI_WRITE_IN_DBIWROP_OFST +		\
3488c2ecf20Sopenharmony_ci	 MC_CMD_DBIWROP_TYPEDEF_BYTE_MASK_OFST +	\
3498c2ecf20Sopenharmony_ci	 (n) * MC_CMD_DBIWROP_TYPEDEF_LEN)
3508c2ecf20Sopenharmony_ci
3518c2ecf20Sopenharmony_ci#define MC_CMD_DBI_WRITE_IN_VALUE_OFST(n)		\
3528c2ecf20Sopenharmony_ci	(MC_CMD_DBI_WRITE_IN_DBIWROP_OFST +		\
3538c2ecf20Sopenharmony_ci	 MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST +		\
3548c2ecf20Sopenharmony_ci	 (n) * MC_CMD_DBIWROP_TYPEDEF_LEN)
3558c2ecf20Sopenharmony_ci
3568c2ecf20Sopenharmony_ci/* This may be ORed with an EVB_PORT_ID_xxx constant to pass a non-default
3578c2ecf20Sopenharmony_ci * stack ID (which must be in the range 1-255) along with an EVB port ID.
3588c2ecf20Sopenharmony_ci */
3598c2ecf20Sopenharmony_ci#define EVB_STACK_ID(n)  (((n) & 0xff) << 16)
3608c2ecf20Sopenharmony_ci
3618c2ecf20Sopenharmony_ci
3628c2ecf20Sopenharmony_ci/* Version 2 adds an optional argument to error returns: the errno value
3638c2ecf20Sopenharmony_ci * may be followed by the (0-based) number of the first argument that
3648c2ecf20Sopenharmony_ci * could not be processed.
3658c2ecf20Sopenharmony_ci */
3668c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ARG_OFST 4
3678c2ecf20Sopenharmony_ci
3688c2ecf20Sopenharmony_ci/* No space */
3698c2ecf20Sopenharmony_ci#define MC_CMD_ERR_ENOSPC 28
3708c2ecf20Sopenharmony_ci
3718c2ecf20Sopenharmony_ci/* MCDI_EVENT structuredef */
3728c2ecf20Sopenharmony_ci#define    MCDI_EVENT_LEN 8
3738c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CONT_LBN 32
3748c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CONT_WIDTH 1
3758c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LEVEL_LBN 33
3768c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LEVEL_WIDTH 3
3778c2ecf20Sopenharmony_ci/* enum: Info. */
3788c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LEVEL_INFO 0x0
3798c2ecf20Sopenharmony_ci/* enum: Warning. */
3808c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LEVEL_WARN 0x1
3818c2ecf20Sopenharmony_ci/* enum: Error. */
3828c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LEVEL_ERR 0x2
3838c2ecf20Sopenharmony_ci/* enum: Fatal. */
3848c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LEVEL_FATAL 0x3
3858c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DATA_OFST 0
3868c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DATA_LEN 4
3878c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_SEQ_OFST 0
3888c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_SEQ_LBN 0
3898c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_SEQ_WIDTH 8
3908c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_DATALEN_OFST 0
3918c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_DATALEN_LBN 8
3928c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_DATALEN_WIDTH 8
3938c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_ERRNO_OFST 0
3948c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_ERRNO_LBN 16
3958c2ecf20Sopenharmony_ci#define        MCDI_EVENT_CMDDONE_ERRNO_WIDTH 8
3968c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_LP_CAP_OFST 0
3978c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_LP_CAP_LBN 0
3988c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_LP_CAP_WIDTH 16
3998c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_SPEED_OFST 0
4008c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_SPEED_LBN 16
4018c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_SPEED_WIDTH 4
4028c2ecf20Sopenharmony_ci/* enum: Link is down or link speed could not be determined */
4038c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_UNKNOWN 0x0
4048c2ecf20Sopenharmony_ci/* enum: 100Mbs */
4058c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_100M 0x1
4068c2ecf20Sopenharmony_ci/* enum: 1Gbs */
4078c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_1G 0x2
4088c2ecf20Sopenharmony_ci/* enum: 10Gbs */
4098c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_10G 0x3
4108c2ecf20Sopenharmony_ci/* enum: 40Gbs */
4118c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_40G 0x4
4128c2ecf20Sopenharmony_ci/* enum: 25Gbs */
4138c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_25G 0x5
4148c2ecf20Sopenharmony_ci/* enum: 50Gbs */
4158c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_50G 0x6
4168c2ecf20Sopenharmony_ci/* enum: 100Gbs */
4178c2ecf20Sopenharmony_ci#define          MCDI_EVENT_LINKCHANGE_SPEED_100G 0x7
4188c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_FCNTL_OFST 0
4198c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_FCNTL_LBN 20
4208c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_FCNTL_WIDTH 4
4218c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_LINK_FLAGS_OFST 0
4228c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_LINK_FLAGS_LBN 24
4238c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_LINK_FLAGS_WIDTH 8
4248c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_MONITOR_OFST 0
4258c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_MONITOR_LBN 0
4268c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_MONITOR_WIDTH 8
4278c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_STATE_OFST 0
4288c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_STATE_LBN 8
4298c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_STATE_WIDTH 8
4308c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_VALUE_OFST 0
4318c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_VALUE_LBN 16
4328c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SENSOREVT_VALUE_WIDTH 16
4338c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FWALERT_DATA_OFST 0
4348c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FWALERT_DATA_LBN 8
4358c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FWALERT_DATA_WIDTH 24
4368c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FWALERT_REASON_OFST 0
4378c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FWALERT_REASON_LBN 0
4388c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FWALERT_REASON_WIDTH 8
4398c2ecf20Sopenharmony_ci/* enum: SRAM Access. */
4408c2ecf20Sopenharmony_ci#define          MCDI_EVENT_FWALERT_REASON_SRAM_ACCESS 0x1
4418c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FLR_VF_OFST 0
4428c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FLR_VF_LBN 0
4438c2ecf20Sopenharmony_ci#define        MCDI_EVENT_FLR_VF_WIDTH 8
4448c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_TXQ_OFST 0
4458c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_TXQ_LBN 0
4468c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_TXQ_WIDTH 12
4478c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_TYPE_OFST 0
4488c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_TYPE_LBN 12
4498c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_TYPE_WIDTH 4
4508c2ecf20Sopenharmony_ci/* enum: Descriptor loader reported failure */
4518c2ecf20Sopenharmony_ci#define          MCDI_EVENT_TX_ERR_DL_FAIL 0x1
4528c2ecf20Sopenharmony_ci/* enum: Descriptor ring empty and no EOP seen for packet */
4538c2ecf20Sopenharmony_ci#define          MCDI_EVENT_TX_ERR_NO_EOP 0x2
4548c2ecf20Sopenharmony_ci/* enum: Overlength packet */
4558c2ecf20Sopenharmony_ci#define          MCDI_EVENT_TX_ERR_2BIG 0x3
4568c2ecf20Sopenharmony_ci/* enum: Malformed option descriptor */
4578c2ecf20Sopenharmony_ci#define          MCDI_EVENT_TX_BAD_OPTDESC 0x5
4588c2ecf20Sopenharmony_ci/* enum: Option descriptor part way through a packet */
4598c2ecf20Sopenharmony_ci#define          MCDI_EVENT_TX_OPT_IN_PKT 0x8
4608c2ecf20Sopenharmony_ci/* enum: DMA or PIO data access error */
4618c2ecf20Sopenharmony_ci#define          MCDI_EVENT_TX_ERR_BAD_DMA_OR_PIO 0x9
4628c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_INFO_OFST 0
4638c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_INFO_LBN 16
4648c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_ERR_INFO_WIDTH 16
4658c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_FLUSH_TO_DRIVER_OFST 0
4668c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_FLUSH_TO_DRIVER_LBN 12
4678c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_FLUSH_TO_DRIVER_WIDTH 1
4688c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_FLUSH_TXQ_OFST 0
4698c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_FLUSH_TXQ_LBN 0
4708c2ecf20Sopenharmony_ci#define        MCDI_EVENT_TX_FLUSH_TXQ_WIDTH 12
4718c2ecf20Sopenharmony_ci#define        MCDI_EVENT_PTP_ERR_TYPE_OFST 0
4728c2ecf20Sopenharmony_ci#define        MCDI_EVENT_PTP_ERR_TYPE_LBN 0
4738c2ecf20Sopenharmony_ci#define        MCDI_EVENT_PTP_ERR_TYPE_WIDTH 8
4748c2ecf20Sopenharmony_ci/* enum: PLL lost lock */
4758c2ecf20Sopenharmony_ci#define          MCDI_EVENT_PTP_ERR_PLL_LOST 0x1
4768c2ecf20Sopenharmony_ci/* enum: Filter overflow (PDMA) */
4778c2ecf20Sopenharmony_ci#define          MCDI_EVENT_PTP_ERR_FILTER 0x2
4788c2ecf20Sopenharmony_ci/* enum: FIFO overflow (FPGA) */
4798c2ecf20Sopenharmony_ci#define          MCDI_EVENT_PTP_ERR_FIFO 0x3
4808c2ecf20Sopenharmony_ci/* enum: Merge queue overflow */
4818c2ecf20Sopenharmony_ci#define          MCDI_EVENT_PTP_ERR_QUEUE 0x4
4828c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_TYPE_OFST 0
4838c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_TYPE_LBN 0
4848c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_TYPE_WIDTH 8
4858c2ecf20Sopenharmony_ci/* enum: AOE failed to load - no valid image? */
4868c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_NO_LOAD 0x1
4878c2ecf20Sopenharmony_ci/* enum: AOE FC reported an exception */
4888c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FC_ASSERT 0x2
4898c2ecf20Sopenharmony_ci/* enum: AOE FC watchdogged */
4908c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FC_WATCHDOG 0x3
4918c2ecf20Sopenharmony_ci/* enum: AOE FC failed to start */
4928c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FC_NO_START 0x4
4938c2ecf20Sopenharmony_ci/* enum: Generic AOE fault - likely to have been reported via other means too
4948c2ecf20Sopenharmony_ci * but intended for use by aoex driver.
4958c2ecf20Sopenharmony_ci */
4968c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FAULT 0x5
4978c2ecf20Sopenharmony_ci/* enum: Results of reprogramming the CPLD (status in AOE_ERR_DATA) */
4988c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_CPLD_REPROGRAMMED 0x6
4998c2ecf20Sopenharmony_ci/* enum: AOE loaded successfully */
5008c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_LOAD 0x7
5018c2ecf20Sopenharmony_ci/* enum: AOE DMA operation completed (LSB of HOST_HANDLE in AOE_ERR_DATA) */
5028c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_DMA 0x8
5038c2ecf20Sopenharmony_ci/* enum: AOE byteblaster connected/disconnected (Connection status in
5048c2ecf20Sopenharmony_ci * AOE_ERR_DATA)
5058c2ecf20Sopenharmony_ci */
5068c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_BYTEBLASTER 0x9
5078c2ecf20Sopenharmony_ci/* enum: DDR ECC status update */
5088c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_DDR_ECC_STATUS 0xa
5098c2ecf20Sopenharmony_ci/* enum: PTP status update */
5108c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_PTP_STATUS 0xb
5118c2ecf20Sopenharmony_ci/* enum: FPGA header incorrect */
5128c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FPGA_LOAD_HEADER_ERR 0xc
5138c2ecf20Sopenharmony_ci/* enum: FPGA Powered Off due to error in powering up FPGA */
5148c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FPGA_POWER_OFF 0xd
5158c2ecf20Sopenharmony_ci/* enum: AOE FPGA load failed due to MC to MUM communication failure */
5168c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FPGA_LOAD_FAILED 0xe
5178c2ecf20Sopenharmony_ci/* enum: Notify that invalid flash type detected */
5188c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_INVALID_FPGA_FLASH_TYPE 0xf
5198c2ecf20Sopenharmony_ci/* enum: Notify that the attempt to run FPGA Controller firmware timedout */
5208c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FC_RUN_TIMEDOUT 0x10
5218c2ecf20Sopenharmony_ci/* enum: Failure to probe one or more FPGA boot flash chips */
5228c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FPGA_BOOT_FLASH_INVALID 0x11
5238c2ecf20Sopenharmony_ci/* enum: FPGA boot-flash contains an invalid image header */
5248c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FPGA_BOOT_FLASH_HDR_INVALID 0x12
5258c2ecf20Sopenharmony_ci/* enum: Failed to program clocks required by the FPGA */
5268c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FPGA_CLOCKS_PROGRAM_FAILED 0x13
5278c2ecf20Sopenharmony_ci/* enum: Notify that FPGA Controller is alive to serve MCDI requests */
5288c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FC_RUNNING 0x14
5298c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_DATA_OFST 0
5308c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_DATA_LBN 8
5318c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_DATA_WIDTH 8
5328c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_OFST 0
5338c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_LBN 8
5348c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_FC_ASSERT_INFO_WIDTH 8
5358c2ecf20Sopenharmony_ci/* enum: FC Assert happened, but the register information is not available */
5368c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FC_ASSERT_SEEN 0x0
5378c2ecf20Sopenharmony_ci/* enum: The register information for FC Assert is ready for readinng by driver
5388c2ecf20Sopenharmony_ci */
5398c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FC_ASSERT_DATA_READY 0x1
5408c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_OFST 0
5418c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_LBN 8
5428c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_WIDTH 8
5438c2ecf20Sopenharmony_ci/* enum: Reading from NV failed */
5448c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_NV_READ_FAIL 0x0
5458c2ecf20Sopenharmony_ci/* enum: Invalid Magic Number if FPGA header */
5468c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_MAGIC_FAIL 0x1
5478c2ecf20Sopenharmony_ci/* enum: Invalid Silicon type detected in header */
5488c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_SILICON_TYPE 0x2
5498c2ecf20Sopenharmony_ci/* enum: Unsupported VRatio */
5508c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_VRATIO 0x3
5518c2ecf20Sopenharmony_ci/* enum: Unsupported DDR Type */
5528c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_TYPE 0x4
5538c2ecf20Sopenharmony_ci/* enum: DDR Voltage out of supported range */
5548c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_VOLTAGE 0x5
5558c2ecf20Sopenharmony_ci/* enum: Unsupported DDR speed */
5568c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SPEED 0x6
5578c2ecf20Sopenharmony_ci/* enum: Unsupported DDR size */
5588c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SIZE 0x7
5598c2ecf20Sopenharmony_ci/* enum: Unsupported DDR rank */
5608c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_RANK 0x8
5618c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_OFST 0
5628c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_LBN 8
5638c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_WIDTH 8
5648c2ecf20Sopenharmony_ci/* enum: Primary boot flash */
5658c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FLASH_TYPE_BOOT_PRIMARY 0x0
5668c2ecf20Sopenharmony_ci/* enum: Secondary boot flash */
5678c2ecf20Sopenharmony_ci#define          MCDI_EVENT_AOE_FLASH_TYPE_BOOT_SECONDARY 0x1
5688c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_OFST 0
5698c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_LBN 8
5708c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_WIDTH 8
5718c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_OFST 0
5728c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_LBN 8
5738c2ecf20Sopenharmony_ci#define        MCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_WIDTH 8
5748c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_RXQ_OFST 0
5758c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_RXQ_LBN 0
5768c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_RXQ_WIDTH 12
5778c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_TYPE_OFST 0
5788c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_TYPE_LBN 12
5798c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_TYPE_WIDTH 4
5808c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_INFO_OFST 0
5818c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_INFO_LBN 16
5828c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_ERR_INFO_WIDTH 16
5838c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_FLUSH_TO_DRIVER_OFST 0
5848c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_FLUSH_TO_DRIVER_LBN 12
5858c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_FLUSH_TO_DRIVER_WIDTH 1
5868c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_FLUSH_RXQ_OFST 0
5878c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_FLUSH_RXQ_LBN 0
5888c2ecf20Sopenharmony_ci#define        MCDI_EVENT_RX_FLUSH_RXQ_WIDTH 12
5898c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MC_REBOOT_COUNT_OFST 0
5908c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MC_REBOOT_COUNT_LBN 0
5918c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MC_REBOOT_COUNT_WIDTH 16
5928c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MUM_ERR_TYPE_OFST 0
5938c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MUM_ERR_TYPE_LBN 0
5948c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MUM_ERR_TYPE_WIDTH 8
5958c2ecf20Sopenharmony_ci/* enum: MUM failed to load - no valid image? */
5968c2ecf20Sopenharmony_ci#define          MCDI_EVENT_MUM_NO_LOAD 0x1
5978c2ecf20Sopenharmony_ci/* enum: MUM f/w reported an exception */
5988c2ecf20Sopenharmony_ci#define          MCDI_EVENT_MUM_ASSERT 0x2
5998c2ecf20Sopenharmony_ci/* enum: MUM not kicking watchdog */
6008c2ecf20Sopenharmony_ci#define          MCDI_EVENT_MUM_WATCHDOG 0x3
6018c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MUM_ERR_DATA_OFST 0
6028c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MUM_ERR_DATA_LBN 8
6038c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MUM_ERR_DATA_WIDTH 8
6048c2ecf20Sopenharmony_ci#define        MCDI_EVENT_DBRET_SEQ_OFST 0
6058c2ecf20Sopenharmony_ci#define        MCDI_EVENT_DBRET_SEQ_LBN 0
6068c2ecf20Sopenharmony_ci#define        MCDI_EVENT_DBRET_SEQ_WIDTH 8
6078c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_TYPE_OFST 0
6088c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_TYPE_LBN 0
6098c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_TYPE_WIDTH 8
6108c2ecf20Sopenharmony_ci/* enum: Corrupted or bad SUC application. */
6118c2ecf20Sopenharmony_ci#define          MCDI_EVENT_SUC_BAD_APP 0x1
6128c2ecf20Sopenharmony_ci/* enum: SUC application reported an assert. */
6138c2ecf20Sopenharmony_ci#define          MCDI_EVENT_SUC_ASSERT 0x2
6148c2ecf20Sopenharmony_ci/* enum: SUC application reported an exception. */
6158c2ecf20Sopenharmony_ci#define          MCDI_EVENT_SUC_EXCEPTION 0x3
6168c2ecf20Sopenharmony_ci/* enum: SUC watchdog timer expired. */
6178c2ecf20Sopenharmony_ci#define          MCDI_EVENT_SUC_WATCHDOG 0x4
6188c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_ADDRESS_OFST 0
6198c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_ADDRESS_LBN 8
6208c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_ADDRESS_WIDTH 24
6218c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_DATA_OFST 0
6228c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_DATA_LBN 8
6238c2ecf20Sopenharmony_ci#define        MCDI_EVENT_SUC_ERR_DATA_WIDTH 24
6248c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_LP_CAP_OFST 0
6258c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_LP_CAP_LBN 0
6268c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_LP_CAP_WIDTH 24
6278c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_SPEED_OFST 0
6288c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_SPEED_LBN 24
6298c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_SPEED_WIDTH 4
6308c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
6318c2ecf20Sopenharmony_ci/*                MCDI_EVENT/LINKCHANGE_SPEED */
6328c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_FLAGS_LINK_UP_OFST 0
6338c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_FLAGS_LINK_UP_LBN 28
6348c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_FLAGS_LINK_UP_WIDTH 1
6358c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_FCNTL_OFST 0
6368c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_FCNTL_LBN 29
6378c2ecf20Sopenharmony_ci#define        MCDI_EVENT_LINKCHANGE_V2_FCNTL_WIDTH 3
6388c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
6398c2ecf20Sopenharmony_ci/*                MC_CMD_SET_MAC/MC_CMD_SET_MAC_IN/FCNTL */
6408c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MODULECHANGE_LD_CAP_OFST 0
6418c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MODULECHANGE_LD_CAP_LBN 0
6428c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MODULECHANGE_LD_CAP_WIDTH 30
6438c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MODULECHANGE_SEQ_OFST 0
6448c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MODULECHANGE_SEQ_LBN 30
6458c2ecf20Sopenharmony_ci#define        MCDI_EVENT_MODULECHANGE_SEQ_WIDTH 2
6468c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DATA_LBN 0
6478c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DATA_WIDTH 32
6488c2ecf20Sopenharmony_ci/* Alias for PTP_DATA. */
6498c2ecf20Sopenharmony_ci#define       MCDI_EVENT_SRC_LBN 36
6508c2ecf20Sopenharmony_ci#define       MCDI_EVENT_SRC_WIDTH 8
6518c2ecf20Sopenharmony_ci/* Data associated with PTP events which doesn't fit into the main DATA field
6528c2ecf20Sopenharmony_ci */
6538c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_DATA_LBN 36
6548c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_DATA_WIDTH 8
6558c2ecf20Sopenharmony_ci/* EF100 specific. Defined by QDMA. The phase bit, changes each time round the
6568c2ecf20Sopenharmony_ci * event ring
6578c2ecf20Sopenharmony_ci */
6588c2ecf20Sopenharmony_ci#define       MCDI_EVENT_EV_EVQ_PHASE_LBN 59
6598c2ecf20Sopenharmony_ci#define       MCDI_EVENT_EV_EVQ_PHASE_WIDTH 1
6608c2ecf20Sopenharmony_ci#define       MCDI_EVENT_EV_CODE_LBN 60
6618c2ecf20Sopenharmony_ci#define       MCDI_EVENT_EV_CODE_WIDTH 4
6628c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CODE_LBN 44
6638c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CODE_WIDTH 8
6648c2ecf20Sopenharmony_ci/* enum: Event generated by host software */
6658c2ecf20Sopenharmony_ci#define          MCDI_EVENT_SW_EVENT 0x0
6668c2ecf20Sopenharmony_ci/* enum: Bad assert. */
6678c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_BADSSERT 0x1
6688c2ecf20Sopenharmony_ci/* enum: PM Notice. */
6698c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PMNOTICE 0x2
6708c2ecf20Sopenharmony_ci/* enum: Command done. */
6718c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_CMDDONE 0x3
6728c2ecf20Sopenharmony_ci/* enum: Link change. */
6738c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_LINKCHANGE 0x4
6748c2ecf20Sopenharmony_ci/* enum: Sensor Event. */
6758c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_SENSOREVT 0x5
6768c2ecf20Sopenharmony_ci/* enum: Schedule error. */
6778c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_SCHEDERR 0x6
6788c2ecf20Sopenharmony_ci/* enum: Reboot. */
6798c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_REBOOT 0x7
6808c2ecf20Sopenharmony_ci/* enum: Mac stats DMA. */
6818c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_MAC_STATS_DMA 0x8
6828c2ecf20Sopenharmony_ci/* enum: Firmware alert. */
6838c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_FWALERT 0x9
6848c2ecf20Sopenharmony_ci/* enum: Function level reset. */
6858c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_FLR 0xa
6868c2ecf20Sopenharmony_ci/* enum: Transmit error */
6878c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_TX_ERR 0xb
6888c2ecf20Sopenharmony_ci/* enum: Tx flush has completed */
6898c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_TX_FLUSH 0xc
6908c2ecf20Sopenharmony_ci/* enum: PTP packet received timestamp */
6918c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PTP_RX 0xd
6928c2ecf20Sopenharmony_ci/* enum: PTP NIC failure */
6938c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PTP_FAULT 0xe
6948c2ecf20Sopenharmony_ci/* enum: PTP PPS event */
6958c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PTP_PPS 0xf
6968c2ecf20Sopenharmony_ci/* enum: Rx flush has completed */
6978c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_RX_FLUSH 0x10
6988c2ecf20Sopenharmony_ci/* enum: Receive error */
6998c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_RX_ERR 0x11
7008c2ecf20Sopenharmony_ci/* enum: AOE fault */
7018c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_AOE 0x12
7028c2ecf20Sopenharmony_ci/* enum: Network port calibration failed (VCAL). */
7038c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_VCAL_FAIL 0x13
7048c2ecf20Sopenharmony_ci/* enum: HW PPS event */
7058c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_HW_PPS 0x14
7068c2ecf20Sopenharmony_ci/* enum: The MC has rebooted (huntington and later, siena uses CODE_REBOOT and
7078c2ecf20Sopenharmony_ci * a different format)
7088c2ecf20Sopenharmony_ci */
7098c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_MC_REBOOT 0x15
7108c2ecf20Sopenharmony_ci/* enum: the MC has detected a parity error */
7118c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PAR_ERR 0x16
7128c2ecf20Sopenharmony_ci/* enum: the MC has detected a correctable error */
7138c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_ECC_CORR_ERR 0x17
7148c2ecf20Sopenharmony_ci/* enum: the MC has detected an uncorrectable error */
7158c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_ECC_FATAL_ERR 0x18
7168c2ecf20Sopenharmony_ci/* enum: The MC has entered offline BIST mode */
7178c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_MC_BIST 0x19
7188c2ecf20Sopenharmony_ci/* enum: PTP tick event providing current NIC time */
7198c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PTP_TIME 0x1a
7208c2ecf20Sopenharmony_ci/* enum: MUM fault */
7218c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_MUM 0x1b
7228c2ecf20Sopenharmony_ci/* enum: notify the designated PF of a new authorization request */
7238c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PROXY_REQUEST 0x1c
7248c2ecf20Sopenharmony_ci/* enum: notify a function that awaits an authorization that its request has
7258c2ecf20Sopenharmony_ci * been processed and it may now resend the command
7268c2ecf20Sopenharmony_ci */
7278c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_PROXY_RESPONSE 0x1d
7288c2ecf20Sopenharmony_ci/* enum: MCDI command accepted. New commands can be issued but this command is
7298c2ecf20Sopenharmony_ci * not done yet.
7308c2ecf20Sopenharmony_ci */
7318c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_DBRET 0x1e
7328c2ecf20Sopenharmony_ci/* enum: The MC has detected a fault on the SUC */
7338c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_SUC 0x1f
7348c2ecf20Sopenharmony_ci/* enum: Link change. This event is sent instead of LINKCHANGE if
7358c2ecf20Sopenharmony_ci * WANT_V2_LINKCHANGES was set on driver attach.
7368c2ecf20Sopenharmony_ci */
7378c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_LINKCHANGE_V2 0x20
7388c2ecf20Sopenharmony_ci/* enum: This event is sent if WANT_V2_LINKCHANGES was set on driver attach
7398c2ecf20Sopenharmony_ci * when the local device capabilities changes. This will usually correspond to
7408c2ecf20Sopenharmony_ci * a module change.
7418c2ecf20Sopenharmony_ci */
7428c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_MODULECHANGE 0x21
7438c2ecf20Sopenharmony_ci/* enum: Notification that the sensors have been added and/or removed from the
7448c2ecf20Sopenharmony_ci * sensor table. This event includes the new sensor table generation count, if
7458c2ecf20Sopenharmony_ci * this does not match the driver's local copy it is expected to call
7468c2ecf20Sopenharmony_ci * DYNAMIC_SENSORS_LIST to refresh it.
7478c2ecf20Sopenharmony_ci */
7488c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_DYNAMIC_SENSORS_CHANGE 0x22
7498c2ecf20Sopenharmony_ci/* enum: Notification that a sensor has changed state as a result of a reading
7508c2ecf20Sopenharmony_ci * crossing a threshold. This is sent as two events, the first event contains
7518c2ecf20Sopenharmony_ci * the handle and the sensor's state (in the SRC field), and the second
7528c2ecf20Sopenharmony_ci * contains the value.
7538c2ecf20Sopenharmony_ci */
7548c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_DYNAMIC_SENSORS_STATE_CHANGE 0x23
7558c2ecf20Sopenharmony_ci/* enum: Notification that a descriptor proxy function configuration has been
7568c2ecf20Sopenharmony_ci * pushed to "live" status (visible to host). SRC field contains the handle of
7578c2ecf20Sopenharmony_ci * the affected descriptor proxy function. DATA field contains the generation
7588c2ecf20Sopenharmony_ci * count of configuration set applied. See MC_CMD_DESC_PROXY_FUNC_CONFIG_SET /
7598c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_CONFIG_COMMIT and SF-122927-TC for details.
7608c2ecf20Sopenharmony_ci */
7618c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_DESC_PROXY_FUNC_CONFIG_COMMITTED 0x24
7628c2ecf20Sopenharmony_ci/* enum: Notification that a descriptor proxy function has been reset. SRC
7638c2ecf20Sopenharmony_ci * field contains the handle of the affected descriptor proxy function. See
7648c2ecf20Sopenharmony_ci * SF-122927-TC for details.
7658c2ecf20Sopenharmony_ci */
7668c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_DESC_PROXY_FUNC_RESET 0x25
7678c2ecf20Sopenharmony_ci/* enum: Notification that a driver attached to a descriptor proxy function.
7688c2ecf20Sopenharmony_ci * SRC field contains the handle of the affected descriptor proxy function. For
7698c2ecf20Sopenharmony_ci * Virtio proxy functions this message consists of two MCDI events, where the
7708c2ecf20Sopenharmony_ci * first event's (CONT=1) DATA field carries negotiated virtio feature bits 0
7718c2ecf20Sopenharmony_ci * to 31 and the second (CONT=0) carries bits 32 to 63. For EF100 proxy
7728c2ecf20Sopenharmony_ci * functions event length and meaning of DATA field is not yet defined. See
7738c2ecf20Sopenharmony_ci * SF-122927-TC for details.
7748c2ecf20Sopenharmony_ci */
7758c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_DESC_PROXY_FUNC_DRIVER_ATTACH 0x26
7768c2ecf20Sopenharmony_ci/* enum: Artificial event generated by host and posted via MC for test
7778c2ecf20Sopenharmony_ci * purposes.
7788c2ecf20Sopenharmony_ci */
7798c2ecf20Sopenharmony_ci#define          MCDI_EVENT_CODE_TESTGEN 0xfa
7808c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CMDDONE_DATA_OFST 0
7818c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CMDDONE_DATA_LEN 4
7828c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CMDDONE_DATA_LBN 0
7838c2ecf20Sopenharmony_ci#define       MCDI_EVENT_CMDDONE_DATA_WIDTH 32
7848c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_DATA_OFST 0
7858c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_DATA_LEN 4
7868c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_DATA_LBN 0
7878c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_DATA_WIDTH 32
7888c2ecf20Sopenharmony_ci#define       MCDI_EVENT_SENSOREVT_DATA_OFST 0
7898c2ecf20Sopenharmony_ci#define       MCDI_EVENT_SENSOREVT_DATA_LEN 4
7908c2ecf20Sopenharmony_ci#define       MCDI_EVENT_SENSOREVT_DATA_LBN 0
7918c2ecf20Sopenharmony_ci#define       MCDI_EVENT_SENSOREVT_DATA_WIDTH 32
7928c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MAC_STATS_DMA_GENERATION_OFST 0
7938c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MAC_STATS_DMA_GENERATION_LEN 4
7948c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MAC_STATS_DMA_GENERATION_LBN 0
7958c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MAC_STATS_DMA_GENERATION_WIDTH 32
7968c2ecf20Sopenharmony_ci#define       MCDI_EVENT_TX_ERR_DATA_OFST 0
7978c2ecf20Sopenharmony_ci#define       MCDI_EVENT_TX_ERR_DATA_LEN 4
7988c2ecf20Sopenharmony_ci#define       MCDI_EVENT_TX_ERR_DATA_LBN 0
7998c2ecf20Sopenharmony_ci#define       MCDI_EVENT_TX_ERR_DATA_WIDTH 32
8008c2ecf20Sopenharmony_ci/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the seconds field of
8018c2ecf20Sopenharmony_ci * timestamp
8028c2ecf20Sopenharmony_ci */
8038c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_SECONDS_OFST 0
8048c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_SECONDS_LEN 4
8058c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_SECONDS_LBN 0
8068c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_SECONDS_WIDTH 32
8078c2ecf20Sopenharmony_ci/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the major field of
8088c2ecf20Sopenharmony_ci * timestamp
8098c2ecf20Sopenharmony_ci */
8108c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MAJOR_OFST 0
8118c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MAJOR_LEN 4
8128c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MAJOR_LBN 0
8138c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MAJOR_WIDTH 32
8148c2ecf20Sopenharmony_ci/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the nanoseconds field
8158c2ecf20Sopenharmony_ci * of timestamp
8168c2ecf20Sopenharmony_ci */
8178c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_NANOSECONDS_OFST 0
8188c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_NANOSECONDS_LEN 4
8198c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_NANOSECONDS_LBN 0
8208c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_NANOSECONDS_WIDTH 32
8218c2ecf20Sopenharmony_ci/* For CODE_PTP_RX, CODE_PTP_PPS and CODE_HW_PPS events the minor field of
8228c2ecf20Sopenharmony_ci * timestamp
8238c2ecf20Sopenharmony_ci */
8248c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MINOR_OFST 0
8258c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MINOR_LEN 4
8268c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MINOR_LBN 0
8278c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_MINOR_WIDTH 32
8288c2ecf20Sopenharmony_ci/* For CODE_PTP_RX events, the lowest four bytes of sourceUUID from PTP packet
8298c2ecf20Sopenharmony_ci */
8308c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_UUID_OFST 0
8318c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_UUID_LEN 4
8328c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_UUID_LBN 0
8338c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_UUID_WIDTH 32
8348c2ecf20Sopenharmony_ci#define       MCDI_EVENT_RX_ERR_DATA_OFST 0
8358c2ecf20Sopenharmony_ci#define       MCDI_EVENT_RX_ERR_DATA_LEN 4
8368c2ecf20Sopenharmony_ci#define       MCDI_EVENT_RX_ERR_DATA_LBN 0
8378c2ecf20Sopenharmony_ci#define       MCDI_EVENT_RX_ERR_DATA_WIDTH 32
8388c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PAR_ERR_DATA_OFST 0
8398c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PAR_ERR_DATA_LEN 4
8408c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PAR_ERR_DATA_LBN 0
8418c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PAR_ERR_DATA_WIDTH 32
8428c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_CORR_ERR_DATA_OFST 0
8438c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_CORR_ERR_DATA_LEN 4
8448c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_CORR_ERR_DATA_LBN 0
8458c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_CORR_ERR_DATA_WIDTH 32
8468c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_FATAL_ERR_DATA_OFST 0
8478c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_FATAL_ERR_DATA_LEN 4
8488c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_FATAL_ERR_DATA_LBN 0
8498c2ecf20Sopenharmony_ci#define       MCDI_EVENT_ECC_FATAL_ERR_DATA_WIDTH 32
8508c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events, the major value of the PTP clock */
8518c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MAJOR_OFST 0
8528c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MAJOR_LEN 4
8538c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MAJOR_LBN 0
8548c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MAJOR_WIDTH 32
8558c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events, bits 19-26 of the minor value of the PTP clock */
8568c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_26_19_LBN 36
8578c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_26_19_WIDTH 8
8588c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events, most significant bits of the minor value of the
8598c2ecf20Sopenharmony_ci * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_19.
8608c2ecf20Sopenharmony_ci */
8618c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_LBN 36
8628c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_MS_8BITS_WIDTH 8
8638c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events where report sync status is enabled, indicates
8648c2ecf20Sopenharmony_ci * whether the NIC clock has ever been set
8658c2ecf20Sopenharmony_ci */
8668c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_NIC_CLOCK_VALID_LBN 36
8678c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_NIC_CLOCK_VALID_WIDTH 1
8688c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events where report sync status is enabled, indicates
8698c2ecf20Sopenharmony_ci * whether the NIC and System clocks are in sync
8708c2ecf20Sopenharmony_ci */
8718c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_HOST_NIC_IN_SYNC_LBN 37
8728c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_HOST_NIC_IN_SYNC_WIDTH 1
8738c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events where report sync status is enabled, bits 21-26 of
8748c2ecf20Sopenharmony_ci * the minor value of the PTP clock
8758c2ecf20Sopenharmony_ci */
8768c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_26_21_LBN 38
8778c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_26_21_WIDTH 6
8788c2ecf20Sopenharmony_ci/* For CODE_PTP_TIME events, most significant bits of the minor value of the
8798c2ecf20Sopenharmony_ci * PTP clock. This is a more generic equivalent of PTP_TIME_MINOR_26_21.
8808c2ecf20Sopenharmony_ci */
8818c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_LBN 38
8828c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PTP_TIME_MINOR_MS_6BITS_WIDTH 6
8838c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_OFST 0
8848c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LEN 4
8858c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_LBN 0
8868c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_REQUEST_BUFF_INDEX_WIDTH 32
8878c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_RESPONSE_HANDLE_OFST 0
8888c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_RESPONSE_HANDLE_LEN 4
8898c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_RESPONSE_HANDLE_LBN 0
8908c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_RESPONSE_HANDLE_WIDTH 32
8918c2ecf20Sopenharmony_ci/* Zero means that the request has been completed or authorized, and the driver
8928c2ecf20Sopenharmony_ci * should resend it. A non-zero value means that the authorization has been
8938c2ecf20Sopenharmony_ci * denied, and gives the reason. Typically it will be EPERM.
8948c2ecf20Sopenharmony_ci */
8958c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_RESPONSE_RC_LBN 36
8968c2ecf20Sopenharmony_ci#define       MCDI_EVENT_PROXY_RESPONSE_RC_WIDTH 8
8978c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DBRET_DATA_OFST 0
8988c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DBRET_DATA_LEN 4
8998c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DBRET_DATA_LBN 0
9008c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DBRET_DATA_WIDTH 32
9018c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_V2_DATA_OFST 0
9028c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_V2_DATA_LEN 4
9038c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_V2_DATA_LBN 0
9048c2ecf20Sopenharmony_ci#define       MCDI_EVENT_LINKCHANGE_V2_DATA_WIDTH 32
9058c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MODULECHANGE_DATA_OFST 0
9068c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MODULECHANGE_DATA_LEN 4
9078c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MODULECHANGE_DATA_LBN 0
9088c2ecf20Sopenharmony_ci#define       MCDI_EVENT_MODULECHANGE_DATA_WIDTH 32
9098c2ecf20Sopenharmony_ci/* The new generation count after a sensor has been added or deleted. */
9108c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_OFST 0
9118c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_LEN 4
9128c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_LBN 0
9138c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_GENERATION_WIDTH 32
9148c2ecf20Sopenharmony_ci/* The handle of a dynamic sensor. */
9158c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_OFST 0
9168c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_LEN 4
9178c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_LBN 0
9188c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_HANDLE_WIDTH 32
9198c2ecf20Sopenharmony_ci/* The current values of a sensor. */
9208c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_VALUE_OFST 0
9218c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_VALUE_LEN 4
9228c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_VALUE_LBN 0
9238c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_VALUE_WIDTH 32
9248c2ecf20Sopenharmony_ci/* The current state of a sensor. */
9258c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_STATE_LBN 36
9268c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DYNAMIC_SENSORS_STATE_WIDTH 8
9278c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_DATA_OFST 0
9288c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_DATA_LEN 4
9298c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_DATA_LBN 0
9308c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_DATA_WIDTH 32
9318c2ecf20Sopenharmony_ci/* Generation count of applied configuration set */
9328c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_GENERATION_OFST 0
9338c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_GENERATION_LEN 4
9348c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_GENERATION_LBN 0
9358c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_GENERATION_WIDTH 32
9368c2ecf20Sopenharmony_ci/* Virtio features negotiated with the host driver. First event (CONT=1)
9378c2ecf20Sopenharmony_ci * carries bits 0 to 31. Second event (CONT=0) carries bits 32 to 63.
9388c2ecf20Sopenharmony_ci */
9398c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_OFST 0
9408c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_LEN 4
9418c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_LBN 0
9428c2ecf20Sopenharmony_ci#define       MCDI_EVENT_DESC_PROXY_VIRTIO_FEATURES_WIDTH 32
9438c2ecf20Sopenharmony_ci
9448c2ecf20Sopenharmony_ci/* FCDI_EVENT structuredef */
9458c2ecf20Sopenharmony_ci#define    FCDI_EVENT_LEN 8
9468c2ecf20Sopenharmony_ci#define       FCDI_EVENT_CONT_LBN 32
9478c2ecf20Sopenharmony_ci#define       FCDI_EVENT_CONT_WIDTH 1
9488c2ecf20Sopenharmony_ci#define       FCDI_EVENT_LEVEL_LBN 33
9498c2ecf20Sopenharmony_ci#define       FCDI_EVENT_LEVEL_WIDTH 3
9508c2ecf20Sopenharmony_ci/* enum: Info. */
9518c2ecf20Sopenharmony_ci#define          FCDI_EVENT_LEVEL_INFO 0x0
9528c2ecf20Sopenharmony_ci/* enum: Warning. */
9538c2ecf20Sopenharmony_ci#define          FCDI_EVENT_LEVEL_WARN 0x1
9548c2ecf20Sopenharmony_ci/* enum: Error. */
9558c2ecf20Sopenharmony_ci#define          FCDI_EVENT_LEVEL_ERR 0x2
9568c2ecf20Sopenharmony_ci/* enum: Fatal. */
9578c2ecf20Sopenharmony_ci#define          FCDI_EVENT_LEVEL_FATAL 0x3
9588c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DATA_OFST 0
9598c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DATA_LEN 4
9608c2ecf20Sopenharmony_ci#define        FCDI_EVENT_LINK_STATE_STATUS_OFST 0
9618c2ecf20Sopenharmony_ci#define        FCDI_EVENT_LINK_STATE_STATUS_LBN 0
9628c2ecf20Sopenharmony_ci#define        FCDI_EVENT_LINK_STATE_STATUS_WIDTH 1
9638c2ecf20Sopenharmony_ci#define          FCDI_EVENT_LINK_DOWN 0x0 /* enum */
9648c2ecf20Sopenharmony_ci#define          FCDI_EVENT_LINK_UP 0x1 /* enum */
9658c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DATA_LBN 0
9668c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DATA_WIDTH 32
9678c2ecf20Sopenharmony_ci#define       FCDI_EVENT_SRC_LBN 36
9688c2ecf20Sopenharmony_ci#define       FCDI_EVENT_SRC_WIDTH 8
9698c2ecf20Sopenharmony_ci#define       FCDI_EVENT_EV_CODE_LBN 60
9708c2ecf20Sopenharmony_ci#define       FCDI_EVENT_EV_CODE_WIDTH 4
9718c2ecf20Sopenharmony_ci#define       FCDI_EVENT_CODE_LBN 44
9728c2ecf20Sopenharmony_ci#define       FCDI_EVENT_CODE_WIDTH 8
9738c2ecf20Sopenharmony_ci/* enum: The FC was rebooted. */
9748c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_REBOOT 0x1
9758c2ecf20Sopenharmony_ci/* enum: Bad assert. */
9768c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_ASSERT 0x2
9778c2ecf20Sopenharmony_ci/* enum: DDR3 test result. */
9788c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_DDR_TEST_RESULT 0x3
9798c2ecf20Sopenharmony_ci/* enum: Link status. */
9808c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_LINK_STATE 0x4
9818c2ecf20Sopenharmony_ci/* enum: A timed read is ready to be serviced. */
9828c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_TIMED_READ 0x5
9838c2ecf20Sopenharmony_ci/* enum: One or more PPS IN events */
9848c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_PPS_IN 0x6
9858c2ecf20Sopenharmony_ci/* enum: Tick event from PTP clock */
9868c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_PTP_TICK 0x7
9878c2ecf20Sopenharmony_ci/* enum: ECC error counters */
9888c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_DDR_ECC_STATUS 0x8
9898c2ecf20Sopenharmony_ci/* enum: Current status of PTP */
9908c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_PTP_STATUS 0x9
9918c2ecf20Sopenharmony_ci/* enum: Port id config to map MC-FC port idx */
9928c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_PORT_CONFIG 0xa
9938c2ecf20Sopenharmony_ci/* enum: Boot result or error code */
9948c2ecf20Sopenharmony_ci#define          FCDI_EVENT_CODE_BOOT_RESULT 0xb
9958c2ecf20Sopenharmony_ci#define       FCDI_EVENT_REBOOT_SRC_LBN 36
9968c2ecf20Sopenharmony_ci#define       FCDI_EVENT_REBOOT_SRC_WIDTH 8
9978c2ecf20Sopenharmony_ci#define          FCDI_EVENT_REBOOT_FC_FW 0x0 /* enum */
9988c2ecf20Sopenharmony_ci#define          FCDI_EVENT_REBOOT_FC_BOOTLOADER 0x1 /* enum */
9998c2ecf20Sopenharmony_ci#define       FCDI_EVENT_ASSERT_INSTR_ADDRESS_OFST 0
10008c2ecf20Sopenharmony_ci#define       FCDI_EVENT_ASSERT_INSTR_ADDRESS_LEN 4
10018c2ecf20Sopenharmony_ci#define       FCDI_EVENT_ASSERT_INSTR_ADDRESS_LBN 0
10028c2ecf20Sopenharmony_ci#define       FCDI_EVENT_ASSERT_INSTR_ADDRESS_WIDTH 32
10038c2ecf20Sopenharmony_ci#define       FCDI_EVENT_ASSERT_TYPE_LBN 36
10048c2ecf20Sopenharmony_ci#define       FCDI_EVENT_ASSERT_TYPE_WIDTH 8
10058c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_LBN 36
10068c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_WIDTH 8
10078c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_TEST_RESULT_RESULT_OFST 0
10088c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_TEST_RESULT_RESULT_LEN 4
10098c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_TEST_RESULT_RESULT_LBN 0
10108c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_TEST_RESULT_RESULT_WIDTH 32
10118c2ecf20Sopenharmony_ci#define       FCDI_EVENT_LINK_STATE_DATA_OFST 0
10128c2ecf20Sopenharmony_ci#define       FCDI_EVENT_LINK_STATE_DATA_LEN 4
10138c2ecf20Sopenharmony_ci#define       FCDI_EVENT_LINK_STATE_DATA_LBN 0
10148c2ecf20Sopenharmony_ci#define       FCDI_EVENT_LINK_STATE_DATA_WIDTH 32
10158c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PTP_STATE_OFST 0
10168c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PTP_STATE_LEN 4
10178c2ecf20Sopenharmony_ci#define          FCDI_EVENT_PTP_UNDEFINED 0x0 /* enum */
10188c2ecf20Sopenharmony_ci#define          FCDI_EVENT_PTP_SETUP_FAILED 0x1 /* enum */
10198c2ecf20Sopenharmony_ci#define          FCDI_EVENT_PTP_OPERATIONAL 0x2 /* enum */
10208c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PTP_STATE_LBN 0
10218c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PTP_STATE_WIDTH 32
10228c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_LBN 36
10238c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_WIDTH 8
10248c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_ECC_STATUS_STATUS_OFST 0
10258c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_ECC_STATUS_STATUS_LEN 4
10268c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_ECC_STATUS_STATUS_LBN 0
10278c2ecf20Sopenharmony_ci#define       FCDI_EVENT_DDR_ECC_STATUS_STATUS_WIDTH 32
10288c2ecf20Sopenharmony_ci/* Index of MC port being referred to */
10298c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PORT_CONFIG_SRC_LBN 36
10308c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PORT_CONFIG_SRC_WIDTH 8
10318c2ecf20Sopenharmony_ci/* FC Port index that matches the MC port index in SRC */
10328c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PORT_CONFIG_DATA_OFST 0
10338c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PORT_CONFIG_DATA_LEN 4
10348c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PORT_CONFIG_DATA_LBN 0
10358c2ecf20Sopenharmony_ci#define       FCDI_EVENT_PORT_CONFIG_DATA_WIDTH 32
10368c2ecf20Sopenharmony_ci#define       FCDI_EVENT_BOOT_RESULT_OFST 0
10378c2ecf20Sopenharmony_ci#define       FCDI_EVENT_BOOT_RESULT_LEN 4
10388c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
10398c2ecf20Sopenharmony_ci/*               MC_CMD_AOE/MC_CMD_AOE_OUT_INFO/FC_BOOT_RESULT */
10408c2ecf20Sopenharmony_ci#define       FCDI_EVENT_BOOT_RESULT_LBN 0
10418c2ecf20Sopenharmony_ci#define       FCDI_EVENT_BOOT_RESULT_WIDTH 32
10428c2ecf20Sopenharmony_ci
10438c2ecf20Sopenharmony_ci/* FCDI_EXTENDED_EVENT_PPS structuredef: Extended FCDI event to send PPS events
10448c2ecf20Sopenharmony_ci * to the MC. Note that this structure | is overlayed over a normal FCDI event
10458c2ecf20Sopenharmony_ci * such that bits 32-63 containing | event code, level, source etc remain the
10468c2ecf20Sopenharmony_ci * same. In this case the data | field of the header is defined to be the
10478c2ecf20Sopenharmony_ci * number of timestamps
10488c2ecf20Sopenharmony_ci */
10498c2ecf20Sopenharmony_ci#define    FCDI_EXTENDED_EVENT_PPS_LENMIN 16
10508c2ecf20Sopenharmony_ci#define    FCDI_EXTENDED_EVENT_PPS_LENMAX 248
10518c2ecf20Sopenharmony_ci#define    FCDI_EXTENDED_EVENT_PPS_LENMAX_MCDI2 1016
10528c2ecf20Sopenharmony_ci#define    FCDI_EXTENDED_EVENT_PPS_LEN(num) (8+8*(num))
10538c2ecf20Sopenharmony_ci#define    FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_NUM(len) (((len)-8)/8)
10548c2ecf20Sopenharmony_ci/* Number of timestamps following */
10558c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_COUNT_OFST 0
10568c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_COUNT_LEN 4
10578c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_COUNT_LBN 0
10588c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_COUNT_WIDTH 32
10598c2ecf20Sopenharmony_ci/* Seconds field of a timestamp record */
10608c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_SECONDS_OFST 8
10618c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_SECONDS_LEN 4
10628c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_SECONDS_LBN 64
10638c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_SECONDS_WIDTH 32
10648c2ecf20Sopenharmony_ci/* Nanoseconds field of a timestamp record */
10658c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_OFST 12
10668c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LEN 4
10678c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LBN 96
10688c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_WIDTH 32
10698c2ecf20Sopenharmony_ci/* Timestamp records comprising the event */
10708c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_OFST 8
10718c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LEN 8
10728c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LO_OFST 8
10738c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_HI_OFST 12
10748c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MINNUM 1
10758c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM 30
10768c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM_MCDI2 126
10778c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LBN 64
10788c2ecf20Sopenharmony_ci#define       FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_WIDTH 64
10798c2ecf20Sopenharmony_ci
10808c2ecf20Sopenharmony_ci/* MUM_EVENT structuredef */
10818c2ecf20Sopenharmony_ci#define    MUM_EVENT_LEN 8
10828c2ecf20Sopenharmony_ci#define       MUM_EVENT_CONT_LBN 32
10838c2ecf20Sopenharmony_ci#define       MUM_EVENT_CONT_WIDTH 1
10848c2ecf20Sopenharmony_ci#define       MUM_EVENT_LEVEL_LBN 33
10858c2ecf20Sopenharmony_ci#define       MUM_EVENT_LEVEL_WIDTH 3
10868c2ecf20Sopenharmony_ci/* enum: Info. */
10878c2ecf20Sopenharmony_ci#define          MUM_EVENT_LEVEL_INFO 0x0
10888c2ecf20Sopenharmony_ci/* enum: Warning. */
10898c2ecf20Sopenharmony_ci#define          MUM_EVENT_LEVEL_WARN 0x1
10908c2ecf20Sopenharmony_ci/* enum: Error. */
10918c2ecf20Sopenharmony_ci#define          MUM_EVENT_LEVEL_ERR 0x2
10928c2ecf20Sopenharmony_ci/* enum: Fatal. */
10938c2ecf20Sopenharmony_ci#define          MUM_EVENT_LEVEL_FATAL 0x3
10948c2ecf20Sopenharmony_ci#define       MUM_EVENT_DATA_OFST 0
10958c2ecf20Sopenharmony_ci#define       MUM_EVENT_DATA_LEN 4
10968c2ecf20Sopenharmony_ci#define        MUM_EVENT_SENSOR_ID_OFST 0
10978c2ecf20Sopenharmony_ci#define        MUM_EVENT_SENSOR_ID_LBN 0
10988c2ecf20Sopenharmony_ci#define        MUM_EVENT_SENSOR_ID_WIDTH 8
10998c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
11008c2ecf20Sopenharmony_ci/*                MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
11018c2ecf20Sopenharmony_ci#define        MUM_EVENT_SENSOR_STATE_OFST 0
11028c2ecf20Sopenharmony_ci#define        MUM_EVENT_SENSOR_STATE_LBN 8
11038c2ecf20Sopenharmony_ci#define        MUM_EVENT_SENSOR_STATE_WIDTH 8
11048c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_READY_OFST 0
11058c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_READY_LBN 0
11068c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_READY_WIDTH 1
11078c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_LINK_UP_OFST 0
11088c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_LINK_UP_LBN 1
11098c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_LINK_UP_WIDTH 1
11108c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_LOL_OFST 0
11118c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_LOL_LBN 2
11128c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_LOL_WIDTH 1
11138c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_RX_LOL_OFST 0
11148c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_RX_LOL_LBN 3
11158c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_RX_LOL_WIDTH 1
11168c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_LOS_OFST 0
11178c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_LOS_LBN 4
11188c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_LOS_WIDTH 1
11198c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_RX_LOS_OFST 0
11208c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_RX_LOS_LBN 5
11218c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_RX_LOS_WIDTH 1
11228c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_FAULT_OFST 0
11238c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_FAULT_LBN 6
11248c2ecf20Sopenharmony_ci#define        MUM_EVENT_PORT_PHY_TX_FAULT_WIDTH 1
11258c2ecf20Sopenharmony_ci#define       MUM_EVENT_DATA_LBN 0
11268c2ecf20Sopenharmony_ci#define       MUM_EVENT_DATA_WIDTH 32
11278c2ecf20Sopenharmony_ci#define       MUM_EVENT_SRC_LBN 36
11288c2ecf20Sopenharmony_ci#define       MUM_EVENT_SRC_WIDTH 8
11298c2ecf20Sopenharmony_ci#define       MUM_EVENT_EV_CODE_LBN 60
11308c2ecf20Sopenharmony_ci#define       MUM_EVENT_EV_CODE_WIDTH 4
11318c2ecf20Sopenharmony_ci#define       MUM_EVENT_CODE_LBN 44
11328c2ecf20Sopenharmony_ci#define       MUM_EVENT_CODE_WIDTH 8
11338c2ecf20Sopenharmony_ci/* enum: The MUM was rebooted. */
11348c2ecf20Sopenharmony_ci#define          MUM_EVENT_CODE_REBOOT 0x1
11358c2ecf20Sopenharmony_ci/* enum: Bad assert. */
11368c2ecf20Sopenharmony_ci#define          MUM_EVENT_CODE_ASSERT 0x2
11378c2ecf20Sopenharmony_ci/* enum: Sensor failure. */
11388c2ecf20Sopenharmony_ci#define          MUM_EVENT_CODE_SENSOR 0x3
11398c2ecf20Sopenharmony_ci/* enum: Link fault has been asserted, or has cleared. */
11408c2ecf20Sopenharmony_ci#define          MUM_EVENT_CODE_QSFP_LASI_INTERRUPT 0x4
11418c2ecf20Sopenharmony_ci#define       MUM_EVENT_SENSOR_DATA_OFST 0
11428c2ecf20Sopenharmony_ci#define       MUM_EVENT_SENSOR_DATA_LEN 4
11438c2ecf20Sopenharmony_ci#define       MUM_EVENT_SENSOR_DATA_LBN 0
11448c2ecf20Sopenharmony_ci#define       MUM_EVENT_SENSOR_DATA_WIDTH 32
11458c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_FLAGS_OFST 0
11468c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_FLAGS_LEN 4
11478c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_FLAGS_LBN 0
11488c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_FLAGS_WIDTH 32
11498c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_COPPER_LEN_OFST 0
11508c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_COPPER_LEN_LEN 4
11518c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_COPPER_LEN_LBN 0
11528c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_COPPER_LEN_WIDTH 32
11538c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_CAPS_OFST 0
11548c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_CAPS_LEN 4
11558c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_CAPS_LBN 0
11568c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_CAPS_WIDTH 32
11578c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_TECH_OFST 0
11588c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_TECH_LEN 4
11598c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_UNKNOWN 0x0 /* enum */
11608c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_OPTICAL 0x1 /* enum */
11618c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE 0x2 /* enum */
11628c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_PASSIVE_EQUALIZED 0x3 /* enum */
11638c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_ACTIVE_LIMITING 0x4 /* enum */
11648c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_COPPER_ACTIVE_LINEAR 0x5 /* enum */
11658c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_BASE_T 0x6 /* enum */
11668c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_STATE_QSFP_MODULE_TECH_LOOPBACK_PASSIVE 0x7 /* enum */
11678c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_TECH_LBN 0
11688c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_TECH_WIDTH 32
11698c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_SRC_DATA_ID_LBN 36
11708c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_SRC_DATA_ID_WIDTH 4
11718c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_SRC_DATA_ID_FLAGS 0x0 /* enum */
11728c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_SRC_DATA_ID_COPPER_LEN 0x1 /* enum */
11738c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_SRC_DATA_ID_CAPS 0x2 /* enum */
11748c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_SRC_DATA_ID_TECH 0x3 /* enum */
11758c2ecf20Sopenharmony_ci#define          MUM_EVENT_PORT_PHY_SRC_DATA_ID_MAX 0x4 /* enum */
11768c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_SRC_PORT_NO_LBN 40
11778c2ecf20Sopenharmony_ci#define       MUM_EVENT_PORT_PHY_SRC_PORT_NO_WIDTH 4
11788c2ecf20Sopenharmony_ci
11798c2ecf20Sopenharmony_ci
11808c2ecf20Sopenharmony_ci/***********************************/
11818c2ecf20Sopenharmony_ci/* MC_CMD_READ32
11828c2ecf20Sopenharmony_ci * Read multiple 32byte words from MC memory. Note - this command really
11838c2ecf20Sopenharmony_ci * belongs to INSECURE category but is required by shmboot. The command handler
11848c2ecf20Sopenharmony_ci * has additional checks to reject insecure calls.
11858c2ecf20Sopenharmony_ci */
11868c2ecf20Sopenharmony_ci#define MC_CMD_READ32 0x1
11878c2ecf20Sopenharmony_ci#undef MC_CMD_0x1_PRIVILEGE_CTG
11888c2ecf20Sopenharmony_ci
11898c2ecf20Sopenharmony_ci#define MC_CMD_0x1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
11908c2ecf20Sopenharmony_ci
11918c2ecf20Sopenharmony_ci/* MC_CMD_READ32_IN msgrequest */
11928c2ecf20Sopenharmony_ci#define    MC_CMD_READ32_IN_LEN 8
11938c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_IN_ADDR_OFST 0
11948c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_IN_ADDR_LEN 4
11958c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_IN_NUMWORDS_OFST 4
11968c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_IN_NUMWORDS_LEN 4
11978c2ecf20Sopenharmony_ci
11988c2ecf20Sopenharmony_ci/* MC_CMD_READ32_OUT msgresponse */
11998c2ecf20Sopenharmony_ci#define    MC_CMD_READ32_OUT_LENMIN 4
12008c2ecf20Sopenharmony_ci#define    MC_CMD_READ32_OUT_LENMAX 252
12018c2ecf20Sopenharmony_ci#define    MC_CMD_READ32_OUT_LENMAX_MCDI2 1020
12028c2ecf20Sopenharmony_ci#define    MC_CMD_READ32_OUT_LEN(num) (0+4*(num))
12038c2ecf20Sopenharmony_ci#define    MC_CMD_READ32_OUT_BUFFER_NUM(len) (((len)-0)/4)
12048c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_OUT_BUFFER_OFST 0
12058c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_OUT_BUFFER_LEN 4
12068c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_OUT_BUFFER_MINNUM 1
12078c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_OUT_BUFFER_MAXNUM 63
12088c2ecf20Sopenharmony_ci#define       MC_CMD_READ32_OUT_BUFFER_MAXNUM_MCDI2 255
12098c2ecf20Sopenharmony_ci
12108c2ecf20Sopenharmony_ci
12118c2ecf20Sopenharmony_ci/***********************************/
12128c2ecf20Sopenharmony_ci/* MC_CMD_WRITE32
12138c2ecf20Sopenharmony_ci * Write multiple 32byte words to MC memory.
12148c2ecf20Sopenharmony_ci */
12158c2ecf20Sopenharmony_ci#define MC_CMD_WRITE32 0x2
12168c2ecf20Sopenharmony_ci#undef MC_CMD_0x2_PRIVILEGE_CTG
12178c2ecf20Sopenharmony_ci
12188c2ecf20Sopenharmony_ci#define MC_CMD_0x2_PRIVILEGE_CTG SRIOV_CTG_INSECURE
12198c2ecf20Sopenharmony_ci
12208c2ecf20Sopenharmony_ci/* MC_CMD_WRITE32_IN msgrequest */
12218c2ecf20Sopenharmony_ci#define    MC_CMD_WRITE32_IN_LENMIN 8
12228c2ecf20Sopenharmony_ci#define    MC_CMD_WRITE32_IN_LENMAX 252
12238c2ecf20Sopenharmony_ci#define    MC_CMD_WRITE32_IN_LENMAX_MCDI2 1020
12248c2ecf20Sopenharmony_ci#define    MC_CMD_WRITE32_IN_LEN(num) (4+4*(num))
12258c2ecf20Sopenharmony_ci#define    MC_CMD_WRITE32_IN_BUFFER_NUM(len) (((len)-4)/4)
12268c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_ADDR_OFST 0
12278c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_ADDR_LEN 4
12288c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_BUFFER_OFST 4
12298c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_BUFFER_LEN 4
12308c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_BUFFER_MINNUM 1
12318c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_BUFFER_MAXNUM 62
12328c2ecf20Sopenharmony_ci#define       MC_CMD_WRITE32_IN_BUFFER_MAXNUM_MCDI2 254
12338c2ecf20Sopenharmony_ci
12348c2ecf20Sopenharmony_ci/* MC_CMD_WRITE32_OUT msgresponse */
12358c2ecf20Sopenharmony_ci#define    MC_CMD_WRITE32_OUT_LEN 0
12368c2ecf20Sopenharmony_ci
12378c2ecf20Sopenharmony_ci
12388c2ecf20Sopenharmony_ci/***********************************/
12398c2ecf20Sopenharmony_ci/* MC_CMD_COPYCODE
12408c2ecf20Sopenharmony_ci * Copy MC code between two locations and jump. Note - this command really
12418c2ecf20Sopenharmony_ci * belongs to INSECURE category but is required by shmboot. The command handler
12428c2ecf20Sopenharmony_ci * has additional checks to reject insecure calls.
12438c2ecf20Sopenharmony_ci */
12448c2ecf20Sopenharmony_ci#define MC_CMD_COPYCODE 0x3
12458c2ecf20Sopenharmony_ci#undef MC_CMD_0x3_PRIVILEGE_CTG
12468c2ecf20Sopenharmony_ci
12478c2ecf20Sopenharmony_ci#define MC_CMD_0x3_PRIVILEGE_CTG SRIOV_CTG_ADMIN
12488c2ecf20Sopenharmony_ci
12498c2ecf20Sopenharmony_ci/* MC_CMD_COPYCODE_IN msgrequest */
12508c2ecf20Sopenharmony_ci#define    MC_CMD_COPYCODE_IN_LEN 16
12518c2ecf20Sopenharmony_ci/* Source address
12528c2ecf20Sopenharmony_ci *
12538c2ecf20Sopenharmony_ci * The main image should be entered via a copy of a single word from and to a
12548c2ecf20Sopenharmony_ci * magic address, which controls various aspects of the boot. The magic address
12558c2ecf20Sopenharmony_ci * is a bitfield, with each bit as documented below.
12568c2ecf20Sopenharmony_ci */
12578c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_SRC_ADDR_OFST 0
12588c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_SRC_ADDR_LEN 4
12598c2ecf20Sopenharmony_ci/* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT (see below) */
12608c2ecf20Sopenharmony_ci#define          MC_CMD_COPYCODE_HUNT_NO_MAGIC_ADDR 0x10000
12618c2ecf20Sopenharmony_ci/* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT and
12628c2ecf20Sopenharmony_ci * BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED (see below)
12638c2ecf20Sopenharmony_ci */
12648c2ecf20Sopenharmony_ci#define          MC_CMD_COPYCODE_HUNT_NO_DATAPATH_MAGIC_ADDR 0x1d0d0
12658c2ecf20Sopenharmony_ci/* enum: Deprecated; equivalent to setting BOOT_MAGIC_PRESENT,
12668c2ecf20Sopenharmony_ci * BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED and BOOT_MAGIC_IGNORE_CONFIG (see
12678c2ecf20Sopenharmony_ci * below)
12688c2ecf20Sopenharmony_ci */
12698c2ecf20Sopenharmony_ci#define          MC_CMD_COPYCODE_HUNT_IGNORE_CONFIG_MAGIC_ADDR 0x1badc
12708c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_OFST 0
12718c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_LBN 17
12728c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_PRESENT_WIDTH 1
12738c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_OFST 0
12748c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_LBN 2
12758c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_SATELLITE_CPUS_NOT_LOADED_WIDTH 1
12768c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_OFST 0
12778c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_LBN 3
12788c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_IGNORE_CONFIG_WIDTH 1
12798c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_OFST 0
12808c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_LBN 4
12818c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_WIDTH 1
12828c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_OFST 0
12838c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_LBN 5
12848c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_WIDTH 1
12858c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_OFST 0
12868c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_LBN 6
12878c2ecf20Sopenharmony_ci#define        MC_CMD_COPYCODE_IN_BOOT_MAGIC_DISABLE_XIP_WIDTH 1
12888c2ecf20Sopenharmony_ci/* Destination address */
12898c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_DEST_ADDR_OFST 4
12908c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_DEST_ADDR_LEN 4
12918c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_NUMWORDS_OFST 8
12928c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_NUMWORDS_LEN 4
12938c2ecf20Sopenharmony_ci/* Address of where to jump after copy. */
12948c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_JUMP_OFST 12
12958c2ecf20Sopenharmony_ci#define       MC_CMD_COPYCODE_IN_JUMP_LEN 4
12968c2ecf20Sopenharmony_ci/* enum: Control should return to the caller rather than jumping */
12978c2ecf20Sopenharmony_ci#define          MC_CMD_COPYCODE_JUMP_NONE 0x1
12988c2ecf20Sopenharmony_ci
12998c2ecf20Sopenharmony_ci/* MC_CMD_COPYCODE_OUT msgresponse */
13008c2ecf20Sopenharmony_ci#define    MC_CMD_COPYCODE_OUT_LEN 0
13018c2ecf20Sopenharmony_ci
13028c2ecf20Sopenharmony_ci
13038c2ecf20Sopenharmony_ci/***********************************/
13048c2ecf20Sopenharmony_ci/* MC_CMD_SET_FUNC
13058c2ecf20Sopenharmony_ci * Select function for function-specific commands.
13068c2ecf20Sopenharmony_ci */
13078c2ecf20Sopenharmony_ci#define MC_CMD_SET_FUNC 0x4
13088c2ecf20Sopenharmony_ci#undef MC_CMD_0x4_PRIVILEGE_CTG
13098c2ecf20Sopenharmony_ci
13108c2ecf20Sopenharmony_ci#define MC_CMD_0x4_PRIVILEGE_CTG SRIOV_CTG_INSECURE
13118c2ecf20Sopenharmony_ci
13128c2ecf20Sopenharmony_ci/* MC_CMD_SET_FUNC_IN msgrequest */
13138c2ecf20Sopenharmony_ci#define    MC_CMD_SET_FUNC_IN_LEN 4
13148c2ecf20Sopenharmony_ci/* Set function */
13158c2ecf20Sopenharmony_ci#define       MC_CMD_SET_FUNC_IN_FUNC_OFST 0
13168c2ecf20Sopenharmony_ci#define       MC_CMD_SET_FUNC_IN_FUNC_LEN 4
13178c2ecf20Sopenharmony_ci
13188c2ecf20Sopenharmony_ci/* MC_CMD_SET_FUNC_OUT msgresponse */
13198c2ecf20Sopenharmony_ci#define    MC_CMD_SET_FUNC_OUT_LEN 0
13208c2ecf20Sopenharmony_ci
13218c2ecf20Sopenharmony_ci
13228c2ecf20Sopenharmony_ci/***********************************/
13238c2ecf20Sopenharmony_ci/* MC_CMD_GET_BOOT_STATUS
13248c2ecf20Sopenharmony_ci * Get the instruction address from which the MC booted.
13258c2ecf20Sopenharmony_ci */
13268c2ecf20Sopenharmony_ci#define MC_CMD_GET_BOOT_STATUS 0x5
13278c2ecf20Sopenharmony_ci#undef MC_CMD_0x5_PRIVILEGE_CTG
13288c2ecf20Sopenharmony_ci
13298c2ecf20Sopenharmony_ci#define MC_CMD_0x5_PRIVILEGE_CTG SRIOV_CTG_GENERAL
13308c2ecf20Sopenharmony_ci
13318c2ecf20Sopenharmony_ci/* MC_CMD_GET_BOOT_STATUS_IN msgrequest */
13328c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOOT_STATUS_IN_LEN 0
13338c2ecf20Sopenharmony_ci
13348c2ecf20Sopenharmony_ci/* MC_CMD_GET_BOOT_STATUS_OUT msgresponse */
13358c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOOT_STATUS_OUT_LEN 8
13368c2ecf20Sopenharmony_ci/* ?? */
13378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_OFST 0
13388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_LEN 4
13398c2ecf20Sopenharmony_ci/* enum: indicates that the MC wasn't flash booted */
13408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_BOOT_STATUS_OUT_BOOT_OFFSET_NULL 0xdeadbeef
13418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_OFST 4
13428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_LEN 4
13438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_OFST 4
13448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_LBN 0
13458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_WATCHDOG_WIDTH 1
13468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_OFST 4
13478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_LBN 1
13488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_PRIMARY_WIDTH 1
13498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_OFST 4
13508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_LBN 2
13518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_BOOT_STATUS_OUT_FLAGS_BACKUP_WIDTH 1
13528c2ecf20Sopenharmony_ci
13538c2ecf20Sopenharmony_ci
13548c2ecf20Sopenharmony_ci/***********************************/
13558c2ecf20Sopenharmony_ci/* MC_CMD_GET_ASSERTS
13568c2ecf20Sopenharmony_ci * Get (and optionally clear) the current assertion status. Only
13578c2ecf20Sopenharmony_ci * OUT.GLOBAL_FLAGS is guaranteed to exist in the completion payload. The other
13588c2ecf20Sopenharmony_ci * fields will only be present if OUT.GLOBAL_FLAGS != NO_FAILS
13598c2ecf20Sopenharmony_ci */
13608c2ecf20Sopenharmony_ci#define MC_CMD_GET_ASSERTS 0x6
13618c2ecf20Sopenharmony_ci#undef MC_CMD_0x6_PRIVILEGE_CTG
13628c2ecf20Sopenharmony_ci
13638c2ecf20Sopenharmony_ci#define MC_CMD_0x6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
13648c2ecf20Sopenharmony_ci
13658c2ecf20Sopenharmony_ci/* MC_CMD_GET_ASSERTS_IN msgrequest */
13668c2ecf20Sopenharmony_ci#define    MC_CMD_GET_ASSERTS_IN_LEN 4
13678c2ecf20Sopenharmony_ci/* Set to clear assertion */
13688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_IN_CLEAR_OFST 0
13698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_IN_CLEAR_LEN 4
13708c2ecf20Sopenharmony_ci
13718c2ecf20Sopenharmony_ci/* MC_CMD_GET_ASSERTS_OUT msgresponse */
13728c2ecf20Sopenharmony_ci#define    MC_CMD_GET_ASSERTS_OUT_LEN 140
13738c2ecf20Sopenharmony_ci/* Assertion status flag. */
13748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_OFST 0
13758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_GLOBAL_FLAGS_LEN 4
13768c2ecf20Sopenharmony_ci/* enum: No assertions have failed. */
13778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1
13788c2ecf20Sopenharmony_ci/* enum: A system-level assertion has failed. */
13798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2
13808c2ecf20Sopenharmony_ci/* enum: A thread-level assertion has failed. */
13818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3
13828c2ecf20Sopenharmony_ci/* enum: The system was reset by the watchdog. */
13838c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4
13848c2ecf20Sopenharmony_ci/* enum: An illegal address trap stopped the system (huntington and later) */
13858c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5
13868c2ecf20Sopenharmony_ci/* Failing PC value */
13878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_OFST 4
13888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_SAVED_PC_OFFS_LEN 4
13898c2ecf20Sopenharmony_ci/* Saved GP regs */
13908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_OFST 8
13918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_LEN 4
13928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_GP_REGS_OFFS_NUM 31
13938c2ecf20Sopenharmony_ci/* enum: A magic value hinting that the value in this register at the time of
13948c2ecf20Sopenharmony_ci * the failure has likely been lost.
13958c2ecf20Sopenharmony_ci */
13968c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057
13978c2ecf20Sopenharmony_ci/* Failing thread address */
13988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_OFST 132
13998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_THREAD_OFFS_LEN 4
14008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_RESERVED_OFST 136
14018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_RESERVED_LEN 4
14028c2ecf20Sopenharmony_ci
14038c2ecf20Sopenharmony_ci/* MC_CMD_GET_ASSERTS_OUT_V2 msgresponse: Extended response for MicroBlaze CPUs
14048c2ecf20Sopenharmony_ci * found on Riverhead designs
14058c2ecf20Sopenharmony_ci */
14068c2ecf20Sopenharmony_ci#define    MC_CMD_GET_ASSERTS_OUT_V2_LEN 240
14078c2ecf20Sopenharmony_ci/* Assertion status flag. */
14088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_GLOBAL_FLAGS_OFST 0
14098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_GLOBAL_FLAGS_LEN 4
14108c2ecf20Sopenharmony_ci/* enum: No assertions have failed. */
14118c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 */
14128c2ecf20Sopenharmony_ci/* enum: A system-level assertion has failed. */
14138c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2 */
14148c2ecf20Sopenharmony_ci/* enum: A thread-level assertion has failed. */
14158c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3 */
14168c2ecf20Sopenharmony_ci/* enum: The system was reset by the watchdog. */
14178c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4 */
14188c2ecf20Sopenharmony_ci/* enum: An illegal address trap stopped the system (huntington and later) */
14198c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 */
14208c2ecf20Sopenharmony_ci/* Failing PC value */
14218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_SAVED_PC_OFFS_OFST 4
14228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_SAVED_PC_OFFS_LEN 4
14238c2ecf20Sopenharmony_ci/* Saved GP regs */
14248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_GP_REGS_OFFS_OFST 8
14258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_GP_REGS_OFFS_LEN 4
14268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_GP_REGS_OFFS_NUM 31
14278c2ecf20Sopenharmony_ci/* enum: A magic value hinting that the value in this register at the time of
14288c2ecf20Sopenharmony_ci * the failure has likely been lost.
14298c2ecf20Sopenharmony_ci */
14308c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057 */
14318c2ecf20Sopenharmony_ci/* Failing thread address */
14328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_THREAD_OFFS_OFST 132
14338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_THREAD_OFFS_LEN 4
14348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_RESERVED_OFST 136
14358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_RESERVED_LEN 4
14368c2ecf20Sopenharmony_ci/* Saved Special Function Registers */
14378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_SF_REGS_OFFS_OFST 136
14388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_SF_REGS_OFFS_LEN 4
14398c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V2_SF_REGS_OFFS_NUM 26
14408c2ecf20Sopenharmony_ci
14418c2ecf20Sopenharmony_ci/* MC_CMD_GET_ASSERTS_OUT_V3 msgresponse: Extended response with asserted
14428c2ecf20Sopenharmony_ci * firmware version information
14438c2ecf20Sopenharmony_ci */
14448c2ecf20Sopenharmony_ci#define    MC_CMD_GET_ASSERTS_OUT_V3_LEN 360
14458c2ecf20Sopenharmony_ci/* Assertion status flag. */
14468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_GLOBAL_FLAGS_OFST 0
14478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_GLOBAL_FLAGS_LEN 4
14488c2ecf20Sopenharmony_ci/* enum: No assertions have failed. */
14498c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS 0x1 */
14508c2ecf20Sopenharmony_ci/* enum: A system-level assertion has failed. */
14518c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_SYS_FAIL 0x2 */
14528c2ecf20Sopenharmony_ci/* enum: A thread-level assertion has failed. */
14538c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_THR_FAIL 0x3 */
14548c2ecf20Sopenharmony_ci/* enum: The system was reset by the watchdog. */
14558c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_WDOG_FIRED 0x4 */
14568c2ecf20Sopenharmony_ci/* enum: An illegal address trap stopped the system (huntington and later) */
14578c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_FLAGS_ADDR_TRAP 0x5 */
14588c2ecf20Sopenharmony_ci/* Failing PC value */
14598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_SAVED_PC_OFFS_OFST 4
14608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_SAVED_PC_OFFS_LEN 4
14618c2ecf20Sopenharmony_ci/* Saved GP regs */
14628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_GP_REGS_OFFS_OFST 8
14638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_GP_REGS_OFFS_LEN 4
14648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_GP_REGS_OFFS_NUM 31
14658c2ecf20Sopenharmony_ci/* enum: A magic value hinting that the value in this register at the time of
14668c2ecf20Sopenharmony_ci * the failure has likely been lost.
14678c2ecf20Sopenharmony_ci */
14688c2ecf20Sopenharmony_ci/*               MC_CMD_GET_ASSERTS_REG_NO_DATA 0xda7a1057 */
14698c2ecf20Sopenharmony_ci/* Failing thread address */
14708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_THREAD_OFFS_OFST 132
14718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_THREAD_OFFS_LEN 4
14728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_RESERVED_OFST 136
14738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_RESERVED_LEN 4
14748c2ecf20Sopenharmony_ci/* Saved Special Function Registers */
14758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_SF_REGS_OFFS_OFST 136
14768c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_SF_REGS_OFFS_LEN 4
14778c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_SF_REGS_OFFS_NUM 26
14788c2ecf20Sopenharmony_ci/* MC firmware unique build ID (as binary SHA-1 value) */
14798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_ID_OFST 240
14808c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_ID_LEN 20
14818c2ecf20Sopenharmony_ci/* MC firmware build date (as Unix timestamp) */
14828c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_OFST 260
14838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_LEN 8
14848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_LO_OFST 260
14858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_TIMESTAMP_HI_OFST 264
14868c2ecf20Sopenharmony_ci/* MC firmware version number */
14878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_OFST 268
14888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_LEN 8
14898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_LO_OFST 268
14908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_VERSION_HI_OFST 272
14918c2ecf20Sopenharmony_ci/* MC firmware security level */
14928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_SECURITY_LEVEL_OFST 276
14938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_SECURITY_LEVEL_LEN 4
14948c2ecf20Sopenharmony_ci/* MC firmware extra version info (as null-terminated US-ASCII string) */
14958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_EXTRA_INFO_OFST 280
14968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_EXTRA_INFO_LEN 16
14978c2ecf20Sopenharmony_ci/* MC firmware build name (as null-terminated US-ASCII string) */
14988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_NAME_OFST 296
14998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ASSERTS_OUT_V3_MC_FW_BUILD_NAME_LEN 64
15008c2ecf20Sopenharmony_ci
15018c2ecf20Sopenharmony_ci
15028c2ecf20Sopenharmony_ci/***********************************/
15038c2ecf20Sopenharmony_ci/* MC_CMD_LOG_CTRL
15048c2ecf20Sopenharmony_ci * Configure the output stream for log events such as link state changes,
15058c2ecf20Sopenharmony_ci * sensor notifications and MCDI completions
15068c2ecf20Sopenharmony_ci */
15078c2ecf20Sopenharmony_ci#define MC_CMD_LOG_CTRL 0x7
15088c2ecf20Sopenharmony_ci#undef MC_CMD_0x7_PRIVILEGE_CTG
15098c2ecf20Sopenharmony_ci
15108c2ecf20Sopenharmony_ci#define MC_CMD_0x7_PRIVILEGE_CTG SRIOV_CTG_GENERAL
15118c2ecf20Sopenharmony_ci
15128c2ecf20Sopenharmony_ci/* MC_CMD_LOG_CTRL_IN msgrequest */
15138c2ecf20Sopenharmony_ci#define    MC_CMD_LOG_CTRL_IN_LEN 8
15148c2ecf20Sopenharmony_ci/* Log destination */
15158c2ecf20Sopenharmony_ci#define       MC_CMD_LOG_CTRL_IN_LOG_DEST_OFST 0
15168c2ecf20Sopenharmony_ci#define       MC_CMD_LOG_CTRL_IN_LOG_DEST_LEN 4
15178c2ecf20Sopenharmony_ci/* enum: UART. */
15188c2ecf20Sopenharmony_ci#define          MC_CMD_LOG_CTRL_IN_LOG_DEST_UART 0x1
15198c2ecf20Sopenharmony_ci/* enum: Event queue. */
15208c2ecf20Sopenharmony_ci#define          MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ 0x2
15218c2ecf20Sopenharmony_ci/* Legacy argument. Must be zero. */
15228c2ecf20Sopenharmony_ci#define       MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_OFST 4
15238c2ecf20Sopenharmony_ci#define       MC_CMD_LOG_CTRL_IN_LOG_DEST_EVQ_LEN 4
15248c2ecf20Sopenharmony_ci
15258c2ecf20Sopenharmony_ci/* MC_CMD_LOG_CTRL_OUT msgresponse */
15268c2ecf20Sopenharmony_ci#define    MC_CMD_LOG_CTRL_OUT_LEN 0
15278c2ecf20Sopenharmony_ci
15288c2ecf20Sopenharmony_ci
15298c2ecf20Sopenharmony_ci/***********************************/
15308c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION
15318c2ecf20Sopenharmony_ci * Get version information about adapter components.
15328c2ecf20Sopenharmony_ci */
15338c2ecf20Sopenharmony_ci#define MC_CMD_GET_VERSION 0x8
15348c2ecf20Sopenharmony_ci#undef MC_CMD_0x8_PRIVILEGE_CTG
15358c2ecf20Sopenharmony_ci
15368c2ecf20Sopenharmony_ci#define MC_CMD_0x8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
15378c2ecf20Sopenharmony_ci
15388c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION_IN msgrequest */
15398c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VERSION_IN_LEN 0
15408c2ecf20Sopenharmony_ci
15418c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION_EXT_IN msgrequest: Asks for the extended version */
15428c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VERSION_EXT_IN_LEN 4
15438c2ecf20Sopenharmony_ci/* placeholder, set to 0 */
15448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_OFST 0
15458c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_IN_EXT_FLAGS_LEN 4
15468c2ecf20Sopenharmony_ci
15478c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION_V0_OUT msgresponse: deprecated version format */
15488c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VERSION_V0_OUT_LEN 4
15498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0
15508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4
15518c2ecf20Sopenharmony_ci/* enum: Reserved version number to indicate "any" version. */
15528c2ecf20Sopenharmony_ci#define          MC_CMD_GET_VERSION_OUT_FIRMWARE_ANY 0xffffffff
15538c2ecf20Sopenharmony_ci/* enum: Bootrom version value for Siena. */
15548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM 0xb0070000
15558c2ecf20Sopenharmony_ci/* enum: Bootrom version value for Huntington. */
15568c2ecf20Sopenharmony_ci#define          MC_CMD_GET_VERSION_OUT_FIRMWARE_HUNT_BOOTROM 0xb0070001
15578c2ecf20Sopenharmony_ci/* enum: Bootrom version value for Medford2. */
15588c2ecf20Sopenharmony_ci#define          MC_CMD_GET_VERSION_OUT_FIRMWARE_MEDFORD2_BOOTROM 0xb0070002
15598c2ecf20Sopenharmony_ci
15608c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION_OUT msgresponse */
15618c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VERSION_OUT_LEN 32
15628c2ecf20Sopenharmony_ci/*            MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */
15638c2ecf20Sopenharmony_ci/*            MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */
15648c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
15658c2ecf20Sopenharmony_ci/*               MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */
15668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_PCOL_OFST 4
15678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_PCOL_LEN 4
15688c2ecf20Sopenharmony_ci/* 128bit mask of functions supported by the current firmware */
15698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_OFST 8
15708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_SUPPORTED_FUNCS_LEN 16
15718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_VERSION_OFST 24
15728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_VERSION_LEN 8
15738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_VERSION_LO_OFST 24
15748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_OUT_VERSION_HI_OFST 28
15758c2ecf20Sopenharmony_ci
15768c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION_EXT_OUT msgresponse */
15778c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VERSION_EXT_OUT_LEN 48
15788c2ecf20Sopenharmony_ci/*            MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */
15798c2ecf20Sopenharmony_ci/*            MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */
15808c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
15818c2ecf20Sopenharmony_ci/*               MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */
15828c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_PCOL_OFST 4
15838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_PCOL_LEN 4
15848c2ecf20Sopenharmony_ci/* 128bit mask of functions supported by the current firmware */
15858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_OFST 8
15868c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_SUPPORTED_FUNCS_LEN 16
15878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_VERSION_OFST 24
15888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_VERSION_LEN 8
15898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_VERSION_LO_OFST 24
15908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_VERSION_HI_OFST 28
15918c2ecf20Sopenharmony_ci/* extra info */
15928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_EXTRA_OFST 32
15938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_EXT_OUT_EXTRA_LEN 16
15948c2ecf20Sopenharmony_ci
15958c2ecf20Sopenharmony_ci/* MC_CMD_GET_VERSION_V2_OUT msgresponse: Extended response providing version
15968c2ecf20Sopenharmony_ci * information for all adapter components. For Riverhead based designs, base MC
15978c2ecf20Sopenharmony_ci * firmware version fields refer to NMC firmware, while CMC firmware data is in
15988c2ecf20Sopenharmony_ci * dedicated CMC fields. Flags indicate which data is present in the response
15998c2ecf20Sopenharmony_ci * (depending on which components exist on a particular adapter)
16008c2ecf20Sopenharmony_ci */
16018c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VERSION_V2_OUT_LEN 304
16028c2ecf20Sopenharmony_ci/*            MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 */
16038c2ecf20Sopenharmony_ci/*            MC_CMD_GET_VERSION_OUT_FIRMWARE_LEN 4 */
16048c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
16058c2ecf20Sopenharmony_ci/*               MC_CMD_GET_VERSION_V0_OUT/MC_CMD_GET_VERSION_OUT_FIRMWARE */
16068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_PCOL_OFST 4
16078c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_PCOL_LEN 4
16088c2ecf20Sopenharmony_ci/* 128bit mask of functions supported by the current firmware */
16098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUPPORTED_FUNCS_OFST 8
16108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUPPORTED_FUNCS_LEN 16
16118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_VERSION_OFST 24
16128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_VERSION_LEN 8
16138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_VERSION_LO_OFST 24
16148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_VERSION_HI_OFST 28
16158c2ecf20Sopenharmony_ci/* extra info */
16168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_EXTRA_OFST 32
16178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_EXTRA_LEN 16
16188c2ecf20Sopenharmony_ci/* Flags indicating which extended fields are valid */
16198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FLAGS_OFST 48
16208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FLAGS_LEN 4
16218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_MCFW_EXT_INFO_PRESENT_OFST 48
16228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_MCFW_EXT_INFO_PRESENT_LBN 0
16238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_MCFW_EXT_INFO_PRESENT_WIDTH 1
16248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_SUCFW_EXT_INFO_PRESENT_OFST 48
16258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_SUCFW_EXT_INFO_PRESENT_LBN 1
16268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_SUCFW_EXT_INFO_PRESENT_WIDTH 1
16278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_CMC_EXT_INFO_PRESENT_OFST 48
16288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_CMC_EXT_INFO_PRESENT_LBN 2
16298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_CMC_EXT_INFO_PRESENT_WIDTH 1
16308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_FPGA_EXT_INFO_PRESENT_OFST 48
16318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_FPGA_EXT_INFO_PRESENT_LBN 3
16328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_FPGA_EXT_INFO_PRESENT_WIDTH 1
16338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_BOARD_EXT_INFO_PRESENT_OFST 48
16348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_BOARD_EXT_INFO_PRESENT_LBN 4
16358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_VERSION_V2_OUT_BOARD_EXT_INFO_PRESENT_WIDTH 1
16368c2ecf20Sopenharmony_ci/* MC firmware unique build ID (as binary SHA-1 value) */
16378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_ID_OFST 52
16388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_ID_LEN 20
16398c2ecf20Sopenharmony_ci/* MC firmware security level */
16408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_MCFW_SECURITY_LEVEL_OFST 72
16418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_MCFW_SECURITY_LEVEL_LEN 4
16428c2ecf20Sopenharmony_ci/* MC firmware build name (as null-terminated US-ASCII string) */
16438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_NAME_OFST 76
16448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_MCFW_BUILD_NAME_LEN 64
16458c2ecf20Sopenharmony_ci/* The SUC firmware version as four numbers - a.b.c.d */
16468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_VERSION_OFST 140
16478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_VERSION_LEN 4
16488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_VERSION_NUM 4
16498c2ecf20Sopenharmony_ci/* SUC firmware build date (as 64-bit Unix timestamp) */
16508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_OFST 156
16518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_LEN 8
16528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_LO_OFST 156
16538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_BUILD_DATE_HI_OFST 160
16548c2ecf20Sopenharmony_ci/* The ID of the SUC chip. This is specific to the platform but typically
16558c2ecf20Sopenharmony_ci * indicates family, memory sizes etc. See SF-116728-SW for further details.
16568c2ecf20Sopenharmony_ci */
16578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_CHIP_ID_OFST 164
16588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_SUCFW_CHIP_ID_LEN 4
16598c2ecf20Sopenharmony_ci/* The CMC firmware version as four numbers - a.b.c.d */
16608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_VERSION_OFST 168
16618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_VERSION_LEN 4
16628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_VERSION_NUM 4
16638c2ecf20Sopenharmony_ci/* CMC firmware build date (as 64-bit Unix timestamp) */
16648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_OFST 184
16658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_LEN 8
16668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_LO_OFST 184
16678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_CMCFW_BUILD_DATE_HI_OFST 188
16688c2ecf20Sopenharmony_ci/* FPGA version as three numbers. On Riverhead based systems this field uses
16698c2ecf20Sopenharmony_ci * the same encoding as hardware version ID registers (MC_FPGA_BUILD_HWRD_REG):
16708c2ecf20Sopenharmony_ci * FPGA_VERSION[0]: x => Image H{x} FPGA_VERSION[1]: Revision letter (0 => A, 1
16718c2ecf20Sopenharmony_ci * => B, ...) FPGA_VERSION[2]: Sub-revision number
16728c2ecf20Sopenharmony_ci */
16738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FPGA_VERSION_OFST 192
16748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FPGA_VERSION_LEN 4
16758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FPGA_VERSION_NUM 3
16768c2ecf20Sopenharmony_ci/* Extra FPGA revision information (as null-terminated US-ASCII string) */
16778c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FPGA_EXTRA_OFST 204
16788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_FPGA_EXTRA_LEN 16
16798c2ecf20Sopenharmony_ci/* Board name / adapter model (as null-terminated US-ASCII string) */
16808c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_BOARD_NAME_OFST 220
16818c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_BOARD_NAME_LEN 16
16828c2ecf20Sopenharmony_ci/* Board revision number */
16838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_BOARD_REVISION_OFST 236
16848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_BOARD_REVISION_LEN 4
16858c2ecf20Sopenharmony_ci/* Board serial number (as null-terminated US-ASCII string) */
16868c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_BOARD_SERIAL_OFST 240
16878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VERSION_V2_OUT_BOARD_SERIAL_LEN 64
16888c2ecf20Sopenharmony_ci
16898c2ecf20Sopenharmony_ci
16908c2ecf20Sopenharmony_ci/***********************************/
16918c2ecf20Sopenharmony_ci/* MC_CMD_PTP
16928c2ecf20Sopenharmony_ci * Perform PTP operation
16938c2ecf20Sopenharmony_ci */
16948c2ecf20Sopenharmony_ci#define MC_CMD_PTP 0xb
16958c2ecf20Sopenharmony_ci#undef MC_CMD_0xb_PRIVILEGE_CTG
16968c2ecf20Sopenharmony_ci
16978c2ecf20Sopenharmony_ci#define MC_CMD_0xb_PRIVILEGE_CTG SRIOV_CTG_GENERAL
16988c2ecf20Sopenharmony_ci
16998c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN msgrequest */
17008c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_LEN 1
17018c2ecf20Sopenharmony_ci/* PTP operation code */
17028c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_OP_OFST 0
17038c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_OP_LEN 1
17048c2ecf20Sopenharmony_ci/* enum: Enable PTP packet timestamping operation. */
17058c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_ENABLE 0x1
17068c2ecf20Sopenharmony_ci/* enum: Disable PTP packet timestamping operation. */
17078c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_DISABLE 0x2
17088c2ecf20Sopenharmony_ci/* enum: Send a PTP packet. This operation is used on Siena and Huntington.
17098c2ecf20Sopenharmony_ci * From Medford onwards it is not supported: on those platforms PTP transmit
17108c2ecf20Sopenharmony_ci * timestamping is done using the fast path.
17118c2ecf20Sopenharmony_ci */
17128c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_TRANSMIT 0x3
17138c2ecf20Sopenharmony_ci/* enum: Read the current NIC time. */
17148c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_READ_NIC_TIME 0x4
17158c2ecf20Sopenharmony_ci/* enum: Get the current PTP status. Note that the clock frequency returned (in
17168c2ecf20Sopenharmony_ci * Hz) is rounded to the nearest MHz (e.g. 666000000 for 666666666).
17178c2ecf20Sopenharmony_ci */
17188c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_STATUS 0x5
17198c2ecf20Sopenharmony_ci/* enum: Adjust the PTP NIC's time. */
17208c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_ADJUST 0x6
17218c2ecf20Sopenharmony_ci/* enum: Synchronize host and NIC time. */
17228c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_SYNCHRONIZE 0x7
17238c2ecf20Sopenharmony_ci/* enum: Basic manufacturing tests. Siena PTP adapters only. */
17248c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_MANFTEST_BASIC 0x8
17258c2ecf20Sopenharmony_ci/* enum: Packet based manufacturing tests. Siena PTP adapters only. */
17268c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_MANFTEST_PACKET 0x9
17278c2ecf20Sopenharmony_ci/* enum: Reset some of the PTP related statistics */
17288c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_RESET_STATS 0xa
17298c2ecf20Sopenharmony_ci/* enum: Debug operations to MC. */
17308c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_DEBUG 0xb
17318c2ecf20Sopenharmony_ci/* enum: Read an FPGA register. Siena PTP adapters only. */
17328c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_FPGAREAD 0xc
17338c2ecf20Sopenharmony_ci/* enum: Write an FPGA register. Siena PTP adapters only. */
17348c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_FPGAWRITE 0xd
17358c2ecf20Sopenharmony_ci/* enum: Apply an offset to the NIC clock */
17368c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_CLOCK_OFFSET_ADJUST 0xe
17378c2ecf20Sopenharmony_ci/* enum: Change the frequency correction applied to the NIC clock */
17388c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_CLOCK_FREQ_ADJUST 0xf
17398c2ecf20Sopenharmony_ci/* enum: Set the MC packet filter VLAN tags for received PTP packets.
17408c2ecf20Sopenharmony_ci * Deprecated for Huntington onwards.
17418c2ecf20Sopenharmony_ci */
17428c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_RX_SET_VLAN_FILTER 0x10
17438c2ecf20Sopenharmony_ci/* enum: Set the MC packet filter UUID for received PTP packets. Deprecated for
17448c2ecf20Sopenharmony_ci * Huntington onwards.
17458c2ecf20Sopenharmony_ci */
17468c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_RX_SET_UUID_FILTER 0x11
17478c2ecf20Sopenharmony_ci/* enum: Set the MC packet filter Domain for received PTP packets. Deprecated
17488c2ecf20Sopenharmony_ci * for Huntington onwards.
17498c2ecf20Sopenharmony_ci */
17508c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_RX_SET_DOMAIN_FILTER 0x12
17518c2ecf20Sopenharmony_ci/* enum: Set the clock source. Required for snapper tests on Huntington and
17528c2ecf20Sopenharmony_ci * Medford. Not implemented for Siena or Medford2.
17538c2ecf20Sopenharmony_ci */
17548c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_SET_CLK_SRC 0x13
17558c2ecf20Sopenharmony_ci/* enum: Reset value of Timer Reg. Not implemented. */
17568c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_RST_CLK 0x14
17578c2ecf20Sopenharmony_ci/* enum: Enable the forwarding of PPS events to the host */
17588c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_PPS_ENABLE 0x15
17598c2ecf20Sopenharmony_ci/* enum: Get the time format used by this NIC for PTP operations */
17608c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_GET_TIME_FORMAT 0x16
17618c2ecf20Sopenharmony_ci/* enum: Get the clock attributes. NOTE- extended version of
17628c2ecf20Sopenharmony_ci * MC_CMD_PTP_OP_GET_TIME_FORMAT
17638c2ecf20Sopenharmony_ci */
17648c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_GET_ATTRIBUTES 0x16
17658c2ecf20Sopenharmony_ci/* enum: Get corrections that should be applied to the various different
17668c2ecf20Sopenharmony_ci * timestamps
17678c2ecf20Sopenharmony_ci */
17688c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_GET_TIMESTAMP_CORRECTIONS 0x17
17698c2ecf20Sopenharmony_ci/* enum: Subscribe to receive periodic time events indicating the current NIC
17708c2ecf20Sopenharmony_ci * time
17718c2ecf20Sopenharmony_ci */
17728c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_TIME_EVENT_SUBSCRIBE 0x18
17738c2ecf20Sopenharmony_ci/* enum: Unsubscribe to stop receiving time events */
17748c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_TIME_EVENT_UNSUBSCRIBE 0x19
17758c2ecf20Sopenharmony_ci/* enum: PPS based manfacturing tests. Requires PPS output to be looped to PPS
17768c2ecf20Sopenharmony_ci * input on the same NIC. Siena PTP adapters only.
17778c2ecf20Sopenharmony_ci */
17788c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_MANFTEST_PPS 0x1a
17798c2ecf20Sopenharmony_ci/* enum: Set the PTP sync status. Status is used by firmware to report to event
17808c2ecf20Sopenharmony_ci * subscribers.
17818c2ecf20Sopenharmony_ci */
17828c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_SET_SYNC_STATUS 0x1b
17838c2ecf20Sopenharmony_ci/* enum: Above this for future use. */
17848c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OP_MAX 0x1c
17858c2ecf20Sopenharmony_ci
17868c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_ENABLE msgrequest */
17878c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_ENABLE_LEN 16
17888c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CMD_OFST 0
17898c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CMD_LEN 4
17908c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_PERIPH_ID_OFST 4
17918c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_PERIPH_ID_LEN 4
17928c2ecf20Sopenharmony_ci/* Not used. Events are always sent to function relative queue 0. */
17938c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ENABLE_QUEUE_OFST 8
17948c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ENABLE_QUEUE_LEN 4
17958c2ecf20Sopenharmony_ci/* PTP timestamping mode. Not used from Huntington onwards. */
17968c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ENABLE_MODE_OFST 12
17978c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ENABLE_MODE_LEN 4
17988c2ecf20Sopenharmony_ci/* enum: PTP, version 1 */
17998c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MODE_V1 0x0
18008c2ecf20Sopenharmony_ci/* enum: PTP, version 1, with VLAN headers - deprecated */
18018c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MODE_V1_VLAN 0x1
18028c2ecf20Sopenharmony_ci/* enum: PTP, version 2 */
18038c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MODE_V2 0x2
18048c2ecf20Sopenharmony_ci/* enum: PTP, version 2, with VLAN headers - deprecated */
18058c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MODE_V2_VLAN 0x3
18068c2ecf20Sopenharmony_ci/* enum: PTP, version 2, with improved UUID filtering */
18078c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MODE_V2_ENHANCED 0x4
18088c2ecf20Sopenharmony_ci/* enum: FCoE (seconds and microseconds) */
18098c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MODE_FCOE 0x5
18108c2ecf20Sopenharmony_ci
18118c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_DISABLE msgrequest */
18128c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_DISABLE_LEN 8
18138c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18148c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18158c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18168c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18178c2ecf20Sopenharmony_ci
18188c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_TRANSMIT msgrequest */
18198c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TRANSMIT_LENMIN 13
18208c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TRANSMIT_LENMAX 252
18218c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TRANSMIT_LENMAX_MCDI2 1020
18228c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TRANSMIT_LEN(num) (12+1*(num))
18238c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TRANSMIT_PACKET_NUM(len) (((len)-12)/1)
18248c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18258c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18268c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18278c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18288c2ecf20Sopenharmony_ci/* Transmit packet length */
18298c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_LENGTH_OFST 8
18308c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_LENGTH_LEN 4
18318c2ecf20Sopenharmony_ci/* Transmit packet data */
18328c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_PACKET_OFST 12
18338c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_PACKET_LEN 1
18348c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_PACKET_MINNUM 1
18358c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM 240
18368c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TRANSMIT_PACKET_MAXNUM_MCDI2 1008
18378c2ecf20Sopenharmony_ci
18388c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_READ_NIC_TIME msgrequest */
18398c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_READ_NIC_TIME_LEN 8
18408c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18418c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18428c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18438c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18448c2ecf20Sopenharmony_ci
18458c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_READ_NIC_TIME_V2 msgrequest */
18468c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_READ_NIC_TIME_V2_LEN 8
18478c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18488c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18498c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18508c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18518c2ecf20Sopenharmony_ci
18528c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_STATUS msgrequest */
18538c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_STATUS_LEN 8
18548c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18558c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18568c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18578c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18588c2ecf20Sopenharmony_ci
18598c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_ADJUST msgrequest */
18608c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_ADJUST_LEN 24
18618c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18628c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18638c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18648c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18658c2ecf20Sopenharmony_ci/* Frequency adjustment 40 bit fixed point ns */
18668c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_FREQ_OFST 8
18678c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_FREQ_LEN 8
18688c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_FREQ_LO_OFST 8
18698c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_FREQ_HI_OFST 12
18708c2ecf20Sopenharmony_ci/* enum: Number of fractional bits in frequency adjustment */
18718c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_IN_ADJUST_BITS 0x28
18728c2ecf20Sopenharmony_ci/* enum: Number of fractional bits in frequency adjustment when FP44_FREQ_ADJ
18738c2ecf20Sopenharmony_ci * is indicated in the MC_CMD_PTP_OUT_GET_ATTRIBUTES command CAPABILITIES
18748c2ecf20Sopenharmony_ci * field.
18758c2ecf20Sopenharmony_ci */
18768c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_IN_ADJUST_BITS_FP44 0x2c
18778c2ecf20Sopenharmony_ci/* Time adjustment in seconds */
18788c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_SECONDS_OFST 16
18798c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_SECONDS_LEN 4
18808c2ecf20Sopenharmony_ci/* Time adjustment major value */
18818c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_MAJOR_OFST 16
18828c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_MAJOR_LEN 4
18838c2ecf20Sopenharmony_ci/* Time adjustment in nanoseconds */
18848c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_NANOSECONDS_OFST 20
18858c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_NANOSECONDS_LEN 4
18868c2ecf20Sopenharmony_ci/* Time adjustment minor value */
18878c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_MINOR_OFST 20
18888c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_MINOR_LEN 4
18898c2ecf20Sopenharmony_ci
18908c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_ADJUST_V2 msgrequest */
18918c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_ADJUST_V2_LEN 28
18928c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
18938c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
18948c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
18958c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
18968c2ecf20Sopenharmony_ci/* Frequency adjustment 40 bit fixed point ns */
18978c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_FREQ_OFST 8
18988c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_FREQ_LEN 8
18998c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_FREQ_LO_OFST 8
19008c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_FREQ_HI_OFST 12
19018c2ecf20Sopenharmony_ci/* enum: Number of fractional bits in frequency adjustment */
19028c2ecf20Sopenharmony_ci/*               MC_CMD_PTP_IN_ADJUST_BITS 0x28 */
19038c2ecf20Sopenharmony_ci/* enum: Number of fractional bits in frequency adjustment when FP44_FREQ_ADJ
19048c2ecf20Sopenharmony_ci * is indicated in the MC_CMD_PTP_OUT_GET_ATTRIBUTES command CAPABILITIES
19058c2ecf20Sopenharmony_ci * field.
19068c2ecf20Sopenharmony_ci */
19078c2ecf20Sopenharmony_ci/*               MC_CMD_PTP_IN_ADJUST_BITS_FP44 0x2c */
19088c2ecf20Sopenharmony_ci/* Time adjustment in seconds */
19098c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_SECONDS_OFST 16
19108c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_SECONDS_LEN 4
19118c2ecf20Sopenharmony_ci/* Time adjustment major value */
19128c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_MAJOR_OFST 16
19138c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_MAJOR_LEN 4
19148c2ecf20Sopenharmony_ci/* Time adjustment in nanoseconds */
19158c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_NANOSECONDS_OFST 20
19168c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_NANOSECONDS_LEN 4
19178c2ecf20Sopenharmony_ci/* Time adjustment minor value */
19188c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_MINOR_OFST 20
19198c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_MINOR_LEN 4
19208c2ecf20Sopenharmony_ci/* Upper 32bits of major time offset adjustment */
19218c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_MAJOR_HI_OFST 24
19228c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_ADJUST_V2_MAJOR_HI_LEN 4
19238c2ecf20Sopenharmony_ci
19248c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_SYNCHRONIZE msgrequest */
19258c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_SYNCHRONIZE_LEN 20
19268c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19278c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19288c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19298c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19308c2ecf20Sopenharmony_ci/* Number of time readings to capture */
19318c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_OFST 8
19328c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SYNCHRONIZE_NUMTIMESETS_LEN 4
19338c2ecf20Sopenharmony_ci/* Host address in which to write "synchronization started" indication (64
19348c2ecf20Sopenharmony_ci * bits)
19358c2ecf20Sopenharmony_ci */
19368c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_OFST 12
19378c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LEN 8
19388c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_LO_OFST 12
19398c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SYNCHRONIZE_START_ADDR_HI_OFST 16
19408c2ecf20Sopenharmony_ci
19418c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_MANFTEST_BASIC msgrequest */
19428c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_MANFTEST_BASIC_LEN 8
19438c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19448c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19458c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19468c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19478c2ecf20Sopenharmony_ci
19488c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_MANFTEST_PACKET msgrequest */
19498c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_MANFTEST_PACKET_LEN 12
19508c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19518c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19528c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19538c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19548c2ecf20Sopenharmony_ci/* Enable or disable packet testing */
19558c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_OFST 8
19568c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_MANFTEST_PACKET_TEST_ENABLE_LEN 4
19578c2ecf20Sopenharmony_ci
19588c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_RESET_STATS msgrequest: Reset PTP statistics */
19598c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_RESET_STATS_LEN 8
19608c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19618c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19628c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19638c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19648c2ecf20Sopenharmony_ci
19658c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_DEBUG msgrequest */
19668c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_DEBUG_LEN 12
19678c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19688c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19698c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19708c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19718c2ecf20Sopenharmony_ci/* Debug operations */
19728c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_OFST 8
19738c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_DEBUG_DEBUG_PARAM_LEN 4
19748c2ecf20Sopenharmony_ci
19758c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_FPGAREAD msgrequest */
19768c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_FPGAREAD_LEN 16
19778c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19788c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19798c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19808c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19818c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAREAD_ADDR_OFST 8
19828c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAREAD_ADDR_LEN 4
19838c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_OFST 12
19848c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAREAD_NUMBYTES_LEN 4
19858c2ecf20Sopenharmony_ci
19868c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_FPGAWRITE msgrequest */
19878c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_FPGAWRITE_LENMIN 13
19888c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_FPGAWRITE_LENMAX 252
19898c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_FPGAWRITE_LENMAX_MCDI2 1020
19908c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_FPGAWRITE_LEN(num) (12+1*(num))
19918c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_FPGAWRITE_BUFFER_NUM(len) (((len)-12)/1)
19928c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
19938c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
19948c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
19958c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
19968c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_ADDR_OFST 8
19978c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_ADDR_LEN 4
19988c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_BUFFER_OFST 12
19998c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_BUFFER_LEN 1
20008c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MINNUM 1
20018c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MAXNUM 240
20028c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_FPGAWRITE_BUFFER_MAXNUM_MCDI2 1008
20038c2ecf20Sopenharmony_ci
20048c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST msgrequest */
20058c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_LEN 16
20068c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
20078c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
20088c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
20098c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
20108c2ecf20Sopenharmony_ci/* Time adjustment in seconds */
20118c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_OFST 8
20128c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_SECONDS_LEN 4
20138c2ecf20Sopenharmony_ci/* Time adjustment major value */
20148c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_OFST 8
20158c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MAJOR_LEN 4
20168c2ecf20Sopenharmony_ci/* Time adjustment in nanoseconds */
20178c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_OFST 12
20188c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_NANOSECONDS_LEN 4
20198c2ecf20Sopenharmony_ci/* Time adjustment minor value */
20208c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_OFST 12
20218c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_MINOR_LEN 4
20228c2ecf20Sopenharmony_ci
20238c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2 msgrequest */
20248c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_LEN 20
20258c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
20268c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
20278c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
20288c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
20298c2ecf20Sopenharmony_ci/* Time adjustment in seconds */
20308c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_SECONDS_OFST 8
20318c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_SECONDS_LEN 4
20328c2ecf20Sopenharmony_ci/* Time adjustment major value */
20338c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_OFST 8
20348c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_LEN 4
20358c2ecf20Sopenharmony_ci/* Time adjustment in nanoseconds */
20368c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_NANOSECONDS_OFST 12
20378c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_NANOSECONDS_LEN 4
20388c2ecf20Sopenharmony_ci/* Time adjustment minor value */
20398c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MINOR_OFST 12
20408c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MINOR_LEN 4
20418c2ecf20Sopenharmony_ci/* Upper 32bits of major time offset adjustment */
20428c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_HI_OFST 16
20438c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_OFFSET_ADJUST_V2_MAJOR_HI_LEN 4
20448c2ecf20Sopenharmony_ci
20458c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST msgrequest */
20468c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_LEN 16
20478c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
20488c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
20498c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
20508c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
20518c2ecf20Sopenharmony_ci/* Frequency adjustment 40 bit fixed point ns */
20528c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_OFST 8
20538c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LEN 8
20548c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_LO_OFST 8
20558c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_CLOCK_FREQ_ADJUST_FREQ_HI_OFST 12
20568c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
20578c2ecf20Sopenharmony_ci/*               MC_CMD_PTP/MC_CMD_PTP_IN_ADJUST/FREQ */
20588c2ecf20Sopenharmony_ci
20598c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_RX_SET_VLAN_FILTER msgrequest */
20608c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_LEN 24
20618c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
20628c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
20638c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
20648c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
20658c2ecf20Sopenharmony_ci/* Number of VLAN tags, 0 if not VLAN */
20668c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_OFST 8
20678c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_NUM_VLAN_TAGS_LEN 4
20688c2ecf20Sopenharmony_ci/* Set of VLAN tags to filter against */
20698c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_OFST 12
20708c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_LEN 4
20718c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_VLAN_FILTER_VLAN_TAG_NUM 3
20728c2ecf20Sopenharmony_ci
20738c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_RX_SET_UUID_FILTER msgrequest */
20748c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_RX_SET_UUID_FILTER_LEN 20
20758c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
20768c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
20778c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
20788c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
20798c2ecf20Sopenharmony_ci/* 1 to enable UUID filtering, 0 to disable */
20808c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_OFST 8
20818c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_UUID_FILTER_ENABLE_LEN 4
20828c2ecf20Sopenharmony_ci/* UUID to filter against */
20838c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_OFST 12
20848c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LEN 8
20858c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_LO_OFST 12
20868c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_UUID_FILTER_UUID_HI_OFST 16
20878c2ecf20Sopenharmony_ci
20888c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER msgrequest */
20898c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_LEN 16
20908c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
20918c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
20928c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
20938c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
20948c2ecf20Sopenharmony_ci/* 1 to enable Domain filtering, 0 to disable */
20958c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_OFST 8
20968c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_ENABLE_LEN 4
20978c2ecf20Sopenharmony_ci/* Domain number to filter against */
20988c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_OFST 12
20998c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_RX_SET_DOMAIN_FILTER_DOMAIN_LEN 4
21008c2ecf20Sopenharmony_ci
21018c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_SET_CLK_SRC msgrequest */
21028c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_SET_CLK_SRC_LEN 12
21038c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21048c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21058c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21068c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21078c2ecf20Sopenharmony_ci/* Set the clock source. */
21088c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_CLK_SRC_CLK_OFST 8
21098c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_CLK_SRC_CLK_LEN 4
21108c2ecf20Sopenharmony_ci/* enum: Internal. */
21118c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_CLK_SRC_INTERNAL 0x0
21128c2ecf20Sopenharmony_ci/* enum: External. */
21138c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_CLK_SRC_EXTERNAL 0x1
21148c2ecf20Sopenharmony_ci
21158c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_RST_CLK msgrequest: Reset value of Timer Reg. */
21168c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_RST_CLK_LEN 8
21178c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21188c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21198c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21208c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21218c2ecf20Sopenharmony_ci
21228c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_PPS_ENABLE msgrequest */
21238c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_PPS_ENABLE_LEN 12
21248c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21258c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21268c2ecf20Sopenharmony_ci/* Enable or disable */
21278c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_PPS_ENABLE_OP_OFST 4
21288c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_PPS_ENABLE_OP_LEN 4
21298c2ecf20Sopenharmony_ci/* enum: Enable */
21308c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_ENABLE_PPS 0x0
21318c2ecf20Sopenharmony_ci/* enum: Disable */
21328c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_DISABLE_PPS 0x1
21338c2ecf20Sopenharmony_ci/* Not used. Events are always sent to function relative queue 0. */
21348c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_OFST 8
21358c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_PPS_ENABLE_QUEUE_ID_LEN 4
21368c2ecf20Sopenharmony_ci
21378c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_GET_TIME_FORMAT msgrequest */
21388c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_GET_TIME_FORMAT_LEN 8
21398c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21408c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21418c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21428c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21438c2ecf20Sopenharmony_ci
21448c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_GET_ATTRIBUTES msgrequest */
21458c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_GET_ATTRIBUTES_LEN 8
21468c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21478c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21488c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21498c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21508c2ecf20Sopenharmony_ci
21518c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS msgrequest */
21528c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_GET_TIMESTAMP_CORRECTIONS_LEN 8
21538c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21548c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21558c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21568c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21578c2ecf20Sopenharmony_ci
21588c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE msgrequest */
21598c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_LEN 12
21608c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21618c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21628c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21638c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21648c2ecf20Sopenharmony_ci/* Original field containing queue ID. Now extended to include flags. */
21658c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_OFST 8
21668c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_LEN 4
21678c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_OFST 8
21688c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_LBN 0
21698c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE_ID_WIDTH 16
21708c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_OFST 8
21718c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_LBN 31
21728c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_REPORT_SYNC_STATUS_WIDTH 1
21738c2ecf20Sopenharmony_ci
21748c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE msgrequest */
21758c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN 16
21768c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21778c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21788c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21798c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21808c2ecf20Sopenharmony_ci/* Unsubscribe options */
21818c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_OFST 8
21828c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL_LEN 4
21838c2ecf20Sopenharmony_ci/* enum: Unsubscribe a single queue */
21848c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_SINGLE 0x0
21858c2ecf20Sopenharmony_ci/* enum: Unsubscribe all queues */
21868c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_ALL 0x1
21878c2ecf20Sopenharmony_ci/* Event queue ID */
21888c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_OFST 12
21898c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE_LEN 4
21908c2ecf20Sopenharmony_ci
21918c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_MANFTEST_PPS msgrequest */
21928c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_MANFTEST_PPS_LEN 12
21938c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
21948c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
21958c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
21968c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
21978c2ecf20Sopenharmony_ci/* 1 to enable PPS test mode, 0 to disable and return result. */
21988c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_OFST 8
21998c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_MANFTEST_PPS_TEST_ENABLE_LEN 4
22008c2ecf20Sopenharmony_ci
22018c2ecf20Sopenharmony_ci/* MC_CMD_PTP_IN_SET_SYNC_STATUS msgrequest */
22028c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_IN_SET_SYNC_STATUS_LEN 24
22038c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_OFST 0 */
22048c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_CMD_LEN 4 */
22058c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_OFST 4 */
22068c2ecf20Sopenharmony_ci/*            MC_CMD_PTP_IN_PERIPH_ID_LEN 4 */
22078c2ecf20Sopenharmony_ci/* NIC - Host System Clock Synchronization status */
22088c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_STATUS_OFST 8
22098c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_STATUS_LEN 4
22108c2ecf20Sopenharmony_ci/* enum: Host System clock and NIC clock are not in sync */
22118c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_IN_SET_SYNC_STATUS_NOT_IN_SYNC 0x0
22128c2ecf20Sopenharmony_ci/* enum: Host System clock and NIC clock are synchronized */
22138c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_IN_SET_SYNC_STATUS_IN_SYNC 0x1
22148c2ecf20Sopenharmony_ci/* If synchronized, number of seconds until clocks should be considered to be
22158c2ecf20Sopenharmony_ci * no longer in sync.
22168c2ecf20Sopenharmony_ci */
22178c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_TIMEOUT_OFST 12
22188c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_TIMEOUT_LEN 4
22198c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED0_OFST 16
22208c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED0_LEN 4
22218c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED1_OFST 20
22228c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_IN_SET_SYNC_STATUS_RESERVED1_LEN 4
22238c2ecf20Sopenharmony_ci
22248c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT msgresponse */
22258c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_LEN 0
22268c2ecf20Sopenharmony_ci
22278c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_TRANSMIT msgresponse */
22288c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_TRANSMIT_LEN 8
22298c2ecf20Sopenharmony_ci/* Value of seconds timestamp */
22308c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_SECONDS_OFST 0
22318c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_SECONDS_LEN 4
22328c2ecf20Sopenharmony_ci/* Timestamp major value */
22338c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_MAJOR_OFST 0
22348c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_MAJOR_LEN 4
22358c2ecf20Sopenharmony_ci/* Value of nanoseconds timestamp */
22368c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_OFST 4
22378c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_NANOSECONDS_LEN 4
22388c2ecf20Sopenharmony_ci/* Timestamp minor value */
22398c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_MINOR_OFST 4
22408c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_TRANSMIT_MINOR_LEN 4
22418c2ecf20Sopenharmony_ci
22428c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE msgresponse */
22438c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_TIME_EVENT_SUBSCRIBE_LEN 0
22448c2ecf20Sopenharmony_ci
22458c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE msgresponse */
22468c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_TIME_EVENT_UNSUBSCRIBE_LEN 0
22478c2ecf20Sopenharmony_ci
22488c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_READ_NIC_TIME msgresponse */
22498c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_READ_NIC_TIME_LEN 8
22508c2ecf20Sopenharmony_ci/* Value of seconds timestamp */
22518c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_OFST 0
22528c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_SECONDS_LEN 4
22538c2ecf20Sopenharmony_ci/* Timestamp major value */
22548c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_OFST 0
22558c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_MAJOR_LEN 4
22568c2ecf20Sopenharmony_ci/* Value of nanoseconds timestamp */
22578c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_OFST 4
22588c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_NANOSECONDS_LEN 4
22598c2ecf20Sopenharmony_ci/* Timestamp minor value */
22608c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_OFST 4
22618c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_MINOR_LEN 4
22628c2ecf20Sopenharmony_ci
22638c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_READ_NIC_TIME_V2 msgresponse */
22648c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_READ_NIC_TIME_V2_LEN 12
22658c2ecf20Sopenharmony_ci/* Value of seconds timestamp */
22668c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_SECONDS_OFST 0
22678c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_SECONDS_LEN 4
22688c2ecf20Sopenharmony_ci/* Timestamp major value */
22698c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_OFST 0
22708c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_LEN 4
22718c2ecf20Sopenharmony_ci/* Value of nanoseconds timestamp */
22728c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_NANOSECONDS_OFST 4
22738c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_NANOSECONDS_LEN 4
22748c2ecf20Sopenharmony_ci/* Timestamp minor value */
22758c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MINOR_OFST 4
22768c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MINOR_LEN 4
22778c2ecf20Sopenharmony_ci/* Upper 32bits of major timestamp value */
22788c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_HI_OFST 8
22798c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_READ_NIC_TIME_V2_MAJOR_HI_LEN 4
22808c2ecf20Sopenharmony_ci
22818c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_STATUS msgresponse */
22828c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_STATUS_LEN 64
22838c2ecf20Sopenharmony_ci/* Frequency of NIC's hardware clock */
22848c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_OFST 0
22858c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_CLOCK_FREQ_LEN 4
22868c2ecf20Sopenharmony_ci/* Number of packets transmitted and timestamped */
22878c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_TX_OFST 4
22888c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_TX_LEN 4
22898c2ecf20Sopenharmony_ci/* Number of packets received and timestamped */
22908c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_RX_OFST 8
22918c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_RX_LEN 4
22928c2ecf20Sopenharmony_ci/* Number of packets timestamped by the FPGA */
22938c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_TS_OFST 12
22948c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_TS_LEN 4
22958c2ecf20Sopenharmony_ci/* Number of packets filter matched */
22968c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_FM_OFST 16
22978c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_FM_LEN 4
22988c2ecf20Sopenharmony_ci/* Number of packets not filter matched */
22998c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_NFM_OFST 20
23008c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_NFM_LEN 4
23018c2ecf20Sopenharmony_ci/* Number of PPS overflows (noise on input?) */
23028c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_OFST 24
23038c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFLOW_LEN 4
23048c2ecf20Sopenharmony_ci/* Number of PPS bad periods */
23058c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_OFST 28
23068c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_BAD_LEN 4
23078c2ecf20Sopenharmony_ci/* Minimum period of PPS pulse in nanoseconds */
23088c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_OFST 32
23098c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MIN_LEN 4
23108c2ecf20Sopenharmony_ci/* Maximum period of PPS pulse in nanoseconds */
23118c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_OFST 36
23128c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MAX_LEN 4
23138c2ecf20Sopenharmony_ci/* Last period of PPS pulse in nanoseconds */
23148c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_OFST 40
23158c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_LAST_LEN 4
23168c2ecf20Sopenharmony_ci/* Mean period of PPS pulse in nanoseconds */
23178c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_OFST 44
23188c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_PER_MEAN_LEN 4
23198c2ecf20Sopenharmony_ci/* Minimum offset of PPS pulse in nanoseconds (signed) */
23208c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_OFST 48
23218c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MIN_LEN 4
23228c2ecf20Sopenharmony_ci/* Maximum offset of PPS pulse in nanoseconds (signed) */
23238c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_OFST 52
23248c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MAX_LEN 4
23258c2ecf20Sopenharmony_ci/* Last offset of PPS pulse in nanoseconds (signed) */
23268c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_OFST 56
23278c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_LAST_LEN 4
23288c2ecf20Sopenharmony_ci/* Mean offset of PPS pulse in nanoseconds (signed) */
23298c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_OFST 60
23308c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_STATUS_STATS_PPS_OFF_MEAN_LEN 4
23318c2ecf20Sopenharmony_ci
23328c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_SYNCHRONIZE msgresponse */
23338c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_SYNCHRONIZE_LENMIN 20
23348c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_SYNCHRONIZE_LENMAX 240
23358c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_SYNCHRONIZE_LENMAX_MCDI2 1020
23368c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_SYNCHRONIZE_LEN(num) (0+20*(num))
23378c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_NUM(len) (((len)-0)/20)
23388c2ecf20Sopenharmony_ci/* A set of host and NIC times */
23398c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_OFST 0
23408c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_LEN 20
23418c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MINNUM 1
23428c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM 12
23438c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_TIMESET_MAXNUM_MCDI2 51
23448c2ecf20Sopenharmony_ci/* Host time immediately before NIC's hardware clock read */
23458c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_OFST 0
23468c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTSTART_LEN 4
23478c2ecf20Sopenharmony_ci/* Value of seconds timestamp */
23488c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_OFST 4
23498c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_SECONDS_LEN 4
23508c2ecf20Sopenharmony_ci/* Timestamp major value */
23518c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_OFST 4
23528c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_MAJOR_LEN 4
23538c2ecf20Sopenharmony_ci/* Value of nanoseconds timestamp */
23548c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_OFST 8
23558c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_NANOSECONDS_LEN 4
23568c2ecf20Sopenharmony_ci/* Timestamp minor value */
23578c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_OFST 8
23588c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_MINOR_LEN 4
23598c2ecf20Sopenharmony_ci/* Host time immediately after NIC's hardware clock read */
23608c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_OFST 12
23618c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_HOSTEND_LEN 4
23628c2ecf20Sopenharmony_ci/* Number of nanoseconds waited after reading NIC's hardware clock */
23638c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_OFST 16
23648c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_SYNCHRONIZE_WAITNS_LEN 4
23658c2ecf20Sopenharmony_ci
23668c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_MANFTEST_BASIC msgresponse */
23678c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_MANFTEST_BASIC_LEN 8
23688c2ecf20Sopenharmony_ci/* Results of testing */
23698c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_OFST 0
23708c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_RESULT_LEN 4
23718c2ecf20Sopenharmony_ci/* enum: Successful test */
23728c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_SUCCESS 0x0
23738c2ecf20Sopenharmony_ci/* enum: FPGA load failed */
23748c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_FPGA_LOAD 0x1
23758c2ecf20Sopenharmony_ci/* enum: FPGA version invalid */
23768c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_FPGA_VERSION 0x2
23778c2ecf20Sopenharmony_ci/* enum: FPGA registers incorrect */
23788c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_FPGA_REGISTERS 0x3
23798c2ecf20Sopenharmony_ci/* enum: Oscillator possibly not working? */
23808c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_OSCILLATOR 0x4
23818c2ecf20Sopenharmony_ci/* enum: Timestamps not increasing */
23828c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_TIMESTAMPS 0x5
23838c2ecf20Sopenharmony_ci/* enum: Mismatched packet count */
23848c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_PACKET_COUNT 0x6
23858c2ecf20Sopenharmony_ci/* enum: Mismatched packet count (Siena filter and FPGA) */
23868c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_FILTER_COUNT 0x7
23878c2ecf20Sopenharmony_ci/* enum: Not enough packets to perform timestamp check */
23888c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_PACKET_ENOUGH 0x8
23898c2ecf20Sopenharmony_ci/* enum: Timestamp trigger GPIO not working */
23908c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_GPIO_TRIGGER 0x9
23918c2ecf20Sopenharmony_ci/* enum: Insufficient PPS events to perform checks */
23928c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_PPS_ENOUGH 0xa
23938c2ecf20Sopenharmony_ci/* enum: PPS time event period not sufficiently close to 1s. */
23948c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_PPS_PERIOD 0xb
23958c2ecf20Sopenharmony_ci/* enum: PPS time event nS reading not sufficiently close to zero. */
23968c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_PPS_NS 0xc
23978c2ecf20Sopenharmony_ci/* enum: PTP peripheral registers incorrect */
23988c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_REGISTERS 0xd
23998c2ecf20Sopenharmony_ci/* enum: Failed to read time from PTP peripheral */
24008c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_MANF_CLOCK_READ 0xe
24018c2ecf20Sopenharmony_ci/* Presence of external oscillator */
24028c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_OFST 4
24038c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_BASIC_TEST_EXTOSC_LEN 4
24048c2ecf20Sopenharmony_ci
24058c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_MANFTEST_PACKET msgresponse */
24068c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_MANFTEST_PACKET_LEN 12
24078c2ecf20Sopenharmony_ci/* Results of testing */
24088c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_OFST 0
24098c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_RESULT_LEN 4
24108c2ecf20Sopenharmony_ci/* Number of packets received by FPGA */
24118c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_OFST 4
24128c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FPGACOUNT_LEN 4
24138c2ecf20Sopenharmony_ci/* Number of packets received by Siena filters */
24148c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_OFST 8
24158c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PACKET_TEST_FILTERCOUNT_LEN 4
24168c2ecf20Sopenharmony_ci
24178c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_FPGAREAD msgresponse */
24188c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_FPGAREAD_LENMIN 1
24198c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_FPGAREAD_LENMAX 252
24208c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_FPGAREAD_LENMAX_MCDI2 1020
24218c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_FPGAREAD_LEN(num) (0+1*(num))
24228c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_FPGAREAD_BUFFER_NUM(len) (((len)-0)/1)
24238c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_FPGAREAD_BUFFER_OFST 0
24248c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_FPGAREAD_BUFFER_LEN 1
24258c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MINNUM 1
24268c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MAXNUM 252
24278c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_FPGAREAD_BUFFER_MAXNUM_MCDI2 1020
24288c2ecf20Sopenharmony_ci
24298c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_GET_TIME_FORMAT msgresponse */
24308c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_GET_TIME_FORMAT_LEN 4
24318c2ecf20Sopenharmony_ci/* Time format required/used by for this NIC. Applies to all PTP MCDI
24328c2ecf20Sopenharmony_ci * operations that pass times between the host and firmware. If this operation
24338c2ecf20Sopenharmony_ci * is not supported (older firmware) a format of seconds and nanoseconds should
24348c2ecf20Sopenharmony_ci * be assumed. Note this enum is deprecated. Do not add to it- use the
24358c2ecf20Sopenharmony_ci * TIME_FORMAT field in MC_CMD_PTP_OUT_GET_ATTRIBUTES instead.
24368c2ecf20Sopenharmony_ci */
24378c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_OFST 0
24388c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIME_FORMAT_FORMAT_LEN 4
24398c2ecf20Sopenharmony_ci/* enum: Times are in seconds and nanoseconds */
24408c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_NANOSECONDS 0x0
24418c2ecf20Sopenharmony_ci/* enum: Major register has units of 16 second per tick, minor 8 ns per tick */
24428c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_TIME_FORMAT_16SECONDS_8NANOSECONDS 0x1
24438c2ecf20Sopenharmony_ci/* enum: Major register has units of seconds, minor 2^-27s per tick */
24448c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_TIME_FORMAT_SECONDS_27FRACTION 0x2
24458c2ecf20Sopenharmony_ci
24468c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_GET_ATTRIBUTES msgresponse */
24478c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_GET_ATTRIBUTES_LEN 24
24488c2ecf20Sopenharmony_ci/* Time format required/used by for this NIC. Applies to all PTP MCDI
24498c2ecf20Sopenharmony_ci * operations that pass times between the host and firmware. If this operation
24508c2ecf20Sopenharmony_ci * is not supported (older firmware) a format of seconds and nanoseconds should
24518c2ecf20Sopenharmony_ci * be assumed.
24528c2ecf20Sopenharmony_ci */
24538c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_OFST 0
24548c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_TIME_FORMAT_LEN 4
24558c2ecf20Sopenharmony_ci/* enum: Times are in seconds and nanoseconds */
24568c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_NANOSECONDS 0x0
24578c2ecf20Sopenharmony_ci/* enum: Major register has units of 16 second per tick, minor 8 ns per tick */
24588c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_ATTRIBUTES_16SECONDS_8NANOSECONDS 0x1
24598c2ecf20Sopenharmony_ci/* enum: Major register has units of seconds, minor 2^-27s per tick */
24608c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_27FRACTION 0x2
24618c2ecf20Sopenharmony_ci/* enum: Major register units are seconds, minor units are quarter nanoseconds
24628c2ecf20Sopenharmony_ci */
24638c2ecf20Sopenharmony_ci#define          MC_CMD_PTP_OUT_GET_ATTRIBUTES_SECONDS_QTR_NANOSECONDS 0x3
24648c2ecf20Sopenharmony_ci/* Minimum acceptable value for a corrected synchronization timeset. When
24658c2ecf20Sopenharmony_ci * comparing host and NIC clock times, the MC returns a set of samples that
24668c2ecf20Sopenharmony_ci * contain the host start and end time, the MC time when the host start was
24678c2ecf20Sopenharmony_ci * detected and the time the MC waited between reading the time and detecting
24688c2ecf20Sopenharmony_ci * the host end. The corrected sync window is the difference between the host
24698c2ecf20Sopenharmony_ci * end and start times minus the time that the MC waited for host end.
24708c2ecf20Sopenharmony_ci */
24718c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_OFST 4
24728c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_SYNC_WINDOW_MIN_LEN 4
24738c2ecf20Sopenharmony_ci/* Various PTP capabilities */
24748c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_CAPABILITIES_OFST 8
24758c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_CAPABILITIES_LEN 4
24768c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_OFST 8
24778c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_LBN 0
24788c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_REPORT_SYNC_STATUS_WIDTH 1
24798c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_OFST 8
24808c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_LBN 1
24818c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_RX_TSTAMP_OOB_WIDTH 1
24828c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_OFST 8
24838c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_LBN 2
24848c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_64BIT_SECONDS_WIDTH 1
24858c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_OFST 8
24868c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_LBN 3
24878c2ecf20Sopenharmony_ci#define        MC_CMD_PTP_OUT_GET_ATTRIBUTES_FP44_FREQ_ADJ_WIDTH 1
24888c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED0_OFST 12
24898c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED0_LEN 4
24908c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED1_OFST 16
24918c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED1_LEN 4
24928c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED2_OFST 20
24938c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_ATTRIBUTES_RESERVED2_LEN 4
24948c2ecf20Sopenharmony_ci
24958c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS msgresponse */
24968c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_LEN 16
24978c2ecf20Sopenharmony_ci/* Uncorrected error on PTP transmit timestamps in NIC clock format */
24988c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_OFST 0
24998c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_TRANSMIT_LEN 4
25008c2ecf20Sopenharmony_ci/* Uncorrected error on PTP receive timestamps in NIC clock format */
25018c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_OFST 4
25028c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_RECEIVE_LEN 4
25038c2ecf20Sopenharmony_ci/* Uncorrected error on PPS output in NIC clock format */
25048c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_OFST 8
25058c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_OUT_LEN 4
25068c2ecf20Sopenharmony_ci/* Uncorrected error on PPS input in NIC clock format */
25078c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_OFST 12
25088c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_PPS_IN_LEN 4
25098c2ecf20Sopenharmony_ci
25108c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2 msgresponse */
25118c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_LEN 24
25128c2ecf20Sopenharmony_ci/* Uncorrected error on PTP transmit timestamps in NIC clock format */
25138c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_TX_OFST 0
25148c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_TX_LEN 4
25158c2ecf20Sopenharmony_ci/* Uncorrected error on PTP receive timestamps in NIC clock format */
25168c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_RX_OFST 4
25178c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PTP_RX_LEN 4
25188c2ecf20Sopenharmony_ci/* Uncorrected error on PPS output in NIC clock format */
25198c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_OUT_OFST 8
25208c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_OUT_LEN 4
25218c2ecf20Sopenharmony_ci/* Uncorrected error on PPS input in NIC clock format */
25228c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_IN_OFST 12
25238c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_PPS_IN_LEN 4
25248c2ecf20Sopenharmony_ci/* Uncorrected error on non-PTP transmit timestamps in NIC clock format */
25258c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_TX_OFST 16
25268c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_TX_LEN 4
25278c2ecf20Sopenharmony_ci/* Uncorrected error on non-PTP receive timestamps in NIC clock format */
25288c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_RX_OFST 20
25298c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_GET_TIMESTAMP_CORRECTIONS_V2_GENERAL_RX_LEN 4
25308c2ecf20Sopenharmony_ci
25318c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_MANFTEST_PPS msgresponse */
25328c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_MANFTEST_PPS_LEN 4
25338c2ecf20Sopenharmony_ci/* Results of testing */
25348c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_OFST 0
25358c2ecf20Sopenharmony_ci#define       MC_CMD_PTP_OUT_MANFTEST_PPS_TEST_RESULT_LEN 4
25368c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
25378c2ecf20Sopenharmony_ci/*               MC_CMD_PTP_OUT_MANFTEST_BASIC/TEST_RESULT */
25388c2ecf20Sopenharmony_ci
25398c2ecf20Sopenharmony_ci/* MC_CMD_PTP_OUT_SET_SYNC_STATUS msgresponse */
25408c2ecf20Sopenharmony_ci#define    MC_CMD_PTP_OUT_SET_SYNC_STATUS_LEN 0
25418c2ecf20Sopenharmony_ci
25428c2ecf20Sopenharmony_ci
25438c2ecf20Sopenharmony_ci/***********************************/
25448c2ecf20Sopenharmony_ci/* MC_CMD_CSR_READ32
25458c2ecf20Sopenharmony_ci * Read 32bit words from the indirect memory map.
25468c2ecf20Sopenharmony_ci */
25478c2ecf20Sopenharmony_ci#define MC_CMD_CSR_READ32 0xc
25488c2ecf20Sopenharmony_ci#undef MC_CMD_0xc_PRIVILEGE_CTG
25498c2ecf20Sopenharmony_ci
25508c2ecf20Sopenharmony_ci#define MC_CMD_0xc_PRIVILEGE_CTG SRIOV_CTG_INSECURE
25518c2ecf20Sopenharmony_ci
25528c2ecf20Sopenharmony_ci/* MC_CMD_CSR_READ32_IN msgrequest */
25538c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_READ32_IN_LEN 12
25548c2ecf20Sopenharmony_ci/* Address */
25558c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_IN_ADDR_OFST 0
25568c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_IN_ADDR_LEN 4
25578c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_IN_STEP_OFST 4
25588c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_IN_STEP_LEN 4
25598c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_IN_NUMWORDS_OFST 8
25608c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_IN_NUMWORDS_LEN 4
25618c2ecf20Sopenharmony_ci
25628c2ecf20Sopenharmony_ci/* MC_CMD_CSR_READ32_OUT msgresponse */
25638c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_READ32_OUT_LENMIN 4
25648c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_READ32_OUT_LENMAX 252
25658c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_READ32_OUT_LENMAX_MCDI2 1020
25668c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_READ32_OUT_LEN(num) (0+4*(num))
25678c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_READ32_OUT_BUFFER_NUM(len) (((len)-0)/4)
25688c2ecf20Sopenharmony_ci/* The last dword is the status, not a value read */
25698c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_OUT_BUFFER_OFST 0
25708c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_OUT_BUFFER_LEN 4
25718c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_OUT_BUFFER_MINNUM 1
25728c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_OUT_BUFFER_MAXNUM 63
25738c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_READ32_OUT_BUFFER_MAXNUM_MCDI2 255
25748c2ecf20Sopenharmony_ci
25758c2ecf20Sopenharmony_ci
25768c2ecf20Sopenharmony_ci/***********************************/
25778c2ecf20Sopenharmony_ci/* MC_CMD_CSR_WRITE32
25788c2ecf20Sopenharmony_ci * Write 32bit dwords to the indirect memory map.
25798c2ecf20Sopenharmony_ci */
25808c2ecf20Sopenharmony_ci#define MC_CMD_CSR_WRITE32 0xd
25818c2ecf20Sopenharmony_ci#undef MC_CMD_0xd_PRIVILEGE_CTG
25828c2ecf20Sopenharmony_ci
25838c2ecf20Sopenharmony_ci#define MC_CMD_0xd_PRIVILEGE_CTG SRIOV_CTG_INSECURE
25848c2ecf20Sopenharmony_ci
25858c2ecf20Sopenharmony_ci/* MC_CMD_CSR_WRITE32_IN msgrequest */
25868c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_WRITE32_IN_LENMIN 12
25878c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_WRITE32_IN_LENMAX 252
25888c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_WRITE32_IN_LENMAX_MCDI2 1020
25898c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_WRITE32_IN_LEN(num) (8+4*(num))
25908c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_WRITE32_IN_BUFFER_NUM(len) (((len)-8)/4)
25918c2ecf20Sopenharmony_ci/* Address */
25928c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_ADDR_OFST 0
25938c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_ADDR_LEN 4
25948c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_STEP_OFST 4
25958c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_STEP_LEN 4
25968c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_BUFFER_OFST 8
25978c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_BUFFER_LEN 4
25988c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_BUFFER_MINNUM 1
25998c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_BUFFER_MAXNUM 61
26008c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_IN_BUFFER_MAXNUM_MCDI2 253
26018c2ecf20Sopenharmony_ci
26028c2ecf20Sopenharmony_ci/* MC_CMD_CSR_WRITE32_OUT msgresponse */
26038c2ecf20Sopenharmony_ci#define    MC_CMD_CSR_WRITE32_OUT_LEN 4
26048c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_OUT_STATUS_OFST 0
26058c2ecf20Sopenharmony_ci#define       MC_CMD_CSR_WRITE32_OUT_STATUS_LEN 4
26068c2ecf20Sopenharmony_ci
26078c2ecf20Sopenharmony_ci
26088c2ecf20Sopenharmony_ci/***********************************/
26098c2ecf20Sopenharmony_ci/* MC_CMD_HP
26108c2ecf20Sopenharmony_ci * These commands are used for HP related features. They are grouped under one
26118c2ecf20Sopenharmony_ci * MCDI command to avoid creating too many MCDI commands.
26128c2ecf20Sopenharmony_ci */
26138c2ecf20Sopenharmony_ci#define MC_CMD_HP 0x54
26148c2ecf20Sopenharmony_ci#undef MC_CMD_0x54_PRIVILEGE_CTG
26158c2ecf20Sopenharmony_ci
26168c2ecf20Sopenharmony_ci#define MC_CMD_0x54_PRIVILEGE_CTG SRIOV_CTG_ADMIN
26178c2ecf20Sopenharmony_ci
26188c2ecf20Sopenharmony_ci/* MC_CMD_HP_IN msgrequest */
26198c2ecf20Sopenharmony_ci#define    MC_CMD_HP_IN_LEN 16
26208c2ecf20Sopenharmony_ci/* HP OCSD sub-command. When address is not NULL, request activation of OCSD at
26218c2ecf20Sopenharmony_ci * the specified address with the specified interval.When address is NULL,
26228c2ecf20Sopenharmony_ci * INTERVAL is interpreted as a command: 0: stop OCSD / 1: Report OCSD current
26238c2ecf20Sopenharmony_ci * state / 2: (debug) Show temperature reported by one of the supported
26248c2ecf20Sopenharmony_ci * sensors.
26258c2ecf20Sopenharmony_ci */
26268c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_SUBCMD_OFST 0
26278c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_SUBCMD_LEN 4
26288c2ecf20Sopenharmony_ci/* enum: OCSD (Option Card Sensor Data) sub-command. */
26298c2ecf20Sopenharmony_ci#define          MC_CMD_HP_IN_OCSD_SUBCMD 0x0
26308c2ecf20Sopenharmony_ci/* enum: Last known valid HP sub-command. */
26318c2ecf20Sopenharmony_ci#define          MC_CMD_HP_IN_LAST_SUBCMD 0x0
26328c2ecf20Sopenharmony_ci/* The address to the array of sensor fields. (Or NULL to use a sub-command.)
26338c2ecf20Sopenharmony_ci */
26348c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_OCSD_ADDR_OFST 4
26358c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_OCSD_ADDR_LEN 8
26368c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_OCSD_ADDR_LO_OFST 4
26378c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_OCSD_ADDR_HI_OFST 8
26388c2ecf20Sopenharmony_ci/* The requested update interval, in seconds. (Or the sub-command if ADDR is
26398c2ecf20Sopenharmony_ci * NULL.)
26408c2ecf20Sopenharmony_ci */
26418c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_OCSD_INTERVAL_OFST 12
26428c2ecf20Sopenharmony_ci#define       MC_CMD_HP_IN_OCSD_INTERVAL_LEN 4
26438c2ecf20Sopenharmony_ci
26448c2ecf20Sopenharmony_ci/* MC_CMD_HP_OUT msgresponse */
26458c2ecf20Sopenharmony_ci#define    MC_CMD_HP_OUT_LEN 4
26468c2ecf20Sopenharmony_ci#define       MC_CMD_HP_OUT_OCSD_STATUS_OFST 0
26478c2ecf20Sopenharmony_ci#define       MC_CMD_HP_OUT_OCSD_STATUS_LEN 4
26488c2ecf20Sopenharmony_ci/* enum: OCSD stopped for this card. */
26498c2ecf20Sopenharmony_ci#define          MC_CMD_HP_OUT_OCSD_STOPPED 0x1
26508c2ecf20Sopenharmony_ci/* enum: OCSD was successfully started with the address provided. */
26518c2ecf20Sopenharmony_ci#define          MC_CMD_HP_OUT_OCSD_STARTED 0x2
26528c2ecf20Sopenharmony_ci/* enum: OCSD was already started for this card. */
26538c2ecf20Sopenharmony_ci#define          MC_CMD_HP_OUT_OCSD_ALREADY_STARTED 0x3
26548c2ecf20Sopenharmony_ci
26558c2ecf20Sopenharmony_ci
26568c2ecf20Sopenharmony_ci/***********************************/
26578c2ecf20Sopenharmony_ci/* MC_CMD_STACKINFO
26588c2ecf20Sopenharmony_ci * Get stack information.
26598c2ecf20Sopenharmony_ci */
26608c2ecf20Sopenharmony_ci#define MC_CMD_STACKINFO 0xf
26618c2ecf20Sopenharmony_ci#undef MC_CMD_0xf_PRIVILEGE_CTG
26628c2ecf20Sopenharmony_ci
26638c2ecf20Sopenharmony_ci#define MC_CMD_0xf_PRIVILEGE_CTG SRIOV_CTG_ADMIN
26648c2ecf20Sopenharmony_ci
26658c2ecf20Sopenharmony_ci/* MC_CMD_STACKINFO_IN msgrequest */
26668c2ecf20Sopenharmony_ci#define    MC_CMD_STACKINFO_IN_LEN 0
26678c2ecf20Sopenharmony_ci
26688c2ecf20Sopenharmony_ci/* MC_CMD_STACKINFO_OUT msgresponse */
26698c2ecf20Sopenharmony_ci#define    MC_CMD_STACKINFO_OUT_LENMIN 12
26708c2ecf20Sopenharmony_ci#define    MC_CMD_STACKINFO_OUT_LENMAX 252
26718c2ecf20Sopenharmony_ci#define    MC_CMD_STACKINFO_OUT_LENMAX_MCDI2 1020
26728c2ecf20Sopenharmony_ci#define    MC_CMD_STACKINFO_OUT_LEN(num) (0+12*(num))
26738c2ecf20Sopenharmony_ci#define    MC_CMD_STACKINFO_OUT_THREAD_INFO_NUM(len) (((len)-0)/12)
26748c2ecf20Sopenharmony_ci/* (thread ptr, stack size, free space) for each thread in system */
26758c2ecf20Sopenharmony_ci#define       MC_CMD_STACKINFO_OUT_THREAD_INFO_OFST 0
26768c2ecf20Sopenharmony_ci#define       MC_CMD_STACKINFO_OUT_THREAD_INFO_LEN 12
26778c2ecf20Sopenharmony_ci#define       MC_CMD_STACKINFO_OUT_THREAD_INFO_MINNUM 1
26788c2ecf20Sopenharmony_ci#define       MC_CMD_STACKINFO_OUT_THREAD_INFO_MAXNUM 21
26798c2ecf20Sopenharmony_ci#define       MC_CMD_STACKINFO_OUT_THREAD_INFO_MAXNUM_MCDI2 85
26808c2ecf20Sopenharmony_ci
26818c2ecf20Sopenharmony_ci
26828c2ecf20Sopenharmony_ci/***********************************/
26838c2ecf20Sopenharmony_ci/* MC_CMD_MDIO_READ
26848c2ecf20Sopenharmony_ci * MDIO register read.
26858c2ecf20Sopenharmony_ci */
26868c2ecf20Sopenharmony_ci#define MC_CMD_MDIO_READ 0x10
26878c2ecf20Sopenharmony_ci#undef MC_CMD_0x10_PRIVILEGE_CTG
26888c2ecf20Sopenharmony_ci
26898c2ecf20Sopenharmony_ci#define MC_CMD_0x10_PRIVILEGE_CTG SRIOV_CTG_GENERAL
26908c2ecf20Sopenharmony_ci
26918c2ecf20Sopenharmony_ci/* MC_CMD_MDIO_READ_IN msgrequest */
26928c2ecf20Sopenharmony_ci#define    MC_CMD_MDIO_READ_IN_LEN 16
26938c2ecf20Sopenharmony_ci/* Bus number; there are two MDIO buses: one for the internal PHY, and one for
26948c2ecf20Sopenharmony_ci * external devices.
26958c2ecf20Sopenharmony_ci */
26968c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_BUS_OFST 0
26978c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_BUS_LEN 4
26988c2ecf20Sopenharmony_ci/* enum: Internal. */
26998c2ecf20Sopenharmony_ci#define          MC_CMD_MDIO_BUS_INTERNAL 0x0
27008c2ecf20Sopenharmony_ci/* enum: External. */
27018c2ecf20Sopenharmony_ci#define          MC_CMD_MDIO_BUS_EXTERNAL 0x1
27028c2ecf20Sopenharmony_ci/* Port address */
27038c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_PRTAD_OFST 4
27048c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_PRTAD_LEN 4
27058c2ecf20Sopenharmony_ci/* Device Address or clause 22. */
27068c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_DEVAD_OFST 8
27078c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_DEVAD_LEN 4
27088c2ecf20Sopenharmony_ci/* enum: By default all the MCDI MDIO operations perform clause45 mode. If you
27098c2ecf20Sopenharmony_ci * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22.
27108c2ecf20Sopenharmony_ci */
27118c2ecf20Sopenharmony_ci#define          MC_CMD_MDIO_CLAUSE22 0x20
27128c2ecf20Sopenharmony_ci/* Address */
27138c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_ADDR_OFST 12
27148c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_IN_ADDR_LEN 4
27158c2ecf20Sopenharmony_ci
27168c2ecf20Sopenharmony_ci/* MC_CMD_MDIO_READ_OUT msgresponse */
27178c2ecf20Sopenharmony_ci#define    MC_CMD_MDIO_READ_OUT_LEN 8
27188c2ecf20Sopenharmony_ci/* Value */
27198c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_OUT_VALUE_OFST 0
27208c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_OUT_VALUE_LEN 4
27218c2ecf20Sopenharmony_ci/* Status the MDIO commands return the raw status bits from the MDIO block. A
27228c2ecf20Sopenharmony_ci * "good" transaction should have the DONE bit set and all other bits clear.
27238c2ecf20Sopenharmony_ci */
27248c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_OUT_STATUS_OFST 4
27258c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_READ_OUT_STATUS_LEN 4
27268c2ecf20Sopenharmony_ci/* enum: Good. */
27278c2ecf20Sopenharmony_ci#define          MC_CMD_MDIO_STATUS_GOOD 0x8
27288c2ecf20Sopenharmony_ci
27298c2ecf20Sopenharmony_ci
27308c2ecf20Sopenharmony_ci/***********************************/
27318c2ecf20Sopenharmony_ci/* MC_CMD_MDIO_WRITE
27328c2ecf20Sopenharmony_ci * MDIO register write.
27338c2ecf20Sopenharmony_ci */
27348c2ecf20Sopenharmony_ci#define MC_CMD_MDIO_WRITE 0x11
27358c2ecf20Sopenharmony_ci#undef MC_CMD_0x11_PRIVILEGE_CTG
27368c2ecf20Sopenharmony_ci
27378c2ecf20Sopenharmony_ci#define MC_CMD_0x11_PRIVILEGE_CTG SRIOV_CTG_ADMIN
27388c2ecf20Sopenharmony_ci
27398c2ecf20Sopenharmony_ci/* MC_CMD_MDIO_WRITE_IN msgrequest */
27408c2ecf20Sopenharmony_ci#define    MC_CMD_MDIO_WRITE_IN_LEN 20
27418c2ecf20Sopenharmony_ci/* Bus number; there are two MDIO buses: one for the internal PHY, and one for
27428c2ecf20Sopenharmony_ci * external devices.
27438c2ecf20Sopenharmony_ci */
27448c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_BUS_OFST 0
27458c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_BUS_LEN 4
27468c2ecf20Sopenharmony_ci/* enum: Internal. */
27478c2ecf20Sopenharmony_ci/*               MC_CMD_MDIO_BUS_INTERNAL 0x0 */
27488c2ecf20Sopenharmony_ci/* enum: External. */
27498c2ecf20Sopenharmony_ci/*               MC_CMD_MDIO_BUS_EXTERNAL 0x1 */
27508c2ecf20Sopenharmony_ci/* Port address */
27518c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_PRTAD_OFST 4
27528c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_PRTAD_LEN 4
27538c2ecf20Sopenharmony_ci/* Device Address or clause 22. */
27548c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_DEVAD_OFST 8
27558c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_DEVAD_LEN 4
27568c2ecf20Sopenharmony_ci/* enum: By default all the MCDI MDIO operations perform clause45 mode. If you
27578c2ecf20Sopenharmony_ci * want to use clause22 then set DEVAD = MC_CMD_MDIO_CLAUSE22.
27588c2ecf20Sopenharmony_ci */
27598c2ecf20Sopenharmony_ci/*               MC_CMD_MDIO_CLAUSE22 0x20 */
27608c2ecf20Sopenharmony_ci/* Address */
27618c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_ADDR_OFST 12
27628c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_ADDR_LEN 4
27638c2ecf20Sopenharmony_ci/* Value */
27648c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_VALUE_OFST 16
27658c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_IN_VALUE_LEN 4
27668c2ecf20Sopenharmony_ci
27678c2ecf20Sopenharmony_ci/* MC_CMD_MDIO_WRITE_OUT msgresponse */
27688c2ecf20Sopenharmony_ci#define    MC_CMD_MDIO_WRITE_OUT_LEN 4
27698c2ecf20Sopenharmony_ci/* Status; the MDIO commands return the raw status bits from the MDIO block. A
27708c2ecf20Sopenharmony_ci * "good" transaction should have the DONE bit set and all other bits clear.
27718c2ecf20Sopenharmony_ci */
27728c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_OUT_STATUS_OFST 0
27738c2ecf20Sopenharmony_ci#define       MC_CMD_MDIO_WRITE_OUT_STATUS_LEN 4
27748c2ecf20Sopenharmony_ci/* enum: Good. */
27758c2ecf20Sopenharmony_ci/*               MC_CMD_MDIO_STATUS_GOOD 0x8 */
27768c2ecf20Sopenharmony_ci
27778c2ecf20Sopenharmony_ci
27788c2ecf20Sopenharmony_ci/***********************************/
27798c2ecf20Sopenharmony_ci/* MC_CMD_DBI_WRITE
27808c2ecf20Sopenharmony_ci * Write DBI register(s).
27818c2ecf20Sopenharmony_ci */
27828c2ecf20Sopenharmony_ci#define MC_CMD_DBI_WRITE 0x12
27838c2ecf20Sopenharmony_ci#undef MC_CMD_0x12_PRIVILEGE_CTG
27848c2ecf20Sopenharmony_ci
27858c2ecf20Sopenharmony_ci#define MC_CMD_0x12_PRIVILEGE_CTG SRIOV_CTG_INSECURE
27868c2ecf20Sopenharmony_ci
27878c2ecf20Sopenharmony_ci/* MC_CMD_DBI_WRITE_IN msgrequest */
27888c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_WRITE_IN_LENMIN 12
27898c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_WRITE_IN_LENMAX 252
27908c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_WRITE_IN_LENMAX_MCDI2 1020
27918c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_WRITE_IN_LEN(num) (0+12*(num))
27928c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_WRITE_IN_DBIWROP_NUM(len) (((len)-0)/12)
27938c2ecf20Sopenharmony_ci/* Each write op consists of an address (offset 0), byte enable/VF/CS2 (offset
27948c2ecf20Sopenharmony_ci * 32) and value (offset 64). See MC_CMD_DBIWROP_TYPEDEF.
27958c2ecf20Sopenharmony_ci */
27968c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_WRITE_IN_DBIWROP_OFST 0
27978c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_WRITE_IN_DBIWROP_LEN 12
27988c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_WRITE_IN_DBIWROP_MINNUM 1
27998c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_WRITE_IN_DBIWROP_MAXNUM 21
28008c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_WRITE_IN_DBIWROP_MAXNUM_MCDI2 85
28018c2ecf20Sopenharmony_ci
28028c2ecf20Sopenharmony_ci/* MC_CMD_DBI_WRITE_OUT msgresponse */
28038c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_WRITE_OUT_LEN 0
28048c2ecf20Sopenharmony_ci
28058c2ecf20Sopenharmony_ci/* MC_CMD_DBIWROP_TYPEDEF structuredef */
28068c2ecf20Sopenharmony_ci#define    MC_CMD_DBIWROP_TYPEDEF_LEN 12
28078c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_ADDRESS_OFST 0
28088c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LEN 4
28098c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_ADDRESS_LBN 0
28108c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_ADDRESS_WIDTH 32
28118c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_PARMS_OFST 4
28128c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_PARMS_LEN 4
28138c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_VF_NUM_OFST 4
28148c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_VF_NUM_LBN 16
28158c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_VF_NUM_WIDTH 16
28168c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_OFST 4
28178c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_LBN 15
28188c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_VF_ACTIVE_WIDTH 1
28198c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_CS2_OFST 4
28208c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_CS2_LBN 14
28218c2ecf20Sopenharmony_ci#define        MC_CMD_DBIWROP_TYPEDEF_CS2_WIDTH 1
28228c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_PARMS_LBN 32
28238c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_PARMS_WIDTH 32
28248c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_VALUE_OFST 8
28258c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_VALUE_LEN 4
28268c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_VALUE_LBN 64
28278c2ecf20Sopenharmony_ci#define       MC_CMD_DBIWROP_TYPEDEF_VALUE_WIDTH 32
28288c2ecf20Sopenharmony_ci
28298c2ecf20Sopenharmony_ci
28308c2ecf20Sopenharmony_ci/***********************************/
28318c2ecf20Sopenharmony_ci/* MC_CMD_PORT_READ32
28328c2ecf20Sopenharmony_ci * Read a 32-bit register from the indirect port register map. The port to
28338c2ecf20Sopenharmony_ci * access is implied by the Shared memory channel used.
28348c2ecf20Sopenharmony_ci */
28358c2ecf20Sopenharmony_ci#define MC_CMD_PORT_READ32 0x14
28368c2ecf20Sopenharmony_ci
28378c2ecf20Sopenharmony_ci/* MC_CMD_PORT_READ32_IN msgrequest */
28388c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_READ32_IN_LEN 4
28398c2ecf20Sopenharmony_ci/* Address */
28408c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ32_IN_ADDR_OFST 0
28418c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ32_IN_ADDR_LEN 4
28428c2ecf20Sopenharmony_ci
28438c2ecf20Sopenharmony_ci/* MC_CMD_PORT_READ32_OUT msgresponse */
28448c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_READ32_OUT_LEN 8
28458c2ecf20Sopenharmony_ci/* Value */
28468c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ32_OUT_VALUE_OFST 0
28478c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ32_OUT_VALUE_LEN 4
28488c2ecf20Sopenharmony_ci/* Status */
28498c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ32_OUT_STATUS_OFST 4
28508c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ32_OUT_STATUS_LEN 4
28518c2ecf20Sopenharmony_ci
28528c2ecf20Sopenharmony_ci
28538c2ecf20Sopenharmony_ci/***********************************/
28548c2ecf20Sopenharmony_ci/* MC_CMD_PORT_WRITE32
28558c2ecf20Sopenharmony_ci * Write a 32-bit register to the indirect port register map. The port to
28568c2ecf20Sopenharmony_ci * access is implied by the Shared memory channel used.
28578c2ecf20Sopenharmony_ci */
28588c2ecf20Sopenharmony_ci#define MC_CMD_PORT_WRITE32 0x15
28598c2ecf20Sopenharmony_ci
28608c2ecf20Sopenharmony_ci/* MC_CMD_PORT_WRITE32_IN msgrequest */
28618c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_WRITE32_IN_LEN 8
28628c2ecf20Sopenharmony_ci/* Address */
28638c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE32_IN_ADDR_OFST 0
28648c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE32_IN_ADDR_LEN 4
28658c2ecf20Sopenharmony_ci/* Value */
28668c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE32_IN_VALUE_OFST 4
28678c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE32_IN_VALUE_LEN 4
28688c2ecf20Sopenharmony_ci
28698c2ecf20Sopenharmony_ci/* MC_CMD_PORT_WRITE32_OUT msgresponse */
28708c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_WRITE32_OUT_LEN 4
28718c2ecf20Sopenharmony_ci/* Status */
28728c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE32_OUT_STATUS_OFST 0
28738c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE32_OUT_STATUS_LEN 4
28748c2ecf20Sopenharmony_ci
28758c2ecf20Sopenharmony_ci
28768c2ecf20Sopenharmony_ci/***********************************/
28778c2ecf20Sopenharmony_ci/* MC_CMD_PORT_READ128
28788c2ecf20Sopenharmony_ci * Read a 128-bit register from the indirect port register map. The port to
28798c2ecf20Sopenharmony_ci * access is implied by the Shared memory channel used.
28808c2ecf20Sopenharmony_ci */
28818c2ecf20Sopenharmony_ci#define MC_CMD_PORT_READ128 0x16
28828c2ecf20Sopenharmony_ci
28838c2ecf20Sopenharmony_ci/* MC_CMD_PORT_READ128_IN msgrequest */
28848c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_READ128_IN_LEN 4
28858c2ecf20Sopenharmony_ci/* Address */
28868c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ128_IN_ADDR_OFST 0
28878c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ128_IN_ADDR_LEN 4
28888c2ecf20Sopenharmony_ci
28898c2ecf20Sopenharmony_ci/* MC_CMD_PORT_READ128_OUT msgresponse */
28908c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_READ128_OUT_LEN 20
28918c2ecf20Sopenharmony_ci/* Value */
28928c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ128_OUT_VALUE_OFST 0
28938c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ128_OUT_VALUE_LEN 16
28948c2ecf20Sopenharmony_ci/* Status */
28958c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ128_OUT_STATUS_OFST 16
28968c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_READ128_OUT_STATUS_LEN 4
28978c2ecf20Sopenharmony_ci
28988c2ecf20Sopenharmony_ci
28998c2ecf20Sopenharmony_ci/***********************************/
29008c2ecf20Sopenharmony_ci/* MC_CMD_PORT_WRITE128
29018c2ecf20Sopenharmony_ci * Write a 128-bit register to the indirect port register map. The port to
29028c2ecf20Sopenharmony_ci * access is implied by the Shared memory channel used.
29038c2ecf20Sopenharmony_ci */
29048c2ecf20Sopenharmony_ci#define MC_CMD_PORT_WRITE128 0x17
29058c2ecf20Sopenharmony_ci
29068c2ecf20Sopenharmony_ci/* MC_CMD_PORT_WRITE128_IN msgrequest */
29078c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_WRITE128_IN_LEN 20
29088c2ecf20Sopenharmony_ci/* Address */
29098c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE128_IN_ADDR_OFST 0
29108c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE128_IN_ADDR_LEN 4
29118c2ecf20Sopenharmony_ci/* Value */
29128c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE128_IN_VALUE_OFST 4
29138c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE128_IN_VALUE_LEN 16
29148c2ecf20Sopenharmony_ci
29158c2ecf20Sopenharmony_ci/* MC_CMD_PORT_WRITE128_OUT msgresponse */
29168c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_WRITE128_OUT_LEN 4
29178c2ecf20Sopenharmony_ci/* Status */
29188c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE128_OUT_STATUS_OFST 0
29198c2ecf20Sopenharmony_ci#define       MC_CMD_PORT_WRITE128_OUT_STATUS_LEN 4
29208c2ecf20Sopenharmony_ci
29218c2ecf20Sopenharmony_ci/* MC_CMD_CAPABILITIES structuredef */
29228c2ecf20Sopenharmony_ci#define    MC_CMD_CAPABILITIES_LEN 4
29238c2ecf20Sopenharmony_ci/* Small buf table. */
29248c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_SMALL_BUF_TBL_LBN 0
29258c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_SMALL_BUF_TBL_WIDTH 1
29268c2ecf20Sopenharmony_ci/* Turbo mode (for Maranello). */
29278c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_TURBO_LBN 1
29288c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_TURBO_WIDTH 1
29298c2ecf20Sopenharmony_ci/* Turbo mode active (for Maranello). */
29308c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_TURBO_ACTIVE_LBN 2
29318c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_TURBO_ACTIVE_WIDTH 1
29328c2ecf20Sopenharmony_ci/* PTP offload. */
29338c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_PTP_LBN 3
29348c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_PTP_WIDTH 1
29358c2ecf20Sopenharmony_ci/* AOE mode. */
29368c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_AOE_LBN 4
29378c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_AOE_WIDTH 1
29388c2ecf20Sopenharmony_ci/* AOE mode active. */
29398c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_AOE_ACTIVE_LBN 5
29408c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_AOE_ACTIVE_WIDTH 1
29418c2ecf20Sopenharmony_ci/* AOE mode active. */
29428c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_FC_ACTIVE_LBN 6
29438c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_FC_ACTIVE_WIDTH 1
29448c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_RESERVED_LBN 7
29458c2ecf20Sopenharmony_ci#define       MC_CMD_CAPABILITIES_RESERVED_WIDTH 25
29468c2ecf20Sopenharmony_ci
29478c2ecf20Sopenharmony_ci
29488c2ecf20Sopenharmony_ci/***********************************/
29498c2ecf20Sopenharmony_ci/* MC_CMD_GET_BOARD_CFG
29508c2ecf20Sopenharmony_ci * Returns the MC firmware configuration structure.
29518c2ecf20Sopenharmony_ci */
29528c2ecf20Sopenharmony_ci#define MC_CMD_GET_BOARD_CFG 0x18
29538c2ecf20Sopenharmony_ci#undef MC_CMD_0x18_PRIVILEGE_CTG
29548c2ecf20Sopenharmony_ci
29558c2ecf20Sopenharmony_ci#define MC_CMD_0x18_PRIVILEGE_CTG SRIOV_CTG_GENERAL
29568c2ecf20Sopenharmony_ci
29578c2ecf20Sopenharmony_ci/* MC_CMD_GET_BOARD_CFG_IN msgrequest */
29588c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOARD_CFG_IN_LEN 0
29598c2ecf20Sopenharmony_ci
29608c2ecf20Sopenharmony_ci/* MC_CMD_GET_BOARD_CFG_OUT msgresponse */
29618c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOARD_CFG_OUT_LENMIN 96
29628c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOARD_CFG_OUT_LENMAX 136
29638c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOARD_CFG_OUT_LENMAX_MCDI2 136
29648c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOARD_CFG_OUT_LEN(num) (72+2*(num))
29658c2ecf20Sopenharmony_ci#define    MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_NUM(len) (((len)-72)/2)
29668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_OFST 0
29678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_LEN 4
29688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_OFST 4
29698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_LEN 32
29708c2ecf20Sopenharmony_ci/* Capabilities for Siena Port0 (see struct MC_CMD_CAPABILITIES). Unused on
29718c2ecf20Sopenharmony_ci * EF10 and later (use MC_CMD_GET_CAPABILITIES).
29728c2ecf20Sopenharmony_ci */
29738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_OFST 36
29748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT0_LEN 4
29758c2ecf20Sopenharmony_ci/* Capabilities for Siena Port1 (see struct MC_CMD_CAPABILITIES). Unused on
29768c2ecf20Sopenharmony_ci * EF10 and later (use MC_CMD_GET_CAPABILITIES).
29778c2ecf20Sopenharmony_ci */
29788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_OFST 40
29798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_CAPABILITIES_PORT1_LEN 4
29808c2ecf20Sopenharmony_ci/* Base MAC address for Siena Port0. Unused on EF10 and later (use
29818c2ecf20Sopenharmony_ci * MC_CMD_GET_MAC_ADDRESSES).
29828c2ecf20Sopenharmony_ci */
29838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_OFST 44
29848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0_LEN 6
29858c2ecf20Sopenharmony_ci/* Base MAC address for Siena Port1. Unused on EF10 and later (use
29868c2ecf20Sopenharmony_ci * MC_CMD_GET_MAC_ADDRESSES).
29878c2ecf20Sopenharmony_ci */
29888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_OFST 50
29898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1_LEN 6
29908c2ecf20Sopenharmony_ci/* Size of MAC address pool for Siena Port0. Unused on EF10 and later (use
29918c2ecf20Sopenharmony_ci * MC_CMD_GET_MAC_ADDRESSES).
29928c2ecf20Sopenharmony_ci */
29938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_OFST 56
29948c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT0_LEN 4
29958c2ecf20Sopenharmony_ci/* Size of MAC address pool for Siena Port1. Unused on EF10 and later (use
29968c2ecf20Sopenharmony_ci * MC_CMD_GET_MAC_ADDRESSES).
29978c2ecf20Sopenharmony_ci */
29988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_OFST 60
29998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_COUNT_PORT1_LEN 4
30008c2ecf20Sopenharmony_ci/* Increment between addresses in MAC address pool for Siena Port0. Unused on
30018c2ecf20Sopenharmony_ci * EF10 and later (use MC_CMD_GET_MAC_ADDRESSES).
30028c2ecf20Sopenharmony_ci */
30038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_OFST 64
30048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT0_LEN 4
30058c2ecf20Sopenharmony_ci/* Increment between addresses in MAC address pool for Siena Port1. Unused on
30068c2ecf20Sopenharmony_ci * EF10 and later (use MC_CMD_GET_MAC_ADDRESSES).
30078c2ecf20Sopenharmony_ci */
30088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_OFST 68
30098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_LEN 4
30108c2ecf20Sopenharmony_ci/* Siena only. This field contains a 16-bit value for each of the types of
30118c2ecf20Sopenharmony_ci * NVRAM area. The values are defined in the firmware/mc/platform/.c file for a
30128c2ecf20Sopenharmony_ci * specific board type, but otherwise have no meaning to the MC; they are used
30138c2ecf20Sopenharmony_ci * by the driver to manage selection of appropriate firmware updates. Unused on
30148c2ecf20Sopenharmony_ci * EF10 and later (use MC_CMD_NVRAM_METADATA).
30158c2ecf20Sopenharmony_ci */
30168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST 72
30178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN 2
30188c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM 12
30198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM 32
30208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM_MCDI2 32
30218c2ecf20Sopenharmony_ci
30228c2ecf20Sopenharmony_ci
30238c2ecf20Sopenharmony_ci/***********************************/
30248c2ecf20Sopenharmony_ci/* MC_CMD_DBI_READX
30258c2ecf20Sopenharmony_ci * Read DBI register(s) -- extended functionality
30268c2ecf20Sopenharmony_ci */
30278c2ecf20Sopenharmony_ci#define MC_CMD_DBI_READX 0x19
30288c2ecf20Sopenharmony_ci#undef MC_CMD_0x19_PRIVILEGE_CTG
30298c2ecf20Sopenharmony_ci
30308c2ecf20Sopenharmony_ci#define MC_CMD_0x19_PRIVILEGE_CTG SRIOV_CTG_INSECURE
30318c2ecf20Sopenharmony_ci
30328c2ecf20Sopenharmony_ci/* MC_CMD_DBI_READX_IN msgrequest */
30338c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_IN_LENMIN 8
30348c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_IN_LENMAX 248
30358c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_IN_LENMAX_MCDI2 1016
30368c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_IN_LEN(num) (0+8*(num))
30378c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_IN_DBIRDOP_NUM(len) (((len)-0)/8)
30388c2ecf20Sopenharmony_ci/* Each Read op consists of an address (offset 0), VF/CS2) */
30398c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_OFST 0
30408c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_LEN 8
30418c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_LO_OFST 0
30428c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_HI_OFST 4
30438c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_MINNUM 1
30448c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_MAXNUM 31
30458c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_IN_DBIRDOP_MAXNUM_MCDI2 127
30468c2ecf20Sopenharmony_ci
30478c2ecf20Sopenharmony_ci/* MC_CMD_DBI_READX_OUT msgresponse */
30488c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_OUT_LENMIN 4
30498c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_OUT_LENMAX 252
30508c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_OUT_LENMAX_MCDI2 1020
30518c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_OUT_LEN(num) (0+4*(num))
30528c2ecf20Sopenharmony_ci#define    MC_CMD_DBI_READX_OUT_VALUE_NUM(len) (((len)-0)/4)
30538c2ecf20Sopenharmony_ci/* Value */
30548c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_OUT_VALUE_OFST 0
30558c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_OUT_VALUE_LEN 4
30568c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_OUT_VALUE_MINNUM 1
30578c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_OUT_VALUE_MAXNUM 63
30588c2ecf20Sopenharmony_ci#define       MC_CMD_DBI_READX_OUT_VALUE_MAXNUM_MCDI2 255
30598c2ecf20Sopenharmony_ci
30608c2ecf20Sopenharmony_ci/* MC_CMD_DBIRDOP_TYPEDEF structuredef */
30618c2ecf20Sopenharmony_ci#define    MC_CMD_DBIRDOP_TYPEDEF_LEN 8
30628c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_OFST 0
30638c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LEN 4
30648c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_LBN 0
30658c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_ADDRESS_WIDTH 32
30668c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_PARMS_OFST 4
30678c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_PARMS_LEN 4
30688c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_OFST 4
30698c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_LBN 16
30708c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_VF_NUM_WIDTH 16
30718c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_OFST 4
30728c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_LBN 15
30738c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_VF_ACTIVE_WIDTH 1
30748c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_CS2_OFST 4
30758c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_CS2_LBN 14
30768c2ecf20Sopenharmony_ci#define        MC_CMD_DBIRDOP_TYPEDEF_CS2_WIDTH 1
30778c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_PARMS_LBN 32
30788c2ecf20Sopenharmony_ci#define       MC_CMD_DBIRDOP_TYPEDEF_PARMS_WIDTH 32
30798c2ecf20Sopenharmony_ci
30808c2ecf20Sopenharmony_ci
30818c2ecf20Sopenharmony_ci/***********************************/
30828c2ecf20Sopenharmony_ci/* MC_CMD_SET_RAND_SEED
30838c2ecf20Sopenharmony_ci * Set the 16byte seed for the MC pseudo-random generator.
30848c2ecf20Sopenharmony_ci */
30858c2ecf20Sopenharmony_ci#define MC_CMD_SET_RAND_SEED 0x1a
30868c2ecf20Sopenharmony_ci#undef MC_CMD_0x1a_PRIVILEGE_CTG
30878c2ecf20Sopenharmony_ci
30888c2ecf20Sopenharmony_ci#define MC_CMD_0x1a_PRIVILEGE_CTG SRIOV_CTG_INSECURE
30898c2ecf20Sopenharmony_ci
30908c2ecf20Sopenharmony_ci/* MC_CMD_SET_RAND_SEED_IN msgrequest */
30918c2ecf20Sopenharmony_ci#define    MC_CMD_SET_RAND_SEED_IN_LEN 16
30928c2ecf20Sopenharmony_ci/* Seed value. */
30938c2ecf20Sopenharmony_ci#define       MC_CMD_SET_RAND_SEED_IN_SEED_OFST 0
30948c2ecf20Sopenharmony_ci#define       MC_CMD_SET_RAND_SEED_IN_SEED_LEN 16
30958c2ecf20Sopenharmony_ci
30968c2ecf20Sopenharmony_ci/* MC_CMD_SET_RAND_SEED_OUT msgresponse */
30978c2ecf20Sopenharmony_ci#define    MC_CMD_SET_RAND_SEED_OUT_LEN 0
30988c2ecf20Sopenharmony_ci
30998c2ecf20Sopenharmony_ci
31008c2ecf20Sopenharmony_ci/***********************************/
31018c2ecf20Sopenharmony_ci/* MC_CMD_LTSSM_HIST
31028c2ecf20Sopenharmony_ci * Retrieve the history of the LTSSM, if the build supports it.
31038c2ecf20Sopenharmony_ci */
31048c2ecf20Sopenharmony_ci#define MC_CMD_LTSSM_HIST 0x1b
31058c2ecf20Sopenharmony_ci
31068c2ecf20Sopenharmony_ci/* MC_CMD_LTSSM_HIST_IN msgrequest */
31078c2ecf20Sopenharmony_ci#define    MC_CMD_LTSSM_HIST_IN_LEN 0
31088c2ecf20Sopenharmony_ci
31098c2ecf20Sopenharmony_ci/* MC_CMD_LTSSM_HIST_OUT msgresponse */
31108c2ecf20Sopenharmony_ci#define    MC_CMD_LTSSM_HIST_OUT_LENMIN 0
31118c2ecf20Sopenharmony_ci#define    MC_CMD_LTSSM_HIST_OUT_LENMAX 252
31128c2ecf20Sopenharmony_ci#define    MC_CMD_LTSSM_HIST_OUT_LENMAX_MCDI2 1020
31138c2ecf20Sopenharmony_ci#define    MC_CMD_LTSSM_HIST_OUT_LEN(num) (0+4*(num))
31148c2ecf20Sopenharmony_ci#define    MC_CMD_LTSSM_HIST_OUT_DATA_NUM(len) (((len)-0)/4)
31158c2ecf20Sopenharmony_ci/* variable number of LTSSM values, as bytes. The history is read-to-clear. */
31168c2ecf20Sopenharmony_ci#define       MC_CMD_LTSSM_HIST_OUT_DATA_OFST 0
31178c2ecf20Sopenharmony_ci#define       MC_CMD_LTSSM_HIST_OUT_DATA_LEN 4
31188c2ecf20Sopenharmony_ci#define       MC_CMD_LTSSM_HIST_OUT_DATA_MINNUM 0
31198c2ecf20Sopenharmony_ci#define       MC_CMD_LTSSM_HIST_OUT_DATA_MAXNUM 63
31208c2ecf20Sopenharmony_ci#define       MC_CMD_LTSSM_HIST_OUT_DATA_MAXNUM_MCDI2 255
31218c2ecf20Sopenharmony_ci
31228c2ecf20Sopenharmony_ci
31238c2ecf20Sopenharmony_ci/***********************************/
31248c2ecf20Sopenharmony_ci/* MC_CMD_DRV_ATTACH
31258c2ecf20Sopenharmony_ci * Inform MCPU that this port is managed on the host (i.e. driver active). For
31268c2ecf20Sopenharmony_ci * Huntington, also request the preferred datapath firmware to use if possible
31278c2ecf20Sopenharmony_ci * (it may not be possible for this request to be fulfilled; the driver must
31288c2ecf20Sopenharmony_ci * issue a subsequent MC_CMD_GET_CAPABILITIES command to determine which
31298c2ecf20Sopenharmony_ci * features are actually available). The FIRMWARE_ID field is ignored by older
31308c2ecf20Sopenharmony_ci * platforms.
31318c2ecf20Sopenharmony_ci */
31328c2ecf20Sopenharmony_ci#define MC_CMD_DRV_ATTACH 0x1c
31338c2ecf20Sopenharmony_ci#undef MC_CMD_0x1c_PRIVILEGE_CTG
31348c2ecf20Sopenharmony_ci
31358c2ecf20Sopenharmony_ci#define MC_CMD_0x1c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
31368c2ecf20Sopenharmony_ci
31378c2ecf20Sopenharmony_ci/* MC_CMD_DRV_ATTACH_IN msgrequest */
31388c2ecf20Sopenharmony_ci#define    MC_CMD_DRV_ATTACH_IN_LEN 12
31398c2ecf20Sopenharmony_ci/* new state to set if UPDATE=1 */
31408c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_NEW_STATE_OFST 0
31418c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_NEW_STATE_LEN 4
31428c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_OFST 0
31438c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_LBN 0
31448c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_WIDTH 1
31458c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_ATTACH_OFST 0
31468c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_ATTACH_LBN 0
31478c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_ATTACH_WIDTH 1
31488c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_PREBOOT_OFST 0
31498c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_PREBOOT_LBN 1
31508c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_PREBOOT_WIDTH 1
31518c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_PREBOOT_OFST 0
31528c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_PREBOOT_LBN 1
31538c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_PREBOOT_WIDTH 1
31548c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_SUBVARIANT_AWARE_OFST 0
31558c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_SUBVARIANT_AWARE_LBN 2
31568c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_SUBVARIANT_AWARE_WIDTH 1
31578c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_VI_SPREADING_OFST 0
31588c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_VI_SPREADING_LBN 3
31598c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_VI_SPREADING_WIDTH 1
31608c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_V2_LINKCHANGES_OFST 0
31618c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_V2_LINKCHANGES_LBN 4
31628c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_V2_LINKCHANGES_WIDTH 1
31638c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_RX_VI_SPREADING_INHIBIT_OFST 0
31648c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_RX_VI_SPREADING_INHIBIT_LBN 5
31658c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_RX_VI_SPREADING_INHIBIT_WIDTH 1
31668c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_TX_ONLY_SPREADING_OFST 0
31678c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_TX_ONLY_SPREADING_LBN 5
31688c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_WANT_TX_ONLY_SPREADING_WIDTH 1
31698c2ecf20Sopenharmony_ci/* 1 to set new state, or 0 to just report the existing state */
31708c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_UPDATE_OFST 4
31718c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_UPDATE_LEN 4
31728c2ecf20Sopenharmony_ci/* preferred datapath firmware (for Huntington; ignored for Siena) */
31738c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_OFST 8
31748c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_FIRMWARE_ID_LEN 4
31758c2ecf20Sopenharmony_ci/* enum: Prefer to use full featured firmware */
31768c2ecf20Sopenharmony_ci#define          MC_CMD_FW_FULL_FEATURED 0x0
31778c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with fewer features but lower latency */
31788c2ecf20Sopenharmony_ci#define          MC_CMD_FW_LOW_LATENCY 0x1
31798c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware for SolarCapture packed stream mode */
31808c2ecf20Sopenharmony_ci#define          MC_CMD_FW_PACKED_STREAM 0x2
31818c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with fewer features and simpler TX event
31828c2ecf20Sopenharmony_ci * batching but higher TX packet rate
31838c2ecf20Sopenharmony_ci */
31848c2ecf20Sopenharmony_ci#define          MC_CMD_FW_HIGH_TX_RATE 0x3
31858c2ecf20Sopenharmony_ci/* enum: Reserved value */
31868c2ecf20Sopenharmony_ci#define          MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 0x4
31878c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with additional "rules engine" filtering
31888c2ecf20Sopenharmony_ci * support
31898c2ecf20Sopenharmony_ci */
31908c2ecf20Sopenharmony_ci#define          MC_CMD_FW_RULES_ENGINE 0x5
31918c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with additional DPDK support */
31928c2ecf20Sopenharmony_ci#define          MC_CMD_FW_DPDK 0x6
31938c2ecf20Sopenharmony_ci/* enum: Prefer to use "l3xudp" custom datapath firmware (see SF-119495-PD and
31948c2ecf20Sopenharmony_ci * bug69716)
31958c2ecf20Sopenharmony_ci */
31968c2ecf20Sopenharmony_ci#define          MC_CMD_FW_L3XUDP 0x7
31978c2ecf20Sopenharmony_ci/* enum: Requests that the MC keep whatever datapath firmware is currently
31988c2ecf20Sopenharmony_ci * running. It's used for test purposes, where we want to be able to shmboot
31998c2ecf20Sopenharmony_ci * special test firmware variants. This option is only recognised in eftest
32008c2ecf20Sopenharmony_ci * (i.e. non-production) builds.
32018c2ecf20Sopenharmony_ci */
32028c2ecf20Sopenharmony_ci#define          MC_CMD_FW_KEEP_CURRENT_EFTEST_ONLY 0xfffffffe
32038c2ecf20Sopenharmony_ci/* enum: Only this option is allowed for non-admin functions */
32048c2ecf20Sopenharmony_ci#define          MC_CMD_FW_DONT_CARE 0xffffffff
32058c2ecf20Sopenharmony_ci
32068c2ecf20Sopenharmony_ci/* MC_CMD_DRV_ATTACH_IN_V2 msgrequest: Updated DRV_ATTACH to include driver
32078c2ecf20Sopenharmony_ci * version
32088c2ecf20Sopenharmony_ci */
32098c2ecf20Sopenharmony_ci#define    MC_CMD_DRV_ATTACH_IN_V2_LEN 32
32108c2ecf20Sopenharmony_ci/* new state to set if UPDATE=1 */
32118c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_NEW_STATE_OFST 0
32128c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_NEW_STATE_LEN 4
32138c2ecf20Sopenharmony_ci/*             MC_CMD_DRV_ATTACH_OFST 0 */
32148c2ecf20Sopenharmony_ci/*             MC_CMD_DRV_ATTACH_LBN 0 */
32158c2ecf20Sopenharmony_ci/*             MC_CMD_DRV_ATTACH_WIDTH 1 */
32168c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_ATTACH_OFST 0
32178c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_ATTACH_LBN 0
32188c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_ATTACH_WIDTH 1
32198c2ecf20Sopenharmony_ci/*             MC_CMD_DRV_PREBOOT_OFST 0 */
32208c2ecf20Sopenharmony_ci/*             MC_CMD_DRV_PREBOOT_LBN 1 */
32218c2ecf20Sopenharmony_ci/*             MC_CMD_DRV_PREBOOT_WIDTH 1 */
32228c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_PREBOOT_OFST 0
32238c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_PREBOOT_LBN 1
32248c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_PREBOOT_WIDTH 1
32258c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_SUBVARIANT_AWARE_OFST 0
32268c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_SUBVARIANT_AWARE_LBN 2
32278c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_SUBVARIANT_AWARE_WIDTH 1
32288c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_VI_SPREADING_OFST 0
32298c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_VI_SPREADING_LBN 3
32308c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_VI_SPREADING_WIDTH 1
32318c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_V2_LINKCHANGES_OFST 0
32328c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_V2_LINKCHANGES_LBN 4
32338c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_V2_LINKCHANGES_WIDTH 1
32348c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_RX_VI_SPREADING_INHIBIT_OFST 0
32358c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_RX_VI_SPREADING_INHIBIT_LBN 5
32368c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_RX_VI_SPREADING_INHIBIT_WIDTH 1
32378c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_TX_ONLY_SPREADING_OFST 0
32388c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_TX_ONLY_SPREADING_LBN 5
32398c2ecf20Sopenharmony_ci#define        MC_CMD_DRV_ATTACH_IN_V2_WANT_TX_ONLY_SPREADING_WIDTH 1
32408c2ecf20Sopenharmony_ci/* 1 to set new state, or 0 to just report the existing state */
32418c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_UPDATE_OFST 4
32428c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_UPDATE_LEN 4
32438c2ecf20Sopenharmony_ci/* preferred datapath firmware (for Huntington; ignored for Siena) */
32448c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_FIRMWARE_ID_OFST 8
32458c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_FIRMWARE_ID_LEN 4
32468c2ecf20Sopenharmony_ci/* enum: Prefer to use full featured firmware */
32478c2ecf20Sopenharmony_ci/*               MC_CMD_FW_FULL_FEATURED 0x0 */
32488c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with fewer features but lower latency */
32498c2ecf20Sopenharmony_ci/*               MC_CMD_FW_LOW_LATENCY 0x1 */
32508c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware for SolarCapture packed stream mode */
32518c2ecf20Sopenharmony_ci/*               MC_CMD_FW_PACKED_STREAM 0x2 */
32528c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with fewer features and simpler TX event
32538c2ecf20Sopenharmony_ci * batching but higher TX packet rate
32548c2ecf20Sopenharmony_ci */
32558c2ecf20Sopenharmony_ci/*               MC_CMD_FW_HIGH_TX_RATE 0x3 */
32568c2ecf20Sopenharmony_ci/* enum: Reserved value */
32578c2ecf20Sopenharmony_ci/*               MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 0x4 */
32588c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with additional "rules engine" filtering
32598c2ecf20Sopenharmony_ci * support
32608c2ecf20Sopenharmony_ci */
32618c2ecf20Sopenharmony_ci/*               MC_CMD_FW_RULES_ENGINE 0x5 */
32628c2ecf20Sopenharmony_ci/* enum: Prefer to use firmware with additional DPDK support */
32638c2ecf20Sopenharmony_ci/*               MC_CMD_FW_DPDK 0x6 */
32648c2ecf20Sopenharmony_ci/* enum: Prefer to use "l3xudp" custom datapath firmware (see SF-119495-PD and
32658c2ecf20Sopenharmony_ci * bug69716)
32668c2ecf20Sopenharmony_ci */
32678c2ecf20Sopenharmony_ci/*               MC_CMD_FW_L3XUDP 0x7 */
32688c2ecf20Sopenharmony_ci/* enum: Requests that the MC keep whatever datapath firmware is currently
32698c2ecf20Sopenharmony_ci * running. It's used for test purposes, where we want to be able to shmboot
32708c2ecf20Sopenharmony_ci * special test firmware variants. This option is only recognised in eftest
32718c2ecf20Sopenharmony_ci * (i.e. non-production) builds.
32728c2ecf20Sopenharmony_ci */
32738c2ecf20Sopenharmony_ci/*               MC_CMD_FW_KEEP_CURRENT_EFTEST_ONLY 0xfffffffe */
32748c2ecf20Sopenharmony_ci/* enum: Only this option is allowed for non-admin functions */
32758c2ecf20Sopenharmony_ci/*               MC_CMD_FW_DONT_CARE 0xffffffff */
32768c2ecf20Sopenharmony_ci/* Version of the driver to be reported by management protocols (e.g. NC-SI)
32778c2ecf20Sopenharmony_ci * handled by the NIC. This is a zero-terminated ASCII string.
32788c2ecf20Sopenharmony_ci */
32798c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_DRIVER_VERSION_OFST 12
32808c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_IN_V2_DRIVER_VERSION_LEN 20
32818c2ecf20Sopenharmony_ci
32828c2ecf20Sopenharmony_ci/* MC_CMD_DRV_ATTACH_OUT msgresponse */
32838c2ecf20Sopenharmony_ci#define    MC_CMD_DRV_ATTACH_OUT_LEN 4
32848c2ecf20Sopenharmony_ci/* previous or existing state, see the bitmask at NEW_STATE */
32858c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_OUT_OLD_STATE_OFST 0
32868c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_OUT_OLD_STATE_LEN 4
32878c2ecf20Sopenharmony_ci
32888c2ecf20Sopenharmony_ci/* MC_CMD_DRV_ATTACH_EXT_OUT msgresponse */
32898c2ecf20Sopenharmony_ci#define    MC_CMD_DRV_ATTACH_EXT_OUT_LEN 8
32908c2ecf20Sopenharmony_ci/* previous or existing state, see the bitmask at NEW_STATE */
32918c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_OFST 0
32928c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_LEN 4
32938c2ecf20Sopenharmony_ci/* Flags associated with this function */
32948c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_OFST 4
32958c2ecf20Sopenharmony_ci#define       MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_LEN 4
32968c2ecf20Sopenharmony_ci/* enum: Labels the lowest-numbered function visible to the OS */
32978c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY 0x0
32988c2ecf20Sopenharmony_ci/* enum: The function can control the link state of the physical port it is
32998c2ecf20Sopenharmony_ci * bound to.
33008c2ecf20Sopenharmony_ci */
33018c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL 0x1
33028c2ecf20Sopenharmony_ci/* enum: The function can perform privileged operations */
33038c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED 0x2
33048c2ecf20Sopenharmony_ci/* enum: The function does not have an active port associated with it. The port
33058c2ecf20Sopenharmony_ci * refers to the Sorrento external FPGA port.
33068c2ecf20Sopenharmony_ci */
33078c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_NO_ACTIVE_PORT 0x3
33088c2ecf20Sopenharmony_ci/* enum: If set, indicates that VI spreading is currently enabled. Will always
33098c2ecf20Sopenharmony_ci * indicate the current state, regardless of the value in the WANT_VI_SPREADING
33108c2ecf20Sopenharmony_ci * input.
33118c2ecf20Sopenharmony_ci */
33128c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_VI_SPREADING_ENABLED 0x4
33138c2ecf20Sopenharmony_ci/* enum: Used during development only. Should no longer be used. */
33148c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_RX_VI_SPREADING_INHIBITED 0x5
33158c2ecf20Sopenharmony_ci/* enum: If set, indicates that TX only spreading is enabled. Even-numbered
33168c2ecf20Sopenharmony_ci * TXQs will use one engine, and odd-numbered TXQs will use the other. This
33178c2ecf20Sopenharmony_ci * also has the effect that only even-numbered RXQs will receive traffic.
33188c2ecf20Sopenharmony_ci */
33198c2ecf20Sopenharmony_ci#define          MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TX_ONLY_VI_SPREADING_ENABLED 0x5
33208c2ecf20Sopenharmony_ci
33218c2ecf20Sopenharmony_ci
33228c2ecf20Sopenharmony_ci/***********************************/
33238c2ecf20Sopenharmony_ci/* MC_CMD_SHMUART
33248c2ecf20Sopenharmony_ci * Route UART output to circular buffer in shared memory instead.
33258c2ecf20Sopenharmony_ci */
33268c2ecf20Sopenharmony_ci#define MC_CMD_SHMUART 0x1f
33278c2ecf20Sopenharmony_ci
33288c2ecf20Sopenharmony_ci/* MC_CMD_SHMUART_IN msgrequest */
33298c2ecf20Sopenharmony_ci#define    MC_CMD_SHMUART_IN_LEN 4
33308c2ecf20Sopenharmony_ci/* ??? */
33318c2ecf20Sopenharmony_ci#define       MC_CMD_SHMUART_IN_FLAG_OFST 0
33328c2ecf20Sopenharmony_ci#define       MC_CMD_SHMUART_IN_FLAG_LEN 4
33338c2ecf20Sopenharmony_ci
33348c2ecf20Sopenharmony_ci/* MC_CMD_SHMUART_OUT msgresponse */
33358c2ecf20Sopenharmony_ci#define    MC_CMD_SHMUART_OUT_LEN 0
33368c2ecf20Sopenharmony_ci
33378c2ecf20Sopenharmony_ci
33388c2ecf20Sopenharmony_ci/***********************************/
33398c2ecf20Sopenharmony_ci/* MC_CMD_PORT_RESET
33408c2ecf20Sopenharmony_ci * Generic per-port reset. There is no equivalent for per-board reset. Locks
33418c2ecf20Sopenharmony_ci * required: None; Return code: 0, ETIME. NOTE: This command is deprecated -
33428c2ecf20Sopenharmony_ci * use MC_CMD_ENTITY_RESET instead.
33438c2ecf20Sopenharmony_ci */
33448c2ecf20Sopenharmony_ci#define MC_CMD_PORT_RESET 0x20
33458c2ecf20Sopenharmony_ci#undef MC_CMD_0x20_PRIVILEGE_CTG
33468c2ecf20Sopenharmony_ci
33478c2ecf20Sopenharmony_ci#define MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL
33488c2ecf20Sopenharmony_ci
33498c2ecf20Sopenharmony_ci/* MC_CMD_PORT_RESET_IN msgrequest */
33508c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_RESET_IN_LEN 0
33518c2ecf20Sopenharmony_ci
33528c2ecf20Sopenharmony_ci/* MC_CMD_PORT_RESET_OUT msgresponse */
33538c2ecf20Sopenharmony_ci#define    MC_CMD_PORT_RESET_OUT_LEN 0
33548c2ecf20Sopenharmony_ci
33558c2ecf20Sopenharmony_ci
33568c2ecf20Sopenharmony_ci/***********************************/
33578c2ecf20Sopenharmony_ci/* MC_CMD_ENTITY_RESET
33588c2ecf20Sopenharmony_ci * Generic per-resource reset. There is no equivalent for per-board reset.
33598c2ecf20Sopenharmony_ci * Locks required: None; Return code: 0, ETIME. NOTE: This command is an
33608c2ecf20Sopenharmony_ci * extended version of the deprecated MC_CMD_PORT_RESET with added fields.
33618c2ecf20Sopenharmony_ci */
33628c2ecf20Sopenharmony_ci#define MC_CMD_ENTITY_RESET 0x20
33638c2ecf20Sopenharmony_ci/*      MC_CMD_0x20_PRIVILEGE_CTG SRIOV_CTG_GENERAL */
33648c2ecf20Sopenharmony_ci
33658c2ecf20Sopenharmony_ci/* MC_CMD_ENTITY_RESET_IN msgrequest */
33668c2ecf20Sopenharmony_ci#define    MC_CMD_ENTITY_RESET_IN_LEN 4
33678c2ecf20Sopenharmony_ci/* Optional flags field. Omitting this will perform a "legacy" reset action
33688c2ecf20Sopenharmony_ci * (TBD).
33698c2ecf20Sopenharmony_ci */
33708c2ecf20Sopenharmony_ci#define       MC_CMD_ENTITY_RESET_IN_FLAG_OFST 0
33718c2ecf20Sopenharmony_ci#define       MC_CMD_ENTITY_RESET_IN_FLAG_LEN 4
33728c2ecf20Sopenharmony_ci#define        MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_OFST 0
33738c2ecf20Sopenharmony_ci#define        MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_LBN 0
33748c2ecf20Sopenharmony_ci#define        MC_CMD_ENTITY_RESET_IN_FUNCTION_RESOURCE_RESET_WIDTH 1
33758c2ecf20Sopenharmony_ci
33768c2ecf20Sopenharmony_ci/* MC_CMD_ENTITY_RESET_OUT msgresponse */
33778c2ecf20Sopenharmony_ci#define    MC_CMD_ENTITY_RESET_OUT_LEN 0
33788c2ecf20Sopenharmony_ci
33798c2ecf20Sopenharmony_ci
33808c2ecf20Sopenharmony_ci/***********************************/
33818c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_CREDITS
33828c2ecf20Sopenharmony_ci * Read instantaneous and minimum flow control thresholds.
33838c2ecf20Sopenharmony_ci */
33848c2ecf20Sopenharmony_ci#define MC_CMD_PCIE_CREDITS 0x21
33858c2ecf20Sopenharmony_ci
33868c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_CREDITS_IN msgrequest */
33878c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_CREDITS_IN_LEN 8
33888c2ecf20Sopenharmony_ci/* poll period. 0 is disabled */
33898c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_OFST 0
33908c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_IN_POLL_PERIOD_LEN 4
33918c2ecf20Sopenharmony_ci/* wipe statistics */
33928c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_IN_WIPE_OFST 4
33938c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_IN_WIPE_LEN 4
33948c2ecf20Sopenharmony_ci
33958c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_CREDITS_OUT msgresponse */
33968c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_CREDITS_OUT_LEN 16
33978c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_OFST 0
33988c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_HDR_LEN 2
33998c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_OFST 2
34008c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_P_DATA_LEN 2
34018c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_OFST 4
34028c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_HDR_LEN 2
34038c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_OFST 6
34048c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_CURRENT_NP_DATA_LEN 2
34058c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_OFST 8
34068c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_HDR_LEN 2
34078c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_OFST 10
34088c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_P_DATA_LEN 2
34098c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_OFST 12
34108c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_HDR_LEN 2
34118c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_OFST 14
34128c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_CREDITS_OUT_MINIMUM_NP_DATA_LEN 2
34138c2ecf20Sopenharmony_ci
34148c2ecf20Sopenharmony_ci
34158c2ecf20Sopenharmony_ci/***********************************/
34168c2ecf20Sopenharmony_ci/* MC_CMD_RXD_MONITOR
34178c2ecf20Sopenharmony_ci * Get histogram of RX queue fill level.
34188c2ecf20Sopenharmony_ci */
34198c2ecf20Sopenharmony_ci#define MC_CMD_RXD_MONITOR 0x22
34208c2ecf20Sopenharmony_ci
34218c2ecf20Sopenharmony_ci/* MC_CMD_RXD_MONITOR_IN msgrequest */
34228c2ecf20Sopenharmony_ci#define    MC_CMD_RXD_MONITOR_IN_LEN 12
34238c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_IN_QID_OFST 0
34248c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_IN_QID_LEN 4
34258c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_OFST 4
34268c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_IN_POLL_PERIOD_LEN 4
34278c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_IN_WIPE_OFST 8
34288c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_IN_WIPE_LEN 4
34298c2ecf20Sopenharmony_ci
34308c2ecf20Sopenharmony_ci/* MC_CMD_RXD_MONITOR_OUT msgresponse */
34318c2ecf20Sopenharmony_ci#define    MC_CMD_RXD_MONITOR_OUT_LEN 80
34328c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_QID_OFST 0
34338c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_QID_LEN 4
34348c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_FILL_OFST 4
34358c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_FILL_LEN 4
34368c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_OFST 8
34378c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_FILL_LEN 4
34388c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_1_OFST 12
34398c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_1_LEN 4
34408c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_2_OFST 16
34418c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_2_LEN 4
34428c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_4_OFST 20
34438c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_4_LEN 4
34448c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_8_OFST 24
34458c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_8_LEN 4
34468c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_16_OFST 28
34478c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_16_LEN 4
34488c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_32_OFST 32
34498c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_32_LEN 4
34508c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_64_OFST 36
34518c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_64_LEN 4
34528c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_128_OFST 40
34538c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_128_LEN 4
34548c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_256_OFST 44
34558c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_LT_256_LEN 4
34568c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_GE_256_OFST 48
34578c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_RING_GE_256_LEN 4
34588c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_OFST 52
34598c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_1_LEN 4
34608c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_OFST 56
34618c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_2_LEN 4
34628c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_OFST 60
34638c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_4_LEN 4
34648c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_OFST 64
34658c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_8_LEN 4
34668c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_OFST 68
34678c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_16_LEN 4
34688c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_OFST 72
34698c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_LT_32_LEN 4
34708c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_OFST 76
34718c2ecf20Sopenharmony_ci#define       MC_CMD_RXD_MONITOR_OUT_CACHE_GE_32_LEN 4
34728c2ecf20Sopenharmony_ci
34738c2ecf20Sopenharmony_ci
34748c2ecf20Sopenharmony_ci/***********************************/
34758c2ecf20Sopenharmony_ci/* MC_CMD_PUTS
34768c2ecf20Sopenharmony_ci * Copy the given ASCII string out onto UART and/or out of the network port.
34778c2ecf20Sopenharmony_ci */
34788c2ecf20Sopenharmony_ci#define MC_CMD_PUTS 0x23
34798c2ecf20Sopenharmony_ci#undef MC_CMD_0x23_PRIVILEGE_CTG
34808c2ecf20Sopenharmony_ci
34818c2ecf20Sopenharmony_ci#define MC_CMD_0x23_PRIVILEGE_CTG SRIOV_CTG_INSECURE
34828c2ecf20Sopenharmony_ci
34838c2ecf20Sopenharmony_ci/* MC_CMD_PUTS_IN msgrequest */
34848c2ecf20Sopenharmony_ci#define    MC_CMD_PUTS_IN_LENMIN 13
34858c2ecf20Sopenharmony_ci#define    MC_CMD_PUTS_IN_LENMAX 252
34868c2ecf20Sopenharmony_ci#define    MC_CMD_PUTS_IN_LENMAX_MCDI2 1020
34878c2ecf20Sopenharmony_ci#define    MC_CMD_PUTS_IN_LEN(num) (12+1*(num))
34888c2ecf20Sopenharmony_ci#define    MC_CMD_PUTS_IN_STRING_NUM(len) (((len)-12)/1)
34898c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_DEST_OFST 0
34908c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_DEST_LEN 4
34918c2ecf20Sopenharmony_ci#define        MC_CMD_PUTS_IN_UART_OFST 0
34928c2ecf20Sopenharmony_ci#define        MC_CMD_PUTS_IN_UART_LBN 0
34938c2ecf20Sopenharmony_ci#define        MC_CMD_PUTS_IN_UART_WIDTH 1
34948c2ecf20Sopenharmony_ci#define        MC_CMD_PUTS_IN_PORT_OFST 0
34958c2ecf20Sopenharmony_ci#define        MC_CMD_PUTS_IN_PORT_LBN 1
34968c2ecf20Sopenharmony_ci#define        MC_CMD_PUTS_IN_PORT_WIDTH 1
34978c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_DHOST_OFST 4
34988c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_DHOST_LEN 6
34998c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_STRING_OFST 12
35008c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_STRING_LEN 1
35018c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_STRING_MINNUM 1
35028c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_STRING_MAXNUM 240
35038c2ecf20Sopenharmony_ci#define       MC_CMD_PUTS_IN_STRING_MAXNUM_MCDI2 1008
35048c2ecf20Sopenharmony_ci
35058c2ecf20Sopenharmony_ci/* MC_CMD_PUTS_OUT msgresponse */
35068c2ecf20Sopenharmony_ci#define    MC_CMD_PUTS_OUT_LEN 0
35078c2ecf20Sopenharmony_ci
35088c2ecf20Sopenharmony_ci
35098c2ecf20Sopenharmony_ci/***********************************/
35108c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_CFG
35118c2ecf20Sopenharmony_ci * Report PHY configuration. This guarantees to succeed even if the PHY is in a
35128c2ecf20Sopenharmony_ci * 'zombie' state. Locks required: None
35138c2ecf20Sopenharmony_ci */
35148c2ecf20Sopenharmony_ci#define MC_CMD_GET_PHY_CFG 0x24
35158c2ecf20Sopenharmony_ci#undef MC_CMD_0x24_PRIVILEGE_CTG
35168c2ecf20Sopenharmony_ci
35178c2ecf20Sopenharmony_ci#define MC_CMD_0x24_PRIVILEGE_CTG SRIOV_CTG_GENERAL
35188c2ecf20Sopenharmony_ci
35198c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_CFG_IN msgrequest */
35208c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_CFG_IN_LEN 0
35218c2ecf20Sopenharmony_ci
35228c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_CFG_OUT msgresponse */
35238c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_CFG_OUT_LEN 72
35248c2ecf20Sopenharmony_ci/* flags */
35258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_FLAGS_OFST 0
35268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_FLAGS_LEN 4
35278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_PRESENT_OFST 0
35288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_PRESENT_LBN 0
35298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_PRESENT_WIDTH 1
35308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_OFST 0
35318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_LBN 1
35328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_SHORT_WIDTH 1
35338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_OFST 0
35348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_LBN 2
35358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_CABLE_LONG_WIDTH 1
35368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_OFST 0
35378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_LBN 3
35388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_LOWPOWER_WIDTH 1
35398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_POWEROFF_OFST 0
35408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_POWEROFF_LBN 4
35418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_POWEROFF_WIDTH 1
35428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_TXDIS_OFST 0
35438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_TXDIS_LBN 5
35448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_TXDIS_WIDTH 1
35458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_OFST 0
35468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_LBN 6
35478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PHY_CFG_OUT_BIST_WIDTH 1
35488c2ecf20Sopenharmony_ci/* ?? */
35498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_TYPE_OFST 4
35508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_TYPE_LEN 4
35518c2ecf20Sopenharmony_ci/* Bitmask of supported capabilities */
35528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_OFST 8
35538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_SUPPORTED_CAP_LEN 4
35548c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10HDX_OFST 8
35558c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10HDX_LBN 1
35568c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10HDX_WIDTH 1
35578c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10FDX_OFST 8
35588c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10FDX_LBN 2
35598c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10FDX_WIDTH 1
35608c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100HDX_OFST 8
35618c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100HDX_LBN 3
35628c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100HDX_WIDTH 1
35638c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100FDX_OFST 8
35648c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100FDX_LBN 4
35658c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100FDX_WIDTH 1
35668c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_1000HDX_OFST 8
35678c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_1000HDX_LBN 5
35688c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_1000HDX_WIDTH 1
35698c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_1000FDX_OFST 8
35708c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_1000FDX_LBN 6
35718c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_1000FDX_WIDTH 1
35728c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10000FDX_OFST 8
35738c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10000FDX_LBN 7
35748c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_10000FDX_WIDTH 1
35758c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_PAUSE_OFST 8
35768c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_PAUSE_LBN 8
35778c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_PAUSE_WIDTH 1
35788c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_ASYM_OFST 8
35798c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_ASYM_LBN 9
35808c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_ASYM_WIDTH 1
35818c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_AN_OFST 8
35828c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_AN_LBN 10
35838c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_AN_WIDTH 1
35848c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_40000FDX_OFST 8
35858c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_40000FDX_LBN 11
35868c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_40000FDX_WIDTH 1
35878c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_DDM_OFST 8
35888c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_DDM_LBN 12
35898c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_DDM_WIDTH 1
35908c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100000FDX_OFST 8
35918c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100000FDX_LBN 13
35928c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_100000FDX_WIDTH 1
35938c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25000FDX_OFST 8
35948c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25000FDX_LBN 14
35958c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25000FDX_WIDTH 1
35968c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_50000FDX_OFST 8
35978c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_50000FDX_LBN 15
35988c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_50000FDX_WIDTH 1
35998c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_BASER_FEC_OFST 8
36008c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_BASER_FEC_LBN 16
36018c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_BASER_FEC_WIDTH 1
36028c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_OFST 8
36038c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_LBN 17
36048c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_BASER_FEC_REQUESTED_WIDTH 1
36058c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_RS_FEC_OFST 8
36068c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_RS_FEC_LBN 18
36078c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_RS_FEC_WIDTH 1
36088c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_RS_FEC_REQUESTED_OFST 8
36098c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_RS_FEC_REQUESTED_LBN 19
36108c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_RS_FEC_REQUESTED_WIDTH 1
36118c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25G_BASER_FEC_OFST 8
36128c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25G_BASER_FEC_LBN 20
36138c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25G_BASER_FEC_WIDTH 1
36148c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_OFST 8
36158c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_LBN 21
36168c2ecf20Sopenharmony_ci#define        MC_CMD_PHY_CAP_25G_BASER_FEC_REQUESTED_WIDTH 1
36178c2ecf20Sopenharmony_ci/* ?? */
36188c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_CHANNEL_OFST 12
36198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_CHANNEL_LEN 4
36208c2ecf20Sopenharmony_ci/* ?? */
36218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_PRT_OFST 16
36228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_PRT_LEN 4
36238c2ecf20Sopenharmony_ci/* ?? */
36248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_OFST 20
36258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_STATS_MASK_LEN 4
36268c2ecf20Sopenharmony_ci/* ?? */
36278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_NAME_OFST 24
36288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_NAME_LEN 20
36298c2ecf20Sopenharmony_ci/* ?? */
36308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_OFST 44
36318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_MEDIA_TYPE_LEN 4
36328c2ecf20Sopenharmony_ci/* enum: Xaui. */
36338c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_XAUI 0x1
36348c2ecf20Sopenharmony_ci/* enum: CX4. */
36358c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_CX4 0x2
36368c2ecf20Sopenharmony_ci/* enum: KX4. */
36378c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_KX4 0x3
36388c2ecf20Sopenharmony_ci/* enum: XFP Far. */
36398c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_XFP 0x4
36408c2ecf20Sopenharmony_ci/* enum: SFP+. */
36418c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_SFP_PLUS 0x5
36428c2ecf20Sopenharmony_ci/* enum: 10GBaseT. */
36438c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_BASE_T 0x6
36448c2ecf20Sopenharmony_ci/* enum: QSFP+. */
36458c2ecf20Sopenharmony_ci#define          MC_CMD_MEDIA_QSFP_PLUS 0x7
36468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_OFST 48
36478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_MMD_MASK_LEN 4
36488c2ecf20Sopenharmony_ci/* enum: Native clause 22 */
36498c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE22 0x0
36508c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_PMAPMD 0x1 /* enum */
36518c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_WIS 0x2 /* enum */
36528c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_PCS 0x3 /* enum */
36538c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_PHYXS 0x4 /* enum */
36548c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_DTEXS 0x5 /* enum */
36558c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_TC 0x6 /* enum */
36568c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_AN 0x7 /* enum */
36578c2ecf20Sopenharmony_ci/* enum: Clause22 proxied over clause45 by PHY. */
36588c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_C22EXT 0x1d
36598c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_VEND1 0x1e /* enum */
36608c2ecf20Sopenharmony_ci#define          MC_CMD_MMD_CLAUSE45_VEND2 0x1f /* enum */
36618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_REVISION_OFST 52
36628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_CFG_OUT_REVISION_LEN 20
36638c2ecf20Sopenharmony_ci
36648c2ecf20Sopenharmony_ci
36658c2ecf20Sopenharmony_ci/***********************************/
36668c2ecf20Sopenharmony_ci/* MC_CMD_START_BIST
36678c2ecf20Sopenharmony_ci * Start a BIST test on the PHY. Locks required: PHY_LOCK if doing a PHY BIST
36688c2ecf20Sopenharmony_ci * Return code: 0, EINVAL, EACCES (if PHY_LOCK is not held)
36698c2ecf20Sopenharmony_ci */
36708c2ecf20Sopenharmony_ci#define MC_CMD_START_BIST 0x25
36718c2ecf20Sopenharmony_ci#undef MC_CMD_0x25_PRIVILEGE_CTG
36728c2ecf20Sopenharmony_ci
36738c2ecf20Sopenharmony_ci#define MC_CMD_0x25_PRIVILEGE_CTG SRIOV_CTG_ADMIN
36748c2ecf20Sopenharmony_ci
36758c2ecf20Sopenharmony_ci/* MC_CMD_START_BIST_IN msgrequest */
36768c2ecf20Sopenharmony_ci#define    MC_CMD_START_BIST_IN_LEN 4
36778c2ecf20Sopenharmony_ci/* Type of test. */
36788c2ecf20Sopenharmony_ci#define       MC_CMD_START_BIST_IN_TYPE_OFST 0
36798c2ecf20Sopenharmony_ci#define       MC_CMD_START_BIST_IN_TYPE_LEN 4
36808c2ecf20Sopenharmony_ci/* enum: Run the PHY's short cable BIST. */
36818c2ecf20Sopenharmony_ci#define          MC_CMD_PHY_BIST_CABLE_SHORT 0x1
36828c2ecf20Sopenharmony_ci/* enum: Run the PHY's long cable BIST. */
36838c2ecf20Sopenharmony_ci#define          MC_CMD_PHY_BIST_CABLE_LONG 0x2
36848c2ecf20Sopenharmony_ci/* enum: Run BIST on the currently selected BPX Serdes (XAUI or XFI) . */
36858c2ecf20Sopenharmony_ci#define          MC_CMD_BPX_SERDES_BIST 0x3
36868c2ecf20Sopenharmony_ci/* enum: Run the MC loopback tests. */
36878c2ecf20Sopenharmony_ci#define          MC_CMD_MC_LOOPBACK_BIST 0x4
36888c2ecf20Sopenharmony_ci/* enum: Run the PHY's standard BIST. */
36898c2ecf20Sopenharmony_ci#define          MC_CMD_PHY_BIST 0x5
36908c2ecf20Sopenharmony_ci/* enum: Run MC RAM test. */
36918c2ecf20Sopenharmony_ci#define          MC_CMD_MC_MEM_BIST 0x6
36928c2ecf20Sopenharmony_ci/* enum: Run Port RAM test. */
36938c2ecf20Sopenharmony_ci#define          MC_CMD_PORT_MEM_BIST 0x7
36948c2ecf20Sopenharmony_ci/* enum: Run register test. */
36958c2ecf20Sopenharmony_ci#define          MC_CMD_REG_BIST 0x8
36968c2ecf20Sopenharmony_ci
36978c2ecf20Sopenharmony_ci/* MC_CMD_START_BIST_OUT msgresponse */
36988c2ecf20Sopenharmony_ci#define    MC_CMD_START_BIST_OUT_LEN 0
36998c2ecf20Sopenharmony_ci
37008c2ecf20Sopenharmony_ci
37018c2ecf20Sopenharmony_ci/***********************************/
37028c2ecf20Sopenharmony_ci/* MC_CMD_POLL_BIST
37038c2ecf20Sopenharmony_ci * Poll for BIST completion. Returns a single status code, and optionally some
37048c2ecf20Sopenharmony_ci * PHY specific bist output. The driver should only consume the BIST output
37058c2ecf20Sopenharmony_ci * after validating OUTLEN and MC_CMD_GET_PHY_CFG.TYPE. If a driver can't
37068c2ecf20Sopenharmony_ci * successfully parse the BIST output, it should still respect the pass/Fail in
37078c2ecf20Sopenharmony_ci * OUT.RESULT. Locks required: PHY_LOCK if doing a PHY BIST. Return code: 0,
37088c2ecf20Sopenharmony_ci * EACCES (if PHY_LOCK is not held).
37098c2ecf20Sopenharmony_ci */
37108c2ecf20Sopenharmony_ci#define MC_CMD_POLL_BIST 0x26
37118c2ecf20Sopenharmony_ci#undef MC_CMD_0x26_PRIVILEGE_CTG
37128c2ecf20Sopenharmony_ci
37138c2ecf20Sopenharmony_ci#define MC_CMD_0x26_PRIVILEGE_CTG SRIOV_CTG_ADMIN
37148c2ecf20Sopenharmony_ci
37158c2ecf20Sopenharmony_ci/* MC_CMD_POLL_BIST_IN msgrequest */
37168c2ecf20Sopenharmony_ci#define    MC_CMD_POLL_BIST_IN_LEN 0
37178c2ecf20Sopenharmony_ci
37188c2ecf20Sopenharmony_ci/* MC_CMD_POLL_BIST_OUT msgresponse */
37198c2ecf20Sopenharmony_ci#define    MC_CMD_POLL_BIST_OUT_LEN 8
37208c2ecf20Sopenharmony_ci/* result */
37218c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_RESULT_OFST 0
37228c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_RESULT_LEN 4
37238c2ecf20Sopenharmony_ci/* enum: Running. */
37248c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_RUNNING 0x1
37258c2ecf20Sopenharmony_ci/* enum: Passed. */
37268c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_PASSED 0x2
37278c2ecf20Sopenharmony_ci/* enum: Failed. */
37288c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_FAILED 0x3
37298c2ecf20Sopenharmony_ci/* enum: Timed-out. */
37308c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_TIMEOUT 0x4
37318c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_PRIVATE_OFST 4
37328c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_PRIVATE_LEN 4
37338c2ecf20Sopenharmony_ci
37348c2ecf20Sopenharmony_ci/* MC_CMD_POLL_BIST_OUT_SFT9001 msgresponse */
37358c2ecf20Sopenharmony_ci#define    MC_CMD_POLL_BIST_OUT_SFT9001_LEN 36
37368c2ecf20Sopenharmony_ci/* result */
37378c2ecf20Sopenharmony_ci/*            MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */
37388c2ecf20Sopenharmony_ci/*            MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */
37398c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
37408c2ecf20Sopenharmony_ci/*               MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */
37418c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_OFST 4
37428c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_A_LEN 4
37438c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_OFST 8
37448c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_B_LEN 4
37458c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_OFST 12
37468c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_C_LEN 4
37478c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_OFST 16
37488c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_LENGTH_D_LEN 4
37498c2ecf20Sopenharmony_ci/* Status of each channel A */
37508c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_OFST 20
37518c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_A_LEN 4
37528c2ecf20Sopenharmony_ci/* enum: Ok. */
37538c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_SFT9001_PAIR_OK 0x1
37548c2ecf20Sopenharmony_ci/* enum: Open. */
37558c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_SFT9001_PAIR_OPEN 0x2
37568c2ecf20Sopenharmony_ci/* enum: Intra-pair short. */
37578c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_SFT9001_INTRA_PAIR_SHORT 0x3
37588c2ecf20Sopenharmony_ci/* enum: Inter-pair short. */
37598c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_SFT9001_INTER_PAIR_SHORT 0x4
37608c2ecf20Sopenharmony_ci/* enum: Busy. */
37618c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_SFT9001_PAIR_BUSY 0x9
37628c2ecf20Sopenharmony_ci/* Status of each channel B */
37638c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_OFST 24
37648c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_B_LEN 4
37658c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
37668c2ecf20Sopenharmony_ci/*               CABLE_STATUS_A */
37678c2ecf20Sopenharmony_ci/* Status of each channel C */
37688c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_OFST 28
37698c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_C_LEN 4
37708c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
37718c2ecf20Sopenharmony_ci/*               CABLE_STATUS_A */
37728c2ecf20Sopenharmony_ci/* Status of each channel D */
37738c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_OFST 32
37748c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_SFT9001_CABLE_STATUS_D_LEN 4
37758c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
37768c2ecf20Sopenharmony_ci/*               CABLE_STATUS_A */
37778c2ecf20Sopenharmony_ci
37788c2ecf20Sopenharmony_ci/* MC_CMD_POLL_BIST_OUT_MRSFP msgresponse */
37798c2ecf20Sopenharmony_ci#define    MC_CMD_POLL_BIST_OUT_MRSFP_LEN 8
37808c2ecf20Sopenharmony_ci/* result */
37818c2ecf20Sopenharmony_ci/*            MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */
37828c2ecf20Sopenharmony_ci/*            MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */
37838c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
37848c2ecf20Sopenharmony_ci/*               MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */
37858c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MRSFP_TEST_OFST 4
37868c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MRSFP_TEST_LEN 4
37878c2ecf20Sopenharmony_ci/* enum: Complete. */
37888c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_COMPLETE 0x0
37898c2ecf20Sopenharmony_ci/* enum: Bus switch off I2C write. */
37908c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_WRITE 0x1
37918c2ecf20Sopenharmony_ci/* enum: Bus switch off I2C no access IO exp. */
37928c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_IO_EXP 0x2
37938c2ecf20Sopenharmony_ci/* enum: Bus switch off I2C no access module. */
37948c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_OFF_I2C_NO_ACCESS_MODULE 0x3
37958c2ecf20Sopenharmony_ci/* enum: IO exp I2C configure. */
37968c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_IO_EXP_I2C_CONFIGURE 0x4
37978c2ecf20Sopenharmony_ci/* enum: Bus switch I2C no cross talk. */
37988c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_BUS_SWITCH_I2C_NO_CROSSTALK 0x5
37998c2ecf20Sopenharmony_ci/* enum: Module presence. */
38008c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_PRESENCE 0x6
38018c2ecf20Sopenharmony_ci/* enum: Module ID I2C access. */
38028c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_I2C_ACCESS 0x7
38038c2ecf20Sopenharmony_ci/* enum: Module ID sane value. */
38048c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MRSFP_TEST_MODULE_ID_SANE_VALUE 0x8
38058c2ecf20Sopenharmony_ci
38068c2ecf20Sopenharmony_ci/* MC_CMD_POLL_BIST_OUT_MEM msgresponse */
38078c2ecf20Sopenharmony_ci#define    MC_CMD_POLL_BIST_OUT_MEM_LEN 36
38088c2ecf20Sopenharmony_ci/* result */
38098c2ecf20Sopenharmony_ci/*            MC_CMD_POLL_BIST_OUT_RESULT_OFST 0 */
38108c2ecf20Sopenharmony_ci/*            MC_CMD_POLL_BIST_OUT_RESULT_LEN 4 */
38118c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
38128c2ecf20Sopenharmony_ci/*               MC_CMD_POLL_BIST_OUT/MC_CMD_POLL_BIST_OUT_RESULT */
38138c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_TEST_OFST 4
38148c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_TEST_LEN 4
38158c2ecf20Sopenharmony_ci/* enum: Test has completed. */
38168c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_COMPLETE 0x0
38178c2ecf20Sopenharmony_ci/* enum: RAM test - walk ones. */
38188c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_MEM_WALK_ONES 0x1
38198c2ecf20Sopenharmony_ci/* enum: RAM test - walk zeros. */
38208c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_MEM_WALK_ZEROS 0x2
38218c2ecf20Sopenharmony_ci/* enum: RAM test - walking inversions zeros/ones. */
38228c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_MEM_INV_ZERO_ONE 0x3
38238c2ecf20Sopenharmony_ci/* enum: RAM test - walking inversions checkerboard. */
38248c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_MEM_INV_CHKBOARD 0x4
38258c2ecf20Sopenharmony_ci/* enum: Register test - set / clear individual bits. */
38268c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_REG 0x5
38278c2ecf20Sopenharmony_ci/* enum: ECC error detected. */
38288c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_ECC 0x6
38298c2ecf20Sopenharmony_ci/* Failure address, only valid if result is POLL_BIST_FAILED */
38308c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ADDR_OFST 8
38318c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ADDR_LEN 4
38328c2ecf20Sopenharmony_ci/* Bus or address space to which the failure address corresponds */
38338c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_BUS_OFST 12
38348c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_BUS_LEN 4
38358c2ecf20Sopenharmony_ci/* enum: MC MIPS bus. */
38368c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_MC 0x0
38378c2ecf20Sopenharmony_ci/* enum: CSR IREG bus. */
38388c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_CSR 0x1
38398c2ecf20Sopenharmony_ci/* enum: RX0 DPCPU bus. */
38408c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX 0x2
38418c2ecf20Sopenharmony_ci/* enum: TX0 DPCPU bus. */
38428c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX0 0x3
38438c2ecf20Sopenharmony_ci/* enum: TX1 DPCPU bus. */
38448c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DPCPU_TX1 0x4
38458c2ecf20Sopenharmony_ci/* enum: RX0 DICPU bus. */
38468c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX 0x5
38478c2ecf20Sopenharmony_ci/* enum: TX DICPU bus. */
38488c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DICPU_TX 0x6
38498c2ecf20Sopenharmony_ci/* enum: RX1 DPCPU bus. */
38508c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DPCPU_RX1 0x7
38518c2ecf20Sopenharmony_ci/* enum: RX1 DICPU bus. */
38528c2ecf20Sopenharmony_ci#define          MC_CMD_POLL_BIST_MEM_BUS_DICPU_RX1 0x8
38538c2ecf20Sopenharmony_ci/* Pattern written to RAM / register */
38548c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_EXPECT_OFST 16
38558c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_EXPECT_LEN 4
38568c2ecf20Sopenharmony_ci/* Actual value read from RAM / register */
38578c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_OFST 20
38588c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ACTUAL_LEN 4
38598c2ecf20Sopenharmony_ci/* ECC error mask */
38608c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ECC_OFST 24
38618c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ECC_LEN 4
38628c2ecf20Sopenharmony_ci/* ECC parity error mask */
38638c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_OFST 28
38648c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ECC_PARITY_LEN 4
38658c2ecf20Sopenharmony_ci/* ECC fatal error mask */
38668c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_OFST 32
38678c2ecf20Sopenharmony_ci#define       MC_CMD_POLL_BIST_OUT_MEM_ECC_FATAL_LEN 4
38688c2ecf20Sopenharmony_ci
38698c2ecf20Sopenharmony_ci
38708c2ecf20Sopenharmony_ci/***********************************/
38718c2ecf20Sopenharmony_ci/* MC_CMD_FLUSH_RX_QUEUES
38728c2ecf20Sopenharmony_ci * Flush receive queue(s). If SRIOV is enabled (via MC_CMD_SRIOV), then RXQ
38738c2ecf20Sopenharmony_ci * flushes should be initiated via this MCDI operation, rather than via
38748c2ecf20Sopenharmony_ci * directly writing FLUSH_CMD.
38758c2ecf20Sopenharmony_ci *
38768c2ecf20Sopenharmony_ci * The flush is completed (either done/fail) asynchronously (after this command
38778c2ecf20Sopenharmony_ci * returns). The driver must still wait for flush done/failure events as usual.
38788c2ecf20Sopenharmony_ci */
38798c2ecf20Sopenharmony_ci#define MC_CMD_FLUSH_RX_QUEUES 0x27
38808c2ecf20Sopenharmony_ci
38818c2ecf20Sopenharmony_ci/* MC_CMD_FLUSH_RX_QUEUES_IN msgrequest */
38828c2ecf20Sopenharmony_ci#define    MC_CMD_FLUSH_RX_QUEUES_IN_LENMIN 4
38838c2ecf20Sopenharmony_ci#define    MC_CMD_FLUSH_RX_QUEUES_IN_LENMAX 252
38848c2ecf20Sopenharmony_ci#define    MC_CMD_FLUSH_RX_QUEUES_IN_LENMAX_MCDI2 1020
38858c2ecf20Sopenharmony_ci#define    MC_CMD_FLUSH_RX_QUEUES_IN_LEN(num) (0+4*(num))
38868c2ecf20Sopenharmony_ci#define    MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_NUM(len) (((len)-0)/4)
38878c2ecf20Sopenharmony_ci#define       MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_OFST 0
38888c2ecf20Sopenharmony_ci#define       MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_LEN 4
38898c2ecf20Sopenharmony_ci#define       MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MINNUM 1
38908c2ecf20Sopenharmony_ci#define       MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM 63
38918c2ecf20Sopenharmony_ci#define       MC_CMD_FLUSH_RX_QUEUES_IN_QID_OFST_MAXNUM_MCDI2 255
38928c2ecf20Sopenharmony_ci
38938c2ecf20Sopenharmony_ci/* MC_CMD_FLUSH_RX_QUEUES_OUT msgresponse */
38948c2ecf20Sopenharmony_ci#define    MC_CMD_FLUSH_RX_QUEUES_OUT_LEN 0
38958c2ecf20Sopenharmony_ci
38968c2ecf20Sopenharmony_ci
38978c2ecf20Sopenharmony_ci/***********************************/
38988c2ecf20Sopenharmony_ci/* MC_CMD_GET_LOOPBACK_MODES
38998c2ecf20Sopenharmony_ci * Returns a bitmask of loopback modes available at each speed.
39008c2ecf20Sopenharmony_ci */
39018c2ecf20Sopenharmony_ci#define MC_CMD_GET_LOOPBACK_MODES 0x28
39028c2ecf20Sopenharmony_ci#undef MC_CMD_0x28_PRIVILEGE_CTG
39038c2ecf20Sopenharmony_ci
39048c2ecf20Sopenharmony_ci#define MC_CMD_0x28_PRIVILEGE_CTG SRIOV_CTG_GENERAL
39058c2ecf20Sopenharmony_ci
39068c2ecf20Sopenharmony_ci/* MC_CMD_GET_LOOPBACK_MODES_IN msgrequest */
39078c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LOOPBACK_MODES_IN_LEN 0
39088c2ecf20Sopenharmony_ci
39098c2ecf20Sopenharmony_ci/* MC_CMD_GET_LOOPBACK_MODES_OUT msgresponse */
39108c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LOOPBACK_MODES_OUT_LEN 40
39118c2ecf20Sopenharmony_ci/* Supported loopbacks. */
39128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_100M_OFST 0
39138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LEN 8
39148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_100M_LO_OFST 0
39158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_100M_HI_OFST 4
39168c2ecf20Sopenharmony_ci/* enum: None. */
39178c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_NONE 0x0
39188c2ecf20Sopenharmony_ci/* enum: Data. */
39198c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_DATA 0x1
39208c2ecf20Sopenharmony_ci/* enum: GMAC. */
39218c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_GMAC 0x2
39228c2ecf20Sopenharmony_ci/* enum: XGMII. */
39238c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XGMII 0x3
39248c2ecf20Sopenharmony_ci/* enum: XGXS. */
39258c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XGXS 0x4
39268c2ecf20Sopenharmony_ci/* enum: XAUI. */
39278c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XAUI 0x5
39288c2ecf20Sopenharmony_ci/* enum: GMII. */
39298c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_GMII 0x6
39308c2ecf20Sopenharmony_ci/* enum: SGMII. */
39318c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SGMII 0x7
39328c2ecf20Sopenharmony_ci/* enum: XGBR. */
39338c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XGBR 0x8
39348c2ecf20Sopenharmony_ci/* enum: XFI. */
39358c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XFI 0x9
39368c2ecf20Sopenharmony_ci/* enum: XAUI Far. */
39378c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XAUI_FAR 0xa
39388c2ecf20Sopenharmony_ci/* enum: GMII Far. */
39398c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_GMII_FAR 0xb
39408c2ecf20Sopenharmony_ci/* enum: SGMII Far. */
39418c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SGMII_FAR 0xc
39428c2ecf20Sopenharmony_ci/* enum: XFI Far. */
39438c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XFI_FAR 0xd
39448c2ecf20Sopenharmony_ci/* enum: GPhy. */
39458c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_GPHY 0xe
39468c2ecf20Sopenharmony_ci/* enum: PhyXS. */
39478c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_PHYXS 0xf
39488c2ecf20Sopenharmony_ci/* enum: PCS. */
39498c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_PCS 0x10
39508c2ecf20Sopenharmony_ci/* enum: PMA-PMD. */
39518c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_PMAPMD 0x11
39528c2ecf20Sopenharmony_ci/* enum: Cross-Port. */
39538c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XPORT 0x12
39548c2ecf20Sopenharmony_ci/* enum: XGMII-Wireside. */
39558c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XGMII_WS 0x13
39568c2ecf20Sopenharmony_ci/* enum: XAUI Wireside. */
39578c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XAUI_WS 0x14
39588c2ecf20Sopenharmony_ci/* enum: XAUI Wireside Far. */
39598c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XAUI_WS_FAR 0x15
39608c2ecf20Sopenharmony_ci/* enum: XAUI Wireside near. */
39618c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XAUI_WS_NEAR 0x16
39628c2ecf20Sopenharmony_ci/* enum: GMII Wireside. */
39638c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_GMII_WS 0x17
39648c2ecf20Sopenharmony_ci/* enum: XFI Wireside. */
39658c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XFI_WS 0x18
39668c2ecf20Sopenharmony_ci/* enum: XFI Wireside Far. */
39678c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_XFI_WS_FAR 0x19
39688c2ecf20Sopenharmony_ci/* enum: PhyXS Wireside. */
39698c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_PHYXS_WS 0x1a
39708c2ecf20Sopenharmony_ci/* enum: PMA lanes MAC-Serdes. */
39718c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_PMA_INT 0x1b
39728c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel (Encoder). */
39738c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SD_NEAR 0x1c
39748c2ecf20Sopenharmony_ci/* enum: KR Serdes Serial. */
39758c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SD_FAR 0x1d
39768c2ecf20Sopenharmony_ci/* enum: PMA lanes MAC-Serdes Wireside. */
39778c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_PMA_INT_WS 0x1e
39788c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel Wireside (Full PCS). */
39798c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SD_FEP2_WS 0x1f
39808c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */
39818c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SD_FEP1_5_WS 0x20
39828c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */
39838c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SD_FEP_WS 0x21
39848c2ecf20Sopenharmony_ci/* enum: KR Serdes Serial Wireside. */
39858c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_SD_FES_WS 0x22
39868c2ecf20Sopenharmony_ci/* enum: Near side of AOE Siena side port */
39878c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_AOE_INT_NEAR 0x23
39888c2ecf20Sopenharmony_ci/* enum: Medford Wireside datapath loopback */
39898c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_DATA_WS 0x24
39908c2ecf20Sopenharmony_ci/* enum: Force link up without setting up any physical loopback (snapper use
39918c2ecf20Sopenharmony_ci * only)
39928c2ecf20Sopenharmony_ci */
39938c2ecf20Sopenharmony_ci#define          MC_CMD_LOOPBACK_FORCE_EXT_LINK 0x25
39948c2ecf20Sopenharmony_ci/* Supported loopbacks. */
39958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_1G_OFST 8
39968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LEN 8
39978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_1G_LO_OFST 8
39988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_1G_HI_OFST 12
39998c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
40008c2ecf20Sopenharmony_ci/*               100M */
40018c2ecf20Sopenharmony_ci/* Supported loopbacks. */
40028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_10G_OFST 16
40038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LEN 8
40048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_10G_LO_OFST 16
40058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_10G_HI_OFST 20
40068c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
40078c2ecf20Sopenharmony_ci/*               100M */
40088c2ecf20Sopenharmony_ci/* Supported loopbacks. */
40098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_OFST 24
40108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LEN 8
40118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_LO_OFST 24
40128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_SUGGESTED_HI_OFST 28
40138c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
40148c2ecf20Sopenharmony_ci/*               100M */
40158c2ecf20Sopenharmony_ci/* Supported loopbacks. */
40168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_40G_OFST 32
40178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LEN 8
40188c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_40G_LO_OFST 32
40198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_40G_HI_OFST 36
40208c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
40218c2ecf20Sopenharmony_ci/*               100M */
40228c2ecf20Sopenharmony_ci
40238c2ecf20Sopenharmony_ci/* MC_CMD_GET_LOOPBACK_MODES_OUT_V2 msgresponse: Supported loopback modes for
40248c2ecf20Sopenharmony_ci * newer NICs with 25G/50G/100G support
40258c2ecf20Sopenharmony_ci */
40268c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LOOPBACK_MODES_OUT_V2_LEN 64
40278c2ecf20Sopenharmony_ci/* Supported loopbacks. */
40288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_OFST 0
40298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_LEN 8
40308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_LO_OFST 0
40318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100M_HI_OFST 4
40328c2ecf20Sopenharmony_ci/* enum: None. */
40338c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_NONE 0x0 */
40348c2ecf20Sopenharmony_ci/* enum: Data. */
40358c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_DATA 0x1 */
40368c2ecf20Sopenharmony_ci/* enum: GMAC. */
40378c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_GMAC 0x2 */
40388c2ecf20Sopenharmony_ci/* enum: XGMII. */
40398c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XGMII 0x3 */
40408c2ecf20Sopenharmony_ci/* enum: XGXS. */
40418c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XGXS 0x4 */
40428c2ecf20Sopenharmony_ci/* enum: XAUI. */
40438c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XAUI 0x5 */
40448c2ecf20Sopenharmony_ci/* enum: GMII. */
40458c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_GMII 0x6 */
40468c2ecf20Sopenharmony_ci/* enum: SGMII. */
40478c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SGMII 0x7 */
40488c2ecf20Sopenharmony_ci/* enum: XGBR. */
40498c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XGBR 0x8 */
40508c2ecf20Sopenharmony_ci/* enum: XFI. */
40518c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XFI 0x9 */
40528c2ecf20Sopenharmony_ci/* enum: XAUI Far. */
40538c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XAUI_FAR 0xa */
40548c2ecf20Sopenharmony_ci/* enum: GMII Far. */
40558c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_GMII_FAR 0xb */
40568c2ecf20Sopenharmony_ci/* enum: SGMII Far. */
40578c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SGMII_FAR 0xc */
40588c2ecf20Sopenharmony_ci/* enum: XFI Far. */
40598c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XFI_FAR 0xd */
40608c2ecf20Sopenharmony_ci/* enum: GPhy. */
40618c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_GPHY 0xe */
40628c2ecf20Sopenharmony_ci/* enum: PhyXS. */
40638c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_PHYXS 0xf */
40648c2ecf20Sopenharmony_ci/* enum: PCS. */
40658c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_PCS 0x10 */
40668c2ecf20Sopenharmony_ci/* enum: PMA-PMD. */
40678c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_PMAPMD 0x11 */
40688c2ecf20Sopenharmony_ci/* enum: Cross-Port. */
40698c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XPORT 0x12 */
40708c2ecf20Sopenharmony_ci/* enum: XGMII-Wireside. */
40718c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XGMII_WS 0x13 */
40728c2ecf20Sopenharmony_ci/* enum: XAUI Wireside. */
40738c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XAUI_WS 0x14 */
40748c2ecf20Sopenharmony_ci/* enum: XAUI Wireside Far. */
40758c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XAUI_WS_FAR 0x15 */
40768c2ecf20Sopenharmony_ci/* enum: XAUI Wireside near. */
40778c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XAUI_WS_NEAR 0x16 */
40788c2ecf20Sopenharmony_ci/* enum: GMII Wireside. */
40798c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_GMII_WS 0x17 */
40808c2ecf20Sopenharmony_ci/* enum: XFI Wireside. */
40818c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XFI_WS 0x18 */
40828c2ecf20Sopenharmony_ci/* enum: XFI Wireside Far. */
40838c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_XFI_WS_FAR 0x19 */
40848c2ecf20Sopenharmony_ci/* enum: PhyXS Wireside. */
40858c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_PHYXS_WS 0x1a */
40868c2ecf20Sopenharmony_ci/* enum: PMA lanes MAC-Serdes. */
40878c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_PMA_INT 0x1b */
40888c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel (Encoder). */
40898c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SD_NEAR 0x1c */
40908c2ecf20Sopenharmony_ci/* enum: KR Serdes Serial. */
40918c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SD_FAR 0x1d */
40928c2ecf20Sopenharmony_ci/* enum: PMA lanes MAC-Serdes Wireside. */
40938c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_PMA_INT_WS 0x1e */
40948c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel Wireside (Full PCS). */
40958c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SD_FEP2_WS 0x1f */
40968c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel Wireside (Sym Aligner to TX). */
40978c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SD_FEP1_5_WS 0x20 */
40988c2ecf20Sopenharmony_ci/* enum: KR Serdes Parallel Wireside (Deserializer to Serializer). */
40998c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SD_FEP_WS 0x21 */
41008c2ecf20Sopenharmony_ci/* enum: KR Serdes Serial Wireside. */
41018c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_SD_FES_WS 0x22 */
41028c2ecf20Sopenharmony_ci/* enum: Near side of AOE Siena side port */
41038c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_AOE_INT_NEAR 0x23 */
41048c2ecf20Sopenharmony_ci/* enum: Medford Wireside datapath loopback */
41058c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_DATA_WS 0x24 */
41068c2ecf20Sopenharmony_ci/* enum: Force link up without setting up any physical loopback (snapper use
41078c2ecf20Sopenharmony_ci * only)
41088c2ecf20Sopenharmony_ci */
41098c2ecf20Sopenharmony_ci/*               MC_CMD_LOOPBACK_FORCE_EXT_LINK 0x25 */
41108c2ecf20Sopenharmony_ci/* Supported loopbacks. */
41118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_OFST 8
41128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_LEN 8
41138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_LO_OFST 8
41148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_1G_HI_OFST 12
41158c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41168c2ecf20Sopenharmony_ci/*               100M */
41178c2ecf20Sopenharmony_ci/* Supported loopbacks. */
41188c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_OFST 16
41198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_LEN 8
41208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_LO_OFST 16
41218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_10G_HI_OFST 20
41228c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41238c2ecf20Sopenharmony_ci/*               100M */
41248c2ecf20Sopenharmony_ci/* Supported loopbacks. */
41258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_OFST 24
41268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_LEN 8
41278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_LO_OFST 24
41288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_SUGGESTED_HI_OFST 28
41298c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41308c2ecf20Sopenharmony_ci/*               100M */
41318c2ecf20Sopenharmony_ci/* Supported loopbacks. */
41328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_OFST 32
41338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_LEN 8
41348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_LO_OFST 32
41358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_40G_HI_OFST 36
41368c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41378c2ecf20Sopenharmony_ci/*               100M */
41388c2ecf20Sopenharmony_ci/* Supported 25G loopbacks. */
41398c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_OFST 40
41408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_LEN 8
41418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_LO_OFST 40
41428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_25G_HI_OFST 44
41438c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41448c2ecf20Sopenharmony_ci/*               100M */
41458c2ecf20Sopenharmony_ci/* Supported 50 loopbacks. */
41468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_OFST 48
41478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_LEN 8
41488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_LO_OFST 48
41498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_50G_HI_OFST 52
41508c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41518c2ecf20Sopenharmony_ci/*               100M */
41528c2ecf20Sopenharmony_ci/* Supported 100G loopbacks. */
41538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_OFST 56
41548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_LEN 8
41558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_LO_OFST 56
41568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LOOPBACK_MODES_OUT_V2_100G_HI_OFST 60
41578c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
41588c2ecf20Sopenharmony_ci/*               100M */
41598c2ecf20Sopenharmony_ci
41608c2ecf20Sopenharmony_ci/* AN_TYPE structuredef: Auto-negotiation types defined in IEEE802.3 */
41618c2ecf20Sopenharmony_ci#define    AN_TYPE_LEN 4
41628c2ecf20Sopenharmony_ci#define       AN_TYPE_TYPE_OFST 0
41638c2ecf20Sopenharmony_ci#define       AN_TYPE_TYPE_LEN 4
41648c2ecf20Sopenharmony_ci/* enum: None, AN disabled or not supported */
41658c2ecf20Sopenharmony_ci#define          MC_CMD_AN_NONE 0x0
41668c2ecf20Sopenharmony_ci/* enum: Clause 28 - BASE-T */
41678c2ecf20Sopenharmony_ci#define          MC_CMD_AN_CLAUSE28 0x1
41688c2ecf20Sopenharmony_ci/* enum: Clause 37 - BASE-X */
41698c2ecf20Sopenharmony_ci#define          MC_CMD_AN_CLAUSE37 0x2
41708c2ecf20Sopenharmony_ci/* enum: Clause 73 - BASE-R startup protocol for backplane and copper cable
41718c2ecf20Sopenharmony_ci * assemblies. Includes Clause 72/Clause 92 link-training.
41728c2ecf20Sopenharmony_ci */
41738c2ecf20Sopenharmony_ci#define          MC_CMD_AN_CLAUSE73 0x3
41748c2ecf20Sopenharmony_ci#define       AN_TYPE_TYPE_LBN 0
41758c2ecf20Sopenharmony_ci#define       AN_TYPE_TYPE_WIDTH 32
41768c2ecf20Sopenharmony_ci
41778c2ecf20Sopenharmony_ci/* FEC_TYPE structuredef: Forward error correction types defined in IEEE802.3
41788c2ecf20Sopenharmony_ci */
41798c2ecf20Sopenharmony_ci#define    FEC_TYPE_LEN 4
41808c2ecf20Sopenharmony_ci#define       FEC_TYPE_TYPE_OFST 0
41818c2ecf20Sopenharmony_ci#define       FEC_TYPE_TYPE_LEN 4
41828c2ecf20Sopenharmony_ci/* enum: No FEC */
41838c2ecf20Sopenharmony_ci#define          MC_CMD_FEC_NONE 0x0
41848c2ecf20Sopenharmony_ci/* enum: Clause 74 BASE-R FEC (a.k.a Firecode) */
41858c2ecf20Sopenharmony_ci#define          MC_CMD_FEC_BASER 0x1
41868c2ecf20Sopenharmony_ci/* enum: Clause 91/Clause 108 Reed-Solomon FEC */
41878c2ecf20Sopenharmony_ci#define          MC_CMD_FEC_RS 0x2
41888c2ecf20Sopenharmony_ci#define       FEC_TYPE_TYPE_LBN 0
41898c2ecf20Sopenharmony_ci#define       FEC_TYPE_TYPE_WIDTH 32
41908c2ecf20Sopenharmony_ci
41918c2ecf20Sopenharmony_ci
41928c2ecf20Sopenharmony_ci/***********************************/
41938c2ecf20Sopenharmony_ci/* MC_CMD_GET_LINK
41948c2ecf20Sopenharmony_ci * Read the unified MAC/PHY link state. Locks required: None Return code: 0,
41958c2ecf20Sopenharmony_ci * ETIME.
41968c2ecf20Sopenharmony_ci */
41978c2ecf20Sopenharmony_ci#define MC_CMD_GET_LINK 0x29
41988c2ecf20Sopenharmony_ci#undef MC_CMD_0x29_PRIVILEGE_CTG
41998c2ecf20Sopenharmony_ci
42008c2ecf20Sopenharmony_ci#define MC_CMD_0x29_PRIVILEGE_CTG SRIOV_CTG_GENERAL
42018c2ecf20Sopenharmony_ci
42028c2ecf20Sopenharmony_ci/* MC_CMD_GET_LINK_IN msgrequest */
42038c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LINK_IN_LEN 0
42048c2ecf20Sopenharmony_ci
42058c2ecf20Sopenharmony_ci/* MC_CMD_GET_LINK_OUT msgresponse */
42068c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LINK_OUT_LEN 28
42078c2ecf20Sopenharmony_ci/* Near-side advertised capabilities. Refer to
42088c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
42098c2ecf20Sopenharmony_ci */
42108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_CAP_OFST 0
42118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_CAP_LEN 4
42128c2ecf20Sopenharmony_ci/* Link-partner advertised capabilities. Refer to
42138c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
42148c2ecf20Sopenharmony_ci */
42158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_LP_CAP_OFST 4
42168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_LP_CAP_LEN 4
42178c2ecf20Sopenharmony_ci/* Autonegotiated speed in mbit/s. The link may still be down even if this
42188c2ecf20Sopenharmony_ci * reads non-zero.
42198c2ecf20Sopenharmony_ci */
42208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_LINK_SPEED_OFST 8
42218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_LINK_SPEED_LEN 4
42228c2ecf20Sopenharmony_ci/* Current loopback setting. */
42238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_OFST 12
42248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_LOOPBACK_MODE_LEN 4
42258c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
42268c2ecf20Sopenharmony_ci/*               MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */
42278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_FLAGS_OFST 16
42288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_FLAGS_LEN 4
42298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_UP_OFST 16
42308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_UP_LBN 0
42318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_UP_WIDTH 1
42328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_FULL_DUPLEX_OFST 16
42338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_FULL_DUPLEX_LBN 1
42348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_FULL_DUPLEX_WIDTH 1
42358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_BPX_LINK_OFST 16
42368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_BPX_LINK_LBN 2
42378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_BPX_LINK_WIDTH 1
42388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_PHY_LINK_OFST 16
42398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_PHY_LINK_LBN 3
42408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_PHY_LINK_WIDTH 1
42418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_OFST 16
42428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_LBN 6
42438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_FAULT_RX_WIDTH 1
42448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_OFST 16
42458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_LBN 7
42468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_LINK_FAULT_TX_WIDTH 1
42478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_MODULE_UP_VALID_OFST 16
42488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_MODULE_UP_VALID_LBN 8
42498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_MODULE_UP_VALID_WIDTH 1
42508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_MODULE_UP_OFST 16
42518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_MODULE_UP_LBN 9
42528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_MODULE_UP_WIDTH 1
42538c2ecf20Sopenharmony_ci/* This returns the negotiated flow control value. */
42548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_FCNTL_OFST 20
42558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_FCNTL_LEN 4
42568c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
42578c2ecf20Sopenharmony_ci/*               MC_CMD_SET_MAC/MC_CMD_SET_MAC_IN/FCNTL */
42588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_MAC_FAULT_OFST 24
42598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_MAC_FAULT_LEN 4
42608c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_XGMII_LOCAL_OFST 24
42618c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_XGMII_LOCAL_LBN 0
42628c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_XGMII_LOCAL_WIDTH 1
42638c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_XGMII_REMOTE_OFST 24
42648c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_XGMII_REMOTE_LBN 1
42658c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_XGMII_REMOTE_WIDTH 1
42668c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_SGMII_REMOTE_OFST 24
42678c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_SGMII_REMOTE_LBN 2
42688c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_SGMII_REMOTE_WIDTH 1
42698c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_PENDING_RECONFIG_OFST 24
42708c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_PENDING_RECONFIG_LBN 3
42718c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_FAULT_PENDING_RECONFIG_WIDTH 1
42728c2ecf20Sopenharmony_ci
42738c2ecf20Sopenharmony_ci/* MC_CMD_GET_LINK_OUT_V2 msgresponse: Extended link state information */
42748c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LINK_OUT_V2_LEN 44
42758c2ecf20Sopenharmony_ci/* Near-side advertised capabilities. Refer to
42768c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
42778c2ecf20Sopenharmony_ci */
42788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_CAP_OFST 0
42798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_CAP_LEN 4
42808c2ecf20Sopenharmony_ci/* Link-partner advertised capabilities. Refer to
42818c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
42828c2ecf20Sopenharmony_ci */
42838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LP_CAP_OFST 4
42848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LP_CAP_LEN 4
42858c2ecf20Sopenharmony_ci/* Autonegotiated speed in mbit/s. The link may still be down even if this
42868c2ecf20Sopenharmony_ci * reads non-zero.
42878c2ecf20Sopenharmony_ci */
42888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LINK_SPEED_OFST 8
42898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LINK_SPEED_LEN 4
42908c2ecf20Sopenharmony_ci/* Current loopback setting. */
42918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LOOPBACK_MODE_OFST 12
42928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LOOPBACK_MODE_LEN 4
42938c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
42948c2ecf20Sopenharmony_ci/*               MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */
42958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_FLAGS_OFST 16
42968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_FLAGS_LEN 4
42978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_UP_OFST 16
42988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_UP_LBN 0
42998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_UP_WIDTH 1
43008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_FULL_DUPLEX_OFST 16
43018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_FULL_DUPLEX_LBN 1
43028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_FULL_DUPLEX_WIDTH 1
43038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_BPX_LINK_OFST 16
43048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_BPX_LINK_LBN 2
43058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_BPX_LINK_WIDTH 1
43068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PHY_LINK_OFST 16
43078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PHY_LINK_LBN 3
43088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PHY_LINK_WIDTH 1
43098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_FAULT_RX_OFST 16
43108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_FAULT_RX_LBN 6
43118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_FAULT_RX_WIDTH 1
43128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_FAULT_TX_OFST 16
43138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_FAULT_TX_LBN 7
43148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_LINK_FAULT_TX_WIDTH 1
43158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_MODULE_UP_VALID_OFST 16
43168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_MODULE_UP_VALID_LBN 8
43178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_MODULE_UP_VALID_WIDTH 1
43188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_MODULE_UP_OFST 16
43198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_MODULE_UP_LBN 9
43208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_MODULE_UP_WIDTH 1
43218c2ecf20Sopenharmony_ci/* This returns the negotiated flow control value. */
43228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_FCNTL_OFST 20
43238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_FCNTL_LEN 4
43248c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
43258c2ecf20Sopenharmony_ci/*               MC_CMD_SET_MAC/MC_CMD_SET_MAC_IN/FCNTL */
43268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_MAC_FAULT_OFST 24
43278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_MAC_FAULT_LEN 4
43288c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_XGMII_LOCAL_OFST 24 */
43298c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_XGMII_LOCAL_LBN 0 */
43308c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_XGMII_LOCAL_WIDTH 1 */
43318c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_XGMII_REMOTE_OFST 24 */
43328c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_XGMII_REMOTE_LBN 1 */
43338c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_XGMII_REMOTE_WIDTH 1 */
43348c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_SGMII_REMOTE_OFST 24 */
43358c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_SGMII_REMOTE_LBN 2 */
43368c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_SGMII_REMOTE_WIDTH 1 */
43378c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_PENDING_RECONFIG_OFST 24 */
43388c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_PENDING_RECONFIG_LBN 3 */
43398c2ecf20Sopenharmony_ci/*             MC_CMD_MAC_FAULT_PENDING_RECONFIG_WIDTH 1 */
43408c2ecf20Sopenharmony_ci/* True local device capabilities (taking into account currently used PMD/MDI,
43418c2ecf20Sopenharmony_ci * e.g. plugged-in module). In general, subset of
43428c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP, but may include extra _FEC_REQUEST
43438c2ecf20Sopenharmony_ci * bits, if the PMD requires FEC. 0 if unknown (e.g. module unplugged). Equal
43448c2ecf20Sopenharmony_ci * to SUPPORTED_CAP for non-pluggable PMDs. Refer to
43458c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
43468c2ecf20Sopenharmony_ci */
43478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LD_CAP_OFST 28
43488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_LD_CAP_LEN 4
43498c2ecf20Sopenharmony_ci/* Auto-negotiation type used on the link */
43508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_AN_TYPE_OFST 32
43518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_AN_TYPE_LEN 4
43528c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
43538c2ecf20Sopenharmony_ci/*               AN_TYPE/TYPE */
43548c2ecf20Sopenharmony_ci/* Forward error correction used on the link */
43558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_FEC_TYPE_OFST 36
43568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_FEC_TYPE_LEN 4
43578c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
43588c2ecf20Sopenharmony_ci/*               FEC_TYPE/TYPE */
43598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_EXT_FLAGS_OFST 40
43608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LINK_OUT_V2_EXT_FLAGS_LEN 4
43618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_MDI_CONNECTED_OFST 40
43628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_MDI_CONNECTED_LBN 0
43638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_MDI_CONNECTED_WIDTH 1
43648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_READY_OFST 40
43658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_READY_LBN 1
43668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_READY_WIDTH 1
43678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_LINK_UP_OFST 40
43688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_LINK_UP_LBN 2
43698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMD_LINK_UP_WIDTH 1
43708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMA_LINK_UP_OFST 40
43718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMA_LINK_UP_LBN 3
43728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PMA_LINK_UP_WIDTH 1
43738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PCS_LOCK_OFST 40
43748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PCS_LOCK_LBN 4
43758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PCS_LOCK_WIDTH 1
43768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_ALIGN_LOCK_OFST 40
43778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_ALIGN_LOCK_LBN 5
43788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_ALIGN_LOCK_WIDTH 1
43798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_HI_BER_OFST 40
43808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_HI_BER_LBN 6
43818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_HI_BER_WIDTH 1
43828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_FEC_LOCK_OFST 40
43838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_FEC_LOCK_LBN 7
43848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_FEC_LOCK_WIDTH 1
43858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_AN_DONE_OFST 40
43868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_AN_DONE_LBN 8
43878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_AN_DONE_WIDTH 1
43888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PORT_SHUTDOWN_OFST 40
43898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PORT_SHUTDOWN_LBN 9
43908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_LINK_OUT_V2_PORT_SHUTDOWN_WIDTH 1
43918c2ecf20Sopenharmony_ci
43928c2ecf20Sopenharmony_ci
43938c2ecf20Sopenharmony_ci/***********************************/
43948c2ecf20Sopenharmony_ci/* MC_CMD_SET_LINK
43958c2ecf20Sopenharmony_ci * Write the unified MAC/PHY link configuration. Locks required: None. Return
43968c2ecf20Sopenharmony_ci * code: 0, EINVAL, ETIME, EAGAIN
43978c2ecf20Sopenharmony_ci */
43988c2ecf20Sopenharmony_ci#define MC_CMD_SET_LINK 0x2a
43998c2ecf20Sopenharmony_ci#undef MC_CMD_0x2a_PRIVILEGE_CTG
44008c2ecf20Sopenharmony_ci
44018c2ecf20Sopenharmony_ci#define MC_CMD_0x2a_PRIVILEGE_CTG SRIOV_CTG_LINK
44028c2ecf20Sopenharmony_ci
44038c2ecf20Sopenharmony_ci/* MC_CMD_SET_LINK_IN msgrequest */
44048c2ecf20Sopenharmony_ci#define    MC_CMD_SET_LINK_IN_LEN 16
44058c2ecf20Sopenharmony_ci/* Near-side advertised capabilities. Refer to
44068c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
44078c2ecf20Sopenharmony_ci */
44088c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_CAP_OFST 0
44098c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_CAP_LEN 4
44108c2ecf20Sopenharmony_ci/* Flags */
44118c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_FLAGS_OFST 4
44128c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_FLAGS_LEN 4
44138c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_LOWPOWER_OFST 4
44148c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_LOWPOWER_LBN 0
44158c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_LOWPOWER_WIDTH 1
44168c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_POWEROFF_OFST 4
44178c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_POWEROFF_LBN 1
44188c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_POWEROFF_WIDTH 1
44198c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_TXDIS_OFST 4
44208c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_TXDIS_LBN 2
44218c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_TXDIS_WIDTH 1
44228c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_LINKDOWN_OFST 4
44238c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_LINKDOWN_LBN 3
44248c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_LINKDOWN_WIDTH 1
44258c2ecf20Sopenharmony_ci/* Loopback mode. */
44268c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_LOOPBACK_MODE_OFST 8
44278c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_LOOPBACK_MODE_LEN 4
44288c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
44298c2ecf20Sopenharmony_ci/*               MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */
44308c2ecf20Sopenharmony_ci/* A loopback speed of "0" is supported, and means (choose any available
44318c2ecf20Sopenharmony_ci * speed).
44328c2ecf20Sopenharmony_ci */
44338c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_LOOPBACK_SPEED_OFST 12
44348c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_LOOPBACK_SPEED_LEN 4
44358c2ecf20Sopenharmony_ci
44368c2ecf20Sopenharmony_ci/* MC_CMD_SET_LINK_IN_V2 msgrequest: Updated SET_LINK to include sequence
44378c2ecf20Sopenharmony_ci * number to ensure this SET_LINK command corresponds to the latest
44388c2ecf20Sopenharmony_ci * MODULECHANGE event.
44398c2ecf20Sopenharmony_ci */
44408c2ecf20Sopenharmony_ci#define    MC_CMD_SET_LINK_IN_V2_LEN 17
44418c2ecf20Sopenharmony_ci/* Near-side advertised capabilities. Refer to
44428c2ecf20Sopenharmony_ci * MC_CMD_GET_PHY_CFG_OUT/SUPPORTED_CAP for bit definitions.
44438c2ecf20Sopenharmony_ci */
44448c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_CAP_OFST 0
44458c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_CAP_LEN 4
44468c2ecf20Sopenharmony_ci/* Flags */
44478c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_FLAGS_OFST 4
44488c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_FLAGS_LEN 4
44498c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_LOWPOWER_OFST 4
44508c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_LOWPOWER_LBN 0
44518c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_LOWPOWER_WIDTH 1
44528c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_POWEROFF_OFST 4
44538c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_POWEROFF_LBN 1
44548c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_POWEROFF_WIDTH 1
44558c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_TXDIS_OFST 4
44568c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_TXDIS_LBN 2
44578c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_TXDIS_WIDTH 1
44588c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_LINKDOWN_OFST 4
44598c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_LINKDOWN_LBN 3
44608c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_LINKDOWN_WIDTH 1
44618c2ecf20Sopenharmony_ci/* Loopback mode. */
44628c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_LOOPBACK_MODE_OFST 8
44638c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_LOOPBACK_MODE_LEN 4
44648c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
44658c2ecf20Sopenharmony_ci/*               MC_CMD_GET_LOOPBACK_MODES/MC_CMD_GET_LOOPBACK_MODES_OUT/100M */
44668c2ecf20Sopenharmony_ci/* A loopback speed of "0" is supported, and means (choose any available
44678c2ecf20Sopenharmony_ci * speed).
44688c2ecf20Sopenharmony_ci */
44698c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_LOOPBACK_SPEED_OFST 12
44708c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_LOOPBACK_SPEED_LEN 4
44718c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_OFST 16
44728c2ecf20Sopenharmony_ci#define       MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_LEN 1
44738c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_NUMBER_OFST 16
44748c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_NUMBER_LBN 0
44758c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_NUMBER_WIDTH 7
44768c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_IGNORE_OFST 16
44778c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_IGNORE_LBN 7
44788c2ecf20Sopenharmony_ci#define        MC_CMD_SET_LINK_IN_V2_MODULE_SEQ_IGNORE_WIDTH 1
44798c2ecf20Sopenharmony_ci
44808c2ecf20Sopenharmony_ci/* MC_CMD_SET_LINK_OUT msgresponse */
44818c2ecf20Sopenharmony_ci#define    MC_CMD_SET_LINK_OUT_LEN 0
44828c2ecf20Sopenharmony_ci
44838c2ecf20Sopenharmony_ci
44848c2ecf20Sopenharmony_ci/***********************************/
44858c2ecf20Sopenharmony_ci/* MC_CMD_SET_ID_LED
44868c2ecf20Sopenharmony_ci * Set identification LED state. Locks required: None. Return code: 0, EINVAL
44878c2ecf20Sopenharmony_ci */
44888c2ecf20Sopenharmony_ci#define MC_CMD_SET_ID_LED 0x2b
44898c2ecf20Sopenharmony_ci#undef MC_CMD_0x2b_PRIVILEGE_CTG
44908c2ecf20Sopenharmony_ci
44918c2ecf20Sopenharmony_ci#define MC_CMD_0x2b_PRIVILEGE_CTG SRIOV_CTG_LINK
44928c2ecf20Sopenharmony_ci
44938c2ecf20Sopenharmony_ci/* MC_CMD_SET_ID_LED_IN msgrequest */
44948c2ecf20Sopenharmony_ci#define    MC_CMD_SET_ID_LED_IN_LEN 4
44958c2ecf20Sopenharmony_ci/* Set LED state. */
44968c2ecf20Sopenharmony_ci#define       MC_CMD_SET_ID_LED_IN_STATE_OFST 0
44978c2ecf20Sopenharmony_ci#define       MC_CMD_SET_ID_LED_IN_STATE_LEN 4
44988c2ecf20Sopenharmony_ci#define          MC_CMD_LED_OFF 0x0 /* enum */
44998c2ecf20Sopenharmony_ci#define          MC_CMD_LED_ON 0x1 /* enum */
45008c2ecf20Sopenharmony_ci#define          MC_CMD_LED_DEFAULT 0x2 /* enum */
45018c2ecf20Sopenharmony_ci
45028c2ecf20Sopenharmony_ci/* MC_CMD_SET_ID_LED_OUT msgresponse */
45038c2ecf20Sopenharmony_ci#define    MC_CMD_SET_ID_LED_OUT_LEN 0
45048c2ecf20Sopenharmony_ci
45058c2ecf20Sopenharmony_ci
45068c2ecf20Sopenharmony_ci/***********************************/
45078c2ecf20Sopenharmony_ci/* MC_CMD_SET_MAC
45088c2ecf20Sopenharmony_ci * Set MAC configuration. Locks required: None. Return code: 0, EINVAL
45098c2ecf20Sopenharmony_ci */
45108c2ecf20Sopenharmony_ci#define MC_CMD_SET_MAC 0x2c
45118c2ecf20Sopenharmony_ci#undef MC_CMD_0x2c_PRIVILEGE_CTG
45128c2ecf20Sopenharmony_ci
45138c2ecf20Sopenharmony_ci#define MC_CMD_0x2c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
45148c2ecf20Sopenharmony_ci
45158c2ecf20Sopenharmony_ci/* MC_CMD_SET_MAC_IN msgrequest */
45168c2ecf20Sopenharmony_ci#define    MC_CMD_SET_MAC_IN_LEN 28
45178c2ecf20Sopenharmony_ci/* The MTU is the MTU programmed directly into the XMAC/GMAC (inclusive of
45188c2ecf20Sopenharmony_ci * EtherII, VLAN, bug16011 padding).
45198c2ecf20Sopenharmony_ci */
45208c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_MTU_OFST 0
45218c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_MTU_LEN 4
45228c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_DRAIN_OFST 4
45238c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_DRAIN_LEN 4
45248c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_ADDR_OFST 8
45258c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_ADDR_LEN 8
45268c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_ADDR_LO_OFST 8
45278c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_ADDR_HI_OFST 12
45288c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_REJECT_OFST 16
45298c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_REJECT_LEN 4
45308c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_REJECT_UNCST_OFST 16
45318c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_REJECT_UNCST_LBN 0
45328c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_REJECT_UNCST_WIDTH 1
45338c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_REJECT_BRDCST_OFST 16
45348c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_REJECT_BRDCST_LBN 1
45358c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_REJECT_BRDCST_WIDTH 1
45368c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_FCNTL_OFST 20
45378c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_FCNTL_LEN 4
45388c2ecf20Sopenharmony_ci/* enum: Flow control is off. */
45398c2ecf20Sopenharmony_ci#define          MC_CMD_FCNTL_OFF 0x0
45408c2ecf20Sopenharmony_ci/* enum: Respond to flow control. */
45418c2ecf20Sopenharmony_ci#define          MC_CMD_FCNTL_RESPOND 0x1
45428c2ecf20Sopenharmony_ci/* enum: Respond to and Issue flow control. */
45438c2ecf20Sopenharmony_ci#define          MC_CMD_FCNTL_BIDIR 0x2
45448c2ecf20Sopenharmony_ci/* enum: Auto neg flow control. */
45458c2ecf20Sopenharmony_ci#define          MC_CMD_FCNTL_AUTO 0x3
45468c2ecf20Sopenharmony_ci/* enum: Priority flow control (eftest builds only). */
45478c2ecf20Sopenharmony_ci#define          MC_CMD_FCNTL_QBB 0x4
45488c2ecf20Sopenharmony_ci/* enum: Issue flow control. */
45498c2ecf20Sopenharmony_ci#define          MC_CMD_FCNTL_GENERATE 0x5
45508c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_FLAGS_OFST 24
45518c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_IN_FLAGS_LEN 4
45528c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_OFST 24
45538c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_LBN 0
45548c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_WIDTH 1
45558c2ecf20Sopenharmony_ci
45568c2ecf20Sopenharmony_ci/* MC_CMD_SET_MAC_EXT_IN msgrequest */
45578c2ecf20Sopenharmony_ci#define    MC_CMD_SET_MAC_EXT_IN_LEN 32
45588c2ecf20Sopenharmony_ci/* The MTU is the MTU programmed directly into the XMAC/GMAC (inclusive of
45598c2ecf20Sopenharmony_ci * EtherII, VLAN, bug16011 padding).
45608c2ecf20Sopenharmony_ci */
45618c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_MTU_OFST 0
45628c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_MTU_LEN 4
45638c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_DRAIN_OFST 4
45648c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_DRAIN_LEN 4
45658c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_ADDR_OFST 8
45668c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_ADDR_LEN 8
45678c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_ADDR_LO_OFST 8
45688c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_ADDR_HI_OFST 12
45698c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_REJECT_OFST 16
45708c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_REJECT_LEN 4
45718c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_OFST 16
45728c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_LBN 0
45738c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_WIDTH 1
45748c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_OFST 16
45758c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_LBN 1
45768c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_WIDTH 1
45778c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_FCNTL_OFST 20
45788c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_FCNTL_LEN 4
45798c2ecf20Sopenharmony_ci/* enum: Flow control is off. */
45808c2ecf20Sopenharmony_ci/*               MC_CMD_FCNTL_OFF 0x0 */
45818c2ecf20Sopenharmony_ci/* enum: Respond to flow control. */
45828c2ecf20Sopenharmony_ci/*               MC_CMD_FCNTL_RESPOND 0x1 */
45838c2ecf20Sopenharmony_ci/* enum: Respond to and Issue flow control. */
45848c2ecf20Sopenharmony_ci/*               MC_CMD_FCNTL_BIDIR 0x2 */
45858c2ecf20Sopenharmony_ci/* enum: Auto neg flow control. */
45868c2ecf20Sopenharmony_ci/*               MC_CMD_FCNTL_AUTO 0x3 */
45878c2ecf20Sopenharmony_ci/* enum: Priority flow control (eftest builds only). */
45888c2ecf20Sopenharmony_ci/*               MC_CMD_FCNTL_QBB 0x4 */
45898c2ecf20Sopenharmony_ci/* enum: Issue flow control. */
45908c2ecf20Sopenharmony_ci/*               MC_CMD_FCNTL_GENERATE 0x5 */
45918c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_FLAGS_OFST 24
45928c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_FLAGS_LEN 4
45938c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_OFST 24
45948c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_LBN 0
45958c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_WIDTH 1
45968c2ecf20Sopenharmony_ci/* Select which parameters to configure. A parameter will only be modified if
45978c2ecf20Sopenharmony_ci * the corresponding control flag is set. If SET_MAC_ENHANCED is not set in
45988c2ecf20Sopenharmony_ci * capabilities then this field is ignored (and all flags are assumed to be
45998c2ecf20Sopenharmony_ci * set).
46008c2ecf20Sopenharmony_ci */
46018c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_CONTROL_OFST 28
46028c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_EXT_IN_CONTROL_LEN 4
46038c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_MTU_OFST 28
46048c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_MTU_LBN 0
46058c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_MTU_WIDTH 1
46068c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_OFST 28
46078c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_LBN 1
46088c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_WIDTH 1
46098c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_OFST 28
46108c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_LBN 2
46118c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_WIDTH 1
46128c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_OFST 28
46138c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_LBN 3
46148c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_WIDTH 1
46158c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_FCS_OFST 28
46168c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_FCS_LBN 4
46178c2ecf20Sopenharmony_ci#define        MC_CMD_SET_MAC_EXT_IN_CFG_FCS_WIDTH 1
46188c2ecf20Sopenharmony_ci
46198c2ecf20Sopenharmony_ci/* MC_CMD_SET_MAC_OUT msgresponse */
46208c2ecf20Sopenharmony_ci#define    MC_CMD_SET_MAC_OUT_LEN 0
46218c2ecf20Sopenharmony_ci
46228c2ecf20Sopenharmony_ci/* MC_CMD_SET_MAC_V2_OUT msgresponse */
46238c2ecf20Sopenharmony_ci#define    MC_CMD_SET_MAC_V2_OUT_LEN 4
46248c2ecf20Sopenharmony_ci/* MTU as configured after processing the request. See comment at
46258c2ecf20Sopenharmony_ci * MC_CMD_SET_MAC_IN/MTU. To query MTU without doing any changes, set CONTROL
46268c2ecf20Sopenharmony_ci * to 0.
46278c2ecf20Sopenharmony_ci */
46288c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_V2_OUT_MTU_OFST 0
46298c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MAC_V2_OUT_MTU_LEN 4
46308c2ecf20Sopenharmony_ci
46318c2ecf20Sopenharmony_ci
46328c2ecf20Sopenharmony_ci/***********************************/
46338c2ecf20Sopenharmony_ci/* MC_CMD_PHY_STATS
46348c2ecf20Sopenharmony_ci * Get generic PHY statistics. This call returns the statistics for a generic
46358c2ecf20Sopenharmony_ci * PHY in a sparse array (indexed by the enumerate). Each value is represented
46368c2ecf20Sopenharmony_ci * by a 32bit number. If the DMA_ADDR is 0, then no DMA is performed, and the
46378c2ecf20Sopenharmony_ci * statistics may be read from the message response. If DMA_ADDR != 0, then the
46388c2ecf20Sopenharmony_ci * statistics are dmad to that (page-aligned location). Locks required: None.
46398c2ecf20Sopenharmony_ci * Returns: 0, ETIME
46408c2ecf20Sopenharmony_ci */
46418c2ecf20Sopenharmony_ci#define MC_CMD_PHY_STATS 0x2d
46428c2ecf20Sopenharmony_ci#undef MC_CMD_0x2d_PRIVILEGE_CTG
46438c2ecf20Sopenharmony_ci
46448c2ecf20Sopenharmony_ci#define MC_CMD_0x2d_PRIVILEGE_CTG SRIOV_CTG_LINK
46458c2ecf20Sopenharmony_ci
46468c2ecf20Sopenharmony_ci/* MC_CMD_PHY_STATS_IN msgrequest */
46478c2ecf20Sopenharmony_ci#define    MC_CMD_PHY_STATS_IN_LEN 8
46488c2ecf20Sopenharmony_ci/* ??? */
46498c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_IN_DMA_ADDR_OFST 0
46508c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_IN_DMA_ADDR_LEN 8
46518c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_IN_DMA_ADDR_LO_OFST 0
46528c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_IN_DMA_ADDR_HI_OFST 4
46538c2ecf20Sopenharmony_ci
46548c2ecf20Sopenharmony_ci/* MC_CMD_PHY_STATS_OUT_DMA msgresponse */
46558c2ecf20Sopenharmony_ci#define    MC_CMD_PHY_STATS_OUT_DMA_LEN 0
46568c2ecf20Sopenharmony_ci
46578c2ecf20Sopenharmony_ci/* MC_CMD_PHY_STATS_OUT_NO_DMA msgresponse */
46588c2ecf20Sopenharmony_ci#define    MC_CMD_PHY_STATS_OUT_NO_DMA_LEN (((MC_CMD_PHY_NSTATS*32))>>3)
46598c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_OFST 0
46608c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_LEN 4
46618c2ecf20Sopenharmony_ci#define       MC_CMD_PHY_STATS_OUT_NO_DMA_STATISTICS_NUM MC_CMD_PHY_NSTATS
46628c2ecf20Sopenharmony_ci/* enum: OUI. */
46638c2ecf20Sopenharmony_ci#define          MC_CMD_OUI 0x0
46648c2ecf20Sopenharmony_ci/* enum: PMA-PMD Link Up. */
46658c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_LINK_UP 0x1
46668c2ecf20Sopenharmony_ci/* enum: PMA-PMD RX Fault. */
46678c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_RX_FAULT 0x2
46688c2ecf20Sopenharmony_ci/* enum: PMA-PMD TX Fault. */
46698c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_TX_FAULT 0x3
46708c2ecf20Sopenharmony_ci/* enum: PMA-PMD Signal */
46718c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_SIGNAL 0x4
46728c2ecf20Sopenharmony_ci/* enum: PMA-PMD SNR A. */
46738c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_SNR_A 0x5
46748c2ecf20Sopenharmony_ci/* enum: PMA-PMD SNR B. */
46758c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_SNR_B 0x6
46768c2ecf20Sopenharmony_ci/* enum: PMA-PMD SNR C. */
46778c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_SNR_C 0x7
46788c2ecf20Sopenharmony_ci/* enum: PMA-PMD SNR D. */
46798c2ecf20Sopenharmony_ci#define          MC_CMD_PMA_PMD_SNR_D 0x8
46808c2ecf20Sopenharmony_ci/* enum: PCS Link Up. */
46818c2ecf20Sopenharmony_ci#define          MC_CMD_PCS_LINK_UP 0x9
46828c2ecf20Sopenharmony_ci/* enum: PCS RX Fault. */
46838c2ecf20Sopenharmony_ci#define          MC_CMD_PCS_RX_FAULT 0xa
46848c2ecf20Sopenharmony_ci/* enum: PCS TX Fault. */
46858c2ecf20Sopenharmony_ci#define          MC_CMD_PCS_TX_FAULT 0xb
46868c2ecf20Sopenharmony_ci/* enum: PCS BER. */
46878c2ecf20Sopenharmony_ci#define          MC_CMD_PCS_BER 0xc
46888c2ecf20Sopenharmony_ci/* enum: PCS Block Errors. */
46898c2ecf20Sopenharmony_ci#define          MC_CMD_PCS_BLOCK_ERRORS 0xd
46908c2ecf20Sopenharmony_ci/* enum: PhyXS Link Up. */
46918c2ecf20Sopenharmony_ci#define          MC_CMD_PHYXS_LINK_UP 0xe
46928c2ecf20Sopenharmony_ci/* enum: PhyXS RX Fault. */
46938c2ecf20Sopenharmony_ci#define          MC_CMD_PHYXS_RX_FAULT 0xf
46948c2ecf20Sopenharmony_ci/* enum: PhyXS TX Fault. */
46958c2ecf20Sopenharmony_ci#define          MC_CMD_PHYXS_TX_FAULT 0x10
46968c2ecf20Sopenharmony_ci/* enum: PhyXS Align. */
46978c2ecf20Sopenharmony_ci#define          MC_CMD_PHYXS_ALIGN 0x11
46988c2ecf20Sopenharmony_ci/* enum: PhyXS Sync. */
46998c2ecf20Sopenharmony_ci#define          MC_CMD_PHYXS_SYNC 0x12
47008c2ecf20Sopenharmony_ci/* enum: AN link-up. */
47018c2ecf20Sopenharmony_ci#define          MC_CMD_AN_LINK_UP 0x13
47028c2ecf20Sopenharmony_ci/* enum: AN Complete. */
47038c2ecf20Sopenharmony_ci#define          MC_CMD_AN_COMPLETE 0x14
47048c2ecf20Sopenharmony_ci/* enum: AN 10GBaseT Status. */
47058c2ecf20Sopenharmony_ci#define          MC_CMD_AN_10GBT_STATUS 0x15
47068c2ecf20Sopenharmony_ci/* enum: Clause 22 Link-Up. */
47078c2ecf20Sopenharmony_ci#define          MC_CMD_CL22_LINK_UP 0x16
47088c2ecf20Sopenharmony_ci/* enum: (Last entry) */
47098c2ecf20Sopenharmony_ci#define          MC_CMD_PHY_NSTATS 0x17
47108c2ecf20Sopenharmony_ci
47118c2ecf20Sopenharmony_ci
47128c2ecf20Sopenharmony_ci/***********************************/
47138c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS
47148c2ecf20Sopenharmony_ci * Get generic MAC statistics. This call returns unified statistics maintained
47158c2ecf20Sopenharmony_ci * by the MC as it switches between the GMAC and XMAC. The MC will write out
47168c2ecf20Sopenharmony_ci * all supported stats. The driver should zero initialise the buffer to
47178c2ecf20Sopenharmony_ci * guarantee consistent results. If the DMA_ADDR is 0, then no DMA is
47188c2ecf20Sopenharmony_ci * performed, and the statistics may be read from the message response. If
47198c2ecf20Sopenharmony_ci * DMA_ADDR != 0, then the statistics are dmad to that (page-aligned location).
47208c2ecf20Sopenharmony_ci * Locks required: None. The PERIODIC_CLEAR option is not used and now has no
47218c2ecf20Sopenharmony_ci * effect. Returns: 0, ETIME
47228c2ecf20Sopenharmony_ci */
47238c2ecf20Sopenharmony_ci#define MC_CMD_MAC_STATS 0x2e
47248c2ecf20Sopenharmony_ci#undef MC_CMD_0x2e_PRIVILEGE_CTG
47258c2ecf20Sopenharmony_ci
47268c2ecf20Sopenharmony_ci#define MC_CMD_0x2e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
47278c2ecf20Sopenharmony_ci
47288c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_IN msgrequest */
47298c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_IN_LEN 20
47308c2ecf20Sopenharmony_ci/* ??? */
47318c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_DMA_ADDR_OFST 0
47328c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_DMA_ADDR_LEN 8
47338c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_DMA_ADDR_LO_OFST 0
47348c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_DMA_ADDR_HI_OFST 4
47358c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_CMD_OFST 8
47368c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_CMD_LEN 4
47378c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_DMA_OFST 8
47388c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_DMA_LBN 0
47398c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_DMA_WIDTH 1
47408c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_CLEAR_OFST 8
47418c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_CLEAR_LBN 1
47428c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_CLEAR_WIDTH 1
47438c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_OFST 8
47448c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_LBN 2
47458c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_CHANGE_WIDTH 1
47468c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_OFST 8
47478c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_LBN 3
47488c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_ENABLE_WIDTH 1
47498c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_OFST 8
47508c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_LBN 4
47518c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_CLEAR_WIDTH 1
47528c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_OFST 8
47538c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_LBN 5
47548c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIODIC_NOEVENT_WIDTH 1
47558c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIOD_MS_OFST 8
47568c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIOD_MS_LBN 16
47578c2ecf20Sopenharmony_ci#define        MC_CMD_MAC_STATS_IN_PERIOD_MS_WIDTH 16
47588c2ecf20Sopenharmony_ci/* DMA length. Should be set to MAC_STATS_NUM_STATS * sizeof(uint64_t), as
47598c2ecf20Sopenharmony_ci * returned by MC_CMD_GET_CAPABILITIES_V4_OUT. For legacy firmware not
47608c2ecf20Sopenharmony_ci * supporting MC_CMD_GET_CAPABILITIES_V4_OUT, DMA_LEN should be set to
47618c2ecf20Sopenharmony_ci * MC_CMD_MAC_NSTATS * sizeof(uint64_t)
47628c2ecf20Sopenharmony_ci */
47638c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_DMA_LEN_OFST 12
47648c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_DMA_LEN_LEN 4
47658c2ecf20Sopenharmony_ci/* port id so vadapter stats can be provided */
47668c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_PORT_ID_OFST 16
47678c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_IN_PORT_ID_LEN 4
47688c2ecf20Sopenharmony_ci
47698c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_OUT_DMA msgresponse */
47708c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_OUT_DMA_LEN 0
47718c2ecf20Sopenharmony_ci
47728c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_OUT_NO_DMA msgresponse */
47738c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS*64))>>3)
47748c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_OFST 0
47758c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_LEN 8
47768c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_LO_OFST 0
47778c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_HI_OFST 4
47788c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS
47798c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_GENERATION_START 0x0 /* enum */
47808c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_DMABUF_START 0x1 /* enum */
47818c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_PKTS 0x1 /* enum */
47828c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_PAUSE_PKTS 0x2 /* enum */
47838c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_CONTROL_PKTS 0x3 /* enum */
47848c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_UNICAST_PKTS 0x4 /* enum */
47858c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_MULTICAST_PKTS 0x5 /* enum */
47868c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_BROADCAST_PKTS 0x6 /* enum */
47878c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_BYTES 0x7 /* enum */
47888c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_BAD_BYTES 0x8 /* enum */
47898c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_LT64_PKTS 0x9 /* enum */
47908c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_64_PKTS 0xa /* enum */
47918c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_65_TO_127_PKTS 0xb /* enum */
47928c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_128_TO_255_PKTS 0xc /* enum */
47938c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_256_TO_511_PKTS 0xd /* enum */
47948c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_512_TO_1023_PKTS 0xe /* enum */
47958c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_1024_TO_15XX_PKTS 0xf /* enum */
47968c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_15XX_TO_JUMBO_PKTS 0x10 /* enum */
47978c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_GTJUMBO_PKTS 0x11 /* enum */
47988c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_BAD_FCS_PKTS 0x12 /* enum */
47998c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_SINGLE_COLLISION_PKTS 0x13 /* enum */
48008c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_MULTIPLE_COLLISION_PKTS 0x14 /* enum */
48018c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_EXCESSIVE_COLLISION_PKTS 0x15 /* enum */
48028c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_LATE_COLLISION_PKTS 0x16 /* enum */
48038c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_DEFERRED_PKTS 0x17 /* enum */
48048c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_EXCESSIVE_DEFERRED_PKTS 0x18 /* enum */
48058c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_NON_TCPUDP_PKTS 0x19 /* enum */
48068c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_MAC_SRC_ERR_PKTS 0x1a /* enum */
48078c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_TX_IP_SRC_ERR_PKTS 0x1b /* enum */
48088c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_PKTS 0x1c /* enum */
48098c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_PAUSE_PKTS 0x1d /* enum */
48108c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_GOOD_PKTS 0x1e /* enum */
48118c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_CONTROL_PKTS 0x1f /* enum */
48128c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_UNICAST_PKTS 0x20 /* enum */
48138c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_MULTICAST_PKTS 0x21 /* enum */
48148c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_BROADCAST_PKTS 0x22 /* enum */
48158c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_BYTES 0x23 /* enum */
48168c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_BAD_BYTES 0x24 /* enum */
48178c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_64_PKTS 0x25 /* enum */
48188c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_65_TO_127_PKTS 0x26 /* enum */
48198c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_128_TO_255_PKTS 0x27 /* enum */
48208c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_256_TO_511_PKTS 0x28 /* enum */
48218c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_512_TO_1023_PKTS 0x29 /* enum */
48228c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_1024_TO_15XX_PKTS 0x2a /* enum */
48238c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_15XX_TO_JUMBO_PKTS 0x2b /* enum */
48248c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_GTJUMBO_PKTS 0x2c /* enum */
48258c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_UNDERSIZE_PKTS 0x2d /* enum */
48268c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_BAD_FCS_PKTS 0x2e /* enum */
48278c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_OVERFLOW_PKTS 0x2f /* enum */
48288c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_FALSE_CARRIER_PKTS 0x30 /* enum */
48298c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_SYMBOL_ERROR_PKTS 0x31 /* enum */
48308c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_ALIGN_ERROR_PKTS 0x32 /* enum */
48318c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_LENGTH_ERROR_PKTS 0x33 /* enum */
48328c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_INTERNAL_ERROR_PKTS 0x34 /* enum */
48338c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_JABBER_PKTS 0x35 /* enum */
48348c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_NODESC_DROPS 0x36 /* enum */
48358c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_LANES01_CHAR_ERR 0x37 /* enum */
48368c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_LANES23_CHAR_ERR 0x38 /* enum */
48378c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_LANES01_DISP_ERR 0x39 /* enum */
48388c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_LANES23_DISP_ERR 0x3a /* enum */
48398c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RX_MATCH_FAULT 0x3b /* enum */
48408c2ecf20Sopenharmony_ci/* enum: PM trunc_bb_overflow counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
48418c2ecf20Sopenharmony_ci * capability only.
48428c2ecf20Sopenharmony_ci */
48438c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_TRUNC_BB_OVERFLOW 0x3c
48448c2ecf20Sopenharmony_ci/* enum: PM discard_bb_overflow counter. Valid for EF10 with
48458c2ecf20Sopenharmony_ci * PM_AND_RXDP_COUNTERS capability only.
48468c2ecf20Sopenharmony_ci */
48478c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_DISCARD_BB_OVERFLOW 0x3d
48488c2ecf20Sopenharmony_ci/* enum: PM trunc_vfifo_full counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
48498c2ecf20Sopenharmony_ci * capability only.
48508c2ecf20Sopenharmony_ci */
48518c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_TRUNC_VFIFO_FULL 0x3e
48528c2ecf20Sopenharmony_ci/* enum: PM discard_vfifo_full counter. Valid for EF10 with
48538c2ecf20Sopenharmony_ci * PM_AND_RXDP_COUNTERS capability only.
48548c2ecf20Sopenharmony_ci */
48558c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_DISCARD_VFIFO_FULL 0x3f
48568c2ecf20Sopenharmony_ci/* enum: PM trunc_qbb counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
48578c2ecf20Sopenharmony_ci * capability only.
48588c2ecf20Sopenharmony_ci */
48598c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_TRUNC_QBB 0x40
48608c2ecf20Sopenharmony_ci/* enum: PM discard_qbb counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
48618c2ecf20Sopenharmony_ci * capability only.
48628c2ecf20Sopenharmony_ci */
48638c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_DISCARD_QBB 0x41
48648c2ecf20Sopenharmony_ci/* enum: PM discard_mapping counter. Valid for EF10 with PM_AND_RXDP_COUNTERS
48658c2ecf20Sopenharmony_ci * capability only.
48668c2ecf20Sopenharmony_ci */
48678c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_PM_DISCARD_MAPPING 0x42
48688c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of packets dropped due to the queue being
48698c2ecf20Sopenharmony_ci * disabled. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only.
48708c2ecf20Sopenharmony_ci */
48718c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_Q_DISABLED_PKTS 0x43
48728c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of packets dropped by the DICPU. Valid for EF10
48738c2ecf20Sopenharmony_ci * with PM_AND_RXDP_COUNTERS capability only.
48748c2ecf20Sopenharmony_ci */
48758c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_DI_DROPPED_PKTS 0x45
48768c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of non-host packets. Valid for EF10 with
48778c2ecf20Sopenharmony_ci * PM_AND_RXDP_COUNTERS capability only.
48788c2ecf20Sopenharmony_ci */
48798c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_STREAMING_PKTS 0x46
48808c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of times an hlb descriptor fetch was performed.
48818c2ecf20Sopenharmony_ci * Valid for EF10 with PM_AND_RXDP_COUNTERS capability only.
48828c2ecf20Sopenharmony_ci */
48838c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_HLB_FETCH_CONDITIONS 0x47
48848c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of times the DPCPU waited for an existing
48858c2ecf20Sopenharmony_ci * descriptor fetch. Valid for EF10 with PM_AND_RXDP_COUNTERS capability only.
48868c2ecf20Sopenharmony_ci */
48878c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_HLB_WAIT_CONDITIONS 0x48
48888c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_DMABUF_START 0x4c /* enum */
48898c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_UNICAST_PACKETS 0x4c /* enum */
48908c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_UNICAST_BYTES 0x4d /* enum */
48918c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_MULTICAST_PACKETS 0x4e /* enum */
48928c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_MULTICAST_BYTES 0x4f /* enum */
48938c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_BROADCAST_PACKETS 0x50 /* enum */
48948c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_BROADCAST_BYTES 0x51 /* enum */
48958c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_BAD_PACKETS 0x52 /* enum */
48968c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_BAD_BYTES 0x53 /* enum */
48978c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_RX_OVERFLOW 0x54 /* enum */
48988c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_DMABUF_START 0x57 /* enum */
48998c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_UNICAST_PACKETS 0x57 /* enum */
49008c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_UNICAST_BYTES 0x58 /* enum */
49018c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_MULTICAST_PACKETS 0x59 /* enum */
49028c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_MULTICAST_BYTES 0x5a /* enum */
49038c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_BROADCAST_PACKETS 0x5b /* enum */
49048c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_BROADCAST_BYTES 0x5c /* enum */
49058c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_BAD_PACKETS 0x5d /* enum */
49068c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_BAD_BYTES 0x5e /* enum */
49078c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_VADAPTER_TX_OVERFLOW 0x5f /* enum */
49088c2ecf20Sopenharmony_ci/* enum: Start of GMAC stats buffer space, for Siena only. */
49098c2ecf20Sopenharmony_ci#define          MC_CMD_GMAC_DMABUF_START 0x40
49108c2ecf20Sopenharmony_ci/* enum: End of GMAC stats buffer space, for Siena only. */
49118c2ecf20Sopenharmony_ci#define          MC_CMD_GMAC_DMABUF_END 0x5f
49128c2ecf20Sopenharmony_ci/* enum: GENERATION_END value, used together with GENERATION_START to verify
49138c2ecf20Sopenharmony_ci * consistency of DMAd data. For legacy firmware / drivers without extended
49148c2ecf20Sopenharmony_ci * stats (more precisely, when DMA_LEN == MC_CMD_MAC_NSTATS *
49158c2ecf20Sopenharmony_ci * sizeof(uint64_t)), this entry holds the GENERATION_END value. Otherwise,
49168c2ecf20Sopenharmony_ci * this value is invalid/ reserved and GENERATION_END is written as the last
49178c2ecf20Sopenharmony_ci * 64-bit word of the DMA buffer (at DMA_LEN - sizeof(uint64_t)). Note that
49188c2ecf20Sopenharmony_ci * this is consistent with the legacy behaviour, in the sense that entry 96 is
49198c2ecf20Sopenharmony_ci * the last 64-bit word in the buffer when DMA_LEN == MC_CMD_MAC_NSTATS *
49208c2ecf20Sopenharmony_ci * sizeof(uint64_t). See SF-109306-TC, Section 9.2 for details.
49218c2ecf20Sopenharmony_ci */
49228c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_GENERATION_END 0x60
49238c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_NSTATS 0x61 /* enum */
49248c2ecf20Sopenharmony_ci
49258c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_V2_OUT_DMA msgresponse */
49268c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_V2_OUT_DMA_LEN 0
49278c2ecf20Sopenharmony_ci
49288c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_V2_OUT_NO_DMA msgresponse */
49298c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_V2_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS_V2*64))>>3)
49308c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_OFST 0
49318c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_LEN 8
49328c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_LO_OFST 0
49338c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_HI_OFST 4
49348c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V2_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS_V2
49358c2ecf20Sopenharmony_ci/* enum: Start of FEC stats buffer space, Medford2 and up */
49368c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_DMABUF_START 0x61
49378c2ecf20Sopenharmony_ci/* enum: Number of uncorrected FEC codewords on link (RS-FEC only for Medford2)
49388c2ecf20Sopenharmony_ci */
49398c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_UNCORRECTED_ERRORS 0x61
49408c2ecf20Sopenharmony_ci/* enum: Number of corrected FEC codewords on link (RS-FEC only for Medford2)
49418c2ecf20Sopenharmony_ci */
49428c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_CORRECTED_ERRORS 0x62
49438c2ecf20Sopenharmony_ci/* enum: Number of corrected 10-bit symbol errors, lane 0 (RS-FEC only) */
49448c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE0 0x63
49458c2ecf20Sopenharmony_ci/* enum: Number of corrected 10-bit symbol errors, lane 1 (RS-FEC only) */
49468c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE1 0x64
49478c2ecf20Sopenharmony_ci/* enum: Number of corrected 10-bit symbol errors, lane 2 (RS-FEC only) */
49488c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE2 0x65
49498c2ecf20Sopenharmony_ci/* enum: Number of corrected 10-bit symbol errors, lane 3 (RS-FEC only) */
49508c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_FEC_CORRECTED_SYMBOLS_LANE3 0x66
49518c2ecf20Sopenharmony_ci/* enum: This includes the space at offset 103 which is the final
49528c2ecf20Sopenharmony_ci * GENERATION_END in a MAC_STATS_V2 response and otherwise unused.
49538c2ecf20Sopenharmony_ci */
49548c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_NSTATS_V2 0x68
49558c2ecf20Sopenharmony_ci/*            Other enum values, see field(s): */
49568c2ecf20Sopenharmony_ci/*               MC_CMD_MAC_STATS_OUT_NO_DMA/STATISTICS */
49578c2ecf20Sopenharmony_ci
49588c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_V3_OUT_DMA msgresponse */
49598c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_V3_OUT_DMA_LEN 0
49608c2ecf20Sopenharmony_ci
49618c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_V3_OUT_NO_DMA msgresponse */
49628c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_V3_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS_V3*64))>>3)
49638c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_OFST 0
49648c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_LEN 8
49658c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_LO_OFST 0
49668c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_HI_OFST 4
49678c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V3_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS_V3
49688c2ecf20Sopenharmony_ci/* enum: Start of CTPIO stats buffer space, Medford2 and up */
49698c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_DMABUF_START 0x68
49708c2ecf20Sopenharmony_ci/* enum: Number of CTPIO fallbacks because a DMA packet was in progress on the
49718c2ecf20Sopenharmony_ci * target VI
49728c2ecf20Sopenharmony_ci */
49738c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_VI_BUSY_FALLBACK 0x68
49748c2ecf20Sopenharmony_ci/* enum: Number of times a CTPIO send wrote beyond frame end (informational
49758c2ecf20Sopenharmony_ci * only)
49768c2ecf20Sopenharmony_ci */
49778c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_LONG_WRITE_SUCCESS 0x69
49788c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because the TX doorbell was written before
49798c2ecf20Sopenharmony_ci * the end of the frame data
49808c2ecf20Sopenharmony_ci */
49818c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_MISSING_DBELL_FAIL 0x6a
49828c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because the internal FIFO overflowed */
49838c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_OVERFLOW_FAIL 0x6b
49848c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because the host did not deliver data fast
49858c2ecf20Sopenharmony_ci * enough to avoid MAC underflow
49868c2ecf20Sopenharmony_ci */
49878c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_UNDERFLOW_FAIL 0x6c
49888c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because the host did not deliver all the
49898c2ecf20Sopenharmony_ci * frame data within the timeout
49908c2ecf20Sopenharmony_ci */
49918c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_TIMEOUT_FAIL 0x6d
49928c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because the frame data arrived out of order
49938c2ecf20Sopenharmony_ci * or with gaps
49948c2ecf20Sopenharmony_ci */
49958c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_NONCONTIG_WR_FAIL 0x6e
49968c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because the host started a new frame before
49978c2ecf20Sopenharmony_ci * completing the previous one
49988c2ecf20Sopenharmony_ci */
49998c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_FRM_CLOBBER_FAIL 0x6f
50008c2ecf20Sopenharmony_ci/* enum: Number of CTPIO failures because a write was not a multiple of 32 bits
50018c2ecf20Sopenharmony_ci * or not 32-bit aligned
50028c2ecf20Sopenharmony_ci */
50038c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_INVALID_WR_FAIL 0x70
50048c2ecf20Sopenharmony_ci/* enum: Number of CTPIO fallbacks because another VI on the same port was
50058c2ecf20Sopenharmony_ci * sending a CTPIO frame
50068c2ecf20Sopenharmony_ci */
50078c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_VI_CLOBBER_FALLBACK 0x71
50088c2ecf20Sopenharmony_ci/* enum: Number of CTPIO fallbacks because target VI did not have CTPIO enabled
50098c2ecf20Sopenharmony_ci */
50108c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_UNQUALIFIED_FALLBACK 0x72
50118c2ecf20Sopenharmony_ci/* enum: Number of CTPIO fallbacks because length in header was less than 29
50128c2ecf20Sopenharmony_ci * bytes
50138c2ecf20Sopenharmony_ci */
50148c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_RUNT_FALLBACK 0x73
50158c2ecf20Sopenharmony_ci/* enum: Total number of successful CTPIO sends on this port */
50168c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_SUCCESS 0x74
50178c2ecf20Sopenharmony_ci/* enum: Total number of CTPIO fallbacks on this port */
50188c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_FALLBACK 0x75
50198c2ecf20Sopenharmony_ci/* enum: Total number of CTPIO poisoned frames on this port, whether erased or
50208c2ecf20Sopenharmony_ci * not
50218c2ecf20Sopenharmony_ci */
50228c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_POISON 0x76
50238c2ecf20Sopenharmony_ci/* enum: Total number of CTPIO erased frames on this port */
50248c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_CTPIO_ERASE 0x77
50258c2ecf20Sopenharmony_ci/* enum: This includes the space at offset 120 which is the final
50268c2ecf20Sopenharmony_ci * GENERATION_END in a MAC_STATS_V3 response and otherwise unused.
50278c2ecf20Sopenharmony_ci */
50288c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_NSTATS_V3 0x79
50298c2ecf20Sopenharmony_ci/*            Other enum values, see field(s): */
50308c2ecf20Sopenharmony_ci/*               MC_CMD_MAC_STATS_V2_OUT_NO_DMA/STATISTICS */
50318c2ecf20Sopenharmony_ci
50328c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_V4_OUT_DMA msgresponse */
50338c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_V4_OUT_DMA_LEN 0
50348c2ecf20Sopenharmony_ci
50358c2ecf20Sopenharmony_ci/* MC_CMD_MAC_STATS_V4_OUT_NO_DMA msgresponse */
50368c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_STATS_V4_OUT_NO_DMA_LEN (((MC_CMD_MAC_NSTATS_V4*64))>>3)
50378c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V4_OUT_NO_DMA_STATISTICS_OFST 0
50388c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V4_OUT_NO_DMA_STATISTICS_LEN 8
50398c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V4_OUT_NO_DMA_STATISTICS_LO_OFST 0
50408c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V4_OUT_NO_DMA_STATISTICS_HI_OFST 4
50418c2ecf20Sopenharmony_ci#define       MC_CMD_MAC_STATS_V4_OUT_NO_DMA_STATISTICS_NUM MC_CMD_MAC_NSTATS_V4
50428c2ecf20Sopenharmony_ci/* enum: Start of V4 stats buffer space */
50438c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_V4_DMABUF_START 0x79
50448c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of packets truncated because scattering was
50458c2ecf20Sopenharmony_ci * disabled.
50468c2ecf20Sopenharmony_ci */
50478c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_SCATTER_DISABLED_TRUNC 0x79
50488c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of times the RXDP head of line blocked waiting
50498c2ecf20Sopenharmony_ci * for descriptors. Will be zero unless RXDP_HLB_IDLE capability is set.
50508c2ecf20Sopenharmony_ci */
50518c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_HLB_IDLE 0x7a
50528c2ecf20Sopenharmony_ci/* enum: RXDP counter: Number of times the RXDP timed out while head of line
50538c2ecf20Sopenharmony_ci * blocking. Will be zero unless RXDP_HLB_IDLE capability is set.
50548c2ecf20Sopenharmony_ci */
50558c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_RXDP_HLB_TIMEOUT 0x7b
50568c2ecf20Sopenharmony_ci/* enum: This includes the space at offset 124 which is the final
50578c2ecf20Sopenharmony_ci * GENERATION_END in a MAC_STATS_V4 response and otherwise unused.
50588c2ecf20Sopenharmony_ci */
50598c2ecf20Sopenharmony_ci#define          MC_CMD_MAC_NSTATS_V4 0x7d
50608c2ecf20Sopenharmony_ci/*            Other enum values, see field(s): */
50618c2ecf20Sopenharmony_ci/*               MC_CMD_MAC_STATS_V3_OUT_NO_DMA/STATISTICS */
50628c2ecf20Sopenharmony_ci
50638c2ecf20Sopenharmony_ci
50648c2ecf20Sopenharmony_ci/***********************************/
50658c2ecf20Sopenharmony_ci/* MC_CMD_SRIOV
50668c2ecf20Sopenharmony_ci * to be documented
50678c2ecf20Sopenharmony_ci */
50688c2ecf20Sopenharmony_ci#define MC_CMD_SRIOV 0x30
50698c2ecf20Sopenharmony_ci
50708c2ecf20Sopenharmony_ci/* MC_CMD_SRIOV_IN msgrequest */
50718c2ecf20Sopenharmony_ci#define    MC_CMD_SRIOV_IN_LEN 12
50728c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_IN_ENABLE_OFST 0
50738c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_IN_ENABLE_LEN 4
50748c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_IN_VI_BASE_OFST 4
50758c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_IN_VI_BASE_LEN 4
50768c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_IN_VF_COUNT_OFST 8
50778c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_IN_VF_COUNT_LEN 4
50788c2ecf20Sopenharmony_ci
50798c2ecf20Sopenharmony_ci/* MC_CMD_SRIOV_OUT msgresponse */
50808c2ecf20Sopenharmony_ci#define    MC_CMD_SRIOV_OUT_LEN 8
50818c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_OUT_VI_SCALE_OFST 0
50828c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_OUT_VI_SCALE_LEN 4
50838c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_OUT_VF_TOTAL_OFST 4
50848c2ecf20Sopenharmony_ci#define       MC_CMD_SRIOV_OUT_VF_TOTAL_LEN 4
50858c2ecf20Sopenharmony_ci
50868c2ecf20Sopenharmony_ci/* MC_CMD_MEMCPY_RECORD_TYPEDEF structuredef */
50878c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_RECORD_TYPEDEF_LEN 32
50888c2ecf20Sopenharmony_ci/* this is only used for the first record */
50898c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_OFST 0
50908c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_LEN 4
50918c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_LBN 0
50928c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_NUM_RECORDS_WIDTH 32
50938c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_OFST 4
50948c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_LEN 4
50958c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_LBN 32
50968c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_RID_WIDTH 32
50978c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_OFST 8
50988c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LEN 8
50998c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LO_OFST 8
51008c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_HI_OFST 12
51018c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_LBN 64
51028c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_TO_ADDR_WIDTH 64
51038c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_OFST 16
51048c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_LEN 4
51058c2ecf20Sopenharmony_ci#define          MC_CMD_MEMCPY_RECORD_TYPEDEF_RID_INLINE 0x100 /* enum */
51068c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_LBN 128
51078c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_RID_WIDTH 32
51088c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_OFST 20
51098c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LEN 8
51108c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LO_OFST 20
51118c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_HI_OFST 24
51128c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_LBN 160
51138c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_FROM_ADDR_WIDTH 64
51148c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_OFST 28
51158c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_LEN 4
51168c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_LBN 224
51178c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_RECORD_TYPEDEF_LENGTH_WIDTH 32
51188c2ecf20Sopenharmony_ci
51198c2ecf20Sopenharmony_ci
51208c2ecf20Sopenharmony_ci/***********************************/
51218c2ecf20Sopenharmony_ci/* MC_CMD_MEMCPY
51228c2ecf20Sopenharmony_ci * DMA write data into (Rid,Addr), either by dma reading (Rid,Addr), or by data
51238c2ecf20Sopenharmony_ci * embedded directly in the command.
51248c2ecf20Sopenharmony_ci *
51258c2ecf20Sopenharmony_ci * A common pattern is for a client to use generation counts to signal a dma
51268c2ecf20Sopenharmony_ci * update of a datastructure. To facilitate this, this MCDI operation can
51278c2ecf20Sopenharmony_ci * contain multiple requests which are executed in strict order. Requests take
51288c2ecf20Sopenharmony_ci * the form of duplicating the entire MCDI request continuously (including the
51298c2ecf20Sopenharmony_ci * requests record, which is ignored in all but the first structure)
51308c2ecf20Sopenharmony_ci *
51318c2ecf20Sopenharmony_ci * The source data can either come from a DMA from the host, or it can be
51328c2ecf20Sopenharmony_ci * embedded within the request directly, thereby eliminating a DMA read. To
51338c2ecf20Sopenharmony_ci * indicate this, the client sets FROM_RID=%RID_INLINE, ADDR_HI=0, and
51348c2ecf20Sopenharmony_ci * ADDR_LO=offset, and inserts the data at %offset from the start of the
51358c2ecf20Sopenharmony_ci * payload. It's the callers responsibility to ensure that the embedded data
51368c2ecf20Sopenharmony_ci * doesn't overlap the records.
51378c2ecf20Sopenharmony_ci *
51388c2ecf20Sopenharmony_ci * Returns: 0, EINVAL (invalid RID)
51398c2ecf20Sopenharmony_ci */
51408c2ecf20Sopenharmony_ci#define MC_CMD_MEMCPY 0x31
51418c2ecf20Sopenharmony_ci
51428c2ecf20Sopenharmony_ci/* MC_CMD_MEMCPY_IN msgrequest */
51438c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_IN_LENMIN 32
51448c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_IN_LENMAX 224
51458c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_IN_LENMAX_MCDI2 992
51468c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_IN_LEN(num) (0+32*(num))
51478c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_IN_RECORD_NUM(len) (((len)-0)/32)
51488c2ecf20Sopenharmony_ci/* see MC_CMD_MEMCPY_RECORD_TYPEDEF */
51498c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_IN_RECORD_OFST 0
51508c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_IN_RECORD_LEN 32
51518c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_IN_RECORD_MINNUM 1
51528c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_IN_RECORD_MAXNUM 7
51538c2ecf20Sopenharmony_ci#define       MC_CMD_MEMCPY_IN_RECORD_MAXNUM_MCDI2 31
51548c2ecf20Sopenharmony_ci
51558c2ecf20Sopenharmony_ci/* MC_CMD_MEMCPY_OUT msgresponse */
51568c2ecf20Sopenharmony_ci#define    MC_CMD_MEMCPY_OUT_LEN 0
51578c2ecf20Sopenharmony_ci
51588c2ecf20Sopenharmony_ci
51598c2ecf20Sopenharmony_ci/***********************************/
51608c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET
51618c2ecf20Sopenharmony_ci * Set a WoL filter.
51628c2ecf20Sopenharmony_ci */
51638c2ecf20Sopenharmony_ci#define MC_CMD_WOL_FILTER_SET 0x32
51648c2ecf20Sopenharmony_ci#undef MC_CMD_0x32_PRIVILEGE_CTG
51658c2ecf20Sopenharmony_ci
51668c2ecf20Sopenharmony_ci#define MC_CMD_0x32_PRIVILEGE_CTG SRIOV_CTG_LINK
51678c2ecf20Sopenharmony_ci
51688c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_IN msgrequest */
51698c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_IN_LEN 192
51708c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0
51718c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4
51728c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_MODE_SIMPLE 0x0 /* enum */
51738c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_MODE_STRUCTURED 0xffffffff /* enum */
51748c2ecf20Sopenharmony_ci/* A type value of 1 is unused. */
51758c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4
51768c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4
51778c2ecf20Sopenharmony_ci/* enum: Magic */
51788c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_MAGIC 0x0
51798c2ecf20Sopenharmony_ci/* enum: MS Windows Magic */
51808c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_WIN_MAGIC 0x2
51818c2ecf20Sopenharmony_ci/* enum: IPv4 Syn */
51828c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_IPV4_SYN 0x3
51838c2ecf20Sopenharmony_ci/* enum: IPv6 Syn */
51848c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_IPV6_SYN 0x4
51858c2ecf20Sopenharmony_ci/* enum: Bitmap */
51868c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_BITMAP 0x5
51878c2ecf20Sopenharmony_ci/* enum: Link */
51888c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_LINK 0x6
51898c2ecf20Sopenharmony_ci/* enum: (Above this for future use) */
51908c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_TYPE_MAX 0x7
51918c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_DATA_OFST 8
51928c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_DATA_LEN 4
51938c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_DATA_NUM 46
51948c2ecf20Sopenharmony_ci
51958c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_IN_MAGIC msgrequest */
51968c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_IN_MAGIC_LEN 16
51978c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
51988c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
51998c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
52008c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
52018c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_OFST 8
52028c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_LEN 8
52038c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_LO_OFST 8
52048c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_MAGIC_MAC_HI_OFST 12
52058c2ecf20Sopenharmony_ci
52068c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN msgrequest */
52078c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_LEN 20
52088c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
52098c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
52108c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
52118c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
52128c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_IP_OFST 8
52138c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_IP_LEN 4
52148c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_IP_OFST 12
52158c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_IP_LEN 4
52168c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_PORT_OFST 16
52178c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_SRC_PORT_LEN 2
52188c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_PORT_OFST 18
52198c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV4_SYN_DST_PORT_LEN 2
52208c2ecf20Sopenharmony_ci
52218c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN msgrequest */
52228c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_LEN 44
52238c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
52248c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
52258c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
52268c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
52278c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_IP_OFST 8
52288c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_IP_LEN 16
52298c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_IP_OFST 24
52308c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_IP_LEN 16
52318c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_PORT_OFST 40
52328c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_SRC_PORT_LEN 2
52338c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_PORT_OFST 42
52348c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_IPV6_SYN_DST_PORT_LEN 2
52358c2ecf20Sopenharmony_ci
52368c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_IN_BITMAP msgrequest */
52378c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN 187
52388c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
52398c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
52408c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
52418c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
52428c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_MASK_OFST 8
52438c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_MASK_LEN 48
52448c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_BITMAP_OFST 56
52458c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_BITMAP_LEN 128
52468c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN_OFST 184
52478c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_LEN_LEN 1
52488c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER3_OFST 185
52498c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER3_LEN 1
52508c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER4_OFST 186
52518c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_BITMAP_LAYER4_LEN 1
52528c2ecf20Sopenharmony_ci
52538c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_IN_LINK msgrequest */
52548c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_IN_LINK_LEN 12
52558c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_OFST 0 */
52568c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_FILTER_MODE_LEN 4 */
52578c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_OFST 4 */
52588c2ecf20Sopenharmony_ci/*            MC_CMD_WOL_FILTER_SET_IN_WOL_TYPE_LEN 4 */
52598c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_LINK_MASK_OFST 8
52608c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_IN_LINK_MASK_LEN 4
52618c2ecf20Sopenharmony_ci#define        MC_CMD_WOL_FILTER_SET_IN_LINK_UP_OFST 8
52628c2ecf20Sopenharmony_ci#define        MC_CMD_WOL_FILTER_SET_IN_LINK_UP_LBN 0
52638c2ecf20Sopenharmony_ci#define        MC_CMD_WOL_FILTER_SET_IN_LINK_UP_WIDTH 1
52648c2ecf20Sopenharmony_ci#define        MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_OFST 8
52658c2ecf20Sopenharmony_ci#define        MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_LBN 1
52668c2ecf20Sopenharmony_ci#define        MC_CMD_WOL_FILTER_SET_IN_LINK_DOWN_WIDTH 1
52678c2ecf20Sopenharmony_ci
52688c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_SET_OUT msgresponse */
52698c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_SET_OUT_LEN 4
52708c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_OUT_FILTER_ID_OFST 0
52718c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_SET_OUT_FILTER_ID_LEN 4
52728c2ecf20Sopenharmony_ci
52738c2ecf20Sopenharmony_ci
52748c2ecf20Sopenharmony_ci/***********************************/
52758c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_REMOVE
52768c2ecf20Sopenharmony_ci * Remove a WoL filter. Locks required: None. Returns: 0, EINVAL, ENOSYS
52778c2ecf20Sopenharmony_ci */
52788c2ecf20Sopenharmony_ci#define MC_CMD_WOL_FILTER_REMOVE 0x33
52798c2ecf20Sopenharmony_ci#undef MC_CMD_0x33_PRIVILEGE_CTG
52808c2ecf20Sopenharmony_ci
52818c2ecf20Sopenharmony_ci#define MC_CMD_0x33_PRIVILEGE_CTG SRIOV_CTG_LINK
52828c2ecf20Sopenharmony_ci
52838c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_REMOVE_IN msgrequest */
52848c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_REMOVE_IN_LEN 4
52858c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_REMOVE_IN_FILTER_ID_OFST 0
52868c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_REMOVE_IN_FILTER_ID_LEN 4
52878c2ecf20Sopenharmony_ci
52888c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_REMOVE_OUT msgresponse */
52898c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_REMOVE_OUT_LEN 0
52908c2ecf20Sopenharmony_ci
52918c2ecf20Sopenharmony_ci
52928c2ecf20Sopenharmony_ci/***********************************/
52938c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_RESET
52948c2ecf20Sopenharmony_ci * Reset (i.e. remove all) WoL filters. Locks required: None. Returns: 0,
52958c2ecf20Sopenharmony_ci * ENOSYS
52968c2ecf20Sopenharmony_ci */
52978c2ecf20Sopenharmony_ci#define MC_CMD_WOL_FILTER_RESET 0x34
52988c2ecf20Sopenharmony_ci#undef MC_CMD_0x34_PRIVILEGE_CTG
52998c2ecf20Sopenharmony_ci
53008c2ecf20Sopenharmony_ci#define MC_CMD_0x34_PRIVILEGE_CTG SRIOV_CTG_LINK
53018c2ecf20Sopenharmony_ci
53028c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_RESET_IN msgrequest */
53038c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_RESET_IN_LEN 4
53048c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_RESET_IN_MASK_OFST 0
53058c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_RESET_IN_MASK_LEN 4
53068c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_FILTER_RESET_IN_WAKE_FILTERS 0x1 /* enum */
53078c2ecf20Sopenharmony_ci#define          MC_CMD_WOL_FILTER_RESET_IN_LIGHTSOUT_OFFLOADS 0x2 /* enum */
53088c2ecf20Sopenharmony_ci
53098c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_RESET_OUT msgresponse */
53108c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_RESET_OUT_LEN 0
53118c2ecf20Sopenharmony_ci
53128c2ecf20Sopenharmony_ci
53138c2ecf20Sopenharmony_ci/***********************************/
53148c2ecf20Sopenharmony_ci/* MC_CMD_SET_MCAST_HASH
53158c2ecf20Sopenharmony_ci * Set the MCAST hash value without otherwise reconfiguring the MAC
53168c2ecf20Sopenharmony_ci */
53178c2ecf20Sopenharmony_ci#define MC_CMD_SET_MCAST_HASH 0x35
53188c2ecf20Sopenharmony_ci
53198c2ecf20Sopenharmony_ci/* MC_CMD_SET_MCAST_HASH_IN msgrequest */
53208c2ecf20Sopenharmony_ci#define    MC_CMD_SET_MCAST_HASH_IN_LEN 32
53218c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MCAST_HASH_IN_HASH0_OFST 0
53228c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MCAST_HASH_IN_HASH0_LEN 16
53238c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MCAST_HASH_IN_HASH1_OFST 16
53248c2ecf20Sopenharmony_ci#define       MC_CMD_SET_MCAST_HASH_IN_HASH1_LEN 16
53258c2ecf20Sopenharmony_ci
53268c2ecf20Sopenharmony_ci/* MC_CMD_SET_MCAST_HASH_OUT msgresponse */
53278c2ecf20Sopenharmony_ci#define    MC_CMD_SET_MCAST_HASH_OUT_LEN 0
53288c2ecf20Sopenharmony_ci
53298c2ecf20Sopenharmony_ci
53308c2ecf20Sopenharmony_ci/***********************************/
53318c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_TYPES
53328c2ecf20Sopenharmony_ci * Return bitfield indicating available types of virtual NVRAM partitions.
53338c2ecf20Sopenharmony_ci * Locks required: none. Returns: 0
53348c2ecf20Sopenharmony_ci */
53358c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_TYPES 0x36
53368c2ecf20Sopenharmony_ci#undef MC_CMD_0x36_PRIVILEGE_CTG
53378c2ecf20Sopenharmony_ci
53388c2ecf20Sopenharmony_ci#define MC_CMD_0x36_PRIVILEGE_CTG SRIOV_CTG_ADMIN
53398c2ecf20Sopenharmony_ci
53408c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_TYPES_IN msgrequest */
53418c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_TYPES_IN_LEN 0
53428c2ecf20Sopenharmony_ci
53438c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_TYPES_OUT msgresponse */
53448c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_TYPES_OUT_LEN 4
53458c2ecf20Sopenharmony_ci/* Bit mask of supported types. */
53468c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_TYPES_OUT_TYPES_OFST 0
53478c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_TYPES_OUT_TYPES_LEN 4
53488c2ecf20Sopenharmony_ci/* enum: Disabled callisto. */
53498c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_DISABLED_CALLISTO 0x0
53508c2ecf20Sopenharmony_ci/* enum: MC firmware. */
53518c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_MC_FW 0x1
53528c2ecf20Sopenharmony_ci/* enum: MC backup firmware. */
53538c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_MC_FW_BACKUP 0x2
53548c2ecf20Sopenharmony_ci/* enum: Static configuration Port0. */
53558c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT0 0x3
53568c2ecf20Sopenharmony_ci/* enum: Static configuration Port1. */
53578c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_STATIC_CFG_PORT1 0x4
53588c2ecf20Sopenharmony_ci/* enum: Dynamic configuration Port0. */
53598c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT0 0x5
53608c2ecf20Sopenharmony_ci/* enum: Dynamic configuration Port1. */
53618c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_DYNAMIC_CFG_PORT1 0x6
53628c2ecf20Sopenharmony_ci/* enum: Expansion Rom. */
53638c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_EXP_ROM 0x7
53648c2ecf20Sopenharmony_ci/* enum: Expansion Rom Configuration Port0. */
53658c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT0 0x8
53668c2ecf20Sopenharmony_ci/* enum: Expansion Rom Configuration Port1. */
53678c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1 0x9
53688c2ecf20Sopenharmony_ci/* enum: Phy Configuration Port0. */
53698c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_PHY_PORT0 0xa
53708c2ecf20Sopenharmony_ci/* enum: Phy Configuration Port1. */
53718c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_PHY_PORT1 0xb
53728c2ecf20Sopenharmony_ci/* enum: Log. */
53738c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_LOG 0xc
53748c2ecf20Sopenharmony_ci/* enum: FPGA image. */
53758c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_FPGA 0xd
53768c2ecf20Sopenharmony_ci/* enum: FPGA backup image */
53778c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_FPGA_BACKUP 0xe
53788c2ecf20Sopenharmony_ci/* enum: FC firmware. */
53798c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_FC_FW 0xf
53808c2ecf20Sopenharmony_ci/* enum: FC backup firmware. */
53818c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_FC_FW_BACKUP 0x10
53828c2ecf20Sopenharmony_ci/* enum: CPLD image. */
53838c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_CPLD 0x11
53848c2ecf20Sopenharmony_ci/* enum: Licensing information. */
53858c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_LICENSE 0x12
53868c2ecf20Sopenharmony_ci/* enum: FC Log. */
53878c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_FC_LOG 0x13
53888c2ecf20Sopenharmony_ci/* enum: Additional flash on FPGA. */
53898c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TYPE_FC_EXTRA 0x14
53908c2ecf20Sopenharmony_ci
53918c2ecf20Sopenharmony_ci
53928c2ecf20Sopenharmony_ci/***********************************/
53938c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_INFO
53948c2ecf20Sopenharmony_ci * Read info about a virtual NVRAM partition. Locks required: none. Returns: 0,
53958c2ecf20Sopenharmony_ci * EINVAL (bad type).
53968c2ecf20Sopenharmony_ci */
53978c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_INFO 0x37
53988c2ecf20Sopenharmony_ci#undef MC_CMD_0x37_PRIVILEGE_CTG
53998c2ecf20Sopenharmony_ci
54008c2ecf20Sopenharmony_ci#define MC_CMD_0x37_PRIVILEGE_CTG SRIOV_CTG_ADMIN
54018c2ecf20Sopenharmony_ci
54028c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_INFO_IN msgrequest */
54038c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_INFO_IN_LEN 4
54048c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_IN_TYPE_OFST 0
54058c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_IN_TYPE_LEN 4
54068c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
54078c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
54088c2ecf20Sopenharmony_ci
54098c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_INFO_OUT msgresponse */
54108c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_INFO_OUT_LEN 24
54118c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_TYPE_OFST 0
54128c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_TYPE_LEN 4
54138c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
54148c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
54158c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_SIZE_OFST 4
54168c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_SIZE_LEN 4
54178c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_ERASESIZE_OFST 8
54188c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_ERASESIZE_LEN 4
54198c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_FLAGS_OFST 12
54208c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_FLAGS_LEN 4
54218c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_PROTECTED_OFST 12
54228c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_PROTECTED_LBN 0
54238c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_PROTECTED_WIDTH 1
54248c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_TLV_OFST 12
54258c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_TLV_LBN 1
54268c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_TLV_WIDTH 1
54278c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_READ_ONLY_IF_TSA_BOUND_OFST 12
54288c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_READ_ONLY_IF_TSA_BOUND_LBN 2
54298c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_READ_ONLY_IF_TSA_BOUND_WIDTH 1
54308c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_CRC_OFST 12
54318c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_CRC_LBN 3
54328c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_CRC_WIDTH 1
54338c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_READ_ONLY_OFST 12
54348c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_READ_ONLY_LBN 5
54358c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_READ_ONLY_WIDTH 1
54368c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_CMAC_OFST 12
54378c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_CMAC_LBN 6
54388c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_CMAC_WIDTH 1
54398c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_A_B_OFST 12
54408c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_A_B_LBN 7
54418c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_OUT_A_B_WIDTH 1
54428c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_PHYSDEV_OFST 16
54438c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_PHYSDEV_LEN 4
54448c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_PHYSADDR_OFST 20
54458c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_OUT_PHYSADDR_LEN 4
54468c2ecf20Sopenharmony_ci
54478c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_INFO_V2_OUT msgresponse */
54488c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_INFO_V2_OUT_LEN 28
54498c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_TYPE_OFST 0
54508c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_TYPE_LEN 4
54518c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
54528c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
54538c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_SIZE_OFST 4
54548c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_SIZE_LEN 4
54558c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_ERASESIZE_OFST 8
54568c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_ERASESIZE_LEN 4
54578c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_FLAGS_OFST 12
54588c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_FLAGS_LEN 4
54598c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_OFST 12
54608c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_LBN 0
54618c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_WIDTH 1
54628c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_TLV_OFST 12
54638c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_TLV_LBN 1
54648c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_TLV_WIDTH 1
54658c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_IF_TSA_BOUND_OFST 12
54668c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_IF_TSA_BOUND_LBN 2
54678c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_IF_TSA_BOUND_WIDTH 1
54688c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_OFST 12
54698c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_LBN 5
54708c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_READ_ONLY_WIDTH 1
54718c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_A_B_OFST 12
54728c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_A_B_LBN 7
54738c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_INFO_V2_OUT_A_B_WIDTH 1
54748c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_PHYSDEV_OFST 16
54758c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_PHYSDEV_LEN 4
54768c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_PHYSADDR_OFST 20
54778c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_PHYSADDR_LEN 4
54788c2ecf20Sopenharmony_ci/* Writes must be multiples of this size. Added to support the MUM on Sorrento.
54798c2ecf20Sopenharmony_ci */
54808c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_WRITESIZE_OFST 24
54818c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_INFO_V2_OUT_WRITESIZE_LEN 4
54828c2ecf20Sopenharmony_ci
54838c2ecf20Sopenharmony_ci
54848c2ecf20Sopenharmony_ci/***********************************/
54858c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_START
54868c2ecf20Sopenharmony_ci * Start a group of update operations on a virtual NVRAM partition. Locks
54878c2ecf20Sopenharmony_ci * required: PHY_LOCK if type==*PHY*. Returns: 0, EINVAL (bad type), EACCES (if
54888c2ecf20Sopenharmony_ci * PHY_LOCK required and not held). In an adapter bound to a TSA controller,
54898c2ecf20Sopenharmony_ci * MC_CMD_NVRAM_UPDATE_START can only be used on a subset of partition types
54908c2ecf20Sopenharmony_ci * i.e. static config, dynamic config and expansion ROM config. Attempting to
54918c2ecf20Sopenharmony_ci * perform this operation on a restricted partition will return the error
54928c2ecf20Sopenharmony_ci * EPERM.
54938c2ecf20Sopenharmony_ci */
54948c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_UPDATE_START 0x38
54958c2ecf20Sopenharmony_ci#undef MC_CMD_0x38_PRIVILEGE_CTG
54968c2ecf20Sopenharmony_ci
54978c2ecf20Sopenharmony_ci#define MC_CMD_0x38_PRIVILEGE_CTG SRIOV_CTG_ADMIN
54988c2ecf20Sopenharmony_ci
54998c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_START_IN msgrequest: Legacy NVRAM_UPDATE_START request.
55008c2ecf20Sopenharmony_ci * Use NVRAM_UPDATE_START_V2_IN in new code
55018c2ecf20Sopenharmony_ci */
55028c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_START_IN_LEN 4
55038c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_START_IN_TYPE_OFST 0
55048c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_START_IN_TYPE_LEN 4
55058c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
55068c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
55078c2ecf20Sopenharmony_ci
55088c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_START_V2_IN msgrequest: Extended NVRAM_UPDATE_START
55098c2ecf20Sopenharmony_ci * request with additional flags indicating version of command in use. See
55108c2ecf20Sopenharmony_ci * MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT for details of extended functionality. Use
55118c2ecf20Sopenharmony_ci * paired up with NVRAM_UPDATE_FINISH_V2_IN.
55128c2ecf20Sopenharmony_ci */
55138c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_START_V2_IN_LEN 8
55148c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_START_V2_IN_TYPE_OFST 0
55158c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_START_V2_IN_TYPE_LEN 4
55168c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
55178c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
55188c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAGS_OFST 4
55198c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAGS_LEN 4
55208c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAG_REPORT_VERIFY_RESULT_OFST 4
55218c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAG_REPORT_VERIFY_RESULT_LBN 0
55228c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_START_V2_IN_FLAG_REPORT_VERIFY_RESULT_WIDTH 1
55238c2ecf20Sopenharmony_ci
55248c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_START_OUT msgresponse */
55258c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_START_OUT_LEN 0
55268c2ecf20Sopenharmony_ci
55278c2ecf20Sopenharmony_ci
55288c2ecf20Sopenharmony_ci/***********************************/
55298c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_READ
55308c2ecf20Sopenharmony_ci * Read data from a virtual NVRAM partition. Locks required: PHY_LOCK if
55318c2ecf20Sopenharmony_ci * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if
55328c2ecf20Sopenharmony_ci * PHY_LOCK required and not held)
55338c2ecf20Sopenharmony_ci */
55348c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_READ 0x39
55358c2ecf20Sopenharmony_ci#undef MC_CMD_0x39_PRIVILEGE_CTG
55368c2ecf20Sopenharmony_ci
55378c2ecf20Sopenharmony_ci#define MC_CMD_0x39_PRIVILEGE_CTG SRIOV_CTG_ADMIN
55388c2ecf20Sopenharmony_ci
55398c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_READ_IN msgrequest */
55408c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_IN_LEN 12
55418c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_TYPE_OFST 0
55428c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_TYPE_LEN 4
55438c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
55448c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
55458c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_OFFSET_OFST 4
55468c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_OFFSET_LEN 4
55478c2ecf20Sopenharmony_ci/* amount to read in bytes */
55488c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_LENGTH_OFST 8
55498c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_LENGTH_LEN 4
55508c2ecf20Sopenharmony_ci
55518c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_READ_IN_V2 msgrequest */
55528c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_IN_V2_LEN 16
55538c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_TYPE_OFST 0
55548c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_TYPE_LEN 4
55558c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
55568c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
55578c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_OFFSET_OFST 4
55588c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_OFFSET_LEN 4
55598c2ecf20Sopenharmony_ci/* amount to read in bytes */
55608c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_LENGTH_OFST 8
55618c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_LENGTH_LEN 4
55628c2ecf20Sopenharmony_ci/* Optional control info. If a partition is stored with an A/B versioning
55638c2ecf20Sopenharmony_ci * scheme (i.e. in more than one physical partition in NVRAM) the host can set
55648c2ecf20Sopenharmony_ci * this to control which underlying physical partition is used to read data
55658c2ecf20Sopenharmony_ci * from. This allows it to perform a read-modify-write-verify with the write
55668c2ecf20Sopenharmony_ci * lock continuously held by calling NVRAM_UPDATE_START, reading the old
55678c2ecf20Sopenharmony_ci * contents using MODE=TARGET_CURRENT, overwriting the old partition and then
55688c2ecf20Sopenharmony_ci * verifying by reading with MODE=TARGET_BACKUP.
55698c2ecf20Sopenharmony_ci */
55708c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_MODE_OFST 12
55718c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_IN_V2_MODE_LEN 4
55728c2ecf20Sopenharmony_ci/* enum: Same as omitting MODE: caller sees data in current partition unless it
55738c2ecf20Sopenharmony_ci * holds the write lock in which case it sees data in the partition it is
55748c2ecf20Sopenharmony_ci * updating.
55758c2ecf20Sopenharmony_ci */
55768c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_READ_IN_V2_DEFAULT 0x0
55778c2ecf20Sopenharmony_ci/* enum: Read from the current partition of an A/B pair, even if holding the
55788c2ecf20Sopenharmony_ci * write lock.
55798c2ecf20Sopenharmony_ci */
55808c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_READ_IN_V2_TARGET_CURRENT 0x1
55818c2ecf20Sopenharmony_ci/* enum: Read from the non-current (i.e. to be updated) partition of an A/B
55828c2ecf20Sopenharmony_ci * pair
55838c2ecf20Sopenharmony_ci */
55848c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_READ_IN_V2_TARGET_BACKUP 0x2
55858c2ecf20Sopenharmony_ci
55868c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_READ_OUT msgresponse */
55878c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_OUT_LENMIN 1
55888c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_OUT_LENMAX 252
55898c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_OUT_LENMAX_MCDI2 1020
55908c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_OUT_LEN(num) (0+1*(num))
55918c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_READ_OUT_READ_BUFFER_NUM(len) (((len)-0)/1)
55928c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_OUT_READ_BUFFER_OFST 0
55938c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_OUT_READ_BUFFER_LEN 1
55948c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MINNUM 1
55958c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MAXNUM 252
55968c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_READ_OUT_READ_BUFFER_MAXNUM_MCDI2 1020
55978c2ecf20Sopenharmony_ci
55988c2ecf20Sopenharmony_ci
55998c2ecf20Sopenharmony_ci/***********************************/
56008c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_WRITE
56018c2ecf20Sopenharmony_ci * Write data to a virtual NVRAM partition. Locks required: PHY_LOCK if
56028c2ecf20Sopenharmony_ci * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if
56038c2ecf20Sopenharmony_ci * PHY_LOCK required and not held)
56048c2ecf20Sopenharmony_ci */
56058c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_WRITE 0x3a
56068c2ecf20Sopenharmony_ci#undef MC_CMD_0x3a_PRIVILEGE_CTG
56078c2ecf20Sopenharmony_ci
56088c2ecf20Sopenharmony_ci#define MC_CMD_0x3a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
56098c2ecf20Sopenharmony_ci
56108c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_WRITE_IN msgrequest */
56118c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_WRITE_IN_LENMIN 13
56128c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_WRITE_IN_LENMAX 252
56138c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_WRITE_IN_LENMAX_MCDI2 1020
56148c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_WRITE_IN_LEN(num) (12+1*(num))
56158c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_NUM(len) (((len)-12)/1)
56168c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_TYPE_OFST 0
56178c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_TYPE_LEN 4
56188c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
56198c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
56208c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_OFFSET_OFST 4
56218c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_OFFSET_LEN 4
56228c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_LENGTH_OFST 8
56238c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_LENGTH_LEN 4
56248c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_OFST 12
56258c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_LEN 1
56268c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MINNUM 1
56278c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MAXNUM 240
56288c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_WRITE_IN_WRITE_BUFFER_MAXNUM_MCDI2 1008
56298c2ecf20Sopenharmony_ci
56308c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_WRITE_OUT msgresponse */
56318c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_WRITE_OUT_LEN 0
56328c2ecf20Sopenharmony_ci
56338c2ecf20Sopenharmony_ci
56348c2ecf20Sopenharmony_ci/***********************************/
56358c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_ERASE
56368c2ecf20Sopenharmony_ci * Erase sector(s) from a virtual NVRAM partition. Locks required: PHY_LOCK if
56378c2ecf20Sopenharmony_ci * type==*PHY*. Returns: 0, EINVAL (bad type/offset/length), EACCES (if
56388c2ecf20Sopenharmony_ci * PHY_LOCK required and not held)
56398c2ecf20Sopenharmony_ci */
56408c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_ERASE 0x3b
56418c2ecf20Sopenharmony_ci#undef MC_CMD_0x3b_PRIVILEGE_CTG
56428c2ecf20Sopenharmony_ci
56438c2ecf20Sopenharmony_ci#define MC_CMD_0x3b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
56448c2ecf20Sopenharmony_ci
56458c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_ERASE_IN msgrequest */
56468c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_ERASE_IN_LEN 12
56478c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_ERASE_IN_TYPE_OFST 0
56488c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_ERASE_IN_TYPE_LEN 4
56498c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
56508c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
56518c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_ERASE_IN_OFFSET_OFST 4
56528c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_ERASE_IN_OFFSET_LEN 4
56538c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_ERASE_IN_LENGTH_OFST 8
56548c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_ERASE_IN_LENGTH_LEN 4
56558c2ecf20Sopenharmony_ci
56568c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_ERASE_OUT msgresponse */
56578c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_ERASE_OUT_LEN 0
56588c2ecf20Sopenharmony_ci
56598c2ecf20Sopenharmony_ci
56608c2ecf20Sopenharmony_ci/***********************************/
56618c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_FINISH
56628c2ecf20Sopenharmony_ci * Finish a group of update operations on a virtual NVRAM partition. Locks
56638c2ecf20Sopenharmony_ci * required: PHY_LOCK if type==*PHY*. Returns: 0, EINVAL (bad type/offset/
56648c2ecf20Sopenharmony_ci * length), EACCES (if PHY_LOCK required and not held). In an adapter bound to
56658c2ecf20Sopenharmony_ci * a TSA controller, MC_CMD_NVRAM_UPDATE_FINISH can only be used on a subset of
56668c2ecf20Sopenharmony_ci * partition types i.e. static config, dynamic config and expansion ROM config.
56678c2ecf20Sopenharmony_ci * Attempting to perform this operation on a restricted partition will return
56688c2ecf20Sopenharmony_ci * the error EPERM.
56698c2ecf20Sopenharmony_ci */
56708c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_UPDATE_FINISH 0x3c
56718c2ecf20Sopenharmony_ci#undef MC_CMD_0x3c_PRIVILEGE_CTG
56728c2ecf20Sopenharmony_ci
56738c2ecf20Sopenharmony_ci#define MC_CMD_0x3c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
56748c2ecf20Sopenharmony_ci
56758c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_FINISH_IN msgrequest: Legacy NVRAM_UPDATE_FINISH
56768c2ecf20Sopenharmony_ci * request. Use NVRAM_UPDATE_FINISH_V2_IN in new code
56778c2ecf20Sopenharmony_ci */
56788c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_FINISH_IN_LEN 8
56798c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_IN_TYPE_OFST 0
56808c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_IN_TYPE_LEN 4
56818c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
56828c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
56838c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_IN_REBOOT_OFST 4
56848c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_IN_REBOOT_LEN 4
56858c2ecf20Sopenharmony_ci
56868c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_FINISH_V2_IN msgrequest: Extended NVRAM_UPDATE_FINISH
56878c2ecf20Sopenharmony_ci * request with additional flags indicating version of NVRAM_UPDATE commands in
56888c2ecf20Sopenharmony_ci * use. See MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT for details of extended
56898c2ecf20Sopenharmony_ci * functionality. Use paired up with NVRAM_UPDATE_START_V2_IN.
56908c2ecf20Sopenharmony_ci */
56918c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_LEN 12
56928c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_TYPE_OFST 0
56938c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_TYPE_LEN 4
56948c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
56958c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
56968c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_REBOOT_OFST 4
56978c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_REBOOT_LEN 4
56988c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAGS_OFST 8
56998c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAGS_LEN 4
57008c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_REPORT_VERIFY_RESULT_OFST 8
57018c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_REPORT_VERIFY_RESULT_LBN 0
57028c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_REPORT_VERIFY_RESULT_WIDTH 1
57038c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_RUN_IN_BACKGROUND_OFST 8
57048c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_RUN_IN_BACKGROUND_LBN 1
57058c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_RUN_IN_BACKGROUND_WIDTH 1
57068c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_POLL_VERIFY_RESULT_OFST 8
57078c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_POLL_VERIFY_RESULT_LBN 2
57088c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_FLAG_POLL_VERIFY_RESULT_WIDTH 1
57098c2ecf20Sopenharmony_ci
57108c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_FINISH_OUT msgresponse: Legacy NVRAM_UPDATE_FINISH
57118c2ecf20Sopenharmony_ci * response. Use NVRAM_UPDATE_FINISH_V2_OUT in new code
57128c2ecf20Sopenharmony_ci */
57138c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_FINISH_OUT_LEN 0
57148c2ecf20Sopenharmony_ci
57158c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT msgresponse:
57168c2ecf20Sopenharmony_ci *
57178c2ecf20Sopenharmony_ci * Extended NVRAM_UPDATE_FINISH response that communicates the result of secure
57188c2ecf20Sopenharmony_ci * firmware validation where applicable back to the host.
57198c2ecf20Sopenharmony_ci *
57208c2ecf20Sopenharmony_ci * Medford only: For signed firmware images, such as those for medford, the MC
57218c2ecf20Sopenharmony_ci * firmware verifies the signature before marking the firmware image as valid.
57228c2ecf20Sopenharmony_ci * This process takes a few seconds to complete. So is likely to take more than
57238c2ecf20Sopenharmony_ci * the MCDI timeout. Hence signature verification is initiated when
57248c2ecf20Sopenharmony_ci * MC_CMD_NVRAM_UPDATE_FINISH_V2_IN is received by the firmware, however, the
57258c2ecf20Sopenharmony_ci * MCDI command is run in a background MCDI processing thread. This response
57268c2ecf20Sopenharmony_ci * payload includes the results of the signature verification. Note that the
57278c2ecf20Sopenharmony_ci * per-partition nvram lock in firmware is only released after the verification
57288c2ecf20Sopenharmony_ci * has completed.
57298c2ecf20Sopenharmony_ci */
57308c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_LEN 4
57318c2ecf20Sopenharmony_ci/* Result of nvram update completion processing. Result codes that indicate an
57328c2ecf20Sopenharmony_ci * internal build failure and therefore not expected to be seen by customers in
57338c2ecf20Sopenharmony_ci * the field are marked with a prefix 'Internal-error'.
57348c2ecf20Sopenharmony_ci */
57358c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_RESULT_CODE_OFST 0
57368c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_RESULT_CODE_LEN 4
57378c2ecf20Sopenharmony_ci/* enum: Invalid return code; only non-zero values are defined. Defined as
57388c2ecf20Sopenharmony_ci * unknown for backwards compatibility with NVRAM_UPDATE_FINISH_OUT.
57398c2ecf20Sopenharmony_ci */
57408c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_UNKNOWN 0x0
57418c2ecf20Sopenharmony_ci/* enum: Verify succeeded without any errors. */
57428c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_SUCCESS 0x1
57438c2ecf20Sopenharmony_ci/* enum: CMS format verification failed due to an internal error. */
57448c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_CMS_CHECK_FAILED 0x2
57458c2ecf20Sopenharmony_ci/* enum: Invalid CMS format in image metadata. */
57468c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_INVALID_CMS_FORMAT 0x3
57478c2ecf20Sopenharmony_ci/* enum: Message digest verification failed due to an internal error. */
57488c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_MESSAGE_DIGEST_CHECK_FAILED 0x4
57498c2ecf20Sopenharmony_ci/* enum: Error in message digest calculated over the reflash-header, payload
57508c2ecf20Sopenharmony_ci * and reflash-trailer.
57518c2ecf20Sopenharmony_ci */
57528c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BAD_MESSAGE_DIGEST 0x5
57538c2ecf20Sopenharmony_ci/* enum: Signature verification failed due to an internal error. */
57548c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_SIGNATURE_CHECK_FAILED 0x6
57558c2ecf20Sopenharmony_ci/* enum: There are no valid signatures in the image. */
57568c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_NO_VALID_SIGNATURES 0x7
57578c2ecf20Sopenharmony_ci/* enum: Trusted approvers verification failed due to an internal error. */
57588c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_TRUSTED_APPROVERS_CHECK_FAILED 0x8
57598c2ecf20Sopenharmony_ci/* enum: The Trusted approver's list is empty. */
57608c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_NO_TRUSTED_APPROVERS 0x9
57618c2ecf20Sopenharmony_ci/* enum: Signature chain verification failed due to an internal error. */
57628c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_SIGNATURE_CHAIN_CHECK_FAILED 0xa
57638c2ecf20Sopenharmony_ci/* enum: The signers of the signatures in the image are not listed in the
57648c2ecf20Sopenharmony_ci * Trusted approver's list.
57658c2ecf20Sopenharmony_ci */
57668c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_NO_SIGNATURE_MATCH 0xb
57678c2ecf20Sopenharmony_ci/* enum: The image contains a test-signed certificate, but the adapter accepts
57688c2ecf20Sopenharmony_ci * only production signed images.
57698c2ecf20Sopenharmony_ci */
57708c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_REJECT_TEST_SIGNED 0xc
57718c2ecf20Sopenharmony_ci/* enum: The image has a lower security level than the current firmware. */
57728c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_SECURITY_LEVEL_DOWNGRADE 0xd
57738c2ecf20Sopenharmony_ci/* enum: Internal-error. The signed image is missing the 'contents' section,
57748c2ecf20Sopenharmony_ci * where the 'contents' section holds the actual image payload to be applied.
57758c2ecf20Sopenharmony_ci */
57768c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_CONTENT_NOT_FOUND 0xe
57778c2ecf20Sopenharmony_ci/* enum: Internal-error. The bundle header is invalid. */
57788c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_CONTENT_HEADER_INVALID 0xf
57798c2ecf20Sopenharmony_ci/* enum: Internal-error. The bundle does not have a valid reflash image layout.
57808c2ecf20Sopenharmony_ci */
57818c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_REFLASH_IMAGE_INVALID 0x10
57828c2ecf20Sopenharmony_ci/* enum: Internal-error. The bundle has an inconsistent layout of components or
57838c2ecf20Sopenharmony_ci * incorrect checksum.
57848c2ecf20Sopenharmony_ci */
57858c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_IMAGE_LAYOUT_INVALID 0x11
57868c2ecf20Sopenharmony_ci/* enum: Internal-error. The bundle manifest is inconsistent with components in
57878c2ecf20Sopenharmony_ci * the bundle.
57888c2ecf20Sopenharmony_ci */
57898c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_MANIFEST_INVALID 0x12
57908c2ecf20Sopenharmony_ci/* enum: Internal-error. The number of components in a bundle do not match the
57918c2ecf20Sopenharmony_ci * number of components advertised by the bundle manifest.
57928c2ecf20Sopenharmony_ci */
57938c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_MANIFEST_NUM_COMPONENTS_MISMATCH 0x13
57948c2ecf20Sopenharmony_ci/* enum: Internal-error. The bundle contains too many components for the MC
57958c2ecf20Sopenharmony_ci * firmware to process
57968c2ecf20Sopenharmony_ci */
57978c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_MANIFEST_TOO_MANY_COMPONENTS 0x14
57988c2ecf20Sopenharmony_ci/* enum: Internal-error. The bundle manifest has an invalid/inconsistent
57998c2ecf20Sopenharmony_ci * component.
58008c2ecf20Sopenharmony_ci */
58018c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_MANIFEST_COMPONENT_INVALID 0x15
58028c2ecf20Sopenharmony_ci/* enum: Internal-error. The hash of a component does not match the hash stored
58038c2ecf20Sopenharmony_ci * in the bundle manifest.
58048c2ecf20Sopenharmony_ci */
58058c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_MANIFEST_COMPONENT_HASH_MISMATCH 0x16
58068c2ecf20Sopenharmony_ci/* enum: Internal-error. Component hash calculation failed. */
58078c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_MANIFEST_COMPONENT_HASH_FAILED 0x17
58088c2ecf20Sopenharmony_ci/* enum: Internal-error. The component does not have a valid reflash image
58098c2ecf20Sopenharmony_ci * layout.
58108c2ecf20Sopenharmony_ci */
58118c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_COMPONENT_REFLASH_IMAGE_INVALID 0x18
58128c2ecf20Sopenharmony_ci/* enum: The bundle processing code failed to copy a component to its target
58138c2ecf20Sopenharmony_ci * partition.
58148c2ecf20Sopenharmony_ci */
58158c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_BUNDLE_COMPONENT_COPY_FAILED 0x19
58168c2ecf20Sopenharmony_ci/* enum: The update operation is in-progress. */
58178c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_VERIFY_RC_PENDING 0x1a
58188c2ecf20Sopenharmony_ci
58198c2ecf20Sopenharmony_ci
58208c2ecf20Sopenharmony_ci/***********************************/
58218c2ecf20Sopenharmony_ci/* MC_CMD_REBOOT
58228c2ecf20Sopenharmony_ci * Reboot the MC.
58238c2ecf20Sopenharmony_ci *
58248c2ecf20Sopenharmony_ci * The AFTER_ASSERTION flag is intended to be used when the driver notices an
58258c2ecf20Sopenharmony_ci * assertion failure (at which point it is expected to perform a complete tear
58268c2ecf20Sopenharmony_ci * down and reinitialise), to allow both ports to reset the MC once in an
58278c2ecf20Sopenharmony_ci * atomic fashion.
58288c2ecf20Sopenharmony_ci *
58298c2ecf20Sopenharmony_ci * Production mc firmwares are generally compiled with REBOOT_ON_ASSERT=1,
58308c2ecf20Sopenharmony_ci * which means that they will automatically reboot out of the assertion
58318c2ecf20Sopenharmony_ci * handler, so this is in practise an optional operation. It is still
58328c2ecf20Sopenharmony_ci * recommended that drivers execute this to support custom firmwares with
58338c2ecf20Sopenharmony_ci * REBOOT_ON_ASSERT=0.
58348c2ecf20Sopenharmony_ci *
58358c2ecf20Sopenharmony_ci * Locks required: NONE Returns: Nothing. You get back a response with ERR=1,
58368c2ecf20Sopenharmony_ci * DATALEN=0
58378c2ecf20Sopenharmony_ci */
58388c2ecf20Sopenharmony_ci#define MC_CMD_REBOOT 0x3d
58398c2ecf20Sopenharmony_ci#undef MC_CMD_0x3d_PRIVILEGE_CTG
58408c2ecf20Sopenharmony_ci
58418c2ecf20Sopenharmony_ci#define MC_CMD_0x3d_PRIVILEGE_CTG SRIOV_CTG_ADMIN
58428c2ecf20Sopenharmony_ci
58438c2ecf20Sopenharmony_ci/* MC_CMD_REBOOT_IN msgrequest */
58448c2ecf20Sopenharmony_ci#define    MC_CMD_REBOOT_IN_LEN 4
58458c2ecf20Sopenharmony_ci#define       MC_CMD_REBOOT_IN_FLAGS_OFST 0
58468c2ecf20Sopenharmony_ci#define       MC_CMD_REBOOT_IN_FLAGS_LEN 4
58478c2ecf20Sopenharmony_ci#define          MC_CMD_REBOOT_FLAGS_AFTER_ASSERTION 0x1 /* enum */
58488c2ecf20Sopenharmony_ci
58498c2ecf20Sopenharmony_ci/* MC_CMD_REBOOT_OUT msgresponse */
58508c2ecf20Sopenharmony_ci#define    MC_CMD_REBOOT_OUT_LEN 0
58518c2ecf20Sopenharmony_ci
58528c2ecf20Sopenharmony_ci
58538c2ecf20Sopenharmony_ci/***********************************/
58548c2ecf20Sopenharmony_ci/* MC_CMD_SCHEDINFO
58558c2ecf20Sopenharmony_ci * Request scheduler info. Locks required: NONE. Returns: An array of
58568c2ecf20Sopenharmony_ci * (timeslice,maximum overrun), one for each thread, in ascending order of
58578c2ecf20Sopenharmony_ci * thread address.
58588c2ecf20Sopenharmony_ci */
58598c2ecf20Sopenharmony_ci#define MC_CMD_SCHEDINFO 0x3e
58608c2ecf20Sopenharmony_ci#undef MC_CMD_0x3e_PRIVILEGE_CTG
58618c2ecf20Sopenharmony_ci
58628c2ecf20Sopenharmony_ci#define MC_CMD_0x3e_PRIVILEGE_CTG SRIOV_CTG_ADMIN
58638c2ecf20Sopenharmony_ci
58648c2ecf20Sopenharmony_ci/* MC_CMD_SCHEDINFO_IN msgrequest */
58658c2ecf20Sopenharmony_ci#define    MC_CMD_SCHEDINFO_IN_LEN 0
58668c2ecf20Sopenharmony_ci
58678c2ecf20Sopenharmony_ci/* MC_CMD_SCHEDINFO_OUT msgresponse */
58688c2ecf20Sopenharmony_ci#define    MC_CMD_SCHEDINFO_OUT_LENMIN 4
58698c2ecf20Sopenharmony_ci#define    MC_CMD_SCHEDINFO_OUT_LENMAX 252
58708c2ecf20Sopenharmony_ci#define    MC_CMD_SCHEDINFO_OUT_LENMAX_MCDI2 1020
58718c2ecf20Sopenharmony_ci#define    MC_CMD_SCHEDINFO_OUT_LEN(num) (0+4*(num))
58728c2ecf20Sopenharmony_ci#define    MC_CMD_SCHEDINFO_OUT_DATA_NUM(len) (((len)-0)/4)
58738c2ecf20Sopenharmony_ci#define       MC_CMD_SCHEDINFO_OUT_DATA_OFST 0
58748c2ecf20Sopenharmony_ci#define       MC_CMD_SCHEDINFO_OUT_DATA_LEN 4
58758c2ecf20Sopenharmony_ci#define       MC_CMD_SCHEDINFO_OUT_DATA_MINNUM 1
58768c2ecf20Sopenharmony_ci#define       MC_CMD_SCHEDINFO_OUT_DATA_MAXNUM 63
58778c2ecf20Sopenharmony_ci#define       MC_CMD_SCHEDINFO_OUT_DATA_MAXNUM_MCDI2 255
58788c2ecf20Sopenharmony_ci
58798c2ecf20Sopenharmony_ci
58808c2ecf20Sopenharmony_ci/***********************************/
58818c2ecf20Sopenharmony_ci/* MC_CMD_REBOOT_MODE
58828c2ecf20Sopenharmony_ci * Set the mode for the next MC reboot. Locks required: NONE. Sets the reboot
58838c2ecf20Sopenharmony_ci * mode to the specified value. Returns the old mode.
58848c2ecf20Sopenharmony_ci */
58858c2ecf20Sopenharmony_ci#define MC_CMD_REBOOT_MODE 0x3f
58868c2ecf20Sopenharmony_ci#undef MC_CMD_0x3f_PRIVILEGE_CTG
58878c2ecf20Sopenharmony_ci
58888c2ecf20Sopenharmony_ci#define MC_CMD_0x3f_PRIVILEGE_CTG SRIOV_CTG_INSECURE
58898c2ecf20Sopenharmony_ci
58908c2ecf20Sopenharmony_ci/* MC_CMD_REBOOT_MODE_IN msgrequest */
58918c2ecf20Sopenharmony_ci#define    MC_CMD_REBOOT_MODE_IN_LEN 4
58928c2ecf20Sopenharmony_ci#define       MC_CMD_REBOOT_MODE_IN_VALUE_OFST 0
58938c2ecf20Sopenharmony_ci#define       MC_CMD_REBOOT_MODE_IN_VALUE_LEN 4
58948c2ecf20Sopenharmony_ci/* enum: Normal. */
58958c2ecf20Sopenharmony_ci#define          MC_CMD_REBOOT_MODE_NORMAL 0x0
58968c2ecf20Sopenharmony_ci/* enum: Power-on Reset. */
58978c2ecf20Sopenharmony_ci#define          MC_CMD_REBOOT_MODE_POR 0x2
58988c2ecf20Sopenharmony_ci/* enum: Snapper. */
58998c2ecf20Sopenharmony_ci#define          MC_CMD_REBOOT_MODE_SNAPPER 0x3
59008c2ecf20Sopenharmony_ci/* enum: snapper fake POR */
59018c2ecf20Sopenharmony_ci#define          MC_CMD_REBOOT_MODE_SNAPPER_POR 0x4
59028c2ecf20Sopenharmony_ci#define        MC_CMD_REBOOT_MODE_IN_FAKE_OFST 0
59038c2ecf20Sopenharmony_ci#define        MC_CMD_REBOOT_MODE_IN_FAKE_LBN 7
59048c2ecf20Sopenharmony_ci#define        MC_CMD_REBOOT_MODE_IN_FAKE_WIDTH 1
59058c2ecf20Sopenharmony_ci
59068c2ecf20Sopenharmony_ci/* MC_CMD_REBOOT_MODE_OUT msgresponse */
59078c2ecf20Sopenharmony_ci#define    MC_CMD_REBOOT_MODE_OUT_LEN 4
59088c2ecf20Sopenharmony_ci#define       MC_CMD_REBOOT_MODE_OUT_VALUE_OFST 0
59098c2ecf20Sopenharmony_ci#define       MC_CMD_REBOOT_MODE_OUT_VALUE_LEN 4
59108c2ecf20Sopenharmony_ci
59118c2ecf20Sopenharmony_ci
59128c2ecf20Sopenharmony_ci/***********************************/
59138c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO
59148c2ecf20Sopenharmony_ci * Returns information about every available sensor.
59158c2ecf20Sopenharmony_ci *
59168c2ecf20Sopenharmony_ci * Each sensor has a single (16bit) value, and a corresponding state. The
59178c2ecf20Sopenharmony_ci * mapping between value and state is nominally determined by the MC, but may
59188c2ecf20Sopenharmony_ci * be implemented using up to 2 ranges per sensor.
59198c2ecf20Sopenharmony_ci *
59208c2ecf20Sopenharmony_ci * This call returns a mask (32bit) of the sensors that are supported by this
59218c2ecf20Sopenharmony_ci * platform, then an array of sensor information structures, in order of sensor
59228c2ecf20Sopenharmony_ci * type (but without gaps for unimplemented sensors). Each structure defines
59238c2ecf20Sopenharmony_ci * the ranges for the corresponding sensor. An unused range is indicated by
59248c2ecf20Sopenharmony_ci * equal limit values. If one range is used, a value outside that range results
59258c2ecf20Sopenharmony_ci * in STATE_FATAL. If two ranges are used, a value outside the second range
59268c2ecf20Sopenharmony_ci * results in STATE_FATAL while a value outside the first and inside the second
59278c2ecf20Sopenharmony_ci * range results in STATE_WARNING.
59288c2ecf20Sopenharmony_ci *
59298c2ecf20Sopenharmony_ci * Sensor masks and sensor information arrays are organised into pages. For
59308c2ecf20Sopenharmony_ci * backward compatibility, older host software can only use sensors in page 0.
59318c2ecf20Sopenharmony_ci * Bit 32 in the sensor mask was previously unused, and is no reserved for use
59328c2ecf20Sopenharmony_ci * as the next page flag.
59338c2ecf20Sopenharmony_ci *
59348c2ecf20Sopenharmony_ci * If the request does not contain a PAGE value then firmware will only return
59358c2ecf20Sopenharmony_ci * page 0 of sensor information, with bit 31 in the sensor mask cleared.
59368c2ecf20Sopenharmony_ci *
59378c2ecf20Sopenharmony_ci * If the request contains a PAGE value then firmware responds with the sensor
59388c2ecf20Sopenharmony_ci * mask and sensor information array for that page of sensors. In this case bit
59398c2ecf20Sopenharmony_ci * 31 in the mask is set if another page exists.
59408c2ecf20Sopenharmony_ci *
59418c2ecf20Sopenharmony_ci * Locks required: None Returns: 0
59428c2ecf20Sopenharmony_ci */
59438c2ecf20Sopenharmony_ci#define MC_CMD_SENSOR_INFO 0x41
59448c2ecf20Sopenharmony_ci#undef MC_CMD_0x41_PRIVILEGE_CTG
59458c2ecf20Sopenharmony_ci
59468c2ecf20Sopenharmony_ci#define MC_CMD_0x41_PRIVILEGE_CTG SRIOV_CTG_GENERAL
59478c2ecf20Sopenharmony_ci
59488c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_IN msgrequest */
59498c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_IN_LEN 0
59508c2ecf20Sopenharmony_ci
59518c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_EXT_IN msgrequest */
59528c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_IN_LEN 4
59538c2ecf20Sopenharmony_ci/* Which page of sensors to report.
59548c2ecf20Sopenharmony_ci *
59558c2ecf20Sopenharmony_ci * Page 0 contains sensors 0 to 30 (sensor 31 is the next page bit).
59568c2ecf20Sopenharmony_ci *
59578c2ecf20Sopenharmony_ci * Page 1 contains sensors 32 to 62 (sensor 63 is the next page bit). etc.
59588c2ecf20Sopenharmony_ci */
59598c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_IN_PAGE_OFST 0
59608c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_IN_PAGE_LEN 4
59618c2ecf20Sopenharmony_ci
59628c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_EXT_IN_V2 msgrequest */
59638c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_IN_V2_LEN 8
59648c2ecf20Sopenharmony_ci/* Which page of sensors to report.
59658c2ecf20Sopenharmony_ci *
59668c2ecf20Sopenharmony_ci * Page 0 contains sensors 0 to 30 (sensor 31 is the next page bit).
59678c2ecf20Sopenharmony_ci *
59688c2ecf20Sopenharmony_ci * Page 1 contains sensors 32 to 62 (sensor 63 is the next page bit). etc.
59698c2ecf20Sopenharmony_ci */
59708c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_IN_V2_PAGE_OFST 0
59718c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_IN_V2_PAGE_LEN 4
59728c2ecf20Sopenharmony_ci/* Flags controlling information retrieved */
59738c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_IN_V2_FLAGS_OFST 4
59748c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_IN_V2_FLAGS_LEN 4
59758c2ecf20Sopenharmony_ci#define        MC_CMD_SENSOR_INFO_EXT_IN_V2_ENGINEERING_OFST 4
59768c2ecf20Sopenharmony_ci#define        MC_CMD_SENSOR_INFO_EXT_IN_V2_ENGINEERING_LBN 0
59778c2ecf20Sopenharmony_ci#define        MC_CMD_SENSOR_INFO_EXT_IN_V2_ENGINEERING_WIDTH 1
59788c2ecf20Sopenharmony_ci
59798c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_OUT msgresponse */
59808c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_OUT_LENMIN 4
59818c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_OUT_LENMAX 252
59828c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_OUT_LENMAX_MCDI2 1020
59838c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_OUT_LEN(num) (4+8*(num))
59848c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_OUT_MC_CMD_SENSOR_ENTRY_NUM(len) (((len)-4)/8)
59858c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_OUT_MASK_OFST 0
59868c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_OUT_MASK_LEN 4
59878c2ecf20Sopenharmony_ci/* enum: Controller temperature: degC */
59888c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_TEMP 0x0
59898c2ecf20Sopenharmony_ci/* enum: Phy common temperature: degC */
59908c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY_COMMON_TEMP 0x1
59918c2ecf20Sopenharmony_ci/* enum: Controller cooling: bool */
59928c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_COOLING 0x2
59938c2ecf20Sopenharmony_ci/* enum: Phy 0 temperature: degC */
59948c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY0_TEMP 0x3
59958c2ecf20Sopenharmony_ci/* enum: Phy 0 cooling: bool */
59968c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY0_COOLING 0x4
59978c2ecf20Sopenharmony_ci/* enum: Phy 1 temperature: degC */
59988c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY1_TEMP 0x5
59998c2ecf20Sopenharmony_ci/* enum: Phy 1 cooling: bool */
60008c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY1_COOLING 0x6
60018c2ecf20Sopenharmony_ci/* enum: 1.0v power: mV */
60028c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_1V0 0x7
60038c2ecf20Sopenharmony_ci/* enum: 1.2v power: mV */
60048c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_1V2 0x8
60058c2ecf20Sopenharmony_ci/* enum: 1.8v power: mV */
60068c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_1V8 0x9
60078c2ecf20Sopenharmony_ci/* enum: 2.5v power: mV */
60088c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_2V5 0xa
60098c2ecf20Sopenharmony_ci/* enum: 3.3v power: mV */
60108c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_3V3 0xb
60118c2ecf20Sopenharmony_ci/* enum: 12v power: mV */
60128c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_12V0 0xc
60138c2ecf20Sopenharmony_ci/* enum: 1.2v analogue power: mV */
60148c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_1V2A 0xd
60158c2ecf20Sopenharmony_ci/* enum: reference voltage: mV */
60168c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_VREF 0xe
60178c2ecf20Sopenharmony_ci/* enum: AOE FPGA power: mV */
60188c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_OUT_VAOE 0xf
60198c2ecf20Sopenharmony_ci/* enum: AOE FPGA temperature: degC */
60208c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_AOE_TEMP 0x10
60218c2ecf20Sopenharmony_ci/* enum: AOE FPGA PSU temperature: degC */
60228c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PSU_AOE_TEMP 0x11
60238c2ecf20Sopenharmony_ci/* enum: AOE PSU temperature: degC */
60248c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PSU_TEMP 0x12
60258c2ecf20Sopenharmony_ci/* enum: Fan 0 speed: RPM */
60268c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_FAN_0 0x13
60278c2ecf20Sopenharmony_ci/* enum: Fan 1 speed: RPM */
60288c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_FAN_1 0x14
60298c2ecf20Sopenharmony_ci/* enum: Fan 2 speed: RPM */
60308c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_FAN_2 0x15
60318c2ecf20Sopenharmony_ci/* enum: Fan 3 speed: RPM */
60328c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_FAN_3 0x16
60338c2ecf20Sopenharmony_ci/* enum: Fan 4 speed: RPM */
60348c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_FAN_4 0x17
60358c2ecf20Sopenharmony_ci/* enum: AOE FPGA input power: mV */
60368c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_VAOE 0x18
60378c2ecf20Sopenharmony_ci/* enum: AOE FPGA current: mA */
60388c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_OUT_IAOE 0x19
60398c2ecf20Sopenharmony_ci/* enum: AOE FPGA input current: mA */
60408c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_IAOE 0x1a
60418c2ecf20Sopenharmony_ci/* enum: NIC power consumption: W */
60428c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_NIC_POWER 0x1b
60438c2ecf20Sopenharmony_ci/* enum: 0.9v power voltage: mV */
60448c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_0V9 0x1c
60458c2ecf20Sopenharmony_ci/* enum: 0.9v power current: mA */
60468c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I0V9 0x1d
60478c2ecf20Sopenharmony_ci/* enum: 1.2v power current: mA */
60488c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I1V2 0x1e
60498c2ecf20Sopenharmony_ci/* enum: Not a sensor: reserved for the next page flag */
60508c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PAGE0_NEXT 0x1f
60518c2ecf20Sopenharmony_ci/* enum: 0.9v power voltage (at ADC): mV */
60528c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_0V9_ADC 0x20
60538c2ecf20Sopenharmony_ci/* enum: Controller temperature 2: degC */
60548c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_2_TEMP 0x21
60558c2ecf20Sopenharmony_ci/* enum: Voltage regulator internal temperature: degC */
60568c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VREG_INTERNAL_TEMP 0x22
60578c2ecf20Sopenharmony_ci/* enum: 0.9V voltage regulator temperature: degC */
60588c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VREG_0V9_TEMP 0x23
60598c2ecf20Sopenharmony_ci/* enum: 1.2V voltage regulator temperature: degC */
60608c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VREG_1V2_TEMP 0x24
60618c2ecf20Sopenharmony_ci/* enum: controller internal temperature sensor voltage (internal ADC): mV */
60628c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_VPTAT 0x25
60638c2ecf20Sopenharmony_ci/* enum: controller internal temperature (internal ADC): degC */
60648c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_INTERNAL_TEMP 0x26
60658c2ecf20Sopenharmony_ci/* enum: controller internal temperature sensor voltage (external ADC): mV */
60668c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_VPTAT_EXTADC 0x27
60678c2ecf20Sopenharmony_ci/* enum: controller internal temperature (external ADC): degC */
60688c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_INTERNAL_TEMP_EXTADC 0x28
60698c2ecf20Sopenharmony_ci/* enum: ambient temperature: degC */
60708c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_AMBIENT_TEMP 0x29
60718c2ecf20Sopenharmony_ci/* enum: air flow: bool */
60728c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_AIRFLOW 0x2a
60738c2ecf20Sopenharmony_ci/* enum: voltage between VSS08D and VSS08D at CSR: mV */
60748c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VDD08D_VSS08D_CSR 0x2b
60758c2ecf20Sopenharmony_ci/* enum: voltage between VSS08D and VSS08D at CSR (external ADC): mV */
60768c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VDD08D_VSS08D_CSR_EXTADC 0x2c
60778c2ecf20Sopenharmony_ci/* enum: Hotpoint temperature: degC */
60788c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_HOTPOINT_TEMP 0x2d
60798c2ecf20Sopenharmony_ci/* enum: Port 0 PHY power switch over-current: bool */
60808c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY_POWER_PORT0 0x2e
60818c2ecf20Sopenharmony_ci/* enum: Port 1 PHY power switch over-current: bool */
60828c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY_POWER_PORT1 0x2f
60838c2ecf20Sopenharmony_ci/* enum: Mop-up microcontroller reference voltage: mV */
60848c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_MUM_VCC 0x30
60858c2ecf20Sopenharmony_ci/* enum: 0.9v power phase A voltage: mV */
60868c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_0V9_A 0x31
60878c2ecf20Sopenharmony_ci/* enum: 0.9v power phase A current: mA */
60888c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I0V9_A 0x32
60898c2ecf20Sopenharmony_ci/* enum: 0.9V voltage regulator phase A temperature: degC */
60908c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VREG_0V9_A_TEMP 0x33
60918c2ecf20Sopenharmony_ci/* enum: 0.9v power phase B voltage: mV */
60928c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_0V9_B 0x34
60938c2ecf20Sopenharmony_ci/* enum: 0.9v power phase B current: mA */
60948c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I0V9_B 0x35
60958c2ecf20Sopenharmony_ci/* enum: 0.9V voltage regulator phase B temperature: degC */
60968c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_VREG_0V9_B_TEMP 0x36
60978c2ecf20Sopenharmony_ci/* enum: CCOM AVREG 1v2 supply (interval ADC): mV */
60988c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CCOM_AVREG_1V2_SUPPLY 0x37
60998c2ecf20Sopenharmony_ci/* enum: CCOM AVREG 1v2 supply (external ADC): mV */
61008c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CCOM_AVREG_1V2_SUPPLY_EXTADC 0x38
61018c2ecf20Sopenharmony_ci/* enum: CCOM AVREG 1v8 supply (interval ADC): mV */
61028c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CCOM_AVREG_1V8_SUPPLY 0x39
61038c2ecf20Sopenharmony_ci/* enum: CCOM AVREG 1v8 supply (external ADC): mV */
61048c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CCOM_AVREG_1V8_SUPPLY_EXTADC 0x3a
61058c2ecf20Sopenharmony_ci/* enum: CCOM RTS temperature: degC */
61068c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_RTS 0x3b
61078c2ecf20Sopenharmony_ci/* enum: Not a sensor: reserved for the next page flag */
61088c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PAGE1_NEXT 0x3f
61098c2ecf20Sopenharmony_ci/* enum: controller internal temperature sensor voltage on master core
61108c2ecf20Sopenharmony_ci * (internal ADC): mV
61118c2ecf20Sopenharmony_ci */
61128c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_MASTER_VPTAT 0x40
61138c2ecf20Sopenharmony_ci/* enum: controller internal temperature on master core (internal ADC): degC */
61148c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_MASTER_INTERNAL_TEMP 0x41
61158c2ecf20Sopenharmony_ci/* enum: controller internal temperature sensor voltage on master core
61168c2ecf20Sopenharmony_ci * (external ADC): mV
61178c2ecf20Sopenharmony_ci */
61188c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_MASTER_VPTAT_EXTADC 0x42
61198c2ecf20Sopenharmony_ci/* enum: controller internal temperature on master core (external ADC): degC */
61208c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_MASTER_INTERNAL_TEMP_EXTADC 0x43
61218c2ecf20Sopenharmony_ci/* enum: controller internal temperature on slave core sensor voltage (internal
61228c2ecf20Sopenharmony_ci * ADC): mV
61238c2ecf20Sopenharmony_ci */
61248c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_SLAVE_VPTAT 0x44
61258c2ecf20Sopenharmony_ci/* enum: controller internal temperature on slave core (internal ADC): degC */
61268c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_SLAVE_INTERNAL_TEMP 0x45
61278c2ecf20Sopenharmony_ci/* enum: controller internal temperature on slave core sensor voltage (external
61288c2ecf20Sopenharmony_ci * ADC): mV
61298c2ecf20Sopenharmony_ci */
61308c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_SLAVE_VPTAT_EXTADC 0x46
61318c2ecf20Sopenharmony_ci/* enum: controller internal temperature on slave core (external ADC): degC */
61328c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_SLAVE_INTERNAL_TEMP_EXTADC 0x47
61338c2ecf20Sopenharmony_ci/* enum: Voltage supplied to the SODIMMs from their power supply: mV */
61348c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_SODIMM_VOUT 0x49
61358c2ecf20Sopenharmony_ci/* enum: Temperature of SODIMM 0 (if installed): degC */
61368c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_SODIMM_0_TEMP 0x4a
61378c2ecf20Sopenharmony_ci/* enum: Temperature of SODIMM 1 (if installed): degC */
61388c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_SODIMM_1_TEMP 0x4b
61398c2ecf20Sopenharmony_ci/* enum: Voltage supplied to the QSFP #0 from their power supply: mV */
61408c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY0_VCC 0x4c
61418c2ecf20Sopenharmony_ci/* enum: Voltage supplied to the QSFP #1 from their power supply: mV */
61428c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PHY1_VCC 0x4d
61438c2ecf20Sopenharmony_ci/* enum: Controller die temperature (TDIODE): degC */
61448c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_CONTROLLER_TDIODE_TEMP 0x4e
61458c2ecf20Sopenharmony_ci/* enum: Board temperature (front): degC */
61468c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_BOARD_FRONT_TEMP 0x4f
61478c2ecf20Sopenharmony_ci/* enum: Board temperature (back): degC */
61488c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_BOARD_BACK_TEMP 0x50
61498c2ecf20Sopenharmony_ci/* enum: 1.8v power current: mA */
61508c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I1V8 0x51
61518c2ecf20Sopenharmony_ci/* enum: 2.5v power current: mA */
61528c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I2V5 0x52
61538c2ecf20Sopenharmony_ci/* enum: 3.3v power current: mA */
61548c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I3V3 0x53
61558c2ecf20Sopenharmony_ci/* enum: 12v power current: mA */
61568c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I12V0 0x54
61578c2ecf20Sopenharmony_ci/* enum: 1.3v power: mV */
61588c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_1V3 0x55
61598c2ecf20Sopenharmony_ci/* enum: 1.3v power current: mA */
61608c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_IN_I1V3 0x56
61618c2ecf20Sopenharmony_ci/* enum: Engineering sensor 1 */
61628c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_1 0x57
61638c2ecf20Sopenharmony_ci/* enum: Engineering sensor 2 */
61648c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_2 0x58
61658c2ecf20Sopenharmony_ci/* enum: Engineering sensor 3 */
61668c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_3 0x59
61678c2ecf20Sopenharmony_ci/* enum: Engineering sensor 4 */
61688c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_4 0x5a
61698c2ecf20Sopenharmony_ci/* enum: Engineering sensor 5 */
61708c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_5 0x5b
61718c2ecf20Sopenharmony_ci/* enum: Engineering sensor 6 */
61728c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_6 0x5c
61738c2ecf20Sopenharmony_ci/* enum: Engineering sensor 7 */
61748c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_7 0x5d
61758c2ecf20Sopenharmony_ci/* enum: Engineering sensor 8 */
61768c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_ENGINEERING_8 0x5e
61778c2ecf20Sopenharmony_ci/* enum: Not a sensor: reserved for the next page flag */
61788c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_PAGE2_NEXT 0x5f
61798c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF */
61808c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_OFST 4
61818c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_LEN 8
61828c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_LO_OFST 4
61838c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_HI_OFST 8
61848c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_MINNUM 0
61858c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_MAXNUM 31
61868c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_ENTRY_MAXNUM_MCDI2 127
61878c2ecf20Sopenharmony_ci
61888c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_EXT_OUT msgresponse */
61898c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_OUT_LENMIN 4
61908c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_OUT_LENMAX 252
61918c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_OUT_LENMAX_MCDI2 1020
61928c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_OUT_LEN(num) (4+8*(num))
61938c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_EXT_OUT_MC_CMD_SENSOR_ENTRY_NUM(len) (((len)-4)/8)
61948c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_OUT_MASK_OFST 0
61958c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_EXT_OUT_MASK_LEN 4
61968c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
61978c2ecf20Sopenharmony_ci/*               MC_CMD_SENSOR_INFO_OUT */
61988c2ecf20Sopenharmony_ci#define        MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_OFST 0
61998c2ecf20Sopenharmony_ci#define        MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_LBN 31
62008c2ecf20Sopenharmony_ci#define        MC_CMD_SENSOR_INFO_EXT_OUT_NEXT_PAGE_WIDTH 1
62018c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF */
62028c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_OFST 4 */
62038c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_LEN 8 */
62048c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_LO_OFST 4 */
62058c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_HI_OFST 8 */
62068c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_MINNUM 0 */
62078c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_MAXNUM 31 */
62088c2ecf20Sopenharmony_ci/*            MC_CMD_SENSOR_ENTRY_MAXNUM_MCDI2 127 */
62098c2ecf20Sopenharmony_ci
62108c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF structuredef */
62118c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_LEN 8
62128c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_OFST 0
62138c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_LEN 2
62148c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_LBN 0
62158c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN1_WIDTH 16
62168c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_OFST 2
62178c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_LEN 2
62188c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_LBN 16
62198c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX1_WIDTH 16
62208c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_OFST 4
62218c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_LEN 2
62228c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_LBN 32
62238c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MIN2_WIDTH 16
62248c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_OFST 6
62258c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_LEN 2
62268c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_LBN 48
62278c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_INFO_ENTRY_TYPEDEF_MAX2_WIDTH 16
62288c2ecf20Sopenharmony_ci
62298c2ecf20Sopenharmony_ci
62308c2ecf20Sopenharmony_ci/***********************************/
62318c2ecf20Sopenharmony_ci/* MC_CMD_READ_SENSORS
62328c2ecf20Sopenharmony_ci * Returns the current reading from each sensor. DMAs an array of sensor
62338c2ecf20Sopenharmony_ci * readings, in order of sensor type (but without gaps for unimplemented
62348c2ecf20Sopenharmony_ci * sensors), into host memory. Each array element is a
62358c2ecf20Sopenharmony_ci * MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF dword.
62368c2ecf20Sopenharmony_ci *
62378c2ecf20Sopenharmony_ci * If the request does not contain the LENGTH field then only sensors 0 to 30
62388c2ecf20Sopenharmony_ci * are reported, to avoid DMA buffer overflow in older host software. If the
62398c2ecf20Sopenharmony_ci * sensor reading require more space than the LENGTH allows, then return
62408c2ecf20Sopenharmony_ci * EINVAL.
62418c2ecf20Sopenharmony_ci *
62428c2ecf20Sopenharmony_ci * The MC will send a SENSOREVT event every time any sensor changes state. The
62438c2ecf20Sopenharmony_ci * driver is responsible for ensuring that it doesn't miss any events. The
62448c2ecf20Sopenharmony_ci * board will function normally if all sensors are in STATE_OK or
62458c2ecf20Sopenharmony_ci * STATE_WARNING. Otherwise the board should not be expected to function.
62468c2ecf20Sopenharmony_ci */
62478c2ecf20Sopenharmony_ci#define MC_CMD_READ_SENSORS 0x42
62488c2ecf20Sopenharmony_ci#undef MC_CMD_0x42_PRIVILEGE_CTG
62498c2ecf20Sopenharmony_ci
62508c2ecf20Sopenharmony_ci#define MC_CMD_0x42_PRIVILEGE_CTG SRIOV_CTG_GENERAL
62518c2ecf20Sopenharmony_ci
62528c2ecf20Sopenharmony_ci/* MC_CMD_READ_SENSORS_IN msgrequest */
62538c2ecf20Sopenharmony_ci#define    MC_CMD_READ_SENSORS_IN_LEN 8
62548c2ecf20Sopenharmony_ci/* DMA address of host buffer for sensor readings (must be 4Kbyte aligned).
62558c2ecf20Sopenharmony_ci *
62568c2ecf20Sopenharmony_ci * If the address is 0xffffffffffffffff send the readings in the response (used
62578c2ecf20Sopenharmony_ci * by cmdclient).
62588c2ecf20Sopenharmony_ci */
62598c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_IN_DMA_ADDR_OFST 0
62608c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_IN_DMA_ADDR_LEN 8
62618c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_IN_DMA_ADDR_LO_OFST 0
62628c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_IN_DMA_ADDR_HI_OFST 4
62638c2ecf20Sopenharmony_ci
62648c2ecf20Sopenharmony_ci/* MC_CMD_READ_SENSORS_EXT_IN msgrequest */
62658c2ecf20Sopenharmony_ci#define    MC_CMD_READ_SENSORS_EXT_IN_LEN 12
62668c2ecf20Sopenharmony_ci/* DMA address of host buffer for sensor readings (must be 4Kbyte aligned).
62678c2ecf20Sopenharmony_ci *
62688c2ecf20Sopenharmony_ci * If the address is 0xffffffffffffffff send the readings in the response (used
62698c2ecf20Sopenharmony_ci * by cmdclient).
62708c2ecf20Sopenharmony_ci */
62718c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_OFST 0
62728c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_LEN 8
62738c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_LO_OFST 0
62748c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_DMA_ADDR_HI_OFST 4
62758c2ecf20Sopenharmony_ci/* Size in bytes of host buffer. */
62768c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_LENGTH_OFST 8
62778c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_LENGTH_LEN 4
62788c2ecf20Sopenharmony_ci
62798c2ecf20Sopenharmony_ci/* MC_CMD_READ_SENSORS_EXT_IN_V2 msgrequest */
62808c2ecf20Sopenharmony_ci#define    MC_CMD_READ_SENSORS_EXT_IN_V2_LEN 16
62818c2ecf20Sopenharmony_ci/* DMA address of host buffer for sensor readings (must be 4Kbyte aligned).
62828c2ecf20Sopenharmony_ci *
62838c2ecf20Sopenharmony_ci * If the address is 0xffffffffffffffff send the readings in the response (used
62848c2ecf20Sopenharmony_ci * by cmdclient).
62858c2ecf20Sopenharmony_ci */
62868c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_DMA_ADDR_OFST 0
62878c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_DMA_ADDR_LEN 8
62888c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_DMA_ADDR_LO_OFST 0
62898c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_DMA_ADDR_HI_OFST 4
62908c2ecf20Sopenharmony_ci/* Size in bytes of host buffer. */
62918c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_LENGTH_OFST 8
62928c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_LENGTH_LEN 4
62938c2ecf20Sopenharmony_ci/* Flags controlling information retrieved */
62948c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_FLAGS_OFST 12
62958c2ecf20Sopenharmony_ci#define       MC_CMD_READ_SENSORS_EXT_IN_V2_FLAGS_LEN 4
62968c2ecf20Sopenharmony_ci#define        MC_CMD_READ_SENSORS_EXT_IN_V2_ENGINEERING_OFST 12
62978c2ecf20Sopenharmony_ci#define        MC_CMD_READ_SENSORS_EXT_IN_V2_ENGINEERING_LBN 0
62988c2ecf20Sopenharmony_ci#define        MC_CMD_READ_SENSORS_EXT_IN_V2_ENGINEERING_WIDTH 1
62998c2ecf20Sopenharmony_ci
63008c2ecf20Sopenharmony_ci/* MC_CMD_READ_SENSORS_OUT msgresponse */
63018c2ecf20Sopenharmony_ci#define    MC_CMD_READ_SENSORS_OUT_LEN 0
63028c2ecf20Sopenharmony_ci
63038c2ecf20Sopenharmony_ci/* MC_CMD_READ_SENSORS_EXT_OUT msgresponse */
63048c2ecf20Sopenharmony_ci#define    MC_CMD_READ_SENSORS_EXT_OUT_LEN 0
63058c2ecf20Sopenharmony_ci
63068c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF structuredef */
63078c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_LEN 4
63088c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_OFST 0
63098c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_LEN 2
63108c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_LBN 0
63118c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE_WIDTH 16
63128c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_OFST 2
63138c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_LEN 1
63148c2ecf20Sopenharmony_ci/* enum: Ok. */
63158c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_STATE_OK 0x0
63168c2ecf20Sopenharmony_ci/* enum: Breached warning threshold. */
63178c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_STATE_WARNING 0x1
63188c2ecf20Sopenharmony_ci/* enum: Breached fatal threshold. */
63198c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_STATE_FATAL 0x2
63208c2ecf20Sopenharmony_ci/* enum: Fault with sensor. */
63218c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_STATE_BROKEN 0x3
63228c2ecf20Sopenharmony_ci/* enum: Sensor is working but does not currently have a reading. */
63238c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_STATE_NO_READING 0x4
63248c2ecf20Sopenharmony_ci/* enum: Sensor initialisation failed. */
63258c2ecf20Sopenharmony_ci#define          MC_CMD_SENSOR_STATE_INIT_FAILED 0x5
63268c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_LBN 16
63278c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE_WIDTH 8
63288c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_OFST 3
63298c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_LEN 1
63308c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
63318c2ecf20Sopenharmony_ci/*               MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
63328c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_LBN 24
63338c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_TYPE_WIDTH 8
63348c2ecf20Sopenharmony_ci
63358c2ecf20Sopenharmony_ci
63368c2ecf20Sopenharmony_ci/***********************************/
63378c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_STATE
63388c2ecf20Sopenharmony_ci * Report current state of PHY. A 'zombie' PHY is a PHY that has failed to boot
63398c2ecf20Sopenharmony_ci * (e.g. due to missing or corrupted firmware). Locks required: None. Return
63408c2ecf20Sopenharmony_ci * code: 0
63418c2ecf20Sopenharmony_ci */
63428c2ecf20Sopenharmony_ci#define MC_CMD_GET_PHY_STATE 0x43
63438c2ecf20Sopenharmony_ci#undef MC_CMD_0x43_PRIVILEGE_CTG
63448c2ecf20Sopenharmony_ci
63458c2ecf20Sopenharmony_ci#define MC_CMD_0x43_PRIVILEGE_CTG SRIOV_CTG_GENERAL
63468c2ecf20Sopenharmony_ci
63478c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_STATE_IN msgrequest */
63488c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_STATE_IN_LEN 0
63498c2ecf20Sopenharmony_ci
63508c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_STATE_OUT msgresponse */
63518c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_STATE_OUT_LEN 4
63528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_STATE_OUT_STATE_OFST 0
63538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_STATE_OUT_STATE_LEN 4
63548c2ecf20Sopenharmony_ci/* enum: Ok. */
63558c2ecf20Sopenharmony_ci#define          MC_CMD_PHY_STATE_OK 0x1
63568c2ecf20Sopenharmony_ci/* enum: Faulty. */
63578c2ecf20Sopenharmony_ci#define          MC_CMD_PHY_STATE_ZOMBIE 0x2
63588c2ecf20Sopenharmony_ci
63598c2ecf20Sopenharmony_ci
63608c2ecf20Sopenharmony_ci/***********************************/
63618c2ecf20Sopenharmony_ci/* MC_CMD_SETUP_8021QBB
63628c2ecf20Sopenharmony_ci * 802.1Qbb control. 8 Tx queues that map to priorities 0 - 7. Use all 1s to
63638c2ecf20Sopenharmony_ci * disable 802.Qbb for a given priority.
63648c2ecf20Sopenharmony_ci */
63658c2ecf20Sopenharmony_ci#define MC_CMD_SETUP_8021QBB 0x44
63668c2ecf20Sopenharmony_ci
63678c2ecf20Sopenharmony_ci/* MC_CMD_SETUP_8021QBB_IN msgrequest */
63688c2ecf20Sopenharmony_ci#define    MC_CMD_SETUP_8021QBB_IN_LEN 32
63698c2ecf20Sopenharmony_ci#define       MC_CMD_SETUP_8021QBB_IN_TXQS_OFST 0
63708c2ecf20Sopenharmony_ci#define       MC_CMD_SETUP_8021QBB_IN_TXQS_LEN 32
63718c2ecf20Sopenharmony_ci
63728c2ecf20Sopenharmony_ci/* MC_CMD_SETUP_8021QBB_OUT msgresponse */
63738c2ecf20Sopenharmony_ci#define    MC_CMD_SETUP_8021QBB_OUT_LEN 0
63748c2ecf20Sopenharmony_ci
63758c2ecf20Sopenharmony_ci
63768c2ecf20Sopenharmony_ci/***********************************/
63778c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_GET
63788c2ecf20Sopenharmony_ci * Retrieve ID of any WoL filters. Locks required: None. Returns: 0, ENOSYS
63798c2ecf20Sopenharmony_ci */
63808c2ecf20Sopenharmony_ci#define MC_CMD_WOL_FILTER_GET 0x45
63818c2ecf20Sopenharmony_ci#undef MC_CMD_0x45_PRIVILEGE_CTG
63828c2ecf20Sopenharmony_ci
63838c2ecf20Sopenharmony_ci#define MC_CMD_0x45_PRIVILEGE_CTG SRIOV_CTG_LINK
63848c2ecf20Sopenharmony_ci
63858c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_GET_IN msgrequest */
63868c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_GET_IN_LEN 0
63878c2ecf20Sopenharmony_ci
63888c2ecf20Sopenharmony_ci/* MC_CMD_WOL_FILTER_GET_OUT msgresponse */
63898c2ecf20Sopenharmony_ci#define    MC_CMD_WOL_FILTER_GET_OUT_LEN 4
63908c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_GET_OUT_FILTER_ID_OFST 0
63918c2ecf20Sopenharmony_ci#define       MC_CMD_WOL_FILTER_GET_OUT_FILTER_ID_LEN 4
63928c2ecf20Sopenharmony_ci
63938c2ecf20Sopenharmony_ci
63948c2ecf20Sopenharmony_ci/***********************************/
63958c2ecf20Sopenharmony_ci/* MC_CMD_ADD_LIGHTSOUT_OFFLOAD
63968c2ecf20Sopenharmony_ci * Add a protocol offload to NIC for lights-out state. Locks required: None.
63978c2ecf20Sopenharmony_ci * Returns: 0, ENOSYS
63988c2ecf20Sopenharmony_ci */
63998c2ecf20Sopenharmony_ci#define MC_CMD_ADD_LIGHTSOUT_OFFLOAD 0x46
64008c2ecf20Sopenharmony_ci#undef MC_CMD_0x46_PRIVILEGE_CTG
64018c2ecf20Sopenharmony_ci
64028c2ecf20Sopenharmony_ci#define MC_CMD_0x46_PRIVILEGE_CTG SRIOV_CTG_LINK
64038c2ecf20Sopenharmony_ci
64048c2ecf20Sopenharmony_ci/* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN msgrequest */
64058c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMIN 8
64068c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMAX 252
64078c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LENMAX_MCDI2 1020
64088c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_LEN(num) (4+4*(num))
64098c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_NUM(len) (((len)-4)/4)
64108c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0
64118c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4
64128c2ecf20Sopenharmony_ci#define          MC_CMD_LIGHTSOUT_OFFLOAD_PROTOCOL_ARP 0x1 /* enum */
64138c2ecf20Sopenharmony_ci#define          MC_CMD_LIGHTSOUT_OFFLOAD_PROTOCOL_NS 0x2 /* enum */
64148c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_OFST 4
64158c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_LEN 4
64168c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MINNUM 1
64178c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MAXNUM 62
64188c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_DATA_MAXNUM_MCDI2 254
64198c2ecf20Sopenharmony_ci
64208c2ecf20Sopenharmony_ci/* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP msgrequest */
64218c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_LEN 14
64228c2ecf20Sopenharmony_ci/*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 */
64238c2ecf20Sopenharmony_ci/*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4 */
64248c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_MAC_OFST 4
64258c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_MAC_LEN 6
64268c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_IP_OFST 10
64278c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_ARP_IP_LEN 4
64288c2ecf20Sopenharmony_ci
64298c2ecf20Sopenharmony_ci/* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS msgrequest */
64308c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_LEN 42
64318c2ecf20Sopenharmony_ci/*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0 */
64328c2ecf20Sopenharmony_ci/*            MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4 */
64338c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_MAC_OFST 4
64348c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_MAC_LEN 6
64358c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_SNIPV6_OFST 10
64368c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_SNIPV6_LEN 16
64378c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_IPV6_OFST 26
64388c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_IN_NS_IPV6_LEN 16
64398c2ecf20Sopenharmony_ci
64408c2ecf20Sopenharmony_ci/* MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT msgresponse */
64418c2ecf20Sopenharmony_ci#define    MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_LEN 4
64428c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_FILTER_ID_OFST 0
64438c2ecf20Sopenharmony_ci#define       MC_CMD_ADD_LIGHTSOUT_OFFLOAD_OUT_FILTER_ID_LEN 4
64448c2ecf20Sopenharmony_ci
64458c2ecf20Sopenharmony_ci
64468c2ecf20Sopenharmony_ci/***********************************/
64478c2ecf20Sopenharmony_ci/* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD
64488c2ecf20Sopenharmony_ci * Remove a protocol offload from NIC for lights-out state. Locks required:
64498c2ecf20Sopenharmony_ci * None. Returns: 0, ENOSYS
64508c2ecf20Sopenharmony_ci */
64518c2ecf20Sopenharmony_ci#define MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD 0x47
64528c2ecf20Sopenharmony_ci#undef MC_CMD_0x47_PRIVILEGE_CTG
64538c2ecf20Sopenharmony_ci
64548c2ecf20Sopenharmony_ci#define MC_CMD_0x47_PRIVILEGE_CTG SRIOV_CTG_LINK
64558c2ecf20Sopenharmony_ci
64568c2ecf20Sopenharmony_ci/* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN msgrequest */
64578c2ecf20Sopenharmony_ci#define    MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_LEN 8
64588c2ecf20Sopenharmony_ci#define       MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_OFST 0
64598c2ecf20Sopenharmony_ci#define       MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_PROTOCOL_LEN 4
64608c2ecf20Sopenharmony_ci#define       MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_FILTER_ID_OFST 4
64618c2ecf20Sopenharmony_ci#define       MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_IN_FILTER_ID_LEN 4
64628c2ecf20Sopenharmony_ci
64638c2ecf20Sopenharmony_ci/* MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT msgresponse */
64648c2ecf20Sopenharmony_ci#define    MC_CMD_REMOVE_LIGHTSOUT_OFFLOAD_OUT_LEN 0
64658c2ecf20Sopenharmony_ci
64668c2ecf20Sopenharmony_ci
64678c2ecf20Sopenharmony_ci/***********************************/
64688c2ecf20Sopenharmony_ci/* MC_CMD_MAC_RESET_RESTORE
64698c2ecf20Sopenharmony_ci * Restore MAC after block reset. Locks required: None. Returns: 0.
64708c2ecf20Sopenharmony_ci */
64718c2ecf20Sopenharmony_ci#define MC_CMD_MAC_RESET_RESTORE 0x48
64728c2ecf20Sopenharmony_ci
64738c2ecf20Sopenharmony_ci/* MC_CMD_MAC_RESET_RESTORE_IN msgrequest */
64748c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_RESET_RESTORE_IN_LEN 0
64758c2ecf20Sopenharmony_ci
64768c2ecf20Sopenharmony_ci/* MC_CMD_MAC_RESET_RESTORE_OUT msgresponse */
64778c2ecf20Sopenharmony_ci#define    MC_CMD_MAC_RESET_RESTORE_OUT_LEN 0
64788c2ecf20Sopenharmony_ci
64798c2ecf20Sopenharmony_ci
64808c2ecf20Sopenharmony_ci/***********************************/
64818c2ecf20Sopenharmony_ci/* MC_CMD_TESTASSERT
64828c2ecf20Sopenharmony_ci * Deliberately trigger an assert-detonation in the firmware for testing
64838c2ecf20Sopenharmony_ci * purposes (i.e. to allow tests that the driver copes gracefully). Locks
64848c2ecf20Sopenharmony_ci * required: None Returns: 0
64858c2ecf20Sopenharmony_ci */
64868c2ecf20Sopenharmony_ci#define MC_CMD_TESTASSERT 0x49
64878c2ecf20Sopenharmony_ci#undef MC_CMD_0x49_PRIVILEGE_CTG
64888c2ecf20Sopenharmony_ci
64898c2ecf20Sopenharmony_ci#define MC_CMD_0x49_PRIVILEGE_CTG SRIOV_CTG_ADMIN
64908c2ecf20Sopenharmony_ci
64918c2ecf20Sopenharmony_ci/* MC_CMD_TESTASSERT_IN msgrequest */
64928c2ecf20Sopenharmony_ci#define    MC_CMD_TESTASSERT_IN_LEN 0
64938c2ecf20Sopenharmony_ci
64948c2ecf20Sopenharmony_ci/* MC_CMD_TESTASSERT_OUT msgresponse */
64958c2ecf20Sopenharmony_ci#define    MC_CMD_TESTASSERT_OUT_LEN 0
64968c2ecf20Sopenharmony_ci
64978c2ecf20Sopenharmony_ci/* MC_CMD_TESTASSERT_V2_IN msgrequest */
64988c2ecf20Sopenharmony_ci#define    MC_CMD_TESTASSERT_V2_IN_LEN 4
64998c2ecf20Sopenharmony_ci/* How to provoke the assertion */
65008c2ecf20Sopenharmony_ci#define       MC_CMD_TESTASSERT_V2_IN_TYPE_OFST 0
65018c2ecf20Sopenharmony_ci#define       MC_CMD_TESTASSERT_V2_IN_TYPE_LEN 4
65028c2ecf20Sopenharmony_ci/* enum: Assert using the FAIL_ASSERTION_WITH_USEFUL_VALUES macro. Unless
65038c2ecf20Sopenharmony_ci * you're testing firmware, this is what you want.
65048c2ecf20Sopenharmony_ci */
65058c2ecf20Sopenharmony_ci#define          MC_CMD_TESTASSERT_V2_IN_FAIL_ASSERTION_WITH_USEFUL_VALUES 0x0
65068c2ecf20Sopenharmony_ci/* enum: Assert using assert(0); */
65078c2ecf20Sopenharmony_ci#define          MC_CMD_TESTASSERT_V2_IN_ASSERT_FALSE 0x1
65088c2ecf20Sopenharmony_ci/* enum: Deliberately trigger a watchdog */
65098c2ecf20Sopenharmony_ci#define          MC_CMD_TESTASSERT_V2_IN_WATCHDOG 0x2
65108c2ecf20Sopenharmony_ci/* enum: Deliberately trigger a trap by loading from an invalid address */
65118c2ecf20Sopenharmony_ci#define          MC_CMD_TESTASSERT_V2_IN_LOAD_TRAP 0x3
65128c2ecf20Sopenharmony_ci/* enum: Deliberately trigger a trap by storing to an invalid address */
65138c2ecf20Sopenharmony_ci#define          MC_CMD_TESTASSERT_V2_IN_STORE_TRAP 0x4
65148c2ecf20Sopenharmony_ci/* enum: Jump to an invalid address */
65158c2ecf20Sopenharmony_ci#define          MC_CMD_TESTASSERT_V2_IN_JUMP_TRAP 0x5
65168c2ecf20Sopenharmony_ci
65178c2ecf20Sopenharmony_ci/* MC_CMD_TESTASSERT_V2_OUT msgresponse */
65188c2ecf20Sopenharmony_ci#define    MC_CMD_TESTASSERT_V2_OUT_LEN 0
65198c2ecf20Sopenharmony_ci
65208c2ecf20Sopenharmony_ci
65218c2ecf20Sopenharmony_ci/***********************************/
65228c2ecf20Sopenharmony_ci/* MC_CMD_WORKAROUND
65238c2ecf20Sopenharmony_ci * Enable/Disable a given workaround. The mcfw will return EINVAL if it doesn't
65248c2ecf20Sopenharmony_ci * understand the given workaround number - which should not be treated as a
65258c2ecf20Sopenharmony_ci * hard error by client code. This op does not imply any semantics about each
65268c2ecf20Sopenharmony_ci * workaround, that's between the driver and the mcfw on a per-workaround
65278c2ecf20Sopenharmony_ci * basis. Locks required: None. Returns: 0, EINVAL .
65288c2ecf20Sopenharmony_ci */
65298c2ecf20Sopenharmony_ci#define MC_CMD_WORKAROUND 0x4a
65308c2ecf20Sopenharmony_ci#undef MC_CMD_0x4a_PRIVILEGE_CTG
65318c2ecf20Sopenharmony_ci
65328c2ecf20Sopenharmony_ci#define MC_CMD_0x4a_PRIVILEGE_CTG SRIOV_CTG_ADMIN
65338c2ecf20Sopenharmony_ci
65348c2ecf20Sopenharmony_ci/* MC_CMD_WORKAROUND_IN msgrequest */
65358c2ecf20Sopenharmony_ci#define    MC_CMD_WORKAROUND_IN_LEN 8
65368c2ecf20Sopenharmony_ci/* The enums here must correspond with those in MC_CMD_GET_WORKAROUND. */
65378c2ecf20Sopenharmony_ci#define       MC_CMD_WORKAROUND_IN_TYPE_OFST 0
65388c2ecf20Sopenharmony_ci#define       MC_CMD_WORKAROUND_IN_TYPE_LEN 4
65398c2ecf20Sopenharmony_ci/* enum: Bug 17230 work around. */
65408c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG17230 0x1
65418c2ecf20Sopenharmony_ci/* enum: Bug 35388 work around (unsafe EVQ writes). */
65428c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG35388 0x2
65438c2ecf20Sopenharmony_ci/* enum: Bug35017 workaround (A64 tables must be identity map) */
65448c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG35017 0x3
65458c2ecf20Sopenharmony_ci/* enum: Bug 41750 present (MC_CMD_TRIGGER_INTERRUPT won't work) */
65468c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG41750 0x4
65478c2ecf20Sopenharmony_ci/* enum: Bug 42008 present (Interrupts can overtake associated events). Caution
65488c2ecf20Sopenharmony_ci * - before adding code that queries this workaround, remember that there's
65498c2ecf20Sopenharmony_ci * released Monza firmware that doesn't understand MC_CMD_WORKAROUND_BUG42008,
65508c2ecf20Sopenharmony_ci * and will hence (incorrectly) report that the bug doesn't exist.
65518c2ecf20Sopenharmony_ci */
65528c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG42008 0x5
65538c2ecf20Sopenharmony_ci/* enum: Bug 26807 features present in firmware (multicast filter chaining)
65548c2ecf20Sopenharmony_ci * This feature cannot be turned on/off while there are any filters already
65558c2ecf20Sopenharmony_ci * present. The behaviour in such case depends on the acting client's privilege
65568c2ecf20Sopenharmony_ci * level. If the client has the admin privilege, then all functions that have
65578c2ecf20Sopenharmony_ci * filters installed will be FLRed and the FLR_DONE flag will be set. Otherwise
65588c2ecf20Sopenharmony_ci * the command will fail with MC_CMD_ERR_FILTERS_PRESENT.
65598c2ecf20Sopenharmony_ci */
65608c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG26807 0x6
65618c2ecf20Sopenharmony_ci/* enum: Bug 61265 work around (broken EVQ TMR writes). */
65628c2ecf20Sopenharmony_ci#define          MC_CMD_WORKAROUND_BUG61265 0x7
65638c2ecf20Sopenharmony_ci/* 0 = disable the workaround indicated by TYPE; any non-zero value = enable
65648c2ecf20Sopenharmony_ci * the workaround
65658c2ecf20Sopenharmony_ci */
65668c2ecf20Sopenharmony_ci#define       MC_CMD_WORKAROUND_IN_ENABLED_OFST 4
65678c2ecf20Sopenharmony_ci#define       MC_CMD_WORKAROUND_IN_ENABLED_LEN 4
65688c2ecf20Sopenharmony_ci
65698c2ecf20Sopenharmony_ci/* MC_CMD_WORKAROUND_OUT msgresponse */
65708c2ecf20Sopenharmony_ci#define    MC_CMD_WORKAROUND_OUT_LEN 0
65718c2ecf20Sopenharmony_ci
65728c2ecf20Sopenharmony_ci/* MC_CMD_WORKAROUND_EXT_OUT msgresponse: This response format will be used
65738c2ecf20Sopenharmony_ci * when (TYPE == MC_CMD_WORKAROUND_BUG26807)
65748c2ecf20Sopenharmony_ci */
65758c2ecf20Sopenharmony_ci#define    MC_CMD_WORKAROUND_EXT_OUT_LEN 4
65768c2ecf20Sopenharmony_ci#define       MC_CMD_WORKAROUND_EXT_OUT_FLAGS_OFST 0
65778c2ecf20Sopenharmony_ci#define       MC_CMD_WORKAROUND_EXT_OUT_FLAGS_LEN 4
65788c2ecf20Sopenharmony_ci#define        MC_CMD_WORKAROUND_EXT_OUT_FLR_DONE_OFST 0
65798c2ecf20Sopenharmony_ci#define        MC_CMD_WORKAROUND_EXT_OUT_FLR_DONE_LBN 0
65808c2ecf20Sopenharmony_ci#define        MC_CMD_WORKAROUND_EXT_OUT_FLR_DONE_WIDTH 1
65818c2ecf20Sopenharmony_ci
65828c2ecf20Sopenharmony_ci
65838c2ecf20Sopenharmony_ci/***********************************/
65848c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_MEDIA_INFO
65858c2ecf20Sopenharmony_ci * Read media-specific data from PHY (e.g. SFP/SFP+ module ID information for
65868c2ecf20Sopenharmony_ci * SFP+ PHYs). The 'media type' can be found via GET_PHY_CFG
65878c2ecf20Sopenharmony_ci * (GET_PHY_CFG_OUT_MEDIA_TYPE); the valid 'page number' input values, and the
65888c2ecf20Sopenharmony_ci * output data, are interpreted on a per-type basis. For SFP+: PAGE=0 or 1
65898c2ecf20Sopenharmony_ci * returns a 128-byte block read from module I2C address 0xA0 offset 0 or 0x80.
65908c2ecf20Sopenharmony_ci * Anything else: currently undefined. Locks required: None. Return code: 0.
65918c2ecf20Sopenharmony_ci */
65928c2ecf20Sopenharmony_ci#define MC_CMD_GET_PHY_MEDIA_INFO 0x4b
65938c2ecf20Sopenharmony_ci#undef MC_CMD_0x4b_PRIVILEGE_CTG
65948c2ecf20Sopenharmony_ci
65958c2ecf20Sopenharmony_ci#define MC_CMD_0x4b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
65968c2ecf20Sopenharmony_ci
65978c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_MEDIA_INFO_IN msgrequest */
65988c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN 4
65998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_IN_PAGE_OFST 0
66008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_IN_PAGE_LEN 4
66018c2ecf20Sopenharmony_ci
66028c2ecf20Sopenharmony_ci/* MC_CMD_GET_PHY_MEDIA_INFO_OUT msgresponse */
66038c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMIN 5
66048c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX 252
66058c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_MEDIA_INFO_OUT_LENMAX_MCDI2 1020
66068c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(num) (4+1*(num))
66078c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_NUM(len) (((len)-4)/1)
66088c2ecf20Sopenharmony_ci/* in bytes */
66098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_OFST 0
66108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATALEN_LEN 4
66118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_OFST 4
66128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_LEN 1
66138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MINNUM 1
66148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MAXNUM 248
66158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PHY_MEDIA_INFO_OUT_DATA_MAXNUM_MCDI2 1016
66168c2ecf20Sopenharmony_ci
66178c2ecf20Sopenharmony_ci
66188c2ecf20Sopenharmony_ci/***********************************/
66198c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_TEST
66208c2ecf20Sopenharmony_ci * Test a particular NVRAM partition for valid contents (where "valid" depends
66218c2ecf20Sopenharmony_ci * on the type of partition).
66228c2ecf20Sopenharmony_ci */
66238c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_TEST 0x4c
66248c2ecf20Sopenharmony_ci#undef MC_CMD_0x4c_PRIVILEGE_CTG
66258c2ecf20Sopenharmony_ci
66268c2ecf20Sopenharmony_ci#define MC_CMD_0x4c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
66278c2ecf20Sopenharmony_ci
66288c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_TEST_IN msgrequest */
66298c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_TEST_IN_LEN 4
66308c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_TEST_IN_TYPE_OFST 0
66318c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_TEST_IN_TYPE_LEN 4
66328c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
66338c2ecf20Sopenharmony_ci/*               MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */
66348c2ecf20Sopenharmony_ci
66358c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_TEST_OUT msgresponse */
66368c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_TEST_OUT_LEN 4
66378c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_TEST_OUT_RESULT_OFST 0
66388c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_TEST_OUT_RESULT_LEN 4
66398c2ecf20Sopenharmony_ci/* enum: Passed. */
66408c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TEST_PASS 0x0
66418c2ecf20Sopenharmony_ci/* enum: Failed. */
66428c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TEST_FAIL 0x1
66438c2ecf20Sopenharmony_ci/* enum: Not supported. */
66448c2ecf20Sopenharmony_ci#define          MC_CMD_NVRAM_TEST_NOTSUPP 0x2
66458c2ecf20Sopenharmony_ci
66468c2ecf20Sopenharmony_ci
66478c2ecf20Sopenharmony_ci/***********************************/
66488c2ecf20Sopenharmony_ci/* MC_CMD_MRSFP_TWEAK
66498c2ecf20Sopenharmony_ci * Read status and/or set parameters for the 'mrsfp' driver in mr_rusty builds.
66508c2ecf20Sopenharmony_ci * I2C I/O expander bits are always read; if equaliser parameters are supplied,
66518c2ecf20Sopenharmony_ci * they are configured first. Locks required: None. Return code: 0, EINVAL.
66528c2ecf20Sopenharmony_ci */
66538c2ecf20Sopenharmony_ci#define MC_CMD_MRSFP_TWEAK 0x4d
66548c2ecf20Sopenharmony_ci
66558c2ecf20Sopenharmony_ci/* MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG msgrequest */
66568c2ecf20Sopenharmony_ci#define    MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_LEN 16
66578c2ecf20Sopenharmony_ci/* 0-6 low->high de-emph. */
66588c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_LEVEL_OFST 0
66598c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_LEVEL_LEN 4
66608c2ecf20Sopenharmony_ci/* 0-8 low->high ref.V */
66618c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_DT_CFG_OFST 4
66628c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_TXEQ_DT_CFG_LEN 4
66638c2ecf20Sopenharmony_ci/* 0-8 0-8 low->high boost */
66648c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_BOOST_OFST 8
66658c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_BOOST_LEN 4
66668c2ecf20Sopenharmony_ci/* 0-8 low->high ref.V */
66678c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_DT_CFG_OFST 12
66688c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_IN_EQ_CONFIG_RXEQ_DT_CFG_LEN 4
66698c2ecf20Sopenharmony_ci
66708c2ecf20Sopenharmony_ci/* MC_CMD_MRSFP_TWEAK_IN_READ_ONLY msgrequest */
66718c2ecf20Sopenharmony_ci#define    MC_CMD_MRSFP_TWEAK_IN_READ_ONLY_LEN 0
66728c2ecf20Sopenharmony_ci
66738c2ecf20Sopenharmony_ci/* MC_CMD_MRSFP_TWEAK_OUT msgresponse */
66748c2ecf20Sopenharmony_ci#define    MC_CMD_MRSFP_TWEAK_OUT_LEN 12
66758c2ecf20Sopenharmony_ci/* input bits */
66768c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_OUT_IOEXP_INPUTS_OFST 0
66778c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_OUT_IOEXP_INPUTS_LEN 4
66788c2ecf20Sopenharmony_ci/* output bits */
66798c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_OFST 4
66808c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_OUT_IOEXP_OUTPUTS_LEN 4
66818c2ecf20Sopenharmony_ci/* direction */
66828c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OFST 8
66838c2ecf20Sopenharmony_ci#define       MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_LEN 4
66848c2ecf20Sopenharmony_ci/* enum: Out. */
66858c2ecf20Sopenharmony_ci#define          MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_OUT 0x0
66868c2ecf20Sopenharmony_ci/* enum: In. */
66878c2ecf20Sopenharmony_ci#define          MC_CMD_MRSFP_TWEAK_OUT_IOEXP_DIRECTION_IN 0x1
66888c2ecf20Sopenharmony_ci
66898c2ecf20Sopenharmony_ci
66908c2ecf20Sopenharmony_ci/***********************************/
66918c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_SET_LIMS
66928c2ecf20Sopenharmony_ci * Adjusts the sensor limits. This is a warranty-voiding operation. Returns:
66938c2ecf20Sopenharmony_ci * ENOENT if the sensor specified does not exist, EINVAL if the limits are out
66948c2ecf20Sopenharmony_ci * of range.
66958c2ecf20Sopenharmony_ci */
66968c2ecf20Sopenharmony_ci#define MC_CMD_SENSOR_SET_LIMS 0x4e
66978c2ecf20Sopenharmony_ci#undef MC_CMD_0x4e_PRIVILEGE_CTG
66988c2ecf20Sopenharmony_ci
66998c2ecf20Sopenharmony_ci#define MC_CMD_0x4e_PRIVILEGE_CTG SRIOV_CTG_INSECURE
67008c2ecf20Sopenharmony_ci
67018c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_SET_LIMS_IN msgrequest */
67028c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_SET_LIMS_IN_LEN 20
67038c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_OFST 0
67048c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_SENSOR_LEN 4
67058c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
67068c2ecf20Sopenharmony_ci/*               MC_CMD_SENSOR_INFO/MC_CMD_SENSOR_INFO_OUT/MASK */
67078c2ecf20Sopenharmony_ci/* interpretation is is sensor-specific. */
67088c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_LOW0_OFST 4
67098c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_LOW0_LEN 4
67108c2ecf20Sopenharmony_ci/* interpretation is is sensor-specific. */
67118c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_HI0_OFST 8
67128c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_HI0_LEN 4
67138c2ecf20Sopenharmony_ci/* interpretation is is sensor-specific. */
67148c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_LOW1_OFST 12
67158c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_LOW1_LEN 4
67168c2ecf20Sopenharmony_ci/* interpretation is is sensor-specific. */
67178c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_HI1_OFST 16
67188c2ecf20Sopenharmony_ci#define       MC_CMD_SENSOR_SET_LIMS_IN_HI1_LEN 4
67198c2ecf20Sopenharmony_ci
67208c2ecf20Sopenharmony_ci/* MC_CMD_SENSOR_SET_LIMS_OUT msgresponse */
67218c2ecf20Sopenharmony_ci#define    MC_CMD_SENSOR_SET_LIMS_OUT_LEN 0
67228c2ecf20Sopenharmony_ci
67238c2ecf20Sopenharmony_ci
67248c2ecf20Sopenharmony_ci/***********************************/
67258c2ecf20Sopenharmony_ci/* MC_CMD_GET_RESOURCE_LIMITS
67268c2ecf20Sopenharmony_ci */
67278c2ecf20Sopenharmony_ci#define MC_CMD_GET_RESOURCE_LIMITS 0x4f
67288c2ecf20Sopenharmony_ci
67298c2ecf20Sopenharmony_ci/* MC_CMD_GET_RESOURCE_LIMITS_IN msgrequest */
67308c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RESOURCE_LIMITS_IN_LEN 0
67318c2ecf20Sopenharmony_ci
67328c2ecf20Sopenharmony_ci/* MC_CMD_GET_RESOURCE_LIMITS_OUT msgresponse */
67338c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN 16
67348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_BUFTBL_OFST 0
67358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_BUFTBL_LEN 4
67368c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_EVQ_OFST 4
67378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_EVQ_LEN 4
67388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_RXQ_OFST 8
67398c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_RXQ_LEN 4
67408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_TXQ_OFST 12
67418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RESOURCE_LIMITS_OUT_TXQ_LEN 4
67428c2ecf20Sopenharmony_ci
67438c2ecf20Sopenharmony_ci
67448c2ecf20Sopenharmony_ci/***********************************/
67458c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_PARTITIONS
67468c2ecf20Sopenharmony_ci * Reads the list of available virtual NVRAM partition types. Locks required:
67478c2ecf20Sopenharmony_ci * none. Returns: 0, EINVAL (bad type).
67488c2ecf20Sopenharmony_ci */
67498c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_PARTITIONS 0x51
67508c2ecf20Sopenharmony_ci#undef MC_CMD_0x51_PRIVILEGE_CTG
67518c2ecf20Sopenharmony_ci
67528c2ecf20Sopenharmony_ci#define MC_CMD_0x51_PRIVILEGE_CTG SRIOV_CTG_ADMIN
67538c2ecf20Sopenharmony_ci
67548c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_PARTITIONS_IN msgrequest */
67558c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PARTITIONS_IN_LEN 0
67568c2ecf20Sopenharmony_ci
67578c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_PARTITIONS_OUT msgresponse */
67588c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PARTITIONS_OUT_LENMIN 4
67598c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX 252
67608c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX_MCDI2 1020
67618c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PARTITIONS_OUT_LEN(num) (4+4*(num))
67628c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_NUM(len) (((len)-4)/4)
67638c2ecf20Sopenharmony_ci/* total number of partitions */
67648c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_NUM_PARTITIONS_OFST 0
67658c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_NUM_PARTITIONS_LEN 4
67668c2ecf20Sopenharmony_ci/* type ID code for each of NUM_PARTITIONS partitions */
67678c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_OFST 4
67688c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_LEN 4
67698c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MINNUM 0
67708c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MAXNUM 62
67718c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PARTITIONS_OUT_TYPE_ID_MAXNUM_MCDI2 254
67728c2ecf20Sopenharmony_ci
67738c2ecf20Sopenharmony_ci
67748c2ecf20Sopenharmony_ci/***********************************/
67758c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_METADATA
67768c2ecf20Sopenharmony_ci * Reads soft metadata for a virtual NVRAM partition type. Locks required:
67778c2ecf20Sopenharmony_ci * none. Returns: 0, EINVAL (bad type).
67788c2ecf20Sopenharmony_ci */
67798c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_METADATA 0x52
67808c2ecf20Sopenharmony_ci#undef MC_CMD_0x52_PRIVILEGE_CTG
67818c2ecf20Sopenharmony_ci
67828c2ecf20Sopenharmony_ci#define MC_CMD_0x52_PRIVILEGE_CTG SRIOV_CTG_ADMIN
67838c2ecf20Sopenharmony_ci
67848c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_METADATA_IN msgrequest */
67858c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_METADATA_IN_LEN 4
67868c2ecf20Sopenharmony_ci/* Partition type ID code */
67878c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_IN_TYPE_OFST 0
67888c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_IN_TYPE_LEN 4
67898c2ecf20Sopenharmony_ci
67908c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_METADATA_OUT msgresponse */
67918c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_METADATA_OUT_LENMIN 20
67928c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_METADATA_OUT_LENMAX 252
67938c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_METADATA_OUT_LENMAX_MCDI2 1020
67948c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_METADATA_OUT_LEN(num) (20+1*(num))
67958c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_NUM(len) (((len)-20)/1)
67968c2ecf20Sopenharmony_ci/* Partition type ID code */
67978c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_TYPE_OFST 0
67988c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_TYPE_LEN 4
67998c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_FLAGS_OFST 4
68008c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_FLAGS_LEN 4
68018c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_OFST 4
68028c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_LBN 0
68038c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_VALID_WIDTH 1
68048c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_OFST 4
68058c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_LBN 1
68068c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_VERSION_VALID_WIDTH 1
68078c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_OFST 4
68088c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_LBN 2
68098c2ecf20Sopenharmony_ci#define        MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_VALID_WIDTH 1
68108c2ecf20Sopenharmony_ci/* Subtype ID code for content of this partition */
68118c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_OFST 8
68128c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_SUBTYPE_LEN 4
68138c2ecf20Sopenharmony_ci/* 1st component of W.X.Y.Z version number for content of this partition */
68148c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_W_OFST 12
68158c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_W_LEN 2
68168c2ecf20Sopenharmony_ci/* 2nd component of W.X.Y.Z version number for content of this partition */
68178c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_X_OFST 14
68188c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_X_LEN 2
68198c2ecf20Sopenharmony_ci/* 3rd component of W.X.Y.Z version number for content of this partition */
68208c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_Y_OFST 16
68218c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_Y_LEN 2
68228c2ecf20Sopenharmony_ci/* 4th component of W.X.Y.Z version number for content of this partition */
68238c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_Z_OFST 18
68248c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_VERSION_Z_LEN 2
68258c2ecf20Sopenharmony_ci/* Zero-terminated string describing the content of this partition */
68268c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_OFST 20
68278c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_LEN 1
68288c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MINNUM 0
68298c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MAXNUM 232
68308c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_METADATA_OUT_DESCRIPTION_MAXNUM_MCDI2 1000
68318c2ecf20Sopenharmony_ci
68328c2ecf20Sopenharmony_ci
68338c2ecf20Sopenharmony_ci/***********************************/
68348c2ecf20Sopenharmony_ci/* MC_CMD_GET_MAC_ADDRESSES
68358c2ecf20Sopenharmony_ci * Returns the base MAC, count and stride for the requesting function
68368c2ecf20Sopenharmony_ci */
68378c2ecf20Sopenharmony_ci#define MC_CMD_GET_MAC_ADDRESSES 0x55
68388c2ecf20Sopenharmony_ci#undef MC_CMD_0x55_PRIVILEGE_CTG
68398c2ecf20Sopenharmony_ci
68408c2ecf20Sopenharmony_ci#define MC_CMD_0x55_PRIVILEGE_CTG SRIOV_CTG_GENERAL
68418c2ecf20Sopenharmony_ci
68428c2ecf20Sopenharmony_ci/* MC_CMD_GET_MAC_ADDRESSES_IN msgrequest */
68438c2ecf20Sopenharmony_ci#define    MC_CMD_GET_MAC_ADDRESSES_IN_LEN 0
68448c2ecf20Sopenharmony_ci
68458c2ecf20Sopenharmony_ci/* MC_CMD_GET_MAC_ADDRESSES_OUT msgresponse */
68468c2ecf20Sopenharmony_ci#define    MC_CMD_GET_MAC_ADDRESSES_OUT_LEN 16
68478c2ecf20Sopenharmony_ci/* Base MAC address */
68488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE_OFST 0
68498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_ADDR_BASE_LEN 6
68508c2ecf20Sopenharmony_ci/* Padding */
68518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_RESERVED_OFST 6
68528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_RESERVED_LEN 2
68538c2ecf20Sopenharmony_ci/* Number of allocated MAC addresses */
68548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_COUNT_OFST 8
68558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_COUNT_LEN 4
68568c2ecf20Sopenharmony_ci/* Spacing of allocated MAC addresses */
68578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_STRIDE_OFST 12
68588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_MAC_ADDRESSES_OUT_MAC_STRIDE_LEN 4
68598c2ecf20Sopenharmony_ci
68608c2ecf20Sopenharmony_ci
68618c2ecf20Sopenharmony_ci/***********************************/
68628c2ecf20Sopenharmony_ci/* MC_CMD_CLP
68638c2ecf20Sopenharmony_ci * Perform a CLP related operation, see SF-110495-PS for details of CLP
68648c2ecf20Sopenharmony_ci * processing. This command has been extended to accomodate the requirements of
68658c2ecf20Sopenharmony_ci * different manufacturers which are to be found in SF-119187-TC, SF-119186-TC,
68668c2ecf20Sopenharmony_ci * SF-120509-TC and SF-117282-PS.
68678c2ecf20Sopenharmony_ci */
68688c2ecf20Sopenharmony_ci#define MC_CMD_CLP 0x56
68698c2ecf20Sopenharmony_ci#undef MC_CMD_0x56_PRIVILEGE_CTG
68708c2ecf20Sopenharmony_ci
68718c2ecf20Sopenharmony_ci#define MC_CMD_0x56_PRIVILEGE_CTG SRIOV_CTG_ADMIN
68728c2ecf20Sopenharmony_ci
68738c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN msgrequest */
68748c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_LEN 4
68758c2ecf20Sopenharmony_ci/* Sub operation */
68768c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_OP_OFST 0
68778c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_OP_LEN 4
68788c2ecf20Sopenharmony_ci/* enum: Return to factory default settings */
68798c2ecf20Sopenharmony_ci#define          MC_CMD_CLP_OP_DEFAULT 0x1
68808c2ecf20Sopenharmony_ci/* enum: Set MAC address */
68818c2ecf20Sopenharmony_ci#define          MC_CMD_CLP_OP_SET_MAC 0x2
68828c2ecf20Sopenharmony_ci/* enum: Get MAC address */
68838c2ecf20Sopenharmony_ci#define          MC_CMD_CLP_OP_GET_MAC 0x3
68848c2ecf20Sopenharmony_ci/* enum: Set UEFI/GPXE boot mode */
68858c2ecf20Sopenharmony_ci#define          MC_CMD_CLP_OP_SET_BOOT 0x4
68868c2ecf20Sopenharmony_ci/* enum: Get UEFI/GPXE boot mode */
68878c2ecf20Sopenharmony_ci#define          MC_CMD_CLP_OP_GET_BOOT 0x5
68888c2ecf20Sopenharmony_ci
68898c2ecf20Sopenharmony_ci/* MC_CMD_CLP_OUT msgresponse */
68908c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_OUT_LEN 0
68918c2ecf20Sopenharmony_ci
68928c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_DEFAULT msgrequest */
68938c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_DEFAULT_LEN 4
68948c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
68958c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
68968c2ecf20Sopenharmony_ci
68978c2ecf20Sopenharmony_ci/* MC_CMD_CLP_OUT_DEFAULT msgresponse */
68988c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_OUT_DEFAULT_LEN 0
68998c2ecf20Sopenharmony_ci
69008c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_SET_MAC msgrequest */
69018c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_SET_MAC_LEN 12
69028c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
69038c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
69048c2ecf20Sopenharmony_ci/* The MAC address assigned to port. A zero MAC address of 00:00:00:00:00:00
69058c2ecf20Sopenharmony_ci * restores the permanent (factory-programmed) MAC address associated with the
69068c2ecf20Sopenharmony_ci * port. A non-zero MAC address persists until a PCIe reset or a power cycle.
69078c2ecf20Sopenharmony_ci */
69088c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_ADDR_OFST 4
69098c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_ADDR_LEN 6
69108c2ecf20Sopenharmony_ci/* Padding */
69118c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_RESERVED_OFST 10
69128c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_RESERVED_LEN 2
69138c2ecf20Sopenharmony_ci
69148c2ecf20Sopenharmony_ci/* MC_CMD_CLP_OUT_SET_MAC msgresponse */
69158c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_OUT_SET_MAC_LEN 0
69168c2ecf20Sopenharmony_ci
69178c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_SET_MAC_V2 msgrequest */
69188c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_SET_MAC_V2_LEN 16
69198c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
69208c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
69218c2ecf20Sopenharmony_ci/* The MAC address assigned to port. A zero MAC address of 00:00:00:00:00:00
69228c2ecf20Sopenharmony_ci * restores the permanent (factory-programmed) MAC address associated with the
69238c2ecf20Sopenharmony_ci * port. A non-zero MAC address persists until a PCIe reset or a power cycle.
69248c2ecf20Sopenharmony_ci */
69258c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_V2_ADDR_OFST 4
69268c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_V2_ADDR_LEN 6
69278c2ecf20Sopenharmony_ci/* Padding */
69288c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_V2_RESERVED_OFST 10
69298c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_V2_RESERVED_LEN 2
69308c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_V2_FLAGS_OFST 12
69318c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_MAC_V2_FLAGS_LEN 4
69328c2ecf20Sopenharmony_ci#define        MC_CMD_CLP_IN_SET_MAC_V2_VIRTUAL_OFST 12
69338c2ecf20Sopenharmony_ci#define        MC_CMD_CLP_IN_SET_MAC_V2_VIRTUAL_LBN 0
69348c2ecf20Sopenharmony_ci#define        MC_CMD_CLP_IN_SET_MAC_V2_VIRTUAL_WIDTH 1
69358c2ecf20Sopenharmony_ci
69368c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_GET_MAC msgrequest */
69378c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_GET_MAC_LEN 4
69388c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
69398c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
69408c2ecf20Sopenharmony_ci
69418c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_GET_MAC_V2 msgrequest */
69428c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_GET_MAC_V2_LEN 8
69438c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
69448c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
69458c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_GET_MAC_V2_FLAGS_OFST 4
69468c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_GET_MAC_V2_FLAGS_LEN 4
69478c2ecf20Sopenharmony_ci#define        MC_CMD_CLP_IN_GET_MAC_V2_PERMANENT_OFST 4
69488c2ecf20Sopenharmony_ci#define        MC_CMD_CLP_IN_GET_MAC_V2_PERMANENT_LBN 0
69498c2ecf20Sopenharmony_ci#define        MC_CMD_CLP_IN_GET_MAC_V2_PERMANENT_WIDTH 1
69508c2ecf20Sopenharmony_ci
69518c2ecf20Sopenharmony_ci/* MC_CMD_CLP_OUT_GET_MAC msgresponse */
69528c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_OUT_GET_MAC_LEN 8
69538c2ecf20Sopenharmony_ci/* MAC address assigned to port */
69548c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_MAC_ADDR_OFST 0
69558c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_MAC_ADDR_LEN 6
69568c2ecf20Sopenharmony_ci/* Padding */
69578c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_MAC_RESERVED_OFST 6
69588c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_MAC_RESERVED_LEN 2
69598c2ecf20Sopenharmony_ci
69608c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_SET_BOOT msgrequest */
69618c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_SET_BOOT_LEN 5
69628c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
69638c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
69648c2ecf20Sopenharmony_ci/* Boot flag */
69658c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_BOOT_FLAG_OFST 4
69668c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_IN_SET_BOOT_FLAG_LEN 1
69678c2ecf20Sopenharmony_ci
69688c2ecf20Sopenharmony_ci/* MC_CMD_CLP_OUT_SET_BOOT msgresponse */
69698c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_OUT_SET_BOOT_LEN 0
69708c2ecf20Sopenharmony_ci
69718c2ecf20Sopenharmony_ci/* MC_CMD_CLP_IN_GET_BOOT msgrequest */
69728c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_IN_GET_BOOT_LEN 4
69738c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_OFST 0 */
69748c2ecf20Sopenharmony_ci/*            MC_CMD_CLP_IN_OP_LEN 4 */
69758c2ecf20Sopenharmony_ci
69768c2ecf20Sopenharmony_ci/* MC_CMD_CLP_OUT_GET_BOOT msgresponse */
69778c2ecf20Sopenharmony_ci#define    MC_CMD_CLP_OUT_GET_BOOT_LEN 4
69788c2ecf20Sopenharmony_ci/* Boot flag */
69798c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_BOOT_FLAG_OFST 0
69808c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_BOOT_FLAG_LEN 1
69818c2ecf20Sopenharmony_ci/* Padding */
69828c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_BOOT_RESERVED_OFST 1
69838c2ecf20Sopenharmony_ci#define       MC_CMD_CLP_OUT_GET_BOOT_RESERVED_LEN 3
69848c2ecf20Sopenharmony_ci
69858c2ecf20Sopenharmony_ci
69868c2ecf20Sopenharmony_ci/***********************************/
69878c2ecf20Sopenharmony_ci/* MC_CMD_MUM
69888c2ecf20Sopenharmony_ci * Perform a MUM operation
69898c2ecf20Sopenharmony_ci */
69908c2ecf20Sopenharmony_ci#define MC_CMD_MUM 0x57
69918c2ecf20Sopenharmony_ci#undef MC_CMD_0x57_PRIVILEGE_CTG
69928c2ecf20Sopenharmony_ci
69938c2ecf20Sopenharmony_ci#define MC_CMD_0x57_PRIVILEGE_CTG SRIOV_CTG_INSECURE
69948c2ecf20Sopenharmony_ci
69958c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN msgrequest */
69968c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_LEN 4
69978c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_OP_HDR_OFST 0
69988c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_OP_HDR_LEN 4
69998c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_OP_OFST 0
70008c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_OP_LBN 0
70018c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_OP_WIDTH 8
70028c2ecf20Sopenharmony_ci/* enum: NULL MCDI command to MUM */
70038c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_NULL 0x1
70048c2ecf20Sopenharmony_ci/* enum: Get MUM version */
70058c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_GET_VERSION 0x2
70068c2ecf20Sopenharmony_ci/* enum: Issue raw I2C command to MUM */
70078c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_RAW_CMD 0x3
70088c2ecf20Sopenharmony_ci/* enum: Read from registers on devices connected to MUM. */
70098c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_READ 0x4
70108c2ecf20Sopenharmony_ci/* enum: Write to registers on devices connected to MUM. */
70118c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_WRITE 0x5
70128c2ecf20Sopenharmony_ci/* enum: Control UART logging. */
70138c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_LOG 0x6
70148c2ecf20Sopenharmony_ci/* enum: Operations on MUM GPIO lines */
70158c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_GPIO 0x7
70168c2ecf20Sopenharmony_ci/* enum: Get sensor readings from MUM */
70178c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_READ_SENSORS 0x8
70188c2ecf20Sopenharmony_ci/* enum: Initiate clock programming on the MUM */
70198c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_PROGRAM_CLOCKS 0x9
70208c2ecf20Sopenharmony_ci/* enum: Initiate FPGA load from flash on the MUM */
70218c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_FPGA_LOAD 0xa
70228c2ecf20Sopenharmony_ci/* enum: Request sensor reading from MUM ADC resulting from earlier request via
70238c2ecf20Sopenharmony_ci * MUM ATB
70248c2ecf20Sopenharmony_ci */
70258c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_READ_ATB_SENSOR 0xb
70268c2ecf20Sopenharmony_ci/* enum: Send commands relating to the QSFP ports via the MUM for PHY
70278c2ecf20Sopenharmony_ci * operations
70288c2ecf20Sopenharmony_ci */
70298c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_QSFP 0xc
70308c2ecf20Sopenharmony_ci/* enum: Request discrete and SODIMM DDR info (type, size, speed grade, voltage
70318c2ecf20Sopenharmony_ci * level) from MUM
70328c2ecf20Sopenharmony_ci */
70338c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OP_READ_DDR_INFO 0xd
70348c2ecf20Sopenharmony_ci
70358c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_NULL msgrequest */
70368c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_NULL_LEN 4
70378c2ecf20Sopenharmony_ci/* MUM cmd header */
70388c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_CMD_OFST 0
70398c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_CMD_LEN 4
70408c2ecf20Sopenharmony_ci
70418c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GET_VERSION msgrequest */
70428c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GET_VERSION_LEN 4
70438c2ecf20Sopenharmony_ci/* MUM cmd header */
70448c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
70458c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
70468c2ecf20Sopenharmony_ci
70478c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_READ msgrequest */
70488c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_READ_LEN 16
70498c2ecf20Sopenharmony_ci/* MUM cmd header */
70508c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
70518c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
70528c2ecf20Sopenharmony_ci/* ID of (device connected to MUM) to read from registers of */
70538c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_DEVICE_OFST 4
70548c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_DEVICE_LEN 4
70558c2ecf20Sopenharmony_ci/* enum: Hittite HMC1035 clock generator on Sorrento board */
70568c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_DEV_HITTITE 0x1
70578c2ecf20Sopenharmony_ci/* enum: Hittite HMC1035 clock generator for NIC-side on Sorrento board */
70588c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_DEV_HITTITE_NIC 0x2
70598c2ecf20Sopenharmony_ci/* 32-bit address to read from */
70608c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_ADDR_OFST 8
70618c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_ADDR_LEN 4
70628c2ecf20Sopenharmony_ci/* Number of words to read. */
70638c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_NUMWORDS_OFST 12
70648c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_NUMWORDS_LEN 4
70658c2ecf20Sopenharmony_ci
70668c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_WRITE msgrequest */
70678c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_WRITE_LENMIN 16
70688c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_WRITE_LENMAX 252
70698c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_WRITE_LENMAX_MCDI2 1020
70708c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_WRITE_LEN(num) (12+4*(num))
70718c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_WRITE_BUFFER_NUM(len) (((len)-12)/4)
70728c2ecf20Sopenharmony_ci/* MUM cmd header */
70738c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
70748c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
70758c2ecf20Sopenharmony_ci/* ID of (device connected to MUM) to write to registers of */
70768c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_DEVICE_OFST 4
70778c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_DEVICE_LEN 4
70788c2ecf20Sopenharmony_ci/* enum: Hittite HMC1035 clock generator on Sorrento board */
70798c2ecf20Sopenharmony_ci/*               MC_CMD_MUM_DEV_HITTITE 0x1 */
70808c2ecf20Sopenharmony_ci/* 32-bit address to write to */
70818c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_ADDR_OFST 8
70828c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_ADDR_LEN 4
70838c2ecf20Sopenharmony_ci/* Words to write */
70848c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_BUFFER_OFST 12
70858c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_BUFFER_LEN 4
70868c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_BUFFER_MINNUM 1
70878c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_BUFFER_MAXNUM 60
70888c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_WRITE_BUFFER_MAXNUM_MCDI2 252
70898c2ecf20Sopenharmony_ci
70908c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_RAW_CMD msgrequest */
70918c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_RAW_CMD_LENMIN 17
70928c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_RAW_CMD_LENMAX 252
70938c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_RAW_CMD_LENMAX_MCDI2 1020
70948c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_RAW_CMD_LEN(num) (16+1*(num))
70958c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_NUM(len) (((len)-16)/1)
70968c2ecf20Sopenharmony_ci/* MUM cmd header */
70978c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
70988c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
70998c2ecf20Sopenharmony_ci/* MUM I2C cmd code */
71008c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_CMD_CODE_OFST 4
71018c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_CMD_CODE_LEN 4
71028c2ecf20Sopenharmony_ci/* Number of bytes to write */
71038c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_NUM_WRITE_OFST 8
71048c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_NUM_WRITE_LEN 4
71058c2ecf20Sopenharmony_ci/* Number of bytes to read */
71068c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_NUM_READ_OFST 12
71078c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_NUM_READ_LEN 4
71088c2ecf20Sopenharmony_ci/* Bytes to write */
71098c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_OFST 16
71108c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_LEN 1
71118c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_MINNUM 1
71128c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_MAXNUM 236
71138c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_RAW_CMD_WRITE_DATA_MAXNUM_MCDI2 1004
71148c2ecf20Sopenharmony_ci
71158c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_LOG msgrequest */
71168c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_LOG_LEN 8
71178c2ecf20Sopenharmony_ci/* MUM cmd header */
71188c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71198c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71208c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_LOG_OP_OFST 4
71218c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_LOG_OP_LEN 4
71228c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_LOG_OP_UART 0x1 /* enum */
71238c2ecf20Sopenharmony_ci
71248c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_LOG_OP_UART msgrequest */
71258c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_LOG_OP_UART_LEN 12
71268c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71278c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71288c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_LOG_OP_OFST 4 */
71298c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_LOG_OP_LEN 4 */
71308c2ecf20Sopenharmony_ci/* Enable/disable debug output to UART */
71318c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_LOG_OP_UART_ENABLE_OFST 8
71328c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_LOG_OP_UART_ENABLE_LEN 4
71338c2ecf20Sopenharmony_ci
71348c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO msgrequest */
71358c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_LEN 8
71368c2ecf20Sopenharmony_ci/* MUM cmd header */
71378c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71388c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71398c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_HDR_OFST 4
71408c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_HDR_LEN 4
71418c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OPCODE_OFST 4
71428c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OPCODE_LBN 0
71438c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OPCODE_WIDTH 8
71448c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_IN_READ 0x0 /* enum */
71458c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OUT_WRITE 0x1 /* enum */
71468c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OUT_READ 0x2 /* enum */
71478c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE 0x3 /* enum */
71488c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ 0x4 /* enum */
71498c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OP 0x5 /* enum */
71508c2ecf20Sopenharmony_ci
71518c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_IN_READ msgrequest */
71528c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_IN_READ_LEN 8
71538c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71548c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71558c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_IN_READ_HDR_OFST 4
71568c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_IN_READ_HDR_LEN 4
71578c2ecf20Sopenharmony_ci
71588c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OUT_WRITE msgrequest */
71598c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OUT_WRITE_LEN 16
71608c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71618c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71628c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_WRITE_HDR_OFST 4
71638c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_WRITE_HDR_LEN 4
71648c2ecf20Sopenharmony_ci/* The first 32-bit word to be written to the GPIO OUT register. */
71658c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK1_OFST 8
71668c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK1_LEN 4
71678c2ecf20Sopenharmony_ci/* The second 32-bit word to be written to the GPIO OUT register. */
71688c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK2_OFST 12
71698c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_WRITE_GPIOMASK2_LEN 4
71708c2ecf20Sopenharmony_ci
71718c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OUT_READ msgrequest */
71728c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OUT_READ_LEN 8
71738c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71748c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71758c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_READ_HDR_OFST 4
71768c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_READ_HDR_LEN 4
71778c2ecf20Sopenharmony_ci
71788c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE msgrequest */
71798c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_LEN 16
71808c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71818c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71828c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_HDR_OFST 4
71838c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_HDR_LEN 4
71848c2ecf20Sopenharmony_ci/* The first 32-bit word to be written to the GPIO OUT ENABLE register. */
71858c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK1_OFST 8
71868c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK1_LEN 4
71878c2ecf20Sopenharmony_ci/* The second 32-bit word to be written to the GPIO OUT ENABLE register. */
71888c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK2_OFST 12
71898c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_WRITE_GPIOMASK2_LEN 4
71908c2ecf20Sopenharmony_ci
71918c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ msgrequest */
71928c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ_LEN 8
71938c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
71948c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
71958c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ_HDR_OFST 4
71968c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OUT_ENABLE_READ_HDR_LEN 4
71978c2ecf20Sopenharmony_ci
71988c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OP msgrequest */
71998c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OP_LEN 8
72008c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72018c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72028c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_HDR_OFST 4
72038c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_HDR_LEN 4
72048c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_BITWISE_OP_OFST 4
72058c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_BITWISE_OP_LBN 8
72068c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_BITWISE_OP_WIDTH 8
72078c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OP_OUT_READ 0x0 /* enum */
72088c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE 0x1 /* enum */
72098c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG 0x2 /* enum */
72108c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE 0x3 /* enum */
72118c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_GPIO_NUMBER_OFST 4
72128c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_GPIO_NUMBER_LBN 16
72138c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_GPIO_NUMBER_WIDTH 8
72148c2ecf20Sopenharmony_ci
72158c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OP_OUT_READ msgrequest */
72168c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OP_OUT_READ_LEN 8
72178c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72188c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72198c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_READ_HDR_OFST 4
72208c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_READ_HDR_LEN 4
72218c2ecf20Sopenharmony_ci
72228c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE msgrequest */
72238c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_LEN 8
72248c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72258c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72268c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_HDR_OFST 4
72278c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_HDR_LEN 4
72288c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_WRITEBIT_OFST 4
72298c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_WRITEBIT_LBN 24
72308c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_WRITE_WRITEBIT_WIDTH 8
72318c2ecf20Sopenharmony_ci
72328c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG msgrequest */
72338c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_LEN 8
72348c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72358c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72368c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_HDR_OFST 4
72378c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_HDR_LEN 4
72388c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_CFG_OFST 4
72398c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_CFG_LBN 24
72408c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_CONFIG_CFG_WIDTH 8
72418c2ecf20Sopenharmony_ci
72428c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE msgrequest */
72438c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_LEN 8
72448c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72458c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72468c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_HDR_OFST 4
72478c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_HDR_LEN 4
72488c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_ENABLEBIT_OFST 4
72498c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_ENABLEBIT_LBN 24
72508c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_GPIO_OP_OUT_ENABLE_ENABLEBIT_WIDTH 8
72518c2ecf20Sopenharmony_ci
72528c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_READ_SENSORS msgrequest */
72538c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_READ_SENSORS_LEN 8
72548c2ecf20Sopenharmony_ci/* MUM cmd header */
72558c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72568c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72578c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_SENSORS_PARAMS_OFST 4
72588c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_READ_SENSORS_PARAMS_LEN 4
72598c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_READ_SENSORS_SENSOR_ID_OFST 4
72608c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_READ_SENSORS_SENSOR_ID_LBN 0
72618c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_READ_SENSORS_SENSOR_ID_WIDTH 8
72628c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_READ_SENSORS_NUM_SENSORS_OFST 4
72638c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_READ_SENSORS_NUM_SENSORS_LBN 8
72648c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_READ_SENSORS_NUM_SENSORS_WIDTH 8
72658c2ecf20Sopenharmony_ci
72668c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_PROGRAM_CLOCKS msgrequest */
72678c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_PROGRAM_CLOCKS_LEN 12
72688c2ecf20Sopenharmony_ci/* MUM cmd header */
72698c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72708c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72718c2ecf20Sopenharmony_ci/* Bit-mask of clocks to be programmed */
72728c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_PROGRAM_CLOCKS_MASK_OFST 4
72738c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_PROGRAM_CLOCKS_MASK_LEN 4
72748c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_CLOCK_ID_FPGA 0x0 /* enum */
72758c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_CLOCK_ID_DDR 0x1 /* enum */
72768c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_CLOCK_ID_NIC 0x2 /* enum */
72778c2ecf20Sopenharmony_ci/* Control flags for clock programming */
72788c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_PROGRAM_CLOCKS_FLAGS_OFST 8
72798c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_PROGRAM_CLOCKS_FLAGS_LEN 4
72808c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_OFST 8
72818c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_LBN 0
72828c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_WIDTH 1
72838c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_OFST 8
72848c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_LBN 1
72858c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_WIDTH 1
72868c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_OFST 8
72878c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_LBN 2
72888c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_WIDTH 1
72898c2ecf20Sopenharmony_ci
72908c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_FPGA_LOAD msgrequest */
72918c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_FPGA_LOAD_LEN 8
72928c2ecf20Sopenharmony_ci/* MUM cmd header */
72938c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
72948c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
72958c2ecf20Sopenharmony_ci/* Enable/Disable FPGA config from flash */
72968c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_FPGA_LOAD_ENABLE_OFST 4
72978c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_FPGA_LOAD_ENABLE_LEN 4
72988c2ecf20Sopenharmony_ci
72998c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_READ_ATB_SENSOR msgrequest */
73008c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_READ_ATB_SENSOR_LEN 4
73018c2ecf20Sopenharmony_ci/* MUM cmd header */
73028c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73038c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73048c2ecf20Sopenharmony_ci
73058c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP msgrequest */
73068c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_LEN 12
73078c2ecf20Sopenharmony_ci/* MUM cmd header */
73088c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73098c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73108c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_HDR_OFST 4
73118c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_HDR_LEN 4
73128c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_QSFP_OPCODE_OFST 4
73138c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_QSFP_OPCODE_LBN 0
73148c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_IN_QSFP_OPCODE_WIDTH 4
73158c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_QSFP_INIT 0x0 /* enum */
73168c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_QSFP_RECONFIGURE 0x1 /* enum */
73178c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP 0x2 /* enum */
73188c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO 0x3 /* enum */
73198c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_QSFP_FILL_STATS 0x4 /* enum */
73208c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_IN_QSFP_POLL_BIST 0x5 /* enum */
73218c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_IDX_OFST 8
73228c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_IDX_LEN 4
73238c2ecf20Sopenharmony_ci
73248c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP_INIT msgrequest */
73258c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_INIT_LEN 16
73268c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73278c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73288c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_INIT_HDR_OFST 4
73298c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_INIT_HDR_LEN 4
73308c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_INIT_IDX_OFST 8
73318c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_INIT_IDX_LEN 4
73328c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_INIT_CAGE_OFST 12
73338c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_INIT_CAGE_LEN 4
73348c2ecf20Sopenharmony_ci
73358c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP_RECONFIGURE msgrequest */
73368c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_RECONFIGURE_LEN 24
73378c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73388c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73398c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_HDR_OFST 4
73408c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_HDR_LEN 4
73418c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_IDX_OFST 8
73428c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_IDX_LEN 4
73438c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_TX_DISABLE_OFST 12
73448c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_TX_DISABLE_LEN 4
73458c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LANES_OFST 16
73468c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LANES_LEN 4
73478c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LINK_SPEED_OFST 20
73488c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_RECONFIGURE_PORT_LINK_SPEED_LEN 4
73498c2ecf20Sopenharmony_ci
73508c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP msgrequest */
73518c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_LEN 12
73528c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73538c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73548c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_HDR_OFST 4
73558c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_HDR_LEN 4
73568c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_IDX_OFST 8
73578c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_SUPPORTED_CAP_IDX_LEN 4
73588c2ecf20Sopenharmony_ci
73598c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO msgrequest */
73608c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_LEN 16
73618c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73628c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73638c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_HDR_OFST 4
73648c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_HDR_LEN 4
73658c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_IDX_OFST 8
73668c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_IDX_LEN 4
73678c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_PAGE_OFST 12
73688c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_GET_MEDIA_INFO_PAGE_LEN 4
73698c2ecf20Sopenharmony_ci
73708c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP_FILL_STATS msgrequest */
73718c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_FILL_STATS_LEN 12
73728c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73738c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73748c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_FILL_STATS_HDR_OFST 4
73758c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_FILL_STATS_HDR_LEN 4
73768c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_FILL_STATS_IDX_OFST 8
73778c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_FILL_STATS_IDX_LEN 4
73788c2ecf20Sopenharmony_ci
73798c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_QSFP_POLL_BIST msgrequest */
73808c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_QSFP_POLL_BIST_LEN 12
73818c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73828c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73838c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_POLL_BIST_HDR_OFST 4
73848c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_POLL_BIST_HDR_LEN 4
73858c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_POLL_BIST_IDX_OFST 8
73868c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_IN_QSFP_POLL_BIST_IDX_LEN 4
73878c2ecf20Sopenharmony_ci
73888c2ecf20Sopenharmony_ci/* MC_CMD_MUM_IN_READ_DDR_INFO msgrequest */
73898c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_IN_READ_DDR_INFO_LEN 4
73908c2ecf20Sopenharmony_ci/* MUM cmd header */
73918c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_OFST 0 */
73928c2ecf20Sopenharmony_ci/*            MC_CMD_MUM_IN_CMD_LEN 4 */
73938c2ecf20Sopenharmony_ci
73948c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT msgresponse */
73958c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_LEN 0
73968c2ecf20Sopenharmony_ci
73978c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_NULL msgresponse */
73988c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_NULL_LEN 0
73998c2ecf20Sopenharmony_ci
74008c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GET_VERSION msgresponse */
74018c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GET_VERSION_LEN 12
74028c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GET_VERSION_FIRMWARE_OFST 0
74038c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GET_VERSION_FIRMWARE_LEN 4
74048c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GET_VERSION_VERSION_OFST 4
74058c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GET_VERSION_VERSION_LEN 8
74068c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GET_VERSION_VERSION_LO_OFST 4
74078c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GET_VERSION_VERSION_HI_OFST 8
74088c2ecf20Sopenharmony_ci
74098c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_RAW_CMD msgresponse */
74108c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_RAW_CMD_LENMIN 1
74118c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_RAW_CMD_LENMAX 252
74128c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_RAW_CMD_LENMAX_MCDI2 1020
74138c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_RAW_CMD_LEN(num) (0+1*(num))
74148c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_RAW_CMD_DATA_NUM(len) (((len)-0)/1)
74158c2ecf20Sopenharmony_ci/* returned data */
74168c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_RAW_CMD_DATA_OFST 0
74178c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_RAW_CMD_DATA_LEN 1
74188c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_RAW_CMD_DATA_MINNUM 1
74198c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_RAW_CMD_DATA_MAXNUM 252
74208c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_RAW_CMD_DATA_MAXNUM_MCDI2 1020
74218c2ecf20Sopenharmony_ci
74228c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_READ msgresponse */
74238c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_LENMIN 4
74248c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_LENMAX 252
74258c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_LENMAX_MCDI2 1020
74268c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_LEN(num) (0+4*(num))
74278c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_BUFFER_NUM(len) (((len)-0)/4)
74288c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_BUFFER_OFST 0
74298c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_BUFFER_LEN 4
74308c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_BUFFER_MINNUM 1
74318c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_BUFFER_MAXNUM 63
74328c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_BUFFER_MAXNUM_MCDI2 255
74338c2ecf20Sopenharmony_ci
74348c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_WRITE msgresponse */
74358c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_WRITE_LEN 0
74368c2ecf20Sopenharmony_ci
74378c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_LOG msgresponse */
74388c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_LOG_LEN 0
74398c2ecf20Sopenharmony_ci
74408c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_LOG_OP_UART msgresponse */
74418c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_LOG_OP_UART_LEN 0
74428c2ecf20Sopenharmony_ci
74438c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_IN_READ msgresponse */
74448c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_IN_READ_LEN 8
74458c2ecf20Sopenharmony_ci/* The first 32-bit word read from the GPIO IN register. */
74468c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK1_OFST 0
74478c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK1_LEN 4
74488c2ecf20Sopenharmony_ci/* The second 32-bit word read from the GPIO IN register. */
74498c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK2_OFST 4
74508c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_IN_READ_GPIOMASK2_LEN 4
74518c2ecf20Sopenharmony_ci
74528c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OUT_WRITE msgresponse */
74538c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OUT_WRITE_LEN 0
74548c2ecf20Sopenharmony_ci
74558c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OUT_READ msgresponse */
74568c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OUT_READ_LEN 8
74578c2ecf20Sopenharmony_ci/* The first 32-bit word read from the GPIO OUT register. */
74588c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK1_OFST 0
74598c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK1_LEN 4
74608c2ecf20Sopenharmony_ci/* The second 32-bit word read from the GPIO OUT register. */
74618c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK2_OFST 4
74628c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_READ_GPIOMASK2_LEN 4
74638c2ecf20Sopenharmony_ci
74648c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_WRITE msgresponse */
74658c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_WRITE_LEN 0
74668c2ecf20Sopenharmony_ci
74678c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ msgresponse */
74688c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_LEN 8
74698c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK1_OFST 0
74708c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK1_LEN 4
74718c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK2_OFST 4
74728c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OUT_ENABLE_READ_GPIOMASK2_LEN 4
74738c2ecf20Sopenharmony_ci
74748c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OP_OUT_READ msgresponse */
74758c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OP_OUT_READ_LEN 4
74768c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OP_OUT_READ_BIT_READ_OFST 0
74778c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_GPIO_OP_OUT_READ_BIT_READ_LEN 4
74788c2ecf20Sopenharmony_ci
74798c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OP_OUT_WRITE msgresponse */
74808c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OP_OUT_WRITE_LEN 0
74818c2ecf20Sopenharmony_ci
74828c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OP_OUT_CONFIG msgresponse */
74838c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OP_OUT_CONFIG_LEN 0
74848c2ecf20Sopenharmony_ci
74858c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_GPIO_OP_OUT_ENABLE msgresponse */
74868c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_GPIO_OP_OUT_ENABLE_LEN 0
74878c2ecf20Sopenharmony_ci
74888c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_READ_SENSORS msgresponse */
74898c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_SENSORS_LENMIN 4
74908c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_SENSORS_LENMAX 252
74918c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_SENSORS_LENMAX_MCDI2 1020
74928c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_SENSORS_LEN(num) (0+4*(num))
74938c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_SENSORS_DATA_NUM(len) (((len)-0)/4)
74948c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_SENSORS_DATA_OFST 0
74958c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_SENSORS_DATA_LEN 4
74968c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_SENSORS_DATA_MINNUM 1
74978c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_SENSORS_DATA_MAXNUM 63
74988c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_SENSORS_DATA_MAXNUM_MCDI2 255
74998c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_READING_OFST 0
75008c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_READING_LBN 0
75018c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_READING_WIDTH 16
75028c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_STATE_OFST 0
75038c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_STATE_LBN 16
75048c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_STATE_WIDTH 8
75058c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_TYPE_OFST 0
75068c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_TYPE_LBN 24
75078c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_SENSORS_TYPE_WIDTH 8
75088c2ecf20Sopenharmony_ci
75098c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_PROGRAM_CLOCKS msgresponse */
75108c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_PROGRAM_CLOCKS_LEN 4
75118c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_PROGRAM_CLOCKS_OK_MASK_OFST 0
75128c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_PROGRAM_CLOCKS_OK_MASK_LEN 4
75138c2ecf20Sopenharmony_ci
75148c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_FPGA_LOAD msgresponse */
75158c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_FPGA_LOAD_LEN 0
75168c2ecf20Sopenharmony_ci
75178c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_READ_ATB_SENSOR msgresponse */
75188c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_ATB_SENSOR_LEN 4
75198c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_ATB_SENSOR_RESULT_OFST 0
75208c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_ATB_SENSOR_RESULT_LEN 4
75218c2ecf20Sopenharmony_ci
75228c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_QSFP_INIT msgresponse */
75238c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_INIT_LEN 0
75248c2ecf20Sopenharmony_ci
75258c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_QSFP_RECONFIGURE msgresponse */
75268c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_RECONFIGURE_LEN 8
75278c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LP_CAP_OFST 0
75288c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LP_CAP_LEN 4
75298c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_FLAGS_OFST 4
75308c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_FLAGS_LEN 4
75318c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_READY_OFST 4
75328c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_READY_LBN 0
75338c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_READY_WIDTH 1
75348c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LINK_UP_OFST 4
75358c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LINK_UP_LBN 1
75368c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_QSFP_RECONFIGURE_PORT_PHY_LINK_UP_WIDTH 1
75378c2ecf20Sopenharmony_ci
75388c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP msgresponse */
75398c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP_LEN 4
75408c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP_PORT_PHY_LP_CAP_OFST 0
75418c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_SUPPORTED_CAP_PORT_PHY_LP_CAP_LEN 4
75428c2ecf20Sopenharmony_ci
75438c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO msgresponse */
75448c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LENMIN 5
75458c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LENMAX 252
75468c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LENMAX_MCDI2 1020
75478c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_LEN(num) (4+1*(num))
75488c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_NUM(len) (((len)-4)/1)
75498c2ecf20Sopenharmony_ci/* in bytes */
75508c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATALEN_OFST 0
75518c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATALEN_LEN 4
75528c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_OFST 4
75538c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_LEN 1
75548c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_MINNUM 1
75558c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_MAXNUM 248
75568c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_GET_MEDIA_INFO_DATA_MAXNUM_MCDI2 1016
75578c2ecf20Sopenharmony_ci
75588c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_QSFP_FILL_STATS msgresponse */
75598c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_FILL_STATS_LEN 8
75608c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PMA_PMD_LINK_UP_OFST 0
75618c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PMA_PMD_LINK_UP_LEN 4
75628c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PCS_LINK_UP_OFST 4
75638c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_FILL_STATS_PORT_PHY_STATS_PCS_LINK_UP_LEN 4
75648c2ecf20Sopenharmony_ci
75658c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_QSFP_POLL_BIST msgresponse */
75668c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_QSFP_POLL_BIST_LEN 4
75678c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_POLL_BIST_TEST_OFST 0
75688c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_QSFP_POLL_BIST_TEST_LEN 4
75698c2ecf20Sopenharmony_ci
75708c2ecf20Sopenharmony_ci/* MC_CMD_MUM_OUT_READ_DDR_INFO msgresponse */
75718c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_DDR_INFO_LENMIN 24
75728c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_DDR_INFO_LENMAX 248
75738c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_DDR_INFO_LENMAX_MCDI2 1016
75748c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_DDR_INFO_LEN(num) (8+8*(num))
75758c2ecf20Sopenharmony_ci#define    MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_NUM(len) (((len)-8)/8)
75768c2ecf20Sopenharmony_ci/* Discrete (soldered) DDR resistor strap info */
75778c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_DISCRETE_DDR_INFO_OFST 0
75788c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_DISCRETE_DDR_INFO_LEN 4
75798c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_OFST 0
75808c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_LBN 0
75818c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_WIDTH 16
75828c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_OFST 0
75838c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_LBN 16
75848c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_WIDTH 16
75858c2ecf20Sopenharmony_ci/* Number of SODIMM info records */
75868c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_RECORDS_OFST 4
75878c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_RECORDS_LEN 4
75888c2ecf20Sopenharmony_ci/* Array of SODIMM info records */
75898c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_OFST 8
75908c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_LEN 8
75918c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_LO_OFST 8
75928c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_HI_OFST 12
75938c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MINNUM 2
75948c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MAXNUM 30
75958c2ecf20Sopenharmony_ci#define       MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MAXNUM_MCDI2 126
75968c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_OFST 8
75978c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_LBN 0
75988c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_WIDTH 8
75998c2ecf20Sopenharmony_ci/* enum: SODIMM bank 1 (Top SODIMM for Sorrento) */
76008c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_BANK1 0x0
76018c2ecf20Sopenharmony_ci/* enum: SODIMM bank 2 (Bottom SODDIMM for Sorrento) */
76028c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_BANK2 0x1
76038c2ecf20Sopenharmony_ci/* enum: Total number of SODIMM banks */
76048c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_BANKS 0x2
76058c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_OFST 8
76068c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_LBN 8
76078c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_WIDTH 8
76088c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_OFST 8
76098c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_LBN 16
76108c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_WIDTH 4
76118c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_OFST 8
76128c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_LBN 20
76138c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_WIDTH 4
76148c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_NOT_POWERED 0x0 /* enum */
76158c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_1V25 0x1 /* enum */
76168c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_1V35 0x2 /* enum */
76178c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_1V5 0x3 /* enum */
76188c2ecf20Sopenharmony_ci/* enum: Values 5-15 are reserved for future usage */
76198c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_1V8 0x4
76208c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_OFST 8
76218c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_LBN 24
76228c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_WIDTH 8
76238c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_OFST 8
76248c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_LBN 32
76258c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_WIDTH 16
76268c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_OFST 8
76278c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_LBN 48
76288c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_WIDTH 4
76298c2ecf20Sopenharmony_ci/* enum: No module present */
76308c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_ABSENT 0x0
76318c2ecf20Sopenharmony_ci/* enum: Module present supported and powered on */
76328c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_POWERED 0x1
76338c2ecf20Sopenharmony_ci/* enum: Module present but bad type */
76348c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_TYPE 0x2
76358c2ecf20Sopenharmony_ci/* enum: Module present but incompatible voltage */
76368c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_VOLTAGE 0x3
76378c2ecf20Sopenharmony_ci/* enum: Module present but unknown SPD */
76388c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_SPD 0x4
76398c2ecf20Sopenharmony_ci/* enum: Module present but slot cannot support it */
76408c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_SLOT 0x5
76418c2ecf20Sopenharmony_ci/* enum: Modules may or may not be present, but cannot establish contact by I2C
76428c2ecf20Sopenharmony_ci */
76438c2ecf20Sopenharmony_ci#define          MC_CMD_MUM_OUT_READ_DDR_INFO_NOT_REACHABLE 0x6
76448c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_OFST 8
76458c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_LBN 52
76468c2ecf20Sopenharmony_ci#define        MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_WIDTH 12
76478c2ecf20Sopenharmony_ci
76488c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_LIMITS structuredef: Set of sensor limits. This
76498c2ecf20Sopenharmony_ci * should match the equivalent structure in the sensor_query SPHINX service.
76508c2ecf20Sopenharmony_ci */
76518c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIMITS_LEN 24
76528c2ecf20Sopenharmony_ci/* A value below this will trigger a warning event. */
76538c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_WARNING_OFST 0
76548c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_WARNING_LEN 4
76558c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_WARNING_LBN 0
76568c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_WARNING_WIDTH 32
76578c2ecf20Sopenharmony_ci/* A value below this will trigger a critical event. */
76588c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_CRITICAL_OFST 4
76598c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_CRITICAL_LEN 4
76608c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_CRITICAL_LBN 32
76618c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_CRITICAL_WIDTH 32
76628c2ecf20Sopenharmony_ci/* A value below this will shut down the card. */
76638c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_FATAL_OFST 8
76648c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_FATAL_LEN 4
76658c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_FATAL_LBN 64
76668c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_LO_FATAL_WIDTH 32
76678c2ecf20Sopenharmony_ci/* A value above this will trigger a warning event. */
76688c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_WARNING_OFST 12
76698c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_WARNING_LEN 4
76708c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_WARNING_LBN 96
76718c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_WARNING_WIDTH 32
76728c2ecf20Sopenharmony_ci/* A value above this will trigger a critical event. */
76738c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_CRITICAL_OFST 16
76748c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_CRITICAL_LEN 4
76758c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_CRITICAL_LBN 128
76768c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_CRITICAL_WIDTH 32
76778c2ecf20Sopenharmony_ci/* A value above this will shut down the card. */
76788c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_FATAL_OFST 20
76798c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_FATAL_LEN 4
76808c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_FATAL_LBN 160
76818c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIMITS_HI_FATAL_WIDTH 32
76828c2ecf20Sopenharmony_ci
76838c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_DESCRIPTION structuredef: Description of a sensor.
76848c2ecf20Sopenharmony_ci * This should match the equivalent structure in the sensor_query SPHINX
76858c2ecf20Sopenharmony_ci * service.
76868c2ecf20Sopenharmony_ci */
76878c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_LEN 64
76888c2ecf20Sopenharmony_ci/* The handle used to identify the sensor in calls to
76898c2ecf20Sopenharmony_ci * MC_CMD_DYNAMIC_SENSORS_GET_VALUES
76908c2ecf20Sopenharmony_ci */
76918c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_HANDLE_OFST 0
76928c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_HANDLE_LEN 4
76938c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_HANDLE_LBN 0
76948c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_HANDLE_WIDTH 32
76958c2ecf20Sopenharmony_ci/* A human-readable name for the sensor (zero terminated string, max 32 bytes)
76968c2ecf20Sopenharmony_ci */
76978c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_NAME_OFST 4
76988c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_NAME_LEN 32
76998c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_NAME_LBN 32
77008c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_NAME_WIDTH 256
77018c2ecf20Sopenharmony_ci/* The type of the sensor device, and by implication the unit of that the
77028c2ecf20Sopenharmony_ci * values will be reported in
77038c2ecf20Sopenharmony_ci */
77048c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_TYPE_OFST 36
77058c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_TYPE_LEN 4
77068c2ecf20Sopenharmony_ci/* enum: A voltage sensor. Unit is mV */
77078c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_VOLTAGE 0x0
77088c2ecf20Sopenharmony_ci/* enum: A current sensor. Unit is mA */
77098c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_CURRENT 0x1
77108c2ecf20Sopenharmony_ci/* enum: A power sensor. Unit is mW */
77118c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_POWER 0x2
77128c2ecf20Sopenharmony_ci/* enum: A temperature sensor. Unit is Celsius */
77138c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_TEMPERATURE 0x3
77148c2ecf20Sopenharmony_ci/* enum: A cooling fan sensor. Unit is RPM */
77158c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_FAN 0x4
77168c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_TYPE_LBN 288
77178c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_TYPE_WIDTH 32
77188c2ecf20Sopenharmony_ci/* A single MC_CMD_DYNAMIC_SENSORS_LIMITS structure */
77198c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_LIMITS_OFST 40
77208c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_LIMITS_LEN 24
77218c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_LIMITS_LBN 320
77228c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_DESCRIPTION_LIMITS_WIDTH 192
77238c2ecf20Sopenharmony_ci
77248c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_READING structuredef: State and value of a sensor.
77258c2ecf20Sopenharmony_ci * This should match the equivalent structure in the sensor_query SPHINX
77268c2ecf20Sopenharmony_ci * service.
77278c2ecf20Sopenharmony_ci */
77288c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_READING_LEN 12
77298c2ecf20Sopenharmony_ci/* The handle used to identify the sensor */
77308c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_HANDLE_OFST 0
77318c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_HANDLE_LEN 4
77328c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_HANDLE_LBN 0
77338c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_HANDLE_WIDTH 32
77348c2ecf20Sopenharmony_ci/* The current value of the sensor */
77358c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_VALUE_OFST 4
77368c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_VALUE_LEN 4
77378c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_VALUE_LBN 32
77388c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_VALUE_WIDTH 32
77398c2ecf20Sopenharmony_ci/* The sensor's condition, e.g. good, broken or removed */
77408c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_STATE_OFST 8
77418c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_STATE_LEN 4
77428c2ecf20Sopenharmony_ci/* enum: Sensor working normally within limits */
77438c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_OK 0x0
77448c2ecf20Sopenharmony_ci/* enum: Warning threshold breached */
77458c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_WARNING 0x1
77468c2ecf20Sopenharmony_ci/* enum: Critical threshold breached */
77478c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_CRITICAL 0x2
77488c2ecf20Sopenharmony_ci/* enum: Fatal threshold breached */
77498c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_FATAL 0x3
77508c2ecf20Sopenharmony_ci/* enum: Sensor not working */
77518c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_BROKEN 0x4
77528c2ecf20Sopenharmony_ci/* enum: Sensor working but no reading available */
77538c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_NO_READING 0x5
77548c2ecf20Sopenharmony_ci/* enum: Sensor initialization failed */
77558c2ecf20Sopenharmony_ci#define          MC_CMD_DYNAMIC_SENSORS_READING_INIT_FAILED 0x6
77568c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_STATE_LBN 64
77578c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_READING_STATE_WIDTH 32
77588c2ecf20Sopenharmony_ci
77598c2ecf20Sopenharmony_ci
77608c2ecf20Sopenharmony_ci/***********************************/
77618c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_LIST
77628c2ecf20Sopenharmony_ci * Return a complete list of handles for sensors currently managed by the MC,
77638c2ecf20Sopenharmony_ci * and a generation count for this version of the sensor table. On systems
77648c2ecf20Sopenharmony_ci * advertising the DYNAMIC_SENSORS capability bit, this replaces the
77658c2ecf20Sopenharmony_ci * MC_CMD_READ_SENSORS command. On multi-MC systems this may include sensors
77668c2ecf20Sopenharmony_ci * added by the NMC.
77678c2ecf20Sopenharmony_ci *
77688c2ecf20Sopenharmony_ci * Sensor handles are persistent for the lifetime of the sensor and are used to
77698c2ecf20Sopenharmony_ci * identify sensors in MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS and
77708c2ecf20Sopenharmony_ci * MC_CMD_DYNAMIC_SENSORS_GET_VALUES.
77718c2ecf20Sopenharmony_ci *
77728c2ecf20Sopenharmony_ci * The generation count is maintained by the MC, is persistent across reboots
77738c2ecf20Sopenharmony_ci * and will be incremented each time the sensor table is modified. When the
77748c2ecf20Sopenharmony_ci * table is modified, a CODE_DYNAMIC_SENSORS_CHANGE event will be generated
77758c2ecf20Sopenharmony_ci * containing the new generation count. The driver should compare this against
77768c2ecf20Sopenharmony_ci * the current generation count, and if it is different, call
77778c2ecf20Sopenharmony_ci * MC_CMD_DYNAMIC_SENSORS_LIST again to update it's copy of the sensor table.
77788c2ecf20Sopenharmony_ci *
77798c2ecf20Sopenharmony_ci * The sensor count is provided to allow a future path to supporting more than
77808c2ecf20Sopenharmony_ci * MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_MAXNUM_MCDI2 sensors, i.e.
77818c2ecf20Sopenharmony_ci * the maximum number that will fit in a single response. As this is a fairly
77828c2ecf20Sopenharmony_ci * large number (253) it is not anticipated that this will be needed in the
77838c2ecf20Sopenharmony_ci * near future, so can currently be ignored.
77848c2ecf20Sopenharmony_ci *
77858c2ecf20Sopenharmony_ci * On Riverhead this command is implemented as a a wrapper for `list` in the
77868c2ecf20Sopenharmony_ci * sensor_query SPHINX service.
77878c2ecf20Sopenharmony_ci */
77888c2ecf20Sopenharmony_ci#define MC_CMD_DYNAMIC_SENSORS_LIST 0x66
77898c2ecf20Sopenharmony_ci#undef MC_CMD_0x66_PRIVILEGE_CTG
77908c2ecf20Sopenharmony_ci
77918c2ecf20Sopenharmony_ci#define MC_CMD_0x66_PRIVILEGE_CTG SRIOV_CTG_GENERAL
77928c2ecf20Sopenharmony_ci
77938c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_LIST_IN msgrequest */
77948c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIST_IN_LEN 0
77958c2ecf20Sopenharmony_ci
77968c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_LIST_OUT msgresponse */
77978c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIST_OUT_LENMIN 8
77988c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIST_OUT_LENMAX 252
77998c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIST_OUT_LENMAX_MCDI2 1020
78008c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIST_OUT_LEN(num) (8+4*(num))
78018c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_LIST_OUT_HANDLES_NUM(len) (((len)-8)/4)
78028c2ecf20Sopenharmony_ci/* Generation count, which will be updated each time a sensor is added to or
78038c2ecf20Sopenharmony_ci * removed from the MC sensor table.
78048c2ecf20Sopenharmony_ci */
78058c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_GENERATION_OFST 0
78068c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_GENERATION_LEN 4
78078c2ecf20Sopenharmony_ci/* Number of sensors managed by the MC. Note that in principle, this can be
78088c2ecf20Sopenharmony_ci * larger than the size of the HANDLES array.
78098c2ecf20Sopenharmony_ci */
78108c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_COUNT_OFST 4
78118c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_COUNT_LEN 4
78128c2ecf20Sopenharmony_ci/* Array of sensor handles */
78138c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_HANDLES_OFST 8
78148c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_HANDLES_LEN 4
78158c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_HANDLES_MINNUM 0
78168c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_HANDLES_MAXNUM 61
78178c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_LIST_OUT_HANDLES_MAXNUM_MCDI2 253
78188c2ecf20Sopenharmony_ci
78198c2ecf20Sopenharmony_ci
78208c2ecf20Sopenharmony_ci/***********************************/
78218c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS
78228c2ecf20Sopenharmony_ci * Get descriptions for a set of sensors, specified as an array of sensor
78238c2ecf20Sopenharmony_ci * handles as returned by MC_CMD_DYNAMIC_SENSORS_LIST
78248c2ecf20Sopenharmony_ci *
78258c2ecf20Sopenharmony_ci * Any handles which do not correspond to a sensor currently managed by the MC
78268c2ecf20Sopenharmony_ci * will be dropped from from the response. This may happen when a sensor table
78278c2ecf20Sopenharmony_ci * update is in progress, and effectively means the set of usable sensors is
78288c2ecf20Sopenharmony_ci * the intersection between the sets of sensors known to the driver and the MC.
78298c2ecf20Sopenharmony_ci *
78308c2ecf20Sopenharmony_ci * On Riverhead this command is implemented as a a wrapper for
78318c2ecf20Sopenharmony_ci * `get_descriptions` in the sensor_query SPHINX service.
78328c2ecf20Sopenharmony_ci */
78338c2ecf20Sopenharmony_ci#define MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS 0x67
78348c2ecf20Sopenharmony_ci#undef MC_CMD_0x67_PRIVILEGE_CTG
78358c2ecf20Sopenharmony_ci
78368c2ecf20Sopenharmony_ci#define MC_CMD_0x67_PRIVILEGE_CTG SRIOV_CTG_GENERAL
78378c2ecf20Sopenharmony_ci
78388c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN msgrequest */
78398c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_LENMIN 0
78408c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_LENMAX 252
78418c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_LENMAX_MCDI2 1020
78428c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_LEN(num) (0+4*(num))
78438c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_HANDLES_NUM(len) (((len)-0)/4)
78448c2ecf20Sopenharmony_ci/* Array of sensor handles */
78458c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_HANDLES_OFST 0
78468c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_HANDLES_LEN 4
78478c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_HANDLES_MINNUM 0
78488c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_HANDLES_MAXNUM 63
78498c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_IN_HANDLES_MAXNUM_MCDI2 255
78508c2ecf20Sopenharmony_ci
78518c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT msgresponse */
78528c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_LENMIN 0
78538c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_LENMAX 192
78548c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_LENMAX_MCDI2 960
78558c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_LEN(num) (0+64*(num))
78568c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_SENSORS_NUM(len) (((len)-0)/64)
78578c2ecf20Sopenharmony_ci/* Array of MC_CMD_DYNAMIC_SENSORS_DESCRIPTION structures */
78588c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_SENSORS_OFST 0
78598c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_SENSORS_LEN 64
78608c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_SENSORS_MINNUM 0
78618c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_SENSORS_MAXNUM 3
78628c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_DESCRIPTIONS_OUT_SENSORS_MAXNUM_MCDI2 15
78638c2ecf20Sopenharmony_ci
78648c2ecf20Sopenharmony_ci
78658c2ecf20Sopenharmony_ci/***********************************/
78668c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_GET_READINGS
78678c2ecf20Sopenharmony_ci * Read the state and value for a set of sensors, specified as an array of
78688c2ecf20Sopenharmony_ci * sensor handles as returned by MC_CMD_DYNAMIC_SENSORS_LIST.
78698c2ecf20Sopenharmony_ci *
78708c2ecf20Sopenharmony_ci * In the case of a broken sensor, then the state of the response's
78718c2ecf20Sopenharmony_ci * MC_CMD_DYNAMIC_SENSORS_VALUE entry will be set to BROKEN, and any value
78728c2ecf20Sopenharmony_ci * provided should be treated as erroneous.
78738c2ecf20Sopenharmony_ci *
78748c2ecf20Sopenharmony_ci * Any handles which do not correspond to a sensor currently managed by the MC
78758c2ecf20Sopenharmony_ci * will be dropped from from the response. This may happen when a sensor table
78768c2ecf20Sopenharmony_ci * update is in progress, and effectively means the set of usable sensors is
78778c2ecf20Sopenharmony_ci * the intersection between the sets of sensors known to the driver and the MC.
78788c2ecf20Sopenharmony_ci *
78798c2ecf20Sopenharmony_ci * On Riverhead this command is implemented as a a wrapper for `get_readings`
78808c2ecf20Sopenharmony_ci * in the sensor_query SPHINX service.
78818c2ecf20Sopenharmony_ci */
78828c2ecf20Sopenharmony_ci#define MC_CMD_DYNAMIC_SENSORS_GET_READINGS 0x68
78838c2ecf20Sopenharmony_ci#undef MC_CMD_0x68_PRIVILEGE_CTG
78848c2ecf20Sopenharmony_ci
78858c2ecf20Sopenharmony_ci#define MC_CMD_0x68_PRIVILEGE_CTG SRIOV_CTG_GENERAL
78868c2ecf20Sopenharmony_ci
78878c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN msgrequest */
78888c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_LENMIN 0
78898c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_LENMAX 252
78908c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_LENMAX_MCDI2 1020
78918c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_LEN(num) (0+4*(num))
78928c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_NUM(len) (((len)-0)/4)
78938c2ecf20Sopenharmony_ci/* Array of sensor handles */
78948c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_OFST 0
78958c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_LEN 4
78968c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_MINNUM 0
78978c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_MAXNUM 63
78988c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_IN_HANDLES_MAXNUM_MCDI2 255
78998c2ecf20Sopenharmony_ci
79008c2ecf20Sopenharmony_ci/* MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT msgresponse */
79018c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_LENMIN 0
79028c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_LENMAX 252
79038c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_LENMAX_MCDI2 1020
79048c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_LEN(num) (0+12*(num))
79058c2ecf20Sopenharmony_ci#define    MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_VALUES_NUM(len) (((len)-0)/12)
79068c2ecf20Sopenharmony_ci/* Array of MC_CMD_DYNAMIC_SENSORS_READING structures */
79078c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_VALUES_OFST 0
79088c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_VALUES_LEN 12
79098c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_VALUES_MINNUM 0
79108c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_VALUES_MAXNUM 21
79118c2ecf20Sopenharmony_ci#define       MC_CMD_DYNAMIC_SENSORS_GET_READINGS_OUT_VALUES_MAXNUM_MCDI2 85
79128c2ecf20Sopenharmony_ci
79138c2ecf20Sopenharmony_ci
79148c2ecf20Sopenharmony_ci/***********************************/
79158c2ecf20Sopenharmony_ci/* MC_CMD_EVENT_CTRL
79168c2ecf20Sopenharmony_ci * Configure which categories of unsolicited events the driver expects to
79178c2ecf20Sopenharmony_ci * receive (Riverhead).
79188c2ecf20Sopenharmony_ci */
79198c2ecf20Sopenharmony_ci#define MC_CMD_EVENT_CTRL 0x69
79208c2ecf20Sopenharmony_ci#undef MC_CMD_0x69_PRIVILEGE_CTG
79218c2ecf20Sopenharmony_ci
79228c2ecf20Sopenharmony_ci#define MC_CMD_0x69_PRIVILEGE_CTG SRIOV_CTG_GENERAL
79238c2ecf20Sopenharmony_ci
79248c2ecf20Sopenharmony_ci/* MC_CMD_EVENT_CTRL_IN msgrequest */
79258c2ecf20Sopenharmony_ci#define    MC_CMD_EVENT_CTRL_IN_LENMIN 0
79268c2ecf20Sopenharmony_ci#define    MC_CMD_EVENT_CTRL_IN_LENMAX 252
79278c2ecf20Sopenharmony_ci#define    MC_CMD_EVENT_CTRL_IN_LENMAX_MCDI2 1020
79288c2ecf20Sopenharmony_ci#define    MC_CMD_EVENT_CTRL_IN_LEN(num) (0+4*(num))
79298c2ecf20Sopenharmony_ci#define    MC_CMD_EVENT_CTRL_IN_EVENT_TYPE_NUM(len) (((len)-0)/4)
79308c2ecf20Sopenharmony_ci/* Array of event categories for which the driver wishes to receive events. */
79318c2ecf20Sopenharmony_ci#define       MC_CMD_EVENT_CTRL_IN_EVENT_TYPE_OFST 0
79328c2ecf20Sopenharmony_ci#define       MC_CMD_EVENT_CTRL_IN_EVENT_TYPE_LEN 4
79338c2ecf20Sopenharmony_ci#define       MC_CMD_EVENT_CTRL_IN_EVENT_TYPE_MINNUM 0
79348c2ecf20Sopenharmony_ci#define       MC_CMD_EVENT_CTRL_IN_EVENT_TYPE_MAXNUM 63
79358c2ecf20Sopenharmony_ci#define       MC_CMD_EVENT_CTRL_IN_EVENT_TYPE_MAXNUM_MCDI2 255
79368c2ecf20Sopenharmony_ci/* enum: Driver wishes to receive LINKCHANGE events. */
79378c2ecf20Sopenharmony_ci#define          MC_CMD_EVENT_CTRL_IN_MCDI_EVENT_CODE_LINKCHANGE 0x0
79388c2ecf20Sopenharmony_ci/* enum: Driver wishes to receive SENSOR_CHANGE and SENSOR_STATE_CHANGE events.
79398c2ecf20Sopenharmony_ci */
79408c2ecf20Sopenharmony_ci#define          MC_CMD_EVENT_CTRL_IN_MCDI_EVENT_CODE_SENSOREVT 0x1
79418c2ecf20Sopenharmony_ci/* enum: Driver wishes to receive receive errors. */
79428c2ecf20Sopenharmony_ci#define          MC_CMD_EVENT_CTRL_IN_MCDI_EVENT_CODE_RX_ERR 0x2
79438c2ecf20Sopenharmony_ci/* enum: Driver wishes to receive transmit errors. */
79448c2ecf20Sopenharmony_ci#define          MC_CMD_EVENT_CTRL_IN_MCDI_EVENT_CODE_TX_ERR 0x3
79458c2ecf20Sopenharmony_ci/* enum: Driver wishes to receive firmware alerts. */
79468c2ecf20Sopenharmony_ci#define          MC_CMD_EVENT_CTRL_IN_MCDI_EVENT_CODE_FWALERT 0x4
79478c2ecf20Sopenharmony_ci/* enum: Driver wishes to receive reboot events. */
79488c2ecf20Sopenharmony_ci#define          MC_CMD_EVENT_CTRL_IN_MCDI_EVENT_CODE_MC_REBOOT 0x5
79498c2ecf20Sopenharmony_ci
79508c2ecf20Sopenharmony_ci/* MC_CMD_EVENT_CTRL_OUT msgrequest */
79518c2ecf20Sopenharmony_ci#define    MC_CMD_EVENT_CTRL_OUT_LEN 0
79528c2ecf20Sopenharmony_ci
79538c2ecf20Sopenharmony_ci/* EVB_PORT_ID structuredef */
79548c2ecf20Sopenharmony_ci#define    EVB_PORT_ID_LEN 4
79558c2ecf20Sopenharmony_ci#define       EVB_PORT_ID_PORT_ID_OFST 0
79568c2ecf20Sopenharmony_ci#define       EVB_PORT_ID_PORT_ID_LEN 4
79578c2ecf20Sopenharmony_ci/* enum: An invalid port handle. */
79588c2ecf20Sopenharmony_ci#define          EVB_PORT_ID_NULL 0x0
79598c2ecf20Sopenharmony_ci/* enum: The port assigned to this function.. */
79608c2ecf20Sopenharmony_ci#define          EVB_PORT_ID_ASSIGNED 0x1000000
79618c2ecf20Sopenharmony_ci/* enum: External network port 0 */
79628c2ecf20Sopenharmony_ci#define          EVB_PORT_ID_MAC0 0x2000000
79638c2ecf20Sopenharmony_ci/* enum: External network port 1 */
79648c2ecf20Sopenharmony_ci#define          EVB_PORT_ID_MAC1 0x2000001
79658c2ecf20Sopenharmony_ci/* enum: External network port 2 */
79668c2ecf20Sopenharmony_ci#define          EVB_PORT_ID_MAC2 0x2000002
79678c2ecf20Sopenharmony_ci/* enum: External network port 3 */
79688c2ecf20Sopenharmony_ci#define          EVB_PORT_ID_MAC3 0x2000003
79698c2ecf20Sopenharmony_ci#define       EVB_PORT_ID_PORT_ID_LBN 0
79708c2ecf20Sopenharmony_ci#define       EVB_PORT_ID_PORT_ID_WIDTH 32
79718c2ecf20Sopenharmony_ci
79728c2ecf20Sopenharmony_ci/* EVB_VLAN_TAG structuredef */
79738c2ecf20Sopenharmony_ci#define    EVB_VLAN_TAG_LEN 2
79748c2ecf20Sopenharmony_ci/* The VLAN tag value */
79758c2ecf20Sopenharmony_ci#define       EVB_VLAN_TAG_VLAN_ID_LBN 0
79768c2ecf20Sopenharmony_ci#define       EVB_VLAN_TAG_VLAN_ID_WIDTH 12
79778c2ecf20Sopenharmony_ci#define       EVB_VLAN_TAG_MODE_LBN 12
79788c2ecf20Sopenharmony_ci#define       EVB_VLAN_TAG_MODE_WIDTH 4
79798c2ecf20Sopenharmony_ci/* enum: Insert the VLAN. */
79808c2ecf20Sopenharmony_ci#define          EVB_VLAN_TAG_INSERT 0x0
79818c2ecf20Sopenharmony_ci/* enum: Replace the VLAN if already present. */
79828c2ecf20Sopenharmony_ci#define          EVB_VLAN_TAG_REPLACE 0x1
79838c2ecf20Sopenharmony_ci
79848c2ecf20Sopenharmony_ci/* BUFTBL_ENTRY structuredef */
79858c2ecf20Sopenharmony_ci#define    BUFTBL_ENTRY_LEN 12
79868c2ecf20Sopenharmony_ci/* the owner ID */
79878c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_OID_OFST 0
79888c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_OID_LEN 2
79898c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_OID_LBN 0
79908c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_OID_WIDTH 16
79918c2ecf20Sopenharmony_ci/* the page parameter as one of ESE_DZ_SMC_PAGE_SIZE_ */
79928c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_PGSZ_OFST 2
79938c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_PGSZ_LEN 2
79948c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_PGSZ_LBN 16
79958c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_PGSZ_WIDTH 16
79968c2ecf20Sopenharmony_ci/* the raw 64-bit address field from the SMC, not adjusted for page size */
79978c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_RAWADDR_OFST 4
79988c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_RAWADDR_LEN 8
79998c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_RAWADDR_LO_OFST 4
80008c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_RAWADDR_HI_OFST 8
80018c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_RAWADDR_LBN 32
80028c2ecf20Sopenharmony_ci#define       BUFTBL_ENTRY_RAWADDR_WIDTH 64
80038c2ecf20Sopenharmony_ci
80048c2ecf20Sopenharmony_ci/* NVRAM_PARTITION_TYPE structuredef */
80058c2ecf20Sopenharmony_ci#define    NVRAM_PARTITION_TYPE_LEN 2
80068c2ecf20Sopenharmony_ci#define       NVRAM_PARTITION_TYPE_ID_OFST 0
80078c2ecf20Sopenharmony_ci#define       NVRAM_PARTITION_TYPE_ID_LEN 2
80088c2ecf20Sopenharmony_ci/* enum: Primary MC firmware partition */
80098c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MC_FIRMWARE 0x100
80108c2ecf20Sopenharmony_ci/* enum: Secondary MC firmware partition */
80118c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MC_FIRMWARE_BACKUP 0x200
80128c2ecf20Sopenharmony_ci/* enum: Expansion ROM partition */
80138c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPANSION_ROM 0x300
80148c2ecf20Sopenharmony_ci/* enum: Static configuration TLV partition */
80158c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_STATIC_CONFIG 0x400
80168c2ecf20Sopenharmony_ci/* enum: Dynamic configuration TLV partition */
80178c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG 0x500
80188c2ecf20Sopenharmony_ci/* enum: Expansion ROM configuration data for port 0 */
80198c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0 0x600
80208c2ecf20Sopenharmony_ci/* enum: Synonym for EXPROM_CONFIG_PORT0 as used in pmap files */
80218c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPROM_CONFIG 0x600
80228c2ecf20Sopenharmony_ci/* enum: Expansion ROM configuration data for port 1 */
80238c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT1 0x601
80248c2ecf20Sopenharmony_ci/* enum: Expansion ROM configuration data for port 2 */
80258c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT2 0x602
80268c2ecf20Sopenharmony_ci/* enum: Expansion ROM configuration data for port 3 */
80278c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT3 0x603
80288c2ecf20Sopenharmony_ci/* enum: Non-volatile log output partition */
80298c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_LOG 0x700
80308c2ecf20Sopenharmony_ci/* enum: Non-volatile log output of second core on dual-core device */
80318c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_LOG_SLAVE 0x701
80328c2ecf20Sopenharmony_ci/* enum: Device state dump output partition */
80338c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_DUMP 0x800
80348c2ecf20Sopenharmony_ci/* enum: Application license key storage partition */
80358c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_LICENSE 0x900
80368c2ecf20Sopenharmony_ci/* enum: Start of range used for PHY partitions (low 8 bits are the PHY ID) */
80378c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_PHY_MIN 0xa00
80388c2ecf20Sopenharmony_ci/* enum: End of range used for PHY partitions (low 8 bits are the PHY ID) */
80398c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_PHY_MAX 0xaff
80408c2ecf20Sopenharmony_ci/* enum: Primary FPGA partition */
80418c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_FPGA 0xb00
80428c2ecf20Sopenharmony_ci/* enum: Secondary FPGA partition */
80438c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_FPGA_BACKUP 0xb01
80448c2ecf20Sopenharmony_ci/* enum: FC firmware partition */
80458c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_FC_FIRMWARE 0xb02
80468c2ecf20Sopenharmony_ci/* enum: FC License partition */
80478c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_FC_LICENSE 0xb03
80488c2ecf20Sopenharmony_ci/* enum: Non-volatile log output partition for FC */
80498c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_FC_LOG 0xb04
80508c2ecf20Sopenharmony_ci/* enum: MUM firmware partition */
80518c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_FIRMWARE 0xc00
80528c2ecf20Sopenharmony_ci/* enum: SUC firmware partition (this is intentionally an alias of
80538c2ecf20Sopenharmony_ci * MUM_FIRMWARE)
80548c2ecf20Sopenharmony_ci */
80558c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SUC_FIRMWARE 0xc00
80568c2ecf20Sopenharmony_ci/* enum: MUM Non-volatile log output partition. */
80578c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_LOG 0xc01
80588c2ecf20Sopenharmony_ci/* enum: MUM Application table partition. */
80598c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_APPTABLE 0xc02
80608c2ecf20Sopenharmony_ci/* enum: MUM boot rom partition. */
80618c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_BOOT_ROM 0xc03
80628c2ecf20Sopenharmony_ci/* enum: MUM production signatures & calibration rom partition. */
80638c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_PROD_ROM 0xc04
80648c2ecf20Sopenharmony_ci/* enum: MUM user signatures & calibration rom partition. */
80658c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_USER_ROM 0xc05
80668c2ecf20Sopenharmony_ci/* enum: MUM fuses and lockbits partition. */
80678c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MUM_FUSELOCK 0xc06
80688c2ecf20Sopenharmony_ci/* enum: UEFI expansion ROM if separate from PXE */
80698c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPANSION_UEFI 0xd00
80708c2ecf20Sopenharmony_ci/* enum: Used by the expansion ROM for logging */
80718c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_PXE_LOG 0x1000
80728c2ecf20Sopenharmony_ci/* enum: Used for XIP code of shmbooted images */
80738c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_XIP_SCRATCH 0x1100
80748c2ecf20Sopenharmony_ci/* enum: Spare partition 2 */
80758c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_2 0x1200
80768c2ecf20Sopenharmony_ci/* enum: Manufacturing partition. Used during manufacture to pass information
80778c2ecf20Sopenharmony_ci * between XJTAG and Manftest.
80788c2ecf20Sopenharmony_ci */
80798c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_MANUFACTURING 0x1300
80808c2ecf20Sopenharmony_ci/* enum: Spare partition 4 */
80818c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_4 0x1400
80828c2ecf20Sopenharmony_ci/* enum: Spare partition 5 */
80838c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_5 0x1500
80848c2ecf20Sopenharmony_ci/* enum: Partition for reporting MC status. See mc_flash_layout.h
80858c2ecf20Sopenharmony_ci * medford_mc_status_hdr_t for layout on Medford.
80868c2ecf20Sopenharmony_ci */
80878c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_STATUS 0x1600
80888c2ecf20Sopenharmony_ci/* enum: Spare partition 13 */
80898c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_13 0x1700
80908c2ecf20Sopenharmony_ci/* enum: Spare partition 14 */
80918c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_14 0x1800
80928c2ecf20Sopenharmony_ci/* enum: Spare partition 15 */
80938c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_15 0x1900
80948c2ecf20Sopenharmony_ci/* enum: Spare partition 16 */
80958c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_SPARE_16 0x1a00
80968c2ecf20Sopenharmony_ci/* enum: Factory defaults for dynamic configuration */
80978c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_DYNCONFIG_DEFAULTS 0x1b00
80988c2ecf20Sopenharmony_ci/* enum: Factory defaults for expansion ROM configuration */
80998c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_ROMCONFIG_DEFAULTS 0x1c00
81008c2ecf20Sopenharmony_ci/* enum: Field Replaceable Unit inventory information for use on IPMI
81018c2ecf20Sopenharmony_ci * platforms. See SF-119124-PS. The STATIC_CONFIG partition may contain a
81028c2ecf20Sopenharmony_ci * subset of the information stored in this partition.
81038c2ecf20Sopenharmony_ci */
81048c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_FRU_INFORMATION 0x1d00
81058c2ecf20Sopenharmony_ci/* enum: Bundle image partition */
81068c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_BUNDLE 0x1e00
81078c2ecf20Sopenharmony_ci/* enum: Bundle metadata partition that holds additional information related to
81088c2ecf20Sopenharmony_ci * a bundle update in TLV format
81098c2ecf20Sopenharmony_ci */
81108c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_BUNDLE_METADATA 0x1e01
81118c2ecf20Sopenharmony_ci/* enum: Bundle update non-volatile log output partition */
81128c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_BUNDLE_LOG 0x1e02
81138c2ecf20Sopenharmony_ci/* enum: Partition for Solarflare gPXE bootrom installed via Bundle update. */
81148c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_EXPANSION_ROM_INTERNAL 0x1e03
81158c2ecf20Sopenharmony_ci/* enum: Start of reserved value range (firmware may use for any purpose) */
81168c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_RESERVED_VALUES_MIN 0xff00
81178c2ecf20Sopenharmony_ci/* enum: End of reserved value range (firmware may use for any purpose) */
81188c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_RESERVED_VALUES_MAX 0xfffd
81198c2ecf20Sopenharmony_ci/* enum: Recovery partition map (provided if real map is missing or corrupt) */
81208c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_RECOVERY_MAP 0xfffe
81218c2ecf20Sopenharmony_ci/* enum: Partition map (real map as stored in flash) */
81228c2ecf20Sopenharmony_ci#define          NVRAM_PARTITION_TYPE_PARTITION_MAP 0xffff
81238c2ecf20Sopenharmony_ci#define       NVRAM_PARTITION_TYPE_ID_LBN 0
81248c2ecf20Sopenharmony_ci#define       NVRAM_PARTITION_TYPE_ID_WIDTH 16
81258c2ecf20Sopenharmony_ci
81268c2ecf20Sopenharmony_ci/* LICENSED_APP_ID structuredef */
81278c2ecf20Sopenharmony_ci#define    LICENSED_APP_ID_LEN 4
81288c2ecf20Sopenharmony_ci#define       LICENSED_APP_ID_ID_OFST 0
81298c2ecf20Sopenharmony_ci#define       LICENSED_APP_ID_ID_LEN 4
81308c2ecf20Sopenharmony_ci/* enum: OpenOnload */
81318c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_ONLOAD 0x1
81328c2ecf20Sopenharmony_ci/* enum: PTP timestamping */
81338c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_PTP 0x2
81348c2ecf20Sopenharmony_ci/* enum: SolarCapture Pro */
81358c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_SOLARCAPTURE_PRO 0x4
81368c2ecf20Sopenharmony_ci/* enum: SolarSecure filter engine */
81378c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_SOLARSECURE 0x8
81388c2ecf20Sopenharmony_ci/* enum: Performance monitor */
81398c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_PERF_MONITOR 0x10
81408c2ecf20Sopenharmony_ci/* enum: SolarCapture Live */
81418c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_SOLARCAPTURE_LIVE 0x20
81428c2ecf20Sopenharmony_ci/* enum: Capture SolarSystem */
81438c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_CAPTURE_SOLARSYSTEM 0x40
81448c2ecf20Sopenharmony_ci/* enum: Network Access Control */
81458c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_NETWORK_ACCESS_CONTROL 0x80
81468c2ecf20Sopenharmony_ci/* enum: TCP Direct */
81478c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_TCP_DIRECT 0x100
81488c2ecf20Sopenharmony_ci/* enum: Low Latency */
81498c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_LOW_LATENCY 0x200
81508c2ecf20Sopenharmony_ci/* enum: SolarCapture Tap */
81518c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_SOLARCAPTURE_TAP 0x400
81528c2ecf20Sopenharmony_ci/* enum: Capture SolarSystem 40G */
81538c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_CAPTURE_SOLARSYSTEM_40G 0x800
81548c2ecf20Sopenharmony_ci/* enum: Capture SolarSystem 1G */
81558c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_CAPTURE_SOLARSYSTEM_1G 0x1000
81568c2ecf20Sopenharmony_ci/* enum: ScaleOut Onload */
81578c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_SCALEOUT_ONLOAD 0x2000
81588c2ecf20Sopenharmony_ci/* enum: SCS Network Analytics Dashboard */
81598c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_DSHBRD 0x4000
81608c2ecf20Sopenharmony_ci/* enum: SolarCapture Trading Analytics */
81618c2ecf20Sopenharmony_ci#define          LICENSED_APP_ID_SCATRD 0x8000
81628c2ecf20Sopenharmony_ci#define       LICENSED_APP_ID_ID_LBN 0
81638c2ecf20Sopenharmony_ci#define       LICENSED_APP_ID_ID_WIDTH 32
81648c2ecf20Sopenharmony_ci
81658c2ecf20Sopenharmony_ci/* LICENSED_FEATURES structuredef */
81668c2ecf20Sopenharmony_ci#define    LICENSED_FEATURES_LEN 8
81678c2ecf20Sopenharmony_ci/* Bitmask of licensed firmware features */
81688c2ecf20Sopenharmony_ci#define       LICENSED_FEATURES_MASK_OFST 0
81698c2ecf20Sopenharmony_ci#define       LICENSED_FEATURES_MASK_LEN 8
81708c2ecf20Sopenharmony_ci#define       LICENSED_FEATURES_MASK_LO_OFST 0
81718c2ecf20Sopenharmony_ci#define       LICENSED_FEATURES_MASK_HI_OFST 4
81728c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_CUT_THROUGH_OFST 0
81738c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_CUT_THROUGH_LBN 0
81748c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_CUT_THROUGH_WIDTH 1
81758c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_PIO_OFST 0
81768c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_PIO_LBN 1
81778c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_PIO_WIDTH 1
81788c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_EVQ_TIMER_OFST 0
81798c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_EVQ_TIMER_LBN 2
81808c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_EVQ_TIMER_WIDTH 1
81818c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_CLOCK_OFST 0
81828c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_CLOCK_LBN 3
81838c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_CLOCK_WIDTH 1
81848c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_TIMESTAMPS_OFST 0
81858c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_TIMESTAMPS_LBN 4
81868c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_TIMESTAMPS_WIDTH 1
81878c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_TX_TIMESTAMPS_OFST 0
81888c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_TX_TIMESTAMPS_LBN 5
81898c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_TX_TIMESTAMPS_WIDTH 1
81908c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_SNIFF_OFST 0
81918c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_SNIFF_LBN 6
81928c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_RX_SNIFF_WIDTH 1
81938c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_TX_SNIFF_OFST 0
81948c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_TX_SNIFF_LBN 7
81958c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_TX_SNIFF_WIDTH 1
81968c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_PROXY_FILTER_OPS_OFST 0
81978c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_PROXY_FILTER_OPS_LBN 8
81988c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_PROXY_FILTER_OPS_WIDTH 1
81998c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_EVENT_CUT_THROUGH_OFST 0
82008c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_EVENT_CUT_THROUGH_LBN 9
82018c2ecf20Sopenharmony_ci#define        LICENSED_FEATURES_EVENT_CUT_THROUGH_WIDTH 1
82028c2ecf20Sopenharmony_ci#define       LICENSED_FEATURES_MASK_LBN 0
82038c2ecf20Sopenharmony_ci#define       LICENSED_FEATURES_MASK_WIDTH 64
82048c2ecf20Sopenharmony_ci
82058c2ecf20Sopenharmony_ci/* LICENSED_V3_APPS structuredef */
82068c2ecf20Sopenharmony_ci#define    LICENSED_V3_APPS_LEN 8
82078c2ecf20Sopenharmony_ci/* Bitmask of licensed applications */
82088c2ecf20Sopenharmony_ci#define       LICENSED_V3_APPS_MASK_OFST 0
82098c2ecf20Sopenharmony_ci#define       LICENSED_V3_APPS_MASK_LEN 8
82108c2ecf20Sopenharmony_ci#define       LICENSED_V3_APPS_MASK_LO_OFST 0
82118c2ecf20Sopenharmony_ci#define       LICENSED_V3_APPS_MASK_HI_OFST 4
82128c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_ONLOAD_OFST 0
82138c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_ONLOAD_LBN 0
82148c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_ONLOAD_WIDTH 1
82158c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_PTP_OFST 0
82168c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_PTP_LBN 1
82178c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_PTP_WIDTH 1
82188c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_PRO_OFST 0
82198c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_PRO_LBN 2
82208c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_PRO_WIDTH 1
82218c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARSECURE_OFST 0
82228c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARSECURE_LBN 3
82238c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARSECURE_WIDTH 1
82248c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_PERF_MONITOR_OFST 0
82258c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_PERF_MONITOR_LBN 4
82268c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_PERF_MONITOR_WIDTH 1
82278c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_LIVE_OFST 0
82288c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_LIVE_LBN 5
82298c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_LIVE_WIDTH 1
82308c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_OFST 0
82318c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_LBN 6
82328c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_WIDTH 1
82338c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_OFST 0
82348c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_LBN 7
82358c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_NETWORK_ACCESS_CONTROL_WIDTH 1
82368c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_TCP_DIRECT_OFST 0
82378c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_TCP_DIRECT_LBN 8
82388c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_TCP_DIRECT_WIDTH 1
82398c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_LOW_LATENCY_OFST 0
82408c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_LOW_LATENCY_LBN 9
82418c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_LOW_LATENCY_WIDTH 1
82428c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_TAP_OFST 0
82438c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_TAP_LBN 10
82448c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SOLARCAPTURE_TAP_WIDTH 1
82458c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_40G_OFST 0
82468c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_40G_LBN 11
82478c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_40G_WIDTH 1
82488c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_1G_OFST 0
82498c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_1G_LBN 12
82508c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_CAPTURE_SOLARSYSTEM_1G_WIDTH 1
82518c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SCALEOUT_ONLOAD_OFST 0
82528c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SCALEOUT_ONLOAD_LBN 13
82538c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SCALEOUT_ONLOAD_WIDTH 1
82548c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_DSHBRD_OFST 0
82558c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_DSHBRD_LBN 14
82568c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_DSHBRD_WIDTH 1
82578c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SCATRD_OFST 0
82588c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SCATRD_LBN 15
82598c2ecf20Sopenharmony_ci#define        LICENSED_V3_APPS_SCATRD_WIDTH 1
82608c2ecf20Sopenharmony_ci#define       LICENSED_V3_APPS_MASK_LBN 0
82618c2ecf20Sopenharmony_ci#define       LICENSED_V3_APPS_MASK_WIDTH 64
82628c2ecf20Sopenharmony_ci
82638c2ecf20Sopenharmony_ci/* LICENSED_V3_FEATURES structuredef */
82648c2ecf20Sopenharmony_ci#define    LICENSED_V3_FEATURES_LEN 8
82658c2ecf20Sopenharmony_ci/* Bitmask of licensed firmware features */
82668c2ecf20Sopenharmony_ci#define       LICENSED_V3_FEATURES_MASK_OFST 0
82678c2ecf20Sopenharmony_ci#define       LICENSED_V3_FEATURES_MASK_LEN 8
82688c2ecf20Sopenharmony_ci#define       LICENSED_V3_FEATURES_MASK_LO_OFST 0
82698c2ecf20Sopenharmony_ci#define       LICENSED_V3_FEATURES_MASK_HI_OFST 4
82708c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_CUT_THROUGH_OFST 0
82718c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_CUT_THROUGH_LBN 0
82728c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_CUT_THROUGH_WIDTH 1
82738c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_PIO_OFST 0
82748c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_PIO_LBN 1
82758c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_PIO_WIDTH 1
82768c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_EVQ_TIMER_OFST 0
82778c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_EVQ_TIMER_LBN 2
82788c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_EVQ_TIMER_WIDTH 1
82798c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_CLOCK_OFST 0
82808c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_CLOCK_LBN 3
82818c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_CLOCK_WIDTH 1
82828c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_TIMESTAMPS_OFST 0
82838c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_TIMESTAMPS_LBN 4
82848c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_TIMESTAMPS_WIDTH 1
82858c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_TX_TIMESTAMPS_OFST 0
82868c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_TX_TIMESTAMPS_LBN 5
82878c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_TX_TIMESTAMPS_WIDTH 1
82888c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_SNIFF_OFST 0
82898c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_SNIFF_LBN 6
82908c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_RX_SNIFF_WIDTH 1
82918c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_TX_SNIFF_OFST 0
82928c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_TX_SNIFF_LBN 7
82938c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_TX_SNIFF_WIDTH 1
82948c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_PROXY_FILTER_OPS_OFST 0
82958c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_PROXY_FILTER_OPS_LBN 8
82968c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_PROXY_FILTER_OPS_WIDTH 1
82978c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_EVENT_CUT_THROUGH_OFST 0
82988c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_EVENT_CUT_THROUGH_LBN 9
82998c2ecf20Sopenharmony_ci#define        LICENSED_V3_FEATURES_EVENT_CUT_THROUGH_WIDTH 1
83008c2ecf20Sopenharmony_ci#define       LICENSED_V3_FEATURES_MASK_LBN 0
83018c2ecf20Sopenharmony_ci#define       LICENSED_V3_FEATURES_MASK_WIDTH 64
83028c2ecf20Sopenharmony_ci
83038c2ecf20Sopenharmony_ci/* TX_TIMESTAMP_EVENT structuredef */
83048c2ecf20Sopenharmony_ci#define    TX_TIMESTAMP_EVENT_LEN 6
83058c2ecf20Sopenharmony_ci/* lower 16 bits of timestamp data */
83068c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_OFST 0
83078c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_LEN 2
83088c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_LBN 0
83098c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_LO_WIDTH 16
83108c2ecf20Sopenharmony_ci/* Type of TX event, ordinary TX completion, low or high part of TX timestamp
83118c2ecf20Sopenharmony_ci */
83128c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TX_EV_TYPE_OFST 3
83138c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TX_EV_TYPE_LEN 1
83148c2ecf20Sopenharmony_ci/* enum: This is a TX completion event, not a timestamp */
83158c2ecf20Sopenharmony_ci#define          TX_TIMESTAMP_EVENT_TX_EV_COMPLETION 0x0
83168c2ecf20Sopenharmony_ci/* enum: This is a TX completion event for a CTPIO transmit. The event format
83178c2ecf20Sopenharmony_ci * is the same as for TX_EV_COMPLETION.
83188c2ecf20Sopenharmony_ci */
83198c2ecf20Sopenharmony_ci#define          TX_TIMESTAMP_EVENT_TX_EV_CTPIO_COMPLETION 0x11
83208c2ecf20Sopenharmony_ci/* enum: This is the low part of a TX timestamp for a CTPIO transmission. The
83218c2ecf20Sopenharmony_ci * event format is the same as for TX_EV_TSTAMP_LO
83228c2ecf20Sopenharmony_ci */
83238c2ecf20Sopenharmony_ci#define          TX_TIMESTAMP_EVENT_TX_EV_CTPIO_TS_LO 0x12
83248c2ecf20Sopenharmony_ci/* enum: This is the high part of a TX timestamp for a CTPIO transmission. The
83258c2ecf20Sopenharmony_ci * event format is the same as for TX_EV_TSTAMP_HI
83268c2ecf20Sopenharmony_ci */
83278c2ecf20Sopenharmony_ci#define          TX_TIMESTAMP_EVENT_TX_EV_CTPIO_TS_HI 0x13
83288c2ecf20Sopenharmony_ci/* enum: This is the low part of a TX timestamp event */
83298c2ecf20Sopenharmony_ci#define          TX_TIMESTAMP_EVENT_TX_EV_TSTAMP_LO 0x51
83308c2ecf20Sopenharmony_ci/* enum: This is the high part of a TX timestamp event */
83318c2ecf20Sopenharmony_ci#define          TX_TIMESTAMP_EVENT_TX_EV_TSTAMP_HI 0x52
83328c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TX_EV_TYPE_LBN 24
83338c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TX_EV_TYPE_WIDTH 8
83348c2ecf20Sopenharmony_ci/* upper 16 bits of timestamp data */
83358c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_OFST 4
83368c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_LEN 2
83378c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_LBN 32
83388c2ecf20Sopenharmony_ci#define       TX_TIMESTAMP_EVENT_TSTAMP_DATA_HI_WIDTH 16
83398c2ecf20Sopenharmony_ci
83408c2ecf20Sopenharmony_ci/* RSS_MODE structuredef */
83418c2ecf20Sopenharmony_ci#define    RSS_MODE_LEN 1
83428c2ecf20Sopenharmony_ci/* The RSS mode for a particular packet type is a value from 0 - 15 which can
83438c2ecf20Sopenharmony_ci * be considered as 4 bits selecting which fields are included in the hash. (A
83448c2ecf20Sopenharmony_ci * value 0 effectively disables RSS spreading for the packet type.) The YAML
83458c2ecf20Sopenharmony_ci * generation tools require this structure to be a whole number of bytes wide,
83468c2ecf20Sopenharmony_ci * but only 4 bits are relevant.
83478c2ecf20Sopenharmony_ci */
83488c2ecf20Sopenharmony_ci#define       RSS_MODE_HASH_SELECTOR_OFST 0
83498c2ecf20Sopenharmony_ci#define       RSS_MODE_HASH_SELECTOR_LEN 1
83508c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_SRC_ADDR_OFST 0
83518c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_SRC_ADDR_LBN 0
83528c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_SRC_ADDR_WIDTH 1
83538c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_DST_ADDR_OFST 0
83548c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_DST_ADDR_LBN 1
83558c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_DST_ADDR_WIDTH 1
83568c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_SRC_PORT_OFST 0
83578c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_SRC_PORT_LBN 2
83588c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_SRC_PORT_WIDTH 1
83598c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_DST_PORT_OFST 0
83608c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_DST_PORT_LBN 3
83618c2ecf20Sopenharmony_ci#define        RSS_MODE_HASH_DST_PORT_WIDTH 1
83628c2ecf20Sopenharmony_ci#define       RSS_MODE_HASH_SELECTOR_LBN 0
83638c2ecf20Sopenharmony_ci#define       RSS_MODE_HASH_SELECTOR_WIDTH 8
83648c2ecf20Sopenharmony_ci
83658c2ecf20Sopenharmony_ci/* CTPIO_STATS_MAP structuredef */
83668c2ecf20Sopenharmony_ci#define    CTPIO_STATS_MAP_LEN 4
83678c2ecf20Sopenharmony_ci/* The (function relative) VI number */
83688c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_VI_OFST 0
83698c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_VI_LEN 2
83708c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_VI_LBN 0
83718c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_VI_WIDTH 16
83728c2ecf20Sopenharmony_ci/* The target bucket for the VI */
83738c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_BUCKET_OFST 2
83748c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_BUCKET_LEN 2
83758c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_BUCKET_LBN 16
83768c2ecf20Sopenharmony_ci#define       CTPIO_STATS_MAP_BUCKET_WIDTH 16
83778c2ecf20Sopenharmony_ci
83788c2ecf20Sopenharmony_ci
83798c2ecf20Sopenharmony_ci/***********************************/
83808c2ecf20Sopenharmony_ci/* MC_CMD_READ_REGS
83818c2ecf20Sopenharmony_ci * Get a dump of the MCPU registers
83828c2ecf20Sopenharmony_ci */
83838c2ecf20Sopenharmony_ci#define MC_CMD_READ_REGS 0x50
83848c2ecf20Sopenharmony_ci#undef MC_CMD_0x50_PRIVILEGE_CTG
83858c2ecf20Sopenharmony_ci
83868c2ecf20Sopenharmony_ci#define MC_CMD_0x50_PRIVILEGE_CTG SRIOV_CTG_INSECURE
83878c2ecf20Sopenharmony_ci
83888c2ecf20Sopenharmony_ci/* MC_CMD_READ_REGS_IN msgrequest */
83898c2ecf20Sopenharmony_ci#define    MC_CMD_READ_REGS_IN_LEN 0
83908c2ecf20Sopenharmony_ci
83918c2ecf20Sopenharmony_ci/* MC_CMD_READ_REGS_OUT msgresponse */
83928c2ecf20Sopenharmony_ci#define    MC_CMD_READ_REGS_OUT_LEN 308
83938c2ecf20Sopenharmony_ci/* Whether the corresponding register entry contains a valid value */
83948c2ecf20Sopenharmony_ci#define       MC_CMD_READ_REGS_OUT_MASK_OFST 0
83958c2ecf20Sopenharmony_ci#define       MC_CMD_READ_REGS_OUT_MASK_LEN 16
83968c2ecf20Sopenharmony_ci/* Same order as MIPS GDB (r0-r31, sr, lo, hi, bad, cause, 32 x float, fsr,
83978c2ecf20Sopenharmony_ci * fir, fp)
83988c2ecf20Sopenharmony_ci */
83998c2ecf20Sopenharmony_ci#define       MC_CMD_READ_REGS_OUT_REGS_OFST 16
84008c2ecf20Sopenharmony_ci#define       MC_CMD_READ_REGS_OUT_REGS_LEN 4
84018c2ecf20Sopenharmony_ci#define       MC_CMD_READ_REGS_OUT_REGS_NUM 73
84028c2ecf20Sopenharmony_ci
84038c2ecf20Sopenharmony_ci
84048c2ecf20Sopenharmony_ci/***********************************/
84058c2ecf20Sopenharmony_ci/* MC_CMD_INIT_EVQ
84068c2ecf20Sopenharmony_ci * Set up an event queue according to the supplied parameters. The IN arguments
84078c2ecf20Sopenharmony_ci * end with an address for each 4k of host memory required to back the EVQ.
84088c2ecf20Sopenharmony_ci */
84098c2ecf20Sopenharmony_ci#define MC_CMD_INIT_EVQ 0x80
84108c2ecf20Sopenharmony_ci#undef MC_CMD_0x80_PRIVILEGE_CTG
84118c2ecf20Sopenharmony_ci
84128c2ecf20Sopenharmony_ci#define MC_CMD_0x80_PRIVILEGE_CTG SRIOV_CTG_GENERAL
84138c2ecf20Sopenharmony_ci
84148c2ecf20Sopenharmony_ci/* MC_CMD_INIT_EVQ_IN msgrequest */
84158c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_IN_LENMIN 44
84168c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_IN_LENMAX 548
84178c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_IN_LENMAX_MCDI2 548
84188c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_IN_LEN(num) (36+8*(num))
84198c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_IN_DMA_ADDR_NUM(len) (((len)-36)/8)
84208c2ecf20Sopenharmony_ci/* Size, in entries */
84218c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_SIZE_OFST 0
84228c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_SIZE_LEN 4
84238c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
84248c2ecf20Sopenharmony_ci * local queue index.
84258c2ecf20Sopenharmony_ci */
84268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_INSTANCE_OFST 4
84278c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_INSTANCE_LEN 4
84288c2ecf20Sopenharmony_ci/* The initial timer value. The load value is ignored if the timer mode is DIS.
84298c2ecf20Sopenharmony_ci */
84308c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TMR_LOAD_OFST 8
84318c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TMR_LOAD_LEN 4
84328c2ecf20Sopenharmony_ci/* The reload value is ignored in one-shot modes */
84338c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TMR_RELOAD_OFST 12
84348c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TMR_RELOAD_LEN 4
84358c2ecf20Sopenharmony_ci/* tbd */
84368c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_FLAGS_OFST 16
84378c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_FLAGS_LEN 4
84388c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_OFST 16
84398c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_LBN 0
84408c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_INTERRUPTING_WIDTH 1
84418c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_OFST 16
84428c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_LBN 1
84438c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_RPTR_DOS_WIDTH 1
84448c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_OFST 16
84458c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_LBN 2
84468c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_INT_ARMD_WIDTH 1
84478c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_OFST 16
84488c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_LBN 3
84498c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_CUT_THRU_WIDTH 1
84508c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_OFST 16
84518c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_LBN 4
84528c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_RX_MERGE_WIDTH 1
84538c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_OFST 16
84548c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_LBN 5
84558c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_TX_MERGE_WIDTH 1
84568c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_USE_TIMER_OFST 16
84578c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_USE_TIMER_LBN 6
84588c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_IN_FLAG_USE_TIMER_WIDTH 1
84598c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TMR_MODE_OFST 20
84608c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TMR_MODE_LEN 4
84618c2ecf20Sopenharmony_ci/* enum: Disabled */
84628c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_TMR_MODE_DIS 0x0
84638c2ecf20Sopenharmony_ci/* enum: Immediate */
84648c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_TMR_IMMED_START 0x1
84658c2ecf20Sopenharmony_ci/* enum: Triggered */
84668c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_TMR_TRIG_START 0x2
84678c2ecf20Sopenharmony_ci/* enum: Hold-off */
84688c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_TMR_INT_HLDOFF 0x3
84698c2ecf20Sopenharmony_ci/* Target EVQ for wakeups if in wakeup mode. */
84708c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TARGET_EVQ_OFST 24
84718c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_TARGET_EVQ_LEN 4
84728c2ecf20Sopenharmony_ci/* Target interrupt if in interrupting mode (note union with target EVQ). Use
84738c2ecf20Sopenharmony_ci * MC_CMD_RESOURCE_INSTANCE_ANY unless a specific one required for test
84748c2ecf20Sopenharmony_ci * purposes.
84758c2ecf20Sopenharmony_ci */
84768c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_IRQ_NUM_OFST 24
84778c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_IRQ_NUM_LEN 4
84788c2ecf20Sopenharmony_ci/* Event Counter Mode. */
84798c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_COUNT_MODE_OFST 28
84808c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_COUNT_MODE_LEN 4
84818c2ecf20Sopenharmony_ci/* enum: Disabled */
84828c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_COUNT_MODE_DIS 0x0
84838c2ecf20Sopenharmony_ci/* enum: Disabled */
84848c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_COUNT_MODE_RX 0x1
84858c2ecf20Sopenharmony_ci/* enum: Disabled */
84868c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_COUNT_MODE_TX 0x2
84878c2ecf20Sopenharmony_ci/* enum: Disabled */
84888c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_IN_COUNT_MODE_RXTX 0x3
84898c2ecf20Sopenharmony_ci/* Event queue packet count threshold. */
84908c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_COUNT_THRSHLD_OFST 32
84918c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_COUNT_THRSHLD_LEN 4
84928c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
84938c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_OFST 36
84948c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_LEN 8
84958c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_LO_OFST 36
84968c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_HI_OFST 40
84978c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_MINNUM 1
84988c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_MAXNUM 64
84998c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_IN_DMA_ADDR_MAXNUM_MCDI2 64
85008c2ecf20Sopenharmony_ci
85018c2ecf20Sopenharmony_ci/* MC_CMD_INIT_EVQ_OUT msgresponse */
85028c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_OUT_LEN 4
85038c2ecf20Sopenharmony_ci/* Only valid if INTRFLAG was true */
85048c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_OUT_IRQ_OFST 0
85058c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_OUT_IRQ_LEN 4
85068c2ecf20Sopenharmony_ci
85078c2ecf20Sopenharmony_ci/* MC_CMD_INIT_EVQ_V2_IN msgrequest */
85088c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_V2_IN_LENMIN 44
85098c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_V2_IN_LENMAX 548
85108c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_V2_IN_LENMAX_MCDI2 548
85118c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_V2_IN_LEN(num) (36+8*(num))
85128c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_NUM(len) (((len)-36)/8)
85138c2ecf20Sopenharmony_ci/* Size, in entries */
85148c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_SIZE_OFST 0
85158c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_SIZE_LEN 4
85168c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
85178c2ecf20Sopenharmony_ci * local queue index.
85188c2ecf20Sopenharmony_ci */
85198c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_INSTANCE_OFST 4
85208c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_INSTANCE_LEN 4
85218c2ecf20Sopenharmony_ci/* The initial timer value. The load value is ignored if the timer mode is DIS.
85228c2ecf20Sopenharmony_ci */
85238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TMR_LOAD_OFST 8
85248c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TMR_LOAD_LEN 4
85258c2ecf20Sopenharmony_ci/* The reload value is ignored in one-shot modes */
85268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TMR_RELOAD_OFST 12
85278c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TMR_RELOAD_LEN 4
85288c2ecf20Sopenharmony_ci/* tbd */
85298c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_FLAGS_OFST 16
85308c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_FLAGS_LEN 4
85318c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_INTERRUPTING_OFST 16
85328c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_INTERRUPTING_LBN 0
85338c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_INTERRUPTING_WIDTH 1
85348c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_RPTR_DOS_OFST 16
85358c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_RPTR_DOS_LBN 1
85368c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_RPTR_DOS_WIDTH 1
85378c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_INT_ARMD_OFST 16
85388c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_INT_ARMD_LBN 2
85398c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_INT_ARMD_WIDTH 1
85408c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_CUT_THRU_OFST 16
85418c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_CUT_THRU_LBN 3
85428c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_CUT_THRU_WIDTH 1
85438c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_RX_MERGE_OFST 16
85448c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_RX_MERGE_LBN 4
85458c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_RX_MERGE_WIDTH 1
85468c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_TX_MERGE_OFST 16
85478c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_TX_MERGE_LBN 5
85488c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_TX_MERGE_WIDTH 1
85498c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_USE_TIMER_OFST 16
85508c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_USE_TIMER_LBN 6
85518c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_USE_TIMER_WIDTH 1
85528c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_OFST 16
85538c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_LBN 7
85548c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_WIDTH 4
85558c2ecf20Sopenharmony_ci/* enum: All initialisation flags specified by host. */
85568c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_MANUAL 0x0
85578c2ecf20Sopenharmony_ci/* enum: MEDFORD only. Certain initialisation flags specified by host may be
85588c2ecf20Sopenharmony_ci * over-ridden by firmware based on licenses and firmware variant in order to
85598c2ecf20Sopenharmony_ci * provide the lowest latency achievable. See
85608c2ecf20Sopenharmony_ci * MC_CMD_INIT_EVQ_V2/MC_CMD_INIT_EVQ_V2_OUT/FLAGS for list of affected flags.
85618c2ecf20Sopenharmony_ci */
85628c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_LOW_LATENCY 0x1
85638c2ecf20Sopenharmony_ci/* enum: MEDFORD only. Certain initialisation flags specified by host may be
85648c2ecf20Sopenharmony_ci * over-ridden by firmware based on licenses and firmware variant in order to
85658c2ecf20Sopenharmony_ci * provide the best throughput achievable. See
85668c2ecf20Sopenharmony_ci * MC_CMD_INIT_EVQ_V2/MC_CMD_INIT_EVQ_V2_OUT/FLAGS for list of affected flags.
85678c2ecf20Sopenharmony_ci */
85688c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_THROUGHPUT 0x2
85698c2ecf20Sopenharmony_ci/* enum: MEDFORD only. Certain initialisation flags may be over-ridden by
85708c2ecf20Sopenharmony_ci * firmware based on licenses and firmware variant. See
85718c2ecf20Sopenharmony_ci * MC_CMD_INIT_EVQ_V2/MC_CMD_INIT_EVQ_V2_OUT/FLAGS for list of affected flags.
85728c2ecf20Sopenharmony_ci */
85738c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_FLAG_TYPE_AUTO 0x3
85748c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_EXT_WIDTH_OFST 16
85758c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_EXT_WIDTH_LBN 11
85768c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_IN_FLAG_EXT_WIDTH_WIDTH 1
85778c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TMR_MODE_OFST 20
85788c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TMR_MODE_LEN 4
85798c2ecf20Sopenharmony_ci/* enum: Disabled */
85808c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_TMR_MODE_DIS 0x0
85818c2ecf20Sopenharmony_ci/* enum: Immediate */
85828c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_TMR_IMMED_START 0x1
85838c2ecf20Sopenharmony_ci/* enum: Triggered */
85848c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_TMR_TRIG_START 0x2
85858c2ecf20Sopenharmony_ci/* enum: Hold-off */
85868c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_TMR_INT_HLDOFF 0x3
85878c2ecf20Sopenharmony_ci/* Target EVQ for wakeups if in wakeup mode. */
85888c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TARGET_EVQ_OFST 24
85898c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_TARGET_EVQ_LEN 4
85908c2ecf20Sopenharmony_ci/* Target interrupt if in interrupting mode (note union with target EVQ). Use
85918c2ecf20Sopenharmony_ci * MC_CMD_RESOURCE_INSTANCE_ANY unless a specific one required for test
85928c2ecf20Sopenharmony_ci * purposes.
85938c2ecf20Sopenharmony_ci */
85948c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_IRQ_NUM_OFST 24
85958c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_IRQ_NUM_LEN 4
85968c2ecf20Sopenharmony_ci/* Event Counter Mode. */
85978c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_OFST 28
85988c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_LEN 4
85998c2ecf20Sopenharmony_ci/* enum: Disabled */
86008c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_DIS 0x0
86018c2ecf20Sopenharmony_ci/* enum: Disabled */
86028c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_RX 0x1
86038c2ecf20Sopenharmony_ci/* enum: Disabled */
86048c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_TX 0x2
86058c2ecf20Sopenharmony_ci/* enum: Disabled */
86068c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_EVQ_V2_IN_COUNT_MODE_RXTX 0x3
86078c2ecf20Sopenharmony_ci/* Event queue packet count threshold. */
86088c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_COUNT_THRSHLD_OFST 32
86098c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_COUNT_THRSHLD_LEN 4
86108c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
86118c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_OFST 36
86128c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_LEN 8
86138c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_LO_OFST 36
86148c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_HI_OFST 40
86158c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_MINNUM 1
86168c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_MAXNUM 64
86178c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_MAXNUM_MCDI2 64
86188c2ecf20Sopenharmony_ci
86198c2ecf20Sopenharmony_ci/* MC_CMD_INIT_EVQ_V2_OUT msgresponse */
86208c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_EVQ_V2_OUT_LEN 8
86218c2ecf20Sopenharmony_ci/* Only valid if INTRFLAG was true */
86228c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_OUT_IRQ_OFST 0
86238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_OUT_IRQ_LEN 4
86248c2ecf20Sopenharmony_ci/* Actual configuration applied on the card */
86258c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_OUT_FLAGS_OFST 4
86268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_EVQ_V2_OUT_FLAGS_LEN 4
86278c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_CUT_THRU_OFST 4
86288c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_CUT_THRU_LBN 0
86298c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_CUT_THRU_WIDTH 1
86308c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_RX_MERGE_OFST 4
86318c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_RX_MERGE_LBN 1
86328c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_RX_MERGE_WIDTH 1
86338c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_TX_MERGE_OFST 4
86348c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_TX_MERGE_LBN 2
86358c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_TX_MERGE_WIDTH 1
86368c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_RXQ_FORCE_EV_MERGING_OFST 4
86378c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_RXQ_FORCE_EV_MERGING_LBN 3
86388c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_EVQ_V2_OUT_FLAG_RXQ_FORCE_EV_MERGING_WIDTH 1
86398c2ecf20Sopenharmony_ci
86408c2ecf20Sopenharmony_ci/* QUEUE_CRC_MODE structuredef */
86418c2ecf20Sopenharmony_ci#define    QUEUE_CRC_MODE_LEN 1
86428c2ecf20Sopenharmony_ci#define       QUEUE_CRC_MODE_MODE_LBN 0
86438c2ecf20Sopenharmony_ci#define       QUEUE_CRC_MODE_MODE_WIDTH 4
86448c2ecf20Sopenharmony_ci/* enum: No CRC. */
86458c2ecf20Sopenharmony_ci#define          QUEUE_CRC_MODE_NONE 0x0
86468c2ecf20Sopenharmony_ci/* enum: CRC Fiber channel over ethernet. */
86478c2ecf20Sopenharmony_ci#define          QUEUE_CRC_MODE_FCOE 0x1
86488c2ecf20Sopenharmony_ci/* enum: CRC (digest) iSCSI header only. */
86498c2ecf20Sopenharmony_ci#define          QUEUE_CRC_MODE_ISCSI_HDR 0x2
86508c2ecf20Sopenharmony_ci/* enum: CRC (digest) iSCSI header and payload. */
86518c2ecf20Sopenharmony_ci#define          QUEUE_CRC_MODE_ISCSI 0x3
86528c2ecf20Sopenharmony_ci/* enum: CRC Fiber channel over IP over ethernet. */
86538c2ecf20Sopenharmony_ci#define          QUEUE_CRC_MODE_FCOIPOE 0x4
86548c2ecf20Sopenharmony_ci/* enum: CRC MPA. */
86558c2ecf20Sopenharmony_ci#define          QUEUE_CRC_MODE_MPA 0x5
86568c2ecf20Sopenharmony_ci#define       QUEUE_CRC_MODE_SPARE_LBN 4
86578c2ecf20Sopenharmony_ci#define       QUEUE_CRC_MODE_SPARE_WIDTH 4
86588c2ecf20Sopenharmony_ci
86598c2ecf20Sopenharmony_ci
86608c2ecf20Sopenharmony_ci/***********************************/
86618c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ
86628c2ecf20Sopenharmony_ci * set up a receive queue according to the supplied parameters. The IN
86638c2ecf20Sopenharmony_ci * arguments end with an address for each 4k of host memory required to back
86648c2ecf20Sopenharmony_ci * the RXQ.
86658c2ecf20Sopenharmony_ci */
86668c2ecf20Sopenharmony_ci#define MC_CMD_INIT_RXQ 0x81
86678c2ecf20Sopenharmony_ci#undef MC_CMD_0x81_PRIVILEGE_CTG
86688c2ecf20Sopenharmony_ci
86698c2ecf20Sopenharmony_ci#define MC_CMD_0x81_PRIVILEGE_CTG SRIOV_CTG_GENERAL
86708c2ecf20Sopenharmony_ci
86718c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_IN msgrequest: Legacy RXQ_INIT request. Use extended version
86728c2ecf20Sopenharmony_ci * in new code.
86738c2ecf20Sopenharmony_ci */
86748c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_IN_LENMIN 36
86758c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_IN_LENMAX 252
86768c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_IN_LENMAX_MCDI2 1020
86778c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_IN_LEN(num) (28+8*(num))
86788c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_IN_DMA_ADDR_NUM(len) (((len)-28)/8)
86798c2ecf20Sopenharmony_ci/* Size, in entries */
86808c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_SIZE_OFST 0
86818c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_SIZE_LEN 4
86828c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to INIT_EVQ
86838c2ecf20Sopenharmony_ci */
86848c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_TARGET_EVQ_OFST 4
86858c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_TARGET_EVQ_LEN 4
86868c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range. */
86878c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_LABEL_OFST 8
86888c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_LABEL_LEN 4
86898c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
86908c2ecf20Sopenharmony_ci * local queue index.
86918c2ecf20Sopenharmony_ci */
86928c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_INSTANCE_OFST 12
86938c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_INSTANCE_LEN 4
86948c2ecf20Sopenharmony_ci/* There will be more flags here. */
86958c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_FLAGS_OFST 16
86968c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_FLAGS_LEN 4
86978c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_OFST 16
86988c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_LBN 0
86998c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_BUFF_MODE_WIDTH 1
87008c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_OFST 16
87018c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_LBN 1
87028c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_HDR_SPLIT_WIDTH 1
87038c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_OFST 16
87048c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_LBN 2
87058c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_TIMESTAMP_WIDTH 1
87068c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_CRC_MODE_OFST 16
87078c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_CRC_MODE_LBN 3
87088c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_CRC_MODE_WIDTH 4
87098c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_OFST 16
87108c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_LBN 7
87118c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_CHAIN_WIDTH 1
87128c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_OFST 16
87138c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_LBN 8
87148c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_WIDTH 1
87158c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_OFST 16
87168c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_LBN 9
87178c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_WIDTH 1
87188c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_UNUSED_OFST 16
87198c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_UNUSED_LBN 10
87208c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_IN_UNUSED_WIDTH 1
87218c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
87228c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_OWNER_ID_OFST 20
87238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_OWNER_ID_LEN 4
87248c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
87258c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_PORT_ID_OFST 24
87268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_PORT_ID_LEN 4
87278c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
87288c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_OFST 28
87298c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_LEN 8
87308c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_LO_OFST 28
87318c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_HI_OFST 32
87328c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_MINNUM 1
87338c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_MAXNUM 28
87348c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_IN_DMA_ADDR_MAXNUM_MCDI2 124
87358c2ecf20Sopenharmony_ci
87368c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_EXT_IN msgrequest: Extended RXQ_INIT with additional mode
87378c2ecf20Sopenharmony_ci * flags
87388c2ecf20Sopenharmony_ci */
87398c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_EXT_IN_LEN 544
87408c2ecf20Sopenharmony_ci/* Size, in entries */
87418c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_SIZE_OFST 0
87428c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_SIZE_LEN 4
87438c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to
87448c2ecf20Sopenharmony_ci * INIT_EVQ. If DMA_MODE == PACKED_STREAM this must be equal to INSTANCE.
87458c2ecf20Sopenharmony_ci */
87468c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_TARGET_EVQ_OFST 4
87478c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_TARGET_EVQ_LEN 4
87488c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range.
87498c2ecf20Sopenharmony_ci * This field is ignored if DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER or DMA_MODE
87508c2ecf20Sopenharmony_ci * == PACKED_STREAM.
87518c2ecf20Sopenharmony_ci */
87528c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_LABEL_OFST 8
87538c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_LABEL_LEN 4
87548c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
87558c2ecf20Sopenharmony_ci * local queue index.
87568c2ecf20Sopenharmony_ci */
87578c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_INSTANCE_OFST 12
87588c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_INSTANCE_LEN 4
87598c2ecf20Sopenharmony_ci/* There will be more flags here. */
87608c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_FLAGS_OFST 16
87618c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_FLAGS_LEN 4
87628c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_BUFF_MODE_OFST 16
87638c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_BUFF_MODE_LBN 0
87648c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_BUFF_MODE_WIDTH 1
87658c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_HDR_SPLIT_OFST 16
87668c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_HDR_SPLIT_LBN 1
87678c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_HDR_SPLIT_WIDTH 1
87688c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_TIMESTAMP_OFST 16
87698c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_TIMESTAMP_LBN 2
87708c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_TIMESTAMP_WIDTH 1
87718c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_CRC_MODE_OFST 16
87728c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_CRC_MODE_LBN 3
87738c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_CRC_MODE_WIDTH 4
87748c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_CHAIN_OFST 16
87758c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_CHAIN_LBN 7
87768c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_CHAIN_WIDTH 1
87778c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_PREFIX_OFST 16
87788c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_PREFIX_LBN 8
87798c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_PREFIX_WIDTH 1
87808c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_DISABLE_SCATTER_OFST 16
87818c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_DISABLE_SCATTER_LBN 9
87828c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_DISABLE_SCATTER_WIDTH 1
87838c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_DMA_MODE_OFST 16
87848c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_DMA_MODE_LBN 10
87858c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_DMA_MODE_WIDTH 4
87868c2ecf20Sopenharmony_ci/* enum: One packet per descriptor (for normal networking) */
87878c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_SINGLE_PACKET 0x0
87888c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors (for SolarCapture) */
87898c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM 0x1
87908c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors using the format designed
87918c2ecf20Sopenharmony_ci * to maximise packet rate. This mode uses 1 "bucket" per descriptor with
87928c2ecf20Sopenharmony_ci * multiple fixed-size packet buffers within each bucket. For a full
87938c2ecf20Sopenharmony_ci * description see SF-119419-TC. This mode is only supported by "dpdk" datapath
87948c2ecf20Sopenharmony_ci * firmware.
87958c2ecf20Sopenharmony_ci */
87968c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_EQUAL_STRIDE_SUPER_BUFFER 0x2
87978c2ecf20Sopenharmony_ci/* enum: Deprecated name for EQUAL_STRIDE_SUPER_BUFFER. */
87988c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_EQUAL_STRIDE_PACKED_STREAM 0x2
87998c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_SNAPSHOT_MODE_OFST 16
88008c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_SNAPSHOT_MODE_LBN 14
88018c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_SNAPSHOT_MODE_WIDTH 1
88028c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM_BUFF_SIZE_OFST 16
88038c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM_BUFF_SIZE_LBN 15
88048c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_PACKED_STREAM_BUFF_SIZE_WIDTH 3
88058c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_1M 0x0 /* enum */
88068c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_512K 0x1 /* enum */
88078c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_256K 0x2 /* enum */
88088c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_128K 0x3 /* enum */
88098c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_64K 0x4 /* enum */
88108c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_OFST 16
88118c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_LBN 18
88128c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_WIDTH 1
88138c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_OFST 16
88148c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_LBN 19
88158c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_WIDTH 1
88168c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_NO_CONT_EV_OFST 16
88178c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_NO_CONT_EV_LBN 20
88188c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_EXT_IN_FLAG_NO_CONT_EV_WIDTH 1
88198c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
88208c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_OWNER_ID_OFST 20
88218c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_OWNER_ID_LEN 4
88228c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
88238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_PORT_ID_OFST 24
88248c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_PORT_ID_LEN 4
88258c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
88268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_OFST 28
88278c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_LEN 8
88288c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_LO_OFST 28
88298c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_HI_OFST 32
88308c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_DMA_ADDR_NUM 64
88318c2ecf20Sopenharmony_ci/* Maximum length of packet to receive, if SNAPSHOT_MODE flag is set */
88328c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_SNAPSHOT_LENGTH_OFST 540
88338c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_EXT_IN_SNAPSHOT_LENGTH_LEN 4
88348c2ecf20Sopenharmony_ci
88358c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_V3_IN msgrequest */
88368c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_V3_IN_LEN 560
88378c2ecf20Sopenharmony_ci/* Size, in entries */
88388c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_SIZE_OFST 0
88398c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_SIZE_LEN 4
88408c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to
88418c2ecf20Sopenharmony_ci * INIT_EVQ. If DMA_MODE == PACKED_STREAM this must be equal to INSTANCE.
88428c2ecf20Sopenharmony_ci */
88438c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_TARGET_EVQ_OFST 4
88448c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_TARGET_EVQ_LEN 4
88458c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range.
88468c2ecf20Sopenharmony_ci * This field is ignored if DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER or DMA_MODE
88478c2ecf20Sopenharmony_ci * == PACKED_STREAM.
88488c2ecf20Sopenharmony_ci */
88498c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_LABEL_OFST 8
88508c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_LABEL_LEN 4
88518c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
88528c2ecf20Sopenharmony_ci * local queue index.
88538c2ecf20Sopenharmony_ci */
88548c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_INSTANCE_OFST 12
88558c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_INSTANCE_LEN 4
88568c2ecf20Sopenharmony_ci/* There will be more flags here. */
88578c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_FLAGS_OFST 16
88588c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_FLAGS_LEN 4
88598c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_BUFF_MODE_OFST 16
88608c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_BUFF_MODE_LBN 0
88618c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_BUFF_MODE_WIDTH 1
88628c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_HDR_SPLIT_OFST 16
88638c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_HDR_SPLIT_LBN 1
88648c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_HDR_SPLIT_WIDTH 1
88658c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_TIMESTAMP_OFST 16
88668c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_TIMESTAMP_LBN 2
88678c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_TIMESTAMP_WIDTH 1
88688c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_CRC_MODE_OFST 16
88698c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_CRC_MODE_LBN 3
88708c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_CRC_MODE_WIDTH 4
88718c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_CHAIN_OFST 16
88728c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_CHAIN_LBN 7
88738c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_CHAIN_WIDTH 1
88748c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_PREFIX_OFST 16
88758c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_PREFIX_LBN 8
88768c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_PREFIX_WIDTH 1
88778c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_DISABLE_SCATTER_OFST 16
88788c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_DISABLE_SCATTER_LBN 9
88798c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_DISABLE_SCATTER_WIDTH 1
88808c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_DMA_MODE_OFST 16
88818c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_DMA_MODE_LBN 10
88828c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_DMA_MODE_WIDTH 4
88838c2ecf20Sopenharmony_ci/* enum: One packet per descriptor (for normal networking) */
88848c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_SINGLE_PACKET 0x0
88858c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors (for SolarCapture) */
88868c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_PACKED_STREAM 0x1
88878c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors using the format designed
88888c2ecf20Sopenharmony_ci * to maximise packet rate. This mode uses 1 "bucket" per descriptor with
88898c2ecf20Sopenharmony_ci * multiple fixed-size packet buffers within each bucket. For a full
88908c2ecf20Sopenharmony_ci * description see SF-119419-TC. This mode is only supported by "dpdk" datapath
88918c2ecf20Sopenharmony_ci * firmware.
88928c2ecf20Sopenharmony_ci */
88938c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_EQUAL_STRIDE_SUPER_BUFFER 0x2
88948c2ecf20Sopenharmony_ci/* enum: Deprecated name for EQUAL_STRIDE_SUPER_BUFFER. */
88958c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_EQUAL_STRIDE_PACKED_STREAM 0x2
88968c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_SNAPSHOT_MODE_OFST 16
88978c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_SNAPSHOT_MODE_LBN 14
88988c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_SNAPSHOT_MODE_WIDTH 1
88998c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_PACKED_STREAM_BUFF_SIZE_OFST 16
89008c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_PACKED_STREAM_BUFF_SIZE_LBN 15
89018c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_PACKED_STREAM_BUFF_SIZE_WIDTH 3
89028c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_PS_BUFF_1M 0x0 /* enum */
89038c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_PS_BUFF_512K 0x1 /* enum */
89048c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_PS_BUFF_256K 0x2 /* enum */
89058c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_PS_BUFF_128K 0x3 /* enum */
89068c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V3_IN_PS_BUFF_64K 0x4 /* enum */
89078c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_WANT_OUTER_CLASSES_OFST 16
89088c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_WANT_OUTER_CLASSES_LBN 18
89098c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_WANT_OUTER_CLASSES_WIDTH 1
89108c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_FORCE_EV_MERGING_OFST 16
89118c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_FORCE_EV_MERGING_LBN 19
89128c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_FORCE_EV_MERGING_WIDTH 1
89138c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_NO_CONT_EV_OFST 16
89148c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_NO_CONT_EV_LBN 20
89158c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V3_IN_FLAG_NO_CONT_EV_WIDTH 1
89168c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
89178c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_OWNER_ID_OFST 20
89188c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_OWNER_ID_LEN 4
89198c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
89208c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_PORT_ID_OFST 24
89218c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_PORT_ID_LEN 4
89228c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
89238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_DMA_ADDR_OFST 28
89248c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_DMA_ADDR_LEN 8
89258c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_DMA_ADDR_LO_OFST 28
89268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_DMA_ADDR_HI_OFST 32
89278c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_DMA_ADDR_NUM 64
89288c2ecf20Sopenharmony_ci/* Maximum length of packet to receive, if SNAPSHOT_MODE flag is set */
89298c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_SNAPSHOT_LENGTH_OFST 540
89308c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_SNAPSHOT_LENGTH_LEN 4
89318c2ecf20Sopenharmony_ci/* The number of packet buffers that will be contained within each
89328c2ecf20Sopenharmony_ci * EQUAL_STRIDE_SUPER_BUFFER format bucket supplied by the driver. This field
89338c2ecf20Sopenharmony_ci * is ignored unless DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
89348c2ecf20Sopenharmony_ci */
89358c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_PACKET_BUFFERS_PER_BUCKET_OFST 544
89368c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_PACKET_BUFFERS_PER_BUCKET_LEN 4
89378c2ecf20Sopenharmony_ci/* The length in bytes of the area in each packet buffer that can be written to
89388c2ecf20Sopenharmony_ci * by the adapter. This is used to store the packet prefix and the packet
89398c2ecf20Sopenharmony_ci * payload. This length does not include any end padding added by the driver.
89408c2ecf20Sopenharmony_ci * This field is ignored unless DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
89418c2ecf20Sopenharmony_ci */
89428c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_MAX_DMA_LEN_OFST 548
89438c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_MAX_DMA_LEN_LEN 4
89448c2ecf20Sopenharmony_ci/* The length in bytes of a single packet buffer within a
89458c2ecf20Sopenharmony_ci * EQUAL_STRIDE_SUPER_BUFFER format bucket. This field is ignored unless
89468c2ecf20Sopenharmony_ci * DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
89478c2ecf20Sopenharmony_ci */
89488c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_PACKET_STRIDE_OFST 552
89498c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_PACKET_STRIDE_LEN 4
89508c2ecf20Sopenharmony_ci/* The maximum time in nanoseconds that the datapath will be backpressured if
89518c2ecf20Sopenharmony_ci * there are no RX descriptors available. If the timeout is reached and there
89528c2ecf20Sopenharmony_ci * are still no descriptors then the packet will be dropped. A timeout of 0
89538c2ecf20Sopenharmony_ci * means the datapath will never be blocked. This field is ignored unless
89548c2ecf20Sopenharmony_ci * DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
89558c2ecf20Sopenharmony_ci */
89568c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_HEAD_OF_LINE_BLOCK_TIMEOUT_OFST 556
89578c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V3_IN_ES_HEAD_OF_LINE_BLOCK_TIMEOUT_LEN 4
89588c2ecf20Sopenharmony_ci
89598c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_V4_IN msgrequest: INIT_RXQ request with new field required
89608c2ecf20Sopenharmony_ci * for systems with a QDMA (currently, Riverhead)
89618c2ecf20Sopenharmony_ci */
89628c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_V4_IN_LEN 564
89638c2ecf20Sopenharmony_ci/* Size, in entries */
89648c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_SIZE_OFST 0
89658c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_SIZE_LEN 4
89668c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to
89678c2ecf20Sopenharmony_ci * INIT_EVQ. If DMA_MODE == PACKED_STREAM this must be equal to INSTANCE.
89688c2ecf20Sopenharmony_ci */
89698c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_TARGET_EVQ_OFST 4
89708c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_TARGET_EVQ_LEN 4
89718c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range.
89728c2ecf20Sopenharmony_ci * This field is ignored if DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER or DMA_MODE
89738c2ecf20Sopenharmony_ci * == PACKED_STREAM.
89748c2ecf20Sopenharmony_ci */
89758c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_LABEL_OFST 8
89768c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_LABEL_LEN 4
89778c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
89788c2ecf20Sopenharmony_ci * local queue index.
89798c2ecf20Sopenharmony_ci */
89808c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_INSTANCE_OFST 12
89818c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_INSTANCE_LEN 4
89828c2ecf20Sopenharmony_ci/* There will be more flags here. */
89838c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_FLAGS_OFST 16
89848c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_FLAGS_LEN 4
89858c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_BUFF_MODE_OFST 16
89868c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_BUFF_MODE_LBN 0
89878c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_BUFF_MODE_WIDTH 1
89888c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_HDR_SPLIT_OFST 16
89898c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_HDR_SPLIT_LBN 1
89908c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_HDR_SPLIT_WIDTH 1
89918c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_TIMESTAMP_OFST 16
89928c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_TIMESTAMP_LBN 2
89938c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_TIMESTAMP_WIDTH 1
89948c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_CRC_MODE_OFST 16
89958c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_CRC_MODE_LBN 3
89968c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_CRC_MODE_WIDTH 4
89978c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_CHAIN_OFST 16
89988c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_CHAIN_LBN 7
89998c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_CHAIN_WIDTH 1
90008c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_PREFIX_OFST 16
90018c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_PREFIX_LBN 8
90028c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_PREFIX_WIDTH 1
90038c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_DISABLE_SCATTER_OFST 16
90048c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_DISABLE_SCATTER_LBN 9
90058c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_DISABLE_SCATTER_WIDTH 1
90068c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_DMA_MODE_OFST 16
90078c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_DMA_MODE_LBN 10
90088c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_DMA_MODE_WIDTH 4
90098c2ecf20Sopenharmony_ci/* enum: One packet per descriptor (for normal networking) */
90108c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_SINGLE_PACKET 0x0
90118c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors (for SolarCapture) */
90128c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_PACKED_STREAM 0x1
90138c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors using the format designed
90148c2ecf20Sopenharmony_ci * to maximise packet rate. This mode uses 1 "bucket" per descriptor with
90158c2ecf20Sopenharmony_ci * multiple fixed-size packet buffers within each bucket. For a full
90168c2ecf20Sopenharmony_ci * description see SF-119419-TC. This mode is only supported by "dpdk" datapath
90178c2ecf20Sopenharmony_ci * firmware.
90188c2ecf20Sopenharmony_ci */
90198c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_EQUAL_STRIDE_SUPER_BUFFER 0x2
90208c2ecf20Sopenharmony_ci/* enum: Deprecated name for EQUAL_STRIDE_SUPER_BUFFER. */
90218c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_EQUAL_STRIDE_PACKED_STREAM 0x2
90228c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_SNAPSHOT_MODE_OFST 16
90238c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_SNAPSHOT_MODE_LBN 14
90248c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_SNAPSHOT_MODE_WIDTH 1
90258c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_PACKED_STREAM_BUFF_SIZE_OFST 16
90268c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_PACKED_STREAM_BUFF_SIZE_LBN 15
90278c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_PACKED_STREAM_BUFF_SIZE_WIDTH 3
90288c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_PS_BUFF_1M 0x0 /* enum */
90298c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_PS_BUFF_512K 0x1 /* enum */
90308c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_PS_BUFF_256K 0x2 /* enum */
90318c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_PS_BUFF_128K 0x3 /* enum */
90328c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V4_IN_PS_BUFF_64K 0x4 /* enum */
90338c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_WANT_OUTER_CLASSES_OFST 16
90348c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_WANT_OUTER_CLASSES_LBN 18
90358c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_WANT_OUTER_CLASSES_WIDTH 1
90368c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_FORCE_EV_MERGING_OFST 16
90378c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_FORCE_EV_MERGING_LBN 19
90388c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_FORCE_EV_MERGING_WIDTH 1
90398c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_NO_CONT_EV_OFST 16
90408c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_NO_CONT_EV_LBN 20
90418c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V4_IN_FLAG_NO_CONT_EV_WIDTH 1
90428c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
90438c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_OWNER_ID_OFST 20
90448c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_OWNER_ID_LEN 4
90458c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
90468c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_PORT_ID_OFST 24
90478c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_PORT_ID_LEN 4
90488c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
90498c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_DMA_ADDR_OFST 28
90508c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_DMA_ADDR_LEN 8
90518c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_DMA_ADDR_LO_OFST 28
90528c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_DMA_ADDR_HI_OFST 32
90538c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_DMA_ADDR_NUM 64
90548c2ecf20Sopenharmony_ci/* Maximum length of packet to receive, if SNAPSHOT_MODE flag is set */
90558c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_SNAPSHOT_LENGTH_OFST 540
90568c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_SNAPSHOT_LENGTH_LEN 4
90578c2ecf20Sopenharmony_ci/* The number of packet buffers that will be contained within each
90588c2ecf20Sopenharmony_ci * EQUAL_STRIDE_SUPER_BUFFER format bucket supplied by the driver. This field
90598c2ecf20Sopenharmony_ci * is ignored unless DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
90608c2ecf20Sopenharmony_ci */
90618c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_PACKET_BUFFERS_PER_BUCKET_OFST 544
90628c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_PACKET_BUFFERS_PER_BUCKET_LEN 4
90638c2ecf20Sopenharmony_ci/* The length in bytes of the area in each packet buffer that can be written to
90648c2ecf20Sopenharmony_ci * by the adapter. This is used to store the packet prefix and the packet
90658c2ecf20Sopenharmony_ci * payload. This length does not include any end padding added by the driver.
90668c2ecf20Sopenharmony_ci * This field is ignored unless DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
90678c2ecf20Sopenharmony_ci */
90688c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_MAX_DMA_LEN_OFST 548
90698c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_MAX_DMA_LEN_LEN 4
90708c2ecf20Sopenharmony_ci/* The length in bytes of a single packet buffer within a
90718c2ecf20Sopenharmony_ci * EQUAL_STRIDE_SUPER_BUFFER format bucket. This field is ignored unless
90728c2ecf20Sopenharmony_ci * DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
90738c2ecf20Sopenharmony_ci */
90748c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_PACKET_STRIDE_OFST 552
90758c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_PACKET_STRIDE_LEN 4
90768c2ecf20Sopenharmony_ci/* The maximum time in nanoseconds that the datapath will be backpressured if
90778c2ecf20Sopenharmony_ci * there are no RX descriptors available. If the timeout is reached and there
90788c2ecf20Sopenharmony_ci * are still no descriptors then the packet will be dropped. A timeout of 0
90798c2ecf20Sopenharmony_ci * means the datapath will never be blocked. This field is ignored unless
90808c2ecf20Sopenharmony_ci * DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
90818c2ecf20Sopenharmony_ci */
90828c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_HEAD_OF_LINE_BLOCK_TIMEOUT_OFST 556
90838c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_ES_HEAD_OF_LINE_BLOCK_TIMEOUT_LEN 4
90848c2ecf20Sopenharmony_ci/* V4 message data */
90858c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_V4_DATA_OFST 560
90868c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_V4_DATA_LEN 4
90878c2ecf20Sopenharmony_ci/* Size in bytes of buffers attached to descriptors posted to this queue. Set
90888c2ecf20Sopenharmony_ci * to zero if using this message on non-QDMA based platforms. Currently in
90898c2ecf20Sopenharmony_ci * Riverhead there is a global limit of eight different buffer sizes across all
90908c2ecf20Sopenharmony_ci * active queues. A 2KB and 4KB buffer is guaranteed to be available, but a
90918c2ecf20Sopenharmony_ci * request for a different buffer size will fail if there are already eight
90928c2ecf20Sopenharmony_ci * other buffer sizes in use. In future Riverhead this limit will go away and
90938c2ecf20Sopenharmony_ci * any size will be accepted.
90948c2ecf20Sopenharmony_ci */
90958c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_BUFFER_SIZE_BYTES_OFST 560
90968c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V4_IN_BUFFER_SIZE_BYTES_LEN 4
90978c2ecf20Sopenharmony_ci
90988c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_V5_IN msgrequest: INIT_RXQ request with ability to request a
90998c2ecf20Sopenharmony_ci * different RX packet prefix
91008c2ecf20Sopenharmony_ci */
91018c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_V5_IN_LEN 568
91028c2ecf20Sopenharmony_ci/* Size, in entries */
91038c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_SIZE_OFST 0
91048c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_SIZE_LEN 4
91058c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to
91068c2ecf20Sopenharmony_ci * INIT_EVQ. If DMA_MODE == PACKED_STREAM this must be equal to INSTANCE.
91078c2ecf20Sopenharmony_ci */
91088c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_TARGET_EVQ_OFST 4
91098c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_TARGET_EVQ_LEN 4
91108c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range.
91118c2ecf20Sopenharmony_ci * This field is ignored if DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER or DMA_MODE
91128c2ecf20Sopenharmony_ci * == PACKED_STREAM.
91138c2ecf20Sopenharmony_ci */
91148c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_LABEL_OFST 8
91158c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_LABEL_LEN 4
91168c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
91178c2ecf20Sopenharmony_ci * local queue index.
91188c2ecf20Sopenharmony_ci */
91198c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_INSTANCE_OFST 12
91208c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_INSTANCE_LEN 4
91218c2ecf20Sopenharmony_ci/* There will be more flags here. */
91228c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_FLAGS_OFST 16
91238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_FLAGS_LEN 4
91248c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_BUFF_MODE_OFST 16
91258c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_BUFF_MODE_LBN 0
91268c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_BUFF_MODE_WIDTH 1
91278c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_HDR_SPLIT_OFST 16
91288c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_HDR_SPLIT_LBN 1
91298c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_HDR_SPLIT_WIDTH 1
91308c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_TIMESTAMP_OFST 16
91318c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_TIMESTAMP_LBN 2
91328c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_TIMESTAMP_WIDTH 1
91338c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_CRC_MODE_OFST 16
91348c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_CRC_MODE_LBN 3
91358c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_CRC_MODE_WIDTH 4
91368c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_CHAIN_OFST 16
91378c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_CHAIN_LBN 7
91388c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_CHAIN_WIDTH 1
91398c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_PREFIX_OFST 16
91408c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_PREFIX_LBN 8
91418c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_PREFIX_WIDTH 1
91428c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_DISABLE_SCATTER_OFST 16
91438c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_DISABLE_SCATTER_LBN 9
91448c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_DISABLE_SCATTER_WIDTH 1
91458c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_DMA_MODE_OFST 16
91468c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_DMA_MODE_LBN 10
91478c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_DMA_MODE_WIDTH 4
91488c2ecf20Sopenharmony_ci/* enum: One packet per descriptor (for normal networking) */
91498c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_SINGLE_PACKET 0x0
91508c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors (for SolarCapture) */
91518c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_PACKED_STREAM 0x1
91528c2ecf20Sopenharmony_ci/* enum: Pack multiple packets into large descriptors using the format designed
91538c2ecf20Sopenharmony_ci * to maximise packet rate. This mode uses 1 "bucket" per descriptor with
91548c2ecf20Sopenharmony_ci * multiple fixed-size packet buffers within each bucket. For a full
91558c2ecf20Sopenharmony_ci * description see SF-119419-TC. This mode is only supported by "dpdk" datapath
91568c2ecf20Sopenharmony_ci * firmware.
91578c2ecf20Sopenharmony_ci */
91588c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_EQUAL_STRIDE_SUPER_BUFFER 0x2
91598c2ecf20Sopenharmony_ci/* enum: Deprecated name for EQUAL_STRIDE_SUPER_BUFFER. */
91608c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_EQUAL_STRIDE_PACKED_STREAM 0x2
91618c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_SNAPSHOT_MODE_OFST 16
91628c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_SNAPSHOT_MODE_LBN 14
91638c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_SNAPSHOT_MODE_WIDTH 1
91648c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_PACKED_STREAM_BUFF_SIZE_OFST 16
91658c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_PACKED_STREAM_BUFF_SIZE_LBN 15
91668c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_PACKED_STREAM_BUFF_SIZE_WIDTH 3
91678c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_PS_BUFF_1M 0x0 /* enum */
91688c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_PS_BUFF_512K 0x1 /* enum */
91698c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_PS_BUFF_256K 0x2 /* enum */
91708c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_PS_BUFF_128K 0x3 /* enum */
91718c2ecf20Sopenharmony_ci#define          MC_CMD_INIT_RXQ_V5_IN_PS_BUFF_64K 0x4 /* enum */
91728c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_WANT_OUTER_CLASSES_OFST 16
91738c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_WANT_OUTER_CLASSES_LBN 18
91748c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_WANT_OUTER_CLASSES_WIDTH 1
91758c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_FORCE_EV_MERGING_OFST 16
91768c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_FORCE_EV_MERGING_LBN 19
91778c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_FORCE_EV_MERGING_WIDTH 1
91788c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_NO_CONT_EV_OFST 16
91798c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_NO_CONT_EV_LBN 20
91808c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_RXQ_V5_IN_FLAG_NO_CONT_EV_WIDTH 1
91818c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
91828c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_OWNER_ID_OFST 20
91838c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_OWNER_ID_LEN 4
91848c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
91858c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_PORT_ID_OFST 24
91868c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_PORT_ID_LEN 4
91878c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
91888c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_DMA_ADDR_OFST 28
91898c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_DMA_ADDR_LEN 8
91908c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_DMA_ADDR_LO_OFST 28
91918c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_DMA_ADDR_HI_OFST 32
91928c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_DMA_ADDR_NUM 64
91938c2ecf20Sopenharmony_ci/* Maximum length of packet to receive, if SNAPSHOT_MODE flag is set */
91948c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_SNAPSHOT_LENGTH_OFST 540
91958c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_SNAPSHOT_LENGTH_LEN 4
91968c2ecf20Sopenharmony_ci/* The number of packet buffers that will be contained within each
91978c2ecf20Sopenharmony_ci * EQUAL_STRIDE_SUPER_BUFFER format bucket supplied by the driver. This field
91988c2ecf20Sopenharmony_ci * is ignored unless DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
91998c2ecf20Sopenharmony_ci */
92008c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_PACKET_BUFFERS_PER_BUCKET_OFST 544
92018c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_PACKET_BUFFERS_PER_BUCKET_LEN 4
92028c2ecf20Sopenharmony_ci/* The length in bytes of the area in each packet buffer that can be written to
92038c2ecf20Sopenharmony_ci * by the adapter. This is used to store the packet prefix and the packet
92048c2ecf20Sopenharmony_ci * payload. This length does not include any end padding added by the driver.
92058c2ecf20Sopenharmony_ci * This field is ignored unless DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
92068c2ecf20Sopenharmony_ci */
92078c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_MAX_DMA_LEN_OFST 548
92088c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_MAX_DMA_LEN_LEN 4
92098c2ecf20Sopenharmony_ci/* The length in bytes of a single packet buffer within a
92108c2ecf20Sopenharmony_ci * EQUAL_STRIDE_SUPER_BUFFER format bucket. This field is ignored unless
92118c2ecf20Sopenharmony_ci * DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
92128c2ecf20Sopenharmony_ci */
92138c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_PACKET_STRIDE_OFST 552
92148c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_PACKET_STRIDE_LEN 4
92158c2ecf20Sopenharmony_ci/* The maximum time in nanoseconds that the datapath will be backpressured if
92168c2ecf20Sopenharmony_ci * there are no RX descriptors available. If the timeout is reached and there
92178c2ecf20Sopenharmony_ci * are still no descriptors then the packet will be dropped. A timeout of 0
92188c2ecf20Sopenharmony_ci * means the datapath will never be blocked. This field is ignored unless
92198c2ecf20Sopenharmony_ci * DMA_MODE == EQUAL_STRIDE_SUPER_BUFFER.
92208c2ecf20Sopenharmony_ci */
92218c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_HEAD_OF_LINE_BLOCK_TIMEOUT_OFST 556
92228c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_ES_HEAD_OF_LINE_BLOCK_TIMEOUT_LEN 4
92238c2ecf20Sopenharmony_ci/* V4 message data */
92248c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_V4_DATA_OFST 560
92258c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_V4_DATA_LEN 4
92268c2ecf20Sopenharmony_ci/* Size in bytes of buffers attached to descriptors posted to this queue. Set
92278c2ecf20Sopenharmony_ci * to zero if using this message on non-QDMA based platforms. Currently in
92288c2ecf20Sopenharmony_ci * Riverhead there is a global limit of eight different buffer sizes across all
92298c2ecf20Sopenharmony_ci * active queues. A 2KB and 4KB buffer is guaranteed to be available, but a
92308c2ecf20Sopenharmony_ci * request for a different buffer size will fail if there are already eight
92318c2ecf20Sopenharmony_ci * other buffer sizes in use. In future Riverhead this limit will go away and
92328c2ecf20Sopenharmony_ci * any size will be accepted.
92338c2ecf20Sopenharmony_ci */
92348c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_BUFFER_SIZE_BYTES_OFST 560
92358c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_BUFFER_SIZE_BYTES_LEN 4
92368c2ecf20Sopenharmony_ci/* Prefix id for the RX prefix format to use on packets delivered this queue.
92378c2ecf20Sopenharmony_ci * Zero is always a valid prefix id and means the default prefix format
92388c2ecf20Sopenharmony_ci * documented for the platform. Other prefix ids can be obtained by calling
92398c2ecf20Sopenharmony_ci * MC_CMD_GET_RX_PREFIX_ID with a requested set of prefix fields.
92408c2ecf20Sopenharmony_ci */
92418c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_RX_PREFIX_ID_OFST 564
92428c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_RXQ_V5_IN_RX_PREFIX_ID_LEN 4
92438c2ecf20Sopenharmony_ci
92448c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_OUT msgresponse */
92458c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_OUT_LEN 0
92468c2ecf20Sopenharmony_ci
92478c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_EXT_OUT msgresponse */
92488c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_EXT_OUT_LEN 0
92498c2ecf20Sopenharmony_ci
92508c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_V3_OUT msgresponse */
92518c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_V3_OUT_LEN 0
92528c2ecf20Sopenharmony_ci
92538c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_V4_OUT msgresponse */
92548c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_V4_OUT_LEN 0
92558c2ecf20Sopenharmony_ci
92568c2ecf20Sopenharmony_ci/* MC_CMD_INIT_RXQ_V5_OUT msgresponse */
92578c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_RXQ_V5_OUT_LEN 0
92588c2ecf20Sopenharmony_ci
92598c2ecf20Sopenharmony_ci
92608c2ecf20Sopenharmony_ci/***********************************/
92618c2ecf20Sopenharmony_ci/* MC_CMD_INIT_TXQ
92628c2ecf20Sopenharmony_ci */
92638c2ecf20Sopenharmony_ci#define MC_CMD_INIT_TXQ 0x82
92648c2ecf20Sopenharmony_ci#undef MC_CMD_0x82_PRIVILEGE_CTG
92658c2ecf20Sopenharmony_ci
92668c2ecf20Sopenharmony_ci#define MC_CMD_0x82_PRIVILEGE_CTG SRIOV_CTG_GENERAL
92678c2ecf20Sopenharmony_ci
92688c2ecf20Sopenharmony_ci/* MC_CMD_INIT_TXQ_IN msgrequest: Legacy INIT_TXQ request. Use extended version
92698c2ecf20Sopenharmony_ci * in new code.
92708c2ecf20Sopenharmony_ci */
92718c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_IN_LENMIN 36
92728c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_IN_LENMAX 252
92738c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_IN_LENMAX_MCDI2 1020
92748c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_IN_LEN(num) (28+8*(num))
92758c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_IN_DMA_ADDR_NUM(len) (((len)-28)/8)
92768c2ecf20Sopenharmony_ci/* Size, in entries */
92778c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_SIZE_OFST 0
92788c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_SIZE_LEN 4
92798c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to
92808c2ecf20Sopenharmony_ci * INIT_EVQ.
92818c2ecf20Sopenharmony_ci */
92828c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_TARGET_EVQ_OFST 4
92838c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_TARGET_EVQ_LEN 4
92848c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range. */
92858c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_LABEL_OFST 8
92868c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_LABEL_LEN 4
92878c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
92888c2ecf20Sopenharmony_ci * local queue index.
92898c2ecf20Sopenharmony_ci */
92908c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_INSTANCE_OFST 12
92918c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_INSTANCE_LEN 4
92928c2ecf20Sopenharmony_ci/* There will be more flags here. */
92938c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_FLAGS_OFST 16
92948c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_FLAGS_LEN 4
92958c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_OFST 16
92968c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_LBN 0
92978c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_BUFF_MODE_WIDTH 1
92988c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_OFST 16
92998c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_LBN 1
93008c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_IP_CSUM_DIS_WIDTH 1
93018c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_OFST 16
93028c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_LBN 2
93038c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TCP_CSUM_DIS_WIDTH 1
93048c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_OFST 16
93058c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_LBN 3
93068c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TCP_UDP_ONLY_WIDTH 1
93078c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_CRC_MODE_OFST 16
93088c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_CRC_MODE_LBN 4
93098c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_CRC_MODE_WIDTH 4
93108c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_OFST 16
93118c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_LBN 8
93128c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_TIMESTAMP_WIDTH 1
93138c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_OFST 16
93148c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_LBN 9
93158c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_PACER_BYPASS_WIDTH 1
93168c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_INNER_IP_CSUM_EN_OFST 16
93178c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_INNER_IP_CSUM_EN_LBN 10
93188c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_INNER_IP_CSUM_EN_WIDTH 1
93198c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_INNER_TCP_CSUM_EN_OFST 16
93208c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_INNER_TCP_CSUM_EN_LBN 11
93218c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_IN_FLAG_INNER_TCP_CSUM_EN_WIDTH 1
93228c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
93238c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_OWNER_ID_OFST 20
93248c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_OWNER_ID_LEN 4
93258c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
93268c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_PORT_ID_OFST 24
93278c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_PORT_ID_LEN 4
93288c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
93298c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_OFST 28
93308c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_LEN 8
93318c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_LO_OFST 28
93328c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_HI_OFST 32
93338c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_MINNUM 1
93348c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_MAXNUM 28
93358c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_IN_DMA_ADDR_MAXNUM_MCDI2 124
93368c2ecf20Sopenharmony_ci
93378c2ecf20Sopenharmony_ci/* MC_CMD_INIT_TXQ_EXT_IN msgrequest: Extended INIT_TXQ with additional mode
93388c2ecf20Sopenharmony_ci * flags
93398c2ecf20Sopenharmony_ci */
93408c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_EXT_IN_LEN 544
93418c2ecf20Sopenharmony_ci/* Size, in entries */
93428c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_SIZE_OFST 0
93438c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_SIZE_LEN 4
93448c2ecf20Sopenharmony_ci/* The EVQ to send events to. This is an index originally specified to
93458c2ecf20Sopenharmony_ci * INIT_EVQ.
93468c2ecf20Sopenharmony_ci */
93478c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_TARGET_EVQ_OFST 4
93488c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_TARGET_EVQ_LEN 4
93498c2ecf20Sopenharmony_ci/* The value to put in the event data. Check hardware spec. for valid range. */
93508c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_LABEL_OFST 8
93518c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_LABEL_LEN 4
93528c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
93538c2ecf20Sopenharmony_ci * local queue index.
93548c2ecf20Sopenharmony_ci */
93558c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_INSTANCE_OFST 12
93568c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_INSTANCE_LEN 4
93578c2ecf20Sopenharmony_ci/* There will be more flags here. */
93588c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_FLAGS_OFST 16
93598c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_FLAGS_LEN 4
93608c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_BUFF_MODE_OFST 16
93618c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_BUFF_MODE_LBN 0
93628c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_BUFF_MODE_WIDTH 1
93638c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_IP_CSUM_DIS_OFST 16
93648c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_IP_CSUM_DIS_LBN 1
93658c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_IP_CSUM_DIS_WIDTH 1
93668c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_CSUM_DIS_OFST 16
93678c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_CSUM_DIS_LBN 2
93688c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_CSUM_DIS_WIDTH 1
93698c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_UDP_ONLY_OFST 16
93708c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_UDP_ONLY_LBN 3
93718c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TCP_UDP_ONLY_WIDTH 1
93728c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_CRC_MODE_OFST 16
93738c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_CRC_MODE_LBN 4
93748c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_CRC_MODE_WIDTH 4
93758c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TIMESTAMP_OFST 16
93768c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TIMESTAMP_LBN 8
93778c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TIMESTAMP_WIDTH 1
93788c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_PACER_BYPASS_OFST 16
93798c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_PACER_BYPASS_LBN 9
93808c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_PACER_BYPASS_WIDTH 1
93818c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_IP_CSUM_EN_OFST 16
93828c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_IP_CSUM_EN_LBN 10
93838c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_IP_CSUM_EN_WIDTH 1
93848c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_TCP_CSUM_EN_OFST 16
93858c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_TCP_CSUM_EN_LBN 11
93868c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_INNER_TCP_CSUM_EN_WIDTH 1
93878c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TSOV2_EN_OFST 16
93888c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TSOV2_EN_LBN 12
93898c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_TSOV2_EN_WIDTH 1
93908c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_OFST 16
93918c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_LBN 13
93928c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_WIDTH 1
93938c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_UTHRESH_OFST 16
93948c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_UTHRESH_LBN 14
93958c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_CTPIO_UTHRESH_WIDTH 1
93968c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_M2M_D2C_OFST 16
93978c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_M2M_D2C_LBN 15
93988c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_M2M_D2C_WIDTH 1
93998c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_DESC_PROXY_OFST 16
94008c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_DESC_PROXY_LBN 16
94018c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_FLAG_DESC_PROXY_WIDTH 1
94028c2ecf20Sopenharmony_ci/* Owner ID to use if in buffer mode (zero if physical) */
94038c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_OWNER_ID_OFST 20
94048c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_OWNER_ID_LEN 4
94058c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this DMAQ. */
94068c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_PORT_ID_OFST 24
94078c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_PORT_ID_LEN 4
94088c2ecf20Sopenharmony_ci/* 64-bit address of 4k of 4k-aligned host memory buffer */
94098c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_OFST 28
94108c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_LEN 8
94118c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_LO_OFST 28
94128c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_HI_OFST 32
94138c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_MINNUM 1
94148c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_MAXNUM 64
94158c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_DMA_ADDR_MAXNUM_MCDI2 64
94168c2ecf20Sopenharmony_ci/* Flags related to Qbb flow control mode. */
94178c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_QBB_FLAGS_OFST 540
94188c2ecf20Sopenharmony_ci#define       MC_CMD_INIT_TXQ_EXT_IN_QBB_FLAGS_LEN 4
94198c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_QBB_ENABLE_OFST 540
94208c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_QBB_ENABLE_LBN 0
94218c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_QBB_ENABLE_WIDTH 1
94228c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_QBB_PRIORITY_OFST 540
94238c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_QBB_PRIORITY_LBN 1
94248c2ecf20Sopenharmony_ci#define        MC_CMD_INIT_TXQ_EXT_IN_QBB_PRIORITY_WIDTH 3
94258c2ecf20Sopenharmony_ci
94268c2ecf20Sopenharmony_ci/* MC_CMD_INIT_TXQ_OUT msgresponse */
94278c2ecf20Sopenharmony_ci#define    MC_CMD_INIT_TXQ_OUT_LEN 0
94288c2ecf20Sopenharmony_ci
94298c2ecf20Sopenharmony_ci
94308c2ecf20Sopenharmony_ci/***********************************/
94318c2ecf20Sopenharmony_ci/* MC_CMD_FINI_EVQ
94328c2ecf20Sopenharmony_ci * Teardown an EVQ.
94338c2ecf20Sopenharmony_ci *
94348c2ecf20Sopenharmony_ci * All DMAQs or EVQs that point to the EVQ to tear down must be torn down first
94358c2ecf20Sopenharmony_ci * or the operation will fail with EBUSY
94368c2ecf20Sopenharmony_ci */
94378c2ecf20Sopenharmony_ci#define MC_CMD_FINI_EVQ 0x83
94388c2ecf20Sopenharmony_ci#undef MC_CMD_0x83_PRIVILEGE_CTG
94398c2ecf20Sopenharmony_ci
94408c2ecf20Sopenharmony_ci#define MC_CMD_0x83_PRIVILEGE_CTG SRIOV_CTG_GENERAL
94418c2ecf20Sopenharmony_ci
94428c2ecf20Sopenharmony_ci/* MC_CMD_FINI_EVQ_IN msgrequest */
94438c2ecf20Sopenharmony_ci#define    MC_CMD_FINI_EVQ_IN_LEN 4
94448c2ecf20Sopenharmony_ci/* Instance of EVQ to destroy. Should be the same instance as that previously
94458c2ecf20Sopenharmony_ci * passed to INIT_EVQ
94468c2ecf20Sopenharmony_ci */
94478c2ecf20Sopenharmony_ci#define       MC_CMD_FINI_EVQ_IN_INSTANCE_OFST 0
94488c2ecf20Sopenharmony_ci#define       MC_CMD_FINI_EVQ_IN_INSTANCE_LEN 4
94498c2ecf20Sopenharmony_ci
94508c2ecf20Sopenharmony_ci/* MC_CMD_FINI_EVQ_OUT msgresponse */
94518c2ecf20Sopenharmony_ci#define    MC_CMD_FINI_EVQ_OUT_LEN 0
94528c2ecf20Sopenharmony_ci
94538c2ecf20Sopenharmony_ci
94548c2ecf20Sopenharmony_ci/***********************************/
94558c2ecf20Sopenharmony_ci/* MC_CMD_FINI_RXQ
94568c2ecf20Sopenharmony_ci * Teardown a RXQ.
94578c2ecf20Sopenharmony_ci */
94588c2ecf20Sopenharmony_ci#define MC_CMD_FINI_RXQ 0x84
94598c2ecf20Sopenharmony_ci#undef MC_CMD_0x84_PRIVILEGE_CTG
94608c2ecf20Sopenharmony_ci
94618c2ecf20Sopenharmony_ci#define MC_CMD_0x84_PRIVILEGE_CTG SRIOV_CTG_GENERAL
94628c2ecf20Sopenharmony_ci
94638c2ecf20Sopenharmony_ci/* MC_CMD_FINI_RXQ_IN msgrequest */
94648c2ecf20Sopenharmony_ci#define    MC_CMD_FINI_RXQ_IN_LEN 4
94658c2ecf20Sopenharmony_ci/* Instance of RXQ to destroy */
94668c2ecf20Sopenharmony_ci#define       MC_CMD_FINI_RXQ_IN_INSTANCE_OFST 0
94678c2ecf20Sopenharmony_ci#define       MC_CMD_FINI_RXQ_IN_INSTANCE_LEN 4
94688c2ecf20Sopenharmony_ci
94698c2ecf20Sopenharmony_ci/* MC_CMD_FINI_RXQ_OUT msgresponse */
94708c2ecf20Sopenharmony_ci#define    MC_CMD_FINI_RXQ_OUT_LEN 0
94718c2ecf20Sopenharmony_ci
94728c2ecf20Sopenharmony_ci
94738c2ecf20Sopenharmony_ci/***********************************/
94748c2ecf20Sopenharmony_ci/* MC_CMD_FINI_TXQ
94758c2ecf20Sopenharmony_ci * Teardown a TXQ.
94768c2ecf20Sopenharmony_ci */
94778c2ecf20Sopenharmony_ci#define MC_CMD_FINI_TXQ 0x85
94788c2ecf20Sopenharmony_ci#undef MC_CMD_0x85_PRIVILEGE_CTG
94798c2ecf20Sopenharmony_ci
94808c2ecf20Sopenharmony_ci#define MC_CMD_0x85_PRIVILEGE_CTG SRIOV_CTG_GENERAL
94818c2ecf20Sopenharmony_ci
94828c2ecf20Sopenharmony_ci/* MC_CMD_FINI_TXQ_IN msgrequest */
94838c2ecf20Sopenharmony_ci#define    MC_CMD_FINI_TXQ_IN_LEN 4
94848c2ecf20Sopenharmony_ci/* Instance of TXQ to destroy */
94858c2ecf20Sopenharmony_ci#define       MC_CMD_FINI_TXQ_IN_INSTANCE_OFST 0
94868c2ecf20Sopenharmony_ci#define       MC_CMD_FINI_TXQ_IN_INSTANCE_LEN 4
94878c2ecf20Sopenharmony_ci
94888c2ecf20Sopenharmony_ci/* MC_CMD_FINI_TXQ_OUT msgresponse */
94898c2ecf20Sopenharmony_ci#define    MC_CMD_FINI_TXQ_OUT_LEN 0
94908c2ecf20Sopenharmony_ci
94918c2ecf20Sopenharmony_ci
94928c2ecf20Sopenharmony_ci/***********************************/
94938c2ecf20Sopenharmony_ci/* MC_CMD_DRIVER_EVENT
94948c2ecf20Sopenharmony_ci * Generate an event on an EVQ belonging to the function issuing the command.
94958c2ecf20Sopenharmony_ci */
94968c2ecf20Sopenharmony_ci#define MC_CMD_DRIVER_EVENT 0x86
94978c2ecf20Sopenharmony_ci#undef MC_CMD_0x86_PRIVILEGE_CTG
94988c2ecf20Sopenharmony_ci
94998c2ecf20Sopenharmony_ci#define MC_CMD_0x86_PRIVILEGE_CTG SRIOV_CTG_GENERAL
95008c2ecf20Sopenharmony_ci
95018c2ecf20Sopenharmony_ci/* MC_CMD_DRIVER_EVENT_IN msgrequest */
95028c2ecf20Sopenharmony_ci#define    MC_CMD_DRIVER_EVENT_IN_LEN 12
95038c2ecf20Sopenharmony_ci/* Handle of target EVQ */
95048c2ecf20Sopenharmony_ci#define       MC_CMD_DRIVER_EVENT_IN_EVQ_OFST 0
95058c2ecf20Sopenharmony_ci#define       MC_CMD_DRIVER_EVENT_IN_EVQ_LEN 4
95068c2ecf20Sopenharmony_ci/* Bits 0 - 63 of event */
95078c2ecf20Sopenharmony_ci#define       MC_CMD_DRIVER_EVENT_IN_DATA_OFST 4
95088c2ecf20Sopenharmony_ci#define       MC_CMD_DRIVER_EVENT_IN_DATA_LEN 8
95098c2ecf20Sopenharmony_ci#define       MC_CMD_DRIVER_EVENT_IN_DATA_LO_OFST 4
95108c2ecf20Sopenharmony_ci#define       MC_CMD_DRIVER_EVENT_IN_DATA_HI_OFST 8
95118c2ecf20Sopenharmony_ci
95128c2ecf20Sopenharmony_ci/* MC_CMD_DRIVER_EVENT_OUT msgresponse */
95138c2ecf20Sopenharmony_ci#define    MC_CMD_DRIVER_EVENT_OUT_LEN 0
95148c2ecf20Sopenharmony_ci
95158c2ecf20Sopenharmony_ci
95168c2ecf20Sopenharmony_ci/***********************************/
95178c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CMD
95188c2ecf20Sopenharmony_ci * Execute an arbitrary MCDI command on behalf of a different function, subject
95198c2ecf20Sopenharmony_ci * to security restrictions. The command to be proxied follows immediately
95208c2ecf20Sopenharmony_ci * afterward in the host buffer (or on the UART). This command supercedes
95218c2ecf20Sopenharmony_ci * MC_CMD_SET_FUNC, which remains available for Siena but now deprecated.
95228c2ecf20Sopenharmony_ci */
95238c2ecf20Sopenharmony_ci#define MC_CMD_PROXY_CMD 0x5b
95248c2ecf20Sopenharmony_ci#undef MC_CMD_0x5b_PRIVILEGE_CTG
95258c2ecf20Sopenharmony_ci
95268c2ecf20Sopenharmony_ci#define MC_CMD_0x5b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
95278c2ecf20Sopenharmony_ci
95288c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CMD_IN msgrequest */
95298c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_CMD_IN_LEN 4
95308c2ecf20Sopenharmony_ci/* The handle of the target function. */
95318c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CMD_IN_TARGET_OFST 0
95328c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CMD_IN_TARGET_LEN 4
95338c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CMD_IN_TARGET_PF_OFST 0
95348c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CMD_IN_TARGET_PF_LBN 0
95358c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CMD_IN_TARGET_PF_WIDTH 16
95368c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CMD_IN_TARGET_VF_OFST 0
95378c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CMD_IN_TARGET_VF_LBN 16
95388c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CMD_IN_TARGET_VF_WIDTH 16
95398c2ecf20Sopenharmony_ci#define          MC_CMD_PROXY_CMD_IN_VF_NULL 0xffff /* enum */
95408c2ecf20Sopenharmony_ci
95418c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CMD_OUT msgresponse */
95428c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_CMD_OUT_LEN 0
95438c2ecf20Sopenharmony_ci
95448c2ecf20Sopenharmony_ci/* MC_PROXY_STATUS_BUFFER structuredef: Host memory status buffer used to
95458c2ecf20Sopenharmony_ci * manage proxied requests
95468c2ecf20Sopenharmony_ci */
95478c2ecf20Sopenharmony_ci#define    MC_PROXY_STATUS_BUFFER_LEN 16
95488c2ecf20Sopenharmony_ci/* Handle allocated by the firmware for this proxy transaction */
95498c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_HANDLE_OFST 0
95508c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_HANDLE_LEN 4
95518c2ecf20Sopenharmony_ci/* enum: An invalid handle. */
95528c2ecf20Sopenharmony_ci#define          MC_PROXY_STATUS_BUFFER_HANDLE_INVALID 0x0
95538c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_HANDLE_LBN 0
95548c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_HANDLE_WIDTH 32
95558c2ecf20Sopenharmony_ci/* The requesting physical function number */
95568c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_PF_OFST 4
95578c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_PF_LEN 2
95588c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_PF_LBN 32
95598c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_PF_WIDTH 16
95608c2ecf20Sopenharmony_ci/* The requesting virtual function number. Set to VF_NULL if the target is a
95618c2ecf20Sopenharmony_ci * PF.
95628c2ecf20Sopenharmony_ci */
95638c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_VF_OFST 6
95648c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_VF_LEN 2
95658c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_VF_LBN 48
95668c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_VF_WIDTH 16
95678c2ecf20Sopenharmony_ci/* The target function RID. */
95688c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_RID_OFST 8
95698c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_RID_LEN 2
95708c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_RID_LBN 64
95718c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_RID_WIDTH 16
95728c2ecf20Sopenharmony_ci/* The status of the proxy as described in MC_CMD_PROXY_COMPLETE. */
95738c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_STATUS_OFST 10
95748c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_STATUS_LEN 2
95758c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_STATUS_LBN 80
95768c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_STATUS_WIDTH 16
95778c2ecf20Sopenharmony_ci/* If a request is authorized rather than carried out by the host, this is the
95788c2ecf20Sopenharmony_ci * elevated privilege mask granted to the requesting function.
95798c2ecf20Sopenharmony_ci */
95808c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_OFST 12
95818c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_LEN 4
95828c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_LBN 96
95838c2ecf20Sopenharmony_ci#define       MC_PROXY_STATUS_BUFFER_GRANTED_PRIVILEGES_WIDTH 32
95848c2ecf20Sopenharmony_ci
95858c2ecf20Sopenharmony_ci
95868c2ecf20Sopenharmony_ci/***********************************/
95878c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CONFIGURE
95888c2ecf20Sopenharmony_ci * Enable/disable authorization of MCDI requests from unprivileged functions by
95898c2ecf20Sopenharmony_ci * a designated admin function
95908c2ecf20Sopenharmony_ci */
95918c2ecf20Sopenharmony_ci#define MC_CMD_PROXY_CONFIGURE 0x58
95928c2ecf20Sopenharmony_ci#undef MC_CMD_0x58_PRIVILEGE_CTG
95938c2ecf20Sopenharmony_ci
95948c2ecf20Sopenharmony_ci#define MC_CMD_0x58_PRIVILEGE_CTG SRIOV_CTG_ADMIN
95958c2ecf20Sopenharmony_ci
95968c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CONFIGURE_IN msgrequest */
95978c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_CONFIGURE_IN_LEN 108
95988c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_FLAGS_OFST 0
95998c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_FLAGS_LEN 4
96008c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CONFIGURE_IN_ENABLE_OFST 0
96018c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CONFIGURE_IN_ENABLE_LBN 0
96028c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CONFIGURE_IN_ENABLE_WIDTH 1
96038c2ecf20Sopenharmony_ci/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
96048c2ecf20Sopenharmony_ci * of blocks, each of the size REQUEST_BLOCK_SIZE.
96058c2ecf20Sopenharmony_ci */
96068c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_OFST 4
96078c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_LEN 8
96088c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_LO_OFST 4
96098c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_STATUS_BUFF_ADDR_HI_OFST 8
96108c2ecf20Sopenharmony_ci/* Must be a power of 2 */
96118c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_STATUS_BLOCK_SIZE_OFST 12
96128c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_STATUS_BLOCK_SIZE_LEN 4
96138c2ecf20Sopenharmony_ci/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
96148c2ecf20Sopenharmony_ci * of blocks, each of the size REPLY_BLOCK_SIZE.
96158c2ecf20Sopenharmony_ci */
96168c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_OFST 16
96178c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_LEN 8
96188c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_LO_OFST 16
96198c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BUFF_ADDR_HI_OFST 20
96208c2ecf20Sopenharmony_ci/* Must be a power of 2 */
96218c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BLOCK_SIZE_OFST 24
96228c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REQUEST_BLOCK_SIZE_LEN 4
96238c2ecf20Sopenharmony_ci/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
96248c2ecf20Sopenharmony_ci * of blocks, each of the size STATUS_BLOCK_SIZE. This buffer is only needed if
96258c2ecf20Sopenharmony_ci * host intends to complete proxied operations by using MC_CMD_PROXY_CMD.
96268c2ecf20Sopenharmony_ci */
96278c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_OFST 28
96288c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_LEN 8
96298c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_LO_OFST 28
96308c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REPLY_BUFF_ADDR_HI_OFST 32
96318c2ecf20Sopenharmony_ci/* Must be a power of 2, or zero if this buffer is not provided */
96328c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REPLY_BLOCK_SIZE_OFST 36
96338c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_REPLY_BLOCK_SIZE_LEN 4
96348c2ecf20Sopenharmony_ci/* Applies to all three buffers */
96358c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_NUM_BLOCKS_OFST 40
96368c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_NUM_BLOCKS_LEN 4
96378c2ecf20Sopenharmony_ci/* A bit mask defining which MCDI operations may be proxied */
96388c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_ALLOWED_MCDI_MASK_OFST 44
96398c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_IN_ALLOWED_MCDI_MASK_LEN 64
96408c2ecf20Sopenharmony_ci
96418c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CONFIGURE_EXT_IN msgrequest */
96428c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_CONFIGURE_EXT_IN_LEN 112
96438c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_FLAGS_OFST 0
96448c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_FLAGS_LEN 4
96458c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_OFST 0
96468c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_LBN 0
96478c2ecf20Sopenharmony_ci#define        MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_WIDTH 1
96488c2ecf20Sopenharmony_ci/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
96498c2ecf20Sopenharmony_ci * of blocks, each of the size REQUEST_BLOCK_SIZE.
96508c2ecf20Sopenharmony_ci */
96518c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_OFST 4
96528c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_LEN 8
96538c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_LO_OFST 4
96548c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_HI_OFST 8
96558c2ecf20Sopenharmony_ci/* Must be a power of 2 */
96568c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BLOCK_SIZE_OFST 12
96578c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BLOCK_SIZE_LEN 4
96588c2ecf20Sopenharmony_ci/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
96598c2ecf20Sopenharmony_ci * of blocks, each of the size REPLY_BLOCK_SIZE.
96608c2ecf20Sopenharmony_ci */
96618c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_OFST 16
96628c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_LEN 8
96638c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_LO_OFST 16
96648c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_HI_OFST 20
96658c2ecf20Sopenharmony_ci/* Must be a power of 2 */
96668c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BLOCK_SIZE_OFST 24
96678c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BLOCK_SIZE_LEN 4
96688c2ecf20Sopenharmony_ci/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS
96698c2ecf20Sopenharmony_ci * of blocks, each of the size STATUS_BLOCK_SIZE. This buffer is only needed if
96708c2ecf20Sopenharmony_ci * host intends to complete proxied operations by using MC_CMD_PROXY_CMD.
96718c2ecf20Sopenharmony_ci */
96728c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_OFST 28
96738c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_LEN 8
96748c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_LO_OFST 28
96758c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_HI_OFST 32
96768c2ecf20Sopenharmony_ci/* Must be a power of 2, or zero if this buffer is not provided */
96778c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BLOCK_SIZE_OFST 36
96788c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BLOCK_SIZE_LEN 4
96798c2ecf20Sopenharmony_ci/* Applies to all three buffers */
96808c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_NUM_BLOCKS_OFST 40
96818c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_NUM_BLOCKS_LEN 4
96828c2ecf20Sopenharmony_ci/* A bit mask defining which MCDI operations may be proxied */
96838c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_ALLOWED_MCDI_MASK_OFST 44
96848c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_ALLOWED_MCDI_MASK_LEN 64
96858c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_RESERVED_OFST 108
96868c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_CONFIGURE_EXT_IN_RESERVED_LEN 4
96878c2ecf20Sopenharmony_ci
96888c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_CONFIGURE_OUT msgresponse */
96898c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_CONFIGURE_OUT_LEN 0
96908c2ecf20Sopenharmony_ci
96918c2ecf20Sopenharmony_ci
96928c2ecf20Sopenharmony_ci/***********************************/
96938c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_COMPLETE
96948c2ecf20Sopenharmony_ci * Tells FW that a requested proxy operation has either been completed (by
96958c2ecf20Sopenharmony_ci * using MC_CMD_PROXY_CMD) or authorized/declined. May only be sent by the
96968c2ecf20Sopenharmony_ci * function that enabled proxying/authorization (by using
96978c2ecf20Sopenharmony_ci * MC_CMD_PROXY_CONFIGURE).
96988c2ecf20Sopenharmony_ci */
96998c2ecf20Sopenharmony_ci#define MC_CMD_PROXY_COMPLETE 0x5f
97008c2ecf20Sopenharmony_ci#undef MC_CMD_0x5f_PRIVILEGE_CTG
97018c2ecf20Sopenharmony_ci
97028c2ecf20Sopenharmony_ci#define MC_CMD_0x5f_PRIVILEGE_CTG SRIOV_CTG_ADMIN
97038c2ecf20Sopenharmony_ci
97048c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_COMPLETE_IN msgrequest */
97058c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_COMPLETE_IN_LEN 12
97068c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_COMPLETE_IN_BLOCK_INDEX_OFST 0
97078c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_COMPLETE_IN_BLOCK_INDEX_LEN 4
97088c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_COMPLETE_IN_STATUS_OFST 4
97098c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_COMPLETE_IN_STATUS_LEN 4
97108c2ecf20Sopenharmony_ci/* enum: The operation has been completed by using MC_CMD_PROXY_CMD, the reply
97118c2ecf20Sopenharmony_ci * is stored in the REPLY_BUFF.
97128c2ecf20Sopenharmony_ci */
97138c2ecf20Sopenharmony_ci#define          MC_CMD_PROXY_COMPLETE_IN_COMPLETE 0x0
97148c2ecf20Sopenharmony_ci/* enum: The operation has been authorized. The originating function may now
97158c2ecf20Sopenharmony_ci * try again.
97168c2ecf20Sopenharmony_ci */
97178c2ecf20Sopenharmony_ci#define          MC_CMD_PROXY_COMPLETE_IN_AUTHORIZED 0x1
97188c2ecf20Sopenharmony_ci/* enum: The operation has been declined. */
97198c2ecf20Sopenharmony_ci#define          MC_CMD_PROXY_COMPLETE_IN_DECLINED 0x2
97208c2ecf20Sopenharmony_ci/* enum: The authorization failed because the relevant application did not
97218c2ecf20Sopenharmony_ci * respond in time.
97228c2ecf20Sopenharmony_ci */
97238c2ecf20Sopenharmony_ci#define          MC_CMD_PROXY_COMPLETE_IN_TIMEDOUT 0x3
97248c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_COMPLETE_IN_HANDLE_OFST 8
97258c2ecf20Sopenharmony_ci#define       MC_CMD_PROXY_COMPLETE_IN_HANDLE_LEN 4
97268c2ecf20Sopenharmony_ci
97278c2ecf20Sopenharmony_ci/* MC_CMD_PROXY_COMPLETE_OUT msgresponse */
97288c2ecf20Sopenharmony_ci#define    MC_CMD_PROXY_COMPLETE_OUT_LEN 0
97298c2ecf20Sopenharmony_ci
97308c2ecf20Sopenharmony_ci
97318c2ecf20Sopenharmony_ci/***********************************/
97328c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_BUFTBL_CHUNK
97338c2ecf20Sopenharmony_ci * Allocate a set of buffer table entries using the specified owner ID. This
97348c2ecf20Sopenharmony_ci * operation allocates the required buffer table entries (and fails if it
97358c2ecf20Sopenharmony_ci * cannot do so). The buffer table entries will initially be zeroed.
97368c2ecf20Sopenharmony_ci */
97378c2ecf20Sopenharmony_ci#define MC_CMD_ALLOC_BUFTBL_CHUNK 0x87
97388c2ecf20Sopenharmony_ci#undef MC_CMD_0x87_PRIVILEGE_CTG
97398c2ecf20Sopenharmony_ci
97408c2ecf20Sopenharmony_ci#define MC_CMD_0x87_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
97418c2ecf20Sopenharmony_ci
97428c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_BUFTBL_CHUNK_IN msgrequest */
97438c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_BUFTBL_CHUNK_IN_LEN 8
97448c2ecf20Sopenharmony_ci/* Owner ID to use */
97458c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_IN_OWNER_OFST 0
97468c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_IN_OWNER_LEN 4
97478c2ecf20Sopenharmony_ci/* Size of buffer table pages to use, in bytes (note that only a few values are
97488c2ecf20Sopenharmony_ci * legal on any specific hardware).
97498c2ecf20Sopenharmony_ci */
97508c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_IN_PAGE_SIZE_OFST 4
97518c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_IN_PAGE_SIZE_LEN 4
97528c2ecf20Sopenharmony_ci
97538c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_BUFTBL_CHUNK_OUT msgresponse */
97548c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_LEN 12
97558c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_HANDLE_OFST 0
97568c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_HANDLE_LEN 4
97578c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_NUMENTRIES_OFST 4
97588c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_NUMENTRIES_LEN 4
97598c2ecf20Sopenharmony_ci/* Buffer table IDs for use in DMA descriptors. */
97608c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_ID_OFST 8
97618c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_BUFTBL_CHUNK_OUT_ID_LEN 4
97628c2ecf20Sopenharmony_ci
97638c2ecf20Sopenharmony_ci
97648c2ecf20Sopenharmony_ci/***********************************/
97658c2ecf20Sopenharmony_ci/* MC_CMD_PROGRAM_BUFTBL_ENTRIES
97668c2ecf20Sopenharmony_ci * Reprogram a set of buffer table entries in the specified chunk.
97678c2ecf20Sopenharmony_ci */
97688c2ecf20Sopenharmony_ci#define MC_CMD_PROGRAM_BUFTBL_ENTRIES 0x88
97698c2ecf20Sopenharmony_ci#undef MC_CMD_0x88_PRIVILEGE_CTG
97708c2ecf20Sopenharmony_ci
97718c2ecf20Sopenharmony_ci#define MC_CMD_0x88_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
97728c2ecf20Sopenharmony_ci
97738c2ecf20Sopenharmony_ci/* MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN msgrequest */
97748c2ecf20Sopenharmony_ci#define    MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMIN 20
97758c2ecf20Sopenharmony_ci#define    MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMAX 268
97768c2ecf20Sopenharmony_ci#define    MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LENMAX_MCDI2 268
97778c2ecf20Sopenharmony_ci#define    MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_LEN(num) (12+8*(num))
97788c2ecf20Sopenharmony_ci#define    MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_NUM(len) (((len)-12)/8)
97798c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_HANDLE_OFST 0
97808c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_HANDLE_LEN 4
97818c2ecf20Sopenharmony_ci/* ID */
97828c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_FIRSTID_OFST 4
97838c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_FIRSTID_LEN 4
97848c2ecf20Sopenharmony_ci/* Num entries */
97858c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_NUMENTRIES_OFST 8
97868c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_NUMENTRIES_LEN 4
97878c2ecf20Sopenharmony_ci/* Buffer table entry address */
97888c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_OFST 12
97898c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_LEN 8
97908c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_LO_OFST 12
97918c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_HI_OFST 16
97928c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MINNUM 1
97938c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MAXNUM 32
97948c2ecf20Sopenharmony_ci#define       MC_CMD_PROGRAM_BUFTBL_ENTRIES_IN_ENTRY_MAXNUM_MCDI2 32
97958c2ecf20Sopenharmony_ci
97968c2ecf20Sopenharmony_ci/* MC_CMD_PROGRAM_BUFTBL_ENTRIES_OUT msgresponse */
97978c2ecf20Sopenharmony_ci#define    MC_CMD_PROGRAM_BUFTBL_ENTRIES_OUT_LEN 0
97988c2ecf20Sopenharmony_ci
97998c2ecf20Sopenharmony_ci
98008c2ecf20Sopenharmony_ci/***********************************/
98018c2ecf20Sopenharmony_ci/* MC_CMD_FREE_BUFTBL_CHUNK
98028c2ecf20Sopenharmony_ci */
98038c2ecf20Sopenharmony_ci#define MC_CMD_FREE_BUFTBL_CHUNK 0x89
98048c2ecf20Sopenharmony_ci#undef MC_CMD_0x89_PRIVILEGE_CTG
98058c2ecf20Sopenharmony_ci
98068c2ecf20Sopenharmony_ci#define MC_CMD_0x89_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
98078c2ecf20Sopenharmony_ci
98088c2ecf20Sopenharmony_ci/* MC_CMD_FREE_BUFTBL_CHUNK_IN msgrequest */
98098c2ecf20Sopenharmony_ci#define    MC_CMD_FREE_BUFTBL_CHUNK_IN_LEN 4
98108c2ecf20Sopenharmony_ci#define       MC_CMD_FREE_BUFTBL_CHUNK_IN_HANDLE_OFST 0
98118c2ecf20Sopenharmony_ci#define       MC_CMD_FREE_BUFTBL_CHUNK_IN_HANDLE_LEN 4
98128c2ecf20Sopenharmony_ci
98138c2ecf20Sopenharmony_ci/* MC_CMD_FREE_BUFTBL_CHUNK_OUT msgresponse */
98148c2ecf20Sopenharmony_ci#define    MC_CMD_FREE_BUFTBL_CHUNK_OUT_LEN 0
98158c2ecf20Sopenharmony_ci
98168c2ecf20Sopenharmony_ci
98178c2ecf20Sopenharmony_ci/***********************************/
98188c2ecf20Sopenharmony_ci/* MC_CMD_FILTER_OP
98198c2ecf20Sopenharmony_ci * Multiplexed MCDI call for filter operations
98208c2ecf20Sopenharmony_ci */
98218c2ecf20Sopenharmony_ci#define MC_CMD_FILTER_OP 0x8a
98228c2ecf20Sopenharmony_ci#undef MC_CMD_0x8a_PRIVILEGE_CTG
98238c2ecf20Sopenharmony_ci
98248c2ecf20Sopenharmony_ci#define MC_CMD_0x8a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
98258c2ecf20Sopenharmony_ci
98268c2ecf20Sopenharmony_ci/* MC_CMD_FILTER_OP_IN msgrequest */
98278c2ecf20Sopenharmony_ci#define    MC_CMD_FILTER_OP_IN_LEN 108
98288c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
98298c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_OP_OFST 0
98308c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_OP_LEN 4
98318c2ecf20Sopenharmony_ci/* enum: single-recipient filter insert */
98328c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_OP_INSERT 0x0
98338c2ecf20Sopenharmony_ci/* enum: single-recipient filter remove */
98348c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_OP_REMOVE 0x1
98358c2ecf20Sopenharmony_ci/* enum: multi-recipient filter subscribe */
98368c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_OP_SUBSCRIBE 0x2
98378c2ecf20Sopenharmony_ci/* enum: multi-recipient filter unsubscribe */
98388c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_OP_UNSUBSCRIBE 0x3
98398c2ecf20Sopenharmony_ci/* enum: replace one recipient with another (warning - the filter handle may
98408c2ecf20Sopenharmony_ci * change)
98418c2ecf20Sopenharmony_ci */
98428c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_OP_REPLACE 0x4
98438c2ecf20Sopenharmony_ci/* filter handle (for remove / unsubscribe operations) */
98448c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_HANDLE_OFST 4
98458c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_HANDLE_LEN 8
98468c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_HANDLE_LO_OFST 4
98478c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_HANDLE_HI_OFST 8
98488c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this filter.
98498c2ecf20Sopenharmony_ci */
98508c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_PORT_ID_OFST 12
98518c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_PORT_ID_LEN 4
98528c2ecf20Sopenharmony_ci/* fields to include in match criteria */
98538c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_MATCH_FIELDS_OFST 16
98548c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_MATCH_FIELDS_LEN 4
98558c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_OFST 16
98568c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_LBN 0
98578c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_IP_WIDTH 1
98588c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_IP_OFST 16
98598c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_IP_LBN 1
98608c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_IP_WIDTH 1
98618c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_OFST 16
98628c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_LBN 2
98638c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_MAC_WIDTH 1
98648c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_OFST 16
98658c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_LBN 3
98668c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_SRC_PORT_WIDTH 1
98678c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_OFST 16
98688c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_LBN 4
98698c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_MAC_WIDTH 1
98708c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_OFST 16
98718c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_LBN 5
98728c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_DST_PORT_WIDTH 1
98738c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_OFST 16
98748c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_LBN 6
98758c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_ETHER_TYPE_WIDTH 1
98768c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_OFST 16
98778c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_LBN 7
98788c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_INNER_VLAN_WIDTH 1
98798c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_OFST 16
98808c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_LBN 8
98818c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_OUTER_VLAN_WIDTH 1
98828c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_OFST 16
98838c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_LBN 9
98848c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_IP_PROTO_WIDTH 1
98858c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_OFST 16
98868c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_LBN 10
98878c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_FWDEF0_WIDTH 1
98888c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_OFST 16
98898c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_LBN 11
98908c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_FWDEF1_WIDTH 1
98918c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_OFST 16
98928c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_LBN 30
98938c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_MCAST_DST_WIDTH 1
98948c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_OFST 16
98958c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_LBN 31
98968c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_MATCH_UNKNOWN_UCAST_DST_WIDTH 1
98978c2ecf20Sopenharmony_ci/* receive destination */
98988c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_DEST_OFST 20
98998c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_DEST_LEN 4
99008c2ecf20Sopenharmony_ci/* enum: drop packets */
99018c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_DEST_DROP 0x0
99028c2ecf20Sopenharmony_ci/* enum: receive to host */
99038c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_DEST_HOST 0x1
99048c2ecf20Sopenharmony_ci/* enum: receive to MC */
99058c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_DEST_MC 0x2
99068c2ecf20Sopenharmony_ci/* enum: loop back to TXDP 0 */
99078c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_DEST_TX0 0x3
99088c2ecf20Sopenharmony_ci/* enum: loop back to TXDP 1 */
99098c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_DEST_TX1 0x4
99108c2ecf20Sopenharmony_ci/* receive queue handle (for multiple queue modes, this is the base queue) */
99118c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_QUEUE_OFST 24
99128c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_QUEUE_LEN 4
99138c2ecf20Sopenharmony_ci/* receive mode */
99148c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_MODE_OFST 28
99158c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_MODE_LEN 4
99168c2ecf20Sopenharmony_ci/* enum: receive to just the specified queue */
99178c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_MODE_SIMPLE 0x0
99188c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using RSS context */
99198c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_MODE_RSS 0x1
99208c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using .1p mapping */
99218c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_MODE_DOT1P_MAPPING 0x2
99228c2ecf20Sopenharmony_ci/* enum: install a filter entry that will never match; for test purposes only
99238c2ecf20Sopenharmony_ci */
99248c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_RX_MODE_TEST_NEVER_MATCH 0x80000000
99258c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) or .1p mapping handle (for
99268c2ecf20Sopenharmony_ci * RX_MODE_DOT1P_MAPPING), as returned by MC_CMD_RSS_CONTEXT_ALLOC or
99278c2ecf20Sopenharmony_ci * MC_CMD_DOT1P_MAPPING_ALLOC.
99288c2ecf20Sopenharmony_ci */
99298c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_CONTEXT_OFST 32
99308c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_RX_CONTEXT_LEN 4
99318c2ecf20Sopenharmony_ci/* transmit domain (reserved; set to 0) */
99328c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_TX_DOMAIN_OFST 36
99338c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_TX_DOMAIN_LEN 4
99348c2ecf20Sopenharmony_ci/* transmit destination (either set the MAC and/or PM bits for explicit
99358c2ecf20Sopenharmony_ci * control, or set this field to TX_DEST_DEFAULT for sensible default
99368c2ecf20Sopenharmony_ci * behaviour)
99378c2ecf20Sopenharmony_ci */
99388c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_TX_DEST_OFST 40
99398c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_TX_DEST_LEN 4
99408c2ecf20Sopenharmony_ci/* enum: request default behaviour (based on filter type) */
99418c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_IN_TX_DEST_DEFAULT 0xffffffff
99428c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_TX_DEST_MAC_OFST 40
99438c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_TX_DEST_MAC_LBN 0
99448c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_TX_DEST_MAC_WIDTH 1
99458c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_TX_DEST_PM_OFST 40
99468c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_TX_DEST_PM_LBN 1
99478c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_IN_TX_DEST_PM_WIDTH 1
99488c2ecf20Sopenharmony_ci/* source MAC address to match (as bytes in network order) */
99498c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_SRC_MAC_OFST 44
99508c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_SRC_MAC_LEN 6
99518c2ecf20Sopenharmony_ci/* source port to match (as bytes in network order) */
99528c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_SRC_PORT_OFST 50
99538c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_SRC_PORT_LEN 2
99548c2ecf20Sopenharmony_ci/* destination MAC address to match (as bytes in network order) */
99558c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_DST_MAC_OFST 52
99568c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_DST_MAC_LEN 6
99578c2ecf20Sopenharmony_ci/* destination port to match (as bytes in network order) */
99588c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_DST_PORT_OFST 58
99598c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_DST_PORT_LEN 2
99608c2ecf20Sopenharmony_ci/* Ethernet type to match (as bytes in network order) */
99618c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_ETHER_TYPE_OFST 60
99628c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_ETHER_TYPE_LEN 2
99638c2ecf20Sopenharmony_ci/* Inner VLAN tag to match (as bytes in network order) */
99648c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_INNER_VLAN_OFST 62
99658c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_INNER_VLAN_LEN 2
99668c2ecf20Sopenharmony_ci/* Outer VLAN tag to match (as bytes in network order) */
99678c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_OUTER_VLAN_OFST 64
99688c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_OUTER_VLAN_LEN 2
99698c2ecf20Sopenharmony_ci/* IP protocol to match (in low byte; set high byte to 0) */
99708c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_IP_PROTO_OFST 66
99718c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_IP_PROTO_LEN 2
99728c2ecf20Sopenharmony_ci/* Firmware defined register 0 to match (reserved; set to 0) */
99738c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_FWDEF0_OFST 68
99748c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_FWDEF0_LEN 4
99758c2ecf20Sopenharmony_ci/* Firmware defined register 1 to match (reserved; set to 0) */
99768c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_FWDEF1_OFST 72
99778c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_FWDEF1_LEN 4
99788c2ecf20Sopenharmony_ci/* source IP address to match (as bytes in network order; set last 12 bytes to
99798c2ecf20Sopenharmony_ci * 0 for IPv4 address)
99808c2ecf20Sopenharmony_ci */
99818c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_SRC_IP_OFST 76
99828c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_SRC_IP_LEN 16
99838c2ecf20Sopenharmony_ci/* destination IP address to match (as bytes in network order; set last 12
99848c2ecf20Sopenharmony_ci * bytes to 0 for IPv4 address)
99858c2ecf20Sopenharmony_ci */
99868c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_DST_IP_OFST 92
99878c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_IN_DST_IP_LEN 16
99888c2ecf20Sopenharmony_ci
99898c2ecf20Sopenharmony_ci/* MC_CMD_FILTER_OP_EXT_IN msgrequest: Extension to MC_CMD_FILTER_OP_IN to
99908c2ecf20Sopenharmony_ci * include handling of VXLAN/NVGRE encapsulated frame filtering (which is
99918c2ecf20Sopenharmony_ci * supported on Medford only).
99928c2ecf20Sopenharmony_ci */
99938c2ecf20Sopenharmony_ci#define    MC_CMD_FILTER_OP_EXT_IN_LEN 172
99948c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
99958c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_OP_OFST 0
99968c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_OP_LEN 4
99978c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
99988c2ecf20Sopenharmony_ci/*               MC_CMD_FILTER_OP_IN/OP */
99998c2ecf20Sopenharmony_ci/* filter handle (for remove / unsubscribe operations) */
100008c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_HANDLE_OFST 4
100018c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_HANDLE_LEN 8
100028c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_HANDLE_LO_OFST 4
100038c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_HANDLE_HI_OFST 8
100048c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this filter.
100058c2ecf20Sopenharmony_ci */
100068c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_PORT_ID_OFST 12
100078c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_PORT_ID_LEN 4
100088c2ecf20Sopenharmony_ci/* fields to include in match criteria */
100098c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_MATCH_FIELDS_OFST 16
100108c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_MATCH_FIELDS_LEN 4
100118c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_IP_OFST 16
100128c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_IP_LBN 0
100138c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_IP_WIDTH 1
100148c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_IP_OFST 16
100158c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_IP_LBN 1
100168c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_IP_WIDTH 1
100178c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_MAC_OFST 16
100188c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_MAC_LBN 2
100198c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_MAC_WIDTH 1
100208c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_PORT_OFST 16
100218c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_PORT_LBN 3
100228c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_SRC_PORT_WIDTH 1
100238c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_MAC_OFST 16
100248c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_MAC_LBN 4
100258c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_MAC_WIDTH 1
100268c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_PORT_OFST 16
100278c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_PORT_LBN 5
100288c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_DST_PORT_WIDTH 1
100298c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_ETHER_TYPE_OFST 16
100308c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_ETHER_TYPE_LBN 6
100318c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_ETHER_TYPE_WIDTH 1
100328c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_INNER_VLAN_OFST 16
100338c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_INNER_VLAN_LBN 7
100348c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_INNER_VLAN_WIDTH 1
100358c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_OUTER_VLAN_OFST 16
100368c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_OUTER_VLAN_LBN 8
100378c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_OUTER_VLAN_WIDTH 1
100388c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IP_PROTO_OFST 16
100398c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IP_PROTO_LBN 9
100408c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IP_PROTO_WIDTH 1
100418c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_FWDEF0_OFST 16
100428c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_FWDEF0_LBN 10
100438c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_FWDEF0_WIDTH 1
100448c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_VNI_OR_VSID_OFST 16
100458c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_VNI_OR_VSID_LBN 11
100468c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_VNI_OR_VSID_WIDTH 1
100478c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_IP_OFST 16
100488c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_IP_LBN 12
100498c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_IP_WIDTH 1
100508c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_IP_OFST 16
100518c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_IP_LBN 13
100528c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_IP_WIDTH 1
100538c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_MAC_OFST 16
100548c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_MAC_LBN 14
100558c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_MAC_WIDTH 1
100568c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_PORT_OFST 16
100578c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_PORT_LBN 15
100588c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_SRC_PORT_WIDTH 1
100598c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_MAC_OFST 16
100608c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_MAC_LBN 16
100618c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_MAC_WIDTH 1
100628c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_PORT_OFST 16
100638c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_PORT_LBN 17
100648c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_DST_PORT_WIDTH 1
100658c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_ETHER_TYPE_OFST 16
100668c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_ETHER_TYPE_LBN 18
100678c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_ETHER_TYPE_WIDTH 1
100688c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_INNER_VLAN_OFST 16
100698c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_INNER_VLAN_LBN 19
100708c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_INNER_VLAN_WIDTH 1
100718c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_OUTER_VLAN_OFST 16
100728c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_OUTER_VLAN_LBN 20
100738c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_OUTER_VLAN_WIDTH 1
100748c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_IP_PROTO_OFST 16
100758c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_IP_PROTO_LBN 21
100768c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_IP_PROTO_WIDTH 1
100778c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF0_OFST 16
100788c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF0_LBN 22
100798c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF0_WIDTH 1
100808c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF1_OFST 16
100818c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF1_LBN 23
100828c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_FWDEF1_WIDTH 1
100838c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_OFST 16
100848c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_LBN 24
100858c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_WIDTH 1
100868c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_OFST 16
100878c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_LBN 25
100888c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_WIDTH 1
100898c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_MCAST_DST_OFST 16
100908c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_MCAST_DST_LBN 30
100918c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_MCAST_DST_WIDTH 1
100928c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_UCAST_DST_OFST 16
100938c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_UCAST_DST_LBN 31
100948c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_MATCH_UNKNOWN_UCAST_DST_WIDTH 1
100958c2ecf20Sopenharmony_ci/* receive destination */
100968c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_DEST_OFST 20
100978c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_DEST_LEN 4
100988c2ecf20Sopenharmony_ci/* enum: drop packets */
100998c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_DEST_DROP 0x0
101008c2ecf20Sopenharmony_ci/* enum: receive to host */
101018c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_DEST_HOST 0x1
101028c2ecf20Sopenharmony_ci/* enum: receive to MC */
101038c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_DEST_MC 0x2
101048c2ecf20Sopenharmony_ci/* enum: loop back to TXDP 0 */
101058c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_DEST_TX0 0x3
101068c2ecf20Sopenharmony_ci/* enum: loop back to TXDP 1 */
101078c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_DEST_TX1 0x4
101088c2ecf20Sopenharmony_ci/* receive queue handle (for multiple queue modes, this is the base queue) */
101098c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_QUEUE_OFST 24
101108c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_QUEUE_LEN 4
101118c2ecf20Sopenharmony_ci/* receive mode */
101128c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_MODE_OFST 28
101138c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_MODE_LEN 4
101148c2ecf20Sopenharmony_ci/* enum: receive to just the specified queue */
101158c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_MODE_SIMPLE 0x0
101168c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using RSS context */
101178c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_MODE_RSS 0x1
101188c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using .1p mapping */
101198c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_MODE_DOT1P_MAPPING 0x2
101208c2ecf20Sopenharmony_ci/* enum: install a filter entry that will never match; for test purposes only
101218c2ecf20Sopenharmony_ci */
101228c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_RX_MODE_TEST_NEVER_MATCH 0x80000000
101238c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) or .1p mapping handle (for
101248c2ecf20Sopenharmony_ci * RX_MODE_DOT1P_MAPPING), as returned by MC_CMD_RSS_CONTEXT_ALLOC or
101258c2ecf20Sopenharmony_ci * MC_CMD_DOT1P_MAPPING_ALLOC.
101268c2ecf20Sopenharmony_ci */
101278c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_CONTEXT_OFST 32
101288c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_RX_CONTEXT_LEN 4
101298c2ecf20Sopenharmony_ci/* transmit domain (reserved; set to 0) */
101308c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_TX_DOMAIN_OFST 36
101318c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_TX_DOMAIN_LEN 4
101328c2ecf20Sopenharmony_ci/* transmit destination (either set the MAC and/or PM bits for explicit
101338c2ecf20Sopenharmony_ci * control, or set this field to TX_DEST_DEFAULT for sensible default
101348c2ecf20Sopenharmony_ci * behaviour)
101358c2ecf20Sopenharmony_ci */
101368c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_TX_DEST_OFST 40
101378c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_TX_DEST_LEN 4
101388c2ecf20Sopenharmony_ci/* enum: request default behaviour (based on filter type) */
101398c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_TX_DEST_DEFAULT 0xffffffff
101408c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_TX_DEST_MAC_OFST 40
101418c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_TX_DEST_MAC_LBN 0
101428c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_TX_DEST_MAC_WIDTH 1
101438c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_TX_DEST_PM_OFST 40
101448c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_TX_DEST_PM_LBN 1
101458c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_TX_DEST_PM_WIDTH 1
101468c2ecf20Sopenharmony_ci/* source MAC address to match (as bytes in network order) */
101478c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_SRC_MAC_OFST 44
101488c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_SRC_MAC_LEN 6
101498c2ecf20Sopenharmony_ci/* source port to match (as bytes in network order) */
101508c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_SRC_PORT_OFST 50
101518c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_SRC_PORT_LEN 2
101528c2ecf20Sopenharmony_ci/* destination MAC address to match (as bytes in network order) */
101538c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_DST_MAC_OFST 52
101548c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_DST_MAC_LEN 6
101558c2ecf20Sopenharmony_ci/* destination port to match (as bytes in network order) */
101568c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_DST_PORT_OFST 58
101578c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_DST_PORT_LEN 2
101588c2ecf20Sopenharmony_ci/* Ethernet type to match (as bytes in network order) */
101598c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_ETHER_TYPE_OFST 60
101608c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_ETHER_TYPE_LEN 2
101618c2ecf20Sopenharmony_ci/* Inner VLAN tag to match (as bytes in network order) */
101628c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_INNER_VLAN_OFST 62
101638c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_INNER_VLAN_LEN 2
101648c2ecf20Sopenharmony_ci/* Outer VLAN tag to match (as bytes in network order) */
101658c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_OUTER_VLAN_OFST 64
101668c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_OUTER_VLAN_LEN 2
101678c2ecf20Sopenharmony_ci/* IP protocol to match (in low byte; set high byte to 0) */
101688c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IP_PROTO_OFST 66
101698c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IP_PROTO_LEN 2
101708c2ecf20Sopenharmony_ci/* Firmware defined register 0 to match (reserved; set to 0) */
101718c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_FWDEF0_OFST 68
101728c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_FWDEF0_LEN 4
101738c2ecf20Sopenharmony_ci/* VNI (for VXLAN/Geneve, when IP protocol is UDP) or VSID (for NVGRE, when IP
101748c2ecf20Sopenharmony_ci * protocol is GRE) to match (as bytes in network order; set last byte to 0 for
101758c2ecf20Sopenharmony_ci * VXLAN/NVGRE, or 1 for Geneve)
101768c2ecf20Sopenharmony_ci */
101778c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_VNI_OR_VSID_OFST 72
101788c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_VNI_OR_VSID_LEN 4
101798c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VNI_VALUE_OFST 72
101808c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VNI_VALUE_LBN 0
101818c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VNI_VALUE_WIDTH 24
101828c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_OFST 72
101838c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_LBN 24
101848c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_WIDTH 8
101858c2ecf20Sopenharmony_ci/* enum: Match VXLAN traffic with this VNI */
101868c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_VXLAN 0x0
101878c2ecf20Sopenharmony_ci/* enum: Match Geneve traffic with this VNI */
101888c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_GENEVE 0x1
101898c2ecf20Sopenharmony_ci/* enum: Reserved for experimental development use */
101908c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_VNI_TYPE_EXPERIMENTAL 0xfe
101918c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VSID_VALUE_OFST 72
101928c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VSID_VALUE_LBN 0
101938c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VSID_VALUE_WIDTH 24
101948c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_OFST 72
101958c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_LBN 24
101968c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_WIDTH 8
101978c2ecf20Sopenharmony_ci/* enum: Match NVGRE traffic with this VSID */
101988c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_EXT_IN_VSID_TYPE_NVGRE 0x0
101998c2ecf20Sopenharmony_ci/* source IP address to match (as bytes in network order; set last 12 bytes to
102008c2ecf20Sopenharmony_ci * 0 for IPv4 address)
102018c2ecf20Sopenharmony_ci */
102028c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_SRC_IP_OFST 76
102038c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_SRC_IP_LEN 16
102048c2ecf20Sopenharmony_ci/* destination IP address to match (as bytes in network order; set last 12
102058c2ecf20Sopenharmony_ci * bytes to 0 for IPv4 address)
102068c2ecf20Sopenharmony_ci */
102078c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_DST_IP_OFST 92
102088c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_DST_IP_LEN 16
102098c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame source MAC address to match (as bytes in network
102108c2ecf20Sopenharmony_ci * order)
102118c2ecf20Sopenharmony_ci */
102128c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_MAC_OFST 108
102138c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_MAC_LEN 6
102148c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame source port to match (as bytes in network order) */
102158c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_PORT_OFST 114
102168c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_PORT_LEN 2
102178c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame destination MAC address to match (as bytes in
102188c2ecf20Sopenharmony_ci * network order)
102198c2ecf20Sopenharmony_ci */
102208c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_MAC_OFST 116
102218c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_MAC_LEN 6
102228c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame destination port to match (as bytes in network
102238c2ecf20Sopenharmony_ci * order)
102248c2ecf20Sopenharmony_ci */
102258c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_PORT_OFST 122
102268c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_PORT_LEN 2
102278c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Ethernet type to match (as bytes in network order)
102288c2ecf20Sopenharmony_ci */
102298c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_ETHER_TYPE_OFST 124
102308c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_ETHER_TYPE_LEN 2
102318c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Inner VLAN tag to match (as bytes in network order)
102328c2ecf20Sopenharmony_ci */
102338c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_INNER_VLAN_OFST 126
102348c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_INNER_VLAN_LEN 2
102358c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Outer VLAN tag to match (as bytes in network order)
102368c2ecf20Sopenharmony_ci */
102378c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_OUTER_VLAN_OFST 128
102388c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_OUTER_VLAN_LEN 2
102398c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame IP protocol to match (in low byte; set high byte to
102408c2ecf20Sopenharmony_ci * 0)
102418c2ecf20Sopenharmony_ci */
102428c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_IP_PROTO_OFST 130
102438c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_IP_PROTO_LEN 2
102448c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Firmware defined register 0 to match (reserved; set
102458c2ecf20Sopenharmony_ci * to 0)
102468c2ecf20Sopenharmony_ci */
102478c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF0_OFST 132
102488c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF0_LEN 4
102498c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Firmware defined register 1 to match (reserved; set
102508c2ecf20Sopenharmony_ci * to 0)
102518c2ecf20Sopenharmony_ci */
102528c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF1_OFST 136
102538c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_FWDEF1_LEN 4
102548c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame source IP address to match (as bytes in network
102558c2ecf20Sopenharmony_ci * order; set last 12 bytes to 0 for IPv4 address)
102568c2ecf20Sopenharmony_ci */
102578c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_IP_OFST 140
102588c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_SRC_IP_LEN 16
102598c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame destination IP address to match (as bytes in network
102608c2ecf20Sopenharmony_ci * order; set last 12 bytes to 0 for IPv4 address)
102618c2ecf20Sopenharmony_ci */
102628c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_IP_OFST 156
102638c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_IN_IFRM_DST_IP_LEN 16
102648c2ecf20Sopenharmony_ci
102658c2ecf20Sopenharmony_ci/* MC_CMD_FILTER_OP_V3_IN msgrequest: FILTER_OP extension to support additional
102668c2ecf20Sopenharmony_ci * filter actions for Intel's DPDK (Data Plane Development Kit, dpdk.org) via
102678c2ecf20Sopenharmony_ci * its rte_flow API. This extension is only useful with the sfc_efx driver
102688c2ecf20Sopenharmony_ci * included as part of DPDK, used in conjunction with the dpdk datapath
102698c2ecf20Sopenharmony_ci * firmware variant.
102708c2ecf20Sopenharmony_ci */
102718c2ecf20Sopenharmony_ci#define    MC_CMD_FILTER_OP_V3_IN_LEN 180
102728c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
102738c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_OP_OFST 0
102748c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_OP_LEN 4
102758c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
102768c2ecf20Sopenharmony_ci/*               MC_CMD_FILTER_OP_IN/OP */
102778c2ecf20Sopenharmony_ci/* filter handle (for remove / unsubscribe operations) */
102788c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_HANDLE_OFST 4
102798c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_HANDLE_LEN 8
102808c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_HANDLE_LO_OFST 4
102818c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_HANDLE_HI_OFST 8
102828c2ecf20Sopenharmony_ci/* The port ID associated with the v-adaptor which should contain this filter.
102838c2ecf20Sopenharmony_ci */
102848c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_PORT_ID_OFST 12
102858c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_PORT_ID_LEN 4
102868c2ecf20Sopenharmony_ci/* fields to include in match criteria */
102878c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_MATCH_FIELDS_OFST 16
102888c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_MATCH_FIELDS_LEN 4
102898c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_IP_OFST 16
102908c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_IP_LBN 0
102918c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_IP_WIDTH 1
102928c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_IP_OFST 16
102938c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_IP_LBN 1
102948c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_IP_WIDTH 1
102958c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_MAC_OFST 16
102968c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_MAC_LBN 2
102978c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_MAC_WIDTH 1
102988c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_PORT_OFST 16
102998c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_PORT_LBN 3
103008c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_SRC_PORT_WIDTH 1
103018c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_MAC_OFST 16
103028c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_MAC_LBN 4
103038c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_MAC_WIDTH 1
103048c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_PORT_OFST 16
103058c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_PORT_LBN 5
103068c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_DST_PORT_WIDTH 1
103078c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_ETHER_TYPE_OFST 16
103088c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_ETHER_TYPE_LBN 6
103098c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_ETHER_TYPE_WIDTH 1
103108c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_INNER_VLAN_OFST 16
103118c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_INNER_VLAN_LBN 7
103128c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_INNER_VLAN_WIDTH 1
103138c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_OUTER_VLAN_OFST 16
103148c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_OUTER_VLAN_LBN 8
103158c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_OUTER_VLAN_WIDTH 1
103168c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IP_PROTO_OFST 16
103178c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IP_PROTO_LBN 9
103188c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IP_PROTO_WIDTH 1
103198c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_FWDEF0_OFST 16
103208c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_FWDEF0_LBN 10
103218c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_FWDEF0_WIDTH 1
103228c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_VNI_OR_VSID_OFST 16
103238c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_VNI_OR_VSID_LBN 11
103248c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_VNI_OR_VSID_WIDTH 1
103258c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_IP_OFST 16
103268c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_IP_LBN 12
103278c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_IP_WIDTH 1
103288c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_IP_OFST 16
103298c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_IP_LBN 13
103308c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_IP_WIDTH 1
103318c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_MAC_OFST 16
103328c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_MAC_LBN 14
103338c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_MAC_WIDTH 1
103348c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_PORT_OFST 16
103358c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_PORT_LBN 15
103368c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_SRC_PORT_WIDTH 1
103378c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_MAC_OFST 16
103388c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_MAC_LBN 16
103398c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_MAC_WIDTH 1
103408c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_PORT_OFST 16
103418c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_PORT_LBN 17
103428c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_DST_PORT_WIDTH 1
103438c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_ETHER_TYPE_OFST 16
103448c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_ETHER_TYPE_LBN 18
103458c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_ETHER_TYPE_WIDTH 1
103468c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_INNER_VLAN_OFST 16
103478c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_INNER_VLAN_LBN 19
103488c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_INNER_VLAN_WIDTH 1
103498c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_OUTER_VLAN_OFST 16
103508c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_OUTER_VLAN_LBN 20
103518c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_OUTER_VLAN_WIDTH 1
103528c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_IP_PROTO_OFST 16
103538c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_IP_PROTO_LBN 21
103548c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_IP_PROTO_WIDTH 1
103558c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_FWDEF0_OFST 16
103568c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_FWDEF0_LBN 22
103578c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_FWDEF0_WIDTH 1
103588c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_FWDEF1_OFST 16
103598c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_FWDEF1_LBN 23
103608c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_FWDEF1_WIDTH 1
103618c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_OFST 16
103628c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_LBN 24
103638c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_UNKNOWN_MCAST_DST_WIDTH 1
103648c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_OFST 16
103658c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_LBN 25
103668c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_IFRM_UNKNOWN_UCAST_DST_WIDTH 1
103678c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_UNKNOWN_MCAST_DST_OFST 16
103688c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_UNKNOWN_MCAST_DST_LBN 30
103698c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_UNKNOWN_MCAST_DST_WIDTH 1
103708c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_UNKNOWN_UCAST_DST_OFST 16
103718c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_UNKNOWN_UCAST_DST_LBN 31
103728c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_MATCH_UNKNOWN_UCAST_DST_WIDTH 1
103738c2ecf20Sopenharmony_ci/* receive destination */
103748c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_DEST_OFST 20
103758c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_DEST_LEN 4
103768c2ecf20Sopenharmony_ci/* enum: drop packets */
103778c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_DEST_DROP 0x0
103788c2ecf20Sopenharmony_ci/* enum: receive to host */
103798c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_DEST_HOST 0x1
103808c2ecf20Sopenharmony_ci/* enum: receive to MC */
103818c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_DEST_MC 0x2
103828c2ecf20Sopenharmony_ci/* enum: loop back to TXDP 0 */
103838c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_DEST_TX0 0x3
103848c2ecf20Sopenharmony_ci/* enum: loop back to TXDP 1 */
103858c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_DEST_TX1 0x4
103868c2ecf20Sopenharmony_ci/* receive queue handle (for multiple queue modes, this is the base queue) */
103878c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_QUEUE_OFST 24
103888c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_QUEUE_LEN 4
103898c2ecf20Sopenharmony_ci/* receive mode */
103908c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_MODE_OFST 28
103918c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_MODE_LEN 4
103928c2ecf20Sopenharmony_ci/* enum: receive to just the specified queue */
103938c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_MODE_SIMPLE 0x0
103948c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using RSS context */
103958c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_MODE_RSS 0x1
103968c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using .1p mapping */
103978c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_MODE_DOT1P_MAPPING 0x2
103988c2ecf20Sopenharmony_ci/* enum: install a filter entry that will never match; for test purposes only
103998c2ecf20Sopenharmony_ci */
104008c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_RX_MODE_TEST_NEVER_MATCH 0x80000000
104018c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) or .1p mapping handle (for
104028c2ecf20Sopenharmony_ci * RX_MODE_DOT1P_MAPPING), as returned by MC_CMD_RSS_CONTEXT_ALLOC or
104038c2ecf20Sopenharmony_ci * MC_CMD_DOT1P_MAPPING_ALLOC.
104048c2ecf20Sopenharmony_ci */
104058c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_CONTEXT_OFST 32
104068c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_RX_CONTEXT_LEN 4
104078c2ecf20Sopenharmony_ci/* transmit domain (reserved; set to 0) */
104088c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_TX_DOMAIN_OFST 36
104098c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_TX_DOMAIN_LEN 4
104108c2ecf20Sopenharmony_ci/* transmit destination (either set the MAC and/or PM bits for explicit
104118c2ecf20Sopenharmony_ci * control, or set this field to TX_DEST_DEFAULT for sensible default
104128c2ecf20Sopenharmony_ci * behaviour)
104138c2ecf20Sopenharmony_ci */
104148c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_TX_DEST_OFST 40
104158c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_TX_DEST_LEN 4
104168c2ecf20Sopenharmony_ci/* enum: request default behaviour (based on filter type) */
104178c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_TX_DEST_DEFAULT 0xffffffff
104188c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_TX_DEST_MAC_OFST 40
104198c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_TX_DEST_MAC_LBN 0
104208c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_TX_DEST_MAC_WIDTH 1
104218c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_TX_DEST_PM_OFST 40
104228c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_TX_DEST_PM_LBN 1
104238c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_TX_DEST_PM_WIDTH 1
104248c2ecf20Sopenharmony_ci/* source MAC address to match (as bytes in network order) */
104258c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_SRC_MAC_OFST 44
104268c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_SRC_MAC_LEN 6
104278c2ecf20Sopenharmony_ci/* source port to match (as bytes in network order) */
104288c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_SRC_PORT_OFST 50
104298c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_SRC_PORT_LEN 2
104308c2ecf20Sopenharmony_ci/* destination MAC address to match (as bytes in network order) */
104318c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_DST_MAC_OFST 52
104328c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_DST_MAC_LEN 6
104338c2ecf20Sopenharmony_ci/* destination port to match (as bytes in network order) */
104348c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_DST_PORT_OFST 58
104358c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_DST_PORT_LEN 2
104368c2ecf20Sopenharmony_ci/* Ethernet type to match (as bytes in network order) */
104378c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_ETHER_TYPE_OFST 60
104388c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_ETHER_TYPE_LEN 2
104398c2ecf20Sopenharmony_ci/* Inner VLAN tag to match (as bytes in network order) */
104408c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_INNER_VLAN_OFST 62
104418c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_INNER_VLAN_LEN 2
104428c2ecf20Sopenharmony_ci/* Outer VLAN tag to match (as bytes in network order) */
104438c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_OUTER_VLAN_OFST 64
104448c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_OUTER_VLAN_LEN 2
104458c2ecf20Sopenharmony_ci/* IP protocol to match (in low byte; set high byte to 0) */
104468c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IP_PROTO_OFST 66
104478c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IP_PROTO_LEN 2
104488c2ecf20Sopenharmony_ci/* Firmware defined register 0 to match (reserved; set to 0) */
104498c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_FWDEF0_OFST 68
104508c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_FWDEF0_LEN 4
104518c2ecf20Sopenharmony_ci/* VNI (for VXLAN/Geneve, when IP protocol is UDP) or VSID (for NVGRE, when IP
104528c2ecf20Sopenharmony_ci * protocol is GRE) to match (as bytes in network order; set last byte to 0 for
104538c2ecf20Sopenharmony_ci * VXLAN/NVGRE, or 1 for Geneve)
104548c2ecf20Sopenharmony_ci */
104558c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_VNI_OR_VSID_OFST 72
104568c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_VNI_OR_VSID_LEN 4
104578c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VNI_VALUE_OFST 72
104588c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VNI_VALUE_LBN 0
104598c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VNI_VALUE_WIDTH 24
104608c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VNI_TYPE_OFST 72
104618c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VNI_TYPE_LBN 24
104628c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VNI_TYPE_WIDTH 8
104638c2ecf20Sopenharmony_ci/* enum: Match VXLAN traffic with this VNI */
104648c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_VNI_TYPE_VXLAN 0x0
104658c2ecf20Sopenharmony_ci/* enum: Match Geneve traffic with this VNI */
104668c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_VNI_TYPE_GENEVE 0x1
104678c2ecf20Sopenharmony_ci/* enum: Reserved for experimental development use */
104688c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_VNI_TYPE_EXPERIMENTAL 0xfe
104698c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VSID_VALUE_OFST 72
104708c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VSID_VALUE_LBN 0
104718c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VSID_VALUE_WIDTH 24
104728c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VSID_TYPE_OFST 72
104738c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VSID_TYPE_LBN 24
104748c2ecf20Sopenharmony_ci#define        MC_CMD_FILTER_OP_V3_IN_VSID_TYPE_WIDTH 8
104758c2ecf20Sopenharmony_ci/* enum: Match NVGRE traffic with this VSID */
104768c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_VSID_TYPE_NVGRE 0x0
104778c2ecf20Sopenharmony_ci/* source IP address to match (as bytes in network order; set last 12 bytes to
104788c2ecf20Sopenharmony_ci * 0 for IPv4 address)
104798c2ecf20Sopenharmony_ci */
104808c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_SRC_IP_OFST 76
104818c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_SRC_IP_LEN 16
104828c2ecf20Sopenharmony_ci/* destination IP address to match (as bytes in network order; set last 12
104838c2ecf20Sopenharmony_ci * bytes to 0 for IPv4 address)
104848c2ecf20Sopenharmony_ci */
104858c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_DST_IP_OFST 92
104868c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_DST_IP_LEN 16
104878c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame source MAC address to match (as bytes in network
104888c2ecf20Sopenharmony_ci * order)
104898c2ecf20Sopenharmony_ci */
104908c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_SRC_MAC_OFST 108
104918c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_SRC_MAC_LEN 6
104928c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame source port to match (as bytes in network order) */
104938c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_SRC_PORT_OFST 114
104948c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_SRC_PORT_LEN 2
104958c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame destination MAC address to match (as bytes in
104968c2ecf20Sopenharmony_ci * network order)
104978c2ecf20Sopenharmony_ci */
104988c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_DST_MAC_OFST 116
104998c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_DST_MAC_LEN 6
105008c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame destination port to match (as bytes in network
105018c2ecf20Sopenharmony_ci * order)
105028c2ecf20Sopenharmony_ci */
105038c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_DST_PORT_OFST 122
105048c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_DST_PORT_LEN 2
105058c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Ethernet type to match (as bytes in network order)
105068c2ecf20Sopenharmony_ci */
105078c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_ETHER_TYPE_OFST 124
105088c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_ETHER_TYPE_LEN 2
105098c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Inner VLAN tag to match (as bytes in network order)
105108c2ecf20Sopenharmony_ci */
105118c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_INNER_VLAN_OFST 126
105128c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_INNER_VLAN_LEN 2
105138c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Outer VLAN tag to match (as bytes in network order)
105148c2ecf20Sopenharmony_ci */
105158c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_OUTER_VLAN_OFST 128
105168c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_OUTER_VLAN_LEN 2
105178c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame IP protocol to match (in low byte; set high byte to
105188c2ecf20Sopenharmony_ci * 0)
105198c2ecf20Sopenharmony_ci */
105208c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_IP_PROTO_OFST 130
105218c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_IP_PROTO_LEN 2
105228c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Firmware defined register 0 to match (reserved; set
105238c2ecf20Sopenharmony_ci * to 0)
105248c2ecf20Sopenharmony_ci */
105258c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_FWDEF0_OFST 132
105268c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_FWDEF0_LEN 4
105278c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame Firmware defined register 1 to match (reserved; set
105288c2ecf20Sopenharmony_ci * to 0)
105298c2ecf20Sopenharmony_ci */
105308c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_FWDEF1_OFST 136
105318c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_FWDEF1_LEN 4
105328c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame source IP address to match (as bytes in network
105338c2ecf20Sopenharmony_ci * order; set last 12 bytes to 0 for IPv4 address)
105348c2ecf20Sopenharmony_ci */
105358c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_SRC_IP_OFST 140
105368c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_SRC_IP_LEN 16
105378c2ecf20Sopenharmony_ci/* VXLAN/NVGRE inner frame destination IP address to match (as bytes in network
105388c2ecf20Sopenharmony_ci * order; set last 12 bytes to 0 for IPv4 address)
105398c2ecf20Sopenharmony_ci */
105408c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_DST_IP_OFST 156
105418c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_IFRM_DST_IP_LEN 16
105428c2ecf20Sopenharmony_ci/* Set an action for all packets matching this filter. The DPDK driver and dpdk
105438c2ecf20Sopenharmony_ci * f/w variant use their own specific delivery structures, which are documented
105448c2ecf20Sopenharmony_ci * in the DPDK Firmware Driver Interface (SF-119419-TC). Requesting anything
105458c2ecf20Sopenharmony_ci * other than MATCH_ACTION_NONE when the NIC is running another f/w variant
105468c2ecf20Sopenharmony_ci * will cause the filter insertion to fail with ENOTSUP.
105478c2ecf20Sopenharmony_ci */
105488c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_MATCH_ACTION_OFST 172
105498c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_MATCH_ACTION_LEN 4
105508c2ecf20Sopenharmony_ci/* enum: do nothing extra */
105518c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_MATCH_ACTION_NONE 0x0
105528c2ecf20Sopenharmony_ci/* enum: Set the match flag in the packet prefix for packets matching the
105538c2ecf20Sopenharmony_ci * filter (only with dpdk firmware, otherwise fails with ENOTSUP). Used to
105548c2ecf20Sopenharmony_ci * support the DPDK rte_flow "FLAG" action.
105558c2ecf20Sopenharmony_ci */
105568c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_MATCH_ACTION_FLAG 0x1
105578c2ecf20Sopenharmony_ci/* enum: Insert MATCH_MARK_VALUE into the packet prefix for packets matching
105588c2ecf20Sopenharmony_ci * the filter (only with dpdk firmware, otherwise fails with ENOTSUP). Used to
105598c2ecf20Sopenharmony_ci * support the DPDK rte_flow "MARK" action.
105608c2ecf20Sopenharmony_ci */
105618c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_V3_IN_MATCH_ACTION_MARK 0x2
105628c2ecf20Sopenharmony_ci/* the mark value for MATCH_ACTION_MARK. Requesting a value larger than the
105638c2ecf20Sopenharmony_ci * maximum (obtained from MC_CMD_GET_CAPABILITIES_V5/FILTER_ACTION_MARK_MAX)
105648c2ecf20Sopenharmony_ci * will cause the filter insertion to fail with EINVAL.
105658c2ecf20Sopenharmony_ci */
105668c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_MATCH_MARK_VALUE_OFST 176
105678c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_V3_IN_MATCH_MARK_VALUE_LEN 4
105688c2ecf20Sopenharmony_ci
105698c2ecf20Sopenharmony_ci/* MC_CMD_FILTER_OP_OUT msgresponse */
105708c2ecf20Sopenharmony_ci#define    MC_CMD_FILTER_OP_OUT_LEN 12
105718c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
105728c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_OUT_OP_OFST 0
105738c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_OUT_OP_LEN 4
105748c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
105758c2ecf20Sopenharmony_ci/*               MC_CMD_FILTER_OP_IN/OP */
105768c2ecf20Sopenharmony_ci/* Returned filter handle (for insert / subscribe operations). Note that these
105778c2ecf20Sopenharmony_ci * handles should be considered opaque to the host, although a value of
105788c2ecf20Sopenharmony_ci * 0xFFFFFFFF_FFFFFFFF is guaranteed never to be a valid handle.
105798c2ecf20Sopenharmony_ci */
105808c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_OUT_HANDLE_OFST 4
105818c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_OUT_HANDLE_LEN 8
105828c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_OUT_HANDLE_LO_OFST 4
105838c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_OUT_HANDLE_HI_OFST 8
105848c2ecf20Sopenharmony_ci/* enum: guaranteed invalid filter handle (low 32 bits) */
105858c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_OUT_HANDLE_LO_INVALID 0xffffffff
105868c2ecf20Sopenharmony_ci/* enum: guaranteed invalid filter handle (high 32 bits) */
105878c2ecf20Sopenharmony_ci#define          MC_CMD_FILTER_OP_OUT_HANDLE_HI_INVALID 0xffffffff
105888c2ecf20Sopenharmony_ci
105898c2ecf20Sopenharmony_ci/* MC_CMD_FILTER_OP_EXT_OUT msgresponse */
105908c2ecf20Sopenharmony_ci#define    MC_CMD_FILTER_OP_EXT_OUT_LEN 12
105918c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
105928c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_OUT_OP_OFST 0
105938c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_OUT_OP_LEN 4
105948c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
105958c2ecf20Sopenharmony_ci/*               MC_CMD_FILTER_OP_EXT_IN/OP */
105968c2ecf20Sopenharmony_ci/* Returned filter handle (for insert / subscribe operations). Note that these
105978c2ecf20Sopenharmony_ci * handles should be considered opaque to the host, although a value of
105988c2ecf20Sopenharmony_ci * 0xFFFFFFFF_FFFFFFFF is guaranteed never to be a valid handle.
105998c2ecf20Sopenharmony_ci */
106008c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_OUT_HANDLE_OFST 4
106018c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_OUT_HANDLE_LEN 8
106028c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_OUT_HANDLE_LO_OFST 4
106038c2ecf20Sopenharmony_ci#define       MC_CMD_FILTER_OP_EXT_OUT_HANDLE_HI_OFST 8
106048c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
106058c2ecf20Sopenharmony_ci/*               MC_CMD_FILTER_OP_OUT/HANDLE */
106068c2ecf20Sopenharmony_ci
106078c2ecf20Sopenharmony_ci
106088c2ecf20Sopenharmony_ci/***********************************/
106098c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_INFO
106108c2ecf20Sopenharmony_ci * Get information related to the parser-dispatcher subsystem
106118c2ecf20Sopenharmony_ci */
106128c2ecf20Sopenharmony_ci#define MC_CMD_GET_PARSER_DISP_INFO 0xe4
106138c2ecf20Sopenharmony_ci#undef MC_CMD_0xe4_PRIVILEGE_CTG
106148c2ecf20Sopenharmony_ci
106158c2ecf20Sopenharmony_ci#define MC_CMD_0xe4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
106168c2ecf20Sopenharmony_ci
106178c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_INFO_IN msgrequest */
106188c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_INFO_IN_LEN 4
106198c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
106208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_IN_OP_OFST 0
106218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_IN_OP_LEN 4
106228c2ecf20Sopenharmony_ci/* enum: read the list of supported RX filter matches */
106238c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SUPPORTED_RX_MATCHES 0x1
106248c2ecf20Sopenharmony_ci/* enum: read flags indicating restrictions on filter insertion for the calling
106258c2ecf20Sopenharmony_ci * client
106268c2ecf20Sopenharmony_ci */
106278c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_RESTRICTIONS 0x2
106288c2ecf20Sopenharmony_ci/* enum: read properties relating to security rules (Medford-only; for use by
106298c2ecf20Sopenharmony_ci * SolarSecure apps, not directly by drivers. See SF-114946-SW.)
106308c2ecf20Sopenharmony_ci */
106318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SECURITY_RULE_INFO 0x3
106328c2ecf20Sopenharmony_ci/* enum: read the list of supported RX filter matches for VXLAN/NVGRE
106338c2ecf20Sopenharmony_ci * encapsulated frames, which follow a different match sequence to normal
106348c2ecf20Sopenharmony_ci * frames (Medford only)
106358c2ecf20Sopenharmony_ci */
106368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SUPPORTED_ENCAP_RX_MATCHES 0x4
106378c2ecf20Sopenharmony_ci/* enum: read the list of supported matches for the encapsulation detection
106388c2ecf20Sopenharmony_ci * rules inserted by MC_CMD_VNIC_ENCAP_RULE_ADD. (ef100 and later)
106398c2ecf20Sopenharmony_ci */
106408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PARSER_DISP_INFO_IN_OP_GET_SUPPORTED_VNIC_ENCAP_MATCHES 0x5
106418c2ecf20Sopenharmony_ci
106428c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_INFO_OUT msgresponse */
106438c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMIN 8
106448c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX 252
106458c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX_MCDI2 1020
106468c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_INFO_OUT_LEN(num) (8+4*(num))
106478c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_NUM(len) (((len)-8)/4)
106488c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
106498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_OP_OFST 0
106508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_OP_LEN 4
106518c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
106528c2ecf20Sopenharmony_ci/*               MC_CMD_GET_PARSER_DISP_INFO_IN/OP */
106538c2ecf20Sopenharmony_ci/* number of supported match types */
106548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_NUM_SUPPORTED_MATCHES_OFST 4
106558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_NUM_SUPPORTED_MATCHES_LEN 4
106568c2ecf20Sopenharmony_ci/* array of supported match types (valid MATCH_FIELDS values for
106578c2ecf20Sopenharmony_ci * MC_CMD_FILTER_OP) sorted in decreasing priority order
106588c2ecf20Sopenharmony_ci */
106598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_OFST 8
106608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_LEN 4
106618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MINNUM 0
106628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MAXNUM 61
106638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_INFO_OUT_SUPPORTED_MATCHES_MAXNUM_MCDI2 253
106648c2ecf20Sopenharmony_ci
106658c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT msgresponse */
106668c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_LEN 8
106678c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
106688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_OP_OFST 0
106698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_OP_LEN 4
106708c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
106718c2ecf20Sopenharmony_ci/*               MC_CMD_GET_PARSER_DISP_INFO_IN/OP */
106728c2ecf20Sopenharmony_ci/* bitfield of filter insertion restrictions */
106738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_RESTRICTION_FLAGS_OFST 4
106748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_RESTRICTION_FLAGS_LEN 4
106758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_DST_IP_MCAST_ONLY_OFST 4
106768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_DST_IP_MCAST_ONLY_LBN 0
106778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PARSER_DISP_RESTRICTIONS_OUT_DST_IP_MCAST_ONLY_WIDTH 1
106788c2ecf20Sopenharmony_ci
106798c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT msgresponse: This response is
106808c2ecf20Sopenharmony_ci * returned if a MC_CMD_GET_PARSER_DISP_INFO_IN request is sent with OP value
106818c2ecf20Sopenharmony_ci * OP_GET_SUPPORTED_VNIC_ENCAP_MATCHES. It contains information about the
106828c2ecf20Sopenharmony_ci * supported match types that can be used in the encapsulation detection rules
106838c2ecf20Sopenharmony_ci * inserted by MC_CMD_VNIC_ENCAP_RULE_ADD.
106848c2ecf20Sopenharmony_ci */
106858c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_LENMIN 8
106868c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_LENMAX 252
106878c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_LENMAX_MCDI2 1020
106888c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_LEN(num) (8+4*(num))
106898c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_SUPPORTED_MATCHES_NUM(len) (((len)-8)/4)
106908c2ecf20Sopenharmony_ci/* The op code OP_GET_SUPPORTED_VNIC_ENCAP_MATCHES is returned. */
106918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_OP_OFST 0
106928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_OP_LEN 4
106938c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
106948c2ecf20Sopenharmony_ci/*               MC_CMD_GET_PARSER_DISP_INFO_IN/OP */
106958c2ecf20Sopenharmony_ci/* number of supported match types */
106968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_NUM_SUPPORTED_MATCHES_OFST 4
106978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_NUM_SUPPORTED_MATCHES_LEN 4
106988c2ecf20Sopenharmony_ci/* array of supported match types (valid MATCH_FLAGS values for
106998c2ecf20Sopenharmony_ci * MC_CMD_VNIC_ENCAP_RULE_ADD) sorted in decreasing priority order
107008c2ecf20Sopenharmony_ci */
107018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_SUPPORTED_MATCHES_OFST 8
107028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_SUPPORTED_MATCHES_LEN 4
107038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_SUPPORTED_MATCHES_MINNUM 0
107048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_SUPPORTED_MATCHES_MAXNUM 61
107058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_VNIC_ENCAP_MATCHES_OUT_SUPPORTED_MATCHES_MAXNUM_MCDI2 253
107068c2ecf20Sopenharmony_ci
107078c2ecf20Sopenharmony_ci
107088c2ecf20Sopenharmony_ci/***********************************/
107098c2ecf20Sopenharmony_ci/* MC_CMD_PARSER_DISP_RW
107108c2ecf20Sopenharmony_ci * Direct read/write of parser-dispatcher state (DICPUs and LUE) for debugging.
107118c2ecf20Sopenharmony_ci * Please note that this interface is only of use to debug tools which have
107128c2ecf20Sopenharmony_ci * knowledge of firmware and hardware data structures; nothing here is intended
107138c2ecf20Sopenharmony_ci * for use by normal driver code. Note that although this command is in the
107148c2ecf20Sopenharmony_ci * Admin privilege group, in tamperproof adapters, only read operations are
107158c2ecf20Sopenharmony_ci * permitted.
107168c2ecf20Sopenharmony_ci */
107178c2ecf20Sopenharmony_ci#define MC_CMD_PARSER_DISP_RW 0xe5
107188c2ecf20Sopenharmony_ci#undef MC_CMD_0xe5_PRIVILEGE_CTG
107198c2ecf20Sopenharmony_ci
107208c2ecf20Sopenharmony_ci#define MC_CMD_0xe5_PRIVILEGE_CTG SRIOV_CTG_ADMIN
107218c2ecf20Sopenharmony_ci
107228c2ecf20Sopenharmony_ci/* MC_CMD_PARSER_DISP_RW_IN msgrequest */
107238c2ecf20Sopenharmony_ci#define    MC_CMD_PARSER_DISP_RW_IN_LEN 32
107248c2ecf20Sopenharmony_ci/* identifies the target of the operation */
107258c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_TARGET_OFST 0
107268c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_TARGET_LEN 4
107278c2ecf20Sopenharmony_ci/* enum: RX dispatcher CPU */
107288c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_RX_DICPU 0x0
107298c2ecf20Sopenharmony_ci/* enum: TX dispatcher CPU */
107308c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_TX_DICPU 0x1
107318c2ecf20Sopenharmony_ci/* enum: Lookup engine (with original metadata format). Deprecated; used only
107328c2ecf20Sopenharmony_ci * by cmdclient as a fallback for very old Huntington firmware, and not
107338c2ecf20Sopenharmony_ci * supported in firmware beyond v6.4.0.1005. Use LUE_VERSIONED_METADATA
107348c2ecf20Sopenharmony_ci * instead.
107358c2ecf20Sopenharmony_ci */
107368c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_LUE 0x2
107378c2ecf20Sopenharmony_ci/* enum: Lookup engine (with requested metadata format) */
107388c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_LUE_VERSIONED_METADATA 0x3
107398c2ecf20Sopenharmony_ci/* enum: RX0 dispatcher CPU (alias for RX_DICPU; Medford has 2 RX DICPUs) */
107408c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_RX0_DICPU 0x0
107418c2ecf20Sopenharmony_ci/* enum: RX1 dispatcher CPU (only valid for Medford) */
107428c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_RX1_DICPU 0x4
107438c2ecf20Sopenharmony_ci/* enum: Miscellaneous other state (only valid for Medford) */
107448c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_MISC_STATE 0x5
107458c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
107468c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_OP_OFST 4
107478c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_OP_LEN 4
107488c2ecf20Sopenharmony_ci/* enum: Read a word of DICPU DMEM or a LUE entry */
107498c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_READ 0x0
107508c2ecf20Sopenharmony_ci/* enum: Write a word of DICPU DMEM or a LUE entry. Not permitted on
107518c2ecf20Sopenharmony_ci * tamperproof adapters.
107528c2ecf20Sopenharmony_ci */
107538c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_WRITE 0x1
107548c2ecf20Sopenharmony_ci/* enum: Read-modify-write a word of DICPU DMEM (not valid for LUE). Not
107558c2ecf20Sopenharmony_ci * permitted on tamperproof adapters.
107568c2ecf20Sopenharmony_ci */
107578c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_RMW 0x2
107588c2ecf20Sopenharmony_ci/* data memory address (DICPU targets) or LUE index (LUE targets) */
107598c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_ADDRESS_OFST 8
107608c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_ADDRESS_LEN 4
107618c2ecf20Sopenharmony_ci/* selector (for MISC_STATE target) */
107628c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_SELECTOR_OFST 8
107638c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_SELECTOR_LEN 4
107648c2ecf20Sopenharmony_ci/* enum: Port to datapath mapping */
107658c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_IN_PORT_DP_MAPPING 0x1
107668c2ecf20Sopenharmony_ci/* value to write (for DMEM writes) */
107678c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_DMEM_WRITE_VALUE_OFST 12
107688c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_DMEM_WRITE_VALUE_LEN 4
107698c2ecf20Sopenharmony_ci/* XOR value (for DMEM read-modify-writes: new = (old & mask) ^ value) */
107708c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_XOR_VALUE_OFST 12
107718c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_XOR_VALUE_LEN 4
107728c2ecf20Sopenharmony_ci/* AND mask (for DMEM read-modify-writes: new = (old & mask) ^ value) */
107738c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_AND_MASK_OFST 16
107748c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_DMEM_RMW_AND_MASK_LEN 4
107758c2ecf20Sopenharmony_ci/* metadata format (for LUE reads using LUE_VERSIONED_METADATA) */
107768c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_LUE_READ_METADATA_VERSION_OFST 12
107778c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_LUE_READ_METADATA_VERSION_LEN 4
107788c2ecf20Sopenharmony_ci/* value to write (for LUE writes) */
107798c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_LUE_WRITE_VALUE_OFST 12
107808c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_IN_LUE_WRITE_VALUE_LEN 20
107818c2ecf20Sopenharmony_ci
107828c2ecf20Sopenharmony_ci/* MC_CMD_PARSER_DISP_RW_OUT msgresponse */
107838c2ecf20Sopenharmony_ci#define    MC_CMD_PARSER_DISP_RW_OUT_LEN 52
107848c2ecf20Sopenharmony_ci/* value read (for DMEM reads) */
107858c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_DMEM_READ_VALUE_OFST 0
107868c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_DMEM_READ_VALUE_LEN 4
107878c2ecf20Sopenharmony_ci/* value read (for LUE reads) */
107888c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_LUE_READ_VALUE_OFST 0
107898c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_LUE_READ_VALUE_LEN 20
107908c2ecf20Sopenharmony_ci/* up to 8 32-bit words of additional soft state from the LUE manager (the
107918c2ecf20Sopenharmony_ci * exact content is firmware-dependent and intended only for debug use)
107928c2ecf20Sopenharmony_ci */
107938c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_LUE_MGR_STATE_OFST 20
107948c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_LUE_MGR_STATE_LEN 32
107958c2ecf20Sopenharmony_ci/* datapath(s) used for each port (for MISC_STATE PORT_DP_MAPPING selector) */
107968c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_PORT_DP_MAPPING_OFST 0
107978c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_PORT_DP_MAPPING_LEN 4
107988c2ecf20Sopenharmony_ci#define       MC_CMD_PARSER_DISP_RW_OUT_PORT_DP_MAPPING_NUM 4
107998c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_OUT_DP0 0x1 /* enum */
108008c2ecf20Sopenharmony_ci#define          MC_CMD_PARSER_DISP_RW_OUT_DP1 0x2 /* enum */
108018c2ecf20Sopenharmony_ci
108028c2ecf20Sopenharmony_ci
108038c2ecf20Sopenharmony_ci/***********************************/
108048c2ecf20Sopenharmony_ci/* MC_CMD_GET_PF_COUNT
108058c2ecf20Sopenharmony_ci * Get number of PFs on the device.
108068c2ecf20Sopenharmony_ci */
108078c2ecf20Sopenharmony_ci#define MC_CMD_GET_PF_COUNT 0xb6
108088c2ecf20Sopenharmony_ci#undef MC_CMD_0xb6_PRIVILEGE_CTG
108098c2ecf20Sopenharmony_ci
108108c2ecf20Sopenharmony_ci#define MC_CMD_0xb6_PRIVILEGE_CTG SRIOV_CTG_GENERAL
108118c2ecf20Sopenharmony_ci
108128c2ecf20Sopenharmony_ci/* MC_CMD_GET_PF_COUNT_IN msgrequest */
108138c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PF_COUNT_IN_LEN 0
108148c2ecf20Sopenharmony_ci
108158c2ecf20Sopenharmony_ci/* MC_CMD_GET_PF_COUNT_OUT msgresponse */
108168c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PF_COUNT_OUT_LEN 1
108178c2ecf20Sopenharmony_ci/* Identifies the number of PFs on the device. */
108188c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PF_COUNT_OUT_PF_COUNT_OFST 0
108198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PF_COUNT_OUT_PF_COUNT_LEN 1
108208c2ecf20Sopenharmony_ci
108218c2ecf20Sopenharmony_ci
108228c2ecf20Sopenharmony_ci/***********************************/
108238c2ecf20Sopenharmony_ci/* MC_CMD_SET_PF_COUNT
108248c2ecf20Sopenharmony_ci * Set number of PFs on the device.
108258c2ecf20Sopenharmony_ci */
108268c2ecf20Sopenharmony_ci#define MC_CMD_SET_PF_COUNT 0xb7
108278c2ecf20Sopenharmony_ci
108288c2ecf20Sopenharmony_ci/* MC_CMD_SET_PF_COUNT_IN msgrequest */
108298c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PF_COUNT_IN_LEN 4
108308c2ecf20Sopenharmony_ci/* New number of PFs on the device. */
108318c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PF_COUNT_IN_PF_COUNT_OFST 0
108328c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PF_COUNT_IN_PF_COUNT_LEN 4
108338c2ecf20Sopenharmony_ci
108348c2ecf20Sopenharmony_ci/* MC_CMD_SET_PF_COUNT_OUT msgresponse */
108358c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PF_COUNT_OUT_LEN 0
108368c2ecf20Sopenharmony_ci
108378c2ecf20Sopenharmony_ci
108388c2ecf20Sopenharmony_ci/***********************************/
108398c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_ASSIGNMENT
108408c2ecf20Sopenharmony_ci * Get port assignment for current PCI function.
108418c2ecf20Sopenharmony_ci */
108428c2ecf20Sopenharmony_ci#define MC_CMD_GET_PORT_ASSIGNMENT 0xb8
108438c2ecf20Sopenharmony_ci#undef MC_CMD_0xb8_PRIVILEGE_CTG
108448c2ecf20Sopenharmony_ci
108458c2ecf20Sopenharmony_ci#define MC_CMD_0xb8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
108468c2ecf20Sopenharmony_ci
108478c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_ASSIGNMENT_IN msgrequest */
108488c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN 0
108498c2ecf20Sopenharmony_ci
108508c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_ASSIGNMENT_OUT msgresponse */
108518c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN 4
108528c2ecf20Sopenharmony_ci/* Identifies the port assignment for this function. */
108538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_ASSIGNMENT_OUT_PORT_OFST 0
108548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_ASSIGNMENT_OUT_PORT_LEN 4
108558c2ecf20Sopenharmony_ci
108568c2ecf20Sopenharmony_ci
108578c2ecf20Sopenharmony_ci/***********************************/
108588c2ecf20Sopenharmony_ci/* MC_CMD_SET_PORT_ASSIGNMENT
108598c2ecf20Sopenharmony_ci * Set port assignment for current PCI function.
108608c2ecf20Sopenharmony_ci */
108618c2ecf20Sopenharmony_ci#define MC_CMD_SET_PORT_ASSIGNMENT 0xb9
108628c2ecf20Sopenharmony_ci#undef MC_CMD_0xb9_PRIVILEGE_CTG
108638c2ecf20Sopenharmony_ci
108648c2ecf20Sopenharmony_ci#define MC_CMD_0xb9_PRIVILEGE_CTG SRIOV_CTG_ADMIN
108658c2ecf20Sopenharmony_ci
108668c2ecf20Sopenharmony_ci/* MC_CMD_SET_PORT_ASSIGNMENT_IN msgrequest */
108678c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PORT_ASSIGNMENT_IN_LEN 4
108688c2ecf20Sopenharmony_ci/* Identifies the port assignment for this function. */
108698c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_ASSIGNMENT_IN_PORT_OFST 0
108708c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_ASSIGNMENT_IN_PORT_LEN 4
108718c2ecf20Sopenharmony_ci
108728c2ecf20Sopenharmony_ci/* MC_CMD_SET_PORT_ASSIGNMENT_OUT msgresponse */
108738c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PORT_ASSIGNMENT_OUT_LEN 0
108748c2ecf20Sopenharmony_ci
108758c2ecf20Sopenharmony_ci
108768c2ecf20Sopenharmony_ci/***********************************/
108778c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_VIS
108788c2ecf20Sopenharmony_ci * Allocate VIs for current PCI function.
108798c2ecf20Sopenharmony_ci */
108808c2ecf20Sopenharmony_ci#define MC_CMD_ALLOC_VIS 0x8b
108818c2ecf20Sopenharmony_ci#undef MC_CMD_0x8b_PRIVILEGE_CTG
108828c2ecf20Sopenharmony_ci
108838c2ecf20Sopenharmony_ci#define MC_CMD_0x8b_PRIVILEGE_CTG SRIOV_CTG_GENERAL
108848c2ecf20Sopenharmony_ci
108858c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_VIS_IN msgrequest */
108868c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_VIS_IN_LEN 8
108878c2ecf20Sopenharmony_ci/* The minimum number of VIs that is acceptable */
108888c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_IN_MIN_VI_COUNT_OFST 0
108898c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_IN_MIN_VI_COUNT_LEN 4
108908c2ecf20Sopenharmony_ci/* The maximum number of VIs that would be useful */
108918c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_IN_MAX_VI_COUNT_OFST 4
108928c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_IN_MAX_VI_COUNT_LEN 4
108938c2ecf20Sopenharmony_ci
108948c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_VIS_OUT msgresponse: Huntington-compatible VI_ALLOC request.
108958c2ecf20Sopenharmony_ci * Use extended version in new code.
108968c2ecf20Sopenharmony_ci */
108978c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_VIS_OUT_LEN 8
108988c2ecf20Sopenharmony_ci/* The number of VIs allocated on this function */
108998c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_OUT_VI_COUNT_OFST 0
109008c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_OUT_VI_COUNT_LEN 4
109018c2ecf20Sopenharmony_ci/* The base absolute VI number allocated to this function. Required to
109028c2ecf20Sopenharmony_ci * correctly interpret wakeup events.
109038c2ecf20Sopenharmony_ci */
109048c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_OUT_VI_BASE_OFST 4
109058c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_OUT_VI_BASE_LEN 4
109068c2ecf20Sopenharmony_ci
109078c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_VIS_EXT_OUT msgresponse */
109088c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_VIS_EXT_OUT_LEN 12
109098c2ecf20Sopenharmony_ci/* The number of VIs allocated on this function */
109108c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_EXT_OUT_VI_COUNT_OFST 0
109118c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_EXT_OUT_VI_COUNT_LEN 4
109128c2ecf20Sopenharmony_ci/* The base absolute VI number allocated to this function. Required to
109138c2ecf20Sopenharmony_ci * correctly interpret wakeup events.
109148c2ecf20Sopenharmony_ci */
109158c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_EXT_OUT_VI_BASE_OFST 4
109168c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_EXT_OUT_VI_BASE_LEN 4
109178c2ecf20Sopenharmony_ci/* Function's port vi_shift value (always 0 on Huntington) */
109188c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_EXT_OUT_VI_SHIFT_OFST 8
109198c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_VIS_EXT_OUT_VI_SHIFT_LEN 4
109208c2ecf20Sopenharmony_ci
109218c2ecf20Sopenharmony_ci
109228c2ecf20Sopenharmony_ci/***********************************/
109238c2ecf20Sopenharmony_ci/* MC_CMD_FREE_VIS
109248c2ecf20Sopenharmony_ci * Free VIs for current PCI function. Any linked PIO buffers will be unlinked,
109258c2ecf20Sopenharmony_ci * but not freed.
109268c2ecf20Sopenharmony_ci */
109278c2ecf20Sopenharmony_ci#define MC_CMD_FREE_VIS 0x8c
109288c2ecf20Sopenharmony_ci#undef MC_CMD_0x8c_PRIVILEGE_CTG
109298c2ecf20Sopenharmony_ci
109308c2ecf20Sopenharmony_ci#define MC_CMD_0x8c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
109318c2ecf20Sopenharmony_ci
109328c2ecf20Sopenharmony_ci/* MC_CMD_FREE_VIS_IN msgrequest */
109338c2ecf20Sopenharmony_ci#define    MC_CMD_FREE_VIS_IN_LEN 0
109348c2ecf20Sopenharmony_ci
109358c2ecf20Sopenharmony_ci/* MC_CMD_FREE_VIS_OUT msgresponse */
109368c2ecf20Sopenharmony_ci#define    MC_CMD_FREE_VIS_OUT_LEN 0
109378c2ecf20Sopenharmony_ci
109388c2ecf20Sopenharmony_ci
109398c2ecf20Sopenharmony_ci/***********************************/
109408c2ecf20Sopenharmony_ci/* MC_CMD_GET_SRIOV_CFG
109418c2ecf20Sopenharmony_ci * Get SRIOV config for this PF.
109428c2ecf20Sopenharmony_ci */
109438c2ecf20Sopenharmony_ci#define MC_CMD_GET_SRIOV_CFG 0xba
109448c2ecf20Sopenharmony_ci#undef MC_CMD_0xba_PRIVILEGE_CTG
109458c2ecf20Sopenharmony_ci
109468c2ecf20Sopenharmony_ci#define MC_CMD_0xba_PRIVILEGE_CTG SRIOV_CTG_GENERAL
109478c2ecf20Sopenharmony_ci
109488c2ecf20Sopenharmony_ci/* MC_CMD_GET_SRIOV_CFG_IN msgrequest */
109498c2ecf20Sopenharmony_ci#define    MC_CMD_GET_SRIOV_CFG_IN_LEN 0
109508c2ecf20Sopenharmony_ci
109518c2ecf20Sopenharmony_ci/* MC_CMD_GET_SRIOV_CFG_OUT msgresponse */
109528c2ecf20Sopenharmony_ci#define    MC_CMD_GET_SRIOV_CFG_OUT_LEN 20
109538c2ecf20Sopenharmony_ci/* Number of VFs currently enabled. */
109548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_CURRENT_OFST 0
109558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_CURRENT_LEN 4
109568c2ecf20Sopenharmony_ci/* Max number of VFs before sriov stride and offset may need to be changed. */
109578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_MAX_OFST 4
109588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_MAX_LEN 4
109598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_FLAGS_OFST 8
109608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_FLAGS_LEN 4
109618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_OFST 8
109628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_LBN 0
109638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_SRIOV_CFG_OUT_VF_ENABLED_WIDTH 1
109648c2ecf20Sopenharmony_ci/* RID offset of first VF from PF. */
109658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_OFFSET_OFST 12
109668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_OFFSET_LEN 4
109678c2ecf20Sopenharmony_ci/* RID offset of each subsequent VF from the previous. */
109688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_STRIDE_OFST 16
109698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SRIOV_CFG_OUT_VF_STRIDE_LEN 4
109708c2ecf20Sopenharmony_ci
109718c2ecf20Sopenharmony_ci
109728c2ecf20Sopenharmony_ci/***********************************/
109738c2ecf20Sopenharmony_ci/* MC_CMD_SET_SRIOV_CFG
109748c2ecf20Sopenharmony_ci * Set SRIOV config for this PF.
109758c2ecf20Sopenharmony_ci */
109768c2ecf20Sopenharmony_ci#define MC_CMD_SET_SRIOV_CFG 0xbb
109778c2ecf20Sopenharmony_ci#undef MC_CMD_0xbb_PRIVILEGE_CTG
109788c2ecf20Sopenharmony_ci
109798c2ecf20Sopenharmony_ci#define MC_CMD_0xbb_PRIVILEGE_CTG SRIOV_CTG_ADMIN
109808c2ecf20Sopenharmony_ci
109818c2ecf20Sopenharmony_ci/* MC_CMD_SET_SRIOV_CFG_IN msgrequest */
109828c2ecf20Sopenharmony_ci#define    MC_CMD_SET_SRIOV_CFG_IN_LEN 20
109838c2ecf20Sopenharmony_ci/* Number of VFs currently enabled. */
109848c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_CURRENT_OFST 0
109858c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_CURRENT_LEN 4
109868c2ecf20Sopenharmony_ci/* Max number of VFs before sriov stride and offset may need to be changed. */
109878c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_MAX_OFST 4
109888c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_MAX_LEN 4
109898c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_FLAGS_OFST 8
109908c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_FLAGS_LEN 4
109918c2ecf20Sopenharmony_ci#define        MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_OFST 8
109928c2ecf20Sopenharmony_ci#define        MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_LBN 0
109938c2ecf20Sopenharmony_ci#define        MC_CMD_SET_SRIOV_CFG_IN_VF_ENABLED_WIDTH 1
109948c2ecf20Sopenharmony_ci/* RID offset of first VF from PF, or 0 for no change, or
109958c2ecf20Sopenharmony_ci * MC_CMD_RESOURCE_INSTANCE_ANY to allow the system to allocate an offset.
109968c2ecf20Sopenharmony_ci */
109978c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_OFFSET_OFST 12
109988c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_OFFSET_LEN 4
109998c2ecf20Sopenharmony_ci/* RID offset of each subsequent VF from the previous, 0 for no change, or
110008c2ecf20Sopenharmony_ci * MC_CMD_RESOURCE_INSTANCE_ANY to allow the system to allocate a stride.
110018c2ecf20Sopenharmony_ci */
110028c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_STRIDE_OFST 16
110038c2ecf20Sopenharmony_ci#define       MC_CMD_SET_SRIOV_CFG_IN_VF_STRIDE_LEN 4
110048c2ecf20Sopenharmony_ci
110058c2ecf20Sopenharmony_ci/* MC_CMD_SET_SRIOV_CFG_OUT msgresponse */
110068c2ecf20Sopenharmony_ci#define    MC_CMD_SET_SRIOV_CFG_OUT_LEN 0
110078c2ecf20Sopenharmony_ci
110088c2ecf20Sopenharmony_ci
110098c2ecf20Sopenharmony_ci/***********************************/
110108c2ecf20Sopenharmony_ci/* MC_CMD_GET_VI_ALLOC_INFO
110118c2ecf20Sopenharmony_ci * Get information about number of VI's and base VI number allocated to this
110128c2ecf20Sopenharmony_ci * function.
110138c2ecf20Sopenharmony_ci */
110148c2ecf20Sopenharmony_ci#define MC_CMD_GET_VI_ALLOC_INFO 0x8d
110158c2ecf20Sopenharmony_ci#undef MC_CMD_0x8d_PRIVILEGE_CTG
110168c2ecf20Sopenharmony_ci
110178c2ecf20Sopenharmony_ci#define MC_CMD_0x8d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
110188c2ecf20Sopenharmony_ci
110198c2ecf20Sopenharmony_ci/* MC_CMD_GET_VI_ALLOC_INFO_IN msgrequest */
110208c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VI_ALLOC_INFO_IN_LEN 0
110218c2ecf20Sopenharmony_ci
110228c2ecf20Sopenharmony_ci/* MC_CMD_GET_VI_ALLOC_INFO_OUT msgresponse */
110238c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VI_ALLOC_INFO_OUT_LEN 12
110248c2ecf20Sopenharmony_ci/* The number of VIs allocated on this function */
110258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_COUNT_OFST 0
110268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_COUNT_LEN 4
110278c2ecf20Sopenharmony_ci/* The base absolute VI number allocated to this function. Required to
110288c2ecf20Sopenharmony_ci * correctly interpret wakeup events.
110298c2ecf20Sopenharmony_ci */
110308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_BASE_OFST 4
110318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_BASE_LEN 4
110328c2ecf20Sopenharmony_ci/* Function's port vi_shift value (always 0 on Huntington) */
110338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_SHIFT_OFST 8
110348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_ALLOC_INFO_OUT_VI_SHIFT_LEN 4
110358c2ecf20Sopenharmony_ci
110368c2ecf20Sopenharmony_ci
110378c2ecf20Sopenharmony_ci/***********************************/
110388c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_VI_STATE
110398c2ecf20Sopenharmony_ci * For CmdClient use. Dump pertinent information on a specific absolute VI.
110408c2ecf20Sopenharmony_ci */
110418c2ecf20Sopenharmony_ci#define MC_CMD_DUMP_VI_STATE 0x8e
110428c2ecf20Sopenharmony_ci#undef MC_CMD_0x8e_PRIVILEGE_CTG
110438c2ecf20Sopenharmony_ci
110448c2ecf20Sopenharmony_ci#define MC_CMD_0x8e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
110458c2ecf20Sopenharmony_ci
110468c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_VI_STATE_IN msgrequest */
110478c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_VI_STATE_IN_LEN 4
110488c2ecf20Sopenharmony_ci/* The VI number to query. */
110498c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_IN_VI_NUMBER_OFST 0
110508c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_IN_VI_NUMBER_LEN 4
110518c2ecf20Sopenharmony_ci
110528c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_VI_STATE_OUT msgresponse */
110538c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_VI_STATE_OUT_LEN 96
110548c2ecf20Sopenharmony_ci/* The PF part of the function owning this VI. */
110558c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_OWNER_PF_OFST 0
110568c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_OWNER_PF_LEN 2
110578c2ecf20Sopenharmony_ci/* The VF part of the function owning this VI. */
110588c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_OWNER_VF_OFST 2
110598c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_OWNER_VF_LEN 2
110608c2ecf20Sopenharmony_ci/* Base of VIs allocated to this function. */
110618c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_BASE_OFST 4
110628c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_BASE_LEN 2
110638c2ecf20Sopenharmony_ci/* Count of VIs allocated to the owner function. */
110648c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_COUNT_OFST 6
110658c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VI_COUNT_LEN 2
110668c2ecf20Sopenharmony_ci/* Base interrupt vector allocated to this function. */
110678c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_BASE_OFST 8
110688c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_BASE_LEN 2
110698c2ecf20Sopenharmony_ci/* Number of interrupt vectors allocated to this function. */
110708c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_COUNT_OFST 10
110718c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_FUNC_VECTOR_COUNT_LEN 2
110728c2ecf20Sopenharmony_ci/* Raw evq ptr table data. */
110738c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_OFST 12
110748c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_LEN 8
110758c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_LO_OFST 12
110768c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EVQ_PTR_RAW_HI_OFST 16
110778c2ecf20Sopenharmony_ci/* Raw evq timer table data. */
110788c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_OFST 20
110798c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_LEN 8
110808c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_LO_OFST 20
110818c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EV_TIMER_RAW_HI_OFST 24
110828c2ecf20Sopenharmony_ci/* Combined metadata field. */
110838c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_OFST 28
110848c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_LEN 4
110858c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_OFST 28
110868c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_LBN 0
110878c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_BASE_WIDTH 16
110888c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_OFST 28
110898c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_LBN 16
110908c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_BUFS_NPAGES_WIDTH 8
110918c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_OFST 28
110928c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_LBN 24
110938c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_EV_META_WKUP_REF_WIDTH 8
110948c2ecf20Sopenharmony_ci/* TXDPCPU raw table data for queue. */
110958c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_OFST 32
110968c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_LEN 8
110978c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_LO_OFST 32
110988c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_0_HI_OFST 36
110998c2ecf20Sopenharmony_ci/* TXDPCPU raw table data for queue. */
111008c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_OFST 40
111018c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_LEN 8
111028c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_LO_OFST 40
111038c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_1_HI_OFST 44
111048c2ecf20Sopenharmony_ci/* TXDPCPU raw table data for queue. */
111058c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_OFST 48
111068c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_LEN 8
111078c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_LO_OFST 48
111088c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_RAW_TBL_2_HI_OFST 52
111098c2ecf20Sopenharmony_ci/* Combined metadata field. */
111108c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_OFST 56
111118c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_LEN 8
111128c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_LO_OFST 56
111138c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_HI_OFST 60
111148c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_OFST 56
111158c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_LBN 0
111168c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_BASE_WIDTH 16
111178c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_OFST 56
111188c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_LBN 16
111198c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_BUFS_NPAGES_WIDTH 8
111208c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_OFST 56
111218c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_LBN 24
111228c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_QSTATE_WIDTH 8
111238c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_OFST 56
111248c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_LBN 32
111258c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_TX_META_WAITCOUNT_WIDTH 8
111268c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_OFST 56
111278c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_LBN 40
111288c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_PADDING_WIDTH 24
111298c2ecf20Sopenharmony_ci/* RXDPCPU raw table data for queue. */
111308c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_OFST 64
111318c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_LEN 8
111328c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_LO_OFST 64
111338c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_0_HI_OFST 68
111348c2ecf20Sopenharmony_ci/* RXDPCPU raw table data for queue. */
111358c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_OFST 72
111368c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_LEN 8
111378c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_LO_OFST 72
111388c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_1_HI_OFST 76
111398c2ecf20Sopenharmony_ci/* Reserved, currently 0. */
111408c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_OFST 80
111418c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_LEN 8
111428c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_LO_OFST 80
111438c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_RAW_TBL_2_HI_OFST 84
111448c2ecf20Sopenharmony_ci/* Combined metadata field. */
111458c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_OFST 88
111468c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_LEN 8
111478c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_LO_OFST 88
111488c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_HI_OFST 92
111498c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_OFST 88
111508c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_LBN 0
111518c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_BASE_WIDTH 16
111528c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_OFST 88
111538c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_LBN 16
111548c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_BUFS_NPAGES_WIDTH 8
111558c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_OFST 88
111568c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_LBN 24
111578c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_QSTATE_WIDTH 8
111588c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_OFST 88
111598c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_LBN 32
111608c2ecf20Sopenharmony_ci#define        MC_CMD_DUMP_VI_STATE_OUT_VI_RX_META_WAITCOUNT_WIDTH 8
111618c2ecf20Sopenharmony_ci
111628c2ecf20Sopenharmony_ci
111638c2ecf20Sopenharmony_ci/***********************************/
111648c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_PIOBUF
111658c2ecf20Sopenharmony_ci * Allocate a push I/O buffer for later use with a tx queue.
111668c2ecf20Sopenharmony_ci */
111678c2ecf20Sopenharmony_ci#define MC_CMD_ALLOC_PIOBUF 0x8f
111688c2ecf20Sopenharmony_ci#undef MC_CMD_0x8f_PRIVILEGE_CTG
111698c2ecf20Sopenharmony_ci
111708c2ecf20Sopenharmony_ci#define MC_CMD_0x8f_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
111718c2ecf20Sopenharmony_ci
111728c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_PIOBUF_IN msgrequest */
111738c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_PIOBUF_IN_LEN 0
111748c2ecf20Sopenharmony_ci
111758c2ecf20Sopenharmony_ci/* MC_CMD_ALLOC_PIOBUF_OUT msgresponse */
111768c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOC_PIOBUF_OUT_LEN 4
111778c2ecf20Sopenharmony_ci/* Handle for allocated push I/O buffer. */
111788c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_PIOBUF_OUT_PIOBUF_HANDLE_OFST 0
111798c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOC_PIOBUF_OUT_PIOBUF_HANDLE_LEN 4
111808c2ecf20Sopenharmony_ci
111818c2ecf20Sopenharmony_ci
111828c2ecf20Sopenharmony_ci/***********************************/
111838c2ecf20Sopenharmony_ci/* MC_CMD_FREE_PIOBUF
111848c2ecf20Sopenharmony_ci * Free a push I/O buffer.
111858c2ecf20Sopenharmony_ci */
111868c2ecf20Sopenharmony_ci#define MC_CMD_FREE_PIOBUF 0x90
111878c2ecf20Sopenharmony_ci#undef MC_CMD_0x90_PRIVILEGE_CTG
111888c2ecf20Sopenharmony_ci
111898c2ecf20Sopenharmony_ci#define MC_CMD_0x90_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
111908c2ecf20Sopenharmony_ci
111918c2ecf20Sopenharmony_ci/* MC_CMD_FREE_PIOBUF_IN msgrequest */
111928c2ecf20Sopenharmony_ci#define    MC_CMD_FREE_PIOBUF_IN_LEN 4
111938c2ecf20Sopenharmony_ci/* Handle for allocated push I/O buffer. */
111948c2ecf20Sopenharmony_ci#define       MC_CMD_FREE_PIOBUF_IN_PIOBUF_HANDLE_OFST 0
111958c2ecf20Sopenharmony_ci#define       MC_CMD_FREE_PIOBUF_IN_PIOBUF_HANDLE_LEN 4
111968c2ecf20Sopenharmony_ci
111978c2ecf20Sopenharmony_ci/* MC_CMD_FREE_PIOBUF_OUT msgresponse */
111988c2ecf20Sopenharmony_ci#define    MC_CMD_FREE_PIOBUF_OUT_LEN 0
111998c2ecf20Sopenharmony_ci
112008c2ecf20Sopenharmony_ci
112018c2ecf20Sopenharmony_ci/***********************************/
112028c2ecf20Sopenharmony_ci/* MC_CMD_GET_VI_TLP_PROCESSING
112038c2ecf20Sopenharmony_ci * Get TLP steering and ordering information for a VI.
112048c2ecf20Sopenharmony_ci */
112058c2ecf20Sopenharmony_ci#define MC_CMD_GET_VI_TLP_PROCESSING 0xb0
112068c2ecf20Sopenharmony_ci#undef MC_CMD_0xb0_PRIVILEGE_CTG
112078c2ecf20Sopenharmony_ci
112088c2ecf20Sopenharmony_ci#define MC_CMD_0xb0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
112098c2ecf20Sopenharmony_ci
112108c2ecf20Sopenharmony_ci/* MC_CMD_GET_VI_TLP_PROCESSING_IN msgrequest */
112118c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VI_TLP_PROCESSING_IN_LEN 4
112128c2ecf20Sopenharmony_ci/* VI number to get information for. */
112138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_IN_INSTANCE_OFST 0
112148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_IN_INSTANCE_LEN 4
112158c2ecf20Sopenharmony_ci
112168c2ecf20Sopenharmony_ci/* MC_CMD_GET_VI_TLP_PROCESSING_OUT msgresponse */
112178c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VI_TLP_PROCESSING_OUT_LEN 4
112188c2ecf20Sopenharmony_ci/* Transaction processing steering hint 1 for use with the Rx Queue. */
112198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG1_RX_OFST 0
112208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG1_RX_LEN 1
112218c2ecf20Sopenharmony_ci/* Transaction processing steering hint 2 for use with the Ev Queue. */
112228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG2_EV_OFST 1
112238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_TAG2_EV_LEN 1
112248c2ecf20Sopenharmony_ci/* Use Relaxed ordering model for TLPs on this VI. */
112258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_RELAXED_ORDERING_LBN 16
112268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_RELAXED_ORDERING_WIDTH 1
112278c2ecf20Sopenharmony_ci/* Use ID based ordering for TLPs on this VI. */
112288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_ID_BASED_ORDERING_LBN 17
112298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_ID_BASED_ORDERING_WIDTH 1
112308c2ecf20Sopenharmony_ci/* Set no snoop bit for TLPs on this VI. */
112318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_NO_SNOOP_LBN 18
112328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_NO_SNOOP_WIDTH 1
112338c2ecf20Sopenharmony_ci/* Enable TPH for TLPs on this VI. */
112348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_ON_LBN 19
112358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_TPH_ON_WIDTH 1
112368c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_DATA_OFST 0
112378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VI_TLP_PROCESSING_OUT_DATA_LEN 4
112388c2ecf20Sopenharmony_ci
112398c2ecf20Sopenharmony_ci
112408c2ecf20Sopenharmony_ci/***********************************/
112418c2ecf20Sopenharmony_ci/* MC_CMD_SET_VI_TLP_PROCESSING
112428c2ecf20Sopenharmony_ci * Set TLP steering and ordering information for a VI.
112438c2ecf20Sopenharmony_ci */
112448c2ecf20Sopenharmony_ci#define MC_CMD_SET_VI_TLP_PROCESSING 0xb1
112458c2ecf20Sopenharmony_ci#undef MC_CMD_0xb1_PRIVILEGE_CTG
112468c2ecf20Sopenharmony_ci
112478c2ecf20Sopenharmony_ci#define MC_CMD_0xb1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
112488c2ecf20Sopenharmony_ci
112498c2ecf20Sopenharmony_ci/* MC_CMD_SET_VI_TLP_PROCESSING_IN msgrequest */
112508c2ecf20Sopenharmony_ci#define    MC_CMD_SET_VI_TLP_PROCESSING_IN_LEN 8
112518c2ecf20Sopenharmony_ci/* VI number to set information for. */
112528c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_INSTANCE_OFST 0
112538c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_INSTANCE_LEN 4
112548c2ecf20Sopenharmony_ci/* Transaction processing steering hint 1 for use with the Rx Queue. */
112558c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG1_RX_OFST 4
112568c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG1_RX_LEN 1
112578c2ecf20Sopenharmony_ci/* Transaction processing steering hint 2 for use with the Ev Queue. */
112588c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG2_EV_OFST 5
112598c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_TAG2_EV_LEN 1
112608c2ecf20Sopenharmony_ci/* Use Relaxed ordering model for TLPs on this VI. */
112618c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_RELAXED_ORDERING_LBN 48
112628c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_RELAXED_ORDERING_WIDTH 1
112638c2ecf20Sopenharmony_ci/* Use ID based ordering for TLPs on this VI. */
112648c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_ID_BASED_ORDERING_LBN 49
112658c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_ID_BASED_ORDERING_WIDTH 1
112668c2ecf20Sopenharmony_ci/* Set the no snoop bit for TLPs on this VI. */
112678c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_NO_SNOOP_LBN 50
112688c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_NO_SNOOP_WIDTH 1
112698c2ecf20Sopenharmony_ci/* Enable TPH for TLPs on this VI. */
112708c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_ON_LBN 51
112718c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_TPH_ON_WIDTH 1
112728c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_DATA_OFST 4
112738c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VI_TLP_PROCESSING_IN_DATA_LEN 4
112748c2ecf20Sopenharmony_ci
112758c2ecf20Sopenharmony_ci/* MC_CMD_SET_VI_TLP_PROCESSING_OUT msgresponse */
112768c2ecf20Sopenharmony_ci#define    MC_CMD_SET_VI_TLP_PROCESSING_OUT_LEN 0
112778c2ecf20Sopenharmony_ci
112788c2ecf20Sopenharmony_ci
112798c2ecf20Sopenharmony_ci/***********************************/
112808c2ecf20Sopenharmony_ci/* MC_CMD_GET_TLP_PROCESSING_GLOBALS
112818c2ecf20Sopenharmony_ci * Get global PCIe steering and transaction processing configuration.
112828c2ecf20Sopenharmony_ci */
112838c2ecf20Sopenharmony_ci#define MC_CMD_GET_TLP_PROCESSING_GLOBALS 0xbc
112848c2ecf20Sopenharmony_ci#undef MC_CMD_0xbc_PRIVILEGE_CTG
112858c2ecf20Sopenharmony_ci
112868c2ecf20Sopenharmony_ci#define MC_CMD_0xbc_PRIVILEGE_CTG SRIOV_CTG_ADMIN
112878c2ecf20Sopenharmony_ci
112888c2ecf20Sopenharmony_ci/* MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN msgrequest */
112898c2ecf20Sopenharmony_ci#define    MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_LEN 4
112908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_OFST 0
112918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_LEN 4
112928c2ecf20Sopenharmony_ci/* enum: MISC. */
112938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_MISC 0x0
112948c2ecf20Sopenharmony_ci/* enum: IDO. */
112958c2ecf20Sopenharmony_ci#define          MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_IDO 0x1
112968c2ecf20Sopenharmony_ci/* enum: RO. */
112978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_RO 0x2
112988c2ecf20Sopenharmony_ci/* enum: TPH Type. */
112998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_TPH_TYPE 0x3
113008c2ecf20Sopenharmony_ci
113018c2ecf20Sopenharmony_ci/* MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT msgresponse */
113028c2ecf20Sopenharmony_ci#define    MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_LEN 8
113038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_GLOBAL_CATEGORY_OFST 0
113048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_GLOBAL_CATEGORY_LEN 4
113058c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
113068c2ecf20Sopenharmony_ci/*               MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN/TLP_GLOBAL_CATEGORY */
113078c2ecf20Sopenharmony_ci/* Amalgamated TLP info word. */
113088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_WORD_OFST 4
113098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_WORD_LEN 4
113108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_OFST 4
113118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_LBN 0
113128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_WTAG_EN_WIDTH 1
113138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_OFST 4
113148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_LBN 1
113158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_MISC_SPARE_WIDTH 31
113168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_OFST 4
113178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_LBN 0
113188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_DL_EN_WIDTH 1
113198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_OFST 4
113208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_LBN 1
113218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_TX_EN_WIDTH 1
113228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_OFST 4
113238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_LBN 2
113248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_EV_EN_WIDTH 1
113258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_OFST 4
113268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_LBN 3
113278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_RX_EN_WIDTH 1
113288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_OFST 4
113298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_LBN 4
113308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_IDO_SPARE_WIDTH 28
113318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_OFST 4
113328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_LBN 0
113338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_RXDMA_EN_WIDTH 1
113348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_OFST 4
113358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_LBN 1
113368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_TXDMA_EN_WIDTH 1
113378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_OFST 4
113388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_LBN 2
113398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_DL_EN_WIDTH 1
113408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_OFST 4
113418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_LBN 3
113428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_RO_SPARE_WIDTH 29
113438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_OFST 4
113448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_LBN 0
113458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_MSIX_WIDTH 2
113468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_OFST 4
113478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_LBN 2
113488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_DL_WIDTH 2
113498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_OFST 4
113508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_LBN 4
113518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_TX_WIDTH 2
113528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_OFST 4
113538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_LBN 6
113548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_EV_WIDTH 2
113558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_OFST 4
113568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_LBN 8
113578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TPH_TYPE_RX_WIDTH 2
113588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_OFST 4
113598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_LBN 9
113608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TLP_PROCESSING_GLOBALS_OUT_TLP_INFO_TLP_TYPE_SPARE_WIDTH 23
113618c2ecf20Sopenharmony_ci
113628c2ecf20Sopenharmony_ci
113638c2ecf20Sopenharmony_ci/***********************************/
113648c2ecf20Sopenharmony_ci/* MC_CMD_SET_TLP_PROCESSING_GLOBALS
113658c2ecf20Sopenharmony_ci * Set global PCIe steering and transaction processing configuration.
113668c2ecf20Sopenharmony_ci */
113678c2ecf20Sopenharmony_ci#define MC_CMD_SET_TLP_PROCESSING_GLOBALS 0xbd
113688c2ecf20Sopenharmony_ci#undef MC_CMD_0xbd_PRIVILEGE_CTG
113698c2ecf20Sopenharmony_ci
113708c2ecf20Sopenharmony_ci#define MC_CMD_0xbd_PRIVILEGE_CTG SRIOV_CTG_ADMIN
113718c2ecf20Sopenharmony_ci
113728c2ecf20Sopenharmony_ci/* MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN msgrequest */
113738c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_LEN 8
113748c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_OFST 0
113758c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_GLOBAL_CATEGORY_LEN 4
113768c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
113778c2ecf20Sopenharmony_ci/*               MC_CMD_GET_TLP_PROCESSING_GLOBALS/MC_CMD_GET_TLP_PROCESSING_GLOBALS_IN/TLP_GLOBAL_CATEGORY */
113788c2ecf20Sopenharmony_ci/* Amalgamated TLP info word. */
113798c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_WORD_OFST 4
113808c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_WORD_LEN 4
113818c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_OFST 4
113828c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_LBN 0
113838c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_MISC_WTAG_EN_WIDTH 1
113848c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_OFST 4
113858c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_LBN 0
113868c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_DL_EN_WIDTH 1
113878c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_OFST 4
113888c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_LBN 1
113898c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_TX_EN_WIDTH 1
113908c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_OFST 4
113918c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_LBN 2
113928c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_EV_EN_WIDTH 1
113938c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_OFST 4
113948c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_LBN 3
113958c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_IDO_RX_EN_WIDTH 1
113968c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_OFST 4
113978c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_LBN 0
113988c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_RXDMA_EN_WIDTH 1
113998c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_OFST 4
114008c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_LBN 1
114018c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_TXDMA_EN_WIDTH 1
114028c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_OFST 4
114038c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_LBN 2
114048c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_RO_DL_EN_WIDTH 1
114058c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_OFST 4
114068c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_LBN 0
114078c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_MSIX_WIDTH 2
114088c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_OFST 4
114098c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_LBN 2
114108c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_DL_WIDTH 2
114118c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_OFST 4
114128c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_LBN 4
114138c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_TX_WIDTH 2
114148c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_OFST 4
114158c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_LBN 6
114168c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_EV_WIDTH 2
114178c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_OFST 4
114188c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_LBN 8
114198c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_TPH_TYPE_RX_WIDTH 2
114208c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_OFST 4
114218c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_LBN 10
114228c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TLP_PROCESSING_GLOBALS_IN_TLP_INFO_SPARE_WIDTH 22
114238c2ecf20Sopenharmony_ci
114248c2ecf20Sopenharmony_ci/* MC_CMD_SET_TLP_PROCESSING_GLOBALS_OUT msgresponse */
114258c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TLP_PROCESSING_GLOBALS_OUT_LEN 0
114268c2ecf20Sopenharmony_ci
114278c2ecf20Sopenharmony_ci
114288c2ecf20Sopenharmony_ci/***********************************/
114298c2ecf20Sopenharmony_ci/* MC_CMD_SATELLITE_DOWNLOAD
114308c2ecf20Sopenharmony_ci * Download a new set of images to the satellite CPUs from the host.
114318c2ecf20Sopenharmony_ci */
114328c2ecf20Sopenharmony_ci#define MC_CMD_SATELLITE_DOWNLOAD 0x91
114338c2ecf20Sopenharmony_ci#undef MC_CMD_0x91_PRIVILEGE_CTG
114348c2ecf20Sopenharmony_ci
114358c2ecf20Sopenharmony_ci#define MC_CMD_0x91_PRIVILEGE_CTG SRIOV_CTG_ADMIN
114368c2ecf20Sopenharmony_ci
114378c2ecf20Sopenharmony_ci/* MC_CMD_SATELLITE_DOWNLOAD_IN msgrequest: The reset requirements for the CPUs
114388c2ecf20Sopenharmony_ci * are subtle, and so downloads must proceed in a number of phases.
114398c2ecf20Sopenharmony_ci *
114408c2ecf20Sopenharmony_ci * 1) PHASE_RESET with a target of TARGET_ALL and chunk ID/length of 0.
114418c2ecf20Sopenharmony_ci *
114428c2ecf20Sopenharmony_ci * 2) PHASE_IMEMS for each of the IMEM targets (target IDs 0-11). Each download
114438c2ecf20Sopenharmony_ci * may consist of multiple chunks. The final chunk (with CHUNK_ID_LAST) should
114448c2ecf20Sopenharmony_ci * be a checksum (a simple 32-bit sum) of the transferred data. An individual
114458c2ecf20Sopenharmony_ci * download may be aborted using CHUNK_ID_ABORT.
114468c2ecf20Sopenharmony_ci *
114478c2ecf20Sopenharmony_ci * 3) PHASE_VECTORS for each of the vector table targets (target IDs 12-15),
114488c2ecf20Sopenharmony_ci * similar to PHASE_IMEMS.
114498c2ecf20Sopenharmony_ci *
114508c2ecf20Sopenharmony_ci * 4) PHASE_READY with a target of TARGET_ALL and chunk ID/length of 0.
114518c2ecf20Sopenharmony_ci *
114528c2ecf20Sopenharmony_ci * After any error (a requested abort is not considered to be an error) the
114538c2ecf20Sopenharmony_ci * sequence must be restarted from PHASE_RESET.
114548c2ecf20Sopenharmony_ci */
114558c2ecf20Sopenharmony_ci#define    MC_CMD_SATELLITE_DOWNLOAD_IN_LENMIN 20
114568c2ecf20Sopenharmony_ci#define    MC_CMD_SATELLITE_DOWNLOAD_IN_LENMAX 252
114578c2ecf20Sopenharmony_ci#define    MC_CMD_SATELLITE_DOWNLOAD_IN_LENMAX_MCDI2 1020
114588c2ecf20Sopenharmony_ci#define    MC_CMD_SATELLITE_DOWNLOAD_IN_LEN(num) (16+4*(num))
114598c2ecf20Sopenharmony_ci#define    MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_NUM(len) (((len)-16)/4)
114608c2ecf20Sopenharmony_ci/* Download phase. (Note: the IDLE phase is used internally and is never valid
114618c2ecf20Sopenharmony_ci * in a command from the host.)
114628c2ecf20Sopenharmony_ci */
114638c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_OFST 0
114648c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_LEN 4
114658c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_IDLE 0x0 /* enum */
114668c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_RESET 0x1 /* enum */
114678c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_IMEMS 0x2 /* enum */
114688c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_VECTORS 0x3 /* enum */
114698c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_PHASE_READY 0x4 /* enum */
114708c2ecf20Sopenharmony_ci/* Target for download. (These match the blob numbers defined in
114718c2ecf20Sopenharmony_ci * mc_flash_layout.h.)
114728c2ecf20Sopenharmony_ci */
114738c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_OFST 4
114748c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_LEN 4
114758c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114768c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_TEXT 0x0
114778c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114788c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_TEXT 0x1
114798c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114808c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDP_TEXT 0x2
114818c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114828c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDP_TEXT 0x3
114838c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114848c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_LUT 0x4
114858c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114868c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_LUT_CFG 0x5
114878c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114888c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_LUT 0x6
114898c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114908c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_LUT_CFG 0x7
114918c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114928c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_HR_PGM 0x8
114938c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114948c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXHRSL_SL_PGM 0x9
114958c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114968c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_HR_PGM 0xa
114978c2ecf20Sopenharmony_ci/* enum: Valid in phase 2 (PHASE_IMEMS) only */
114988c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXHRSL_SL_PGM 0xb
114998c2ecf20Sopenharmony_ci/* enum: Valid in phase 3 (PHASE_VECTORS) only */
115008c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_VTBL0 0xc
115018c2ecf20Sopenharmony_ci/* enum: Valid in phase 3 (PHASE_VECTORS) only */
115028c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_VTBL0 0xd
115038c2ecf20Sopenharmony_ci/* enum: Valid in phase 3 (PHASE_VECTORS) only */
115048c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_RXDI_VTBL1 0xe
115058c2ecf20Sopenharmony_ci/* enum: Valid in phase 3 (PHASE_VECTORS) only */
115068c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_TXDI_VTBL1 0xf
115078c2ecf20Sopenharmony_ci/* enum: Valid in phases 1 (PHASE_RESET) and 4 (PHASE_READY) only */
115088c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_TARGET_ALL 0xffffffff
115098c2ecf20Sopenharmony_ci/* Chunk ID, or CHUNK_ID_LAST or CHUNK_ID_ABORT */
115108c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_OFST 8
115118c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_LEN 4
115128c2ecf20Sopenharmony_ci/* enum: Last chunk, containing checksum rather than data */
115138c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_LAST 0xffffffff
115148c2ecf20Sopenharmony_ci/* enum: Abort download of this item */
115158c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_ID_ABORT 0xfffffffe
115168c2ecf20Sopenharmony_ci/* Length of this chunk in bytes */
115178c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_LEN_OFST 12
115188c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_LEN_LEN 4
115198c2ecf20Sopenharmony_ci/* Data for this chunk */
115208c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_OFST 16
115218c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_LEN 4
115228c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MINNUM 1
115238c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MAXNUM 59
115248c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_IN_CHUNK_DATA_MAXNUM_MCDI2 251
115258c2ecf20Sopenharmony_ci
115268c2ecf20Sopenharmony_ci/* MC_CMD_SATELLITE_DOWNLOAD_OUT msgresponse */
115278c2ecf20Sopenharmony_ci#define    MC_CMD_SATELLITE_DOWNLOAD_OUT_LEN 8
115288c2ecf20Sopenharmony_ci/* Same as MC_CMD_ERR field, but included as 0 in success cases */
115298c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_OUT_RESULT_OFST 0
115308c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_OUT_RESULT_LEN 4
115318c2ecf20Sopenharmony_ci/* Extra status information */
115328c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_OUT_INFO_OFST 4
115338c2ecf20Sopenharmony_ci#define       MC_CMD_SATELLITE_DOWNLOAD_OUT_INFO_LEN 4
115348c2ecf20Sopenharmony_ci/* enum: Code download OK, completed. */
115358c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_COMPLETE 0x0
115368c2ecf20Sopenharmony_ci/* enum: Code download aborted as requested. */
115378c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_ABORTED 0x1
115388c2ecf20Sopenharmony_ci/* enum: Code download OK so far, send next chunk. */
115398c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_OK_NEXT_CHUNK 0x2
115408c2ecf20Sopenharmony_ci/* enum: Download phases out of sequence */
115418c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_PHASE 0x100
115428c2ecf20Sopenharmony_ci/* enum: Bad target for this phase */
115438c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_TARGET 0x101
115448c2ecf20Sopenharmony_ci/* enum: Chunk ID out of sequence */
115458c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHUNK_ID 0x200
115468c2ecf20Sopenharmony_ci/* enum: Chunk length zero or too large */
115478c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHUNK_LEN 0x201
115488c2ecf20Sopenharmony_ci/* enum: Checksum was incorrect */
115498c2ecf20Sopenharmony_ci#define          MC_CMD_SATELLITE_DOWNLOAD_OUT_ERR_BAD_CHECKSUM 0x300
115508c2ecf20Sopenharmony_ci
115518c2ecf20Sopenharmony_ci
115528c2ecf20Sopenharmony_ci/***********************************/
115538c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES
115548c2ecf20Sopenharmony_ci * Get device capabilities.
115558c2ecf20Sopenharmony_ci *
115568c2ecf20Sopenharmony_ci * This is supplementary to the MC_CMD_GET_BOARD_CFG command, and intended to
115578c2ecf20Sopenharmony_ci * reference inherent device capabilities as opposed to current NVRAM config.
115588c2ecf20Sopenharmony_ci */
115598c2ecf20Sopenharmony_ci#define MC_CMD_GET_CAPABILITIES 0xbe
115608c2ecf20Sopenharmony_ci#undef MC_CMD_0xbe_PRIVILEGE_CTG
115618c2ecf20Sopenharmony_ci
115628c2ecf20Sopenharmony_ci#define MC_CMD_0xbe_PRIVILEGE_CTG SRIOV_CTG_GENERAL
115638c2ecf20Sopenharmony_ci
115648c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_IN msgrequest */
115658c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_IN_LEN 0
115668c2ecf20Sopenharmony_ci
115678c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_OUT msgresponse */
115688c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_OUT_LEN 20
115698c2ecf20Sopenharmony_ci/* First word of flags. */
115708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_FLAGS1_OFST 0
115718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_FLAGS1_LEN 4
115728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VPORT_RECONFIGURE_OFST 0
115738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VPORT_RECONFIGURE_LBN 3
115748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VPORT_RECONFIGURE_WIDTH 1
115758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_STRIPING_OFST 0
115768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_STRIPING_LBN 4
115778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_STRIPING_WIDTH 1
115788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_QUERY_OFST 0
115798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_QUERY_LBN 5
115808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_QUERY_WIDTH 1
115818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
115828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
115838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
115848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_OFST 0
115858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_LBN 7
115868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
115878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_OFST 0
115888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_LBN 8
115898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
115908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_OFST 0
115918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_LBN 9
115928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_WIDTH 1
115938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
115948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
115958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
115968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
115978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
115988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
115998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
116008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
116018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
116028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_ADDITIONAL_RSS_MODES_OFST 0
116038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_ADDITIONAL_RSS_MODES_LBN 13
116048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
116058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_QBB_OFST 0
116068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_QBB_LBN 14
116078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_QBB_WIDTH 1
116088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
116098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
116108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
116118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_RSS_LIMITED_OFST 0
116128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_RSS_LIMITED_LBN 16
116138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_RSS_LIMITED_WIDTH 1
116148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_OFST 0
116158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_LBN 17
116168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PACKED_STREAM_WIDTH 1
116178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS_OFST 0
116188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS_LBN 18
116198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_INCLUDE_FCS_WIDTH 1
116208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_OFST 0
116218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_LBN 19
116228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_VLAN_INSERTION_WIDTH 1
116238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_OFST 0
116248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_LBN 20
116258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_VLAN_STRIPPING_WIDTH 1
116268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_OFST 0
116278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_LBN 21
116288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_TSO_WIDTH 1
116298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_OFST 0
116308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_LBN 22
116318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_0_WIDTH 1
116328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_OFST 0
116338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_LBN 23
116348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_PREFIX_LEN_14_WIDTH 1
116358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_OFST 0
116368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_LBN 24
116378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_TIMESTAMP_WIDTH 1
116388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_OFST 0
116398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_LBN 25
116408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_BATCHING_WIDTH 1
116418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_OFST 0
116428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_LBN 26
116438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_MCAST_FILTER_CHAINING_WIDTH 1
116448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_OFST 0
116458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_LBN 27
116468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
116478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER_OFST 0
116488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER_LBN 28
116498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER_WIDTH 1
116508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
116518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
116528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
116538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_EVB_OFST 0
116548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_EVB_LBN 30
116558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_EVB_WIDTH 1
116568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VXLAN_NVGRE_OFST 0
116578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VXLAN_NVGRE_LBN 31
116588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_VXLAN_NVGRE_WIDTH 1
116598c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
116608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_RX_DPCPU_FW_ID_OFST 4
116618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_RX_DPCPU_FW_ID_LEN 2
116628c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
116638c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP 0x0
116648c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
116658c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_LOW_LATENCY 0x1
116668c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
116678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_PACKED_STREAM 0x2
116688c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
116698c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_RULES_ENGINE 0x5
116708c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
116718c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_DPDK 0x6
116728c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
116738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_BIST 0x10a
116748c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
116758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
116768c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
116778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
116788c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
116798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
116808c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
116818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
116828c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
116838c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_BACKPRESSURE 0x105
116848c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
116858c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
116868c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
116878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
116888c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
116898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
116908c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
116918c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
116928c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
116938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_SLOW 0x10c
116948c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
116958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_OFST 6
116968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_LEN 2
116978c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
116988c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP 0x0
116998c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
117008c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_LOW_LATENCY 0x1
117018c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
117028c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_HIGH_PACKET_RATE 0x3
117038c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
117048c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_RULES_ENGINE 0x5
117058c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
117068c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_DPDK 0x6
117078c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
117088c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_BIST 0x12d
117098c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
117108c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
117118c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
117128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
117138c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
117148c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXDP_TEST_FW_CSR 0x103
117158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_OFST 8
117168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_LEN 2
117178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_OFST 8
117188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_LBN 0
117198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_REV_WIDTH 12
117208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_OFST 8
117218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_LBN 12
117228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
117238c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
117248c2ecf20Sopenharmony_ci * of REV field in future)
117258c2ecf20Sopenharmony_ci */
117268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_RESERVED 0x0
117278c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
117288c2ecf20Sopenharmony_ci * development only)
117298c2ecf20Sopenharmony_ci */
117308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
117318c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
117328c2ecf20Sopenharmony_ci */
117338c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
117348c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
117358c2ecf20Sopenharmony_ci * (Huntington development only)
117368c2ecf20Sopenharmony_ci */
117378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
117388c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
117398c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
117408c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
117418c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_VSWITCH 0x3
117428c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
117438c2ecf20Sopenharmony_ci * (Huntington development only)
117448c2ecf20Sopenharmony_ci */
117458c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
117468c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
117478c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
117488c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
117498c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
117508c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
117518c2ecf20Sopenharmony_ci * tests (Medford development only)
117528c2ecf20Sopenharmony_ci */
117538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
117548c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
117558c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
117568c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
117578c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_L3XUDP 0x9
117588c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
117598c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_DPDK 0xa
117608c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
117618c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
117628c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
117638c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
117648c2ecf20Sopenharmony_ci */
117658c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
117668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_OFST 10
117678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_LEN 2
117688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_OFST 10
117698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_LBN 0
117708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_REV_WIDTH 12
117718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_OFST 10
117728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_LBN 12
117738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
117748c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
117758c2ecf20Sopenharmony_ci * of REV field in future)
117768c2ecf20Sopenharmony_ci */
117778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_RESERVED 0x0
117788c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
117798c2ecf20Sopenharmony_ci * development only)
117808c2ecf20Sopenharmony_ci */
117818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
117828c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
117838c2ecf20Sopenharmony_ci */
117848c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
117858c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
117868c2ecf20Sopenharmony_ci * (Huntington development only)
117878c2ecf20Sopenharmony_ci */
117888c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
117898c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
117908c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
117918c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
117928c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_VSWITCH 0x3
117938c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
117948c2ecf20Sopenharmony_ci * (Huntington development only)
117958c2ecf20Sopenharmony_ci */
117968c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
117978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
117988c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
117998c2ecf20Sopenharmony_ci * tests (Medford development only)
118008c2ecf20Sopenharmony_ci */
118018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
118028c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
118038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
118048c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
118058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_L3XUDP 0x9
118068c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
118078c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_DPDK 0xa
118088c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
118098c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
118108c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
118118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_HW_CAPABILITIES_OFST 12
118128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_HW_CAPABILITIES_LEN 4
118138c2ecf20Sopenharmony_ci/* Licensed capabilities */
118148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_LICENSE_CAPABILITIES_OFST 16
118158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_OUT_LICENSE_CAPABILITIES_LEN 4
118168c2ecf20Sopenharmony_ci
118178c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V2_IN msgrequest */
118188c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V2_IN_LEN 0
118198c2ecf20Sopenharmony_ci
118208c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V2_OUT msgresponse */
118218c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V2_OUT_LEN 72
118228c2ecf20Sopenharmony_ci/* First word of flags. */
118238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS1_OFST 0
118248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS1_LEN 4
118258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VPORT_RECONFIGURE_OFST 0
118268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VPORT_RECONFIGURE_LBN 3
118278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VPORT_RECONFIGURE_WIDTH 1
118288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_STRIPING_OFST 0
118298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_STRIPING_LBN 4
118308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_STRIPING_WIDTH 1
118318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_QUERY_OFST 0
118328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_QUERY_LBN 5
118338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_QUERY_WIDTH 1
118348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
118358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
118368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
118378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_DRV_ATTACH_PREBOOT_OFST 0
118388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_DRV_ATTACH_PREBOOT_LBN 7
118398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
118408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_FORCE_EVENT_MERGING_OFST 0
118418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_FORCE_EVENT_MERGING_LBN 8
118428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
118438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_SET_MAC_ENHANCED_OFST 0
118448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_SET_MAC_ENHANCED_LBN 9
118458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_SET_MAC_ENHANCED_WIDTH 1
118468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
118478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
118488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
118498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
118508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
118518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
118528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
118538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
118548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
118558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_ADDITIONAL_RSS_MODES_OFST 0
118568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_ADDITIONAL_RSS_MODES_LBN 13
118578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
118588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_QBB_OFST 0
118598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_QBB_LBN 14
118608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_QBB_WIDTH 1
118618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
118628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
118638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
118648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_RSS_LIMITED_OFST 0
118658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_RSS_LIMITED_LBN 16
118668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_RSS_LIMITED_WIDTH 1
118678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_OFST 0
118688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_LBN 17
118698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PACKED_STREAM_WIDTH 1
118708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_INCLUDE_FCS_OFST 0
118718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_INCLUDE_FCS_LBN 18
118728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_INCLUDE_FCS_WIDTH 1
118738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VLAN_INSERTION_OFST 0
118748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VLAN_INSERTION_LBN 19
118758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VLAN_INSERTION_WIDTH 1
118768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_VLAN_STRIPPING_OFST 0
118778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_VLAN_STRIPPING_LBN 20
118788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_VLAN_STRIPPING_WIDTH 1
118798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_OFST 0
118808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_LBN 21
118818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_WIDTH 1
118828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_0_OFST 0
118838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_0_LBN 22
118848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_0_WIDTH 1
118858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_14_OFST 0
118868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_14_LBN 23
118878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_PREFIX_LEN_14_WIDTH 1
118888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_TIMESTAMP_OFST 0
118898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_TIMESTAMP_LBN 24
118908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_TIMESTAMP_WIDTH 1
118918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_BATCHING_OFST 0
118928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_BATCHING_LBN 25
118938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_BATCHING_WIDTH 1
118948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCAST_FILTER_CHAINING_OFST 0
118958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCAST_FILTER_CHAINING_LBN 26
118968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCAST_FILTER_CHAINING_WIDTH 1
118978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_PM_AND_RXDP_COUNTERS_OFST 0
118988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_PM_AND_RXDP_COUNTERS_LBN 27
118998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
119008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DISABLE_SCATTER_OFST 0
119018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DISABLE_SCATTER_LBN 28
119028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DISABLE_SCATTER_WIDTH 1
119038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
119048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
119058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
119068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_OFST 0
119078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_LBN 30
119088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVB_WIDTH 1
119098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VXLAN_NVGRE_OFST 0
119108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VXLAN_NVGRE_LBN 31
119118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VXLAN_NVGRE_WIDTH 1
119128c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
119138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DPCPU_FW_ID_OFST 4
119148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DPCPU_FW_ID_LEN 2
119158c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
119168c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP 0x0
119178c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
119188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_LOW_LATENCY 0x1
119198c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
119208c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_PACKED_STREAM 0x2
119218c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
119228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_RULES_ENGINE 0x5
119238c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
119248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_DPDK 0x6
119258c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
119268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_BIST 0x10a
119278c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
119288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
119298c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
119308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
119318c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
119328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
119338c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
119348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
119358c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
119368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_BACKPRESSURE 0x105
119378c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
119388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
119398c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
119408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
119418c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
119428c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
119438c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
119448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
119458c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
119468c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_TEST_FW_SLOW 0x10c
119478c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
119488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DPCPU_FW_ID_OFST 6
119498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DPCPU_FW_ID_LEN 2
119508c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
119518c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP 0x0
119528c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
119538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_LOW_LATENCY 0x1
119548c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
119558c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_HIGH_PACKET_RATE 0x3
119568c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
119578c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_RULES_ENGINE 0x5
119588c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
119598c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_DPDK 0x6
119608c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
119618c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_BIST 0x12d
119628c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
119638c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
119648c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
119658c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
119668c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
119678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXDP_TEST_FW_CSR 0x103
119688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_OFST 8
119698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_LEN 2
119708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_REV_OFST 8
119718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_REV_LBN 0
119728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_REV_WIDTH 12
119738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_TYPE_OFST 8
119748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_TYPE_LBN 12
119758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
119768c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
119778c2ecf20Sopenharmony_ci * of REV field in future)
119788c2ecf20Sopenharmony_ci */
119798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_RESERVED 0x0
119808c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
119818c2ecf20Sopenharmony_ci * development only)
119828c2ecf20Sopenharmony_ci */
119838c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
119848c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
119858c2ecf20Sopenharmony_ci */
119868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
119878c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
119888c2ecf20Sopenharmony_ci * (Huntington development only)
119898c2ecf20Sopenharmony_ci */
119908c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
119918c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
119928c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
119938c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
119948c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_VSWITCH 0x3
119958c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
119968c2ecf20Sopenharmony_ci * (Huntington development only)
119978c2ecf20Sopenharmony_ci */
119988c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
119998c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
120008c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
120018c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
120028c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
120038c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
120048c2ecf20Sopenharmony_ci * tests (Medford development only)
120058c2ecf20Sopenharmony_ci */
120068c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
120078c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
120088c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
120098c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
120108c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_L3XUDP 0x9
120118c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
120128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_DPDK 0xa
120138c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
120148c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
120158c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
120168c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
120178c2ecf20Sopenharmony_ci */
120188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
120198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_OFST 10
120208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_LEN 2
120218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_REV_OFST 10
120228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_REV_LBN 0
120238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_REV_WIDTH 12
120248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_TYPE_OFST 10
120258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_TYPE_LBN 12
120268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
120278c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
120288c2ecf20Sopenharmony_ci * of REV field in future)
120298c2ecf20Sopenharmony_ci */
120308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_RESERVED 0x0
120318c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
120328c2ecf20Sopenharmony_ci * development only)
120338c2ecf20Sopenharmony_ci */
120348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
120358c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
120368c2ecf20Sopenharmony_ci */
120378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
120388c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
120398c2ecf20Sopenharmony_ci * (Huntington development only)
120408c2ecf20Sopenharmony_ci */
120418c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
120428c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
120438c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
120448c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
120458c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_VSWITCH 0x3
120468c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
120478c2ecf20Sopenharmony_ci * (Huntington development only)
120488c2ecf20Sopenharmony_ci */
120498c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
120508c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
120518c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
120528c2ecf20Sopenharmony_ci * tests (Medford development only)
120538c2ecf20Sopenharmony_ci */
120548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
120558c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
120568c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
120578c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
120588c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_L3XUDP 0x9
120598c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
120608c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_DPDK 0xa
120618c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
120628c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
120638c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
120648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_HW_CAPABILITIES_OFST 12
120658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_HW_CAPABILITIES_LEN 4
120668c2ecf20Sopenharmony_ci/* Licensed capabilities */
120678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_LICENSE_CAPABILITIES_OFST 16
120688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_LICENSE_CAPABILITIES_LEN 4
120698c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
120708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS2_OFST 20
120718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_FLAGS2_LEN 4
120728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_OFST 20
120738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_LBN 0
120748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_WIDTH 1
120758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_ENCAP_OFST 20
120768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_ENCAP_LBN 1
120778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_ENCAP_WIDTH 1
120788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVQ_TIMER_CTRL_OFST 20
120798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVQ_TIMER_CTRL_LBN 2
120808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVQ_TIMER_CTRL_WIDTH 1
120818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVENT_CUT_THROUGH_OFST 20
120828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVENT_CUT_THROUGH_LBN 3
120838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EVENT_CUT_THROUGH_WIDTH 1
120848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_CUT_THROUGH_OFST 20
120858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_CUT_THROUGH_LBN 4
120868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_CUT_THROUGH_WIDTH 1
120878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VFIFO_ULL_MODE_OFST 20
120888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VFIFO_ULL_MODE_LBN 5
120898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
120908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
120918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
120928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
120938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
120948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
120958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
120968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_V2_OFST 20
120978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_V2_LBN 7
120988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_EVQ_V2_WIDTH 1
120998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING_OFST 20
121008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING_LBN 8
121018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
121028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TIMESTAMP_OFST 20
121038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TIMESTAMP_LBN 9
121048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TIMESTAMP_WIDTH 1
121058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_SNIFF_OFST 20
121068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_SNIFF_LBN 10
121078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RX_SNIFF_WIDTH 1
121088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_SNIFF_OFST 20
121098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_SNIFF_LBN 11
121108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_SNIFF_WIDTH 1
121118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
121128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
121138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
121148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_BACKGROUND_OFST 20
121158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_BACKGROUND_LBN 13
121168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_BACKGROUND_WIDTH 1
121178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_DB_RETURN_OFST 20
121188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_DB_RETURN_LBN 14
121198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_MCDI_DB_RETURN_WIDTH 1
121208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_CTPIO_OFST 20
121218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_CTPIO_LBN 15
121228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_CTPIO_WIDTH 1
121238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TSA_SUPPORT_OFST 20
121248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TSA_SUPPORT_LBN 16
121258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TSA_SUPPORT_WIDTH 1
121268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TSA_BOUND_OFST 20
121278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TSA_BOUND_LBN 17
121288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TSA_BOUND_WIDTH 1
121298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
121308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
121318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
121328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FILTER_ACTION_FLAG_OFST 20
121338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FILTER_ACTION_FLAG_LBN 19
121348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FILTER_ACTION_FLAG_WIDTH 1
121358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FILTER_ACTION_MARK_OFST 20
121368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FILTER_ACTION_MARK_LBN 20
121378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FILTER_ACTION_MARK_WIDTH 1
121388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
121398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
121408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
121418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
121428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
121438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
121448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_L3XUDP_SUPPORT_OFST 20
121458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_L3XUDP_SUPPORT_LBN 22
121468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_L3XUDP_SUPPORT_WIDTH 1
121478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
121488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
121498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
121508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VI_SPREADING_OFST 20
121518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VI_SPREADING_LBN 24
121528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_VI_SPREADING_WIDTH 1
121538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_HLB_IDLE_OFST 20
121548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_HLB_IDLE_LBN 25
121558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_RXDP_HLB_IDLE_WIDTH 1
121568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
121578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
121588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
121598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
121608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
121618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
121628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_BUNDLE_UPDATE_OFST 20
121638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_BUNDLE_UPDATE_LBN 28
121648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_BUNDLE_UPDATE_WIDTH 1
121658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V3_OFST 20
121668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V3_LBN 29
121678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V3_WIDTH 1
121688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_DYNAMIC_SENSORS_OFST 20
121698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_DYNAMIC_SENSORS_LBN 30
121708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_DYNAMIC_SENSORS_WIDTH 1
121718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
121728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
121738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V2_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
121748c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
121758c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
121768c2ecf20Sopenharmony_ci */
121778c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
121788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
121798c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
121808c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
121818c2ecf20Sopenharmony_ci * present or not assigned.
121828c2ecf20Sopenharmony_ci */
121838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
121848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
121858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
121868c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
121878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_ACCESS_NOT_PERMITTED 0xff
121888c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
121898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_PF_NOT_PRESENT 0xfe
121908c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
121918c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_PF_NOT_ASSIGNED 0xfd
121928c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
121938c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
121948c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
121958c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
121968c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
121978c2ecf20Sopenharmony_ci */
121988c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V2_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
121998c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
122008c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
122018c2ecf20Sopenharmony_ci */
122028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VFS_PER_PF_OFST 42
122038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VFS_PER_PF_LEN 1
122048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VFS_PER_PF_NUM 16
122058c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
122068c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V2_OUT_ACCESS_NOT_PERMITTED 0xff */
122078c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
122088c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V2_OUT_PF_NOT_PRESENT 0xfe */
122098c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
122108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VIS_PER_PORT_OFST 58
122118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VIS_PER_PORT_LEN 2
122128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_VIS_PER_PORT_NUM 4
122138c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
122148c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
122158c2ecf20Sopenharmony_ci */
122168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DESC_CACHE_SIZE_OFST 66
122178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_RX_DESC_CACHE_SIZE_LEN 1
122188c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
122198c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
122208c2ecf20Sopenharmony_ci */
122218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DESC_CACHE_SIZE_OFST 67
122228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_TX_DESC_CACHE_SIZE_LEN 1
122238c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
122248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_PIO_BUFFS_OFST 68
122258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_NUM_PIO_BUFFS_LEN 2
122268c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
122278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_SIZE_PIO_BUFF_OFST 70
122288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V2_OUT_SIZE_PIO_BUFF_LEN 2
122298c2ecf20Sopenharmony_ci
122308c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V3_OUT msgresponse */
122318c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V3_OUT_LEN 76
122328c2ecf20Sopenharmony_ci/* First word of flags. */
122338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS1_OFST 0
122348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS1_LEN 4
122358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VPORT_RECONFIGURE_OFST 0
122368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VPORT_RECONFIGURE_LBN 3
122378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VPORT_RECONFIGURE_WIDTH 1
122388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_STRIPING_OFST 0
122398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_STRIPING_LBN 4
122408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_STRIPING_WIDTH 1
122418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_QUERY_OFST 0
122428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_QUERY_LBN 5
122438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_QUERY_WIDTH 1
122448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
122458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
122468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
122478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_DRV_ATTACH_PREBOOT_OFST 0
122488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_DRV_ATTACH_PREBOOT_LBN 7
122498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
122508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_FORCE_EVENT_MERGING_OFST 0
122518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_FORCE_EVENT_MERGING_LBN 8
122528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
122538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_SET_MAC_ENHANCED_OFST 0
122548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_SET_MAC_ENHANCED_LBN 9
122558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_SET_MAC_ENHANCED_WIDTH 1
122568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
122578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
122588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
122598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
122608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
122618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
122628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
122638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
122648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
122658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_ADDITIONAL_RSS_MODES_OFST 0
122668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_ADDITIONAL_RSS_MODES_LBN 13
122678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
122688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_QBB_OFST 0
122698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_QBB_LBN 14
122708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_QBB_WIDTH 1
122718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
122728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
122738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
122748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_RSS_LIMITED_OFST 0
122758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_RSS_LIMITED_LBN 16
122768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_RSS_LIMITED_WIDTH 1
122778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_OFST 0
122788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_LBN 17
122798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PACKED_STREAM_WIDTH 1
122808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_INCLUDE_FCS_OFST 0
122818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_INCLUDE_FCS_LBN 18
122828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_INCLUDE_FCS_WIDTH 1
122838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VLAN_INSERTION_OFST 0
122848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VLAN_INSERTION_LBN 19
122858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VLAN_INSERTION_WIDTH 1
122868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_VLAN_STRIPPING_OFST 0
122878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_VLAN_STRIPPING_LBN 20
122888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_VLAN_STRIPPING_WIDTH 1
122898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_OFST 0
122908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_LBN 21
122918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_WIDTH 1
122928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_0_OFST 0
122938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_0_LBN 22
122948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_0_WIDTH 1
122958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_14_OFST 0
122968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_14_LBN 23
122978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_PREFIX_LEN_14_WIDTH 1
122988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_TIMESTAMP_OFST 0
122998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_TIMESTAMP_LBN 24
123008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_TIMESTAMP_WIDTH 1
123018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_BATCHING_OFST 0
123028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_BATCHING_LBN 25
123038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_BATCHING_WIDTH 1
123048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCAST_FILTER_CHAINING_OFST 0
123058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCAST_FILTER_CHAINING_LBN 26
123068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCAST_FILTER_CHAINING_WIDTH 1
123078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_PM_AND_RXDP_COUNTERS_OFST 0
123088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_PM_AND_RXDP_COUNTERS_LBN 27
123098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
123108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DISABLE_SCATTER_OFST 0
123118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DISABLE_SCATTER_LBN 28
123128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DISABLE_SCATTER_WIDTH 1
123138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
123148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
123158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
123168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_OFST 0
123178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_LBN 30
123188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVB_WIDTH 1
123198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VXLAN_NVGRE_OFST 0
123208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VXLAN_NVGRE_LBN 31
123218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VXLAN_NVGRE_WIDTH 1
123228c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
123238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DPCPU_FW_ID_OFST 4
123248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DPCPU_FW_ID_LEN 2
123258c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
123268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP 0x0
123278c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
123288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_LOW_LATENCY 0x1
123298c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
123308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_PACKED_STREAM 0x2
123318c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
123328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_RULES_ENGINE 0x5
123338c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
123348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_DPDK 0x6
123358c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
123368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_BIST 0x10a
123378c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
123388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
123398c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
123408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
123418c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
123428c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
123438c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
123448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
123458c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
123468c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_BACKPRESSURE 0x105
123478c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
123488c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
123498c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
123508c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
123518c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
123528c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
123538c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
123548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
123558c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
123568c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_TEST_FW_SLOW 0x10c
123578c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
123588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DPCPU_FW_ID_OFST 6
123598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DPCPU_FW_ID_LEN 2
123608c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
123618c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP 0x0
123628c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
123638c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_LOW_LATENCY 0x1
123648c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
123658c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_HIGH_PACKET_RATE 0x3
123668c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
123678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_RULES_ENGINE 0x5
123688c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
123698c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_DPDK 0x6
123708c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
123718c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_BIST 0x12d
123728c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
123738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
123748c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
123758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
123768c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
123778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXDP_TEST_FW_CSR 0x103
123788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_OFST 8
123798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_LEN 2
123808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_REV_OFST 8
123818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_REV_LBN 0
123828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_REV_WIDTH 12
123838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_TYPE_OFST 8
123848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_TYPE_LBN 12
123858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
123868c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
123878c2ecf20Sopenharmony_ci * of REV field in future)
123888c2ecf20Sopenharmony_ci */
123898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_RESERVED 0x0
123908c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
123918c2ecf20Sopenharmony_ci * development only)
123928c2ecf20Sopenharmony_ci */
123938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
123948c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
123958c2ecf20Sopenharmony_ci */
123968c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
123978c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
123988c2ecf20Sopenharmony_ci * (Huntington development only)
123998c2ecf20Sopenharmony_ci */
124008c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
124018c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
124028c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
124038c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
124048c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_VSWITCH 0x3
124058c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
124068c2ecf20Sopenharmony_ci * (Huntington development only)
124078c2ecf20Sopenharmony_ci */
124088c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
124098c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
124108c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
124118c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
124128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
124138c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
124148c2ecf20Sopenharmony_ci * tests (Medford development only)
124158c2ecf20Sopenharmony_ci */
124168c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
124178c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
124188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
124198c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
124208c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_L3XUDP 0x9
124218c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
124228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_DPDK 0xa
124238c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
124248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
124258c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
124268c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
124278c2ecf20Sopenharmony_ci */
124288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
124298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_OFST 10
124308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_LEN 2
124318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_REV_OFST 10
124328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_REV_LBN 0
124338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_REV_WIDTH 12
124348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_TYPE_OFST 10
124358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_TYPE_LBN 12
124368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
124378c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
124388c2ecf20Sopenharmony_ci * of REV field in future)
124398c2ecf20Sopenharmony_ci */
124408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_RESERVED 0x0
124418c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
124428c2ecf20Sopenharmony_ci * development only)
124438c2ecf20Sopenharmony_ci */
124448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
124458c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
124468c2ecf20Sopenharmony_ci */
124478c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
124488c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
124498c2ecf20Sopenharmony_ci * (Huntington development only)
124508c2ecf20Sopenharmony_ci */
124518c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
124528c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
124538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
124548c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
124558c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_VSWITCH 0x3
124568c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
124578c2ecf20Sopenharmony_ci * (Huntington development only)
124588c2ecf20Sopenharmony_ci */
124598c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
124608c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
124618c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
124628c2ecf20Sopenharmony_ci * tests (Medford development only)
124638c2ecf20Sopenharmony_ci */
124648c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
124658c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
124668c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
124678c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
124688c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_L3XUDP 0x9
124698c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
124708c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_DPDK 0xa
124718c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
124728c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
124738c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
124748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_HW_CAPABILITIES_OFST 12
124758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_HW_CAPABILITIES_LEN 4
124768c2ecf20Sopenharmony_ci/* Licensed capabilities */
124778c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_LICENSE_CAPABILITIES_OFST 16
124788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_LICENSE_CAPABILITIES_LEN 4
124798c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
124808c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS2_OFST 20
124818c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_FLAGS2_LEN 4
124828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_OFST 20
124838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_LBN 0
124848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_WIDTH 1
124858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_ENCAP_OFST 20
124868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_ENCAP_LBN 1
124878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_ENCAP_WIDTH 1
124888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVQ_TIMER_CTRL_OFST 20
124898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVQ_TIMER_CTRL_LBN 2
124908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVQ_TIMER_CTRL_WIDTH 1
124918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVENT_CUT_THROUGH_OFST 20
124928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVENT_CUT_THROUGH_LBN 3
124938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EVENT_CUT_THROUGH_WIDTH 1
124948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_CUT_THROUGH_OFST 20
124958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_CUT_THROUGH_LBN 4
124968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_CUT_THROUGH_WIDTH 1
124978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VFIFO_ULL_MODE_OFST 20
124988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VFIFO_ULL_MODE_LBN 5
124998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
125008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
125018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
125028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
125038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
125048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
125058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
125068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_V2_OFST 20
125078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_V2_LBN 7
125088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_EVQ_V2_WIDTH 1
125098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_TIMESTAMPING_OFST 20
125108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_TIMESTAMPING_LBN 8
125118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
125128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TIMESTAMP_OFST 20
125138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TIMESTAMP_LBN 9
125148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TIMESTAMP_WIDTH 1
125158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_SNIFF_OFST 20
125168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_SNIFF_LBN 10
125178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RX_SNIFF_WIDTH 1
125188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_SNIFF_OFST 20
125198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_SNIFF_LBN 11
125208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_SNIFF_WIDTH 1
125218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
125228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
125238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
125248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_BACKGROUND_OFST 20
125258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_BACKGROUND_LBN 13
125268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_BACKGROUND_WIDTH 1
125278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_DB_RETURN_OFST 20
125288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_DB_RETURN_LBN 14
125298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_MCDI_DB_RETURN_WIDTH 1
125308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_CTPIO_OFST 20
125318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_CTPIO_LBN 15
125328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_CTPIO_WIDTH 1
125338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TSA_SUPPORT_OFST 20
125348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TSA_SUPPORT_LBN 16
125358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TSA_SUPPORT_WIDTH 1
125368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TSA_BOUND_OFST 20
125378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TSA_BOUND_LBN 17
125388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TSA_BOUND_WIDTH 1
125398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
125408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
125418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
125428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FILTER_ACTION_FLAG_OFST 20
125438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FILTER_ACTION_FLAG_LBN 19
125448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FILTER_ACTION_FLAG_WIDTH 1
125458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FILTER_ACTION_MARK_OFST 20
125468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FILTER_ACTION_MARK_LBN 20
125478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FILTER_ACTION_MARK_WIDTH 1
125488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
125498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
125508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
125518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
125528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
125538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
125548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_L3XUDP_SUPPORT_OFST 20
125558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_L3XUDP_SUPPORT_LBN 22
125568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_L3XUDP_SUPPORT_WIDTH 1
125578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
125588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
125598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
125608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VI_SPREADING_OFST 20
125618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VI_SPREADING_LBN 24
125628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_VI_SPREADING_WIDTH 1
125638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_HLB_IDLE_OFST 20
125648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_HLB_IDLE_LBN 25
125658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_RXDP_HLB_IDLE_WIDTH 1
125668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
125678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
125688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
125698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
125708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
125718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
125728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_BUNDLE_UPDATE_OFST 20
125738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_BUNDLE_UPDATE_LBN 28
125748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_BUNDLE_UPDATE_WIDTH 1
125758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V3_OFST 20
125768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V3_LBN 29
125778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V3_WIDTH 1
125788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_DYNAMIC_SENSORS_OFST 20
125798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_DYNAMIC_SENSORS_LBN 30
125808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_DYNAMIC_SENSORS_WIDTH 1
125818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
125828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
125838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V3_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
125848c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
125858c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
125868c2ecf20Sopenharmony_ci */
125878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
125888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
125898c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
125908c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
125918c2ecf20Sopenharmony_ci * present or not assigned.
125928c2ecf20Sopenharmony_ci */
125938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
125948c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
125958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
125968c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
125978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_ACCESS_NOT_PERMITTED 0xff
125988c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
125998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_PF_NOT_PRESENT 0xfe
126008c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
126018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_PF_NOT_ASSIGNED 0xfd
126028c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
126038c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
126048c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
126058c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
126068c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
126078c2ecf20Sopenharmony_ci */
126088c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
126098c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
126108c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
126118c2ecf20Sopenharmony_ci */
126128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VFS_PER_PF_OFST 42
126138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VFS_PER_PF_LEN 1
126148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VFS_PER_PF_NUM 16
126158c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
126168c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V3_OUT_ACCESS_NOT_PERMITTED 0xff */
126178c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
126188c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V3_OUT_PF_NOT_PRESENT 0xfe */
126198c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
126208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VIS_PER_PORT_OFST 58
126218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VIS_PER_PORT_LEN 2
126228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_VIS_PER_PORT_NUM 4
126238c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
126248c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
126258c2ecf20Sopenharmony_ci */
126268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DESC_CACHE_SIZE_OFST 66
126278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_RX_DESC_CACHE_SIZE_LEN 1
126288c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
126298c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
126308c2ecf20Sopenharmony_ci */
126318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DESC_CACHE_SIZE_OFST 67
126328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_TX_DESC_CACHE_SIZE_LEN 1
126338c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
126348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_PIO_BUFFS_OFST 68
126358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_NUM_PIO_BUFFS_LEN 2
126368c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
126378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_SIZE_PIO_BUFF_OFST 70
126388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_SIZE_PIO_BUFF_LEN 2
126398c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
126408c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
126418c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
126428c2ecf20Sopenharmony_ci * with 8k VI windows.
126438c2ecf20Sopenharmony_ci */
126448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_OFST 72
126458c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_LEN 1
126468c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
126478c2ecf20Sopenharmony_ci * CTPIO is not mapped.
126488c2ecf20Sopenharmony_ci */
126498c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_8K 0x0
126508c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
126518c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_16K 0x1
126528c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
126538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V3_OUT_VI_WINDOW_MODE_64K 0x2
126548c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
126558c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
126568c2ecf20Sopenharmony_ci */
126578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
126588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
126598c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
126608c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
126618c2ecf20Sopenharmony_ci */
126628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
126638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V3_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
126648c2ecf20Sopenharmony_ci
126658c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V4_OUT msgresponse */
126668c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V4_OUT_LEN 78
126678c2ecf20Sopenharmony_ci/* First word of flags. */
126688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS1_OFST 0
126698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS1_LEN 4
126708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VPORT_RECONFIGURE_OFST 0
126718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VPORT_RECONFIGURE_LBN 3
126728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VPORT_RECONFIGURE_WIDTH 1
126738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_STRIPING_OFST 0
126748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_STRIPING_LBN 4
126758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_STRIPING_WIDTH 1
126768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_QUERY_OFST 0
126778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_QUERY_LBN 5
126788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_QUERY_WIDTH 1
126798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
126808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
126818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
126828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_DRV_ATTACH_PREBOOT_OFST 0
126838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_DRV_ATTACH_PREBOOT_LBN 7
126848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
126858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_FORCE_EVENT_MERGING_OFST 0
126868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_FORCE_EVENT_MERGING_LBN 8
126878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
126888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_SET_MAC_ENHANCED_OFST 0
126898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_SET_MAC_ENHANCED_LBN 9
126908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_SET_MAC_ENHANCED_WIDTH 1
126918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
126928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
126938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
126948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
126958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
126968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
126978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
126988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
126998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
127008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_ADDITIONAL_RSS_MODES_OFST 0
127018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_ADDITIONAL_RSS_MODES_LBN 13
127028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
127038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_QBB_OFST 0
127048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_QBB_LBN 14
127058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_QBB_WIDTH 1
127068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
127078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
127088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
127098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_RSS_LIMITED_OFST 0
127108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_RSS_LIMITED_LBN 16
127118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_RSS_LIMITED_WIDTH 1
127128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_OFST 0
127138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_LBN 17
127148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PACKED_STREAM_WIDTH 1
127158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_INCLUDE_FCS_OFST 0
127168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_INCLUDE_FCS_LBN 18
127178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_INCLUDE_FCS_WIDTH 1
127188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VLAN_INSERTION_OFST 0
127198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VLAN_INSERTION_LBN 19
127208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VLAN_INSERTION_WIDTH 1
127218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_VLAN_STRIPPING_OFST 0
127228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_VLAN_STRIPPING_LBN 20
127238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_VLAN_STRIPPING_WIDTH 1
127248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_OFST 0
127258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_LBN 21
127268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_WIDTH 1
127278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_0_OFST 0
127288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_0_LBN 22
127298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_0_WIDTH 1
127308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_14_OFST 0
127318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_14_LBN 23
127328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_PREFIX_LEN_14_WIDTH 1
127338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_TIMESTAMP_OFST 0
127348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_TIMESTAMP_LBN 24
127358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_TIMESTAMP_WIDTH 1
127368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_BATCHING_OFST 0
127378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_BATCHING_LBN 25
127388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_BATCHING_WIDTH 1
127398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCAST_FILTER_CHAINING_OFST 0
127408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCAST_FILTER_CHAINING_LBN 26
127418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCAST_FILTER_CHAINING_WIDTH 1
127428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_PM_AND_RXDP_COUNTERS_OFST 0
127438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_PM_AND_RXDP_COUNTERS_LBN 27
127448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
127458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DISABLE_SCATTER_OFST 0
127468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DISABLE_SCATTER_LBN 28
127478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DISABLE_SCATTER_WIDTH 1
127488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
127498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
127508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
127518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_OFST 0
127528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_LBN 30
127538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVB_WIDTH 1
127548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VXLAN_NVGRE_OFST 0
127558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VXLAN_NVGRE_LBN 31
127568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VXLAN_NVGRE_WIDTH 1
127578c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
127588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DPCPU_FW_ID_OFST 4
127598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DPCPU_FW_ID_LEN 2
127608c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
127618c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP 0x0
127628c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
127638c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_LOW_LATENCY 0x1
127648c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
127658c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_PACKED_STREAM 0x2
127668c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
127678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_RULES_ENGINE 0x5
127688c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
127698c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_DPDK 0x6
127708c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
127718c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_BIST 0x10a
127728c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
127738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
127748c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
127758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
127768c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
127778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
127788c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
127798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
127808c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
127818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_BACKPRESSURE 0x105
127828c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
127838c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
127848c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
127858c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
127868c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
127878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
127888c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
127898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
127908c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
127918c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_TEST_FW_SLOW 0x10c
127928c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
127938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DPCPU_FW_ID_OFST 6
127948c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DPCPU_FW_ID_LEN 2
127958c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
127968c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP 0x0
127978c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
127988c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_LOW_LATENCY 0x1
127998c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
128008c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_HIGH_PACKET_RATE 0x3
128018c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
128028c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_RULES_ENGINE 0x5
128038c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
128048c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_DPDK 0x6
128058c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
128068c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_BIST 0x12d
128078c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
128088c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
128098c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
128108c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
128118c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
128128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXDP_TEST_FW_CSR 0x103
128138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_OFST 8
128148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_LEN 2
128158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_REV_OFST 8
128168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_REV_LBN 0
128178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_REV_WIDTH 12
128188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_TYPE_OFST 8
128198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_TYPE_LBN 12
128208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
128218c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
128228c2ecf20Sopenharmony_ci * of REV field in future)
128238c2ecf20Sopenharmony_ci */
128248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_RESERVED 0x0
128258c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
128268c2ecf20Sopenharmony_ci * development only)
128278c2ecf20Sopenharmony_ci */
128288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
128298c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
128308c2ecf20Sopenharmony_ci */
128318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
128328c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
128338c2ecf20Sopenharmony_ci * (Huntington development only)
128348c2ecf20Sopenharmony_ci */
128358c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
128368c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
128378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
128388c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
128398c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_VSWITCH 0x3
128408c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
128418c2ecf20Sopenharmony_ci * (Huntington development only)
128428c2ecf20Sopenharmony_ci */
128438c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
128448c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
128458c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
128468c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
128478c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
128488c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
128498c2ecf20Sopenharmony_ci * tests (Medford development only)
128508c2ecf20Sopenharmony_ci */
128518c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
128528c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
128538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
128548c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
128558c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_L3XUDP 0x9
128568c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
128578c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_DPDK 0xa
128588c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
128598c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
128608c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
128618c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
128628c2ecf20Sopenharmony_ci */
128638c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
128648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_OFST 10
128658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_LEN 2
128668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_REV_OFST 10
128678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_REV_LBN 0
128688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_REV_WIDTH 12
128698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_TYPE_OFST 10
128708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_TYPE_LBN 12
128718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
128728c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
128738c2ecf20Sopenharmony_ci * of REV field in future)
128748c2ecf20Sopenharmony_ci */
128758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_RESERVED 0x0
128768c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
128778c2ecf20Sopenharmony_ci * development only)
128788c2ecf20Sopenharmony_ci */
128798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
128808c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
128818c2ecf20Sopenharmony_ci */
128828c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
128838c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
128848c2ecf20Sopenharmony_ci * (Huntington development only)
128858c2ecf20Sopenharmony_ci */
128868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
128878c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
128888c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
128898c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
128908c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_VSWITCH 0x3
128918c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
128928c2ecf20Sopenharmony_ci * (Huntington development only)
128938c2ecf20Sopenharmony_ci */
128948c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
128958c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
128968c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
128978c2ecf20Sopenharmony_ci * tests (Medford development only)
128988c2ecf20Sopenharmony_ci */
128998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
129008c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
129018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
129028c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
129038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_L3XUDP 0x9
129048c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
129058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_DPDK 0xa
129068c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
129078c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
129088c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
129098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_HW_CAPABILITIES_OFST 12
129108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_HW_CAPABILITIES_LEN 4
129118c2ecf20Sopenharmony_ci/* Licensed capabilities */
129128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_LICENSE_CAPABILITIES_OFST 16
129138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_LICENSE_CAPABILITIES_LEN 4
129148c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
129158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS2_OFST 20
129168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_FLAGS2_LEN 4
129178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_OFST 20
129188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_LBN 0
129198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_WIDTH 1
129208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_ENCAP_OFST 20
129218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_ENCAP_LBN 1
129228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_ENCAP_WIDTH 1
129238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVQ_TIMER_CTRL_OFST 20
129248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVQ_TIMER_CTRL_LBN 2
129258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVQ_TIMER_CTRL_WIDTH 1
129268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVENT_CUT_THROUGH_OFST 20
129278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVENT_CUT_THROUGH_LBN 3
129288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EVENT_CUT_THROUGH_WIDTH 1
129298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_CUT_THROUGH_OFST 20
129308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_CUT_THROUGH_LBN 4
129318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_CUT_THROUGH_WIDTH 1
129328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VFIFO_ULL_MODE_OFST 20
129338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VFIFO_ULL_MODE_LBN 5
129348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
129358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
129368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
129378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
129388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
129398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
129408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
129418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_V2_OFST 20
129428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_V2_LBN 7
129438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_EVQ_V2_WIDTH 1
129448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_TIMESTAMPING_OFST 20
129458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_TIMESTAMPING_LBN 8
129468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
129478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TIMESTAMP_OFST 20
129488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TIMESTAMP_LBN 9
129498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TIMESTAMP_WIDTH 1
129508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_SNIFF_OFST 20
129518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_SNIFF_LBN 10
129528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RX_SNIFF_WIDTH 1
129538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_SNIFF_OFST 20
129548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_SNIFF_LBN 11
129558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_SNIFF_WIDTH 1
129568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
129578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
129588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
129598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_BACKGROUND_OFST 20
129608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_BACKGROUND_LBN 13
129618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_BACKGROUND_WIDTH 1
129628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_DB_RETURN_OFST 20
129638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_DB_RETURN_LBN 14
129648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_MCDI_DB_RETURN_WIDTH 1
129658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_CTPIO_OFST 20
129668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_CTPIO_LBN 15
129678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_CTPIO_WIDTH 1
129688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TSA_SUPPORT_OFST 20
129698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TSA_SUPPORT_LBN 16
129708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TSA_SUPPORT_WIDTH 1
129718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TSA_BOUND_OFST 20
129728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TSA_BOUND_LBN 17
129738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TSA_BOUND_WIDTH 1
129748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
129758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
129768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
129778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FILTER_ACTION_FLAG_OFST 20
129788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FILTER_ACTION_FLAG_LBN 19
129798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FILTER_ACTION_FLAG_WIDTH 1
129808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FILTER_ACTION_MARK_OFST 20
129818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FILTER_ACTION_MARK_LBN 20
129828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FILTER_ACTION_MARK_WIDTH 1
129838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
129848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
129858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
129868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
129878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
129888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
129898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_L3XUDP_SUPPORT_OFST 20
129908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_L3XUDP_SUPPORT_LBN 22
129918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_L3XUDP_SUPPORT_WIDTH 1
129928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
129938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
129948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
129958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VI_SPREADING_OFST 20
129968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VI_SPREADING_LBN 24
129978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_VI_SPREADING_WIDTH 1
129988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_HLB_IDLE_OFST 20
129998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_HLB_IDLE_LBN 25
130008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_RXDP_HLB_IDLE_WIDTH 1
130018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
130028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
130038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
130048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
130058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
130068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
130078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_BUNDLE_UPDATE_OFST 20
130088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_BUNDLE_UPDATE_LBN 28
130098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_BUNDLE_UPDATE_WIDTH 1
130108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V3_OFST 20
130118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V3_LBN 29
130128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V3_WIDTH 1
130138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_DYNAMIC_SENSORS_OFST 20
130148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_DYNAMIC_SENSORS_LBN 30
130158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_DYNAMIC_SENSORS_WIDTH 1
130168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
130178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
130188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V4_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
130198c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
130208c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
130218c2ecf20Sopenharmony_ci */
130228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
130238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
130248c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
130258c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
130268c2ecf20Sopenharmony_ci * present or not assigned.
130278c2ecf20Sopenharmony_ci */
130288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
130298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
130308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
130318c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
130328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_ACCESS_NOT_PERMITTED 0xff
130338c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
130348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_PF_NOT_PRESENT 0xfe
130358c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
130368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_PF_NOT_ASSIGNED 0xfd
130378c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
130388c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
130398c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
130408c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
130418c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
130428c2ecf20Sopenharmony_ci */
130438c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
130448c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
130458c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
130468c2ecf20Sopenharmony_ci */
130478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VFS_PER_PF_OFST 42
130488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VFS_PER_PF_LEN 1
130498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VFS_PER_PF_NUM 16
130508c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
130518c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V4_OUT_ACCESS_NOT_PERMITTED 0xff */
130528c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
130538c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V4_OUT_PF_NOT_PRESENT 0xfe */
130548c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
130558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VIS_PER_PORT_OFST 58
130568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VIS_PER_PORT_LEN 2
130578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_VIS_PER_PORT_NUM 4
130588c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
130598c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
130608c2ecf20Sopenharmony_ci */
130618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DESC_CACHE_SIZE_OFST 66
130628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_RX_DESC_CACHE_SIZE_LEN 1
130638c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
130648c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
130658c2ecf20Sopenharmony_ci */
130668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DESC_CACHE_SIZE_OFST 67
130678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_TX_DESC_CACHE_SIZE_LEN 1
130688c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
130698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_PIO_BUFFS_OFST 68
130708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_NUM_PIO_BUFFS_LEN 2
130718c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
130728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_SIZE_PIO_BUFF_OFST 70
130738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_SIZE_PIO_BUFF_LEN 2
130748c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
130758c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
130768c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
130778c2ecf20Sopenharmony_ci * with 8k VI windows.
130788c2ecf20Sopenharmony_ci */
130798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_OFST 72
130808c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_LEN 1
130818c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
130828c2ecf20Sopenharmony_ci * CTPIO is not mapped.
130838c2ecf20Sopenharmony_ci */
130848c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_8K 0x0
130858c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
130868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_16K 0x1
130878c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
130888c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V4_OUT_VI_WINDOW_MODE_64K 0x2
130898c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
130908c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
130918c2ecf20Sopenharmony_ci */
130928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
130938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
130948c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
130958c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
130968c2ecf20Sopenharmony_ci */
130978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
130988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
130998c2ecf20Sopenharmony_ci/* Entry count in the MAC stats array, including the final GENERATION_END
131008c2ecf20Sopenharmony_ci * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
131018c2ecf20Sopenharmony_ci * hold at least this many 64-bit stats values, if they wish to receive all
131028c2ecf20Sopenharmony_ci * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
131038c2ecf20Sopenharmony_ci * stats array returned will be truncated.
131048c2ecf20Sopenharmony_ci */
131058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_NUM_STATS_OFST 76
131068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V4_OUT_MAC_STATS_NUM_STATS_LEN 2
131078c2ecf20Sopenharmony_ci
131088c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V5_OUT msgresponse */
131098c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V5_OUT_LEN 84
131108c2ecf20Sopenharmony_ci/* First word of flags. */
131118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_FLAGS1_OFST 0
131128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_FLAGS1_LEN 4
131138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VPORT_RECONFIGURE_OFST 0
131148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VPORT_RECONFIGURE_LBN 3
131158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VPORT_RECONFIGURE_WIDTH 1
131168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_STRIPING_OFST 0
131178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_STRIPING_LBN 4
131188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_STRIPING_WIDTH 1
131198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VADAPTOR_QUERY_OFST 0
131208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VADAPTOR_QUERY_LBN 5
131218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VADAPTOR_QUERY_WIDTH 1
131228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
131238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
131248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
131258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_DRV_ATTACH_PREBOOT_OFST 0
131268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_DRV_ATTACH_PREBOOT_LBN 7
131278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
131288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_FORCE_EVENT_MERGING_OFST 0
131298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_FORCE_EVENT_MERGING_LBN 8
131308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
131318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_SET_MAC_ENHANCED_OFST 0
131328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_SET_MAC_ENHANCED_LBN 9
131338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_SET_MAC_ENHANCED_WIDTH 1
131348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
131358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
131368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
131378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
131388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
131398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
131408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
131418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
131428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
131438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_ADDITIONAL_RSS_MODES_OFST 0
131448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_ADDITIONAL_RSS_MODES_LBN 13
131458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
131468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_QBB_OFST 0
131478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_QBB_LBN 14
131488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_QBB_WIDTH 1
131498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
131508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
131518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
131528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_RSS_LIMITED_OFST 0
131538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_RSS_LIMITED_LBN 16
131548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_RSS_LIMITED_WIDTH 1
131558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PACKED_STREAM_OFST 0
131568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PACKED_STREAM_LBN 17
131578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PACKED_STREAM_WIDTH 1
131588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_INCLUDE_FCS_OFST 0
131598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_INCLUDE_FCS_LBN 18
131608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_INCLUDE_FCS_WIDTH 1
131618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_VLAN_INSERTION_OFST 0
131628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_VLAN_INSERTION_LBN 19
131638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_VLAN_INSERTION_WIDTH 1
131648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_VLAN_STRIPPING_OFST 0
131658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_VLAN_STRIPPING_LBN 20
131668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_VLAN_STRIPPING_WIDTH 1
131678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_OFST 0
131688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_LBN 21
131698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_WIDTH 1
131708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PREFIX_LEN_0_OFST 0
131718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PREFIX_LEN_0_LBN 22
131728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PREFIX_LEN_0_WIDTH 1
131738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PREFIX_LEN_14_OFST 0
131748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PREFIX_LEN_14_LBN 23
131758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_PREFIX_LEN_14_WIDTH 1
131768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_TIMESTAMP_OFST 0
131778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_TIMESTAMP_LBN 24
131788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_TIMESTAMP_WIDTH 1
131798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_BATCHING_OFST 0
131808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_BATCHING_LBN 25
131818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_BATCHING_WIDTH 1
131828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCAST_FILTER_CHAINING_OFST 0
131838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCAST_FILTER_CHAINING_LBN 26
131848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCAST_FILTER_CHAINING_WIDTH 1
131858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_PM_AND_RXDP_COUNTERS_OFST 0
131868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_PM_AND_RXDP_COUNTERS_LBN 27
131878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
131888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DISABLE_SCATTER_OFST 0
131898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DISABLE_SCATTER_LBN 28
131908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DISABLE_SCATTER_WIDTH 1
131918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
131928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
131938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
131948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVB_OFST 0
131958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVB_LBN 30
131968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVB_WIDTH 1
131978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VXLAN_NVGRE_OFST 0
131988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VXLAN_NVGRE_LBN 31
131998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VXLAN_NVGRE_WIDTH 1
132008c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
132018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DPCPU_FW_ID_OFST 4
132028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DPCPU_FW_ID_LEN 2
132038c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
132048c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP 0x0
132058c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
132068c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_LOW_LATENCY 0x1
132078c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
132088c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_PACKED_STREAM 0x2
132098c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
132108c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_RULES_ENGINE 0x5
132118c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
132128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_DPDK 0x6
132138c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
132148c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_BIST 0x10a
132158c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
132168c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
132178c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
132188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
132198c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
132208c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
132218c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
132228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
132238c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
132248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_BACKPRESSURE 0x105
132258c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
132268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
132278c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
132288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
132298c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
132308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
132318c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
132328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
132338c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
132348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_TEST_FW_SLOW 0x10c
132358c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
132368c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TX_DPCPU_FW_ID_OFST 6
132378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TX_DPCPU_FW_ID_LEN 2
132388c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
132398c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP 0x0
132408c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
132418c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_LOW_LATENCY 0x1
132428c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
132438c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_HIGH_PACKET_RATE 0x3
132448c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
132458c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_RULES_ENGINE 0x5
132468c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
132478c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_DPDK 0x6
132488c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
132498c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_BIST 0x12d
132508c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
132518c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
132528c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
132538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
132548c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
132558c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXDP_TEST_FW_CSR 0x103
132568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_OFST 8
132578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_LEN 2
132588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_REV_OFST 8
132598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_REV_LBN 0
132608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_REV_WIDTH 12
132618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_TYPE_OFST 8
132628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_TYPE_LBN 12
132638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
132648c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
132658c2ecf20Sopenharmony_ci * of REV field in future)
132668c2ecf20Sopenharmony_ci */
132678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_RESERVED 0x0
132688c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
132698c2ecf20Sopenharmony_ci * development only)
132708c2ecf20Sopenharmony_ci */
132718c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
132728c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
132738c2ecf20Sopenharmony_ci */
132748c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
132758c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
132768c2ecf20Sopenharmony_ci * (Huntington development only)
132778c2ecf20Sopenharmony_ci */
132788c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
132798c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
132808c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
132818c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
132828c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_VSWITCH 0x3
132838c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
132848c2ecf20Sopenharmony_ci * (Huntington development only)
132858c2ecf20Sopenharmony_ci */
132868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
132878c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
132888c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
132898c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
132908c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
132918c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
132928c2ecf20Sopenharmony_ci * tests (Medford development only)
132938c2ecf20Sopenharmony_ci */
132948c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
132958c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
132968c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
132978c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
132988c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_L3XUDP 0x9
132998c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
133008c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_DPDK 0xa
133018c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
133028c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
133038c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
133048c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
133058c2ecf20Sopenharmony_ci */
133068c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
133078c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_OFST 10
133088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_LEN 2
133098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_REV_OFST 10
133108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_REV_LBN 0
133118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_REV_WIDTH 12
133128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_TYPE_OFST 10
133138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_TYPE_LBN 12
133148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
133158c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
133168c2ecf20Sopenharmony_ci * of REV field in future)
133178c2ecf20Sopenharmony_ci */
133188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_RESERVED 0x0
133198c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
133208c2ecf20Sopenharmony_ci * development only)
133218c2ecf20Sopenharmony_ci */
133228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
133238c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
133248c2ecf20Sopenharmony_ci */
133258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
133268c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
133278c2ecf20Sopenharmony_ci * (Huntington development only)
133288c2ecf20Sopenharmony_ci */
133298c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
133308c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
133318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
133328c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
133338c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_VSWITCH 0x3
133348c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
133358c2ecf20Sopenharmony_ci * (Huntington development only)
133368c2ecf20Sopenharmony_ci */
133378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
133388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
133398c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
133408c2ecf20Sopenharmony_ci * tests (Medford development only)
133418c2ecf20Sopenharmony_ci */
133428c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
133438c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
133448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
133458c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
133468c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_L3XUDP 0x9
133478c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
133488c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_DPDK 0xa
133498c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
133508c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
133518c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
133528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_HW_CAPABILITIES_OFST 12
133538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_HW_CAPABILITIES_LEN 4
133548c2ecf20Sopenharmony_ci/* Licensed capabilities */
133558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_LICENSE_CAPABILITIES_OFST 16
133568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_LICENSE_CAPABILITIES_LEN 4
133578c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
133588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_FLAGS2_OFST 20
133598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_FLAGS2_LEN 4
133608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_OFST 20
133618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_LBN 0
133628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_WIDTH 1
133638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_ENCAP_OFST 20
133648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_ENCAP_LBN 1
133658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_ENCAP_WIDTH 1
133668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVQ_TIMER_CTRL_OFST 20
133678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVQ_TIMER_CTRL_LBN 2
133688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVQ_TIMER_CTRL_WIDTH 1
133698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVENT_CUT_THROUGH_OFST 20
133708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVENT_CUT_THROUGH_LBN 3
133718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EVENT_CUT_THROUGH_WIDTH 1
133728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_CUT_THROUGH_OFST 20
133738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_CUT_THROUGH_LBN 4
133748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_CUT_THROUGH_WIDTH 1
133758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_VFIFO_ULL_MODE_OFST 20
133768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_VFIFO_ULL_MODE_LBN 5
133778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
133788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
133798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
133808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
133818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
133828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
133838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
133848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_EVQ_V2_OFST 20
133858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_EVQ_V2_LBN 7
133868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_EVQ_V2_WIDTH 1
133878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MAC_TIMESTAMPING_OFST 20
133888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MAC_TIMESTAMPING_LBN 8
133898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
133908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TIMESTAMP_OFST 20
133918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TIMESTAMP_LBN 9
133928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TIMESTAMP_WIDTH 1
133938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_SNIFF_OFST 20
133948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_SNIFF_LBN 10
133958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RX_SNIFF_WIDTH 1
133968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_SNIFF_OFST 20
133978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_SNIFF_LBN 11
133988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_SNIFF_WIDTH 1
133998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
134008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
134018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
134028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCDI_BACKGROUND_OFST 20
134038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCDI_BACKGROUND_LBN 13
134048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCDI_BACKGROUND_WIDTH 1
134058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCDI_DB_RETURN_OFST 20
134068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCDI_DB_RETURN_LBN 14
134078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_MCDI_DB_RETURN_WIDTH 1
134088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_CTPIO_OFST 20
134098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_CTPIO_LBN 15
134108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_CTPIO_WIDTH 1
134118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TSA_SUPPORT_OFST 20
134128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TSA_SUPPORT_LBN 16
134138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TSA_SUPPORT_WIDTH 1
134148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TSA_BOUND_OFST 20
134158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TSA_BOUND_LBN 17
134168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TSA_BOUND_WIDTH 1
134178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
134188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
134198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
134208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_FLAG_OFST 20
134218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_FLAG_LBN 19
134228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_FLAG_WIDTH 1
134238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_MARK_OFST 20
134248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_MARK_LBN 20
134258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_MARK_WIDTH 1
134268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
134278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
134288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
134298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
134308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
134318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
134328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_L3XUDP_SUPPORT_OFST 20
134338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_L3XUDP_SUPPORT_LBN 22
134348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_L3XUDP_SUPPORT_WIDTH 1
134358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
134368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
134378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
134388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VI_SPREADING_OFST 20
134398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VI_SPREADING_LBN 24
134408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_VI_SPREADING_WIDTH 1
134418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_HLB_IDLE_OFST 20
134428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_HLB_IDLE_LBN 25
134438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_RXDP_HLB_IDLE_WIDTH 1
134448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
134458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
134468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
134478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
134488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
134498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
134508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_BUNDLE_UPDATE_OFST 20
134518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_BUNDLE_UPDATE_LBN 28
134528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_BUNDLE_UPDATE_WIDTH 1
134538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V3_OFST 20
134548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V3_LBN 29
134558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V3_WIDTH 1
134568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_DYNAMIC_SENSORS_OFST 20
134578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_DYNAMIC_SENSORS_LBN 30
134588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_DYNAMIC_SENSORS_WIDTH 1
134598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
134608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
134618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V5_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
134628c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
134638c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
134648c2ecf20Sopenharmony_ci */
134658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
134668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
134678c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
134688c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
134698c2ecf20Sopenharmony_ci * present or not assigned.
134708c2ecf20Sopenharmony_ci */
134718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
134728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
134738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
134748c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
134758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_ACCESS_NOT_PERMITTED 0xff
134768c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
134778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_PF_NOT_PRESENT 0xfe
134788c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
134798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_PF_NOT_ASSIGNED 0xfd
134808c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
134818c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
134828c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
134838c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
134848c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
134858c2ecf20Sopenharmony_ci */
134868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
134878c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
134888c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
134898c2ecf20Sopenharmony_ci */
134908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_VFS_PER_PF_OFST 42
134918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_VFS_PER_PF_LEN 1
134928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_VFS_PER_PF_NUM 16
134938c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
134948c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V5_OUT_ACCESS_NOT_PERMITTED 0xff */
134958c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
134968c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V5_OUT_PF_NOT_PRESENT 0xfe */
134978c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
134988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_VIS_PER_PORT_OFST 58
134998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_VIS_PER_PORT_LEN 2
135008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_VIS_PER_PORT_NUM 4
135018c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
135028c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
135038c2ecf20Sopenharmony_ci */
135048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DESC_CACHE_SIZE_OFST 66
135058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_RX_DESC_CACHE_SIZE_LEN 1
135068c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
135078c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
135088c2ecf20Sopenharmony_ci */
135098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TX_DESC_CACHE_SIZE_OFST 67
135108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_TX_DESC_CACHE_SIZE_LEN 1
135118c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
135128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_PIO_BUFFS_OFST 68
135138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_NUM_PIO_BUFFS_LEN 2
135148c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
135158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_SIZE_PIO_BUFF_OFST 70
135168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_SIZE_PIO_BUFF_LEN 2
135178c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
135188c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
135198c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
135208c2ecf20Sopenharmony_ci * with 8k VI windows.
135218c2ecf20Sopenharmony_ci */
135228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_VI_WINDOW_MODE_OFST 72
135238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_VI_WINDOW_MODE_LEN 1
135248c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
135258c2ecf20Sopenharmony_ci * CTPIO is not mapped.
135268c2ecf20Sopenharmony_ci */
135278c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_VI_WINDOW_MODE_8K 0x0
135288c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
135298c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_VI_WINDOW_MODE_16K 0x1
135308c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
135318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V5_OUT_VI_WINDOW_MODE_64K 0x2
135328c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
135338c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
135348c2ecf20Sopenharmony_ci */
135358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
135368c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
135378c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
135388c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
135398c2ecf20Sopenharmony_ci */
135408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
135418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
135428c2ecf20Sopenharmony_ci/* Entry count in the MAC stats array, including the final GENERATION_END
135438c2ecf20Sopenharmony_ci * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
135448c2ecf20Sopenharmony_ci * hold at least this many 64-bit stats values, if they wish to receive all
135458c2ecf20Sopenharmony_ci * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
135468c2ecf20Sopenharmony_ci * stats array returned will be truncated.
135478c2ecf20Sopenharmony_ci */
135488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_MAC_STATS_NUM_STATS_OFST 76
135498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_MAC_STATS_NUM_STATS_LEN 2
135508c2ecf20Sopenharmony_ci/* Maximum supported value for MC_CMD_FILTER_OP_V3/MATCH_MARK_VALUE. This field
135518c2ecf20Sopenharmony_ci * will only be non-zero if MC_CMD_GET_CAPABILITIES/FILTER_ACTION_MARK is set.
135528c2ecf20Sopenharmony_ci */
135538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_MARK_MAX_OFST 80
135548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V5_OUT_FILTER_ACTION_MARK_MAX_LEN 4
135558c2ecf20Sopenharmony_ci
135568c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V6_OUT msgresponse */
135578c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V6_OUT_LEN 148
135588c2ecf20Sopenharmony_ci/* First word of flags. */
135598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_FLAGS1_OFST 0
135608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_FLAGS1_LEN 4
135618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VPORT_RECONFIGURE_OFST 0
135628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VPORT_RECONFIGURE_LBN 3
135638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VPORT_RECONFIGURE_WIDTH 1
135648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_STRIPING_OFST 0
135658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_STRIPING_LBN 4
135668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_STRIPING_WIDTH 1
135678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VADAPTOR_QUERY_OFST 0
135688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VADAPTOR_QUERY_LBN 5
135698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VADAPTOR_QUERY_WIDTH 1
135708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
135718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
135728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
135738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_DRV_ATTACH_PREBOOT_OFST 0
135748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_DRV_ATTACH_PREBOOT_LBN 7
135758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
135768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_FORCE_EVENT_MERGING_OFST 0
135778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_FORCE_EVENT_MERGING_LBN 8
135788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
135798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_SET_MAC_ENHANCED_OFST 0
135808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_SET_MAC_ENHANCED_LBN 9
135818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_SET_MAC_ENHANCED_WIDTH 1
135828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
135838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
135848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
135858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
135868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
135878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
135888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
135898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
135908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
135918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_ADDITIONAL_RSS_MODES_OFST 0
135928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_ADDITIONAL_RSS_MODES_LBN 13
135938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
135948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_QBB_OFST 0
135958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_QBB_LBN 14
135968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_QBB_WIDTH 1
135978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
135988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
135998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
136008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_RSS_LIMITED_OFST 0
136018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_RSS_LIMITED_LBN 16
136028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_RSS_LIMITED_WIDTH 1
136038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PACKED_STREAM_OFST 0
136048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PACKED_STREAM_LBN 17
136058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PACKED_STREAM_WIDTH 1
136068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_INCLUDE_FCS_OFST 0
136078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_INCLUDE_FCS_LBN 18
136088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_INCLUDE_FCS_WIDTH 1
136098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_VLAN_INSERTION_OFST 0
136108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_VLAN_INSERTION_LBN 19
136118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_VLAN_INSERTION_WIDTH 1
136128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_VLAN_STRIPPING_OFST 0
136138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_VLAN_STRIPPING_LBN 20
136148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_VLAN_STRIPPING_WIDTH 1
136158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_OFST 0
136168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_LBN 21
136178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_WIDTH 1
136188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PREFIX_LEN_0_OFST 0
136198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PREFIX_LEN_0_LBN 22
136208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PREFIX_LEN_0_WIDTH 1
136218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PREFIX_LEN_14_OFST 0
136228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PREFIX_LEN_14_LBN 23
136238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_PREFIX_LEN_14_WIDTH 1
136248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_TIMESTAMP_OFST 0
136258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_TIMESTAMP_LBN 24
136268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_TIMESTAMP_WIDTH 1
136278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_BATCHING_OFST 0
136288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_BATCHING_LBN 25
136298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_BATCHING_WIDTH 1
136308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCAST_FILTER_CHAINING_OFST 0
136318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCAST_FILTER_CHAINING_LBN 26
136328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCAST_FILTER_CHAINING_WIDTH 1
136338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_PM_AND_RXDP_COUNTERS_OFST 0
136348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_PM_AND_RXDP_COUNTERS_LBN 27
136358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
136368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DISABLE_SCATTER_OFST 0
136378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DISABLE_SCATTER_LBN 28
136388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DISABLE_SCATTER_WIDTH 1
136398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
136408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
136418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
136428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVB_OFST 0
136438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVB_LBN 30
136448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVB_WIDTH 1
136458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VXLAN_NVGRE_OFST 0
136468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VXLAN_NVGRE_LBN 31
136478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VXLAN_NVGRE_WIDTH 1
136488c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
136498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DPCPU_FW_ID_OFST 4
136508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DPCPU_FW_ID_LEN 2
136518c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
136528c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP 0x0
136538c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
136548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_LOW_LATENCY 0x1
136558c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
136568c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_PACKED_STREAM 0x2
136578c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
136588c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_RULES_ENGINE 0x5
136598c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
136608c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_DPDK 0x6
136618c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
136628c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_BIST 0x10a
136638c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
136648c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
136658c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
136668c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
136678c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
136688c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
136698c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
136708c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
136718c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
136728c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_BACKPRESSURE 0x105
136738c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
136748c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
136758c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
136768c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
136778c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
136788c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
136798c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
136808c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
136818c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
136828c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_TEST_FW_SLOW 0x10c
136838c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
136848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TX_DPCPU_FW_ID_OFST 6
136858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TX_DPCPU_FW_ID_LEN 2
136868c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
136878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP 0x0
136888c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
136898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_LOW_LATENCY 0x1
136908c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
136918c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_HIGH_PACKET_RATE 0x3
136928c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
136938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_RULES_ENGINE 0x5
136948c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
136958c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_DPDK 0x6
136968c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
136978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_BIST 0x12d
136988c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
136998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
137008c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
137018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
137028c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
137038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXDP_TEST_FW_CSR 0x103
137048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_OFST 8
137058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_LEN 2
137068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_REV_OFST 8
137078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_REV_LBN 0
137088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_REV_WIDTH 12
137098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_TYPE_OFST 8
137108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_TYPE_LBN 12
137118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
137128c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
137138c2ecf20Sopenharmony_ci * of REV field in future)
137148c2ecf20Sopenharmony_ci */
137158c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_RESERVED 0x0
137168c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
137178c2ecf20Sopenharmony_ci * development only)
137188c2ecf20Sopenharmony_ci */
137198c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
137208c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
137218c2ecf20Sopenharmony_ci */
137228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
137238c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
137248c2ecf20Sopenharmony_ci * (Huntington development only)
137258c2ecf20Sopenharmony_ci */
137268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
137278c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
137288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
137298c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
137308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_VSWITCH 0x3
137318c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
137328c2ecf20Sopenharmony_ci * (Huntington development only)
137338c2ecf20Sopenharmony_ci */
137348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
137358c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
137368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
137378c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
137388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
137398c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
137408c2ecf20Sopenharmony_ci * tests (Medford development only)
137418c2ecf20Sopenharmony_ci */
137428c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
137438c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
137448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
137458c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
137468c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_L3XUDP 0x9
137478c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
137488c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_DPDK 0xa
137498c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
137508c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
137518c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
137528c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
137538c2ecf20Sopenharmony_ci */
137548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
137558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_OFST 10
137568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_LEN 2
137578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_REV_OFST 10
137588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_REV_LBN 0
137598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_REV_WIDTH 12
137608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_TYPE_OFST 10
137618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_TYPE_LBN 12
137628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
137638c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
137648c2ecf20Sopenharmony_ci * of REV field in future)
137658c2ecf20Sopenharmony_ci */
137668c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_RESERVED 0x0
137678c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
137688c2ecf20Sopenharmony_ci * development only)
137698c2ecf20Sopenharmony_ci */
137708c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
137718c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
137728c2ecf20Sopenharmony_ci */
137738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
137748c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
137758c2ecf20Sopenharmony_ci * (Huntington development only)
137768c2ecf20Sopenharmony_ci */
137778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
137788c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
137798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
137808c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
137818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_VSWITCH 0x3
137828c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
137838c2ecf20Sopenharmony_ci * (Huntington development only)
137848c2ecf20Sopenharmony_ci */
137858c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
137868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
137878c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
137888c2ecf20Sopenharmony_ci * tests (Medford development only)
137898c2ecf20Sopenharmony_ci */
137908c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
137918c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
137928c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
137938c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
137948c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_L3XUDP 0x9
137958c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
137968c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_DPDK 0xa
137978c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
137988c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
137998c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
138008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_HW_CAPABILITIES_OFST 12
138018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_HW_CAPABILITIES_LEN 4
138028c2ecf20Sopenharmony_ci/* Licensed capabilities */
138038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_LICENSE_CAPABILITIES_OFST 16
138048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_LICENSE_CAPABILITIES_LEN 4
138058c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
138068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_FLAGS2_OFST 20
138078c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_FLAGS2_LEN 4
138088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_OFST 20
138098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_LBN 0
138108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_WIDTH 1
138118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_ENCAP_OFST 20
138128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_ENCAP_LBN 1
138138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_ENCAP_WIDTH 1
138148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVQ_TIMER_CTRL_OFST 20
138158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVQ_TIMER_CTRL_LBN 2
138168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVQ_TIMER_CTRL_WIDTH 1
138178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVENT_CUT_THROUGH_OFST 20
138188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVENT_CUT_THROUGH_LBN 3
138198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EVENT_CUT_THROUGH_WIDTH 1
138208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_CUT_THROUGH_OFST 20
138218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_CUT_THROUGH_LBN 4
138228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_CUT_THROUGH_WIDTH 1
138238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_VFIFO_ULL_MODE_OFST 20
138248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_VFIFO_ULL_MODE_LBN 5
138258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
138268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
138278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
138288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
138298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
138308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
138318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
138328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_EVQ_V2_OFST 20
138338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_EVQ_V2_LBN 7
138348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_EVQ_V2_WIDTH 1
138358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MAC_TIMESTAMPING_OFST 20
138368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MAC_TIMESTAMPING_LBN 8
138378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
138388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TIMESTAMP_OFST 20
138398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TIMESTAMP_LBN 9
138408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TIMESTAMP_WIDTH 1
138418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_SNIFF_OFST 20
138428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_SNIFF_LBN 10
138438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RX_SNIFF_WIDTH 1
138448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_SNIFF_OFST 20
138458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_SNIFF_LBN 11
138468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_SNIFF_WIDTH 1
138478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
138488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
138498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
138508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCDI_BACKGROUND_OFST 20
138518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCDI_BACKGROUND_LBN 13
138528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCDI_BACKGROUND_WIDTH 1
138538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCDI_DB_RETURN_OFST 20
138548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCDI_DB_RETURN_LBN 14
138558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_MCDI_DB_RETURN_WIDTH 1
138568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_CTPIO_OFST 20
138578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_CTPIO_LBN 15
138588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_CTPIO_WIDTH 1
138598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TSA_SUPPORT_OFST 20
138608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TSA_SUPPORT_LBN 16
138618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TSA_SUPPORT_WIDTH 1
138628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TSA_BOUND_OFST 20
138638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TSA_BOUND_LBN 17
138648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TSA_BOUND_WIDTH 1
138658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
138668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
138678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
138688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_FLAG_OFST 20
138698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_FLAG_LBN 19
138708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_FLAG_WIDTH 1
138718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_MARK_OFST 20
138728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_MARK_LBN 20
138738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_MARK_WIDTH 1
138748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
138758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
138768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
138778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
138788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
138798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
138808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_L3XUDP_SUPPORT_OFST 20
138818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_L3XUDP_SUPPORT_LBN 22
138828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_L3XUDP_SUPPORT_WIDTH 1
138838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
138848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
138858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
138868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VI_SPREADING_OFST 20
138878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VI_SPREADING_LBN 24
138888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_VI_SPREADING_WIDTH 1
138898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_HLB_IDLE_OFST 20
138908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_HLB_IDLE_LBN 25
138918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_RXDP_HLB_IDLE_WIDTH 1
138928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
138938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
138948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
138958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
138968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
138978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
138988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_BUNDLE_UPDATE_OFST 20
138998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_BUNDLE_UPDATE_LBN 28
139008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_BUNDLE_UPDATE_WIDTH 1
139018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V3_OFST 20
139028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V3_LBN 29
139038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V3_WIDTH 1
139048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_DYNAMIC_SENSORS_OFST 20
139058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_DYNAMIC_SENSORS_LBN 30
139068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_DYNAMIC_SENSORS_WIDTH 1
139078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
139088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
139098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V6_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
139108c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
139118c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
139128c2ecf20Sopenharmony_ci */
139138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
139148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
139158c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
139168c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
139178c2ecf20Sopenharmony_ci * present or not assigned.
139188c2ecf20Sopenharmony_ci */
139198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
139208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
139218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
139228c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
139238c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_ACCESS_NOT_PERMITTED 0xff
139248c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
139258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_PF_NOT_PRESENT 0xfe
139268c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
139278c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_PF_NOT_ASSIGNED 0xfd
139288c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
139298c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
139308c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
139318c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
139328c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
139338c2ecf20Sopenharmony_ci */
139348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
139358c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
139368c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
139378c2ecf20Sopenharmony_ci */
139388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_VFS_PER_PF_OFST 42
139398c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_VFS_PER_PF_LEN 1
139408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_VFS_PER_PF_NUM 16
139418c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
139428c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V6_OUT_ACCESS_NOT_PERMITTED 0xff */
139438c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
139448c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V6_OUT_PF_NOT_PRESENT 0xfe */
139458c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
139468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_VIS_PER_PORT_OFST 58
139478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_VIS_PER_PORT_LEN 2
139488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_VIS_PER_PORT_NUM 4
139498c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
139508c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
139518c2ecf20Sopenharmony_ci */
139528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DESC_CACHE_SIZE_OFST 66
139538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_RX_DESC_CACHE_SIZE_LEN 1
139548c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
139558c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
139568c2ecf20Sopenharmony_ci */
139578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TX_DESC_CACHE_SIZE_OFST 67
139588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_TX_DESC_CACHE_SIZE_LEN 1
139598c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
139608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_PIO_BUFFS_OFST 68
139618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_NUM_PIO_BUFFS_LEN 2
139628c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
139638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_SIZE_PIO_BUFF_OFST 70
139648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_SIZE_PIO_BUFF_LEN 2
139658c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
139668c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
139678c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
139688c2ecf20Sopenharmony_ci * with 8k VI windows.
139698c2ecf20Sopenharmony_ci */
139708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_VI_WINDOW_MODE_OFST 72
139718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_VI_WINDOW_MODE_LEN 1
139728c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
139738c2ecf20Sopenharmony_ci * CTPIO is not mapped.
139748c2ecf20Sopenharmony_ci */
139758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_VI_WINDOW_MODE_8K 0x0
139768c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
139778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_VI_WINDOW_MODE_16K 0x1
139788c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
139798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V6_OUT_VI_WINDOW_MODE_64K 0x2
139808c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
139818c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
139828c2ecf20Sopenharmony_ci */
139838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
139848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
139858c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
139868c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
139878c2ecf20Sopenharmony_ci */
139888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
139898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
139908c2ecf20Sopenharmony_ci/* Entry count in the MAC stats array, including the final GENERATION_END
139918c2ecf20Sopenharmony_ci * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
139928c2ecf20Sopenharmony_ci * hold at least this many 64-bit stats values, if they wish to receive all
139938c2ecf20Sopenharmony_ci * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
139948c2ecf20Sopenharmony_ci * stats array returned will be truncated.
139958c2ecf20Sopenharmony_ci */
139968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_MAC_STATS_NUM_STATS_OFST 76
139978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_MAC_STATS_NUM_STATS_LEN 2
139988c2ecf20Sopenharmony_ci/* Maximum supported value for MC_CMD_FILTER_OP_V3/MATCH_MARK_VALUE. This field
139998c2ecf20Sopenharmony_ci * will only be non-zero if MC_CMD_GET_CAPABILITIES/FILTER_ACTION_MARK is set.
140008c2ecf20Sopenharmony_ci */
140018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_MARK_MAX_OFST 80
140028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_FILTER_ACTION_MARK_MAX_LEN 4
140038c2ecf20Sopenharmony_ci/* On devices where the INIT_RXQ_WITH_BUFFER_SIZE flag (in
140048c2ecf20Sopenharmony_ci * GET_CAPABILITIES_OUT_V2) is set, drivers have to specify a buffer size when
140058c2ecf20Sopenharmony_ci * they create an RX queue. Due to hardware limitations, only a small number of
140068c2ecf20Sopenharmony_ci * different buffer sizes may be available concurrently. Nonzero entries in
140078c2ecf20Sopenharmony_ci * this array are the sizes of buffers which the system guarantees will be
140088c2ecf20Sopenharmony_ci * available for use. If the list is empty, there are no limitations on
140098c2ecf20Sopenharmony_ci * concurrent buffer sizes.
140108c2ecf20Sopenharmony_ci */
140118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_GUARANTEED_RX_BUFFER_SIZES_OFST 84
140128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_GUARANTEED_RX_BUFFER_SIZES_LEN 4
140138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V6_OUT_GUARANTEED_RX_BUFFER_SIZES_NUM 16
140148c2ecf20Sopenharmony_ci
140158c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V7_OUT msgresponse */
140168c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V7_OUT_LEN 152
140178c2ecf20Sopenharmony_ci/* First word of flags. */
140188c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FLAGS1_OFST 0
140198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FLAGS1_LEN 4
140208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VPORT_RECONFIGURE_OFST 0
140218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VPORT_RECONFIGURE_LBN 3
140228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VPORT_RECONFIGURE_WIDTH 1
140238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_STRIPING_OFST 0
140248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_STRIPING_LBN 4
140258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_STRIPING_WIDTH 1
140268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VADAPTOR_QUERY_OFST 0
140278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VADAPTOR_QUERY_LBN 5
140288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VADAPTOR_QUERY_WIDTH 1
140298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
140308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
140318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
140328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_DRV_ATTACH_PREBOOT_OFST 0
140338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_DRV_ATTACH_PREBOOT_LBN 7
140348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
140358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_FORCE_EVENT_MERGING_OFST 0
140368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_FORCE_EVENT_MERGING_LBN 8
140378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
140388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_SET_MAC_ENHANCED_OFST 0
140398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_SET_MAC_ENHANCED_LBN 9
140408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_SET_MAC_ENHANCED_WIDTH 1
140418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
140428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
140438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
140448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
140458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
140468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
140478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
140488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
140498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
140508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_ADDITIONAL_RSS_MODES_OFST 0
140518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_ADDITIONAL_RSS_MODES_LBN 13
140528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
140538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_QBB_OFST 0
140548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_QBB_LBN 14
140558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_QBB_WIDTH 1
140568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
140578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
140588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
140598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_RSS_LIMITED_OFST 0
140608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_RSS_LIMITED_LBN 16
140618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_RSS_LIMITED_WIDTH 1
140628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PACKED_STREAM_OFST 0
140638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PACKED_STREAM_LBN 17
140648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PACKED_STREAM_WIDTH 1
140658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_INCLUDE_FCS_OFST 0
140668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_INCLUDE_FCS_LBN 18
140678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_INCLUDE_FCS_WIDTH 1
140688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_VLAN_INSERTION_OFST 0
140698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_VLAN_INSERTION_LBN 19
140708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_VLAN_INSERTION_WIDTH 1
140718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_VLAN_STRIPPING_OFST 0
140728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_VLAN_STRIPPING_LBN 20
140738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_VLAN_STRIPPING_WIDTH 1
140748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_OFST 0
140758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_LBN 21
140768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_WIDTH 1
140778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PREFIX_LEN_0_OFST 0
140788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PREFIX_LEN_0_LBN 22
140798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PREFIX_LEN_0_WIDTH 1
140808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PREFIX_LEN_14_OFST 0
140818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PREFIX_LEN_14_LBN 23
140828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_PREFIX_LEN_14_WIDTH 1
140838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_TIMESTAMP_OFST 0
140848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_TIMESTAMP_LBN 24
140858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_TIMESTAMP_WIDTH 1
140868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_BATCHING_OFST 0
140878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_BATCHING_LBN 25
140888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_BATCHING_WIDTH 1
140898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCAST_FILTER_CHAINING_OFST 0
140908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCAST_FILTER_CHAINING_LBN 26
140918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCAST_FILTER_CHAINING_WIDTH 1
140928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_PM_AND_RXDP_COUNTERS_OFST 0
140938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_PM_AND_RXDP_COUNTERS_LBN 27
140948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
140958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DISABLE_SCATTER_OFST 0
140968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DISABLE_SCATTER_LBN 28
140978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DISABLE_SCATTER_WIDTH 1
140988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
140998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
141008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
141018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVB_OFST 0
141028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVB_LBN 30
141038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVB_WIDTH 1
141048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VXLAN_NVGRE_OFST 0
141058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VXLAN_NVGRE_LBN 31
141068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VXLAN_NVGRE_WIDTH 1
141078c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
141088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DPCPU_FW_ID_OFST 4
141098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DPCPU_FW_ID_LEN 2
141108c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
141118c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP 0x0
141128c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
141138c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_LOW_LATENCY 0x1
141148c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
141158c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_PACKED_STREAM 0x2
141168c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
141178c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_RULES_ENGINE 0x5
141188c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
141198c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_DPDK 0x6
141208c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
141218c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_BIST 0x10a
141228c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
141238c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
141248c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
141258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
141268c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
141278c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
141288c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
141298c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
141308c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
141318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_BACKPRESSURE 0x105
141328c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
141338c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
141348c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
141358c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
141368c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
141378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
141388c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
141398c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
141408c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
141418c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_TEST_FW_SLOW 0x10c
141428c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
141438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TX_DPCPU_FW_ID_OFST 6
141448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TX_DPCPU_FW_ID_LEN 2
141458c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
141468c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP 0x0
141478c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
141488c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_LOW_LATENCY 0x1
141498c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
141508c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_HIGH_PACKET_RATE 0x3
141518c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
141528c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_RULES_ENGINE 0x5
141538c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
141548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_DPDK 0x6
141558c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
141568c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_BIST 0x12d
141578c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
141588c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
141598c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
141608c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
141618c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
141628c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXDP_TEST_FW_CSR 0x103
141638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_OFST 8
141648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_LEN 2
141658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_REV_OFST 8
141668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_REV_LBN 0
141678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_REV_WIDTH 12
141688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_TYPE_OFST 8
141698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_TYPE_LBN 12
141708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
141718c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
141728c2ecf20Sopenharmony_ci * of REV field in future)
141738c2ecf20Sopenharmony_ci */
141748c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_RESERVED 0x0
141758c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
141768c2ecf20Sopenharmony_ci * development only)
141778c2ecf20Sopenharmony_ci */
141788c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
141798c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
141808c2ecf20Sopenharmony_ci */
141818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
141828c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
141838c2ecf20Sopenharmony_ci * (Huntington development only)
141848c2ecf20Sopenharmony_ci */
141858c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
141868c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
141878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
141888c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
141898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_VSWITCH 0x3
141908c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
141918c2ecf20Sopenharmony_ci * (Huntington development only)
141928c2ecf20Sopenharmony_ci */
141938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
141948c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
141958c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
141968c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
141978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
141988c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
141998c2ecf20Sopenharmony_ci * tests (Medford development only)
142008c2ecf20Sopenharmony_ci */
142018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
142028c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
142038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
142048c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
142058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_L3XUDP 0x9
142068c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
142078c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_DPDK 0xa
142088c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
142098c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
142108c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
142118c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
142128c2ecf20Sopenharmony_ci */
142138c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
142148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_OFST 10
142158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_LEN 2
142168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_REV_OFST 10
142178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_REV_LBN 0
142188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_REV_WIDTH 12
142198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_TYPE_OFST 10
142208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_TYPE_LBN 12
142218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
142228c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
142238c2ecf20Sopenharmony_ci * of REV field in future)
142248c2ecf20Sopenharmony_ci */
142258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_RESERVED 0x0
142268c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
142278c2ecf20Sopenharmony_ci * development only)
142288c2ecf20Sopenharmony_ci */
142298c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
142308c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
142318c2ecf20Sopenharmony_ci */
142328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
142338c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
142348c2ecf20Sopenharmony_ci * (Huntington development only)
142358c2ecf20Sopenharmony_ci */
142368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
142378c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
142388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
142398c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
142408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_VSWITCH 0x3
142418c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
142428c2ecf20Sopenharmony_ci * (Huntington development only)
142438c2ecf20Sopenharmony_ci */
142448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
142458c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
142468c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
142478c2ecf20Sopenharmony_ci * tests (Medford development only)
142488c2ecf20Sopenharmony_ci */
142498c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
142508c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
142518c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
142528c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
142538c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_L3XUDP 0x9
142548c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
142558c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_DPDK 0xa
142568c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
142578c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
142588c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
142598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_HW_CAPABILITIES_OFST 12
142608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_HW_CAPABILITIES_LEN 4
142618c2ecf20Sopenharmony_ci/* Licensed capabilities */
142628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_LICENSE_CAPABILITIES_OFST 16
142638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_LICENSE_CAPABILITIES_LEN 4
142648c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
142658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FLAGS2_OFST 20
142668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FLAGS2_LEN 4
142678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_OFST 20
142688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_LBN 0
142698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_WIDTH 1
142708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_ENCAP_OFST 20
142718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_ENCAP_LBN 1
142728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_ENCAP_WIDTH 1
142738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVQ_TIMER_CTRL_OFST 20
142748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVQ_TIMER_CTRL_LBN 2
142758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVQ_TIMER_CTRL_WIDTH 1
142768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVENT_CUT_THROUGH_OFST 20
142778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVENT_CUT_THROUGH_LBN 3
142788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EVENT_CUT_THROUGH_WIDTH 1
142798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_CUT_THROUGH_OFST 20
142808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_CUT_THROUGH_LBN 4
142818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_CUT_THROUGH_WIDTH 1
142828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_VFIFO_ULL_MODE_OFST 20
142838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_VFIFO_ULL_MODE_LBN 5
142848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
142858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
142868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
142878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
142888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
142898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
142908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
142918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_EVQ_V2_OFST 20
142928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_EVQ_V2_LBN 7
142938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_EVQ_V2_WIDTH 1
142948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MAC_TIMESTAMPING_OFST 20
142958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MAC_TIMESTAMPING_LBN 8
142968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
142978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TIMESTAMP_OFST 20
142988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TIMESTAMP_LBN 9
142998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TIMESTAMP_WIDTH 1
143008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_SNIFF_OFST 20
143018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_SNIFF_LBN 10
143028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_SNIFF_WIDTH 1
143038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_SNIFF_OFST 20
143048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_SNIFF_LBN 11
143058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_SNIFF_WIDTH 1
143068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
143078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
143088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
143098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCDI_BACKGROUND_OFST 20
143108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCDI_BACKGROUND_LBN 13
143118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCDI_BACKGROUND_WIDTH 1
143128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCDI_DB_RETURN_OFST 20
143138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCDI_DB_RETURN_LBN 14
143148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MCDI_DB_RETURN_WIDTH 1
143158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_CTPIO_OFST 20
143168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_CTPIO_LBN 15
143178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_CTPIO_WIDTH 1
143188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TSA_SUPPORT_OFST 20
143198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TSA_SUPPORT_LBN 16
143208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TSA_SUPPORT_WIDTH 1
143218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TSA_BOUND_OFST 20
143228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TSA_BOUND_LBN 17
143238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TSA_BOUND_WIDTH 1
143248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
143258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
143268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
143278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_FLAG_OFST 20
143288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_FLAG_LBN 19
143298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_FLAG_WIDTH 1
143308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_MARK_OFST 20
143318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_MARK_LBN 20
143328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_MARK_WIDTH 1
143338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
143348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
143358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
143368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
143378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
143388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
143398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_L3XUDP_SUPPORT_OFST 20
143408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_L3XUDP_SUPPORT_LBN 22
143418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_L3XUDP_SUPPORT_WIDTH 1
143428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
143438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
143448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
143458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VI_SPREADING_OFST 20
143468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VI_SPREADING_LBN 24
143478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VI_SPREADING_WIDTH 1
143488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_HLB_IDLE_OFST 20
143498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_HLB_IDLE_LBN 25
143508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RXDP_HLB_IDLE_WIDTH 1
143518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
143528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
143538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
143548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
143558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
143568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
143578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_BUNDLE_UPDATE_OFST 20
143588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_BUNDLE_UPDATE_LBN 28
143598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_BUNDLE_UPDATE_WIDTH 1
143608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V3_OFST 20
143618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V3_LBN 29
143628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V3_WIDTH 1
143638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_DYNAMIC_SENSORS_OFST 20
143648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_DYNAMIC_SENSORS_LBN 30
143658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_DYNAMIC_SENSORS_WIDTH 1
143668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
143678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
143688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
143698c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
143708c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
143718c2ecf20Sopenharmony_ci */
143728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
143738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
143748c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
143758c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
143768c2ecf20Sopenharmony_ci * present or not assigned.
143778c2ecf20Sopenharmony_ci */
143788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
143798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
143808c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
143818c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
143828c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_ACCESS_NOT_PERMITTED 0xff
143838c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
143848c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_PF_NOT_PRESENT 0xfe
143858c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
143868c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_PF_NOT_ASSIGNED 0xfd
143878c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
143888c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
143898c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
143908c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
143918c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
143928c2ecf20Sopenharmony_ci */
143938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
143948c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
143958c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
143968c2ecf20Sopenharmony_ci */
143978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_VFS_PER_PF_OFST 42
143988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_VFS_PER_PF_LEN 1
143998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_VFS_PER_PF_NUM 16
144008c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
144018c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V7_OUT_ACCESS_NOT_PERMITTED 0xff */
144028c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
144038c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V7_OUT_PF_NOT_PRESENT 0xfe */
144048c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
144058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_VIS_PER_PORT_OFST 58
144068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_VIS_PER_PORT_LEN 2
144078c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_VIS_PER_PORT_NUM 4
144088c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
144098c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
144108c2ecf20Sopenharmony_ci */
144118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DESC_CACHE_SIZE_OFST 66
144128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_RX_DESC_CACHE_SIZE_LEN 1
144138c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
144148c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
144158c2ecf20Sopenharmony_ci */
144168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TX_DESC_CACHE_SIZE_OFST 67
144178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_TX_DESC_CACHE_SIZE_LEN 1
144188c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
144198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_PIO_BUFFS_OFST 68
144208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_NUM_PIO_BUFFS_LEN 2
144218c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
144228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_SIZE_PIO_BUFF_OFST 70
144238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_SIZE_PIO_BUFF_LEN 2
144248c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
144258c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
144268c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
144278c2ecf20Sopenharmony_ci * with 8k VI windows.
144288c2ecf20Sopenharmony_ci */
144298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_VI_WINDOW_MODE_OFST 72
144308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_VI_WINDOW_MODE_LEN 1
144318c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
144328c2ecf20Sopenharmony_ci * CTPIO is not mapped.
144338c2ecf20Sopenharmony_ci */
144348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_VI_WINDOW_MODE_8K 0x0
144358c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
144368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_VI_WINDOW_MODE_16K 0x1
144378c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
144388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V7_OUT_VI_WINDOW_MODE_64K 0x2
144398c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
144408c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
144418c2ecf20Sopenharmony_ci */
144428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
144438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
144448c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
144458c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
144468c2ecf20Sopenharmony_ci */
144478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
144488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
144498c2ecf20Sopenharmony_ci/* Entry count in the MAC stats array, including the final GENERATION_END
144508c2ecf20Sopenharmony_ci * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
144518c2ecf20Sopenharmony_ci * hold at least this many 64-bit stats values, if they wish to receive all
144528c2ecf20Sopenharmony_ci * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
144538c2ecf20Sopenharmony_ci * stats array returned will be truncated.
144548c2ecf20Sopenharmony_ci */
144558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_MAC_STATS_NUM_STATS_OFST 76
144568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_MAC_STATS_NUM_STATS_LEN 2
144578c2ecf20Sopenharmony_ci/* Maximum supported value for MC_CMD_FILTER_OP_V3/MATCH_MARK_VALUE. This field
144588c2ecf20Sopenharmony_ci * will only be non-zero if MC_CMD_GET_CAPABILITIES/FILTER_ACTION_MARK is set.
144598c2ecf20Sopenharmony_ci */
144608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_MARK_MAX_OFST 80
144618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FILTER_ACTION_MARK_MAX_LEN 4
144628c2ecf20Sopenharmony_ci/* On devices where the INIT_RXQ_WITH_BUFFER_SIZE flag (in
144638c2ecf20Sopenharmony_ci * GET_CAPABILITIES_OUT_V2) is set, drivers have to specify a buffer size when
144648c2ecf20Sopenharmony_ci * they create an RX queue. Due to hardware limitations, only a small number of
144658c2ecf20Sopenharmony_ci * different buffer sizes may be available concurrently. Nonzero entries in
144668c2ecf20Sopenharmony_ci * this array are the sizes of buffers which the system guarantees will be
144678c2ecf20Sopenharmony_ci * available for use. If the list is empty, there are no limitations on
144688c2ecf20Sopenharmony_ci * concurrent buffer sizes.
144698c2ecf20Sopenharmony_ci */
144708c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_GUARANTEED_RX_BUFFER_SIZES_OFST 84
144718c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_GUARANTEED_RX_BUFFER_SIZES_LEN 4
144728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_GUARANTEED_RX_BUFFER_SIZES_NUM 16
144738c2ecf20Sopenharmony_ci/* Third word of flags. Not present on older firmware (check the length). */
144748c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FLAGS3_OFST 148
144758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V7_OUT_FLAGS3_LEN 4
144768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_WOL_ETHERWAKE_OFST 148
144778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_WOL_ETHERWAKE_LBN 0
144788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_WOL_ETHERWAKE_WIDTH 1
144798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RSS_EVEN_SPREADING_OFST 148
144808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RSS_EVEN_SPREADING_LBN 1
144818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RSS_EVEN_SPREADING_WIDTH 1
144828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RSS_SELECTABLE_TABLE_SIZE_OFST 148
144838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RSS_SELECTABLE_TABLE_SIZE_LBN 2
144848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RSS_SELECTABLE_TABLE_SIZE_WIDTH 1
144858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MAE_SUPPORTED_OFST 148
144868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MAE_SUPPORTED_LBN 3
144878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_MAE_SUPPORTED_WIDTH 1
144888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VDPA_SUPPORTED_OFST 148
144898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VDPA_SUPPORTED_LBN 4
144908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_VDPA_SUPPORTED_WIDTH 1
144918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_OFST 148
144928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_LBN 5
144938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_WIDTH 1
144948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_OFST 148
144958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_LBN 6
144968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_WIDTH 1
144978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_UNSOL_EV_CREDIT_SUPPORTED_OFST 148
144988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_UNSOL_EV_CREDIT_SUPPORTED_LBN 7
144998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V7_OUT_UNSOL_EV_CREDIT_SUPPORTED_WIDTH 1
145008c2ecf20Sopenharmony_ci
145018c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V8_OUT msgresponse */
145028c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V8_OUT_LEN 160
145038c2ecf20Sopenharmony_ci/* First word of flags. */
145048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FLAGS1_OFST 0
145058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FLAGS1_LEN 4
145068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VPORT_RECONFIGURE_OFST 0
145078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VPORT_RECONFIGURE_LBN 3
145088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VPORT_RECONFIGURE_WIDTH 1
145098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_STRIPING_OFST 0
145108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_STRIPING_LBN 4
145118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_STRIPING_WIDTH 1
145128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VADAPTOR_QUERY_OFST 0
145138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VADAPTOR_QUERY_LBN 5
145148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VADAPTOR_QUERY_WIDTH 1
145158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
145168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
145178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
145188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_DRV_ATTACH_PREBOOT_OFST 0
145198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_DRV_ATTACH_PREBOOT_LBN 7
145208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
145218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_FORCE_EVENT_MERGING_OFST 0
145228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_FORCE_EVENT_MERGING_LBN 8
145238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
145248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_SET_MAC_ENHANCED_OFST 0
145258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_SET_MAC_ENHANCED_LBN 9
145268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_SET_MAC_ENHANCED_WIDTH 1
145278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
145288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
145298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
145308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
145318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
145328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
145338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
145348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
145358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
145368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_ADDITIONAL_RSS_MODES_OFST 0
145378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_ADDITIONAL_RSS_MODES_LBN 13
145388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
145398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_QBB_OFST 0
145408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_QBB_LBN 14
145418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_QBB_WIDTH 1
145428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
145438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
145448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
145458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_RSS_LIMITED_OFST 0
145468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_RSS_LIMITED_LBN 16
145478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_RSS_LIMITED_WIDTH 1
145488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PACKED_STREAM_OFST 0
145498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PACKED_STREAM_LBN 17
145508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PACKED_STREAM_WIDTH 1
145518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_INCLUDE_FCS_OFST 0
145528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_INCLUDE_FCS_LBN 18
145538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_INCLUDE_FCS_WIDTH 1
145548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_VLAN_INSERTION_OFST 0
145558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_VLAN_INSERTION_LBN 19
145568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_VLAN_INSERTION_WIDTH 1
145578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_VLAN_STRIPPING_OFST 0
145588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_VLAN_STRIPPING_LBN 20
145598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_VLAN_STRIPPING_WIDTH 1
145608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_OFST 0
145618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_LBN 21
145628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_WIDTH 1
145638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PREFIX_LEN_0_OFST 0
145648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PREFIX_LEN_0_LBN 22
145658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PREFIX_LEN_0_WIDTH 1
145668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PREFIX_LEN_14_OFST 0
145678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PREFIX_LEN_14_LBN 23
145688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_PREFIX_LEN_14_WIDTH 1
145698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_TIMESTAMP_OFST 0
145708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_TIMESTAMP_LBN 24
145718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_TIMESTAMP_WIDTH 1
145728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_BATCHING_OFST 0
145738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_BATCHING_LBN 25
145748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_BATCHING_WIDTH 1
145758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCAST_FILTER_CHAINING_OFST 0
145768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCAST_FILTER_CHAINING_LBN 26
145778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCAST_FILTER_CHAINING_WIDTH 1
145788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_PM_AND_RXDP_COUNTERS_OFST 0
145798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_PM_AND_RXDP_COUNTERS_LBN 27
145808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
145818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DISABLE_SCATTER_OFST 0
145828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DISABLE_SCATTER_LBN 28
145838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DISABLE_SCATTER_WIDTH 1
145848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
145858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
145868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
145878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVB_OFST 0
145888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVB_LBN 30
145898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVB_WIDTH 1
145908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VXLAN_NVGRE_OFST 0
145918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VXLAN_NVGRE_LBN 31
145928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VXLAN_NVGRE_WIDTH 1
145938c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
145948c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DPCPU_FW_ID_OFST 4
145958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DPCPU_FW_ID_LEN 2
145968c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
145978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP 0x0
145988c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
145998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_LOW_LATENCY 0x1
146008c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
146018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_PACKED_STREAM 0x2
146028c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
146038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_RULES_ENGINE 0x5
146048c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
146058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_DPDK 0x6
146068c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
146078c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_BIST 0x10a
146088c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
146098c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
146108c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
146118c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
146128c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
146138c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
146148c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
146158c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
146168c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
146178c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_BACKPRESSURE 0x105
146188c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
146198c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
146208c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
146218c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
146228c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
146238c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
146248c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
146258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
146268c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
146278c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_TEST_FW_SLOW 0x10c
146288c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
146298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TX_DPCPU_FW_ID_OFST 6
146308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TX_DPCPU_FW_ID_LEN 2
146318c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
146328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP 0x0
146338c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
146348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_LOW_LATENCY 0x1
146358c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
146368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_HIGH_PACKET_RATE 0x3
146378c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
146388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_RULES_ENGINE 0x5
146398c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
146408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_DPDK 0x6
146418c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
146428c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_BIST 0x12d
146438c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
146448c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
146458c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
146468c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
146478c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
146488c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXDP_TEST_FW_CSR 0x103
146498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_OFST 8
146508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_LEN 2
146518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_REV_OFST 8
146528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_REV_LBN 0
146538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_REV_WIDTH 12
146548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_TYPE_OFST 8
146558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_TYPE_LBN 12
146568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
146578c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
146588c2ecf20Sopenharmony_ci * of REV field in future)
146598c2ecf20Sopenharmony_ci */
146608c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_RESERVED 0x0
146618c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
146628c2ecf20Sopenharmony_ci * development only)
146638c2ecf20Sopenharmony_ci */
146648c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
146658c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
146668c2ecf20Sopenharmony_ci */
146678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
146688c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
146698c2ecf20Sopenharmony_ci * (Huntington development only)
146708c2ecf20Sopenharmony_ci */
146718c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
146728c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
146738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
146748c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
146758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_VSWITCH 0x3
146768c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
146778c2ecf20Sopenharmony_ci * (Huntington development only)
146788c2ecf20Sopenharmony_ci */
146798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
146808c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
146818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
146828c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
146838c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
146848c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
146858c2ecf20Sopenharmony_ci * tests (Medford development only)
146868c2ecf20Sopenharmony_ci */
146878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
146888c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
146898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
146908c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
146918c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_L3XUDP 0x9
146928c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
146938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_DPDK 0xa
146948c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
146958c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
146968c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
146978c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
146988c2ecf20Sopenharmony_ci */
146998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
147008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_OFST 10
147018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_LEN 2
147028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_REV_OFST 10
147038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_REV_LBN 0
147048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_REV_WIDTH 12
147058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_TYPE_OFST 10
147068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_TYPE_LBN 12
147078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
147088c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
147098c2ecf20Sopenharmony_ci * of REV field in future)
147108c2ecf20Sopenharmony_ci */
147118c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_RESERVED 0x0
147128c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
147138c2ecf20Sopenharmony_ci * development only)
147148c2ecf20Sopenharmony_ci */
147158c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
147168c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
147178c2ecf20Sopenharmony_ci */
147188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
147198c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
147208c2ecf20Sopenharmony_ci * (Huntington development only)
147218c2ecf20Sopenharmony_ci */
147228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
147238c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
147248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
147258c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
147268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_VSWITCH 0x3
147278c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
147288c2ecf20Sopenharmony_ci * (Huntington development only)
147298c2ecf20Sopenharmony_ci */
147308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
147318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
147328c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
147338c2ecf20Sopenharmony_ci * tests (Medford development only)
147348c2ecf20Sopenharmony_ci */
147358c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
147368c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
147378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
147388c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
147398c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_L3XUDP 0x9
147408c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
147418c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_DPDK 0xa
147428c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
147438c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
147448c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
147458c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_HW_CAPABILITIES_OFST 12
147468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_HW_CAPABILITIES_LEN 4
147478c2ecf20Sopenharmony_ci/* Licensed capabilities */
147488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_LICENSE_CAPABILITIES_OFST 16
147498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_LICENSE_CAPABILITIES_LEN 4
147508c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
147518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FLAGS2_OFST 20
147528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FLAGS2_LEN 4
147538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_OFST 20
147548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_LBN 0
147558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_WIDTH 1
147568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_ENCAP_OFST 20
147578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_ENCAP_LBN 1
147588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_ENCAP_WIDTH 1
147598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVQ_TIMER_CTRL_OFST 20
147608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVQ_TIMER_CTRL_LBN 2
147618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVQ_TIMER_CTRL_WIDTH 1
147628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVENT_CUT_THROUGH_OFST 20
147638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVENT_CUT_THROUGH_LBN 3
147648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EVENT_CUT_THROUGH_WIDTH 1
147658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_CUT_THROUGH_OFST 20
147668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_CUT_THROUGH_LBN 4
147678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_CUT_THROUGH_WIDTH 1
147688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_VFIFO_ULL_MODE_OFST 20
147698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_VFIFO_ULL_MODE_LBN 5
147708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
147718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
147728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
147738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
147748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
147758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
147768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
147778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_EVQ_V2_OFST 20
147788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_EVQ_V2_LBN 7
147798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_EVQ_V2_WIDTH 1
147808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MAC_TIMESTAMPING_OFST 20
147818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MAC_TIMESTAMPING_LBN 8
147828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
147838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TIMESTAMP_OFST 20
147848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TIMESTAMP_LBN 9
147858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TIMESTAMP_WIDTH 1
147868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_SNIFF_OFST 20
147878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_SNIFF_LBN 10
147888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_SNIFF_WIDTH 1
147898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_SNIFF_OFST 20
147908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_SNIFF_LBN 11
147918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_SNIFF_WIDTH 1
147928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
147938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
147948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
147958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCDI_BACKGROUND_OFST 20
147968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCDI_BACKGROUND_LBN 13
147978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCDI_BACKGROUND_WIDTH 1
147988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCDI_DB_RETURN_OFST 20
147998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCDI_DB_RETURN_LBN 14
148008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MCDI_DB_RETURN_WIDTH 1
148018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_CTPIO_OFST 20
148028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_CTPIO_LBN 15
148038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_CTPIO_WIDTH 1
148048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TSA_SUPPORT_OFST 20
148058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TSA_SUPPORT_LBN 16
148068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TSA_SUPPORT_WIDTH 1
148078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TSA_BOUND_OFST 20
148088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TSA_BOUND_LBN 17
148098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TSA_BOUND_WIDTH 1
148108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
148118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
148128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
148138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_FLAG_OFST 20
148148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_FLAG_LBN 19
148158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_FLAG_WIDTH 1
148168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_MARK_OFST 20
148178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_MARK_LBN 20
148188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_MARK_WIDTH 1
148198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
148208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
148218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
148228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
148238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
148248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
148258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_L3XUDP_SUPPORT_OFST 20
148268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_L3XUDP_SUPPORT_LBN 22
148278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_L3XUDP_SUPPORT_WIDTH 1
148288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
148298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
148308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
148318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VI_SPREADING_OFST 20
148328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VI_SPREADING_LBN 24
148338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VI_SPREADING_WIDTH 1
148348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_HLB_IDLE_OFST 20
148358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_HLB_IDLE_LBN 25
148368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RXDP_HLB_IDLE_WIDTH 1
148378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
148388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
148398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
148408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
148418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
148428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
148438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_BUNDLE_UPDATE_OFST 20
148448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_BUNDLE_UPDATE_LBN 28
148458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_BUNDLE_UPDATE_WIDTH 1
148468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V3_OFST 20
148478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V3_LBN 29
148488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V3_WIDTH 1
148498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_DYNAMIC_SENSORS_OFST 20
148508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_DYNAMIC_SENSORS_LBN 30
148518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_DYNAMIC_SENSORS_WIDTH 1
148528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
148538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
148548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
148558c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
148568c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
148578c2ecf20Sopenharmony_ci */
148588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
148598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
148608c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
148618c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
148628c2ecf20Sopenharmony_ci * present or not assigned.
148638c2ecf20Sopenharmony_ci */
148648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
148658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
148668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
148678c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
148688c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_ACCESS_NOT_PERMITTED 0xff
148698c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
148708c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_PF_NOT_PRESENT 0xfe
148718c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
148728c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_PF_NOT_ASSIGNED 0xfd
148738c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
148748c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
148758c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
148768c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
148778c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
148788c2ecf20Sopenharmony_ci */
148798c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
148808c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
148818c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
148828c2ecf20Sopenharmony_ci */
148838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_VFS_PER_PF_OFST 42
148848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_VFS_PER_PF_LEN 1
148858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_VFS_PER_PF_NUM 16
148868c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
148878c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V8_OUT_ACCESS_NOT_PERMITTED 0xff */
148888c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
148898c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V8_OUT_PF_NOT_PRESENT 0xfe */
148908c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
148918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_VIS_PER_PORT_OFST 58
148928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_VIS_PER_PORT_LEN 2
148938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_VIS_PER_PORT_NUM 4
148948c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
148958c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
148968c2ecf20Sopenharmony_ci */
148978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DESC_CACHE_SIZE_OFST 66
148988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_RX_DESC_CACHE_SIZE_LEN 1
148998c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
149008c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
149018c2ecf20Sopenharmony_ci */
149028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TX_DESC_CACHE_SIZE_OFST 67
149038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TX_DESC_CACHE_SIZE_LEN 1
149048c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
149058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_PIO_BUFFS_OFST 68
149068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_NUM_PIO_BUFFS_LEN 2
149078c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
149088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_SIZE_PIO_BUFF_OFST 70
149098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_SIZE_PIO_BUFF_LEN 2
149108c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
149118c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
149128c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
149138c2ecf20Sopenharmony_ci * with 8k VI windows.
149148c2ecf20Sopenharmony_ci */
149158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_VI_WINDOW_MODE_OFST 72
149168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_VI_WINDOW_MODE_LEN 1
149178c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
149188c2ecf20Sopenharmony_ci * CTPIO is not mapped.
149198c2ecf20Sopenharmony_ci */
149208c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_VI_WINDOW_MODE_8K 0x0
149218c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
149228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_VI_WINDOW_MODE_16K 0x1
149238c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
149248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V8_OUT_VI_WINDOW_MODE_64K 0x2
149258c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
149268c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
149278c2ecf20Sopenharmony_ci */
149288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
149298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
149308c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
149318c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
149328c2ecf20Sopenharmony_ci */
149338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
149348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
149358c2ecf20Sopenharmony_ci/* Entry count in the MAC stats array, including the final GENERATION_END
149368c2ecf20Sopenharmony_ci * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
149378c2ecf20Sopenharmony_ci * hold at least this many 64-bit stats values, if they wish to receive all
149388c2ecf20Sopenharmony_ci * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
149398c2ecf20Sopenharmony_ci * stats array returned will be truncated.
149408c2ecf20Sopenharmony_ci */
149418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_MAC_STATS_NUM_STATS_OFST 76
149428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_MAC_STATS_NUM_STATS_LEN 2
149438c2ecf20Sopenharmony_ci/* Maximum supported value for MC_CMD_FILTER_OP_V3/MATCH_MARK_VALUE. This field
149448c2ecf20Sopenharmony_ci * will only be non-zero if MC_CMD_GET_CAPABILITIES/FILTER_ACTION_MARK is set.
149458c2ecf20Sopenharmony_ci */
149468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_MARK_MAX_OFST 80
149478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FILTER_ACTION_MARK_MAX_LEN 4
149488c2ecf20Sopenharmony_ci/* On devices where the INIT_RXQ_WITH_BUFFER_SIZE flag (in
149498c2ecf20Sopenharmony_ci * GET_CAPABILITIES_OUT_V2) is set, drivers have to specify a buffer size when
149508c2ecf20Sopenharmony_ci * they create an RX queue. Due to hardware limitations, only a small number of
149518c2ecf20Sopenharmony_ci * different buffer sizes may be available concurrently. Nonzero entries in
149528c2ecf20Sopenharmony_ci * this array are the sizes of buffers which the system guarantees will be
149538c2ecf20Sopenharmony_ci * available for use. If the list is empty, there are no limitations on
149548c2ecf20Sopenharmony_ci * concurrent buffer sizes.
149558c2ecf20Sopenharmony_ci */
149568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_GUARANTEED_RX_BUFFER_SIZES_OFST 84
149578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_GUARANTEED_RX_BUFFER_SIZES_LEN 4
149588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_GUARANTEED_RX_BUFFER_SIZES_NUM 16
149598c2ecf20Sopenharmony_ci/* Third word of flags. Not present on older firmware (check the length). */
149608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FLAGS3_OFST 148
149618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_FLAGS3_LEN 4
149628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_WOL_ETHERWAKE_OFST 148
149638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_WOL_ETHERWAKE_LBN 0
149648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_WOL_ETHERWAKE_WIDTH 1
149658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RSS_EVEN_SPREADING_OFST 148
149668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RSS_EVEN_SPREADING_LBN 1
149678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RSS_EVEN_SPREADING_WIDTH 1
149688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RSS_SELECTABLE_TABLE_SIZE_OFST 148
149698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RSS_SELECTABLE_TABLE_SIZE_LBN 2
149708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RSS_SELECTABLE_TABLE_SIZE_WIDTH 1
149718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MAE_SUPPORTED_OFST 148
149728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MAE_SUPPORTED_LBN 3
149738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_MAE_SUPPORTED_WIDTH 1
149748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VDPA_SUPPORTED_OFST 148
149758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VDPA_SUPPORTED_LBN 4
149768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_VDPA_SUPPORTED_WIDTH 1
149778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_OFST 148
149788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_LBN 5
149798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_WIDTH 1
149808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_OFST 148
149818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_LBN 6
149828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_WIDTH 1
149838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_UNSOL_EV_CREDIT_SUPPORTED_OFST 148
149848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_UNSOL_EV_CREDIT_SUPPORTED_LBN 7
149858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V8_OUT_UNSOL_EV_CREDIT_SUPPORTED_WIDTH 1
149868c2ecf20Sopenharmony_ci/* These bits are reserved for communicating test-specific capabilities to
149878c2ecf20Sopenharmony_ci * host-side test software. All production drivers should treat this field as
149888c2ecf20Sopenharmony_ci * opaque.
149898c2ecf20Sopenharmony_ci */
149908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TEST_RESERVED_OFST 152
149918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TEST_RESERVED_LEN 8
149928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TEST_RESERVED_LO_OFST 152
149938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V8_OUT_TEST_RESERVED_HI_OFST 156
149948c2ecf20Sopenharmony_ci
149958c2ecf20Sopenharmony_ci/* MC_CMD_GET_CAPABILITIES_V9_OUT msgresponse */
149968c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CAPABILITIES_V9_OUT_LEN 184
149978c2ecf20Sopenharmony_ci/* First word of flags. */
149988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FLAGS1_OFST 0
149998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FLAGS1_LEN 4
150008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VPORT_RECONFIGURE_OFST 0
150018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VPORT_RECONFIGURE_LBN 3
150028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VPORT_RECONFIGURE_WIDTH 1
150038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_STRIPING_OFST 0
150048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_STRIPING_LBN 4
150058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_STRIPING_WIDTH 1
150068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VADAPTOR_QUERY_OFST 0
150078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VADAPTOR_QUERY_LBN 5
150088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VADAPTOR_QUERY_WIDTH 1
150098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVB_PORT_VLAN_RESTRICT_OFST 0
150108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVB_PORT_VLAN_RESTRICT_LBN 6
150118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVB_PORT_VLAN_RESTRICT_WIDTH 1
150128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_DRV_ATTACH_PREBOOT_OFST 0
150138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_DRV_ATTACH_PREBOOT_LBN 7
150148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_DRV_ATTACH_PREBOOT_WIDTH 1
150158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_FORCE_EVENT_MERGING_OFST 0
150168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_FORCE_EVENT_MERGING_LBN 8
150178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1
150188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_SET_MAC_ENHANCED_OFST 0
150198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_SET_MAC_ENHANCED_LBN 9
150208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_SET_MAC_ENHANCED_WIDTH 1
150218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_OFST 0
150228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10
150238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1
150248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 0
150258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11
150268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
150278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MAC_SECURITY_FILTERING_OFST 0
150288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MAC_SECURITY_FILTERING_LBN 12
150298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1
150308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_ADDITIONAL_RSS_MODES_OFST 0
150318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_ADDITIONAL_RSS_MODES_LBN 13
150328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_ADDITIONAL_RSS_MODES_WIDTH 1
150338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_QBB_OFST 0
150348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_QBB_LBN 14
150358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_QBB_WIDTH 1
150368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PACKED_STREAM_VAR_BUFFERS_OFST 0
150378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PACKED_STREAM_VAR_BUFFERS_LBN 15
150388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PACKED_STREAM_VAR_BUFFERS_WIDTH 1
150398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_RSS_LIMITED_OFST 0
150408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_RSS_LIMITED_LBN 16
150418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_RSS_LIMITED_WIDTH 1
150428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PACKED_STREAM_OFST 0
150438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PACKED_STREAM_LBN 17
150448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PACKED_STREAM_WIDTH 1
150458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_INCLUDE_FCS_OFST 0
150468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_INCLUDE_FCS_LBN 18
150478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_INCLUDE_FCS_WIDTH 1
150488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_VLAN_INSERTION_OFST 0
150498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_VLAN_INSERTION_LBN 19
150508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_VLAN_INSERTION_WIDTH 1
150518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_VLAN_STRIPPING_OFST 0
150528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_VLAN_STRIPPING_LBN 20
150538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_VLAN_STRIPPING_WIDTH 1
150548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_OFST 0
150558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_LBN 21
150568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_WIDTH 1
150578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PREFIX_LEN_0_OFST 0
150588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PREFIX_LEN_0_LBN 22
150598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PREFIX_LEN_0_WIDTH 1
150608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PREFIX_LEN_14_OFST 0
150618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PREFIX_LEN_14_LBN 23
150628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_PREFIX_LEN_14_WIDTH 1
150638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_TIMESTAMP_OFST 0
150648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_TIMESTAMP_LBN 24
150658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_TIMESTAMP_WIDTH 1
150668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_BATCHING_OFST 0
150678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_BATCHING_LBN 25
150688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_BATCHING_WIDTH 1
150698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCAST_FILTER_CHAINING_OFST 0
150708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCAST_FILTER_CHAINING_LBN 26
150718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCAST_FILTER_CHAINING_WIDTH 1
150728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_PM_AND_RXDP_COUNTERS_OFST 0
150738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_PM_AND_RXDP_COUNTERS_LBN 27
150748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_PM_AND_RXDP_COUNTERS_WIDTH 1
150758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DISABLE_SCATTER_OFST 0
150768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DISABLE_SCATTER_LBN 28
150778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DISABLE_SCATTER_WIDTH 1
150788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MCAST_UDP_LOOPBACK_OFST 0
150798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MCAST_UDP_LOOPBACK_LBN 29
150808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MCAST_UDP_LOOPBACK_WIDTH 1
150818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVB_OFST 0
150828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVB_LBN 30
150838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVB_WIDTH 1
150848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VXLAN_NVGRE_OFST 0
150858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VXLAN_NVGRE_LBN 31
150868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VXLAN_NVGRE_WIDTH 1
150878c2ecf20Sopenharmony_ci/* RxDPCPU firmware id. */
150888c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DPCPU_FW_ID_OFST 4
150898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DPCPU_FW_ID_LEN 2
150908c2ecf20Sopenharmony_ci/* enum: Standard RXDP firmware */
150918c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP 0x0
150928c2ecf20Sopenharmony_ci/* enum: Low latency RXDP firmware */
150938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_LOW_LATENCY 0x1
150948c2ecf20Sopenharmony_ci/* enum: Packed stream RXDP firmware */
150958c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_PACKED_STREAM 0x2
150968c2ecf20Sopenharmony_ci/* enum: Rules engine RXDP firmware */
150978c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_RULES_ENGINE 0x5
150988c2ecf20Sopenharmony_ci/* enum: DPDK RXDP firmware */
150998c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_DPDK 0x6
151008c2ecf20Sopenharmony_ci/* enum: BIST RXDP firmware */
151018c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_BIST 0x10a
151028c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 1 */
151038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_TO_MC_CUT_THROUGH 0x101
151048c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 2 */
151058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD 0x102
151068c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 3 */
151078c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_TO_MC_STORE_FORWARD_FIRST 0x103
151088c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 4 */
151098c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_EVERY_EVENT_BATCHABLE 0x104
151108c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 5 */
151118c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_BACKPRESSURE 0x105
151128c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 6 */
151138c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_PACKET_EDITS 0x106
151148c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 7 */
151158c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107
151168c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 8 */
151178c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_DISABLE_DL 0x108
151188c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 9 */
151198c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b
151208c2ecf20Sopenharmony_ci/* enum: RXDP Test firmware image 10 */
151218c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_TEST_FW_SLOW 0x10c
151228c2ecf20Sopenharmony_ci/* TxDPCPU firmware id. */
151238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TX_DPCPU_FW_ID_OFST 6
151248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TX_DPCPU_FW_ID_LEN 2
151258c2ecf20Sopenharmony_ci/* enum: Standard TXDP firmware */
151268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP 0x0
151278c2ecf20Sopenharmony_ci/* enum: Low latency TXDP firmware */
151288c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_LOW_LATENCY 0x1
151298c2ecf20Sopenharmony_ci/* enum: High packet rate TXDP firmware */
151308c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_HIGH_PACKET_RATE 0x3
151318c2ecf20Sopenharmony_ci/* enum: Rules engine TXDP firmware */
151328c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_RULES_ENGINE 0x5
151338c2ecf20Sopenharmony_ci/* enum: DPDK TXDP firmware */
151348c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_DPDK 0x6
151358c2ecf20Sopenharmony_ci/* enum: BIST TXDP firmware */
151368c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_BIST 0x12d
151378c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 1 */
151388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_TEST_FW_TSO_EDIT 0x101
151398c2ecf20Sopenharmony_ci/* enum: TXDP Test firmware image 2 */
151408c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_TEST_FW_PACKET_EDITS 0x102
151418c2ecf20Sopenharmony_ci/* enum: TXDP CSR bus test firmware */
151428c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXDP_TEST_FW_CSR 0x103
151438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_OFST 8
151448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_LEN 2
151458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_REV_OFST 8
151468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_REV_LBN 0
151478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_REV_WIDTH 12
151488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_TYPE_OFST 8
151498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_TYPE_LBN 12
151508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_VERSION_TYPE_WIDTH 4
151518c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
151528c2ecf20Sopenharmony_ci * of REV field in future)
151538c2ecf20Sopenharmony_ci */
151548c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_RESERVED 0x0
151558c2ecf20Sopenharmony_ci/* enum: Trivial RX PD firmware for early Huntington development (Huntington
151568c2ecf20Sopenharmony_ci * development only)
151578c2ecf20Sopenharmony_ci */
151588c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_FIRST_PKT 0x1
151598c2ecf20Sopenharmony_ci/* enum: RX PD firmware for telemetry prototyping (Medford2 development only)
151608c2ecf20Sopenharmony_ci */
151618c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
151628c2ecf20Sopenharmony_ci/* enum: RX PD firmware with approximately Siena-compatible behaviour
151638c2ecf20Sopenharmony_ci * (Huntington development only)
151648c2ecf20Sopenharmony_ci */
151658c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_SIENA_COMPAT 0x2
151668c2ecf20Sopenharmony_ci/* enum: Full featured RX PD production firmware */
151678c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_FULL_FEATURED 0x3
151688c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
151698c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_VSWITCH 0x3
151708c2ecf20Sopenharmony_ci/* enum: siena_compat variant RX PD firmware using PM rather than MAC
151718c2ecf20Sopenharmony_ci * (Huntington development only)
151728c2ecf20Sopenharmony_ci */
151738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
151748c2ecf20Sopenharmony_ci/* enum: Low latency RX PD production firmware */
151758c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_LOW_LATENCY 0x5
151768c2ecf20Sopenharmony_ci/* enum: Packed stream RX PD production firmware */
151778c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_PACKED_STREAM 0x6
151788c2ecf20Sopenharmony_ci/* enum: RX PD firmware handling layer 2 only for high packet rate performance
151798c2ecf20Sopenharmony_ci * tests (Medford development only)
151808c2ecf20Sopenharmony_ci */
151818c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_LAYER2_PERF 0x7
151828c2ecf20Sopenharmony_ci/* enum: Rules engine RX PD production firmware */
151838c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_RULES_ENGINE 0x8
151848c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
151858c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_L3XUDP 0x9
151868c2ecf20Sopenharmony_ci/* enum: DPDK RX PD production firmware */
151878c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_DPDK 0xa
151888c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
151898c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
151908c2ecf20Sopenharmony_ci/* enum: RX PD firmware parsing but not filtering network overlay tunnel
151918c2ecf20Sopenharmony_ci * encapsulations (Medford development only)
151928c2ecf20Sopenharmony_ci */
151938c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_RXPD_FW_TYPE_TESTFW_ENCAP_PARSING_ONLY 0xf
151948c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_OFST 10
151958c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_LEN 2
151968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_REV_OFST 10
151978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_REV_LBN 0
151988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_REV_WIDTH 12
151998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_TYPE_OFST 10
152008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_TYPE_LBN 12
152018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_VERSION_TYPE_WIDTH 4
152028c2ecf20Sopenharmony_ci/* enum: reserved value - do not use (may indicate alternative interpretation
152038c2ecf20Sopenharmony_ci * of REV field in future)
152048c2ecf20Sopenharmony_ci */
152058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_RESERVED 0x0
152068c2ecf20Sopenharmony_ci/* enum: Trivial TX PD firmware for early Huntington development (Huntington
152078c2ecf20Sopenharmony_ci * development only)
152088c2ecf20Sopenharmony_ci */
152098c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_FIRST_PKT 0x1
152108c2ecf20Sopenharmony_ci/* enum: TX PD firmware for telemetry prototyping (Medford2 development only)
152118c2ecf20Sopenharmony_ci */
152128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_TESTFW_TELEMETRY 0x1
152138c2ecf20Sopenharmony_ci/* enum: TX PD firmware with approximately Siena-compatible behaviour
152148c2ecf20Sopenharmony_ci * (Huntington development only)
152158c2ecf20Sopenharmony_ci */
152168c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_SIENA_COMPAT 0x2
152178c2ecf20Sopenharmony_ci/* enum: Full featured TX PD production firmware */
152188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_FULL_FEATURED 0x3
152198c2ecf20Sopenharmony_ci/* enum: (deprecated original name for the FULL_FEATURED variant) */
152208c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_VSWITCH 0x3
152218c2ecf20Sopenharmony_ci/* enum: siena_compat variant TX PD firmware using PM rather than MAC
152228c2ecf20Sopenharmony_ci * (Huntington development only)
152238c2ecf20Sopenharmony_ci */
152248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_SIENA_COMPAT_PM 0x4
152258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_LOW_LATENCY 0x5 /* enum */
152268c2ecf20Sopenharmony_ci/* enum: TX PD firmware handling layer 2 only for high packet rate performance
152278c2ecf20Sopenharmony_ci * tests (Medford development only)
152288c2ecf20Sopenharmony_ci */
152298c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_LAYER2_PERF 0x7
152308c2ecf20Sopenharmony_ci/* enum: Rules engine TX PD production firmware */
152318c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_RULES_ENGINE 0x8
152328c2ecf20Sopenharmony_ci/* enum: Custom firmware variant (see SF-119495-PD and bug69716) */
152338c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_L3XUDP 0x9
152348c2ecf20Sopenharmony_ci/* enum: DPDK TX PD production firmware */
152358c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_DPDK 0xa
152368c2ecf20Sopenharmony_ci/* enum: RX PD firmware for GUE parsing prototype (Medford development only) */
152378c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_TXPD_FW_TYPE_TESTFW_GUE_PROTOTYPE 0xe
152388c2ecf20Sopenharmony_ci/* Hardware capabilities of NIC */
152398c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_HW_CAPABILITIES_OFST 12
152408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_HW_CAPABILITIES_LEN 4
152418c2ecf20Sopenharmony_ci/* Licensed capabilities */
152428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_LICENSE_CAPABILITIES_OFST 16
152438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_LICENSE_CAPABILITIES_LEN 4
152448c2ecf20Sopenharmony_ci/* Second word of flags. Not present on older firmware (check the length). */
152458c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FLAGS2_OFST 20
152468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FLAGS2_LEN 4
152478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_OFST 20
152488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_LBN 0
152498c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_WIDTH 1
152508c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_ENCAP_OFST 20
152518c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_ENCAP_LBN 1
152528c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_ENCAP_WIDTH 1
152538c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVQ_TIMER_CTRL_OFST 20
152548c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVQ_TIMER_CTRL_LBN 2
152558c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVQ_TIMER_CTRL_WIDTH 1
152568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVENT_CUT_THROUGH_OFST 20
152578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVENT_CUT_THROUGH_LBN 3
152588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EVENT_CUT_THROUGH_WIDTH 1
152598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_CUT_THROUGH_OFST 20
152608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_CUT_THROUGH_LBN 4
152618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_CUT_THROUGH_WIDTH 1
152628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_VFIFO_ULL_MODE_OFST 20
152638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_VFIFO_ULL_MODE_LBN 5
152648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_VFIFO_ULL_MODE_WIDTH 1
152658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MAC_STATS_40G_TX_SIZE_BINS_OFST 20
152668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MAC_STATS_40G_TX_SIZE_BINS_LBN 6
152678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MAC_STATS_40G_TX_SIZE_BINS_WIDTH 1
152688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_EVQ_TYPE_SUPPORTED_OFST 20
152698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_EVQ_TYPE_SUPPORTED_LBN 7
152708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_EVQ_TYPE_SUPPORTED_WIDTH 1
152718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_EVQ_V2_OFST 20
152728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_EVQ_V2_LBN 7
152738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_EVQ_V2_WIDTH 1
152748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MAC_TIMESTAMPING_OFST 20
152758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MAC_TIMESTAMPING_LBN 8
152768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_MAC_TIMESTAMPING_WIDTH 1
152778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TIMESTAMP_OFST 20
152788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TIMESTAMP_LBN 9
152798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TIMESTAMP_WIDTH 1
152808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_SNIFF_OFST 20
152818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_SNIFF_LBN 10
152828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_SNIFF_WIDTH 1
152838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_SNIFF_OFST 20
152848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_SNIFF_LBN 11
152858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_SNIFF_WIDTH 1
152868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_OFST 20
152878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_LBN 12
152888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_NVRAM_UPDATE_REPORT_VERIFY_RESULT_WIDTH 1
152898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCDI_BACKGROUND_OFST 20
152908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCDI_BACKGROUND_LBN 13
152918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCDI_BACKGROUND_WIDTH 1
152928c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCDI_DB_RETURN_OFST 20
152938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCDI_DB_RETURN_LBN 14
152948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MCDI_DB_RETURN_WIDTH 1
152958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_CTPIO_OFST 20
152968c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_CTPIO_LBN 15
152978c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_CTPIO_WIDTH 1
152988c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TSA_SUPPORT_OFST 20
152998c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TSA_SUPPORT_LBN 16
153008c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TSA_SUPPORT_WIDTH 1
153018c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TSA_BOUND_OFST 20
153028c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TSA_BOUND_LBN 17
153038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TSA_BOUND_WIDTH 1
153048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_SF_ADAPTER_AUTHENTICATION_OFST 20
153058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_SF_ADAPTER_AUTHENTICATION_LBN 18
153068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_SF_ADAPTER_AUTHENTICATION_WIDTH 1
153078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_FLAG_OFST 20
153088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_FLAG_LBN 19
153098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_FLAG_WIDTH 1
153108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_MARK_OFST 20
153118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_MARK_LBN 20
153128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_MARK_WIDTH 1
153138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EQUAL_STRIDE_SUPER_BUFFER_OFST 20
153148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EQUAL_STRIDE_SUPER_BUFFER_LBN 21
153158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EQUAL_STRIDE_SUPER_BUFFER_WIDTH 1
153168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EQUAL_STRIDE_PACKED_STREAM_OFST 20
153178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EQUAL_STRIDE_PACKED_STREAM_LBN 21
153188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EQUAL_STRIDE_PACKED_STREAM_WIDTH 1
153198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_L3XUDP_SUPPORT_OFST 20
153208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_L3XUDP_SUPPORT_LBN 22
153218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_L3XUDP_SUPPORT_WIDTH 1
153228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FW_SUBVARIANT_NO_TX_CSUM_OFST 20
153238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FW_SUBVARIANT_NO_TX_CSUM_LBN 23
153248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_FW_SUBVARIANT_NO_TX_CSUM_WIDTH 1
153258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VI_SPREADING_OFST 20
153268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VI_SPREADING_LBN 24
153278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VI_SPREADING_WIDTH 1
153288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_HLB_IDLE_OFST 20
153298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_HLB_IDLE_LBN 25
153308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RXDP_HLB_IDLE_WIDTH 1
153318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_RXQ_NO_CONT_EV_OFST 20
153328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_RXQ_NO_CONT_EV_LBN 26
153338c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_RXQ_NO_CONT_EV_WIDTH 1
153348c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_RXQ_WITH_BUFFER_SIZE_OFST 20
153358c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_RXQ_WITH_BUFFER_SIZE_LBN 27
153368c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_INIT_RXQ_WITH_BUFFER_SIZE_WIDTH 1
153378c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_BUNDLE_UPDATE_OFST 20
153388c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_BUNDLE_UPDATE_LBN 28
153398c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_BUNDLE_UPDATE_WIDTH 1
153408c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V3_OFST 20
153418c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V3_LBN 29
153428c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V3_WIDTH 1
153438c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_DYNAMIC_SENSORS_OFST 20
153448c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_DYNAMIC_SENSORS_LBN 30
153458c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_DYNAMIC_SENSORS_WIDTH 1
153468c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_OFST 20
153478c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_LBN 31
153488c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_NVRAM_UPDATE_POLL_VERIFY_RESULT_WIDTH 1
153498c2ecf20Sopenharmony_ci/* Number of FATSOv2 contexts per datapath supported by this NIC (when
153508c2ecf20Sopenharmony_ci * TX_TSO_V2 == 1). Not present on older firmware (check the length).
153518c2ecf20Sopenharmony_ci */
153528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_N_CONTEXTS_OFST 24
153538c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TX_TSO_V2_N_CONTEXTS_LEN 2
153548c2ecf20Sopenharmony_ci/* One byte per PF containing the number of the external port assigned to this
153558c2ecf20Sopenharmony_ci * PF, indexed by PF number. Special values indicate that a PF is either not
153568c2ecf20Sopenharmony_ci * present or not assigned.
153578c2ecf20Sopenharmony_ci */
153588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_PFS_TO_PORTS_ASSIGNMENT_OFST 26
153598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_PFS_TO_PORTS_ASSIGNMENT_LEN 1
153608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_PFS_TO_PORTS_ASSIGNMENT_NUM 16
153618c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
153628c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_ACCESS_NOT_PERMITTED 0xff
153638c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
153648c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_PF_NOT_PRESENT 0xfe
153658c2ecf20Sopenharmony_ci/* enum: PF does exist but is not assigned to any external port. */
153668c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_PF_NOT_ASSIGNED 0xfd
153678c2ecf20Sopenharmony_ci/* enum: This value indicates that PF is assigned, but it cannot be expressed
153688c2ecf20Sopenharmony_ci * in this field. It is intended for a possible future situation where a more
153698c2ecf20Sopenharmony_ci * complex scheme of PFs to ports mapping is being used. The future driver
153708c2ecf20Sopenharmony_ci * should look for a new field supporting the new scheme. The current/old
153718c2ecf20Sopenharmony_ci * driver should treat this value as PF_NOT_ASSIGNED.
153728c2ecf20Sopenharmony_ci */
153738c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_INCOMPATIBLE_ASSIGNMENT 0xfc
153748c2ecf20Sopenharmony_ci/* One byte per PF containing the number of its VFs, indexed by PF number. A
153758c2ecf20Sopenharmony_ci * special value indicates that a PF is not present.
153768c2ecf20Sopenharmony_ci */
153778c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_VFS_PER_PF_OFST 42
153788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_VFS_PER_PF_LEN 1
153798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_VFS_PER_PF_NUM 16
153808c2ecf20Sopenharmony_ci/* enum: The caller is not permitted to access information on this PF. */
153818c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V9_OUT_ACCESS_NOT_PERMITTED 0xff */
153828c2ecf20Sopenharmony_ci/* enum: PF does not exist. */
153838c2ecf20Sopenharmony_ci/*               MC_CMD_GET_CAPABILITIES_V9_OUT_PF_NOT_PRESENT 0xfe */
153848c2ecf20Sopenharmony_ci/* Number of VIs available for each external port */
153858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_VIS_PER_PORT_OFST 58
153868c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_VIS_PER_PORT_LEN 2
153878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_VIS_PER_PORT_NUM 4
153888c2ecf20Sopenharmony_ci/* Size of RX descriptor cache expressed as binary logarithm The actual size
153898c2ecf20Sopenharmony_ci * equals (2 ^ RX_DESC_CACHE_SIZE)
153908c2ecf20Sopenharmony_ci */
153918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DESC_CACHE_SIZE_OFST 66
153928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RX_DESC_CACHE_SIZE_LEN 1
153938c2ecf20Sopenharmony_ci/* Size of TX descriptor cache expressed as binary logarithm The actual size
153948c2ecf20Sopenharmony_ci * equals (2 ^ TX_DESC_CACHE_SIZE)
153958c2ecf20Sopenharmony_ci */
153968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TX_DESC_CACHE_SIZE_OFST 67
153978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TX_DESC_CACHE_SIZE_LEN 1
153988c2ecf20Sopenharmony_ci/* Total number of available PIO buffers */
153998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_PIO_BUFFS_OFST 68
154008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_NUM_PIO_BUFFS_LEN 2
154018c2ecf20Sopenharmony_ci/* Size of a single PIO buffer */
154028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_SIZE_PIO_BUFF_OFST 70
154038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_SIZE_PIO_BUFF_LEN 2
154048c2ecf20Sopenharmony_ci/* On chips later than Medford the amount of address space assigned to each VI
154058c2ecf20Sopenharmony_ci * is configurable. This is a global setting that the driver must query to
154068c2ecf20Sopenharmony_ci * discover the VI to address mapping. Cut-through PIO (CTPIO) is not available
154078c2ecf20Sopenharmony_ci * with 8k VI windows.
154088c2ecf20Sopenharmony_ci */
154098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_VI_WINDOW_MODE_OFST 72
154108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_VI_WINDOW_MODE_LEN 1
154118c2ecf20Sopenharmony_ci/* enum: Each VI occupies 8k as on Huntington and Medford. PIO is at offset 4k.
154128c2ecf20Sopenharmony_ci * CTPIO is not mapped.
154138c2ecf20Sopenharmony_ci */
154148c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_VI_WINDOW_MODE_8K 0x0
154158c2ecf20Sopenharmony_ci/* enum: Each VI occupies 16k. PIO is at offset 4k. CTPIO is at offset 12k. */
154168c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_VI_WINDOW_MODE_16K 0x1
154178c2ecf20Sopenharmony_ci/* enum: Each VI occupies 64k. PIO is at offset 4k. CTPIO is at offset 12k. */
154188c2ecf20Sopenharmony_ci#define          MC_CMD_GET_CAPABILITIES_V9_OUT_VI_WINDOW_MODE_64K 0x2
154198c2ecf20Sopenharmony_ci/* Number of vFIFOs per adapter that can be used for VFIFO Stuffing
154208c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
154218c2ecf20Sopenharmony_ci */
154228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_VFIFO_STUFFING_NUM_VFIFOS_OFST 73
154238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_VFIFO_STUFFING_NUM_VFIFOS_LEN 1
154248c2ecf20Sopenharmony_ci/* Number of buffers per adapter that can be used for VFIFO Stuffing
154258c2ecf20Sopenharmony_ci * (SF-115995-SW) in the present configuration of firmware and port mode.
154268c2ecf20Sopenharmony_ci */
154278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_OFST 74
154288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_VFIFO_STUFFING_NUM_CP_BUFFERS_LEN 2
154298c2ecf20Sopenharmony_ci/* Entry count in the MAC stats array, including the final GENERATION_END
154308c2ecf20Sopenharmony_ci * entry. For MAC stats DMA, drivers should allocate a buffer large enough to
154318c2ecf20Sopenharmony_ci * hold at least this many 64-bit stats values, if they wish to receive all
154328c2ecf20Sopenharmony_ci * available stats. If the buffer is shorter than MAC_STATS_NUM_STATS * 8, the
154338c2ecf20Sopenharmony_ci * stats array returned will be truncated.
154348c2ecf20Sopenharmony_ci */
154358c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_MAC_STATS_NUM_STATS_OFST 76
154368c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_MAC_STATS_NUM_STATS_LEN 2
154378c2ecf20Sopenharmony_ci/* Maximum supported value for MC_CMD_FILTER_OP_V3/MATCH_MARK_VALUE. This field
154388c2ecf20Sopenharmony_ci * will only be non-zero if MC_CMD_GET_CAPABILITIES/FILTER_ACTION_MARK is set.
154398c2ecf20Sopenharmony_ci */
154408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_MARK_MAX_OFST 80
154418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FILTER_ACTION_MARK_MAX_LEN 4
154428c2ecf20Sopenharmony_ci/* On devices where the INIT_RXQ_WITH_BUFFER_SIZE flag (in
154438c2ecf20Sopenharmony_ci * GET_CAPABILITIES_OUT_V2) is set, drivers have to specify a buffer size when
154448c2ecf20Sopenharmony_ci * they create an RX queue. Due to hardware limitations, only a small number of
154458c2ecf20Sopenharmony_ci * different buffer sizes may be available concurrently. Nonzero entries in
154468c2ecf20Sopenharmony_ci * this array are the sizes of buffers which the system guarantees will be
154478c2ecf20Sopenharmony_ci * available for use. If the list is empty, there are no limitations on
154488c2ecf20Sopenharmony_ci * concurrent buffer sizes.
154498c2ecf20Sopenharmony_ci */
154508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_GUARANTEED_RX_BUFFER_SIZES_OFST 84
154518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_GUARANTEED_RX_BUFFER_SIZES_LEN 4
154528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_GUARANTEED_RX_BUFFER_SIZES_NUM 16
154538c2ecf20Sopenharmony_ci/* Third word of flags. Not present on older firmware (check the length). */
154548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FLAGS3_OFST 148
154558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_FLAGS3_LEN 4
154568c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_WOL_ETHERWAKE_OFST 148
154578c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_WOL_ETHERWAKE_LBN 0
154588c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_WOL_ETHERWAKE_WIDTH 1
154598c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_EVEN_SPREADING_OFST 148
154608c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_EVEN_SPREADING_LBN 1
154618c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_EVEN_SPREADING_WIDTH 1
154628c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_SELECTABLE_TABLE_SIZE_OFST 148
154638c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_SELECTABLE_TABLE_SIZE_LBN 2
154648c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_SELECTABLE_TABLE_SIZE_WIDTH 1
154658c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MAE_SUPPORTED_OFST 148
154668c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MAE_SUPPORTED_LBN 3
154678c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_MAE_SUPPORTED_WIDTH 1
154688c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VDPA_SUPPORTED_OFST 148
154698c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VDPA_SUPPORTED_LBN 4
154708c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_VDPA_SUPPORTED_WIDTH 1
154718c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_OFST 148
154728c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_LBN 5
154738c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_RX_VLAN_STRIPPING_PER_ENCAP_RULE_WIDTH 1
154748c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_OFST 148
154758c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_LBN 6
154768c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_EXTENDED_WIDTH_EVQS_SUPPORTED_WIDTH 1
154778c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_UNSOL_EV_CREDIT_SUPPORTED_OFST 148
154788c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_UNSOL_EV_CREDIT_SUPPORTED_LBN 7
154798c2ecf20Sopenharmony_ci#define        MC_CMD_GET_CAPABILITIES_V9_OUT_UNSOL_EV_CREDIT_SUPPORTED_WIDTH 1
154808c2ecf20Sopenharmony_ci/* These bits are reserved for communicating test-specific capabilities to
154818c2ecf20Sopenharmony_ci * host-side test software. All production drivers should treat this field as
154828c2ecf20Sopenharmony_ci * opaque.
154838c2ecf20Sopenharmony_ci */
154848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TEST_RESERVED_OFST 152
154858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TEST_RESERVED_LEN 8
154868c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TEST_RESERVED_LO_OFST 152
154878c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_TEST_RESERVED_HI_OFST 156
154888c2ecf20Sopenharmony_ci/* The minimum size (in table entries) of indirection table to be allocated
154898c2ecf20Sopenharmony_ci * from the pool for an RSS context. Note that the table size used must be a
154908c2ecf20Sopenharmony_ci * power of 2.
154918c2ecf20Sopenharmony_ci */
154928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MIN_INDIRECTION_TABLE_SIZE_OFST 160
154938c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MIN_INDIRECTION_TABLE_SIZE_LEN 4
154948c2ecf20Sopenharmony_ci/* The maximum size (in table entries) of indirection table to be allocated
154958c2ecf20Sopenharmony_ci * from the pool for an RSS context. Note that the table size used must be a
154968c2ecf20Sopenharmony_ci * power of 2.
154978c2ecf20Sopenharmony_ci */
154988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MAX_INDIRECTION_TABLE_SIZE_OFST 164
154998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MAX_INDIRECTION_TABLE_SIZE_LEN 4
155008c2ecf20Sopenharmony_ci/* The maximum number of queues that can be used by an RSS context in exclusive
155018c2ecf20Sopenharmony_ci * mode. In exclusive mode the context has a configurable indirection table and
155028c2ecf20Sopenharmony_ci * a configurable RSS key.
155038c2ecf20Sopenharmony_ci */
155048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MAX_INDIRECTION_QUEUES_OFST 168
155058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MAX_INDIRECTION_QUEUES_LEN 4
155068c2ecf20Sopenharmony_ci/* The maximum number of queues that can be used by an RSS context in even-
155078c2ecf20Sopenharmony_ci * spreading mode. In even-spreading mode the context has no indirection table
155088c2ecf20Sopenharmony_ci * but it does have a configurable RSS key.
155098c2ecf20Sopenharmony_ci */
155108c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MAX_EVEN_SPREADING_QUEUES_OFST 172
155118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_MAX_EVEN_SPREADING_QUEUES_LEN 4
155128c2ecf20Sopenharmony_ci/* The total number of RSS contexts supported. Note that the number of
155138c2ecf20Sopenharmony_ci * available contexts using indirection tables is also limited by the
155148c2ecf20Sopenharmony_ci * availability of indirection table space allocated from a common pool.
155158c2ecf20Sopenharmony_ci */
155168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_NUM_CONTEXTS_OFST 176
155178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_NUM_CONTEXTS_LEN 4
155188c2ecf20Sopenharmony_ci/* The total amount of indirection table space that can be shared between RSS
155198c2ecf20Sopenharmony_ci * contexts.
155208c2ecf20Sopenharmony_ci */
155218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_TABLE_POOL_SIZE_OFST 180
155228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CAPABILITIES_V9_OUT_RSS_TABLE_POOL_SIZE_LEN 4
155238c2ecf20Sopenharmony_ci
155248c2ecf20Sopenharmony_ci
155258c2ecf20Sopenharmony_ci/***********************************/
155268c2ecf20Sopenharmony_ci/* MC_CMD_V2_EXTN
155278c2ecf20Sopenharmony_ci * Encapsulation for a v2 extended command
155288c2ecf20Sopenharmony_ci */
155298c2ecf20Sopenharmony_ci#define MC_CMD_V2_EXTN 0x7f
155308c2ecf20Sopenharmony_ci
155318c2ecf20Sopenharmony_ci/* MC_CMD_V2_EXTN_IN msgrequest */
155328c2ecf20Sopenharmony_ci#define    MC_CMD_V2_EXTN_IN_LEN 4
155338c2ecf20Sopenharmony_ci/* the extended command number */
155348c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_EXTENDED_CMD_LBN 0
155358c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_EXTENDED_CMD_WIDTH 15
155368c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_UNUSED_LBN 15
155378c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_UNUSED_WIDTH 1
155388c2ecf20Sopenharmony_ci/* the actual length of the encapsulated command (which is not in the v1
155398c2ecf20Sopenharmony_ci * header)
155408c2ecf20Sopenharmony_ci */
155418c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_ACTUAL_LEN_LBN 16
155428c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_ACTUAL_LEN_WIDTH 10
155438c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_UNUSED2_LBN 26
155448c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_UNUSED2_WIDTH 2
155458c2ecf20Sopenharmony_ci/* Type of command/response */
155468c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_MESSAGE_TYPE_LBN 28
155478c2ecf20Sopenharmony_ci#define       MC_CMD_V2_EXTN_IN_MESSAGE_TYPE_WIDTH 4
155488c2ecf20Sopenharmony_ci/* enum: MCDI command directed to or response originating from the MC. */
155498c2ecf20Sopenharmony_ci#define          MC_CMD_V2_EXTN_IN_MCDI_MESSAGE_TYPE_MC 0x0
155508c2ecf20Sopenharmony_ci/* enum: MCDI command directed to a TSA controller. MCDI responses of this type
155518c2ecf20Sopenharmony_ci * are not defined.
155528c2ecf20Sopenharmony_ci */
155538c2ecf20Sopenharmony_ci#define          MC_CMD_V2_EXTN_IN_MCDI_MESSAGE_TYPE_TSA 0x1
155548c2ecf20Sopenharmony_ci
155558c2ecf20Sopenharmony_ci
155568c2ecf20Sopenharmony_ci/***********************************/
155578c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_ALLOC
155588c2ecf20Sopenharmony_ci * Allocate a pacer bucket (for qau rp or a snapper test)
155598c2ecf20Sopenharmony_ci */
155608c2ecf20Sopenharmony_ci#define MC_CMD_TCM_BUCKET_ALLOC 0xb2
155618c2ecf20Sopenharmony_ci#undef MC_CMD_0xb2_PRIVILEGE_CTG
155628c2ecf20Sopenharmony_ci
155638c2ecf20Sopenharmony_ci#define MC_CMD_0xb2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
155648c2ecf20Sopenharmony_ci
155658c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_ALLOC_IN msgrequest */
155668c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_ALLOC_IN_LEN 0
155678c2ecf20Sopenharmony_ci
155688c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_ALLOC_OUT msgresponse */
155698c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_ALLOC_OUT_LEN 4
155708c2ecf20Sopenharmony_ci/* the bucket id */
155718c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_ALLOC_OUT_BUCKET_OFST 0
155728c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_ALLOC_OUT_BUCKET_LEN 4
155738c2ecf20Sopenharmony_ci
155748c2ecf20Sopenharmony_ci
155758c2ecf20Sopenharmony_ci/***********************************/
155768c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_FREE
155778c2ecf20Sopenharmony_ci * Free a pacer bucket
155788c2ecf20Sopenharmony_ci */
155798c2ecf20Sopenharmony_ci#define MC_CMD_TCM_BUCKET_FREE 0xb3
155808c2ecf20Sopenharmony_ci#undef MC_CMD_0xb3_PRIVILEGE_CTG
155818c2ecf20Sopenharmony_ci
155828c2ecf20Sopenharmony_ci#define MC_CMD_0xb3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
155838c2ecf20Sopenharmony_ci
155848c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_FREE_IN msgrequest */
155858c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_FREE_IN_LEN 4
155868c2ecf20Sopenharmony_ci/* the bucket id */
155878c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_FREE_IN_BUCKET_OFST 0
155888c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_FREE_IN_BUCKET_LEN 4
155898c2ecf20Sopenharmony_ci
155908c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_FREE_OUT msgresponse */
155918c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_FREE_OUT_LEN 0
155928c2ecf20Sopenharmony_ci
155938c2ecf20Sopenharmony_ci
155948c2ecf20Sopenharmony_ci/***********************************/
155958c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_INIT
155968c2ecf20Sopenharmony_ci * Initialise pacer bucket with a given rate
155978c2ecf20Sopenharmony_ci */
155988c2ecf20Sopenharmony_ci#define MC_CMD_TCM_BUCKET_INIT 0xb4
155998c2ecf20Sopenharmony_ci#undef MC_CMD_0xb4_PRIVILEGE_CTG
156008c2ecf20Sopenharmony_ci
156018c2ecf20Sopenharmony_ci#define MC_CMD_0xb4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
156028c2ecf20Sopenharmony_ci
156038c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_INIT_IN msgrequest */
156048c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_INIT_IN_LEN 8
156058c2ecf20Sopenharmony_ci/* the bucket id */
156068c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_IN_BUCKET_OFST 0
156078c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_IN_BUCKET_LEN 4
156088c2ecf20Sopenharmony_ci/* the rate in mbps */
156098c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_IN_RATE_OFST 4
156108c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_IN_RATE_LEN 4
156118c2ecf20Sopenharmony_ci
156128c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_INIT_EXT_IN msgrequest */
156138c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_INIT_EXT_IN_LEN 12
156148c2ecf20Sopenharmony_ci/* the bucket id */
156158c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_EXT_IN_BUCKET_OFST 0
156168c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_EXT_IN_BUCKET_LEN 4
156178c2ecf20Sopenharmony_ci/* the rate in mbps */
156188c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_EXT_IN_RATE_OFST 4
156198c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_EXT_IN_RATE_LEN 4
156208c2ecf20Sopenharmony_ci/* the desired maximum fill level */
156218c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_EXT_IN_MAX_FILL_OFST 8
156228c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_BUCKET_INIT_EXT_IN_MAX_FILL_LEN 4
156238c2ecf20Sopenharmony_ci
156248c2ecf20Sopenharmony_ci/* MC_CMD_TCM_BUCKET_INIT_OUT msgresponse */
156258c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_BUCKET_INIT_OUT_LEN 0
156268c2ecf20Sopenharmony_ci
156278c2ecf20Sopenharmony_ci
156288c2ecf20Sopenharmony_ci/***********************************/
156298c2ecf20Sopenharmony_ci/* MC_CMD_TCM_TXQ_INIT
156308c2ecf20Sopenharmony_ci * Initialise txq in pacer with given options or set options
156318c2ecf20Sopenharmony_ci */
156328c2ecf20Sopenharmony_ci#define MC_CMD_TCM_TXQ_INIT 0xb5
156338c2ecf20Sopenharmony_ci#undef MC_CMD_0xb5_PRIVILEGE_CTG
156348c2ecf20Sopenharmony_ci
156358c2ecf20Sopenharmony_ci#define MC_CMD_0xb5_PRIVILEGE_CTG SRIOV_CTG_GENERAL
156368c2ecf20Sopenharmony_ci
156378c2ecf20Sopenharmony_ci/* MC_CMD_TCM_TXQ_INIT_IN msgrequest */
156388c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_TXQ_INIT_IN_LEN 28
156398c2ecf20Sopenharmony_ci/* the txq id */
156408c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_QID_OFST 0
156418c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_QID_LEN 4
156428c2ecf20Sopenharmony_ci/* the static priority associated with the txq */
156438c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_LABEL_OFST 4
156448c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_LABEL_LEN 4
156458c2ecf20Sopenharmony_ci/* bitmask of the priority queues this txq is inserted into when inserted. */
156468c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAGS_OFST 8
156478c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAGS_LEN 4
156488c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_GUARANTEED_OFST 8
156498c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_GUARANTEED_LBN 0
156508c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_GUARANTEED_WIDTH 1
156518c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_NORMAL_OFST 8
156528c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_NORMAL_LBN 1
156538c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_NORMAL_WIDTH 1
156548c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_LOW_OFST 8
156558c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_LOW_LBN 2
156568c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_IN_PQ_FLAG_LOW_WIDTH 1
156578c2ecf20Sopenharmony_ci/* the reaction point (RP) bucket */
156588c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_RP_BKT_OFST 12
156598c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_RP_BKT_LEN 4
156608c2ecf20Sopenharmony_ci/* an already reserved bucket (typically set to bucket associated with outer
156618c2ecf20Sopenharmony_ci * vswitch)
156628c2ecf20Sopenharmony_ci */
156638c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT1_OFST 16
156648c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT1_LEN 4
156658c2ecf20Sopenharmony_ci/* an already reserved bucket (typically set to bucket associated with inner
156668c2ecf20Sopenharmony_ci * vswitch)
156678c2ecf20Sopenharmony_ci */
156688c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT2_OFST 20
156698c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_MAX_BKT2_LEN 4
156708c2ecf20Sopenharmony_ci/* the min bucket (typically for ETS/minimum bandwidth) */
156718c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_MIN_BKT_OFST 24
156728c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_IN_MIN_BKT_LEN 4
156738c2ecf20Sopenharmony_ci
156748c2ecf20Sopenharmony_ci/* MC_CMD_TCM_TXQ_INIT_EXT_IN msgrequest */
156758c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_TXQ_INIT_EXT_IN_LEN 32
156768c2ecf20Sopenharmony_ci/* the txq id */
156778c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_QID_OFST 0
156788c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_QID_LEN 4
156798c2ecf20Sopenharmony_ci/* the static priority associated with the txq */
156808c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_NORMAL_OFST 4
156818c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_NORMAL_LEN 4
156828c2ecf20Sopenharmony_ci/* bitmask of the priority queues this txq is inserted into when inserted. */
156838c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAGS_OFST 8
156848c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAGS_LEN 4
156858c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_GUARANTEED_OFST 8
156868c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_GUARANTEED_LBN 0
156878c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_GUARANTEED_WIDTH 1
156888c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_NORMAL_OFST 8
156898c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_NORMAL_LBN 1
156908c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_NORMAL_WIDTH 1
156918c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_LOW_OFST 8
156928c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_LOW_LBN 2
156938c2ecf20Sopenharmony_ci#define        MC_CMD_TCM_TXQ_INIT_EXT_IN_PQ_FLAG_LOW_WIDTH 1
156948c2ecf20Sopenharmony_ci/* the reaction point (RP) bucket */
156958c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_RP_BKT_OFST 12
156968c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_RP_BKT_LEN 4
156978c2ecf20Sopenharmony_ci/* an already reserved bucket (typically set to bucket associated with outer
156988c2ecf20Sopenharmony_ci * vswitch)
156998c2ecf20Sopenharmony_ci */
157008c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT1_OFST 16
157018c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT1_LEN 4
157028c2ecf20Sopenharmony_ci/* an already reserved bucket (typically set to bucket associated with inner
157038c2ecf20Sopenharmony_ci * vswitch)
157048c2ecf20Sopenharmony_ci */
157058c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT2_OFST 20
157068c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_MAX_BKT2_LEN 4
157078c2ecf20Sopenharmony_ci/* the min bucket (typically for ETS/minimum bandwidth) */
157088c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_MIN_BKT_OFST 24
157098c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_MIN_BKT_LEN 4
157108c2ecf20Sopenharmony_ci/* the static priority associated with the txq */
157118c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_GUARANTEED_OFST 28
157128c2ecf20Sopenharmony_ci#define       MC_CMD_TCM_TXQ_INIT_EXT_IN_LABEL_GUARANTEED_LEN 4
157138c2ecf20Sopenharmony_ci
157148c2ecf20Sopenharmony_ci/* MC_CMD_TCM_TXQ_INIT_OUT msgresponse */
157158c2ecf20Sopenharmony_ci#define    MC_CMD_TCM_TXQ_INIT_OUT_LEN 0
157168c2ecf20Sopenharmony_ci
157178c2ecf20Sopenharmony_ci
157188c2ecf20Sopenharmony_ci/***********************************/
157198c2ecf20Sopenharmony_ci/* MC_CMD_LINK_PIOBUF
157208c2ecf20Sopenharmony_ci * Link a push I/O buffer to a TxQ
157218c2ecf20Sopenharmony_ci */
157228c2ecf20Sopenharmony_ci#define MC_CMD_LINK_PIOBUF 0x92
157238c2ecf20Sopenharmony_ci#undef MC_CMD_0x92_PRIVILEGE_CTG
157248c2ecf20Sopenharmony_ci
157258c2ecf20Sopenharmony_ci#define MC_CMD_0x92_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
157268c2ecf20Sopenharmony_ci
157278c2ecf20Sopenharmony_ci/* MC_CMD_LINK_PIOBUF_IN msgrequest */
157288c2ecf20Sopenharmony_ci#define    MC_CMD_LINK_PIOBUF_IN_LEN 8
157298c2ecf20Sopenharmony_ci/* Handle for allocated push I/O buffer. */
157308c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_PIOBUF_IN_PIOBUF_HANDLE_OFST 0
157318c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_PIOBUF_IN_PIOBUF_HANDLE_LEN 4
157328c2ecf20Sopenharmony_ci/* Function Local Instance (VI) number. */
157338c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_PIOBUF_IN_TXQ_INSTANCE_OFST 4
157348c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_PIOBUF_IN_TXQ_INSTANCE_LEN 4
157358c2ecf20Sopenharmony_ci
157368c2ecf20Sopenharmony_ci/* MC_CMD_LINK_PIOBUF_OUT msgresponse */
157378c2ecf20Sopenharmony_ci#define    MC_CMD_LINK_PIOBUF_OUT_LEN 0
157388c2ecf20Sopenharmony_ci
157398c2ecf20Sopenharmony_ci
157408c2ecf20Sopenharmony_ci/***********************************/
157418c2ecf20Sopenharmony_ci/* MC_CMD_UNLINK_PIOBUF
157428c2ecf20Sopenharmony_ci * Unlink a push I/O buffer from a TxQ
157438c2ecf20Sopenharmony_ci */
157448c2ecf20Sopenharmony_ci#define MC_CMD_UNLINK_PIOBUF 0x93
157458c2ecf20Sopenharmony_ci#undef MC_CMD_0x93_PRIVILEGE_CTG
157468c2ecf20Sopenharmony_ci
157478c2ecf20Sopenharmony_ci#define MC_CMD_0x93_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
157488c2ecf20Sopenharmony_ci
157498c2ecf20Sopenharmony_ci/* MC_CMD_UNLINK_PIOBUF_IN msgrequest */
157508c2ecf20Sopenharmony_ci#define    MC_CMD_UNLINK_PIOBUF_IN_LEN 4
157518c2ecf20Sopenharmony_ci/* Function Local Instance (VI) number. */
157528c2ecf20Sopenharmony_ci#define       MC_CMD_UNLINK_PIOBUF_IN_TXQ_INSTANCE_OFST 0
157538c2ecf20Sopenharmony_ci#define       MC_CMD_UNLINK_PIOBUF_IN_TXQ_INSTANCE_LEN 4
157548c2ecf20Sopenharmony_ci
157558c2ecf20Sopenharmony_ci/* MC_CMD_UNLINK_PIOBUF_OUT msgresponse */
157568c2ecf20Sopenharmony_ci#define    MC_CMD_UNLINK_PIOBUF_OUT_LEN 0
157578c2ecf20Sopenharmony_ci
157588c2ecf20Sopenharmony_ci
157598c2ecf20Sopenharmony_ci/***********************************/
157608c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_ALLOC
157618c2ecf20Sopenharmony_ci * allocate and initialise a v-switch.
157628c2ecf20Sopenharmony_ci */
157638c2ecf20Sopenharmony_ci#define MC_CMD_VSWITCH_ALLOC 0x94
157648c2ecf20Sopenharmony_ci#undef MC_CMD_0x94_PRIVILEGE_CTG
157658c2ecf20Sopenharmony_ci
157668c2ecf20Sopenharmony_ci#define MC_CMD_0x94_PRIVILEGE_CTG SRIOV_CTG_GENERAL
157678c2ecf20Sopenharmony_ci
157688c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_ALLOC_IN msgrequest */
157698c2ecf20Sopenharmony_ci#define    MC_CMD_VSWITCH_ALLOC_IN_LEN 16
157708c2ecf20Sopenharmony_ci/* The port to connect to the v-switch's upstream port. */
157718c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
157728c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
157738c2ecf20Sopenharmony_ci/* The type of v-switch to create. */
157748c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_TYPE_OFST 4
157758c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_TYPE_LEN 4
157768c2ecf20Sopenharmony_ci/* enum: VLAN */
157778c2ecf20Sopenharmony_ci#define          MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VLAN 0x1
157788c2ecf20Sopenharmony_ci/* enum: VEB */
157798c2ecf20Sopenharmony_ci#define          MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VEB 0x2
157808c2ecf20Sopenharmony_ci/* enum: VEPA (obsolete) */
157818c2ecf20Sopenharmony_ci#define          MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_VEPA 0x3
157828c2ecf20Sopenharmony_ci/* enum: MUX */
157838c2ecf20Sopenharmony_ci#define          MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_MUX 0x4
157848c2ecf20Sopenharmony_ci/* enum: Snapper specific; semantics TBD */
157858c2ecf20Sopenharmony_ci#define          MC_CMD_VSWITCH_ALLOC_IN_VSWITCH_TYPE_TEST 0x5
157868c2ecf20Sopenharmony_ci/* Flags controlling v-port creation */
157878c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_FLAGS_OFST 8
157888c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_FLAGS_LEN 4
157898c2ecf20Sopenharmony_ci#define        MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_OFST 8
157908c2ecf20Sopenharmony_ci#define        MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_LBN 0
157918c2ecf20Sopenharmony_ci#define        MC_CMD_VSWITCH_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1
157928c2ecf20Sopenharmony_ci/* The number of VLAN tags to allow for attached v-ports. For VLAN aggregators,
157938c2ecf20Sopenharmony_ci * this must be one or greated, and the attached v-ports must have exactly this
157948c2ecf20Sopenharmony_ci * number of tags. For other v-switch types, this must be zero of greater, and
157958c2ecf20Sopenharmony_ci * is an upper limit on the number of VLAN tags for attached v-ports. An error
157968c2ecf20Sopenharmony_ci * will be returned if existing configuration means we can't support attached
157978c2ecf20Sopenharmony_ci * v-ports with this number of tags.
157988c2ecf20Sopenharmony_ci */
157998c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_NUM_VLAN_TAGS_OFST 12
158008c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_ALLOC_IN_NUM_VLAN_TAGS_LEN 4
158018c2ecf20Sopenharmony_ci
158028c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_ALLOC_OUT msgresponse */
158038c2ecf20Sopenharmony_ci#define    MC_CMD_VSWITCH_ALLOC_OUT_LEN 0
158048c2ecf20Sopenharmony_ci
158058c2ecf20Sopenharmony_ci
158068c2ecf20Sopenharmony_ci/***********************************/
158078c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_FREE
158088c2ecf20Sopenharmony_ci * de-allocate a v-switch.
158098c2ecf20Sopenharmony_ci */
158108c2ecf20Sopenharmony_ci#define MC_CMD_VSWITCH_FREE 0x95
158118c2ecf20Sopenharmony_ci#undef MC_CMD_0x95_PRIVILEGE_CTG
158128c2ecf20Sopenharmony_ci
158138c2ecf20Sopenharmony_ci#define MC_CMD_0x95_PRIVILEGE_CTG SRIOV_CTG_GENERAL
158148c2ecf20Sopenharmony_ci
158158c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_FREE_IN msgrequest */
158168c2ecf20Sopenharmony_ci#define    MC_CMD_VSWITCH_FREE_IN_LEN 4
158178c2ecf20Sopenharmony_ci/* The port to which the v-switch is connected. */
158188c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_FREE_IN_UPSTREAM_PORT_ID_OFST 0
158198c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_FREE_IN_UPSTREAM_PORT_ID_LEN 4
158208c2ecf20Sopenharmony_ci
158218c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_FREE_OUT msgresponse */
158228c2ecf20Sopenharmony_ci#define    MC_CMD_VSWITCH_FREE_OUT_LEN 0
158238c2ecf20Sopenharmony_ci
158248c2ecf20Sopenharmony_ci
158258c2ecf20Sopenharmony_ci/***********************************/
158268c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_QUERY
158278c2ecf20Sopenharmony_ci * read some config of v-switch. For now this command is an empty placeholder.
158288c2ecf20Sopenharmony_ci * It may be used to check if a v-switch is connected to a given EVB port (if
158298c2ecf20Sopenharmony_ci * not, then the command returns ENOENT).
158308c2ecf20Sopenharmony_ci */
158318c2ecf20Sopenharmony_ci#define MC_CMD_VSWITCH_QUERY 0x63
158328c2ecf20Sopenharmony_ci#undef MC_CMD_0x63_PRIVILEGE_CTG
158338c2ecf20Sopenharmony_ci
158348c2ecf20Sopenharmony_ci#define MC_CMD_0x63_PRIVILEGE_CTG SRIOV_CTG_GENERAL
158358c2ecf20Sopenharmony_ci
158368c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_QUERY_IN msgrequest */
158378c2ecf20Sopenharmony_ci#define    MC_CMD_VSWITCH_QUERY_IN_LEN 4
158388c2ecf20Sopenharmony_ci/* The port to which the v-switch is connected. */
158398c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_QUERY_IN_UPSTREAM_PORT_ID_OFST 0
158408c2ecf20Sopenharmony_ci#define       MC_CMD_VSWITCH_QUERY_IN_UPSTREAM_PORT_ID_LEN 4
158418c2ecf20Sopenharmony_ci
158428c2ecf20Sopenharmony_ci/* MC_CMD_VSWITCH_QUERY_OUT msgresponse */
158438c2ecf20Sopenharmony_ci#define    MC_CMD_VSWITCH_QUERY_OUT_LEN 0
158448c2ecf20Sopenharmony_ci
158458c2ecf20Sopenharmony_ci
158468c2ecf20Sopenharmony_ci/***********************************/
158478c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_ALLOC
158488c2ecf20Sopenharmony_ci * allocate a v-port.
158498c2ecf20Sopenharmony_ci */
158508c2ecf20Sopenharmony_ci#define MC_CMD_VPORT_ALLOC 0x96
158518c2ecf20Sopenharmony_ci#undef MC_CMD_0x96_PRIVILEGE_CTG
158528c2ecf20Sopenharmony_ci
158538c2ecf20Sopenharmony_ci#define MC_CMD_0x96_PRIVILEGE_CTG SRIOV_CTG_GENERAL
158548c2ecf20Sopenharmony_ci
158558c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_ALLOC_IN msgrequest */
158568c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_ALLOC_IN_LEN 20
158578c2ecf20Sopenharmony_ci/* The port to which the v-switch is connected. */
158588c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
158598c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
158608c2ecf20Sopenharmony_ci/* The type of the new v-port. */
158618c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_TYPE_OFST 4
158628c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_TYPE_LEN 4
158638c2ecf20Sopenharmony_ci/* enum: VLAN (obsolete) */
158648c2ecf20Sopenharmony_ci#define          MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VLAN 0x1
158658c2ecf20Sopenharmony_ci/* enum: VEB (obsolete) */
158668c2ecf20Sopenharmony_ci#define          MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VEB 0x2
158678c2ecf20Sopenharmony_ci/* enum: VEPA (obsolete) */
158688c2ecf20Sopenharmony_ci#define          MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_VEPA 0x3
158698c2ecf20Sopenharmony_ci/* enum: A normal v-port receives packets which match a specified MAC and/or
158708c2ecf20Sopenharmony_ci * VLAN.
158718c2ecf20Sopenharmony_ci */
158728c2ecf20Sopenharmony_ci#define          MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_NORMAL 0x4
158738c2ecf20Sopenharmony_ci/* enum: An expansion v-port packets traffic which don't match any other
158748c2ecf20Sopenharmony_ci * v-port.
158758c2ecf20Sopenharmony_ci */
158768c2ecf20Sopenharmony_ci#define          MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_EXPANSION 0x5
158778c2ecf20Sopenharmony_ci/* enum: An test v-port receives packets which match any filters installed by
158788c2ecf20Sopenharmony_ci * its downstream components.
158798c2ecf20Sopenharmony_ci */
158808c2ecf20Sopenharmony_ci#define          MC_CMD_VPORT_ALLOC_IN_VPORT_TYPE_TEST 0x6
158818c2ecf20Sopenharmony_ci/* Flags controlling v-port creation */
158828c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_FLAGS_OFST 8
158838c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_FLAGS_LEN 4
158848c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_OFST 8
158858c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_LBN 0
158868c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1
158878c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_OFST 8
158888c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_LBN 1
158898c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_WIDTH 1
158908c2ecf20Sopenharmony_ci/* The number of VLAN tags to insert/remove. An error will be returned if
158918c2ecf20Sopenharmony_ci * incompatible with the number of VLAN tags specified for the upstream
158928c2ecf20Sopenharmony_ci * v-switch.
158938c2ecf20Sopenharmony_ci */
158948c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_NUM_VLAN_TAGS_OFST 12
158958c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_NUM_VLAN_TAGS_LEN 4
158968c2ecf20Sopenharmony_ci/* The actual VLAN tags to insert/remove */
158978c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_VLAN_TAGS_OFST 16
158988c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_IN_VLAN_TAGS_LEN 4
158998c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_OFST 16
159008c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_LBN 0
159018c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_0_WIDTH 16
159028c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_OFST 16
159038c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_LBN 16
159048c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_ALLOC_IN_VLAN_TAG_1_WIDTH 16
159058c2ecf20Sopenharmony_ci
159068c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_ALLOC_OUT msgresponse */
159078c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_ALLOC_OUT_LEN 4
159088c2ecf20Sopenharmony_ci/* The handle of the new v-port */
159098c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_OUT_VPORT_ID_OFST 0
159108c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ALLOC_OUT_VPORT_ID_LEN 4
159118c2ecf20Sopenharmony_ci
159128c2ecf20Sopenharmony_ci
159138c2ecf20Sopenharmony_ci/***********************************/
159148c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_FREE
159158c2ecf20Sopenharmony_ci * de-allocate a v-port.
159168c2ecf20Sopenharmony_ci */
159178c2ecf20Sopenharmony_ci#define MC_CMD_VPORT_FREE 0x97
159188c2ecf20Sopenharmony_ci#undef MC_CMD_0x97_PRIVILEGE_CTG
159198c2ecf20Sopenharmony_ci
159208c2ecf20Sopenharmony_ci#define MC_CMD_0x97_PRIVILEGE_CTG SRIOV_CTG_GENERAL
159218c2ecf20Sopenharmony_ci
159228c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_FREE_IN msgrequest */
159238c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_FREE_IN_LEN 4
159248c2ecf20Sopenharmony_ci/* The handle of the v-port */
159258c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_FREE_IN_VPORT_ID_OFST 0
159268c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_FREE_IN_VPORT_ID_LEN 4
159278c2ecf20Sopenharmony_ci
159288c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_FREE_OUT msgresponse */
159298c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_FREE_OUT_LEN 0
159308c2ecf20Sopenharmony_ci
159318c2ecf20Sopenharmony_ci
159328c2ecf20Sopenharmony_ci/***********************************/
159338c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_ALLOC
159348c2ecf20Sopenharmony_ci * allocate a v-adaptor.
159358c2ecf20Sopenharmony_ci */
159368c2ecf20Sopenharmony_ci#define MC_CMD_VADAPTOR_ALLOC 0x98
159378c2ecf20Sopenharmony_ci#undef MC_CMD_0x98_PRIVILEGE_CTG
159388c2ecf20Sopenharmony_ci
159398c2ecf20Sopenharmony_ci#define MC_CMD_0x98_PRIVILEGE_CTG SRIOV_CTG_GENERAL
159408c2ecf20Sopenharmony_ci
159418c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_ALLOC_IN msgrequest */
159428c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_ALLOC_IN_LEN 30
159438c2ecf20Sopenharmony_ci/* The port to connect to the v-adaptor's port. */
159448c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
159458c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
159468c2ecf20Sopenharmony_ci/* Flags controlling v-adaptor creation */
159478c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_FLAGS_OFST 8
159488c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_FLAGS_LEN 4
159498c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_OFST 8
159508c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_LBN 0
159518c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_WIDTH 1
159528c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_OFST 8
159538c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 1
159548c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1
159558c2ecf20Sopenharmony_ci/* The number of VLAN tags to strip on receive */
159568c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLANS_OFST 12
159578c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLANS_LEN 4
159588c2ecf20Sopenharmony_ci/* The number of VLAN tags to transparently insert/remove. */
159598c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLAN_TAGS_OFST 16
159608c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLAN_TAGS_LEN 4
159618c2ecf20Sopenharmony_ci/* The actual VLAN tags to insert/remove */
159628c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAGS_OFST 20
159638c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAGS_LEN 4
159648c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_OFST 20
159658c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_LBN 0
159668c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_0_WIDTH 16
159678c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_OFST 20
159688c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_LBN 16
159698c2ecf20Sopenharmony_ci#define        MC_CMD_VADAPTOR_ALLOC_IN_VLAN_TAG_1_WIDTH 16
159708c2ecf20Sopenharmony_ci/* The MAC address to assign to this v-adaptor */
159718c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_MACADDR_OFST 24
159728c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_ALLOC_IN_MACADDR_LEN 6
159738c2ecf20Sopenharmony_ci/* enum: Derive the MAC address from the upstream port */
159748c2ecf20Sopenharmony_ci#define          MC_CMD_VADAPTOR_ALLOC_IN_AUTO_MAC 0x0
159758c2ecf20Sopenharmony_ci
159768c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_ALLOC_OUT msgresponse */
159778c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_ALLOC_OUT_LEN 0
159788c2ecf20Sopenharmony_ci
159798c2ecf20Sopenharmony_ci
159808c2ecf20Sopenharmony_ci/***********************************/
159818c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_FREE
159828c2ecf20Sopenharmony_ci * de-allocate a v-adaptor.
159838c2ecf20Sopenharmony_ci */
159848c2ecf20Sopenharmony_ci#define MC_CMD_VADAPTOR_FREE 0x99
159858c2ecf20Sopenharmony_ci#undef MC_CMD_0x99_PRIVILEGE_CTG
159868c2ecf20Sopenharmony_ci
159878c2ecf20Sopenharmony_ci#define MC_CMD_0x99_PRIVILEGE_CTG SRIOV_CTG_GENERAL
159888c2ecf20Sopenharmony_ci
159898c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_FREE_IN msgrequest */
159908c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_FREE_IN_LEN 4
159918c2ecf20Sopenharmony_ci/* The port to which the v-adaptor is connected. */
159928c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_FREE_IN_UPSTREAM_PORT_ID_OFST 0
159938c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_FREE_IN_UPSTREAM_PORT_ID_LEN 4
159948c2ecf20Sopenharmony_ci
159958c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_FREE_OUT msgresponse */
159968c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_FREE_OUT_LEN 0
159978c2ecf20Sopenharmony_ci
159988c2ecf20Sopenharmony_ci
159998c2ecf20Sopenharmony_ci/***********************************/
160008c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_SET_MAC
160018c2ecf20Sopenharmony_ci * assign a new MAC address to a v-adaptor.
160028c2ecf20Sopenharmony_ci */
160038c2ecf20Sopenharmony_ci#define MC_CMD_VADAPTOR_SET_MAC 0x5d
160048c2ecf20Sopenharmony_ci#undef MC_CMD_0x5d_PRIVILEGE_CTG
160058c2ecf20Sopenharmony_ci
160068c2ecf20Sopenharmony_ci#define MC_CMD_0x5d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
160078c2ecf20Sopenharmony_ci
160088c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_SET_MAC_IN msgrequest */
160098c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_SET_MAC_IN_LEN 10
160108c2ecf20Sopenharmony_ci/* The port to which the v-adaptor is connected. */
160118c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_SET_MAC_IN_UPSTREAM_PORT_ID_OFST 0
160128c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_SET_MAC_IN_UPSTREAM_PORT_ID_LEN 4
160138c2ecf20Sopenharmony_ci/* The new MAC address to assign to this v-adaptor */
160148c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_SET_MAC_IN_MACADDR_OFST 4
160158c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_SET_MAC_IN_MACADDR_LEN 6
160168c2ecf20Sopenharmony_ci
160178c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_SET_MAC_OUT msgresponse */
160188c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_SET_MAC_OUT_LEN 0
160198c2ecf20Sopenharmony_ci
160208c2ecf20Sopenharmony_ci
160218c2ecf20Sopenharmony_ci/***********************************/
160228c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_GET_MAC
160238c2ecf20Sopenharmony_ci * read the MAC address assigned to a v-adaptor.
160248c2ecf20Sopenharmony_ci */
160258c2ecf20Sopenharmony_ci#define MC_CMD_VADAPTOR_GET_MAC 0x5e
160268c2ecf20Sopenharmony_ci#undef MC_CMD_0x5e_PRIVILEGE_CTG
160278c2ecf20Sopenharmony_ci
160288c2ecf20Sopenharmony_ci#define MC_CMD_0x5e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
160298c2ecf20Sopenharmony_ci
160308c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_GET_MAC_IN msgrequest */
160318c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_GET_MAC_IN_LEN 4
160328c2ecf20Sopenharmony_ci/* The port to which the v-adaptor is connected. */
160338c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_GET_MAC_IN_UPSTREAM_PORT_ID_OFST 0
160348c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_GET_MAC_IN_UPSTREAM_PORT_ID_LEN 4
160358c2ecf20Sopenharmony_ci
160368c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_GET_MAC_OUT msgresponse */
160378c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_GET_MAC_OUT_LEN 6
160388c2ecf20Sopenharmony_ci/* The MAC address assigned to this v-adaptor */
160398c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_GET_MAC_OUT_MACADDR_OFST 0
160408c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_GET_MAC_OUT_MACADDR_LEN 6
160418c2ecf20Sopenharmony_ci
160428c2ecf20Sopenharmony_ci
160438c2ecf20Sopenharmony_ci/***********************************/
160448c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_QUERY
160458c2ecf20Sopenharmony_ci * read some config of v-adaptor.
160468c2ecf20Sopenharmony_ci */
160478c2ecf20Sopenharmony_ci#define MC_CMD_VADAPTOR_QUERY 0x61
160488c2ecf20Sopenharmony_ci#undef MC_CMD_0x61_PRIVILEGE_CTG
160498c2ecf20Sopenharmony_ci
160508c2ecf20Sopenharmony_ci#define MC_CMD_0x61_PRIVILEGE_CTG SRIOV_CTG_GENERAL
160518c2ecf20Sopenharmony_ci
160528c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_QUERY_IN msgrequest */
160538c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_QUERY_IN_LEN 4
160548c2ecf20Sopenharmony_ci/* The port to which the v-adaptor is connected. */
160558c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_IN_UPSTREAM_PORT_ID_OFST 0
160568c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_IN_UPSTREAM_PORT_ID_LEN 4
160578c2ecf20Sopenharmony_ci
160588c2ecf20Sopenharmony_ci/* MC_CMD_VADAPTOR_QUERY_OUT msgresponse */
160598c2ecf20Sopenharmony_ci#define    MC_CMD_VADAPTOR_QUERY_OUT_LEN 12
160608c2ecf20Sopenharmony_ci/* The EVB port flags as defined at MC_CMD_VPORT_ALLOC. */
160618c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_OUT_PORT_FLAGS_OFST 0
160628c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_OUT_PORT_FLAGS_LEN 4
160638c2ecf20Sopenharmony_ci/* The v-adaptor flags as defined at MC_CMD_VADAPTOR_ALLOC. */
160648c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_OUT_VADAPTOR_FLAGS_OFST 4
160658c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_OUT_VADAPTOR_FLAGS_LEN 4
160668c2ecf20Sopenharmony_ci/* The number of VLAN tags that may still be added */
160678c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_OFST 8
160688c2ecf20Sopenharmony_ci#define       MC_CMD_VADAPTOR_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_LEN 4
160698c2ecf20Sopenharmony_ci
160708c2ecf20Sopenharmony_ci
160718c2ecf20Sopenharmony_ci/***********************************/
160728c2ecf20Sopenharmony_ci/* MC_CMD_EVB_PORT_ASSIGN
160738c2ecf20Sopenharmony_ci * assign a port to a PCI function.
160748c2ecf20Sopenharmony_ci */
160758c2ecf20Sopenharmony_ci#define MC_CMD_EVB_PORT_ASSIGN 0x9a
160768c2ecf20Sopenharmony_ci#undef MC_CMD_0x9a_PRIVILEGE_CTG
160778c2ecf20Sopenharmony_ci
160788c2ecf20Sopenharmony_ci#define MC_CMD_0x9a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
160798c2ecf20Sopenharmony_ci
160808c2ecf20Sopenharmony_ci/* MC_CMD_EVB_PORT_ASSIGN_IN msgrequest */
160818c2ecf20Sopenharmony_ci#define    MC_CMD_EVB_PORT_ASSIGN_IN_LEN 8
160828c2ecf20Sopenharmony_ci/* The port to assign. */
160838c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_ASSIGN_IN_PORT_ID_OFST 0
160848c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_ASSIGN_IN_PORT_ID_LEN 4
160858c2ecf20Sopenharmony_ci/* The target function to modify. */
160868c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_ASSIGN_IN_FUNCTION_OFST 4
160878c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_ASSIGN_IN_FUNCTION_LEN 4
160888c2ecf20Sopenharmony_ci#define        MC_CMD_EVB_PORT_ASSIGN_IN_PF_OFST 4
160898c2ecf20Sopenharmony_ci#define        MC_CMD_EVB_PORT_ASSIGN_IN_PF_LBN 0
160908c2ecf20Sopenharmony_ci#define        MC_CMD_EVB_PORT_ASSIGN_IN_PF_WIDTH 16
160918c2ecf20Sopenharmony_ci#define        MC_CMD_EVB_PORT_ASSIGN_IN_VF_OFST 4
160928c2ecf20Sopenharmony_ci#define        MC_CMD_EVB_PORT_ASSIGN_IN_VF_LBN 16
160938c2ecf20Sopenharmony_ci#define        MC_CMD_EVB_PORT_ASSIGN_IN_VF_WIDTH 16
160948c2ecf20Sopenharmony_ci
160958c2ecf20Sopenharmony_ci/* MC_CMD_EVB_PORT_ASSIGN_OUT msgresponse */
160968c2ecf20Sopenharmony_ci#define    MC_CMD_EVB_PORT_ASSIGN_OUT_LEN 0
160978c2ecf20Sopenharmony_ci
160988c2ecf20Sopenharmony_ci
160998c2ecf20Sopenharmony_ci/***********************************/
161008c2ecf20Sopenharmony_ci/* MC_CMD_RDWR_A64_REGIONS
161018c2ecf20Sopenharmony_ci * Assign the 64 bit region addresses.
161028c2ecf20Sopenharmony_ci */
161038c2ecf20Sopenharmony_ci#define MC_CMD_RDWR_A64_REGIONS 0x9b
161048c2ecf20Sopenharmony_ci#undef MC_CMD_0x9b_PRIVILEGE_CTG
161058c2ecf20Sopenharmony_ci
161068c2ecf20Sopenharmony_ci#define MC_CMD_0x9b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
161078c2ecf20Sopenharmony_ci
161088c2ecf20Sopenharmony_ci/* MC_CMD_RDWR_A64_REGIONS_IN msgrequest */
161098c2ecf20Sopenharmony_ci#define    MC_CMD_RDWR_A64_REGIONS_IN_LEN 17
161108c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION0_OFST 0
161118c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION0_LEN 4
161128c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION1_OFST 4
161138c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION1_LEN 4
161148c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION2_OFST 8
161158c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION2_LEN 4
161168c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION3_OFST 12
161178c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_REGION3_LEN 4
161188c2ecf20Sopenharmony_ci/* Write enable bits 0-3, set to write, clear to read. */
161198c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_LBN 128
161208c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_WIDTH 4
161218c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_BYTE_OFST 16
161228c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_IN_WRITE_MASK_BYTE_LEN 1
161238c2ecf20Sopenharmony_ci
161248c2ecf20Sopenharmony_ci/* MC_CMD_RDWR_A64_REGIONS_OUT msgresponse: This data always included
161258c2ecf20Sopenharmony_ci * regardless of state of write bits in the request.
161268c2ecf20Sopenharmony_ci */
161278c2ecf20Sopenharmony_ci#define    MC_CMD_RDWR_A64_REGIONS_OUT_LEN 16
161288c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION0_OFST 0
161298c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION0_LEN 4
161308c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION1_OFST 4
161318c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION1_LEN 4
161328c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION2_OFST 8
161338c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION2_LEN 4
161348c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION3_OFST 12
161358c2ecf20Sopenharmony_ci#define       MC_CMD_RDWR_A64_REGIONS_OUT_REGION3_LEN 4
161368c2ecf20Sopenharmony_ci
161378c2ecf20Sopenharmony_ci
161388c2ecf20Sopenharmony_ci/***********************************/
161398c2ecf20Sopenharmony_ci/* MC_CMD_ONLOAD_STACK_ALLOC
161408c2ecf20Sopenharmony_ci * Allocate an Onload stack ID.
161418c2ecf20Sopenharmony_ci */
161428c2ecf20Sopenharmony_ci#define MC_CMD_ONLOAD_STACK_ALLOC 0x9c
161438c2ecf20Sopenharmony_ci#undef MC_CMD_0x9c_PRIVILEGE_CTG
161448c2ecf20Sopenharmony_ci
161458c2ecf20Sopenharmony_ci#define MC_CMD_0x9c_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
161468c2ecf20Sopenharmony_ci
161478c2ecf20Sopenharmony_ci/* MC_CMD_ONLOAD_STACK_ALLOC_IN msgrequest */
161488c2ecf20Sopenharmony_ci#define    MC_CMD_ONLOAD_STACK_ALLOC_IN_LEN 4
161498c2ecf20Sopenharmony_ci/* The handle of the owning upstream port */
161508c2ecf20Sopenharmony_ci#define       MC_CMD_ONLOAD_STACK_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
161518c2ecf20Sopenharmony_ci#define       MC_CMD_ONLOAD_STACK_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
161528c2ecf20Sopenharmony_ci
161538c2ecf20Sopenharmony_ci/* MC_CMD_ONLOAD_STACK_ALLOC_OUT msgresponse */
161548c2ecf20Sopenharmony_ci#define    MC_CMD_ONLOAD_STACK_ALLOC_OUT_LEN 4
161558c2ecf20Sopenharmony_ci/* The handle of the new Onload stack */
161568c2ecf20Sopenharmony_ci#define       MC_CMD_ONLOAD_STACK_ALLOC_OUT_ONLOAD_STACK_ID_OFST 0
161578c2ecf20Sopenharmony_ci#define       MC_CMD_ONLOAD_STACK_ALLOC_OUT_ONLOAD_STACK_ID_LEN 4
161588c2ecf20Sopenharmony_ci
161598c2ecf20Sopenharmony_ci
161608c2ecf20Sopenharmony_ci/***********************************/
161618c2ecf20Sopenharmony_ci/* MC_CMD_ONLOAD_STACK_FREE
161628c2ecf20Sopenharmony_ci * Free an Onload stack ID.
161638c2ecf20Sopenharmony_ci */
161648c2ecf20Sopenharmony_ci#define MC_CMD_ONLOAD_STACK_FREE 0x9d
161658c2ecf20Sopenharmony_ci#undef MC_CMD_0x9d_PRIVILEGE_CTG
161668c2ecf20Sopenharmony_ci
161678c2ecf20Sopenharmony_ci#define MC_CMD_0x9d_PRIVILEGE_CTG SRIOV_CTG_ONLOAD
161688c2ecf20Sopenharmony_ci
161698c2ecf20Sopenharmony_ci/* MC_CMD_ONLOAD_STACK_FREE_IN msgrequest */
161708c2ecf20Sopenharmony_ci#define    MC_CMD_ONLOAD_STACK_FREE_IN_LEN 4
161718c2ecf20Sopenharmony_ci/* The handle of the Onload stack */
161728c2ecf20Sopenharmony_ci#define       MC_CMD_ONLOAD_STACK_FREE_IN_ONLOAD_STACK_ID_OFST 0
161738c2ecf20Sopenharmony_ci#define       MC_CMD_ONLOAD_STACK_FREE_IN_ONLOAD_STACK_ID_LEN 4
161748c2ecf20Sopenharmony_ci
161758c2ecf20Sopenharmony_ci/* MC_CMD_ONLOAD_STACK_FREE_OUT msgresponse */
161768c2ecf20Sopenharmony_ci#define    MC_CMD_ONLOAD_STACK_FREE_OUT_LEN 0
161778c2ecf20Sopenharmony_ci
161788c2ecf20Sopenharmony_ci
161798c2ecf20Sopenharmony_ci/***********************************/
161808c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_ALLOC
161818c2ecf20Sopenharmony_ci * Allocate an RSS context.
161828c2ecf20Sopenharmony_ci */
161838c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_ALLOC 0x9e
161848c2ecf20Sopenharmony_ci#undef MC_CMD_0x9e_PRIVILEGE_CTG
161858c2ecf20Sopenharmony_ci
161868c2ecf20Sopenharmony_ci#define MC_CMD_0x9e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
161878c2ecf20Sopenharmony_ci
161888c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_ALLOC_IN msgrequest */
161898c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN 12
161908c2ecf20Sopenharmony_ci/* The handle of the owning upstream port */
161918c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
161928c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
161938c2ecf20Sopenharmony_ci/* The type of context to allocate */
161948c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_OFST 4
161958c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_LEN 4
161968c2ecf20Sopenharmony_ci/* enum: Allocate a context for exclusive use. The key and indirection table
161978c2ecf20Sopenharmony_ci * must be explicitly configured.
161988c2ecf20Sopenharmony_ci */
161998c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_EXCLUSIVE 0x0
162008c2ecf20Sopenharmony_ci/* enum: Allocate a context for shared use; this will spread across a range of
162018c2ecf20Sopenharmony_ci * queues, but the key and indirection table are pre-configured and may not be
162028c2ecf20Sopenharmony_ci * changed. For this mode, NUM_QUEUES must 2, 4, 8, 16, 32 or 64.
162038c2ecf20Sopenharmony_ci */
162048c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_SHARED 0x1
162058c2ecf20Sopenharmony_ci/* enum: Allocate a context to spread evenly across an arbitrary number of
162068c2ecf20Sopenharmony_ci * queues. No indirection table space is allocated for this context. (EF100 and
162078c2ecf20Sopenharmony_ci * later)
162088c2ecf20Sopenharmony_ci */
162098c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_IN_TYPE_EVEN_SPREADING 0x2
162108c2ecf20Sopenharmony_ci/* Number of queues spanned by this context. For exclusive contexts this must
162118c2ecf20Sopenharmony_ci * be in the range 1 to RSS_MAX_INDIRECTION_QUEUES, where
162128c2ecf20Sopenharmony_ci * RSS_MAX_INDIRECTION_QUEUES is queried from MC_CMD_GET_CAPABILITIES_V9 or if
162138c2ecf20Sopenharmony_ci * V9 is not supported then RSS_MAX_INDIRECTION_QUEUES is 64. Valid entries in
162148c2ecf20Sopenharmony_ci * the indirection table will be in the range 0 to NUM_QUEUES-1. For even-
162158c2ecf20Sopenharmony_ci * spreading contexts this must be in the range 1 to
162168c2ecf20Sopenharmony_ci * RSS_MAX_EVEN_SPREADING_QUEUES as queried from MC_CMD_GET_CAPABILITIES. Note
162178c2ecf20Sopenharmony_ci * that specifying NUM_QUEUES = 1 will not perform any spreading but may still
162188c2ecf20Sopenharmony_ci * be useful as a way of obtaining the Toeplitz hash.
162198c2ecf20Sopenharmony_ci */
162208c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_IN_NUM_QUEUES_OFST 8
162218c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_IN_NUM_QUEUES_LEN 4
162228c2ecf20Sopenharmony_ci
162238c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_ALLOC_V2_IN msgrequest */
162248c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_LEN 16
162258c2ecf20Sopenharmony_ci/* The handle of the owning upstream port */
162268c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_UPSTREAM_PORT_ID_OFST 0
162278c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_UPSTREAM_PORT_ID_LEN 4
162288c2ecf20Sopenharmony_ci/* The type of context to allocate */
162298c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_TYPE_OFST 4
162308c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_TYPE_LEN 4
162318c2ecf20Sopenharmony_ci/* enum: Allocate a context for exclusive use. The key and indirection table
162328c2ecf20Sopenharmony_ci * must be explicitly configured.
162338c2ecf20Sopenharmony_ci */
162348c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_TYPE_EXCLUSIVE 0x0
162358c2ecf20Sopenharmony_ci/* enum: Allocate a context for shared use; this will spread across a range of
162368c2ecf20Sopenharmony_ci * queues, but the key and indirection table are pre-configured and may not be
162378c2ecf20Sopenharmony_ci * changed. For this mode, NUM_QUEUES must 2, 4, 8, 16, 32 or 64.
162388c2ecf20Sopenharmony_ci */
162398c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_TYPE_SHARED 0x1
162408c2ecf20Sopenharmony_ci/* enum: Allocate a context to spread evenly across an arbitrary number of
162418c2ecf20Sopenharmony_ci * queues. No indirection table space is allocated for this context. (EF100 and
162428c2ecf20Sopenharmony_ci * later)
162438c2ecf20Sopenharmony_ci */
162448c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_TYPE_EVEN_SPREADING 0x2
162458c2ecf20Sopenharmony_ci/* Number of queues spanned by this context. For exclusive contexts this must
162468c2ecf20Sopenharmony_ci * be in the range 1 to RSS_MAX_INDIRECTION_QUEUES, where
162478c2ecf20Sopenharmony_ci * RSS_MAX_INDIRECTION_QUEUES is queried from MC_CMD_GET_CAPABILITIES_V9 or if
162488c2ecf20Sopenharmony_ci * V9 is not supported then RSS_MAX_INDIRECTION_QUEUES is 64. Valid entries in
162498c2ecf20Sopenharmony_ci * the indirection table will be in the range 0 to NUM_QUEUES-1. For even-
162508c2ecf20Sopenharmony_ci * spreading contexts this must be in the range 1 to
162518c2ecf20Sopenharmony_ci * RSS_MAX_EVEN_SPREADING_QUEUES as queried from MC_CMD_GET_CAPABILITIES. Note
162528c2ecf20Sopenharmony_ci * that specifying NUM_QUEUES = 1 will not perform any spreading but may still
162538c2ecf20Sopenharmony_ci * be useful as a way of obtaining the Toeplitz hash.
162548c2ecf20Sopenharmony_ci */
162558c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_NUM_QUEUES_OFST 8
162568c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_NUM_QUEUES_LEN 4
162578c2ecf20Sopenharmony_ci/* Size of indirection table to be allocated to this context from the pool.
162588c2ecf20Sopenharmony_ci * Must be a power of 2. The minimum and maximum table size can be queried
162598c2ecf20Sopenharmony_ci * using MC_CMD_GET_CAPABILITIES_V9. If there is not enough space remaining in
162608c2ecf20Sopenharmony_ci * the common pool to allocate the requested table size, due to allocating
162618c2ecf20Sopenharmony_ci * table space to other RSS contexts, then the command will fail with
162628c2ecf20Sopenharmony_ci * MC_CMD_ERR_ENOSPC.
162638c2ecf20Sopenharmony_ci */
162648c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_INDIRECTION_TABLE_SIZE_OFST 12
162658c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_V2_IN_INDIRECTION_TABLE_SIZE_LEN 4
162668c2ecf20Sopenharmony_ci
162678c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_ALLOC_OUT msgresponse */
162688c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN 4
162698c2ecf20Sopenharmony_ci/* The handle of the new RSS context. This should be considered opaque to the
162708c2ecf20Sopenharmony_ci * host, although a value of 0xFFFFFFFF is guaranteed never to be a valid
162718c2ecf20Sopenharmony_ci * handle.
162728c2ecf20Sopenharmony_ci */
162738c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_OFST 0
162748c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_LEN 4
162758c2ecf20Sopenharmony_ci/* enum: guaranteed invalid RSS context handle value */
162768c2ecf20Sopenharmony_ci#define          MC_CMD_RSS_CONTEXT_ALLOC_OUT_RSS_CONTEXT_ID_INVALID 0xffffffff
162778c2ecf20Sopenharmony_ci
162788c2ecf20Sopenharmony_ci
162798c2ecf20Sopenharmony_ci/***********************************/
162808c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_FREE
162818c2ecf20Sopenharmony_ci * Free an RSS context.
162828c2ecf20Sopenharmony_ci */
162838c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_FREE 0x9f
162848c2ecf20Sopenharmony_ci#undef MC_CMD_0x9f_PRIVILEGE_CTG
162858c2ecf20Sopenharmony_ci
162868c2ecf20Sopenharmony_ci#define MC_CMD_0x9f_PRIVILEGE_CTG SRIOV_CTG_GENERAL
162878c2ecf20Sopenharmony_ci
162888c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_FREE_IN msgrequest */
162898c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_FREE_IN_LEN 4
162908c2ecf20Sopenharmony_ci/* The handle of the RSS context */
162918c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_FREE_IN_RSS_CONTEXT_ID_OFST 0
162928c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_FREE_IN_RSS_CONTEXT_ID_LEN 4
162938c2ecf20Sopenharmony_ci
162948c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_FREE_OUT msgresponse */
162958c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_FREE_OUT_LEN 0
162968c2ecf20Sopenharmony_ci
162978c2ecf20Sopenharmony_ci
162988c2ecf20Sopenharmony_ci/***********************************/
162998c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_KEY
163008c2ecf20Sopenharmony_ci * Set the Toeplitz hash key for an RSS context.
163018c2ecf20Sopenharmony_ci */
163028c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_SET_KEY 0xa0
163038c2ecf20Sopenharmony_ci#undef MC_CMD_0xa0_PRIVILEGE_CTG
163048c2ecf20Sopenharmony_ci
163058c2ecf20Sopenharmony_ci#define MC_CMD_0xa0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
163068c2ecf20Sopenharmony_ci
163078c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_KEY_IN msgrequest */
163088c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_SET_KEY_IN_LEN 44
163098c2ecf20Sopenharmony_ci/* The handle of the RSS context */
163108c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_KEY_IN_RSS_CONTEXT_ID_OFST 0
163118c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_KEY_IN_RSS_CONTEXT_ID_LEN 4
163128c2ecf20Sopenharmony_ci/* The 40-byte Toeplitz hash key (TBD endianness issues?) */
163138c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_OFST 4
163148c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_KEY_IN_TOEPLITZ_KEY_LEN 40
163158c2ecf20Sopenharmony_ci
163168c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_KEY_OUT msgresponse */
163178c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN 0
163188c2ecf20Sopenharmony_ci
163198c2ecf20Sopenharmony_ci
163208c2ecf20Sopenharmony_ci/***********************************/
163218c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_KEY
163228c2ecf20Sopenharmony_ci * Get the Toeplitz hash key for an RSS context.
163238c2ecf20Sopenharmony_ci */
163248c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_GET_KEY 0xa1
163258c2ecf20Sopenharmony_ci#undef MC_CMD_0xa1_PRIVILEGE_CTG
163268c2ecf20Sopenharmony_ci
163278c2ecf20Sopenharmony_ci#define MC_CMD_0xa1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
163288c2ecf20Sopenharmony_ci
163298c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_KEY_IN msgrequest */
163308c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_GET_KEY_IN_LEN 4
163318c2ecf20Sopenharmony_ci/* The handle of the RSS context */
163328c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_KEY_IN_RSS_CONTEXT_ID_OFST 0
163338c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_KEY_IN_RSS_CONTEXT_ID_LEN 4
163348c2ecf20Sopenharmony_ci
163358c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_KEY_OUT msgresponse */
163368c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_GET_KEY_OUT_LEN 44
163378c2ecf20Sopenharmony_ci/* The 40-byte Toeplitz hash key (TBD endianness issues?) */
163388c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_KEY_OUT_TOEPLITZ_KEY_OFST 4
163398c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_KEY_OUT_TOEPLITZ_KEY_LEN 40
163408c2ecf20Sopenharmony_ci
163418c2ecf20Sopenharmony_ci
163428c2ecf20Sopenharmony_ci/***********************************/
163438c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_TABLE
163448c2ecf20Sopenharmony_ci * Set the indirection table for an RSS context. This command should only be
163458c2ecf20Sopenharmony_ci * used with indirection tables containing 128 entries, which is the default
163468c2ecf20Sopenharmony_ci * when the RSS context is allocated without specifying a table size.
163478c2ecf20Sopenharmony_ci */
163488c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_SET_TABLE 0xa2
163498c2ecf20Sopenharmony_ci#undef MC_CMD_0xa2_PRIVILEGE_CTG
163508c2ecf20Sopenharmony_ci
163518c2ecf20Sopenharmony_ci#define MC_CMD_0xa2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
163528c2ecf20Sopenharmony_ci
163538c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_TABLE_IN msgrequest */
163548c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_SET_TABLE_IN_LEN 132
163558c2ecf20Sopenharmony_ci/* The handle of the RSS context */
163568c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_TABLE_IN_RSS_CONTEXT_ID_OFST 0
163578c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_TABLE_IN_RSS_CONTEXT_ID_LEN 4
163588c2ecf20Sopenharmony_ci/* The 128-byte indirection table (1 byte per entry) */
163598c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_TABLE_IN_INDIRECTION_TABLE_OFST 4
163608c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_TABLE_IN_INDIRECTION_TABLE_LEN 128
163618c2ecf20Sopenharmony_ci
163628c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_TABLE_OUT msgresponse */
163638c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_SET_TABLE_OUT_LEN 0
163648c2ecf20Sopenharmony_ci
163658c2ecf20Sopenharmony_ci
163668c2ecf20Sopenharmony_ci/***********************************/
163678c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_TABLE
163688c2ecf20Sopenharmony_ci * Get the indirection table for an RSS context. This command should only be
163698c2ecf20Sopenharmony_ci * used with indirection tables containing 128 entries, which is the default
163708c2ecf20Sopenharmony_ci * when the RSS context is allocated without specifying a table size.
163718c2ecf20Sopenharmony_ci */
163728c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_GET_TABLE 0xa3
163738c2ecf20Sopenharmony_ci#undef MC_CMD_0xa3_PRIVILEGE_CTG
163748c2ecf20Sopenharmony_ci
163758c2ecf20Sopenharmony_ci#define MC_CMD_0xa3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
163768c2ecf20Sopenharmony_ci
163778c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_TABLE_IN msgrequest */
163788c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_GET_TABLE_IN_LEN 4
163798c2ecf20Sopenharmony_ci/* The handle of the RSS context */
163808c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_TABLE_IN_RSS_CONTEXT_ID_OFST 0
163818c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_TABLE_IN_RSS_CONTEXT_ID_LEN 4
163828c2ecf20Sopenharmony_ci
163838c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_TABLE_OUT msgresponse */
163848c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_LEN 132
163858c2ecf20Sopenharmony_ci/* The 128-byte indirection table (1 byte per entry) */
163868c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_INDIRECTION_TABLE_OFST 4
163878c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_TABLE_OUT_INDIRECTION_TABLE_LEN 128
163888c2ecf20Sopenharmony_ci
163898c2ecf20Sopenharmony_ci
163908c2ecf20Sopenharmony_ci/***********************************/
163918c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_WRITE_TABLE
163928c2ecf20Sopenharmony_ci * Write a portion of a selectable-size indirection table for an RSS context.
163938c2ecf20Sopenharmony_ci * This command must be used instead of MC_CMD_RSS_CONTEXT_SET_TABLE if the
163948c2ecf20Sopenharmony_ci * RSS_SELECTABLE_TABLE_SIZE bit is set in MC_CMD_GET_CAPABILITIES.
163958c2ecf20Sopenharmony_ci */
163968c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_WRITE_TABLE 0x13e
163978c2ecf20Sopenharmony_ci#undef MC_CMD_0x13e_PRIVILEGE_CTG
163988c2ecf20Sopenharmony_ci
163998c2ecf20Sopenharmony_ci#define MC_CMD_0x13e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
164008c2ecf20Sopenharmony_ci
164018c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN msgrequest */
164028c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_LENMIN 8
164038c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_LENMAX 252
164048c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_LENMAX_MCDI2 1020
164058c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_LEN(num) (4+4*(num))
164068c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_ENTRIES_NUM(len) (((len)-4)/4)
164078c2ecf20Sopenharmony_ci/* The handle of the RSS context */
164088c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_RSS_CONTEXT_ID_OFST 0
164098c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_RSS_CONTEXT_ID_LEN 4
164108c2ecf20Sopenharmony_ci/* An array of index-value pairs to be written to the table. Structure is
164118c2ecf20Sopenharmony_ci * MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY.
164128c2ecf20Sopenharmony_ci */
164138c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_ENTRIES_OFST 4
164148c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_ENTRIES_LEN 4
164158c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_ENTRIES_MINNUM 1
164168c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_ENTRIES_MAXNUM 62
164178c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_IN_ENTRIES_MAXNUM_MCDI2 254
164188c2ecf20Sopenharmony_ci
164198c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_WRITE_TABLE_OUT msgresponse */
164208c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_OUT_LEN 0
164218c2ecf20Sopenharmony_ci
164228c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY structuredef */
164238c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_LEN 4
164248c2ecf20Sopenharmony_ci/* The index of the table entry to be written. */
164258c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_INDEX_OFST 0
164268c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_INDEX_LEN 2
164278c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_INDEX_LBN 0
164288c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_INDEX_WIDTH 16
164298c2ecf20Sopenharmony_ci/* The value to write into the table entry. */
164308c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_VALUE_OFST 2
164318c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_VALUE_LEN 2
164328c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_VALUE_LBN 16
164338c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_WRITE_TABLE_ENTRY_VALUE_WIDTH 16
164348c2ecf20Sopenharmony_ci
164358c2ecf20Sopenharmony_ci
164368c2ecf20Sopenharmony_ci/***********************************/
164378c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_READ_TABLE
164388c2ecf20Sopenharmony_ci * Read a portion of a selectable-size indirection table for an RSS context.
164398c2ecf20Sopenharmony_ci * This command must be used instead of MC_CMD_RSS_CONTEXT_GET_TABLE if the
164408c2ecf20Sopenharmony_ci * RSS_SELECTABLE_TABLE_SIZE bit is set in MC_CMD_GET_CAPABILITIES.
164418c2ecf20Sopenharmony_ci */
164428c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_READ_TABLE 0x13f
164438c2ecf20Sopenharmony_ci#undef MC_CMD_0x13f_PRIVILEGE_CTG
164448c2ecf20Sopenharmony_ci
164458c2ecf20Sopenharmony_ci#define MC_CMD_0x13f_PRIVILEGE_CTG SRIOV_CTG_GENERAL
164468c2ecf20Sopenharmony_ci
164478c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_READ_TABLE_IN msgrequest */
164488c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_IN_LENMIN 6
164498c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_IN_LENMAX 252
164508c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_IN_LENMAX_MCDI2 1020
164518c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_IN_LEN(num) (4+2*(num))
164528c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_IN_INDICES_NUM(len) (((len)-4)/2)
164538c2ecf20Sopenharmony_ci/* The handle of the RSS context */
164548c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_RSS_CONTEXT_ID_OFST 0
164558c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_RSS_CONTEXT_ID_LEN 4
164568c2ecf20Sopenharmony_ci/* An array containing the indices of the entries to be read. */
164578c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_INDICES_OFST 4
164588c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_INDICES_LEN 2
164598c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_INDICES_MINNUM 1
164608c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_INDICES_MAXNUM 124
164618c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_IN_INDICES_MAXNUM_MCDI2 508
164628c2ecf20Sopenharmony_ci
164638c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_READ_TABLE_OUT msgresponse */
164648c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_LENMIN 2
164658c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_LENMAX 252
164668c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_LENMAX_MCDI2 1020
164678c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_LEN(num) (0+2*(num))
164688c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_DATA_NUM(len) (((len)-0)/2)
164698c2ecf20Sopenharmony_ci/* A buffer containing the requested entries read from the table. */
164708c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_DATA_OFST 0
164718c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_DATA_LEN 2
164728c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_DATA_MINNUM 1
164738c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_DATA_MAXNUM 126
164748c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_READ_TABLE_OUT_DATA_MAXNUM_MCDI2 510
164758c2ecf20Sopenharmony_ci
164768c2ecf20Sopenharmony_ci
164778c2ecf20Sopenharmony_ci/***********************************/
164788c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_FLAGS
164798c2ecf20Sopenharmony_ci * Set various control flags for an RSS context.
164808c2ecf20Sopenharmony_ci */
164818c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_SET_FLAGS 0xe1
164828c2ecf20Sopenharmony_ci#undef MC_CMD_0xe1_PRIVILEGE_CTG
164838c2ecf20Sopenharmony_ci
164848c2ecf20Sopenharmony_ci#define MC_CMD_0xe1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
164858c2ecf20Sopenharmony_ci
164868c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_FLAGS_IN msgrequest */
164878c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_LEN 8
164888c2ecf20Sopenharmony_ci/* The handle of the RSS context */
164898c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RSS_CONTEXT_ID_OFST 0
164908c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RSS_CONTEXT_ID_LEN 4
164918c2ecf20Sopenharmony_ci/* Hash control flags. The _EN bits are always supported, but new modes are
164928c2ecf20Sopenharmony_ci * available when ADDITIONAL_RSS_MODES is reported by MC_CMD_GET_CAPABILITIES:
164938c2ecf20Sopenharmony_ci * in this case, the MODE fields may be set to non-zero values, and will take
164948c2ecf20Sopenharmony_ci * effect regardless of the settings of the _EN flags. See the RSS_MODE
164958c2ecf20Sopenharmony_ci * structure for the meaning of the mode bits. Drivers must check the
164968c2ecf20Sopenharmony_ci * capability before trying to set any _MODE fields, as older firmware will
164978c2ecf20Sopenharmony_ci * reject any attempt to set the FLAGS field to a value > 0xff with EINVAL. In
164988c2ecf20Sopenharmony_ci * the case where all the _MODE flags are zero, the _EN flags take effect,
164998c2ecf20Sopenharmony_ci * providing backward compatibility for existing drivers. (Setting all _MODE
165008c2ecf20Sopenharmony_ci * *and* all _EN flags to zero is valid, to disable RSS spreading for that
165018c2ecf20Sopenharmony_ci * particular packet type.)
165028c2ecf20Sopenharmony_ci */
165038c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_FLAGS_OFST 4
165048c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_FLAGS_LEN 4
165058c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_OFST 4
165068c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_LBN 0
165078c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV4_EN_WIDTH 1
165088c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_OFST 4
165098c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_LBN 1
165108c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV4_EN_WIDTH 1
165118c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_OFST 4
165128c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_LBN 2
165138c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_IPV6_EN_WIDTH 1
165148c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_OFST 4
165158c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_LBN 3
165168c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TOEPLITZ_TCPV6_EN_WIDTH 1
165178c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RESERVED_OFST 4
165188c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RESERVED_LBN 4
165198c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_RESERVED_WIDTH 4
165208c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE_OFST 4
165218c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE_LBN 8
165228c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV4_RSS_MODE_WIDTH 4
165238c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV4_RSS_MODE_OFST 4
165248c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV4_RSS_MODE_LBN 12
165258c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV4_RSS_MODE_WIDTH 4
165268c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV4_RSS_MODE_OFST 4
165278c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV4_RSS_MODE_LBN 16
165288c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV4_RSS_MODE_WIDTH 4
165298c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV6_RSS_MODE_OFST 4
165308c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV6_RSS_MODE_LBN 20
165318c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_TCP_IPV6_RSS_MODE_WIDTH 4
165328c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV6_RSS_MODE_OFST 4
165338c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV6_RSS_MODE_LBN 24
165348c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_UDP_IPV6_RSS_MODE_WIDTH 4
165358c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV6_RSS_MODE_OFST 4
165368c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV6_RSS_MODE_LBN 28
165378c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_OTHER_IPV6_RSS_MODE_WIDTH 4
165388c2ecf20Sopenharmony_ci
165398c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT msgresponse */
165408c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN 0
165418c2ecf20Sopenharmony_ci
165428c2ecf20Sopenharmony_ci
165438c2ecf20Sopenharmony_ci/***********************************/
165448c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_FLAGS
165458c2ecf20Sopenharmony_ci * Get various control flags for an RSS context.
165468c2ecf20Sopenharmony_ci */
165478c2ecf20Sopenharmony_ci#define MC_CMD_RSS_CONTEXT_GET_FLAGS 0xe2
165488c2ecf20Sopenharmony_ci#undef MC_CMD_0xe2_PRIVILEGE_CTG
165498c2ecf20Sopenharmony_ci
165508c2ecf20Sopenharmony_ci#define MC_CMD_0xe2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
165518c2ecf20Sopenharmony_ci
165528c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_FLAGS_IN msgrequest */
165538c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_LEN 4
165548c2ecf20Sopenharmony_ci/* The handle of the RSS context */
165558c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_RSS_CONTEXT_ID_OFST 0
165568c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_FLAGS_IN_RSS_CONTEXT_ID_LEN 4
165578c2ecf20Sopenharmony_ci
165588c2ecf20Sopenharmony_ci/* MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT msgresponse */
165598c2ecf20Sopenharmony_ci#define    MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_LEN 8
165608c2ecf20Sopenharmony_ci/* Hash control flags. If all _MODE bits are zero (which will always be true
165618c2ecf20Sopenharmony_ci * for older firmware which does not report the ADDITIONAL_RSS_MODES
165628c2ecf20Sopenharmony_ci * capability), the _EN bits report the state. If any _MODE bits are non-zero
165638c2ecf20Sopenharmony_ci * (which will only be true when the firmware reports ADDITIONAL_RSS_MODES)
165648c2ecf20Sopenharmony_ci * then the _EN bits should be disregarded, although the _MODE flags are
165658c2ecf20Sopenharmony_ci * guaranteed to be consistent with the _EN flags for a freshly-allocated RSS
165668c2ecf20Sopenharmony_ci * context and in the case where the _EN flags were used in the SET. This
165678c2ecf20Sopenharmony_ci * provides backward compatibility: old drivers will not be attempting to
165688c2ecf20Sopenharmony_ci * derive any meaning from the _MODE bits (and can never set them to any value
165698c2ecf20Sopenharmony_ci * not representable by the _EN bits); new drivers can always determine the
165708c2ecf20Sopenharmony_ci * mode by looking only at the _MODE bits; the value returned by a GET can
165718c2ecf20Sopenharmony_ci * always be used for a SET regardless of old/new driver vs. old/new firmware.
165728c2ecf20Sopenharmony_ci */
165738c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_FLAGS_OFST 4
165748c2ecf20Sopenharmony_ci#define       MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_FLAGS_LEN 4
165758c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_OFST 4
165768c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_LBN 0
165778c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV4_EN_WIDTH 1
165788c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_OFST 4
165798c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_LBN 1
165808c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV4_EN_WIDTH 1
165818c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_OFST 4
165828c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_LBN 2
165838c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_IPV6_EN_WIDTH 1
165848c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_OFST 4
165858c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_LBN 3
165868c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TOEPLITZ_TCPV6_EN_WIDTH 1
165878c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_RESERVED_OFST 4
165888c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_RESERVED_LBN 4
165898c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_RESERVED_WIDTH 4
165908c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV4_RSS_MODE_OFST 4
165918c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV4_RSS_MODE_LBN 8
165928c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV4_RSS_MODE_WIDTH 4
165938c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV4_RSS_MODE_OFST 4
165948c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV4_RSS_MODE_LBN 12
165958c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV4_RSS_MODE_WIDTH 4
165968c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV4_RSS_MODE_OFST 4
165978c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV4_RSS_MODE_LBN 16
165988c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV4_RSS_MODE_WIDTH 4
165998c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV6_RSS_MODE_OFST 4
166008c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV6_RSS_MODE_LBN 20
166018c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_TCP_IPV6_RSS_MODE_WIDTH 4
166028c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV6_RSS_MODE_OFST 4
166038c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV6_RSS_MODE_LBN 24
166048c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_UDP_IPV6_RSS_MODE_WIDTH 4
166058c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV6_RSS_MODE_OFST 4
166068c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV6_RSS_MODE_LBN 28
166078c2ecf20Sopenharmony_ci#define        MC_CMD_RSS_CONTEXT_GET_FLAGS_OUT_OTHER_IPV6_RSS_MODE_WIDTH 4
166088c2ecf20Sopenharmony_ci
166098c2ecf20Sopenharmony_ci
166108c2ecf20Sopenharmony_ci/***********************************/
166118c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_ALLOC
166128c2ecf20Sopenharmony_ci * Allocate a .1p mapping.
166138c2ecf20Sopenharmony_ci */
166148c2ecf20Sopenharmony_ci#define MC_CMD_DOT1P_MAPPING_ALLOC 0xa4
166158c2ecf20Sopenharmony_ci#undef MC_CMD_0xa4_PRIVILEGE_CTG
166168c2ecf20Sopenharmony_ci
166178c2ecf20Sopenharmony_ci#define MC_CMD_0xa4_PRIVILEGE_CTG SRIOV_CTG_ADMIN
166188c2ecf20Sopenharmony_ci
166198c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_ALLOC_IN msgrequest */
166208c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_ALLOC_IN_LEN 8
166218c2ecf20Sopenharmony_ci/* The handle of the owning upstream port */
166228c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_ALLOC_IN_UPSTREAM_PORT_ID_OFST 0
166238c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_ALLOC_IN_UPSTREAM_PORT_ID_LEN 4
166248c2ecf20Sopenharmony_ci/* Number of queues spanned by this mapping, in the range 1-64; valid fixed
166258c2ecf20Sopenharmony_ci * offsets in the mapping table will be in the range 0 to NUM_QUEUES-1, and
166268c2ecf20Sopenharmony_ci * referenced RSS contexts must span no more than this number.
166278c2ecf20Sopenharmony_ci */
166288c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_ALLOC_IN_NUM_QUEUES_OFST 4
166298c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_ALLOC_IN_NUM_QUEUES_LEN 4
166308c2ecf20Sopenharmony_ci
166318c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_ALLOC_OUT msgresponse */
166328c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_ALLOC_OUT_LEN 4
166338c2ecf20Sopenharmony_ci/* The handle of the new .1p mapping. This should be considered opaque to the
166348c2ecf20Sopenharmony_ci * host, although a value of 0xFFFFFFFF is guaranteed never to be a valid
166358c2ecf20Sopenharmony_ci * handle.
166368c2ecf20Sopenharmony_ci */
166378c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_OFST 0
166388c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_LEN 4
166398c2ecf20Sopenharmony_ci/* enum: guaranteed invalid .1p mapping handle value */
166408c2ecf20Sopenharmony_ci#define          MC_CMD_DOT1P_MAPPING_ALLOC_OUT_DOT1P_MAPPING_ID_INVALID 0xffffffff
166418c2ecf20Sopenharmony_ci
166428c2ecf20Sopenharmony_ci
166438c2ecf20Sopenharmony_ci/***********************************/
166448c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_FREE
166458c2ecf20Sopenharmony_ci * Free a .1p mapping.
166468c2ecf20Sopenharmony_ci */
166478c2ecf20Sopenharmony_ci#define MC_CMD_DOT1P_MAPPING_FREE 0xa5
166488c2ecf20Sopenharmony_ci#undef MC_CMD_0xa5_PRIVILEGE_CTG
166498c2ecf20Sopenharmony_ci
166508c2ecf20Sopenharmony_ci#define MC_CMD_0xa5_PRIVILEGE_CTG SRIOV_CTG_ADMIN
166518c2ecf20Sopenharmony_ci
166528c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_FREE_IN msgrequest */
166538c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_FREE_IN_LEN 4
166548c2ecf20Sopenharmony_ci/* The handle of the .1p mapping */
166558c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_FREE_IN_DOT1P_MAPPING_ID_OFST 0
166568c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_FREE_IN_DOT1P_MAPPING_ID_LEN 4
166578c2ecf20Sopenharmony_ci
166588c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_FREE_OUT msgresponse */
166598c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_FREE_OUT_LEN 0
166608c2ecf20Sopenharmony_ci
166618c2ecf20Sopenharmony_ci
166628c2ecf20Sopenharmony_ci/***********************************/
166638c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_SET_TABLE
166648c2ecf20Sopenharmony_ci * Set the mapping table for a .1p mapping.
166658c2ecf20Sopenharmony_ci */
166668c2ecf20Sopenharmony_ci#define MC_CMD_DOT1P_MAPPING_SET_TABLE 0xa6
166678c2ecf20Sopenharmony_ci#undef MC_CMD_0xa6_PRIVILEGE_CTG
166688c2ecf20Sopenharmony_ci
166698c2ecf20Sopenharmony_ci#define MC_CMD_0xa6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
166708c2ecf20Sopenharmony_ci
166718c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_SET_TABLE_IN msgrequest */
166728c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_LEN 36
166738c2ecf20Sopenharmony_ci/* The handle of the .1p mapping */
166748c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_DOT1P_MAPPING_ID_OFST 0
166758c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_DOT1P_MAPPING_ID_LEN 4
166768c2ecf20Sopenharmony_ci/* Per-priority mappings (1 32-bit word per entry - an offset or RSS context
166778c2ecf20Sopenharmony_ci * handle)
166788c2ecf20Sopenharmony_ci */
166798c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_MAPPING_TABLE_OFST 4
166808c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_SET_TABLE_IN_MAPPING_TABLE_LEN 32
166818c2ecf20Sopenharmony_ci
166828c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_SET_TABLE_OUT msgresponse */
166838c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_SET_TABLE_OUT_LEN 0
166848c2ecf20Sopenharmony_ci
166858c2ecf20Sopenharmony_ci
166868c2ecf20Sopenharmony_ci/***********************************/
166878c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_GET_TABLE
166888c2ecf20Sopenharmony_ci * Get the mapping table for a .1p mapping.
166898c2ecf20Sopenharmony_ci */
166908c2ecf20Sopenharmony_ci#define MC_CMD_DOT1P_MAPPING_GET_TABLE 0xa7
166918c2ecf20Sopenharmony_ci#undef MC_CMD_0xa7_PRIVILEGE_CTG
166928c2ecf20Sopenharmony_ci
166938c2ecf20Sopenharmony_ci#define MC_CMD_0xa7_PRIVILEGE_CTG SRIOV_CTG_ADMIN
166948c2ecf20Sopenharmony_ci
166958c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_GET_TABLE_IN msgrequest */
166968c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_LEN 4
166978c2ecf20Sopenharmony_ci/* The handle of the .1p mapping */
166988c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_DOT1P_MAPPING_ID_OFST 0
166998c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_GET_TABLE_IN_DOT1P_MAPPING_ID_LEN 4
167008c2ecf20Sopenharmony_ci
167018c2ecf20Sopenharmony_ci/* MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT msgresponse */
167028c2ecf20Sopenharmony_ci#define    MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_LEN 36
167038c2ecf20Sopenharmony_ci/* Per-priority mappings (1 32-bit word per entry - an offset or RSS context
167048c2ecf20Sopenharmony_ci * handle)
167058c2ecf20Sopenharmony_ci */
167068c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_MAPPING_TABLE_OFST 4
167078c2ecf20Sopenharmony_ci#define       MC_CMD_DOT1P_MAPPING_GET_TABLE_OUT_MAPPING_TABLE_LEN 32
167088c2ecf20Sopenharmony_ci
167098c2ecf20Sopenharmony_ci
167108c2ecf20Sopenharmony_ci/***********************************/
167118c2ecf20Sopenharmony_ci/* MC_CMD_GET_VECTOR_CFG
167128c2ecf20Sopenharmony_ci * Get Interrupt Vector config for this PF.
167138c2ecf20Sopenharmony_ci */
167148c2ecf20Sopenharmony_ci#define MC_CMD_GET_VECTOR_CFG 0xbf
167158c2ecf20Sopenharmony_ci#undef MC_CMD_0xbf_PRIVILEGE_CTG
167168c2ecf20Sopenharmony_ci
167178c2ecf20Sopenharmony_ci#define MC_CMD_0xbf_PRIVILEGE_CTG SRIOV_CTG_GENERAL
167188c2ecf20Sopenharmony_ci
167198c2ecf20Sopenharmony_ci/* MC_CMD_GET_VECTOR_CFG_IN msgrequest */
167208c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VECTOR_CFG_IN_LEN 0
167218c2ecf20Sopenharmony_ci
167228c2ecf20Sopenharmony_ci/* MC_CMD_GET_VECTOR_CFG_OUT msgresponse */
167238c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VECTOR_CFG_OUT_LEN 12
167248c2ecf20Sopenharmony_ci/* Base absolute interrupt vector number. */
167258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VECTOR_CFG_OUT_VEC_BASE_OFST 0
167268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VECTOR_CFG_OUT_VEC_BASE_LEN 4
167278c2ecf20Sopenharmony_ci/* Number of interrupt vectors allocate to this PF. */
167288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_PF_OFST 4
167298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_PF_LEN 4
167308c2ecf20Sopenharmony_ci/* Number of interrupt vectors to allocate per VF. */
167318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_VF_OFST 8
167328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VECTOR_CFG_OUT_VECS_PER_VF_LEN 4
167338c2ecf20Sopenharmony_ci
167348c2ecf20Sopenharmony_ci
167358c2ecf20Sopenharmony_ci/***********************************/
167368c2ecf20Sopenharmony_ci/* MC_CMD_SET_VECTOR_CFG
167378c2ecf20Sopenharmony_ci * Set Interrupt Vector config for this PF.
167388c2ecf20Sopenharmony_ci */
167398c2ecf20Sopenharmony_ci#define MC_CMD_SET_VECTOR_CFG 0xc0
167408c2ecf20Sopenharmony_ci#undef MC_CMD_0xc0_PRIVILEGE_CTG
167418c2ecf20Sopenharmony_ci
167428c2ecf20Sopenharmony_ci#define MC_CMD_0xc0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
167438c2ecf20Sopenharmony_ci
167448c2ecf20Sopenharmony_ci/* MC_CMD_SET_VECTOR_CFG_IN msgrequest */
167458c2ecf20Sopenharmony_ci#define    MC_CMD_SET_VECTOR_CFG_IN_LEN 12
167468c2ecf20Sopenharmony_ci/* Base absolute interrupt vector number, or MC_CMD_RESOURCE_INSTANCE_ANY to
167478c2ecf20Sopenharmony_ci * let the system find a suitable base.
167488c2ecf20Sopenharmony_ci */
167498c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VECTOR_CFG_IN_VEC_BASE_OFST 0
167508c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VECTOR_CFG_IN_VEC_BASE_LEN 4
167518c2ecf20Sopenharmony_ci/* Number of interrupt vectors allocate to this PF. */
167528c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_PF_OFST 4
167538c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_PF_LEN 4
167548c2ecf20Sopenharmony_ci/* Number of interrupt vectors to allocate per VF. */
167558c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_VF_OFST 8
167568c2ecf20Sopenharmony_ci#define       MC_CMD_SET_VECTOR_CFG_IN_VECS_PER_VF_LEN 4
167578c2ecf20Sopenharmony_ci
167588c2ecf20Sopenharmony_ci/* MC_CMD_SET_VECTOR_CFG_OUT msgresponse */
167598c2ecf20Sopenharmony_ci#define    MC_CMD_SET_VECTOR_CFG_OUT_LEN 0
167608c2ecf20Sopenharmony_ci
167618c2ecf20Sopenharmony_ci
167628c2ecf20Sopenharmony_ci/***********************************/
167638c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_ADD_MAC_ADDRESS
167648c2ecf20Sopenharmony_ci * Add a MAC address to a v-port
167658c2ecf20Sopenharmony_ci */
167668c2ecf20Sopenharmony_ci#define MC_CMD_VPORT_ADD_MAC_ADDRESS 0xa8
167678c2ecf20Sopenharmony_ci#undef MC_CMD_0xa8_PRIVILEGE_CTG
167688c2ecf20Sopenharmony_ci
167698c2ecf20Sopenharmony_ci#define MC_CMD_0xa8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
167708c2ecf20Sopenharmony_ci
167718c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_ADD_MAC_ADDRESS_IN msgrequest */
167728c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_LEN 10
167738c2ecf20Sopenharmony_ci/* The handle of the v-port */
167748c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_VPORT_ID_OFST 0
167758c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_VPORT_ID_LEN 4
167768c2ecf20Sopenharmony_ci/* MAC address to add */
167778c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_MACADDR_OFST 4
167788c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_ADD_MAC_ADDRESS_IN_MACADDR_LEN 6
167798c2ecf20Sopenharmony_ci
167808c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT msgresponse */
167818c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_ADD_MAC_ADDRESS_OUT_LEN 0
167828c2ecf20Sopenharmony_ci
167838c2ecf20Sopenharmony_ci
167848c2ecf20Sopenharmony_ci/***********************************/
167858c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_DEL_MAC_ADDRESS
167868c2ecf20Sopenharmony_ci * Delete a MAC address from a v-port
167878c2ecf20Sopenharmony_ci */
167888c2ecf20Sopenharmony_ci#define MC_CMD_VPORT_DEL_MAC_ADDRESS 0xa9
167898c2ecf20Sopenharmony_ci#undef MC_CMD_0xa9_PRIVILEGE_CTG
167908c2ecf20Sopenharmony_ci
167918c2ecf20Sopenharmony_ci#define MC_CMD_0xa9_PRIVILEGE_CTG SRIOV_CTG_GENERAL
167928c2ecf20Sopenharmony_ci
167938c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_DEL_MAC_ADDRESS_IN msgrequest */
167948c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_LEN 10
167958c2ecf20Sopenharmony_ci/* The handle of the v-port */
167968c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID_OFST 0
167978c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_VPORT_ID_LEN 4
167988c2ecf20Sopenharmony_ci/* MAC address to add */
167998c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_MACADDR_OFST 4
168008c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_DEL_MAC_ADDRESS_IN_MACADDR_LEN 6
168018c2ecf20Sopenharmony_ci
168028c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT msgresponse */
168038c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_DEL_MAC_ADDRESS_OUT_LEN 0
168048c2ecf20Sopenharmony_ci
168058c2ecf20Sopenharmony_ci
168068c2ecf20Sopenharmony_ci/***********************************/
168078c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_GET_MAC_ADDRESSES
168088c2ecf20Sopenharmony_ci * Delete a MAC address from a v-port
168098c2ecf20Sopenharmony_ci */
168108c2ecf20Sopenharmony_ci#define MC_CMD_VPORT_GET_MAC_ADDRESSES 0xaa
168118c2ecf20Sopenharmony_ci#undef MC_CMD_0xaa_PRIVILEGE_CTG
168128c2ecf20Sopenharmony_ci
168138c2ecf20Sopenharmony_ci#define MC_CMD_0xaa_PRIVILEGE_CTG SRIOV_CTG_GENERAL
168148c2ecf20Sopenharmony_ci
168158c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_GET_MAC_ADDRESSES_IN msgrequest */
168168c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN 4
168178c2ecf20Sopenharmony_ci/* The handle of the v-port */
168188c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_VPORT_ID_OFST 0
168198c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_VPORT_ID_LEN 4
168208c2ecf20Sopenharmony_ci
168218c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT msgresponse */
168228c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMIN 4
168238c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX 250
168248c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX_MCDI2 1018
168258c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LEN(num) (4+6*(num))
168268c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_NUM(len) (((len)-4)/6)
168278c2ecf20Sopenharmony_ci/* The number of MAC addresses returned */
168288c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_COUNT_OFST 0
168298c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_COUNT_LEN 4
168308c2ecf20Sopenharmony_ci/* Array of MAC addresses */
168318c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_OFST 4
168328c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_LEN 6
168338c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MINNUM 0
168348c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MAXNUM 41
168358c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_MACADDR_MAXNUM_MCDI2 169
168368c2ecf20Sopenharmony_ci
168378c2ecf20Sopenharmony_ci
168388c2ecf20Sopenharmony_ci/***********************************/
168398c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_RECONFIGURE
168408c2ecf20Sopenharmony_ci * Replace VLAN tags and/or MAC addresses of an existing v-port. If the v-port
168418c2ecf20Sopenharmony_ci * has already been passed to another function (v-port's user), then that
168428c2ecf20Sopenharmony_ci * function will be reset before applying the changes.
168438c2ecf20Sopenharmony_ci */
168448c2ecf20Sopenharmony_ci#define MC_CMD_VPORT_RECONFIGURE 0xeb
168458c2ecf20Sopenharmony_ci#undef MC_CMD_0xeb_PRIVILEGE_CTG
168468c2ecf20Sopenharmony_ci
168478c2ecf20Sopenharmony_ci#define MC_CMD_0xeb_PRIVILEGE_CTG SRIOV_CTG_GENERAL
168488c2ecf20Sopenharmony_ci
168498c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_RECONFIGURE_IN msgrequest */
168508c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_RECONFIGURE_IN_LEN 44
168518c2ecf20Sopenharmony_ci/* The handle of the v-port */
168528c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_VPORT_ID_OFST 0
168538c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_VPORT_ID_LEN 4
168548c2ecf20Sopenharmony_ci/* Flags requesting what should be changed. */
168558c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_FLAGS_OFST 4
168568c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_FLAGS_LEN 4
168578c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_OFST 4
168588c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_LBN 0
168598c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_WIDTH 1
168608c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_OFST 4
168618c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_LBN 1
168628c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_WIDTH 1
168638c2ecf20Sopenharmony_ci/* The number of VLAN tags to insert/remove. An error will be returned if
168648c2ecf20Sopenharmony_ci * incompatible with the number of VLAN tags specified for the upstream
168658c2ecf20Sopenharmony_ci * v-switch.
168668c2ecf20Sopenharmony_ci */
168678c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_NUM_VLAN_TAGS_OFST 8
168688c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_NUM_VLAN_TAGS_LEN 4
168698c2ecf20Sopenharmony_ci/* The actual VLAN tags to insert/remove */
168708c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAGS_OFST 12
168718c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAGS_LEN 4
168728c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_OFST 12
168738c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_LBN 0
168748c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_WIDTH 16
168758c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_OFST 12
168768c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_LBN 16
168778c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_WIDTH 16
168788c2ecf20Sopenharmony_ci/* The number of MAC addresses to add */
168798c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_NUM_MACADDRS_OFST 16
168808c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_NUM_MACADDRS_LEN 4
168818c2ecf20Sopenharmony_ci/* MAC addresses to add */
168828c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_OFST 20
168838c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_LEN 6
168848c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_NUM 4
168858c2ecf20Sopenharmony_ci
168868c2ecf20Sopenharmony_ci/* MC_CMD_VPORT_RECONFIGURE_OUT msgresponse */
168878c2ecf20Sopenharmony_ci#define    MC_CMD_VPORT_RECONFIGURE_OUT_LEN 4
168888c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_OUT_FLAGS_OFST 0
168898c2ecf20Sopenharmony_ci#define       MC_CMD_VPORT_RECONFIGURE_OUT_FLAGS_LEN 4
168908c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_OFST 0
168918c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_LBN 0
168928c2ecf20Sopenharmony_ci#define        MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_WIDTH 1
168938c2ecf20Sopenharmony_ci
168948c2ecf20Sopenharmony_ci
168958c2ecf20Sopenharmony_ci/***********************************/
168968c2ecf20Sopenharmony_ci/* MC_CMD_EVB_PORT_QUERY
168978c2ecf20Sopenharmony_ci * read some config of v-port.
168988c2ecf20Sopenharmony_ci */
168998c2ecf20Sopenharmony_ci#define MC_CMD_EVB_PORT_QUERY 0x62
169008c2ecf20Sopenharmony_ci#undef MC_CMD_0x62_PRIVILEGE_CTG
169018c2ecf20Sopenharmony_ci
169028c2ecf20Sopenharmony_ci#define MC_CMD_0x62_PRIVILEGE_CTG SRIOV_CTG_GENERAL
169038c2ecf20Sopenharmony_ci
169048c2ecf20Sopenharmony_ci/* MC_CMD_EVB_PORT_QUERY_IN msgrequest */
169058c2ecf20Sopenharmony_ci#define    MC_CMD_EVB_PORT_QUERY_IN_LEN 4
169068c2ecf20Sopenharmony_ci/* The handle of the v-port */
169078c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_QUERY_IN_PORT_ID_OFST 0
169088c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_QUERY_IN_PORT_ID_LEN 4
169098c2ecf20Sopenharmony_ci
169108c2ecf20Sopenharmony_ci/* MC_CMD_EVB_PORT_QUERY_OUT msgresponse */
169118c2ecf20Sopenharmony_ci#define    MC_CMD_EVB_PORT_QUERY_OUT_LEN 8
169128c2ecf20Sopenharmony_ci/* The EVB port flags as defined at MC_CMD_VPORT_ALLOC. */
169138c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_QUERY_OUT_PORT_FLAGS_OFST 0
169148c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_QUERY_OUT_PORT_FLAGS_LEN 4
169158c2ecf20Sopenharmony_ci/* The number of VLAN tags that may be used on a v-adaptor connected to this
169168c2ecf20Sopenharmony_ci * EVB port.
169178c2ecf20Sopenharmony_ci */
169188c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_OFST 4
169198c2ecf20Sopenharmony_ci#define       MC_CMD_EVB_PORT_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_LEN 4
169208c2ecf20Sopenharmony_ci
169218c2ecf20Sopenharmony_ci
169228c2ecf20Sopenharmony_ci/***********************************/
169238c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_BUFTBL_ENTRIES
169248c2ecf20Sopenharmony_ci * Dump buffer table entries, mainly for command client debug use. Dumps
169258c2ecf20Sopenharmony_ci * absolute entries, and does not use chunk handles. All entries must be in
169268c2ecf20Sopenharmony_ci * range, and used for q page mapping, Although the latter restriction may be
169278c2ecf20Sopenharmony_ci * lifted in future.
169288c2ecf20Sopenharmony_ci */
169298c2ecf20Sopenharmony_ci#define MC_CMD_DUMP_BUFTBL_ENTRIES 0xab
169308c2ecf20Sopenharmony_ci#undef MC_CMD_0xab_PRIVILEGE_CTG
169318c2ecf20Sopenharmony_ci
169328c2ecf20Sopenharmony_ci#define MC_CMD_0xab_PRIVILEGE_CTG SRIOV_CTG_INSECURE
169338c2ecf20Sopenharmony_ci
169348c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_BUFTBL_ENTRIES_IN msgrequest */
169358c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_BUFTBL_ENTRIES_IN_LEN 8
169368c2ecf20Sopenharmony_ci/* Index of the first buffer table entry. */
169378c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_IN_FIRSTID_OFST 0
169388c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_IN_FIRSTID_LEN 4
169398c2ecf20Sopenharmony_ci/* Number of buffer table entries to dump. */
169408c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_IN_NUMENTRIES_OFST 4
169418c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_IN_NUMENTRIES_LEN 4
169428c2ecf20Sopenharmony_ci
169438c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_BUFTBL_ENTRIES_OUT msgresponse */
169448c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMIN 12
169458c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMAX 252
169468c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LENMAX_MCDI2 1020
169478c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_LEN(num) (0+12*(num))
169488c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_NUM(len) (((len)-0)/12)
169498c2ecf20Sopenharmony_ci/* Raw buffer table entries, layed out as BUFTBL_ENTRY. */
169508c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_OFST 0
169518c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_LEN 12
169528c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MINNUM 1
169538c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MAXNUM 21
169548c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_BUFTBL_ENTRIES_OUT_ENTRY_MAXNUM_MCDI2 85
169558c2ecf20Sopenharmony_ci
169568c2ecf20Sopenharmony_ci
169578c2ecf20Sopenharmony_ci/***********************************/
169588c2ecf20Sopenharmony_ci/* MC_CMD_SET_RXDP_CONFIG
169598c2ecf20Sopenharmony_ci * Set global RXDP configuration settings
169608c2ecf20Sopenharmony_ci */
169618c2ecf20Sopenharmony_ci#define MC_CMD_SET_RXDP_CONFIG 0xc1
169628c2ecf20Sopenharmony_ci#undef MC_CMD_0xc1_PRIVILEGE_CTG
169638c2ecf20Sopenharmony_ci
169648c2ecf20Sopenharmony_ci#define MC_CMD_0xc1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
169658c2ecf20Sopenharmony_ci
169668c2ecf20Sopenharmony_ci/* MC_CMD_SET_RXDP_CONFIG_IN msgrequest */
169678c2ecf20Sopenharmony_ci#define    MC_CMD_SET_RXDP_CONFIG_IN_LEN 4
169688c2ecf20Sopenharmony_ci#define       MC_CMD_SET_RXDP_CONFIG_IN_DATA_OFST 0
169698c2ecf20Sopenharmony_ci#define       MC_CMD_SET_RXDP_CONFIG_IN_DATA_LEN 4
169708c2ecf20Sopenharmony_ci#define        MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_OFST 0
169718c2ecf20Sopenharmony_ci#define        MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_LBN 0
169728c2ecf20Sopenharmony_ci#define        MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_WIDTH 1
169738c2ecf20Sopenharmony_ci#define        MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_OFST 0
169748c2ecf20Sopenharmony_ci#define        MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_LBN 1
169758c2ecf20Sopenharmony_ci#define        MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_WIDTH 2
169768c2ecf20Sopenharmony_ci/* enum: pad to 64 bytes */
169778c2ecf20Sopenharmony_ci#define          MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_64 0x0
169788c2ecf20Sopenharmony_ci/* enum: pad to 128 bytes (Medford only) */
169798c2ecf20Sopenharmony_ci#define          MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_128 0x1
169808c2ecf20Sopenharmony_ci/* enum: pad to 256 bytes (Medford only) */
169818c2ecf20Sopenharmony_ci#define          MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_256 0x2
169828c2ecf20Sopenharmony_ci
169838c2ecf20Sopenharmony_ci/* MC_CMD_SET_RXDP_CONFIG_OUT msgresponse */
169848c2ecf20Sopenharmony_ci#define    MC_CMD_SET_RXDP_CONFIG_OUT_LEN 0
169858c2ecf20Sopenharmony_ci
169868c2ecf20Sopenharmony_ci
169878c2ecf20Sopenharmony_ci/***********************************/
169888c2ecf20Sopenharmony_ci/* MC_CMD_GET_RXDP_CONFIG
169898c2ecf20Sopenharmony_ci * Get global RXDP configuration settings
169908c2ecf20Sopenharmony_ci */
169918c2ecf20Sopenharmony_ci#define MC_CMD_GET_RXDP_CONFIG 0xc2
169928c2ecf20Sopenharmony_ci#undef MC_CMD_0xc2_PRIVILEGE_CTG
169938c2ecf20Sopenharmony_ci
169948c2ecf20Sopenharmony_ci#define MC_CMD_0xc2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
169958c2ecf20Sopenharmony_ci
169968c2ecf20Sopenharmony_ci/* MC_CMD_GET_RXDP_CONFIG_IN msgrequest */
169978c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RXDP_CONFIG_IN_LEN 0
169988c2ecf20Sopenharmony_ci
169998c2ecf20Sopenharmony_ci/* MC_CMD_GET_RXDP_CONFIG_OUT msgresponse */
170008c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RXDP_CONFIG_OUT_LEN 4
170018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RXDP_CONFIG_OUT_DATA_OFST 0
170028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RXDP_CONFIG_OUT_DATA_LEN 4
170038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_OFST 0
170048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_LBN 0
170058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_WIDTH 1
170068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_OFST 0
170078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_LBN 1
170088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_WIDTH 2
170098c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
170108c2ecf20Sopenharmony_ci/*                MC_CMD_SET_RXDP_CONFIG/MC_CMD_SET_RXDP_CONFIG_IN/PAD_HOST_LEN */
170118c2ecf20Sopenharmony_ci
170128c2ecf20Sopenharmony_ci
170138c2ecf20Sopenharmony_ci/***********************************/
170148c2ecf20Sopenharmony_ci/* MC_CMD_GET_CLOCK
170158c2ecf20Sopenharmony_ci * Return the system and PDCPU clock frequencies.
170168c2ecf20Sopenharmony_ci */
170178c2ecf20Sopenharmony_ci#define MC_CMD_GET_CLOCK 0xac
170188c2ecf20Sopenharmony_ci#undef MC_CMD_0xac_PRIVILEGE_CTG
170198c2ecf20Sopenharmony_ci
170208c2ecf20Sopenharmony_ci#define MC_CMD_0xac_PRIVILEGE_CTG SRIOV_CTG_GENERAL
170218c2ecf20Sopenharmony_ci
170228c2ecf20Sopenharmony_ci/* MC_CMD_GET_CLOCK_IN msgrequest */
170238c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCK_IN_LEN 0
170248c2ecf20Sopenharmony_ci
170258c2ecf20Sopenharmony_ci/* MC_CMD_GET_CLOCK_OUT msgresponse */
170268c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCK_OUT_LEN 8
170278c2ecf20Sopenharmony_ci/* System frequency, MHz */
170288c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCK_OUT_SYS_FREQ_OFST 0
170298c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCK_OUT_SYS_FREQ_LEN 4
170308c2ecf20Sopenharmony_ci/* DPCPU frequency, MHz */
170318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCK_OUT_DPCPU_FREQ_OFST 4
170328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCK_OUT_DPCPU_FREQ_LEN 4
170338c2ecf20Sopenharmony_ci
170348c2ecf20Sopenharmony_ci
170358c2ecf20Sopenharmony_ci/***********************************/
170368c2ecf20Sopenharmony_ci/* MC_CMD_SET_CLOCK
170378c2ecf20Sopenharmony_ci * Control the system and DPCPU clock frequencies. Changes are lost reboot.
170388c2ecf20Sopenharmony_ci */
170398c2ecf20Sopenharmony_ci#define MC_CMD_SET_CLOCK 0xad
170408c2ecf20Sopenharmony_ci#undef MC_CMD_0xad_PRIVILEGE_CTG
170418c2ecf20Sopenharmony_ci
170428c2ecf20Sopenharmony_ci#define MC_CMD_0xad_PRIVILEGE_CTG SRIOV_CTG_INSECURE
170438c2ecf20Sopenharmony_ci
170448c2ecf20Sopenharmony_ci/* MC_CMD_SET_CLOCK_IN msgrequest */
170458c2ecf20Sopenharmony_ci#define    MC_CMD_SET_CLOCK_IN_LEN 28
170468c2ecf20Sopenharmony_ci/* Requested frequency in MHz for system clock domain */
170478c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_SYS_FREQ_OFST 0
170488c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_SYS_FREQ_LEN 4
170498c2ecf20Sopenharmony_ci/* enum: Leave the system clock domain frequency unchanged */
170508c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_SYS_DOMAIN_DONT_CHANGE 0x0
170518c2ecf20Sopenharmony_ci/* Requested frequency in MHz for inter-core clock domain */
170528c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_ICORE_FREQ_OFST 4
170538c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_ICORE_FREQ_LEN 4
170548c2ecf20Sopenharmony_ci/* enum: Leave the inter-core clock domain frequency unchanged */
170558c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_ICORE_DOMAIN_DONT_CHANGE 0x0
170568c2ecf20Sopenharmony_ci/* Requested frequency in MHz for DPCPU clock domain */
170578c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_DPCPU_FREQ_OFST 8
170588c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_DPCPU_FREQ_LEN 4
170598c2ecf20Sopenharmony_ci/* enum: Leave the DPCPU clock domain frequency unchanged */
170608c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_DPCPU_DOMAIN_DONT_CHANGE 0x0
170618c2ecf20Sopenharmony_ci/* Requested frequency in MHz for PCS clock domain */
170628c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_PCS_FREQ_OFST 12
170638c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_PCS_FREQ_LEN 4
170648c2ecf20Sopenharmony_ci/* enum: Leave the PCS clock domain frequency unchanged */
170658c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_PCS_DOMAIN_DONT_CHANGE 0x0
170668c2ecf20Sopenharmony_ci/* Requested frequency in MHz for MC clock domain */
170678c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_MC_FREQ_OFST 16
170688c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_MC_FREQ_LEN 4
170698c2ecf20Sopenharmony_ci/* enum: Leave the MC clock domain frequency unchanged */
170708c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_MC_DOMAIN_DONT_CHANGE 0x0
170718c2ecf20Sopenharmony_ci/* Requested frequency in MHz for rmon clock domain */
170728c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_RMON_FREQ_OFST 20
170738c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_RMON_FREQ_LEN 4
170748c2ecf20Sopenharmony_ci/* enum: Leave the rmon clock domain frequency unchanged */
170758c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_RMON_DOMAIN_DONT_CHANGE 0x0
170768c2ecf20Sopenharmony_ci/* Requested frequency in MHz for vswitch clock domain */
170778c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_VSWITCH_FREQ_OFST 24
170788c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_IN_VSWITCH_FREQ_LEN 4
170798c2ecf20Sopenharmony_ci/* enum: Leave the vswitch clock domain frequency unchanged */
170808c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_IN_VSWITCH_DOMAIN_DONT_CHANGE 0x0
170818c2ecf20Sopenharmony_ci
170828c2ecf20Sopenharmony_ci/* MC_CMD_SET_CLOCK_OUT msgresponse */
170838c2ecf20Sopenharmony_ci#define    MC_CMD_SET_CLOCK_OUT_LEN 28
170848c2ecf20Sopenharmony_ci/* Resulting system frequency in MHz */
170858c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_SYS_FREQ_OFST 0
170868c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_SYS_FREQ_LEN 4
170878c2ecf20Sopenharmony_ci/* enum: The system clock domain doesn't exist */
170888c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_SYS_DOMAIN_UNSUPPORTED 0x0
170898c2ecf20Sopenharmony_ci/* Resulting inter-core frequency in MHz */
170908c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_ICORE_FREQ_OFST 4
170918c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_ICORE_FREQ_LEN 4
170928c2ecf20Sopenharmony_ci/* enum: The inter-core clock domain doesn't exist / isn't used */
170938c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_ICORE_DOMAIN_UNSUPPORTED 0x0
170948c2ecf20Sopenharmony_ci/* Resulting DPCPU frequency in MHz */
170958c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_DPCPU_FREQ_OFST 8
170968c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_DPCPU_FREQ_LEN 4
170978c2ecf20Sopenharmony_ci/* enum: The dpcpu clock domain doesn't exist */
170988c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_DPCPU_DOMAIN_UNSUPPORTED 0x0
170998c2ecf20Sopenharmony_ci/* Resulting PCS frequency in MHz */
171008c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_PCS_FREQ_OFST 12
171018c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_PCS_FREQ_LEN 4
171028c2ecf20Sopenharmony_ci/* enum: The PCS clock domain doesn't exist / isn't controlled */
171038c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_PCS_DOMAIN_UNSUPPORTED 0x0
171048c2ecf20Sopenharmony_ci/* Resulting MC frequency in MHz */
171058c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_MC_FREQ_OFST 16
171068c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_MC_FREQ_LEN 4
171078c2ecf20Sopenharmony_ci/* enum: The MC clock domain doesn't exist / isn't controlled */
171088c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_MC_DOMAIN_UNSUPPORTED 0x0
171098c2ecf20Sopenharmony_ci/* Resulting rmon frequency in MHz */
171108c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_RMON_FREQ_OFST 20
171118c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_RMON_FREQ_LEN 4
171128c2ecf20Sopenharmony_ci/* enum: The rmon clock domain doesn't exist / isn't controlled */
171138c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_RMON_DOMAIN_UNSUPPORTED 0x0
171148c2ecf20Sopenharmony_ci/* Resulting vswitch frequency in MHz */
171158c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_VSWITCH_FREQ_OFST 24
171168c2ecf20Sopenharmony_ci#define       MC_CMD_SET_CLOCK_OUT_VSWITCH_FREQ_LEN 4
171178c2ecf20Sopenharmony_ci/* enum: The vswitch clock domain doesn't exist / isn't controlled */
171188c2ecf20Sopenharmony_ci#define          MC_CMD_SET_CLOCK_OUT_VSWITCH_DOMAIN_UNSUPPORTED 0x0
171198c2ecf20Sopenharmony_ci
171208c2ecf20Sopenharmony_ci
171218c2ecf20Sopenharmony_ci/***********************************/
171228c2ecf20Sopenharmony_ci/* MC_CMD_DPCPU_RPC
171238c2ecf20Sopenharmony_ci * Send an arbitrary DPCPU message.
171248c2ecf20Sopenharmony_ci */
171258c2ecf20Sopenharmony_ci#define MC_CMD_DPCPU_RPC 0xae
171268c2ecf20Sopenharmony_ci#undef MC_CMD_0xae_PRIVILEGE_CTG
171278c2ecf20Sopenharmony_ci
171288c2ecf20Sopenharmony_ci#define MC_CMD_0xae_PRIVILEGE_CTG SRIOV_CTG_INSECURE
171298c2ecf20Sopenharmony_ci
171308c2ecf20Sopenharmony_ci/* MC_CMD_DPCPU_RPC_IN msgrequest */
171318c2ecf20Sopenharmony_ci#define    MC_CMD_DPCPU_RPC_IN_LEN 36
171328c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_CPU_OFST 0
171338c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_CPU_LEN 4
171348c2ecf20Sopenharmony_ci/* enum: RxDPCPU0 */
171358c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_DPCPU_RX0 0x0
171368c2ecf20Sopenharmony_ci/* enum: TxDPCPU0 */
171378c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_DPCPU_TX0 0x1
171388c2ecf20Sopenharmony_ci/* enum: TxDPCPU1 */
171398c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_DPCPU_TX1 0x2
171408c2ecf20Sopenharmony_ci/* enum: RxDPCPU1 (Medford only) */
171418c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_DPCPU_RX1 0x3
171428c2ecf20Sopenharmony_ci/* enum: RxDPCPU (will be for the calling function; for now, just an alias of
171438c2ecf20Sopenharmony_ci * DPCPU_RX0)
171448c2ecf20Sopenharmony_ci */
171458c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_DPCPU_RX 0x80
171468c2ecf20Sopenharmony_ci/* enum: TxDPCPU (will be for the calling function; for now, just an alias of
171478c2ecf20Sopenharmony_ci * DPCPU_TX0)
171488c2ecf20Sopenharmony_ci */
171498c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_DPCPU_TX 0x81
171508c2ecf20Sopenharmony_ci/* First 8 bits [39:32] of DATA are consumed by MC-DPCPU protocol and must be
171518c2ecf20Sopenharmony_ci * initialised to zero
171528c2ecf20Sopenharmony_ci */
171538c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_DATA_OFST 4
171548c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_DATA_LEN 32
171558c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_OFST 4
171568c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_LBN 8
171578c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_CMDNUM_WIDTH 8
171588c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_READ 0x6 /* enum */
171598c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_WRITE 0x7 /* enum */
171608c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_SELF_TEST 0xc /* enum */
171618c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_TXDPCPU_CSR_ACCESS 0xe /* enum */
171628c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_READ 0x46 /* enum */
171638c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_WRITE 0x47 /* enum */
171648c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_SELF_TEST 0x4a /* enum */
171658c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_CSR_ACCESS 0x4c /* enum */
171668c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CMDNUM_RXDPCPU_SET_MC_REPLAY_CNTXT 0x4d /* enum */
171678c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_OFST 4
171688c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_LBN 16
171698c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_OBJID_WIDTH 16
171708c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_OFST 4
171718c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_LBN 16
171728c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_ADDR_WIDTH 16
171738c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_OFST 4
171748c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_LBN 48
171758c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_HDR_CMD_REQ_COUNT_WIDTH 16
171768c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_OFST 4
171778c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_LBN 16
171788c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_INFO_WIDTH 240
171798c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_OFST 4
171808c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_LBN 16
171818c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_WIDTH 16
171828c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_STOP_RETURN_RESULT 0x0 /* enum */
171838c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_READ 0x1 /* enum */
171848c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_WRITE 0x2 /* enum */
171858c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_WRITE_READ 0x3 /* enum */
171868c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_CMD_START_PIPELINED_READ 0x4 /* enum */
171878c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_OFST 4
171888c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_LBN 48
171898c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_START_DELAY_WIDTH 16
171908c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_OFST 4
171918c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_LBN 64
171928c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_RPT_COUNT_WIDTH 16
171938c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_OFST 4
171948c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_LBN 80
171958c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_GAP_DELAY_WIDTH 16
171968c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_OFST 4
171978c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_LBN 16
171988c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_WIDTH 16
171998c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_CUT_THROUGH 0x1 /* enum */
172008c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_STORE_FORWARD 0x2 /* enum */
172018c2ecf20Sopenharmony_ci#define          MC_CMD_DPCPU_RPC_IN_MC_REPLAY_MODE_STORE_FORWARD_FIRST 0x3 /* enum */
172028c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_OFST 4
172038c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_LBN 64
172048c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_IN_MC_REPLAY_CNTXT_WIDTH 16
172058c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_WDATA_OFST 12
172068c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_WDATA_LEN 24
172078c2ecf20Sopenharmony_ci/* Register data to write. Only valid in write/write-read. */
172088c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_DATA_OFST 16
172098c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_DATA_LEN 4
172108c2ecf20Sopenharmony_ci/* Register address. */
172118c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_ADDRESS_OFST 20
172128c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_IN_CSR_ACCESS_ADDRESS_LEN 4
172138c2ecf20Sopenharmony_ci
172148c2ecf20Sopenharmony_ci/* MC_CMD_DPCPU_RPC_OUT msgresponse */
172158c2ecf20Sopenharmony_ci#define    MC_CMD_DPCPU_RPC_OUT_LEN 36
172168c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_RC_OFST 0
172178c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_RC_LEN 4
172188c2ecf20Sopenharmony_ci/* DATA */
172198c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_DATA_OFST 4
172208c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_DATA_LEN 32
172218c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_OFST 4
172228c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_LBN 32
172238c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_OUT_HDR_CMD_RESP_ERRCODE_WIDTH 16
172248c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_OFST 4
172258c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_LBN 48
172268c2ecf20Sopenharmony_ci#define        MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_COUNT_WIDTH 16
172278c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_RDATA_OFST 12
172288c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_RDATA_LEN 24
172298c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_1_OFST 12
172308c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_1_LEN 4
172318c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_2_OFST 16
172328c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_2_LEN 4
172338c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_3_OFST 20
172348c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_3_LEN 4
172358c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_4_OFST 24
172368c2ecf20Sopenharmony_ci#define       MC_CMD_DPCPU_RPC_OUT_CSR_ACCESS_READ_VAL_4_LEN 4
172378c2ecf20Sopenharmony_ci
172388c2ecf20Sopenharmony_ci
172398c2ecf20Sopenharmony_ci/***********************************/
172408c2ecf20Sopenharmony_ci/* MC_CMD_TRIGGER_INTERRUPT
172418c2ecf20Sopenharmony_ci * Trigger an interrupt by prodding the BIU.
172428c2ecf20Sopenharmony_ci */
172438c2ecf20Sopenharmony_ci#define MC_CMD_TRIGGER_INTERRUPT 0xe3
172448c2ecf20Sopenharmony_ci#undef MC_CMD_0xe3_PRIVILEGE_CTG
172458c2ecf20Sopenharmony_ci
172468c2ecf20Sopenharmony_ci#define MC_CMD_0xe3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
172478c2ecf20Sopenharmony_ci
172488c2ecf20Sopenharmony_ci/* MC_CMD_TRIGGER_INTERRUPT_IN msgrequest */
172498c2ecf20Sopenharmony_ci#define    MC_CMD_TRIGGER_INTERRUPT_IN_LEN 4
172508c2ecf20Sopenharmony_ci/* Interrupt level relative to base for function. */
172518c2ecf20Sopenharmony_ci#define       MC_CMD_TRIGGER_INTERRUPT_IN_INTR_LEVEL_OFST 0
172528c2ecf20Sopenharmony_ci#define       MC_CMD_TRIGGER_INTERRUPT_IN_INTR_LEVEL_LEN 4
172538c2ecf20Sopenharmony_ci
172548c2ecf20Sopenharmony_ci/* MC_CMD_TRIGGER_INTERRUPT_OUT msgresponse */
172558c2ecf20Sopenharmony_ci#define    MC_CMD_TRIGGER_INTERRUPT_OUT_LEN 0
172568c2ecf20Sopenharmony_ci
172578c2ecf20Sopenharmony_ci
172588c2ecf20Sopenharmony_ci/***********************************/
172598c2ecf20Sopenharmony_ci/* MC_CMD_SHMBOOT_OP
172608c2ecf20Sopenharmony_ci * Special operations to support (for now) shmboot.
172618c2ecf20Sopenharmony_ci */
172628c2ecf20Sopenharmony_ci#define MC_CMD_SHMBOOT_OP 0xe6
172638c2ecf20Sopenharmony_ci#undef MC_CMD_0xe6_PRIVILEGE_CTG
172648c2ecf20Sopenharmony_ci
172658c2ecf20Sopenharmony_ci#define MC_CMD_0xe6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
172668c2ecf20Sopenharmony_ci
172678c2ecf20Sopenharmony_ci/* MC_CMD_SHMBOOT_OP_IN msgrequest */
172688c2ecf20Sopenharmony_ci#define    MC_CMD_SHMBOOT_OP_IN_LEN 4
172698c2ecf20Sopenharmony_ci/* Identifies the operation to perform */
172708c2ecf20Sopenharmony_ci#define       MC_CMD_SHMBOOT_OP_IN_SHMBOOT_OP_OFST 0
172718c2ecf20Sopenharmony_ci#define       MC_CMD_SHMBOOT_OP_IN_SHMBOOT_OP_LEN 4
172728c2ecf20Sopenharmony_ci/* enum: Copy slave_data section to the slave core. (Greenport only) */
172738c2ecf20Sopenharmony_ci#define          MC_CMD_SHMBOOT_OP_IN_PUSH_SLAVE_DATA 0x0
172748c2ecf20Sopenharmony_ci
172758c2ecf20Sopenharmony_ci/* MC_CMD_SHMBOOT_OP_OUT msgresponse */
172768c2ecf20Sopenharmony_ci#define    MC_CMD_SHMBOOT_OP_OUT_LEN 0
172778c2ecf20Sopenharmony_ci
172788c2ecf20Sopenharmony_ci
172798c2ecf20Sopenharmony_ci/***********************************/
172808c2ecf20Sopenharmony_ci/* MC_CMD_CAP_BLK_READ
172818c2ecf20Sopenharmony_ci * Read multiple 64bit words from capture block memory
172828c2ecf20Sopenharmony_ci */
172838c2ecf20Sopenharmony_ci#define MC_CMD_CAP_BLK_READ 0xe7
172848c2ecf20Sopenharmony_ci#undef MC_CMD_0xe7_PRIVILEGE_CTG
172858c2ecf20Sopenharmony_ci
172868c2ecf20Sopenharmony_ci#define MC_CMD_0xe7_PRIVILEGE_CTG SRIOV_CTG_INSECURE
172878c2ecf20Sopenharmony_ci
172888c2ecf20Sopenharmony_ci/* MC_CMD_CAP_BLK_READ_IN msgrequest */
172898c2ecf20Sopenharmony_ci#define    MC_CMD_CAP_BLK_READ_IN_LEN 12
172908c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_IN_CAP_REG_OFST 0
172918c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_IN_CAP_REG_LEN 4
172928c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_IN_ADDR_OFST 4
172938c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_IN_ADDR_LEN 4
172948c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_IN_COUNT_OFST 8
172958c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_IN_COUNT_LEN 4
172968c2ecf20Sopenharmony_ci
172978c2ecf20Sopenharmony_ci/* MC_CMD_CAP_BLK_READ_OUT msgresponse */
172988c2ecf20Sopenharmony_ci#define    MC_CMD_CAP_BLK_READ_OUT_LENMIN 8
172998c2ecf20Sopenharmony_ci#define    MC_CMD_CAP_BLK_READ_OUT_LENMAX 248
173008c2ecf20Sopenharmony_ci#define    MC_CMD_CAP_BLK_READ_OUT_LENMAX_MCDI2 1016
173018c2ecf20Sopenharmony_ci#define    MC_CMD_CAP_BLK_READ_OUT_LEN(num) (0+8*(num))
173028c2ecf20Sopenharmony_ci#define    MC_CMD_CAP_BLK_READ_OUT_BUFFER_NUM(len) (((len)-0)/8)
173038c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_OFST 0
173048c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_LEN 8
173058c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_LO_OFST 0
173068c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_HI_OFST 4
173078c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_MINNUM 1
173088c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_MAXNUM 31
173098c2ecf20Sopenharmony_ci#define       MC_CMD_CAP_BLK_READ_OUT_BUFFER_MAXNUM_MCDI2 127
173108c2ecf20Sopenharmony_ci
173118c2ecf20Sopenharmony_ci
173128c2ecf20Sopenharmony_ci/***********************************/
173138c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_DO
173148c2ecf20Sopenharmony_ci * Take a dump of the DUT state
173158c2ecf20Sopenharmony_ci */
173168c2ecf20Sopenharmony_ci#define MC_CMD_DUMP_DO 0xe8
173178c2ecf20Sopenharmony_ci#undef MC_CMD_0xe8_PRIVILEGE_CTG
173188c2ecf20Sopenharmony_ci
173198c2ecf20Sopenharmony_ci#define MC_CMD_0xe8_PRIVILEGE_CTG SRIOV_CTG_INSECURE
173208c2ecf20Sopenharmony_ci
173218c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_DO_IN msgrequest */
173228c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_DO_IN_LEN 52
173238c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_PADDING_OFST 0
173248c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_PADDING_LEN 4
173258c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_OFST 4
173268c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_LEN 4
173278c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM 0x0 /* enum */
173288c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_DEFAULT 0x1 /* enum */
173298c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_TYPE_OFST 8
173308c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_TYPE_LEN 4
173318c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMP_LOCATION_NVRAM 0x1 /* enum */
173328c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMP_LOCATION_HOST_MEMORY 0x2 /* enum */
173338c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMP_LOCATION_HOST_MEMORY_MLI 0x3 /* enum */
173348c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMP_LOCATION_UART 0x4 /* enum */
173358c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 12
173368c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
173378c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_OFST 16
173388c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_LEN 4
173398c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 12
173408c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
173418c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 16
173428c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
173438c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 12
173448c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
173458c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_HOST_MEMORY_MLI_PAGE_SIZE 0x1000 /* enum */
173468c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 16
173478c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
173488c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 20
173498c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
173508c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_HOST_MEMORY_MLI_MAX_DEPTH 0x2 /* enum */
173518c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_OFST 12
173528c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_LEN 4
173538c2ecf20Sopenharmony_ci/* enum: The uart port this command was received over (if using a uart
173548c2ecf20Sopenharmony_ci * transport)
173558c2ecf20Sopenharmony_ci */
173568c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_UART_PORT_SRC 0xff
173578c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_SIZE_OFST 24
173588c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPSPEC_SRC_CUSTOM_SIZE_LEN 4
173598c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_OFST 28
173608c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_LEN 4
173618c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM 0x0 /* enum */
173628c2ecf20Sopenharmony_ci#define          MC_CMD_DUMP_DO_IN_DUMPFILE_DST_NVRAM_DUMP_PARTITION 0x1 /* enum */
173638c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_TYPE_OFST 32
173648c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_TYPE_LEN 4
173658c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
173668c2ecf20Sopenharmony_ci/*               MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */
173678c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 36
173688c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
173698c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_OFST 40
173708c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_LEN 4
173718c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 36
173728c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
173738c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 40
173748c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
173758c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 36
173768c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
173778c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 40
173788c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
173798c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 44
173808c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
173818c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_UART_PORT_OFST 36
173828c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_UART_PORT_LEN 4
173838c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_SIZE_OFST 48
173848c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_IN_DUMPFILE_DST_CUSTOM_SIZE_LEN 4
173858c2ecf20Sopenharmony_ci
173868c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_DO_OUT msgresponse */
173878c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_DO_OUT_LEN 4
173888c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_OUT_DUMPFILE_SIZE_OFST 0
173898c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_DO_OUT_DUMPFILE_SIZE_LEN 4
173908c2ecf20Sopenharmony_ci
173918c2ecf20Sopenharmony_ci
173928c2ecf20Sopenharmony_ci/***********************************/
173938c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_CONFIGURE_UNSOLICITED
173948c2ecf20Sopenharmony_ci * Configure unsolicited dumps
173958c2ecf20Sopenharmony_ci */
173968c2ecf20Sopenharmony_ci#define MC_CMD_DUMP_CONFIGURE_UNSOLICITED 0xe9
173978c2ecf20Sopenharmony_ci#undef MC_CMD_0xe9_PRIVILEGE_CTG
173988c2ecf20Sopenharmony_ci
173998c2ecf20Sopenharmony_ci#define MC_CMD_0xe9_PRIVILEGE_CTG SRIOV_CTG_INSECURE
174008c2ecf20Sopenharmony_ci
174018c2ecf20Sopenharmony_ci/* MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN msgrequest */
174028c2ecf20Sopenharmony_ci#define    MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_LEN 52
174038c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_ENABLE_OFST 0
174048c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_ENABLE_LEN 4
174058c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_OFST 4
174068c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_LEN 4
174078c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
174088c2ecf20Sopenharmony_ci/*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC */
174098c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_TYPE_OFST 8
174108c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_TYPE_LEN 4
174118c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
174128c2ecf20Sopenharmony_ci/*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */
174138c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 12
174148c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
174158c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_OFST 16
174168c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_NVRAM_OFFSET_LEN 4
174178c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 12
174188c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
174198c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 16
174208c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
174218c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 12
174228c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
174238c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 16
174248c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
174258c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 20
174268c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
174278c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_OFST 12
174288c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_UART_PORT_LEN 4
174298c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_SIZE_OFST 24
174308c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPSPEC_SRC_CUSTOM_SIZE_LEN 4
174318c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_OFST 28
174328c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_LEN 4
174338c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
174348c2ecf20Sopenharmony_ci/*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPFILE_DST */
174358c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_TYPE_OFST 32
174368c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_TYPE_LEN 4
174378c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
174388c2ecf20Sopenharmony_ci/*               MC_CMD_DUMP_DO/MC_CMD_DUMP_DO_IN/DUMPSPEC_SRC_CUSTOM_TYPE */
174398c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_OFST 36
174408c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_PARTITION_TYPE_ID_LEN 4
174418c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_OFST 40
174428c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_NVRAM_OFFSET_LEN 4
174438c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_OFST 36
174448c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_LO_LEN 4
174458c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_OFST 40
174468c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_ADDR_HI_LEN 4
174478c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_OFST 36
174488c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_LO_LEN 4
174498c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_OFST 40
174508c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_ROOT_ADDR_HI_LEN 4
174518c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_OFST 44
174528c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_HOST_MEMORY_MLI_DEPTH_LEN 4
174538c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_UART_PORT_OFST 36
174548c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_UART_PORT_LEN 4
174558c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_SIZE_OFST 48
174568c2ecf20Sopenharmony_ci#define       MC_CMD_DUMP_CONFIGURE_UNSOLICITED_IN_DUMPFILE_DST_CUSTOM_SIZE_LEN 4
174578c2ecf20Sopenharmony_ci
174588c2ecf20Sopenharmony_ci
174598c2ecf20Sopenharmony_ci/***********************************/
174608c2ecf20Sopenharmony_ci/* MC_CMD_SET_PSU
174618c2ecf20Sopenharmony_ci * Adjusts power supply parameters. This is a warranty-voiding operation.
174628c2ecf20Sopenharmony_ci * Returns: ENOENT if the parameter or rail specified does not exist, EINVAL if
174638c2ecf20Sopenharmony_ci * the parameter is out of range.
174648c2ecf20Sopenharmony_ci */
174658c2ecf20Sopenharmony_ci#define MC_CMD_SET_PSU 0xea
174668c2ecf20Sopenharmony_ci#undef MC_CMD_0xea_PRIVILEGE_CTG
174678c2ecf20Sopenharmony_ci
174688c2ecf20Sopenharmony_ci#define MC_CMD_0xea_PRIVILEGE_CTG SRIOV_CTG_INSECURE
174698c2ecf20Sopenharmony_ci
174708c2ecf20Sopenharmony_ci/* MC_CMD_SET_PSU_IN msgrequest */
174718c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PSU_IN_LEN 12
174728c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PSU_IN_PARAM_OFST 0
174738c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PSU_IN_PARAM_LEN 4
174748c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PSU_IN_PARAM_SUPPLY_VOLTAGE 0x0 /* enum */
174758c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PSU_IN_RAIL_OFST 4
174768c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PSU_IN_RAIL_LEN 4
174778c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PSU_IN_RAIL_0V9 0x0 /* enum */
174788c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PSU_IN_RAIL_1V2 0x1 /* enum */
174798c2ecf20Sopenharmony_ci/* desired value, eg voltage in mV */
174808c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PSU_IN_VALUE_OFST 8
174818c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PSU_IN_VALUE_LEN 4
174828c2ecf20Sopenharmony_ci
174838c2ecf20Sopenharmony_ci/* MC_CMD_SET_PSU_OUT msgresponse */
174848c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PSU_OUT_LEN 0
174858c2ecf20Sopenharmony_ci
174868c2ecf20Sopenharmony_ci
174878c2ecf20Sopenharmony_ci/***********************************/
174888c2ecf20Sopenharmony_ci/* MC_CMD_GET_FUNCTION_INFO
174898c2ecf20Sopenharmony_ci * Get function information. PF and VF number.
174908c2ecf20Sopenharmony_ci */
174918c2ecf20Sopenharmony_ci#define MC_CMD_GET_FUNCTION_INFO 0xec
174928c2ecf20Sopenharmony_ci#undef MC_CMD_0xec_PRIVILEGE_CTG
174938c2ecf20Sopenharmony_ci
174948c2ecf20Sopenharmony_ci#define MC_CMD_0xec_PRIVILEGE_CTG SRIOV_CTG_GENERAL
174958c2ecf20Sopenharmony_ci
174968c2ecf20Sopenharmony_ci/* MC_CMD_GET_FUNCTION_INFO_IN msgrequest */
174978c2ecf20Sopenharmony_ci#define    MC_CMD_GET_FUNCTION_INFO_IN_LEN 0
174988c2ecf20Sopenharmony_ci
174998c2ecf20Sopenharmony_ci/* MC_CMD_GET_FUNCTION_INFO_OUT msgresponse */
175008c2ecf20Sopenharmony_ci#define    MC_CMD_GET_FUNCTION_INFO_OUT_LEN 8
175018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_FUNCTION_INFO_OUT_PF_OFST 0
175028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_FUNCTION_INFO_OUT_PF_LEN 4
175038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_FUNCTION_INFO_OUT_VF_OFST 4
175048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_FUNCTION_INFO_OUT_VF_LEN 4
175058c2ecf20Sopenharmony_ci
175068c2ecf20Sopenharmony_ci
175078c2ecf20Sopenharmony_ci/***********************************/
175088c2ecf20Sopenharmony_ci/* MC_CMD_ENABLE_OFFLINE_BIST
175098c2ecf20Sopenharmony_ci * Enters offline BIST mode. All queues are torn down, chip enters quiescent
175108c2ecf20Sopenharmony_ci * mode, calling function gets exclusive MCDI ownership. The only way out is
175118c2ecf20Sopenharmony_ci * reboot.
175128c2ecf20Sopenharmony_ci */
175138c2ecf20Sopenharmony_ci#define MC_CMD_ENABLE_OFFLINE_BIST 0xed
175148c2ecf20Sopenharmony_ci#undef MC_CMD_0xed_PRIVILEGE_CTG
175158c2ecf20Sopenharmony_ci
175168c2ecf20Sopenharmony_ci#define MC_CMD_0xed_PRIVILEGE_CTG SRIOV_CTG_ADMIN
175178c2ecf20Sopenharmony_ci
175188c2ecf20Sopenharmony_ci/* MC_CMD_ENABLE_OFFLINE_BIST_IN msgrequest */
175198c2ecf20Sopenharmony_ci#define    MC_CMD_ENABLE_OFFLINE_BIST_IN_LEN 0
175208c2ecf20Sopenharmony_ci
175218c2ecf20Sopenharmony_ci/* MC_CMD_ENABLE_OFFLINE_BIST_OUT msgresponse */
175228c2ecf20Sopenharmony_ci#define    MC_CMD_ENABLE_OFFLINE_BIST_OUT_LEN 0
175238c2ecf20Sopenharmony_ci
175248c2ecf20Sopenharmony_ci
175258c2ecf20Sopenharmony_ci/***********************************/
175268c2ecf20Sopenharmony_ci/* MC_CMD_UART_SEND_DATA
175278c2ecf20Sopenharmony_ci * Send checksummed[sic] block of data over the uart. Response is a placeholder
175288c2ecf20Sopenharmony_ci * should we wish to make this reliable; currently requests are fire-and-
175298c2ecf20Sopenharmony_ci * forget.
175308c2ecf20Sopenharmony_ci */
175318c2ecf20Sopenharmony_ci#define MC_CMD_UART_SEND_DATA 0xee
175328c2ecf20Sopenharmony_ci#undef MC_CMD_0xee_PRIVILEGE_CTG
175338c2ecf20Sopenharmony_ci
175348c2ecf20Sopenharmony_ci#define MC_CMD_0xee_PRIVILEGE_CTG SRIOV_CTG_GENERAL
175358c2ecf20Sopenharmony_ci
175368c2ecf20Sopenharmony_ci/* MC_CMD_UART_SEND_DATA_OUT msgrequest */
175378c2ecf20Sopenharmony_ci#define    MC_CMD_UART_SEND_DATA_OUT_LENMIN 16
175388c2ecf20Sopenharmony_ci#define    MC_CMD_UART_SEND_DATA_OUT_LENMAX 252
175398c2ecf20Sopenharmony_ci#define    MC_CMD_UART_SEND_DATA_OUT_LENMAX_MCDI2 1020
175408c2ecf20Sopenharmony_ci#define    MC_CMD_UART_SEND_DATA_OUT_LEN(num) (16+1*(num))
175418c2ecf20Sopenharmony_ci#define    MC_CMD_UART_SEND_DATA_OUT_DATA_NUM(len) (((len)-16)/1)
175428c2ecf20Sopenharmony_ci/* CRC32 over OFFSET, LENGTH, RESERVED, DATA */
175438c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_CHECKSUM_OFST 0
175448c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_CHECKSUM_LEN 4
175458c2ecf20Sopenharmony_ci/* Offset at which to write the data */
175468c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_OFFSET_OFST 4
175478c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_OFFSET_LEN 4
175488c2ecf20Sopenharmony_ci/* Length of data */
175498c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_LENGTH_OFST 8
175508c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_LENGTH_LEN 4
175518c2ecf20Sopenharmony_ci/* Reserved for future use */
175528c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_RESERVED_OFST 12
175538c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_RESERVED_LEN 4
175548c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_DATA_OFST 16
175558c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_DATA_LEN 1
175568c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_DATA_MINNUM 0
175578c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_DATA_MAXNUM 236
175588c2ecf20Sopenharmony_ci#define       MC_CMD_UART_SEND_DATA_OUT_DATA_MAXNUM_MCDI2 1004
175598c2ecf20Sopenharmony_ci
175608c2ecf20Sopenharmony_ci/* MC_CMD_UART_SEND_DATA_IN msgresponse */
175618c2ecf20Sopenharmony_ci#define    MC_CMD_UART_SEND_DATA_IN_LEN 0
175628c2ecf20Sopenharmony_ci
175638c2ecf20Sopenharmony_ci
175648c2ecf20Sopenharmony_ci/***********************************/
175658c2ecf20Sopenharmony_ci/* MC_CMD_UART_RECV_DATA
175668c2ecf20Sopenharmony_ci * Request checksummed[sic] block of data over the uart. Only a placeholder,
175678c2ecf20Sopenharmony_ci * subject to change and not currently implemented.
175688c2ecf20Sopenharmony_ci */
175698c2ecf20Sopenharmony_ci#define MC_CMD_UART_RECV_DATA 0xef
175708c2ecf20Sopenharmony_ci#undef MC_CMD_0xef_PRIVILEGE_CTG
175718c2ecf20Sopenharmony_ci
175728c2ecf20Sopenharmony_ci#define MC_CMD_0xef_PRIVILEGE_CTG SRIOV_CTG_GENERAL
175738c2ecf20Sopenharmony_ci
175748c2ecf20Sopenharmony_ci/* MC_CMD_UART_RECV_DATA_OUT msgrequest */
175758c2ecf20Sopenharmony_ci#define    MC_CMD_UART_RECV_DATA_OUT_LEN 16
175768c2ecf20Sopenharmony_ci/* CRC32 over OFFSET, LENGTH, RESERVED */
175778c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_CHECKSUM_OFST 0
175788c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_CHECKSUM_LEN 4
175798c2ecf20Sopenharmony_ci/* Offset from which to read the data */
175808c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_OFFSET_OFST 4
175818c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_OFFSET_LEN 4
175828c2ecf20Sopenharmony_ci/* Length of data */
175838c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_LENGTH_OFST 8
175848c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_LENGTH_LEN 4
175858c2ecf20Sopenharmony_ci/* Reserved for future use */
175868c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_RESERVED_OFST 12
175878c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_OUT_RESERVED_LEN 4
175888c2ecf20Sopenharmony_ci
175898c2ecf20Sopenharmony_ci/* MC_CMD_UART_RECV_DATA_IN msgresponse */
175908c2ecf20Sopenharmony_ci#define    MC_CMD_UART_RECV_DATA_IN_LENMIN 16
175918c2ecf20Sopenharmony_ci#define    MC_CMD_UART_RECV_DATA_IN_LENMAX 252
175928c2ecf20Sopenharmony_ci#define    MC_CMD_UART_RECV_DATA_IN_LENMAX_MCDI2 1020
175938c2ecf20Sopenharmony_ci#define    MC_CMD_UART_RECV_DATA_IN_LEN(num) (16+1*(num))
175948c2ecf20Sopenharmony_ci#define    MC_CMD_UART_RECV_DATA_IN_DATA_NUM(len) (((len)-16)/1)
175958c2ecf20Sopenharmony_ci/* CRC32 over RESERVED1, RESERVED2, RESERVED3, DATA */
175968c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_CHECKSUM_OFST 0
175978c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_CHECKSUM_LEN 4
175988c2ecf20Sopenharmony_ci/* Offset at which to write the data */
175998c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_RESERVED1_OFST 4
176008c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_RESERVED1_LEN 4
176018c2ecf20Sopenharmony_ci/* Length of data */
176028c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_RESERVED2_OFST 8
176038c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_RESERVED2_LEN 4
176048c2ecf20Sopenharmony_ci/* Reserved for future use */
176058c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_RESERVED3_OFST 12
176068c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_RESERVED3_LEN 4
176078c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_DATA_OFST 16
176088c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_DATA_LEN 1
176098c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_DATA_MINNUM 0
176108c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_DATA_MAXNUM 236
176118c2ecf20Sopenharmony_ci#define       MC_CMD_UART_RECV_DATA_IN_DATA_MAXNUM_MCDI2 1004
176128c2ecf20Sopenharmony_ci
176138c2ecf20Sopenharmony_ci
176148c2ecf20Sopenharmony_ci/***********************************/
176158c2ecf20Sopenharmony_ci/* MC_CMD_READ_FUSES
176168c2ecf20Sopenharmony_ci * Read data programmed into the device One-Time-Programmable (OTP) Fuses
176178c2ecf20Sopenharmony_ci */
176188c2ecf20Sopenharmony_ci#define MC_CMD_READ_FUSES 0xf0
176198c2ecf20Sopenharmony_ci#undef MC_CMD_0xf0_PRIVILEGE_CTG
176208c2ecf20Sopenharmony_ci
176218c2ecf20Sopenharmony_ci#define MC_CMD_0xf0_PRIVILEGE_CTG SRIOV_CTG_INSECURE
176228c2ecf20Sopenharmony_ci
176238c2ecf20Sopenharmony_ci/* MC_CMD_READ_FUSES_IN msgrequest */
176248c2ecf20Sopenharmony_ci#define    MC_CMD_READ_FUSES_IN_LEN 8
176258c2ecf20Sopenharmony_ci/* Offset in OTP to read */
176268c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_IN_OFFSET_OFST 0
176278c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_IN_OFFSET_LEN 4
176288c2ecf20Sopenharmony_ci/* Length of data to read in bytes */
176298c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_IN_LENGTH_OFST 4
176308c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_IN_LENGTH_LEN 4
176318c2ecf20Sopenharmony_ci
176328c2ecf20Sopenharmony_ci/* MC_CMD_READ_FUSES_OUT msgresponse */
176338c2ecf20Sopenharmony_ci#define    MC_CMD_READ_FUSES_OUT_LENMIN 4
176348c2ecf20Sopenharmony_ci#define    MC_CMD_READ_FUSES_OUT_LENMAX 252
176358c2ecf20Sopenharmony_ci#define    MC_CMD_READ_FUSES_OUT_LENMAX_MCDI2 1020
176368c2ecf20Sopenharmony_ci#define    MC_CMD_READ_FUSES_OUT_LEN(num) (4+1*(num))
176378c2ecf20Sopenharmony_ci#define    MC_CMD_READ_FUSES_OUT_DATA_NUM(len) (((len)-4)/1)
176388c2ecf20Sopenharmony_ci/* Length of returned OTP data in bytes */
176398c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_LENGTH_OFST 0
176408c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_LENGTH_LEN 4
176418c2ecf20Sopenharmony_ci/* Returned data */
176428c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_DATA_OFST 4
176438c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_DATA_LEN 1
176448c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_DATA_MINNUM 0
176458c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_DATA_MAXNUM 248
176468c2ecf20Sopenharmony_ci#define       MC_CMD_READ_FUSES_OUT_DATA_MAXNUM_MCDI2 1016
176478c2ecf20Sopenharmony_ci
176488c2ecf20Sopenharmony_ci
176498c2ecf20Sopenharmony_ci/***********************************/
176508c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE
176518c2ecf20Sopenharmony_ci * Get or set KR Serdes RXEQ and TX Driver settings
176528c2ecf20Sopenharmony_ci */
176538c2ecf20Sopenharmony_ci#define MC_CMD_KR_TUNE 0xf1
176548c2ecf20Sopenharmony_ci#undef MC_CMD_0xf1_PRIVILEGE_CTG
176558c2ecf20Sopenharmony_ci
176568c2ecf20Sopenharmony_ci#define MC_CMD_0xf1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
176578c2ecf20Sopenharmony_ci
176588c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_IN msgrequest */
176598c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_IN_LENMIN 4
176608c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_IN_LENMAX 252
176618c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_IN_LENMAX_MCDI2 1020
176628c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_IN_LEN(num) (4+4*(num))
176638c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_NUM(len) (((len)-4)/4)
176648c2ecf20Sopenharmony_ci/* Requested operation */
176658c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_OP_OFST 0
176668c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_OP_LEN 1
176678c2ecf20Sopenharmony_ci/* enum: Get current RXEQ settings */
176688c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_RXEQ_GET 0x0
176698c2ecf20Sopenharmony_ci/* enum: Override RXEQ settings */
176708c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_RXEQ_SET 0x1
176718c2ecf20Sopenharmony_ci/* enum: Get current TX Driver settings */
176728c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_TXEQ_GET 0x2
176738c2ecf20Sopenharmony_ci/* enum: Override TX Driver settings */
176748c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_TXEQ_SET 0x3
176758c2ecf20Sopenharmony_ci/* enum: Force KR Serdes reset / recalibration */
176768c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_RECAL 0x4
176778c2ecf20Sopenharmony_ci/* enum: Start KR Serdes Eye diagram plot on a given lane. Lane must have valid
176788c2ecf20Sopenharmony_ci * signal.
176798c2ecf20Sopenharmony_ci */
176808c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_START_EYE_PLOT 0x5
176818c2ecf20Sopenharmony_ci/* enum: Poll KR Serdes Eye diagram plot. Returns one row of BER data. The
176828c2ecf20Sopenharmony_ci * caller should call this command repeatedly after starting eye plot, until no
176838c2ecf20Sopenharmony_ci * more data is returned.
176848c2ecf20Sopenharmony_ci */
176858c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_POLL_EYE_PLOT 0x6
176868c2ecf20Sopenharmony_ci/* enum: Read Figure Of Merit (eye quality, higher is better). */
176878c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_READ_FOM 0x7
176888c2ecf20Sopenharmony_ci/* enum: Start/stop link training frames */
176898c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_LINK_TRAIN_RUN 0x8
176908c2ecf20Sopenharmony_ci/* enum: Issue KR link training command (control training coefficients) */
176918c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_IN_LINK_TRAIN_CMD 0x9
176928c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
176938c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_RSVD_OFST 1
176948c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_RSVD_LEN 3
176958c2ecf20Sopenharmony_ci/* Arguments specific to the operation */
176968c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_OFST 4
176978c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_LEN 4
176988c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MINNUM 0
176998c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MAXNUM 62
177008c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_IN_KR_TUNE_ARGS_MAXNUM_MCDI2 254
177018c2ecf20Sopenharmony_ci
177028c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_OUT msgresponse */
177038c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_OUT_LEN 0
177048c2ecf20Sopenharmony_ci
177058c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_RXEQ_GET_IN msgrequest */
177068c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_GET_IN_LEN 4
177078c2ecf20Sopenharmony_ci/* Requested operation */
177088c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_OP_OFST 0
177098c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_OP_LEN 1
177108c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
177118c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_RSVD_OFST 1
177128c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_IN_KR_TUNE_RSVD_LEN 3
177138c2ecf20Sopenharmony_ci
177148c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_RXEQ_GET_OUT msgresponse */
177158c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMIN 4
177168c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMAX 252
177178c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_GET_OUT_LENMAX_MCDI2 1020
177188c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_GET_OUT_LEN(num) (0+4*(num))
177198c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_NUM(len) (((len)-0)/4)
177208c2ecf20Sopenharmony_ci/* RXEQ Parameter */
177218c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_OFST 0
177228c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LEN 4
177238c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MINNUM 1
177248c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM 63
177258c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM_MCDI2 255
177268c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_OFST 0
177278c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_LBN 0
177288c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_ID_WIDTH 8
177298c2ecf20Sopenharmony_ci/* enum: Attenuation (0-15, Huntington) */
177308c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_ATT 0x0
177318c2ecf20Sopenharmony_ci/* enum: CTLE Boost (0-15, Huntington) */
177328c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_BOOST 0x1
177338c2ecf20Sopenharmony_ci/* enum: Edge DFE Tap1 (Huntington - 0 - max negative, 64 - zero, 127 - max
177348c2ecf20Sopenharmony_ci * positive, Medford - 0-31)
177358c2ecf20Sopenharmony_ci */
177368c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP1 0x2
177378c2ecf20Sopenharmony_ci/* enum: Edge DFE Tap2 (Huntington - 0 - max negative, 32 - zero, 63 - max
177388c2ecf20Sopenharmony_ci * positive, Medford - 0-31)
177398c2ecf20Sopenharmony_ci */
177408c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP2 0x3
177418c2ecf20Sopenharmony_ci/* enum: Edge DFE Tap3 (Huntington - 0 - max negative, 32 - zero, 63 - max
177428c2ecf20Sopenharmony_ci * positive, Medford - 0-16)
177438c2ecf20Sopenharmony_ci */
177448c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP3 0x4
177458c2ecf20Sopenharmony_ci/* enum: Edge DFE Tap4 (Huntington - 0 - max negative, 32 - zero, 63 - max
177468c2ecf20Sopenharmony_ci * positive, Medford - 0-16)
177478c2ecf20Sopenharmony_ci */
177488c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP4 0x5
177498c2ecf20Sopenharmony_ci/* enum: Edge DFE Tap5 (Huntington - 0 - max negative, 32 - zero, 63 - max
177508c2ecf20Sopenharmony_ci * positive, Medford - 0-16)
177518c2ecf20Sopenharmony_ci */
177528c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_TAP5 0x6
177538c2ecf20Sopenharmony_ci/* enum: Edge DFE DLEV (0-128 for Medford) */
177548c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_EDFE_DLEV 0x7
177558c2ecf20Sopenharmony_ci/* enum: Variable Gain Amplifier (0-15, Medford) */
177568c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_VGA 0x8
177578c2ecf20Sopenharmony_ci/* enum: CTLE EQ Capacitor (0-15, Medford) */
177588c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_EQC 0x9
177598c2ecf20Sopenharmony_ci/* enum: CTLE EQ Resistor (0-7, Medford) */
177608c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_EQRES 0xa
177618c2ecf20Sopenharmony_ci/* enum: CTLE gain (0-31, Medford2) */
177628c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_GAIN 0xb
177638c2ecf20Sopenharmony_ci/* enum: CTLE pole (0-31, Medford2) */
177648c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_POLE 0xc
177658c2ecf20Sopenharmony_ci/* enum: CTLE peaking (0-31, Medford2) */
177668c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CTLE_PEAK 0xd
177678c2ecf20Sopenharmony_ci/* enum: DFE Tap1 - even path (Medford2 - 6 bit signed (-29 - +29)) */
177688c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP1_EVEN 0xe
177698c2ecf20Sopenharmony_ci/* enum: DFE Tap1 - odd path (Medford2 - 6 bit signed (-29 - +29)) */
177708c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP1_ODD 0xf
177718c2ecf20Sopenharmony_ci/* enum: DFE Tap2 (Medford2 - 6 bit signed (-20 - +20)) */
177728c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP2 0x10
177738c2ecf20Sopenharmony_ci/* enum: DFE Tap3 (Medford2 - 6 bit signed (-20 - +20)) */
177748c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP3 0x11
177758c2ecf20Sopenharmony_ci/* enum: DFE Tap4 (Medford2 - 6 bit signed (-20 - +20)) */
177768c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP4 0x12
177778c2ecf20Sopenharmony_ci/* enum: DFE Tap5 (Medford2 - 6 bit signed (-24 - +24)) */
177788c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP5 0x13
177798c2ecf20Sopenharmony_ci/* enum: DFE Tap6 (Medford2 - 6 bit signed (-24 - +24)) */
177808c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP6 0x14
177818c2ecf20Sopenharmony_ci/* enum: DFE Tap7 (Medford2 - 6 bit signed (-24 - +24)) */
177828c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP7 0x15
177838c2ecf20Sopenharmony_ci/* enum: DFE Tap8 (Medford2 - 6 bit signed (-24 - +24)) */
177848c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP8 0x16
177858c2ecf20Sopenharmony_ci/* enum: DFE Tap9 (Medford2 - 6 bit signed (-24 - +24)) */
177868c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP9 0x17
177878c2ecf20Sopenharmony_ci/* enum: DFE Tap10 (Medford2 - 6 bit signed (-24 - +24)) */
177888c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP10 0x18
177898c2ecf20Sopenharmony_ci/* enum: DFE Tap11 (Medford2 - 6 bit signed (-24 - +24)) */
177908c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP11 0x19
177918c2ecf20Sopenharmony_ci/* enum: DFE Tap12 (Medford2 - 6 bit signed (-24 - +24)) */
177928c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP12 0x1a
177938c2ecf20Sopenharmony_ci/* enum: I/Q clk offset (Medford2 - 4 bit signed (-5 - +5))) */
177948c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_IQ_OFF 0x1b
177958c2ecf20Sopenharmony_ci/* enum: Negative h1 polarity data sampler offset calibration code, even path
177968c2ecf20Sopenharmony_ci * (Medford2 - 6 bit signed (-29 - +29)))
177978c2ecf20Sopenharmony_ci */
177988c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_H1N_OFF_EVEN 0x1c
177998c2ecf20Sopenharmony_ci/* enum: Negative h1 polarity data sampler offset calibration code, odd path
178008c2ecf20Sopenharmony_ci * (Medford2 - 6 bit signed (-29 - +29)))
178018c2ecf20Sopenharmony_ci */
178028c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_H1N_OFF_ODD 0x1d
178038c2ecf20Sopenharmony_ci/* enum: Positive h1 polarity data sampler offset calibration code, even path
178048c2ecf20Sopenharmony_ci * (Medford2 - 6 bit signed (-29 - +29)))
178058c2ecf20Sopenharmony_ci */
178068c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_H1P_OFF_EVEN 0x1e
178078c2ecf20Sopenharmony_ci/* enum: Positive h1 polarity data sampler offset calibration code, odd path
178088c2ecf20Sopenharmony_ci * (Medford2 - 6 bit signed (-29 - +29)))
178098c2ecf20Sopenharmony_ci */
178108c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_H1P_OFF_ODD 0x1f
178118c2ecf20Sopenharmony_ci/* enum: CDR calibration loop code (Medford2) */
178128c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CDR_PVT 0x20
178138c2ecf20Sopenharmony_ci/* enum: CDR integral loop code (Medford2) */
178148c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_CDR_INTEG 0x21
178158c2ecf20Sopenharmony_ci/* enum: CTLE Boost stages - retimer lineside (Medford2 with DS250x retimer - 4
178168c2ecf20Sopenharmony_ci * stages, 2 bits per stage)
178178c2ecf20Sopenharmony_ci */
178188c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_BOOST_RT_LS 0x22
178198c2ecf20Sopenharmony_ci/* enum: DFE Tap1 - retimer lineside (Medford2 with DS250x retimer (-31 - 31))
178208c2ecf20Sopenharmony_ci */
178218c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP1_RT_LS 0x23
178228c2ecf20Sopenharmony_ci/* enum: DFE Tap2 - retimer lineside (Medford2 with DS250x retimer (-15 - 15))
178238c2ecf20Sopenharmony_ci */
178248c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP2_RT_LS 0x24
178258c2ecf20Sopenharmony_ci/* enum: DFE Tap3 - retimer lineside (Medford2 with DS250x retimer (-15 - 15))
178268c2ecf20Sopenharmony_ci */
178278c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP3_RT_LS 0x25
178288c2ecf20Sopenharmony_ci/* enum: DFE Tap4 - retimer lineside (Medford2 with DS250x retimer (-15 - 15))
178298c2ecf20Sopenharmony_ci */
178308c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP4_RT_LS 0x26
178318c2ecf20Sopenharmony_ci/* enum: DFE Tap5 - retimer lineside (Medford2 with DS250x retimer (-15 - 15))
178328c2ecf20Sopenharmony_ci */
178338c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP5_RT_LS 0x27
178348c2ecf20Sopenharmony_ci/* enum: CTLE Boost stages - retimer hostside (Medford2 with DS250x retimer - 4
178358c2ecf20Sopenharmony_ci * stages, 2 bits per stage)
178368c2ecf20Sopenharmony_ci */
178378c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_BOOST_RT_HS 0x28
178388c2ecf20Sopenharmony_ci/* enum: DFE Tap1 - retimer hostside (Medford2 with DS250x retimer (-31 - 31))
178398c2ecf20Sopenharmony_ci */
178408c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP1_RT_HS 0x29
178418c2ecf20Sopenharmony_ci/* enum: DFE Tap2 - retimer hostside (Medford2 with DS250x retimer (-15 - 15))
178428c2ecf20Sopenharmony_ci */
178438c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP2_RT_HS 0x2a
178448c2ecf20Sopenharmony_ci/* enum: DFE Tap3 - retimer hostside (Medford2 with DS250x retimer (-15 - 15))
178458c2ecf20Sopenharmony_ci */
178468c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP3_RT_HS 0x2b
178478c2ecf20Sopenharmony_ci/* enum: DFE Tap4 - retimer hostside (Medford2 with DS250x retimer (-15 - 15))
178488c2ecf20Sopenharmony_ci */
178498c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP4_RT_HS 0x2c
178508c2ecf20Sopenharmony_ci/* enum: DFE Tap5 - retimer hostside (Medford2 with DS250x retimer (-15 - 15))
178518c2ecf20Sopenharmony_ci */
178528c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_DFE_TAP5_RT_HS 0x2d
178538c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_OFST 0
178548c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8
178558c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 3
178568c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_0 0x0 /* enum */
178578c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_1 0x1 /* enum */
178588c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_2 0x2 /* enum */
178598c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_3 0x3 /* enum */
178608c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_RXEQ_GET_OUT_LANE_ALL 0x4 /* enum */
178618c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_OFST 0
178628c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_LBN 11
178638c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_WIDTH 1
178648c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_OFST 0
178658c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_LBN 12
178668c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_RESERVED_WIDTH 4
178678c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_OFST 0
178688c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_LBN 16
178698c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_INITIAL_WIDTH 8
178708c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_OFST 0
178718c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_LBN 24
178728c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8
178738c2ecf20Sopenharmony_ci
178748c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_RXEQ_SET_IN msgrequest */
178758c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMIN 8
178768c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMAX 252
178778c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_SET_IN_LENMAX_MCDI2 1020
178788c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_SET_IN_LEN(num) (4+4*(num))
178798c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_NUM(len) (((len)-4)/4)
178808c2ecf20Sopenharmony_ci/* Requested operation */
178818c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_OP_OFST 0
178828c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_OP_LEN 1
178838c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
178848c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_RSVD_OFST 1
178858c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_KR_TUNE_RSVD_LEN 3
178868c2ecf20Sopenharmony_ci/* RXEQ Parameter */
178878c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_OFST 4
178888c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LEN 4
178898c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MINNUM 1
178908c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MAXNUM 62
178918c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_MAXNUM_MCDI2 254
178928c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_OFST 4
178938c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_LBN 0
178948c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_ID_WIDTH 8
178958c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
178968c2ecf20Sopenharmony_ci/*                MC_CMD_KR_TUNE_RXEQ_GET_OUT/PARAM_ID */
178978c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_OFST 4
178988c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_LBN 8
178998c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_LANE_WIDTH 3
179008c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
179018c2ecf20Sopenharmony_ci/*                MC_CMD_KR_TUNE_RXEQ_GET_OUT/PARAM_LANE */
179028c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_OFST 4
179038c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_LBN 11
179048c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_WIDTH 1
179058c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_OFST 4
179068c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_LBN 12
179078c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED_WIDTH 4
179088c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_OFST 4
179098c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_LBN 16
179108c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_PARAM_INITIAL_WIDTH 8
179118c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_OFST 4
179128c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_LBN 24
179138c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_RXEQ_SET_IN_RESERVED2_WIDTH 8
179148c2ecf20Sopenharmony_ci
179158c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_RXEQ_SET_OUT msgresponse */
179168c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RXEQ_SET_OUT_LEN 0
179178c2ecf20Sopenharmony_ci
179188c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_TXEQ_GET_IN msgrequest */
179198c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_GET_IN_LEN 4
179208c2ecf20Sopenharmony_ci/* Requested operation */
179218c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_OP_OFST 0
179228c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_OP_LEN 1
179238c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
179248c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_RSVD_OFST 1
179258c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_IN_KR_TUNE_RSVD_LEN 3
179268c2ecf20Sopenharmony_ci
179278c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_TXEQ_GET_OUT msgresponse */
179288c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMIN 4
179298c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMAX 252
179308c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_GET_OUT_LENMAX_MCDI2 1020
179318c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_GET_OUT_LEN(num) (0+4*(num))
179328c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_NUM(len) (((len)-0)/4)
179338c2ecf20Sopenharmony_ci/* TXEQ Parameter */
179348c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_OFST 0
179358c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LEN 4
179368c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MINNUM 1
179378c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM 63
179388c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM_MCDI2 255
179398c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_OFST 0
179408c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_LBN 0
179418c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_ID_WIDTH 8
179428c2ecf20Sopenharmony_ci/* enum: TX Amplitude (Huntington, Medford, Medford2) */
179438c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV 0x0
179448c2ecf20Sopenharmony_ci/* enum: De-Emphasis Tap1 Magnitude (0-7) (Huntington) */
179458c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_MODE 0x1
179468c2ecf20Sopenharmony_ci/* enum: De-Emphasis Tap1 Fine */
179478c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_DTLEV 0x2
179488c2ecf20Sopenharmony_ci/* enum: De-Emphasis Tap2 Magnitude (0-6) (Huntington) */
179498c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_D2 0x3
179508c2ecf20Sopenharmony_ci/* enum: De-Emphasis Tap2 Fine (Huntington) */
179518c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_D2TLEV 0x4
179528c2ecf20Sopenharmony_ci/* enum: Pre-Emphasis Magnitude (Huntington) */
179538c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_E 0x5
179548c2ecf20Sopenharmony_ci/* enum: Pre-Emphasis Fine (Huntington) */
179558c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_ETLEV 0x6
179568c2ecf20Sopenharmony_ci/* enum: TX Slew Rate Coarse control (Huntington) */
179578c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_PREDRV_DLY 0x7
179588c2ecf20Sopenharmony_ci/* enum: TX Slew Rate Fine control (Huntington) */
179598c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_SR_SET 0x8
179608c2ecf20Sopenharmony_ci/* enum: TX Termination Impedance control (Huntington) */
179618c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_RT_SET 0x9
179628c2ecf20Sopenharmony_ci/* enum: TX Amplitude Fine control (Medford) */
179638c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV_FINE 0xa
179648c2ecf20Sopenharmony_ci/* enum: Pre-cursor Tap (Medford, Medford2) */
179658c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_ADV 0xb
179668c2ecf20Sopenharmony_ci/* enum: Post-cursor Tap (Medford, Medford2) */
179678c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_DLY 0xc
179688c2ecf20Sopenharmony_ci/* enum: TX Amplitude (Retimer Lineside) */
179698c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV_RT_LS 0xd
179708c2ecf20Sopenharmony_ci/* enum: Pre-cursor Tap (Retimer Lineside) */
179718c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_ADV_RT_LS 0xe
179728c2ecf20Sopenharmony_ci/* enum: Post-cursor Tap (Retimer Lineside) */
179738c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_DLY_RT_LS 0xf
179748c2ecf20Sopenharmony_ci/* enum: TX Amplitude (Retimer Hostside) */
179758c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TX_LEV_RT_HS 0x10
179768c2ecf20Sopenharmony_ci/* enum: Pre-cursor Tap (Retimer Hostside) */
179778c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_ADV_RT_HS 0x11
179788c2ecf20Sopenharmony_ci/* enum: Post-cursor Tap (Retimer Hostside) */
179798c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_TAP_DLY_RT_HS 0x12
179808c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_OFST 0
179818c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_LBN 8
179828c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_LANE_WIDTH 3
179838c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_0 0x0 /* enum */
179848c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_1 0x1 /* enum */
179858c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_2 0x2 /* enum */
179868c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_3 0x3 /* enum */
179878c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_TXEQ_GET_OUT_LANE_ALL 0x4 /* enum */
179888c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_OFST 0
179898c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_LBN 11
179908c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED_WIDTH 5
179918c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_OFST 0
179928c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_LBN 16
179938c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_PARAM_INITIAL_WIDTH 8
179948c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_OFST 0
179958c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_LBN 24
179968c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_GET_OUT_RESERVED2_WIDTH 8
179978c2ecf20Sopenharmony_ci
179988c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_TXEQ_SET_IN msgrequest */
179998c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMIN 8
180008c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMAX 252
180018c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_SET_IN_LENMAX_MCDI2 1020
180028c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_SET_IN_LEN(num) (4+4*(num))
180038c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_NUM(len) (((len)-4)/4)
180048c2ecf20Sopenharmony_ci/* Requested operation */
180058c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_OP_OFST 0
180068c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_OP_LEN 1
180078c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
180088c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_RSVD_OFST 1
180098c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_KR_TUNE_RSVD_LEN 3
180108c2ecf20Sopenharmony_ci/* TXEQ Parameter */
180118c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_OFST 4
180128c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LEN 4
180138c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MINNUM 1
180148c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MAXNUM 62
180158c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_MAXNUM_MCDI2 254
180168c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_OFST 4
180178c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_LBN 0
180188c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_ID_WIDTH 8
180198c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
180208c2ecf20Sopenharmony_ci/*                MC_CMD_KR_TUNE_TXEQ_GET_OUT/PARAM_ID */
180218c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_OFST 4
180228c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_LBN 8
180238c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_LANE_WIDTH 3
180248c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
180258c2ecf20Sopenharmony_ci/*                MC_CMD_KR_TUNE_TXEQ_GET_OUT/PARAM_LANE */
180268c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_OFST 4
180278c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_LBN 11
180288c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED_WIDTH 5
180298c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_OFST 4
180308c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_LBN 16
180318c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_PARAM_INITIAL_WIDTH 8
180328c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_OFST 4
180338c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_LBN 24
180348c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_TXEQ_SET_IN_RESERVED2_WIDTH 8
180358c2ecf20Sopenharmony_ci
180368c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_TXEQ_SET_OUT msgresponse */
180378c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_TXEQ_SET_OUT_LEN 0
180388c2ecf20Sopenharmony_ci
180398c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_RECAL_IN msgrequest */
180408c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RECAL_IN_LEN 4
180418c2ecf20Sopenharmony_ci/* Requested operation */
180428c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_OP_OFST 0
180438c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_OP_LEN 1
180448c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
180458c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_RSVD_OFST 1
180468c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_RECAL_IN_KR_TUNE_RSVD_LEN 3
180478c2ecf20Sopenharmony_ci
180488c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_RECAL_OUT msgresponse */
180498c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_RECAL_OUT_LEN 0
180508c2ecf20Sopenharmony_ci
180518c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_START_EYE_PLOT_IN msgrequest */
180528c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LEN 8
180538c2ecf20Sopenharmony_ci/* Requested operation */
180548c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_OP_OFST 0
180558c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_OP_LEN 1
180568c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
180578c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_RSVD_OFST 1
180588c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_IN_KR_TUNE_RSVD_LEN 3
180598c2ecf20Sopenharmony_ci/* Port-relative lane to scan eye on */
180608c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LANE_OFST 4
180618c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_IN_LANE_LEN 4
180628c2ecf20Sopenharmony_ci
180638c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN msgrequest */
180648c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LEN 12
180658c2ecf20Sopenharmony_ci/* Requested operation */
180668c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_OP_OFST 0
180678c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_OP_LEN 1
180688c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
180698c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_RSVD_OFST 1
180708c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_KR_TUNE_RSVD_LEN 3
180718c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_OFST 4
180728c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_LEN 4
180738c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_NUM_OFST 4
180748c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_NUM_LBN 0
180758c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_NUM_WIDTH 8
180768c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_ABS_REL_OFST 4
180778c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_ABS_REL_LBN 31
180788c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_LANE_ABS_REL_WIDTH 1
180798c2ecf20Sopenharmony_ci/* Scan duration / cycle count */
180808c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_BER_OFST 8
180818c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_START_EYE_PLOT_V2_IN_BER_LEN 4
180828c2ecf20Sopenharmony_ci
180838c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_START_EYE_PLOT_OUT msgresponse */
180848c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_START_EYE_PLOT_OUT_LEN 0
180858c2ecf20Sopenharmony_ci
180868c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN msgrequest */
180878c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_LEN 4
180888c2ecf20Sopenharmony_ci/* Requested operation */
180898c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_OP_OFST 0
180908c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_OP_LEN 1
180918c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
180928c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_RSVD_OFST 1
180938c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_IN_KR_TUNE_RSVD_LEN 3
180948c2ecf20Sopenharmony_ci
180958c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT msgresponse */
180968c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMIN 0
180978c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMAX 252
180988c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LENMAX_MCDI2 1020
180998c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_LEN(num) (0+2*(num))
181008c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_NUM(len) (((len)-0)/2)
181018c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_OFST 0
181028c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_LEN 2
181038c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MINNUM 0
181048c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM 126
181058c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM_MCDI2 510
181068c2ecf20Sopenharmony_ci
181078c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_READ_FOM_IN msgrequest */
181088c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_READ_FOM_IN_LEN 8
181098c2ecf20Sopenharmony_ci/* Requested operation */
181108c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_OP_OFST 0
181118c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_OP_LEN 1
181128c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
181138c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_RSVD_OFST 1
181148c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_IN_KR_TUNE_RSVD_LEN 3
181158c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_IN_LANE_OFST 4
181168c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_IN_LANE_LEN 4
181178c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_READ_FOM_IN_LANE_NUM_OFST 4
181188c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_READ_FOM_IN_LANE_NUM_LBN 0
181198c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_READ_FOM_IN_LANE_NUM_WIDTH 8
181208c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_READ_FOM_IN_LANE_ABS_REL_OFST 4
181218c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_READ_FOM_IN_LANE_ABS_REL_LBN 31
181228c2ecf20Sopenharmony_ci#define        MC_CMD_KR_TUNE_READ_FOM_IN_LANE_ABS_REL_WIDTH 1
181238c2ecf20Sopenharmony_ci
181248c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_READ_FOM_OUT msgresponse */
181258c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_READ_FOM_OUT_LEN 4
181268c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_OUT_FOM_OFST 0
181278c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_READ_FOM_OUT_FOM_LEN 4
181288c2ecf20Sopenharmony_ci
181298c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN msgrequest */
181308c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_LEN 8
181318c2ecf20Sopenharmony_ci/* Requested operation */
181328c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_KR_TUNE_OP_OFST 0
181338c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_KR_TUNE_OP_LEN 1
181348c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
181358c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_KR_TUNE_RSVD_OFST 1
181368c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_KR_TUNE_RSVD_LEN 3
181378c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_RUN_OFST 4
181388c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_RUN_LEN 4
181398c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_STOP 0x0 /* enum */
181408c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_RUN_IN_START 0x1 /* enum */
181418c2ecf20Sopenharmony_ci
181428c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN msgrequest */
181438c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_LEN 28
181448c2ecf20Sopenharmony_ci/* Requested operation */
181458c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_KR_TUNE_OP_OFST 0
181468c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_KR_TUNE_OP_LEN 1
181478c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
181488c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_KR_TUNE_RSVD_OFST 1
181498c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_KR_TUNE_RSVD_LEN 3
181508c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_LANE_OFST 4
181518c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_LANE_LEN 4
181528c2ecf20Sopenharmony_ci/* Set INITIALIZE state */
181538c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_INITIALIZE_OFST 8
181548c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_INITIALIZE_LEN 4
181558c2ecf20Sopenharmony_ci/* Set PRESET state */
181568c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_PRESET_OFST 12
181578c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_PRESET_LEN 4
181588c2ecf20Sopenharmony_ci/* C(-1) request */
181598c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_CM1_OFST 16
181608c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_CM1_LEN 4
181618c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_REQ_HOLD 0x0 /* enum */
181628c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_REQ_INCREMENT 0x1 /* enum */
181638c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_REQ_DECREMENT 0x2 /* enum */
181648c2ecf20Sopenharmony_ci/* C(0) request */
181658c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_C0_OFST 20
181668c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_C0_LEN 4
181678c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
181688c2ecf20Sopenharmony_ci/*               MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN/CM1 */
181698c2ecf20Sopenharmony_ci/* C(+1) request */
181708c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_CP1_OFST 24
181718c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN_CP1_LEN 4
181728c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
181738c2ecf20Sopenharmony_ci/*               MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN/CM1 */
181748c2ecf20Sopenharmony_ci
181758c2ecf20Sopenharmony_ci/* MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT msgresponse */
181768c2ecf20Sopenharmony_ci#define    MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_LEN 24
181778c2ecf20Sopenharmony_ci/* C(-1) status */
181788c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CM1_STATUS_OFST 0
181798c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CM1_STATUS_LEN 4
181808c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_STATUS_NOT_UPDATED 0x0 /* enum */
181818c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_STATUS_UPDATED 0x1 /* enum */
181828c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_STATUS_MINIMUM 0x2 /* enum */
181838c2ecf20Sopenharmony_ci#define          MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_STATUS_MAXIMUM 0x3 /* enum */
181848c2ecf20Sopenharmony_ci/* C(0) status */
181858c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_C0_STATUS_OFST 4
181868c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_C0_STATUS_LEN 4
181878c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
181888c2ecf20Sopenharmony_ci/*               MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN/CM1 */
181898c2ecf20Sopenharmony_ci/* C(+1) status */
181908c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CP1_STATUS_OFST 8
181918c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CP1_STATUS_LEN 4
181928c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
181938c2ecf20Sopenharmony_ci/*               MC_CMD_KR_TUNE_LINK_TRAIN_CMD_IN/CM1 */
181948c2ecf20Sopenharmony_ci/* C(-1) value */
181958c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CM1_VALUE_OFST 12
181968c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CM1_VALUE_LEN 4
181978c2ecf20Sopenharmony_ci/* C(0) value */
181988c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_C0_VALUE_OFST 16
181998c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_C0_VALUE_LEN 4
182008c2ecf20Sopenharmony_ci/* C(+1) status */
182018c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CP1_VALUE_OFST 20
182028c2ecf20Sopenharmony_ci#define       MC_CMD_KR_TUNE_LINK_TRAIN_CMD_OUT_CP1_VALUE_LEN 4
182038c2ecf20Sopenharmony_ci
182048c2ecf20Sopenharmony_ci
182058c2ecf20Sopenharmony_ci/***********************************/
182068c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE
182078c2ecf20Sopenharmony_ci * Get or set PCIE Serdes RXEQ and TX Driver settings
182088c2ecf20Sopenharmony_ci */
182098c2ecf20Sopenharmony_ci#define MC_CMD_PCIE_TUNE 0xf2
182108c2ecf20Sopenharmony_ci#undef MC_CMD_0xf2_PRIVILEGE_CTG
182118c2ecf20Sopenharmony_ci
182128c2ecf20Sopenharmony_ci#define MC_CMD_0xf2_PRIVILEGE_CTG SRIOV_CTG_ADMIN
182138c2ecf20Sopenharmony_ci
182148c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_IN msgrequest */
182158c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_IN_LENMIN 4
182168c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_IN_LENMAX 252
182178c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_IN_LENMAX_MCDI2 1020
182188c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_IN_LEN(num) (4+4*(num))
182198c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_NUM(len) (((len)-4)/4)
182208c2ecf20Sopenharmony_ci/* Requested operation */
182218c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_OP_OFST 0
182228c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_OP_LEN 1
182238c2ecf20Sopenharmony_ci/* enum: Get current RXEQ settings */
182248c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_RXEQ_GET 0x0
182258c2ecf20Sopenharmony_ci/* enum: Override RXEQ settings */
182268c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_RXEQ_SET 0x1
182278c2ecf20Sopenharmony_ci/* enum: Get current TX Driver settings */
182288c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_TXEQ_GET 0x2
182298c2ecf20Sopenharmony_ci/* enum: Override TX Driver settings */
182308c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_TXEQ_SET 0x3
182318c2ecf20Sopenharmony_ci/* enum: Start PCIe Serdes Eye diagram plot on a given lane. */
182328c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_START_EYE_PLOT 0x5
182338c2ecf20Sopenharmony_ci/* enum: Poll PCIe Serdes Eye diagram plot. Returns one row of BER data. The
182348c2ecf20Sopenharmony_ci * caller should call this command repeatedly after starting eye plot, until no
182358c2ecf20Sopenharmony_ci * more data is returned.
182368c2ecf20Sopenharmony_ci */
182378c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_POLL_EYE_PLOT 0x6
182388c2ecf20Sopenharmony_ci/* enum: Enable the SERDES BIST and set it to generate a 200MHz square wave */
182398c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_IN_BIST_SQUARE_WAVE 0x7
182408c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
182418c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_RSVD_OFST 1
182428c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_RSVD_LEN 3
182438c2ecf20Sopenharmony_ci/* Arguments specific to the operation */
182448c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_OFST 4
182458c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_LEN 4
182468c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MINNUM 0
182478c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MAXNUM 62
182488c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_IN_PCIE_TUNE_ARGS_MAXNUM_MCDI2 254
182498c2ecf20Sopenharmony_ci
182508c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_OUT msgresponse */
182518c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_OUT_LEN 0
182528c2ecf20Sopenharmony_ci
182538c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_RXEQ_GET_IN msgrequest */
182548c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_GET_IN_LEN 4
182558c2ecf20Sopenharmony_ci/* Requested operation */
182568c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_OP_OFST 0
182578c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_OP_LEN 1
182588c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
182598c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_RSVD_OFST 1
182608c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_IN_PCIE_TUNE_RSVD_LEN 3
182618c2ecf20Sopenharmony_ci
182628c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_RXEQ_GET_OUT msgresponse */
182638c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMIN 4
182648c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMAX 252
182658c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LENMAX_MCDI2 1020
182668c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LEN(num) (0+4*(num))
182678c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_NUM(len) (((len)-0)/4)
182688c2ecf20Sopenharmony_ci/* RXEQ Parameter */
182698c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_OFST 0
182708c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LEN 4
182718c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MINNUM 1
182728c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM 63
182738c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_MAXNUM_MCDI2 255
182748c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_OFST 0
182758c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_LBN 0
182768c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_ID_WIDTH 8
182778c2ecf20Sopenharmony_ci/* enum: Attenuation (0-15) */
182788c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_ATT 0x0
182798c2ecf20Sopenharmony_ci/* enum: CTLE Boost (0-15) */
182808c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_BOOST 0x1
182818c2ecf20Sopenharmony_ci/* enum: DFE Tap1 (0 - max negative, 64 - zero, 127 - max positive) */
182828c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP1 0x2
182838c2ecf20Sopenharmony_ci/* enum: DFE Tap2 (0 - max negative, 32 - zero, 63 - max positive) */
182848c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP2 0x3
182858c2ecf20Sopenharmony_ci/* enum: DFE Tap3 (0 - max negative, 32 - zero, 63 - max positive) */
182868c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP3 0x4
182878c2ecf20Sopenharmony_ci/* enum: DFE Tap4 (0 - max negative, 32 - zero, 63 - max positive) */
182888c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP4 0x5
182898c2ecf20Sopenharmony_ci/* enum: DFE Tap5 (0 - max negative, 32 - zero, 63 - max positive) */
182908c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP5 0x6
182918c2ecf20Sopenharmony_ci/* enum: DFE DLev */
182928c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_DLEV 0x7
182938c2ecf20Sopenharmony_ci/* enum: Figure of Merit */
182948c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_FOM 0x8
182958c2ecf20Sopenharmony_ci/* enum: CTLE EQ Capacitor (HF Gain) */
182968c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_CTLE_EQC 0x9
182978c2ecf20Sopenharmony_ci/* enum: CTLE EQ Resistor (DC Gain) */
182988c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_CTLE_EQRES 0xa
182998c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_OFST 0
183008c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8
183018c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 5
183028c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_0 0x0 /* enum */
183038c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_1 0x1 /* enum */
183048c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_2 0x2 /* enum */
183058c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_3 0x3 /* enum */
183068c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_4 0x4 /* enum */
183078c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_5 0x5 /* enum */
183088c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_6 0x6 /* enum */
183098c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_7 0x7 /* enum */
183108c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_8 0x8 /* enum */
183118c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_9 0x9 /* enum */
183128c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_10 0xa /* enum */
183138c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_11 0xb /* enum */
183148c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_12 0xc /* enum */
183158c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_13 0xd /* enum */
183168c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_14 0xe /* enum */
183178c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_15 0xf /* enum */
183188c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_ALL 0x10 /* enum */
183198c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_OFST 0
183208c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_LBN 13
183218c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_AUTOCAL_WIDTH 1
183228c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_OFST 0
183238c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_LBN 14
183248c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_RESERVED_WIDTH 10
183258c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_OFST 0
183268c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_LBN 24
183278c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8
183288c2ecf20Sopenharmony_ci
183298c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_RXEQ_SET_IN msgrequest */
183308c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LENMIN 8
183318c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LENMAX 252
183328c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LENMAX_MCDI2 1020
183338c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_SET_IN_LEN(num) (4+4*(num))
183348c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_NUM(len) (((len)-4)/4)
183358c2ecf20Sopenharmony_ci/* Requested operation */
183368c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_OP_OFST 0
183378c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_OP_LEN 1
183388c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
183398c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_RSVD_OFST 1
183408c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PCIE_TUNE_RSVD_LEN 3
183418c2ecf20Sopenharmony_ci/* RXEQ Parameter */
183428c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_OFST 4
183438c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LEN 4
183448c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_MINNUM 1
183458c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_MAXNUM 62
183468c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_MAXNUM_MCDI2 254
183478c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_ID_OFST 4
183488c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_ID_LBN 0
183498c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_ID_WIDTH 8
183508c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
183518c2ecf20Sopenharmony_ci/*                MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_ID */
183528c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LANE_OFST 4
183538c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LANE_LBN 8
183548c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_LANE_WIDTH 5
183558c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
183568c2ecf20Sopenharmony_ci/*                MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_LANE */
183578c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_OFST 4
183588c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_LBN 13
183598c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_AUTOCAL_WIDTH 1
183608c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED_OFST 4
183618c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED_LBN 14
183628c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED_WIDTH 2
183638c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_INITIAL_OFST 4
183648c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_INITIAL_LBN 16
183658c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_PARAM_INITIAL_WIDTH 8
183668c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED2_OFST 4
183678c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED2_LBN 24
183688c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_RXEQ_SET_IN_RESERVED2_WIDTH 8
183698c2ecf20Sopenharmony_ci
183708c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_RXEQ_SET_OUT msgresponse */
183718c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_RXEQ_SET_OUT_LEN 0
183728c2ecf20Sopenharmony_ci
183738c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_TXEQ_GET_IN msgrequest */
183748c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_TXEQ_GET_IN_LEN 4
183758c2ecf20Sopenharmony_ci/* Requested operation */
183768c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_OP_OFST 0
183778c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_OP_LEN 1
183788c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
183798c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_RSVD_OFST 1
183808c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_IN_PCIE_TUNE_RSVD_LEN 3
183818c2ecf20Sopenharmony_ci
183828c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_TXEQ_GET_OUT msgresponse */
183838c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMIN 4
183848c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMAX 252
183858c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LENMAX_MCDI2 1020
183868c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_LEN(num) (0+4*(num))
183878c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_NUM(len) (((len)-0)/4)
183888c2ecf20Sopenharmony_ci/* RXEQ Parameter */
183898c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_OFST 0
183908c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LEN 4
183918c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MINNUM 1
183928c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM 63
183938c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_MAXNUM_MCDI2 255
183948c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_OFST 0
183958c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_LBN 0
183968c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_ID_WIDTH 8
183978c2ecf20Sopenharmony_ci/* enum: TxMargin (PIPE) */
183988c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_TXMARGIN 0x0
183998c2ecf20Sopenharmony_ci/* enum: TxSwing (PIPE) */
184008c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_TXSWING 0x1
184018c2ecf20Sopenharmony_ci/* enum: De-emphasis coefficient C(-1) (PIPE) */
184028c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_CM1 0x2
184038c2ecf20Sopenharmony_ci/* enum: De-emphasis coefficient C(0) (PIPE) */
184048c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_C0 0x3
184058c2ecf20Sopenharmony_ci/* enum: De-emphasis coefficient C(+1) (PIPE) */
184068c2ecf20Sopenharmony_ci#define          MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_CP1 0x4
184078c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_OFST 0
184088c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_LBN 8
184098c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_LANE_WIDTH 4
184108c2ecf20Sopenharmony_ci/*             Enum values, see field(s): */
184118c2ecf20Sopenharmony_ci/*                MC_CMD_PCIE_TUNE_RXEQ_GET_OUT/PARAM_LANE */
184128c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_OFST 0
184138c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_LBN 12
184148c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_RESERVED_WIDTH 12
184158c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_OFST 0
184168c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_LBN 24
184178c2ecf20Sopenharmony_ci#define        MC_CMD_PCIE_TUNE_TXEQ_GET_OUT_PARAM_CURRENT_WIDTH 8
184188c2ecf20Sopenharmony_ci
184198c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN msgrequest */
184208c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LEN 8
184218c2ecf20Sopenharmony_ci/* Requested operation */
184228c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_OP_OFST 0
184238c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_OP_LEN 1
184248c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
184258c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_RSVD_OFST 1
184268c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_PCIE_TUNE_RSVD_LEN 3
184278c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LANE_OFST 4
184288c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_START_EYE_PLOT_IN_LANE_LEN 4
184298c2ecf20Sopenharmony_ci
184308c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_START_EYE_PLOT_OUT msgresponse */
184318c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_START_EYE_PLOT_OUT_LEN 0
184328c2ecf20Sopenharmony_ci
184338c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN msgrequest */
184348c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_LEN 4
184358c2ecf20Sopenharmony_ci/* Requested operation */
184368c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_OP_OFST 0
184378c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_OP_LEN 1
184388c2ecf20Sopenharmony_ci/* Align the arguments to 32 bits */
184398c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_RSVD_OFST 1
184408c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_IN_PCIE_TUNE_RSVD_LEN 3
184418c2ecf20Sopenharmony_ci
184428c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT msgresponse */
184438c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMIN 0
184448c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMAX 252
184458c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LENMAX_MCDI2 1020
184468c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_LEN(num) (0+2*(num))
184478c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_NUM(len) (((len)-0)/2)
184488c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_OFST 0
184498c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_LEN 2
184508c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MINNUM 0
184518c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM 126
184528c2ecf20Sopenharmony_ci#define       MC_CMD_PCIE_TUNE_POLL_EYE_PLOT_OUT_SAMPLES_MAXNUM_MCDI2 510
184538c2ecf20Sopenharmony_ci
184548c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_IN msgrequest */
184558c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_IN_LEN 0
184568c2ecf20Sopenharmony_ci
184578c2ecf20Sopenharmony_ci/* MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_OUT msgrequest */
184588c2ecf20Sopenharmony_ci#define    MC_CMD_PCIE_TUNE_BIST_SQUARE_WAVE_OUT_LEN 0
184598c2ecf20Sopenharmony_ci
184608c2ecf20Sopenharmony_ci
184618c2ecf20Sopenharmony_ci/***********************************/
184628c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING
184638c2ecf20Sopenharmony_ci * Operations on the NVRAM_PARTITION_TYPE_LICENSE application license partition
184648c2ecf20Sopenharmony_ci * - not used for V3 licensing
184658c2ecf20Sopenharmony_ci */
184668c2ecf20Sopenharmony_ci#define MC_CMD_LICENSING 0xf3
184678c2ecf20Sopenharmony_ci#undef MC_CMD_0xf3_PRIVILEGE_CTG
184688c2ecf20Sopenharmony_ci
184698c2ecf20Sopenharmony_ci#define MC_CMD_0xf3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
184708c2ecf20Sopenharmony_ci
184718c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_IN msgrequest */
184728c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_IN_LEN 4
184738c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
184748c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_IN_OP_OFST 0
184758c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_IN_OP_LEN 4
184768c2ecf20Sopenharmony_ci/* enum: re-read and apply licenses after a license key partition update; note
184778c2ecf20Sopenharmony_ci * that this operation returns a zero-length response
184788c2ecf20Sopenharmony_ci */
184798c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_IN_OP_UPDATE_LICENSE 0x0
184808c2ecf20Sopenharmony_ci/* enum: report counts of installed licenses */
184818c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_IN_OP_GET_KEY_STATS 0x1
184828c2ecf20Sopenharmony_ci
184838c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_OUT msgresponse */
184848c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_OUT_LEN 28
184858c2ecf20Sopenharmony_ci/* count of application keys which are valid */
184868c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_VALID_APP_KEYS_OFST 0
184878c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_VALID_APP_KEYS_LEN 4
184888c2ecf20Sopenharmony_ci/* sum of UNVERIFIABLE_APP_KEYS + WRONG_NODE_APP_KEYS (for compatibility with
184898c2ecf20Sopenharmony_ci * MC_CMD_FC_OP_LICENSE)
184908c2ecf20Sopenharmony_ci */
184918c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_INVALID_APP_KEYS_OFST 4
184928c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_INVALID_APP_KEYS_LEN 4
184938c2ecf20Sopenharmony_ci/* count of application keys which are invalid due to being blacklisted */
184948c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_BLACKLISTED_APP_KEYS_OFST 8
184958c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_BLACKLISTED_APP_KEYS_LEN 4
184968c2ecf20Sopenharmony_ci/* count of application keys which are invalid due to being unverifiable */
184978c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_UNVERIFIABLE_APP_KEYS_OFST 12
184988c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_UNVERIFIABLE_APP_KEYS_LEN 4
184998c2ecf20Sopenharmony_ci/* count of application keys which are invalid due to being for the wrong node
185008c2ecf20Sopenharmony_ci */
185018c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_WRONG_NODE_APP_KEYS_OFST 16
185028c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_WRONG_NODE_APP_KEYS_LEN 4
185038c2ecf20Sopenharmony_ci/* licensing state (for diagnostics; the exact meaning of the bits in this
185048c2ecf20Sopenharmony_ci * field are private to the firmware)
185058c2ecf20Sopenharmony_ci */
185068c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_LICENSING_STATE_OFST 20
185078c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_LICENSING_STATE_LEN 4
185088c2ecf20Sopenharmony_ci/* licensing subsystem self-test report (for manftest) */
185098c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_LICENSING_SELF_TEST_OFST 24
185108c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_OUT_LICENSING_SELF_TEST_LEN 4
185118c2ecf20Sopenharmony_ci/* enum: licensing subsystem self-test failed */
185128c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_OUT_SELF_TEST_FAIL 0x0
185138c2ecf20Sopenharmony_ci/* enum: licensing subsystem self-test passed */
185148c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_OUT_SELF_TEST_PASS 0x1
185158c2ecf20Sopenharmony_ci
185168c2ecf20Sopenharmony_ci
185178c2ecf20Sopenharmony_ci/***********************************/
185188c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3
185198c2ecf20Sopenharmony_ci * Operations on the NVRAM_PARTITION_TYPE_LICENSE application license partition
185208c2ecf20Sopenharmony_ci * - V3 licensing (Medford)
185218c2ecf20Sopenharmony_ci */
185228c2ecf20Sopenharmony_ci#define MC_CMD_LICENSING_V3 0xd0
185238c2ecf20Sopenharmony_ci#undef MC_CMD_0xd0_PRIVILEGE_CTG
185248c2ecf20Sopenharmony_ci
185258c2ecf20Sopenharmony_ci#define MC_CMD_0xd0_PRIVILEGE_CTG SRIOV_CTG_GENERAL
185268c2ecf20Sopenharmony_ci
185278c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_IN msgrequest */
185288c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_IN_LEN 4
185298c2ecf20Sopenharmony_ci/* identifies the type of operation requested */
185308c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_IN_OP_OFST 0
185318c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_IN_OP_LEN 4
185328c2ecf20Sopenharmony_ci/* enum: re-read and apply licenses after a license key partition update; note
185338c2ecf20Sopenharmony_ci * that this operation returns a zero-length response
185348c2ecf20Sopenharmony_ci */
185358c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_IN_OP_UPDATE_LICENSE 0x0
185368c2ecf20Sopenharmony_ci/* enum: report counts of installed licenses Returns EAGAIN if license
185378c2ecf20Sopenharmony_ci * processing (updating) has been started but not yet completed.
185388c2ecf20Sopenharmony_ci */
185398c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_IN_OP_REPORT_LICENSE 0x1
185408c2ecf20Sopenharmony_ci
185418c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_OUT msgresponse */
185428c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_OUT_LEN 88
185438c2ecf20Sopenharmony_ci/* count of keys which are valid */
185448c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_VALID_KEYS_OFST 0
185458c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_VALID_KEYS_LEN 4
185468c2ecf20Sopenharmony_ci/* sum of UNVERIFIABLE_KEYS + WRONG_NODE_KEYS (for compatibility with
185478c2ecf20Sopenharmony_ci * MC_CMD_FC_OP_LICENSE)
185488c2ecf20Sopenharmony_ci */
185498c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_INVALID_KEYS_OFST 4
185508c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_INVALID_KEYS_LEN 4
185518c2ecf20Sopenharmony_ci/* count of keys which are invalid due to being unverifiable */
185528c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_UNVERIFIABLE_KEYS_OFST 8
185538c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_UNVERIFIABLE_KEYS_LEN 4
185548c2ecf20Sopenharmony_ci/* count of keys which are invalid due to being for the wrong node */
185558c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_WRONG_NODE_KEYS_OFST 12
185568c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_WRONG_NODE_KEYS_LEN 4
185578c2ecf20Sopenharmony_ci/* licensing state (for diagnostics; the exact meaning of the bits in this
185588c2ecf20Sopenharmony_ci * field are private to the firmware)
185598c2ecf20Sopenharmony_ci */
185608c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSING_STATE_OFST 16
185618c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSING_STATE_LEN 4
185628c2ecf20Sopenharmony_ci/* licensing subsystem self-test report (for manftest) */
185638c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSING_SELF_TEST_OFST 20
185648c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSING_SELF_TEST_LEN 4
185658c2ecf20Sopenharmony_ci/* enum: licensing subsystem self-test failed */
185668c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_OUT_SELF_TEST_FAIL 0x0
185678c2ecf20Sopenharmony_ci/* enum: licensing subsystem self-test passed */
185688c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_OUT_SELF_TEST_PASS 0x1
185698c2ecf20Sopenharmony_ci/* bitmask of licensed applications */
185708c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_OFST 24
185718c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_LEN 8
185728c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_LO_OFST 24
185738c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_APPS_HI_OFST 28
185748c2ecf20Sopenharmony_ci/* reserved for future use */
185758c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_RESERVED_0_OFST 32
185768c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_RESERVED_0_LEN 24
185778c2ecf20Sopenharmony_ci/* bitmask of licensed features */
185788c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_OFST 56
185798c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_LEN 8
185808c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_LO_OFST 56
185818c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_LICENSED_FEATURES_HI_OFST 60
185828c2ecf20Sopenharmony_ci/* reserved for future use */
185838c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_RESERVED_1_OFST 64
185848c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_OUT_RESERVED_1_LEN 24
185858c2ecf20Sopenharmony_ci
185868c2ecf20Sopenharmony_ci
185878c2ecf20Sopenharmony_ci/***********************************/
185888c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_GET_ID_V3
185898c2ecf20Sopenharmony_ci * Get ID and type from the NVRAM_PARTITION_TYPE_LICENSE application license
185908c2ecf20Sopenharmony_ci * partition - V3 licensing (Medford)
185918c2ecf20Sopenharmony_ci */
185928c2ecf20Sopenharmony_ci#define MC_CMD_LICENSING_GET_ID_V3 0xd1
185938c2ecf20Sopenharmony_ci#undef MC_CMD_0xd1_PRIVILEGE_CTG
185948c2ecf20Sopenharmony_ci
185958c2ecf20Sopenharmony_ci#define MC_CMD_0xd1_PRIVILEGE_CTG SRIOV_CTG_GENERAL
185968c2ecf20Sopenharmony_ci
185978c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_GET_ID_V3_IN msgrequest */
185988c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_GET_ID_V3_IN_LEN 0
185998c2ecf20Sopenharmony_ci
186008c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_GET_ID_V3_OUT msgresponse */
186018c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN 8
186028c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX 252
186038c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX_MCDI2 1020
186048c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_GET_ID_V3_OUT_LEN(num) (8+1*(num))
186058c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_NUM(len) (((len)-8)/1)
186068c2ecf20Sopenharmony_ci/* type of license (eg 3) */
186078c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_TYPE_OFST 0
186088c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_TYPE_LEN 4
186098c2ecf20Sopenharmony_ci/* length of the license ID (in bytes) */
186108c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH_OFST 4
186118c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH_LEN 4
186128c2ecf20Sopenharmony_ci/* the unique license ID of the adapter */
186138c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST 8
186148c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_LEN 1
186158c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_MINNUM 0
186168c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_MAXNUM 244
186178c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_MAXNUM_MCDI2 1012
186188c2ecf20Sopenharmony_ci
186198c2ecf20Sopenharmony_ci
186208c2ecf20Sopenharmony_ci/***********************************/
186218c2ecf20Sopenharmony_ci/* MC_CMD_MC2MC_PROXY
186228c2ecf20Sopenharmony_ci * Execute an arbitrary MCDI command on the slave MC of a dual-core device.
186238c2ecf20Sopenharmony_ci * This will fail on a single-core system.
186248c2ecf20Sopenharmony_ci */
186258c2ecf20Sopenharmony_ci#define MC_CMD_MC2MC_PROXY 0xf4
186268c2ecf20Sopenharmony_ci#undef MC_CMD_0xf4_PRIVILEGE_CTG
186278c2ecf20Sopenharmony_ci
186288c2ecf20Sopenharmony_ci#define MC_CMD_0xf4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
186298c2ecf20Sopenharmony_ci
186308c2ecf20Sopenharmony_ci/* MC_CMD_MC2MC_PROXY_IN msgrequest */
186318c2ecf20Sopenharmony_ci#define    MC_CMD_MC2MC_PROXY_IN_LEN 0
186328c2ecf20Sopenharmony_ci
186338c2ecf20Sopenharmony_ci/* MC_CMD_MC2MC_PROXY_OUT msgresponse */
186348c2ecf20Sopenharmony_ci#define    MC_CMD_MC2MC_PROXY_OUT_LEN 0
186358c2ecf20Sopenharmony_ci
186368c2ecf20Sopenharmony_ci
186378c2ecf20Sopenharmony_ci/***********************************/
186388c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_APP_STATE
186398c2ecf20Sopenharmony_ci * Query the state of an individual licensed application. (Note that the actual
186408c2ecf20Sopenharmony_ci * state may be invalidated by the MC_CMD_LICENSING OP_UPDATE_LICENSE operation
186418c2ecf20Sopenharmony_ci * or a reboot of the MC.) Not used for V3 licensing
186428c2ecf20Sopenharmony_ci */
186438c2ecf20Sopenharmony_ci#define MC_CMD_GET_LICENSED_APP_STATE 0xf5
186448c2ecf20Sopenharmony_ci#undef MC_CMD_0xf5_PRIVILEGE_CTG
186458c2ecf20Sopenharmony_ci
186468c2ecf20Sopenharmony_ci#define MC_CMD_0xf5_PRIVILEGE_CTG SRIOV_CTG_GENERAL
186478c2ecf20Sopenharmony_ci
186488c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_APP_STATE_IN msgrequest */
186498c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LICENSED_APP_STATE_IN_LEN 4
186508c2ecf20Sopenharmony_ci/* application ID to query (LICENSED_APP_ID_xxx) */
186518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_APP_STATE_IN_APP_ID_OFST 0
186528c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_APP_STATE_IN_APP_ID_LEN 4
186538c2ecf20Sopenharmony_ci
186548c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_APP_STATE_OUT msgresponse */
186558c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN 4
186568c2ecf20Sopenharmony_ci/* state of this application */
186578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_APP_STATE_OUT_STATE_OFST 0
186588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_APP_STATE_OUT_STATE_LEN 4
186598c2ecf20Sopenharmony_ci/* enum: no (or invalid) license is present for the application */
186608c2ecf20Sopenharmony_ci#define          MC_CMD_GET_LICENSED_APP_STATE_OUT_NOT_LICENSED 0x0
186618c2ecf20Sopenharmony_ci/* enum: a valid license is present for the application */
186628c2ecf20Sopenharmony_ci#define          MC_CMD_GET_LICENSED_APP_STATE_OUT_LICENSED 0x1
186638c2ecf20Sopenharmony_ci
186648c2ecf20Sopenharmony_ci
186658c2ecf20Sopenharmony_ci/***********************************/
186668c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_V3_APP_STATE
186678c2ecf20Sopenharmony_ci * Query the state of an individual licensed application. (Note that the actual
186688c2ecf20Sopenharmony_ci * state may be invalidated by the MC_CMD_LICENSING_V3 OP_UPDATE_LICENSE
186698c2ecf20Sopenharmony_ci * operation or a reboot of the MC.) Used for V3 licensing (Medford)
186708c2ecf20Sopenharmony_ci */
186718c2ecf20Sopenharmony_ci#define MC_CMD_GET_LICENSED_V3_APP_STATE 0xd2
186728c2ecf20Sopenharmony_ci#undef MC_CMD_0xd2_PRIVILEGE_CTG
186738c2ecf20Sopenharmony_ci
186748c2ecf20Sopenharmony_ci#define MC_CMD_0xd2_PRIVILEGE_CTG SRIOV_CTG_GENERAL
186758c2ecf20Sopenharmony_ci
186768c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_V3_APP_STATE_IN msgrequest */
186778c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LICENSED_V3_APP_STATE_IN_LEN 8
186788c2ecf20Sopenharmony_ci/* application ID to query (LICENSED_V3_APPS_xxx) expressed as a single bit
186798c2ecf20Sopenharmony_ci * mask
186808c2ecf20Sopenharmony_ci */
186818c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_OFST 0
186828c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_LEN 8
186838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_LO_OFST 0
186848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_APP_STATE_IN_APP_ID_HI_OFST 4
186858c2ecf20Sopenharmony_ci
186868c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_V3_APP_STATE_OUT msgresponse */
186878c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN 4
186888c2ecf20Sopenharmony_ci/* state of this application */
186898c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_STATE_OFST 0
186908c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_STATE_LEN 4
186918c2ecf20Sopenharmony_ci/* enum: no (or invalid) license is present for the application */
186928c2ecf20Sopenharmony_ci#define          MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_NOT_LICENSED 0x0
186938c2ecf20Sopenharmony_ci/* enum: a valid license is present for the application */
186948c2ecf20Sopenharmony_ci#define          MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LICENSED 0x1
186958c2ecf20Sopenharmony_ci
186968c2ecf20Sopenharmony_ci
186978c2ecf20Sopenharmony_ci/***********************************/
186988c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_V3_FEATURE_STATES
186998c2ecf20Sopenharmony_ci * Query the state of an one or more licensed features. (Note that the actual
187008c2ecf20Sopenharmony_ci * state may be invalidated by the MC_CMD_LICENSING_V3 OP_UPDATE_LICENSE
187018c2ecf20Sopenharmony_ci * operation or a reboot of the MC.) Used for V3 licensing (Medford)
187028c2ecf20Sopenharmony_ci */
187038c2ecf20Sopenharmony_ci#define MC_CMD_GET_LICENSED_V3_FEATURE_STATES 0xd3
187048c2ecf20Sopenharmony_ci#undef MC_CMD_0xd3_PRIVILEGE_CTG
187058c2ecf20Sopenharmony_ci
187068c2ecf20Sopenharmony_ci#define MC_CMD_0xd3_PRIVILEGE_CTG SRIOV_CTG_GENERAL
187078c2ecf20Sopenharmony_ci
187088c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN msgrequest */
187098c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_LEN 8
187108c2ecf20Sopenharmony_ci/* features to query (LICENSED_V3_FEATURES_xxx) expressed as a mask with one or
187118c2ecf20Sopenharmony_ci * more bits set
187128c2ecf20Sopenharmony_ci */
187138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_OFST 0
187148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_LEN 8
187158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_LO_OFST 0
187168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_IN_FEATURES_HI_OFST 4
187178c2ecf20Sopenharmony_ci
187188c2ecf20Sopenharmony_ci/* MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT msgresponse */
187198c2ecf20Sopenharmony_ci#define    MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_LEN 8
187208c2ecf20Sopenharmony_ci/* states of these features - bit set for licensed, clear for not licensed */
187218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_OFST 0
187228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_LEN 8
187238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_LO_OFST 0
187248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_LICENSED_V3_FEATURE_STATES_OUT_STATES_HI_OFST 4
187258c2ecf20Sopenharmony_ci
187268c2ecf20Sopenharmony_ci
187278c2ecf20Sopenharmony_ci/***********************************/
187288c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP
187298c2ecf20Sopenharmony_ci * Perform an action for an individual licensed application - not used for V3
187308c2ecf20Sopenharmony_ci * licensing.
187318c2ecf20Sopenharmony_ci */
187328c2ecf20Sopenharmony_ci#define MC_CMD_LICENSED_APP_OP 0xf6
187338c2ecf20Sopenharmony_ci#undef MC_CMD_0xf6_PRIVILEGE_CTG
187348c2ecf20Sopenharmony_ci
187358c2ecf20Sopenharmony_ci#define MC_CMD_0xf6_PRIVILEGE_CTG SRIOV_CTG_GENERAL
187368c2ecf20Sopenharmony_ci
187378c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP_IN msgrequest */
187388c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_IN_LENMIN 8
187398c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_IN_LENMAX 252
187408c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_IN_LENMAX_MCDI2 1020
187418c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_IN_LEN(num) (8+4*(num))
187428c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_IN_ARGS_NUM(len) (((len)-8)/4)
187438c2ecf20Sopenharmony_ci/* application ID */
187448c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_APP_ID_OFST 0
187458c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_APP_ID_LEN 4
187468c2ecf20Sopenharmony_ci/* the type of operation requested */
187478c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_OP_OFST 4
187488c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_OP_LEN 4
187498c2ecf20Sopenharmony_ci/* enum: validate application */
187508c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSED_APP_OP_IN_OP_VALIDATE 0x0
187518c2ecf20Sopenharmony_ci/* enum: mask application */
187528c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSED_APP_OP_IN_OP_MASK 0x1
187538c2ecf20Sopenharmony_ci/* arguments specific to this particular operation */
187548c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_ARGS_OFST 8
187558c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_ARGS_LEN 4
187568c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_ARGS_MINNUM 0
187578c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_ARGS_MAXNUM 61
187588c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_IN_ARGS_MAXNUM_MCDI2 253
187598c2ecf20Sopenharmony_ci
187608c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP_OUT msgresponse */
187618c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_OUT_LENMIN 0
187628c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_OUT_LENMAX 252
187638c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_OUT_LENMAX_MCDI2 1020
187648c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_OUT_LEN(num) (0+4*(num))
187658c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_OUT_RESULT_NUM(len) (((len)-0)/4)
187668c2ecf20Sopenharmony_ci/* result specific to this particular operation */
187678c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_OUT_RESULT_OFST 0
187688c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_OUT_RESULT_LEN 4
187698c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_OUT_RESULT_MINNUM 0
187708c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_OUT_RESULT_MAXNUM 63
187718c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_OUT_RESULT_MAXNUM_MCDI2 255
187728c2ecf20Sopenharmony_ci
187738c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP_VALIDATE_IN msgrequest */
187748c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_VALIDATE_IN_LEN 72
187758c2ecf20Sopenharmony_ci/* application ID */
187768c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_IN_APP_ID_OFST 0
187778c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_IN_APP_ID_LEN 4
187788c2ecf20Sopenharmony_ci/* the type of operation requested */
187798c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_IN_OP_OFST 4
187808c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_IN_OP_LEN 4
187818c2ecf20Sopenharmony_ci/* validation challenge */
187828c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_IN_CHALLENGE_OFST 8
187838c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_IN_CHALLENGE_LEN 64
187848c2ecf20Sopenharmony_ci
187858c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP_VALIDATE_OUT msgresponse */
187868c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_LEN 68
187878c2ecf20Sopenharmony_ci/* feature expiry (time_t) */
187888c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_EXPIRY_OFST 0
187898c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_EXPIRY_LEN 4
187908c2ecf20Sopenharmony_ci/* validation response */
187918c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_RESPONSE_OFST 4
187928c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_VALIDATE_OUT_RESPONSE_LEN 64
187938c2ecf20Sopenharmony_ci
187948c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP_MASK_IN msgrequest */
187958c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_MASK_IN_LEN 12
187968c2ecf20Sopenharmony_ci/* application ID */
187978c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_MASK_IN_APP_ID_OFST 0
187988c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_MASK_IN_APP_ID_LEN 4
187998c2ecf20Sopenharmony_ci/* the type of operation requested */
188008c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_MASK_IN_OP_OFST 4
188018c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_MASK_IN_OP_LEN 4
188028c2ecf20Sopenharmony_ci/* flag */
188038c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_MASK_IN_FLAG_OFST 8
188048c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_APP_OP_MASK_IN_FLAG_LEN 4
188058c2ecf20Sopenharmony_ci
188068c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_APP_OP_MASK_OUT msgresponse */
188078c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_APP_OP_MASK_OUT_LEN 0
188088c2ecf20Sopenharmony_ci
188098c2ecf20Sopenharmony_ci
188108c2ecf20Sopenharmony_ci/***********************************/
188118c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_V3_VALIDATE_APP
188128c2ecf20Sopenharmony_ci * Perform validation for an individual licensed application - V3 licensing
188138c2ecf20Sopenharmony_ci * (Medford)
188148c2ecf20Sopenharmony_ci */
188158c2ecf20Sopenharmony_ci#define MC_CMD_LICENSED_V3_VALIDATE_APP 0xd4
188168c2ecf20Sopenharmony_ci#undef MC_CMD_0xd4_PRIVILEGE_CTG
188178c2ecf20Sopenharmony_ci
188188c2ecf20Sopenharmony_ci#define MC_CMD_0xd4_PRIVILEGE_CTG SRIOV_CTG_GENERAL
188198c2ecf20Sopenharmony_ci
188208c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_V3_VALIDATE_APP_IN msgrequest */
188218c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_V3_VALIDATE_APP_IN_LEN 56
188228c2ecf20Sopenharmony_ci/* challenge for validation (384 bits) */
188238c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_IN_CHALLENGE_OFST 0
188248c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_IN_CHALLENGE_LEN 48
188258c2ecf20Sopenharmony_ci/* application ID expressed as a single bit mask */
188268c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_OFST 48
188278c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_LEN 8
188288c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_LO_OFST 48
188298c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_IN_APP_ID_HI_OFST 52
188308c2ecf20Sopenharmony_ci
188318c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_V3_VALIDATE_APP_OUT msgresponse */
188328c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_LEN 116
188338c2ecf20Sopenharmony_ci/* validation response to challenge in the form of ECDSA signature consisting
188348c2ecf20Sopenharmony_ci * of two 384-bit integers, r and s, in big-endian order. The signature signs a
188358c2ecf20Sopenharmony_ci * SHA-384 digest of a message constructed from the concatenation of the input
188368c2ecf20Sopenharmony_ci * message and the remaining fields of this output message, e.g. challenge[48
188378c2ecf20Sopenharmony_ci * bytes] ... expiry_time[4 bytes] ...
188388c2ecf20Sopenharmony_ci */
188398c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_RESPONSE_OFST 0
188408c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_RESPONSE_LEN 96
188418c2ecf20Sopenharmony_ci/* application expiry time */
188428c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_TIME_OFST 96
188438c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_TIME_LEN 4
188448c2ecf20Sopenharmony_ci/* application expiry units */
188458c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNITS_OFST 100
188468c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNITS_LEN 4
188478c2ecf20Sopenharmony_ci/* enum: expiry units are accounting units */
188488c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNIT_ACC 0x0
188498c2ecf20Sopenharmony_ci/* enum: expiry units are calendar days */
188508c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_EXPIRY_UNIT_DAYS 0x1
188518c2ecf20Sopenharmony_ci/* base MAC address of the NIC stored in NVRAM (note that this is a constant
188528c2ecf20Sopenharmony_ci * value for a given NIC regardless which function is calling, effectively this
188538c2ecf20Sopenharmony_ci * is PF0 base MAC address)
188548c2ecf20Sopenharmony_ci */
188558c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_BASE_MACADDR_OFST 104
188568c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_BASE_MACADDR_LEN 6
188578c2ecf20Sopenharmony_ci/* MAC address of v-adaptor associated with the client. If no such v-adapator
188588c2ecf20Sopenharmony_ci * exists, then the field is filled with 0xFF.
188598c2ecf20Sopenharmony_ci */
188608c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_VADAPTOR_MACADDR_OFST 110
188618c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_VALIDATE_APP_OUT_VADAPTOR_MACADDR_LEN 6
188628c2ecf20Sopenharmony_ci
188638c2ecf20Sopenharmony_ci
188648c2ecf20Sopenharmony_ci/***********************************/
188658c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_V3_MASK_FEATURES
188668c2ecf20Sopenharmony_ci * Mask features - V3 licensing (Medford)
188678c2ecf20Sopenharmony_ci */
188688c2ecf20Sopenharmony_ci#define MC_CMD_LICENSED_V3_MASK_FEATURES 0xd5
188698c2ecf20Sopenharmony_ci#undef MC_CMD_0xd5_PRIVILEGE_CTG
188708c2ecf20Sopenharmony_ci
188718c2ecf20Sopenharmony_ci#define MC_CMD_0xd5_PRIVILEGE_CTG SRIOV_CTG_ADMIN
188728c2ecf20Sopenharmony_ci
188738c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_V3_MASK_FEATURES_IN msgrequest */
188748c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_V3_MASK_FEATURES_IN_LEN 12
188758c2ecf20Sopenharmony_ci/* mask to be applied to features to be changed */
188768c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_OFST 0
188778c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_LEN 8
188788c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_LO_OFST 0
188798c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_MASK_FEATURES_IN_MASK_HI_OFST 4
188808c2ecf20Sopenharmony_ci/* whether to turn on or turn off the masked features */
188818c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_MASK_FEATURES_IN_FLAG_OFST 8
188828c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSED_V3_MASK_FEATURES_IN_FLAG_LEN 4
188838c2ecf20Sopenharmony_ci/* enum: turn the features off */
188848c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSED_V3_MASK_FEATURES_IN_OFF 0x0
188858c2ecf20Sopenharmony_ci/* enum: turn the features back on */
188868c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSED_V3_MASK_FEATURES_IN_ON 0x1
188878c2ecf20Sopenharmony_ci
188888c2ecf20Sopenharmony_ci/* MC_CMD_LICENSED_V3_MASK_FEATURES_OUT msgresponse */
188898c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSED_V3_MASK_FEATURES_OUT_LEN 0
188908c2ecf20Sopenharmony_ci
188918c2ecf20Sopenharmony_ci
188928c2ecf20Sopenharmony_ci/***********************************/
188938c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_TEMPORARY
188948c2ecf20Sopenharmony_ci * Perform operations to support installation of a single temporary license in
188958c2ecf20Sopenharmony_ci * the adapter, in addition to those found in the licensing partition. See
188968c2ecf20Sopenharmony_ci * SF-116124-SW for an overview of how this could be used. The license is
188978c2ecf20Sopenharmony_ci * stored in MC persistent data and so will survive a MC reboot, but will be
188988c2ecf20Sopenharmony_ci * erased when the adapter is power cycled
188998c2ecf20Sopenharmony_ci */
189008c2ecf20Sopenharmony_ci#define MC_CMD_LICENSING_V3_TEMPORARY 0xd6
189018c2ecf20Sopenharmony_ci#undef MC_CMD_0xd6_PRIVILEGE_CTG
189028c2ecf20Sopenharmony_ci
189038c2ecf20Sopenharmony_ci#define MC_CMD_0xd6_PRIVILEGE_CTG SRIOV_CTG_ADMIN
189048c2ecf20Sopenharmony_ci
189058c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_TEMPORARY_IN msgrequest */
189068c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_TEMPORARY_IN_LEN 4
189078c2ecf20Sopenharmony_ci/* operation code */
189088c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_OP_OFST 0
189098c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_OP_LEN 4
189108c2ecf20Sopenharmony_ci/* enum: install a new license, overwriting any existing temporary license.
189118c2ecf20Sopenharmony_ci * This is an asynchronous operation owing to the time taken to validate an
189128c2ecf20Sopenharmony_ci * ECDSA license
189138c2ecf20Sopenharmony_ci */
189148c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_TEMPORARY_SET 0x0
189158c2ecf20Sopenharmony_ci/* enum: clear the license immediately rather than waiting for the next power
189168c2ecf20Sopenharmony_ci * cycle
189178c2ecf20Sopenharmony_ci */
189188c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_TEMPORARY_CLEAR 0x1
189198c2ecf20Sopenharmony_ci/* enum: get the status of the asynchronous MC_CMD_LICENSING_V3_TEMPORARY_SET
189208c2ecf20Sopenharmony_ci * operation
189218c2ecf20Sopenharmony_ci */
189228c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_TEMPORARY_STATUS 0x2
189238c2ecf20Sopenharmony_ci
189248c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_TEMPORARY_IN_SET msgrequest */
189258c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_LEN 164
189268c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_OP_OFST 0
189278c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_OP_LEN 4
189288c2ecf20Sopenharmony_ci/* ECDSA license and signature */
189298c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_LICENSE_OFST 4
189308c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_SET_LICENSE_LEN 160
189318c2ecf20Sopenharmony_ci
189328c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR msgrequest */
189338c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR_LEN 4
189348c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR_OP_OFST 0
189358c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_CLEAR_OP_LEN 4
189368c2ecf20Sopenharmony_ci
189378c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS msgrequest */
189388c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS_LEN 4
189398c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS_OP_OFST 0
189408c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_IN_STATUS_OP_LEN 4
189418c2ecf20Sopenharmony_ci
189428c2ecf20Sopenharmony_ci/* MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS msgresponse */
189438c2ecf20Sopenharmony_ci#define    MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LEN 12
189448c2ecf20Sopenharmony_ci/* status code */
189458c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_STATUS_OFST 0
189468c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_STATUS_LEN 4
189478c2ecf20Sopenharmony_ci/* enum: finished validating and installing license */
189488c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_TEMPORARY_STATUS_OK 0x0
189498c2ecf20Sopenharmony_ci/* enum: license validation and installation in progress */
189508c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_TEMPORARY_STATUS_IN_PROGRESS 0x1
189518c2ecf20Sopenharmony_ci/* enum: licensing error. More specific error messages are not provided to
189528c2ecf20Sopenharmony_ci * avoid exposing details of the licensing system to the client
189538c2ecf20Sopenharmony_ci */
189548c2ecf20Sopenharmony_ci#define          MC_CMD_LICENSING_V3_TEMPORARY_STATUS_ERROR 0x2
189558c2ecf20Sopenharmony_ci/* bitmask of licensed features */
189568c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_OFST 4
189578c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_LEN 8
189588c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_LO_OFST 4
189598c2ecf20Sopenharmony_ci#define       MC_CMD_LICENSING_V3_TEMPORARY_OUT_STATUS_LICENSED_FEATURES_HI_OFST 8
189608c2ecf20Sopenharmony_ci
189618c2ecf20Sopenharmony_ci
189628c2ecf20Sopenharmony_ci/***********************************/
189638c2ecf20Sopenharmony_ci/* MC_CMD_SET_PORT_SNIFF_CONFIG
189648c2ecf20Sopenharmony_ci * Configure RX port sniffing for the physical port associated with the calling
189658c2ecf20Sopenharmony_ci * function. Only a privileged function may change the port sniffing
189668c2ecf20Sopenharmony_ci * configuration. A copy of all traffic delivered to the host (non-promiscuous
189678c2ecf20Sopenharmony_ci * mode) or all traffic arriving at the port (promiscuous mode) may be
189688c2ecf20Sopenharmony_ci * delivered to a specific queue, or a set of queues with RSS.
189698c2ecf20Sopenharmony_ci */
189708c2ecf20Sopenharmony_ci#define MC_CMD_SET_PORT_SNIFF_CONFIG 0xf7
189718c2ecf20Sopenharmony_ci#undef MC_CMD_0xf7_PRIVILEGE_CTG
189728c2ecf20Sopenharmony_ci
189738c2ecf20Sopenharmony_ci#define MC_CMD_0xf7_PRIVILEGE_CTG SRIOV_CTG_ADMIN
189748c2ecf20Sopenharmony_ci
189758c2ecf20Sopenharmony_ci/* MC_CMD_SET_PORT_SNIFF_CONFIG_IN msgrequest */
189768c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PORT_SNIFF_CONFIG_IN_LEN 16
189778c2ecf20Sopenharmony_ci/* configuration flags */
189788c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_FLAGS_OFST 0
189798c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_FLAGS_LEN 4
189808c2ecf20Sopenharmony_ci#define        MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_OFST 0
189818c2ecf20Sopenharmony_ci#define        MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_LBN 0
189828c2ecf20Sopenharmony_ci#define        MC_CMD_SET_PORT_SNIFF_CONFIG_IN_ENABLE_WIDTH 1
189838c2ecf20Sopenharmony_ci#define        MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_OFST 0
189848c2ecf20Sopenharmony_ci#define        MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_LBN 1
189858c2ecf20Sopenharmony_ci#define        MC_CMD_SET_PORT_SNIFF_CONFIG_IN_PROMISCUOUS_WIDTH 1
189868c2ecf20Sopenharmony_ci/* receive queue handle (for RSS mode, this is the base queue) */
189878c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_QUEUE_OFST 4
189888c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_QUEUE_LEN 4
189898c2ecf20Sopenharmony_ci/* receive mode */
189908c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_OFST 8
189918c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_LEN 4
189928c2ecf20Sopenharmony_ci/* enum: receive to just the specified queue */
189938c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_SIMPLE 0x0
189948c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using RSS context */
189958c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_MODE_RSS 0x1
189968c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) as returned by MC_CMD_RSS_CONTEXT_ALLOC. Note
189978c2ecf20Sopenharmony_ci * that these handles should be considered opaque to the host, although a value
189988c2ecf20Sopenharmony_ci * of 0xFFFFFFFF is guaranteed never to be a valid handle.
189998c2ecf20Sopenharmony_ci */
190008c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_OFST 12
190018c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_LEN 4
190028c2ecf20Sopenharmony_ci
190038c2ecf20Sopenharmony_ci/* MC_CMD_SET_PORT_SNIFF_CONFIG_OUT msgresponse */
190048c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PORT_SNIFF_CONFIG_OUT_LEN 0
190058c2ecf20Sopenharmony_ci
190068c2ecf20Sopenharmony_ci
190078c2ecf20Sopenharmony_ci/***********************************/
190088c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_SNIFF_CONFIG
190098c2ecf20Sopenharmony_ci * Obtain the current RX port sniffing configuration for the physical port
190108c2ecf20Sopenharmony_ci * associated with the calling function. Only a privileged function may read
190118c2ecf20Sopenharmony_ci * the configuration.
190128c2ecf20Sopenharmony_ci */
190138c2ecf20Sopenharmony_ci#define MC_CMD_GET_PORT_SNIFF_CONFIG 0xf8
190148c2ecf20Sopenharmony_ci#undef MC_CMD_0xf8_PRIVILEGE_CTG
190158c2ecf20Sopenharmony_ci
190168c2ecf20Sopenharmony_ci#define MC_CMD_0xf8_PRIVILEGE_CTG SRIOV_CTG_GENERAL
190178c2ecf20Sopenharmony_ci
190188c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_SNIFF_CONFIG_IN msgrequest */
190198c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_SNIFF_CONFIG_IN_LEN 0
190208c2ecf20Sopenharmony_ci
190218c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_SNIFF_CONFIG_OUT msgresponse */
190228c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_LEN 16
190238c2ecf20Sopenharmony_ci/* configuration flags */
190248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_FLAGS_OFST 0
190258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_FLAGS_LEN 4
190268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_OFST 0
190278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_LBN 0
190288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_ENABLE_WIDTH 1
190298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_OFST 0
190308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_LBN 1
190318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_PROMISCUOUS_WIDTH 1
190328c2ecf20Sopenharmony_ci/* receiving queue handle (for RSS mode, this is the base queue) */
190338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_OFST 4
190348c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_LEN 4
190358c2ecf20Sopenharmony_ci/* receive mode */
190368c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_OFST 8
190378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_LEN 4
190388c2ecf20Sopenharmony_ci/* enum: receiving to just the specified queue */
190398c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_SIMPLE 0x0
190408c2ecf20Sopenharmony_ci/* enum: receiving to multiple queues using RSS context */
190418c2ecf20Sopenharmony_ci#define          MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_MODE_RSS 0x1
190428c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) */
190438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_OFST 12
190448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_LEN 4
190458c2ecf20Sopenharmony_ci
190468c2ecf20Sopenharmony_ci
190478c2ecf20Sopenharmony_ci/***********************************/
190488c2ecf20Sopenharmony_ci/* MC_CMD_SET_PARSER_DISP_CONFIG
190498c2ecf20Sopenharmony_ci * Change configuration related to the parser-dispatcher subsystem.
190508c2ecf20Sopenharmony_ci */
190518c2ecf20Sopenharmony_ci#define MC_CMD_SET_PARSER_DISP_CONFIG 0xf9
190528c2ecf20Sopenharmony_ci#undef MC_CMD_0xf9_PRIVILEGE_CTG
190538c2ecf20Sopenharmony_ci
190548c2ecf20Sopenharmony_ci#define MC_CMD_0xf9_PRIVILEGE_CTG SRIOV_CTG_GENERAL
190558c2ecf20Sopenharmony_ci
190568c2ecf20Sopenharmony_ci/* MC_CMD_SET_PARSER_DISP_CONFIG_IN msgrequest */
190578c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PARSER_DISP_CONFIG_IN_LENMIN 12
190588c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PARSER_DISP_CONFIG_IN_LENMAX 252
190598c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PARSER_DISP_CONFIG_IN_LENMAX_MCDI2 1020
190608c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PARSER_DISP_CONFIG_IN_LEN(num) (8+4*(num))
190618c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_NUM(len) (((len)-8)/4)
190628c2ecf20Sopenharmony_ci/* the type of configuration setting to change */
190638c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_TYPE_OFST 0
190648c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_TYPE_LEN 4
190658c2ecf20Sopenharmony_ci/* enum: Per-TXQ enable for multicast UDP destination lookup for possible
190668c2ecf20Sopenharmony_ci * internal loopback. (ENTITY is a queue handle, VALUE is a single boolean.)
190678c2ecf20Sopenharmony_ci */
190688c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PARSER_DISP_CONFIG_IN_TXQ_MCAST_UDP_DST_LOOKUP_EN 0x0
190698c2ecf20Sopenharmony_ci/* enum: Per-v-adaptor enable for suppression of self-transmissions on the
190708c2ecf20Sopenharmony_ci * internal loopback path. (ENTITY is an EVB_PORT_ID, VALUE is a single
190718c2ecf20Sopenharmony_ci * boolean.)
190728c2ecf20Sopenharmony_ci */
190738c2ecf20Sopenharmony_ci#define          MC_CMD_SET_PARSER_DISP_CONFIG_IN_VADAPTOR_SUPPRESS_SELF_TX 0x1
190748c2ecf20Sopenharmony_ci/* handle for the entity to update: queue handle, EVB port ID, etc. depending
190758c2ecf20Sopenharmony_ci * on the type of configuration setting being changed
190768c2ecf20Sopenharmony_ci */
190778c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_ENTITY_OFST 4
190788c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_ENTITY_LEN 4
190798c2ecf20Sopenharmony_ci/* new value: the details depend on the type of configuration setting being
190808c2ecf20Sopenharmony_ci * changed
190818c2ecf20Sopenharmony_ci */
190828c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_OFST 8
190838c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_LEN 4
190848c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_MINNUM 1
190858c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_MAXNUM 61
190868c2ecf20Sopenharmony_ci#define       MC_CMD_SET_PARSER_DISP_CONFIG_IN_VALUE_MAXNUM_MCDI2 253
190878c2ecf20Sopenharmony_ci
190888c2ecf20Sopenharmony_ci/* MC_CMD_SET_PARSER_DISP_CONFIG_OUT msgresponse */
190898c2ecf20Sopenharmony_ci#define    MC_CMD_SET_PARSER_DISP_CONFIG_OUT_LEN 0
190908c2ecf20Sopenharmony_ci
190918c2ecf20Sopenharmony_ci
190928c2ecf20Sopenharmony_ci/***********************************/
190938c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_CONFIG
190948c2ecf20Sopenharmony_ci * Read configuration related to the parser-dispatcher subsystem.
190958c2ecf20Sopenharmony_ci */
190968c2ecf20Sopenharmony_ci#define MC_CMD_GET_PARSER_DISP_CONFIG 0xfa
190978c2ecf20Sopenharmony_ci#undef MC_CMD_0xfa_PRIVILEGE_CTG
190988c2ecf20Sopenharmony_ci
190998c2ecf20Sopenharmony_ci#define MC_CMD_0xfa_PRIVILEGE_CTG SRIOV_CTG_GENERAL
191008c2ecf20Sopenharmony_ci
191018c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_CONFIG_IN msgrequest */
191028c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_CONFIG_IN_LEN 8
191038c2ecf20Sopenharmony_ci/* the type of configuration setting to read */
191048c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_IN_TYPE_OFST 0
191058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_IN_TYPE_LEN 4
191068c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
191078c2ecf20Sopenharmony_ci/*               MC_CMD_SET_PARSER_DISP_CONFIG/MC_CMD_SET_PARSER_DISP_CONFIG_IN/TYPE */
191088c2ecf20Sopenharmony_ci/* handle for the entity to query: queue handle, EVB port ID, etc. depending on
191098c2ecf20Sopenharmony_ci * the type of configuration setting being read
191108c2ecf20Sopenharmony_ci */
191118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_IN_ENTITY_OFST 4
191128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_IN_ENTITY_LEN 4
191138c2ecf20Sopenharmony_ci
191148c2ecf20Sopenharmony_ci/* MC_CMD_GET_PARSER_DISP_CONFIG_OUT msgresponse */
191158c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LENMIN 4
191168c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LENMAX 252
191178c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LENMAX_MCDI2 1020
191188c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_CONFIG_OUT_LEN(num) (0+4*(num))
191198c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_NUM(len) (((len)-0)/4)
191208c2ecf20Sopenharmony_ci/* current value: the details depend on the type of configuration setting being
191218c2ecf20Sopenharmony_ci * read
191228c2ecf20Sopenharmony_ci */
191238c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_OFST 0
191248c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_LEN 4
191258c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_MINNUM 1
191268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_MAXNUM 63
191278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PARSER_DISP_CONFIG_OUT_VALUE_MAXNUM_MCDI2 255
191288c2ecf20Sopenharmony_ci
191298c2ecf20Sopenharmony_ci
191308c2ecf20Sopenharmony_ci/***********************************/
191318c2ecf20Sopenharmony_ci/* MC_CMD_SET_TX_PORT_SNIFF_CONFIG
191328c2ecf20Sopenharmony_ci * Configure TX port sniffing for the physical port associated with the calling
191338c2ecf20Sopenharmony_ci * function. Only a privileged function may change the port sniffing
191348c2ecf20Sopenharmony_ci * configuration. A copy of all traffic transmitted through the port may be
191358c2ecf20Sopenharmony_ci * delivered to a specific queue, or a set of queues with RSS. Note that these
191368c2ecf20Sopenharmony_ci * packets are delivered with transmit timestamps in the packet prefix, not
191378c2ecf20Sopenharmony_ci * receive timestamps, so it is likely that the queue(s) will need to be
191388c2ecf20Sopenharmony_ci * dedicated as TX sniff receivers.
191398c2ecf20Sopenharmony_ci */
191408c2ecf20Sopenharmony_ci#define MC_CMD_SET_TX_PORT_SNIFF_CONFIG 0xfb
191418c2ecf20Sopenharmony_ci#undef MC_CMD_0xfb_PRIVILEGE_CTG
191428c2ecf20Sopenharmony_ci
191438c2ecf20Sopenharmony_ci#define MC_CMD_0xfb_PRIVILEGE_CTG SRIOV_CTG_ADMIN
191448c2ecf20Sopenharmony_ci
191458c2ecf20Sopenharmony_ci/* MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN msgrequest */
191468c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_LEN 16
191478c2ecf20Sopenharmony_ci/* configuration flags */
191488c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_FLAGS_OFST 0
191498c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_FLAGS_LEN 4
191508c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_ENABLE_OFST 0
191518c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_ENABLE_LBN 0
191528c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_ENABLE_WIDTH 1
191538c2ecf20Sopenharmony_ci/* receive queue handle (for RSS mode, this is the base queue) */
191548c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_QUEUE_OFST 4
191558c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_QUEUE_LEN 4
191568c2ecf20Sopenharmony_ci/* receive mode */
191578c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_OFST 8
191588c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_LEN 4
191598c2ecf20Sopenharmony_ci/* enum: receive to just the specified queue */
191608c2ecf20Sopenharmony_ci#define          MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_SIMPLE 0x0
191618c2ecf20Sopenharmony_ci/* enum: receive to multiple queues using RSS context */
191628c2ecf20Sopenharmony_ci#define          MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_MODE_RSS 0x1
191638c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) as returned by MC_CMD_RSS_CONTEXT_ALLOC. Note
191648c2ecf20Sopenharmony_ci * that these handles should be considered opaque to the host, although a value
191658c2ecf20Sopenharmony_ci * of 0xFFFFFFFF is guaranteed never to be a valid handle.
191668c2ecf20Sopenharmony_ci */
191678c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_OFST 12
191688c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TX_PORT_SNIFF_CONFIG_IN_RX_CONTEXT_LEN 4
191698c2ecf20Sopenharmony_ci
191708c2ecf20Sopenharmony_ci/* MC_CMD_SET_TX_PORT_SNIFF_CONFIG_OUT msgresponse */
191718c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TX_PORT_SNIFF_CONFIG_OUT_LEN 0
191728c2ecf20Sopenharmony_ci
191738c2ecf20Sopenharmony_ci
191748c2ecf20Sopenharmony_ci/***********************************/
191758c2ecf20Sopenharmony_ci/* MC_CMD_GET_TX_PORT_SNIFF_CONFIG
191768c2ecf20Sopenharmony_ci * Obtain the current TX port sniffing configuration for the physical port
191778c2ecf20Sopenharmony_ci * associated with the calling function. Only a privileged function may read
191788c2ecf20Sopenharmony_ci * the configuration.
191798c2ecf20Sopenharmony_ci */
191808c2ecf20Sopenharmony_ci#define MC_CMD_GET_TX_PORT_SNIFF_CONFIG 0xfc
191818c2ecf20Sopenharmony_ci#undef MC_CMD_0xfc_PRIVILEGE_CTG
191828c2ecf20Sopenharmony_ci
191838c2ecf20Sopenharmony_ci#define MC_CMD_0xfc_PRIVILEGE_CTG SRIOV_CTG_GENERAL
191848c2ecf20Sopenharmony_ci
191858c2ecf20Sopenharmony_ci/* MC_CMD_GET_TX_PORT_SNIFF_CONFIG_IN msgrequest */
191868c2ecf20Sopenharmony_ci#define    MC_CMD_GET_TX_PORT_SNIFF_CONFIG_IN_LEN 0
191878c2ecf20Sopenharmony_ci
191888c2ecf20Sopenharmony_ci/* MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT msgresponse */
191898c2ecf20Sopenharmony_ci#define    MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_LEN 16
191908c2ecf20Sopenharmony_ci/* configuration flags */
191918c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_FLAGS_OFST 0
191928c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_FLAGS_LEN 4
191938c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_ENABLE_OFST 0
191948c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_ENABLE_LBN 0
191958c2ecf20Sopenharmony_ci#define        MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_ENABLE_WIDTH 1
191968c2ecf20Sopenharmony_ci/* receiving queue handle (for RSS mode, this is the base queue) */
191978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_OFST 4
191988c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_QUEUE_LEN 4
191998c2ecf20Sopenharmony_ci/* receive mode */
192008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_OFST 8
192018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_LEN 4
192028c2ecf20Sopenharmony_ci/* enum: receiving to just the specified queue */
192038c2ecf20Sopenharmony_ci#define          MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_SIMPLE 0x0
192048c2ecf20Sopenharmony_ci/* enum: receiving to multiple queues using RSS context */
192058c2ecf20Sopenharmony_ci#define          MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_MODE_RSS 0x1
192068c2ecf20Sopenharmony_ci/* RSS context (for RX_MODE_RSS) */
192078c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_OFST 12
192088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_TX_PORT_SNIFF_CONFIG_OUT_RX_CONTEXT_LEN 4
192098c2ecf20Sopenharmony_ci
192108c2ecf20Sopenharmony_ci
192118c2ecf20Sopenharmony_ci/***********************************/
192128c2ecf20Sopenharmony_ci/* MC_CMD_RMON_STATS_RX_ERRORS
192138c2ecf20Sopenharmony_ci * Per queue rx error stats.
192148c2ecf20Sopenharmony_ci */
192158c2ecf20Sopenharmony_ci#define MC_CMD_RMON_STATS_RX_ERRORS 0xfe
192168c2ecf20Sopenharmony_ci#undef MC_CMD_0xfe_PRIVILEGE_CTG
192178c2ecf20Sopenharmony_ci
192188c2ecf20Sopenharmony_ci#define MC_CMD_0xfe_PRIVILEGE_CTG SRIOV_CTG_GENERAL
192198c2ecf20Sopenharmony_ci
192208c2ecf20Sopenharmony_ci/* MC_CMD_RMON_STATS_RX_ERRORS_IN msgrequest */
192218c2ecf20Sopenharmony_ci#define    MC_CMD_RMON_STATS_RX_ERRORS_IN_LEN 8
192228c2ecf20Sopenharmony_ci/* The rx queue to get stats for. */
192238c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_IN_RX_QUEUE_OFST 0
192248c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_IN_RX_QUEUE_LEN 4
192258c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_IN_FLAGS_OFST 4
192268c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_IN_FLAGS_LEN 4
192278c2ecf20Sopenharmony_ci#define        MC_CMD_RMON_STATS_RX_ERRORS_IN_RST_OFST 4
192288c2ecf20Sopenharmony_ci#define        MC_CMD_RMON_STATS_RX_ERRORS_IN_RST_LBN 0
192298c2ecf20Sopenharmony_ci#define        MC_CMD_RMON_STATS_RX_ERRORS_IN_RST_WIDTH 1
192308c2ecf20Sopenharmony_ci
192318c2ecf20Sopenharmony_ci/* MC_CMD_RMON_STATS_RX_ERRORS_OUT msgresponse */
192328c2ecf20Sopenharmony_ci#define    MC_CMD_RMON_STATS_RX_ERRORS_OUT_LEN 16
192338c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_CRC_ERRORS_OFST 0
192348c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_CRC_ERRORS_LEN 4
192358c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_TRUNC_ERRORS_OFST 4
192368c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_TRUNC_ERRORS_LEN 4
192378c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_NO_DESC_DROPS_OFST 8
192388c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_NO_DESC_DROPS_LEN 4
192398c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_ABORT_OFST 12
192408c2ecf20Sopenharmony_ci#define       MC_CMD_RMON_STATS_RX_ERRORS_OUT_RX_ABORT_LEN 4
192418c2ecf20Sopenharmony_ci
192428c2ecf20Sopenharmony_ci
192438c2ecf20Sopenharmony_ci/***********************************/
192448c2ecf20Sopenharmony_ci/* MC_CMD_GET_PCIE_RESOURCE_INFO
192458c2ecf20Sopenharmony_ci * Find out about available PCIE resources
192468c2ecf20Sopenharmony_ci */
192478c2ecf20Sopenharmony_ci#define MC_CMD_GET_PCIE_RESOURCE_INFO 0xfd
192488c2ecf20Sopenharmony_ci#undef MC_CMD_0xfd_PRIVILEGE_CTG
192498c2ecf20Sopenharmony_ci
192508c2ecf20Sopenharmony_ci#define MC_CMD_0xfd_PRIVILEGE_CTG SRIOV_CTG_GENERAL
192518c2ecf20Sopenharmony_ci
192528c2ecf20Sopenharmony_ci/* MC_CMD_GET_PCIE_RESOURCE_INFO_IN msgrequest */
192538c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PCIE_RESOURCE_INFO_IN_LEN 0
192548c2ecf20Sopenharmony_ci
192558c2ecf20Sopenharmony_ci/* MC_CMD_GET_PCIE_RESOURCE_INFO_OUT msgresponse */
192568c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_LEN 28
192578c2ecf20Sopenharmony_ci/* The maximum number of PFs the device can expose */
192588c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PFS_OFST 0
192598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PFS_LEN 4
192608c2ecf20Sopenharmony_ci/* The maximum number of VFs the device can expose in total */
192618c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VFS_OFST 4
192628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VFS_LEN 4
192638c2ecf20Sopenharmony_ci/* The maximum number of MSI-X vectors the device can provide in total */
192648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VECTORS_OFST 8
192658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VECTORS_LEN 4
192668c2ecf20Sopenharmony_ci/* the number of MSI-X vectors the device will allocate by default to each PF
192678c2ecf20Sopenharmony_ci */
192688c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_PF_VECTORS_OFST 12
192698c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_PF_VECTORS_LEN 4
192708c2ecf20Sopenharmony_ci/* the number of MSI-X vectors the device will allocate by default to each VF
192718c2ecf20Sopenharmony_ci */
192728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_VF_VECTORS_OFST 16
192738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_DEFAULT_VF_VECTORS_LEN 4
192748c2ecf20Sopenharmony_ci/* the maximum number of MSI-X vectors the device can allocate to any one PF */
192758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PF_VECTORS_OFST 20
192768c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_PF_VECTORS_LEN 4
192778c2ecf20Sopenharmony_ci/* the maximum number of MSI-X vectors the device can allocate to any one VF */
192788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VF_VECTORS_OFST 24
192798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PCIE_RESOURCE_INFO_OUT_MAX_VF_VECTORS_LEN 4
192808c2ecf20Sopenharmony_ci
192818c2ecf20Sopenharmony_ci
192828c2ecf20Sopenharmony_ci/***********************************/
192838c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_MODES
192848c2ecf20Sopenharmony_ci * Find out about available port modes
192858c2ecf20Sopenharmony_ci */
192868c2ecf20Sopenharmony_ci#define MC_CMD_GET_PORT_MODES 0xff
192878c2ecf20Sopenharmony_ci#undef MC_CMD_0xff_PRIVILEGE_CTG
192888c2ecf20Sopenharmony_ci
192898c2ecf20Sopenharmony_ci#define MC_CMD_0xff_PRIVILEGE_CTG SRIOV_CTG_GENERAL
192908c2ecf20Sopenharmony_ci
192918c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_MODES_IN msgrequest */
192928c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_MODES_IN_LEN 0
192938c2ecf20Sopenharmony_ci
192948c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_MODES_OUT msgresponse */
192958c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_MODES_OUT_LEN 12
192968c2ecf20Sopenharmony_ci/* Bitmask of port modes available on the board (indexed by TLV_PORT_MODE_*)
192978c2ecf20Sopenharmony_ci * that are supported for customer use in production firmware.
192988c2ecf20Sopenharmony_ci */
192998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_MODES_OFST 0
193008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_MODES_LEN 4
193018c2ecf20Sopenharmony_ci/* Default (canonical) board mode */
193028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_DEFAULT_MODE_OFST 4
193038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_DEFAULT_MODE_LEN 4
193048c2ecf20Sopenharmony_ci/* Current board mode */
193058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_CURRENT_MODE_OFST 8
193068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_CURRENT_MODE_LEN 4
193078c2ecf20Sopenharmony_ci
193088c2ecf20Sopenharmony_ci/* MC_CMD_GET_PORT_MODES_OUT_V2 msgresponse */
193098c2ecf20Sopenharmony_ci#define    MC_CMD_GET_PORT_MODES_OUT_V2_LEN 16
193108c2ecf20Sopenharmony_ci/* Bitmask of port modes available on the board (indexed by TLV_PORT_MODE_*)
193118c2ecf20Sopenharmony_ci * that are supported for customer use in production firmware.
193128c2ecf20Sopenharmony_ci */
193138c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_MODES_OFST 0
193148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_MODES_LEN 4
193158c2ecf20Sopenharmony_ci/* Default (canonical) board mode */
193168c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_DEFAULT_MODE_OFST 4
193178c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_DEFAULT_MODE_LEN 4
193188c2ecf20Sopenharmony_ci/* Current board mode */
193198c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_CURRENT_MODE_OFST 8
193208c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_CURRENT_MODE_LEN 4
193218c2ecf20Sopenharmony_ci/* Bitmask of engineering port modes available on the board (indexed by
193228c2ecf20Sopenharmony_ci * TLV_PORT_MODE_*). A superset of MC_CMD_GET_PORT_MODES_OUT/MODES that
193238c2ecf20Sopenharmony_ci * contains all modes implemented in firmware for a particular board. Modes
193248c2ecf20Sopenharmony_ci * listed in MODES are considered production modes and should be exposed in
193258c2ecf20Sopenharmony_ci * userland tools. Modes listed in in ENGINEERING_MODES, but not in MODES
193268c2ecf20Sopenharmony_ci * should be considered hidden (not to be exposed in userland tools) and for
193278c2ecf20Sopenharmony_ci * engineering use only. There are no other semantic differences and any mode
193288c2ecf20Sopenharmony_ci * listed in either MODES or ENGINEERING_MODES can be set on the board.
193298c2ecf20Sopenharmony_ci */
193308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_ENGINEERING_MODES_OFST 12
193318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_PORT_MODES_OUT_V2_ENGINEERING_MODES_LEN 4
193328c2ecf20Sopenharmony_ci
193338c2ecf20Sopenharmony_ci
193348c2ecf20Sopenharmony_ci/***********************************/
193358c2ecf20Sopenharmony_ci/* MC_CMD_OVERRIDE_PORT_MODE
193368c2ecf20Sopenharmony_ci * Override flash config port mode for subsequent MC reboot(s). Override data
193378c2ecf20Sopenharmony_ci * is stored in the presistent data section of DMEM and activated on next MC
193388c2ecf20Sopenharmony_ci * warm reboot. A cold reboot resets the override. It is assumed that a
193398c2ecf20Sopenharmony_ci * sufficient number of PFs are available and that port mapping is valid for
193408c2ecf20Sopenharmony_ci * the new port mode, as the override does not affect PF configuration.
193418c2ecf20Sopenharmony_ci */
193428c2ecf20Sopenharmony_ci#define MC_CMD_OVERRIDE_PORT_MODE 0x137
193438c2ecf20Sopenharmony_ci#undef MC_CMD_0x137_PRIVILEGE_CTG
193448c2ecf20Sopenharmony_ci
193458c2ecf20Sopenharmony_ci#define MC_CMD_0x137_PRIVILEGE_CTG SRIOV_CTG_ADMIN
193468c2ecf20Sopenharmony_ci
193478c2ecf20Sopenharmony_ci/* MC_CMD_OVERRIDE_PORT_MODE_IN msgrequest */
193488c2ecf20Sopenharmony_ci#define    MC_CMD_OVERRIDE_PORT_MODE_IN_LEN 8
193498c2ecf20Sopenharmony_ci#define       MC_CMD_OVERRIDE_PORT_MODE_IN_FLAGS_OFST 0
193508c2ecf20Sopenharmony_ci#define       MC_CMD_OVERRIDE_PORT_MODE_IN_FLAGS_LEN 4
193518c2ecf20Sopenharmony_ci#define        MC_CMD_OVERRIDE_PORT_MODE_IN_ENABLE_OFST 0
193528c2ecf20Sopenharmony_ci#define        MC_CMD_OVERRIDE_PORT_MODE_IN_ENABLE_LBN 0
193538c2ecf20Sopenharmony_ci#define        MC_CMD_OVERRIDE_PORT_MODE_IN_ENABLE_WIDTH 1
193548c2ecf20Sopenharmony_ci/* New mode (TLV_PORT_MODE_*) to set, if override enabled */
193558c2ecf20Sopenharmony_ci#define       MC_CMD_OVERRIDE_PORT_MODE_IN_MODE_OFST 4
193568c2ecf20Sopenharmony_ci#define       MC_CMD_OVERRIDE_PORT_MODE_IN_MODE_LEN 4
193578c2ecf20Sopenharmony_ci
193588c2ecf20Sopenharmony_ci/* MC_CMD_OVERRIDE_PORT_MODE_OUT msgresponse */
193598c2ecf20Sopenharmony_ci#define    MC_CMD_OVERRIDE_PORT_MODE_OUT_LEN 0
193608c2ecf20Sopenharmony_ci
193618c2ecf20Sopenharmony_ci
193628c2ecf20Sopenharmony_ci/***********************************/
193638c2ecf20Sopenharmony_ci/* MC_CMD_READ_ATB
193648c2ecf20Sopenharmony_ci * Sample voltages on the ATB
193658c2ecf20Sopenharmony_ci */
193668c2ecf20Sopenharmony_ci#define MC_CMD_READ_ATB 0x100
193678c2ecf20Sopenharmony_ci#undef MC_CMD_0x100_PRIVILEGE_CTG
193688c2ecf20Sopenharmony_ci
193698c2ecf20Sopenharmony_ci#define MC_CMD_0x100_PRIVILEGE_CTG SRIOV_CTG_INSECURE
193708c2ecf20Sopenharmony_ci
193718c2ecf20Sopenharmony_ci/* MC_CMD_READ_ATB_IN msgrequest */
193728c2ecf20Sopenharmony_ci#define    MC_CMD_READ_ATB_IN_LEN 16
193738c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SIGNAL_BUS_OFST 0
193748c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SIGNAL_BUS_LEN 4
193758c2ecf20Sopenharmony_ci#define          MC_CMD_READ_ATB_IN_BUS_CCOM 0x0 /* enum */
193768c2ecf20Sopenharmony_ci#define          MC_CMD_READ_ATB_IN_BUS_CKR 0x1 /* enum */
193778c2ecf20Sopenharmony_ci#define          MC_CMD_READ_ATB_IN_BUS_CPCIE 0x8 /* enum */
193788c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SIGNAL_EN_BITNO_OFST 4
193798c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SIGNAL_EN_BITNO_LEN 4
193808c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SIGNAL_SEL_OFST 8
193818c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SIGNAL_SEL_LEN 4
193828c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SETTLING_TIME_US_OFST 12
193838c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_IN_SETTLING_TIME_US_LEN 4
193848c2ecf20Sopenharmony_ci
193858c2ecf20Sopenharmony_ci/* MC_CMD_READ_ATB_OUT msgresponse */
193868c2ecf20Sopenharmony_ci#define    MC_CMD_READ_ATB_OUT_LEN 4
193878c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_OUT_SAMPLE_MV_OFST 0
193888c2ecf20Sopenharmony_ci#define       MC_CMD_READ_ATB_OUT_SAMPLE_MV_LEN 4
193898c2ecf20Sopenharmony_ci
193908c2ecf20Sopenharmony_ci
193918c2ecf20Sopenharmony_ci/***********************************/
193928c2ecf20Sopenharmony_ci/* MC_CMD_GET_WORKAROUNDS
193938c2ecf20Sopenharmony_ci * Read the list of all implemented and all currently enabled workarounds. The
193948c2ecf20Sopenharmony_ci * enums here must correspond with those in MC_CMD_WORKAROUND.
193958c2ecf20Sopenharmony_ci */
193968c2ecf20Sopenharmony_ci#define MC_CMD_GET_WORKAROUNDS 0x59
193978c2ecf20Sopenharmony_ci#undef MC_CMD_0x59_PRIVILEGE_CTG
193988c2ecf20Sopenharmony_ci
193998c2ecf20Sopenharmony_ci#define MC_CMD_0x59_PRIVILEGE_CTG SRIOV_CTG_GENERAL
194008c2ecf20Sopenharmony_ci
194018c2ecf20Sopenharmony_ci/* MC_CMD_GET_WORKAROUNDS_OUT msgresponse */
194028c2ecf20Sopenharmony_ci#define    MC_CMD_GET_WORKAROUNDS_OUT_LEN 8
194038c2ecf20Sopenharmony_ci/* Each workaround is represented by a single bit according to the enums below.
194048c2ecf20Sopenharmony_ci */
194058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_WORKAROUNDS_OUT_IMPLEMENTED_OFST 0
194068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_WORKAROUNDS_OUT_IMPLEMENTED_LEN 4
194078c2ecf20Sopenharmony_ci#define       MC_CMD_GET_WORKAROUNDS_OUT_ENABLED_OFST 4
194088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_WORKAROUNDS_OUT_ENABLED_LEN 4
194098c2ecf20Sopenharmony_ci/* enum: Bug 17230 work around. */
194108c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG17230 0x2
194118c2ecf20Sopenharmony_ci/* enum: Bug 35388 work around (unsafe EVQ writes). */
194128c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG35388 0x4
194138c2ecf20Sopenharmony_ci/* enum: Bug35017 workaround (A64 tables must be identity map) */
194148c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG35017 0x8
194158c2ecf20Sopenharmony_ci/* enum: Bug 41750 present (MC_CMD_TRIGGER_INTERRUPT won't work) */
194168c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG41750 0x10
194178c2ecf20Sopenharmony_ci/* enum: Bug 42008 present (Interrupts can overtake associated events). Caution
194188c2ecf20Sopenharmony_ci * - before adding code that queries this workaround, remember that there's
194198c2ecf20Sopenharmony_ci * released Monza firmware that doesn't understand MC_CMD_WORKAROUND_BUG42008,
194208c2ecf20Sopenharmony_ci * and will hence (incorrectly) report that the bug doesn't exist.
194218c2ecf20Sopenharmony_ci */
194228c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG42008 0x20
194238c2ecf20Sopenharmony_ci/* enum: Bug 26807 features present in firmware (multicast filter chaining) */
194248c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG26807 0x40
194258c2ecf20Sopenharmony_ci/* enum: Bug 61265 work around (broken EVQ TMR writes). */
194268c2ecf20Sopenharmony_ci#define          MC_CMD_GET_WORKAROUNDS_OUT_BUG61265 0x80
194278c2ecf20Sopenharmony_ci
194288c2ecf20Sopenharmony_ci
194298c2ecf20Sopenharmony_ci/***********************************/
194308c2ecf20Sopenharmony_ci/* MC_CMD_PRIVILEGE_MASK
194318c2ecf20Sopenharmony_ci * Read/set privileges of an arbitrary PCIe function
194328c2ecf20Sopenharmony_ci */
194338c2ecf20Sopenharmony_ci#define MC_CMD_PRIVILEGE_MASK 0x5a
194348c2ecf20Sopenharmony_ci#undef MC_CMD_0x5a_PRIVILEGE_CTG
194358c2ecf20Sopenharmony_ci
194368c2ecf20Sopenharmony_ci#define MC_CMD_0x5a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
194378c2ecf20Sopenharmony_ci
194388c2ecf20Sopenharmony_ci/* MC_CMD_PRIVILEGE_MASK_IN msgrequest */
194398c2ecf20Sopenharmony_ci#define    MC_CMD_PRIVILEGE_MASK_IN_LEN 8
194408c2ecf20Sopenharmony_ci/* The target function to have its mask read or set e.g. PF 0 = 0xFFFF0000, VF
194418c2ecf20Sopenharmony_ci * 1,3 = 0x00030001
194428c2ecf20Sopenharmony_ci */
194438c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_OFST 0
194448c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_LEN 4
194458c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_PF_OFST 0
194468c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_PF_LBN 0
194478c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_PF_WIDTH 16
194488c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_VF_OFST 0
194498c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_VF_LBN 16
194508c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MASK_IN_FUNCTION_VF_WIDTH 16
194518c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_VF_NULL 0xffff /* enum */
194528c2ecf20Sopenharmony_ci/* New privilege mask to be set. The mask will only be changed if the MSB is
194538c2ecf20Sopenharmony_ci * set to 1.
194548c2ecf20Sopenharmony_ci */
194558c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MASK_IN_NEW_MASK_OFST 4
194568c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MASK_IN_NEW_MASK_LEN 4
194578c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN 0x1 /* enum */
194588c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK 0x2 /* enum */
194598c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD 0x4 /* enum */
194608c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP 0x8 /* enum */
194618c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS 0x10 /* enum */
194628c2ecf20Sopenharmony_ci/* enum: Deprecated. Equivalent to MAC_SPOOFING_TX combined with CHANGE_MAC. */
194638c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING 0x20
194648c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST 0x40 /* enum */
194658c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST 0x80 /* enum */
194668c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST 0x100 /* enum */
194678c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST 0x200 /* enum */
194688c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS 0x400 /* enum */
194698c2ecf20Sopenharmony_ci/* enum: Allows to set the TX packets' source MAC address to any arbitrary MAC
194708c2ecf20Sopenharmony_ci * adress.
194718c2ecf20Sopenharmony_ci */
194728c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX 0x800
194738c2ecf20Sopenharmony_ci/* enum: Privilege that allows a Function to change the MAC address configured
194748c2ecf20Sopenharmony_ci * in its associated vAdapter/vPort.
194758c2ecf20Sopenharmony_ci */
194768c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC 0x1000
194778c2ecf20Sopenharmony_ci/* enum: Privilege that allows a Function to install filters that specify VLANs
194788c2ecf20Sopenharmony_ci * that are not in the permit list for the associated vPort. This privilege is
194798c2ecf20Sopenharmony_ci * primarily to support ESX where vPorts are created that restrict traffic to
194808c2ecf20Sopenharmony_ci * only a set of permitted VLANs. See the vPort flag FLAG_VLAN_RESTRICT.
194818c2ecf20Sopenharmony_ci */
194828c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_UNRESTRICTED_VLAN 0x2000
194838c2ecf20Sopenharmony_ci/* enum: Privilege for insecure commands. Commands that belong to this group
194848c2ecf20Sopenharmony_ci * are not permitted on secure adapters regardless of the privilege mask.
194858c2ecf20Sopenharmony_ci */
194868c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE 0x4000
194878c2ecf20Sopenharmony_ci/* enum: Trusted Server Adapter (TSA) / ServerLock. Privilege for
194888c2ecf20Sopenharmony_ci * administrator-level operations that are not allowed from the local host once
194898c2ecf20Sopenharmony_ci * an adapter has Bound to a remote ServerLock Controller (see doxbox
194908c2ecf20Sopenharmony_ci * SF-117064-DG for background).
194918c2ecf20Sopenharmony_ci */
194928c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN_TSA_UNBOUND 0x8000
194938c2ecf20Sopenharmony_ci/* enum: Set this bit to indicate that a new privilege mask is to be set,
194948c2ecf20Sopenharmony_ci * otherwise the command will only read the existing mask.
194958c2ecf20Sopenharmony_ci */
194968c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MASK_IN_DO_CHANGE 0x80000000
194978c2ecf20Sopenharmony_ci
194988c2ecf20Sopenharmony_ci/* MC_CMD_PRIVILEGE_MASK_OUT msgresponse */
194998c2ecf20Sopenharmony_ci#define    MC_CMD_PRIVILEGE_MASK_OUT_LEN 4
195008c2ecf20Sopenharmony_ci/* For an admin function, always all the privileges are reported. */
195018c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MASK_OUT_OLD_MASK_OFST 0
195028c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MASK_OUT_OLD_MASK_LEN 4
195038c2ecf20Sopenharmony_ci
195048c2ecf20Sopenharmony_ci
195058c2ecf20Sopenharmony_ci/***********************************/
195068c2ecf20Sopenharmony_ci/* MC_CMD_LINK_STATE_MODE
195078c2ecf20Sopenharmony_ci * Read/set link state mode of a VF
195088c2ecf20Sopenharmony_ci */
195098c2ecf20Sopenharmony_ci#define MC_CMD_LINK_STATE_MODE 0x5c
195108c2ecf20Sopenharmony_ci#undef MC_CMD_0x5c_PRIVILEGE_CTG
195118c2ecf20Sopenharmony_ci
195128c2ecf20Sopenharmony_ci#define MC_CMD_0x5c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
195138c2ecf20Sopenharmony_ci
195148c2ecf20Sopenharmony_ci/* MC_CMD_LINK_STATE_MODE_IN msgrequest */
195158c2ecf20Sopenharmony_ci#define    MC_CMD_LINK_STATE_MODE_IN_LEN 8
195168c2ecf20Sopenharmony_ci/* The target function to have its link state mode read or set, must be a VF
195178c2ecf20Sopenharmony_ci * e.g. VF 1,3 = 0x00030001
195188c2ecf20Sopenharmony_ci */
195198c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_STATE_MODE_IN_FUNCTION_OFST 0
195208c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_STATE_MODE_IN_FUNCTION_LEN 4
195218c2ecf20Sopenharmony_ci#define        MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_OFST 0
195228c2ecf20Sopenharmony_ci#define        MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_LBN 0
195238c2ecf20Sopenharmony_ci#define        MC_CMD_LINK_STATE_MODE_IN_FUNCTION_PF_WIDTH 16
195248c2ecf20Sopenharmony_ci#define        MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_OFST 0
195258c2ecf20Sopenharmony_ci#define        MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_LBN 16
195268c2ecf20Sopenharmony_ci#define        MC_CMD_LINK_STATE_MODE_IN_FUNCTION_VF_WIDTH 16
195278c2ecf20Sopenharmony_ci/* New link state mode to be set */
195288c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_STATE_MODE_IN_NEW_MODE_OFST 4
195298c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_STATE_MODE_IN_NEW_MODE_LEN 4
195308c2ecf20Sopenharmony_ci#define          MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_AUTO 0x0 /* enum */
195318c2ecf20Sopenharmony_ci#define          MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_UP 0x1 /* enum */
195328c2ecf20Sopenharmony_ci#define          MC_CMD_LINK_STATE_MODE_IN_LINK_STATE_DOWN 0x2 /* enum */
195338c2ecf20Sopenharmony_ci/* enum: Use this value to just read the existing setting without modifying it.
195348c2ecf20Sopenharmony_ci */
195358c2ecf20Sopenharmony_ci#define          MC_CMD_LINK_STATE_MODE_IN_DO_NOT_CHANGE 0xffffffff
195368c2ecf20Sopenharmony_ci
195378c2ecf20Sopenharmony_ci/* MC_CMD_LINK_STATE_MODE_OUT msgresponse */
195388c2ecf20Sopenharmony_ci#define    MC_CMD_LINK_STATE_MODE_OUT_LEN 4
195398c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_STATE_MODE_OUT_OLD_MODE_OFST 0
195408c2ecf20Sopenharmony_ci#define       MC_CMD_LINK_STATE_MODE_OUT_OLD_MODE_LEN 4
195418c2ecf20Sopenharmony_ci
195428c2ecf20Sopenharmony_ci
195438c2ecf20Sopenharmony_ci/***********************************/
195448c2ecf20Sopenharmony_ci/* MC_CMD_GET_SNAPSHOT_LENGTH
195458c2ecf20Sopenharmony_ci * Obtain the current range of allowable values for the SNAPSHOT_LENGTH
195468c2ecf20Sopenharmony_ci * parameter to MC_CMD_INIT_RXQ.
195478c2ecf20Sopenharmony_ci */
195488c2ecf20Sopenharmony_ci#define MC_CMD_GET_SNAPSHOT_LENGTH 0x101
195498c2ecf20Sopenharmony_ci#undef MC_CMD_0x101_PRIVILEGE_CTG
195508c2ecf20Sopenharmony_ci
195518c2ecf20Sopenharmony_ci#define MC_CMD_0x101_PRIVILEGE_CTG SRIOV_CTG_GENERAL
195528c2ecf20Sopenharmony_ci
195538c2ecf20Sopenharmony_ci/* MC_CMD_GET_SNAPSHOT_LENGTH_IN msgrequest */
195548c2ecf20Sopenharmony_ci#define    MC_CMD_GET_SNAPSHOT_LENGTH_IN_LEN 0
195558c2ecf20Sopenharmony_ci
195568c2ecf20Sopenharmony_ci/* MC_CMD_GET_SNAPSHOT_LENGTH_OUT msgresponse */
195578c2ecf20Sopenharmony_ci#define    MC_CMD_GET_SNAPSHOT_LENGTH_OUT_LEN 8
195588c2ecf20Sopenharmony_ci/* Minimum acceptable snapshot length. */
195598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MIN_OFST 0
195608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MIN_LEN 4
195618c2ecf20Sopenharmony_ci/* Maximum acceptable snapshot length. */
195628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MAX_OFST 4
195638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_SNAPSHOT_LENGTH_OUT_RX_SNAPLEN_MAX_LEN 4
195648c2ecf20Sopenharmony_ci
195658c2ecf20Sopenharmony_ci
195668c2ecf20Sopenharmony_ci/***********************************/
195678c2ecf20Sopenharmony_ci/* MC_CMD_FUSE_DIAGS
195688c2ecf20Sopenharmony_ci * Additional fuse diagnostics
195698c2ecf20Sopenharmony_ci */
195708c2ecf20Sopenharmony_ci#define MC_CMD_FUSE_DIAGS 0x102
195718c2ecf20Sopenharmony_ci#undef MC_CMD_0x102_PRIVILEGE_CTG
195728c2ecf20Sopenharmony_ci
195738c2ecf20Sopenharmony_ci#define MC_CMD_0x102_PRIVILEGE_CTG SRIOV_CTG_INSECURE
195748c2ecf20Sopenharmony_ci
195758c2ecf20Sopenharmony_ci/* MC_CMD_FUSE_DIAGS_IN msgrequest */
195768c2ecf20Sopenharmony_ci#define    MC_CMD_FUSE_DIAGS_IN_LEN 0
195778c2ecf20Sopenharmony_ci
195788c2ecf20Sopenharmony_ci/* MC_CMD_FUSE_DIAGS_OUT msgresponse */
195798c2ecf20Sopenharmony_ci#define    MC_CMD_FUSE_DIAGS_OUT_LEN 48
195808c2ecf20Sopenharmony_ci/* Total number of mismatched bits between pairs in area 0 */
195818c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_MISMATCH_BITS_OFST 0
195828c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_MISMATCH_BITS_LEN 4
195838c2ecf20Sopenharmony_ci/* Total number of unexpectedly clear (set in B but not A) bits in area 0 */
195848c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_A_BAD_BITS_OFST 4
195858c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_A_BAD_BITS_LEN 4
195868c2ecf20Sopenharmony_ci/* Total number of unexpectedly clear (set in A but not B) bits in area 0 */
195878c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_B_BAD_BITS_OFST 8
195888c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_PAIR_B_BAD_BITS_LEN 4
195898c2ecf20Sopenharmony_ci/* Checksum of data after logical OR of pairs in area 0 */
195908c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_CHECKSUM_OFST 12
195918c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA0_CHECKSUM_LEN 4
195928c2ecf20Sopenharmony_ci/* Total number of mismatched bits between pairs in area 1 */
195938c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_MISMATCH_BITS_OFST 16
195948c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_MISMATCH_BITS_LEN 4
195958c2ecf20Sopenharmony_ci/* Total number of unexpectedly clear (set in B but not A) bits in area 1 */
195968c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_A_BAD_BITS_OFST 20
195978c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_A_BAD_BITS_LEN 4
195988c2ecf20Sopenharmony_ci/* Total number of unexpectedly clear (set in A but not B) bits in area 1 */
195998c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_B_BAD_BITS_OFST 24
196008c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_PAIR_B_BAD_BITS_LEN 4
196018c2ecf20Sopenharmony_ci/* Checksum of data after logical OR of pairs in area 1 */
196028c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_CHECKSUM_OFST 28
196038c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA1_CHECKSUM_LEN 4
196048c2ecf20Sopenharmony_ci/* Total number of mismatched bits between pairs in area 2 */
196058c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_MISMATCH_BITS_OFST 32
196068c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_MISMATCH_BITS_LEN 4
196078c2ecf20Sopenharmony_ci/* Total number of unexpectedly clear (set in B but not A) bits in area 2 */
196088c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_A_BAD_BITS_OFST 36
196098c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_A_BAD_BITS_LEN 4
196108c2ecf20Sopenharmony_ci/* Total number of unexpectedly clear (set in A but not B) bits in area 2 */
196118c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_B_BAD_BITS_OFST 40
196128c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_PAIR_B_BAD_BITS_LEN 4
196138c2ecf20Sopenharmony_ci/* Checksum of data after logical OR of pairs in area 2 */
196148c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_CHECKSUM_OFST 44
196158c2ecf20Sopenharmony_ci#define       MC_CMD_FUSE_DIAGS_OUT_AREA2_CHECKSUM_LEN 4
196168c2ecf20Sopenharmony_ci
196178c2ecf20Sopenharmony_ci
196188c2ecf20Sopenharmony_ci/***********************************/
196198c2ecf20Sopenharmony_ci/* MC_CMD_PRIVILEGE_MODIFY
196208c2ecf20Sopenharmony_ci * Modify the privileges of a set of PCIe functions. Note that this operation
196218c2ecf20Sopenharmony_ci * only effects non-admin functions unless the admin privilege itself is
196228c2ecf20Sopenharmony_ci * included in one of the masks provided.
196238c2ecf20Sopenharmony_ci */
196248c2ecf20Sopenharmony_ci#define MC_CMD_PRIVILEGE_MODIFY 0x60
196258c2ecf20Sopenharmony_ci#undef MC_CMD_0x60_PRIVILEGE_CTG
196268c2ecf20Sopenharmony_ci
196278c2ecf20Sopenharmony_ci#define MC_CMD_0x60_PRIVILEGE_CTG SRIOV_CTG_ADMIN
196288c2ecf20Sopenharmony_ci
196298c2ecf20Sopenharmony_ci/* MC_CMD_PRIVILEGE_MODIFY_IN msgrequest */
196308c2ecf20Sopenharmony_ci#define    MC_CMD_PRIVILEGE_MODIFY_IN_LEN 16
196318c2ecf20Sopenharmony_ci/* The groups of functions to have their privilege masks modified. */
196328c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_FN_GROUP_OFST 0
196338c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_FN_GROUP_LEN 4
196348c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MODIFY_IN_NONE 0x0 /* enum */
196358c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MODIFY_IN_ALL 0x1 /* enum */
196368c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MODIFY_IN_PFS_ONLY 0x2 /* enum */
196378c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MODIFY_IN_VFS_ONLY 0x3 /* enum */
196388c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MODIFY_IN_VFS_OF_PF 0x4 /* enum */
196398c2ecf20Sopenharmony_ci#define          MC_CMD_PRIVILEGE_MODIFY_IN_ONE 0x5 /* enum */
196408c2ecf20Sopenharmony_ci/* For VFS_OF_PF specify the PF, for ONE specify the target function */
196418c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_OFST 4
196428c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_LEN 4
196438c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_PF_OFST 4
196448c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_PF_LBN 0
196458c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_PF_WIDTH 16
196468c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_VF_OFST 4
196478c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_VF_LBN 16
196488c2ecf20Sopenharmony_ci#define        MC_CMD_PRIVILEGE_MODIFY_IN_FUNCTION_VF_WIDTH 16
196498c2ecf20Sopenharmony_ci/* Privileges to be added to the target functions. For privilege definitions
196508c2ecf20Sopenharmony_ci * refer to the command MC_CMD_PRIVILEGE_MASK
196518c2ecf20Sopenharmony_ci */
196528c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_ADD_MASK_OFST 8
196538c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_ADD_MASK_LEN 4
196548c2ecf20Sopenharmony_ci/* Privileges to be removed from the target functions. For privilege
196558c2ecf20Sopenharmony_ci * definitions refer to the command MC_CMD_PRIVILEGE_MASK
196568c2ecf20Sopenharmony_ci */
196578c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_REMOVE_MASK_OFST 12
196588c2ecf20Sopenharmony_ci#define       MC_CMD_PRIVILEGE_MODIFY_IN_REMOVE_MASK_LEN 4
196598c2ecf20Sopenharmony_ci
196608c2ecf20Sopenharmony_ci/* MC_CMD_PRIVILEGE_MODIFY_OUT msgresponse */
196618c2ecf20Sopenharmony_ci#define    MC_CMD_PRIVILEGE_MODIFY_OUT_LEN 0
196628c2ecf20Sopenharmony_ci
196638c2ecf20Sopenharmony_ci
196648c2ecf20Sopenharmony_ci/***********************************/
196658c2ecf20Sopenharmony_ci/* MC_CMD_XPM_READ_BYTES
196668c2ecf20Sopenharmony_ci * Read XPM memory
196678c2ecf20Sopenharmony_ci */
196688c2ecf20Sopenharmony_ci#define MC_CMD_XPM_READ_BYTES 0x103
196698c2ecf20Sopenharmony_ci#undef MC_CMD_0x103_PRIVILEGE_CTG
196708c2ecf20Sopenharmony_ci
196718c2ecf20Sopenharmony_ci#define MC_CMD_0x103_PRIVILEGE_CTG SRIOV_CTG_ADMIN
196728c2ecf20Sopenharmony_ci
196738c2ecf20Sopenharmony_ci/* MC_CMD_XPM_READ_BYTES_IN msgrequest */
196748c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_BYTES_IN_LEN 8
196758c2ecf20Sopenharmony_ci/* Start address (byte) */
196768c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_IN_ADDR_OFST 0
196778c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_IN_ADDR_LEN 4
196788c2ecf20Sopenharmony_ci/* Count (bytes) */
196798c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_IN_COUNT_OFST 4
196808c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_IN_COUNT_LEN 4
196818c2ecf20Sopenharmony_ci
196828c2ecf20Sopenharmony_ci/* MC_CMD_XPM_READ_BYTES_OUT msgresponse */
196838c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_BYTES_OUT_LENMIN 0
196848c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_BYTES_OUT_LENMAX 252
196858c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_BYTES_OUT_LENMAX_MCDI2 1020
196868c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_BYTES_OUT_LEN(num) (0+1*(num))
196878c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_BYTES_OUT_DATA_NUM(len) (((len)-0)/1)
196888c2ecf20Sopenharmony_ci/* Data */
196898c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_OUT_DATA_OFST 0
196908c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_OUT_DATA_LEN 1
196918c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_OUT_DATA_MINNUM 0
196928c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_OUT_DATA_MAXNUM 252
196938c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_BYTES_OUT_DATA_MAXNUM_MCDI2 1020
196948c2ecf20Sopenharmony_ci
196958c2ecf20Sopenharmony_ci
196968c2ecf20Sopenharmony_ci/***********************************/
196978c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_BYTES
196988c2ecf20Sopenharmony_ci * Write XPM memory
196998c2ecf20Sopenharmony_ci */
197008c2ecf20Sopenharmony_ci#define MC_CMD_XPM_WRITE_BYTES 0x104
197018c2ecf20Sopenharmony_ci#undef MC_CMD_0x104_PRIVILEGE_CTG
197028c2ecf20Sopenharmony_ci
197038c2ecf20Sopenharmony_ci#define MC_CMD_0x104_PRIVILEGE_CTG SRIOV_CTG_INSECURE
197048c2ecf20Sopenharmony_ci
197058c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_BYTES_IN msgrequest */
197068c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_BYTES_IN_LENMIN 8
197078c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_BYTES_IN_LENMAX 252
197088c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_BYTES_IN_LENMAX_MCDI2 1020
197098c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_BYTES_IN_LEN(num) (8+1*(num))
197108c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_BYTES_IN_DATA_NUM(len) (((len)-8)/1)
197118c2ecf20Sopenharmony_ci/* Start address (byte) */
197128c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_ADDR_OFST 0
197138c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_ADDR_LEN 4
197148c2ecf20Sopenharmony_ci/* Count (bytes) */
197158c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_COUNT_OFST 4
197168c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_COUNT_LEN 4
197178c2ecf20Sopenharmony_ci/* Data */
197188c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_DATA_OFST 8
197198c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_DATA_LEN 1
197208c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_DATA_MINNUM 0
197218c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_DATA_MAXNUM 244
197228c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_BYTES_IN_DATA_MAXNUM_MCDI2 1012
197238c2ecf20Sopenharmony_ci
197248c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_BYTES_OUT msgresponse */
197258c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_BYTES_OUT_LEN 0
197268c2ecf20Sopenharmony_ci
197278c2ecf20Sopenharmony_ci
197288c2ecf20Sopenharmony_ci/***********************************/
197298c2ecf20Sopenharmony_ci/* MC_CMD_XPM_READ_SECTOR
197308c2ecf20Sopenharmony_ci * Read XPM sector
197318c2ecf20Sopenharmony_ci */
197328c2ecf20Sopenharmony_ci#define MC_CMD_XPM_READ_SECTOR 0x105
197338c2ecf20Sopenharmony_ci#undef MC_CMD_0x105_PRIVILEGE_CTG
197348c2ecf20Sopenharmony_ci
197358c2ecf20Sopenharmony_ci#define MC_CMD_0x105_PRIVILEGE_CTG SRIOV_CTG_INSECURE
197368c2ecf20Sopenharmony_ci
197378c2ecf20Sopenharmony_ci/* MC_CMD_XPM_READ_SECTOR_IN msgrequest */
197388c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_SECTOR_IN_LEN 8
197398c2ecf20Sopenharmony_ci/* Sector index */
197408c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_IN_INDEX_OFST 0
197418c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_IN_INDEX_LEN 4
197428c2ecf20Sopenharmony_ci/* Sector size */
197438c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_IN_SIZE_OFST 4
197448c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_IN_SIZE_LEN 4
197458c2ecf20Sopenharmony_ci
197468c2ecf20Sopenharmony_ci/* MC_CMD_XPM_READ_SECTOR_OUT msgresponse */
197478c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_SECTOR_OUT_LENMIN 4
197488c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_SECTOR_OUT_LENMAX 36
197498c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_SECTOR_OUT_LENMAX_MCDI2 36
197508c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_SECTOR_OUT_LEN(num) (4+1*(num))
197518c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_READ_SECTOR_OUT_DATA_NUM(len) (((len)-4)/1)
197528c2ecf20Sopenharmony_ci/* Sector type */
197538c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_TYPE_OFST 0
197548c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_TYPE_LEN 4
197558c2ecf20Sopenharmony_ci#define          MC_CMD_XPM_READ_SECTOR_OUT_BLANK 0x0 /* enum */
197568c2ecf20Sopenharmony_ci#define          MC_CMD_XPM_READ_SECTOR_OUT_CRYPTO_KEY_128 0x1 /* enum */
197578c2ecf20Sopenharmony_ci#define          MC_CMD_XPM_READ_SECTOR_OUT_CRYPTO_KEY_256 0x2 /* enum */
197588c2ecf20Sopenharmony_ci#define          MC_CMD_XPM_READ_SECTOR_OUT_CRYPTO_DATA 0x3 /* enum */
197598c2ecf20Sopenharmony_ci#define          MC_CMD_XPM_READ_SECTOR_OUT_INVALID 0xff /* enum */
197608c2ecf20Sopenharmony_ci/* Sector data */
197618c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_DATA_OFST 4
197628c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_DATA_LEN 1
197638c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_DATA_MINNUM 0
197648c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_DATA_MAXNUM 32
197658c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_READ_SECTOR_OUT_DATA_MAXNUM_MCDI2 32
197668c2ecf20Sopenharmony_ci
197678c2ecf20Sopenharmony_ci
197688c2ecf20Sopenharmony_ci/***********************************/
197698c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_SECTOR
197708c2ecf20Sopenharmony_ci * Write XPM sector
197718c2ecf20Sopenharmony_ci */
197728c2ecf20Sopenharmony_ci#define MC_CMD_XPM_WRITE_SECTOR 0x106
197738c2ecf20Sopenharmony_ci#undef MC_CMD_0x106_PRIVILEGE_CTG
197748c2ecf20Sopenharmony_ci
197758c2ecf20Sopenharmony_ci#define MC_CMD_0x106_PRIVILEGE_CTG SRIOV_CTG_INSECURE
197768c2ecf20Sopenharmony_ci
197778c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_SECTOR_IN msgrequest */
197788c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_SECTOR_IN_LENMIN 12
197798c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_SECTOR_IN_LENMAX 44
197808c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_SECTOR_IN_LENMAX_MCDI2 44
197818c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_SECTOR_IN_LEN(num) (12+1*(num))
197828c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_SECTOR_IN_DATA_NUM(len) (((len)-12)/1)
197838c2ecf20Sopenharmony_ci/* If writing fails due to an uncorrectable error, try up to RETRIES following
197848c2ecf20Sopenharmony_ci * sectors (or until no more space available). If 0, only one write attempt is
197858c2ecf20Sopenharmony_ci * made. Note that uncorrectable errors are unlikely, thanks to XPM self-repair
197868c2ecf20Sopenharmony_ci * mechanism.
197878c2ecf20Sopenharmony_ci */
197888c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_RETRIES_OFST 0
197898c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_RETRIES_LEN 1
197908c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_RESERVED_OFST 1
197918c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_RESERVED_LEN 3
197928c2ecf20Sopenharmony_ci/* Sector type */
197938c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_TYPE_OFST 4
197948c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_TYPE_LEN 4
197958c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
197968c2ecf20Sopenharmony_ci/*               MC_CMD_XPM_READ_SECTOR/MC_CMD_XPM_READ_SECTOR_OUT/TYPE */
197978c2ecf20Sopenharmony_ci/* Sector size */
197988c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_SIZE_OFST 8
197998c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_SIZE_LEN 4
198008c2ecf20Sopenharmony_ci/* Sector data */
198018c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_DATA_OFST 12
198028c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_DATA_LEN 1
198038c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_DATA_MINNUM 0
198048c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_DATA_MAXNUM 32
198058c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_IN_DATA_MAXNUM_MCDI2 32
198068c2ecf20Sopenharmony_ci
198078c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_SECTOR_OUT msgresponse */
198088c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_SECTOR_OUT_LEN 4
198098c2ecf20Sopenharmony_ci/* New sector index */
198108c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_OUT_INDEX_OFST 0
198118c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_WRITE_SECTOR_OUT_INDEX_LEN 4
198128c2ecf20Sopenharmony_ci
198138c2ecf20Sopenharmony_ci
198148c2ecf20Sopenharmony_ci/***********************************/
198158c2ecf20Sopenharmony_ci/* MC_CMD_XPM_INVALIDATE_SECTOR
198168c2ecf20Sopenharmony_ci * Invalidate XPM sector
198178c2ecf20Sopenharmony_ci */
198188c2ecf20Sopenharmony_ci#define MC_CMD_XPM_INVALIDATE_SECTOR 0x107
198198c2ecf20Sopenharmony_ci#undef MC_CMD_0x107_PRIVILEGE_CTG
198208c2ecf20Sopenharmony_ci
198218c2ecf20Sopenharmony_ci#define MC_CMD_0x107_PRIVILEGE_CTG SRIOV_CTG_INSECURE
198228c2ecf20Sopenharmony_ci
198238c2ecf20Sopenharmony_ci/* MC_CMD_XPM_INVALIDATE_SECTOR_IN msgrequest */
198248c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_INVALIDATE_SECTOR_IN_LEN 4
198258c2ecf20Sopenharmony_ci/* Sector index */
198268c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_INVALIDATE_SECTOR_IN_INDEX_OFST 0
198278c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_INVALIDATE_SECTOR_IN_INDEX_LEN 4
198288c2ecf20Sopenharmony_ci
198298c2ecf20Sopenharmony_ci/* MC_CMD_XPM_INVALIDATE_SECTOR_OUT msgresponse */
198308c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_INVALIDATE_SECTOR_OUT_LEN 0
198318c2ecf20Sopenharmony_ci
198328c2ecf20Sopenharmony_ci
198338c2ecf20Sopenharmony_ci/***********************************/
198348c2ecf20Sopenharmony_ci/* MC_CMD_XPM_BLANK_CHECK
198358c2ecf20Sopenharmony_ci * Blank-check XPM memory and report bad locations
198368c2ecf20Sopenharmony_ci */
198378c2ecf20Sopenharmony_ci#define MC_CMD_XPM_BLANK_CHECK 0x108
198388c2ecf20Sopenharmony_ci#undef MC_CMD_0x108_PRIVILEGE_CTG
198398c2ecf20Sopenharmony_ci
198408c2ecf20Sopenharmony_ci#define MC_CMD_0x108_PRIVILEGE_CTG SRIOV_CTG_INSECURE
198418c2ecf20Sopenharmony_ci
198428c2ecf20Sopenharmony_ci/* MC_CMD_XPM_BLANK_CHECK_IN msgrequest */
198438c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_BLANK_CHECK_IN_LEN 8
198448c2ecf20Sopenharmony_ci/* Start address (byte) */
198458c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_IN_ADDR_OFST 0
198468c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_IN_ADDR_LEN 4
198478c2ecf20Sopenharmony_ci/* Count (bytes) */
198488c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_IN_COUNT_OFST 4
198498c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_IN_COUNT_LEN 4
198508c2ecf20Sopenharmony_ci
198518c2ecf20Sopenharmony_ci/* MC_CMD_XPM_BLANK_CHECK_OUT msgresponse */
198528c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_BLANK_CHECK_OUT_LENMIN 4
198538c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_BLANK_CHECK_OUT_LENMAX 252
198548c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_BLANK_CHECK_OUT_LENMAX_MCDI2 1020
198558c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_BLANK_CHECK_OUT_LEN(num) (4+2*(num))
198568c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_NUM(len) (((len)-4)/2)
198578c2ecf20Sopenharmony_ci/* Total number of bad (non-blank) locations */
198588c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_COUNT_OFST 0
198598c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_COUNT_LEN 4
198608c2ecf20Sopenharmony_ci/* Addresses of bad locations (may be less than BAD_COUNT, if all cannot fit
198618c2ecf20Sopenharmony_ci * into MCDI response)
198628c2ecf20Sopenharmony_ci */
198638c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_OFST 4
198648c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_LEN 2
198658c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_MINNUM 0
198668c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_MAXNUM 124
198678c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_BLANK_CHECK_OUT_BAD_ADDR_MAXNUM_MCDI2 508
198688c2ecf20Sopenharmony_ci
198698c2ecf20Sopenharmony_ci
198708c2ecf20Sopenharmony_ci/***********************************/
198718c2ecf20Sopenharmony_ci/* MC_CMD_XPM_REPAIR
198728c2ecf20Sopenharmony_ci * Blank-check and repair XPM memory
198738c2ecf20Sopenharmony_ci */
198748c2ecf20Sopenharmony_ci#define MC_CMD_XPM_REPAIR 0x109
198758c2ecf20Sopenharmony_ci#undef MC_CMD_0x109_PRIVILEGE_CTG
198768c2ecf20Sopenharmony_ci
198778c2ecf20Sopenharmony_ci#define MC_CMD_0x109_PRIVILEGE_CTG SRIOV_CTG_INSECURE
198788c2ecf20Sopenharmony_ci
198798c2ecf20Sopenharmony_ci/* MC_CMD_XPM_REPAIR_IN msgrequest */
198808c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_REPAIR_IN_LEN 8
198818c2ecf20Sopenharmony_ci/* Start address (byte) */
198828c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_REPAIR_IN_ADDR_OFST 0
198838c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_REPAIR_IN_ADDR_LEN 4
198848c2ecf20Sopenharmony_ci/* Count (bytes) */
198858c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_REPAIR_IN_COUNT_OFST 4
198868c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_REPAIR_IN_COUNT_LEN 4
198878c2ecf20Sopenharmony_ci
198888c2ecf20Sopenharmony_ci/* MC_CMD_XPM_REPAIR_OUT msgresponse */
198898c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_REPAIR_OUT_LEN 0
198908c2ecf20Sopenharmony_ci
198918c2ecf20Sopenharmony_ci
198928c2ecf20Sopenharmony_ci/***********************************/
198938c2ecf20Sopenharmony_ci/* MC_CMD_XPM_DECODER_TEST
198948c2ecf20Sopenharmony_ci * Test XPM memory address decoders for gross manufacturing defects. Can only
198958c2ecf20Sopenharmony_ci * be performed on an unprogrammed part.
198968c2ecf20Sopenharmony_ci */
198978c2ecf20Sopenharmony_ci#define MC_CMD_XPM_DECODER_TEST 0x10a
198988c2ecf20Sopenharmony_ci#undef MC_CMD_0x10a_PRIVILEGE_CTG
198998c2ecf20Sopenharmony_ci
199008c2ecf20Sopenharmony_ci#define MC_CMD_0x10a_PRIVILEGE_CTG SRIOV_CTG_INSECURE
199018c2ecf20Sopenharmony_ci
199028c2ecf20Sopenharmony_ci/* MC_CMD_XPM_DECODER_TEST_IN msgrequest */
199038c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_DECODER_TEST_IN_LEN 0
199048c2ecf20Sopenharmony_ci
199058c2ecf20Sopenharmony_ci/* MC_CMD_XPM_DECODER_TEST_OUT msgresponse */
199068c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_DECODER_TEST_OUT_LEN 0
199078c2ecf20Sopenharmony_ci
199088c2ecf20Sopenharmony_ci
199098c2ecf20Sopenharmony_ci/***********************************/
199108c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_TEST
199118c2ecf20Sopenharmony_ci * XPM memory write test. Test XPM write logic for gross manufacturing defects
199128c2ecf20Sopenharmony_ci * by writing to a dedicated test row. There are 16 locations in the test row
199138c2ecf20Sopenharmony_ci * and the test can only be performed on locations that have not been
199148c2ecf20Sopenharmony_ci * previously used (i.e. can be run at most 16 times). The test will pick the
199158c2ecf20Sopenharmony_ci * first available location to use, or fail with ENOSPC if none left.
199168c2ecf20Sopenharmony_ci */
199178c2ecf20Sopenharmony_ci#define MC_CMD_XPM_WRITE_TEST 0x10b
199188c2ecf20Sopenharmony_ci#undef MC_CMD_0x10b_PRIVILEGE_CTG
199198c2ecf20Sopenharmony_ci
199208c2ecf20Sopenharmony_ci#define MC_CMD_0x10b_PRIVILEGE_CTG SRIOV_CTG_INSECURE
199218c2ecf20Sopenharmony_ci
199228c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_TEST_IN msgrequest */
199238c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_TEST_IN_LEN 0
199248c2ecf20Sopenharmony_ci
199258c2ecf20Sopenharmony_ci/* MC_CMD_XPM_WRITE_TEST_OUT msgresponse */
199268c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_WRITE_TEST_OUT_LEN 0
199278c2ecf20Sopenharmony_ci
199288c2ecf20Sopenharmony_ci
199298c2ecf20Sopenharmony_ci/***********************************/
199308c2ecf20Sopenharmony_ci/* MC_CMD_EXEC_SIGNED
199318c2ecf20Sopenharmony_ci * Check the CMAC of the contents of IMEM and DMEM against the value supplied
199328c2ecf20Sopenharmony_ci * and if correct begin execution from the start of IMEM. The caller supplies a
199338c2ecf20Sopenharmony_ci * key ID, the length of IMEM and DMEM to validate and the expected CMAC. CMAC
199348c2ecf20Sopenharmony_ci * computation runs from the start of IMEM, and from the start of DMEM + 16k,
199358c2ecf20Sopenharmony_ci * to match flash booting. The command will respond with EINVAL if the CMAC
199368c2ecf20Sopenharmony_ci * does match, otherwise it will respond with success before it jumps to IMEM.
199378c2ecf20Sopenharmony_ci */
199388c2ecf20Sopenharmony_ci#define MC_CMD_EXEC_SIGNED 0x10c
199398c2ecf20Sopenharmony_ci#undef MC_CMD_0x10c_PRIVILEGE_CTG
199408c2ecf20Sopenharmony_ci
199418c2ecf20Sopenharmony_ci#define MC_CMD_0x10c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
199428c2ecf20Sopenharmony_ci
199438c2ecf20Sopenharmony_ci/* MC_CMD_EXEC_SIGNED_IN msgrequest */
199448c2ecf20Sopenharmony_ci#define    MC_CMD_EXEC_SIGNED_IN_LEN 28
199458c2ecf20Sopenharmony_ci/* the length of code to include in the CMAC */
199468c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_CODELEN_OFST 0
199478c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_CODELEN_LEN 4
199488c2ecf20Sopenharmony_ci/* the length of date to include in the CMAC */
199498c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_DATALEN_OFST 4
199508c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_DATALEN_LEN 4
199518c2ecf20Sopenharmony_ci/* the XPM sector containing the key to use */
199528c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_KEYSECTOR_OFST 8
199538c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_KEYSECTOR_LEN 4
199548c2ecf20Sopenharmony_ci/* the expected CMAC value */
199558c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_CMAC_OFST 12
199568c2ecf20Sopenharmony_ci#define       MC_CMD_EXEC_SIGNED_IN_CMAC_LEN 16
199578c2ecf20Sopenharmony_ci
199588c2ecf20Sopenharmony_ci/* MC_CMD_EXEC_SIGNED_OUT msgresponse */
199598c2ecf20Sopenharmony_ci#define    MC_CMD_EXEC_SIGNED_OUT_LEN 0
199608c2ecf20Sopenharmony_ci
199618c2ecf20Sopenharmony_ci
199628c2ecf20Sopenharmony_ci/***********************************/
199638c2ecf20Sopenharmony_ci/* MC_CMD_PREPARE_SIGNED
199648c2ecf20Sopenharmony_ci * Prepare to upload a signed image. This will scrub the specified length of
199658c2ecf20Sopenharmony_ci * the data region, which must be at least as large as the DATALEN supplied to
199668c2ecf20Sopenharmony_ci * MC_CMD_EXEC_SIGNED.
199678c2ecf20Sopenharmony_ci */
199688c2ecf20Sopenharmony_ci#define MC_CMD_PREPARE_SIGNED 0x10d
199698c2ecf20Sopenharmony_ci#undef MC_CMD_0x10d_PRIVILEGE_CTG
199708c2ecf20Sopenharmony_ci
199718c2ecf20Sopenharmony_ci#define MC_CMD_0x10d_PRIVILEGE_CTG SRIOV_CTG_ADMIN
199728c2ecf20Sopenharmony_ci
199738c2ecf20Sopenharmony_ci/* MC_CMD_PREPARE_SIGNED_IN msgrequest */
199748c2ecf20Sopenharmony_ci#define    MC_CMD_PREPARE_SIGNED_IN_LEN 4
199758c2ecf20Sopenharmony_ci/* the length of data area to clear */
199768c2ecf20Sopenharmony_ci#define       MC_CMD_PREPARE_SIGNED_IN_DATALEN_OFST 0
199778c2ecf20Sopenharmony_ci#define       MC_CMD_PREPARE_SIGNED_IN_DATALEN_LEN 4
199788c2ecf20Sopenharmony_ci
199798c2ecf20Sopenharmony_ci/* MC_CMD_PREPARE_SIGNED_OUT msgresponse */
199808c2ecf20Sopenharmony_ci#define    MC_CMD_PREPARE_SIGNED_OUT_LEN 0
199818c2ecf20Sopenharmony_ci
199828c2ecf20Sopenharmony_ci
199838c2ecf20Sopenharmony_ci/* TUNNEL_ENCAP_UDP_PORT_ENTRY structuredef */
199848c2ecf20Sopenharmony_ci#define    TUNNEL_ENCAP_UDP_PORT_ENTRY_LEN 4
199858c2ecf20Sopenharmony_ci/* UDP port (the standard ports are named below but any port may be used) */
199868c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_OFST 0
199878c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_LEN 2
199888c2ecf20Sopenharmony_ci/* enum: the IANA allocated UDP port for VXLAN */
199898c2ecf20Sopenharmony_ci#define          TUNNEL_ENCAP_UDP_PORT_ENTRY_IANA_VXLAN_UDP_PORT 0x12b5
199908c2ecf20Sopenharmony_ci/* enum: the IANA allocated UDP port for Geneve */
199918c2ecf20Sopenharmony_ci#define          TUNNEL_ENCAP_UDP_PORT_ENTRY_IANA_GENEVE_UDP_PORT 0x17c1
199928c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_LBN 0
199938c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_UDP_PORT_WIDTH 16
199948c2ecf20Sopenharmony_ci/* tunnel encapsulation protocol (only those named below are supported) */
199958c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_OFST 2
199968c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_LEN 2
199978c2ecf20Sopenharmony_ci/* enum: This port will be used for VXLAN on both IPv4 and IPv6 */
199988c2ecf20Sopenharmony_ci#define          TUNNEL_ENCAP_UDP_PORT_ENTRY_VXLAN 0x0
199998c2ecf20Sopenharmony_ci/* enum: This port will be used for Geneve on both IPv4 and IPv6 */
200008c2ecf20Sopenharmony_ci#define          TUNNEL_ENCAP_UDP_PORT_ENTRY_GENEVE 0x1
200018c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_LBN 16
200028c2ecf20Sopenharmony_ci#define       TUNNEL_ENCAP_UDP_PORT_ENTRY_PROTOCOL_WIDTH 16
200038c2ecf20Sopenharmony_ci
200048c2ecf20Sopenharmony_ci
200058c2ecf20Sopenharmony_ci/***********************************/
200068c2ecf20Sopenharmony_ci/* MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS
200078c2ecf20Sopenharmony_ci * Configure UDP ports for tunnel encapsulation hardware acceleration. The
200088c2ecf20Sopenharmony_ci * parser-dispatcher will attempt to parse traffic on these ports as tunnel
200098c2ecf20Sopenharmony_ci * encapsulation PDUs and filter them using the tunnel encapsulation filter
200108c2ecf20Sopenharmony_ci * chain rather than the standard filter chain. Note that this command can
200118c2ecf20Sopenharmony_ci * cause all functions to see a reset. (Available on Medford only.)
200128c2ecf20Sopenharmony_ci */
200138c2ecf20Sopenharmony_ci#define MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS 0x117
200148c2ecf20Sopenharmony_ci#undef MC_CMD_0x117_PRIVILEGE_CTG
200158c2ecf20Sopenharmony_ci
200168c2ecf20Sopenharmony_ci#define MC_CMD_0x117_PRIVILEGE_CTG SRIOV_CTG_ADMIN
200178c2ecf20Sopenharmony_ci
200188c2ecf20Sopenharmony_ci/* MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN msgrequest */
200198c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMIN 4
200208c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMAX 68
200218c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMAX_MCDI2 68
200228c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LEN(num) (4+4*(num))
200238c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_NUM(len) (((len)-4)/4)
200248c2ecf20Sopenharmony_ci/* Flags */
200258c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_FLAGS_OFST 0
200268c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_FLAGS_LEN 2
200278c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_UNLOADING_OFST 0
200288c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_UNLOADING_LBN 0
200298c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_UNLOADING_WIDTH 1
200308c2ecf20Sopenharmony_ci/* The number of entries in the ENTRIES array */
200318c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_NUM_ENTRIES_OFST 2
200328c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_NUM_ENTRIES_LEN 2
200338c2ecf20Sopenharmony_ci/* Entries defining the UDP port to protocol mapping, each laid out as a
200348c2ecf20Sopenharmony_ci * TUNNEL_ENCAP_UDP_PORT_ENTRY
200358c2ecf20Sopenharmony_ci */
200368c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_OFST 4
200378c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_LEN 4
200388c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MINNUM 0
200398c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MAXNUM 16
200408c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_ENTRIES_MAXNUM_MCDI2 16
200418c2ecf20Sopenharmony_ci
200428c2ecf20Sopenharmony_ci/* MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT msgresponse */
200438c2ecf20Sopenharmony_ci#define    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN 2
200448c2ecf20Sopenharmony_ci/* Flags */
200458c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_FLAGS_OFST 0
200468c2ecf20Sopenharmony_ci#define       MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_FLAGS_LEN 2
200478c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_RESETTING_OFST 0
200488c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_RESETTING_LBN 0
200498c2ecf20Sopenharmony_ci#define        MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_RESETTING_WIDTH 1
200508c2ecf20Sopenharmony_ci
200518c2ecf20Sopenharmony_ci
200528c2ecf20Sopenharmony_ci/***********************************/
200538c2ecf20Sopenharmony_ci/* MC_CMD_RX_BALANCING
200548c2ecf20Sopenharmony_ci * Configure a port upconverter to distribute the packets on both RX engines.
200558c2ecf20Sopenharmony_ci * Packets are distributed based on a table with the destination vFIFO. The
200568c2ecf20Sopenharmony_ci * index of the table is a hash of source and destination of IPV4 and VLAN
200578c2ecf20Sopenharmony_ci * priority.
200588c2ecf20Sopenharmony_ci */
200598c2ecf20Sopenharmony_ci#define MC_CMD_RX_BALANCING 0x118
200608c2ecf20Sopenharmony_ci#undef MC_CMD_0x118_PRIVILEGE_CTG
200618c2ecf20Sopenharmony_ci
200628c2ecf20Sopenharmony_ci#define MC_CMD_0x118_PRIVILEGE_CTG SRIOV_CTG_ADMIN
200638c2ecf20Sopenharmony_ci
200648c2ecf20Sopenharmony_ci/* MC_CMD_RX_BALANCING_IN msgrequest */
200658c2ecf20Sopenharmony_ci#define    MC_CMD_RX_BALANCING_IN_LEN 16
200668c2ecf20Sopenharmony_ci/* The RX port whose upconverter table will be modified */
200678c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_PORT_OFST 0
200688c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_PORT_LEN 4
200698c2ecf20Sopenharmony_ci/* The VLAN priority associated to the table index and vFIFO */
200708c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_PRIORITY_OFST 4
200718c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_PRIORITY_LEN 4
200728c2ecf20Sopenharmony_ci/* The resulting bit of SRC^DST for indexing the table */
200738c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_SRC_DST_OFST 8
200748c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_SRC_DST_LEN 4
200758c2ecf20Sopenharmony_ci/* The RX engine to which the vFIFO in the table entry will point to */
200768c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_ENG_OFST 12
200778c2ecf20Sopenharmony_ci#define       MC_CMD_RX_BALANCING_IN_ENG_LEN 4
200788c2ecf20Sopenharmony_ci
200798c2ecf20Sopenharmony_ci/* MC_CMD_RX_BALANCING_OUT msgresponse */
200808c2ecf20Sopenharmony_ci#define    MC_CMD_RX_BALANCING_OUT_LEN 0
200818c2ecf20Sopenharmony_ci
200828c2ecf20Sopenharmony_ci
200838c2ecf20Sopenharmony_ci/***********************************/
200848c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_PRIVATE_APPEND
200858c2ecf20Sopenharmony_ci * Append a single TLV to the MC_USAGE_TLV partition. Returns MC_CMD_ERR_EEXIST
200868c2ecf20Sopenharmony_ci * if the tag is already present.
200878c2ecf20Sopenharmony_ci */
200888c2ecf20Sopenharmony_ci#define MC_CMD_NVRAM_PRIVATE_APPEND 0x11c
200898c2ecf20Sopenharmony_ci#undef MC_CMD_0x11c_PRIVILEGE_CTG
200908c2ecf20Sopenharmony_ci
200918c2ecf20Sopenharmony_ci#define MC_CMD_0x11c_PRIVILEGE_CTG SRIOV_CTG_ADMIN
200928c2ecf20Sopenharmony_ci
200938c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_PRIVATE_APPEND_IN msgrequest */
200948c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENMIN 9
200958c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENMAX 252
200968c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENMAX_MCDI2 1020
200978c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PRIVATE_APPEND_IN_LEN(num) (8+1*(num))
200988c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_NUM(len) (((len)-8)/1)
200998c2ecf20Sopenharmony_ci/* The tag to be appended */
201008c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_TAG_OFST 0
201018c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_TAG_LEN 4
201028c2ecf20Sopenharmony_ci/* The length of the data */
201038c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENGTH_OFST 4
201048c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_LENGTH_LEN 4
201058c2ecf20Sopenharmony_ci/* The data to be contained in the TLV structure */
201068c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_OFST 8
201078c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_LEN 1
201088c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_MINNUM 1
201098c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_MAXNUM 244
201108c2ecf20Sopenharmony_ci#define       MC_CMD_NVRAM_PRIVATE_APPEND_IN_DATA_BUFFER_MAXNUM_MCDI2 1012
201118c2ecf20Sopenharmony_ci
201128c2ecf20Sopenharmony_ci/* MC_CMD_NVRAM_PRIVATE_APPEND_OUT msgresponse */
201138c2ecf20Sopenharmony_ci#define    MC_CMD_NVRAM_PRIVATE_APPEND_OUT_LEN 0
201148c2ecf20Sopenharmony_ci
201158c2ecf20Sopenharmony_ci
201168c2ecf20Sopenharmony_ci/***********************************/
201178c2ecf20Sopenharmony_ci/* MC_CMD_XPM_VERIFY_CONTENTS
201188c2ecf20Sopenharmony_ci * Verify that the contents of the XPM memory is correct (Medford only). This
201198c2ecf20Sopenharmony_ci * is used during manufacture to check that the XPM memory has been programmed
201208c2ecf20Sopenharmony_ci * correctly at ATE.
201218c2ecf20Sopenharmony_ci */
201228c2ecf20Sopenharmony_ci#define MC_CMD_XPM_VERIFY_CONTENTS 0x11b
201238c2ecf20Sopenharmony_ci#undef MC_CMD_0x11b_PRIVILEGE_CTG
201248c2ecf20Sopenharmony_ci
201258c2ecf20Sopenharmony_ci#define MC_CMD_0x11b_PRIVILEGE_CTG SRIOV_CTG_ADMIN
201268c2ecf20Sopenharmony_ci
201278c2ecf20Sopenharmony_ci/* MC_CMD_XPM_VERIFY_CONTENTS_IN msgrequest */
201288c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_VERIFY_CONTENTS_IN_LEN 4
201298c2ecf20Sopenharmony_ci/* Data type to be checked */
201308c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_IN_DATA_TYPE_OFST 0
201318c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_IN_DATA_TYPE_LEN 4
201328c2ecf20Sopenharmony_ci
201338c2ecf20Sopenharmony_ci/* MC_CMD_XPM_VERIFY_CONTENTS_OUT msgresponse */
201348c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_VERIFY_CONTENTS_OUT_LENMIN 12
201358c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_VERIFY_CONTENTS_OUT_LENMAX 252
201368c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_VERIFY_CONTENTS_OUT_LENMAX_MCDI2 1020
201378c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_VERIFY_CONTENTS_OUT_LEN(num) (12+1*(num))
201388c2ecf20Sopenharmony_ci#define    MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_NUM(len) (((len)-12)/1)
201398c2ecf20Sopenharmony_ci/* Number of sectors found (test builds only) */
201408c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_SECTORS_OFST 0
201418c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_SECTORS_LEN 4
201428c2ecf20Sopenharmony_ci/* Number of bytes found (test builds only) */
201438c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_BYTES_OFST 4
201448c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_NUM_BYTES_LEN 4
201458c2ecf20Sopenharmony_ci/* Length of signature */
201468c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIG_LENGTH_OFST 8
201478c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIG_LENGTH_LEN 4
201488c2ecf20Sopenharmony_ci/* Signature */
201498c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_OFST 12
201508c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_LEN 1
201518c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_MINNUM 0
201528c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_MAXNUM 240
201538c2ecf20Sopenharmony_ci#define       MC_CMD_XPM_VERIFY_CONTENTS_OUT_SIGNATURE_MAXNUM_MCDI2 1008
201548c2ecf20Sopenharmony_ci
201558c2ecf20Sopenharmony_ci
201568c2ecf20Sopenharmony_ci/***********************************/
201578c2ecf20Sopenharmony_ci/* MC_CMD_SET_EVQ_TMR
201588c2ecf20Sopenharmony_ci * Update the timer load, timer reload and timer mode values for a given EVQ.
201598c2ecf20Sopenharmony_ci * The requested timer values (in TMR_LOAD_REQ_NS and TMR_RELOAD_REQ_NS) will
201608c2ecf20Sopenharmony_ci * be rounded up to the granularity supported by the hardware, then truncated
201618c2ecf20Sopenharmony_ci * to the range supported by the hardware. The resulting value after the
201628c2ecf20Sopenharmony_ci * rounding and truncation will be returned to the caller (in TMR_LOAD_ACT_NS
201638c2ecf20Sopenharmony_ci * and TMR_RELOAD_ACT_NS).
201648c2ecf20Sopenharmony_ci */
201658c2ecf20Sopenharmony_ci#define MC_CMD_SET_EVQ_TMR 0x120
201668c2ecf20Sopenharmony_ci#undef MC_CMD_0x120_PRIVILEGE_CTG
201678c2ecf20Sopenharmony_ci
201688c2ecf20Sopenharmony_ci#define MC_CMD_0x120_PRIVILEGE_CTG SRIOV_CTG_GENERAL
201698c2ecf20Sopenharmony_ci
201708c2ecf20Sopenharmony_ci/* MC_CMD_SET_EVQ_TMR_IN msgrequest */
201718c2ecf20Sopenharmony_ci#define    MC_CMD_SET_EVQ_TMR_IN_LEN 16
201728c2ecf20Sopenharmony_ci/* Function-relative queue instance */
201738c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_INSTANCE_OFST 0
201748c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_INSTANCE_LEN 4
201758c2ecf20Sopenharmony_ci/* Requested value for timer load (in nanoseconds) */
201768c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_TMR_LOAD_REQ_NS_OFST 4
201778c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_TMR_LOAD_REQ_NS_LEN 4
201788c2ecf20Sopenharmony_ci/* Requested value for timer reload (in nanoseconds) */
201798c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_TMR_RELOAD_REQ_NS_OFST 8
201808c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_TMR_RELOAD_REQ_NS_LEN 4
201818c2ecf20Sopenharmony_ci/* Timer mode. Meanings as per EVQ_TMR_REG.TC_TIMER_VAL */
201828c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_TMR_MODE_OFST 12
201838c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_IN_TMR_MODE_LEN 4
201848c2ecf20Sopenharmony_ci#define          MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_DIS 0x0 /* enum */
201858c2ecf20Sopenharmony_ci#define          MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_IMMED_START 0x1 /* enum */
201868c2ecf20Sopenharmony_ci#define          MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_TRIG_START 0x2 /* enum */
201878c2ecf20Sopenharmony_ci#define          MC_CMD_SET_EVQ_TMR_IN_TIMER_MODE_INT_HLDOFF 0x3 /* enum */
201888c2ecf20Sopenharmony_ci
201898c2ecf20Sopenharmony_ci/* MC_CMD_SET_EVQ_TMR_OUT msgresponse */
201908c2ecf20Sopenharmony_ci#define    MC_CMD_SET_EVQ_TMR_OUT_LEN 8
201918c2ecf20Sopenharmony_ci/* Actual value for timer load (in nanoseconds) */
201928c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_OUT_TMR_LOAD_ACT_NS_OFST 0
201938c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_OUT_TMR_LOAD_ACT_NS_LEN 4
201948c2ecf20Sopenharmony_ci/* Actual value for timer reload (in nanoseconds) */
201958c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_OUT_TMR_RELOAD_ACT_NS_OFST 4
201968c2ecf20Sopenharmony_ci#define       MC_CMD_SET_EVQ_TMR_OUT_TMR_RELOAD_ACT_NS_LEN 4
201978c2ecf20Sopenharmony_ci
201988c2ecf20Sopenharmony_ci
201998c2ecf20Sopenharmony_ci/***********************************/
202008c2ecf20Sopenharmony_ci/* MC_CMD_GET_EVQ_TMR_PROPERTIES
202018c2ecf20Sopenharmony_ci * Query properties about the event queue timers.
202028c2ecf20Sopenharmony_ci */
202038c2ecf20Sopenharmony_ci#define MC_CMD_GET_EVQ_TMR_PROPERTIES 0x122
202048c2ecf20Sopenharmony_ci#undef MC_CMD_0x122_PRIVILEGE_CTG
202058c2ecf20Sopenharmony_ci
202068c2ecf20Sopenharmony_ci#define MC_CMD_0x122_PRIVILEGE_CTG SRIOV_CTG_GENERAL
202078c2ecf20Sopenharmony_ci
202088c2ecf20Sopenharmony_ci/* MC_CMD_GET_EVQ_TMR_PROPERTIES_IN msgrequest */
202098c2ecf20Sopenharmony_ci#define    MC_CMD_GET_EVQ_TMR_PROPERTIES_IN_LEN 0
202108c2ecf20Sopenharmony_ci
202118c2ecf20Sopenharmony_ci/* MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT msgresponse */
202128c2ecf20Sopenharmony_ci#define    MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_LEN 36
202138c2ecf20Sopenharmony_ci/* Reserved for future use. */
202148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_FLAGS_OFST 0
202158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_FLAGS_LEN 4
202168c2ecf20Sopenharmony_ci/* For timers updated via writes to EVQ_TMR_REG, this is the time interval (in
202178c2ecf20Sopenharmony_ci * nanoseconds) for each increment of the timer load/reload count. The
202188c2ecf20Sopenharmony_ci * requested duration of a timer is this value multiplied by the timer
202198c2ecf20Sopenharmony_ci * load/reload count.
202208c2ecf20Sopenharmony_ci */
202218c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_NS_PER_COUNT_OFST 4
202228c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_NS_PER_COUNT_LEN 4
202238c2ecf20Sopenharmony_ci/* For timers updated via writes to EVQ_TMR_REG, this is the maximum value
202248c2ecf20Sopenharmony_ci * allowed for timer load/reload counts.
202258c2ecf20Sopenharmony_ci */
202268c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_MAX_COUNT_OFST 8
202278c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_MAX_COUNT_LEN 4
202288c2ecf20Sopenharmony_ci/* For timers updated via writes to EVQ_TMR_REG, timer load/reload counts not a
202298c2ecf20Sopenharmony_ci * multiple of this step size will be rounded in an implementation defined
202308c2ecf20Sopenharmony_ci * manner.
202318c2ecf20Sopenharmony_ci */
202328c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_STEP_OFST 12
202338c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_TMR_REG_STEP_LEN 4
202348c2ecf20Sopenharmony_ci/* Maximum timer duration (in nanoseconds) for timers updated via MCDI. Only
202358c2ecf20Sopenharmony_ci * meaningful if MC_CMD_SET_EVQ_TMR is implemented.
202368c2ecf20Sopenharmony_ci */
202378c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_MAX_NS_OFST 16
202388c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_MAX_NS_LEN 4
202398c2ecf20Sopenharmony_ci/* Timer durations requested via MCDI that are not a multiple of this step size
202408c2ecf20Sopenharmony_ci * will be rounded up. Only meaningful if MC_CMD_SET_EVQ_TMR is implemented.
202418c2ecf20Sopenharmony_ci */
202428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_STEP_NS_OFST 20
202438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_MCDI_TMR_STEP_NS_LEN 4
202448c2ecf20Sopenharmony_ci/* For timers updated using the bug35388 workaround, this is the time interval
202458c2ecf20Sopenharmony_ci * (in nanoseconds) for each increment of the timer load/reload count. The
202468c2ecf20Sopenharmony_ci * requested duration of a timer is this value multiplied by the timer
202478c2ecf20Sopenharmony_ci * load/reload count. This field is only meaningful if the bug35388 workaround
202488c2ecf20Sopenharmony_ci * is enabled.
202498c2ecf20Sopenharmony_ci */
202508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_NS_PER_COUNT_OFST 24
202518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_NS_PER_COUNT_LEN 4
202528c2ecf20Sopenharmony_ci/* For timers updated using the bug35388 workaround, this is the maximum value
202538c2ecf20Sopenharmony_ci * allowed for timer load/reload counts. This field is only meaningful if the
202548c2ecf20Sopenharmony_ci * bug35388 workaround is enabled.
202558c2ecf20Sopenharmony_ci */
202568c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_MAX_COUNT_OFST 28
202578c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_MAX_COUNT_LEN 4
202588c2ecf20Sopenharmony_ci/* For timers updated using the bug35388 workaround, timer load/reload counts
202598c2ecf20Sopenharmony_ci * not a multiple of this step size will be rounded in an implementation
202608c2ecf20Sopenharmony_ci * defined manner. This field is only meaningful if the bug35388 workaround is
202618c2ecf20Sopenharmony_ci * enabled.
202628c2ecf20Sopenharmony_ci */
202638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_STEP_OFST 32
202648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_EVQ_TMR_PROPERTIES_OUT_BUG35388_TMR_STEP_LEN 4
202658c2ecf20Sopenharmony_ci
202668c2ecf20Sopenharmony_ci
202678c2ecf20Sopenharmony_ci/***********************************/
202688c2ecf20Sopenharmony_ci/* MC_CMD_ALLOCATE_TX_VFIFO_CP
202698c2ecf20Sopenharmony_ci * When we use the TX_vFIFO_ULL mode, we can allocate common pools using the
202708c2ecf20Sopenharmony_ci * non used switch buffers.
202718c2ecf20Sopenharmony_ci */
202728c2ecf20Sopenharmony_ci#define MC_CMD_ALLOCATE_TX_VFIFO_CP 0x11d
202738c2ecf20Sopenharmony_ci#undef MC_CMD_0x11d_PRIVILEGE_CTG
202748c2ecf20Sopenharmony_ci
202758c2ecf20Sopenharmony_ci#define MC_CMD_0x11d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
202768c2ecf20Sopenharmony_ci
202778c2ecf20Sopenharmony_ci/* MC_CMD_ALLOCATE_TX_VFIFO_CP_IN msgrequest */
202788c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_LEN 20
202798c2ecf20Sopenharmony_ci/* Desired instance. Must be set to a specific instance, which is a function
202808c2ecf20Sopenharmony_ci * local queue index.
202818c2ecf20Sopenharmony_ci */
202828c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INSTANCE_OFST 0
202838c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INSTANCE_LEN 4
202848c2ecf20Sopenharmony_ci/* Will the common pool be used as TX_vFIFO_ULL (1) */
202858c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_MODE_OFST 4
202868c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_MODE_LEN 4
202878c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_ENABLED 0x1 /* enum */
202888c2ecf20Sopenharmony_ci/* enum: Using this interface without TX_vFIFO_ULL is not supported for now */
202898c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_DISABLED 0x0
202908c2ecf20Sopenharmony_ci/* Number of buffers to reserve for the common pool */
202918c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_SIZE_OFST 8
202928c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_SIZE_LEN 4
202938c2ecf20Sopenharmony_ci/* TX datapath to which the Common Pool is connected to. */
202948c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INGRESS_OFST 12
202958c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_INGRESS_LEN 4
202968c2ecf20Sopenharmony_ci/* enum: Extracts information from function */
202978c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_USE_FUNCTION_VALUE -0x1
202988c2ecf20Sopenharmony_ci/* Network port or RX Engine to which the common pool connects. */
202998c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_EGRESS_OFST 16
203008c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_EGRESS_LEN 4
203018c2ecf20Sopenharmony_ci/* enum: Extracts information from function */
203028c2ecf20Sopenharmony_ci/*               MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_USE_FUNCTION_VALUE -0x1 */
203038c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT0 0x0 /* enum */
203048c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT1 0x1 /* enum */
203058c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT2 0x2 /* enum */
203068c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_PORT3 0x3 /* enum */
203078c2ecf20Sopenharmony_ci/* enum: To enable Switch loopback with Rx engine 0 */
203088c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_RX_ENGINE0 0x4
203098c2ecf20Sopenharmony_ci/* enum: To enable Switch loopback with Rx engine 1 */
203108c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_CP_IN_RX_ENGINE1 0x5
203118c2ecf20Sopenharmony_ci
203128c2ecf20Sopenharmony_ci/* MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT msgresponse */
203138c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT_LEN 4
203148c2ecf20Sopenharmony_ci/* ID of the common pool allocated */
203158c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT_CP_ID_OFST 0
203168c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_CP_OUT_CP_ID_LEN 4
203178c2ecf20Sopenharmony_ci
203188c2ecf20Sopenharmony_ci
203198c2ecf20Sopenharmony_ci/***********************************/
203208c2ecf20Sopenharmony_ci/* MC_CMD_ALLOCATE_TX_VFIFO_VFIFO
203218c2ecf20Sopenharmony_ci * When we use the TX_vFIFO_ULL mode, we can allocate vFIFOs using the
203228c2ecf20Sopenharmony_ci * previously allocated common pools.
203238c2ecf20Sopenharmony_ci */
203248c2ecf20Sopenharmony_ci#define MC_CMD_ALLOCATE_TX_VFIFO_VFIFO 0x11e
203258c2ecf20Sopenharmony_ci#undef MC_CMD_0x11e_PRIVILEGE_CTG
203268c2ecf20Sopenharmony_ci
203278c2ecf20Sopenharmony_ci#define MC_CMD_0x11e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
203288c2ecf20Sopenharmony_ci
203298c2ecf20Sopenharmony_ci/* MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN msgrequest */
203308c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_LEN 20
203318c2ecf20Sopenharmony_ci/* Common pool previously allocated to which the new vFIFO will be associated
203328c2ecf20Sopenharmony_ci */
203338c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_CP_OFST 0
203348c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_CP_LEN 4
203358c2ecf20Sopenharmony_ci/* Port or RX engine to associate the vFIFO egress */
203368c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_EGRESS_OFST 4
203378c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_EGRESS_LEN 4
203388c2ecf20Sopenharmony_ci/* enum: Extracts information from common pool */
203398c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_USE_CP_VALUE -0x1
203408c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT0 0x0 /* enum */
203418c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT1 0x1 /* enum */
203428c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT2 0x2 /* enum */
203438c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PORT3 0x3 /* enum */
203448c2ecf20Sopenharmony_ci/* enum: To enable Switch loopback with Rx engine 0 */
203458c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_RX_ENGINE0 0x4
203468c2ecf20Sopenharmony_ci/* enum: To enable Switch loopback with Rx engine 1 */
203478c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_RX_ENGINE1 0x5
203488c2ecf20Sopenharmony_ci/* Minimum number of buffers that the pool must have */
203498c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_SIZE_OFST 8
203508c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_SIZE_LEN 4
203518c2ecf20Sopenharmony_ci/* enum: Do not check the space available */
203528c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_NO_MINIMUM 0x0
203538c2ecf20Sopenharmony_ci/* Will the vFIFO be used as TX_vFIFO_ULL */
203548c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_MODE_OFST 12
203558c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_MODE_LEN 4
203568c2ecf20Sopenharmony_ci/* Network priority of the vFIFO,if applicable */
203578c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PRIORITY_OFST 16
203588c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_PRIORITY_LEN 4
203598c2ecf20Sopenharmony_ci/* enum: Search for the lowest unused priority */
203608c2ecf20Sopenharmony_ci#define          MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_IN_LOWEST_AVAILABLE -0x1
203618c2ecf20Sopenharmony_ci
203628c2ecf20Sopenharmony_ci/* MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT msgresponse */
203638c2ecf20Sopenharmony_ci#define    MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_LEN 8
203648c2ecf20Sopenharmony_ci/* Short vFIFO ID */
203658c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_VID_OFST 0
203668c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_VID_LEN 4
203678c2ecf20Sopenharmony_ci/* Network priority of the vFIFO */
203688c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_PRIORITY_OFST 4
203698c2ecf20Sopenharmony_ci#define       MC_CMD_ALLOCATE_TX_VFIFO_VFIFO_OUT_PRIORITY_LEN 4
203708c2ecf20Sopenharmony_ci
203718c2ecf20Sopenharmony_ci
203728c2ecf20Sopenharmony_ci/***********************************/
203738c2ecf20Sopenharmony_ci/* MC_CMD_TEARDOWN_TX_VFIFO_VF
203748c2ecf20Sopenharmony_ci * This interface clears the configuration of the given vFIFO and leaves it
203758c2ecf20Sopenharmony_ci * ready to be re-used.
203768c2ecf20Sopenharmony_ci */
203778c2ecf20Sopenharmony_ci#define MC_CMD_TEARDOWN_TX_VFIFO_VF 0x11f
203788c2ecf20Sopenharmony_ci#undef MC_CMD_0x11f_PRIVILEGE_CTG
203798c2ecf20Sopenharmony_ci
203808c2ecf20Sopenharmony_ci#define MC_CMD_0x11f_PRIVILEGE_CTG SRIOV_CTG_GENERAL
203818c2ecf20Sopenharmony_ci
203828c2ecf20Sopenharmony_ci/* MC_CMD_TEARDOWN_TX_VFIFO_VF_IN msgrequest */
203838c2ecf20Sopenharmony_ci#define    MC_CMD_TEARDOWN_TX_VFIFO_VF_IN_LEN 4
203848c2ecf20Sopenharmony_ci/* Short vFIFO ID */
203858c2ecf20Sopenharmony_ci#define       MC_CMD_TEARDOWN_TX_VFIFO_VF_IN_VFIFO_OFST 0
203868c2ecf20Sopenharmony_ci#define       MC_CMD_TEARDOWN_TX_VFIFO_VF_IN_VFIFO_LEN 4
203878c2ecf20Sopenharmony_ci
203888c2ecf20Sopenharmony_ci/* MC_CMD_TEARDOWN_TX_VFIFO_VF_OUT msgresponse */
203898c2ecf20Sopenharmony_ci#define    MC_CMD_TEARDOWN_TX_VFIFO_VF_OUT_LEN 0
203908c2ecf20Sopenharmony_ci
203918c2ecf20Sopenharmony_ci
203928c2ecf20Sopenharmony_ci/***********************************/
203938c2ecf20Sopenharmony_ci/* MC_CMD_DEALLOCATE_TX_VFIFO_CP
203948c2ecf20Sopenharmony_ci * This interface clears the configuration of the given common pool and leaves
203958c2ecf20Sopenharmony_ci * it ready to be re-used.
203968c2ecf20Sopenharmony_ci */
203978c2ecf20Sopenharmony_ci#define MC_CMD_DEALLOCATE_TX_VFIFO_CP 0x121
203988c2ecf20Sopenharmony_ci#undef MC_CMD_0x121_PRIVILEGE_CTG
203998c2ecf20Sopenharmony_ci
204008c2ecf20Sopenharmony_ci#define MC_CMD_0x121_PRIVILEGE_CTG SRIOV_CTG_GENERAL
204018c2ecf20Sopenharmony_ci
204028c2ecf20Sopenharmony_ci/* MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN msgrequest */
204038c2ecf20Sopenharmony_ci#define    MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN_LEN 4
204048c2ecf20Sopenharmony_ci/* Common pool ID given when pool allocated */
204058c2ecf20Sopenharmony_ci#define       MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN_POOL_ID_OFST 0
204068c2ecf20Sopenharmony_ci#define       MC_CMD_DEALLOCATE_TX_VFIFO_CP_IN_POOL_ID_LEN 4
204078c2ecf20Sopenharmony_ci
204088c2ecf20Sopenharmony_ci/* MC_CMD_DEALLOCATE_TX_VFIFO_CP_OUT msgresponse */
204098c2ecf20Sopenharmony_ci#define    MC_CMD_DEALLOCATE_TX_VFIFO_CP_OUT_LEN 0
204108c2ecf20Sopenharmony_ci
204118c2ecf20Sopenharmony_ci
204128c2ecf20Sopenharmony_ci/***********************************/
204138c2ecf20Sopenharmony_ci/* MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS
204148c2ecf20Sopenharmony_ci * This interface allows the host to find out how many common pool buffers are
204158c2ecf20Sopenharmony_ci * not yet assigned.
204168c2ecf20Sopenharmony_ci */
204178c2ecf20Sopenharmony_ci#define MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS 0x124
204188c2ecf20Sopenharmony_ci#undef MC_CMD_0x124_PRIVILEGE_CTG
204198c2ecf20Sopenharmony_ci
204208c2ecf20Sopenharmony_ci#define MC_CMD_0x124_PRIVILEGE_CTG SRIOV_CTG_GENERAL
204218c2ecf20Sopenharmony_ci
204228c2ecf20Sopenharmony_ci/* MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_IN msgrequest */
204238c2ecf20Sopenharmony_ci#define    MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_IN_LEN 0
204248c2ecf20Sopenharmony_ci
204258c2ecf20Sopenharmony_ci/* MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT msgresponse */
204268c2ecf20Sopenharmony_ci#define    MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_LEN 8
204278c2ecf20Sopenharmony_ci/* Available buffers for the ENG to NET vFIFOs. */
204288c2ecf20Sopenharmony_ci#define       MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_NET_OFST 0
204298c2ecf20Sopenharmony_ci#define       MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_NET_LEN 4
204308c2ecf20Sopenharmony_ci/* Available buffers for the ENG to ENG and NET to ENG vFIFOs. */
204318c2ecf20Sopenharmony_ci#define       MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_ENG_OFST 4
204328c2ecf20Sopenharmony_ci#define       MC_CMD_SWITCH_GET_UNASSIGNED_BUFFERS_OUT_ENG_LEN 4
204338c2ecf20Sopenharmony_ci
204348c2ecf20Sopenharmony_ci
204358c2ecf20Sopenharmony_ci/***********************************/
204368c2ecf20Sopenharmony_ci/* MC_CMD_SUC_VERSION
204378c2ecf20Sopenharmony_ci * Get the version of the SUC
204388c2ecf20Sopenharmony_ci */
204398c2ecf20Sopenharmony_ci#define MC_CMD_SUC_VERSION 0x134
204408c2ecf20Sopenharmony_ci#undef MC_CMD_0x134_PRIVILEGE_CTG
204418c2ecf20Sopenharmony_ci
204428c2ecf20Sopenharmony_ci#define MC_CMD_0x134_PRIVILEGE_CTG SRIOV_CTG_GENERAL
204438c2ecf20Sopenharmony_ci
204448c2ecf20Sopenharmony_ci/* MC_CMD_SUC_VERSION_IN msgrequest */
204458c2ecf20Sopenharmony_ci#define    MC_CMD_SUC_VERSION_IN_LEN 0
204468c2ecf20Sopenharmony_ci
204478c2ecf20Sopenharmony_ci/* MC_CMD_SUC_VERSION_OUT msgresponse */
204488c2ecf20Sopenharmony_ci#define    MC_CMD_SUC_VERSION_OUT_LEN 24
204498c2ecf20Sopenharmony_ci/* The SUC firmware version as four numbers - a.b.c.d */
204508c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_VERSION_OFST 0
204518c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_VERSION_LEN 4
204528c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_VERSION_NUM 4
204538c2ecf20Sopenharmony_ci/* The date, in seconds since the Unix epoch, when the firmware image was
204548c2ecf20Sopenharmony_ci * built.
204558c2ecf20Sopenharmony_ci */
204568c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_BUILD_DATE_OFST 16
204578c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_BUILD_DATE_LEN 4
204588c2ecf20Sopenharmony_ci/* The ID of the SUC chip. This is specific to the platform but typically
204598c2ecf20Sopenharmony_ci * indicates family, memory sizes etc. See SF-116728-SW for further details.
204608c2ecf20Sopenharmony_ci */
204618c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_CHIP_ID_OFST 20
204628c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_VERSION_OUT_CHIP_ID_LEN 4
204638c2ecf20Sopenharmony_ci
204648c2ecf20Sopenharmony_ci/* MC_CMD_SUC_BOOT_VERSION_IN msgrequest: Get the version of the SUC boot
204658c2ecf20Sopenharmony_ci * loader.
204668c2ecf20Sopenharmony_ci */
204678c2ecf20Sopenharmony_ci#define    MC_CMD_SUC_BOOT_VERSION_IN_LEN 4
204688c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_BOOT_VERSION_IN_MAGIC_OFST 0
204698c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_BOOT_VERSION_IN_MAGIC_LEN 4
204708c2ecf20Sopenharmony_ci/* enum: Requests the SUC boot version. */
204718c2ecf20Sopenharmony_ci#define          MC_CMD_SUC_VERSION_GET_BOOT_VERSION 0xb007700b
204728c2ecf20Sopenharmony_ci
204738c2ecf20Sopenharmony_ci/* MC_CMD_SUC_BOOT_VERSION_OUT msgresponse */
204748c2ecf20Sopenharmony_ci#define    MC_CMD_SUC_BOOT_VERSION_OUT_LEN 4
204758c2ecf20Sopenharmony_ci/* The SUC boot version */
204768c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_BOOT_VERSION_OUT_VERSION_OFST 0
204778c2ecf20Sopenharmony_ci#define       MC_CMD_SUC_BOOT_VERSION_OUT_VERSION_LEN 4
204788c2ecf20Sopenharmony_ci
204798c2ecf20Sopenharmony_ci
204808c2ecf20Sopenharmony_ci/***********************************/
204818c2ecf20Sopenharmony_ci/* MC_CMD_GET_RX_PREFIX_ID
204828c2ecf20Sopenharmony_ci * This command is part of the mechanism for configuring the format of the RX
204838c2ecf20Sopenharmony_ci * packet prefix. It takes as input a bitmask of the fields the host would like
204848c2ecf20Sopenharmony_ci * to be in the prefix. If the hardware supports RX prefixes with that
204858c2ecf20Sopenharmony_ci * combination of fields, then this command returns a list of prefix-ids,
204868c2ecf20Sopenharmony_ci * opaque identifiers suitable for use in the RX_PREFIX_ID field of a
204878c2ecf20Sopenharmony_ci * MC_CMD_INIT_RXQ_V5_IN message. If the combination of fields is not
204888c2ecf20Sopenharmony_ci * supported, returns ENOTSUP. If the firmware can't create any new prefix-ids
204898c2ecf20Sopenharmony_ci * due to resource constraints, returns ENOSPC.
204908c2ecf20Sopenharmony_ci */
204918c2ecf20Sopenharmony_ci#define MC_CMD_GET_RX_PREFIX_ID 0x13b
204928c2ecf20Sopenharmony_ci#undef MC_CMD_0x13b_PRIVILEGE_CTG
204938c2ecf20Sopenharmony_ci
204948c2ecf20Sopenharmony_ci#define MC_CMD_0x13b_PRIVILEGE_CTG SRIOV_CTG_GENERAL
204958c2ecf20Sopenharmony_ci
204968c2ecf20Sopenharmony_ci/* MC_CMD_GET_RX_PREFIX_ID_IN msgrequest */
204978c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RX_PREFIX_ID_IN_LEN 8
204988c2ecf20Sopenharmony_ci/* Field bitmask. */
204998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_IN_FIELDS_OFST 0
205008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_IN_FIELDS_LEN 8
205018c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_IN_FIELDS_LO_OFST 0
205028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_IN_FIELDS_HI_OFST 4
205038c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_LENGTH_OFST 0
205048c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_LENGTH_LBN 0
205058c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_LENGTH_WIDTH 1
205068c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_RSS_HASH_VALID_OFST 0
205078c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_RSS_HASH_VALID_LBN 1
205088c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_RSS_HASH_VALID_WIDTH 1
205098c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_USER_FLAG_OFST 0
205108c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_USER_FLAG_LBN 2
205118c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_USER_FLAG_WIDTH 1
205128c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_CLASS_OFST 0
205138c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_CLASS_LBN 3
205148c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_CLASS_WIDTH 1
205158c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_PARTIAL_TSTAMP_OFST 0
205168c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_PARTIAL_TSTAMP_LBN 4
205178c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_PARTIAL_TSTAMP_WIDTH 1
205188c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_RSS_HASH_OFST 0
205198c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_RSS_HASH_LBN 5
205208c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_RSS_HASH_WIDTH 1
205218c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_USER_MARK_OFST 0
205228c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_USER_MARK_LBN 6
205238c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_USER_MARK_WIDTH 1
205248c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_INGRESS_VPORT_OFST 0
205258c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_INGRESS_VPORT_LBN 7
205268c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_INGRESS_VPORT_WIDTH 1
205278c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_CSUM_FRAME_OFST 0
205288c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_CSUM_FRAME_LBN 8
205298c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_CSUM_FRAME_WIDTH 1
205308c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_VLAN_STRIP_TCI_OFST 0
205318c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_VLAN_STRIP_TCI_LBN 9
205328c2ecf20Sopenharmony_ci#define        MC_CMD_GET_RX_PREFIX_ID_IN_VLAN_STRIP_TCI_WIDTH 1
205338c2ecf20Sopenharmony_ci
205348c2ecf20Sopenharmony_ci/* MC_CMD_GET_RX_PREFIX_ID_OUT msgresponse */
205358c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RX_PREFIX_ID_OUT_LENMIN 8
205368c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RX_PREFIX_ID_OUT_LENMAX 252
205378c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RX_PREFIX_ID_OUT_LENMAX_MCDI2 1020
205388c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RX_PREFIX_ID_OUT_LEN(num) (4+4*(num))
205398c2ecf20Sopenharmony_ci#define    MC_CMD_GET_RX_PREFIX_ID_OUT_RX_PREFIX_ID_NUM(len) (((len)-4)/4)
205408c2ecf20Sopenharmony_ci/* Number of prefix-ids returned */
205418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_NUM_RX_PREFIX_IDS_OFST 0
205428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_NUM_RX_PREFIX_IDS_LEN 4
205438c2ecf20Sopenharmony_ci/* Opaque prefix identifiers which can be passed into MC_CMD_INIT_RXQ_V5 or
205448c2ecf20Sopenharmony_ci * MC_CMD_QUERY_PREFIX_ID
205458c2ecf20Sopenharmony_ci */
205468c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_RX_PREFIX_ID_OFST 4
205478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_RX_PREFIX_ID_LEN 4
205488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_RX_PREFIX_ID_MINNUM 1
205498c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_RX_PREFIX_ID_MAXNUM 62
205508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_RX_PREFIX_ID_OUT_RX_PREFIX_ID_MAXNUM_MCDI2 254
205518c2ecf20Sopenharmony_ci
205528c2ecf20Sopenharmony_ci/* RX_PREFIX_FIELD_INFO structuredef: Information about a single RX prefix
205538c2ecf20Sopenharmony_ci * field
205548c2ecf20Sopenharmony_ci */
205558c2ecf20Sopenharmony_ci#define    RX_PREFIX_FIELD_INFO_LEN 4
205568c2ecf20Sopenharmony_ci/* The offset of the field from the start of the prefix, in bits */
205578c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_OFFSET_BITS_OFST 0
205588c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_OFFSET_BITS_LEN 2
205598c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_OFFSET_BITS_LBN 0
205608c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_OFFSET_BITS_WIDTH 16
205618c2ecf20Sopenharmony_ci/* The width of the field, in bits */
205628c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_WIDTH_BITS_OFST 2
205638c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_WIDTH_BITS_LEN 1
205648c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_WIDTH_BITS_LBN 16
205658c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_WIDTH_BITS_WIDTH 8
205668c2ecf20Sopenharmony_ci/* The type of the field. These enum values are in the same order as the fields
205678c2ecf20Sopenharmony_ci * in the MC_CMD_GET_RX_PREFIX_ID_IN bitmask
205688c2ecf20Sopenharmony_ci */
205698c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_TYPE_OFST 3
205708c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_TYPE_LEN 1
205718c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_LENGTH 0x0 /* enum */
205728c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_RSS_HASH_VALID 0x1 /* enum */
205738c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_USER_FLAG 0x2 /* enum */
205748c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_CLASS 0x3 /* enum */
205758c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_PARTIAL_TSTAMP 0x4 /* enum */
205768c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_RSS_HASH 0x5 /* enum */
205778c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_USER_MARK 0x6 /* enum */
205788c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_INGRESS_VPORT 0x7 /* enum */
205798c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_CSUM_FRAME 0x8 /* enum */
205808c2ecf20Sopenharmony_ci#define          RX_PREFIX_FIELD_INFO_VLAN_STRIP_TCI 0x9 /* enum */
205818c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_TYPE_LBN 24
205828c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIELD_INFO_TYPE_WIDTH 8
205838c2ecf20Sopenharmony_ci
205848c2ecf20Sopenharmony_ci/* RX_PREFIX_FIXED_RESPONSE structuredef: Information about an RX prefix in
205858c2ecf20Sopenharmony_ci * which every field has a fixed offset and width
205868c2ecf20Sopenharmony_ci */
205878c2ecf20Sopenharmony_ci#define    RX_PREFIX_FIXED_RESPONSE_LENMIN 4
205888c2ecf20Sopenharmony_ci#define    RX_PREFIX_FIXED_RESPONSE_LENMAX 252
205898c2ecf20Sopenharmony_ci#define    RX_PREFIX_FIXED_RESPONSE_LENMAX_MCDI2 1020
205908c2ecf20Sopenharmony_ci#define    RX_PREFIX_FIXED_RESPONSE_LEN(num) (4+4*(num))
205918c2ecf20Sopenharmony_ci#define    RX_PREFIX_FIXED_RESPONSE_FIELDS_NUM(len) (((len)-4)/4)
205928c2ecf20Sopenharmony_ci/* Length of the RX prefix in bytes */
205938c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_PREFIX_LENGTH_BYTES_OFST 0
205948c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_PREFIX_LENGTH_BYTES_LEN 1
205958c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_PREFIX_LENGTH_BYTES_LBN 0
205968c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_PREFIX_LENGTH_BYTES_WIDTH 8
205978c2ecf20Sopenharmony_ci/* Number of fields present in the prefix */
205988c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELD_COUNT_OFST 1
205998c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELD_COUNT_LEN 1
206008c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELD_COUNT_LBN 8
206018c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELD_COUNT_WIDTH 8
206028c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_RESERVED_OFST 2
206038c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_RESERVED_LEN 2
206048c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_RESERVED_LBN 16
206058c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_RESERVED_WIDTH 16
206068c2ecf20Sopenharmony_ci/* Array of RX_PREFIX_FIELD_INFO structures, of length FIELD_COUNT */
206078c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_OFST 4
206088c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_LEN 4
206098c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_MINNUM 0
206108c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_MAXNUM 62
206118c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_MAXNUM_MCDI2 254
206128c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_LBN 32
206138c2ecf20Sopenharmony_ci#define       RX_PREFIX_FIXED_RESPONSE_FIELDS_WIDTH 32
206148c2ecf20Sopenharmony_ci
206158c2ecf20Sopenharmony_ci
206168c2ecf20Sopenharmony_ci/***********************************/
206178c2ecf20Sopenharmony_ci/* MC_CMD_QUERY_RX_PREFIX_ID
206188c2ecf20Sopenharmony_ci * This command takes an RX prefix id (obtained from MC_CMD_GET_RX_PREFIX_ID)
206198c2ecf20Sopenharmony_ci * and returns a description of the RX prefix of packets delievered to an RXQ
206208c2ecf20Sopenharmony_ci * created with that prefix id
206218c2ecf20Sopenharmony_ci */
206228c2ecf20Sopenharmony_ci#define MC_CMD_QUERY_RX_PREFIX_ID 0x13c
206238c2ecf20Sopenharmony_ci#undef MC_CMD_0x13c_PRIVILEGE_CTG
206248c2ecf20Sopenharmony_ci
206258c2ecf20Sopenharmony_ci#define MC_CMD_0x13c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
206268c2ecf20Sopenharmony_ci
206278c2ecf20Sopenharmony_ci/* MC_CMD_QUERY_RX_PREFIX_ID_IN msgrequest */
206288c2ecf20Sopenharmony_ci#define    MC_CMD_QUERY_RX_PREFIX_ID_IN_LEN 4
206298c2ecf20Sopenharmony_ci/* Prefix id to query */
206308c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_IN_RX_PREFIX_ID_OFST 0
206318c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_IN_RX_PREFIX_ID_LEN 4
206328c2ecf20Sopenharmony_ci
206338c2ecf20Sopenharmony_ci/* MC_CMD_QUERY_RX_PREFIX_ID_OUT msgresponse */
206348c2ecf20Sopenharmony_ci#define    MC_CMD_QUERY_RX_PREFIX_ID_OUT_LENMIN 4
206358c2ecf20Sopenharmony_ci#define    MC_CMD_QUERY_RX_PREFIX_ID_OUT_LENMAX 252
206368c2ecf20Sopenharmony_ci#define    MC_CMD_QUERY_RX_PREFIX_ID_OUT_LENMAX_MCDI2 1020
206378c2ecf20Sopenharmony_ci#define    MC_CMD_QUERY_RX_PREFIX_ID_OUT_LEN(num) (4+1*(num))
206388c2ecf20Sopenharmony_ci#define    MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_NUM(len) (((len)-4)/1)
206398c2ecf20Sopenharmony_ci/* An enum describing the structure of this response. */
206408c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_TYPE_OFST 0
206418c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_TYPE_LEN 1
206428c2ecf20Sopenharmony_ci/* enum: The response is of format RX_PREFIX_FIXED_RESPONSE */
206438c2ecf20Sopenharmony_ci#define          MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_TYPE_FIXED 0x0
206448c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESERVED_OFST 1
206458c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESERVED_LEN 3
206468c2ecf20Sopenharmony_ci/* The response. Its format is as defined by the RESPONSE_TYPE value */
206478c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_OFST 4
206488c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_LEN 1
206498c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_MINNUM 0
206508c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_MAXNUM 248
206518c2ecf20Sopenharmony_ci#define       MC_CMD_QUERY_RX_PREFIX_ID_OUT_RESPONSE_MAXNUM_MCDI2 1016
206528c2ecf20Sopenharmony_ci
206538c2ecf20Sopenharmony_ci
206548c2ecf20Sopenharmony_ci/***********************************/
206558c2ecf20Sopenharmony_ci/* MC_CMD_BUNDLE
206568c2ecf20Sopenharmony_ci * A command to perform various bundle-related operations on insecure cards.
206578c2ecf20Sopenharmony_ci */
206588c2ecf20Sopenharmony_ci#define MC_CMD_BUNDLE 0x13d
206598c2ecf20Sopenharmony_ci#undef MC_CMD_0x13d_PRIVILEGE_CTG
206608c2ecf20Sopenharmony_ci
206618c2ecf20Sopenharmony_ci#define MC_CMD_0x13d_PRIVILEGE_CTG SRIOV_CTG_INSECURE
206628c2ecf20Sopenharmony_ci
206638c2ecf20Sopenharmony_ci/* MC_CMD_BUNDLE_IN msgrequest */
206648c2ecf20Sopenharmony_ci#define    MC_CMD_BUNDLE_IN_LEN 4
206658c2ecf20Sopenharmony_ci/* Sub-command code */
206668c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_IN_OP_OFST 0
206678c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_IN_OP_LEN 4
206688c2ecf20Sopenharmony_ci/* enum: Get the current host access mode set on component partitions. */
206698c2ecf20Sopenharmony_ci#define          MC_CMD_BUNDLE_IN_OP_COMPONENT_ACCESS_GET 0x0
206708c2ecf20Sopenharmony_ci/* enum: Set the host access mode set on component partitions. */
206718c2ecf20Sopenharmony_ci#define          MC_CMD_BUNDLE_IN_OP_COMPONENT_ACCESS_SET 0x1
206728c2ecf20Sopenharmony_ci
206738c2ecf20Sopenharmony_ci/* MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_IN msgrequest: Retrieve the current
206748c2ecf20Sopenharmony_ci * access mode on component partitions such as MC_FIRMWARE, SUC_FIRMWARE and
206758c2ecf20Sopenharmony_ci * EXPANSION_UEFI. This command only works on engineering (insecure) cards. On
206768c2ecf20Sopenharmony_ci * secure adapters, this command returns MC_CMD_ERR_EPERM.
206778c2ecf20Sopenharmony_ci */
206788c2ecf20Sopenharmony_ci#define    MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_IN_LEN 4
206798c2ecf20Sopenharmony_ci/* Sub-command code. Must be OP_COMPONENT_ACCESS_GET. */
206808c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_IN_OP_OFST 0
206818c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_IN_OP_LEN 4
206828c2ecf20Sopenharmony_ci
206838c2ecf20Sopenharmony_ci/* MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_OUT msgresponse: Returns the access
206848c2ecf20Sopenharmony_ci * control mode.
206858c2ecf20Sopenharmony_ci */
206868c2ecf20Sopenharmony_ci#define    MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_OUT_LEN 4
206878c2ecf20Sopenharmony_ci/* Access mode of component partitions. */
206888c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_OUT_ACCESS_MODE_OFST 0
206898c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_OUT_ACCESS_MODE_LEN 4
206908c2ecf20Sopenharmony_ci/* enum: Component partitions are read-only from the host. */
206918c2ecf20Sopenharmony_ci#define          MC_CMD_BUNDLE_COMPONENTS_READ_ONLY 0x0
206928c2ecf20Sopenharmony_ci/* enum: Component partitions can read read-from written-to by the host. */
206938c2ecf20Sopenharmony_ci#define          MC_CMD_BUNDLE_COMPONENTS_READ_WRITE 0x1
206948c2ecf20Sopenharmony_ci
206958c2ecf20Sopenharmony_ci/* MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_IN msgrequest: The component
206968c2ecf20Sopenharmony_ci * partitions such as MC_FIRMWARE, SUC_FIRMWARE, EXPANSION_UEFI are set as
206978c2ecf20Sopenharmony_ci * read-only on firmware built with bundle support. This command marks these
206988c2ecf20Sopenharmony_ci * partitions as read/writeable. The access status set by this command does not
206998c2ecf20Sopenharmony_ci * persist across MC reboots. This command only works on engineering (insecure)
207008c2ecf20Sopenharmony_ci * cards. On secure adapters, this command returns MC_CMD_ERR_EPERM.
207018c2ecf20Sopenharmony_ci */
207028c2ecf20Sopenharmony_ci#define    MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_IN_LEN 8
207038c2ecf20Sopenharmony_ci/* Sub-command code. Must be OP_COMPONENT_ACCESS_SET. */
207048c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_IN_OP_OFST 0
207058c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_IN_OP_LEN 4
207068c2ecf20Sopenharmony_ci/* Access mode of component partitions. */
207078c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_IN_ACCESS_MODE_OFST 4
207088c2ecf20Sopenharmony_ci#define       MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_IN_ACCESS_MODE_LEN 4
207098c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
207108c2ecf20Sopenharmony_ci/*               MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_GET_OUT/ACCESS_MODE */
207118c2ecf20Sopenharmony_ci
207128c2ecf20Sopenharmony_ci/* MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_OUT msgresponse */
207138c2ecf20Sopenharmony_ci#define    MC_CMD_BUNDLE_OP_COMPONENT_ACCESS_SET_OUT_LEN 0
207148c2ecf20Sopenharmony_ci
207158c2ecf20Sopenharmony_ci
207168c2ecf20Sopenharmony_ci/***********************************/
207178c2ecf20Sopenharmony_ci/* MC_CMD_GET_VPD
207188c2ecf20Sopenharmony_ci * Read all VPD starting from a given address
207198c2ecf20Sopenharmony_ci */
207208c2ecf20Sopenharmony_ci#define MC_CMD_GET_VPD 0x165
207218c2ecf20Sopenharmony_ci#undef MC_CMD_0x165_PRIVILEGE_CTG
207228c2ecf20Sopenharmony_ci
207238c2ecf20Sopenharmony_ci#define MC_CMD_0x165_PRIVILEGE_CTG SRIOV_CTG_GENERAL
207248c2ecf20Sopenharmony_ci
207258c2ecf20Sopenharmony_ci/* MC_CMD_GET_VPD_IN msgresponse */
207268c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VPD_IN_LEN 4
207278c2ecf20Sopenharmony_ci/* VPD address to start from. In case VPD is longer than MCDI buffer
207288c2ecf20Sopenharmony_ci * (unlikely), user can make multiple calls with different starting addresses.
207298c2ecf20Sopenharmony_ci */
207308c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_IN_ADDR_OFST 0
207318c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_IN_ADDR_LEN 4
207328c2ecf20Sopenharmony_ci
207338c2ecf20Sopenharmony_ci/* MC_CMD_GET_VPD_OUT msgresponse */
207348c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VPD_OUT_LENMIN 0
207358c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VPD_OUT_LENMAX 252
207368c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VPD_OUT_LENMAX_MCDI2 1020
207378c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VPD_OUT_LEN(num) (0+1*(num))
207388c2ecf20Sopenharmony_ci#define    MC_CMD_GET_VPD_OUT_DATA_NUM(len) (((len)-0)/1)
207398c2ecf20Sopenharmony_ci/* VPD data returned. */
207408c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_OUT_DATA_OFST 0
207418c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_OUT_DATA_LEN 1
207428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_OUT_DATA_MINNUM 0
207438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_OUT_DATA_MAXNUM 252
207448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_VPD_OUT_DATA_MAXNUM_MCDI2 1020
207458c2ecf20Sopenharmony_ci
207468c2ecf20Sopenharmony_ci
207478c2ecf20Sopenharmony_ci/***********************************/
207488c2ecf20Sopenharmony_ci/* MC_CMD_GET_NCSI_INFO
207498c2ecf20Sopenharmony_ci * Provide information about the NC-SI stack
207508c2ecf20Sopenharmony_ci */
207518c2ecf20Sopenharmony_ci#define MC_CMD_GET_NCSI_INFO 0x167
207528c2ecf20Sopenharmony_ci#undef MC_CMD_0x167_PRIVILEGE_CTG
207538c2ecf20Sopenharmony_ci
207548c2ecf20Sopenharmony_ci#define MC_CMD_0x167_PRIVILEGE_CTG SRIOV_CTG_GENERAL
207558c2ecf20Sopenharmony_ci
207568c2ecf20Sopenharmony_ci/* MC_CMD_GET_NCSI_INFO_IN msgrequest */
207578c2ecf20Sopenharmony_ci#define    MC_CMD_GET_NCSI_INFO_IN_LEN 8
207588c2ecf20Sopenharmony_ci/* Operation to be performed */
207598c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_IN_OP_OFST 0
207608c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_IN_OP_LEN 4
207618c2ecf20Sopenharmony_ci/* enum: Information on the link settings. */
207628c2ecf20Sopenharmony_ci#define          MC_CMD_GET_NCSI_INFO_IN_OP_LINK 0x0
207638c2ecf20Sopenharmony_ci/* enum: Statistics associated with the channel */
207648c2ecf20Sopenharmony_ci#define          MC_CMD_GET_NCSI_INFO_IN_OP_STATISTICS 0x1
207658c2ecf20Sopenharmony_ci/* The NC-SI channel on which the operation is to be performed */
207668c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_IN_CHANNEL_OFST 4
207678c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_IN_CHANNEL_LEN 4
207688c2ecf20Sopenharmony_ci
207698c2ecf20Sopenharmony_ci/* MC_CMD_GET_NCSI_INFO_LINK_OUT msgresponse */
207708c2ecf20Sopenharmony_ci#define    MC_CMD_GET_NCSI_INFO_LINK_OUT_LEN 12
207718c2ecf20Sopenharmony_ci/* Settings as received from BMC. */
207728c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_LINK_OUT_SETTINGS_OFST 0
207738c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_LINK_OUT_SETTINGS_LEN 4
207748c2ecf20Sopenharmony_ci/* Advertised capabilities applied to channel. */
207758c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_LINK_OUT_ADV_CAP_OFST 4
207768c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_LINK_OUT_ADV_CAP_LEN 4
207778c2ecf20Sopenharmony_ci/* General status */
207788c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_LINK_OUT_STATUS_OFST 8
207798c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_LINK_OUT_STATUS_LEN 4
207808c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_STATE_OFST 8
207818c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_STATE_LBN 0
207828c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_STATE_WIDTH 2
207838c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_ENABLE_OFST 8
207848c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_ENABLE_LBN 2
207858c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_ENABLE_WIDTH 1
207868c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_NETWORK_TX_OFST 8
207878c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_NETWORK_TX_LBN 3
207888c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_NETWORK_TX_WIDTH 1
207898c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_ATTACHED_OFST 8
207908c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_ATTACHED_LBN 4
207918c2ecf20Sopenharmony_ci#define        MC_CMD_GET_NCSI_INFO_LINK_OUT_ATTACHED_WIDTH 1
207928c2ecf20Sopenharmony_ci
207938c2ecf20Sopenharmony_ci/* MC_CMD_GET_NCSI_INFO_STATISTICS_OUT msgresponse */
207948c2ecf20Sopenharmony_ci#define    MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_LEN 28
207958c2ecf20Sopenharmony_ci/* The number of NC-SI commands received. */
207968c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_CMDS_RX_OFST 0
207978c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_CMDS_RX_LEN 4
207988c2ecf20Sopenharmony_ci/* The number of NC-SI commands dropped. */
207998c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_PKTS_DROPPED_OFST 4
208008c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_PKTS_DROPPED_LEN 4
208018c2ecf20Sopenharmony_ci/* The number of invalid NC-SI commands received. */
208028c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_CMD_TYPE_ERRS_OFST 8
208038c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_CMD_TYPE_ERRS_LEN 4
208048c2ecf20Sopenharmony_ci/* The number of checksum errors seen. */
208058c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_CMD_CSUM_ERRS_OFST 12
208068c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_CMD_CSUM_ERRS_LEN 4
208078c2ecf20Sopenharmony_ci/* The number of NC-SI requests received. */
208088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_RX_PKTS_OFST 16
208098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_RX_PKTS_LEN 4
208108c2ecf20Sopenharmony_ci/* The number of NC-SI responses sent (includes AENs) */
208118c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_TX_PKTS_OFST 20
208128c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_NCSI_TX_PKTS_LEN 4
208138c2ecf20Sopenharmony_ci/* The number of NC-SI AENs sent */
208148c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_AENS_SENT_OFST 24
208158c2ecf20Sopenharmony_ci#define       MC_CMD_GET_NCSI_INFO_STATISTICS_OUT_AENS_SENT_LEN 4
208168c2ecf20Sopenharmony_ci
208178c2ecf20Sopenharmony_ci
208188c2ecf20Sopenharmony_ci/* CLOCK_INFO structuredef: Information about a single hardware clock */
208198c2ecf20Sopenharmony_ci#define    CLOCK_INFO_LEN 28
208208c2ecf20Sopenharmony_ci/* Enumeration that uniquely identifies the clock */
208218c2ecf20Sopenharmony_ci#define       CLOCK_INFO_CLOCK_ID_OFST 0
208228c2ecf20Sopenharmony_ci#define       CLOCK_INFO_CLOCK_ID_LEN 2
208238c2ecf20Sopenharmony_ci/* enum: The Riverhead CMC (card MC) */
208248c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_CMC 0x0
208258c2ecf20Sopenharmony_ci/* enum: The Riverhead NMC (network MC) */
208268c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_NMC 0x1
208278c2ecf20Sopenharmony_ci/* enum: The Riverhead SDNET slice main logic */
208288c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_SDNET 0x2
208298c2ecf20Sopenharmony_ci/* enum: The Riverhead SDNET LUT */
208308c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_SDNET_LUT 0x3
208318c2ecf20Sopenharmony_ci/* enum: The Riverhead SDNET control logic */
208328c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_SDNET_CTRL 0x4
208338c2ecf20Sopenharmony_ci/* enum: The Riverhead Streaming SubSystem */
208348c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_SSS 0x5
208358c2ecf20Sopenharmony_ci/* enum: The Riverhead network MAC and associated CSR registers */
208368c2ecf20Sopenharmony_ci#define          CLOCK_INFO_CLOCK_MAC 0x6
208378c2ecf20Sopenharmony_ci#define       CLOCK_INFO_CLOCK_ID_LBN 0
208388c2ecf20Sopenharmony_ci#define       CLOCK_INFO_CLOCK_ID_WIDTH 16
208398c2ecf20Sopenharmony_ci/* Assorted flags */
208408c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FLAGS_OFST 2
208418c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FLAGS_LEN 2
208428c2ecf20Sopenharmony_ci#define        CLOCK_INFO_SETTABLE_OFST 2
208438c2ecf20Sopenharmony_ci#define        CLOCK_INFO_SETTABLE_LBN 0
208448c2ecf20Sopenharmony_ci#define        CLOCK_INFO_SETTABLE_WIDTH 1
208458c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FLAGS_LBN 16
208468c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FLAGS_WIDTH 16
208478c2ecf20Sopenharmony_ci/* The frequency in HZ */
208488c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FREQUENCY_OFST 4
208498c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FREQUENCY_LEN 8
208508c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FREQUENCY_LO_OFST 4
208518c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FREQUENCY_HI_OFST 8
208528c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FREQUENCY_LBN 32
208538c2ecf20Sopenharmony_ci#define       CLOCK_INFO_FREQUENCY_WIDTH 64
208548c2ecf20Sopenharmony_ci/* Human-readable ASCII name for clock, with NUL termination */
208558c2ecf20Sopenharmony_ci#define       CLOCK_INFO_NAME_OFST 12
208568c2ecf20Sopenharmony_ci#define       CLOCK_INFO_NAME_LEN 1
208578c2ecf20Sopenharmony_ci#define       CLOCK_INFO_NAME_NUM 16
208588c2ecf20Sopenharmony_ci#define       CLOCK_INFO_NAME_LBN 96
208598c2ecf20Sopenharmony_ci#define       CLOCK_INFO_NAME_WIDTH 8
208608c2ecf20Sopenharmony_ci
208618c2ecf20Sopenharmony_ci
208628c2ecf20Sopenharmony_ci/***********************************/
208638c2ecf20Sopenharmony_ci/* MC_CMD_GET_CLOCKS_INFO
208648c2ecf20Sopenharmony_ci * Get information about the device clocks
208658c2ecf20Sopenharmony_ci */
208668c2ecf20Sopenharmony_ci#define MC_CMD_GET_CLOCKS_INFO 0x166
208678c2ecf20Sopenharmony_ci#undef MC_CMD_0x166_PRIVILEGE_CTG
208688c2ecf20Sopenharmony_ci
208698c2ecf20Sopenharmony_ci#define MC_CMD_0x166_PRIVILEGE_CTG SRIOV_CTG_GENERAL
208708c2ecf20Sopenharmony_ci
208718c2ecf20Sopenharmony_ci/* MC_CMD_GET_CLOCKS_INFO_IN msgrequest */
208728c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCKS_INFO_IN_LEN 0
208738c2ecf20Sopenharmony_ci
208748c2ecf20Sopenharmony_ci/* MC_CMD_GET_CLOCKS_INFO_OUT msgresponse */
208758c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCKS_INFO_OUT_LENMIN 0
208768c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCKS_INFO_OUT_LENMAX 252
208778c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCKS_INFO_OUT_LENMAX_MCDI2 1008
208788c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCKS_INFO_OUT_LEN(num) (0+28*(num))
208798c2ecf20Sopenharmony_ci#define    MC_CMD_GET_CLOCKS_INFO_OUT_INFOS_NUM(len) (((len)-0)/28)
208808c2ecf20Sopenharmony_ci/* An array of CLOCK_INFO structures. */
208818c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCKS_INFO_OUT_INFOS_OFST 0
208828c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCKS_INFO_OUT_INFOS_LEN 28
208838c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCKS_INFO_OUT_INFOS_MINNUM 0
208848c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCKS_INFO_OUT_INFOS_MAXNUM 9
208858c2ecf20Sopenharmony_ci#define       MC_CMD_GET_CLOCKS_INFO_OUT_INFOS_MAXNUM_MCDI2 36
208868c2ecf20Sopenharmony_ci
208878c2ecf20Sopenharmony_ci
208888c2ecf20Sopenharmony_ci/***********************************/
208898c2ecf20Sopenharmony_ci/* MC_CMD_VNIC_ENCAP_RULE_ADD
208908c2ecf20Sopenharmony_ci * Add a rule for detecting encapsulations in the VNIC stage. Currently this only affects checksum validation in VNIC RX - on TX the send descriptor explicitly specifies encapsulation. These rules are per-VNIC, i.e. only apply to the current driver. If a rule matches, then the packet is considered to have the corresponding encapsulation type, and the inner packet is parsed. It is up to the driver to ensure that overlapping rules are not inserted. (If a packet would match multiple rules, a random one of them will be used.) A rule with the exact same match criteria may not be inserted twice (EALREADY). Only a limited number MATCH_FLAGS values are supported, use MC_CMD_GET_PARSER_DISP_INFO with OP OP_GET_SUPPORTED_VNIC_ENCAP_RULE_MATCHES to get a list of supported combinations. Each driver may only have a limited set of active rules - returns ENOSPC if the caller's table is full.
208918c2ecf20Sopenharmony_ci */
208928c2ecf20Sopenharmony_ci#define MC_CMD_VNIC_ENCAP_RULE_ADD 0x16d
208938c2ecf20Sopenharmony_ci#undef MC_CMD_0x16d_PRIVILEGE_CTG
208948c2ecf20Sopenharmony_ci
208958c2ecf20Sopenharmony_ci#define MC_CMD_0x16d_PRIVILEGE_CTG SRIOV_CTG_GENERAL
208968c2ecf20Sopenharmony_ci
208978c2ecf20Sopenharmony_ci/* MC_CMD_VNIC_ENCAP_RULE_ADD_IN msgrequest */
208988c2ecf20Sopenharmony_ci#define    MC_CMD_VNIC_ENCAP_RULE_ADD_IN_LEN 36
208998c2ecf20Sopenharmony_ci/* Set to MAE_MPORT_SELECTOR_ASSIGNED. In the future this may be relaxed. */
209008c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MPORT_SELECTOR_OFST 0
209018c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MPORT_SELECTOR_LEN 4
209028c2ecf20Sopenharmony_ci/* Any non-zero bits other than the ones named below or an unsupported
209038c2ecf20Sopenharmony_ci * combination will cause the NIC to return EOPNOTSUPP. In the future more
209048c2ecf20Sopenharmony_ci * flags may be added.
209058c2ecf20Sopenharmony_ci */
209068c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_FLAGS_OFST 4
209078c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_FLAGS_LEN 4
209088c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_ETHER_TYPE_OFST 4
209098c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_ETHER_TYPE_LBN 0
209108c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_ETHER_TYPE_WIDTH 1
209118c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_OUTER_VLAN_OFST 4
209128c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_OUTER_VLAN_LBN 1
209138c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_OUTER_VLAN_WIDTH 1
209148c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_DST_IP_OFST 4
209158c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_DST_IP_LBN 2
209168c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_DST_IP_WIDTH 1
209178c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_IP_PROTO_OFST 4
209188c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_IP_PROTO_LBN 3
209198c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_IP_PROTO_WIDTH 1
209208c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_DST_PORT_OFST 4
209218c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_DST_PORT_LBN 4
209228c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_MATCH_DST_PORT_WIDTH 1
209238c2ecf20Sopenharmony_ci/* Only if MATCH_ETHER_TYPE is set. Ethertype value as bytes in network order.
209248c2ecf20Sopenharmony_ci * Currently only IPv4 (0x0800) and IPv6 (0x86DD) ethertypes may be used.
209258c2ecf20Sopenharmony_ci */
209268c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_ETHER_TYPE_OFST 8
209278c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_ETHER_TYPE_LEN 2
209288c2ecf20Sopenharmony_ci/* Only if MATCH_OUTER_VLAN is set. VID value as bytes in network order.
209298c2ecf20Sopenharmony_ci * (Deprecated)
209308c2ecf20Sopenharmony_ci */
209318c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_LBN 80
209328c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_WIDTH 12
209338c2ecf20Sopenharmony_ci/* Only if MATCH_OUTER_VLAN is set. Aligned wrapper for OUTER_VLAN_VID. */
209348c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_WORD_OFST 10
209358c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_WORD_LEN 2
209368c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_VID_OFST 10
209378c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_VID_LBN 0
209388c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_OUTER_VLAN_VID_WIDTH 12
209398c2ecf20Sopenharmony_ci/* Only if MATCH_DST_IP is set. IP address as bytes in network order. In the
209408c2ecf20Sopenharmony_ci * case of IPv4, the IP should be in the first 4 bytes and all other bytes
209418c2ecf20Sopenharmony_ci * should be zero.
209428c2ecf20Sopenharmony_ci */
209438c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_DST_IP_OFST 12
209448c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_DST_IP_LEN 16
209458c2ecf20Sopenharmony_ci/* Only if MATCH_IP_PROTO is set. Currently only UDP proto (17) may be used. */
209468c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_IP_PROTO_OFST 28
209478c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_IP_PROTO_LEN 1
209488c2ecf20Sopenharmony_ci/* Actions that should be applied to packets match the rule. */
209498c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_ACTION_FLAGS_OFST 29
209508c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_ACTION_FLAGS_LEN 1
209518c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_STRIP_OUTER_VLAN_OFST 29
209528c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_STRIP_OUTER_VLAN_LBN 0
209538c2ecf20Sopenharmony_ci#define        MC_CMD_VNIC_ENCAP_RULE_ADD_IN_STRIP_OUTER_VLAN_WIDTH 1
209548c2ecf20Sopenharmony_ci/* Only if MATCH_DST_PORT is set. Port number as bytes in network order. */
209558c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_DST_PORT_OFST 30
209568c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_DST_PORT_LEN 2
209578c2ecf20Sopenharmony_ci/* Resulting encapsulation type, as per MAE_MCDI_ENCAP_TYPE enumeration. */
209588c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_ENCAP_TYPE_OFST 32
209598c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_IN_ENCAP_TYPE_LEN 4
209608c2ecf20Sopenharmony_ci
209618c2ecf20Sopenharmony_ci/* MC_CMD_VNIC_ENCAP_RULE_ADD_OUT msgresponse */
209628c2ecf20Sopenharmony_ci#define    MC_CMD_VNIC_ENCAP_RULE_ADD_OUT_LEN 4
209638c2ecf20Sopenharmony_ci/* Handle to inserted rule. Used for removing the rule. */
209648c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_OUT_HANDLE_OFST 0
209658c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_ADD_OUT_HANDLE_LEN 4
209668c2ecf20Sopenharmony_ci
209678c2ecf20Sopenharmony_ci
209688c2ecf20Sopenharmony_ci/***********************************/
209698c2ecf20Sopenharmony_ci/* MC_CMD_VNIC_ENCAP_RULE_REMOVE
209708c2ecf20Sopenharmony_ci * Remove a VNIC encapsulation rule. Packets which would have previously matched the rule will then be considered as unencapsulated. Returns EALREADY if the input HANDLE doesn't correspond to an existing rule.
209718c2ecf20Sopenharmony_ci */
209728c2ecf20Sopenharmony_ci#define MC_CMD_VNIC_ENCAP_RULE_REMOVE 0x16e
209738c2ecf20Sopenharmony_ci#undef MC_CMD_0x16e_PRIVILEGE_CTG
209748c2ecf20Sopenharmony_ci
209758c2ecf20Sopenharmony_ci#define MC_CMD_0x16e_PRIVILEGE_CTG SRIOV_CTG_GENERAL
209768c2ecf20Sopenharmony_ci
209778c2ecf20Sopenharmony_ci/* MC_CMD_VNIC_ENCAP_RULE_REMOVE_IN msgrequest */
209788c2ecf20Sopenharmony_ci#define    MC_CMD_VNIC_ENCAP_RULE_REMOVE_IN_LEN 4
209798c2ecf20Sopenharmony_ci/* Handle which was returned by MC_CMD_VNIC_ENCAP_RULE_ADD. */
209808c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_REMOVE_IN_HANDLE_OFST 0
209818c2ecf20Sopenharmony_ci#define       MC_CMD_VNIC_ENCAP_RULE_REMOVE_IN_HANDLE_LEN 4
209828c2ecf20Sopenharmony_ci
209838c2ecf20Sopenharmony_ci/* MC_CMD_VNIC_ENCAP_RULE_REMOVE_OUT msgresponse */
209848c2ecf20Sopenharmony_ci#define    MC_CMD_VNIC_ENCAP_RULE_REMOVE_OUT_LEN 0
209858c2ecf20Sopenharmony_ci
209868c2ecf20Sopenharmony_ci/* FUNCTION_PERSONALITY structuredef: The meanings of the personalities are
209878c2ecf20Sopenharmony_ci * defined in SF-120734-TC with more information in SF-122717-TC.
209888c2ecf20Sopenharmony_ci */
209898c2ecf20Sopenharmony_ci#define    FUNCTION_PERSONALITY_LEN 4
209908c2ecf20Sopenharmony_ci#define       FUNCTION_PERSONALITY_ID_OFST 0
209918c2ecf20Sopenharmony_ci#define       FUNCTION_PERSONALITY_ID_LEN 4
209928c2ecf20Sopenharmony_ci/* enum: Function has no assigned personality */
209938c2ecf20Sopenharmony_ci#define          FUNCTION_PERSONALITY_NULL 0x0
209948c2ecf20Sopenharmony_ci/* enum: Function has an EF100-style function control window and VI windows
209958c2ecf20Sopenharmony_ci * with both EF100 and vDPA doorbells.
209968c2ecf20Sopenharmony_ci */
209978c2ecf20Sopenharmony_ci#define          FUNCTION_PERSONALITY_EF100 0x1
209988c2ecf20Sopenharmony_ci/* enum: Function has virtio net device configuration registers and doorbells
209998c2ecf20Sopenharmony_ci * for virtio queue pairs.
210008c2ecf20Sopenharmony_ci */
210018c2ecf20Sopenharmony_ci#define          FUNCTION_PERSONALITY_VIRTIO_NET 0x2
210028c2ecf20Sopenharmony_ci/* enum: Function has virtio block device configuration registers and a
210038c2ecf20Sopenharmony_ci * doorbell for a single virtqueue.
210048c2ecf20Sopenharmony_ci */
210058c2ecf20Sopenharmony_ci#define          FUNCTION_PERSONALITY_VIRTIO_BLK 0x3
210068c2ecf20Sopenharmony_ci/* enum: Function is a Xilinx acceleration device - management function */
210078c2ecf20Sopenharmony_ci#define          FUNCTION_PERSONALITY_ACCEL_MGMT 0x4
210088c2ecf20Sopenharmony_ci/* enum: Function is a Xilinx acceleration device - user function */
210098c2ecf20Sopenharmony_ci#define          FUNCTION_PERSONALITY_ACCEL_USR 0x5
210108c2ecf20Sopenharmony_ci#define       FUNCTION_PERSONALITY_ID_LBN 0
210118c2ecf20Sopenharmony_ci#define       FUNCTION_PERSONALITY_ID_WIDTH 32
210128c2ecf20Sopenharmony_ci
210138c2ecf20Sopenharmony_ci
210148c2ecf20Sopenharmony_ci/***********************************/
210158c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_FEATURES
210168c2ecf20Sopenharmony_ci * Get a list of the virtio features supported by the device.
210178c2ecf20Sopenharmony_ci */
210188c2ecf20Sopenharmony_ci#define MC_CMD_VIRTIO_GET_FEATURES 0x168
210198c2ecf20Sopenharmony_ci#undef MC_CMD_0x168_PRIVILEGE_CTG
210208c2ecf20Sopenharmony_ci
210218c2ecf20Sopenharmony_ci#define MC_CMD_0x168_PRIVILEGE_CTG SRIOV_CTG_GENERAL
210228c2ecf20Sopenharmony_ci
210238c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_FEATURES_IN msgrequest */
210248c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_GET_FEATURES_IN_LEN 4
210258c2ecf20Sopenharmony_ci/* Type of device to get features for. Matches the device id as defined by the
210268c2ecf20Sopenharmony_ci * virtio spec.
210278c2ecf20Sopenharmony_ci */
210288c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_FEATURES_IN_DEVICE_ID_OFST 0
210298c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_FEATURES_IN_DEVICE_ID_LEN 4
210308c2ecf20Sopenharmony_ci/* enum: Reserved. Do not use. */
210318c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_GET_FEATURES_IN_RESERVED 0x0
210328c2ecf20Sopenharmony_ci/* enum: Net device. */
210338c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_GET_FEATURES_IN_NET 0x1
210348c2ecf20Sopenharmony_ci/* enum: Block device. */
210358c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_GET_FEATURES_IN_BLOCK 0x2
210368c2ecf20Sopenharmony_ci
210378c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_FEATURES_OUT msgresponse */
210388c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_GET_FEATURES_OUT_LEN 8
210398c2ecf20Sopenharmony_ci/* Features supported by the device. The result is a bitfield in the format of
210408c2ecf20Sopenharmony_ci * the feature bits of the specified device type as defined in the virtIO 1.1
210418c2ecf20Sopenharmony_ci * specification ( https://docs.oasis-
210428c2ecf20Sopenharmony_ci * open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.pdf )
210438c2ecf20Sopenharmony_ci */
210448c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_FEATURES_OUT_FEATURES_OFST 0
210458c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_FEATURES_OUT_FEATURES_LEN 8
210468c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_FEATURES_OUT_FEATURES_LO_OFST 0
210478c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_FEATURES_OUT_FEATURES_HI_OFST 4
210488c2ecf20Sopenharmony_ci
210498c2ecf20Sopenharmony_ci
210508c2ecf20Sopenharmony_ci/***********************************/
210518c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_TEST_FEATURES
210528c2ecf20Sopenharmony_ci * Query whether a given set of features is supported. Fails with ENOSUP if the
210538c2ecf20Sopenharmony_ci * driver requests a feature the device doesn't support. Fails with EINVAL if
210548c2ecf20Sopenharmony_ci * the driver fails to request a feature which the device requires.
210558c2ecf20Sopenharmony_ci */
210568c2ecf20Sopenharmony_ci#define MC_CMD_VIRTIO_TEST_FEATURES 0x169
210578c2ecf20Sopenharmony_ci#undef MC_CMD_0x169_PRIVILEGE_CTG
210588c2ecf20Sopenharmony_ci
210598c2ecf20Sopenharmony_ci#define MC_CMD_0x169_PRIVILEGE_CTG SRIOV_CTG_GENERAL
210608c2ecf20Sopenharmony_ci
210618c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_TEST_FEATURES_IN msgrequest */
210628c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_TEST_FEATURES_IN_LEN 16
210638c2ecf20Sopenharmony_ci/* Type of device to test features for. Matches the device id as defined by the
210648c2ecf20Sopenharmony_ci * virtio spec.
210658c2ecf20Sopenharmony_ci */
210668c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_DEVICE_ID_OFST 0
210678c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_DEVICE_ID_LEN 4
210688c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
210698c2ecf20Sopenharmony_ci/*               MC_CMD_VIRTIO_GET_FEATURES/MC_CMD_VIRTIO_GET_FEATURES_IN/DEVICE_ID */
210708c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_RESERVED_OFST 4
210718c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_RESERVED_LEN 4
210728c2ecf20Sopenharmony_ci/* Features requested. Same format as the returned value from
210738c2ecf20Sopenharmony_ci * MC_CMD_VIRTIO_GET_FEATURES.
210748c2ecf20Sopenharmony_ci */
210758c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_FEATURES_OFST 8
210768c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_FEATURES_LEN 8
210778c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_FEATURES_LO_OFST 8
210788c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_TEST_FEATURES_IN_FEATURES_HI_OFST 12
210798c2ecf20Sopenharmony_ci
210808c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_TEST_FEATURES_OUT msgresponse */
210818c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_TEST_FEATURES_OUT_LEN 0
210828c2ecf20Sopenharmony_ci
210838c2ecf20Sopenharmony_ci
210848c2ecf20Sopenharmony_ci/***********************************/
210858c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_INIT_QUEUE
210868c2ecf20Sopenharmony_ci * Create a virtio virtqueue. Fails with EALREADY if the queue already exists.
210878c2ecf20Sopenharmony_ci * Fails with ENOSUP if a feature is requested that isn't supported. Fails with
210888c2ecf20Sopenharmony_ci * EINVAL if a required feature isn't requested, or any other parameter is
210898c2ecf20Sopenharmony_ci * invalid.
210908c2ecf20Sopenharmony_ci */
210918c2ecf20Sopenharmony_ci#define MC_CMD_VIRTIO_INIT_QUEUE 0x16a
210928c2ecf20Sopenharmony_ci#undef MC_CMD_0x16a_PRIVILEGE_CTG
210938c2ecf20Sopenharmony_ci
210948c2ecf20Sopenharmony_ci#define MC_CMD_0x16a_PRIVILEGE_CTG SRIOV_CTG_GENERAL
210958c2ecf20Sopenharmony_ci
210968c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_INIT_QUEUE_REQ msgrequest */
210978c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_INIT_QUEUE_REQ_LEN 68
210988c2ecf20Sopenharmony_ci/* Type of virtqueue to create. A network rxq and a txq can exist at the same
210998c2ecf20Sopenharmony_ci * time on a single VI.
211008c2ecf20Sopenharmony_ci */
211018c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_QUEUE_TYPE_OFST 0
211028c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_QUEUE_TYPE_LEN 1
211038c2ecf20Sopenharmony_ci/* enum: A network device receive queue */
211048c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_INIT_QUEUE_REQ_NET_RXQ 0x0
211058c2ecf20Sopenharmony_ci/* enum: A network device transmit queue */
211068c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_INIT_QUEUE_REQ_NET_TXQ 0x1
211078c2ecf20Sopenharmony_ci/* enum: A block device request queue */
211088c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_INIT_QUEUE_REQ_BLOCK 0x2
211098c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_RESERVED_OFST 1
211108c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_RESERVED_LEN 1
211118c2ecf20Sopenharmony_ci/* If the calling function is a PF and this field is not VF_NULL, create the
211128c2ecf20Sopenharmony_ci * queue on the specified child VF instead of on the PF.
211138c2ecf20Sopenharmony_ci */
211148c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_TARGET_VF_OFST 2
211158c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_TARGET_VF_LEN 2
211168c2ecf20Sopenharmony_ci/* enum: No VF, create queue on the PF. */
211178c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_INIT_QUEUE_REQ_VF_NULL 0xffff
211188c2ecf20Sopenharmony_ci/* Desired instance. This is the function-local index of the associated VI, not
211198c2ecf20Sopenharmony_ci * the virtqueue number as counted by the virtqueue spec.
211208c2ecf20Sopenharmony_ci */
211218c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_INSTANCE_OFST 4
211228c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_INSTANCE_LEN 4
211238c2ecf20Sopenharmony_ci/* Queue size, in entries. Must be a power of two. */
211248c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_SIZE_OFST 8
211258c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_SIZE_LEN 4
211268c2ecf20Sopenharmony_ci/* Flags */
211278c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_FLAGS_OFST 12
211288c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_FLAGS_LEN 4
211298c2ecf20Sopenharmony_ci#define        MC_CMD_VIRTIO_INIT_QUEUE_REQ_USE_PASID_OFST 12
211308c2ecf20Sopenharmony_ci#define        MC_CMD_VIRTIO_INIT_QUEUE_REQ_USE_PASID_LBN 0
211318c2ecf20Sopenharmony_ci#define        MC_CMD_VIRTIO_INIT_QUEUE_REQ_USE_PASID_WIDTH 1
211328c2ecf20Sopenharmony_ci/* Address of the descriptor table in the virtqueue. */
211338c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_DESC_TBL_ADDR_OFST 16
211348c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_DESC_TBL_ADDR_LEN 8
211358c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_DESC_TBL_ADDR_LO_OFST 16
211368c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_DESC_TBL_ADDR_HI_OFST 20
211378c2ecf20Sopenharmony_ci/* Address of the available ring in the virtqueue. */
211388c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_AVAIL_RING_ADDR_OFST 24
211398c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_AVAIL_RING_ADDR_LEN 8
211408c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_AVAIL_RING_ADDR_LO_OFST 24
211418c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_AVAIL_RING_ADDR_HI_OFST 28
211428c2ecf20Sopenharmony_ci/* Address of the used ring in the virtqueue. */
211438c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_USED_RING_ADDR_OFST 32
211448c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_USED_RING_ADDR_LEN 8
211458c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_USED_RING_ADDR_LO_OFST 32
211468c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_USED_RING_ADDR_HI_OFST 36
211478c2ecf20Sopenharmony_ci/* PASID to use on PCIe transactions involving this queue. Ignored if the
211488c2ecf20Sopenharmony_ci * USE_PASID flag is not set.
211498c2ecf20Sopenharmony_ci */
211508c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_PASID_OFST 40
211518c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_PASID_LEN 4
211528c2ecf20Sopenharmony_ci/* Which MSIX vector to use for this virtqueue, or NO_VECTOR if MSIX should not
211538c2ecf20Sopenharmony_ci * be used.
211548c2ecf20Sopenharmony_ci */
211558c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_MSIX_VECTOR_OFST 44
211568c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_MSIX_VECTOR_LEN 2
211578c2ecf20Sopenharmony_ci/* enum: Do not enable interrupts for this virtqueue */
211588c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_INIT_QUEUE_REQ_NO_VECTOR 0xffff
211598c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_RESERVED2_OFST 46
211608c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_RESERVED2_LEN 2
211618c2ecf20Sopenharmony_ci/* Virtio features to apply to this queue. Same format as the in the virtio
211628c2ecf20Sopenharmony_ci * spec and in the return from MC_CMD_VIRTIO_GET_FEATURES. Must be a subset of
211638c2ecf20Sopenharmony_ci * the features returned from MC_CMD_VIRTIO_GET_FEATURES. Features are per-
211648c2ecf20Sopenharmony_ci * queue because with vDPA multiple queues on the same function can be passed
211658c2ecf20Sopenharmony_ci * through to different virtual hosts as independent devices.
211668c2ecf20Sopenharmony_ci */
211678c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_FEATURES_OFST 48
211688c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_FEATURES_LEN 8
211698c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_FEATURES_LO_OFST 48
211708c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_FEATURES_HI_OFST 52
211718c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
211728c2ecf20Sopenharmony_ci/*               MC_CMD_VIRTIO_GET_FEATURES/MC_CMD_VIRTIO_GET_FEATURES_OUT/FEATURES */
211738c2ecf20Sopenharmony_ci/* The inital producer index for this queue's used ring. If this queue is being
211748c2ecf20Sopenharmony_ci * created to be migrated into, this should be the FINAL_PIDX value returned by
211758c2ecf20Sopenharmony_ci * MC_CMD_VIRTIO_FINI_QUEUE of the queue being migrated from. Otherwise, it
211768c2ecf20Sopenharmony_ci * should be zero.
211778c2ecf20Sopenharmony_ci */
211788c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_INITIAL_PIDX_OFST 56
211798c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_INITIAL_PIDX_LEN 4
211808c2ecf20Sopenharmony_ci/* The inital consumer index for this queue's available ring. If this queue is
211818c2ecf20Sopenharmony_ci * being created to be migrated into, this should be the FINAL_CIDX value
211828c2ecf20Sopenharmony_ci * returned by MC_CMD_VIRTIO_FINI_QUEUE of the queue being migrated from.
211838c2ecf20Sopenharmony_ci * Otherwise, it should be zero.
211848c2ecf20Sopenharmony_ci */
211858c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_INITIAL_CIDX_OFST 60
211868c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_INITIAL_CIDX_LEN 4
211878c2ecf20Sopenharmony_ci/* A MAE_MPORT_SELECTOR defining which mport this queue should be associated
211888c2ecf20Sopenharmony_ci * with. Use MAE_MPORT_SELECTOR_ASSIGNED to request the default mport for the
211898c2ecf20Sopenharmony_ci * function this queue is being created on.
211908c2ecf20Sopenharmony_ci */
211918c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_MPORT_SELECTOR_OFST 64
211928c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_INIT_QUEUE_REQ_MPORT_SELECTOR_LEN 4
211938c2ecf20Sopenharmony_ci
211948c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_INIT_QUEUE_RESP msgresponse */
211958c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_INIT_QUEUE_RESP_LEN 0
211968c2ecf20Sopenharmony_ci
211978c2ecf20Sopenharmony_ci
211988c2ecf20Sopenharmony_ci/***********************************/
211998c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_FINI_QUEUE
212008c2ecf20Sopenharmony_ci * Destroy a virtio virtqueue
212018c2ecf20Sopenharmony_ci */
212028c2ecf20Sopenharmony_ci#define MC_CMD_VIRTIO_FINI_QUEUE 0x16b
212038c2ecf20Sopenharmony_ci#undef MC_CMD_0x16b_PRIVILEGE_CTG
212048c2ecf20Sopenharmony_ci
212058c2ecf20Sopenharmony_ci#define MC_CMD_0x16b_PRIVILEGE_CTG SRIOV_CTG_GENERAL
212068c2ecf20Sopenharmony_ci
212078c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_FINI_QUEUE_REQ msgrequest */
212088c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_FINI_QUEUE_REQ_LEN 8
212098c2ecf20Sopenharmony_ci/* Type of virtqueue to destroy. */
212108c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_QUEUE_TYPE_OFST 0
212118c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_QUEUE_TYPE_LEN 1
212128c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
212138c2ecf20Sopenharmony_ci/*               MC_CMD_VIRTIO_INIT_QUEUE/MC_CMD_VIRTIO_INIT_QUEUE_REQ/QUEUE_TYPE */
212148c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_RESERVED_OFST 1
212158c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_RESERVED_LEN 1
212168c2ecf20Sopenharmony_ci/* If the calling function is a PF and this field is not VF_NULL, destroy the
212178c2ecf20Sopenharmony_ci * queue on the specified child VF instead of on the PF.
212188c2ecf20Sopenharmony_ci */
212198c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_TARGET_VF_OFST 2
212208c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_TARGET_VF_LEN 2
212218c2ecf20Sopenharmony_ci/* enum: No VF, destroy the queue on the PF. */
212228c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_FINI_QUEUE_REQ_VF_NULL 0xffff
212238c2ecf20Sopenharmony_ci/* Instance to destroy */
212248c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_INSTANCE_OFST 4
212258c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_REQ_INSTANCE_LEN 4
212268c2ecf20Sopenharmony_ci
212278c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_FINI_QUEUE_RESP msgresponse */
212288c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_FINI_QUEUE_RESP_LEN 8
212298c2ecf20Sopenharmony_ci/* The producer index of the used ring when the queue was stopped. */
212308c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_RESP_FINAL_PIDX_OFST 0
212318c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_RESP_FINAL_PIDX_LEN 4
212328c2ecf20Sopenharmony_ci/* The consumer index of the available ring when the queue was stopped. */
212338c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_RESP_FINAL_CIDX_OFST 4
212348c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_FINI_QUEUE_RESP_FINAL_CIDX_LEN 4
212358c2ecf20Sopenharmony_ci
212368c2ecf20Sopenharmony_ci
212378c2ecf20Sopenharmony_ci/***********************************/
212388c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_DOORBELL_OFFSET
212398c2ecf20Sopenharmony_ci * Get the offset in the BAR of the doorbells for a VI. Doesn't require the
212408c2ecf20Sopenharmony_ci * queue(s) to be allocated.
212418c2ecf20Sopenharmony_ci */
212428c2ecf20Sopenharmony_ci#define MC_CMD_VIRTIO_GET_DOORBELL_OFFSET 0x16c
212438c2ecf20Sopenharmony_ci#undef MC_CMD_0x16c_PRIVILEGE_CTG
212448c2ecf20Sopenharmony_ci
212458c2ecf20Sopenharmony_ci#define MC_CMD_0x16c_PRIVILEGE_CTG SRIOV_CTG_GENERAL
212468c2ecf20Sopenharmony_ci
212478c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ msgrequest */
212488c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_LEN 8
212498c2ecf20Sopenharmony_ci/* Type of device to get information for. Matches the device id as defined by
212508c2ecf20Sopenharmony_ci * the virtio spec.
212518c2ecf20Sopenharmony_ci */
212528c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_DEVICE_ID_OFST 0
212538c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_DEVICE_ID_LEN 1
212548c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
212558c2ecf20Sopenharmony_ci/*               MC_CMD_VIRTIO_GET_FEATURES/MC_CMD_VIRTIO_GET_FEATURES_IN/DEVICE_ID */
212568c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_RESERVED_OFST 1
212578c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_RESERVED_LEN 1
212588c2ecf20Sopenharmony_ci/* If the calling function is a PF and this field is not VF_NULL, query the VI
212598c2ecf20Sopenharmony_ci * on the specified child VF instead of on the PF.
212608c2ecf20Sopenharmony_ci */
212618c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_TARGET_VF_OFST 2
212628c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_TARGET_VF_LEN 2
212638c2ecf20Sopenharmony_ci/* enum: No VF, query the PF. */
212648c2ecf20Sopenharmony_ci#define          MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_VF_NULL 0xffff
212658c2ecf20Sopenharmony_ci/* VI instance to query */
212668c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_INSTANCE_OFST 4
212678c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_DOORBELL_OFFSET_REQ_INSTANCE_LEN 4
212688c2ecf20Sopenharmony_ci
212698c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_NET_DOORBELL_OFFSET_RESP msgresponse */
212708c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_GET_NET_DOORBELL_OFFSET_RESP_LEN 8
212718c2ecf20Sopenharmony_ci/* Offset of RX doorbell in BAR */
212728c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_NET_DOORBELL_OFFSET_RESP_RX_DBL_OFFSET_OFST 0
212738c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_NET_DOORBELL_OFFSET_RESP_RX_DBL_OFFSET_LEN 4
212748c2ecf20Sopenharmony_ci/* Offset of TX doorbell in BAR */
212758c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_NET_DOORBELL_OFFSET_RESP_TX_DBL_OFFSET_OFST 4
212768c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_NET_DOORBELL_OFFSET_RESP_TX_DBL_OFFSET_LEN 4
212778c2ecf20Sopenharmony_ci
212788c2ecf20Sopenharmony_ci/* MC_CMD_VIRTIO_GET_BLOCK_DOORBELL_OFFSET_RESP msgresponse */
212798c2ecf20Sopenharmony_ci#define    MC_CMD_VIRTIO_GET_BLOCK_DOORBELL_OFFSET_RESP_LEN 4
212808c2ecf20Sopenharmony_ci/* Offset of request doorbell in BAR */
212818c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_BLOCK_DOORBELL_OFFSET_RESP_DBL_OFFSET_OFST 0
212828c2ecf20Sopenharmony_ci#define       MC_CMD_VIRTIO_GET_BLOCK_DOORBELL_OFFSET_RESP_DBL_OFFSET_LEN 4
212838c2ecf20Sopenharmony_ci
212848c2ecf20Sopenharmony_ci/* PCIE_FUNCTION structuredef: Structure representing a PCIe function ID
212858c2ecf20Sopenharmony_ci * (interface/PF/VF tuple)
212868c2ecf20Sopenharmony_ci */
212878c2ecf20Sopenharmony_ci#define    PCIE_FUNCTION_LEN 8
212888c2ecf20Sopenharmony_ci/* PCIe PF function number */
212898c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_PF_OFST 0
212908c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_PF_LEN 2
212918c2ecf20Sopenharmony_ci/* enum: Wildcard value representing any available function (e.g in resource
212928c2ecf20Sopenharmony_ci * allocation requests)
212938c2ecf20Sopenharmony_ci */
212948c2ecf20Sopenharmony_ci#define          PCIE_FUNCTION_PF_ANY 0xfffe
212958c2ecf20Sopenharmony_ci/* enum: Value representing invalid (null) function */
212968c2ecf20Sopenharmony_ci#define          PCIE_FUNCTION_PF_NULL 0xffff
212978c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_PF_LBN 0
212988c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_PF_WIDTH 16
212998c2ecf20Sopenharmony_ci/* PCIe VF Function number (PF relative) */
213008c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_VF_OFST 2
213018c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_VF_LEN 2
213028c2ecf20Sopenharmony_ci/* enum: Wildcard value representing any available function (e.g in resource
213038c2ecf20Sopenharmony_ci * allocation requests)
213048c2ecf20Sopenharmony_ci */
213058c2ecf20Sopenharmony_ci#define          PCIE_FUNCTION_VF_ANY 0xfffe
213068c2ecf20Sopenharmony_ci/* enum: Function is a PF (when PF != PF_NULL) or invalid function (when PF ==
213078c2ecf20Sopenharmony_ci * PF_NULL)
213088c2ecf20Sopenharmony_ci */
213098c2ecf20Sopenharmony_ci#define          PCIE_FUNCTION_VF_NULL 0xffff
213108c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_VF_LBN 16
213118c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_VF_WIDTH 16
213128c2ecf20Sopenharmony_ci/* PCIe interface of the function */
213138c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_INTF_OFST 4
213148c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_INTF_LEN 4
213158c2ecf20Sopenharmony_ci/* enum: Host PCIe interface */
213168c2ecf20Sopenharmony_ci#define          PCIE_FUNCTION_INTF_HOST 0x0
213178c2ecf20Sopenharmony_ci/* enum: Application Processor interface */
213188c2ecf20Sopenharmony_ci#define          PCIE_FUNCTION_INTF_AP 0x1
213198c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_INTF_LBN 32
213208c2ecf20Sopenharmony_ci#define       PCIE_FUNCTION_INTF_WIDTH 32
213218c2ecf20Sopenharmony_ci
213228c2ecf20Sopenharmony_ci
213238c2ecf20Sopenharmony_ci/***********************************/
213248c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CREATE
213258c2ecf20Sopenharmony_ci * Descriptor proxy functions are abstract devices that forward all request
213268c2ecf20Sopenharmony_ci * submitted to the host PCIe function (descriptors submitted to Virtio or
213278c2ecf20Sopenharmony_ci * EF100 queues) to be handled on another function (most commonly on the
213288c2ecf20Sopenharmony_ci * embedded Application Processor), via EF100 descriptor proxy, memory-to-
213298c2ecf20Sopenharmony_ci * memory and descriptor-to-completion mechanisms. Primary user is Virtio-blk
213308c2ecf20Sopenharmony_ci * subsystem, see SF-122927-TC. This function allocates a new descriptor proxy
213318c2ecf20Sopenharmony_ci * function on the host and assigns a user-defined label. The actual function
213328c2ecf20Sopenharmony_ci * configuration is not persisted until the caller configures it with
213338c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN and commits with
213348c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_COMMIT_IN.
213358c2ecf20Sopenharmony_ci */
213368c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_CREATE 0x172
213378c2ecf20Sopenharmony_ci#undef MC_CMD_0x172_PRIVILEGE_CTG
213388c2ecf20Sopenharmony_ci
213398c2ecf20Sopenharmony_ci#define MC_CMD_0x172_PRIVILEGE_CTG SRIOV_CTG_ADMIN
213408c2ecf20Sopenharmony_ci
213418c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CREATE_IN msgrequest */
213428c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CREATE_IN_LEN 52
213438c2ecf20Sopenharmony_ci/* PCIe Function ID to allocate (as struct PCIE_FUNCTION). Set to
213448c2ecf20Sopenharmony_ci * {PF_ANY,VF_ANY,interface} for "any available function" Set to
213458c2ecf20Sopenharmony_ci * {PF_ANY,VF_NULL,interface} for "any available PF"
213468c2ecf20Sopenharmony_ci */
213478c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_FUNC_OFST 0
213488c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_FUNC_LEN 8
213498c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_FUNC_LO_OFST 0
213508c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_FUNC_HI_OFST 4
213518c2ecf20Sopenharmony_ci/* The personality to set. The meanings of the personalities are defined in
213528c2ecf20Sopenharmony_ci * SF-120734-TC with more information in SF-122717-TC. At present, we only
213538c2ecf20Sopenharmony_ci * support proxying for VIRTIO_BLK
213548c2ecf20Sopenharmony_ci */
213558c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_PERSONALITY_OFST 8
213568c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_PERSONALITY_LEN 4
213578c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
213588c2ecf20Sopenharmony_ci/*               FUNCTION_PERSONALITY/ID */
213598c2ecf20Sopenharmony_ci/* User-defined label (zero-terminated ASCII string) to uniquely identify the
213608c2ecf20Sopenharmony_ci * function
213618c2ecf20Sopenharmony_ci */
213628c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_LABEL_OFST 12
213638c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_IN_LABEL_LEN 40
213648c2ecf20Sopenharmony_ci
213658c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CREATE_OUT msgresponse */
213668c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_LEN 12
213678c2ecf20Sopenharmony_ci/* Handle to the descriptor proxy function */
213688c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_HANDLE_OFST 0
213698c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_HANDLE_LEN 4
213708c2ecf20Sopenharmony_ci/* Allocated function ID (as struct PCIE_FUNCTION) */
213718c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_FUNC_OFST 4
213728c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_FUNC_LEN 8
213738c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_FUNC_LO_OFST 4
213748c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CREATE_OUT_FUNC_HI_OFST 8
213758c2ecf20Sopenharmony_ci
213768c2ecf20Sopenharmony_ci
213778c2ecf20Sopenharmony_ci/***********************************/
213788c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_DESTROY
213798c2ecf20Sopenharmony_ci * Remove an existing descriptor proxy function. Underlying function
213808c2ecf20Sopenharmony_ci * personality and configuration reverts back to factory default. Function
213818c2ecf20Sopenharmony_ci * configuration is committed immediately to specified store and any function
213828c2ecf20Sopenharmony_ci * ownership is released.
213838c2ecf20Sopenharmony_ci */
213848c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_DESTROY 0x173
213858c2ecf20Sopenharmony_ci#undef MC_CMD_0x173_PRIVILEGE_CTG
213868c2ecf20Sopenharmony_ci
213878c2ecf20Sopenharmony_ci#define MC_CMD_0x173_PRIVILEGE_CTG SRIOV_CTG_ADMIN
213888c2ecf20Sopenharmony_ci
213898c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_DESTROY_IN msgrequest */
213908c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_DESTROY_IN_LEN 44
213918c2ecf20Sopenharmony_ci/* User-defined label (zero-terminated ASCII string) to uniquely identify the
213928c2ecf20Sopenharmony_ci * function
213938c2ecf20Sopenharmony_ci */
213948c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_DESTROY_IN_LABEL_OFST 0
213958c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_DESTROY_IN_LABEL_LEN 40
213968c2ecf20Sopenharmony_ci/* Store from which to remove function configuration */
213978c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_DESTROY_IN_STORE_OFST 40
213988c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_DESTROY_IN_STORE_LEN 4
213998c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
214008c2ecf20Sopenharmony_ci/*               MC_CMD_DESC_PROXY_FUNC_COMMIT/MC_CMD_DESC_PROXY_FUNC_COMMIT_IN/STORE */
214018c2ecf20Sopenharmony_ci
214028c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_DESTROY_OUT msgresponse */
214038c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_DESTROY_OUT_LEN 0
214048c2ecf20Sopenharmony_ci
214058c2ecf20Sopenharmony_ci/* VIRTIO_BLK_CONFIG structuredef: Virtio block device configuration. See
214068c2ecf20Sopenharmony_ci * Virtio specification v1.1, Sections 5.2.3 and 6 for definition of feature
214078c2ecf20Sopenharmony_ci * bits. See Virtio specification v1.1, Section 5.2.4 (struct
214088c2ecf20Sopenharmony_ci * virtio_blk_config) for definition of remaining configuration fields
214098c2ecf20Sopenharmony_ci */
214108c2ecf20Sopenharmony_ci#define    VIRTIO_BLK_CONFIG_LEN 68
214118c2ecf20Sopenharmony_ci/* Virtio block device features to advertise, per Virtio 1.1, 5.2.3 and 6 */
214128c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_FEATURES_OFST 0
214138c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_FEATURES_LEN 8
214148c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_FEATURES_LO_OFST 0
214158c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_FEATURES_HI_OFST 4
214168c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_BARRIER_OFST 0
214178c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_BARRIER_LBN 0
214188c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_BARRIER_WIDTH 1
214198c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SIZE_MAX_OFST 0
214208c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SIZE_MAX_LBN 1
214218c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SIZE_MAX_WIDTH 1
214228c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SEG_MAX_OFST 0
214238c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SEG_MAX_LBN 2
214248c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SEG_MAX_WIDTH 1
214258c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_GEOMETRY_OFST 0
214268c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_GEOMETRY_LBN 4
214278c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_GEOMETRY_WIDTH 1
214288c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_RO_OFST 0
214298c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_RO_LBN 5
214308c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_RO_WIDTH 1
214318c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_BLK_SIZE_OFST 0
214328c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_BLK_SIZE_LBN 6
214338c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_BLK_SIZE_WIDTH 1
214348c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SCSI_OFST 0
214358c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SCSI_LBN 7
214368c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_SCSI_WIDTH 1
214378c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_FLUSH_OFST 0
214388c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_FLUSH_LBN 9
214398c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_FLUSH_WIDTH 1
214408c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_TOPOLOGY_OFST 0
214418c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_TOPOLOGY_LBN 10
214428c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_TOPOLOGY_WIDTH 1
214438c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_CONFIG_WCE_OFST 0
214448c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_CONFIG_WCE_LBN 11
214458c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_CONFIG_WCE_WIDTH 1
214468c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_MQ_OFST 0
214478c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_MQ_LBN 12
214488c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_MQ_WIDTH 1
214498c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_DISCARD_OFST 0
214508c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_DISCARD_LBN 13
214518c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_DISCARD_WIDTH 1
214528c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_WRITE_ZEROES_OFST 0
214538c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_WRITE_ZEROES_LBN 14
214548c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_BLK_F_WRITE_ZEROES_WIDTH 1
214558c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_INDIRECT_DESC_OFST 0
214568c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_INDIRECT_DESC_LBN 28
214578c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_INDIRECT_DESC_WIDTH 1
214588c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_EVENT_IDX_OFST 0
214598c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_EVENT_IDX_LBN 29
214608c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_EVENT_IDX_WIDTH 1
214618c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_VERSION_1_OFST 0
214628c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_VERSION_1_LBN 32
214638c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_VERSION_1_WIDTH 1
214648c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_ACCESS_PLATFORM_OFST 0
214658c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_ACCESS_PLATFORM_LBN 33
214668c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_ACCESS_PLATFORM_WIDTH 1
214678c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_PACKED_OFST 0
214688c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_PACKED_LBN 34
214698c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_RING_PACKED_WIDTH 1
214708c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_IN_ORDER_OFST 0
214718c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_IN_ORDER_LBN 35
214728c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_IN_ORDER_WIDTH 1
214738c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_ORDER_PLATFORM_OFST 0
214748c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_ORDER_PLATFORM_LBN 36
214758c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_ORDER_PLATFORM_WIDTH 1
214768c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_SR_IOV_OFST 0
214778c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_SR_IOV_LBN 37
214788c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_SR_IOV_WIDTH 1
214798c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_OFST 0
214808c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_LBN 38
214818c2ecf20Sopenharmony_ci#define        VIRTIO_BLK_CONFIG_VIRTIO_F_NOTIFICATION_DATA_WIDTH 1
214828c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_FEATURES_LBN 0
214838c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_FEATURES_WIDTH 64
214848c2ecf20Sopenharmony_ci/* The capacity of the device (expressed in 512-byte sectors) */
214858c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CAPACITY_OFST 8
214868c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CAPACITY_LEN 8
214878c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CAPACITY_LO_OFST 8
214888c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CAPACITY_HI_OFST 12
214898c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CAPACITY_LBN 64
214908c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CAPACITY_WIDTH 64
214918c2ecf20Sopenharmony_ci/* Maximum size of any single segment. Only valid when VIRTIO_BLK_F_SIZE_MAX is
214928c2ecf20Sopenharmony_ci * set.
214938c2ecf20Sopenharmony_ci */
214948c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SIZE_MAX_OFST 16
214958c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SIZE_MAX_LEN 4
214968c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SIZE_MAX_LBN 128
214978c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SIZE_MAX_WIDTH 32
214988c2ecf20Sopenharmony_ci/* Maximum number of segments in a request. Only valid when
214998c2ecf20Sopenharmony_ci * VIRTIO_BLK_F_SEG_MAX is set.
215008c2ecf20Sopenharmony_ci */
215018c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SEG_MAX_OFST 20
215028c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SEG_MAX_LEN 4
215038c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SEG_MAX_LBN 160
215048c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SEG_MAX_WIDTH 32
215058c2ecf20Sopenharmony_ci/* Disk-style geometry - cylinders. Only valid when VIRTIO_BLK_F_GEOMETRY is
215068c2ecf20Sopenharmony_ci * set.
215078c2ecf20Sopenharmony_ci */
215088c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CYLINDERS_OFST 24
215098c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CYLINDERS_LEN 2
215108c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CYLINDERS_LBN 192
215118c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_CYLINDERS_WIDTH 16
215128c2ecf20Sopenharmony_ci/* Disk-style geometry - heads. Only valid when VIRTIO_BLK_F_GEOMETRY is set.
215138c2ecf20Sopenharmony_ci */
215148c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_HEADS_OFST 26
215158c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_HEADS_LEN 1
215168c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_HEADS_LBN 208
215178c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_HEADS_WIDTH 8
215188c2ecf20Sopenharmony_ci/* Disk-style geometry - sectors. Only valid when VIRTIO_BLK_F_GEOMETRY is set.
215198c2ecf20Sopenharmony_ci */
215208c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SECTORS_OFST 27
215218c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SECTORS_LEN 1
215228c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SECTORS_LBN 216
215238c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_SECTORS_WIDTH 8
215248c2ecf20Sopenharmony_ci/* Block size of disk. Only valid when VIRTIO_BLK_F_BLK_SIZE is set. */
215258c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_BLK_SIZE_OFST 28
215268c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_BLK_SIZE_LEN 4
215278c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_BLK_SIZE_LBN 224
215288c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_BLK_SIZE_WIDTH 32
215298c2ecf20Sopenharmony_ci/* Block topology - number of logical blocks per physical block (log2). Only
215308c2ecf20Sopenharmony_ci * valid when VIRTIO_BLK_F_TOPOLOGY is set.
215318c2ecf20Sopenharmony_ci */
215328c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_PHYSICAL_BLOCK_EXP_OFST 32
215338c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_PHYSICAL_BLOCK_EXP_LEN 1
215348c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_PHYSICAL_BLOCK_EXP_LBN 256
215358c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_PHYSICAL_BLOCK_EXP_WIDTH 8
215368c2ecf20Sopenharmony_ci/* Block topology - offset of first aligned logical block. Only valid when
215378c2ecf20Sopenharmony_ci * VIRTIO_BLK_F_TOPOLOGY is set.
215388c2ecf20Sopenharmony_ci */
215398c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_ALIGNMENT_OFFSET_OFST 33
215408c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_ALIGNMENT_OFFSET_LEN 1
215418c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_ALIGNMENT_OFFSET_LBN 264
215428c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_ALIGNMENT_OFFSET_WIDTH 8
215438c2ecf20Sopenharmony_ci/* Block topology - suggested minimum I/O size in blocks. Only valid when
215448c2ecf20Sopenharmony_ci * VIRTIO_BLK_F_TOPOLOGY is set.
215458c2ecf20Sopenharmony_ci */
215468c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MIN_IO_SIZE_OFST 34
215478c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MIN_IO_SIZE_LEN 2
215488c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MIN_IO_SIZE_LBN 272
215498c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MIN_IO_SIZE_WIDTH 16
215508c2ecf20Sopenharmony_ci/* Block topology - optimal (suggested maximum) I/O size in blocks. Only valid
215518c2ecf20Sopenharmony_ci * when VIRTIO_BLK_F_TOPOLOGY is set.
215528c2ecf20Sopenharmony_ci */
215538c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_OPT_IO_SIZE_OFST 36
215548c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_OPT_IO_SIZE_LEN 4
215558c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_OPT_IO_SIZE_LBN 288
215568c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_OPT_IO_SIZE_WIDTH 32
215578c2ecf20Sopenharmony_ci/* Unused, set to zero. Note that virtio_blk_config.writeback is volatile and
215588c2ecf20Sopenharmony_ci * not carried in config data.
215598c2ecf20Sopenharmony_ci */
215608c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED0_OFST 40
215618c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED0_LEN 2
215628c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED0_LBN 320
215638c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED0_WIDTH 16
215648c2ecf20Sopenharmony_ci/* Number of queues. Only valid if the VIRTIO_BLK_F_MQ feature is negotiated.
215658c2ecf20Sopenharmony_ci */
215668c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_NUM_QUEUES_OFST 42
215678c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_NUM_QUEUES_LEN 2
215688c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_NUM_QUEUES_LBN 336
215698c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_NUM_QUEUES_WIDTH 16
215708c2ecf20Sopenharmony_ci/* Maximum discard sectors size, in 512-byte units. Only valid if
215718c2ecf20Sopenharmony_ci * VIRTIO_BLK_F_DISCARD is set.
215728c2ecf20Sopenharmony_ci */
215738c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SECTORS_OFST 44
215748c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SECTORS_LEN 4
215758c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SECTORS_LBN 352
215768c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SECTORS_WIDTH 32
215778c2ecf20Sopenharmony_ci/* Maximum discard segment number. Only valid if VIRTIO_BLK_F_DISCARD is set.
215788c2ecf20Sopenharmony_ci */
215798c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SEG_OFST 48
215808c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SEG_LEN 4
215818c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SEG_LBN 384
215828c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_DISCARD_SEG_WIDTH 32
215838c2ecf20Sopenharmony_ci/* Discard sector alignment, in 512-byte units. Only valid if
215848c2ecf20Sopenharmony_ci * VIRTIO_BLK_F_DISCARD is set.
215858c2ecf20Sopenharmony_ci */
215868c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_DISCARD_SECTOR_ALIGNMENT_OFST 52
215878c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_DISCARD_SECTOR_ALIGNMENT_LEN 4
215888c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_DISCARD_SECTOR_ALIGNMENT_LBN 416
215898c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_DISCARD_SECTOR_ALIGNMENT_WIDTH 32
215908c2ecf20Sopenharmony_ci/* Maximum write zeroes sectors size, in 512-byte units. Only valid if
215918c2ecf20Sopenharmony_ci * VIRTIO_BLK_F_WRITE_ZEROES is set.
215928c2ecf20Sopenharmony_ci */
215938c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SECTORS_OFST 56
215948c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SECTORS_LEN 4
215958c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SECTORS_LBN 448
215968c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SECTORS_WIDTH 32
215978c2ecf20Sopenharmony_ci/* Maximum write zeroes segment number. Only valid if VIRTIO_BLK_F_WRITE_ZEROES
215988c2ecf20Sopenharmony_ci * is set.
215998c2ecf20Sopenharmony_ci */
216008c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SEG_OFST 60
216018c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SEG_LEN 4
216028c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SEG_LBN 480
216038c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_MAX_WRITE_ZEROES_SEG_WIDTH 32
216048c2ecf20Sopenharmony_ci/* Write zeroes request can result in deallocating one or more sectors. Only
216058c2ecf20Sopenharmony_ci * valid if VIRTIO_BLK_F_WRITE_ZEROES is set.
216068c2ecf20Sopenharmony_ci */
216078c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_WRITE_ZEROES_MAY_UNMAP_OFST 64
216088c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_WRITE_ZEROES_MAY_UNMAP_LEN 1
216098c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_WRITE_ZEROES_MAY_UNMAP_LBN 512
216108c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_WRITE_ZEROES_MAY_UNMAP_WIDTH 8
216118c2ecf20Sopenharmony_ci/* Unused, set to zero. */
216128c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED1_OFST 65
216138c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED1_LEN 3
216148c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED1_LBN 520
216158c2ecf20Sopenharmony_ci#define       VIRTIO_BLK_CONFIG_UNUSED1_WIDTH 24
216168c2ecf20Sopenharmony_ci
216178c2ecf20Sopenharmony_ci
216188c2ecf20Sopenharmony_ci/***********************************/
216198c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CONFIG_SET
216208c2ecf20Sopenharmony_ci * Set configuration for an existing descriptor proxy function. Configuration
216218c2ecf20Sopenharmony_ci * data must match function personality. The actual function configuration is
216228c2ecf20Sopenharmony_ci * not persisted until the caller commits with MC_CMD_DESC_PROXY_FUNC_COMMIT_IN
216238c2ecf20Sopenharmony_ci */
216248c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_CONFIG_SET 0x174
216258c2ecf20Sopenharmony_ci#undef MC_CMD_0x174_PRIVILEGE_CTG
216268c2ecf20Sopenharmony_ci
216278c2ecf20Sopenharmony_ci#define MC_CMD_0x174_PRIVILEGE_CTG SRIOV_CTG_ADMIN
216288c2ecf20Sopenharmony_ci
216298c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN msgrequest */
216308c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_LENMIN 20
216318c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_LENMAX 252
216328c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_LENMAX_MCDI2 1020
216338c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_LEN(num) (20+1*(num))
216348c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_CONFIG_NUM(len) (((len)-20)/1)
216358c2ecf20Sopenharmony_ci/* Handle to descriptor proxy function (as returned by
216368c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_OPEN)
216378c2ecf20Sopenharmony_ci */
216388c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_HANDLE_OFST 0
216398c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_HANDLE_LEN 4
216408c2ecf20Sopenharmony_ci/* Reserved for future extension, set to zero. */
216418c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_RESERVED_OFST 4
216428c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_RESERVED_LEN 16
216438c2ecf20Sopenharmony_ci/* Configuration data. Format of configuration data is determined implicitly
216448c2ecf20Sopenharmony_ci * from function personality referred to by HANDLE. Currently, only supported
216458c2ecf20Sopenharmony_ci * format is VIRTIO_BLK_CONFIG.
216468c2ecf20Sopenharmony_ci */
216478c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_CONFIG_OFST 20
216488c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_CONFIG_LEN 1
216498c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_CONFIG_MINNUM 0
216508c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_CONFIG_MAXNUM 232
216518c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_IN_CONFIG_MAXNUM_MCDI2 1000
216528c2ecf20Sopenharmony_ci
216538c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_OUT msgresponse */
216548c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CONFIG_SET_OUT_LEN 0
216558c2ecf20Sopenharmony_ci
216568c2ecf20Sopenharmony_ci
216578c2ecf20Sopenharmony_ci/***********************************/
216588c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_COMMIT
216598c2ecf20Sopenharmony_ci * Commit function configuration to non-volatile or volatile store. Once
216608c2ecf20Sopenharmony_ci * configuration is applied to hardware (which may happen immediately or on
216618c2ecf20Sopenharmony_ci * next function/device reset) a DESC_PROXY_FUNC_CONFIG_SET MCDI event will be
216628c2ecf20Sopenharmony_ci * delivered to callers MCDI event queue.
216638c2ecf20Sopenharmony_ci */
216648c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_COMMIT 0x175
216658c2ecf20Sopenharmony_ci#undef MC_CMD_0x175_PRIVILEGE_CTG
216668c2ecf20Sopenharmony_ci
216678c2ecf20Sopenharmony_ci#define MC_CMD_0x175_PRIVILEGE_CTG SRIOV_CTG_ADMIN
216688c2ecf20Sopenharmony_ci
216698c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_COMMIT_IN msgrequest */
216708c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_LEN 8
216718c2ecf20Sopenharmony_ci/* Handle to descriptor proxy function (as returned by
216728c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_OPEN)
216738c2ecf20Sopenharmony_ci */
216748c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_HANDLE_OFST 0
216758c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_HANDLE_LEN 4
216768c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_STORE_OFST 4
216778c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_STORE_LEN 4
216788c2ecf20Sopenharmony_ci/* enum: Store into non-volatile (dynamic) config */
216798c2ecf20Sopenharmony_ci#define          MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_NON_VOLATILE 0x0
216808c2ecf20Sopenharmony_ci/* enum: Store into volatile (ephemeral) config */
216818c2ecf20Sopenharmony_ci#define          MC_CMD_DESC_PROXY_FUNC_COMMIT_IN_VOLATILE 0x1
216828c2ecf20Sopenharmony_ci
216838c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_COMMIT_OUT msgresponse */
216848c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_COMMIT_OUT_LEN 4
216858c2ecf20Sopenharmony_ci/* Generation count to be delivered in an event once configuration becomes live
216868c2ecf20Sopenharmony_ci */
216878c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_COMMIT_OUT_CONFIG_GENERATION_OFST 0
216888c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_COMMIT_OUT_CONFIG_GENERATION_LEN 4
216898c2ecf20Sopenharmony_ci
216908c2ecf20Sopenharmony_ci
216918c2ecf20Sopenharmony_ci/***********************************/
216928c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_OPEN
216938c2ecf20Sopenharmony_ci * Retrieve a handle for an existing descriptor proxy function. Returns an
216948c2ecf20Sopenharmony_ci * integer handle, valid until function is deallocated, MC rebooted or power-
216958c2ecf20Sopenharmony_ci * cycle. Returns ENODEV if no function with given label exists.
216968c2ecf20Sopenharmony_ci */
216978c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_OPEN 0x176
216988c2ecf20Sopenharmony_ci#undef MC_CMD_0x176_PRIVILEGE_CTG
216998c2ecf20Sopenharmony_ci
217008c2ecf20Sopenharmony_ci#define MC_CMD_0x176_PRIVILEGE_CTG SRIOV_CTG_ADMIN
217018c2ecf20Sopenharmony_ci
217028c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_OPEN_IN msgrequest */
217038c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_OPEN_IN_LEN 40
217048c2ecf20Sopenharmony_ci/* User-defined label (zero-terminated ASCII string) to uniquely identify the
217058c2ecf20Sopenharmony_ci * function
217068c2ecf20Sopenharmony_ci */
217078c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_IN_LABEL_OFST 0
217088c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_IN_LABEL_LEN 40
217098c2ecf20Sopenharmony_ci
217108c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_OPEN_OUT msgresponse */
217118c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_LENMIN 40
217128c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_LENMAX 252
217138c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_LENMAX_MCDI2 1020
217148c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_LEN(num) (40+1*(num))
217158c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_NUM(len) (((len)-40)/1)
217168c2ecf20Sopenharmony_ci/* Handle to the descriptor proxy function */
217178c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_HANDLE_OFST 0
217188c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_HANDLE_LEN 4
217198c2ecf20Sopenharmony_ci/* PCIe Function ID (as struct PCIE_FUNCTION) */
217208c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_FUNC_OFST 4
217218c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_FUNC_LEN 8
217228c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_FUNC_LO_OFST 4
217238c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_FUNC_HI_OFST 8
217248c2ecf20Sopenharmony_ci/* Function personality */
217258c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_PERSONALITY_OFST 12
217268c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_PERSONALITY_LEN 4
217278c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
217288c2ecf20Sopenharmony_ci/*               FUNCTION_PERSONALITY/ID */
217298c2ecf20Sopenharmony_ci/* Function configuration state */
217308c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_STATUS_OFST 16
217318c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_STATUS_LEN 4
217328c2ecf20Sopenharmony_ci/* enum: Function configuration is visible to the host (live) */
217338c2ecf20Sopenharmony_ci#define          MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_LIVE 0x0
217348c2ecf20Sopenharmony_ci/* enum: Function configuration is pending reset */
217358c2ecf20Sopenharmony_ci#define          MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_PENDING 0x1
217368c2ecf20Sopenharmony_ci/* Generation count to be delivered in an event once the configuration becomes
217378c2ecf20Sopenharmony_ci * live (if status is "pending")
217388c2ecf20Sopenharmony_ci */
217398c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_GENERATION_OFST 20
217408c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_GENERATION_LEN 4
217418c2ecf20Sopenharmony_ci/* Reserved for future extension, set to zero. */
217428c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_RESERVED_OFST 24
217438c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_RESERVED_LEN 16
217448c2ecf20Sopenharmony_ci/* Configuration data corresponding to function personality. Currently, only
217458c2ecf20Sopenharmony_ci * supported format is VIRTIO_BLK_CONFIG
217468c2ecf20Sopenharmony_ci */
217478c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_OFST 40
217488c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_LEN 1
217498c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_MINNUM 0
217508c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_MAXNUM 212
217518c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_OPEN_OUT_CONFIG_MAXNUM_MCDI2 980
217528c2ecf20Sopenharmony_ci
217538c2ecf20Sopenharmony_ci
217548c2ecf20Sopenharmony_ci/***********************************/
217558c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CLOSE
217568c2ecf20Sopenharmony_ci * Releases a handle for an open descriptor proxy function. If proxying was
217578c2ecf20Sopenharmony_ci * enabled on the device, the caller is expected to gracefully stop it using
217588c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_DISABLE prior to calling this function. Closing an
217598c2ecf20Sopenharmony_ci * active device without disabling proxying will result in forced close, which
217608c2ecf20Sopenharmony_ci * will put the device into a failed state and signal the host driver of the
217618c2ecf20Sopenharmony_ci * error (for virtio, DEVICE_NEEDS_RESET flag would be set on the host side)
217628c2ecf20Sopenharmony_ci */
217638c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_CLOSE 0x1a1
217648c2ecf20Sopenharmony_ci#undef MC_CMD_0x1a1_PRIVILEGE_CTG
217658c2ecf20Sopenharmony_ci
217668c2ecf20Sopenharmony_ci#define MC_CMD_0x1a1_PRIVILEGE_CTG SRIOV_CTG_ADMIN
217678c2ecf20Sopenharmony_ci
217688c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CLOSE_IN msgrequest */
217698c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CLOSE_IN_LEN 4
217708c2ecf20Sopenharmony_ci/* Handle to the descriptor proxy function */
217718c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CLOSE_IN_HANDLE_OFST 0
217728c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_CLOSE_IN_HANDLE_LEN 4
217738c2ecf20Sopenharmony_ci
217748c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_CLOSE_OUT msgresponse */
217758c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_CLOSE_OUT_LEN 0
217768c2ecf20Sopenharmony_ci
217778c2ecf20Sopenharmony_ci/* DESC_PROXY_FUNC_MAP structuredef */
217788c2ecf20Sopenharmony_ci#define    DESC_PROXY_FUNC_MAP_LEN 52
217798c2ecf20Sopenharmony_ci/* PCIe function ID (as struct PCIE_FUNCTION) */
217808c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_FUNC_OFST 0
217818c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_FUNC_LEN 8
217828c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_FUNC_LO_OFST 0
217838c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_FUNC_HI_OFST 4
217848c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_FUNC_LBN 0
217858c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_FUNC_WIDTH 64
217868c2ecf20Sopenharmony_ci/* Function personality */
217878c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_PERSONALITY_OFST 8
217888c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_PERSONALITY_LEN 4
217898c2ecf20Sopenharmony_ci/*            Enum values, see field(s): */
217908c2ecf20Sopenharmony_ci/*               FUNCTION_PERSONALITY/ID */
217918c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_PERSONALITY_LBN 64
217928c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_PERSONALITY_WIDTH 32
217938c2ecf20Sopenharmony_ci/* User-defined label (zero-terminated ASCII string) to uniquely identify the
217948c2ecf20Sopenharmony_ci * function
217958c2ecf20Sopenharmony_ci */
217968c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_LABEL_OFST 12
217978c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_LABEL_LEN 40
217988c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_LABEL_LBN 96
217998c2ecf20Sopenharmony_ci#define       DESC_PROXY_FUNC_MAP_LABEL_WIDTH 320
218008c2ecf20Sopenharmony_ci
218018c2ecf20Sopenharmony_ci
218028c2ecf20Sopenharmony_ci/***********************************/
218038c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_ENUM
218048c2ecf20Sopenharmony_ci * Enumerate existing descriptor proxy functions
218058c2ecf20Sopenharmony_ci */
218068c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_ENUM 0x177
218078c2ecf20Sopenharmony_ci#undef MC_CMD_0x177_PRIVILEGE_CTG
218088c2ecf20Sopenharmony_ci
218098c2ecf20Sopenharmony_ci#define MC_CMD_0x177_PRIVILEGE_CTG SRIOV_CTG_ADMIN
218108c2ecf20Sopenharmony_ci
218118c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_ENUM_IN msgrequest */
218128c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENUM_IN_LEN 4
218138c2ecf20Sopenharmony_ci/* Starting index, set to 0 on first request. See
218148c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_ENUM_OUT/FLAGS.
218158c2ecf20Sopenharmony_ci */
218168c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_IN_START_IDX_OFST 0
218178c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_IN_START_IDX_LEN 4
218188c2ecf20Sopenharmony_ci
218198c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_ENUM_OUT msgresponse */
218208c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_LENMIN 4
218218c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_LENMAX 212
218228c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_LENMAX_MCDI2 992
218238c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_LEN(num) (4+52*(num))
218248c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FUNC_MAP_NUM(len) (((len)-4)/52)
218258c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FLAGS_OFST 0
218268c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FLAGS_LEN 4
218278c2ecf20Sopenharmony_ci#define        MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_MORE_DATA_OFST 0
218288c2ecf20Sopenharmony_ci#define        MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_MORE_DATA_LBN 0
218298c2ecf20Sopenharmony_ci#define        MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_MORE_DATA_WIDTH 1
218308c2ecf20Sopenharmony_ci/* Function map, as array of DESC_PROXY_FUNC_MAP */
218318c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FUNC_MAP_OFST 4
218328c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FUNC_MAP_LEN 52
218338c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FUNC_MAP_MINNUM 0
218348c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FUNC_MAP_MAXNUM 4
218358c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENUM_OUT_FUNC_MAP_MAXNUM_MCDI2 19
218368c2ecf20Sopenharmony_ci
218378c2ecf20Sopenharmony_ci
218388c2ecf20Sopenharmony_ci/***********************************/
218398c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_ENABLE
218408c2ecf20Sopenharmony_ci * Enable descriptor proxying for function into target event queue. Returns VI
218418c2ecf20Sopenharmony_ci * allocation info for the proxy source function, so that the caller can map
218428c2ecf20Sopenharmony_ci * absolute VI IDs from descriptor proxy events back to the originating
218438c2ecf20Sopenharmony_ci * function.
218448c2ecf20Sopenharmony_ci */
218458c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_ENABLE 0x178
218468c2ecf20Sopenharmony_ci#undef MC_CMD_0x178_PRIVILEGE_CTG
218478c2ecf20Sopenharmony_ci
218488c2ecf20Sopenharmony_ci#define MC_CMD_0x178_PRIVILEGE_CTG SRIOV_CTG_ADMIN
218498c2ecf20Sopenharmony_ci
218508c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_ENABLE_IN msgrequest */
218518c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENABLE_IN_LEN 8
218528c2ecf20Sopenharmony_ci/* Handle to descriptor proxy function (as returned by
218538c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_OPEN)
218548c2ecf20Sopenharmony_ci */
218558c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_IN_HANDLE_OFST 0
218568c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_IN_HANDLE_LEN 4
218578c2ecf20Sopenharmony_ci/* Descriptor proxy sink queue (caller function relative). Must be extended
218588c2ecf20Sopenharmony_ci * width event queue
218598c2ecf20Sopenharmony_ci */
218608c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_IN_TARGET_EVQ_OFST 4
218618c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_IN_TARGET_EVQ_LEN 4
218628c2ecf20Sopenharmony_ci
218638c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_ENABLE_OUT msgresponse */
218648c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_ENABLE_OUT_LEN 8
218658c2ecf20Sopenharmony_ci/* The number of VIs allocated on the function */
218668c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_OUT_VI_COUNT_OFST 0
218678c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_OUT_VI_COUNT_LEN 4
218688c2ecf20Sopenharmony_ci/* The base absolute VI number allocated to the function. */
218698c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_OUT_VI_BASE_OFST 4
218708c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_ENABLE_OUT_VI_BASE_LEN 4
218718c2ecf20Sopenharmony_ci
218728c2ecf20Sopenharmony_ci
218738c2ecf20Sopenharmony_ci/***********************************/
218748c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_DISABLE
218758c2ecf20Sopenharmony_ci * Disable descriptor proxying for function
218768c2ecf20Sopenharmony_ci */
218778c2ecf20Sopenharmony_ci#define MC_CMD_DESC_PROXY_FUNC_DISABLE 0x179
218788c2ecf20Sopenharmony_ci#undef MC_CMD_0x179_PRIVILEGE_CTG
218798c2ecf20Sopenharmony_ci
218808c2ecf20Sopenharmony_ci#define MC_CMD_0x179_PRIVILEGE_CTG SRIOV_CTG_ADMIN
218818c2ecf20Sopenharmony_ci
218828c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_DISABLE_IN msgrequest */
218838c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_DISABLE_IN_LEN 4
218848c2ecf20Sopenharmony_ci/* Handle to descriptor proxy function (as returned by
218858c2ecf20Sopenharmony_ci * MC_CMD_DESC_PROXY_FUNC_OPEN)
218868c2ecf20Sopenharmony_ci */
218878c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_DISABLE_IN_HANDLE_OFST 0
218888c2ecf20Sopenharmony_ci#define       MC_CMD_DESC_PROXY_FUNC_DISABLE_IN_HANDLE_LEN 4
218898c2ecf20Sopenharmony_ci
218908c2ecf20Sopenharmony_ci/* MC_CMD_DESC_PROXY_FUNC_DISABLE_OUT msgresponse */
218918c2ecf20Sopenharmony_ci#define    MC_CMD_DESC_PROXY_FUNC_DISABLE_OUT_LEN 0
218928c2ecf20Sopenharmony_ci
218938c2ecf20Sopenharmony_ci
218948c2ecf20Sopenharmony_ci/***********************************/
218958c2ecf20Sopenharmony_ci/* MC_CMD_GET_ADDR_SPC_ID
218968c2ecf20Sopenharmony_ci * Get Address space identifier for use in mem2mem descriptors for a given
218978c2ecf20Sopenharmony_ci * target. See SF-120734-TC for details on ADDR_SPC_IDs and mem2mem
218988c2ecf20Sopenharmony_ci * descriptors.
218998c2ecf20Sopenharmony_ci */
219008c2ecf20Sopenharmony_ci#define MC_CMD_GET_ADDR_SPC_ID 0x1a0
219018c2ecf20Sopenharmony_ci#undef MC_CMD_0x1a0_PRIVILEGE_CTG
219028c2ecf20Sopenharmony_ci
219038c2ecf20Sopenharmony_ci#define MC_CMD_0x1a0_PRIVILEGE_CTG SRIOV_CTG_ADMIN
219048c2ecf20Sopenharmony_ci
219058c2ecf20Sopenharmony_ci/* MC_CMD_GET_ADDR_SPC_ID_IN msgrequest */
219068c2ecf20Sopenharmony_ci#define    MC_CMD_GET_ADDR_SPC_ID_IN_LEN 16
219078c2ecf20Sopenharmony_ci/* Resource type to get ADDR_SPC_ID for */
219088c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_TYPE_OFST 0
219098c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_TYPE_LEN 4
219108c2ecf20Sopenharmony_ci/* enum: Address space ID for host/AP memory DMA over the same interface this
219118c2ecf20Sopenharmony_ci * MCDI was called on
219128c2ecf20Sopenharmony_ci */
219138c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_SELF 0x0
219148c2ecf20Sopenharmony_ci/* enum: Address space ID for host/AP memory DMA via PCI interface and function
219158c2ecf20Sopenharmony_ci * specified by FUNC
219168c2ecf20Sopenharmony_ci */
219178c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_PCI_FUNC 0x1
219188c2ecf20Sopenharmony_ci/* enum: Address space ID for host/AP memory DMA via PCI interface and function
219198c2ecf20Sopenharmony_ci * specified by FUNC with PASID value specified by PASID
219208c2ecf20Sopenharmony_ci */
219218c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_PCI_FUNC_PASID 0x2
219228c2ecf20Sopenharmony_ci/* enum: Address space ID for host/AP memory DMA via PCI interface and function
219238c2ecf20Sopenharmony_ci * specified by FUNC with PASID value of relative VI specified by VI
219248c2ecf20Sopenharmony_ci */
219258c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_REL_VI 0x3
219268c2ecf20Sopenharmony_ci/* enum: Address space ID for host/AP memory DMA via PCI interface, function
219278c2ecf20Sopenharmony_ci * and PASID value of absolute VI specified by VI
219288c2ecf20Sopenharmony_ci */
219298c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_ABS_VI 0x4
219308c2ecf20Sopenharmony_ci/* enum: Address space ID for host memory DMA via PCI interface and function of
219318c2ecf20Sopenharmony_ci * descriptor proxy function specified by HANDLE
219328c2ecf20Sopenharmony_ci */
219338c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_DESC_PROXY_HANDLE 0x5
219348c2ecf20Sopenharmony_ci/* enum: Address space ID for DMA to/from MC memory */
219358c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_MC_MEM 0x6
219368c2ecf20Sopenharmony_ci/* enum: Address space ID for DMA to/from other SmartNIC memory (on-chip, DDR)
219378c2ecf20Sopenharmony_ci */
219388c2ecf20Sopenharmony_ci#define          MC_CMD_GET_ADDR_SPC_ID_IN_NIC_MEM 0x7
219398c2ecf20Sopenharmony_ci/* PCIe Function ID (as struct PCIE_FUNCTION). Only valid if TYPE is PCI_FUNC,
219408c2ecf20Sopenharmony_ci * PCI_FUNC_PASID or REL_VI.
219418c2ecf20Sopenharmony_ci */
219428c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_FUNC_OFST 4
219438c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_FUNC_LEN 8
219448c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_FUNC_LO_OFST 4
219458c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_FUNC_HI_OFST 8
219468c2ecf20Sopenharmony_ci/* PASID value. Only valid if TYPE is PCI_FUNC_PASID. */
219478c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_PASID_OFST 12
219488c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_PASID_LEN 4
219498c2ecf20Sopenharmony_ci/* Relative or absolute VI number. Only valid if TYPE is REL_VI or ABS_VI */
219508c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_VI_OFST 12
219518c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_VI_LEN 4
219528c2ecf20Sopenharmony_ci/* Descriptor proxy function handle. Only valid if TYPE is DESC_PROXY_HANDLE.
219538c2ecf20Sopenharmony_ci */
219548c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_HANDLE_OFST 4
219558c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_IN_HANDLE_LEN 4
219568c2ecf20Sopenharmony_ci
219578c2ecf20Sopenharmony_ci/* MC_CMD_GET_ADDR_SPC_ID_OUT msgresponse */
219588c2ecf20Sopenharmony_ci#define    MC_CMD_GET_ADDR_SPC_ID_OUT_LEN 8
219598c2ecf20Sopenharmony_ci/* Address Space ID for the requested target. Only the lower 36 bits are valid
219608c2ecf20Sopenharmony_ci * in the current SmartNIC implementation.
219618c2ecf20Sopenharmony_ci */
219628c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_OUT_ADDR_SPC_ID_OFST 0
219638c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_OUT_ADDR_SPC_ID_LEN 8
219648c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_OUT_ADDR_SPC_ID_LO_OFST 0
219658c2ecf20Sopenharmony_ci#define       MC_CMD_GET_ADDR_SPC_ID_OUT_ADDR_SPC_ID_HI_OFST 4
219668c2ecf20Sopenharmony_ci
219678c2ecf20Sopenharmony_ci
219688c2ecf20Sopenharmony_ci#endif /* MCDI_PCOL_H */
21969