2 * ----------------------------------------------------------------------------
3 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>> COPYRIGHT NOTICE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
4 * ----------------------------------------------------------------------------
5 * Copyright 2004 (C) Chelsio Communications, Inc. (Chelsio)
7 * Chelsio Communications, Inc. owns the sole copyright to this software.
8 * You may not make a copy, you may not derive works herefrom, and you may
9 * not distribute this work to others. Other restrictions of rights may apply
10 * as well. This is unpublished, confidential information. All rights reserved.
11 * This software contains confidential information and trade secrets of Chelsio
12 * Communications, Inc. Use, disclosure, or reproduction is prohibited without
13 * the prior express written permission of Chelsio Communications, Inc.
14 * ----------------------------------------------------------------------------
15 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Warranty <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
16 * ----------------------------------------------------------------------------
17 * CHELSIO MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THE USE OF THIS
18 * SOFTWARE, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
20 * ----------------------------------------------------------------------------
22 * This is the firmware_exports.h header file, firmware interface defines.
24 * Written January 2005 by felix marti (felix@chelsio.com)
26 #ifndef _FIRMWARE_EXPORTS_H_
27 #define _FIRMWARE_EXPORTS_H_
29 /* WR OPCODES supported by the firmware.
31 #define FW_WROPCODE_FORWARD 0x01
32 #define FW_WROPCODE_BYPASS 0x05
34 #define FW_WROPCODE_TUNNEL_TX_PKT 0x03
36 #define FW_WROPOCDE_ULPTX_DATA_SGL 0x00
37 #define FW_WROPCODE_ULPTX_MEM_READ 0x02
38 #define FW_WROPCODE_ULPTX_PKT 0x04
39 #define FW_WROPCODE_ULPTX_INVALIDATE 0x06
41 #define FW_WROPCODE_TUNNEL_RX_PKT 0x07
43 #define FW_WROPCODE_OFLD_GETTCB_RPL 0x08
44 #define FW_WROPCODE_OFLD_CLOSE_CON 0x09
45 #define FW_WROPCODE_OFLD_TP_ABORT_CON_REQ 0x0A
46 #define FW_WROPCODE_OFLD_HOST_ABORT_CON_RPL 0x0F
47 #define FW_WROPCODE_OFLD_HOST_ABORT_CON_REQ 0x0B
48 #define FW_WROPCODE_OFLD_TP_ABORT_CON_RPL 0x0C
49 #define FW_WROPCODE_OFLD_TX_DATA 0x0D
50 #define FW_WROPCODE_OFLD_TX_DATA_ACK 0x0E
52 #define FW_WROPCODE_RI_RDMA_INIT 0x10
53 #define FW_WROPCODE_RI_RDMA_WRITE 0x11
54 #define FW_WROPCODE_RI_RDMA_READ_REQ 0x12
55 #define FW_WROPCODE_RI_RDMA_READ_RESP 0x13
56 #define FW_WROPCODE_RI_SEND 0x14
57 #define FW_WROPCODE_RI_TERMINATE 0x15
58 #define FW_WROPCODE_RI_RDMA_READ 0x16
59 #define FW_WROPCODE_RI_RECEIVE 0x17
60 #define FW_WROPCODE_RI_BIND_MW 0x18
61 #define FW_WROPCODE_RI_FASTREGISTER_MR 0x19
62 #define FW_WROPCODE_RI_LOCAL_INV 0x1A
63 #define FW_WROPCODE_RI_MODIFY_QP 0x1B
64 #define FW_WROPCODE_RI_BYPASS 0x1C
66 #define FW_WROPOCDE_RSVD 0x1E
68 #define FW_WROPCODE_SGE_EGRESSCONTEXT_RR 0x1F
70 #define FW_WROPCODE_MNGT 0x1D
71 #define FW_MNGTOPCODE_PKTSCHED_SET 0x00
73 /* Maximum size of a WR sent from the host, limited by the SGE.
75 * Note: WR coming from ULP or TP are only limited by CIM.
77 #define FW_WR_SIZE 128
79 /* Maximum number of outstanding WRs sent from the host. Value must be
80 * programmed in the CTRL/TUNNEL/QP SGE Egress Context and used by
81 * offload modules to limit the number of WRs per connection.
83 #define FW_T3_WR_NUM 16
84 #define FW_N3_WR_NUM 7
87 # define FW_WR_NUM FW_T3_WR_NUM
89 # define FW_WR_NUM FW_N3_WR_NUM
92 /* FW_TUNNEL_NUM corresponds to the number of supported TUNNEL Queues. These
93 * queues must start at SGE Egress Context FW_TUNNEL_SGEEC_START and must
94 * start at 'TID' (or 'uP Token') FW_TUNNEL_TID_START.
96 * Ingress Traffic (e.g. DMA completion credit) for TUNNEL Queue[i] is sent
99 #define FW_TUNNEL_NUM 8
100 #define FW_TUNNEL_SGEEC_START 8
101 #define FW_TUNNEL_TID_START 65544
103 /* FW_CTRL_NUM corresponds to the number of supported CTRL Queues. These queues
104 * must start at SGE Egress Context FW_CTRL_SGEEC_START and must start at 'TID'
105 * (or 'uP Token') FW_CTRL_TID_START.
107 * Ingress Traffic for CTRL Queue[i] is sent to RESP Queue[i].
109 #define FW_CTRL_NUM 8
110 #define FW_CTRL_SGEEC_START 65528
111 #define FW_CTRL_TID_START 65536
113 /* FW_OFLD_NUM corresponds to the number of supported OFFLOAD Queues. These
114 * queues must start at SGE Egress Context FW_OFLD_SGEEC_START.
116 * Note: the 'uP Token' in the SGE Egress Context fields is irrelevant for
117 * OFFLOAD Queues, as the host is responsible for providing the correct TID in
120 * Ingress Trafffic for OFFLOAD Queue[i] is sent to RESP Queue[i].
122 #define FW_OFLD_NUM 8
123 #define FW_OFLD_SGEEC_START 0
129 #define FW_RI_SGEEC_START 65527
130 #define FW_RI_TID_START 65552
135 #define FW_RX_PKT_NUM 1
136 #define FW_RX_PKT_TID_START 65553
138 /* FW_WRC_NUM corresponds to the number of Work Request Context that supported
142 (65536 + FW_TUNNEL_NUM + FW_CTRL_NUM + FW_RI_NUM + FW_RX_PKT_NUM)
144 #endif /* _FIRMWARE_EXPORTS_H_ */