cxgb_firmware_exports.h revision 1.1.6.2
11.1.6.2Syamt/**************************************************************************
21.1.6.2Syamt
31.1.6.2SyamtCopyright (c) 2007, Chelsio Inc.
41.1.6.2SyamtAll rights reserved.
51.1.6.2Syamt
61.1.6.2SyamtRedistribution and use in source and binary forms, with or without
71.1.6.2Syamtmodification, are permitted provided that the following conditions are met:
81.1.6.2Syamt
91.1.6.2Syamt 1. Redistributions of source code must retain the above copyright notice,
101.1.6.2Syamt    this list of conditions and the following disclaimer.
111.1.6.2Syamt
121.1.6.2Syamt 2. Neither the name of the Chelsio Corporation nor the names of its
131.1.6.2Syamt    contributors may be used to endorse or promote products derived from
141.1.6.2Syamt    this software without specific prior written permission.
151.1.6.2Syamt
161.1.6.2SyamtTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
171.1.6.2SyamtAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
181.1.6.2SyamtIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
191.1.6.2SyamtARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
201.1.6.2SyamtLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
211.1.6.2SyamtCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
221.1.6.2SyamtSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
231.1.6.2SyamtINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
241.1.6.2SyamtCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
251.1.6.2SyamtARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
261.1.6.2SyamtPOSSIBILITY OF SUCH DAMAGE.
271.1.6.2Syamt
281.1.6.2Syamt***************************************************************************/
291.1.6.2Syamt#ifndef _FIRMWARE_EXPORTS_H_
301.1.6.2Syamt#define _FIRMWARE_EXPORTS_H_
311.1.6.2Syamt
321.1.6.2Syamt/* WR OPCODES supported by the firmware.
331.1.6.2Syamt */
341.1.6.2Syamt#define FW_WROPCODE_FORWARD         0x01
351.1.6.2Syamt#define FW_WROPCODE_BYPASS          0x05
361.1.6.2Syamt
371.1.6.2Syamt#define FW_WROPCODE_TUNNEL_TX_PKT       0x03
381.1.6.2Syamt
391.1.6.2Syamt#define FW_WROPOCDE_ULPTX_DATA_SGL      0x00
401.1.6.2Syamt#define FW_WROPCODE_ULPTX_MEM_READ      0x02
411.1.6.2Syamt#define FW_WROPCODE_ULPTX_PKT           0x04
421.1.6.2Syamt#define FW_WROPCODE_ULPTX_INVALIDATE        0x06
431.1.6.2Syamt
441.1.6.2Syamt#define FW_WROPCODE_TUNNEL_RX_PKT       0x07
451.1.6.2Syamt
461.1.6.2Syamt#define FW_WROPCODE_OFLD_GETTCB_RPL     0x08
471.1.6.2Syamt#define FW_WROPCODE_OFLD_CLOSE_CON      0x09
481.1.6.2Syamt#define FW_WROPCODE_OFLD_TP_ABORT_CON_REQ   0x0A
491.1.6.2Syamt#define FW_WROPCODE_OFLD_HOST_ABORT_CON_RPL 0x0F
501.1.6.2Syamt#define FW_WROPCODE_OFLD_HOST_ABORT_CON_REQ 0x0B
511.1.6.2Syamt#define FW_WROPCODE_OFLD_TP_ABORT_CON_RPL   0x0C
521.1.6.2Syamt#define FW_WROPCODE_OFLD_TX_DATA        0x0D
531.1.6.2Syamt#define FW_WROPCODE_OFLD_TX_DATA_ACK        0x0E
541.1.6.2Syamt
551.1.6.2Syamt#define FW_WROPCODE_RI_RDMA_INIT        0x10
561.1.6.2Syamt#define FW_WROPCODE_RI_RDMA_WRITE       0x11
571.1.6.2Syamt#define FW_WROPCODE_RI_RDMA_READ_REQ        0x12
581.1.6.2Syamt#define FW_WROPCODE_RI_RDMA_READ_RESP       0x13
591.1.6.2Syamt#define FW_WROPCODE_RI_SEND         0x14
601.1.6.2Syamt#define FW_WROPCODE_RI_TERMINATE        0x15
611.1.6.2Syamt#define FW_WROPCODE_RI_RDMA_READ        0x16
621.1.6.2Syamt#define FW_WROPCODE_RI_RECEIVE          0x17
631.1.6.2Syamt#define FW_WROPCODE_RI_BIND_MW          0x18
641.1.6.2Syamt#define FW_WROPCODE_RI_FASTREGISTER_MR      0x19
651.1.6.2Syamt#define FW_WROPCODE_RI_LOCAL_INV        0x1A
661.1.6.2Syamt#define FW_WROPCODE_RI_MODIFY_QP        0x1B
671.1.6.2Syamt#define FW_WROPCODE_RI_BYPASS           0x1C
681.1.6.2Syamt
691.1.6.2Syamt#define FW_WROPOCDE_RSVD            0x1E
701.1.6.2Syamt
711.1.6.2Syamt#define FW_WROPCODE_SGE_EGRESSCONTEXT_RR    0x1F
721.1.6.2Syamt
731.1.6.2Syamt#define FW_WROPCODE_MNGT            0x1D
741.1.6.2Syamt#define FW_MNGTOPCODE_PKTSCHED_SET      0x00
751.1.6.2Syamt
761.1.6.2Syamt/* Maximum size of a WR sent from the host, limited by the SGE.
771.1.6.2Syamt *
781.1.6.2Syamt * Note: WR coming from ULP or TP are only limited by CIM.
791.1.6.2Syamt */
801.1.6.2Syamt#define FW_WR_SIZE          128
811.1.6.2Syamt
821.1.6.2Syamt/* Maximum number of outstanding WRs sent from the host. Value must be
831.1.6.2Syamt * programmed in the CTRL/TUNNEL/QP SGE Egress Context and used by
841.1.6.2Syamt * offload modules to limit the number of WRs per connection.
851.1.6.2Syamt */
861.1.6.2Syamt#define FW_T3_WR_NUM            16
871.1.6.2Syamt#define FW_N3_WR_NUM            7
881.1.6.2Syamt
891.1.6.2Syamt#ifndef N3
901.1.6.2Syamt# define FW_WR_NUM          FW_T3_WR_NUM
911.1.6.2Syamt#else
921.1.6.2Syamt# define FW_WR_NUM          FW_N3_WR_NUM
931.1.6.2Syamt#endif
941.1.6.2Syamt
951.1.6.2Syamt/* FW_TUNNEL_NUM corresponds to the number of supported TUNNEL Queues. These
961.1.6.2Syamt * queues must start at SGE Egress Context FW_TUNNEL_SGEEC_START and must
971.1.6.2Syamt * start at 'TID' (or 'uP Token') FW_TUNNEL_TID_START.
981.1.6.2Syamt *
991.1.6.2Syamt * Ingress Traffic (e.g. DMA completion credit)  for TUNNEL Queue[i] is sent
1001.1.6.2Syamt * to RESP Queue[i].
1011.1.6.2Syamt */
1021.1.6.2Syamt#define FW_TUNNEL_NUM           8
1031.1.6.2Syamt#define FW_TUNNEL_SGEEC_START       8
1041.1.6.2Syamt#define FW_TUNNEL_TID_START     65544
1051.1.6.2Syamt
1061.1.6.2Syamt
1071.1.6.2Syamt/* FW_CTRL_NUM corresponds to the number of supported CTRL Queues. These queues
1081.1.6.2Syamt * must start at SGE Egress Context FW_CTRL_SGEEC_START and must start at 'TID'
1091.1.6.2Syamt * (or 'uP Token') FW_CTRL_TID_START.
1101.1.6.2Syamt *
1111.1.6.2Syamt * Ingress Traffic for CTRL Queue[i] is sent to RESP Queue[i].
1121.1.6.2Syamt */
1131.1.6.2Syamt#define FW_CTRL_NUM         8
1141.1.6.2Syamt#define FW_CTRL_SGEEC_START     65528
1151.1.6.2Syamt#define FW_CTRL_TID_START       65536
1161.1.6.2Syamt
1171.1.6.2Syamt/* FW_OFLD_NUM corresponds to the number of supported OFFLOAD Queues. These
1181.1.6.2Syamt * queues must start at SGE Egress Context FW_OFLD_SGEEC_START.
1191.1.6.2Syamt *
1201.1.6.2Syamt * Note: the 'uP Token' in the SGE Egress Context fields is irrelevant for
1211.1.6.2Syamt * OFFLOAD Queues, as the host is responsible for providing the correct TID in
1221.1.6.2Syamt * every WR.
1231.1.6.2Syamt *
1241.1.6.2Syamt * Ingress Trafffic for OFFLOAD Queue[i] is sent to RESP Queue[i].
1251.1.6.2Syamt */
1261.1.6.2Syamt#define FW_OFLD_NUM         8
1271.1.6.2Syamt#define FW_OFLD_SGEEC_START     0
1281.1.6.2Syamt
1291.1.6.2Syamt/*
1301.1.6.2Syamt *
1311.1.6.2Syamt */
1321.1.6.2Syamt#define FW_RI_NUM           1
1331.1.6.2Syamt#define FW_RI_SGEEC_START       65527
1341.1.6.2Syamt#define FW_RI_TID_START         65552
1351.1.6.2Syamt
1361.1.6.2Syamt/*
1371.1.6.2Syamt * The RX_PKT_TID
1381.1.6.2Syamt */
1391.1.6.2Syamt#define FW_RX_PKT_NUM           1
1401.1.6.2Syamt#define FW_RX_PKT_TID_START     65553
1411.1.6.2Syamt
1421.1.6.2Syamt/* FW_WRC_NUM corresponds to the number of Work Request Context that supported
1431.1.6.2Syamt * by the firmware.
1441.1.6.2Syamt */
1451.1.6.2Syamt#define FW_WRC_NUM          \
1461.1.6.2Syamt    (65536 + FW_TUNNEL_NUM + FW_CTRL_NUM + FW_RI_NUM + FW_RX_PKT_NUM)
1471.1.6.2Syamt
1481.1.6.2Syamt/*
1491.1.6.2Syamt * FW type and version.
1501.1.6.2Syamt */
1511.1.6.2Syamt#define S_FW_VERSION_TYPE       28
1521.1.6.2Syamt#define M_FW_VERSION_TYPE       0xF
1531.1.6.2Syamt#define V_FW_VERSION_TYPE(x)        ((x) << S_FW_VERSION_TYPE)
1541.1.6.2Syamt#define G_FW_VERSION_TYPE(x)        \
1551.1.6.2Syamt    (((x) >> S_FW_VERSION_TYPE) & M_FW_VERSION_TYPE)
1561.1.6.2Syamt
1571.1.6.2Syamt#define S_FW_VERSION_MAJOR      16
1581.1.6.2Syamt#define M_FW_VERSION_MAJOR      0xFFF
1591.1.6.2Syamt#define V_FW_VERSION_MAJOR(x)       ((x) << S_FW_VERSION_MAJOR)
1601.1.6.2Syamt#define G_FW_VERSION_MAJOR(x)       \
1611.1.6.2Syamt    (((x) >> S_FW_VERSION_MAJOR) & M_FW_VERSION_MAJOR)
1621.1.6.2Syamt
1631.1.6.2Syamt#define S_FW_VERSION_MINOR      8
1641.1.6.2Syamt#define M_FW_VERSION_MINOR      0xFF
1651.1.6.2Syamt#define V_FW_VERSION_MINOR(x)       ((x) << S_FW_VERSION_MINOR)
1661.1.6.2Syamt#define G_FW_VERSION_MINOR(x)       \
1671.1.6.2Syamt    (((x) >> S_FW_VERSION_MINOR) & M_FW_VERSION_MINOR)
1681.1.6.2Syamt
1691.1.6.2Syamt#define S_FW_VERSION_MICRO      0
1701.1.6.2Syamt#define M_FW_VERSION_MICRO      0xFF
1711.1.6.2Syamt#define V_FW_VERSION_MICRO(x)       ((x) << S_FW_VERSION_MICRO)
1721.1.6.2Syamt#define G_FW_VERSION_MICRO(x)       \
1731.1.6.2Syamt    (((x) >> S_FW_VERSION_MICRO) & M_FW_VERSION_MICRO)
1741.1.6.2Syamt
1751.1.6.2Syamt#endif /* _FIRMWARE_EXPORTS_H_ */
176