Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1 | /* QLogic qed NIC Driver |
| 2 | * Copyright (c) 2015 QLogic Corporation |
| 3 | * |
| 4 | * This software is available under the terms of the GNU General Public License |
| 5 | * (GPL) Version 2, available from the file COPYING in the main directory of |
| 6 | * this source tree. |
| 7 | */ |
| 8 | |
| 9 | #ifndef _QED_HSI_H |
| 10 | #define _QED_HSI_H |
| 11 | |
| 12 | #include <linux/types.h> |
| 13 | #include <linux/io.h> |
| 14 | #include <linux/bitops.h> |
| 15 | #include <linux/delay.h> |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/list.h> |
| 18 | #include <linux/slab.h> |
| 19 | #include <linux/qed/common_hsi.h> |
Yuval Mintz | 25c089d | 2015-10-26 11:02:26 +0200 | [diff] [blame] | 20 | #include <linux/qed/eth_common.h> |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 21 | |
| 22 | struct qed_hwfn; |
| 23 | struct qed_ptt; |
| 24 | /********************************/ |
| 25 | /* Add include to common target */ |
| 26 | /********************************/ |
| 27 | |
| 28 | /* opcodes for the event ring */ |
| 29 | enum common_event_opcode { |
| 30 | COMMON_EVENT_PF_START, |
| 31 | COMMON_EVENT_PF_STOP, |
Yuval Mintz | 1408cc1f | 2016-05-11 16:36:14 +0300 | [diff] [blame] | 32 | COMMON_EVENT_VF_START, |
Yuval Mintz | 0b55e27 | 2016-05-11 16:36:15 +0300 | [diff] [blame^] | 33 | COMMON_EVENT_VF_STOP, |
Yuval Mintz | 37bff2b | 2016-05-11 16:36:13 +0300 | [diff] [blame] | 34 | COMMON_EVENT_VF_PF_CHANNEL, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 35 | COMMON_EVENT_RESERVED4, |
| 36 | COMMON_EVENT_RESERVED5, |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 37 | COMMON_EVENT_RESERVED6, |
| 38 | COMMON_EVENT_EMPTY, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 39 | MAX_COMMON_EVENT_OPCODE |
| 40 | }; |
| 41 | |
| 42 | /* Common Ramrod Command IDs */ |
| 43 | enum common_ramrod_cmd_id { |
| 44 | COMMON_RAMROD_UNUSED, |
| 45 | COMMON_RAMROD_PF_START /* PF Function Start Ramrod */, |
| 46 | COMMON_RAMROD_PF_STOP /* PF Function Stop Ramrod */, |
Yuval Mintz | 1408cc1f | 2016-05-11 16:36:14 +0300 | [diff] [blame] | 47 | COMMON_RAMROD_VF_START, |
Yuval Mintz | 0b55e27 | 2016-05-11 16:36:15 +0300 | [diff] [blame^] | 48 | COMMON_RAMROD_VF_STOP, |
Manish Chopra | 464f664 | 2016-04-14 01:38:29 -0400 | [diff] [blame] | 49 | COMMON_RAMROD_PF_UPDATE, |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 50 | COMMON_RAMROD_EMPTY, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 51 | MAX_COMMON_RAMROD_CMD_ID |
| 52 | }; |
| 53 | |
| 54 | /* The core storm context for the Ystorm */ |
| 55 | struct ystorm_core_conn_st_ctx { |
| 56 | __le32 reserved[4]; |
| 57 | }; |
| 58 | |
| 59 | /* The core storm context for the Pstorm */ |
| 60 | struct pstorm_core_conn_st_ctx { |
| 61 | __le32 reserved[4]; |
| 62 | }; |
| 63 | |
| 64 | /* Core Slowpath Connection storm context of Xstorm */ |
| 65 | struct xstorm_core_conn_st_ctx { |
| 66 | __le32 spq_base_lo /* SPQ Ring Base Address low dword */; |
| 67 | __le32 spq_base_hi /* SPQ Ring Base Address high dword */; |
| 68 | struct regpair consolid_base_addr; |
| 69 | __le16 spq_cons /* SPQ Ring Consumer */; |
| 70 | __le16 consolid_cons /* Consolidation Ring Consumer */; |
| 71 | __le32 reserved0[55] /* Pad to 15 cycles */; |
| 72 | }; |
| 73 | |
| 74 | struct xstorm_core_conn_ag_ctx { |
| 75 | u8 reserved0 /* cdu_validation */; |
| 76 | u8 core_state /* state */; |
| 77 | u8 flags0; |
| 78 | #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 |
| 79 | #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 |
| 80 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED1_MASK 0x1 |
| 81 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED1_SHIFT 1 |
| 82 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED2_MASK 0x1 |
| 83 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED2_SHIFT 2 |
| 84 | #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 |
| 85 | #define XSTORM_CORE_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 |
| 86 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED3_MASK 0x1 |
| 87 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED3_SHIFT 4 |
| 88 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED4_MASK 0x1 |
| 89 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED4_SHIFT 5 |
| 90 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED5_MASK 0x1 /* bit6 */ |
| 91 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED5_SHIFT 6 |
| 92 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED6_MASK 0x1 /* bit7 */ |
| 93 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED6_SHIFT 7 |
| 94 | u8 flags1; |
| 95 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED7_MASK 0x1 /* bit8 */ |
| 96 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED7_SHIFT 0 |
| 97 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED8_MASK 0x1 /* bit9 */ |
| 98 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED8_SHIFT 1 |
| 99 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED9_MASK 0x1 /* bit10 */ |
| 100 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED9_SHIFT 2 |
| 101 | #define XSTORM_CORE_CONN_AG_CTX_BIT11_MASK 0x1 /* bit11 */ |
| 102 | #define XSTORM_CORE_CONN_AG_CTX_BIT11_SHIFT 3 |
| 103 | #define XSTORM_CORE_CONN_AG_CTX_BIT12_MASK 0x1 /* bit12 */ |
| 104 | #define XSTORM_CORE_CONN_AG_CTX_BIT12_SHIFT 4 |
| 105 | #define XSTORM_CORE_CONN_AG_CTX_BIT13_MASK 0x1 /* bit13 */ |
| 106 | #define XSTORM_CORE_CONN_AG_CTX_BIT13_SHIFT 5 |
| 107 | #define XSTORM_CORE_CONN_AG_CTX_TX_RULE_ACTIVE_MASK 0x1 /* bit14 */ |
| 108 | #define XSTORM_CORE_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT 6 |
| 109 | #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE_MASK 0x1 /* bit15 */ |
| 110 | #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT 7 |
| 111 | u8 flags2; |
| 112 | #define XSTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 /* timer0cf */ |
| 113 | #define XSTORM_CORE_CONN_AG_CTX_CF0_SHIFT 0 |
| 114 | #define XSTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 /* timer1cf */ |
| 115 | #define XSTORM_CORE_CONN_AG_CTX_CF1_SHIFT 2 |
| 116 | #define XSTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 /* timer2cf */ |
| 117 | #define XSTORM_CORE_CONN_AG_CTX_CF2_SHIFT 4 |
| 118 | #define XSTORM_CORE_CONN_AG_CTX_CF3_MASK 0x3 |
| 119 | #define XSTORM_CORE_CONN_AG_CTX_CF3_SHIFT 6 |
| 120 | u8 flags3; |
| 121 | #define XSTORM_CORE_CONN_AG_CTX_CF4_MASK 0x3 /* cf4 */ |
| 122 | #define XSTORM_CORE_CONN_AG_CTX_CF4_SHIFT 0 |
| 123 | #define XSTORM_CORE_CONN_AG_CTX_CF5_MASK 0x3 /* cf5 */ |
| 124 | #define XSTORM_CORE_CONN_AG_CTX_CF5_SHIFT 2 |
| 125 | #define XSTORM_CORE_CONN_AG_CTX_CF6_MASK 0x3 /* cf6 */ |
| 126 | #define XSTORM_CORE_CONN_AG_CTX_CF6_SHIFT 4 |
| 127 | #define XSTORM_CORE_CONN_AG_CTX_CF7_MASK 0x3 /* cf7 */ |
| 128 | #define XSTORM_CORE_CONN_AG_CTX_CF7_SHIFT 6 |
| 129 | u8 flags4; |
| 130 | #define XSTORM_CORE_CONN_AG_CTX_CF8_MASK 0x3 /* cf8 */ |
| 131 | #define XSTORM_CORE_CONN_AG_CTX_CF8_SHIFT 0 |
| 132 | #define XSTORM_CORE_CONN_AG_CTX_CF9_MASK 0x3 /* cf9 */ |
| 133 | #define XSTORM_CORE_CONN_AG_CTX_CF9_SHIFT 2 |
| 134 | #define XSTORM_CORE_CONN_AG_CTX_CF10_MASK 0x3 /* cf10 */ |
| 135 | #define XSTORM_CORE_CONN_AG_CTX_CF10_SHIFT 4 |
| 136 | #define XSTORM_CORE_CONN_AG_CTX_CF11_MASK 0x3 /* cf11 */ |
| 137 | #define XSTORM_CORE_CONN_AG_CTX_CF11_SHIFT 6 |
| 138 | u8 flags5; |
| 139 | #define XSTORM_CORE_CONN_AG_CTX_CF12_MASK 0x3 /* cf12 */ |
| 140 | #define XSTORM_CORE_CONN_AG_CTX_CF12_SHIFT 0 |
| 141 | #define XSTORM_CORE_CONN_AG_CTX_CF13_MASK 0x3 /* cf13 */ |
| 142 | #define XSTORM_CORE_CONN_AG_CTX_CF13_SHIFT 2 |
| 143 | #define XSTORM_CORE_CONN_AG_CTX_CF14_MASK 0x3 /* cf14 */ |
| 144 | #define XSTORM_CORE_CONN_AG_CTX_CF14_SHIFT 4 |
| 145 | #define XSTORM_CORE_CONN_AG_CTX_CF15_MASK 0x3 /* cf15 */ |
| 146 | #define XSTORM_CORE_CONN_AG_CTX_CF15_SHIFT 6 |
| 147 | u8 flags6; |
| 148 | #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_MASK 0x3 /* cf16 */ |
| 149 | #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_SHIFT 0 |
| 150 | #define XSTORM_CORE_CONN_AG_CTX_CF17_MASK 0x3 |
| 151 | #define XSTORM_CORE_CONN_AG_CTX_CF17_SHIFT 2 |
| 152 | #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_MASK 0x3 /* cf18 */ |
| 153 | #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_SHIFT 4 |
| 154 | #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_MASK 0x3 /* cf19 */ |
| 155 | #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_SHIFT 6 |
| 156 | u8 flags7; |
| 157 | #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 /* cf20 */ |
| 158 | #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 |
| 159 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED10_MASK 0x3 /* cf21 */ |
| 160 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED10_SHIFT 2 |
| 161 | #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_MASK 0x3 /* cf22 */ |
| 162 | #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_SHIFT 4 |
| 163 | #define XSTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 /* cf0en */ |
| 164 | #define XSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 6 |
| 165 | #define XSTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 /* cf1en */ |
| 166 | #define XSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 7 |
| 167 | u8 flags8; |
| 168 | #define XSTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 169 | #define XSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 0 |
| 170 | #define XSTORM_CORE_CONN_AG_CTX_CF3EN_MASK 0x1 /* cf3en */ |
| 171 | #define XSTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT 1 |
| 172 | #define XSTORM_CORE_CONN_AG_CTX_CF4EN_MASK 0x1 /* cf4en */ |
| 173 | #define XSTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT 2 |
| 174 | #define XSTORM_CORE_CONN_AG_CTX_CF5EN_MASK 0x1 /* cf5en */ |
| 175 | #define XSTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT 3 |
| 176 | #define XSTORM_CORE_CONN_AG_CTX_CF6EN_MASK 0x1 /* cf6en */ |
| 177 | #define XSTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT 4 |
| 178 | #define XSTORM_CORE_CONN_AG_CTX_CF7EN_MASK 0x1 /* cf7en */ |
| 179 | #define XSTORM_CORE_CONN_AG_CTX_CF7EN_SHIFT 5 |
| 180 | #define XSTORM_CORE_CONN_AG_CTX_CF8EN_MASK 0x1 /* cf8en */ |
| 181 | #define XSTORM_CORE_CONN_AG_CTX_CF8EN_SHIFT 6 |
| 182 | #define XSTORM_CORE_CONN_AG_CTX_CF9EN_MASK 0x1 /* cf9en */ |
| 183 | #define XSTORM_CORE_CONN_AG_CTX_CF9EN_SHIFT 7 |
| 184 | u8 flags9; |
| 185 | #define XSTORM_CORE_CONN_AG_CTX_CF10EN_MASK 0x1 /* cf10en */ |
| 186 | #define XSTORM_CORE_CONN_AG_CTX_CF10EN_SHIFT 0 |
| 187 | #define XSTORM_CORE_CONN_AG_CTX_CF11EN_MASK 0x1 /* cf11en */ |
| 188 | #define XSTORM_CORE_CONN_AG_CTX_CF11EN_SHIFT 1 |
| 189 | #define XSTORM_CORE_CONN_AG_CTX_CF12EN_MASK 0x1 /* cf12en */ |
| 190 | #define XSTORM_CORE_CONN_AG_CTX_CF12EN_SHIFT 2 |
| 191 | #define XSTORM_CORE_CONN_AG_CTX_CF13EN_MASK 0x1 /* cf13en */ |
| 192 | #define XSTORM_CORE_CONN_AG_CTX_CF13EN_SHIFT 3 |
| 193 | #define XSTORM_CORE_CONN_AG_CTX_CF14EN_MASK 0x1 /* cf14en */ |
| 194 | #define XSTORM_CORE_CONN_AG_CTX_CF14EN_SHIFT 4 |
| 195 | #define XSTORM_CORE_CONN_AG_CTX_CF15EN_MASK 0x1 /* cf15en */ |
| 196 | #define XSTORM_CORE_CONN_AG_CTX_CF15EN_SHIFT 5 |
| 197 | #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN_MASK 0x1 /* cf16en */ |
| 198 | #define XSTORM_CORE_CONN_AG_CTX_CONSOLID_PROD_CF_EN_SHIFT 6 |
| 199 | #define XSTORM_CORE_CONN_AG_CTX_CF17EN_MASK 0x1 |
| 200 | #define XSTORM_CORE_CONN_AG_CTX_CF17EN_SHIFT 7 |
| 201 | u8 flags10; |
| 202 | #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN_MASK 0x1 /* cf18en */ |
| 203 | #define XSTORM_CORE_CONN_AG_CTX_DQ_CF_EN_SHIFT 0 |
| 204 | #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_EN_MASK 0x1 /* cf19en */ |
| 205 | #define XSTORM_CORE_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT 1 |
| 206 | #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 /* cf20en */ |
| 207 | #define XSTORM_CORE_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 2 |
| 208 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED11_MASK 0x1 /* cf21en */ |
| 209 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED11_SHIFT 3 |
| 210 | #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 /* cf22en */ |
| 211 | #define XSTORM_CORE_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 |
| 212 | #define XSTORM_CORE_CONN_AG_CTX_CF23EN_MASK 0x1 /* cf23en */ |
| 213 | #define XSTORM_CORE_CONN_AG_CTX_CF23EN_SHIFT 5 |
| 214 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED12_MASK 0x1 /* rule0en */ |
| 215 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED12_SHIFT 6 |
| 216 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED13_MASK 0x1 /* rule1en */ |
| 217 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED13_SHIFT 7 |
| 218 | u8 flags11; |
| 219 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED14_MASK 0x1 /* rule2en */ |
| 220 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED14_SHIFT 0 |
| 221 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED15_MASK 0x1 /* rule3en */ |
| 222 | #define XSTORM_CORE_CONN_AG_CTX_RESERVED15_SHIFT 1 |
| 223 | #define XSTORM_CORE_CONN_AG_CTX_TX_DEC_RULE_EN_MASK 0x1 /* rule4en */ |
| 224 | #define XSTORM_CORE_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT 2 |
| 225 | #define XSTORM_CORE_CONN_AG_CTX_RULE5EN_MASK 0x1 /* rule5en */ |
| 226 | #define XSTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT 3 |
| 227 | #define XSTORM_CORE_CONN_AG_CTX_RULE6EN_MASK 0x1 /* rule6en */ |
| 228 | #define XSTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT 4 |
| 229 | #define XSTORM_CORE_CONN_AG_CTX_RULE7EN_MASK 0x1 /* rule7en */ |
| 230 | #define XSTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT 5 |
| 231 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 /* rule8en */ |
| 232 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 |
| 233 | #define XSTORM_CORE_CONN_AG_CTX_RULE9EN_MASK 0x1 /* rule9en */ |
| 234 | #define XSTORM_CORE_CONN_AG_CTX_RULE9EN_SHIFT 7 |
| 235 | u8 flags12; |
| 236 | #define XSTORM_CORE_CONN_AG_CTX_RULE10EN_MASK 0x1 /* rule10en */ |
| 237 | #define XSTORM_CORE_CONN_AG_CTX_RULE10EN_SHIFT 0 |
| 238 | #define XSTORM_CORE_CONN_AG_CTX_RULE11EN_MASK 0x1 /* rule11en */ |
| 239 | #define XSTORM_CORE_CONN_AG_CTX_RULE11EN_SHIFT 1 |
| 240 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 /* rule12en */ |
| 241 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 |
| 242 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 /* rule13en */ |
| 243 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 |
| 244 | #define XSTORM_CORE_CONN_AG_CTX_RULE14EN_MASK 0x1 /* rule14en */ |
| 245 | #define XSTORM_CORE_CONN_AG_CTX_RULE14EN_SHIFT 4 |
| 246 | #define XSTORM_CORE_CONN_AG_CTX_RULE15EN_MASK 0x1 /* rule15en */ |
| 247 | #define XSTORM_CORE_CONN_AG_CTX_RULE15EN_SHIFT 5 |
| 248 | #define XSTORM_CORE_CONN_AG_CTX_RULE16EN_MASK 0x1 /* rule16en */ |
| 249 | #define XSTORM_CORE_CONN_AG_CTX_RULE16EN_SHIFT 6 |
| 250 | #define XSTORM_CORE_CONN_AG_CTX_RULE17EN_MASK 0x1 /* rule17en */ |
| 251 | #define XSTORM_CORE_CONN_AG_CTX_RULE17EN_SHIFT 7 |
| 252 | u8 flags13; |
| 253 | #define XSTORM_CORE_CONN_AG_CTX_RULE18EN_MASK 0x1 /* rule18en */ |
| 254 | #define XSTORM_CORE_CONN_AG_CTX_RULE18EN_SHIFT 0 |
| 255 | #define XSTORM_CORE_CONN_AG_CTX_RULE19EN_MASK 0x1 /* rule19en */ |
| 256 | #define XSTORM_CORE_CONN_AG_CTX_RULE19EN_SHIFT 1 |
| 257 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 /* rule20en */ |
| 258 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 |
| 259 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 /* rule21en */ |
| 260 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 |
| 261 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 /* rule22en */ |
| 262 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 |
| 263 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 /* rule23en */ |
| 264 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 |
| 265 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 /* rule24en */ |
| 266 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 |
| 267 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 /* rule25en */ |
| 268 | #define XSTORM_CORE_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 |
| 269 | u8 flags14; |
| 270 | #define XSTORM_CORE_CONN_AG_CTX_BIT16_MASK 0x1 /* bit16 */ |
| 271 | #define XSTORM_CORE_CONN_AG_CTX_BIT16_SHIFT 0 |
| 272 | #define XSTORM_CORE_CONN_AG_CTX_BIT17_MASK 0x1 /* bit17 */ |
| 273 | #define XSTORM_CORE_CONN_AG_CTX_BIT17_SHIFT 1 |
| 274 | #define XSTORM_CORE_CONN_AG_CTX_BIT18_MASK 0x1 /* bit18 */ |
| 275 | #define XSTORM_CORE_CONN_AG_CTX_BIT18_SHIFT 2 |
| 276 | #define XSTORM_CORE_CONN_AG_CTX_BIT19_MASK 0x1 /* bit19 */ |
| 277 | #define XSTORM_CORE_CONN_AG_CTX_BIT19_SHIFT 3 |
| 278 | #define XSTORM_CORE_CONN_AG_CTX_BIT20_MASK 0x1 /* bit20 */ |
| 279 | #define XSTORM_CORE_CONN_AG_CTX_BIT20_SHIFT 4 |
| 280 | #define XSTORM_CORE_CONN_AG_CTX_BIT21_MASK 0x1 /* bit21 */ |
| 281 | #define XSTORM_CORE_CONN_AG_CTX_BIT21_SHIFT 5 |
| 282 | #define XSTORM_CORE_CONN_AG_CTX_CF23_MASK 0x3 /* cf23 */ |
| 283 | #define XSTORM_CORE_CONN_AG_CTX_CF23_SHIFT 6 |
| 284 | u8 byte2 /* byte2 */; |
| 285 | __le16 physical_q0 /* physical_q0 */; |
| 286 | __le16 consolid_prod /* physical_q1 */; |
| 287 | __le16 reserved16 /* physical_q2 */; |
| 288 | __le16 tx_bd_cons /* word3 */; |
| 289 | __le16 tx_bd_or_spq_prod /* word4 */; |
| 290 | __le16 word5 /* word5 */; |
| 291 | __le16 conn_dpi /* conn_dpi */; |
| 292 | u8 byte3 /* byte3 */; |
| 293 | u8 byte4 /* byte4 */; |
| 294 | u8 byte5 /* byte5 */; |
| 295 | u8 byte6 /* byte6 */; |
| 296 | __le32 reg0 /* reg0 */; |
| 297 | __le32 reg1 /* reg1 */; |
| 298 | __le32 reg2 /* reg2 */; |
| 299 | __le32 reg3 /* reg3 */; |
| 300 | __le32 reg4 /* reg4 */; |
| 301 | __le32 reg5 /* cf_array0 */; |
| 302 | __le32 reg6 /* cf_array1 */; |
| 303 | __le16 word7 /* word7 */; |
| 304 | __le16 word8 /* word8 */; |
| 305 | __le16 word9 /* word9 */; |
| 306 | __le16 word10 /* word10 */; |
| 307 | __le32 reg7 /* reg7 */; |
| 308 | __le32 reg8 /* reg8 */; |
| 309 | __le32 reg9 /* reg9 */; |
| 310 | u8 byte7 /* byte7 */; |
| 311 | u8 byte8 /* byte8 */; |
| 312 | u8 byte9 /* byte9 */; |
| 313 | u8 byte10 /* byte10 */; |
| 314 | u8 byte11 /* byte11 */; |
| 315 | u8 byte12 /* byte12 */; |
| 316 | u8 byte13 /* byte13 */; |
| 317 | u8 byte14 /* byte14 */; |
| 318 | u8 byte15 /* byte15 */; |
| 319 | u8 byte16 /* byte16 */; |
| 320 | __le16 word11 /* word11 */; |
| 321 | __le32 reg10 /* reg10 */; |
| 322 | __le32 reg11 /* reg11 */; |
| 323 | __le32 reg12 /* reg12 */; |
| 324 | __le32 reg13 /* reg13 */; |
| 325 | __le32 reg14 /* reg14 */; |
| 326 | __le32 reg15 /* reg15 */; |
| 327 | __le32 reg16 /* reg16 */; |
| 328 | __le32 reg17 /* reg17 */; |
| 329 | __le32 reg18 /* reg18 */; |
| 330 | __le32 reg19 /* reg19 */; |
| 331 | __le16 word12 /* word12 */; |
| 332 | __le16 word13 /* word13 */; |
| 333 | __le16 word14 /* word14 */; |
| 334 | __le16 word15 /* word15 */; |
| 335 | }; |
| 336 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 337 | struct tstorm_core_conn_ag_ctx { |
| 338 | u8 byte0 /* cdu_validation */; |
| 339 | u8 byte1 /* state */; |
| 340 | u8 flags0; |
| 341 | #define TSTORM_CORE_CONN_AG_CTX_BIT0_MASK 0x1 /* exist_in_qm0 */ |
| 342 | #define TSTORM_CORE_CONN_AG_CTX_BIT0_SHIFT 0 |
| 343 | #define TSTORM_CORE_CONN_AG_CTX_BIT1_MASK 0x1 /* exist_in_qm1 */ |
| 344 | #define TSTORM_CORE_CONN_AG_CTX_BIT1_SHIFT 1 |
| 345 | #define TSTORM_CORE_CONN_AG_CTX_BIT2_MASK 0x1 /* bit2 */ |
| 346 | #define TSTORM_CORE_CONN_AG_CTX_BIT2_SHIFT 2 |
| 347 | #define TSTORM_CORE_CONN_AG_CTX_BIT3_MASK 0x1 /* bit3 */ |
| 348 | #define TSTORM_CORE_CONN_AG_CTX_BIT3_SHIFT 3 |
| 349 | #define TSTORM_CORE_CONN_AG_CTX_BIT4_MASK 0x1 /* bit4 */ |
| 350 | #define TSTORM_CORE_CONN_AG_CTX_BIT4_SHIFT 4 |
| 351 | #define TSTORM_CORE_CONN_AG_CTX_BIT5_MASK 0x1 /* bit5 */ |
| 352 | #define TSTORM_CORE_CONN_AG_CTX_BIT5_SHIFT 5 |
| 353 | #define TSTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 /* timer0cf */ |
| 354 | #define TSTORM_CORE_CONN_AG_CTX_CF0_SHIFT 6 |
| 355 | u8 flags1; |
| 356 | #define TSTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 /* timer1cf */ |
| 357 | #define TSTORM_CORE_CONN_AG_CTX_CF1_SHIFT 0 |
| 358 | #define TSTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 /* timer2cf */ |
| 359 | #define TSTORM_CORE_CONN_AG_CTX_CF2_SHIFT 2 |
| 360 | #define TSTORM_CORE_CONN_AG_CTX_CF3_MASK 0x3 /* timer_stop_all */ |
| 361 | #define TSTORM_CORE_CONN_AG_CTX_CF3_SHIFT 4 |
| 362 | #define TSTORM_CORE_CONN_AG_CTX_CF4_MASK 0x3 /* cf4 */ |
| 363 | #define TSTORM_CORE_CONN_AG_CTX_CF4_SHIFT 6 |
| 364 | u8 flags2; |
| 365 | #define TSTORM_CORE_CONN_AG_CTX_CF5_MASK 0x3 /* cf5 */ |
| 366 | #define TSTORM_CORE_CONN_AG_CTX_CF5_SHIFT 0 |
| 367 | #define TSTORM_CORE_CONN_AG_CTX_CF6_MASK 0x3 /* cf6 */ |
| 368 | #define TSTORM_CORE_CONN_AG_CTX_CF6_SHIFT 2 |
| 369 | #define TSTORM_CORE_CONN_AG_CTX_CF7_MASK 0x3 /* cf7 */ |
| 370 | #define TSTORM_CORE_CONN_AG_CTX_CF7_SHIFT 4 |
| 371 | #define TSTORM_CORE_CONN_AG_CTX_CF8_MASK 0x3 /* cf8 */ |
| 372 | #define TSTORM_CORE_CONN_AG_CTX_CF8_SHIFT 6 |
| 373 | u8 flags3; |
| 374 | #define TSTORM_CORE_CONN_AG_CTX_CF9_MASK 0x3 /* cf9 */ |
| 375 | #define TSTORM_CORE_CONN_AG_CTX_CF9_SHIFT 0 |
| 376 | #define TSTORM_CORE_CONN_AG_CTX_CF10_MASK 0x3 /* cf10 */ |
| 377 | #define TSTORM_CORE_CONN_AG_CTX_CF10_SHIFT 2 |
| 378 | #define TSTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 /* cf0en */ |
| 379 | #define TSTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 4 |
| 380 | #define TSTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 /* cf1en */ |
| 381 | #define TSTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 5 |
| 382 | #define TSTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 383 | #define TSTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 6 |
| 384 | #define TSTORM_CORE_CONN_AG_CTX_CF3EN_MASK 0x1 /* cf3en */ |
| 385 | #define TSTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT 7 |
| 386 | u8 flags4; |
| 387 | #define TSTORM_CORE_CONN_AG_CTX_CF4EN_MASK 0x1 /* cf4en */ |
| 388 | #define TSTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT 0 |
| 389 | #define TSTORM_CORE_CONN_AG_CTX_CF5EN_MASK 0x1 /* cf5en */ |
| 390 | #define TSTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT 1 |
| 391 | #define TSTORM_CORE_CONN_AG_CTX_CF6EN_MASK 0x1 /* cf6en */ |
| 392 | #define TSTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT 2 |
| 393 | #define TSTORM_CORE_CONN_AG_CTX_CF7EN_MASK 0x1 /* cf7en */ |
| 394 | #define TSTORM_CORE_CONN_AG_CTX_CF7EN_SHIFT 3 |
| 395 | #define TSTORM_CORE_CONN_AG_CTX_CF8EN_MASK 0x1 /* cf8en */ |
| 396 | #define TSTORM_CORE_CONN_AG_CTX_CF8EN_SHIFT 4 |
| 397 | #define TSTORM_CORE_CONN_AG_CTX_CF9EN_MASK 0x1 /* cf9en */ |
| 398 | #define TSTORM_CORE_CONN_AG_CTX_CF9EN_SHIFT 5 |
| 399 | #define TSTORM_CORE_CONN_AG_CTX_CF10EN_MASK 0x1 /* cf10en */ |
| 400 | #define TSTORM_CORE_CONN_AG_CTX_CF10EN_SHIFT 6 |
| 401 | #define TSTORM_CORE_CONN_AG_CTX_RULE0EN_MASK 0x1 /* rule0en */ |
| 402 | #define TSTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT 7 |
| 403 | u8 flags5; |
| 404 | #define TSTORM_CORE_CONN_AG_CTX_RULE1EN_MASK 0x1 /* rule1en */ |
| 405 | #define TSTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT 0 |
| 406 | #define TSTORM_CORE_CONN_AG_CTX_RULE2EN_MASK 0x1 /* rule2en */ |
| 407 | #define TSTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT 1 |
| 408 | #define TSTORM_CORE_CONN_AG_CTX_RULE3EN_MASK 0x1 /* rule3en */ |
| 409 | #define TSTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT 2 |
| 410 | #define TSTORM_CORE_CONN_AG_CTX_RULE4EN_MASK 0x1 /* rule4en */ |
| 411 | #define TSTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT 3 |
| 412 | #define TSTORM_CORE_CONN_AG_CTX_RULE5EN_MASK 0x1 /* rule5en */ |
| 413 | #define TSTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT 4 |
| 414 | #define TSTORM_CORE_CONN_AG_CTX_RULE6EN_MASK 0x1 /* rule6en */ |
| 415 | #define TSTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT 5 |
| 416 | #define TSTORM_CORE_CONN_AG_CTX_RULE7EN_MASK 0x1 /* rule7en */ |
| 417 | #define TSTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT 6 |
| 418 | #define TSTORM_CORE_CONN_AG_CTX_RULE8EN_MASK 0x1 /* rule8en */ |
| 419 | #define TSTORM_CORE_CONN_AG_CTX_RULE8EN_SHIFT 7 |
| 420 | __le32 reg0 /* reg0 */; |
| 421 | __le32 reg1 /* reg1 */; |
| 422 | __le32 reg2 /* reg2 */; |
| 423 | __le32 reg3 /* reg3 */; |
| 424 | __le32 reg4 /* reg4 */; |
| 425 | __le32 reg5 /* reg5 */; |
| 426 | __le32 reg6 /* reg6 */; |
| 427 | __le32 reg7 /* reg7 */; |
| 428 | __le32 reg8 /* reg8 */; |
| 429 | u8 byte2 /* byte2 */; |
| 430 | u8 byte3 /* byte3 */; |
| 431 | __le16 word0 /* word0 */; |
| 432 | u8 byte4 /* byte4 */; |
| 433 | u8 byte5 /* byte5 */; |
| 434 | __le16 word1 /* word1 */; |
| 435 | __le16 word2 /* conn_dpi */; |
| 436 | __le16 word3 /* word3 */; |
| 437 | __le32 reg9 /* reg9 */; |
| 438 | __le32 reg10 /* reg10 */; |
| 439 | }; |
| 440 | |
| 441 | struct ustorm_core_conn_ag_ctx { |
| 442 | u8 reserved /* cdu_validation */; |
| 443 | u8 byte1 /* state */; |
| 444 | u8 flags0; |
| 445 | #define USTORM_CORE_CONN_AG_CTX_BIT0_MASK 0x1 /* exist_in_qm0 */ |
| 446 | #define USTORM_CORE_CONN_AG_CTX_BIT0_SHIFT 0 |
| 447 | #define USTORM_CORE_CONN_AG_CTX_BIT1_MASK 0x1 /* exist_in_qm1 */ |
| 448 | #define USTORM_CORE_CONN_AG_CTX_BIT1_SHIFT 1 |
| 449 | #define USTORM_CORE_CONN_AG_CTX_CF0_MASK 0x3 /* timer0cf */ |
| 450 | #define USTORM_CORE_CONN_AG_CTX_CF0_SHIFT 2 |
| 451 | #define USTORM_CORE_CONN_AG_CTX_CF1_MASK 0x3 /* timer1cf */ |
| 452 | #define USTORM_CORE_CONN_AG_CTX_CF1_SHIFT 4 |
| 453 | #define USTORM_CORE_CONN_AG_CTX_CF2_MASK 0x3 /* timer2cf */ |
| 454 | #define USTORM_CORE_CONN_AG_CTX_CF2_SHIFT 6 |
| 455 | u8 flags1; |
| 456 | #define USTORM_CORE_CONN_AG_CTX_CF3_MASK 0x3 /* timer_stop_all */ |
| 457 | #define USTORM_CORE_CONN_AG_CTX_CF3_SHIFT 0 |
| 458 | #define USTORM_CORE_CONN_AG_CTX_CF4_MASK 0x3 /* cf4 */ |
| 459 | #define USTORM_CORE_CONN_AG_CTX_CF4_SHIFT 2 |
| 460 | #define USTORM_CORE_CONN_AG_CTX_CF5_MASK 0x3 /* cf5 */ |
| 461 | #define USTORM_CORE_CONN_AG_CTX_CF5_SHIFT 4 |
| 462 | #define USTORM_CORE_CONN_AG_CTX_CF6_MASK 0x3 /* cf6 */ |
| 463 | #define USTORM_CORE_CONN_AG_CTX_CF6_SHIFT 6 |
| 464 | u8 flags2; |
| 465 | #define USTORM_CORE_CONN_AG_CTX_CF0EN_MASK 0x1 /* cf0en */ |
| 466 | #define USTORM_CORE_CONN_AG_CTX_CF0EN_SHIFT 0 |
| 467 | #define USTORM_CORE_CONN_AG_CTX_CF1EN_MASK 0x1 /* cf1en */ |
| 468 | #define USTORM_CORE_CONN_AG_CTX_CF1EN_SHIFT 1 |
| 469 | #define USTORM_CORE_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 470 | #define USTORM_CORE_CONN_AG_CTX_CF2EN_SHIFT 2 |
| 471 | #define USTORM_CORE_CONN_AG_CTX_CF3EN_MASK 0x1 /* cf3en */ |
| 472 | #define USTORM_CORE_CONN_AG_CTX_CF3EN_SHIFT 3 |
| 473 | #define USTORM_CORE_CONN_AG_CTX_CF4EN_MASK 0x1 /* cf4en */ |
| 474 | #define USTORM_CORE_CONN_AG_CTX_CF4EN_SHIFT 4 |
| 475 | #define USTORM_CORE_CONN_AG_CTX_CF5EN_MASK 0x1 /* cf5en */ |
| 476 | #define USTORM_CORE_CONN_AG_CTX_CF5EN_SHIFT 5 |
| 477 | #define USTORM_CORE_CONN_AG_CTX_CF6EN_MASK 0x1 /* cf6en */ |
| 478 | #define USTORM_CORE_CONN_AG_CTX_CF6EN_SHIFT 6 |
| 479 | #define USTORM_CORE_CONN_AG_CTX_RULE0EN_MASK 0x1 /* rule0en */ |
| 480 | #define USTORM_CORE_CONN_AG_CTX_RULE0EN_SHIFT 7 |
| 481 | u8 flags3; |
| 482 | #define USTORM_CORE_CONN_AG_CTX_RULE1EN_MASK 0x1 /* rule1en */ |
| 483 | #define USTORM_CORE_CONN_AG_CTX_RULE1EN_SHIFT 0 |
| 484 | #define USTORM_CORE_CONN_AG_CTX_RULE2EN_MASK 0x1 /* rule2en */ |
| 485 | #define USTORM_CORE_CONN_AG_CTX_RULE2EN_SHIFT 1 |
| 486 | #define USTORM_CORE_CONN_AG_CTX_RULE3EN_MASK 0x1 /* rule3en */ |
| 487 | #define USTORM_CORE_CONN_AG_CTX_RULE3EN_SHIFT 2 |
| 488 | #define USTORM_CORE_CONN_AG_CTX_RULE4EN_MASK 0x1 /* rule4en */ |
| 489 | #define USTORM_CORE_CONN_AG_CTX_RULE4EN_SHIFT 3 |
| 490 | #define USTORM_CORE_CONN_AG_CTX_RULE5EN_MASK 0x1 /* rule5en */ |
| 491 | #define USTORM_CORE_CONN_AG_CTX_RULE5EN_SHIFT 4 |
| 492 | #define USTORM_CORE_CONN_AG_CTX_RULE6EN_MASK 0x1 /* rule6en */ |
| 493 | #define USTORM_CORE_CONN_AG_CTX_RULE6EN_SHIFT 5 |
| 494 | #define USTORM_CORE_CONN_AG_CTX_RULE7EN_MASK 0x1 /* rule7en */ |
| 495 | #define USTORM_CORE_CONN_AG_CTX_RULE7EN_SHIFT 6 |
| 496 | #define USTORM_CORE_CONN_AG_CTX_RULE8EN_MASK 0x1 /* rule8en */ |
| 497 | #define USTORM_CORE_CONN_AG_CTX_RULE8EN_SHIFT 7 |
| 498 | u8 byte2 /* byte2 */; |
| 499 | u8 byte3 /* byte3 */; |
| 500 | __le16 word0 /* conn_dpi */; |
| 501 | __le16 word1 /* word1 */; |
| 502 | __le32 rx_producers /* reg0 */; |
| 503 | __le32 reg1 /* reg1 */; |
| 504 | __le32 reg2 /* reg2 */; |
| 505 | __le32 reg3 /* reg3 */; |
| 506 | __le16 word2 /* word2 */; |
| 507 | __le16 word3 /* word3 */; |
| 508 | }; |
| 509 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 510 | /* The core storm context for the Mstorm */ |
| 511 | struct mstorm_core_conn_st_ctx { |
| 512 | __le32 reserved[24]; |
| 513 | }; |
| 514 | |
| 515 | /* The core storm context for the Ustorm */ |
| 516 | struct ustorm_core_conn_st_ctx { |
| 517 | __le32 reserved[4]; |
| 518 | }; |
| 519 | |
| 520 | /* core connection context */ |
| 521 | struct core_conn_context { |
| 522 | struct ystorm_core_conn_st_ctx ystorm_st_context; |
| 523 | struct regpair ystorm_st_padding[2] /* padding */; |
| 524 | struct pstorm_core_conn_st_ctx pstorm_st_context; |
| 525 | struct regpair pstorm_st_padding[2]; |
| 526 | struct xstorm_core_conn_st_ctx xstorm_st_context; |
| 527 | struct xstorm_core_conn_ag_ctx xstorm_ag_context; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 528 | struct tstorm_core_conn_ag_ctx tstorm_ag_context; |
| 529 | struct ustorm_core_conn_ag_ctx ustorm_ag_context; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 530 | struct mstorm_core_conn_st_ctx mstorm_st_context; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 531 | struct ustorm_core_conn_st_ctx ustorm_st_context; |
| 532 | struct regpair ustorm_st_padding[2] /* padding */; |
| 533 | }; |
| 534 | |
Manish Chopra | 9df2ed0 | 2015-10-26 11:02:33 +0200 | [diff] [blame] | 535 | struct eth_mstorm_per_queue_stat { |
| 536 | struct regpair ttl0_discard; |
| 537 | struct regpair packet_too_big_discard; |
| 538 | struct regpair no_buff_discard; |
| 539 | struct regpair not_active_discard; |
| 540 | struct regpair tpa_coalesced_pkts; |
| 541 | struct regpair tpa_coalesced_events; |
| 542 | struct regpair tpa_aborts_num; |
| 543 | struct regpair tpa_coalesced_bytes; |
| 544 | }; |
| 545 | |
| 546 | struct eth_pstorm_per_queue_stat { |
| 547 | struct regpair sent_ucast_bytes; |
| 548 | struct regpair sent_mcast_bytes; |
| 549 | struct regpair sent_bcast_bytes; |
| 550 | struct regpair sent_ucast_pkts; |
| 551 | struct regpair sent_mcast_pkts; |
| 552 | struct regpair sent_bcast_pkts; |
| 553 | struct regpair error_drop_pkts; |
| 554 | }; |
| 555 | |
| 556 | struct eth_ustorm_per_queue_stat { |
| 557 | struct regpair rcv_ucast_bytes; |
| 558 | struct regpair rcv_mcast_bytes; |
| 559 | struct regpair rcv_bcast_bytes; |
| 560 | struct regpair rcv_ucast_pkts; |
| 561 | struct regpair rcv_mcast_pkts; |
| 562 | struct regpair rcv_bcast_pkts; |
| 563 | }; |
| 564 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 565 | /* Event Ring Next Page Address */ |
| 566 | struct event_ring_next_addr { |
| 567 | struct regpair addr /* Next Page Address */; |
| 568 | __le32 reserved[2] /* Reserved */; |
| 569 | }; |
| 570 | |
| 571 | union event_ring_element { |
| 572 | struct event_ring_entry entry /* Event Ring Entry */; |
| 573 | struct event_ring_next_addr next_addr; |
| 574 | }; |
| 575 | |
Yuval Mintz | 1408cc1f | 2016-05-11 16:36:14 +0300 | [diff] [blame] | 576 | struct mstorm_non_trigger_vf_zone { |
| 577 | struct eth_mstorm_per_queue_stat eth_queue_stat; |
| 578 | }; |
| 579 | |
| 580 | struct mstorm_vf_zone { |
| 581 | struct mstorm_non_trigger_vf_zone non_trigger; |
| 582 | }; |
| 583 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 584 | enum personality_type { |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 585 | BAD_PERSONALITY_TYP, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 586 | PERSONALITY_RESERVED, |
| 587 | PERSONALITY_RESERVED2, |
| 588 | PERSONALITY_RDMA_AND_ETH /* Roce or Iwarp */, |
| 589 | PERSONALITY_RESERVED3, |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 590 | PERSONALITY_CORE, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 591 | PERSONALITY_ETH /* Ethernet */, |
| 592 | PERSONALITY_RESERVED4, |
| 593 | MAX_PERSONALITY_TYPE |
| 594 | }; |
| 595 | |
| 596 | struct pf_start_tunnel_config { |
| 597 | u8 set_vxlan_udp_port_flg; |
| 598 | u8 set_geneve_udp_port_flg; |
| 599 | u8 tx_enable_vxlan /* If set, enable VXLAN tunnel in TX path. */; |
| 600 | u8 tx_enable_l2geneve; |
| 601 | u8 tx_enable_ipgeneve; |
| 602 | u8 tx_enable_l2gre /* If set, enable l2 GRE tunnel in TX path. */; |
| 603 | u8 tx_enable_ipgre /* If set, enable IP GRE tunnel in TX path. */; |
| 604 | u8 tunnel_clss_vxlan /* Classification scheme for VXLAN tunnel. */; |
| 605 | u8 tunnel_clss_l2geneve; |
| 606 | u8 tunnel_clss_ipgeneve; |
| 607 | u8 tunnel_clss_l2gre; |
| 608 | u8 tunnel_clss_ipgre; |
| 609 | __le16 vxlan_udp_port /* VXLAN tunnel UDP destination port. */; |
| 610 | __le16 geneve_udp_port /* GENEVE tunnel UDP destination port. */; |
| 611 | }; |
| 612 | |
| 613 | /* Ramrod data for PF start ramrod */ |
| 614 | struct pf_start_ramrod_data { |
| 615 | struct regpair event_ring_pbl_addr; |
| 616 | struct regpair consolid_q_pbl_addr; |
| 617 | struct pf_start_tunnel_config tunnel_config; |
| 618 | __le16 event_ring_sb_id; |
| 619 | u8 base_vf_id; |
| 620 | u8 num_vfs; |
| 621 | u8 event_ring_num_pages; |
| 622 | u8 event_ring_sb_index; |
| 623 | u8 path_id; |
| 624 | u8 warning_as_error; |
| 625 | u8 dont_log_ramrods; |
| 626 | u8 personality; |
| 627 | __le16 log_type_mask; |
| 628 | u8 mf_mode /* Multi function mode */; |
| 629 | u8 integ_phase /* Integration phase */; |
| 630 | u8 allow_npar_tx_switching; |
| 631 | u8 inner_to_outer_pri_map[8]; |
| 632 | u8 pri_map_valid; |
| 633 | u32 outer_tag; |
| 634 | u8 reserved0[4]; |
| 635 | }; |
| 636 | |
Manish Chopra | 464f664 | 2016-04-14 01:38:29 -0400 | [diff] [blame] | 637 | /* tunnel configuration */ |
| 638 | struct pf_update_tunnel_config { |
| 639 | u8 update_rx_pf_clss; |
| 640 | u8 update_tx_pf_clss; |
| 641 | u8 set_vxlan_udp_port_flg; |
| 642 | u8 set_geneve_udp_port_flg; |
| 643 | u8 tx_enable_vxlan; |
| 644 | u8 tx_enable_l2geneve; |
| 645 | u8 tx_enable_ipgeneve; |
| 646 | u8 tx_enable_l2gre; |
| 647 | u8 tx_enable_ipgre; |
| 648 | u8 tunnel_clss_vxlan; |
| 649 | u8 tunnel_clss_l2geneve; |
| 650 | u8 tunnel_clss_ipgeneve; |
| 651 | u8 tunnel_clss_l2gre; |
| 652 | u8 tunnel_clss_ipgre; |
| 653 | __le16 vxlan_udp_port; |
| 654 | __le16 geneve_udp_port; |
| 655 | __le16 reserved[3]; |
| 656 | }; |
| 657 | |
| 658 | struct pf_update_ramrod_data { |
| 659 | u32 reserved[2]; |
| 660 | u32 reserved_1[6]; |
| 661 | struct pf_update_tunnel_config tunnel_config; |
| 662 | }; |
| 663 | |
| 664 | /* Tunnel classification scheme */ |
| 665 | enum tunnel_clss { |
| 666 | TUNNEL_CLSS_MAC_VLAN = 0, |
| 667 | TUNNEL_CLSS_MAC_VNI, |
| 668 | TUNNEL_CLSS_INNER_MAC_VLAN, |
| 669 | TUNNEL_CLSS_INNER_MAC_VNI, |
| 670 | MAX_TUNNEL_CLSS |
| 671 | }; |
| 672 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 673 | enum ports_mode { |
| 674 | ENGX2_PORTX1 /* 2 engines x 1 port */, |
| 675 | ENGX2_PORTX2 /* 2 engines x 2 ports */, |
| 676 | ENGX1_PORTX1 /* 1 engine x 1 port */, |
| 677 | ENGX1_PORTX2 /* 1 engine x 2 ports */, |
| 678 | ENGX1_PORTX4 /* 1 engine x 4 ports */, |
| 679 | MAX_PORTS_MODE |
| 680 | }; |
| 681 | |
Yuval Mintz | 1408cc1f | 2016-05-11 16:36:14 +0300 | [diff] [blame] | 682 | struct pstorm_non_trigger_vf_zone { |
| 683 | struct eth_pstorm_per_queue_stat eth_queue_stat; |
| 684 | struct regpair reserved[2]; |
| 685 | }; |
| 686 | |
| 687 | struct pstorm_vf_zone { |
| 688 | struct pstorm_non_trigger_vf_zone non_trigger; |
| 689 | struct regpair reserved[7]; |
| 690 | }; |
| 691 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 692 | /* Ramrod Header of SPQE */ |
| 693 | struct ramrod_header { |
| 694 | __le32 cid /* Slowpath Connection CID */; |
| 695 | u8 cmd_id /* Ramrod Cmd (Per Protocol Type) */; |
| 696 | u8 protocol_id /* Ramrod Protocol ID */; |
| 697 | __le16 echo /* Ramrod echo */; |
| 698 | }; |
| 699 | |
| 700 | /* Slowpath Element (SPQE) */ |
| 701 | struct slow_path_element { |
| 702 | struct ramrod_header hdr /* Ramrod Header */; |
| 703 | struct regpair data_ptr; |
| 704 | }; |
| 705 | |
| 706 | struct tstorm_per_port_stat { |
| 707 | struct regpair trunc_error_discard; |
| 708 | struct regpair mac_error_discard; |
| 709 | struct regpair mftag_filter_discard; |
| 710 | struct regpair eth_mac_filter_discard; |
| 711 | struct regpair ll2_mac_filter_discard; |
| 712 | struct regpair ll2_conn_disabled_discard; |
| 713 | struct regpair iscsi_irregular_pkt; |
| 714 | struct regpair fcoe_irregular_pkt; |
| 715 | struct regpair roce_irregular_pkt; |
| 716 | struct regpair eth_irregular_pkt; |
| 717 | struct regpair toe_irregular_pkt; |
| 718 | struct regpair preroce_irregular_pkt; |
| 719 | }; |
| 720 | |
Yuval Mintz | 1408cc1f | 2016-05-11 16:36:14 +0300 | [diff] [blame] | 721 | struct ustorm_non_trigger_vf_zone { |
| 722 | struct eth_ustorm_per_queue_stat eth_queue_stat; |
| 723 | struct regpair vf_pf_msg_addr; |
| 724 | }; |
| 725 | |
| 726 | struct ustorm_trigger_vf_zone { |
| 727 | u8 vf_pf_msg_valid; |
| 728 | u8 reserved[7]; |
| 729 | }; |
| 730 | |
| 731 | struct ustorm_vf_zone { |
| 732 | struct ustorm_non_trigger_vf_zone non_trigger; |
| 733 | struct ustorm_trigger_vf_zone trigger; |
| 734 | }; |
| 735 | |
| 736 | struct vf_start_ramrod_data { |
| 737 | u8 vf_id; |
| 738 | u8 enable_flr_ack; |
| 739 | __le16 opaque_fid; |
| 740 | u8 personality; |
| 741 | u8 reserved[3]; |
| 742 | }; |
| 743 | |
Yuval Mintz | 0b55e27 | 2016-05-11 16:36:15 +0300 | [diff] [blame^] | 744 | struct vf_stop_ramrod_data { |
| 745 | u8 vf_id; |
| 746 | u8 reserved0; |
| 747 | __le16 reserved1; |
| 748 | __le32 reserved2; |
| 749 | }; |
| 750 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 751 | struct atten_status_block { |
| 752 | __le32 atten_bits; |
| 753 | __le32 atten_ack; |
| 754 | __le16 reserved0; |
| 755 | __le16 sb_index /* status block running index */; |
| 756 | __le32 reserved1; |
| 757 | }; |
| 758 | |
| 759 | enum block_addr { |
| 760 | GRCBASE_GRC = 0x50000, |
| 761 | GRCBASE_MISCS = 0x9000, |
| 762 | GRCBASE_MISC = 0x8000, |
| 763 | GRCBASE_DBU = 0xa000, |
| 764 | GRCBASE_PGLUE_B = 0x2a8000, |
| 765 | GRCBASE_CNIG = 0x218000, |
| 766 | GRCBASE_CPMU = 0x30000, |
| 767 | GRCBASE_NCSI = 0x40000, |
| 768 | GRCBASE_OPTE = 0x53000, |
| 769 | GRCBASE_BMB = 0x540000, |
| 770 | GRCBASE_PCIE = 0x54000, |
| 771 | GRCBASE_MCP = 0xe00000, |
| 772 | GRCBASE_MCP2 = 0x52000, |
| 773 | GRCBASE_PSWHST = 0x2a0000, |
| 774 | GRCBASE_PSWHST2 = 0x29e000, |
| 775 | GRCBASE_PSWRD = 0x29c000, |
| 776 | GRCBASE_PSWRD2 = 0x29d000, |
| 777 | GRCBASE_PSWWR = 0x29a000, |
| 778 | GRCBASE_PSWWR2 = 0x29b000, |
| 779 | GRCBASE_PSWRQ = 0x280000, |
| 780 | GRCBASE_PSWRQ2 = 0x240000, |
| 781 | GRCBASE_PGLCS = 0x0, |
| 782 | GRCBASE_PTU = 0x560000, |
| 783 | GRCBASE_DMAE = 0xc000, |
| 784 | GRCBASE_TCM = 0x1180000, |
| 785 | GRCBASE_MCM = 0x1200000, |
| 786 | GRCBASE_UCM = 0x1280000, |
| 787 | GRCBASE_XCM = 0x1000000, |
| 788 | GRCBASE_YCM = 0x1080000, |
| 789 | GRCBASE_PCM = 0x1100000, |
| 790 | GRCBASE_QM = 0x2f0000, |
| 791 | GRCBASE_TM = 0x2c0000, |
| 792 | GRCBASE_DORQ = 0x100000, |
| 793 | GRCBASE_BRB = 0x340000, |
| 794 | GRCBASE_SRC = 0x238000, |
| 795 | GRCBASE_PRS = 0x1f0000, |
| 796 | GRCBASE_TSDM = 0xfb0000, |
| 797 | GRCBASE_MSDM = 0xfc0000, |
| 798 | GRCBASE_USDM = 0xfd0000, |
| 799 | GRCBASE_XSDM = 0xf80000, |
| 800 | GRCBASE_YSDM = 0xf90000, |
| 801 | GRCBASE_PSDM = 0xfa0000, |
| 802 | GRCBASE_TSEM = 0x1700000, |
| 803 | GRCBASE_MSEM = 0x1800000, |
| 804 | GRCBASE_USEM = 0x1900000, |
| 805 | GRCBASE_XSEM = 0x1400000, |
| 806 | GRCBASE_YSEM = 0x1500000, |
| 807 | GRCBASE_PSEM = 0x1600000, |
| 808 | GRCBASE_RSS = 0x238800, |
| 809 | GRCBASE_TMLD = 0x4d0000, |
| 810 | GRCBASE_MULD = 0x4e0000, |
| 811 | GRCBASE_YULD = 0x4c8000, |
| 812 | GRCBASE_XYLD = 0x4c0000, |
| 813 | GRCBASE_PRM = 0x230000, |
| 814 | GRCBASE_PBF_PB1 = 0xda0000, |
| 815 | GRCBASE_PBF_PB2 = 0xda4000, |
| 816 | GRCBASE_RPB = 0x23c000, |
| 817 | GRCBASE_BTB = 0xdb0000, |
| 818 | GRCBASE_PBF = 0xd80000, |
| 819 | GRCBASE_RDIF = 0x300000, |
| 820 | GRCBASE_TDIF = 0x310000, |
| 821 | GRCBASE_CDU = 0x580000, |
| 822 | GRCBASE_CCFC = 0x2e0000, |
| 823 | GRCBASE_TCFC = 0x2d0000, |
| 824 | GRCBASE_IGU = 0x180000, |
| 825 | GRCBASE_CAU = 0x1c0000, |
| 826 | GRCBASE_UMAC = 0x51000, |
| 827 | GRCBASE_XMAC = 0x210000, |
| 828 | GRCBASE_DBG = 0x10000, |
| 829 | GRCBASE_NIG = 0x500000, |
| 830 | GRCBASE_WOL = 0x600000, |
| 831 | GRCBASE_BMBN = 0x610000, |
| 832 | GRCBASE_IPC = 0x20000, |
| 833 | GRCBASE_NWM = 0x800000, |
| 834 | GRCBASE_NWS = 0x700000, |
| 835 | GRCBASE_MS = 0x6a0000, |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 836 | GRCBASE_PHY_PCIE = 0x620000, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 837 | GRCBASE_MISC_AEU = 0x8000, |
| 838 | GRCBASE_BAR0_MAP = 0x1c00000, |
| 839 | MAX_BLOCK_ADDR |
| 840 | }; |
| 841 | |
| 842 | enum block_id { |
| 843 | BLOCK_GRC, |
| 844 | BLOCK_MISCS, |
| 845 | BLOCK_MISC, |
| 846 | BLOCK_DBU, |
| 847 | BLOCK_PGLUE_B, |
| 848 | BLOCK_CNIG, |
| 849 | BLOCK_CPMU, |
| 850 | BLOCK_NCSI, |
| 851 | BLOCK_OPTE, |
| 852 | BLOCK_BMB, |
| 853 | BLOCK_PCIE, |
| 854 | BLOCK_MCP, |
| 855 | BLOCK_MCP2, |
| 856 | BLOCK_PSWHST, |
| 857 | BLOCK_PSWHST2, |
| 858 | BLOCK_PSWRD, |
| 859 | BLOCK_PSWRD2, |
| 860 | BLOCK_PSWWR, |
| 861 | BLOCK_PSWWR2, |
| 862 | BLOCK_PSWRQ, |
| 863 | BLOCK_PSWRQ2, |
| 864 | BLOCK_PGLCS, |
| 865 | BLOCK_PTU, |
| 866 | BLOCK_DMAE, |
| 867 | BLOCK_TCM, |
| 868 | BLOCK_MCM, |
| 869 | BLOCK_UCM, |
| 870 | BLOCK_XCM, |
| 871 | BLOCK_YCM, |
| 872 | BLOCK_PCM, |
| 873 | BLOCK_QM, |
| 874 | BLOCK_TM, |
| 875 | BLOCK_DORQ, |
| 876 | BLOCK_BRB, |
| 877 | BLOCK_SRC, |
| 878 | BLOCK_PRS, |
| 879 | BLOCK_TSDM, |
| 880 | BLOCK_MSDM, |
| 881 | BLOCK_USDM, |
| 882 | BLOCK_XSDM, |
| 883 | BLOCK_YSDM, |
| 884 | BLOCK_PSDM, |
| 885 | BLOCK_TSEM, |
| 886 | BLOCK_MSEM, |
| 887 | BLOCK_USEM, |
| 888 | BLOCK_XSEM, |
| 889 | BLOCK_YSEM, |
| 890 | BLOCK_PSEM, |
| 891 | BLOCK_RSS, |
| 892 | BLOCK_TMLD, |
| 893 | BLOCK_MULD, |
| 894 | BLOCK_YULD, |
| 895 | BLOCK_XYLD, |
| 896 | BLOCK_PRM, |
| 897 | BLOCK_PBF_PB1, |
| 898 | BLOCK_PBF_PB2, |
| 899 | BLOCK_RPB, |
| 900 | BLOCK_BTB, |
| 901 | BLOCK_PBF, |
| 902 | BLOCK_RDIF, |
| 903 | BLOCK_TDIF, |
| 904 | BLOCK_CDU, |
| 905 | BLOCK_CCFC, |
| 906 | BLOCK_TCFC, |
| 907 | BLOCK_IGU, |
| 908 | BLOCK_CAU, |
| 909 | BLOCK_UMAC, |
| 910 | BLOCK_XMAC, |
| 911 | BLOCK_DBG, |
| 912 | BLOCK_NIG, |
| 913 | BLOCK_WOL, |
| 914 | BLOCK_BMBN, |
| 915 | BLOCK_IPC, |
| 916 | BLOCK_NWM, |
| 917 | BLOCK_NWS, |
| 918 | BLOCK_MS, |
| 919 | BLOCK_PHY_PCIE, |
| 920 | BLOCK_MISC_AEU, |
| 921 | BLOCK_BAR0_MAP, |
| 922 | MAX_BLOCK_ID |
| 923 | }; |
| 924 | |
| 925 | enum command_type_bit { |
| 926 | IGU_COMMAND_TYPE_NOP = 0, |
| 927 | IGU_COMMAND_TYPE_SET = 1, |
| 928 | MAX_COMMAND_TYPE_BIT |
| 929 | }; |
| 930 | |
| 931 | struct dmae_cmd { |
| 932 | __le32 opcode; |
| 933 | #define DMAE_CMD_SRC_MASK 0x1 |
| 934 | #define DMAE_CMD_SRC_SHIFT 0 |
| 935 | #define DMAE_CMD_DST_MASK 0x3 |
| 936 | #define DMAE_CMD_DST_SHIFT 1 |
| 937 | #define DMAE_CMD_C_DST_MASK 0x1 |
| 938 | #define DMAE_CMD_C_DST_SHIFT 3 |
| 939 | #define DMAE_CMD_CRC_RESET_MASK 0x1 |
| 940 | #define DMAE_CMD_CRC_RESET_SHIFT 4 |
| 941 | #define DMAE_CMD_SRC_ADDR_RESET_MASK 0x1 |
| 942 | #define DMAE_CMD_SRC_ADDR_RESET_SHIFT 5 |
| 943 | #define DMAE_CMD_DST_ADDR_RESET_MASK 0x1 |
| 944 | #define DMAE_CMD_DST_ADDR_RESET_SHIFT 6 |
| 945 | #define DMAE_CMD_COMP_FUNC_MASK 0x1 |
| 946 | #define DMAE_CMD_COMP_FUNC_SHIFT 7 |
| 947 | #define DMAE_CMD_COMP_WORD_EN_MASK 0x1 |
| 948 | #define DMAE_CMD_COMP_WORD_EN_SHIFT 8 |
| 949 | #define DMAE_CMD_COMP_CRC_EN_MASK 0x1 |
| 950 | #define DMAE_CMD_COMP_CRC_EN_SHIFT 9 |
| 951 | #define DMAE_CMD_COMP_CRC_OFFSET_MASK 0x7 |
| 952 | #define DMAE_CMD_COMP_CRC_OFFSET_SHIFT 10 |
| 953 | #define DMAE_CMD_RESERVED1_MASK 0x1 |
| 954 | #define DMAE_CMD_RESERVED1_SHIFT 13 |
| 955 | #define DMAE_CMD_ENDIANITY_MODE_MASK 0x3 |
| 956 | #define DMAE_CMD_ENDIANITY_MODE_SHIFT 14 |
| 957 | #define DMAE_CMD_ERR_HANDLING_MASK 0x3 |
| 958 | #define DMAE_CMD_ERR_HANDLING_SHIFT 16 |
| 959 | #define DMAE_CMD_PORT_ID_MASK 0x3 |
| 960 | #define DMAE_CMD_PORT_ID_SHIFT 18 |
| 961 | #define DMAE_CMD_SRC_PF_ID_MASK 0xF |
| 962 | #define DMAE_CMD_SRC_PF_ID_SHIFT 20 |
| 963 | #define DMAE_CMD_DST_PF_ID_MASK 0xF |
| 964 | #define DMAE_CMD_DST_PF_ID_SHIFT 24 |
| 965 | #define DMAE_CMD_SRC_VF_ID_VALID_MASK 0x1 |
| 966 | #define DMAE_CMD_SRC_VF_ID_VALID_SHIFT 28 |
| 967 | #define DMAE_CMD_DST_VF_ID_VALID_MASK 0x1 |
| 968 | #define DMAE_CMD_DST_VF_ID_VALID_SHIFT 29 |
| 969 | #define DMAE_CMD_RESERVED2_MASK 0x3 |
| 970 | #define DMAE_CMD_RESERVED2_SHIFT 30 |
| 971 | __le32 src_addr_lo; |
| 972 | __le32 src_addr_hi; |
| 973 | __le32 dst_addr_lo; |
| 974 | __le32 dst_addr_hi; |
| 975 | __le16 length /* Length in DW */; |
| 976 | __le16 opcode_b; |
| 977 | #define DMAE_CMD_SRC_VF_ID_MASK 0xFF /* Source VF id */ |
| 978 | #define DMAE_CMD_SRC_VF_ID_SHIFT 0 |
| 979 | #define DMAE_CMD_DST_VF_ID_MASK 0xFF /* Destination VF id */ |
| 980 | #define DMAE_CMD_DST_VF_ID_SHIFT 8 |
| 981 | __le32 comp_addr_lo /* PCIe completion address low or grc address */; |
| 982 | __le32 comp_addr_hi; |
| 983 | __le32 comp_val /* Value to write to copmletion address */; |
| 984 | __le32 crc32 /* crc16 result */; |
| 985 | __le32 crc_32_c /* crc32_c result */; |
| 986 | __le16 crc16 /* crc16 result */; |
| 987 | __le16 crc16_c /* crc16_c result */; |
| 988 | __le16 crc10 /* crc_t10 result */; |
| 989 | __le16 reserved; |
| 990 | __le16 xsum16 /* checksum16 result */; |
| 991 | __le16 xsum8 /* checksum8 result */; |
| 992 | }; |
| 993 | |
| 994 | struct igu_cleanup { |
| 995 | __le32 sb_id_and_flags; |
| 996 | #define IGU_CLEANUP_RESERVED0_MASK 0x7FFFFFF |
| 997 | #define IGU_CLEANUP_RESERVED0_SHIFT 0 |
| 998 | #define IGU_CLEANUP_CLEANUP_SET_MASK 0x1 /* cleanup clear - 0, set - 1 */ |
| 999 | #define IGU_CLEANUP_CLEANUP_SET_SHIFT 27 |
| 1000 | #define IGU_CLEANUP_CLEANUP_TYPE_MASK 0x7 |
| 1001 | #define IGU_CLEANUP_CLEANUP_TYPE_SHIFT 28 |
| 1002 | #define IGU_CLEANUP_COMMAND_TYPE_MASK 0x1 |
| 1003 | #define IGU_CLEANUP_COMMAND_TYPE_SHIFT 31 |
| 1004 | __le32 reserved1; |
| 1005 | }; |
| 1006 | |
| 1007 | union igu_command { |
| 1008 | struct igu_prod_cons_update prod_cons_update; |
| 1009 | struct igu_cleanup cleanup; |
| 1010 | }; |
| 1011 | |
| 1012 | struct igu_command_reg_ctrl { |
| 1013 | __le16 opaque_fid; |
| 1014 | __le16 igu_command_reg_ctrl_fields; |
| 1015 | #define IGU_COMMAND_REG_CTRL_PXP_BAR_ADDR_MASK 0xFFF |
| 1016 | #define IGU_COMMAND_REG_CTRL_PXP_BAR_ADDR_SHIFT 0 |
| 1017 | #define IGU_COMMAND_REG_CTRL_RESERVED_MASK 0x7 |
| 1018 | #define IGU_COMMAND_REG_CTRL_RESERVED_SHIFT 12 |
| 1019 | #define IGU_COMMAND_REG_CTRL_COMMAND_TYPE_MASK 0x1 |
| 1020 | #define IGU_COMMAND_REG_CTRL_COMMAND_TYPE_SHIFT 15 |
| 1021 | }; |
| 1022 | |
| 1023 | struct igu_mapping_line { |
| 1024 | __le32 igu_mapping_line_fields; |
| 1025 | #define IGU_MAPPING_LINE_VALID_MASK 0x1 |
| 1026 | #define IGU_MAPPING_LINE_VALID_SHIFT 0 |
| 1027 | #define IGU_MAPPING_LINE_VECTOR_NUMBER_MASK 0xFF |
| 1028 | #define IGU_MAPPING_LINE_VECTOR_NUMBER_SHIFT 1 |
| 1029 | #define IGU_MAPPING_LINE_FUNCTION_NUMBER_MASK 0xFF |
| 1030 | #define IGU_MAPPING_LINE_FUNCTION_NUMBER_SHIFT 9 |
| 1031 | #define IGU_MAPPING_LINE_PF_VALID_MASK 0x1 /* PF-1, VF-0 */ |
| 1032 | #define IGU_MAPPING_LINE_PF_VALID_SHIFT 17 |
| 1033 | #define IGU_MAPPING_LINE_IPS_GROUP_MASK 0x3F |
| 1034 | #define IGU_MAPPING_LINE_IPS_GROUP_SHIFT 18 |
| 1035 | #define IGU_MAPPING_LINE_RESERVED_MASK 0xFF |
| 1036 | #define IGU_MAPPING_LINE_RESERVED_SHIFT 24 |
| 1037 | }; |
| 1038 | |
| 1039 | struct igu_msix_vector { |
| 1040 | struct regpair address; |
| 1041 | __le32 data; |
| 1042 | __le32 msix_vector_fields; |
| 1043 | #define IGU_MSIX_VECTOR_MASK_BIT_MASK 0x1 |
| 1044 | #define IGU_MSIX_VECTOR_MASK_BIT_SHIFT 0 |
| 1045 | #define IGU_MSIX_VECTOR_RESERVED0_MASK 0x7FFF |
| 1046 | #define IGU_MSIX_VECTOR_RESERVED0_SHIFT 1 |
| 1047 | #define IGU_MSIX_VECTOR_STEERING_TAG_MASK 0xFF |
| 1048 | #define IGU_MSIX_VECTOR_STEERING_TAG_SHIFT 16 |
| 1049 | #define IGU_MSIX_VECTOR_RESERVED1_MASK 0xFF |
| 1050 | #define IGU_MSIX_VECTOR_RESERVED1_SHIFT 24 |
| 1051 | }; |
| 1052 | |
| 1053 | enum init_modes { |
| 1054 | MODE_BB_A0, |
Yuval Mintz | 12e09c6 | 2016-03-02 20:26:01 +0200 | [diff] [blame] | 1055 | MODE_BB_B0, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1056 | MODE_RESERVED2, |
| 1057 | MODE_ASIC, |
| 1058 | MODE_RESERVED3, |
| 1059 | MODE_RESERVED4, |
| 1060 | MODE_RESERVED5, |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1061 | MODE_RESERVED6, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1062 | MODE_SF, |
| 1063 | MODE_MF_SD, |
| 1064 | MODE_MF_SI, |
| 1065 | MODE_PORTS_PER_ENG_1, |
| 1066 | MODE_PORTS_PER_ENG_2, |
| 1067 | MODE_PORTS_PER_ENG_4, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1068 | MODE_100G, |
| 1069 | MODE_EAGLE_ENG1_WORKAROUND, |
| 1070 | MAX_INIT_MODES |
| 1071 | }; |
| 1072 | |
| 1073 | enum init_phases { |
| 1074 | PHASE_ENGINE, |
| 1075 | PHASE_PORT, |
| 1076 | PHASE_PF, |
Yuval Mintz | 1408cc1f | 2016-05-11 16:36:14 +0300 | [diff] [blame] | 1077 | PHASE_VF, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1078 | PHASE_QM_PF, |
| 1079 | MAX_INIT_PHASES |
| 1080 | }; |
| 1081 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1082 | /* per encapsulation type enabling flags */ |
| 1083 | struct prs_reg_encapsulation_type_en { |
| 1084 | u8 flags; |
| 1085 | #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GRE_ENABLE_MASK 0x1 |
| 1086 | #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GRE_ENABLE_SHIFT 0 |
| 1087 | #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GRE_ENABLE_MASK 0x1 |
| 1088 | #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GRE_ENABLE_SHIFT 1 |
| 1089 | #define PRS_REG_ENCAPSULATION_TYPE_EN_VXLAN_ENABLE_MASK 0x1 |
| 1090 | #define PRS_REG_ENCAPSULATION_TYPE_EN_VXLAN_ENABLE_SHIFT 2 |
| 1091 | #define PRS_REG_ENCAPSULATION_TYPE_EN_T_TAG_ENABLE_MASK 0x1 |
| 1092 | #define PRS_REG_ENCAPSULATION_TYPE_EN_T_TAG_ENABLE_SHIFT 3 |
| 1093 | #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GENEVE_ENABLE_MASK 0x1 |
| 1094 | #define PRS_REG_ENCAPSULATION_TYPE_EN_ETH_OVER_GENEVE_ENABLE_SHIFT 4 |
| 1095 | #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GENEVE_ENABLE_MASK 0x1 |
| 1096 | #define PRS_REG_ENCAPSULATION_TYPE_EN_IP_OVER_GENEVE_ENABLE_SHIFT 5 |
| 1097 | #define PRS_REG_ENCAPSULATION_TYPE_EN_RESERVED_MASK 0x3 |
| 1098 | #define PRS_REG_ENCAPSULATION_TYPE_EN_RESERVED_SHIFT 6 |
| 1099 | }; |
| 1100 | |
| 1101 | enum pxp_tph_st_hint { |
| 1102 | TPH_ST_HINT_BIDIR /* Read/Write access by Host and Device */, |
| 1103 | TPH_ST_HINT_REQUESTER /* Read/Write access by Device */, |
| 1104 | TPH_ST_HINT_TARGET, |
| 1105 | TPH_ST_HINT_TARGET_PRIO, |
| 1106 | MAX_PXP_TPH_ST_HINT |
| 1107 | }; |
| 1108 | |
| 1109 | /* QM hardware structure of enable bypass credit mask */ |
| 1110 | struct qm_rf_bypass_mask { |
| 1111 | u8 flags; |
| 1112 | #define QM_RF_BYPASS_MASK_LINEVOQ_MASK 0x1 |
| 1113 | #define QM_RF_BYPASS_MASK_LINEVOQ_SHIFT 0 |
| 1114 | #define QM_RF_BYPASS_MASK_RESERVED0_MASK 0x1 |
| 1115 | #define QM_RF_BYPASS_MASK_RESERVED0_SHIFT 1 |
| 1116 | #define QM_RF_BYPASS_MASK_PFWFQ_MASK 0x1 |
| 1117 | #define QM_RF_BYPASS_MASK_PFWFQ_SHIFT 2 |
| 1118 | #define QM_RF_BYPASS_MASK_VPWFQ_MASK 0x1 |
| 1119 | #define QM_RF_BYPASS_MASK_VPWFQ_SHIFT 3 |
| 1120 | #define QM_RF_BYPASS_MASK_PFRL_MASK 0x1 |
| 1121 | #define QM_RF_BYPASS_MASK_PFRL_SHIFT 4 |
| 1122 | #define QM_RF_BYPASS_MASK_VPQCNRL_MASK 0x1 |
| 1123 | #define QM_RF_BYPASS_MASK_VPQCNRL_SHIFT 5 |
| 1124 | #define QM_RF_BYPASS_MASK_FWPAUSE_MASK 0x1 |
| 1125 | #define QM_RF_BYPASS_MASK_FWPAUSE_SHIFT 6 |
| 1126 | #define QM_RF_BYPASS_MASK_RESERVED1_MASK 0x1 |
| 1127 | #define QM_RF_BYPASS_MASK_RESERVED1_SHIFT 7 |
| 1128 | }; |
| 1129 | |
| 1130 | /* QM hardware structure of opportunistic credit mask */ |
| 1131 | struct qm_rf_opportunistic_mask { |
| 1132 | __le16 flags; |
| 1133 | #define QM_RF_OPPORTUNISTIC_MASK_LINEVOQ_MASK 0x1 |
| 1134 | #define QM_RF_OPPORTUNISTIC_MASK_LINEVOQ_SHIFT 0 |
| 1135 | #define QM_RF_OPPORTUNISTIC_MASK_BYTEVOQ_MASK 0x1 |
| 1136 | #define QM_RF_OPPORTUNISTIC_MASK_BYTEVOQ_SHIFT 1 |
| 1137 | #define QM_RF_OPPORTUNISTIC_MASK_PFWFQ_MASK 0x1 |
| 1138 | #define QM_RF_OPPORTUNISTIC_MASK_PFWFQ_SHIFT 2 |
| 1139 | #define QM_RF_OPPORTUNISTIC_MASK_VPWFQ_MASK 0x1 |
| 1140 | #define QM_RF_OPPORTUNISTIC_MASK_VPWFQ_SHIFT 3 |
| 1141 | #define QM_RF_OPPORTUNISTIC_MASK_PFRL_MASK 0x1 |
| 1142 | #define QM_RF_OPPORTUNISTIC_MASK_PFRL_SHIFT 4 |
| 1143 | #define QM_RF_OPPORTUNISTIC_MASK_VPQCNRL_MASK 0x1 |
| 1144 | #define QM_RF_OPPORTUNISTIC_MASK_VPQCNRL_SHIFT 5 |
| 1145 | #define QM_RF_OPPORTUNISTIC_MASK_FWPAUSE_MASK 0x1 |
| 1146 | #define QM_RF_OPPORTUNISTIC_MASK_FWPAUSE_SHIFT 6 |
| 1147 | #define QM_RF_OPPORTUNISTIC_MASK_RESERVED0_MASK 0x1 |
| 1148 | #define QM_RF_OPPORTUNISTIC_MASK_RESERVED0_SHIFT 7 |
| 1149 | #define QM_RF_OPPORTUNISTIC_MASK_QUEUEEMPTY_MASK 0x1 |
| 1150 | #define QM_RF_OPPORTUNISTIC_MASK_QUEUEEMPTY_SHIFT 8 |
| 1151 | #define QM_RF_OPPORTUNISTIC_MASK_RESERVED1_MASK 0x7F |
| 1152 | #define QM_RF_OPPORTUNISTIC_MASK_RESERVED1_SHIFT 9 |
| 1153 | }; |
| 1154 | |
| 1155 | /* QM hardware structure of QM map memory */ |
| 1156 | struct qm_rf_pq_map { |
| 1157 | u32 reg; |
| 1158 | #define QM_RF_PQ_MAP_PQ_VALID_MASK 0x1 /* PQ active */ |
| 1159 | #define QM_RF_PQ_MAP_PQ_VALID_SHIFT 0 |
| 1160 | #define QM_RF_PQ_MAP_RL_ID_MASK 0xFF /* RL ID */ |
| 1161 | #define QM_RF_PQ_MAP_RL_ID_SHIFT 1 |
| 1162 | #define QM_RF_PQ_MAP_VP_PQ_ID_MASK 0x1FF |
| 1163 | #define QM_RF_PQ_MAP_VP_PQ_ID_SHIFT 9 |
| 1164 | #define QM_RF_PQ_MAP_VOQ_MASK 0x1F /* VOQ */ |
| 1165 | #define QM_RF_PQ_MAP_VOQ_SHIFT 18 |
| 1166 | #define QM_RF_PQ_MAP_WRR_WEIGHT_GROUP_MASK 0x3 /* WRR weight */ |
| 1167 | #define QM_RF_PQ_MAP_WRR_WEIGHT_GROUP_SHIFT 23 |
| 1168 | #define QM_RF_PQ_MAP_RL_VALID_MASK 0x1 /* RL active */ |
| 1169 | #define QM_RF_PQ_MAP_RL_VALID_SHIFT 25 |
| 1170 | #define QM_RF_PQ_MAP_RESERVED_MASK 0x3F |
| 1171 | #define QM_RF_PQ_MAP_RESERVED_SHIFT 26 |
| 1172 | }; |
| 1173 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1174 | /* Completion params for aggregated interrupt completion */ |
| 1175 | struct sdm_agg_int_comp_params { |
| 1176 | __le16 params; |
| 1177 | #define SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_MASK 0x3F |
| 1178 | #define SDM_AGG_INT_COMP_PARAMS_AGG_INT_INDEX_SHIFT 0 |
| 1179 | #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_MASK 0x1 |
| 1180 | #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_ENABLE_SHIFT 6 |
| 1181 | #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_MASK 0x1FF |
| 1182 | #define SDM_AGG_INT_COMP_PARAMS_AGG_VECTOR_BIT_SHIFT 7 |
| 1183 | }; |
| 1184 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1185 | /* SDM operation gen command (generate aggregative interrupt) */ |
| 1186 | struct sdm_op_gen { |
| 1187 | __le32 command; |
| 1188 | #define SDM_OP_GEN_COMP_PARAM_MASK 0xFFFF /* completion parameters 0-15 */ |
| 1189 | #define SDM_OP_GEN_COMP_PARAM_SHIFT 0 |
| 1190 | #define SDM_OP_GEN_COMP_TYPE_MASK 0xF /* completion type 16-19 */ |
| 1191 | #define SDM_OP_GEN_COMP_TYPE_SHIFT 16 |
| 1192 | #define SDM_OP_GEN_RESERVED_MASK 0xFFF /* reserved 20-31 */ |
| 1193 | #define SDM_OP_GEN_RESERVED_SHIFT 20 |
| 1194 | }; |
| 1195 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1196 | /*********************************** Init ************************************/ |
| 1197 | |
| 1198 | /* Width of GRC address in bits (addresses are specified in dwords) */ |
| 1199 | #define GRC_ADDR_BITS 23 |
| 1200 | #define MAX_GRC_ADDR ((1 << GRC_ADDR_BITS) - 1) |
| 1201 | |
| 1202 | /* indicates an init that should be applied to any phase ID */ |
| 1203 | #define ANY_PHASE_ID 0xffff |
| 1204 | |
| 1205 | /* init pattern size in bytes */ |
| 1206 | #define INIT_PATTERN_SIZE_BITS 4 |
| 1207 | #define MAX_INIT_PATTERN_SIZE BIT(INIT_PATTERN_SIZE_BITS) |
| 1208 | |
| 1209 | /* Max size in dwords of a zipped array */ |
| 1210 | #define MAX_ZIPPED_SIZE 8192 |
| 1211 | |
| 1212 | /* Global PXP window */ |
| 1213 | #define NUM_OF_PXP_WIN 19 |
| 1214 | #define PXP_WIN_DWORD_SIZE_BITS 10 |
| 1215 | #define PXP_WIN_DWORD_SIZE BIT(PXP_WIN_DWORD_SIZE_BITS) |
| 1216 | #define PXP_WIN_BYTE_SIZE_BITS (PXP_WIN_DWORD_SIZE_BITS + 2) |
| 1217 | #define PXP_WIN_BYTE_SIZE (PXP_WIN_DWORD_SIZE * 4) |
| 1218 | |
| 1219 | /********************************* GRC Dump **********************************/ |
| 1220 | |
| 1221 | /* width of GRC dump register sequence length in bits */ |
| 1222 | #define DUMP_SEQ_LEN_BITS 8 |
| 1223 | #define DUMP_SEQ_LEN_MAX_VAL ((1 << DUMP_SEQ_LEN_BITS) - 1) |
| 1224 | |
| 1225 | /* width of GRC dump memory length in bits */ |
| 1226 | #define DUMP_MEM_LEN_BITS 18 |
| 1227 | #define DUMP_MEM_LEN_MAX_VAL ((1 << DUMP_MEM_LEN_BITS) - 1) |
| 1228 | |
| 1229 | /* width of register type ID in bits */ |
| 1230 | #define REG_TYPE_ID_BITS 6 |
| 1231 | #define REG_TYPE_ID_MAX_VAL ((1 << REG_TYPE_ID_BITS) - 1) |
| 1232 | |
| 1233 | /* width of block ID in bits */ |
| 1234 | #define BLOCK_ID_BITS 8 |
| 1235 | #define BLOCK_ID_MAX_VAL ((1 << BLOCK_ID_BITS) - 1) |
| 1236 | |
| 1237 | /******************************** Idle Check *********************************/ |
| 1238 | |
| 1239 | /* max number of idle check predicate immediates */ |
| 1240 | #define MAX_IDLE_CHK_PRED_IMM 3 |
| 1241 | |
| 1242 | /* max number of idle check argument registers */ |
| 1243 | #define MAX_IDLE_CHK_READ_REGS 3 |
| 1244 | |
| 1245 | /* max number of idle check loops */ |
| 1246 | #define MAX_IDLE_CHK_LOOPS 0x10000 |
| 1247 | |
| 1248 | /* max idle check address increment */ |
| 1249 | #define MAX_IDLE_CHK_INCREMENT 0x10000 |
| 1250 | |
| 1251 | /* inicates an undefined idle check line index */ |
| 1252 | #define IDLE_CHK_UNDEFINED_LINE_IDX 0xffffff |
| 1253 | |
| 1254 | /* max number of register values following the idle check header */ |
| 1255 | #define IDLE_CHK_MAX_DUMP_REGS 2 |
| 1256 | |
| 1257 | /* arguments for IDLE_CHK_MACRO_TYPE_QM_RD_WR */ |
| 1258 | #define IDLE_CHK_QM_RD_WR_PTR 0 |
| 1259 | #define IDLE_CHK_QM_RD_WR_BANK 1 |
| 1260 | |
| 1261 | /**************************************/ |
| 1262 | /* HSI Functions constants and macros */ |
| 1263 | /**************************************/ |
| 1264 | |
| 1265 | /* Number of VLAN priorities */ |
| 1266 | #define NUM_OF_VLAN_PRIORITIES 8 |
| 1267 | |
| 1268 | /* the MCP Trace meta data signautre is duplicated in the perl script that |
| 1269 | * generats the NVRAM images. |
| 1270 | */ |
| 1271 | #define MCP_TRACE_META_IMAGE_SIGNATURE 0x669955aa |
| 1272 | |
| 1273 | /* Binary buffer header */ |
| 1274 | struct bin_buffer_hdr { |
| 1275 | u32 offset; |
| 1276 | u32 length /* buffer length in bytes */; |
| 1277 | }; |
| 1278 | |
| 1279 | /* binary buffer types */ |
| 1280 | enum bin_buffer_type { |
| 1281 | BIN_BUF_FW_VER_INFO /* fw_ver_info struct */, |
| 1282 | BIN_BUF_INIT_CMD /* init commands */, |
| 1283 | BIN_BUF_INIT_VAL /* init data */, |
| 1284 | BIN_BUF_INIT_MODE_TREE /* init modes tree */, |
| 1285 | BIN_BUF_IRO /* internal RAM offsets array */, |
| 1286 | MAX_BIN_BUFFER_TYPE |
| 1287 | }; |
| 1288 | |
| 1289 | /* Chip IDs */ |
| 1290 | enum chip_ids { |
| 1291 | CHIP_BB_A0 /* BB A0 chip ID */, |
| 1292 | CHIP_BB_B0 /* BB B0 chip ID */, |
| 1293 | CHIP_K2 /* AH chip ID */, |
| 1294 | MAX_CHIP_IDS |
| 1295 | }; |
| 1296 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1297 | struct init_array_raw_hdr { |
| 1298 | __le32 data; |
| 1299 | #define INIT_ARRAY_RAW_HDR_TYPE_MASK 0xF |
| 1300 | #define INIT_ARRAY_RAW_HDR_TYPE_SHIFT 0 |
| 1301 | #define INIT_ARRAY_RAW_HDR_PARAMS_MASK 0xFFFFFFF /* init array params */ |
| 1302 | #define INIT_ARRAY_RAW_HDR_PARAMS_SHIFT 4 |
| 1303 | }; |
| 1304 | |
| 1305 | struct init_array_standard_hdr { |
| 1306 | __le32 data; |
| 1307 | #define INIT_ARRAY_STANDARD_HDR_TYPE_MASK 0xF |
| 1308 | #define INIT_ARRAY_STANDARD_HDR_TYPE_SHIFT 0 |
| 1309 | #define INIT_ARRAY_STANDARD_HDR_SIZE_MASK 0xFFFFFFF |
| 1310 | #define INIT_ARRAY_STANDARD_HDR_SIZE_SHIFT 4 |
| 1311 | }; |
| 1312 | |
| 1313 | struct init_array_zipped_hdr { |
| 1314 | __le32 data; |
| 1315 | #define INIT_ARRAY_ZIPPED_HDR_TYPE_MASK 0xF |
| 1316 | #define INIT_ARRAY_ZIPPED_HDR_TYPE_SHIFT 0 |
| 1317 | #define INIT_ARRAY_ZIPPED_HDR_ZIPPED_SIZE_MASK 0xFFFFFFF |
| 1318 | #define INIT_ARRAY_ZIPPED_HDR_ZIPPED_SIZE_SHIFT 4 |
| 1319 | }; |
| 1320 | |
| 1321 | struct init_array_pattern_hdr { |
| 1322 | __le32 data; |
| 1323 | #define INIT_ARRAY_PATTERN_HDR_TYPE_MASK 0xF |
| 1324 | #define INIT_ARRAY_PATTERN_HDR_TYPE_SHIFT 0 |
| 1325 | #define INIT_ARRAY_PATTERN_HDR_PATTERN_SIZE_MASK 0xF |
| 1326 | #define INIT_ARRAY_PATTERN_HDR_PATTERN_SIZE_SHIFT 4 |
| 1327 | #define INIT_ARRAY_PATTERN_HDR_REPETITIONS_MASK 0xFFFFFF |
| 1328 | #define INIT_ARRAY_PATTERN_HDR_REPETITIONS_SHIFT 8 |
| 1329 | }; |
| 1330 | |
| 1331 | union init_array_hdr { |
| 1332 | struct init_array_raw_hdr raw /* raw init array header */; |
| 1333 | struct init_array_standard_hdr standard; |
| 1334 | struct init_array_zipped_hdr zipped /* zipped init array header */; |
| 1335 | struct init_array_pattern_hdr pattern /* pattern init array header */; |
| 1336 | }; |
| 1337 | |
| 1338 | enum init_array_types { |
| 1339 | INIT_ARR_STANDARD /* standard init array */, |
| 1340 | INIT_ARR_ZIPPED /* zipped init array */, |
| 1341 | INIT_ARR_PATTERN /* a repeated pattern */, |
| 1342 | MAX_INIT_ARRAY_TYPES |
| 1343 | }; |
| 1344 | |
| 1345 | /* init operation: callback */ |
| 1346 | struct init_callback_op { |
| 1347 | __le32 op_data; |
| 1348 | #define INIT_CALLBACK_OP_OP_MASK 0xF |
| 1349 | #define INIT_CALLBACK_OP_OP_SHIFT 0 |
| 1350 | #define INIT_CALLBACK_OP_RESERVED_MASK 0xFFFFFFF |
| 1351 | #define INIT_CALLBACK_OP_RESERVED_SHIFT 4 |
| 1352 | __le16 callback_id /* Callback ID */; |
| 1353 | __le16 block_id /* Blocks ID */; |
| 1354 | }; |
| 1355 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1356 | /* init operation: delay */ |
| 1357 | struct init_delay_op { |
| 1358 | __le32 op_data; |
| 1359 | #define INIT_DELAY_OP_OP_MASK 0xF |
| 1360 | #define INIT_DELAY_OP_OP_SHIFT 0 |
| 1361 | #define INIT_DELAY_OP_RESERVED_MASK 0xFFFFFFF |
| 1362 | #define INIT_DELAY_OP_RESERVED_SHIFT 4 |
| 1363 | __le32 delay /* delay in us */; |
| 1364 | }; |
| 1365 | |
| 1366 | /* init operation: if_mode */ |
| 1367 | struct init_if_mode_op { |
| 1368 | __le32 op_data; |
| 1369 | #define INIT_IF_MODE_OP_OP_MASK 0xF |
| 1370 | #define INIT_IF_MODE_OP_OP_SHIFT 0 |
| 1371 | #define INIT_IF_MODE_OP_RESERVED1_MASK 0xFFF |
| 1372 | #define INIT_IF_MODE_OP_RESERVED1_SHIFT 4 |
| 1373 | #define INIT_IF_MODE_OP_CMD_OFFSET_MASK 0xFFFF |
| 1374 | #define INIT_IF_MODE_OP_CMD_OFFSET_SHIFT 16 |
| 1375 | __le16 reserved2; |
| 1376 | __le16 modes_buf_offset; |
| 1377 | }; |
| 1378 | |
| 1379 | /* init operation: if_phase */ |
| 1380 | struct init_if_phase_op { |
| 1381 | __le32 op_data; |
| 1382 | #define INIT_IF_PHASE_OP_OP_MASK 0xF |
| 1383 | #define INIT_IF_PHASE_OP_OP_SHIFT 0 |
| 1384 | #define INIT_IF_PHASE_OP_DMAE_ENABLE_MASK 0x1 |
| 1385 | #define INIT_IF_PHASE_OP_DMAE_ENABLE_SHIFT 4 |
| 1386 | #define INIT_IF_PHASE_OP_RESERVED1_MASK 0x7FF |
| 1387 | #define INIT_IF_PHASE_OP_RESERVED1_SHIFT 5 |
| 1388 | #define INIT_IF_PHASE_OP_CMD_OFFSET_MASK 0xFFFF |
| 1389 | #define INIT_IF_PHASE_OP_CMD_OFFSET_SHIFT 16 |
| 1390 | __le32 phase_data; |
| 1391 | #define INIT_IF_PHASE_OP_PHASE_MASK 0xFF /* Init phase */ |
| 1392 | #define INIT_IF_PHASE_OP_PHASE_SHIFT 0 |
| 1393 | #define INIT_IF_PHASE_OP_RESERVED2_MASK 0xFF |
| 1394 | #define INIT_IF_PHASE_OP_RESERVED2_SHIFT 8 |
| 1395 | #define INIT_IF_PHASE_OP_PHASE_ID_MASK 0xFFFF /* Init phase ID */ |
| 1396 | #define INIT_IF_PHASE_OP_PHASE_ID_SHIFT 16 |
| 1397 | }; |
| 1398 | |
| 1399 | /* init mode operators */ |
| 1400 | enum init_mode_ops { |
| 1401 | INIT_MODE_OP_NOT /* init mode not operator */, |
| 1402 | INIT_MODE_OP_OR /* init mode or operator */, |
| 1403 | INIT_MODE_OP_AND /* init mode and operator */, |
| 1404 | MAX_INIT_MODE_OPS |
| 1405 | }; |
| 1406 | |
| 1407 | /* init operation: raw */ |
| 1408 | struct init_raw_op { |
| 1409 | __le32 op_data; |
| 1410 | #define INIT_RAW_OP_OP_MASK 0xF |
| 1411 | #define INIT_RAW_OP_OP_SHIFT 0 |
| 1412 | #define INIT_RAW_OP_PARAM1_MASK 0xFFFFFFF /* init param 1 */ |
| 1413 | #define INIT_RAW_OP_PARAM1_SHIFT 4 |
| 1414 | __le32 param2 /* Init param 2 */; |
| 1415 | }; |
| 1416 | |
| 1417 | /* init array params */ |
| 1418 | struct init_op_array_params { |
| 1419 | __le16 size /* array size in dwords */; |
| 1420 | __le16 offset /* array start offset in dwords */; |
| 1421 | }; |
| 1422 | |
| 1423 | /* Write init operation arguments */ |
| 1424 | union init_write_args { |
| 1425 | __le32 inline_val; |
| 1426 | __le32 zeros_count; |
| 1427 | __le32 array_offset; |
| 1428 | struct init_op_array_params runtime; |
| 1429 | }; |
| 1430 | |
| 1431 | /* init operation: write */ |
| 1432 | struct init_write_op { |
| 1433 | __le32 data; |
| 1434 | #define INIT_WRITE_OP_OP_MASK 0xF |
| 1435 | #define INIT_WRITE_OP_OP_SHIFT 0 |
| 1436 | #define INIT_WRITE_OP_SOURCE_MASK 0x7 |
| 1437 | #define INIT_WRITE_OP_SOURCE_SHIFT 4 |
| 1438 | #define INIT_WRITE_OP_RESERVED_MASK 0x1 |
| 1439 | #define INIT_WRITE_OP_RESERVED_SHIFT 7 |
| 1440 | #define INIT_WRITE_OP_WIDE_BUS_MASK 0x1 |
| 1441 | #define INIT_WRITE_OP_WIDE_BUS_SHIFT 8 |
| 1442 | #define INIT_WRITE_OP_ADDRESS_MASK 0x7FFFFF |
| 1443 | #define INIT_WRITE_OP_ADDRESS_SHIFT 9 |
| 1444 | union init_write_args args /* Write init operation arguments */; |
| 1445 | }; |
| 1446 | |
| 1447 | /* init operation: read */ |
| 1448 | struct init_read_op { |
| 1449 | __le32 op_data; |
| 1450 | #define INIT_READ_OP_OP_MASK 0xF |
| 1451 | #define INIT_READ_OP_OP_SHIFT 0 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1452 | #define INIT_READ_OP_POLL_TYPE_MASK 0xF |
| 1453 | #define INIT_READ_OP_POLL_TYPE_SHIFT 4 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1454 | #define INIT_READ_OP_RESERVED_MASK 0x1 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1455 | #define INIT_READ_OP_RESERVED_SHIFT 8 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1456 | #define INIT_READ_OP_ADDRESS_MASK 0x7FFFFF |
| 1457 | #define INIT_READ_OP_ADDRESS_SHIFT 9 |
| 1458 | __le32 expected_val; |
| 1459 | }; |
| 1460 | |
| 1461 | /* Init operations union */ |
| 1462 | union init_op { |
| 1463 | struct init_raw_op raw /* raw init operation */; |
| 1464 | struct init_write_op write /* write init operation */; |
| 1465 | struct init_read_op read /* read init operation */; |
| 1466 | struct init_if_mode_op if_mode /* if_mode init operation */; |
| 1467 | struct init_if_phase_op if_phase /* if_phase init operation */; |
| 1468 | struct init_callback_op callback /* callback init operation */; |
| 1469 | struct init_delay_op delay /* delay init operation */; |
| 1470 | }; |
| 1471 | |
| 1472 | /* Init command operation types */ |
| 1473 | enum init_op_types { |
| 1474 | INIT_OP_READ /* GRC read init command */, |
| 1475 | INIT_OP_WRITE /* GRC write init command */, |
| 1476 | INIT_OP_IF_MODE, |
| 1477 | INIT_OP_IF_PHASE, |
| 1478 | INIT_OP_DELAY /* delay init command */, |
| 1479 | INIT_OP_CALLBACK /* callback init command */, |
| 1480 | MAX_INIT_OP_TYPES |
| 1481 | }; |
| 1482 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1483 | enum init_poll_types { |
| 1484 | INIT_POLL_NONE /* No polling */, |
| 1485 | INIT_POLL_EQ /* init value is included in the init command */, |
| 1486 | INIT_POLL_OR /* init value is all zeros */, |
| 1487 | INIT_POLL_AND /* init value is an array of values */, |
| 1488 | MAX_INIT_POLL_TYPES |
| 1489 | }; |
| 1490 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1491 | /* init source types */ |
| 1492 | enum init_source_types { |
| 1493 | INIT_SRC_INLINE /* init value is included in the init command */, |
| 1494 | INIT_SRC_ZEROS /* init value is all zeros */, |
| 1495 | INIT_SRC_ARRAY /* init value is an array of values */, |
| 1496 | INIT_SRC_RUNTIME /* init value is provided during runtime */, |
| 1497 | MAX_INIT_SOURCE_TYPES |
| 1498 | }; |
| 1499 | |
| 1500 | /* Internal RAM Offsets macro data */ |
| 1501 | struct iro { |
| 1502 | u32 base /* RAM field offset */; |
| 1503 | u16 m1 /* multiplier 1 */; |
| 1504 | u16 m2 /* multiplier 2 */; |
| 1505 | u16 m3 /* multiplier 3 */; |
| 1506 | u16 size /* RAM field size */; |
| 1507 | }; |
| 1508 | |
| 1509 | /* QM per-port init parameters */ |
| 1510 | struct init_qm_port_params { |
| 1511 | u8 active /* Indicates if this port is active */; |
| 1512 | u8 num_active_phys_tcs; |
| 1513 | u16 num_pbf_cmd_lines; |
| 1514 | u16 num_btb_blocks; |
| 1515 | __le16 reserved; |
| 1516 | }; |
| 1517 | |
| 1518 | /* QM per-PQ init parameters */ |
| 1519 | struct init_qm_pq_params { |
| 1520 | u8 vport_id /* VPORT ID */; |
| 1521 | u8 tc_id /* TC ID */; |
| 1522 | u8 wrr_group /* WRR group */; |
| 1523 | u8 reserved; |
| 1524 | }; |
| 1525 | |
| 1526 | /* QM per-vport init parameters */ |
| 1527 | struct init_qm_vport_params { |
| 1528 | u32 vport_rl; |
| 1529 | u16 vport_wfq; |
| 1530 | u16 first_tx_pq_id[NUM_OF_TCS]; |
| 1531 | }; |
| 1532 | |
| 1533 | /* Win 2 */ |
| 1534 | #define GTT_BAR0_MAP_REG_IGU_CMD \ |
| 1535 | 0x00f000UL |
| 1536 | /* Win 3 */ |
| 1537 | #define GTT_BAR0_MAP_REG_TSDM_RAM \ |
| 1538 | 0x010000UL |
| 1539 | /* Win 4 */ |
| 1540 | #define GTT_BAR0_MAP_REG_MSDM_RAM \ |
| 1541 | 0x011000UL |
| 1542 | /* Win 5 */ |
| 1543 | #define GTT_BAR0_MAP_REG_MSDM_RAM_1024 \ |
| 1544 | 0x012000UL |
| 1545 | /* Win 6 */ |
| 1546 | #define GTT_BAR0_MAP_REG_USDM_RAM \ |
| 1547 | 0x013000UL |
| 1548 | /* Win 7 */ |
| 1549 | #define GTT_BAR0_MAP_REG_USDM_RAM_1024 \ |
| 1550 | 0x014000UL |
| 1551 | /* Win 8 */ |
| 1552 | #define GTT_BAR0_MAP_REG_USDM_RAM_2048 \ |
| 1553 | 0x015000UL |
| 1554 | /* Win 9 */ |
| 1555 | #define GTT_BAR0_MAP_REG_XSDM_RAM \ |
| 1556 | 0x016000UL |
| 1557 | /* Win 10 */ |
| 1558 | #define GTT_BAR0_MAP_REG_YSDM_RAM \ |
| 1559 | 0x017000UL |
| 1560 | /* Win 11 */ |
| 1561 | #define GTT_BAR0_MAP_REG_PSDM_RAM \ |
| 1562 | 0x018000UL |
| 1563 | |
| 1564 | /** |
| 1565 | * @brief qed_qm_pf_mem_size - prepare QM ILT sizes |
| 1566 | * |
| 1567 | * Returns the required host memory size in 4KB units. |
| 1568 | * Must be called before all QM init HSI functions. |
| 1569 | * |
| 1570 | * @param pf_id - physical function ID |
| 1571 | * @param num_pf_cids - number of connections used by this PF |
| 1572 | * @param num_vf_cids - number of connections used by VFs of this PF |
| 1573 | * @param num_tids - number of tasks used by this PF |
| 1574 | * @param num_pf_pqs - number of PQs used by this PF |
| 1575 | * @param num_vf_pqs - number of PQs used by VFs of this PF |
| 1576 | * |
| 1577 | * @return The required host memory size in 4KB units. |
| 1578 | */ |
| 1579 | u32 qed_qm_pf_mem_size(u8 pf_id, |
| 1580 | u32 num_pf_cids, |
| 1581 | u32 num_vf_cids, |
| 1582 | u32 num_tids, |
| 1583 | u16 num_pf_pqs, |
| 1584 | u16 num_vf_pqs); |
| 1585 | |
| 1586 | struct qed_qm_common_rt_init_params { |
| 1587 | u8 max_ports_per_engine; |
| 1588 | u8 max_phys_tcs_per_port; |
| 1589 | bool pf_rl_en; |
| 1590 | bool pf_wfq_en; |
| 1591 | bool vport_rl_en; |
| 1592 | bool vport_wfq_en; |
| 1593 | struct init_qm_port_params *port_params; |
| 1594 | }; |
| 1595 | |
| 1596 | /** |
| 1597 | * @brief qed_qm_common_rt_init - Prepare QM runtime init values for the |
| 1598 | * engine phase. |
| 1599 | * |
| 1600 | * @param p_hwfn |
| 1601 | * @param max_ports_per_engine - max number of ports per engine in HW |
| 1602 | * @param max_phys_tcs_per_port - max number of physical TCs per port in HW |
| 1603 | * @param pf_rl_en - enable per-PF rate limiters |
| 1604 | * @param pf_wfq_en - enable per-PF WFQ |
| 1605 | * @param vport_rl_en - enable per-VPORT rate limiters |
| 1606 | * @param vport_wfq_en - enable per-VPORT WFQ |
| 1607 | * @param port_params - array of size MAX_NUM_PORTS with |
| 1608 | * arameters for each port |
| 1609 | * |
| 1610 | * @return 0 on success, -1 on error. |
| 1611 | */ |
| 1612 | int qed_qm_common_rt_init( |
| 1613 | struct qed_hwfn *p_hwfn, |
| 1614 | struct qed_qm_common_rt_init_params *p_params); |
| 1615 | |
| 1616 | struct qed_qm_pf_rt_init_params { |
| 1617 | u8 port_id; |
| 1618 | u8 pf_id; |
| 1619 | u8 max_phys_tcs_per_port; |
| 1620 | bool is_first_pf; |
| 1621 | u32 num_pf_cids; |
| 1622 | u32 num_vf_cids; |
| 1623 | u32 num_tids; |
| 1624 | u16 start_pq; |
| 1625 | u16 num_pf_pqs; |
| 1626 | u16 num_vf_pqs; |
| 1627 | u8 start_vport; |
| 1628 | u8 num_vports; |
| 1629 | u8 pf_wfq; |
| 1630 | u32 pf_rl; |
| 1631 | struct init_qm_pq_params *pq_params; |
| 1632 | struct init_qm_vport_params *vport_params; |
| 1633 | }; |
| 1634 | |
| 1635 | int qed_qm_pf_rt_init(struct qed_hwfn *p_hwfn, |
| 1636 | struct qed_ptt *p_ptt, |
| 1637 | struct qed_qm_pf_rt_init_params *p_params); |
| 1638 | |
| 1639 | /** |
| 1640 | * @brief qed_init_pf_rl Initializes the rate limit of the specified PF |
| 1641 | * |
| 1642 | * @param p_hwfn |
| 1643 | * @param p_ptt - ptt window used for writing the registers |
| 1644 | * @param pf_id - PF ID |
| 1645 | * @param pf_rl - rate limit in Mb/sec units |
| 1646 | * |
| 1647 | * @return 0 on success, -1 on error. |
| 1648 | */ |
| 1649 | int qed_init_pf_rl(struct qed_hwfn *p_hwfn, |
| 1650 | struct qed_ptt *p_ptt, |
| 1651 | u8 pf_id, |
| 1652 | u32 pf_rl); |
| 1653 | |
| 1654 | /** |
| 1655 | * @brief qed_init_vport_rl Initializes the rate limit of the specified VPORT |
| 1656 | * |
| 1657 | * @param p_hwfn |
| 1658 | * @param p_ptt - ptt window used for writing the registers |
| 1659 | * @param vport_id - VPORT ID |
| 1660 | * @param vport_rl - rate limit in Mb/sec units |
| 1661 | * |
| 1662 | * @return 0 on success, -1 on error. |
| 1663 | */ |
| 1664 | |
| 1665 | int qed_init_vport_rl(struct qed_hwfn *p_hwfn, |
| 1666 | struct qed_ptt *p_ptt, |
| 1667 | u8 vport_id, |
| 1668 | u32 vport_rl); |
| 1669 | /** |
| 1670 | * @brief qed_send_qm_stop_cmd Sends a stop command to the QM |
| 1671 | * |
| 1672 | * @param p_hwfn |
| 1673 | * @param p_ptt - ptt window used for writing the registers |
| 1674 | * @param is_release_cmd - true for release, false for stop. |
| 1675 | * @param is_tx_pq - true for Tx PQs, false for Other PQs. |
| 1676 | * @param start_pq - first PQ ID to stop |
| 1677 | * @param num_pqs - Number of PQs to stop, starting from start_pq. |
| 1678 | * |
| 1679 | * @return bool, true if successful, false if timeout occurred while waiting |
| 1680 | * for QM command done. |
| 1681 | */ |
| 1682 | |
| 1683 | bool qed_send_qm_stop_cmd(struct qed_hwfn *p_hwfn, |
| 1684 | struct qed_ptt *p_ptt, |
| 1685 | bool is_release_cmd, |
| 1686 | bool is_tx_pq, |
| 1687 | u16 start_pq, |
| 1688 | u16 num_pqs); |
| 1689 | |
Manish Chopra | 464f664 | 2016-04-14 01:38:29 -0400 | [diff] [blame] | 1690 | void qed_set_vxlan_dest_port(struct qed_hwfn *p_hwfn, |
| 1691 | struct qed_ptt *p_ptt, u16 dest_port); |
| 1692 | void qed_set_vxlan_enable(struct qed_hwfn *p_hwfn, |
| 1693 | struct qed_ptt *p_ptt, bool vxlan_enable); |
| 1694 | void qed_set_gre_enable(struct qed_hwfn *p_hwfn, |
| 1695 | struct qed_ptt *p_ptt, bool eth_gre_enable, |
| 1696 | bool ip_gre_enable); |
| 1697 | void qed_set_geneve_dest_port(struct qed_hwfn *p_hwfn, |
| 1698 | struct qed_ptt *p_ptt, u16 dest_port); |
| 1699 | void qed_set_geneve_enable(struct qed_hwfn *p_hwfn, |
| 1700 | struct qed_ptt *p_ptt, bool eth_geneve_enable, |
| 1701 | bool ip_geneve_enable); |
| 1702 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1703 | /* Ystorm flow control mode. Use enum fw_flow_ctrl_mode */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1704 | #define YSTORM_FLOW_CONTROL_MODE_OFFSET (IRO[0].base) |
| 1705 | #define YSTORM_FLOW_CONTROL_MODE_SIZE (IRO[0].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1706 | /* Tstorm port statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1707 | #define TSTORM_PORT_STAT_OFFSET(port_id) (IRO[1].base + ((port_id) * IRO[1].m1)) |
| 1708 | #define TSTORM_PORT_STAT_SIZE (IRO[1].size) |
| 1709 | /* Tstorm ll2 port statistics */ |
| 1710 | #define TSTORM_LL2_PORT_STAT_OFFSET(port_id) \ |
| 1711 | (IRO[2].base + ((port_id) * IRO[2].m1)) |
| 1712 | #define TSTORM_LL2_PORT_STAT_SIZE (IRO[2].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1713 | /* Ustorm VF-PF Channel ready flag */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1714 | #define USTORM_VF_PF_CHANNEL_READY_OFFSET(vf_id) \ |
| 1715 | (IRO[3].base + ((vf_id) * IRO[3].m1)) |
| 1716 | #define USTORM_VF_PF_CHANNEL_READY_SIZE (IRO[3].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1717 | /* Ustorm Final flr cleanup ack */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1718 | #define USTORM_FLR_FINAL_ACK_OFFSET(pf_id) (IRO[4].base + ((pf_id) * IRO[4].m1)) |
| 1719 | #define USTORM_FLR_FINAL_ACK_SIZE (IRO[4].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1720 | /* Ustorm Event ring consumer */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1721 | #define USTORM_EQE_CONS_OFFSET(pf_id) (IRO[5].base + ((pf_id) * IRO[5].m1)) |
| 1722 | #define USTORM_EQE_CONS_SIZE (IRO[5].size) |
| 1723 | /* Ustorm Common Queue ring consumer */ |
| 1724 | #define USTORM_COMMON_QUEUE_CONS_OFFSET(global_queue_id) \ |
| 1725 | (IRO[6].base + ((global_queue_id) * IRO[6].m1)) |
| 1726 | #define USTORM_COMMON_QUEUE_CONS_SIZE (IRO[6].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1727 | /* Xstorm Integration Test Data */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1728 | #define XSTORM_INTEG_TEST_DATA_OFFSET (IRO[7].base) |
| 1729 | #define XSTORM_INTEG_TEST_DATA_SIZE (IRO[7].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1730 | /* Ystorm Integration Test Data */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1731 | #define YSTORM_INTEG_TEST_DATA_OFFSET (IRO[8].base) |
| 1732 | #define YSTORM_INTEG_TEST_DATA_SIZE (IRO[8].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1733 | /* Pstorm Integration Test Data */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1734 | #define PSTORM_INTEG_TEST_DATA_OFFSET (IRO[9].base) |
| 1735 | #define PSTORM_INTEG_TEST_DATA_SIZE (IRO[9].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1736 | /* Tstorm Integration Test Data */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1737 | #define TSTORM_INTEG_TEST_DATA_OFFSET (IRO[10].base) |
| 1738 | #define TSTORM_INTEG_TEST_DATA_SIZE (IRO[10].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1739 | /* Mstorm Integration Test Data */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1740 | #define MSTORM_INTEG_TEST_DATA_OFFSET (IRO[11].base) |
| 1741 | #define MSTORM_INTEG_TEST_DATA_SIZE (IRO[11].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1742 | /* Ustorm Integration Test Data */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1743 | #define USTORM_INTEG_TEST_DATA_OFFSET (IRO[12].base) |
| 1744 | #define USTORM_INTEG_TEST_DATA_SIZE (IRO[12].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1745 | /* Tstorm producers */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1746 | #define TSTORM_LL2_RX_PRODS_OFFSET(core_rx_queue_id) \ |
| 1747 | (IRO[13].base + ((core_rx_queue_id) * IRO[13].m1)) |
| 1748 | #define TSTORM_LL2_RX_PRODS_SIZE (IRO[13].size) |
| 1749 | /* Tstorm LightL2 queue statistics */ |
| 1750 | #define CORE_LL2_TSTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) \ |
| 1751 | (IRO[14].base + ((core_rx_queue_id) * IRO[14].m1)) |
| 1752 | #define CORE_LL2_TSTORM_PER_QUEUE_STAT_SIZE (IRO[14].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1753 | /* Ustorm LiteL2 queue statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1754 | #define CORE_LL2_USTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) \ |
| 1755 | (IRO[15].base + ((core_rx_queue_id) * IRO[15].m1)) |
| 1756 | #define CORE_LL2_USTORM_PER_QUEUE_STAT_SIZE (IRO[15].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1757 | /* Pstorm LiteL2 queue statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1758 | #define CORE_LL2_PSTORM_PER_QUEUE_STAT_OFFSET(core_tx_stats_id) \ |
| 1759 | (IRO[16].base + ((core_tx_stats_id) * IRO[16].m1)) |
| 1760 | #define CORE_LL2_PSTORM_PER_QUEUE_STAT_SIZE (IRO[16].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1761 | /* Mstorm queue statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1762 | #define MSTORM_QUEUE_STAT_OFFSET(stat_counter_id) \ |
| 1763 | (IRO[17].base + ((stat_counter_id) * IRO[17].m1)) |
| 1764 | #define MSTORM_QUEUE_STAT_SIZE (IRO[17].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1765 | /* Mstorm producers */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1766 | #define MSTORM_PRODS_OFFSET(queue_id) (IRO[18].base + ((queue_id) * IRO[18].m1)) |
| 1767 | #define MSTORM_PRODS_SIZE (IRO[18].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1768 | /* TPA agregation timeout in us resolution (on ASIC) */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1769 | #define MSTORM_TPA_TIMEOUT_US_OFFSET (IRO[19].base) |
| 1770 | #define MSTORM_TPA_TIMEOUT_US_SIZE (IRO[19].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1771 | /* Ustorm queue statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1772 | #define USTORM_QUEUE_STAT_OFFSET(stat_counter_id) \ |
| 1773 | (IRO[20].base + ((stat_counter_id) * IRO[20].m1)) |
| 1774 | #define USTORM_QUEUE_STAT_SIZE (IRO[20].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1775 | /* Ustorm queue zone */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1776 | #define USTORM_ETH_QUEUE_ZONE_OFFSET(queue_id) \ |
| 1777 | (IRO[21].base + ((queue_id) * IRO[21].m1)) |
| 1778 | #define USTORM_ETH_QUEUE_ZONE_SIZE (IRO[21].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1779 | /* Pstorm queue statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1780 | #define PSTORM_QUEUE_STAT_OFFSET(stat_counter_id) \ |
| 1781 | (IRO[22].base + ((stat_counter_id) * IRO[22].m1)) |
| 1782 | #define PSTORM_QUEUE_STAT_SIZE (IRO[22].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1783 | /* Tstorm last parser message */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1784 | #define TSTORM_ETH_PRS_INPUT_OFFSET (IRO[23].base) |
| 1785 | #define TSTORM_ETH_PRS_INPUT_SIZE (IRO[23].size) |
| 1786 | /* Tstorm Eth limit Rx rate */ |
| 1787 | #define ETH_RX_RATE_LIMIT_OFFSET(pf_id) (IRO[24].base + ((pf_id) * IRO[24].m1)) |
| 1788 | #define ETH_RX_RATE_LIMIT_SIZE (IRO[24].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1789 | /* Ystorm queue zone */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1790 | #define YSTORM_ETH_QUEUE_ZONE_OFFSET(queue_id) \ |
| 1791 | (IRO[25].base + ((queue_id) * IRO[25].m1)) |
| 1792 | #define YSTORM_ETH_QUEUE_ZONE_SIZE (IRO[25].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1793 | /* Ystorm cqe producer */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1794 | #define YSTORM_TOE_CQ_PROD_OFFSET(rss_id) \ |
| 1795 | (IRO[26].base + ((rss_id) * IRO[26].m1)) |
| 1796 | #define YSTORM_TOE_CQ_PROD_SIZE (IRO[26].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1797 | /* Ustorm cqe producer */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1798 | #define USTORM_TOE_CQ_PROD_OFFSET(rss_id) \ |
| 1799 | (IRO[27].base + ((rss_id) * IRO[27].m1)) |
| 1800 | #define USTORM_TOE_CQ_PROD_SIZE (IRO[27].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1801 | /* Ustorm grq producer */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1802 | #define USTORM_TOE_GRQ_PROD_OFFSET(pf_id) \ |
| 1803 | (IRO[28].base + ((pf_id) * IRO[28].m1)) |
| 1804 | #define USTORM_TOE_GRQ_PROD_SIZE (IRO[28].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1805 | /* Tstorm cmdq-cons of given command queue-id */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1806 | #define TSTORM_SCSI_CMDQ_CONS_OFFSET(cmdq_queue_id) \ |
| 1807 | (IRO[29].base + ((cmdq_queue_id) * IRO[29].m1)) |
| 1808 | #define TSTORM_SCSI_CMDQ_CONS_SIZE (IRO[29].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1809 | /* Mstorm rq-cons of given queue-id */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1810 | #define MSTORM_SCSI_RQ_CONS_OFFSET(rq_queue_id) \ |
| 1811 | (IRO[30].base + ((rq_queue_id) * IRO[30].m1)) |
| 1812 | #define MSTORM_SCSI_RQ_CONS_SIZE (IRO[30].size) |
| 1813 | /* Mstorm bdq-external-producer of given BDQ function ID, BDqueue-id */ |
| 1814 | #define MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id, bdq_id) \ |
| 1815 | (IRO[31].base + ((func_id) * IRO[31].m1) + ((bdq_id) * IRO[31].m2)) |
| 1816 | #define MSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[31].size) |
| 1817 | /* Tstorm (reflects M-Storm) bdq-external-producer of given fn ID, BDqueue-id */ |
| 1818 | #define TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id, bdq_id) \ |
| 1819 | (IRO[32].base + ((func_id) * IRO[32].m1) + ((bdq_id) * IRO[32].m2)) |
| 1820 | #define TSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[32].size) |
| 1821 | /* Tstorm iSCSI RX stats */ |
| 1822 | #define TSTORM_ISCSI_RX_STATS_OFFSET(pf_id) \ |
| 1823 | (IRO[33].base + ((pf_id) * IRO[33].m1)) |
| 1824 | #define TSTORM_ISCSI_RX_STATS_SIZE (IRO[33].size) |
| 1825 | /* Mstorm iSCSI RX stats */ |
| 1826 | #define MSTORM_ISCSI_RX_STATS_OFFSET(pf_id) \ |
| 1827 | (IRO[34].base + ((pf_id) * IRO[34].m1)) |
| 1828 | #define MSTORM_ISCSI_RX_STATS_SIZE (IRO[34].size) |
| 1829 | /* Ustorm iSCSI RX stats */ |
| 1830 | #define USTORM_ISCSI_RX_STATS_OFFSET(pf_id) \ |
| 1831 | (IRO[35].base + ((pf_id) * IRO[35].m1)) |
| 1832 | #define USTORM_ISCSI_RX_STATS_SIZE (IRO[35].size) |
| 1833 | /* Xstorm iSCSI TX stats */ |
| 1834 | #define XSTORM_ISCSI_TX_STATS_OFFSET(pf_id) \ |
| 1835 | (IRO[36].base + ((pf_id) * IRO[36].m1)) |
| 1836 | #define XSTORM_ISCSI_TX_STATS_SIZE (IRO[36].size) |
| 1837 | /* Ystorm iSCSI TX stats */ |
| 1838 | #define YSTORM_ISCSI_TX_STATS_OFFSET(pf_id) \ |
| 1839 | (IRO[37].base + ((pf_id) * IRO[37].m1)) |
| 1840 | #define YSTORM_ISCSI_TX_STATS_SIZE (IRO[37].size) |
| 1841 | /* Pstorm iSCSI TX stats */ |
| 1842 | #define PSTORM_ISCSI_TX_STATS_OFFSET(pf_id) \ |
| 1843 | (IRO[38].base + ((pf_id) * IRO[38].m1)) |
| 1844 | #define PSTORM_ISCSI_TX_STATS_SIZE (IRO[38].size) |
| 1845 | /* Tstorm FCoE RX stats */ |
| 1846 | #define TSTORM_FCOE_RX_STATS_OFFSET(pf_id) \ |
| 1847 | (IRO[39].base + ((pf_id) * IRO[39].m1)) |
| 1848 | #define TSTORM_FCOE_RX_STATS_SIZE (IRO[39].size) |
| 1849 | /* Mstorm FCoE RX stats */ |
| 1850 | #define MSTORM_FCOE_RX_STATS_OFFSET(pf_id) \ |
| 1851 | (IRO[40].base + ((pf_id) * IRO[40].m1)) |
| 1852 | #define MSTORM_FCOE_RX_STATS_SIZE (IRO[40].size) |
| 1853 | /* Pstorm FCoE TX stats */ |
| 1854 | #define PSTORM_FCOE_TX_STATS_OFFSET(pf_id) \ |
| 1855 | (IRO[41].base + ((pf_id) * IRO[41].m1)) |
| 1856 | #define PSTORM_FCOE_TX_STATS_SIZE (IRO[41].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1857 | /* Pstorm RoCE statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1858 | #define PSTORM_ROCE_STAT_OFFSET(stat_counter_id) \ |
| 1859 | (IRO[42].base + ((stat_counter_id) * IRO[42].m1)) |
| 1860 | #define PSTORM_ROCE_STAT_SIZE (IRO[42].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1861 | /* Tstorm RoCE statistics */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1862 | #define TSTORM_ROCE_STAT_OFFSET(stat_counter_id) \ |
| 1863 | (IRO[43].base + ((stat_counter_id) * IRO[43].m1)) |
| 1864 | #define TSTORM_ROCE_STAT_SIZE (IRO[43].size) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1865 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1866 | static const struct iro iro_arr[44] = { |
| 1867 | { 0x10, 0x0, 0x0, 0x0, 0x8 }, |
| 1868 | { 0x47c8, 0x60, 0x0, 0x0, 0x60 }, |
| 1869 | { 0x5e30, 0x20, 0x0, 0x0, 0x20 }, |
| 1870 | { 0x510, 0x8, 0x0, 0x0, 0x4 }, |
| 1871 | { 0x490, 0x8, 0x0, 0x0, 0x4 }, |
| 1872 | { 0x10, 0x8, 0x0, 0x0, 0x2 }, |
| 1873 | { 0x90, 0x8, 0x0, 0x0, 0x2 }, |
| 1874 | { 0x4940, 0x0, 0x0, 0x0, 0x78 }, |
| 1875 | { 0x3de0, 0x0, 0x0, 0x0, 0x78 }, |
| 1876 | { 0x2998, 0x0, 0x0, 0x0, 0x78 }, |
| 1877 | { 0x4750, 0x0, 0x0, 0x0, 0x78 }, |
| 1878 | { 0x56d0, 0x0, 0x0, 0x0, 0x78 }, |
| 1879 | { 0x7e50, 0x0, 0x0, 0x0, 0x78 }, |
| 1880 | { 0x100, 0x8, 0x0, 0x0, 0x8 }, |
| 1881 | { 0x5c10, 0x10, 0x0, 0x0, 0x10 }, |
| 1882 | { 0xb508, 0x30, 0x0, 0x0, 0x30 }, |
| 1883 | { 0x95c0, 0x30, 0x0, 0x0, 0x30 }, |
| 1884 | { 0x58a0, 0x40, 0x0, 0x0, 0x40 }, |
| 1885 | { 0x200, 0x10, 0x0, 0x0, 0x8 }, |
| 1886 | { 0xa230, 0x0, 0x0, 0x0, 0x4 }, |
| 1887 | { 0x8058, 0x40, 0x0, 0x0, 0x30 }, |
| 1888 | { 0xd00, 0x8, 0x0, 0x0, 0x8 }, |
| 1889 | { 0x2b30, 0x80, 0x0, 0x0, 0x38 }, |
| 1890 | { 0xa808, 0x0, 0x0, 0x0, 0xf0 }, |
| 1891 | { 0xa8f8, 0x8, 0x0, 0x0, 0x8 }, |
| 1892 | { 0x80, 0x8, 0x0, 0x0, 0x8 }, |
| 1893 | { 0xac0, 0x8, 0x0, 0x0, 0x8 }, |
| 1894 | { 0x2580, 0x8, 0x0, 0x0, 0x8 }, |
| 1895 | { 0x2500, 0x8, 0x0, 0x0, 0x8 }, |
| 1896 | { 0x440, 0x8, 0x0, 0x0, 0x2 }, |
| 1897 | { 0x1800, 0x8, 0x0, 0x0, 0x2 }, |
| 1898 | { 0x1a00, 0x10, 0x8, 0x0, 0x2 }, |
| 1899 | { 0x640, 0x10, 0x8, 0x0, 0x2 }, |
| 1900 | { 0xd9b8, 0x38, 0x0, 0x0, 0x24 }, |
| 1901 | { 0x11048, 0x10, 0x0, 0x0, 0x8 }, |
| 1902 | { 0x11678, 0x38, 0x0, 0x0, 0x18 }, |
| 1903 | { 0xaec0, 0x30, 0x0, 0x0, 0x10 }, |
| 1904 | { 0x8700, 0x28, 0x0, 0x0, 0x18 }, |
| 1905 | { 0xec00, 0x10, 0x0, 0x0, 0x10 }, |
| 1906 | { 0xde38, 0x40, 0x0, 0x0, 0x30 }, |
| 1907 | { 0x121a8, 0x38, 0x0, 0x0, 0x8 }, |
| 1908 | { 0xf068, 0x20, 0x0, 0x0, 0x20 }, |
| 1909 | { 0x2b68, 0x80, 0x0, 0x0, 0x10 }, |
| 1910 | { 0x4ab8, 0x10, 0x0, 0x0, 0x10 }, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1911 | }; |
| 1912 | |
| 1913 | /* Runtime array offsets */ |
| 1914 | #define DORQ_REG_PF_MAX_ICID_0_RT_OFFSET 0 |
| 1915 | #define DORQ_REG_PF_MAX_ICID_1_RT_OFFSET 1 |
| 1916 | #define DORQ_REG_PF_MAX_ICID_2_RT_OFFSET 2 |
| 1917 | #define DORQ_REG_PF_MAX_ICID_3_RT_OFFSET 3 |
| 1918 | #define DORQ_REG_PF_MAX_ICID_4_RT_OFFSET 4 |
| 1919 | #define DORQ_REG_PF_MAX_ICID_5_RT_OFFSET 5 |
| 1920 | #define DORQ_REG_PF_MAX_ICID_6_RT_OFFSET 6 |
| 1921 | #define DORQ_REG_PF_MAX_ICID_7_RT_OFFSET 7 |
| 1922 | #define DORQ_REG_VF_MAX_ICID_0_RT_OFFSET 8 |
| 1923 | #define DORQ_REG_VF_MAX_ICID_1_RT_OFFSET 9 |
| 1924 | #define DORQ_REG_VF_MAX_ICID_2_RT_OFFSET 10 |
| 1925 | #define DORQ_REG_VF_MAX_ICID_3_RT_OFFSET 11 |
| 1926 | #define DORQ_REG_VF_MAX_ICID_4_RT_OFFSET 12 |
| 1927 | #define DORQ_REG_VF_MAX_ICID_5_RT_OFFSET 13 |
| 1928 | #define DORQ_REG_VF_MAX_ICID_6_RT_OFFSET 14 |
| 1929 | #define DORQ_REG_VF_MAX_ICID_7_RT_OFFSET 15 |
| 1930 | #define DORQ_REG_PF_WAKE_ALL_RT_OFFSET 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1931 | #define DORQ_REG_TAG1_ETHERTYPE_RT_OFFSET 17 |
| 1932 | #define IGU_REG_PF_CONFIGURATION_RT_OFFSET 18 |
| 1933 | #define IGU_REG_VF_CONFIGURATION_RT_OFFSET 19 |
| 1934 | #define IGU_REG_ATTN_MSG_ADDR_L_RT_OFFSET 20 |
| 1935 | #define IGU_REG_ATTN_MSG_ADDR_H_RT_OFFSET 21 |
| 1936 | #define IGU_REG_LEADING_EDGE_LATCH_RT_OFFSET 22 |
| 1937 | #define IGU_REG_TRAILING_EDGE_LATCH_RT_OFFSET 23 |
| 1938 | #define CAU_REG_CQE_AGG_UNIT_SIZE_RT_OFFSET 24 |
| 1939 | #define CAU_REG_SB_VAR_MEMORY_RT_OFFSET 761 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1940 | #define CAU_REG_SB_VAR_MEMORY_RT_SIZE 736 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1941 | #define CAU_REG_SB_VAR_MEMORY_RT_OFFSET 761 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1942 | #define CAU_REG_SB_VAR_MEMORY_RT_SIZE 736 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1943 | #define CAU_REG_SB_ADDR_MEMORY_RT_OFFSET 1497 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1944 | #define CAU_REG_SB_ADDR_MEMORY_RT_SIZE 736 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1945 | #define CAU_REG_PI_MEMORY_RT_OFFSET 2233 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1946 | #define CAU_REG_PI_MEMORY_RT_SIZE 4416 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1947 | #define PRS_REG_SEARCH_RESP_INITIATOR_TYPE_RT_OFFSET 6649 |
| 1948 | #define PRS_REG_TASK_ID_MAX_INITIATOR_PF_RT_OFFSET 6650 |
| 1949 | #define PRS_REG_TASK_ID_MAX_INITIATOR_VF_RT_OFFSET 6651 |
| 1950 | #define PRS_REG_TASK_ID_MAX_TARGET_PF_RT_OFFSET 6652 |
| 1951 | #define PRS_REG_TASK_ID_MAX_TARGET_VF_RT_OFFSET 6653 |
| 1952 | #define PRS_REG_SEARCH_TCP_RT_OFFSET 6654 |
| 1953 | #define PRS_REG_SEARCH_FCOE_RT_OFFSET 6655 |
| 1954 | #define PRS_REG_SEARCH_ROCE_RT_OFFSET 6656 |
| 1955 | #define PRS_REG_ROCE_DEST_QP_MAX_VF_RT_OFFSET 6657 |
| 1956 | #define PRS_REG_ROCE_DEST_QP_MAX_PF_RT_OFFSET 6658 |
| 1957 | #define PRS_REG_SEARCH_OPENFLOW_RT_OFFSET 6659 |
| 1958 | #define PRS_REG_SEARCH_NON_IP_AS_OPENFLOW_RT_OFFSET 6660 |
| 1959 | #define PRS_REG_OPENFLOW_SUPPORT_ONLY_KNOWN_OVER_IP_RT_OFFSET 6661 |
| 1960 | #define PRS_REG_OPENFLOW_SEARCH_KEY_MASK_RT_OFFSET 6662 |
| 1961 | #define PRS_REG_TAG_ETHERTYPE_0_RT_OFFSET 6663 |
| 1962 | #define PRS_REG_LIGHT_L2_ETHERTYPE_EN_RT_OFFSET 6664 |
| 1963 | #define SRC_REG_FIRSTFREE_RT_OFFSET 6665 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1964 | #define SRC_REG_FIRSTFREE_RT_SIZE 2 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1965 | #define SRC_REG_LASTFREE_RT_OFFSET 6667 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 1966 | #define SRC_REG_LASTFREE_RT_SIZE 2 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 1967 | #define SRC_REG_COUNTFREE_RT_OFFSET 6669 |
| 1968 | #define SRC_REG_NUMBER_HASH_BITS_RT_OFFSET 6670 |
| 1969 | #define PSWRQ2_REG_CDUT_P_SIZE_RT_OFFSET 6671 |
| 1970 | #define PSWRQ2_REG_CDUC_P_SIZE_RT_OFFSET 6672 |
| 1971 | #define PSWRQ2_REG_TM_P_SIZE_RT_OFFSET 6673 |
| 1972 | #define PSWRQ2_REG_QM_P_SIZE_RT_OFFSET 6674 |
| 1973 | #define PSWRQ2_REG_SRC_P_SIZE_RT_OFFSET 6675 |
| 1974 | #define PSWRQ2_REG_TM_FIRST_ILT_RT_OFFSET 6676 |
| 1975 | #define PSWRQ2_REG_TM_LAST_ILT_RT_OFFSET 6677 |
| 1976 | #define PSWRQ2_REG_QM_FIRST_ILT_RT_OFFSET 6678 |
| 1977 | #define PSWRQ2_REG_QM_LAST_ILT_RT_OFFSET 6679 |
| 1978 | #define PSWRQ2_REG_SRC_FIRST_ILT_RT_OFFSET 6680 |
| 1979 | #define PSWRQ2_REG_SRC_LAST_ILT_RT_OFFSET 6681 |
| 1980 | #define PSWRQ2_REG_CDUC_FIRST_ILT_RT_OFFSET 6682 |
| 1981 | #define PSWRQ2_REG_CDUC_LAST_ILT_RT_OFFSET 6683 |
| 1982 | #define PSWRQ2_REG_CDUT_FIRST_ILT_RT_OFFSET 6684 |
| 1983 | #define PSWRQ2_REG_CDUT_LAST_ILT_RT_OFFSET 6685 |
| 1984 | #define PSWRQ2_REG_TSDM_FIRST_ILT_RT_OFFSET 6686 |
| 1985 | #define PSWRQ2_REG_TSDM_LAST_ILT_RT_OFFSET 6687 |
| 1986 | #define PSWRQ2_REG_TM_NUMBER_OF_PF_BLOCKS_RT_OFFSET 6688 |
| 1987 | #define PSWRQ2_REG_CDUT_NUMBER_OF_PF_BLOCKS_RT_OFFSET 6689 |
| 1988 | #define PSWRQ2_REG_CDUC_NUMBER_OF_PF_BLOCKS_RT_OFFSET 6690 |
| 1989 | #define PSWRQ2_REG_TM_VF_BLOCKS_RT_OFFSET 6691 |
| 1990 | #define PSWRQ2_REG_CDUT_VF_BLOCKS_RT_OFFSET 6692 |
| 1991 | #define PSWRQ2_REG_CDUC_VF_BLOCKS_RT_OFFSET 6693 |
| 1992 | #define PSWRQ2_REG_TM_BLOCKS_FACTOR_RT_OFFSET 6694 |
| 1993 | #define PSWRQ2_REG_CDUT_BLOCKS_FACTOR_RT_OFFSET 6695 |
| 1994 | #define PSWRQ2_REG_CDUC_BLOCKS_FACTOR_RT_OFFSET 6696 |
| 1995 | #define PSWRQ2_REG_VF_BASE_RT_OFFSET 6697 |
| 1996 | #define PSWRQ2_REG_VF_LAST_ILT_RT_OFFSET 6698 |
| 1997 | #define PSWRQ2_REG_WR_MBS0_RT_OFFSET 6699 |
| 1998 | #define PSWRQ2_REG_RD_MBS0_RT_OFFSET 6700 |
| 1999 | #define PSWRQ2_REG_DRAM_ALIGN_WR_RT_OFFSET 6701 |
| 2000 | #define PSWRQ2_REG_DRAM_ALIGN_RD_RT_OFFSET 6702 |
| 2001 | #define PSWRQ2_REG_ILT_MEMORY_RT_OFFSET 6703 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2002 | #define PSWRQ2_REG_ILT_MEMORY_RT_SIZE 22000 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2003 | #define PGLUE_REG_B_VF_BASE_RT_OFFSET 28703 |
| 2004 | #define PGLUE_REG_B_CACHE_LINE_SIZE_RT_OFFSET 28704 |
| 2005 | #define PGLUE_REG_B_PF_BAR0_SIZE_RT_OFFSET 28705 |
| 2006 | #define PGLUE_REG_B_PF_BAR1_SIZE_RT_OFFSET 28706 |
| 2007 | #define PGLUE_REG_B_VF_BAR1_SIZE_RT_OFFSET 28707 |
| 2008 | #define TM_REG_VF_ENABLE_CONN_RT_OFFSET 28708 |
| 2009 | #define TM_REG_PF_ENABLE_CONN_RT_OFFSET 28709 |
| 2010 | #define TM_REG_PF_ENABLE_TASK_RT_OFFSET 28710 |
| 2011 | #define TM_REG_GROUP_SIZE_RESOLUTION_CONN_RT_OFFSET 28711 |
| 2012 | #define TM_REG_GROUP_SIZE_RESOLUTION_TASK_RT_OFFSET 28712 |
| 2013 | #define TM_REG_CONFIG_CONN_MEM_RT_OFFSET 28713 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2014 | #define TM_REG_CONFIG_CONN_MEM_RT_SIZE 416 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2015 | #define TM_REG_CONFIG_TASK_MEM_RT_OFFSET 29129 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2016 | #define TM_REG_CONFIG_TASK_MEM_RT_SIZE 512 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2017 | #define QM_REG_MAXPQSIZE_0_RT_OFFSET 29641 |
| 2018 | #define QM_REG_MAXPQSIZE_1_RT_OFFSET 29642 |
| 2019 | #define QM_REG_MAXPQSIZE_2_RT_OFFSET 29643 |
| 2020 | #define QM_REG_MAXPQSIZETXSEL_0_RT_OFFSET 29644 |
| 2021 | #define QM_REG_MAXPQSIZETXSEL_1_RT_OFFSET 29645 |
| 2022 | #define QM_REG_MAXPQSIZETXSEL_2_RT_OFFSET 29646 |
| 2023 | #define QM_REG_MAXPQSIZETXSEL_3_RT_OFFSET 29647 |
| 2024 | #define QM_REG_MAXPQSIZETXSEL_4_RT_OFFSET 29648 |
| 2025 | #define QM_REG_MAXPQSIZETXSEL_5_RT_OFFSET 29649 |
| 2026 | #define QM_REG_MAXPQSIZETXSEL_6_RT_OFFSET 29650 |
| 2027 | #define QM_REG_MAXPQSIZETXSEL_7_RT_OFFSET 29651 |
| 2028 | #define QM_REG_MAXPQSIZETXSEL_8_RT_OFFSET 29652 |
| 2029 | #define QM_REG_MAXPQSIZETXSEL_9_RT_OFFSET 29653 |
| 2030 | #define QM_REG_MAXPQSIZETXSEL_10_RT_OFFSET 29654 |
| 2031 | #define QM_REG_MAXPQSIZETXSEL_11_RT_OFFSET 29655 |
| 2032 | #define QM_REG_MAXPQSIZETXSEL_12_RT_OFFSET 29656 |
| 2033 | #define QM_REG_MAXPQSIZETXSEL_13_RT_OFFSET 29657 |
| 2034 | #define QM_REG_MAXPQSIZETXSEL_14_RT_OFFSET 29658 |
| 2035 | #define QM_REG_MAXPQSIZETXSEL_15_RT_OFFSET 29659 |
| 2036 | #define QM_REG_MAXPQSIZETXSEL_16_RT_OFFSET 29660 |
| 2037 | #define QM_REG_MAXPQSIZETXSEL_17_RT_OFFSET 29661 |
| 2038 | #define QM_REG_MAXPQSIZETXSEL_18_RT_OFFSET 29662 |
| 2039 | #define QM_REG_MAXPQSIZETXSEL_19_RT_OFFSET 29663 |
| 2040 | #define QM_REG_MAXPQSIZETXSEL_20_RT_OFFSET 29664 |
| 2041 | #define QM_REG_MAXPQSIZETXSEL_21_RT_OFFSET 29665 |
| 2042 | #define QM_REG_MAXPQSIZETXSEL_22_RT_OFFSET 29666 |
| 2043 | #define QM_REG_MAXPQSIZETXSEL_23_RT_OFFSET 29667 |
| 2044 | #define QM_REG_MAXPQSIZETXSEL_24_RT_OFFSET 29668 |
| 2045 | #define QM_REG_MAXPQSIZETXSEL_25_RT_OFFSET 29669 |
| 2046 | #define QM_REG_MAXPQSIZETXSEL_26_RT_OFFSET 29670 |
| 2047 | #define QM_REG_MAXPQSIZETXSEL_27_RT_OFFSET 29671 |
| 2048 | #define QM_REG_MAXPQSIZETXSEL_28_RT_OFFSET 29672 |
| 2049 | #define QM_REG_MAXPQSIZETXSEL_29_RT_OFFSET 29673 |
| 2050 | #define QM_REG_MAXPQSIZETXSEL_30_RT_OFFSET 29674 |
| 2051 | #define QM_REG_MAXPQSIZETXSEL_31_RT_OFFSET 29675 |
| 2052 | #define QM_REG_MAXPQSIZETXSEL_32_RT_OFFSET 29676 |
| 2053 | #define QM_REG_MAXPQSIZETXSEL_33_RT_OFFSET 29677 |
| 2054 | #define QM_REG_MAXPQSIZETXSEL_34_RT_OFFSET 29678 |
| 2055 | #define QM_REG_MAXPQSIZETXSEL_35_RT_OFFSET 29679 |
| 2056 | #define QM_REG_MAXPQSIZETXSEL_36_RT_OFFSET 29680 |
| 2057 | #define QM_REG_MAXPQSIZETXSEL_37_RT_OFFSET 29681 |
| 2058 | #define QM_REG_MAXPQSIZETXSEL_38_RT_OFFSET 29682 |
| 2059 | #define QM_REG_MAXPQSIZETXSEL_39_RT_OFFSET 29683 |
| 2060 | #define QM_REG_MAXPQSIZETXSEL_40_RT_OFFSET 29684 |
| 2061 | #define QM_REG_MAXPQSIZETXSEL_41_RT_OFFSET 29685 |
| 2062 | #define QM_REG_MAXPQSIZETXSEL_42_RT_OFFSET 29686 |
| 2063 | #define QM_REG_MAXPQSIZETXSEL_43_RT_OFFSET 29687 |
| 2064 | #define QM_REG_MAXPQSIZETXSEL_44_RT_OFFSET 29688 |
| 2065 | #define QM_REG_MAXPQSIZETXSEL_45_RT_OFFSET 29689 |
| 2066 | #define QM_REG_MAXPQSIZETXSEL_46_RT_OFFSET 29690 |
| 2067 | #define QM_REG_MAXPQSIZETXSEL_47_RT_OFFSET 29691 |
| 2068 | #define QM_REG_MAXPQSIZETXSEL_48_RT_OFFSET 29692 |
| 2069 | #define QM_REG_MAXPQSIZETXSEL_49_RT_OFFSET 29693 |
| 2070 | #define QM_REG_MAXPQSIZETXSEL_50_RT_OFFSET 29694 |
| 2071 | #define QM_REG_MAXPQSIZETXSEL_51_RT_OFFSET 29695 |
| 2072 | #define QM_REG_MAXPQSIZETXSEL_52_RT_OFFSET 29696 |
| 2073 | #define QM_REG_MAXPQSIZETXSEL_53_RT_OFFSET 29697 |
| 2074 | #define QM_REG_MAXPQSIZETXSEL_54_RT_OFFSET 29698 |
| 2075 | #define QM_REG_MAXPQSIZETXSEL_55_RT_OFFSET 29699 |
| 2076 | #define QM_REG_MAXPQSIZETXSEL_56_RT_OFFSET 29700 |
| 2077 | #define QM_REG_MAXPQSIZETXSEL_57_RT_OFFSET 29701 |
| 2078 | #define QM_REG_MAXPQSIZETXSEL_58_RT_OFFSET 29702 |
| 2079 | #define QM_REG_MAXPQSIZETXSEL_59_RT_OFFSET 29703 |
| 2080 | #define QM_REG_MAXPQSIZETXSEL_60_RT_OFFSET 29704 |
| 2081 | #define QM_REG_MAXPQSIZETXSEL_61_RT_OFFSET 29705 |
| 2082 | #define QM_REG_MAXPQSIZETXSEL_62_RT_OFFSET 29706 |
| 2083 | #define QM_REG_MAXPQSIZETXSEL_63_RT_OFFSET 29707 |
| 2084 | #define QM_REG_BASEADDROTHERPQ_RT_OFFSET 29708 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2085 | #define QM_REG_BASEADDROTHERPQ_RT_SIZE 128 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2086 | #define QM_REG_VOQCRDLINE_RT_OFFSET 29836 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2087 | #define QM_REG_VOQCRDLINE_RT_SIZE 20 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2088 | #define QM_REG_VOQINITCRDLINE_RT_OFFSET 29856 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2089 | #define QM_REG_VOQINITCRDLINE_RT_SIZE 20 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2090 | #define QM_REG_AFULLQMBYPTHRPFWFQ_RT_OFFSET 29876 |
| 2091 | #define QM_REG_AFULLQMBYPTHRVPWFQ_RT_OFFSET 29877 |
| 2092 | #define QM_REG_AFULLQMBYPTHRPFRL_RT_OFFSET 29878 |
| 2093 | #define QM_REG_AFULLQMBYPTHRGLBLRL_RT_OFFSET 29879 |
| 2094 | #define QM_REG_AFULLOPRTNSTCCRDMASK_RT_OFFSET 29880 |
| 2095 | #define QM_REG_WRROTHERPQGRP_0_RT_OFFSET 29881 |
| 2096 | #define QM_REG_WRROTHERPQGRP_1_RT_OFFSET 29882 |
| 2097 | #define QM_REG_WRROTHERPQGRP_2_RT_OFFSET 29883 |
| 2098 | #define QM_REG_WRROTHERPQGRP_3_RT_OFFSET 29884 |
| 2099 | #define QM_REG_WRROTHERPQGRP_4_RT_OFFSET 29885 |
| 2100 | #define QM_REG_WRROTHERPQGRP_5_RT_OFFSET 29886 |
| 2101 | #define QM_REG_WRROTHERPQGRP_6_RT_OFFSET 29887 |
| 2102 | #define QM_REG_WRROTHERPQGRP_7_RT_OFFSET 29888 |
| 2103 | #define QM_REG_WRROTHERPQGRP_8_RT_OFFSET 29889 |
| 2104 | #define QM_REG_WRROTHERPQGRP_9_RT_OFFSET 29890 |
| 2105 | #define QM_REG_WRROTHERPQGRP_10_RT_OFFSET 29891 |
| 2106 | #define QM_REG_WRROTHERPQGRP_11_RT_OFFSET 29892 |
| 2107 | #define QM_REG_WRROTHERPQGRP_12_RT_OFFSET 29893 |
| 2108 | #define QM_REG_WRROTHERPQGRP_13_RT_OFFSET 29894 |
| 2109 | #define QM_REG_WRROTHERPQGRP_14_RT_OFFSET 29895 |
| 2110 | #define QM_REG_WRROTHERPQGRP_15_RT_OFFSET 29896 |
| 2111 | #define QM_REG_WRROTHERGRPWEIGHT_0_RT_OFFSET 29897 |
| 2112 | #define QM_REG_WRROTHERGRPWEIGHT_1_RT_OFFSET 29898 |
| 2113 | #define QM_REG_WRROTHERGRPWEIGHT_2_RT_OFFSET 29899 |
| 2114 | #define QM_REG_WRROTHERGRPWEIGHT_3_RT_OFFSET 29900 |
| 2115 | #define QM_REG_WRRTXGRPWEIGHT_0_RT_OFFSET 29901 |
| 2116 | #define QM_REG_WRRTXGRPWEIGHT_1_RT_OFFSET 29902 |
| 2117 | #define QM_REG_PQTX2PF_0_RT_OFFSET 29903 |
| 2118 | #define QM_REG_PQTX2PF_1_RT_OFFSET 29904 |
| 2119 | #define QM_REG_PQTX2PF_2_RT_OFFSET 29905 |
| 2120 | #define QM_REG_PQTX2PF_3_RT_OFFSET 29906 |
| 2121 | #define QM_REG_PQTX2PF_4_RT_OFFSET 29907 |
| 2122 | #define QM_REG_PQTX2PF_5_RT_OFFSET 29908 |
| 2123 | #define QM_REG_PQTX2PF_6_RT_OFFSET 29909 |
| 2124 | #define QM_REG_PQTX2PF_7_RT_OFFSET 29910 |
| 2125 | #define QM_REG_PQTX2PF_8_RT_OFFSET 29911 |
| 2126 | #define QM_REG_PQTX2PF_9_RT_OFFSET 29912 |
| 2127 | #define QM_REG_PQTX2PF_10_RT_OFFSET 29913 |
| 2128 | #define QM_REG_PQTX2PF_11_RT_OFFSET 29914 |
| 2129 | #define QM_REG_PQTX2PF_12_RT_OFFSET 29915 |
| 2130 | #define QM_REG_PQTX2PF_13_RT_OFFSET 29916 |
| 2131 | #define QM_REG_PQTX2PF_14_RT_OFFSET 29917 |
| 2132 | #define QM_REG_PQTX2PF_15_RT_OFFSET 29918 |
| 2133 | #define QM_REG_PQTX2PF_16_RT_OFFSET 29919 |
| 2134 | #define QM_REG_PQTX2PF_17_RT_OFFSET 29920 |
| 2135 | #define QM_REG_PQTX2PF_18_RT_OFFSET 29921 |
| 2136 | #define QM_REG_PQTX2PF_19_RT_OFFSET 29922 |
| 2137 | #define QM_REG_PQTX2PF_20_RT_OFFSET 29923 |
| 2138 | #define QM_REG_PQTX2PF_21_RT_OFFSET 29924 |
| 2139 | #define QM_REG_PQTX2PF_22_RT_OFFSET 29925 |
| 2140 | #define QM_REG_PQTX2PF_23_RT_OFFSET 29926 |
| 2141 | #define QM_REG_PQTX2PF_24_RT_OFFSET 29927 |
| 2142 | #define QM_REG_PQTX2PF_25_RT_OFFSET 29928 |
| 2143 | #define QM_REG_PQTX2PF_26_RT_OFFSET 29929 |
| 2144 | #define QM_REG_PQTX2PF_27_RT_OFFSET 29930 |
| 2145 | #define QM_REG_PQTX2PF_28_RT_OFFSET 29931 |
| 2146 | #define QM_REG_PQTX2PF_29_RT_OFFSET 29932 |
| 2147 | #define QM_REG_PQTX2PF_30_RT_OFFSET 29933 |
| 2148 | #define QM_REG_PQTX2PF_31_RT_OFFSET 29934 |
| 2149 | #define QM_REG_PQTX2PF_32_RT_OFFSET 29935 |
| 2150 | #define QM_REG_PQTX2PF_33_RT_OFFSET 29936 |
| 2151 | #define QM_REG_PQTX2PF_34_RT_OFFSET 29937 |
| 2152 | #define QM_REG_PQTX2PF_35_RT_OFFSET 29938 |
| 2153 | #define QM_REG_PQTX2PF_36_RT_OFFSET 29939 |
| 2154 | #define QM_REG_PQTX2PF_37_RT_OFFSET 29940 |
| 2155 | #define QM_REG_PQTX2PF_38_RT_OFFSET 29941 |
| 2156 | #define QM_REG_PQTX2PF_39_RT_OFFSET 29942 |
| 2157 | #define QM_REG_PQTX2PF_40_RT_OFFSET 29943 |
| 2158 | #define QM_REG_PQTX2PF_41_RT_OFFSET 29944 |
| 2159 | #define QM_REG_PQTX2PF_42_RT_OFFSET 29945 |
| 2160 | #define QM_REG_PQTX2PF_43_RT_OFFSET 29946 |
| 2161 | #define QM_REG_PQTX2PF_44_RT_OFFSET 29947 |
| 2162 | #define QM_REG_PQTX2PF_45_RT_OFFSET 29948 |
| 2163 | #define QM_REG_PQTX2PF_46_RT_OFFSET 29949 |
| 2164 | #define QM_REG_PQTX2PF_47_RT_OFFSET 29950 |
| 2165 | #define QM_REG_PQTX2PF_48_RT_OFFSET 29951 |
| 2166 | #define QM_REG_PQTX2PF_49_RT_OFFSET 29952 |
| 2167 | #define QM_REG_PQTX2PF_50_RT_OFFSET 29953 |
| 2168 | #define QM_REG_PQTX2PF_51_RT_OFFSET 29954 |
| 2169 | #define QM_REG_PQTX2PF_52_RT_OFFSET 29955 |
| 2170 | #define QM_REG_PQTX2PF_53_RT_OFFSET 29956 |
| 2171 | #define QM_REG_PQTX2PF_54_RT_OFFSET 29957 |
| 2172 | #define QM_REG_PQTX2PF_55_RT_OFFSET 29958 |
| 2173 | #define QM_REG_PQTX2PF_56_RT_OFFSET 29959 |
| 2174 | #define QM_REG_PQTX2PF_57_RT_OFFSET 29960 |
| 2175 | #define QM_REG_PQTX2PF_58_RT_OFFSET 29961 |
| 2176 | #define QM_REG_PQTX2PF_59_RT_OFFSET 29962 |
| 2177 | #define QM_REG_PQTX2PF_60_RT_OFFSET 29963 |
| 2178 | #define QM_REG_PQTX2PF_61_RT_OFFSET 29964 |
| 2179 | #define QM_REG_PQTX2PF_62_RT_OFFSET 29965 |
| 2180 | #define QM_REG_PQTX2PF_63_RT_OFFSET 29966 |
| 2181 | #define QM_REG_PQOTHER2PF_0_RT_OFFSET 29967 |
| 2182 | #define QM_REG_PQOTHER2PF_1_RT_OFFSET 29968 |
| 2183 | #define QM_REG_PQOTHER2PF_2_RT_OFFSET 29969 |
| 2184 | #define QM_REG_PQOTHER2PF_3_RT_OFFSET 29970 |
| 2185 | #define QM_REG_PQOTHER2PF_4_RT_OFFSET 29971 |
| 2186 | #define QM_REG_PQOTHER2PF_5_RT_OFFSET 29972 |
| 2187 | #define QM_REG_PQOTHER2PF_6_RT_OFFSET 29973 |
| 2188 | #define QM_REG_PQOTHER2PF_7_RT_OFFSET 29974 |
| 2189 | #define QM_REG_PQOTHER2PF_8_RT_OFFSET 29975 |
| 2190 | #define QM_REG_PQOTHER2PF_9_RT_OFFSET 29976 |
| 2191 | #define QM_REG_PQOTHER2PF_10_RT_OFFSET 29977 |
| 2192 | #define QM_REG_PQOTHER2PF_11_RT_OFFSET 29978 |
| 2193 | #define QM_REG_PQOTHER2PF_12_RT_OFFSET 29979 |
| 2194 | #define QM_REG_PQOTHER2PF_13_RT_OFFSET 29980 |
| 2195 | #define QM_REG_PQOTHER2PF_14_RT_OFFSET 29981 |
| 2196 | #define QM_REG_PQOTHER2PF_15_RT_OFFSET 29982 |
| 2197 | #define QM_REG_RLGLBLPERIOD_0_RT_OFFSET 29983 |
| 2198 | #define QM_REG_RLGLBLPERIOD_1_RT_OFFSET 29984 |
| 2199 | #define QM_REG_RLGLBLPERIODTIMER_0_RT_OFFSET 29985 |
| 2200 | #define QM_REG_RLGLBLPERIODTIMER_1_RT_OFFSET 29986 |
| 2201 | #define QM_REG_RLGLBLPERIODSEL_0_RT_OFFSET 29987 |
| 2202 | #define QM_REG_RLGLBLPERIODSEL_1_RT_OFFSET 29988 |
| 2203 | #define QM_REG_RLGLBLPERIODSEL_2_RT_OFFSET 29989 |
| 2204 | #define QM_REG_RLGLBLPERIODSEL_3_RT_OFFSET 29990 |
| 2205 | #define QM_REG_RLGLBLPERIODSEL_4_RT_OFFSET 29991 |
| 2206 | #define QM_REG_RLGLBLPERIODSEL_5_RT_OFFSET 29992 |
| 2207 | #define QM_REG_RLGLBLPERIODSEL_6_RT_OFFSET 29993 |
| 2208 | #define QM_REG_RLGLBLPERIODSEL_7_RT_OFFSET 29994 |
| 2209 | #define QM_REG_RLGLBLINCVAL_RT_OFFSET 29995 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2210 | #define QM_REG_RLGLBLINCVAL_RT_SIZE 256 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2211 | #define QM_REG_RLGLBLUPPERBOUND_RT_OFFSET 30251 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2212 | #define QM_REG_RLGLBLUPPERBOUND_RT_SIZE 256 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2213 | #define QM_REG_RLGLBLCRD_RT_OFFSET 30507 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2214 | #define QM_REG_RLGLBLCRD_RT_SIZE 256 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2215 | #define QM_REG_RLGLBLENABLE_RT_OFFSET 30763 |
| 2216 | #define QM_REG_RLPFPERIOD_RT_OFFSET 30764 |
| 2217 | #define QM_REG_RLPFPERIODTIMER_RT_OFFSET 30765 |
| 2218 | #define QM_REG_RLPFINCVAL_RT_OFFSET 30766 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2219 | #define QM_REG_RLPFINCVAL_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2220 | #define QM_REG_RLPFUPPERBOUND_RT_OFFSET 30782 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2221 | #define QM_REG_RLPFUPPERBOUND_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2222 | #define QM_REG_RLPFCRD_RT_OFFSET 30798 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2223 | #define QM_REG_RLPFCRD_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2224 | #define QM_REG_RLPFENABLE_RT_OFFSET 30814 |
| 2225 | #define QM_REG_RLPFVOQENABLE_RT_OFFSET 30815 |
| 2226 | #define QM_REG_WFQPFWEIGHT_RT_OFFSET 30816 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2227 | #define QM_REG_WFQPFWEIGHT_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2228 | #define QM_REG_WFQPFUPPERBOUND_RT_OFFSET 30832 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2229 | #define QM_REG_WFQPFUPPERBOUND_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2230 | #define QM_REG_WFQPFCRD_RT_OFFSET 30848 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2231 | #define QM_REG_WFQPFCRD_RT_SIZE 160 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2232 | #define QM_REG_WFQPFENABLE_RT_OFFSET 31008 |
| 2233 | #define QM_REG_WFQVPENABLE_RT_OFFSET 31009 |
| 2234 | #define QM_REG_BASEADDRTXPQ_RT_OFFSET 31010 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2235 | #define QM_REG_BASEADDRTXPQ_RT_SIZE 512 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2236 | #define QM_REG_TXPQMAP_RT_OFFSET 31522 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2237 | #define QM_REG_TXPQMAP_RT_SIZE 512 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2238 | #define QM_REG_WFQVPWEIGHT_RT_OFFSET 32034 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2239 | #define QM_REG_WFQVPWEIGHT_RT_SIZE 512 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2240 | #define QM_REG_WFQVPCRD_RT_OFFSET 32546 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2241 | #define QM_REG_WFQVPCRD_RT_SIZE 512 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2242 | #define QM_REG_WFQVPMAP_RT_OFFSET 33058 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2243 | #define QM_REG_WFQVPMAP_RT_SIZE 512 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2244 | #define QM_REG_WFQPFCRD_MSB_RT_OFFSET 33570 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2245 | #define QM_REG_WFQPFCRD_MSB_RT_SIZE 160 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2246 | #define NIG_REG_TAG_ETHERTYPE_0_RT_OFFSET 33730 |
| 2247 | #define NIG_REG_OUTER_TAG_VALUE_LIST0_RT_OFFSET 33731 |
| 2248 | #define NIG_REG_OUTER_TAG_VALUE_LIST1_RT_OFFSET 33732 |
| 2249 | #define NIG_REG_OUTER_TAG_VALUE_LIST2_RT_OFFSET 33733 |
| 2250 | #define NIG_REG_OUTER_TAG_VALUE_LIST3_RT_OFFSET 33734 |
| 2251 | #define NIG_REG_OUTER_TAG_VALUE_MASK_RT_OFFSET 33735 |
| 2252 | #define NIG_REG_LLH_FUNC_TAGMAC_CLS_TYPE_RT_OFFSET 33736 |
| 2253 | #define NIG_REG_LLH_FUNC_TAG_EN_RT_OFFSET 33737 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2254 | #define NIG_REG_LLH_FUNC_TAG_EN_RT_SIZE 4 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2255 | #define NIG_REG_LLH_FUNC_TAG_HDR_SEL_RT_OFFSET 33741 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2256 | #define NIG_REG_LLH_FUNC_TAG_HDR_SEL_RT_SIZE 4 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2257 | #define NIG_REG_LLH_FUNC_TAG_VALUE_RT_OFFSET 33745 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2258 | #define NIG_REG_LLH_FUNC_TAG_VALUE_RT_SIZE 4 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2259 | #define NIG_REG_LLH_FUNC_NO_TAG_RT_OFFSET 33749 |
| 2260 | #define NIG_REG_LLH_FUNC_FILTER_VALUE_RT_OFFSET 33750 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2261 | #define NIG_REG_LLH_FUNC_FILTER_VALUE_RT_SIZE 32 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2262 | #define NIG_REG_LLH_FUNC_FILTER_EN_RT_OFFSET 33782 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2263 | #define NIG_REG_LLH_FUNC_FILTER_EN_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2264 | #define NIG_REG_LLH_FUNC_FILTER_MODE_RT_OFFSET 33798 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2265 | #define NIG_REG_LLH_FUNC_FILTER_MODE_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2266 | #define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_RT_OFFSET 33814 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2267 | #define NIG_REG_LLH_FUNC_FILTER_PROTOCOL_TYPE_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2268 | #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_OFFSET 33830 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2269 | #define NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_SIZE 16 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2270 | #define NIG_REG_TX_EDPM_CTRL_RT_OFFSET 33846 |
| 2271 | #define CDU_REG_CID_ADDR_PARAMS_RT_OFFSET 33847 |
| 2272 | #define CDU_REG_SEGMENT0_PARAMS_RT_OFFSET 33848 |
| 2273 | #define CDU_REG_SEGMENT1_PARAMS_RT_OFFSET 33849 |
| 2274 | #define CDU_REG_PF_SEG0_TYPE_OFFSET_RT_OFFSET 33850 |
| 2275 | #define CDU_REG_PF_SEG1_TYPE_OFFSET_RT_OFFSET 33851 |
| 2276 | #define CDU_REG_PF_SEG2_TYPE_OFFSET_RT_OFFSET 33852 |
| 2277 | #define CDU_REG_PF_SEG3_TYPE_OFFSET_RT_OFFSET 33853 |
| 2278 | #define CDU_REG_PF_FL_SEG0_TYPE_OFFSET_RT_OFFSET 33854 |
| 2279 | #define CDU_REG_PF_FL_SEG1_TYPE_OFFSET_RT_OFFSET 33855 |
| 2280 | #define CDU_REG_PF_FL_SEG2_TYPE_OFFSET_RT_OFFSET 33856 |
| 2281 | #define CDU_REG_PF_FL_SEG3_TYPE_OFFSET_RT_OFFSET 33857 |
| 2282 | #define CDU_REG_VF_SEG_TYPE_OFFSET_RT_OFFSET 33858 |
| 2283 | #define CDU_REG_VF_FL_SEG_TYPE_OFFSET_RT_OFFSET 33859 |
| 2284 | #define PBF_REG_TAG_ETHERTYPE_0_RT_OFFSET 33860 |
| 2285 | #define PBF_REG_BTB_SHARED_AREA_SIZE_RT_OFFSET 33861 |
| 2286 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ0_RT_OFFSET 33862 |
| 2287 | #define PBF_REG_BTB_GUARANTEED_VOQ0_RT_OFFSET 33863 |
| 2288 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ0_RT_OFFSET 33864 |
| 2289 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ1_RT_OFFSET 33865 |
| 2290 | #define PBF_REG_BTB_GUARANTEED_VOQ1_RT_OFFSET 33866 |
| 2291 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ1_RT_OFFSET 33867 |
| 2292 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ2_RT_OFFSET 33868 |
| 2293 | #define PBF_REG_BTB_GUARANTEED_VOQ2_RT_OFFSET 33869 |
| 2294 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ2_RT_OFFSET 33870 |
| 2295 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ3_RT_OFFSET 33871 |
| 2296 | #define PBF_REG_BTB_GUARANTEED_VOQ3_RT_OFFSET 33872 |
| 2297 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ3_RT_OFFSET 33873 |
| 2298 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ4_RT_OFFSET 33874 |
| 2299 | #define PBF_REG_BTB_GUARANTEED_VOQ4_RT_OFFSET 33875 |
| 2300 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ4_RT_OFFSET 33876 |
| 2301 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ5_RT_OFFSET 33877 |
| 2302 | #define PBF_REG_BTB_GUARANTEED_VOQ5_RT_OFFSET 33878 |
| 2303 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ5_RT_OFFSET 33879 |
| 2304 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ6_RT_OFFSET 33880 |
| 2305 | #define PBF_REG_BTB_GUARANTEED_VOQ6_RT_OFFSET 33881 |
| 2306 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ6_RT_OFFSET 33882 |
| 2307 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ7_RT_OFFSET 33883 |
| 2308 | #define PBF_REG_BTB_GUARANTEED_VOQ7_RT_OFFSET 33884 |
| 2309 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ7_RT_OFFSET 33885 |
| 2310 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ8_RT_OFFSET 33886 |
| 2311 | #define PBF_REG_BTB_GUARANTEED_VOQ8_RT_OFFSET 33887 |
| 2312 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ8_RT_OFFSET 33888 |
| 2313 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ9_RT_OFFSET 33889 |
| 2314 | #define PBF_REG_BTB_GUARANTEED_VOQ9_RT_OFFSET 33890 |
| 2315 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ9_RT_OFFSET 33891 |
| 2316 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ10_RT_OFFSET 33892 |
| 2317 | #define PBF_REG_BTB_GUARANTEED_VOQ10_RT_OFFSET 33893 |
| 2318 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ10_RT_OFFSET 33894 |
| 2319 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ11_RT_OFFSET 33895 |
| 2320 | #define PBF_REG_BTB_GUARANTEED_VOQ11_RT_OFFSET 33896 |
| 2321 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ11_RT_OFFSET 33897 |
| 2322 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ12_RT_OFFSET 33898 |
| 2323 | #define PBF_REG_BTB_GUARANTEED_VOQ12_RT_OFFSET 33899 |
| 2324 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ12_RT_OFFSET 33900 |
| 2325 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ13_RT_OFFSET 33901 |
| 2326 | #define PBF_REG_BTB_GUARANTEED_VOQ13_RT_OFFSET 33902 |
| 2327 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ13_RT_OFFSET 33903 |
| 2328 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ14_RT_OFFSET 33904 |
| 2329 | #define PBF_REG_BTB_GUARANTEED_VOQ14_RT_OFFSET 33905 |
| 2330 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ14_RT_OFFSET 33906 |
| 2331 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ15_RT_OFFSET 33907 |
| 2332 | #define PBF_REG_BTB_GUARANTEED_VOQ15_RT_OFFSET 33908 |
| 2333 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ15_RT_OFFSET 33909 |
| 2334 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ16_RT_OFFSET 33910 |
| 2335 | #define PBF_REG_BTB_GUARANTEED_VOQ16_RT_OFFSET 33911 |
| 2336 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ16_RT_OFFSET 33912 |
| 2337 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ17_RT_OFFSET 33913 |
| 2338 | #define PBF_REG_BTB_GUARANTEED_VOQ17_RT_OFFSET 33914 |
| 2339 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ17_RT_OFFSET 33915 |
| 2340 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ18_RT_OFFSET 33916 |
| 2341 | #define PBF_REG_BTB_GUARANTEED_VOQ18_RT_OFFSET 33917 |
| 2342 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ18_RT_OFFSET 33918 |
| 2343 | #define PBF_REG_YCMD_QS_NUM_LINES_VOQ19_RT_OFFSET 33919 |
| 2344 | #define PBF_REG_BTB_GUARANTEED_VOQ19_RT_OFFSET 33920 |
| 2345 | #define PBF_REG_BTB_SHARED_AREA_SETUP_VOQ19_RT_OFFSET 33921 |
| 2346 | #define XCM_REG_CON_PHY_Q3_RT_OFFSET 33922 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2347 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2348 | #define RUNTIME_ARRAY_SIZE 33923 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2349 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2350 | /* The eth storm context for the Tstorm */ |
| 2351 | struct tstorm_eth_conn_st_ctx { |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2352 | __le32 reserved[4]; |
| 2353 | }; |
| 2354 | |
| 2355 | /* The eth storm context for the Pstorm */ |
| 2356 | struct pstorm_eth_conn_st_ctx { |
| 2357 | __le32 reserved[8]; |
| 2358 | }; |
| 2359 | |
| 2360 | /* The eth storm context for the Xstorm */ |
| 2361 | struct xstorm_eth_conn_st_ctx { |
| 2362 | __le32 reserved[60]; |
| 2363 | }; |
| 2364 | |
| 2365 | struct xstorm_eth_conn_ag_ctx { |
| 2366 | u8 reserved0 /* cdu_validation */; |
| 2367 | u8 eth_state /* state */; |
| 2368 | u8 flags0; |
| 2369 | #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_MASK 0x1 |
| 2370 | #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM0_SHIFT 0 |
| 2371 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED1_MASK 0x1 |
| 2372 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED1_SHIFT 1 |
| 2373 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED2_MASK 0x1 |
| 2374 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED2_SHIFT 2 |
| 2375 | #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM3_MASK 0x1 |
| 2376 | #define XSTORM_ETH_CONN_AG_CTX_EXIST_IN_QM3_SHIFT 3 |
| 2377 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED3_MASK 0x1 /* bit4 */ |
| 2378 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED3_SHIFT 4 |
| 2379 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED4_MASK 0x1 |
| 2380 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED4_SHIFT 5 |
| 2381 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED5_MASK 0x1 /* bit6 */ |
| 2382 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED5_SHIFT 6 |
| 2383 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED6_MASK 0x1 /* bit7 */ |
| 2384 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED6_SHIFT 7 |
| 2385 | u8 flags1; |
| 2386 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED7_MASK 0x1 /* bit8 */ |
| 2387 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED7_SHIFT 0 |
| 2388 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED8_MASK 0x1 /* bit9 */ |
| 2389 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED8_SHIFT 1 |
| 2390 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED9_MASK 0x1 /* bit10 */ |
| 2391 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED9_SHIFT 2 |
| 2392 | #define XSTORM_ETH_CONN_AG_CTX_BIT11_MASK 0x1 /* bit11 */ |
| 2393 | #define XSTORM_ETH_CONN_AG_CTX_BIT11_SHIFT 3 |
| 2394 | #define XSTORM_ETH_CONN_AG_CTX_BIT12_MASK 0x1 /* bit12 */ |
| 2395 | #define XSTORM_ETH_CONN_AG_CTX_BIT12_SHIFT 4 |
| 2396 | #define XSTORM_ETH_CONN_AG_CTX_BIT13_MASK 0x1 /* bit13 */ |
| 2397 | #define XSTORM_ETH_CONN_AG_CTX_BIT13_SHIFT 5 |
| 2398 | #define XSTORM_ETH_CONN_AG_CTX_TX_RULE_ACTIVE_MASK 0x1 /* bit14 */ |
| 2399 | #define XSTORM_ETH_CONN_AG_CTX_TX_RULE_ACTIVE_SHIFT 6 |
| 2400 | #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_ACTIVE_MASK 0x1 /* bit15 */ |
| 2401 | #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_ACTIVE_SHIFT 7 |
| 2402 | u8 flags2; |
| 2403 | #define XSTORM_ETH_CONN_AG_CTX_CF0_MASK 0x3 /* timer0cf */ |
| 2404 | #define XSTORM_ETH_CONN_AG_CTX_CF0_SHIFT 0 |
| 2405 | #define XSTORM_ETH_CONN_AG_CTX_CF1_MASK 0x3 /* timer1cf */ |
| 2406 | #define XSTORM_ETH_CONN_AG_CTX_CF1_SHIFT 2 |
| 2407 | #define XSTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 /* timer2cf */ |
| 2408 | #define XSTORM_ETH_CONN_AG_CTX_CF2_SHIFT 4 |
| 2409 | #define XSTORM_ETH_CONN_AG_CTX_CF3_MASK 0x3 |
| 2410 | #define XSTORM_ETH_CONN_AG_CTX_CF3_SHIFT 6 |
| 2411 | u8 flags3; |
| 2412 | #define XSTORM_ETH_CONN_AG_CTX_CF4_MASK 0x3 /* cf4 */ |
| 2413 | #define XSTORM_ETH_CONN_AG_CTX_CF4_SHIFT 0 |
| 2414 | #define XSTORM_ETH_CONN_AG_CTX_CF5_MASK 0x3 /* cf5 */ |
| 2415 | #define XSTORM_ETH_CONN_AG_CTX_CF5_SHIFT 2 |
| 2416 | #define XSTORM_ETH_CONN_AG_CTX_CF6_MASK 0x3 /* cf6 */ |
| 2417 | #define XSTORM_ETH_CONN_AG_CTX_CF6_SHIFT 4 |
| 2418 | #define XSTORM_ETH_CONN_AG_CTX_CF7_MASK 0x3 /* cf7 */ |
| 2419 | #define XSTORM_ETH_CONN_AG_CTX_CF7_SHIFT 6 |
| 2420 | u8 flags4; |
| 2421 | #define XSTORM_ETH_CONN_AG_CTX_CF8_MASK 0x3 /* cf8 */ |
| 2422 | #define XSTORM_ETH_CONN_AG_CTX_CF8_SHIFT 0 |
| 2423 | #define XSTORM_ETH_CONN_AG_CTX_CF9_MASK 0x3 /* cf9 */ |
| 2424 | #define XSTORM_ETH_CONN_AG_CTX_CF9_SHIFT 2 |
| 2425 | #define XSTORM_ETH_CONN_AG_CTX_CF10_MASK 0x3 /* cf10 */ |
| 2426 | #define XSTORM_ETH_CONN_AG_CTX_CF10_SHIFT 4 |
| 2427 | #define XSTORM_ETH_CONN_AG_CTX_CF11_MASK 0x3 /* cf11 */ |
| 2428 | #define XSTORM_ETH_CONN_AG_CTX_CF11_SHIFT 6 |
| 2429 | u8 flags5; |
| 2430 | #define XSTORM_ETH_CONN_AG_CTX_CF12_MASK 0x3 /* cf12 */ |
| 2431 | #define XSTORM_ETH_CONN_AG_CTX_CF12_SHIFT 0 |
| 2432 | #define XSTORM_ETH_CONN_AG_CTX_CF13_MASK 0x3 /* cf13 */ |
| 2433 | #define XSTORM_ETH_CONN_AG_CTX_CF13_SHIFT 2 |
| 2434 | #define XSTORM_ETH_CONN_AG_CTX_CF14_MASK 0x3 /* cf14 */ |
| 2435 | #define XSTORM_ETH_CONN_AG_CTX_CF14_SHIFT 4 |
| 2436 | #define XSTORM_ETH_CONN_AG_CTX_CF15_MASK 0x3 /* cf15 */ |
| 2437 | #define XSTORM_ETH_CONN_AG_CTX_CF15_SHIFT 6 |
| 2438 | u8 flags6; |
| 2439 | #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_MASK 0x3 /* cf16 */ |
| 2440 | #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_SHIFT 0 |
| 2441 | #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_MASK 0x3 |
| 2442 | #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_SHIFT 2 |
| 2443 | #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_MASK 0x3 /* cf18 */ |
| 2444 | #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_SHIFT 4 |
| 2445 | #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_MASK 0x3 /* cf19 */ |
| 2446 | #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_SHIFT 6 |
| 2447 | u8 flags7; |
| 2448 | #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_MASK 0x3 /* cf20 */ |
| 2449 | #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_SHIFT 0 |
| 2450 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED10_MASK 0x3 /* cf21 */ |
| 2451 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED10_SHIFT 2 |
| 2452 | #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_MASK 0x3 /* cf22 */ |
| 2453 | #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_SHIFT 4 |
| 2454 | #define XSTORM_ETH_CONN_AG_CTX_CF0EN_MASK 0x1 /* cf0en */ |
| 2455 | #define XSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT 6 |
| 2456 | #define XSTORM_ETH_CONN_AG_CTX_CF1EN_MASK 0x1 /* cf1en */ |
| 2457 | #define XSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT 7 |
| 2458 | u8 flags8; |
| 2459 | #define XSTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 2460 | #define XSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 0 |
| 2461 | #define XSTORM_ETH_CONN_AG_CTX_CF3EN_MASK 0x1 /* cf3en */ |
| 2462 | #define XSTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT 1 |
| 2463 | #define XSTORM_ETH_CONN_AG_CTX_CF4EN_MASK 0x1 /* cf4en */ |
| 2464 | #define XSTORM_ETH_CONN_AG_CTX_CF4EN_SHIFT 2 |
| 2465 | #define XSTORM_ETH_CONN_AG_CTX_CF5EN_MASK 0x1 /* cf5en */ |
| 2466 | #define XSTORM_ETH_CONN_AG_CTX_CF5EN_SHIFT 3 |
| 2467 | #define XSTORM_ETH_CONN_AG_CTX_CF6EN_MASK 0x1 /* cf6en */ |
| 2468 | #define XSTORM_ETH_CONN_AG_CTX_CF6EN_SHIFT 4 |
| 2469 | #define XSTORM_ETH_CONN_AG_CTX_CF7EN_MASK 0x1 /* cf7en */ |
| 2470 | #define XSTORM_ETH_CONN_AG_CTX_CF7EN_SHIFT 5 |
| 2471 | #define XSTORM_ETH_CONN_AG_CTX_CF8EN_MASK 0x1 /* cf8en */ |
| 2472 | #define XSTORM_ETH_CONN_AG_CTX_CF8EN_SHIFT 6 |
| 2473 | #define XSTORM_ETH_CONN_AG_CTX_CF9EN_MASK 0x1 /* cf9en */ |
| 2474 | #define XSTORM_ETH_CONN_AG_CTX_CF9EN_SHIFT 7 |
| 2475 | u8 flags9; |
| 2476 | #define XSTORM_ETH_CONN_AG_CTX_CF10EN_MASK 0x1 /* cf10en */ |
| 2477 | #define XSTORM_ETH_CONN_AG_CTX_CF10EN_SHIFT 0 |
| 2478 | #define XSTORM_ETH_CONN_AG_CTX_CF11EN_MASK 0x1 /* cf11en */ |
| 2479 | #define XSTORM_ETH_CONN_AG_CTX_CF11EN_SHIFT 1 |
| 2480 | #define XSTORM_ETH_CONN_AG_CTX_CF12EN_MASK 0x1 /* cf12en */ |
| 2481 | #define XSTORM_ETH_CONN_AG_CTX_CF12EN_SHIFT 2 |
| 2482 | #define XSTORM_ETH_CONN_AG_CTX_CF13EN_MASK 0x1 /* cf13en */ |
| 2483 | #define XSTORM_ETH_CONN_AG_CTX_CF13EN_SHIFT 3 |
| 2484 | #define XSTORM_ETH_CONN_AG_CTX_CF14EN_MASK 0x1 /* cf14en */ |
| 2485 | #define XSTORM_ETH_CONN_AG_CTX_CF14EN_SHIFT 4 |
| 2486 | #define XSTORM_ETH_CONN_AG_CTX_CF15EN_MASK 0x1 /* cf15en */ |
| 2487 | #define XSTORM_ETH_CONN_AG_CTX_CF15EN_SHIFT 5 |
| 2488 | #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_MASK 0x1 /* cf16en */ |
| 2489 | #define XSTORM_ETH_CONN_AG_CTX_GO_TO_BD_CONS_CF_EN_SHIFT 6 |
| 2490 | #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_EN_MASK 0x1 |
| 2491 | #define XSTORM_ETH_CONN_AG_CTX_MULTI_UNICAST_CF_EN_SHIFT 7 |
| 2492 | u8 flags10; |
| 2493 | #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_EN_MASK 0x1 /* cf18en */ |
| 2494 | #define XSTORM_ETH_CONN_AG_CTX_DQ_CF_EN_SHIFT 0 |
| 2495 | #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_EN_MASK 0x1 /* cf19en */ |
| 2496 | #define XSTORM_ETH_CONN_AG_CTX_TERMINATE_CF_EN_SHIFT 1 |
| 2497 | #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_EN_MASK 0x1 /* cf20en */ |
| 2498 | #define XSTORM_ETH_CONN_AG_CTX_FLUSH_Q0_EN_SHIFT 2 |
| 2499 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED11_MASK 0x1 /* cf21en */ |
| 2500 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED11_SHIFT 3 |
| 2501 | #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_EN_MASK 0x1 /* cf22en */ |
| 2502 | #define XSTORM_ETH_CONN_AG_CTX_SLOW_PATH_EN_SHIFT 4 |
| 2503 | #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_MASK 0x1 /* cf23en */ |
| 2504 | #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_EN_RESERVED_SHIFT 5 |
| 2505 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED12_MASK 0x1 /* rule0en */ |
| 2506 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED12_SHIFT 6 |
| 2507 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED13_MASK 0x1 /* rule1en */ |
| 2508 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED13_SHIFT 7 |
| 2509 | u8 flags11; |
| 2510 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED14_MASK 0x1 /* rule2en */ |
| 2511 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED14_SHIFT 0 |
| 2512 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED15_MASK 0x1 /* rule3en */ |
| 2513 | #define XSTORM_ETH_CONN_AG_CTX_RESERVED15_SHIFT 1 |
| 2514 | #define XSTORM_ETH_CONN_AG_CTX_TX_DEC_RULE_EN_MASK 0x1 /* rule4en */ |
| 2515 | #define XSTORM_ETH_CONN_AG_CTX_TX_DEC_RULE_EN_SHIFT 2 |
| 2516 | #define XSTORM_ETH_CONN_AG_CTX_RULE5EN_MASK 0x1 /* rule5en */ |
| 2517 | #define XSTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT 3 |
| 2518 | #define XSTORM_ETH_CONN_AG_CTX_RULE6EN_MASK 0x1 /* rule6en */ |
| 2519 | #define XSTORM_ETH_CONN_AG_CTX_RULE6EN_SHIFT 4 |
| 2520 | #define XSTORM_ETH_CONN_AG_CTX_RULE7EN_MASK 0x1 /* rule7en */ |
| 2521 | #define XSTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT 5 |
| 2522 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED1_MASK 0x1 /* rule8en */ |
| 2523 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED1_SHIFT 6 |
| 2524 | #define XSTORM_ETH_CONN_AG_CTX_RULE9EN_MASK 0x1 /* rule9en */ |
| 2525 | #define XSTORM_ETH_CONN_AG_CTX_RULE9EN_SHIFT 7 |
| 2526 | u8 flags12; |
| 2527 | #define XSTORM_ETH_CONN_AG_CTX_RULE10EN_MASK 0x1 /* rule10en */ |
| 2528 | #define XSTORM_ETH_CONN_AG_CTX_RULE10EN_SHIFT 0 |
| 2529 | #define XSTORM_ETH_CONN_AG_CTX_RULE11EN_MASK 0x1 /* rule11en */ |
| 2530 | #define XSTORM_ETH_CONN_AG_CTX_RULE11EN_SHIFT 1 |
| 2531 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED2_MASK 0x1 /* rule12en */ |
| 2532 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED2_SHIFT 2 |
| 2533 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED3_MASK 0x1 /* rule13en */ |
| 2534 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED3_SHIFT 3 |
| 2535 | #define XSTORM_ETH_CONN_AG_CTX_RULE14EN_MASK 0x1 /* rule14en */ |
| 2536 | #define XSTORM_ETH_CONN_AG_CTX_RULE14EN_SHIFT 4 |
| 2537 | #define XSTORM_ETH_CONN_AG_CTX_RULE15EN_MASK 0x1 /* rule15en */ |
| 2538 | #define XSTORM_ETH_CONN_AG_CTX_RULE15EN_SHIFT 5 |
| 2539 | #define XSTORM_ETH_CONN_AG_CTX_RULE16EN_MASK 0x1 /* rule16en */ |
| 2540 | #define XSTORM_ETH_CONN_AG_CTX_RULE16EN_SHIFT 6 |
| 2541 | #define XSTORM_ETH_CONN_AG_CTX_RULE17EN_MASK 0x1 /* rule17en */ |
| 2542 | #define XSTORM_ETH_CONN_AG_CTX_RULE17EN_SHIFT 7 |
| 2543 | u8 flags13; |
| 2544 | #define XSTORM_ETH_CONN_AG_CTX_RULE18EN_MASK 0x1 /* rule18en */ |
| 2545 | #define XSTORM_ETH_CONN_AG_CTX_RULE18EN_SHIFT 0 |
| 2546 | #define XSTORM_ETH_CONN_AG_CTX_RULE19EN_MASK 0x1 /* rule19en */ |
| 2547 | #define XSTORM_ETH_CONN_AG_CTX_RULE19EN_SHIFT 1 |
| 2548 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED4_MASK 0x1 /* rule20en */ |
| 2549 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED4_SHIFT 2 |
| 2550 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED5_MASK 0x1 /* rule21en */ |
| 2551 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED5_SHIFT 3 |
| 2552 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED6_MASK 0x1 /* rule22en */ |
| 2553 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED6_SHIFT 4 |
| 2554 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED7_MASK 0x1 /* rule23en */ |
| 2555 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED7_SHIFT 5 |
| 2556 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED8_MASK 0x1 /* rule24en */ |
| 2557 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED8_SHIFT 6 |
| 2558 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED9_MASK 0x1 /* rule25en */ |
| 2559 | #define XSTORM_ETH_CONN_AG_CTX_A0_RESERVED9_SHIFT 7 |
| 2560 | u8 flags14; |
| 2561 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_USE_EXT_HDR_MASK 0x1 /* bit16 */ |
| 2562 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_USE_EXT_HDR_SHIFT 0 |
| 2563 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_MASK 0x1 /* bit17 */ |
| 2564 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_RAW_L3L4_SHIFT 1 |
| 2565 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_MASK 0x1 /* bit18 */ |
| 2566 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_INBAND_PROP_HDR_SHIFT 2 |
| 2567 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_MASK 0x1 /* bit19 */ |
| 2568 | #define XSTORM_ETH_CONN_AG_CTX_EDPM_SEND_EXT_TUNNEL_SHIFT 3 |
| 2569 | #define XSTORM_ETH_CONN_AG_CTX_L2_EDPM_ENABLE_MASK 0x1 /* bit20 */ |
| 2570 | #define XSTORM_ETH_CONN_AG_CTX_L2_EDPM_ENABLE_SHIFT 4 |
| 2571 | #define XSTORM_ETH_CONN_AG_CTX_ROCE_EDPM_ENABLE_MASK 0x1 /* bit21 */ |
| 2572 | #define XSTORM_ETH_CONN_AG_CTX_ROCE_EDPM_ENABLE_SHIFT 5 |
| 2573 | #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_MASK 0x3 /* cf23 */ |
| 2574 | #define XSTORM_ETH_CONN_AG_CTX_TPH_ENABLE_SHIFT 6 |
| 2575 | u8 edpm_event_id /* byte2 */; |
| 2576 | __le16 physical_q0 /* physical_q0 */; |
| 2577 | __le16 word1 /* physical_q1 */; |
| 2578 | __le16 edpm_num_bds /* physical_q2 */; |
| 2579 | __le16 tx_bd_cons /* word3 */; |
| 2580 | __le16 tx_bd_prod /* word4 */; |
| 2581 | __le16 go_to_bd_cons /* word5 */; |
| 2582 | __le16 conn_dpi /* conn_dpi */; |
| 2583 | u8 byte3 /* byte3 */; |
| 2584 | u8 byte4 /* byte4 */; |
| 2585 | u8 byte5 /* byte5 */; |
| 2586 | u8 byte6 /* byte6 */; |
| 2587 | __le32 reg0 /* reg0 */; |
| 2588 | __le32 reg1 /* reg1 */; |
| 2589 | __le32 reg2 /* reg2 */; |
| 2590 | __le32 reg3 /* reg3 */; |
| 2591 | __le32 reg4 /* reg4 */; |
| 2592 | __le32 reg5 /* cf_array0 */; |
| 2593 | __le32 reg6 /* cf_array1 */; |
| 2594 | __le16 word7 /* word7 */; |
| 2595 | __le16 word8 /* word8 */; |
| 2596 | __le16 word9 /* word9 */; |
| 2597 | __le16 word10 /* word10 */; |
| 2598 | __le32 reg7 /* reg7 */; |
| 2599 | __le32 reg8 /* reg8 */; |
| 2600 | __le32 reg9 /* reg9 */; |
| 2601 | u8 byte7 /* byte7 */; |
| 2602 | u8 byte8 /* byte8 */; |
| 2603 | u8 byte9 /* byte9 */; |
| 2604 | u8 byte10 /* byte10 */; |
| 2605 | u8 byte11 /* byte11 */; |
| 2606 | u8 byte12 /* byte12 */; |
| 2607 | u8 byte13 /* byte13 */; |
| 2608 | u8 byte14 /* byte14 */; |
| 2609 | u8 byte15 /* byte15 */; |
| 2610 | u8 byte16 /* byte16 */; |
| 2611 | __le16 word11 /* word11 */; |
| 2612 | __le32 reg10 /* reg10 */; |
| 2613 | __le32 reg11 /* reg11 */; |
| 2614 | __le32 reg12 /* reg12 */; |
| 2615 | __le32 reg13 /* reg13 */; |
| 2616 | __le32 reg14 /* reg14 */; |
| 2617 | __le32 reg15 /* reg15 */; |
| 2618 | __le32 reg16 /* reg16 */; |
| 2619 | __le32 reg17 /* reg17 */; |
| 2620 | __le32 reg18 /* reg18 */; |
| 2621 | __le32 reg19 /* reg19 */; |
| 2622 | __le16 word12 /* word12 */; |
| 2623 | __le16 word13 /* word13 */; |
| 2624 | __le16 word14 /* word14 */; |
| 2625 | __le16 word15 /* word15 */; |
| 2626 | }; |
| 2627 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2628 | /* The eth storm context for the Ystorm */ |
| 2629 | struct ystorm_eth_conn_st_ctx { |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2630 | __le32 reserved[8]; |
| 2631 | }; |
| 2632 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2633 | struct ystorm_eth_conn_ag_ctx { |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2634 | u8 byte0 /* cdu_validation */; |
| 2635 | u8 byte1 /* state */; |
| 2636 | u8 flags0; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2637 | #define YSTORM_ETH_CONN_AG_CTX_BIT0_MASK 0x1 /* exist_in_qm0 */ |
| 2638 | #define YSTORM_ETH_CONN_AG_CTX_BIT0_SHIFT 0 |
| 2639 | #define YSTORM_ETH_CONN_AG_CTX_BIT1_MASK 0x1 /* exist_in_qm1 */ |
| 2640 | #define YSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT 1 |
| 2641 | #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_MASK 0x3 /* cf0 */ |
| 2642 | #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_SHIFT 2 |
| 2643 | #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_MASK 0x3 /* cf1 */ |
| 2644 | #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_SHIFT 4 |
| 2645 | #define YSTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 /* cf2 */ |
| 2646 | #define YSTORM_ETH_CONN_AG_CTX_CF2_SHIFT 6 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2647 | u8 flags1; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2648 | #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_MASK 0x1 /* cf0en */ |
| 2649 | #define YSTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_SHIFT 0 |
| 2650 | #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_EN_MASK 0x1 /* cf1en */ |
| 2651 | #define YSTORM_ETH_CONN_AG_CTX_PMD_TERMINATE_CF_EN_SHIFT 1 |
| 2652 | #define YSTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 2653 | #define YSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 2 |
| 2654 | #define YSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK 0x1 /* rule0en */ |
| 2655 | #define YSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT 3 |
| 2656 | #define YSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK 0x1 /* rule1en */ |
| 2657 | #define YSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT 4 |
| 2658 | #define YSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK 0x1 /* rule2en */ |
| 2659 | #define YSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT 5 |
| 2660 | #define YSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK 0x1 /* rule3en */ |
| 2661 | #define YSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT 6 |
| 2662 | #define YSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK 0x1 /* rule4en */ |
| 2663 | #define YSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT 7 |
| 2664 | u8 byte2 /* byte2 */; |
| 2665 | u8 byte3 /* byte3 */; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2666 | __le16 word0 /* word0 */; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2667 | __le32 terminate_spqe /* reg0 */; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2668 | __le32 reg1 /* reg1 */; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2669 | __le16 tx_bd_cons_upd /* word1 */; |
| 2670 | __le16 word2 /* word2 */; |
| 2671 | __le16 word3 /* word3 */; |
| 2672 | __le16 word4 /* word4 */; |
| 2673 | __le32 reg2 /* reg2 */; |
| 2674 | __le32 reg3 /* reg3 */; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2675 | }; |
| 2676 | |
| 2677 | struct tstorm_eth_conn_ag_ctx { |
| 2678 | u8 byte0 /* cdu_validation */; |
| 2679 | u8 byte1 /* state */; |
| 2680 | u8 flags0; |
| 2681 | #define TSTORM_ETH_CONN_AG_CTX_BIT0_MASK 0x1 /* exist_in_qm0 */ |
| 2682 | #define TSTORM_ETH_CONN_AG_CTX_BIT0_SHIFT 0 |
| 2683 | #define TSTORM_ETH_CONN_AG_CTX_BIT1_MASK 0x1 /* exist_in_qm1 */ |
| 2684 | #define TSTORM_ETH_CONN_AG_CTX_BIT1_SHIFT 1 |
| 2685 | #define TSTORM_ETH_CONN_AG_CTX_BIT2_MASK 0x1 /* bit2 */ |
| 2686 | #define TSTORM_ETH_CONN_AG_CTX_BIT2_SHIFT 2 |
| 2687 | #define TSTORM_ETH_CONN_AG_CTX_BIT3_MASK 0x1 /* bit3 */ |
| 2688 | #define TSTORM_ETH_CONN_AG_CTX_BIT3_SHIFT 3 |
| 2689 | #define TSTORM_ETH_CONN_AG_CTX_BIT4_MASK 0x1 /* bit4 */ |
| 2690 | #define TSTORM_ETH_CONN_AG_CTX_BIT4_SHIFT 4 |
| 2691 | #define TSTORM_ETH_CONN_AG_CTX_BIT5_MASK 0x1 /* bit5 */ |
| 2692 | #define TSTORM_ETH_CONN_AG_CTX_BIT5_SHIFT 5 |
| 2693 | #define TSTORM_ETH_CONN_AG_CTX_CF0_MASK 0x3 /* timer0cf */ |
| 2694 | #define TSTORM_ETH_CONN_AG_CTX_CF0_SHIFT 6 |
| 2695 | u8 flags1; |
| 2696 | #define TSTORM_ETH_CONN_AG_CTX_CF1_MASK 0x3 /* timer1cf */ |
| 2697 | #define TSTORM_ETH_CONN_AG_CTX_CF1_SHIFT 0 |
| 2698 | #define TSTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 /* timer2cf */ |
| 2699 | #define TSTORM_ETH_CONN_AG_CTX_CF2_SHIFT 2 |
| 2700 | #define TSTORM_ETH_CONN_AG_CTX_CF3_MASK 0x3 /* timer_stop_all */ |
| 2701 | #define TSTORM_ETH_CONN_AG_CTX_CF3_SHIFT 4 |
| 2702 | #define TSTORM_ETH_CONN_AG_CTX_CF4_MASK 0x3 /* cf4 */ |
| 2703 | #define TSTORM_ETH_CONN_AG_CTX_CF4_SHIFT 6 |
| 2704 | u8 flags2; |
| 2705 | #define TSTORM_ETH_CONN_AG_CTX_CF5_MASK 0x3 /* cf5 */ |
| 2706 | #define TSTORM_ETH_CONN_AG_CTX_CF5_SHIFT 0 |
| 2707 | #define TSTORM_ETH_CONN_AG_CTX_CF6_MASK 0x3 /* cf6 */ |
| 2708 | #define TSTORM_ETH_CONN_AG_CTX_CF6_SHIFT 2 |
| 2709 | #define TSTORM_ETH_CONN_AG_CTX_CF7_MASK 0x3 /* cf7 */ |
| 2710 | #define TSTORM_ETH_CONN_AG_CTX_CF7_SHIFT 4 |
| 2711 | #define TSTORM_ETH_CONN_AG_CTX_CF8_MASK 0x3 /* cf8 */ |
| 2712 | #define TSTORM_ETH_CONN_AG_CTX_CF8_SHIFT 6 |
| 2713 | u8 flags3; |
| 2714 | #define TSTORM_ETH_CONN_AG_CTX_CF9_MASK 0x3 /* cf9 */ |
| 2715 | #define TSTORM_ETH_CONN_AG_CTX_CF9_SHIFT 0 |
| 2716 | #define TSTORM_ETH_CONN_AG_CTX_CF10_MASK 0x3 /* cf10 */ |
| 2717 | #define TSTORM_ETH_CONN_AG_CTX_CF10_SHIFT 2 |
| 2718 | #define TSTORM_ETH_CONN_AG_CTX_CF0EN_MASK 0x1 /* cf0en */ |
| 2719 | #define TSTORM_ETH_CONN_AG_CTX_CF0EN_SHIFT 4 |
| 2720 | #define TSTORM_ETH_CONN_AG_CTX_CF1EN_MASK 0x1 /* cf1en */ |
| 2721 | #define TSTORM_ETH_CONN_AG_CTX_CF1EN_SHIFT 5 |
| 2722 | #define TSTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 2723 | #define TSTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 6 |
| 2724 | #define TSTORM_ETH_CONN_AG_CTX_CF3EN_MASK 0x1 /* cf3en */ |
| 2725 | #define TSTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT 7 |
| 2726 | u8 flags4; |
| 2727 | #define TSTORM_ETH_CONN_AG_CTX_CF4EN_MASK 0x1 /* cf4en */ |
| 2728 | #define TSTORM_ETH_CONN_AG_CTX_CF4EN_SHIFT 0 |
| 2729 | #define TSTORM_ETH_CONN_AG_CTX_CF5EN_MASK 0x1 /* cf5en */ |
| 2730 | #define TSTORM_ETH_CONN_AG_CTX_CF5EN_SHIFT 1 |
| 2731 | #define TSTORM_ETH_CONN_AG_CTX_CF6EN_MASK 0x1 /* cf6en */ |
| 2732 | #define TSTORM_ETH_CONN_AG_CTX_CF6EN_SHIFT 2 |
| 2733 | #define TSTORM_ETH_CONN_AG_CTX_CF7EN_MASK 0x1 /* cf7en */ |
| 2734 | #define TSTORM_ETH_CONN_AG_CTX_CF7EN_SHIFT 3 |
| 2735 | #define TSTORM_ETH_CONN_AG_CTX_CF8EN_MASK 0x1 /* cf8en */ |
| 2736 | #define TSTORM_ETH_CONN_AG_CTX_CF8EN_SHIFT 4 |
| 2737 | #define TSTORM_ETH_CONN_AG_CTX_CF9EN_MASK 0x1 /* cf9en */ |
| 2738 | #define TSTORM_ETH_CONN_AG_CTX_CF9EN_SHIFT 5 |
| 2739 | #define TSTORM_ETH_CONN_AG_CTX_CF10EN_MASK 0x1 /* cf10en */ |
| 2740 | #define TSTORM_ETH_CONN_AG_CTX_CF10EN_SHIFT 6 |
| 2741 | #define TSTORM_ETH_CONN_AG_CTX_RULE0EN_MASK 0x1 /* rule0en */ |
| 2742 | #define TSTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT 7 |
| 2743 | u8 flags5; |
| 2744 | #define TSTORM_ETH_CONN_AG_CTX_RULE1EN_MASK 0x1 /* rule1en */ |
| 2745 | #define TSTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT 0 |
| 2746 | #define TSTORM_ETH_CONN_AG_CTX_RULE2EN_MASK 0x1 /* rule2en */ |
| 2747 | #define TSTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT 1 |
| 2748 | #define TSTORM_ETH_CONN_AG_CTX_RULE3EN_MASK 0x1 /* rule3en */ |
| 2749 | #define TSTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT 2 |
| 2750 | #define TSTORM_ETH_CONN_AG_CTX_RULE4EN_MASK 0x1 /* rule4en */ |
| 2751 | #define TSTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT 3 |
| 2752 | #define TSTORM_ETH_CONN_AG_CTX_RULE5EN_MASK 0x1 /* rule5en */ |
| 2753 | #define TSTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT 4 |
| 2754 | #define TSTORM_ETH_CONN_AG_CTX_RX_BD_EN_MASK 0x1 /* rule6en */ |
| 2755 | #define TSTORM_ETH_CONN_AG_CTX_RX_BD_EN_SHIFT 5 |
| 2756 | #define TSTORM_ETH_CONN_AG_CTX_RULE7EN_MASK 0x1 /* rule7en */ |
| 2757 | #define TSTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT 6 |
| 2758 | #define TSTORM_ETH_CONN_AG_CTX_RULE8EN_MASK 0x1 /* rule8en */ |
| 2759 | #define TSTORM_ETH_CONN_AG_CTX_RULE8EN_SHIFT 7 |
| 2760 | __le32 reg0 /* reg0 */; |
| 2761 | __le32 reg1 /* reg1 */; |
| 2762 | __le32 reg2 /* reg2 */; |
| 2763 | __le32 reg3 /* reg3 */; |
| 2764 | __le32 reg4 /* reg4 */; |
| 2765 | __le32 reg5 /* reg5 */; |
| 2766 | __le32 reg6 /* reg6 */; |
| 2767 | __le32 reg7 /* reg7 */; |
| 2768 | __le32 reg8 /* reg8 */; |
| 2769 | u8 byte2 /* byte2 */; |
| 2770 | u8 byte3 /* byte3 */; |
| 2771 | __le16 rx_bd_cons /* word0 */; |
| 2772 | u8 byte4 /* byte4 */; |
| 2773 | u8 byte5 /* byte5 */; |
| 2774 | __le16 rx_bd_prod /* word1 */; |
| 2775 | __le16 word2 /* conn_dpi */; |
| 2776 | __le16 word3 /* word3 */; |
| 2777 | __le32 reg9 /* reg9 */; |
| 2778 | __le32 reg10 /* reg10 */; |
| 2779 | }; |
| 2780 | |
| 2781 | struct ustorm_eth_conn_ag_ctx { |
| 2782 | u8 byte0 /* cdu_validation */; |
| 2783 | u8 byte1 /* state */; |
| 2784 | u8 flags0; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2785 | #define USTORM_ETH_CONN_AG_CTX_BIT0_MASK 0x1 /* exist_in_qm0 */ |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2786 | #define USTORM_ETH_CONN_AG_CTX_BIT0_SHIFT 0 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2787 | #define USTORM_ETH_CONN_AG_CTX_BIT1_MASK 0x1 /* exist_in_qm1 */ |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2788 | #define USTORM_ETH_CONN_AG_CTX_BIT1_SHIFT 1 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2789 | #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_MASK 0x3 /* timer0cf */ |
| 2790 | #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_SHIFT 2 |
| 2791 | #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_MASK 0x3 /* timer1cf */ |
| 2792 | #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_SHIFT 4 |
| 2793 | #define USTORM_ETH_CONN_AG_CTX_CF2_MASK 0x3 /* timer2cf */ |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2794 | #define USTORM_ETH_CONN_AG_CTX_CF2_SHIFT 6 |
| 2795 | u8 flags1; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2796 | #define USTORM_ETH_CONN_AG_CTX_CF3_MASK 0x3 /* timer_stop_all */ |
| 2797 | #define USTORM_ETH_CONN_AG_CTX_CF3_SHIFT 0 |
| 2798 | #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_MASK 0x3 /* cf4 */ |
| 2799 | #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_SHIFT 2 |
| 2800 | #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_MASK 0x3 /* cf5 */ |
| 2801 | #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_SHIFT 4 |
| 2802 | #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_MASK 0x3 /* cf6 */ |
| 2803 | #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_SHIFT 6 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2804 | u8 flags2; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2805 | #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_EN_MASK 0x1 /* cf0en */ |
| 2806 | #define USTORM_ETH_CONN_AG_CTX_TX_PMD_TERMINATE_CF_EN_SHIFT 0 |
| 2807 | #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_EN_MASK 0x1 /* cf1en */ |
| 2808 | #define USTORM_ETH_CONN_AG_CTX_RX_PMD_TERMINATE_CF_EN_SHIFT 1 |
| 2809 | #define USTORM_ETH_CONN_AG_CTX_CF2EN_MASK 0x1 /* cf2en */ |
| 2810 | #define USTORM_ETH_CONN_AG_CTX_CF2EN_SHIFT 2 |
| 2811 | #define USTORM_ETH_CONN_AG_CTX_CF3EN_MASK 0x1 /* cf3en */ |
| 2812 | #define USTORM_ETH_CONN_AG_CTX_CF3EN_SHIFT 3 |
| 2813 | #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_EN_MASK 0x1 /* cf4en */ |
| 2814 | #define USTORM_ETH_CONN_AG_CTX_TX_ARM_CF_EN_SHIFT 4 |
| 2815 | #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_EN_MASK 0x1 /* cf5en */ |
| 2816 | #define USTORM_ETH_CONN_AG_CTX_RX_ARM_CF_EN_SHIFT 5 |
| 2817 | #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_MASK 0x1 /* cf6en */ |
| 2818 | #define USTORM_ETH_CONN_AG_CTX_TX_BD_CONS_UPD_CF_EN_SHIFT 6 |
| 2819 | #define USTORM_ETH_CONN_AG_CTX_RULE0EN_MASK 0x1 /* rule0en */ |
| 2820 | #define USTORM_ETH_CONN_AG_CTX_RULE0EN_SHIFT 7 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2821 | u8 flags3; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2822 | #define USTORM_ETH_CONN_AG_CTX_RULE1EN_MASK 0x1 /* rule1en */ |
| 2823 | #define USTORM_ETH_CONN_AG_CTX_RULE1EN_SHIFT 0 |
| 2824 | #define USTORM_ETH_CONN_AG_CTX_RULE2EN_MASK 0x1 /* rule2en */ |
| 2825 | #define USTORM_ETH_CONN_AG_CTX_RULE2EN_SHIFT 1 |
| 2826 | #define USTORM_ETH_CONN_AG_CTX_RULE3EN_MASK 0x1 /* rule3en */ |
| 2827 | #define USTORM_ETH_CONN_AG_CTX_RULE3EN_SHIFT 2 |
| 2828 | #define USTORM_ETH_CONN_AG_CTX_RULE4EN_MASK 0x1 /* rule4en */ |
| 2829 | #define USTORM_ETH_CONN_AG_CTX_RULE4EN_SHIFT 3 |
| 2830 | #define USTORM_ETH_CONN_AG_CTX_RULE5EN_MASK 0x1 /* rule5en */ |
| 2831 | #define USTORM_ETH_CONN_AG_CTX_RULE5EN_SHIFT 4 |
| 2832 | #define USTORM_ETH_CONN_AG_CTX_RULE6EN_MASK 0x1 /* rule6en */ |
| 2833 | #define USTORM_ETH_CONN_AG_CTX_RULE6EN_SHIFT 5 |
| 2834 | #define USTORM_ETH_CONN_AG_CTX_RULE7EN_MASK 0x1 /* rule7en */ |
| 2835 | #define USTORM_ETH_CONN_AG_CTX_RULE7EN_SHIFT 6 |
| 2836 | #define USTORM_ETH_CONN_AG_CTX_RULE8EN_MASK 0x1 /* rule8en */ |
| 2837 | #define USTORM_ETH_CONN_AG_CTX_RULE8EN_SHIFT 7 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2838 | u8 byte2 /* byte2 */; |
| 2839 | u8 byte3 /* byte3 */; |
| 2840 | __le16 word0 /* conn_dpi */; |
| 2841 | __le16 tx_bd_cons /* word1 */; |
| 2842 | __le32 reg0 /* reg0 */; |
| 2843 | __le32 reg1 /* reg1 */; |
| 2844 | __le32 reg2 /* reg2 */; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2845 | __le32 tx_int_coallecing_timeset /* reg3 */; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 2846 | __le16 tx_drv_bd_cons /* word2 */; |
| 2847 | __le16 rx_drv_cqe_cons /* word3 */; |
| 2848 | }; |
| 2849 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 2850 | /* The eth storm context for the Ustorm */ |
| 2851 | struct ustorm_eth_conn_st_ctx { |
| 2852 | __le32 reserved[40]; |
| 2853 | }; |
| 2854 | |
| 2855 | /* The eth storm context for the Mstorm */ |
| 2856 | struct mstorm_eth_conn_st_ctx { |
| 2857 | __le32 reserved[8]; |
| 2858 | }; |
| 2859 | |
| 2860 | /* eth connection context */ |
| 2861 | struct eth_conn_context { |
| 2862 | struct tstorm_eth_conn_st_ctx tstorm_st_context; |
| 2863 | struct regpair tstorm_st_padding[2]; |
| 2864 | struct pstorm_eth_conn_st_ctx pstorm_st_context; |
| 2865 | struct xstorm_eth_conn_st_ctx xstorm_st_context; |
| 2866 | struct xstorm_eth_conn_ag_ctx xstorm_ag_context; |
| 2867 | struct ystorm_eth_conn_st_ctx ystorm_st_context; |
| 2868 | struct ystorm_eth_conn_ag_ctx ystorm_ag_context; |
| 2869 | struct tstorm_eth_conn_ag_ctx tstorm_ag_context; |
| 2870 | struct ustorm_eth_conn_ag_ctx ustorm_ag_context; |
| 2871 | struct ustorm_eth_conn_st_ctx ustorm_st_context; |
| 2872 | struct mstorm_eth_conn_st_ctx mstorm_st_context; |
| 2873 | }; |
| 2874 | |
| 2875 | enum eth_filter_action { |
| 2876 | ETH_FILTER_ACTION_REMOVE, |
| 2877 | ETH_FILTER_ACTION_ADD, |
| 2878 | ETH_FILTER_ACTION_REMOVE_ALL, |
| 2879 | MAX_ETH_FILTER_ACTION |
| 2880 | }; |
| 2881 | |
| 2882 | struct eth_filter_cmd { |
| 2883 | u8 type /* Filter Type (MAC/VLAN/Pair/VNI) */; |
| 2884 | u8 vport_id /* the vport id */; |
| 2885 | u8 action /* filter command action: add/remove/replace */; |
| 2886 | u8 reserved0; |
| 2887 | __le32 vni; |
| 2888 | __le16 mac_lsb; |
| 2889 | __le16 mac_mid; |
| 2890 | __le16 mac_msb; |
| 2891 | __le16 vlan_id; |
| 2892 | }; |
| 2893 | |
| 2894 | struct eth_filter_cmd_header { |
| 2895 | u8 rx; |
| 2896 | u8 tx; |
| 2897 | u8 cmd_cnt; |
| 2898 | u8 assert_on_error; |
| 2899 | u8 reserved1[4]; |
| 2900 | }; |
| 2901 | |
| 2902 | enum eth_filter_type { |
| 2903 | ETH_FILTER_TYPE_MAC, |
| 2904 | ETH_FILTER_TYPE_VLAN, |
| 2905 | ETH_FILTER_TYPE_PAIR, |
| 2906 | ETH_FILTER_TYPE_INNER_MAC, |
| 2907 | ETH_FILTER_TYPE_INNER_VLAN, |
| 2908 | ETH_FILTER_TYPE_INNER_PAIR, |
| 2909 | ETH_FILTER_TYPE_INNER_MAC_VNI_PAIR, |
| 2910 | ETH_FILTER_TYPE_MAC_VNI_PAIR, |
| 2911 | ETH_FILTER_TYPE_VNI, |
| 2912 | MAX_ETH_FILTER_TYPE |
| 2913 | }; |
| 2914 | |
| 2915 | enum eth_ramrod_cmd_id { |
| 2916 | ETH_RAMROD_UNUSED, |
| 2917 | ETH_RAMROD_VPORT_START /* VPort Start Ramrod */, |
| 2918 | ETH_RAMROD_VPORT_UPDATE /* VPort Update Ramrod */, |
| 2919 | ETH_RAMROD_VPORT_STOP /* VPort Stop Ramrod */, |
| 2920 | ETH_RAMROD_RX_QUEUE_START /* RX Queue Start Ramrod */, |
| 2921 | ETH_RAMROD_RX_QUEUE_STOP /* RX Queue Stop Ramrod */, |
| 2922 | ETH_RAMROD_TX_QUEUE_START /* TX Queue Start Ramrod */, |
| 2923 | ETH_RAMROD_TX_QUEUE_STOP /* TX Queue Stop Ramrod */, |
| 2924 | ETH_RAMROD_FILTERS_UPDATE /* Add or Remove Mac/Vlan/Pair filters */, |
| 2925 | ETH_RAMROD_RX_QUEUE_UPDATE /* RX Queue Update Ramrod */, |
| 2926 | ETH_RAMROD_RESERVED, |
| 2927 | ETH_RAMROD_RESERVED2, |
| 2928 | ETH_RAMROD_RESERVED3, |
| 2929 | ETH_RAMROD_RESERVED4, |
| 2930 | ETH_RAMROD_RESERVED5, |
| 2931 | ETH_RAMROD_RESERVED6, |
| 2932 | ETH_RAMROD_RESERVED7, |
| 2933 | ETH_RAMROD_RESERVED8, |
| 2934 | MAX_ETH_RAMROD_CMD_ID |
| 2935 | }; |
| 2936 | |
| 2937 | enum eth_tx_err { |
| 2938 | ETH_TX_ERR_DROP /* Drop erronous packet. */, |
| 2939 | ETH_TX_ERR_ASSERT_MALICIOUS, |
| 2940 | MAX_ETH_TX_ERR |
| 2941 | }; |
| 2942 | |
| 2943 | struct eth_tx_err_vals { |
| 2944 | __le16 values; |
| 2945 | #define ETH_TX_ERR_VALS_ILLEGAL_VLAN_MODE_MASK 0x1 |
| 2946 | #define ETH_TX_ERR_VALS_ILLEGAL_VLAN_MODE_SHIFT 0 |
| 2947 | #define ETH_TX_ERR_VALS_PACKET_TOO_SMALL_MASK 0x1 |
| 2948 | #define ETH_TX_ERR_VALS_PACKET_TOO_SMALL_SHIFT 1 |
| 2949 | #define ETH_TX_ERR_VALS_ANTI_SPOOFING_ERR_MASK 0x1 |
| 2950 | #define ETH_TX_ERR_VALS_ANTI_SPOOFING_ERR_SHIFT 2 |
| 2951 | #define ETH_TX_ERR_VALS_ILLEGAL_INBAND_TAGS_MASK 0x1 |
| 2952 | #define ETH_TX_ERR_VALS_ILLEGAL_INBAND_TAGS_SHIFT 3 |
| 2953 | #define ETH_TX_ERR_VALS_VLAN_INSERTION_W_INBAND_TAG_MASK 0x1 |
| 2954 | #define ETH_TX_ERR_VALS_VLAN_INSERTION_W_INBAND_TAG_SHIFT 4 |
| 2955 | #define ETH_TX_ERR_VALS_MTU_VIOLATION_MASK 0x1 |
| 2956 | #define ETH_TX_ERR_VALS_MTU_VIOLATION_SHIFT 5 |
| 2957 | #define ETH_TX_ERR_VALS_ILLEGAL_CONTROL_FRAME_MASK 0x1 |
| 2958 | #define ETH_TX_ERR_VALS_ILLEGAL_CONTROL_FRAME_SHIFT 6 |
| 2959 | #define ETH_TX_ERR_VALS_RESERVED_MASK 0x1FF |
| 2960 | #define ETH_TX_ERR_VALS_RESERVED_SHIFT 7 |
| 2961 | }; |
| 2962 | |
| 2963 | struct eth_vport_rss_config { |
| 2964 | __le16 capabilities; |
| 2965 | #define ETH_VPORT_RSS_CONFIG_IPV4_CAPABILITY_MASK 0x1 |
| 2966 | #define ETH_VPORT_RSS_CONFIG_IPV4_CAPABILITY_SHIFT 0 |
| 2967 | #define ETH_VPORT_RSS_CONFIG_IPV6_CAPABILITY_MASK 0x1 |
| 2968 | #define ETH_VPORT_RSS_CONFIG_IPV6_CAPABILITY_SHIFT 1 |
| 2969 | #define ETH_VPORT_RSS_CONFIG_IPV4_TCP_CAPABILITY_MASK 0x1 |
| 2970 | #define ETH_VPORT_RSS_CONFIG_IPV4_TCP_CAPABILITY_SHIFT 2 |
| 2971 | #define ETH_VPORT_RSS_CONFIG_IPV6_TCP_CAPABILITY_MASK 0x1 |
| 2972 | #define ETH_VPORT_RSS_CONFIG_IPV6_TCP_CAPABILITY_SHIFT 3 |
| 2973 | #define ETH_VPORT_RSS_CONFIG_IPV4_UDP_CAPABILITY_MASK 0x1 |
| 2974 | #define ETH_VPORT_RSS_CONFIG_IPV4_UDP_CAPABILITY_SHIFT 4 |
| 2975 | #define ETH_VPORT_RSS_CONFIG_IPV6_UDP_CAPABILITY_MASK 0x1 |
| 2976 | #define ETH_VPORT_RSS_CONFIG_IPV6_UDP_CAPABILITY_SHIFT 5 |
| 2977 | #define ETH_VPORT_RSS_CONFIG_EN_5_TUPLE_CAPABILITY_MASK 0x1 |
| 2978 | #define ETH_VPORT_RSS_CONFIG_EN_5_TUPLE_CAPABILITY_SHIFT 6 |
| 2979 | #define ETH_VPORT_RSS_CONFIG_RESERVED0_MASK 0x1FF |
| 2980 | #define ETH_VPORT_RSS_CONFIG_RESERVED0_SHIFT 7 |
| 2981 | u8 rss_id; |
| 2982 | u8 rss_mode; |
| 2983 | u8 update_rss_key; |
| 2984 | u8 update_rss_ind_table; |
| 2985 | u8 update_rss_capabilities; |
| 2986 | u8 tbl_size; |
| 2987 | __le32 reserved2[2]; |
| 2988 | __le16 indirection_table[ETH_RSS_IND_TABLE_ENTRIES_NUM]; |
| 2989 | __le32 rss_key[ETH_RSS_KEY_SIZE_REGS]; |
| 2990 | __le32 reserved3[2]; |
| 2991 | }; |
| 2992 | |
| 2993 | enum eth_vport_rss_mode { |
| 2994 | ETH_VPORT_RSS_MODE_DISABLED, |
| 2995 | ETH_VPORT_RSS_MODE_REGULAR, |
| 2996 | MAX_ETH_VPORT_RSS_MODE |
| 2997 | }; |
| 2998 | |
| 2999 | struct eth_vport_rx_mode { |
| 3000 | __le16 state; |
| 3001 | #define ETH_VPORT_RX_MODE_UCAST_DROP_ALL_MASK 0x1 |
| 3002 | #define ETH_VPORT_RX_MODE_UCAST_DROP_ALL_SHIFT 0 |
| 3003 | #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL_MASK 0x1 |
| 3004 | #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL_SHIFT 1 |
| 3005 | #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_UNMATCHED_MASK 0x1 |
| 3006 | #define ETH_VPORT_RX_MODE_UCAST_ACCEPT_UNMATCHED_SHIFT 2 |
| 3007 | #define ETH_VPORT_RX_MODE_MCAST_DROP_ALL_MASK 0x1 |
| 3008 | #define ETH_VPORT_RX_MODE_MCAST_DROP_ALL_SHIFT 3 |
| 3009 | #define ETH_VPORT_RX_MODE_MCAST_ACCEPT_ALL_MASK 0x1 |
| 3010 | #define ETH_VPORT_RX_MODE_MCAST_ACCEPT_ALL_SHIFT 4 |
| 3011 | #define ETH_VPORT_RX_MODE_BCAST_ACCEPT_ALL_MASK 0x1 |
| 3012 | #define ETH_VPORT_RX_MODE_BCAST_ACCEPT_ALL_SHIFT 5 |
| 3013 | #define ETH_VPORT_RX_MODE_RESERVED1_MASK 0x3FF |
| 3014 | #define ETH_VPORT_RX_MODE_RESERVED1_SHIFT 6 |
| 3015 | __le16 reserved2[3]; |
| 3016 | }; |
| 3017 | |
| 3018 | struct eth_vport_tpa_param { |
Manish Chopra | 088c861 | 2016-03-04 12:35:05 -0500 | [diff] [blame] | 3019 | u8 tpa_ipv4_en_flg; |
| 3020 | u8 tpa_ipv6_en_flg; |
| 3021 | u8 tpa_ipv4_tunn_en_flg; |
| 3022 | u8 tpa_ipv6_tunn_en_flg; |
| 3023 | u8 tpa_pkt_split_flg; |
| 3024 | u8 tpa_hdr_data_split_flg; |
| 3025 | u8 tpa_gro_consistent_flg; |
| 3026 | u8 tpa_max_aggs_num; |
| 3027 | u16 tpa_max_size; |
| 3028 | u16 tpa_min_size_to_start; |
| 3029 | u16 tpa_min_size_to_cont; |
| 3030 | u8 max_buff_num; |
| 3031 | u8 reserved; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3032 | }; |
| 3033 | |
| 3034 | struct eth_vport_tx_mode { |
| 3035 | __le16 state; |
| 3036 | #define ETH_VPORT_TX_MODE_UCAST_DROP_ALL_MASK 0x1 |
| 3037 | #define ETH_VPORT_TX_MODE_UCAST_DROP_ALL_SHIFT 0 |
| 3038 | #define ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL_MASK 0x1 |
| 3039 | #define ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL_SHIFT 1 |
| 3040 | #define ETH_VPORT_TX_MODE_MCAST_DROP_ALL_MASK 0x1 |
| 3041 | #define ETH_VPORT_TX_MODE_MCAST_DROP_ALL_SHIFT 2 |
| 3042 | #define ETH_VPORT_TX_MODE_MCAST_ACCEPT_ALL_MASK 0x1 |
| 3043 | #define ETH_VPORT_TX_MODE_MCAST_ACCEPT_ALL_SHIFT 3 |
| 3044 | #define ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL_MASK 0x1 |
| 3045 | #define ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL_SHIFT 4 |
| 3046 | #define ETH_VPORT_TX_MODE_RESERVED1_MASK 0x7FF |
| 3047 | #define ETH_VPORT_TX_MODE_RESERVED1_SHIFT 5 |
| 3048 | __le16 reserved2[3]; |
| 3049 | }; |
| 3050 | |
| 3051 | struct rx_queue_start_ramrod_data { |
| 3052 | __le16 rx_queue_id; |
| 3053 | __le16 num_of_pbl_pages; |
| 3054 | __le16 bd_max_bytes; |
| 3055 | __le16 sb_id; |
| 3056 | u8 sb_index; |
| 3057 | u8 vport_id; |
| 3058 | u8 default_rss_queue_flg; |
| 3059 | u8 complete_cqe_flg; |
| 3060 | u8 complete_event_flg; |
| 3061 | u8 stats_counter_id; |
| 3062 | u8 pin_context; |
| 3063 | u8 pxp_tph_valid_bd; |
| 3064 | u8 pxp_tph_valid_pkt; |
| 3065 | u8 pxp_st_hint; |
| 3066 | __le16 pxp_st_index; |
| 3067 | u8 pmd_mode; |
| 3068 | u8 notify_en; |
| 3069 | u8 toggle_val; |
| 3070 | u8 reserved[7]; |
| 3071 | __le16 reserved1; |
| 3072 | struct regpair cqe_pbl_addr; |
| 3073 | struct regpair bd_base; |
| 3074 | struct regpair reserved2; |
| 3075 | }; |
| 3076 | |
| 3077 | struct rx_queue_stop_ramrod_data { |
| 3078 | __le16 rx_queue_id; |
| 3079 | u8 complete_cqe_flg; |
| 3080 | u8 complete_event_flg; |
| 3081 | u8 vport_id; |
| 3082 | u8 reserved[3]; |
| 3083 | }; |
| 3084 | |
| 3085 | struct rx_queue_update_ramrod_data { |
| 3086 | __le16 rx_queue_id; |
| 3087 | u8 complete_cqe_flg; |
| 3088 | u8 complete_event_flg; |
| 3089 | u8 vport_id; |
| 3090 | u8 reserved[4]; |
| 3091 | u8 reserved1; |
| 3092 | u8 reserved2; |
| 3093 | u8 reserved3; |
| 3094 | __le16 reserved4; |
| 3095 | __le16 reserved5; |
| 3096 | struct regpair reserved6; |
| 3097 | }; |
| 3098 | |
| 3099 | struct tx_queue_start_ramrod_data { |
| 3100 | __le16 sb_id; |
| 3101 | u8 sb_index; |
| 3102 | u8 vport_id; |
| 3103 | u8 reserved0; |
| 3104 | u8 stats_counter_id; |
| 3105 | __le16 qm_pq_id; |
| 3106 | u8 flags; |
| 3107 | #define TX_QUEUE_START_RAMROD_DATA_DISABLE_OPPORTUNISTIC_MASK 0x1 |
| 3108 | #define TX_QUEUE_START_RAMROD_DATA_DISABLE_OPPORTUNISTIC_SHIFT 0 |
| 3109 | #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_PKT_DUP_MASK 0x1 |
| 3110 | #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_PKT_DUP_SHIFT 1 |
| 3111 | #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_TX_DEST_MASK 0x1 |
| 3112 | #define TX_QUEUE_START_RAMROD_DATA_TEST_MODE_TX_DEST_SHIFT 2 |
| 3113 | #define TX_QUEUE_START_RAMROD_DATA_PMD_MODE_MASK 0x1 |
| 3114 | #define TX_QUEUE_START_RAMROD_DATA_PMD_MODE_SHIFT 3 |
| 3115 | #define TX_QUEUE_START_RAMROD_DATA_NOTIFY_EN_MASK 0x1 |
| 3116 | #define TX_QUEUE_START_RAMROD_DATA_NOTIFY_EN_SHIFT 4 |
| 3117 | #define TX_QUEUE_START_RAMROD_DATA_PIN_CONTEXT_MASK 0x1 |
| 3118 | #define TX_QUEUE_START_RAMROD_DATA_PIN_CONTEXT_SHIFT 5 |
| 3119 | #define TX_QUEUE_START_RAMROD_DATA_RESERVED1_MASK 0x3 |
| 3120 | #define TX_QUEUE_START_RAMROD_DATA_RESERVED1_SHIFT 6 |
| 3121 | u8 pxp_st_hint; |
| 3122 | u8 pxp_tph_valid_bd; |
| 3123 | u8 pxp_tph_valid_pkt; |
| 3124 | __le16 pxp_st_index; |
| 3125 | __le16 comp_agg_size; |
| 3126 | __le16 queue_zone_id; |
| 3127 | __le16 test_dup_count; |
| 3128 | __le16 pbl_size; |
| 3129 | __le16 tx_queue_id; |
| 3130 | struct regpair pbl_base_addr; |
| 3131 | struct regpair bd_cons_address; |
| 3132 | }; |
| 3133 | |
| 3134 | struct tx_queue_stop_ramrod_data { |
| 3135 | __le16 reserved[4]; |
| 3136 | }; |
| 3137 | |
| 3138 | struct vport_filter_update_ramrod_data { |
| 3139 | struct eth_filter_cmd_header filter_cmd_hdr; |
| 3140 | struct eth_filter_cmd filter_cmds[ETH_FILTER_RULES_COUNT]; |
| 3141 | }; |
| 3142 | |
| 3143 | struct vport_start_ramrod_data { |
| 3144 | u8 vport_id; |
| 3145 | u8 sw_fid; |
| 3146 | __le16 mtu; |
| 3147 | u8 drop_ttl0_en; |
| 3148 | u8 inner_vlan_removal_en; |
| 3149 | struct eth_vport_rx_mode rx_mode; |
| 3150 | struct eth_vport_tx_mode tx_mode; |
| 3151 | struct eth_vport_tpa_param tpa_param; |
| 3152 | __le16 default_vlan; |
| 3153 | u8 tx_switching_en; |
| 3154 | u8 anti_spoofing_en; |
| 3155 | u8 default_vlan_en; |
| 3156 | u8 handle_ptp_pkts; |
| 3157 | u8 silent_vlan_removal_en; |
| 3158 | u8 untagged; |
| 3159 | struct eth_tx_err_vals tx_err_behav; |
| 3160 | u8 zero_placement_offset; |
| 3161 | u8 reserved[7]; |
| 3162 | }; |
| 3163 | |
| 3164 | struct vport_stop_ramrod_data { |
| 3165 | u8 vport_id; |
| 3166 | u8 reserved[7]; |
| 3167 | }; |
| 3168 | |
| 3169 | struct vport_update_ramrod_data_cmn { |
| 3170 | u8 vport_id; |
| 3171 | u8 update_rx_active_flg; |
| 3172 | u8 rx_active_flg; |
| 3173 | u8 update_tx_active_flg; |
| 3174 | u8 tx_active_flg; |
| 3175 | u8 update_rx_mode_flg; |
| 3176 | u8 update_tx_mode_flg; |
| 3177 | u8 update_approx_mcast_flg; |
| 3178 | u8 update_rss_flg; |
| 3179 | u8 update_inner_vlan_removal_en_flg; |
| 3180 | u8 inner_vlan_removal_en; |
| 3181 | u8 update_tpa_param_flg; |
| 3182 | u8 update_tpa_en_flg; |
| 3183 | u8 update_tx_switching_en_flg; |
| 3184 | u8 tx_switching_en; |
| 3185 | u8 update_anti_spoofing_en_flg; |
| 3186 | u8 anti_spoofing_en; |
| 3187 | u8 update_handle_ptp_pkts; |
| 3188 | u8 handle_ptp_pkts; |
| 3189 | u8 update_default_vlan_en_flg; |
| 3190 | u8 default_vlan_en; |
| 3191 | u8 update_default_vlan_flg; |
| 3192 | __le16 default_vlan; |
| 3193 | u8 update_accept_any_vlan_flg; |
| 3194 | u8 accept_any_vlan; |
| 3195 | u8 silent_vlan_removal_en; |
| 3196 | u8 update_mtu_flg; |
| 3197 | __le16 mtu; |
| 3198 | u8 reserved[2]; |
| 3199 | }; |
| 3200 | |
| 3201 | struct vport_update_ramrod_mcast { |
| 3202 | __le32 bins[ETH_MULTICAST_MAC_BINS_IN_REGS]; |
| 3203 | }; |
| 3204 | |
| 3205 | struct vport_update_ramrod_data { |
| 3206 | struct vport_update_ramrod_data_cmn common; |
| 3207 | struct eth_vport_rx_mode rx_mode; |
| 3208 | struct eth_vport_tx_mode tx_mode; |
| 3209 | struct eth_vport_tpa_param tpa_param; |
| 3210 | struct vport_update_ramrod_mcast approx_mcast; |
| 3211 | struct eth_vport_rss_config rss_config; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3212 | }; |
| 3213 | |
| 3214 | #define VF_MAX_STATIC 192 /* In case of K2 */ |
| 3215 | |
| 3216 | #define MCP_GLOB_PATH_MAX 2 |
| 3217 | #define MCP_PORT_MAX 2 /* Global */ |
| 3218 | #define MCP_GLOB_PORT_MAX 4 /* Global */ |
| 3219 | #define MCP_GLOB_FUNC_MAX 16 /* Global */ |
| 3220 | |
| 3221 | typedef u32 offsize_t; /* In DWORDS !!! */ |
| 3222 | /* Offset from the beginning of the MCP scratchpad */ |
| 3223 | #define OFFSIZE_OFFSET_SHIFT 0 |
| 3224 | #define OFFSIZE_OFFSET_MASK 0x0000ffff |
| 3225 | /* Size of specific element (not the whole array if any) */ |
| 3226 | #define OFFSIZE_SIZE_SHIFT 16 |
| 3227 | #define OFFSIZE_SIZE_MASK 0xffff0000 |
| 3228 | |
| 3229 | /* SECTION_OFFSET is calculating the offset in bytes out of offsize */ |
| 3230 | #define SECTION_OFFSET(_offsize) ((((_offsize & \ |
| 3231 | OFFSIZE_OFFSET_MASK) >> \ |
| 3232 | OFFSIZE_OFFSET_SHIFT) << 2)) |
| 3233 | |
| 3234 | /* QED_SECTION_SIZE is calculating the size in bytes out of offsize */ |
| 3235 | #define QED_SECTION_SIZE(_offsize) (((_offsize & \ |
| 3236 | OFFSIZE_SIZE_MASK) >> \ |
| 3237 | OFFSIZE_SIZE_SHIFT) << 2) |
| 3238 | |
| 3239 | /* SECTION_ADDR returns the GRC addr of a section, given offsize and index |
| 3240 | * within section. |
| 3241 | */ |
| 3242 | #define SECTION_ADDR(_offsize, idx) (MCP_REG_SCRATCH + \ |
| 3243 | SECTION_OFFSET(_offsize) + \ |
| 3244 | (QED_SECTION_SIZE(_offsize) * idx)) |
| 3245 | |
| 3246 | /* SECTION_OFFSIZE_ADDR returns the GRC addr to the offsize address. |
| 3247 | * Use offsetof, since the OFFSETUP collide with the firmware definition |
| 3248 | */ |
| 3249 | #define SECTION_OFFSIZE_ADDR(_pub_base, _section) (_pub_base + \ |
| 3250 | offsetof(struct \ |
| 3251 | mcp_public_data, \ |
| 3252 | sections[_section])) |
| 3253 | /* PHY configuration */ |
| 3254 | struct pmm_phy_cfg { |
| 3255 | u32 speed; |
| 3256 | #define PMM_SPEED_AUTONEG 0 |
| 3257 | |
| 3258 | u32 pause; /* bitmask */ |
| 3259 | #define PMM_PAUSE_NONE 0x0 |
| 3260 | #define PMM_PAUSE_AUTONEG 0x1 |
| 3261 | #define PMM_PAUSE_RX 0x2 |
| 3262 | #define PMM_PAUSE_TX 0x4 |
| 3263 | |
| 3264 | u32 adv_speed; /* Default should be the speed_cap_mask */ |
| 3265 | u32 loopback_mode; |
| 3266 | #define PMM_LOOPBACK_NONE 0 |
| 3267 | #define PMM_LOOPBACK_INT_PHY 1 |
| 3268 | #define PMM_LOOPBACK_EXT_PHY 2 |
| 3269 | #define PMM_LOOPBACK_EXT 3 |
| 3270 | #define PMM_LOOPBACK_MAC 4 |
| 3271 | |
| 3272 | /* features */ |
| 3273 | u32 feature_config_flags; |
| 3274 | }; |
| 3275 | |
| 3276 | struct port_mf_cfg { |
| 3277 | u32 dynamic_cfg; /* device control channel */ |
| 3278 | #define PORT_MF_CFG_OV_TAG_MASK 0x0000ffff |
| 3279 | #define PORT_MF_CFG_OV_TAG_SHIFT 0 |
| 3280 | #define PORT_MF_CFG_OV_TAG_DEFAULT PORT_MF_CFG_OV_TAG_MASK |
| 3281 | |
| 3282 | u32 reserved[1]; |
| 3283 | }; |
| 3284 | |
| 3285 | /* DO NOT add new fields in the middle |
| 3286 | * MUST be synced with struct pmm_stats_map |
| 3287 | */ |
| 3288 | struct pmm_stats { |
| 3289 | u64 r64; /* 0x00 (Offset 0x00 ) RX 64-byte frame counter*/ |
| 3290 | u64 r127; /* 0x01 (Offset 0x08 ) RX 65 to 127 byte frame counter*/ |
| 3291 | u64 r255; |
| 3292 | u64 r511; |
| 3293 | u64 r1023; |
| 3294 | u64 r1518; |
| 3295 | u64 r1522; |
| 3296 | u64 r2047; |
| 3297 | u64 r4095; |
| 3298 | u64 r9216; |
| 3299 | u64 r16383; |
| 3300 | u64 rfcs; /* 0x0F (Offset 0x58 ) RX FCS error frame counter*/ |
| 3301 | u64 rxcf; /* 0x10 (Offset 0x60 ) RX control frame counter*/ |
| 3302 | u64 rxpf; /* 0x11 (Offset 0x68 ) RX pause frame counter*/ |
| 3303 | u64 rxpp; /* 0x12 (Offset 0x70 ) RX PFC frame counter*/ |
| 3304 | u64 raln; /* 0x16 (Offset 0x78 ) RX alignment error counter*/ |
| 3305 | u64 rfcr; /* 0x19 (Offset 0x80 ) RX false carrier counter */ |
| 3306 | u64 rovr; /* 0x1A (Offset 0x88 ) RX oversized frame counter*/ |
| 3307 | u64 rjbr; /* 0x1B (Offset 0x90 ) RX jabber frame counter */ |
| 3308 | u64 rund; /* 0x34 (Offset 0x98 ) RX undersized frame counter */ |
| 3309 | u64 rfrg; /* 0x35 (Offset 0xa0 ) RX fragment counter */ |
| 3310 | u64 t64; /* 0x40 (Offset 0xa8 ) TX 64-byte frame counter */ |
| 3311 | u64 t127; |
| 3312 | u64 t255; |
| 3313 | u64 t511; |
| 3314 | u64 t1023; |
| 3315 | u64 t1518; |
| 3316 | u64 t2047; |
| 3317 | u64 t4095; |
| 3318 | u64 t9216; |
| 3319 | u64 t16383; |
| 3320 | u64 txpf; /* 0x50 (Offset 0xf8 ) TX pause frame counter */ |
| 3321 | u64 txpp; /* 0x51 (Offset 0x100) TX PFC frame counter */ |
| 3322 | u64 tlpiec; |
| 3323 | u64 tncl; |
| 3324 | u64 rbyte; /* 0x3d (Offset 0x118) RX byte counter */ |
| 3325 | u64 rxuca; /* 0x0c (Offset 0x120) RX UC frame counter */ |
| 3326 | u64 rxmca; /* 0x0d (Offset 0x128) RX MC frame counter */ |
| 3327 | u64 rxbca; /* 0x0e (Offset 0x130) RX BC frame counter */ |
| 3328 | u64 rxpok; |
| 3329 | u64 tbyte; /* 0x6f (Offset 0x140) TX byte counter */ |
| 3330 | u64 txuca; /* 0x4d (Offset 0x148) TX UC frame counter */ |
| 3331 | u64 txmca; /* 0x4e (Offset 0x150) TX MC frame counter */ |
| 3332 | u64 txbca; /* 0x4f (Offset 0x158) TX BC frame counter */ |
| 3333 | u64 txcf; /* 0x54 (Offset 0x160) TX control frame counter */ |
| 3334 | }; |
| 3335 | |
| 3336 | struct brb_stats { |
| 3337 | u64 brb_truncate[8]; |
| 3338 | u64 brb_discard[8]; |
| 3339 | }; |
| 3340 | |
| 3341 | struct port_stats { |
| 3342 | struct brb_stats brb; |
| 3343 | struct pmm_stats pmm; |
| 3344 | }; |
| 3345 | |
| 3346 | #define CMT_TEAM0 0 |
| 3347 | #define CMT_TEAM1 1 |
| 3348 | #define CMT_TEAM_MAX 2 |
| 3349 | |
| 3350 | struct couple_mode_teaming { |
| 3351 | u8 port_cmt[MCP_GLOB_PORT_MAX]; |
| 3352 | #define PORT_CMT_IN_TEAM BIT(0) |
| 3353 | |
| 3354 | #define PORT_CMT_PORT_ROLE BIT(1) |
| 3355 | #define PORT_CMT_PORT_INACTIVE (0 << 1) |
| 3356 | #define PORT_CMT_PORT_ACTIVE BIT(1) |
| 3357 | |
| 3358 | #define PORT_CMT_TEAM_MASK BIT(2) |
| 3359 | #define PORT_CMT_TEAM0 (0 << 2) |
| 3360 | #define PORT_CMT_TEAM1 BIT(2) |
| 3361 | }; |
| 3362 | |
| 3363 | /************************************** |
| 3364 | * LLDP and DCBX HSI structures |
| 3365 | **************************************/ |
| 3366 | #define LLDP_CHASSIS_ID_STAT_LEN 4 |
| 3367 | #define LLDP_PORT_ID_STAT_LEN 4 |
| 3368 | #define DCBX_MAX_APP_PROTOCOL 32 |
| 3369 | #define MAX_SYSTEM_LLDP_TLV_DATA 32 |
| 3370 | |
| 3371 | enum lldp_agent_e { |
| 3372 | LLDP_NEAREST_BRIDGE = 0, |
| 3373 | LLDP_NEAREST_NON_TPMR_BRIDGE, |
| 3374 | LLDP_NEAREST_CUSTOMER_BRIDGE, |
| 3375 | LLDP_MAX_LLDP_AGENTS |
| 3376 | }; |
| 3377 | |
| 3378 | struct lldp_config_params_s { |
| 3379 | u32 config; |
| 3380 | #define LLDP_CONFIG_TX_INTERVAL_MASK 0x000000ff |
| 3381 | #define LLDP_CONFIG_TX_INTERVAL_SHIFT 0 |
| 3382 | #define LLDP_CONFIG_HOLD_MASK 0x00000f00 |
| 3383 | #define LLDP_CONFIG_HOLD_SHIFT 8 |
| 3384 | #define LLDP_CONFIG_MAX_CREDIT_MASK 0x0000f000 |
| 3385 | #define LLDP_CONFIG_MAX_CREDIT_SHIFT 12 |
| 3386 | #define LLDP_CONFIG_ENABLE_RX_MASK 0x40000000 |
| 3387 | #define LLDP_CONFIG_ENABLE_RX_SHIFT 30 |
| 3388 | #define LLDP_CONFIG_ENABLE_TX_MASK 0x80000000 |
| 3389 | #define LLDP_CONFIG_ENABLE_TX_SHIFT 31 |
| 3390 | u32 local_chassis_id[LLDP_CHASSIS_ID_STAT_LEN]; |
| 3391 | u32 local_port_id[LLDP_PORT_ID_STAT_LEN]; |
| 3392 | }; |
| 3393 | |
| 3394 | struct lldp_status_params_s { |
| 3395 | u32 prefix_seq_num; |
| 3396 | u32 status; /* TBD */ |
| 3397 | |
| 3398 | /* Holds remote Chassis ID TLV header, subtype and 9B of payload. */ |
| 3399 | u32 peer_chassis_id[LLDP_CHASSIS_ID_STAT_LEN]; |
| 3400 | |
| 3401 | /* Holds remote Port ID TLV header, subtype and 9B of payload. */ |
| 3402 | u32 peer_port_id[LLDP_PORT_ID_STAT_LEN]; |
| 3403 | u32 suffix_seq_num; |
| 3404 | }; |
| 3405 | |
| 3406 | struct dcbx_ets_feature { |
| 3407 | u32 flags; |
| 3408 | #define DCBX_ETS_ENABLED_MASK 0x00000001 |
| 3409 | #define DCBX_ETS_ENABLED_SHIFT 0 |
| 3410 | #define DCBX_ETS_WILLING_MASK 0x00000002 |
| 3411 | #define DCBX_ETS_WILLING_SHIFT 1 |
| 3412 | #define DCBX_ETS_ERROR_MASK 0x00000004 |
| 3413 | #define DCBX_ETS_ERROR_SHIFT 2 |
| 3414 | #define DCBX_ETS_CBS_MASK 0x00000008 |
| 3415 | #define DCBX_ETS_CBS_SHIFT 3 |
| 3416 | #define DCBX_ETS_MAX_TCS_MASK 0x000000f0 |
| 3417 | #define DCBX_ETS_MAX_TCS_SHIFT 4 |
| 3418 | u32 pri_tc_tbl[1]; |
| 3419 | #define DCBX_ISCSI_OOO_TC 4 |
| 3420 | #define NIG_ETS_ISCSI_OOO_CLIENT_OFFSET (DCBX_ISCSI_OOO_TC + 1) |
| 3421 | u32 tc_bw_tbl[2]; |
| 3422 | u32 tc_tsa_tbl[2]; |
| 3423 | #define DCBX_ETS_TSA_STRICT 0 |
| 3424 | #define DCBX_ETS_TSA_CBS 1 |
| 3425 | #define DCBX_ETS_TSA_ETS 2 |
| 3426 | }; |
| 3427 | |
| 3428 | struct dcbx_app_priority_entry { |
| 3429 | u32 entry; |
| 3430 | #define DCBX_APP_PRI_MAP_MASK 0x000000ff |
| 3431 | #define DCBX_APP_PRI_MAP_SHIFT 0 |
| 3432 | #define DCBX_APP_PRI_0 0x01 |
| 3433 | #define DCBX_APP_PRI_1 0x02 |
| 3434 | #define DCBX_APP_PRI_2 0x04 |
| 3435 | #define DCBX_APP_PRI_3 0x08 |
| 3436 | #define DCBX_APP_PRI_4 0x10 |
| 3437 | #define DCBX_APP_PRI_5 0x20 |
| 3438 | #define DCBX_APP_PRI_6 0x40 |
| 3439 | #define DCBX_APP_PRI_7 0x80 |
| 3440 | #define DCBX_APP_SF_MASK 0x00000300 |
| 3441 | #define DCBX_APP_SF_SHIFT 8 |
| 3442 | #define DCBX_APP_SF_ETHTYPE 0 |
| 3443 | #define DCBX_APP_SF_PORT 1 |
| 3444 | #define DCBX_APP_PROTOCOL_ID_MASK 0xffff0000 |
| 3445 | #define DCBX_APP_PROTOCOL_ID_SHIFT 16 |
| 3446 | }; |
| 3447 | |
| 3448 | /* FW structure in BE */ |
| 3449 | struct dcbx_app_priority_feature { |
| 3450 | u32 flags; |
| 3451 | #define DCBX_APP_ENABLED_MASK 0x00000001 |
| 3452 | #define DCBX_APP_ENABLED_SHIFT 0 |
| 3453 | #define DCBX_APP_WILLING_MASK 0x00000002 |
| 3454 | #define DCBX_APP_WILLING_SHIFT 1 |
| 3455 | #define DCBX_APP_ERROR_MASK 0x00000004 |
| 3456 | #define DCBX_APP_ERROR_SHIFT 2 |
| 3457 | /* Not in use |
| 3458 | * #define DCBX_APP_DEFAULT_PRI_MASK 0x00000f00 |
| 3459 | * #define DCBX_APP_DEFAULT_PRI_SHIFT 8 |
| 3460 | */ |
| 3461 | #define DCBX_APP_MAX_TCS_MASK 0x0000f000 |
| 3462 | #define DCBX_APP_MAX_TCS_SHIFT 12 |
| 3463 | #define DCBX_APP_NUM_ENTRIES_MASK 0x00ff0000 |
| 3464 | #define DCBX_APP_NUM_ENTRIES_SHIFT 16 |
| 3465 | struct dcbx_app_priority_entry app_pri_tbl[DCBX_MAX_APP_PROTOCOL]; |
| 3466 | }; |
| 3467 | |
| 3468 | /* FW structure in BE */ |
| 3469 | struct dcbx_features { |
| 3470 | /* PG feature */ |
| 3471 | struct dcbx_ets_feature ets; |
| 3472 | |
| 3473 | /* PFC feature */ |
| 3474 | u32 pfc; |
| 3475 | #define DCBX_PFC_PRI_EN_BITMAP_MASK 0x000000ff |
| 3476 | #define DCBX_PFC_PRI_EN_BITMAP_SHIFT 0 |
| 3477 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_0 0x01 |
| 3478 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_1 0x02 |
| 3479 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_2 0x04 |
| 3480 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_3 0x08 |
| 3481 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_4 0x10 |
| 3482 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_5 0x20 |
| 3483 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_6 0x40 |
| 3484 | #define DCBX_PFC_PRI_EN_BITMAP_PRI_7 0x80 |
| 3485 | |
| 3486 | #define DCBX_PFC_FLAGS_MASK 0x0000ff00 |
| 3487 | #define DCBX_PFC_FLAGS_SHIFT 8 |
| 3488 | #define DCBX_PFC_CAPS_MASK 0x00000f00 |
| 3489 | #define DCBX_PFC_CAPS_SHIFT 8 |
| 3490 | #define DCBX_PFC_MBC_MASK 0x00004000 |
| 3491 | #define DCBX_PFC_MBC_SHIFT 14 |
| 3492 | #define DCBX_PFC_WILLING_MASK 0x00008000 |
| 3493 | #define DCBX_PFC_WILLING_SHIFT 15 |
| 3494 | #define DCBX_PFC_ENABLED_MASK 0x00010000 |
| 3495 | #define DCBX_PFC_ENABLED_SHIFT 16 |
| 3496 | #define DCBX_PFC_ERROR_MASK 0x00020000 |
| 3497 | #define DCBX_PFC_ERROR_SHIFT 17 |
| 3498 | |
| 3499 | /* APP feature */ |
| 3500 | struct dcbx_app_priority_feature app; |
| 3501 | }; |
| 3502 | |
| 3503 | struct dcbx_local_params { |
| 3504 | u32 config; |
| 3505 | #define DCBX_CONFIG_VERSION_MASK 0x00000003 |
| 3506 | #define DCBX_CONFIG_VERSION_SHIFT 0 |
| 3507 | #define DCBX_CONFIG_VERSION_DISABLED 0 |
| 3508 | #define DCBX_CONFIG_VERSION_IEEE 1 |
| 3509 | #define DCBX_CONFIG_VERSION_CEE 2 |
| 3510 | |
| 3511 | u32 flags; |
| 3512 | struct dcbx_features features; |
| 3513 | }; |
| 3514 | |
| 3515 | struct dcbx_mib { |
| 3516 | u32 prefix_seq_num; |
| 3517 | u32 flags; |
| 3518 | struct dcbx_features features; |
| 3519 | u32 suffix_seq_num; |
| 3520 | }; |
| 3521 | |
| 3522 | struct lldp_system_tlvs_buffer_s { |
| 3523 | u16 valid; |
| 3524 | u16 length; |
| 3525 | u32 data[MAX_SYSTEM_LLDP_TLV_DATA]; |
| 3526 | }; |
| 3527 | |
| 3528 | /**************************************/ |
| 3529 | /* */ |
| 3530 | /* P U B L I C G L O B A L */ |
| 3531 | /* */ |
| 3532 | /**************************************/ |
| 3533 | struct public_global { |
| 3534 | u32 max_path; |
| 3535 | #define MAX_PATH_BIG_BEAR 2 |
| 3536 | #define MAX_PATH_K2 1 |
| 3537 | u32 max_ports; |
| 3538 | #define MODE_1P 1 |
| 3539 | #define MODE_2P 2 |
| 3540 | #define MODE_3P 3 |
| 3541 | #define MODE_4P 4 |
| 3542 | u32 debug_mb_offset; |
| 3543 | u32 phymod_dbg_mb_offset; |
| 3544 | struct couple_mode_teaming cmt; |
| 3545 | s32 internal_temperature; |
| 3546 | u32 mfw_ver; |
| 3547 | u32 running_bundle_id; |
| 3548 | }; |
| 3549 | |
| 3550 | /**************************************/ |
| 3551 | /* */ |
| 3552 | /* P U B L I C P A T H */ |
| 3553 | /* */ |
| 3554 | /**************************************/ |
| 3555 | |
| 3556 | /**************************************************************************** |
| 3557 | * Shared Memory 2 Region * |
| 3558 | ****************************************************************************/ |
| 3559 | /* The fw_flr_ack is actually built in the following way: */ |
| 3560 | /* 8 bit: PF ack */ |
| 3561 | /* 128 bit: VF ack */ |
| 3562 | /* 8 bit: ios_dis_ack */ |
| 3563 | /* In order to maintain endianity in the mailbox hsi, we want to keep using */ |
| 3564 | /* u32. The fw must have the VF right after the PF since this is how it */ |
| 3565 | /* access arrays(it expects always the VF to reside after the PF, and that */ |
| 3566 | /* makes the calculation much easier for it. ) */ |
| 3567 | /* In order to answer both limitations, and keep the struct small, the code */ |
| 3568 | /* will abuse the structure defined here to achieve the actual partition */ |
| 3569 | /* above */ |
| 3570 | /****************************************************************************/ |
| 3571 | struct fw_flr_mb { |
| 3572 | u32 aggint; |
| 3573 | u32 opgen_addr; |
| 3574 | u32 accum_ack; /* 0..15:PF, 16..207:VF, 256..271:IOV_DIS */ |
| 3575 | #define ACCUM_ACK_PF_BASE 0 |
| 3576 | #define ACCUM_ACK_PF_SHIFT 0 |
| 3577 | |
| 3578 | #define ACCUM_ACK_VF_BASE 8 |
| 3579 | #define ACCUM_ACK_VF_SHIFT 3 |
| 3580 | |
| 3581 | #define ACCUM_ACK_IOV_DIS_BASE 256 |
| 3582 | #define ACCUM_ACK_IOV_DIS_SHIFT 8 |
| 3583 | }; |
| 3584 | |
| 3585 | struct public_path { |
| 3586 | struct fw_flr_mb flr_mb; |
| 3587 | u32 mcp_vf_disabled[VF_MAX_STATIC / 32]; |
| 3588 | |
| 3589 | u32 process_kill; |
| 3590 | #define PROCESS_KILL_COUNTER_MASK 0x0000ffff |
| 3591 | #define PROCESS_KILL_COUNTER_SHIFT 0 |
| 3592 | #define PROCESS_KILL_GLOB_AEU_BIT_MASK 0xffff0000 |
| 3593 | #define PROCESS_KILL_GLOB_AEU_BIT_SHIFT 16 |
| 3594 | #define GLOBAL_AEU_BIT(aeu_reg_id, aeu_bit) (aeu_reg_id * 32 + aeu_bit) |
| 3595 | }; |
| 3596 | |
| 3597 | /**************************************/ |
| 3598 | /* */ |
| 3599 | /* P U B L I C P O R T */ |
| 3600 | /* */ |
| 3601 | /**************************************/ |
| 3602 | |
| 3603 | /**************************************************************************** |
| 3604 | * Driver <-> FW Mailbox * |
| 3605 | ****************************************************************************/ |
| 3606 | |
| 3607 | struct public_port { |
| 3608 | u32 validity_map; /* 0x0 (4*2 = 0x8) */ |
| 3609 | |
| 3610 | /* validity bits */ |
| 3611 | #define MCP_VALIDITY_PCI_CFG 0x00100000 |
| 3612 | #define MCP_VALIDITY_MB 0x00200000 |
| 3613 | #define MCP_VALIDITY_DEV_INFO 0x00400000 |
| 3614 | #define MCP_VALIDITY_RESERVED 0x00000007 |
| 3615 | |
| 3616 | /* One licensing bit should be set */ |
| 3617 | #define MCP_VALIDITY_LIC_KEY_IN_EFFECT_MASK 0x00000038 |
| 3618 | #define MCP_VALIDITY_LIC_MANUF_KEY_IN_EFFECT 0x00000008 |
| 3619 | #define MCP_VALIDITY_LIC_UPGRADE_KEY_IN_EFFECT 0x00000010 |
| 3620 | #define MCP_VALIDITY_LIC_NO_KEY_IN_EFFECT 0x00000020 |
| 3621 | |
| 3622 | /* Active MFW */ |
| 3623 | #define MCP_VALIDITY_ACTIVE_MFW_UNKNOWN 0x00000000 |
| 3624 | #define MCP_VALIDITY_ACTIVE_MFW_MASK 0x000001c0 |
| 3625 | #define MCP_VALIDITY_ACTIVE_MFW_NCSI 0x00000040 |
| 3626 | #define MCP_VALIDITY_ACTIVE_MFW_NONE 0x000001c0 |
| 3627 | |
| 3628 | u32 link_status; |
| 3629 | #define LINK_STATUS_LINK_UP \ |
| 3630 | 0x00000001 |
| 3631 | #define LINK_STATUS_SPEED_AND_DUPLEX_MASK 0x0000001e |
| 3632 | #define LINK_STATUS_SPEED_AND_DUPLEX_1000THD BIT(1) |
| 3633 | #define LINK_STATUS_SPEED_AND_DUPLEX_1000TFD (2 << 1) |
| 3634 | #define LINK_STATUS_SPEED_AND_DUPLEX_10G (3 << 1) |
| 3635 | #define LINK_STATUS_SPEED_AND_DUPLEX_20G (4 << 1) |
| 3636 | #define LINK_STATUS_SPEED_AND_DUPLEX_40G (5 << 1) |
| 3637 | #define LINK_STATUS_SPEED_AND_DUPLEX_50G (6 << 1) |
| 3638 | #define LINK_STATUS_SPEED_AND_DUPLEX_100G (7 << 1) |
| 3639 | #define LINK_STATUS_SPEED_AND_DUPLEX_25G (8 << 1) |
| 3640 | |
| 3641 | #define LINK_STATUS_AUTO_NEGOTIATE_ENABLED 0x00000020 |
| 3642 | |
| 3643 | #define LINK_STATUS_AUTO_NEGOTIATE_COMPLETE 0x00000040 |
| 3644 | #define LINK_STATUS_PARALLEL_DETECTION_USED 0x00000080 |
| 3645 | |
| 3646 | #define LINK_STATUS_PFC_ENABLED \ |
| 3647 | 0x00000100 |
| 3648 | #define LINK_STATUS_LINK_PARTNER_1000TFD_CAPABLE 0x00000200 |
| 3649 | #define LINK_STATUS_LINK_PARTNER_1000THD_CAPABLE 0x00000400 |
| 3650 | #define LINK_STATUS_LINK_PARTNER_10G_CAPABLE 0x00000800 |
| 3651 | #define LINK_STATUS_LINK_PARTNER_20G_CAPABLE 0x00001000 |
| 3652 | #define LINK_STATUS_LINK_PARTNER_40G_CAPABLE 0x00002000 |
| 3653 | #define LINK_STATUS_LINK_PARTNER_50G_CAPABLE 0x00004000 |
| 3654 | #define LINK_STATUS_LINK_PARTNER_100G_CAPABLE 0x00008000 |
| 3655 | #define LINK_STATUS_LINK_PARTNER_25G_CAPABLE 0x00010000 |
| 3656 | |
| 3657 | #define LINK_STATUS_LINK_PARTNER_FLOW_CONTROL_MASK 0x000C0000 |
| 3658 | #define LINK_STATUS_LINK_PARTNER_NOT_PAUSE_CAPABLE (0 << 18) |
| 3659 | #define LINK_STATUS_LINK_PARTNER_SYMMETRIC_PAUSE BIT(18) |
| 3660 | #define LINK_STATUS_LINK_PARTNER_ASYMMETRIC_PAUSE (2 << 18) |
| 3661 | #define LINK_STATUS_LINK_PARTNER_BOTH_PAUSE (3 << 18) |
| 3662 | |
| 3663 | #define LINK_STATUS_SFP_TX_FAULT \ |
| 3664 | 0x00100000 |
| 3665 | #define LINK_STATUS_TX_FLOW_CONTROL_ENABLED 0x00200000 |
| 3666 | #define LINK_STATUS_RX_FLOW_CONTROL_ENABLED 0x00400000 |
| 3667 | |
| 3668 | u32 link_status1; |
| 3669 | u32 ext_phy_fw_version; |
| 3670 | u32 drv_phy_cfg_addr; |
| 3671 | |
| 3672 | u32 port_stx; |
| 3673 | |
| 3674 | u32 stat_nig_timer; |
| 3675 | |
| 3676 | struct port_mf_cfg port_mf_config; |
| 3677 | struct port_stats stats; |
| 3678 | |
| 3679 | u32 media_type; |
| 3680 | #define MEDIA_UNSPECIFIED 0x0 |
| 3681 | #define MEDIA_SFPP_10G_FIBER 0x1 |
| 3682 | #define MEDIA_XFP_FIBER 0x2 |
| 3683 | #define MEDIA_DA_TWINAX 0x3 |
| 3684 | #define MEDIA_BASE_T 0x4 |
| 3685 | #define MEDIA_SFP_1G_FIBER 0x5 |
| 3686 | #define MEDIA_KR 0xf0 |
| 3687 | #define MEDIA_NOT_PRESENT 0xff |
| 3688 | |
| 3689 | u32 lfa_status; |
| 3690 | #define LFA_LINK_FLAP_REASON_OFFSET 0 |
| 3691 | #define LFA_LINK_FLAP_REASON_MASK 0x000000ff |
| 3692 | #define LFA_NO_REASON (0 << 0) |
| 3693 | #define LFA_LINK_DOWN BIT(0) |
| 3694 | #define LFA_FORCE_INIT BIT(1) |
| 3695 | #define LFA_LOOPBACK_MISMATCH BIT(2) |
| 3696 | #define LFA_SPEED_MISMATCH BIT(3) |
| 3697 | #define LFA_FLOW_CTRL_MISMATCH BIT(4) |
| 3698 | #define LFA_ADV_SPEED_MISMATCH BIT(5) |
| 3699 | #define LINK_FLAP_AVOIDANCE_COUNT_OFFSET 8 |
| 3700 | #define LINK_FLAP_AVOIDANCE_COUNT_MASK 0x0000ff00 |
| 3701 | #define LINK_FLAP_COUNT_OFFSET 16 |
| 3702 | #define LINK_FLAP_COUNT_MASK 0x00ff0000 |
| 3703 | |
| 3704 | u32 link_change_count; |
| 3705 | |
| 3706 | /* LLDP params */ |
| 3707 | struct lldp_config_params_s lldp_config_params[ |
| 3708 | LLDP_MAX_LLDP_AGENTS]; |
| 3709 | struct lldp_status_params_s lldp_status_params[ |
| 3710 | LLDP_MAX_LLDP_AGENTS]; |
| 3711 | struct lldp_system_tlvs_buffer_s system_lldp_tlvs_buf; |
| 3712 | |
| 3713 | /* DCBX related MIB */ |
| 3714 | struct dcbx_local_params local_admin_dcbx_mib; |
| 3715 | struct dcbx_mib remote_dcbx_mib; |
| 3716 | struct dcbx_mib operational_dcbx_mib; |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3717 | |
| 3718 | u32 fc_npiv_nvram_tbl_addr; |
| 3719 | u32 fc_npiv_nvram_tbl_size; |
| 3720 | u32 transceiver_data; |
Zvi Nachmani | 334c03b | 2016-03-09 09:16:25 +0200 | [diff] [blame] | 3721 | #define PMM_TRANSCEIVER_STATE_MASK 0x000000FF |
| 3722 | #define PMM_TRANSCEIVER_STATE_SHIFT 0x00000000 |
| 3723 | #define PMM_TRANSCEIVER_STATE_PRESENT 0x00000001 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3724 | }; |
| 3725 | |
| 3726 | /**************************************/ |
| 3727 | /* */ |
| 3728 | /* P U B L I C F U N C */ |
| 3729 | /* */ |
| 3730 | /**************************************/ |
| 3731 | |
| 3732 | struct public_func { |
| 3733 | u32 iscsi_boot_signature; |
| 3734 | u32 iscsi_boot_block_offset; |
| 3735 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3736 | u32 mtu_size; |
| 3737 | u32 c2s_pcp_map_lower; |
| 3738 | u32 c2s_pcp_map_upper; |
| 3739 | u32 c2s_pcp_map_default; |
| 3740 | u32 reserved[4]; |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3741 | |
| 3742 | u32 config; |
| 3743 | |
| 3744 | /* E/R/I/D */ |
| 3745 | /* function 0 of each port cannot be hidden */ |
| 3746 | #define FUNC_MF_CFG_FUNC_HIDE 0x00000001 |
| 3747 | #define FUNC_MF_CFG_PAUSE_ON_HOST_RING 0x00000002 |
| 3748 | #define FUNC_MF_CFG_PAUSE_ON_HOST_RING_SHIFT 0x00000001 |
| 3749 | |
| 3750 | #define FUNC_MF_CFG_PROTOCOL_MASK 0x000000f0 |
| 3751 | #define FUNC_MF_CFG_PROTOCOL_SHIFT 4 |
| 3752 | #define FUNC_MF_CFG_PROTOCOL_ETHERNET 0x00000000 |
| 3753 | #define FUNC_MF_CFG_PROTOCOL_ISCSI 0x00000010 |
| 3754 | #define FUNC_MF_CFG_PROTOCOL_FCOE 0x00000020 |
| 3755 | #define FUNC_MF_CFG_PROTOCOL_ROCE 0x00000030 |
| 3756 | #define FUNC_MF_CFG_PROTOCOL_MAX 0x00000030 |
| 3757 | |
| 3758 | /* MINBW, MAXBW */ |
| 3759 | /* value range - 0..100, increments in 1 % */ |
| 3760 | #define FUNC_MF_CFG_MIN_BW_MASK 0x0000ff00 |
| 3761 | #define FUNC_MF_CFG_MIN_BW_SHIFT 8 |
| 3762 | #define FUNC_MF_CFG_MIN_BW_DEFAULT 0x00000000 |
| 3763 | #define FUNC_MF_CFG_MAX_BW_MASK 0x00ff0000 |
| 3764 | #define FUNC_MF_CFG_MAX_BW_SHIFT 16 |
| 3765 | #define FUNC_MF_CFG_MAX_BW_DEFAULT 0x00640000 |
| 3766 | |
| 3767 | u32 status; |
| 3768 | #define FUNC_STATUS_VLINK_DOWN 0x00000001 |
| 3769 | |
| 3770 | u32 mac_upper; /* MAC */ |
| 3771 | #define FUNC_MF_CFG_UPPERMAC_MASK 0x0000ffff |
| 3772 | #define FUNC_MF_CFG_UPPERMAC_SHIFT 0 |
| 3773 | #define FUNC_MF_CFG_UPPERMAC_DEFAULT FUNC_MF_CFG_UPPERMAC_MASK |
| 3774 | u32 mac_lower; |
| 3775 | #define FUNC_MF_CFG_LOWERMAC_DEFAULT 0xffffffff |
| 3776 | |
| 3777 | u32 fcoe_wwn_port_name_upper; |
| 3778 | u32 fcoe_wwn_port_name_lower; |
| 3779 | |
| 3780 | u32 fcoe_wwn_node_name_upper; |
| 3781 | u32 fcoe_wwn_node_name_lower; |
| 3782 | |
| 3783 | u32 ovlan_stag; /* tags */ |
| 3784 | #define FUNC_MF_CFG_OV_STAG_MASK 0x0000ffff |
| 3785 | #define FUNC_MF_CFG_OV_STAG_SHIFT 0 |
| 3786 | #define FUNC_MF_CFG_OV_STAG_DEFAULT FUNC_MF_CFG_OV_STAG_MASK |
| 3787 | |
| 3788 | u32 pf_allocation; /* vf per pf */ |
| 3789 | |
| 3790 | u32 preserve_data; /* Will be used bt CCM */ |
| 3791 | |
| 3792 | u32 driver_last_activity_ts; |
| 3793 | |
| 3794 | u32 drv_ack_vf_disabled[VF_MAX_STATIC / 32]; /* 0x0044 */ |
| 3795 | |
| 3796 | u32 drv_id; |
| 3797 | #define DRV_ID_PDA_COMP_VER_MASK 0x0000ffff |
| 3798 | #define DRV_ID_PDA_COMP_VER_SHIFT 0 |
| 3799 | |
| 3800 | #define DRV_ID_MCP_HSI_VER_MASK 0x00ff0000 |
| 3801 | #define DRV_ID_MCP_HSI_VER_SHIFT 16 |
| 3802 | #define DRV_ID_MCP_HSI_VER_CURRENT BIT(DRV_ID_MCP_HSI_VER_SHIFT) |
| 3803 | |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3804 | #define DRV_ID_DRV_TYPE_MASK 0x7f000000 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3805 | #define DRV_ID_DRV_TYPE_SHIFT 24 |
| 3806 | #define DRV_ID_DRV_TYPE_UNKNOWN (0 << DRV_ID_DRV_TYPE_SHIFT) |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3807 | #define DRV_ID_DRV_TYPE_LINUX (1 << DRV_ID_DRV_TYPE_SHIFT) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3808 | #define DRV_ID_DRV_TYPE_WINDOWS (2 << DRV_ID_DRV_TYPE_SHIFT) |
| 3809 | #define DRV_ID_DRV_TYPE_DIAG (3 << DRV_ID_DRV_TYPE_SHIFT) |
| 3810 | #define DRV_ID_DRV_TYPE_PREBOOT (4 << DRV_ID_DRV_TYPE_SHIFT) |
| 3811 | #define DRV_ID_DRV_TYPE_SOLARIS (5 << DRV_ID_DRV_TYPE_SHIFT) |
| 3812 | #define DRV_ID_DRV_TYPE_VMWARE (6 << DRV_ID_DRV_TYPE_SHIFT) |
| 3813 | #define DRV_ID_DRV_TYPE_FREEBSD (7 << DRV_ID_DRV_TYPE_SHIFT) |
| 3814 | #define DRV_ID_DRV_TYPE_AIX (8 << DRV_ID_DRV_TYPE_SHIFT) |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3815 | |
| 3816 | #define DRV_ID_DRV_INIT_HW_MASK 0x80000000 |
| 3817 | #define DRV_ID_DRV_INIT_HW_SHIFT 31 |
| 3818 | #define DRV_ID_DRV_INIT_HW_FLAG BIT(DRV_ID_DRV_INIT_HW_SHIFT) |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3819 | }; |
| 3820 | |
| 3821 | /**************************************/ |
| 3822 | /* */ |
| 3823 | /* P U B L I C M B */ |
| 3824 | /* */ |
| 3825 | /**************************************/ |
| 3826 | /* This is the only section that the driver can write to, and each */ |
| 3827 | /* Basically each driver request to set feature parameters, |
| 3828 | * will be done using a different command, which will be linked |
| 3829 | * to a specific data structure from the union below. |
| 3830 | * For huge strucuture, the common blank structure should be used. |
| 3831 | */ |
| 3832 | |
| 3833 | struct mcp_mac { |
| 3834 | u32 mac_upper; /* Upper 16 bits are always zeroes */ |
| 3835 | u32 mac_lower; |
| 3836 | }; |
| 3837 | |
| 3838 | struct mcp_val64 { |
| 3839 | u32 lo; |
| 3840 | u32 hi; |
| 3841 | }; |
| 3842 | |
| 3843 | struct mcp_file_att { |
| 3844 | u32 nvm_start_addr; |
| 3845 | u32 len; |
| 3846 | }; |
| 3847 | |
| 3848 | #define MCP_DRV_VER_STR_SIZE 16 |
| 3849 | #define MCP_DRV_VER_STR_SIZE_DWORD (MCP_DRV_VER_STR_SIZE / sizeof(u32)) |
| 3850 | #define MCP_DRV_NVM_BUF_LEN 32 |
| 3851 | struct drv_version_stc { |
| 3852 | u32 version; |
| 3853 | u8 name[MCP_DRV_VER_STR_SIZE - 4]; |
| 3854 | }; |
| 3855 | |
| 3856 | union drv_union_data { |
| 3857 | u32 ver_str[MCP_DRV_VER_STR_SIZE_DWORD]; |
| 3858 | struct mcp_mac wol_mac; |
| 3859 | |
| 3860 | struct pmm_phy_cfg drv_phy_cfg; |
| 3861 | |
| 3862 | struct mcp_val64 val64; /* For PHY / AVS commands */ |
| 3863 | |
| 3864 | u8 raw_data[MCP_DRV_NVM_BUF_LEN]; |
| 3865 | |
| 3866 | struct mcp_file_att file_att; |
| 3867 | |
| 3868 | u32 ack_vf_disabled[VF_MAX_STATIC / 32]; |
| 3869 | |
| 3870 | struct drv_version_stc drv_version; |
| 3871 | }; |
| 3872 | |
| 3873 | struct public_drv_mb { |
| 3874 | u32 drv_mb_header; |
| 3875 | #define DRV_MSG_CODE_MASK 0xffff0000 |
| 3876 | #define DRV_MSG_CODE_LOAD_REQ 0x10000000 |
| 3877 | #define DRV_MSG_CODE_LOAD_DONE 0x11000000 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 3878 | #define DRV_MSG_CODE_INIT_HW 0x12000000 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3879 | #define DRV_MSG_CODE_UNLOAD_REQ 0x20000000 |
| 3880 | #define DRV_MSG_CODE_UNLOAD_DONE 0x21000000 |
| 3881 | #define DRV_MSG_CODE_INIT_PHY 0x22000000 |
| 3882 | /* Params - FORCE - Reinitialize the link regardless of LFA */ |
| 3883 | /* - DONT_CARE - Don't flap the link if up */ |
| 3884 | #define DRV_MSG_CODE_LINK_RESET 0x23000000 |
| 3885 | |
| 3886 | #define DRV_MSG_CODE_SET_LLDP 0x24000000 |
| 3887 | #define DRV_MSG_CODE_SET_DCBX 0x25000000 |
Manish Chopra | 4b01e51 | 2016-04-26 10:56:09 -0400 | [diff] [blame] | 3888 | #define DRV_MSG_CODE_BW_UPDATE_ACK 0x32000000 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3889 | #define DRV_MSG_CODE_NIG_DRAIN 0x30000000 |
| 3890 | |
| 3891 | #define DRV_MSG_CODE_INITIATE_FLR 0x02000000 |
| 3892 | #define DRV_MSG_CODE_VF_DISABLED_DONE 0xc0000000 |
| 3893 | #define DRV_MSG_CODE_CFG_VF_MSIX 0xc0010000 |
| 3894 | #define DRV_MSG_CODE_NVM_PUT_FILE_BEGIN 0x00010000 |
| 3895 | #define DRV_MSG_CODE_NVM_PUT_FILE_DATA 0x00020000 |
| 3896 | #define DRV_MSG_CODE_NVM_GET_FILE_ATT 0x00030000 |
| 3897 | #define DRV_MSG_CODE_NVM_READ_NVRAM 0x00050000 |
| 3898 | #define DRV_MSG_CODE_NVM_WRITE_NVRAM 0x00060000 |
| 3899 | #define DRV_MSG_CODE_NVM_DEL_FILE 0x00080000 |
| 3900 | #define DRV_MSG_CODE_MCP_RESET 0x00090000 |
| 3901 | #define DRV_MSG_CODE_SET_SECURE_MODE 0x000a0000 |
| 3902 | #define DRV_MSG_CODE_PHY_RAW_READ 0x000b0000 |
| 3903 | #define DRV_MSG_CODE_PHY_RAW_WRITE 0x000c0000 |
| 3904 | #define DRV_MSG_CODE_PHY_CORE_READ 0x000d0000 |
| 3905 | #define DRV_MSG_CODE_PHY_CORE_WRITE 0x000e0000 |
| 3906 | #define DRV_MSG_CODE_SET_VERSION 0x000f0000 |
| 3907 | |
Sudarsana Reddy Kalluru | 03dc76c | 2016-04-28 20:20:52 -0400 | [diff] [blame] | 3908 | #define DRV_MSG_CODE_BIST_TEST 0x001e0000 |
Sudarsana Kalluru | 91420b8 | 2015-11-30 12:25:03 +0200 | [diff] [blame] | 3909 | #define DRV_MSG_CODE_SET_LED_MODE 0x00200000 |
| 3910 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3911 | #define DRV_MSG_SEQ_NUMBER_MASK 0x0000ffff |
| 3912 | |
| 3913 | u32 drv_mb_param; |
| 3914 | |
| 3915 | /* UNLOAD_REQ params */ |
| 3916 | #define DRV_MB_PARAM_UNLOAD_WOL_UNKNOWN 0x00000000 |
| 3917 | #define DRV_MB_PARAM_UNLOAD_WOL_MCP 0x00000001 |
| 3918 | #define DRV_MB_PARAM_UNLOAD_WOL_DISABLED 0x00000002 |
| 3919 | #define DRV_MB_PARAM_UNLOAD_WOL_ENABLED 0x00000003 |
| 3920 | |
| 3921 | /* UNLOAD_DONE_params */ |
| 3922 | #define DRV_MB_PARAM_UNLOAD_NON_D3_POWER 0x00000001 |
| 3923 | |
| 3924 | /* INIT_PHY params */ |
| 3925 | #define DRV_MB_PARAM_INIT_PHY_FORCE 0x00000001 |
| 3926 | #define DRV_MB_PARAM_INIT_PHY_DONT_CARE 0x00000002 |
| 3927 | |
| 3928 | /* LLDP / DCBX params*/ |
| 3929 | #define DRV_MB_PARAM_LLDP_SEND_MASK 0x00000001 |
| 3930 | #define DRV_MB_PARAM_LLDP_SEND_SHIFT 0 |
| 3931 | #define DRV_MB_PARAM_LLDP_AGENT_MASK 0x00000006 |
| 3932 | #define DRV_MB_PARAM_LLDP_AGENT_SHIFT 1 |
| 3933 | #define DRV_MB_PARAM_DCBX_NOTIFY_MASK 0x00000008 |
| 3934 | #define DRV_MB_PARAM_DCBX_NOTIFY_SHIFT 3 |
| 3935 | |
| 3936 | #define DRV_MB_PARAM_NIG_DRAIN_PERIOD_MS_MASK 0x000000FF |
| 3937 | #define DRV_MB_PARAM_NIG_DRAIN_PERIOD_MS_SHIFT 0 |
| 3938 | |
| 3939 | #define DRV_MB_PARAM_NVM_PUT_FILE_BEGIN_MFW 0x1 |
| 3940 | #define DRV_MB_PARAM_NVM_PUT_FILE_BEGIN_IMAGE 0x2 |
| 3941 | |
| 3942 | #define DRV_MB_PARAM_NVM_OFFSET_SHIFT 0 |
| 3943 | #define DRV_MB_PARAM_NVM_OFFSET_MASK 0x00FFFFFF |
| 3944 | #define DRV_MB_PARAM_NVM_LEN_SHIFT 24 |
| 3945 | #define DRV_MB_PARAM_NVM_LEN_MASK 0xFF000000 |
| 3946 | |
| 3947 | #define DRV_MB_PARAM_PHY_ADDR_SHIFT 0 |
| 3948 | #define DRV_MB_PARAM_PHY_ADDR_MASK 0x1FF0FFFF |
| 3949 | #define DRV_MB_PARAM_PHY_LANE_SHIFT 16 |
| 3950 | #define DRV_MB_PARAM_PHY_LANE_MASK 0x000F0000 |
| 3951 | #define DRV_MB_PARAM_PHY_SELECT_PORT_SHIFT 29 |
| 3952 | #define DRV_MB_PARAM_PHY_SELECT_PORT_MASK 0x20000000 |
| 3953 | #define DRV_MB_PARAM_PHY_PORT_SHIFT 30 |
| 3954 | #define DRV_MB_PARAM_PHY_PORT_MASK 0xc0000000 |
| 3955 | |
| 3956 | /* configure vf MSIX params*/ |
| 3957 | #define DRV_MB_PARAM_CFG_VF_MSIX_VF_ID_SHIFT 0 |
| 3958 | #define DRV_MB_PARAM_CFG_VF_MSIX_VF_ID_MASK 0x000000FF |
| 3959 | #define DRV_MB_PARAM_CFG_VF_MSIX_SB_NUM_SHIFT 8 |
| 3960 | #define DRV_MB_PARAM_CFG_VF_MSIX_SB_NUM_MASK 0x0000FF00 |
| 3961 | |
Sudarsana Kalluru | 91420b8 | 2015-11-30 12:25:03 +0200 | [diff] [blame] | 3962 | #define DRV_MB_PARAM_SET_LED_MODE_OPER 0x0 |
| 3963 | #define DRV_MB_PARAM_SET_LED_MODE_ON 0x1 |
| 3964 | #define DRV_MB_PARAM_SET_LED_MODE_OFF 0x2 |
| 3965 | |
Sudarsana Reddy Kalluru | 03dc76c | 2016-04-28 20:20:52 -0400 | [diff] [blame] | 3966 | #define DRV_MB_PARAM_BIST_UNKNOWN_TEST 0 |
| 3967 | #define DRV_MB_PARAM_BIST_REGISTER_TEST 1 |
| 3968 | #define DRV_MB_PARAM_BIST_CLOCK_TEST 2 |
| 3969 | |
| 3970 | #define DRV_MB_PARAM_BIST_RC_UNKNOWN 0 |
| 3971 | #define DRV_MB_PARAM_BIST_RC_PASSED 1 |
| 3972 | #define DRV_MB_PARAM_BIST_RC_FAILED 2 |
| 3973 | #define DRV_MB_PARAM_BIST_RC_INVALID_PARAMETER 3 |
| 3974 | |
| 3975 | #define DRV_MB_PARAM_BIST_TEST_INDEX_SHIFT 0 |
| 3976 | #define DRV_MB_PARAM_BIST_TEST_INDEX_MASK 0x000000FF |
| 3977 | |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 3978 | u32 fw_mb_header; |
| 3979 | #define FW_MSG_CODE_MASK 0xffff0000 |
| 3980 | #define FW_MSG_CODE_DRV_LOAD_ENGINE 0x10100000 |
| 3981 | #define FW_MSG_CODE_DRV_LOAD_PORT 0x10110000 |
| 3982 | #define FW_MSG_CODE_DRV_LOAD_FUNCTION 0x10120000 |
| 3983 | #define FW_MSG_CODE_DRV_LOAD_REFUSED_PDA 0x10200000 |
| 3984 | #define FW_MSG_CODE_DRV_LOAD_REFUSED_HSI 0x10210000 |
| 3985 | #define FW_MSG_CODE_DRV_LOAD_REFUSED_DIAG 0x10220000 |
| 3986 | #define FW_MSG_CODE_DRV_LOAD_DONE 0x11100000 |
| 3987 | #define FW_MSG_CODE_DRV_UNLOAD_ENGINE 0x20110000 |
| 3988 | #define FW_MSG_CODE_DRV_UNLOAD_PORT 0x20120000 |
| 3989 | #define FW_MSG_CODE_DRV_UNLOAD_FUNCTION 0x20130000 |
| 3990 | #define FW_MSG_CODE_DRV_UNLOAD_DONE 0x21100000 |
| 3991 | #define FW_MSG_CODE_INIT_PHY_DONE 0x21200000 |
| 3992 | #define FW_MSG_CODE_INIT_PHY_ERR_INVALID_ARGS 0x21300000 |
| 3993 | #define FW_MSG_CODE_LINK_RESET_DONE 0x23000000 |
| 3994 | #define FW_MSG_CODE_SET_LLDP_DONE 0x24000000 |
| 3995 | #define FW_MSG_CODE_SET_LLDP_UNSUPPORTED_AGENT 0x24010000 |
| 3996 | #define FW_MSG_CODE_SET_DCBX_DONE 0x25000000 |
| 3997 | #define FW_MSG_CODE_NIG_DRAIN_DONE 0x30000000 |
| 3998 | #define FW_MSG_CODE_VF_DISABLED_DONE 0xb0000000 |
| 3999 | #define FW_MSG_CODE_DRV_CFG_VF_MSIX_DONE 0xb0010000 |
| 4000 | #define FW_MSG_CODE_FLR_ACK 0x02000000 |
| 4001 | #define FW_MSG_CODE_FLR_NACK 0x02100000 |
| 4002 | |
| 4003 | #define FW_MSG_CODE_NVM_OK 0x00010000 |
| 4004 | #define FW_MSG_CODE_NVM_INVALID_MODE 0x00020000 |
| 4005 | #define FW_MSG_CODE_NVM_PREV_CMD_WAS_NOT_FINISHED 0x00030000 |
| 4006 | #define FW_MSG_CODE_NVM_FAILED_TO_ALLOCATE_PAGE 0x00040000 |
| 4007 | #define FW_MSG_CODE_NVM_INVALID_DIR_FOUND 0x00050000 |
| 4008 | #define FW_MSG_CODE_NVM_PAGE_NOT_FOUND 0x00060000 |
| 4009 | #define FW_MSG_CODE_NVM_FAILED_PARSING_BNDLE_HEADER 0x00070000 |
| 4010 | #define FW_MSG_CODE_NVM_FAILED_PARSING_IMAGE_HEADER 0x00080000 |
| 4011 | #define FW_MSG_CODE_NVM_PARSING_OUT_OF_SYNC 0x00090000 |
| 4012 | #define FW_MSG_CODE_NVM_FAILED_UPDATING_DIR 0x000a0000 |
| 4013 | #define FW_MSG_CODE_NVM_FAILED_TO_FREE_PAGE 0x000b0000 |
| 4014 | #define FW_MSG_CODE_NVM_FILE_NOT_FOUND 0x000c0000 |
| 4015 | #define FW_MSG_CODE_NVM_OPERATION_FAILED 0x000d0000 |
| 4016 | #define FW_MSG_CODE_NVM_FAILED_UNALIGNED 0x000e0000 |
| 4017 | #define FW_MSG_CODE_NVM_BAD_OFFSET 0x000f0000 |
| 4018 | #define FW_MSG_CODE_NVM_BAD_SIGNATURE 0x00100000 |
| 4019 | #define FW_MSG_CODE_NVM_FILE_READ_ONLY 0x00200000 |
| 4020 | #define FW_MSG_CODE_NVM_UNKNOWN_FILE 0x00300000 |
| 4021 | #define FW_MSG_CODE_NVM_PUT_FILE_FINISH_OK 0x00400000 |
| 4022 | #define FW_MSG_CODE_MCP_RESET_REJECT 0x00600000 |
| 4023 | #define FW_MSG_CODE_PHY_OK 0x00110000 |
| 4024 | #define FW_MSG_CODE_PHY_ERROR 0x00120000 |
| 4025 | #define FW_MSG_CODE_SET_SECURE_MODE_ERROR 0x00130000 |
| 4026 | #define FW_MSG_CODE_SET_SECURE_MODE_OK 0x00140000 |
| 4027 | #define FW_MSG_MODE_PHY_PRIVILEGE_ERROR 0x00150000 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4028 | #define FW_MSG_CODE_OK 0x00160000 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4029 | |
| 4030 | #define FW_MSG_SEQ_NUMBER_MASK 0x0000ffff |
| 4031 | |
| 4032 | u32 fw_mb_param; |
| 4033 | |
| 4034 | u32 drv_pulse_mb; |
| 4035 | #define DRV_PULSE_SEQ_MASK 0x00007fff |
| 4036 | #define DRV_PULSE_SYSTEM_TIME_MASK 0xffff0000 |
| 4037 | #define DRV_PULSE_ALWAYS_ALIVE 0x00008000 |
| 4038 | u32 mcp_pulse_mb; |
| 4039 | #define MCP_PULSE_SEQ_MASK 0x00007fff |
| 4040 | #define MCP_PULSE_ALWAYS_ALIVE 0x00008000 |
| 4041 | #define MCP_EVENT_MASK 0xffff0000 |
| 4042 | #define MCP_EVENT_OTHER_DRIVER_RESET_REQ 0x00010000 |
| 4043 | |
| 4044 | union drv_union_data union_data; |
| 4045 | }; |
| 4046 | |
| 4047 | /* MFW - DRV MB */ |
| 4048 | /********************************************************************** |
| 4049 | * Description |
| 4050 | * Incremental Aggregative |
| 4051 | * 8-bit MFW counter per message |
| 4052 | * 8-bit ack-counter per message |
| 4053 | * Capabilities |
| 4054 | * Provides up to 256 aggregative message per type |
| 4055 | * Provides 4 message types in dword |
| 4056 | * Message type pointers to byte offset |
| 4057 | * Backward Compatibility by using sizeof for the counters. |
| 4058 | * No lock requires for 32bit messages |
| 4059 | * Limitations: |
| 4060 | * In case of messages greater than 32bit, a dedicated mechanism(e.g lock) |
| 4061 | * is required to prevent data corruption. |
| 4062 | **********************************************************************/ |
| 4063 | enum MFW_DRV_MSG_TYPE { |
| 4064 | MFW_DRV_MSG_LINK_CHANGE, |
| 4065 | MFW_DRV_MSG_FLR_FW_ACK_FAILED, |
| 4066 | MFW_DRV_MSG_VF_DISABLED, |
| 4067 | MFW_DRV_MSG_LLDP_DATA_UPDATED, |
| 4068 | MFW_DRV_MSG_DCBX_REMOTE_MIB_UPDATED, |
| 4069 | MFW_DRV_MSG_DCBX_OPERATIONAL_MIB_UPDATED, |
| 4070 | MFW_DRV_MSG_ERROR_RECOVERY, |
Zvi Nachmani | 334c03b | 2016-03-09 09:16:25 +0200 | [diff] [blame] | 4071 | MFW_DRV_MSG_BW_UPDATE, |
| 4072 | MFW_DRV_MSG_S_TAG_UPDATE, |
| 4073 | MFW_DRV_MSG_GET_LAN_STATS, |
| 4074 | MFW_DRV_MSG_GET_FCOE_STATS, |
| 4075 | MFW_DRV_MSG_GET_ISCSI_STATS, |
| 4076 | MFW_DRV_MSG_GET_RDMA_STATS, |
| 4077 | MFW_DRV_MSG_FAILURE_DETECTED, |
| 4078 | MFW_DRV_MSG_TRANSCEIVER_STATE_CHANGE, |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4079 | MFW_DRV_MSG_MAX |
| 4080 | }; |
| 4081 | |
| 4082 | #define MFW_DRV_MSG_MAX_DWORDS(msgs) (((msgs - 1) >> 2) + 1) |
| 4083 | #define MFW_DRV_MSG_DWORD(msg_id) (msg_id >> 2) |
| 4084 | #define MFW_DRV_MSG_OFFSET(msg_id) ((msg_id & 0x3) << 3) |
| 4085 | #define MFW_DRV_MSG_MASK(msg_id) (0xff << MFW_DRV_MSG_OFFSET(msg_id)) |
| 4086 | |
| 4087 | struct public_mfw_mb { |
| 4088 | u32 sup_msgs; |
| 4089 | u32 msg[MFW_DRV_MSG_MAX_DWORDS(MFW_DRV_MSG_MAX)]; |
| 4090 | u32 ack[MFW_DRV_MSG_MAX_DWORDS(MFW_DRV_MSG_MAX)]; |
| 4091 | }; |
| 4092 | |
| 4093 | /**************************************/ |
| 4094 | /* */ |
| 4095 | /* P U B L I C D A T A */ |
| 4096 | /* */ |
| 4097 | /**************************************/ |
| 4098 | enum public_sections { |
| 4099 | PUBLIC_DRV_MB, /* Points to the first drv_mb of path0 */ |
| 4100 | PUBLIC_MFW_MB, /* Points to the first mfw_mb of path0 */ |
| 4101 | PUBLIC_GLOBAL, |
| 4102 | PUBLIC_PATH, |
| 4103 | PUBLIC_PORT, |
| 4104 | PUBLIC_FUNC, |
| 4105 | PUBLIC_MAX_SECTIONS |
| 4106 | }; |
| 4107 | |
| 4108 | struct drv_ver_info_stc { |
| 4109 | u32 ver; |
| 4110 | u8 name[32]; |
| 4111 | }; |
| 4112 | |
| 4113 | struct mcp_public_data { |
| 4114 | /* The sections fields is an array */ |
| 4115 | u32 num_sections; |
| 4116 | offsize_t sections[PUBLIC_MAX_SECTIONS]; |
| 4117 | struct public_drv_mb drv_mb[MCP_GLOB_FUNC_MAX]; |
| 4118 | struct public_mfw_mb mfw_mb[MCP_GLOB_FUNC_MAX]; |
| 4119 | struct public_global global; |
| 4120 | struct public_path path[MCP_GLOB_PATH_MAX]; |
| 4121 | struct public_port port[MCP_GLOB_PORT_MAX]; |
| 4122 | struct public_func func[MCP_GLOB_FUNC_MAX]; |
| 4123 | struct drv_ver_info_stc drv_info; |
| 4124 | }; |
| 4125 | |
| 4126 | struct nvm_cfg_mac_address { |
| 4127 | u32 mac_addr_hi; |
| 4128 | #define NVM_CFG_MAC_ADDRESS_HI_MASK 0x0000FFFF |
| 4129 | #define NVM_CFG_MAC_ADDRESS_HI_OFFSET 0 |
| 4130 | |
| 4131 | u32 mac_addr_lo; |
| 4132 | }; |
| 4133 | |
| 4134 | /****************************************** |
| 4135 | * nvm_cfg1 structs |
| 4136 | ******************************************/ |
| 4137 | |
| 4138 | struct nvm_cfg1_glob { |
| 4139 | u32 generic_cont0; /* 0x0 */ |
| 4140 | #define NVM_CFG1_GLOB_BOARD_SWAP_MASK 0x0000000F |
| 4141 | #define NVM_CFG1_GLOB_BOARD_SWAP_OFFSET 0 |
| 4142 | #define NVM_CFG1_GLOB_BOARD_SWAP_NONE 0x0 |
| 4143 | #define NVM_CFG1_GLOB_BOARD_SWAP_PATH 0x1 |
| 4144 | #define NVM_CFG1_GLOB_BOARD_SWAP_PORT 0x2 |
| 4145 | #define NVM_CFG1_GLOB_BOARD_SWAP_BOTH 0x3 |
| 4146 | #define NVM_CFG1_GLOB_MF_MODE_MASK 0x00000FF0 |
| 4147 | #define NVM_CFG1_GLOB_MF_MODE_OFFSET 4 |
| 4148 | #define NVM_CFG1_GLOB_MF_MODE_MF_ALLOWED 0x0 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4149 | #define NVM_CFG1_GLOB_MF_MODE_DEFAULT 0x1 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4150 | #define NVM_CFG1_GLOB_MF_MODE_SPIO4 0x2 |
| 4151 | #define NVM_CFG1_GLOB_MF_MODE_NPAR1_0 0x3 |
| 4152 | #define NVM_CFG1_GLOB_MF_MODE_NPAR1_5 0x4 |
| 4153 | #define NVM_CFG1_GLOB_MF_MODE_NPAR2_0 0x5 |
| 4154 | #define NVM_CFG1_GLOB_MF_MODE_BD 0x6 |
| 4155 | #define NVM_CFG1_GLOB_MF_MODE_UFP 0x7 |
| 4156 | #define NVM_CFG1_GLOB_FAN_FAILURE_ENFORCEMENT_MASK 0x00001000 |
| 4157 | #define NVM_CFG1_GLOB_FAN_FAILURE_ENFORCEMENT_OFFSET 12 |
| 4158 | #define NVM_CFG1_GLOB_FAN_FAILURE_ENFORCEMENT_DISABLED 0x0 |
| 4159 | #define NVM_CFG1_GLOB_FAN_FAILURE_ENFORCEMENT_ENABLED 0x1 |
| 4160 | #define NVM_CFG1_GLOB_AVS_MARGIN_LOW_MASK 0x001FE000 |
| 4161 | #define NVM_CFG1_GLOB_AVS_MARGIN_LOW_OFFSET 13 |
| 4162 | #define NVM_CFG1_GLOB_AVS_MARGIN_HIGH_MASK 0x1FE00000 |
| 4163 | #define NVM_CFG1_GLOB_AVS_MARGIN_HIGH_OFFSET 21 |
| 4164 | #define NVM_CFG1_GLOB_ENABLE_SRIOV_MASK 0x20000000 |
| 4165 | #define NVM_CFG1_GLOB_ENABLE_SRIOV_OFFSET 29 |
| 4166 | #define NVM_CFG1_GLOB_ENABLE_SRIOV_DISABLED 0x0 |
| 4167 | #define NVM_CFG1_GLOB_ENABLE_SRIOV_ENABLED 0x1 |
| 4168 | #define NVM_CFG1_GLOB_ENABLE_ATC_MASK 0x40000000 |
| 4169 | #define NVM_CFG1_GLOB_ENABLE_ATC_OFFSET 30 |
| 4170 | #define NVM_CFG1_GLOB_ENABLE_ATC_DISABLED 0x0 |
| 4171 | #define NVM_CFG1_GLOB_ENABLE_ATC_ENABLED 0x1 |
| 4172 | #define NVM_CFG1_GLOB_CLOCK_SLOWDOWN_MASK 0x80000000 |
| 4173 | #define NVM_CFG1_GLOB_CLOCK_SLOWDOWN_OFFSET 31 |
| 4174 | #define NVM_CFG1_GLOB_CLOCK_SLOWDOWN_DISABLED 0x0 |
| 4175 | #define NVM_CFG1_GLOB_CLOCK_SLOWDOWN_ENABLED 0x1 |
| 4176 | |
| 4177 | u32 engineering_change[3]; /* 0x4 */ |
| 4178 | |
| 4179 | u32 manufacturing_id; /* 0x10 */ |
| 4180 | |
| 4181 | u32 serial_number[4]; /* 0x14 */ |
| 4182 | |
| 4183 | u32 pcie_cfg; /* 0x24 */ |
| 4184 | #define NVM_CFG1_GLOB_PCI_GEN_MASK 0x00000003 |
| 4185 | #define NVM_CFG1_GLOB_PCI_GEN_OFFSET 0 |
| 4186 | #define NVM_CFG1_GLOB_PCI_GEN_PCI_GEN1 0x0 |
| 4187 | #define NVM_CFG1_GLOB_PCI_GEN_PCI_GEN2 0x1 |
| 4188 | #define NVM_CFG1_GLOB_PCI_GEN_PCI_GEN3 0x2 |
| 4189 | #define NVM_CFG1_GLOB_BEACON_WOL_ENABLED_MASK 0x00000004 |
| 4190 | #define NVM_CFG1_GLOB_BEACON_WOL_ENABLED_OFFSET 2 |
| 4191 | #define NVM_CFG1_GLOB_BEACON_WOL_ENABLED_DISABLED 0x0 |
| 4192 | #define NVM_CFG1_GLOB_BEACON_WOL_ENABLED_ENABLED 0x1 |
| 4193 | #define NVM_CFG1_GLOB_ASPM_SUPPORT_MASK 0x00000018 |
| 4194 | #define NVM_CFG1_GLOB_ASPM_SUPPORT_OFFSET 3 |
| 4195 | #define NVM_CFG1_GLOB_ASPM_SUPPORT_L0S_L1_ENABLED 0x0 |
| 4196 | #define NVM_CFG1_GLOB_ASPM_SUPPORT_L0S_DISABLED 0x1 |
| 4197 | #define NVM_CFG1_GLOB_ASPM_SUPPORT_L1_DISABLED 0x2 |
| 4198 | #define NVM_CFG1_GLOB_ASPM_SUPPORT_L0S_L1_DISABLED 0x3 |
| 4199 | #define NVM_CFG1_GLOB_PREVENT_PCIE_L1_MENTRY_MASK 0x00000020 |
| 4200 | #define NVM_CFG1_GLOB_PREVENT_PCIE_L1_MENTRY_OFFSET 5 |
| 4201 | #define NVM_CFG1_GLOB_PREVENT_PCIE_L1_MENTRY_DISABLED 0x0 |
| 4202 | #define NVM_CFG1_GLOB_PREVENT_PCIE_L1_MENTRY_ENABLED 0x1 |
| 4203 | #define NVM_CFG1_GLOB_PCIE_G2_TX_AMPLITUDE_MASK 0x000003C0 |
| 4204 | #define NVM_CFG1_GLOB_PCIE_G2_TX_AMPLITUDE_OFFSET 6 |
| 4205 | #define NVM_CFG1_GLOB_PCIE_PREEMPHASIS_MASK 0x00001C00 |
| 4206 | #define NVM_CFG1_GLOB_PCIE_PREEMPHASIS_OFFSET 10 |
| 4207 | #define NVM_CFG1_GLOB_PCIE_PREEMPHASIS_HW 0x0 |
| 4208 | #define NVM_CFG1_GLOB_PCIE_PREEMPHASIS_0DB 0x1 |
| 4209 | #define NVM_CFG1_GLOB_PCIE_PREEMPHASIS_3_5DB 0x2 |
| 4210 | #define NVM_CFG1_GLOB_PCIE_PREEMPHASIS_6_0DB 0x3 |
| 4211 | #define NVM_CFG1_GLOB_WWN_NODE_PREFIX0_MASK 0x001FE000 |
| 4212 | #define NVM_CFG1_GLOB_WWN_NODE_PREFIX0_OFFSET 13 |
| 4213 | #define NVM_CFG1_GLOB_WWN_NODE_PREFIX1_MASK 0x1FE00000 |
| 4214 | #define NVM_CFG1_GLOB_WWN_NODE_PREFIX1_OFFSET 21 |
| 4215 | #define NVM_CFG1_GLOB_NCSI_PACKAGE_ID_MASK 0x60000000 |
| 4216 | #define NVM_CFG1_GLOB_NCSI_PACKAGE_ID_OFFSET 29 |
| 4217 | |
| 4218 | u32 mgmt_traffic; /* 0x28 */ |
| 4219 | #define NVM_CFG1_GLOB_RESERVED60_MASK 0x00000001 |
| 4220 | #define NVM_CFG1_GLOB_RESERVED60_OFFSET 0 |
| 4221 | #define NVM_CFG1_GLOB_RESERVED60_100KHZ 0x0 |
| 4222 | #define NVM_CFG1_GLOB_RESERVED60_400KHZ 0x1 |
| 4223 | #define NVM_CFG1_GLOB_WWN_PORT_PREFIX0_MASK 0x000001FE |
| 4224 | #define NVM_CFG1_GLOB_WWN_PORT_PREFIX0_OFFSET 1 |
| 4225 | #define NVM_CFG1_GLOB_WWN_PORT_PREFIX1_MASK 0x0001FE00 |
| 4226 | #define NVM_CFG1_GLOB_WWN_PORT_PREFIX1_OFFSET 9 |
| 4227 | #define NVM_CFG1_GLOB_SMBUS_ADDRESS_MASK 0x01FE0000 |
| 4228 | #define NVM_CFG1_GLOB_SMBUS_ADDRESS_OFFSET 17 |
| 4229 | #define NVM_CFG1_GLOB_SIDEBAND_MODE_MASK 0x06000000 |
| 4230 | #define NVM_CFG1_GLOB_SIDEBAND_MODE_OFFSET 25 |
| 4231 | #define NVM_CFG1_GLOB_SIDEBAND_MODE_DISABLED 0x0 |
| 4232 | #define NVM_CFG1_GLOB_SIDEBAND_MODE_RMII 0x1 |
| 4233 | #define NVM_CFG1_GLOB_SIDEBAND_MODE_SGMII 0x2 |
| 4234 | |
| 4235 | u32 core_cfg; /* 0x2C */ |
| 4236 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_MASK 0x000000FF |
| 4237 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_OFFSET 0 |
| 4238 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_2X40G 0x0 |
| 4239 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_2X50G 0x1 |
| 4240 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_1X100G 0x2 |
| 4241 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_4X10G_F 0x3 |
| 4242 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_4X10G_E 0x4 |
| 4243 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_4X20G 0x5 |
| 4244 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_1X40G 0xB |
| 4245 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_2X25G 0xC |
| 4246 | #define NVM_CFG1_GLOB_NETWORK_PORT_MODE_DE_1X25G 0xD |
| 4247 | #define NVM_CFG1_GLOB_EAGLE_ENFORCE_TX_FIR_CFG_MASK 0x00000100 |
| 4248 | #define NVM_CFG1_GLOB_EAGLE_ENFORCE_TX_FIR_CFG_OFFSET 8 |
| 4249 | #define NVM_CFG1_GLOB_EAGLE_ENFORCE_TX_FIR_CFG_DISABLED 0x0 |
| 4250 | #define NVM_CFG1_GLOB_EAGLE_ENFORCE_TX_FIR_CFG_ENABLED 0x1 |
| 4251 | #define NVM_CFG1_GLOB_FALCON_ENFORCE_TX_FIR_CFG_MASK 0x00000200 |
| 4252 | #define NVM_CFG1_GLOB_FALCON_ENFORCE_TX_FIR_CFG_OFFSET 9 |
| 4253 | #define NVM_CFG1_GLOB_FALCON_ENFORCE_TX_FIR_CFG_DISABLED 0x0 |
| 4254 | #define NVM_CFG1_GLOB_FALCON_ENFORCE_TX_FIR_CFG_ENABLED 0x1 |
| 4255 | #define NVM_CFG1_GLOB_EAGLE_CORE_ADDR_MASK 0x0003FC00 |
| 4256 | #define NVM_CFG1_GLOB_EAGLE_CORE_ADDR_OFFSET 10 |
| 4257 | #define NVM_CFG1_GLOB_FALCON_CORE_ADDR_MASK 0x03FC0000 |
| 4258 | #define NVM_CFG1_GLOB_FALCON_CORE_ADDR_OFFSET 18 |
| 4259 | #define NVM_CFG1_GLOB_AVS_MODE_MASK 0x1C000000 |
| 4260 | #define NVM_CFG1_GLOB_AVS_MODE_OFFSET 26 |
| 4261 | #define NVM_CFG1_GLOB_AVS_MODE_CLOSE_LOOP 0x0 |
| 4262 | #define NVM_CFG1_GLOB_AVS_MODE_OPEN_LOOP 0x1 |
| 4263 | #define NVM_CFG1_GLOB_AVS_MODE_DISABLED 0x3 |
| 4264 | #define NVM_CFG1_GLOB_OVERRIDE_SECURE_MODE_MASK 0x60000000 |
| 4265 | #define NVM_CFG1_GLOB_OVERRIDE_SECURE_MODE_OFFSET 29 |
| 4266 | #define NVM_CFG1_GLOB_OVERRIDE_SECURE_MODE_DISABLED 0x0 |
| 4267 | #define NVM_CFG1_GLOB_OVERRIDE_SECURE_MODE_ENABLED 0x1 |
| 4268 | |
| 4269 | u32 e_lane_cfg1; /* 0x30 */ |
| 4270 | #define NVM_CFG1_GLOB_RX_LANE0_SWAP_MASK 0x0000000F |
| 4271 | #define NVM_CFG1_GLOB_RX_LANE0_SWAP_OFFSET 0 |
| 4272 | #define NVM_CFG1_GLOB_RX_LANE1_SWAP_MASK 0x000000F0 |
| 4273 | #define NVM_CFG1_GLOB_RX_LANE1_SWAP_OFFSET 4 |
| 4274 | #define NVM_CFG1_GLOB_RX_LANE2_SWAP_MASK 0x00000F00 |
| 4275 | #define NVM_CFG1_GLOB_RX_LANE2_SWAP_OFFSET 8 |
| 4276 | #define NVM_CFG1_GLOB_RX_LANE3_SWAP_MASK 0x0000F000 |
| 4277 | #define NVM_CFG1_GLOB_RX_LANE3_SWAP_OFFSET 12 |
| 4278 | #define NVM_CFG1_GLOB_TX_LANE0_SWAP_MASK 0x000F0000 |
| 4279 | #define NVM_CFG1_GLOB_TX_LANE0_SWAP_OFFSET 16 |
| 4280 | #define NVM_CFG1_GLOB_TX_LANE1_SWAP_MASK 0x00F00000 |
| 4281 | #define NVM_CFG1_GLOB_TX_LANE1_SWAP_OFFSET 20 |
| 4282 | #define NVM_CFG1_GLOB_TX_LANE2_SWAP_MASK 0x0F000000 |
| 4283 | #define NVM_CFG1_GLOB_TX_LANE2_SWAP_OFFSET 24 |
| 4284 | #define NVM_CFG1_GLOB_TX_LANE3_SWAP_MASK 0xF0000000 |
| 4285 | #define NVM_CFG1_GLOB_TX_LANE3_SWAP_OFFSET 28 |
| 4286 | |
| 4287 | u32 e_lane_cfg2; /* 0x34 */ |
| 4288 | #define NVM_CFG1_GLOB_RX_LANE0_POL_FLIP_MASK 0x00000001 |
| 4289 | #define NVM_CFG1_GLOB_RX_LANE0_POL_FLIP_OFFSET 0 |
| 4290 | #define NVM_CFG1_GLOB_RX_LANE1_POL_FLIP_MASK 0x00000002 |
| 4291 | #define NVM_CFG1_GLOB_RX_LANE1_POL_FLIP_OFFSET 1 |
| 4292 | #define NVM_CFG1_GLOB_RX_LANE2_POL_FLIP_MASK 0x00000004 |
| 4293 | #define NVM_CFG1_GLOB_RX_LANE2_POL_FLIP_OFFSET 2 |
| 4294 | #define NVM_CFG1_GLOB_RX_LANE3_POL_FLIP_MASK 0x00000008 |
| 4295 | #define NVM_CFG1_GLOB_RX_LANE3_POL_FLIP_OFFSET 3 |
| 4296 | #define NVM_CFG1_GLOB_TX_LANE0_POL_FLIP_MASK 0x00000010 |
| 4297 | #define NVM_CFG1_GLOB_TX_LANE0_POL_FLIP_OFFSET 4 |
| 4298 | #define NVM_CFG1_GLOB_TX_LANE1_POL_FLIP_MASK 0x00000020 |
| 4299 | #define NVM_CFG1_GLOB_TX_LANE1_POL_FLIP_OFFSET 5 |
| 4300 | #define NVM_CFG1_GLOB_TX_LANE2_POL_FLIP_MASK 0x00000040 |
| 4301 | #define NVM_CFG1_GLOB_TX_LANE2_POL_FLIP_OFFSET 6 |
| 4302 | #define NVM_CFG1_GLOB_TX_LANE3_POL_FLIP_MASK 0x00000080 |
| 4303 | #define NVM_CFG1_GLOB_TX_LANE3_POL_FLIP_OFFSET 7 |
| 4304 | #define NVM_CFG1_GLOB_SMBUS_MODE_MASK 0x00000F00 |
| 4305 | #define NVM_CFG1_GLOB_SMBUS_MODE_OFFSET 8 |
| 4306 | #define NVM_CFG1_GLOB_SMBUS_MODE_DISABLED 0x0 |
| 4307 | #define NVM_CFG1_GLOB_SMBUS_MODE_100KHZ 0x1 |
| 4308 | #define NVM_CFG1_GLOB_SMBUS_MODE_400KHZ 0x2 |
| 4309 | #define NVM_CFG1_GLOB_NCSI_MASK 0x0000F000 |
| 4310 | #define NVM_CFG1_GLOB_NCSI_OFFSET 12 |
| 4311 | #define NVM_CFG1_GLOB_NCSI_DISABLED 0x0 |
| 4312 | #define NVM_CFG1_GLOB_NCSI_ENABLED 0x1 |
| 4313 | |
| 4314 | u32 f_lane_cfg1; /* 0x38 */ |
| 4315 | #define NVM_CFG1_GLOB_RX_LANE0_SWAP_MASK 0x0000000F |
| 4316 | #define NVM_CFG1_GLOB_RX_LANE0_SWAP_OFFSET 0 |
| 4317 | #define NVM_CFG1_GLOB_RX_LANE1_SWAP_MASK 0x000000F0 |
| 4318 | #define NVM_CFG1_GLOB_RX_LANE1_SWAP_OFFSET 4 |
| 4319 | #define NVM_CFG1_GLOB_RX_LANE2_SWAP_MASK 0x00000F00 |
| 4320 | #define NVM_CFG1_GLOB_RX_LANE2_SWAP_OFFSET 8 |
| 4321 | #define NVM_CFG1_GLOB_RX_LANE3_SWAP_MASK 0x0000F000 |
| 4322 | #define NVM_CFG1_GLOB_RX_LANE3_SWAP_OFFSET 12 |
| 4323 | #define NVM_CFG1_GLOB_TX_LANE0_SWAP_MASK 0x000F0000 |
| 4324 | #define NVM_CFG1_GLOB_TX_LANE0_SWAP_OFFSET 16 |
| 4325 | #define NVM_CFG1_GLOB_TX_LANE1_SWAP_MASK 0x00F00000 |
| 4326 | #define NVM_CFG1_GLOB_TX_LANE1_SWAP_OFFSET 20 |
| 4327 | #define NVM_CFG1_GLOB_TX_LANE2_SWAP_MASK 0x0F000000 |
| 4328 | #define NVM_CFG1_GLOB_TX_LANE2_SWAP_OFFSET 24 |
| 4329 | #define NVM_CFG1_GLOB_TX_LANE3_SWAP_MASK 0xF0000000 |
| 4330 | #define NVM_CFG1_GLOB_TX_LANE3_SWAP_OFFSET 28 |
| 4331 | |
| 4332 | u32 f_lane_cfg2; /* 0x3C */ |
| 4333 | #define NVM_CFG1_GLOB_RX_LANE0_POL_FLIP_MASK 0x00000001 |
| 4334 | #define NVM_CFG1_GLOB_RX_LANE0_POL_FLIP_OFFSET 0 |
| 4335 | #define NVM_CFG1_GLOB_RX_LANE1_POL_FLIP_MASK 0x00000002 |
| 4336 | #define NVM_CFG1_GLOB_RX_LANE1_POL_FLIP_OFFSET 1 |
| 4337 | #define NVM_CFG1_GLOB_RX_LANE2_POL_FLIP_MASK 0x00000004 |
| 4338 | #define NVM_CFG1_GLOB_RX_LANE2_POL_FLIP_OFFSET 2 |
| 4339 | #define NVM_CFG1_GLOB_RX_LANE3_POL_FLIP_MASK 0x00000008 |
| 4340 | #define NVM_CFG1_GLOB_RX_LANE3_POL_FLIP_OFFSET 3 |
| 4341 | #define NVM_CFG1_GLOB_TX_LANE0_POL_FLIP_MASK 0x00000010 |
| 4342 | #define NVM_CFG1_GLOB_TX_LANE0_POL_FLIP_OFFSET 4 |
| 4343 | #define NVM_CFG1_GLOB_TX_LANE1_POL_FLIP_MASK 0x00000020 |
| 4344 | #define NVM_CFG1_GLOB_TX_LANE1_POL_FLIP_OFFSET 5 |
| 4345 | #define NVM_CFG1_GLOB_TX_LANE2_POL_FLIP_MASK 0x00000040 |
| 4346 | #define NVM_CFG1_GLOB_TX_LANE2_POL_FLIP_OFFSET 6 |
| 4347 | #define NVM_CFG1_GLOB_TX_LANE3_POL_FLIP_MASK 0x00000080 |
| 4348 | #define NVM_CFG1_GLOB_TX_LANE3_POL_FLIP_OFFSET 7 |
| 4349 | |
| 4350 | u32 eagle_preemphasis; /* 0x40 */ |
| 4351 | #define NVM_CFG1_GLOB_LANE0_PREEMP_MASK 0x000000FF |
| 4352 | #define NVM_CFG1_GLOB_LANE0_PREEMP_OFFSET 0 |
| 4353 | #define NVM_CFG1_GLOB_LANE1_PREEMP_MASK 0x0000FF00 |
| 4354 | #define NVM_CFG1_GLOB_LANE1_PREEMP_OFFSET 8 |
| 4355 | #define NVM_CFG1_GLOB_LANE2_PREEMP_MASK 0x00FF0000 |
| 4356 | #define NVM_CFG1_GLOB_LANE2_PREEMP_OFFSET 16 |
| 4357 | #define NVM_CFG1_GLOB_LANE3_PREEMP_MASK 0xFF000000 |
| 4358 | #define NVM_CFG1_GLOB_LANE3_PREEMP_OFFSET 24 |
| 4359 | |
| 4360 | u32 eagle_driver_current; /* 0x44 */ |
| 4361 | #define NVM_CFG1_GLOB_LANE0_AMP_MASK 0x000000FF |
| 4362 | #define NVM_CFG1_GLOB_LANE0_AMP_OFFSET 0 |
| 4363 | #define NVM_CFG1_GLOB_LANE1_AMP_MASK 0x0000FF00 |
| 4364 | #define NVM_CFG1_GLOB_LANE1_AMP_OFFSET 8 |
| 4365 | #define NVM_CFG1_GLOB_LANE2_AMP_MASK 0x00FF0000 |
| 4366 | #define NVM_CFG1_GLOB_LANE2_AMP_OFFSET 16 |
| 4367 | #define NVM_CFG1_GLOB_LANE3_AMP_MASK 0xFF000000 |
| 4368 | #define NVM_CFG1_GLOB_LANE3_AMP_OFFSET 24 |
| 4369 | |
| 4370 | u32 falcon_preemphasis; /* 0x48 */ |
| 4371 | #define NVM_CFG1_GLOB_LANE0_PREEMP_MASK 0x000000FF |
| 4372 | #define NVM_CFG1_GLOB_LANE0_PREEMP_OFFSET 0 |
| 4373 | #define NVM_CFG1_GLOB_LANE1_PREEMP_MASK 0x0000FF00 |
| 4374 | #define NVM_CFG1_GLOB_LANE1_PREEMP_OFFSET 8 |
| 4375 | #define NVM_CFG1_GLOB_LANE2_PREEMP_MASK 0x00FF0000 |
| 4376 | #define NVM_CFG1_GLOB_LANE2_PREEMP_OFFSET 16 |
| 4377 | #define NVM_CFG1_GLOB_LANE3_PREEMP_MASK 0xFF000000 |
| 4378 | #define NVM_CFG1_GLOB_LANE3_PREEMP_OFFSET 24 |
| 4379 | |
| 4380 | u32 falcon_driver_current; /* 0x4C */ |
| 4381 | #define NVM_CFG1_GLOB_LANE0_AMP_MASK 0x000000FF |
| 4382 | #define NVM_CFG1_GLOB_LANE0_AMP_OFFSET 0 |
| 4383 | #define NVM_CFG1_GLOB_LANE1_AMP_MASK 0x0000FF00 |
| 4384 | #define NVM_CFG1_GLOB_LANE1_AMP_OFFSET 8 |
| 4385 | #define NVM_CFG1_GLOB_LANE2_AMP_MASK 0x00FF0000 |
| 4386 | #define NVM_CFG1_GLOB_LANE2_AMP_OFFSET 16 |
| 4387 | #define NVM_CFG1_GLOB_LANE3_AMP_MASK 0xFF000000 |
| 4388 | #define NVM_CFG1_GLOB_LANE3_AMP_OFFSET 24 |
| 4389 | |
| 4390 | u32 pci_id; /* 0x50 */ |
| 4391 | #define NVM_CFG1_GLOB_VENDOR_ID_MASK 0x0000FFFF |
| 4392 | #define NVM_CFG1_GLOB_VENDOR_ID_OFFSET 0 |
| 4393 | |
| 4394 | u32 pci_subsys_id; /* 0x54 */ |
| 4395 | #define NVM_CFG1_GLOB_SUBSYSTEM_VENDOR_ID_MASK 0x0000FFFF |
| 4396 | #define NVM_CFG1_GLOB_SUBSYSTEM_VENDOR_ID_OFFSET 0 |
| 4397 | #define NVM_CFG1_GLOB_SUBSYSTEM_DEVICE_ID_MASK 0xFFFF0000 |
| 4398 | #define NVM_CFG1_GLOB_SUBSYSTEM_DEVICE_ID_OFFSET 16 |
| 4399 | |
| 4400 | u32 bar; /* 0x58 */ |
| 4401 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_MASK 0x0000000F |
| 4402 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_OFFSET 0 |
| 4403 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_DISABLED 0x0 |
| 4404 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_2K 0x1 |
| 4405 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_4K 0x2 |
| 4406 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_8K 0x3 |
| 4407 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_16K 0x4 |
| 4408 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_32K 0x5 |
| 4409 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_64K 0x6 |
| 4410 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_128K 0x7 |
| 4411 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_256K 0x8 |
| 4412 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_512K 0x9 |
| 4413 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_1M 0xA |
| 4414 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_2M 0xB |
| 4415 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_4M 0xC |
| 4416 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_8M 0xD |
| 4417 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_16M 0xE |
| 4418 | #define NVM_CFG1_GLOB_EXPANSION_ROM_SIZE_32M 0xF |
| 4419 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_MASK 0x000000F0 |
| 4420 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_OFFSET 4 |
| 4421 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_DISABLED 0x0 |
| 4422 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_4K 0x1 |
| 4423 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_8K 0x2 |
| 4424 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_16K 0x3 |
| 4425 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_32K 0x4 |
| 4426 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_64K 0x5 |
| 4427 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_128K 0x6 |
| 4428 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_256K 0x7 |
| 4429 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_512K 0x8 |
| 4430 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_1M 0x9 |
| 4431 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_2M 0xA |
| 4432 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_4M 0xB |
| 4433 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_8M 0xC |
| 4434 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_16M 0xD |
| 4435 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_32M 0xE |
| 4436 | #define NVM_CFG1_GLOB_VF_PCI_BAR2_SIZE_64M 0xF |
| 4437 | #define NVM_CFG1_GLOB_BAR2_SIZE_MASK 0x00000F00 |
| 4438 | #define NVM_CFG1_GLOB_BAR2_SIZE_OFFSET 8 |
| 4439 | #define NVM_CFG1_GLOB_BAR2_SIZE_DISABLED 0x0 |
| 4440 | #define NVM_CFG1_GLOB_BAR2_SIZE_64K 0x1 |
| 4441 | #define NVM_CFG1_GLOB_BAR2_SIZE_128K 0x2 |
| 4442 | #define NVM_CFG1_GLOB_BAR2_SIZE_256K 0x3 |
| 4443 | #define NVM_CFG1_GLOB_BAR2_SIZE_512K 0x4 |
| 4444 | #define NVM_CFG1_GLOB_BAR2_SIZE_1M 0x5 |
| 4445 | #define NVM_CFG1_GLOB_BAR2_SIZE_2M 0x6 |
| 4446 | #define NVM_CFG1_GLOB_BAR2_SIZE_4M 0x7 |
| 4447 | #define NVM_CFG1_GLOB_BAR2_SIZE_8M 0x8 |
| 4448 | #define NVM_CFG1_GLOB_BAR2_SIZE_16M 0x9 |
| 4449 | #define NVM_CFG1_GLOB_BAR2_SIZE_32M 0xA |
| 4450 | #define NVM_CFG1_GLOB_BAR2_SIZE_64M 0xB |
| 4451 | #define NVM_CFG1_GLOB_BAR2_SIZE_128M 0xC |
| 4452 | #define NVM_CFG1_GLOB_BAR2_SIZE_256M 0xD |
| 4453 | #define NVM_CFG1_GLOB_BAR2_SIZE_512M 0xE |
| 4454 | #define NVM_CFG1_GLOB_BAR2_SIZE_1G 0xF |
| 4455 | |
| 4456 | u32 eagle_txfir_main; /* 0x5C */ |
| 4457 | #define NVM_CFG1_GLOB_LANE0_TXFIR_MAIN_MASK 0x000000FF |
| 4458 | #define NVM_CFG1_GLOB_LANE0_TXFIR_MAIN_OFFSET 0 |
| 4459 | #define NVM_CFG1_GLOB_LANE1_TXFIR_MAIN_MASK 0x0000FF00 |
| 4460 | #define NVM_CFG1_GLOB_LANE1_TXFIR_MAIN_OFFSET 8 |
| 4461 | #define NVM_CFG1_GLOB_LANE2_TXFIR_MAIN_MASK 0x00FF0000 |
| 4462 | #define NVM_CFG1_GLOB_LANE2_TXFIR_MAIN_OFFSET 16 |
| 4463 | #define NVM_CFG1_GLOB_LANE3_TXFIR_MAIN_MASK 0xFF000000 |
| 4464 | #define NVM_CFG1_GLOB_LANE3_TXFIR_MAIN_OFFSET 24 |
| 4465 | |
| 4466 | u32 eagle_txfir_post; /* 0x60 */ |
| 4467 | #define NVM_CFG1_GLOB_LANE0_TXFIR_POST_MASK 0x000000FF |
| 4468 | #define NVM_CFG1_GLOB_LANE0_TXFIR_POST_OFFSET 0 |
| 4469 | #define NVM_CFG1_GLOB_LANE1_TXFIR_POST_MASK 0x0000FF00 |
| 4470 | #define NVM_CFG1_GLOB_LANE1_TXFIR_POST_OFFSET 8 |
| 4471 | #define NVM_CFG1_GLOB_LANE2_TXFIR_POST_MASK 0x00FF0000 |
| 4472 | #define NVM_CFG1_GLOB_LANE2_TXFIR_POST_OFFSET 16 |
| 4473 | #define NVM_CFG1_GLOB_LANE3_TXFIR_POST_MASK 0xFF000000 |
| 4474 | #define NVM_CFG1_GLOB_LANE3_TXFIR_POST_OFFSET 24 |
| 4475 | |
| 4476 | u32 falcon_txfir_main; /* 0x64 */ |
| 4477 | #define NVM_CFG1_GLOB_LANE0_TXFIR_MAIN_MASK 0x000000FF |
| 4478 | #define NVM_CFG1_GLOB_LANE0_TXFIR_MAIN_OFFSET 0 |
| 4479 | #define NVM_CFG1_GLOB_LANE1_TXFIR_MAIN_MASK 0x0000FF00 |
| 4480 | #define NVM_CFG1_GLOB_LANE1_TXFIR_MAIN_OFFSET 8 |
| 4481 | #define NVM_CFG1_GLOB_LANE2_TXFIR_MAIN_MASK 0x00FF0000 |
| 4482 | #define NVM_CFG1_GLOB_LANE2_TXFIR_MAIN_OFFSET 16 |
| 4483 | #define NVM_CFG1_GLOB_LANE3_TXFIR_MAIN_MASK 0xFF000000 |
| 4484 | #define NVM_CFG1_GLOB_LANE3_TXFIR_MAIN_OFFSET 24 |
| 4485 | |
| 4486 | u32 falcon_txfir_post; /* 0x68 */ |
| 4487 | #define NVM_CFG1_GLOB_LANE0_TXFIR_POST_MASK 0x000000FF |
| 4488 | #define NVM_CFG1_GLOB_LANE0_TXFIR_POST_OFFSET 0 |
| 4489 | #define NVM_CFG1_GLOB_LANE1_TXFIR_POST_MASK 0x0000FF00 |
| 4490 | #define NVM_CFG1_GLOB_LANE1_TXFIR_POST_OFFSET 8 |
| 4491 | #define NVM_CFG1_GLOB_LANE2_TXFIR_POST_MASK 0x00FF0000 |
| 4492 | #define NVM_CFG1_GLOB_LANE2_TXFIR_POST_OFFSET 16 |
| 4493 | #define NVM_CFG1_GLOB_LANE3_TXFIR_POST_MASK 0xFF000000 |
| 4494 | #define NVM_CFG1_GLOB_LANE3_TXFIR_POST_OFFSET 24 |
| 4495 | |
| 4496 | u32 manufacture_ver; /* 0x6C */ |
| 4497 | #define NVM_CFG1_GLOB_MANUF0_VER_MASK 0x0000003F |
| 4498 | #define NVM_CFG1_GLOB_MANUF0_VER_OFFSET 0 |
| 4499 | #define NVM_CFG1_GLOB_MANUF1_VER_MASK 0x00000FC0 |
| 4500 | #define NVM_CFG1_GLOB_MANUF1_VER_OFFSET 6 |
| 4501 | #define NVM_CFG1_GLOB_MANUF2_VER_MASK 0x0003F000 |
| 4502 | #define NVM_CFG1_GLOB_MANUF2_VER_OFFSET 12 |
| 4503 | #define NVM_CFG1_GLOB_MANUF3_VER_MASK 0x00FC0000 |
| 4504 | #define NVM_CFG1_GLOB_MANUF3_VER_OFFSET 18 |
| 4505 | #define NVM_CFG1_GLOB_MANUF4_VER_MASK 0x3F000000 |
| 4506 | #define NVM_CFG1_GLOB_MANUF4_VER_OFFSET 24 |
| 4507 | |
| 4508 | u32 manufacture_time; /* 0x70 */ |
| 4509 | #define NVM_CFG1_GLOB_MANUF0_TIME_MASK 0x0000003F |
| 4510 | #define NVM_CFG1_GLOB_MANUF0_TIME_OFFSET 0 |
| 4511 | #define NVM_CFG1_GLOB_MANUF1_TIME_MASK 0x00000FC0 |
| 4512 | #define NVM_CFG1_GLOB_MANUF1_TIME_OFFSET 6 |
| 4513 | #define NVM_CFG1_GLOB_MANUF2_TIME_MASK 0x0003F000 |
| 4514 | #define NVM_CFG1_GLOB_MANUF2_TIME_OFFSET 12 |
| 4515 | |
| 4516 | u32 led_global_settings; /* 0x74 */ |
| 4517 | #define NVM_CFG1_GLOB_LED_SWAP_0_MASK 0x0000000F |
| 4518 | #define NVM_CFG1_GLOB_LED_SWAP_0_OFFSET 0 |
| 4519 | #define NVM_CFG1_GLOB_LED_SWAP_1_MASK 0x000000F0 |
| 4520 | #define NVM_CFG1_GLOB_LED_SWAP_1_OFFSET 4 |
| 4521 | #define NVM_CFG1_GLOB_LED_SWAP_2_MASK 0x00000F00 |
| 4522 | #define NVM_CFG1_GLOB_LED_SWAP_2_OFFSET 8 |
| 4523 | #define NVM_CFG1_GLOB_LED_SWAP_3_MASK 0x0000F000 |
| 4524 | #define NVM_CFG1_GLOB_LED_SWAP_3_OFFSET 12 |
| 4525 | |
| 4526 | u32 generic_cont1; /* 0x78 */ |
| 4527 | #define NVM_CFG1_GLOB_AVS_DAC_CODE_MASK 0x000003FF |
| 4528 | #define NVM_CFG1_GLOB_AVS_DAC_CODE_OFFSET 0 |
| 4529 | |
| 4530 | u32 mbi_version; /* 0x7C */ |
| 4531 | #define NVM_CFG1_GLOB_MBI_VERSION_0_MASK 0x000000FF |
| 4532 | #define NVM_CFG1_GLOB_MBI_VERSION_0_OFFSET 0 |
| 4533 | #define NVM_CFG1_GLOB_MBI_VERSION_1_MASK 0x0000FF00 |
| 4534 | #define NVM_CFG1_GLOB_MBI_VERSION_1_OFFSET 8 |
| 4535 | #define NVM_CFG1_GLOB_MBI_VERSION_2_MASK 0x00FF0000 |
| 4536 | #define NVM_CFG1_GLOB_MBI_VERSION_2_OFFSET 16 |
| 4537 | |
| 4538 | u32 mbi_date; /* 0x80 */ |
| 4539 | |
| 4540 | u32 misc_sig; /* 0x84 */ |
| 4541 | |
| 4542 | /* Define the GPIO mapping to switch i2c mux */ |
| 4543 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO_0_MASK 0x000000FF |
| 4544 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO_0_OFFSET 0 |
| 4545 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO_1_MASK 0x0000FF00 |
| 4546 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO_1_OFFSET 8 |
| 4547 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__NA 0x0 |
| 4548 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO0 0x1 |
| 4549 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO1 0x2 |
| 4550 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO2 0x3 |
| 4551 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO3 0x4 |
| 4552 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO4 0x5 |
| 4553 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO5 0x6 |
| 4554 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO6 0x7 |
| 4555 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO7 0x8 |
| 4556 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO8 0x9 |
| 4557 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO9 0xA |
| 4558 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO10 0xB |
| 4559 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO11 0xC |
| 4560 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO12 0xD |
| 4561 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO13 0xE |
| 4562 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO14 0xF |
| 4563 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO15 0x10 |
| 4564 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO16 0x11 |
| 4565 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO17 0x12 |
| 4566 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO18 0x13 |
| 4567 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO19 0x14 |
| 4568 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO20 0x15 |
| 4569 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO21 0x16 |
| 4570 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO22 0x17 |
| 4571 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO23 0x18 |
| 4572 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO24 0x19 |
| 4573 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO25 0x1A |
| 4574 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO26 0x1B |
| 4575 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO27 0x1C |
| 4576 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO28 0x1D |
| 4577 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO29 0x1E |
| 4578 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO30 0x1F |
| 4579 | #define NVM_CFG1_GLOB_I2C_MUX_SEL_GPIO__GPIO31 0x20 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4580 | u32 device_capabilities; /* 0x88 */ |
| 4581 | #define NVM_CFG1_GLOB_DEVICE_CAPABILITIES_ETHERNET 0x1 |
| 4582 | u32 power_dissipated; /* 0x8C */ |
| 4583 | u32 power_consumed; /* 0x90 */ |
| 4584 | u32 efi_version; /* 0x94 */ |
| 4585 | u32 reserved[42]; /* 0x98 */ |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4586 | }; |
| 4587 | |
| 4588 | struct nvm_cfg1_path { |
| 4589 | u32 reserved[30]; /* 0x0 */ |
| 4590 | }; |
| 4591 | |
| 4592 | struct nvm_cfg1_port { |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4593 | u32 reserved__m_relocated_to_option_123; /* 0x0 */ |
| 4594 | u32 reserved__m_relocated_to_option_124; /* 0x4 */ |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4595 | u32 generic_cont0; /* 0x8 */ |
| 4596 | #define NVM_CFG1_PORT_LED_MODE_MASK 0x000000FF |
| 4597 | #define NVM_CFG1_PORT_LED_MODE_OFFSET 0 |
| 4598 | #define NVM_CFG1_PORT_LED_MODE_MAC1 0x0 |
| 4599 | #define NVM_CFG1_PORT_LED_MODE_PHY1 0x1 |
| 4600 | #define NVM_CFG1_PORT_LED_MODE_PHY2 0x2 |
| 4601 | #define NVM_CFG1_PORT_LED_MODE_PHY3 0x3 |
| 4602 | #define NVM_CFG1_PORT_LED_MODE_MAC2 0x4 |
| 4603 | #define NVM_CFG1_PORT_LED_MODE_PHY4 0x5 |
| 4604 | #define NVM_CFG1_PORT_LED_MODE_PHY5 0x6 |
| 4605 | #define NVM_CFG1_PORT_LED_MODE_PHY6 0x7 |
| 4606 | #define NVM_CFG1_PORT_LED_MODE_MAC3 0x8 |
| 4607 | #define NVM_CFG1_PORT_LED_MODE_PHY7 0x9 |
| 4608 | #define NVM_CFG1_PORT_LED_MODE_PHY8 0xA |
| 4609 | #define NVM_CFG1_PORT_LED_MODE_PHY9 0xB |
| 4610 | #define NVM_CFG1_PORT_LED_MODE_MAC4 0xC |
| 4611 | #define NVM_CFG1_PORT_LED_MODE_PHY10 0xD |
| 4612 | #define NVM_CFG1_PORT_LED_MODE_PHY11 0xE |
| 4613 | #define NVM_CFG1_PORT_LED_MODE_PHY12 0xF |
| 4614 | #define NVM_CFG1_PORT_ROCE_PRIORITY_MASK 0x0000FF00 |
| 4615 | #define NVM_CFG1_PORT_ROCE_PRIORITY_OFFSET 8 |
| 4616 | #define NVM_CFG1_PORT_DCBX_MODE_MASK 0x000F0000 |
| 4617 | #define NVM_CFG1_PORT_DCBX_MODE_OFFSET 16 |
| 4618 | #define NVM_CFG1_PORT_DCBX_MODE_DISABLED 0x0 |
| 4619 | #define NVM_CFG1_PORT_DCBX_MODE_IEEE 0x1 |
| 4620 | #define NVM_CFG1_PORT_DCBX_MODE_CEE 0x2 |
| 4621 | #define NVM_CFG1_PORT_DCBX_MODE_DYNAMIC 0x3 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4622 | #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_MASK 0x00F00000 |
| 4623 | #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_OFFSET 20 |
| 4624 | #define NVM_CFG1_PORT_DEFAULT_ENABLED_PROTOCOLS_ETHERNET 0x1 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4625 | u32 pcie_cfg; /* 0xC */ |
| 4626 | #define NVM_CFG1_PORT_RESERVED15_MASK 0x00000007 |
| 4627 | #define NVM_CFG1_PORT_RESERVED15_OFFSET 0 |
| 4628 | |
| 4629 | u32 features; /* 0x10 */ |
| 4630 | #define NVM_CFG1_PORT_ENABLE_WOL_ON_ACPI_PATTERN_MASK 0x00000001 |
| 4631 | #define NVM_CFG1_PORT_ENABLE_WOL_ON_ACPI_PATTERN_OFFSET 0 |
| 4632 | #define NVM_CFG1_PORT_ENABLE_WOL_ON_ACPI_PATTERN_DISABLED 0x0 |
| 4633 | #define NVM_CFG1_PORT_ENABLE_WOL_ON_ACPI_PATTERN_ENABLED 0x1 |
| 4634 | #define NVM_CFG1_PORT_MAGIC_PACKET_WOL_MASK 0x00000002 |
| 4635 | #define NVM_CFG1_PORT_MAGIC_PACKET_WOL_OFFSET 1 |
| 4636 | #define NVM_CFG1_PORT_MAGIC_PACKET_WOL_DISABLED 0x0 |
| 4637 | #define NVM_CFG1_PORT_MAGIC_PACKET_WOL_ENABLED 0x1 |
| 4638 | |
| 4639 | u32 speed_cap_mask; /* 0x14 */ |
| 4640 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_MASK 0x0000FFFF |
| 4641 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_OFFSET 0 |
| 4642 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_1G 0x1 |
| 4643 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_10G 0x2 |
| 4644 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_25G 0x8 |
| 4645 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_40G 0x10 |
| 4646 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_50G 0x20 |
| 4647 | #define NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_100G 0x40 |
| 4648 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_MASK 0xFFFF0000 |
| 4649 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_OFFSET 16 |
| 4650 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_1G 0x1 |
| 4651 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_10G 0x2 |
| 4652 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_25G 0x8 |
| 4653 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_40G 0x10 |
| 4654 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_50G 0x20 |
| 4655 | #define NVM_CFG1_PORT_MFW_SPEED_CAPABILITY_MASK_100G 0x40 |
| 4656 | |
| 4657 | u32 link_settings; /* 0x18 */ |
| 4658 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_MASK 0x0000000F |
| 4659 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_OFFSET 0 |
| 4660 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_AUTONEG 0x0 |
| 4661 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_1G 0x1 |
| 4662 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_10G 0x2 |
| 4663 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_25G 0x4 |
| 4664 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_40G 0x5 |
| 4665 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_50G 0x6 |
| 4666 | #define NVM_CFG1_PORT_DRV_LINK_SPEED_100G 0x7 |
| 4667 | #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_MASK 0x00000070 |
| 4668 | #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_OFFSET 4 |
| 4669 | #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_AUTONEG 0x1 |
| 4670 | #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_RX 0x2 |
| 4671 | #define NVM_CFG1_PORT_DRV_FLOW_CONTROL_TX 0x4 |
| 4672 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_MASK 0x00000780 |
| 4673 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_OFFSET 7 |
| 4674 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_AUTONEG 0x0 |
| 4675 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_1G 0x1 |
| 4676 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_10G 0x2 |
| 4677 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_25G 0x4 |
| 4678 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_40G 0x5 |
| 4679 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_50G 0x6 |
| 4680 | #define NVM_CFG1_PORT_MFW_LINK_SPEED_100G 0x7 |
| 4681 | #define NVM_CFG1_PORT_MFW_FLOW_CONTROL_MASK 0x00003800 |
| 4682 | #define NVM_CFG1_PORT_MFW_FLOW_CONTROL_OFFSET 11 |
| 4683 | #define NVM_CFG1_PORT_MFW_FLOW_CONTROL_AUTONEG 0x1 |
| 4684 | #define NVM_CFG1_PORT_MFW_FLOW_CONTROL_RX 0x2 |
| 4685 | #define NVM_CFG1_PORT_MFW_FLOW_CONTROL_TX 0x4 |
| 4686 | #define NVM_CFG1_PORT_OPTIC_MODULE_VENDOR_ENFORCEMENT_MASK 0x00004000 |
| 4687 | #define NVM_CFG1_PORT_OPTIC_MODULE_VENDOR_ENFORCEMENT_OFFSET 14 |
| 4688 | #define NVM_CFG1_PORT_OPTIC_MODULE_VENDOR_ENFORCEMENT_DISABLED 0x0 |
| 4689 | #define NVM_CFG1_PORT_OPTIC_MODULE_VENDOR_ENFORCEMENT_ENABLED 0x1 |
| 4690 | |
| 4691 | u32 phy_cfg; /* 0x1C */ |
| 4692 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_MASK 0x0000FFFF |
| 4693 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_OFFSET 0 |
| 4694 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_HIGIG 0x1 |
| 4695 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_SCRAMBLER 0x2 |
| 4696 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_FIBER 0x4 |
| 4697 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_DISABLE_CL72_AN 0x8 |
| 4698 | #define NVM_CFG1_PORT_OPTIONAL_LINK_MODES_DISABLE_FEC_AN 0x10 |
| 4699 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_MASK 0x00FF0000 |
| 4700 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_OFFSET 16 |
| 4701 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_BYPASS 0x0 |
| 4702 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_KR 0x2 |
| 4703 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_KR2 0x3 |
| 4704 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_KR4 0x4 |
| 4705 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_XFI 0x8 |
| 4706 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_SFI 0x9 |
| 4707 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_1000X 0xB |
| 4708 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_SGMII 0xC |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4709 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_XLAUI 0x11 |
| 4710 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_XLPPI 0x12 |
| 4711 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_CAUI 0x21 |
| 4712 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_CPPI 0x22 |
| 4713 | #define NVM_CFG1_PORT_SERDES_NET_INTERFACE_25GAUI 0x31 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4714 | #define NVM_CFG1_PORT_AN_MODE_MASK 0xFF000000 |
| 4715 | #define NVM_CFG1_PORT_AN_MODE_OFFSET 24 |
| 4716 | #define NVM_CFG1_PORT_AN_MODE_NONE 0x0 |
| 4717 | #define NVM_CFG1_PORT_AN_MODE_CL73 0x1 |
| 4718 | #define NVM_CFG1_PORT_AN_MODE_CL37 0x2 |
| 4719 | #define NVM_CFG1_PORT_AN_MODE_CL73_BAM 0x3 |
| 4720 | #define NVM_CFG1_PORT_AN_MODE_CL37_BAM 0x4 |
| 4721 | #define NVM_CFG1_PORT_AN_MODE_HPAM 0x5 |
| 4722 | #define NVM_CFG1_PORT_AN_MODE_SGMII 0x6 |
| 4723 | |
| 4724 | u32 mgmt_traffic; /* 0x20 */ |
| 4725 | #define NVM_CFG1_PORT_RESERVED61_MASK 0x0000000F |
| 4726 | #define NVM_CFG1_PORT_RESERVED61_OFFSET 0 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4727 | |
| 4728 | u32 ext_phy; /* 0x24 */ |
| 4729 | #define NVM_CFG1_PORT_EXTERNAL_PHY_TYPE_MASK 0x000000FF |
| 4730 | #define NVM_CFG1_PORT_EXTERNAL_PHY_TYPE_OFFSET 0 |
| 4731 | #define NVM_CFG1_PORT_EXTERNAL_PHY_TYPE_NONE 0x0 |
| 4732 | #define NVM_CFG1_PORT_EXTERNAL_PHY_TYPE_BCM84844 0x1 |
| 4733 | #define NVM_CFG1_PORT_EXTERNAL_PHY_ADDRESS_MASK 0x0000FF00 |
| 4734 | #define NVM_CFG1_PORT_EXTERNAL_PHY_ADDRESS_OFFSET 8 |
| 4735 | |
| 4736 | u32 mba_cfg1; /* 0x28 */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4737 | #define NVM_CFG1_PORT_PREBOOT_OPROM_MASK 0x00000001 |
| 4738 | #define NVM_CFG1_PORT_PREBOOT_OPROM_OFFSET 0 |
| 4739 | #define NVM_CFG1_PORT_PREBOOT_OPROM_DISABLED 0x0 |
| 4740 | #define NVM_CFG1_PORT_PREBOOT_OPROM_ENABLED 0x1 |
| 4741 | #define NVM_CFG1_PORT_RESERVED__M_MBA_BOOT_TYPE_MASK 0x00000006 |
| 4742 | #define NVM_CFG1_PORT_RESERVED__M_MBA_BOOT_TYPE_OFFSET 1 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4743 | #define NVM_CFG1_PORT_MBA_DELAY_TIME_MASK 0x00000078 |
| 4744 | #define NVM_CFG1_PORT_MBA_DELAY_TIME_OFFSET 3 |
| 4745 | #define NVM_CFG1_PORT_MBA_SETUP_HOT_KEY_MASK 0x00000080 |
| 4746 | #define NVM_CFG1_PORT_MBA_SETUP_HOT_KEY_OFFSET 7 |
| 4747 | #define NVM_CFG1_PORT_MBA_SETUP_HOT_KEY_CTRL_S 0x0 |
| 4748 | #define NVM_CFG1_PORT_MBA_SETUP_HOT_KEY_CTRL_B 0x1 |
| 4749 | #define NVM_CFG1_PORT_MBA_HIDE_SETUP_PROMPT_MASK 0x00000100 |
| 4750 | #define NVM_CFG1_PORT_MBA_HIDE_SETUP_PROMPT_OFFSET 8 |
| 4751 | #define NVM_CFG1_PORT_MBA_HIDE_SETUP_PROMPT_DISABLED 0x0 |
| 4752 | #define NVM_CFG1_PORT_MBA_HIDE_SETUP_PROMPT_ENABLED 0x1 |
| 4753 | #define NVM_CFG1_PORT_RESERVED5_MASK 0x0001FE00 |
| 4754 | #define NVM_CFG1_PORT_RESERVED5_OFFSET 9 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4755 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_MASK 0x001E0000 |
| 4756 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_OFFSET 17 |
| 4757 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_AUTONEG 0x0 |
| 4758 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_1G 0x1 |
| 4759 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_10G 0x2 |
| 4760 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_25G 0x4 |
| 4761 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_40G 0x5 |
| 4762 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_50G 0x6 |
| 4763 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_100G 0x7 |
| 4764 | #define NVM_CFG1_PORT_PREBOOT_LINK_SPEED_SMARTLINQ 0x8 |
| 4765 | #define NVM_CFG1_PORT_RESERVED__M_MBA_BOOT_RETRY_COUNT_MASK 0x00E00000 |
| 4766 | #define NVM_CFG1_PORT_RESERVED__M_MBA_BOOT_RETRY_COUNT_OFFSET 21 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4767 | |
| 4768 | u32 mba_cfg2; /* 0x2C */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4769 | #define NVM_CFG1_PORT_RESERVED65_MASK 0x0000FFFF |
| 4770 | #define NVM_CFG1_PORT_RESERVED65_OFFSET 0 |
| 4771 | #define NVM_CFG1_PORT_RESERVED66_MASK 0x00010000 |
| 4772 | #define NVM_CFG1_PORT_RESERVED66_OFFSET 16 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4773 | |
| 4774 | u32 vf_cfg; /* 0x30 */ |
| 4775 | #define NVM_CFG1_PORT_RESERVED8_MASK 0x0000FFFF |
| 4776 | #define NVM_CFG1_PORT_RESERVED8_OFFSET 0 |
| 4777 | #define NVM_CFG1_PORT_RESERVED6_MASK 0x000F0000 |
| 4778 | #define NVM_CFG1_PORT_RESERVED6_OFFSET 16 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4779 | |
| 4780 | struct nvm_cfg_mac_address lldp_mac_address; /* 0x34 */ |
| 4781 | |
| 4782 | u32 led_port_settings; /* 0x3C */ |
| 4783 | #define NVM_CFG1_PORT_LANE_LED_SPD_0_SEL_MASK 0x000000FF |
| 4784 | #define NVM_CFG1_PORT_LANE_LED_SPD_0_SEL_OFFSET 0 |
| 4785 | #define NVM_CFG1_PORT_LANE_LED_SPD_1_SEL_MASK 0x0000FF00 |
| 4786 | #define NVM_CFG1_PORT_LANE_LED_SPD_1_SEL_OFFSET 8 |
| 4787 | #define NVM_CFG1_PORT_LANE_LED_SPD_2_SEL_MASK 0x00FF0000 |
| 4788 | #define NVM_CFG1_PORT_LANE_LED_SPD_2_SEL_OFFSET 16 |
| 4789 | #define NVM_CFG1_PORT_LANE_LED_SPD__SEL_1G 0x1 |
| 4790 | #define NVM_CFG1_PORT_LANE_LED_SPD__SEL_10G 0x2 |
| 4791 | #define NVM_CFG1_PORT_LANE_LED_SPD__SEL_25G 0x8 |
| 4792 | #define NVM_CFG1_PORT_LANE_LED_SPD__SEL_40G 0x10 |
| 4793 | #define NVM_CFG1_PORT_LANE_LED_SPD__SEL_50G 0x20 |
| 4794 | #define NVM_CFG1_PORT_LANE_LED_SPD__SEL_100G 0x40 |
| 4795 | |
| 4796 | u32 transceiver_00; /* 0x40 */ |
| 4797 | |
| 4798 | /* Define for mapping of transceiver signal module absent */ |
| 4799 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_MASK 0x000000FF |
| 4800 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_OFFSET 0 |
| 4801 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_NA 0x0 |
| 4802 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO0 0x1 |
| 4803 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO1 0x2 |
| 4804 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO2 0x3 |
| 4805 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO3 0x4 |
| 4806 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO4 0x5 |
| 4807 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO5 0x6 |
| 4808 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO6 0x7 |
| 4809 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO7 0x8 |
| 4810 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO8 0x9 |
| 4811 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO9 0xA |
| 4812 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO10 0xB |
| 4813 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO11 0xC |
| 4814 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO12 0xD |
| 4815 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO13 0xE |
| 4816 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO14 0xF |
| 4817 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO15 0x10 |
| 4818 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO16 0x11 |
| 4819 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO17 0x12 |
| 4820 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO18 0x13 |
| 4821 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO19 0x14 |
| 4822 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO20 0x15 |
| 4823 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO21 0x16 |
| 4824 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO22 0x17 |
| 4825 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO23 0x18 |
| 4826 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO24 0x19 |
| 4827 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO25 0x1A |
| 4828 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO26 0x1B |
| 4829 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO27 0x1C |
| 4830 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO28 0x1D |
| 4831 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO29 0x1E |
| 4832 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO30 0x1F |
| 4833 | #define NVM_CFG1_PORT_TRANS_MODULE_ABS_GPIO31 0x20 |
| 4834 | /* Define the GPIO mux settings to switch i2c mux to this port */ |
| 4835 | #define NVM_CFG1_PORT_I2C_MUX_SEL_VALUE_0_MASK 0x00000F00 |
| 4836 | #define NVM_CFG1_PORT_I2C_MUX_SEL_VALUE_0_OFFSET 8 |
| 4837 | #define NVM_CFG1_PORT_I2C_MUX_SEL_VALUE_1_MASK 0x0000F000 |
| 4838 | #define NVM_CFG1_PORT_I2C_MUX_SEL_VALUE_1_OFFSET 12 |
| 4839 | |
| 4840 | u32 reserved[133]; /* 0x44 */ |
| 4841 | }; |
| 4842 | |
| 4843 | struct nvm_cfg1_func { |
| 4844 | struct nvm_cfg_mac_address mac_address; /* 0x0 */ |
| 4845 | |
| 4846 | u32 rsrv1; /* 0x8 */ |
| 4847 | #define NVM_CFG1_FUNC_RESERVED1_MASK 0x0000FFFF |
| 4848 | #define NVM_CFG1_FUNC_RESERVED1_OFFSET 0 |
| 4849 | #define NVM_CFG1_FUNC_RESERVED2_MASK 0xFFFF0000 |
| 4850 | #define NVM_CFG1_FUNC_RESERVED2_OFFSET 16 |
| 4851 | |
| 4852 | u32 rsrv2; /* 0xC */ |
| 4853 | #define NVM_CFG1_FUNC_RESERVED3_MASK 0x0000FFFF |
| 4854 | #define NVM_CFG1_FUNC_RESERVED3_OFFSET 0 |
| 4855 | #define NVM_CFG1_FUNC_RESERVED4_MASK 0xFFFF0000 |
| 4856 | #define NVM_CFG1_FUNC_RESERVED4_OFFSET 16 |
| 4857 | |
| 4858 | u32 device_id; /* 0x10 */ |
| 4859 | #define NVM_CFG1_FUNC_MF_VENDOR_DEVICE_ID_MASK 0x0000FFFF |
| 4860 | #define NVM_CFG1_FUNC_MF_VENDOR_DEVICE_ID_OFFSET 0 |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4861 | #define NVM_CFG1_FUNC_RESERVED77_MASK 0xFFFF0000 |
| 4862 | #define NVM_CFG1_FUNC_RESERVED77_OFFSET 16 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4863 | |
| 4864 | u32 cmn_cfg; /* 0x14 */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4865 | #define NVM_CFG1_FUNC_PREBOOT_BOOT_PROTOCOL_MASK 0x00000007 |
| 4866 | #define NVM_CFG1_FUNC_PREBOOT_BOOT_PROTOCOL_OFFSET 0 |
| 4867 | #define NVM_CFG1_FUNC_PREBOOT_BOOT_PROTOCOL_PXE 0x0 |
| 4868 | #define NVM_CFG1_FUNC_PREBOOT_BOOT_PROTOCOL_ISCSI_BOOT 0x3 |
| 4869 | #define NVM_CFG1_FUNC_PREBOOT_BOOT_PROTOCOL_FCOE_BOOT 0x4 |
| 4870 | #define NVM_CFG1_FUNC_PREBOOT_BOOT_PROTOCOL_NONE 0x7 |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4871 | #define NVM_CFG1_FUNC_VF_PCI_DEVICE_ID_MASK 0x0007FFF8 |
| 4872 | #define NVM_CFG1_FUNC_VF_PCI_DEVICE_ID_OFFSET 3 |
| 4873 | #define NVM_CFG1_FUNC_PERSONALITY_MASK 0x00780000 |
| 4874 | #define NVM_CFG1_FUNC_PERSONALITY_OFFSET 19 |
| 4875 | #define NVM_CFG1_FUNC_PERSONALITY_ETHERNET 0x0 |
| 4876 | #define NVM_CFG1_FUNC_PERSONALITY_ISCSI 0x1 |
| 4877 | #define NVM_CFG1_FUNC_PERSONALITY_FCOE 0x2 |
| 4878 | #define NVM_CFG1_FUNC_PERSONALITY_ROCE 0x3 |
| 4879 | #define NVM_CFG1_FUNC_BANDWIDTH_WEIGHT_MASK 0x7F800000 |
| 4880 | #define NVM_CFG1_FUNC_BANDWIDTH_WEIGHT_OFFSET 23 |
| 4881 | #define NVM_CFG1_FUNC_PAUSE_ON_HOST_RING_MASK 0x80000000 |
| 4882 | #define NVM_CFG1_FUNC_PAUSE_ON_HOST_RING_OFFSET 31 |
| 4883 | #define NVM_CFG1_FUNC_PAUSE_ON_HOST_RING_DISABLED 0x0 |
| 4884 | #define NVM_CFG1_FUNC_PAUSE_ON_HOST_RING_ENABLED 0x1 |
| 4885 | |
| 4886 | u32 pci_cfg; /* 0x18 */ |
| 4887 | #define NVM_CFG1_FUNC_NUMBER_OF_VFS_PER_PF_MASK 0x0000007F |
| 4888 | #define NVM_CFG1_FUNC_NUMBER_OF_VFS_PER_PF_OFFSET 0 |
| 4889 | #define NVM_CFG1_FUNC_RESERVESD12_MASK 0x00003F80 |
| 4890 | #define NVM_CFG1_FUNC_RESERVESD12_OFFSET 7 |
| 4891 | #define NVM_CFG1_FUNC_BAR1_SIZE_MASK 0x0003C000 |
| 4892 | #define NVM_CFG1_FUNC_BAR1_SIZE_OFFSET 14 |
| 4893 | #define NVM_CFG1_FUNC_BAR1_SIZE_DISABLED 0x0 |
| 4894 | #define NVM_CFG1_FUNC_BAR1_SIZE_64K 0x1 |
| 4895 | #define NVM_CFG1_FUNC_BAR1_SIZE_128K 0x2 |
| 4896 | #define NVM_CFG1_FUNC_BAR1_SIZE_256K 0x3 |
| 4897 | #define NVM_CFG1_FUNC_BAR1_SIZE_512K 0x4 |
| 4898 | #define NVM_CFG1_FUNC_BAR1_SIZE_1M 0x5 |
| 4899 | #define NVM_CFG1_FUNC_BAR1_SIZE_2M 0x6 |
| 4900 | #define NVM_CFG1_FUNC_BAR1_SIZE_4M 0x7 |
| 4901 | #define NVM_CFG1_FUNC_BAR1_SIZE_8M 0x8 |
| 4902 | #define NVM_CFG1_FUNC_BAR1_SIZE_16M 0x9 |
| 4903 | #define NVM_CFG1_FUNC_BAR1_SIZE_32M 0xA |
| 4904 | #define NVM_CFG1_FUNC_BAR1_SIZE_64M 0xB |
| 4905 | #define NVM_CFG1_FUNC_BAR1_SIZE_128M 0xC |
| 4906 | #define NVM_CFG1_FUNC_BAR1_SIZE_256M 0xD |
| 4907 | #define NVM_CFG1_FUNC_BAR1_SIZE_512M 0xE |
| 4908 | #define NVM_CFG1_FUNC_BAR1_SIZE_1G 0xF |
| 4909 | #define NVM_CFG1_FUNC_MAX_BANDWIDTH_MASK 0x03FC0000 |
| 4910 | #define NVM_CFG1_FUNC_MAX_BANDWIDTH_OFFSET 18 |
| 4911 | |
| 4912 | struct nvm_cfg_mac_address fcoe_node_wwn_mac_addr; /* 0x1C */ |
| 4913 | |
| 4914 | struct nvm_cfg_mac_address fcoe_port_wwn_mac_addr; /* 0x24 */ |
Yuval Mintz | fc48b7a | 2016-02-15 13:22:35 -0500 | [diff] [blame] | 4915 | u32 preboot_generic_cfg; /* 0x2C */ |
| 4916 | u32 reserved[8]; /* 0x30 */ |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 4917 | }; |
| 4918 | |
| 4919 | struct nvm_cfg1 { |
| 4920 | struct nvm_cfg1_glob glob; /* 0x0 */ |
| 4921 | |
| 4922 | struct nvm_cfg1_path path[MCP_GLOB_PATH_MAX]; /* 0x140 */ |
| 4923 | |
| 4924 | struct nvm_cfg1_port port[MCP_GLOB_PORT_MAX]; /* 0x230 */ |
| 4925 | |
| 4926 | struct nvm_cfg1_func func[MCP_GLOB_FUNC_MAX]; /* 0xB90 */ |
| 4927 | }; |
| 4928 | |
| 4929 | /****************************************** |
| 4930 | * nvm_cfg structs |
| 4931 | ******************************************/ |
| 4932 | |
| 4933 | enum nvm_cfg_sections { |
| 4934 | NVM_CFG_SECTION_NVM_CFG1, |
| 4935 | NVM_CFG_SECTION_MAX |
| 4936 | }; |
| 4937 | |
| 4938 | struct nvm_cfg { |
| 4939 | u32 num_sections; |
| 4940 | u32 sections_offset[NVM_CFG_SECTION_MAX]; |
| 4941 | struct nvm_cfg1 cfg1; |
| 4942 | }; |
| 4943 | |
| 4944 | #define PORT_0 0 |
| 4945 | #define PORT_1 1 |
| 4946 | #define PORT_2 2 |
| 4947 | #define PORT_3 3 |
| 4948 | |
| 4949 | extern struct spad_layout g_spad; |
| 4950 | |
| 4951 | #define MCP_SPAD_SIZE 0x00028000 /* 160 KB */ |
| 4952 | |
| 4953 | #define SPAD_OFFSET(addr) (((u32)addr - (u32)CPU_SPAD_BASE)) |
| 4954 | |
| 4955 | #define TO_OFFSIZE(_offset, _size) \ |
| 4956 | (u32)((((u32)(_offset) >> 2) << OFFSIZE_OFFSET_SHIFT) | \ |
| 4957 | (((u32)(_size) >> 2) << OFFSIZE_SIZE_SHIFT)) |
| 4958 | |
| 4959 | enum spad_sections { |
| 4960 | SPAD_SECTION_TRACE, |
| 4961 | SPAD_SECTION_NVM_CFG, |
| 4962 | SPAD_SECTION_PUBLIC, |
| 4963 | SPAD_SECTION_PRIVATE, |
| 4964 | SPAD_SECTION_MAX |
| 4965 | }; |
| 4966 | |
| 4967 | struct spad_layout { |
| 4968 | struct nvm_cfg nvm_cfg; |
| 4969 | struct mcp_public_data public_data; |
| 4970 | }; |
| 4971 | |
| 4972 | #define CRC_MAGIC_VALUE 0xDEBB20E3 |
| 4973 | #define CRC32_POLYNOMIAL 0xEDB88320 |
| 4974 | #define NVM_CRC_SIZE (sizeof(u32)) |
| 4975 | |
| 4976 | enum nvm_sw_arbitrator { |
| 4977 | NVM_SW_ARB_HOST, |
| 4978 | NVM_SW_ARB_MCP, |
| 4979 | NVM_SW_ARB_UART, |
| 4980 | NVM_SW_ARB_RESERVED |
| 4981 | }; |
| 4982 | |
| 4983 | /**************************************************************************** |
| 4984 | * Boot Strap Region * |
| 4985 | ****************************************************************************/ |
| 4986 | struct legacy_bootstrap_region { |
| 4987 | u32 magic_value; |
| 4988 | #define NVM_MAGIC_VALUE 0x669955aa |
| 4989 | u32 sram_start_addr; |
| 4990 | u32 code_len; /* boot code length (in dwords) */ |
| 4991 | u32 code_start_addr; |
| 4992 | u32 crc; /* 32-bit CRC */ |
| 4993 | }; |
| 4994 | |
| 4995 | /**************************************************************************** |
| 4996 | * Directories Region * |
| 4997 | ****************************************************************************/ |
| 4998 | struct nvm_code_entry { |
| 4999 | u32 image_type; /* Image type */ |
| 5000 | u32 nvm_start_addr; /* NVM address of the image */ |
| 5001 | u32 len; /* Include CRC */ |
| 5002 | u32 sram_start_addr; |
| 5003 | u32 sram_run_addr; /* Relevant in case of MIM only */ |
| 5004 | }; |
| 5005 | |
| 5006 | enum nvm_image_type { |
| 5007 | NVM_TYPE_TIM1 = 0x01, |
| 5008 | NVM_TYPE_TIM2 = 0x02, |
| 5009 | NVM_TYPE_MIM1 = 0x03, |
| 5010 | NVM_TYPE_MIM2 = 0x04, |
| 5011 | NVM_TYPE_MBA = 0x05, |
| 5012 | NVM_TYPE_MODULES_PN = 0x06, |
| 5013 | NVM_TYPE_VPD = 0x07, |
| 5014 | NVM_TYPE_MFW_TRACE1 = 0x08, |
| 5015 | NVM_TYPE_MFW_TRACE2 = 0x09, |
| 5016 | NVM_TYPE_NVM_CFG1 = 0x0a, |
| 5017 | NVM_TYPE_L2B = 0x0b, |
| 5018 | NVM_TYPE_DIR1 = 0x0c, |
| 5019 | NVM_TYPE_EAGLE_FW1 = 0x0d, |
| 5020 | NVM_TYPE_FALCON_FW1 = 0x0e, |
| 5021 | NVM_TYPE_PCIE_FW1 = 0x0f, |
| 5022 | NVM_TYPE_HW_SET = 0x10, |
| 5023 | NVM_TYPE_LIM = 0x11, |
| 5024 | NVM_TYPE_AVS_FW1 = 0x12, |
| 5025 | NVM_TYPE_DIR2 = 0x13, |
| 5026 | NVM_TYPE_CCM = 0x14, |
| 5027 | NVM_TYPE_EAGLE_FW2 = 0x15, |
| 5028 | NVM_TYPE_FALCON_FW2 = 0x16, |
| 5029 | NVM_TYPE_PCIE_FW2 = 0x17, |
| 5030 | NVM_TYPE_AVS_FW2 = 0x18, |
| 5031 | |
| 5032 | NVM_TYPE_MAX, |
| 5033 | }; |
| 5034 | |
| 5035 | #define MAX_NVM_DIR_ENTRIES 200 |
| 5036 | |
| 5037 | struct nvm_dir { |
| 5038 | s32 seq; |
| 5039 | #define NVM_DIR_NEXT_MFW_MASK 0x00000001 |
| 5040 | #define NVM_DIR_SEQ_MASK 0xfffffffe |
| 5041 | #define NVM_DIR_NEXT_MFW(seq) ((seq) & NVM_DIR_NEXT_MFW_MASK) |
| 5042 | |
| 5043 | #define IS_DIR_SEQ_VALID(seq) ((seq & NVM_DIR_SEQ_MASK) != NVM_DIR_SEQ_MASK) |
| 5044 | |
| 5045 | u32 num_images; |
| 5046 | u32 rsrv; |
| 5047 | struct nvm_code_entry code[1]; /* Up to MAX_NVM_DIR_ENTRIES */ |
| 5048 | }; |
| 5049 | |
| 5050 | #define NVM_DIR_SIZE(_num_images) (sizeof(struct nvm_dir) + \ |
| 5051 | (_num_images - \ |
| 5052 | 1) * sizeof(struct nvm_code_entry) + \ |
| 5053 | NVM_CRC_SIZE) |
| 5054 | |
| 5055 | struct nvm_vpd_image { |
| 5056 | u32 format_revision; |
| 5057 | #define VPD_IMAGE_VERSION 1 |
| 5058 | |
| 5059 | /* This array length depends on the number of VPD fields */ |
| 5060 | u8 vpd_data[1]; |
| 5061 | }; |
| 5062 | |
| 5063 | /**************************************************************************** |
| 5064 | * NVRAM FULL MAP * |
| 5065 | ****************************************************************************/ |
| 5066 | #define DIR_ID_1 (0) |
| 5067 | #define DIR_ID_2 (1) |
| 5068 | #define MAX_DIR_IDS (2) |
| 5069 | |
| 5070 | #define MFW_BUNDLE_1 (0) |
| 5071 | #define MFW_BUNDLE_2 (1) |
| 5072 | #define MAX_MFW_BUNDLES (2) |
| 5073 | |
| 5074 | #define FLASH_PAGE_SIZE 0x1000 |
| 5075 | #define NVM_DIR_MAX_SIZE (FLASH_PAGE_SIZE) /* 4Kb */ |
| 5076 | #define ASIC_MIM_MAX_SIZE (300 * FLASH_PAGE_SIZE) /* 1.2Mb */ |
| 5077 | #define FPGA_MIM_MAX_SIZE (25 * FLASH_PAGE_SIZE) /* 60Kb */ |
| 5078 | |
| 5079 | #define LIM_MAX_SIZE ((2 * \ |
| 5080 | FLASH_PAGE_SIZE) - \ |
| 5081 | sizeof(struct legacy_bootstrap_region) - \ |
| 5082 | NVM_RSV_SIZE) |
| 5083 | #define LIM_OFFSET (NVM_OFFSET(lim_image)) |
| 5084 | #define NVM_RSV_SIZE (44) |
| 5085 | #define MIM_MAX_SIZE(is_asic) ((is_asic) ? ASIC_MIM_MAX_SIZE : \ |
| 5086 | FPGA_MIM_MAX_SIZE) |
| 5087 | #define MIM_OFFSET(idx, is_asic) (NVM_OFFSET(dir[MAX_MFW_BUNDLES]) + \ |
| 5088 | ((idx == \ |
| 5089 | NVM_TYPE_MIM2) ? MIM_MAX_SIZE(is_asic) : 0)) |
| 5090 | #define NVM_FIXED_AREA_SIZE(is_asic) (sizeof(struct nvm_image) + \ |
| 5091 | MIM_MAX_SIZE(is_asic) * 2) |
| 5092 | |
| 5093 | union nvm_dir_union { |
| 5094 | struct nvm_dir dir; |
| 5095 | u8 page[FLASH_PAGE_SIZE]; |
| 5096 | }; |
| 5097 | |
| 5098 | /* Address |
| 5099 | * +-------------------+ 0x000000 |
| 5100 | * | Bootstrap: | |
| 5101 | * | magic_number | |
| 5102 | * | sram_start_addr | |
| 5103 | * | code_len | |
| 5104 | * | code_start_addr | |
| 5105 | * | crc | |
| 5106 | * +-------------------+ 0x000014 |
| 5107 | * | rsrv | |
| 5108 | * +-------------------+ 0x000040 |
| 5109 | * | LIM | |
| 5110 | * +-------------------+ 0x002000 |
| 5111 | * | Dir1 | |
| 5112 | * +-------------------+ 0x003000 |
| 5113 | * | Dir2 | |
| 5114 | * +-------------------+ 0x004000 |
| 5115 | * | MIM1 | |
| 5116 | * +-------------------+ 0x130000 |
| 5117 | * | MIM2 | |
| 5118 | * +-------------------+ 0x25C000 |
| 5119 | * | Rest Images: | |
| 5120 | * | TIM1/2 | |
| 5121 | * | MFW_TRACE1/2 | |
| 5122 | * | Eagle/Falcon FW | |
| 5123 | * | PCIE/AVS FW | |
| 5124 | * | MBA/CCM/L2B | |
| 5125 | * | VPD | |
| 5126 | * | optic_modules | |
| 5127 | * | ... | |
| 5128 | * +-------------------+ 0x400000 |
| 5129 | */ |
| 5130 | struct nvm_image { |
| 5131 | /*********** !!! FIXED SECTIONS !!! DO NOT MODIFY !!! **********************/ |
| 5132 | /* NVM Offset (size) */ |
| 5133 | struct legacy_bootstrap_region bootstrap; |
| 5134 | u8 rsrv[NVM_RSV_SIZE]; |
| 5135 | u8 lim_image[LIM_MAX_SIZE]; |
| 5136 | union nvm_dir_union dir[MAX_MFW_BUNDLES]; |
| 5137 | |
| 5138 | /* MIM1_IMAGE 0x004000 (0x12c000) */ |
| 5139 | /* MIM2_IMAGE 0x130000 (0x12c000) */ |
| 5140 | /*********** !!! FIXED SECTIONS !!! DO NOT MODIFY !!! **********************/ |
| 5141 | }; /* 0x134 */ |
| 5142 | |
| 5143 | #define NVM_OFFSET(f) ((u32_t)((int_ptr_t)(&(((struct nvm_image *)0)->f)))) |
| 5144 | |
| 5145 | struct hw_set_info { |
| 5146 | u32 reg_type; |
| 5147 | #define GRC_REG_TYPE 1 |
| 5148 | #define PHY_REG_TYPE 2 |
| 5149 | #define PCI_REG_TYPE 4 |
| 5150 | |
| 5151 | u32 bank_num; |
| 5152 | u32 pf_num; |
| 5153 | u32 operation; |
| 5154 | #define READ_OP 1 |
| 5155 | #define WRITE_OP 2 |
| 5156 | #define RMW_SET_OP 3 |
| 5157 | #define RMW_CLR_OP 4 |
| 5158 | |
| 5159 | u32 reg_addr; |
| 5160 | u32 reg_data; |
| 5161 | |
| 5162 | u32 reset_type; |
| 5163 | #define POR_RESET_TYPE BIT(0) |
| 5164 | #define HARD_RESET_TYPE BIT(1) |
| 5165 | #define CORE_RESET_TYPE BIT(2) |
| 5166 | #define MCP_RESET_TYPE BIT(3) |
| 5167 | #define PERSET_ASSERT BIT(4) |
| 5168 | #define PERSET_DEASSERT BIT(5) |
| 5169 | }; |
| 5170 | |
| 5171 | struct hw_set_image { |
| 5172 | u32 format_version; |
| 5173 | #define HW_SET_IMAGE_VERSION 1 |
| 5174 | u32 no_hw_sets; |
| 5175 | |
| 5176 | /* This array length depends on the no_hw_sets */ |
| 5177 | struct hw_set_info hw_sets[1]; |
| 5178 | }; |
| 5179 | |
Manish Chopra | a64b02d | 2016-04-26 10:56:10 -0400 | [diff] [blame] | 5180 | int qed_init_pf_wfq(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, |
| 5181 | u8 pf_id, u16 pf_wfq); |
Manish Chopra | bcd197c | 2016-04-26 10:56:08 -0400 | [diff] [blame] | 5182 | int qed_init_vport_wfq(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt, |
| 5183 | u16 first_tx_pq_id[NUM_OF_TCS], u16 vport_wfq); |
Yuval Mintz | fe56b9e | 2015-10-26 11:02:25 +0200 | [diff] [blame] | 5184 | #endif |