Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 1 | /* bnx2x_fw_defs.h: Broadcom Everest network driver. |
| 2 | * |
Eilon Greenstein | 2b14402 | 2009-02-12 08:38:35 +0000 | [diff] [blame] | 3 | * Copyright (c) 2007-2009 Broadcom Corporation |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation. |
| 8 | */ |
| 9 | |
| 10 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 11 | #define CSTORM_ASSERT_LIST_INDEX_OFFSET \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 12 | (IS_E1H_OFFSET ? 0x7000 : 0x1000) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 13 | #define CSTORM_ASSERT_LIST_OFFSET(idx) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 14 | (IS_E1H_OFFSET ? (0x7020 + (idx * 0x10)) : (0x1020 + (idx * 0x10))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 15 | #define CSTORM_DEF_SB_HC_DISABLE_C_OFFSET(function, index) \ |
| 16 | (IS_E1H_OFFSET ? (0x8622 + ((function>>1) * 0x40) + \ |
| 17 | ((function&1) * 0x100) + (index * 0x4)) : (0x3562 + (function * \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 18 | 0x40) + (index * 0x4))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 19 | #define CSTORM_DEF_SB_HC_DISABLE_U_OFFSET(function, index) \ |
| 20 | (IS_E1H_OFFSET ? (0x8822 + ((function>>1) * 0x80) + \ |
| 21 | ((function&1) * 0x200) + (index * 0x4)) : (0x35e2 + (function * \ |
| 22 | 0x80) + (index * 0x4))) |
| 23 | #define CSTORM_DEF_SB_HOST_SB_ADDR_C_OFFSET(function) \ |
| 24 | (IS_E1H_OFFSET ? (0x8600 + ((function>>1) * 0x40) + \ |
| 25 | ((function&1) * 0x100)) : (0x3540 + (function * 0x40))) |
| 26 | #define CSTORM_DEF_SB_HOST_SB_ADDR_U_OFFSET(function) \ |
| 27 | (IS_E1H_OFFSET ? (0x8800 + ((function>>1) * 0x80) + \ |
| 28 | ((function&1) * 0x200)) : (0x35c0 + (function * 0x80))) |
| 29 | #define CSTORM_DEF_SB_HOST_STATUS_BLOCK_C_OFFSET(function) \ |
| 30 | (IS_E1H_OFFSET ? (0x8608 + ((function>>1) * 0x40) + \ |
| 31 | ((function&1) * 0x100)) : (0x3548 + (function * 0x40))) |
| 32 | #define CSTORM_DEF_SB_HOST_STATUS_BLOCK_U_OFFSET(function) \ |
| 33 | (IS_E1H_OFFSET ? (0x8808 + ((function>>1) * 0x80) + \ |
| 34 | ((function&1) * 0x200)) : (0x35c8 + (function * 0x80))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 35 | #define CSTORM_FUNCTION_MODE_OFFSET \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 36 | (IS_E1H_OFFSET ? 0x11e8 : 0xffffffff) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 37 | #define CSTORM_HC_BTR_C_OFFSET(port) \ |
| 38 | (IS_E1H_OFFSET ? (0x8c04 + (port * 0xf0)) : (0x36c4 + (port * 0xc0))) |
| 39 | #define CSTORM_HC_BTR_U_OFFSET(port) \ |
| 40 | (IS_E1H_OFFSET ? (0x8de4 + (port * 0xf0)) : (0x3844 + (port * 0xc0))) |
| 41 | #define CSTORM_ISCSI_CQ_SIZE_OFFSET(function) \ |
| 42 | (IS_E1H_OFFSET ? (0x6680 + (function * 0x8)) : (0x25a0 + \ |
| 43 | (function * 0x8))) |
| 44 | #define CSTORM_ISCSI_CQ_SQN_SIZE_OFFSET(function) \ |
| 45 | (IS_E1H_OFFSET ? (0x66c0 + (function * 0x8)) : (0x25b0 + \ |
| 46 | (function * 0x8))) |
| 47 | #define CSTORM_ISCSI_EQ_CONS_OFFSET(function, eqIdx) \ |
| 48 | (IS_E1H_OFFSET ? (0x6040 + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 49 | (0x2410 + (function * 0xc0) + (eqIdx * 0x18))) |
| 50 | #define CSTORM_ISCSI_EQ_NEXT_EQE_ADDR_OFFSET(function, eqIdx) \ |
| 51 | (IS_E1H_OFFSET ? (0x6044 + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 52 | (0x2414 + (function * 0xc0) + (eqIdx * 0x18))) |
| 53 | #define CSTORM_ISCSI_EQ_NEXT_PAGE_ADDR_OFFSET(function, eqIdx) \ |
| 54 | (IS_E1H_OFFSET ? (0x604c + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 55 | (0x241c + (function * 0xc0) + (eqIdx * 0x18))) |
| 56 | #define CSTORM_ISCSI_EQ_NEXT_PAGE_ADDR_VALID_OFFSET(function, eqIdx) \ |
| 57 | (IS_E1H_OFFSET ? (0x6057 + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 58 | (0x2427 + (function * 0xc0) + (eqIdx * 0x18))) |
| 59 | #define CSTORM_ISCSI_EQ_PROD_OFFSET(function, eqIdx) \ |
| 60 | (IS_E1H_OFFSET ? (0x6042 + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 61 | (0x2412 + (function * 0xc0) + (eqIdx * 0x18))) |
| 62 | #define CSTORM_ISCSI_EQ_SB_INDEX_OFFSET(function, eqIdx) \ |
| 63 | (IS_E1H_OFFSET ? (0x6056 + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 64 | (0x2426 + (function * 0xc0) + (eqIdx * 0x18))) |
| 65 | #define CSTORM_ISCSI_EQ_SB_NUM_OFFSET(function, eqIdx) \ |
| 66 | (IS_E1H_OFFSET ? (0x6054 + (function * 0xc0) + (eqIdx * 0x18)) : \ |
| 67 | (0x2424 + (function * 0xc0) + (eqIdx * 0x18))) |
| 68 | #define CSTORM_ISCSI_HQ_SIZE_OFFSET(function) \ |
| 69 | (IS_E1H_OFFSET ? (0x6640 + (function * 0x8)) : (0x2590 + \ |
| 70 | (function * 0x8))) |
| 71 | #define CSTORM_ISCSI_NUM_OF_TASKS_OFFSET(function) \ |
| 72 | (IS_E1H_OFFSET ? (0x6004 + (function * 0x8)) : (0x2404 + \ |
| 73 | (function * 0x8))) |
| 74 | #define CSTORM_ISCSI_PAGE_SIZE_LOG_OFFSET(function) \ |
| 75 | (IS_E1H_OFFSET ? (0x6002 + (function * 0x8)) : (0x2402 + \ |
| 76 | (function * 0x8))) |
| 77 | #define CSTORM_ISCSI_PAGE_SIZE_OFFSET(function) \ |
| 78 | (IS_E1H_OFFSET ? (0x6000 + (function * 0x8)) : (0x2400 + \ |
| 79 | (function * 0x8))) |
| 80 | #define CSTORM_SB_HC_DISABLE_C_OFFSET(port, cpu_id, index) \ |
| 81 | (IS_E1H_OFFSET ? (0x811a + (port * 0x280) + (cpu_id * 0x28) + \ |
| 82 | (index * 0x4)) : (0x305a + (port * 0x280) + (cpu_id * 0x28) + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 83 | (index * 0x4))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 84 | #define CSTORM_SB_HC_DISABLE_U_OFFSET(port, cpu_id, index) \ |
| 85 | (IS_E1H_OFFSET ? (0xb01a + (port * 0x800) + (cpu_id * 0x80) + \ |
| 86 | (index * 0x4)) : (0x401a + (port * 0x800) + (cpu_id * 0x80) + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 87 | (index * 0x4))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 88 | #define CSTORM_SB_HC_TIMEOUT_C_OFFSET(port, cpu_id, index) \ |
| 89 | (IS_E1H_OFFSET ? (0x8118 + (port * 0x280) + (cpu_id * 0x28) + \ |
| 90 | (index * 0x4)) : (0x3058 + (port * 0x280) + (cpu_id * 0x28) + \ |
| 91 | (index * 0x4))) |
| 92 | #define CSTORM_SB_HC_TIMEOUT_U_OFFSET(port, cpu_id, index) \ |
| 93 | (IS_E1H_OFFSET ? (0xb018 + (port * 0x800) + (cpu_id * 0x80) + \ |
| 94 | (index * 0x4)) : (0x4018 + (port * 0x800) + (cpu_id * 0x80) + \ |
| 95 | (index * 0x4))) |
| 96 | #define CSTORM_SB_HOST_SB_ADDR_C_OFFSET(port, cpu_id) \ |
| 97 | (IS_E1H_OFFSET ? (0x8100 + (port * 0x280) + (cpu_id * 0x28)) : \ |
| 98 | (0x3040 + (port * 0x280) + (cpu_id * 0x28))) |
| 99 | #define CSTORM_SB_HOST_SB_ADDR_U_OFFSET(port, cpu_id) \ |
| 100 | (IS_E1H_OFFSET ? (0xb000 + (port * 0x800) + (cpu_id * 0x80)) : \ |
| 101 | (0x4000 + (port * 0x800) + (cpu_id * 0x80))) |
| 102 | #define CSTORM_SB_HOST_STATUS_BLOCK_C_OFFSET(port, cpu_id) \ |
| 103 | (IS_E1H_OFFSET ? (0x8108 + (port * 0x280) + (cpu_id * 0x28)) : \ |
| 104 | (0x3048 + (port * 0x280) + (cpu_id * 0x28))) |
| 105 | #define CSTORM_SB_HOST_STATUS_BLOCK_U_OFFSET(port, cpu_id) \ |
| 106 | (IS_E1H_OFFSET ? (0xb008 + (port * 0x800) + (cpu_id * 0x80)) : \ |
| 107 | (0x4008 + (port * 0x800) + (cpu_id * 0x80))) |
| 108 | #define CSTORM_SB_STATUS_BLOCK_C_SIZE 0x10 |
| 109 | #define CSTORM_SB_STATUS_BLOCK_U_SIZE 0x60 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 110 | #define CSTORM_STATS_FLAGS_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 111 | (IS_E1H_OFFSET ? (0x1108 + (function * 0x8)) : (0x5108 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 112 | (function * 0x8))) |
| 113 | #define TSTORM_APPROXIMATE_MATCH_MULTICAST_FILTERING_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 114 | (IS_E1H_OFFSET ? (0x3200 + (function * 0x20)) : 0xffffffff) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 115 | #define TSTORM_ASSERT_LIST_INDEX_OFFSET \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 116 | (IS_E1H_OFFSET ? 0xa000 : 0x1000) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 117 | #define TSTORM_ASSERT_LIST_OFFSET(idx) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 118 | (IS_E1H_OFFSET ? (0xa020 + (idx * 0x10)) : (0x1020 + (idx * 0x10))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 119 | #define TSTORM_CLIENT_CONFIG_OFFSET(port, client_id) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 120 | (IS_E1H_OFFSET ? (0x33a0 + (port * 0x1a0) + (client_id * 0x10)) \ |
| 121 | : (0x9c0 + (port * 0x120) + (client_id * 0x10))) |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 122 | #define TSTORM_COMMON_SAFC_WORKAROUND_ENABLE_OFFSET \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 123 | (IS_E1H_OFFSET ? 0x1ed8 : 0xffffffff) |
| 124 | #define TSTORM_COMMON_SAFC_WORKAROUND_TIMEOUT_10USEC_OFFSET \ |
| 125 | (IS_E1H_OFFSET ? 0x1eda : 0xffffffff) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 126 | #define TSTORM_DEF_SB_HC_DISABLE_OFFSET(function, index) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 127 | (IS_E1H_OFFSET ? (0xb01a + ((function>>1) * 0x28) + \ |
| 128 | ((function&1) * 0xa0) + (index * 0x4)) : (0x141a + (function * \ |
| 129 | 0x28) + (index * 0x4))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 130 | #define TSTORM_DEF_SB_HOST_SB_ADDR_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 131 | (IS_E1H_OFFSET ? (0xb000 + ((function>>1) * 0x28) + \ |
| 132 | ((function&1) * 0xa0)) : (0x1400 + (function * 0x28))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 133 | #define TSTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 134 | (IS_E1H_OFFSET ? (0xb008 + ((function>>1) * 0x28) + \ |
| 135 | ((function&1) * 0xa0)) : (0x1408 + (function * 0x28))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 136 | #define TSTORM_ETH_STATS_QUERY_ADDR_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 137 | (IS_E1H_OFFSET ? (0x2940 + (function * 0x8)) : (0x4928 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 138 | (function * 0x8))) |
| 139 | #define TSTORM_FUNCTION_COMMON_CONFIG_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 140 | (IS_E1H_OFFSET ? (0x3000 + (function * 0x40)) : (0x1500 + \ |
| 141 | (function * 0x40))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 142 | #define TSTORM_FUNCTION_MODE_OFFSET \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 143 | (IS_E1H_OFFSET ? 0x1ed0 : 0xffffffff) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 144 | #define TSTORM_HC_BTR_OFFSET(port) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 145 | (IS_E1H_OFFSET ? (0xb144 + (port * 0x30)) : (0x1454 + (port * 0x18))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 146 | #define TSTORM_INDIRECTION_TABLE_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 147 | (IS_E1H_OFFSET ? (0x12c8 + (function * 0x80)) : (0x22c8 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 148 | (function * 0x80))) |
| 149 | #define TSTORM_INDIRECTION_TABLE_SIZE 0x80 |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 150 | #define TSTORM_ISCSI_CONN_BUF_PBL_OFFSET(function, pblEntry) \ |
| 151 | (IS_E1H_OFFSET ? (0x60c0 + (function * 0x40) + (pblEntry * 0x8)) \ |
| 152 | : (0x4c30 + (function * 0x40) + (pblEntry * 0x8))) |
| 153 | #define TSTORM_ISCSI_ERROR_BITMAP_OFFSET(function) \ |
| 154 | (IS_E1H_OFFSET ? (0x6340 + (function * 0x8)) : (0x4cd0 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 155 | (function * 0x8))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 156 | #define TSTORM_ISCSI_NUM_OF_TASKS_OFFSET(function) \ |
| 157 | (IS_E1H_OFFSET ? (0x6004 + (function * 0x8)) : (0x4c04 + \ |
| 158 | (function * 0x8))) |
| 159 | #define TSTORM_ISCSI_PAGE_SIZE_LOG_OFFSET(function) \ |
| 160 | (IS_E1H_OFFSET ? (0x6002 + (function * 0x8)) : (0x4c02 + \ |
| 161 | (function * 0x8))) |
| 162 | #define TSTORM_ISCSI_PAGE_SIZE_OFFSET(function) \ |
| 163 | (IS_E1H_OFFSET ? (0x6000 + (function * 0x8)) : (0x4c00 + \ |
| 164 | (function * 0x8))) |
| 165 | #define TSTORM_ISCSI_RQ_SIZE_OFFSET(function) \ |
| 166 | (IS_E1H_OFFSET ? (0x6080 + (function * 0x8)) : (0x4c20 + \ |
| 167 | (function * 0x8))) |
| 168 | #define TSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(function) \ |
| 169 | (IS_E1H_OFFSET ? (0x6040 + (function * 0x8)) : (0x4c10 + \ |
| 170 | (function * 0x8))) |
| 171 | #define TSTORM_ISCSI_TCP_VARS_LSB_LOCAL_MAC_ADDR_OFFSET(function) \ |
| 172 | (IS_E1H_OFFSET ? (0x6042 + (function * 0x8)) : (0x4c12 + \ |
| 173 | (function * 0x8))) |
| 174 | #define TSTORM_ISCSI_TCP_VARS_MSB_LOCAL_MAC_ADDR_OFFSET(function) \ |
| 175 | (IS_E1H_OFFSET ? (0x6044 + (function * 0x8)) : (0x4c14 + \ |
| 176 | (function * 0x8))) |
| 177 | #define TSTORM_MAC_FILTER_CONFIG_OFFSET(function) \ |
| 178 | (IS_E1H_OFFSET ? (0x3008 + (function * 0x40)) : (0x1508 + \ |
| 179 | (function * 0x40))) |
| 180 | #define TSTORM_PER_COUNTER_ID_STATS_OFFSET(port, stats_counter_id) \ |
| 181 | (IS_E1H_OFFSET ? (0x2010 + (port * 0x490) + (stats_counter_id * \ |
| 182 | 0x40)) : (0x4010 + (port * 0x490) + (stats_counter_id * 0x40))) |
| 183 | #define TSTORM_STATS_FLAGS_OFFSET(function) \ |
| 184 | (IS_E1H_OFFSET ? (0x29c0 + (function * 0x8)) : (0x4948 + \ |
| 185 | (function * 0x8))) |
| 186 | #define TSTORM_TCP_MAX_CWND_OFFSET(function) \ |
| 187 | (IS_E1H_OFFSET ? (0x4004 + (function * 0x8)) : (0x1fb4 + \ |
| 188 | (function * 0x8))) |
| 189 | #define USTORM_AGG_DATA_OFFSET (IS_E1H_OFFSET ? 0xa000 : 0x3000) |
| 190 | #define USTORM_AGG_DATA_SIZE (IS_E1H_OFFSET ? 0x2000 : 0x1000) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 191 | #define USTORM_ASSERT_LIST_INDEX_OFFSET \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 192 | (IS_E1H_OFFSET ? 0x8000 : 0x1000) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 193 | #define USTORM_ASSERT_LIST_OFFSET(idx) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 194 | (IS_E1H_OFFSET ? (0x8020 + (idx * 0x10)) : (0x1020 + (idx * 0x10))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 195 | #define USTORM_CQE_PAGE_BASE_OFFSET(port, clientId) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 196 | (IS_E1H_OFFSET ? (0x1010 + (port * 0x680) + (clientId * 0x40)) : \ |
| 197 | (0x4010 + (port * 0x360) + (clientId * 0x30))) |
| 198 | #define USTORM_CQE_PAGE_NEXT_OFFSET(port, clientId) \ |
| 199 | (IS_E1H_OFFSET ? (0x1028 + (port * 0x680) + (clientId * 0x40)) : \ |
| 200 | (0x4028 + (port * 0x360) + (clientId * 0x30))) |
| 201 | #define USTORM_ETH_PAUSE_ENABLED_OFFSET(port) \ |
| 202 | (IS_E1H_OFFSET ? (0x2ad4 + (port * 0x8)) : 0xffffffff) |
Eilon Greenstein | 1c06328 | 2009-02-12 08:36:43 +0000 | [diff] [blame] | 203 | #define USTORM_ETH_RING_PAUSE_DATA_OFFSET(port, clientId) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 204 | (IS_E1H_OFFSET ? (0x1030 + (port * 0x680) + (clientId * 0x40)) : \ |
Eilon Greenstein | 1c06328 | 2009-02-12 08:36:43 +0000 | [diff] [blame] | 205 | 0xffffffff) |
Eilon Greenstein | de832a5 | 2009-02-12 08:36:33 +0000 | [diff] [blame] | 206 | #define USTORM_ETH_STATS_QUERY_ADDR_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 207 | (IS_E1H_OFFSET ? (0x2a50 + (function * 0x8)) : (0x1dd0 + \ |
Eilon Greenstein | de832a5 | 2009-02-12 08:36:33 +0000 | [diff] [blame] | 208 | (function * 0x8))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 209 | #define USTORM_FUNCTION_MODE_OFFSET \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 210 | (IS_E1H_OFFSET ? 0x2448 : 0xffffffff) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 211 | #define USTORM_ISCSI_CQ_SIZE_OFFSET(function) \ |
| 212 | (IS_E1H_OFFSET ? (0x7044 + (function * 0x8)) : (0x2414 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 213 | (function * 0x8))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 214 | #define USTORM_ISCSI_CQ_SQN_SIZE_OFFSET(function) \ |
| 215 | (IS_E1H_OFFSET ? (0x7046 + (function * 0x8)) : (0x2416 + \ |
| 216 | (function * 0x8))) |
| 217 | #define USTORM_ISCSI_ERROR_BITMAP_OFFSET(function) \ |
| 218 | (IS_E1H_OFFSET ? (0x7688 + (function * 0x8)) : (0x29c8 + \ |
| 219 | (function * 0x8))) |
| 220 | #define USTORM_ISCSI_GLOBAL_BUF_PHYS_ADDR_OFFSET(function) \ |
| 221 | (IS_E1H_OFFSET ? (0x7648 + (function * 0x8)) : (0x29b8 + \ |
| 222 | (function * 0x8))) |
| 223 | #define USTORM_ISCSI_NUM_OF_TASKS_OFFSET(function) \ |
| 224 | (IS_E1H_OFFSET ? (0x7004 + (function * 0x8)) : (0x2404 + \ |
| 225 | (function * 0x8))) |
| 226 | #define USTORM_ISCSI_PAGE_SIZE_LOG_OFFSET(function) \ |
| 227 | (IS_E1H_OFFSET ? (0x7002 + (function * 0x8)) : (0x2402 + \ |
| 228 | (function * 0x8))) |
| 229 | #define USTORM_ISCSI_PAGE_SIZE_OFFSET(function) \ |
| 230 | (IS_E1H_OFFSET ? (0x7000 + (function * 0x8)) : (0x2400 + \ |
| 231 | (function * 0x8))) |
| 232 | #define USTORM_ISCSI_R2TQ_SIZE_OFFSET(function) \ |
| 233 | (IS_E1H_OFFSET ? (0x7040 + (function * 0x8)) : (0x2410 + \ |
| 234 | (function * 0x8))) |
| 235 | #define USTORM_ISCSI_RQ_BUFFER_SIZE_OFFSET(function) \ |
| 236 | (IS_E1H_OFFSET ? (0x7080 + (function * 0x8)) : (0x2420 + \ |
| 237 | (function * 0x8))) |
| 238 | #define USTORM_ISCSI_RQ_SIZE_OFFSET(function) \ |
| 239 | (IS_E1H_OFFSET ? (0x7084 + (function * 0x8)) : (0x2424 + \ |
| 240 | (function * 0x8))) |
| 241 | #define USTORM_MAX_AGG_SIZE_OFFSET(port, clientId) \ |
| 242 | (IS_E1H_OFFSET ? (0x1018 + (port * 0x680) + (clientId * 0x40)) : \ |
| 243 | (0x4018 + (port * 0x360) + (clientId * 0x30))) |
| 244 | #define USTORM_MEM_WORKAROUND_ADDRESS_OFFSET(function) \ |
| 245 | (IS_E1H_OFFSET ? (0x2408 + (function * 0x8)) : (0x1da8 + \ |
| 246 | (function * 0x8))) |
Eilon Greenstein | de832a5 | 2009-02-12 08:36:33 +0000 | [diff] [blame] | 247 | #define USTORM_PER_COUNTER_ID_STATS_OFFSET(port, stats_counter_id) \ |
| 248 | (IS_E1H_OFFSET ? (0x2450 + (port * 0x2d0) + (stats_counter_id * \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 249 | 0x28)) : (0x1500 + (port * 0x2d0) + (stats_counter_id * 0x28))) |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 250 | #define USTORM_RX_PRODS_OFFSET(port, client_id) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 251 | (IS_E1H_OFFSET ? (0x1000 + (port * 0x680) + (client_id * 0x40)) \ |
| 252 | : (0x4000 + (port * 0x360) + (client_id * 0x30))) |
Eilon Greenstein | de832a5 | 2009-02-12 08:36:33 +0000 | [diff] [blame] | 253 | #define USTORM_STATS_FLAGS_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 254 | (IS_E1H_OFFSET ? (0x29f0 + (function * 0x8)) : (0x1db8 + \ |
Eilon Greenstein | de832a5 | 2009-02-12 08:36:33 +0000 | [diff] [blame] | 255 | (function * 0x8))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 256 | #define USTORM_TPA_BTR_OFFSET (IS_E1H_OFFSET ? 0x3da5 : 0x5095) |
| 257 | #define USTORM_TPA_BTR_SIZE 0x1 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 258 | #define XSTORM_ASSERT_LIST_INDEX_OFFSET \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 259 | (IS_E1H_OFFSET ? 0x9000 : 0x1000) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 260 | #define XSTORM_ASSERT_LIST_OFFSET(idx) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 261 | (IS_E1H_OFFSET ? (0x9020 + (idx * 0x10)) : (0x1020 + (idx * 0x10))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 262 | #define XSTORM_CMNG_PER_PORT_VARS_OFFSET(port) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 263 | (IS_E1H_OFFSET ? (0x24a8 + (port * 0x50)) : (0x3a80 + (port * 0x50))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 264 | #define XSTORM_DEF_SB_HC_DISABLE_OFFSET(function, index) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 265 | (IS_E1H_OFFSET ? (0xa01a + ((function>>1) * 0x28) + \ |
| 266 | ((function&1) * 0xa0) + (index * 0x4)) : (0x141a + (function * \ |
| 267 | 0x28) + (index * 0x4))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 268 | #define XSTORM_DEF_SB_HOST_SB_ADDR_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 269 | (IS_E1H_OFFSET ? (0xa000 + ((function>>1) * 0x28) + \ |
| 270 | ((function&1) * 0xa0)) : (0x1400 + (function * 0x28))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 271 | #define XSTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 272 | (IS_E1H_OFFSET ? (0xa008 + ((function>>1) * 0x28) + \ |
| 273 | ((function&1) * 0xa0)) : (0x1408 + (function * 0x28))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 274 | #define XSTORM_E1HOV_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 275 | (IS_E1H_OFFSET ? (0x2c10 + (function * 0x8)) : 0xffffffff) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 276 | #define XSTORM_ETH_STATS_QUERY_ADDR_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 277 | (IS_E1H_OFFSET ? (0x2418 + (function * 0x8)) : (0x3a50 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 278 | (function * 0x8))) |
| 279 | #define XSTORM_FAIRNESS_PER_VN_VARS_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 280 | (IS_E1H_OFFSET ? (0x2588 + (function * 0x90)) : (0x3b60 + \ |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 281 | (function * 0x90))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 282 | #define XSTORM_FUNCTION_MODE_OFFSET \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 283 | (IS_E1H_OFFSET ? 0x2c50 : 0xffffffff) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 284 | #define XSTORM_HC_BTR_OFFSET(port) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 285 | (IS_E1H_OFFSET ? (0xa144 + (port * 0x30)) : (0x1454 + (port * 0x18))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 286 | #define XSTORM_ISCSI_HQ_SIZE_OFFSET(function) \ |
| 287 | (IS_E1H_OFFSET ? (0x80c0 + (function * 0x8)) : (0x1c30 + \ |
| 288 | (function * 0x8))) |
| 289 | #define XSTORM_ISCSI_LOCAL_MAC_ADDR0_OFFSET(function) \ |
| 290 | (IS_E1H_OFFSET ? (0x8080 + (function * 0x8)) : (0x1c20 + \ |
| 291 | (function * 0x8))) |
| 292 | #define XSTORM_ISCSI_LOCAL_MAC_ADDR1_OFFSET(function) \ |
| 293 | (IS_E1H_OFFSET ? (0x8081 + (function * 0x8)) : (0x1c21 + \ |
| 294 | (function * 0x8))) |
| 295 | #define XSTORM_ISCSI_LOCAL_MAC_ADDR2_OFFSET(function) \ |
| 296 | (IS_E1H_OFFSET ? (0x8082 + (function * 0x8)) : (0x1c22 + \ |
| 297 | (function * 0x8))) |
| 298 | #define XSTORM_ISCSI_LOCAL_MAC_ADDR3_OFFSET(function) \ |
| 299 | (IS_E1H_OFFSET ? (0x8083 + (function * 0x8)) : (0x1c23 + \ |
| 300 | (function * 0x8))) |
| 301 | #define XSTORM_ISCSI_LOCAL_MAC_ADDR4_OFFSET(function) \ |
| 302 | (IS_E1H_OFFSET ? (0x8084 + (function * 0x8)) : (0x1c24 + \ |
| 303 | (function * 0x8))) |
| 304 | #define XSTORM_ISCSI_LOCAL_MAC_ADDR5_OFFSET(function) \ |
| 305 | (IS_E1H_OFFSET ? (0x8085 + (function * 0x8)) : (0x1c25 + \ |
| 306 | (function * 0x8))) |
| 307 | #define XSTORM_ISCSI_LOCAL_VLAN_OFFSET(function) \ |
| 308 | (IS_E1H_OFFSET ? (0x8086 + (function * 0x8)) : (0x1c26 + \ |
| 309 | (function * 0x8))) |
| 310 | #define XSTORM_ISCSI_NUM_OF_TASKS_OFFSET(function) \ |
| 311 | (IS_E1H_OFFSET ? (0x8004 + (function * 0x8)) : (0x1c04 + \ |
| 312 | (function * 0x8))) |
| 313 | #define XSTORM_ISCSI_PAGE_SIZE_LOG_OFFSET(function) \ |
| 314 | (IS_E1H_OFFSET ? (0x8002 + (function * 0x8)) : (0x1c02 + \ |
| 315 | (function * 0x8))) |
| 316 | #define XSTORM_ISCSI_PAGE_SIZE_OFFSET(function) \ |
| 317 | (IS_E1H_OFFSET ? (0x8000 + (function * 0x8)) : (0x1c00 + \ |
| 318 | (function * 0x8))) |
| 319 | #define XSTORM_ISCSI_R2TQ_SIZE_OFFSET(function) \ |
| 320 | (IS_E1H_OFFSET ? (0x80c4 + (function * 0x8)) : (0x1c34 + \ |
| 321 | (function * 0x8))) |
| 322 | #define XSTORM_ISCSI_SQ_SIZE_OFFSET(function) \ |
| 323 | (IS_E1H_OFFSET ? (0x80c2 + (function * 0x8)) : (0x1c32 + \ |
| 324 | (function * 0x8))) |
| 325 | #define XSTORM_ISCSI_TCP_VARS_ADV_WND_SCL_OFFSET(function) \ |
| 326 | (IS_E1H_OFFSET ? (0x8043 + (function * 0x8)) : (0x1c13 + \ |
| 327 | (function * 0x8))) |
| 328 | #define XSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(function) \ |
| 329 | (IS_E1H_OFFSET ? (0x8042 + (function * 0x8)) : (0x1c12 + \ |
| 330 | (function * 0x8))) |
| 331 | #define XSTORM_ISCSI_TCP_VARS_TOS_OFFSET(function) \ |
| 332 | (IS_E1H_OFFSET ? (0x8041 + (function * 0x8)) : (0x1c11 + \ |
| 333 | (function * 0x8))) |
| 334 | #define XSTORM_ISCSI_TCP_VARS_TTL_OFFSET(function) \ |
| 335 | (IS_E1H_OFFSET ? (0x8040 + (function * 0x8)) : (0x1c10 + \ |
| 336 | (function * 0x8))) |
Yitchak Gertner | 66e855f | 2008-08-13 15:49:05 -0700 | [diff] [blame] | 337 | #define XSTORM_PER_COUNTER_ID_STATS_OFFSET(port, stats_counter_id) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 338 | (IS_E1H_OFFSET ? (0xc000 + (port * 0x360) + (stats_counter_id * \ |
| 339 | 0x30)) : (0x3378 + (port * 0x360) + (stats_counter_id * 0x30))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 340 | #define XSTORM_RATE_SHAPING_PER_VN_VARS_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 341 | (IS_E1H_OFFSET ? (0x2548 + (function * 0x90)) : (0x3b20 + \ |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 342 | (function * 0x90))) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 343 | #define XSTORM_SPQ_PAGE_BASE_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 344 | (IS_E1H_OFFSET ? (0x2000 + (function * 0x10)) : (0x3328 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 345 | (function * 0x10))) |
| 346 | #define XSTORM_SPQ_PROD_OFFSET(function) \ |
Eilon Greenstein | 6378c02 | 2008-08-13 15:59:25 -0700 | [diff] [blame] | 347 | (IS_E1H_OFFSET ? (0x2008 + (function * 0x10)) : (0x3330 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 348 | (function * 0x10))) |
| 349 | #define XSTORM_STATS_FLAGS_OFFSET(function) \ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 350 | (IS_E1H_OFFSET ? (0x23d8 + (function * 0x8)) : (0x3a40 + \ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 351 | (function * 0x8))) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 352 | #define XSTORM_TCP_GLOBAL_DEL_ACK_COUNTER_ENABLED_OFFSET(port) \ |
| 353 | (IS_E1H_OFFSET ? (0x4000 + (port * 0x8)) : (0x1960 + (port * 0x8))) |
| 354 | #define XSTORM_TCP_GLOBAL_DEL_ACK_COUNTER_MAX_COUNT_OFFSET(port) \ |
| 355 | (IS_E1H_OFFSET ? (0x4001 + (port * 0x8)) : (0x1961 + (port * 0x8))) |
| 356 | #define XSTORM_TCP_TX_SWS_TIMER_VAL_OFFSET(function) \ |
| 357 | (IS_E1H_OFFSET ? (0x4060 + ((function>>1) * 0x8) + ((function&1) \ |
| 358 | * 0x4)) : (0x1978 + (function * 0x4))) |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 359 | #define COMMON_ASM_INVALID_ASSERT_OPCODE 0x0 |
| 360 | |
| 361 | /** |
Eilon Greenstein | f537225 | 2009-02-12 08:38:30 +0000 | [diff] [blame] | 362 | * This file defines HSI constants for the ETH flow |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 363 | */ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 364 | #ifdef _EVEREST_MICROCODE |
| 365 | #include "microcode_constants.h" |
| 366 | #include "eth_rx_bd.h" |
| 367 | #include "eth_tx_bd.h" |
| 368 | #include "eth_rx_cqe.h" |
| 369 | #include "eth_rx_sge.h" |
| 370 | #include "eth_rx_cqe_next_page.h" |
| 371 | #endif |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 372 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 373 | /* RSS hash types */ |
| 374 | #define DEFAULT_HASH_TYPE 0 |
| 375 | #define IPV4_HASH_TYPE 1 |
| 376 | #define TCP_IPV4_HASH_TYPE 2 |
| 377 | #define IPV6_HASH_TYPE 3 |
| 378 | #define TCP_IPV6_HASH_TYPE 4 |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 379 | #define VLAN_PRI_HASH_TYPE 5 |
| 380 | #define E1HOV_PRI_HASH_TYPE 6 |
| 381 | #define DSCP_HASH_TYPE 7 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 382 | |
Eilon Greenstein | f537225 | 2009-02-12 08:38:30 +0000 | [diff] [blame] | 383 | |
| 384 | /* Ethernet Ring parameters */ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 385 | #define X_ETH_LOCAL_RING_SIZE 13 |
| 386 | #define FIRST_BD_IN_PKT 0 |
| 387 | #define PARSE_BD_INDEX 1 |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 388 | #define NUM_OF_ETH_BDS_IN_PAGE ((PAGE_SIZE)/(STRUCT_SIZE(eth_tx_bd)/8)) |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 389 | #define U_ETH_NUM_OF_SGES_TO_FETCH 8 |
| 390 | #define U_ETH_MAX_SGES_FOR_PACKET 3 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 391 | |
| 392 | /* Rx ring params */ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 393 | #define U_ETH_LOCAL_BD_RING_SIZE 8 |
| 394 | #define U_ETH_LOCAL_SGE_RING_SIZE 10 |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 395 | #define U_ETH_SGL_SIZE 8 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 396 | |
| 397 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 398 | #define U_ETH_SGES_PER_PAGE_INVERSE_MASK \ |
| 399 | (0xFFFF - ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1)) |
| 400 | |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 401 | #define TU_ETH_CQES_PER_PAGE (PAGE_SIZE/(STRUCT_SIZE(eth_rx_cqe)/8)) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 402 | #define U_ETH_BDS_PER_PAGE (PAGE_SIZE/(STRUCT_SIZE(eth_rx_bd)/8)) |
| 403 | #define U_ETH_SGES_PER_PAGE (PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8)) |
| 404 | |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 405 | #define U_ETH_BDS_PER_PAGE_MASK (U_ETH_BDS_PER_PAGE-1) |
| 406 | #define U_ETH_CQE_PER_PAGE_MASK (TU_ETH_CQES_PER_PAGE-1) |
| 407 | #define U_ETH_SGES_PER_PAGE_MASK (U_ETH_SGES_PER_PAGE-1) |
| 408 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 409 | #define U_ETH_UNDEFINED_Q 0xFF |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 410 | |
| 411 | /* values of command IDs in the ramrod message */ |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 412 | #define RAMROD_CMD_ID_ETH_PORT_SETUP 80 |
| 413 | #define RAMROD_CMD_ID_ETH_CLIENT_SETUP 85 |
| 414 | #define RAMROD_CMD_ID_ETH_STAT_QUERY 90 |
| 415 | #define RAMROD_CMD_ID_ETH_UPDATE 100 |
| 416 | #define RAMROD_CMD_ID_ETH_HALT 105 |
| 417 | #define RAMROD_CMD_ID_ETH_SET_MAC 110 |
| 418 | #define RAMROD_CMD_ID_ETH_CFC_DEL 115 |
| 419 | #define RAMROD_CMD_ID_ETH_PORT_DEL 120 |
| 420 | #define RAMROD_CMD_ID_ETH_FORWARD_SETUP 125 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 421 | |
| 422 | |
| 423 | /* command values for set mac command */ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 424 | #define T_ETH_MAC_COMMAND_SET 0 |
| 425 | #define T_ETH_MAC_COMMAND_INVALIDATE 1 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 426 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 427 | #define T_ETH_INDIRECTION_TABLE_SIZE 128 |
| 428 | |
| 429 | /*The CRC32 seed, that is used for the hash(reduction) multicast address */ |
| 430 | #define T_ETH_CRC32_HASH_SEED 0x00000000 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 431 | |
| 432 | /* Maximal L2 clients supported */ |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 433 | #define ETH_MAX_RX_CLIENTS_E1 18 |
| 434 | #define ETH_MAX_RX_CLIENTS_E1H 26 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 435 | |
| 436 | /* Maximal aggregation queues supported */ |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 437 | #define ETH_MAX_AGGREGATION_QUEUES_E1 32 |
| 438 | #define ETH_MAX_AGGREGATION_QUEUES_E1H 64 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 439 | |
Eilon Greenstein | 555f6c7 | 2009-02-12 08:36:11 +0000 | [diff] [blame] | 440 | /* ETH RSS modes */ |
| 441 | #define ETH_RSS_MODE_DISABLED 0 |
| 442 | #define ETH_RSS_MODE_REGULAR 1 |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 443 | #define ETH_RSS_MODE_VLAN_PRI 2 |
| 444 | #define ETH_RSS_MODE_E1HOV_PRI 3 |
| 445 | #define ETH_RSS_MODE_IP_DSCP 4 |
Eilon Greenstein | 555f6c7 | 2009-02-12 08:36:11 +0000 | [diff] [blame] | 446 | |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 447 | |
| 448 | /** |
Eilon Greenstein | f537225 | 2009-02-12 08:38:30 +0000 | [diff] [blame] | 449 | * This file defines HSI constants common to all microcode flows |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 450 | */ |
| 451 | |
| 452 | /* Connection types */ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 453 | #define ETH_CONNECTION_TYPE 0 |
| 454 | #define TOE_CONNECTION_TYPE 1 |
| 455 | #define RDMA_CONNECTION_TYPE 2 |
| 456 | #define ISCSI_CONNECTION_TYPE 3 |
| 457 | #define FCOE_CONNECTION_TYPE 4 |
| 458 | #define RESERVED_CONNECTION_TYPE_0 5 |
| 459 | #define RESERVED_CONNECTION_TYPE_1 6 |
| 460 | #define RESERVED_CONNECTION_TYPE_2 7 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 461 | |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 462 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 463 | #define PROTOCOL_STATE_BIT_OFFSET 6 |
| 464 | |
| 465 | #define ETH_STATE (ETH_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) |
| 466 | #define TOE_STATE (TOE_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) |
| 467 | #define RDMA_STATE (RDMA_CONNECTION_TYPE << PROTOCOL_STATE_BIT_OFFSET) |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 468 | |
| 469 | /* microcode fixed page page size 4K (chains and ring segments) */ |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 470 | #define MC_PAGE_SIZE 4096 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 471 | |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 472 | |
| 473 | /* Host coalescing constants */ |
| 474 | |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 475 | /* index numbers */ |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 476 | #define HC_USTORM_DEF_SB_NUM_INDICES 8 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 477 | #define HC_CSTORM_DEF_SB_NUM_INDICES 8 |
| 478 | #define HC_XSTORM_DEF_SB_NUM_INDICES 4 |
| 479 | #define HC_TSTORM_DEF_SB_NUM_INDICES 4 |
| 480 | #define HC_USTORM_SB_NUM_INDICES 4 |
| 481 | #define HC_CSTORM_SB_NUM_INDICES 4 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 482 | |
Eilon Greenstein | f537225 | 2009-02-12 08:38:30 +0000 | [diff] [blame] | 483 | /* index values - which counter to update */ |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 484 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 485 | #define HC_INDEX_U_TOE_RX_CQ_CONS 0 |
| 486 | #define HC_INDEX_U_ETH_RX_CQ_CONS 1 |
| 487 | #define HC_INDEX_U_ETH_RX_BD_CONS 2 |
| 488 | #define HC_INDEX_U_FCOE_EQ_CONS 3 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 489 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 490 | #define HC_INDEX_C_TOE_TX_CQ_CONS 0 |
| 491 | #define HC_INDEX_C_ETH_TX_CQ_CONS 1 |
| 492 | #define HC_INDEX_C_ISCSI_EQ_CONS 2 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 493 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 494 | #define HC_INDEX_DEF_X_SPQ_CONS 0 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 495 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 496 | #define HC_INDEX_DEF_C_RDMA_EQ_CONS 0 |
| 497 | #define HC_INDEX_DEF_C_RDMA_NAL_PROD 1 |
| 498 | #define HC_INDEX_DEF_C_ETH_FW_TX_CQ_CONS 2 |
| 499 | #define HC_INDEX_DEF_C_ETH_SLOW_PATH 3 |
| 500 | #define HC_INDEX_DEF_C_ETH_RDMA_CQ_CONS 4 |
| 501 | #define HC_INDEX_DEF_C_ETH_ISCSI_CQ_CONS 5 |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 502 | #define HC_INDEX_DEF_C_ETH_FCOE_CQ_CONS 6 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 503 | |
| 504 | #define HC_INDEX_DEF_U_ETH_RDMA_RX_CQ_CONS 0 |
| 505 | #define HC_INDEX_DEF_U_ETH_ISCSI_RX_CQ_CONS 1 |
| 506 | #define HC_INDEX_DEF_U_ETH_RDMA_RX_BD_CONS 2 |
| 507 | #define HC_INDEX_DEF_U_ETH_ISCSI_RX_BD_CONS 3 |
Eilon Greenstein | ca00392 | 2009-08-12 22:53:28 -0700 | [diff] [blame] | 508 | #define HC_INDEX_DEF_U_ETH_FCOE_RX_CQ_CONS 4 |
| 509 | #define HC_INDEX_DEF_U_ETH_FCOE_RX_BD_CONS 5 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 510 | |
| 511 | /* used by the driver to get the SB offset */ |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 512 | #define USTORM_ID 0 |
| 513 | #define CSTORM_ID 1 |
| 514 | #define XSTORM_ID 2 |
| 515 | #define TSTORM_ID 3 |
| 516 | #define ATTENTION_ID 4 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 517 | |
| 518 | /* max number of slow path commands per port */ |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 519 | #define MAX_RAMRODS_PER_PORT 8 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 520 | |
| 521 | /* values for RX ETH CQE type field */ |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 522 | #define RX_ETH_CQE_TYPE_ETH_FASTPATH 0 |
| 523 | #define RX_ETH_CQE_TYPE_ETH_RAMROD 1 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 524 | |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 525 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 526 | /**** DEFINES FOR TIMERS/CLOCKS RESOLUTIONS ****/ |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 527 | #define EMULATION_FREQUENCY_FACTOR 1600 |
| 528 | #define FPGA_FREQUENCY_FACTOR 100 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 529 | |
| 530 | #define TIMERS_TICK_SIZE_CHIP (1e-3) |
| 531 | #define TIMERS_TICK_SIZE_EMUL \ |
| 532 | ((TIMERS_TICK_SIZE_CHIP)/((EMULATION_FREQUENCY_FACTOR))) |
| 533 | #define TIMERS_TICK_SIZE_FPGA \ |
| 534 | ((TIMERS_TICK_SIZE_CHIP)/((FPGA_FREQUENCY_FACTOR))) |
| 535 | |
| 536 | #define TSEMI_CLK1_RESUL_CHIP (1e-3) |
| 537 | #define TSEMI_CLK1_RESUL_EMUL \ |
| 538 | ((TSEMI_CLK1_RESUL_CHIP)/(EMULATION_FREQUENCY_FACTOR)) |
| 539 | #define TSEMI_CLK1_RESUL_FPGA \ |
| 540 | ((TSEMI_CLK1_RESUL_CHIP)/(FPGA_FREQUENCY_FACTOR)) |
| 541 | |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 542 | #define USEMI_CLK1_RESUL_CHIP (TIMERS_TICK_SIZE_CHIP) |
| 543 | #define USEMI_CLK1_RESUL_EMUL (TIMERS_TICK_SIZE_EMUL) |
| 544 | #define USEMI_CLK1_RESUL_FPGA (TIMERS_TICK_SIZE_FPGA) |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 545 | |
| 546 | #define XSEMI_CLK1_RESUL_CHIP (1e-3) |
| 547 | #define XSEMI_CLK1_RESUL_EMUL \ |
| 548 | ((XSEMI_CLK1_RESUL_CHIP)/(EMULATION_FREQUENCY_FACTOR)) |
| 549 | #define XSEMI_CLK1_RESUL_FPGA \ |
| 550 | ((XSEMI_CLK1_RESUL_CHIP)/(FPGA_FREQUENCY_FACTOR)) |
| 551 | |
| 552 | #define XSEMI_CLK2_RESUL_CHIP (1e-6) |
| 553 | #define XSEMI_CLK2_RESUL_EMUL \ |
| 554 | ((XSEMI_CLK2_RESUL_CHIP)/(EMULATION_FREQUENCY_FACTOR)) |
| 555 | #define XSEMI_CLK2_RESUL_FPGA \ |
| 556 | ((XSEMI_CLK2_RESUL_CHIP)/(FPGA_FREQUENCY_FACTOR)) |
| 557 | |
| 558 | #define SDM_TIMER_TICK_RESUL_CHIP (4*(1e-6)) |
| 559 | #define SDM_TIMER_TICK_RESUL_EMUL \ |
| 560 | ((SDM_TIMER_TICK_RESUL_CHIP)/(EMULATION_FREQUENCY_FACTOR)) |
| 561 | #define SDM_TIMER_TICK_RESUL_FPGA \ |
| 562 | ((SDM_TIMER_TICK_RESUL_CHIP)/(FPGA_FREQUENCY_FACTOR)) |
| 563 | |
| 564 | |
| 565 | /**** END DEFINES FOR TIMERS/CLOCKS RESOLUTIONS ****/ |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 566 | #define XSTORM_IP_ID_ROLL_HALF 0x8000 |
| 567 | #define XSTORM_IP_ID_ROLL_ALL 0 |
| 568 | |
Eilon Greenstein | 356e238 | 2009-02-12 08:38:32 +0000 | [diff] [blame] | 569 | #define FW_LOG_LIST_SIZE 50 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 570 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 571 | #define NUM_OF_PROTOCOLS 4 |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 572 | #define NUM_OF_SAFC_BITS 16 |
| 573 | #define MAX_COS_NUMBER 4 |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 574 | #define MAX_T_STAT_COUNTER_ID 18 |
| 575 | #define MAX_X_STAT_COUNTER_ID 18 |
Eilon Greenstein | 8d9c5f3 | 2009-02-15 23:24:08 -0800 | [diff] [blame] | 576 | #define MAX_U_STAT_COUNTER_ID 18 |
| 577 | |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 578 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 579 | #define UNKNOWN_ADDRESS 0 |
| 580 | #define UNICAST_ADDRESS 1 |
| 581 | #define MULTICAST_ADDRESS 2 |
| 582 | #define BROADCAST_ADDRESS 3 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 583 | |
Eilon Greenstein | 34f80b0 | 2008-06-23 20:33:01 -0700 | [diff] [blame] | 584 | #define SINGLE_FUNCTION 0 |
| 585 | #define MULTI_FUNCTION 1 |
| 586 | |
| 587 | #define IP_V4 0 |
| 588 | #define IP_V6 1 |
Eliezer Tamir | a2fbb9e | 2007-11-15 20:09:02 +0200 | [diff] [blame] | 589 | |