1 /******************************************************************************* 2 3 4 Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. 5 6 This program is free software; you can redistribute it and/or modify it 7 under the terms of the GNU General Public License as published by the Free 8 Software Foundation; either version 2 of the License, or (at your option) 9 any later version. 10 11 This program is distributed in the hope that it will be useful, but WITHOUT 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 14 more details. 15 16 You should have received a copy of the GNU General Public License along with 17 this program; if not, write to the Free Software Foundation, Inc., 59 18 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20 The full GNU General Public License is included in this distribution in the 21 file called LICENSE. 22 23 Contact Information: 24 Linux NICS <linux.nics@intel.com> 25 Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 26 *******************************************************************************/ 27 28 #ifndef _E100_UCODE_H_ 29 #define _E100_UCODE_H_ 30 31 /* 32 e100_ucode.h 33 34 This file contains the loadable micro code arrays to implement receive 35 bundling on the D101 A-step, D101 B-step, D101M (B-step only), D101S, 36 D102 B-step, D102 B-step with TCO work around and D102 C-step. 37 38 Each controller has its own specific micro code array. The array for one 39 controller is totally incompatible with any other controller, and if used 40 will most likely cause the controller to lock up and stop responding to 41 the driver. Each micro code array has its own parameter offsets (described 42 below), and they each have their own version number. 43 */ 44 45 /************************************************************************* 46 * CPUSaver parameters 47 * 48 * All CPUSaver parameters are 16-bit literals that are part of a 49 * "move immediate value" instruction. By changing the value of 50 * the literal in the instruction before the code is loaded, the 51 * driver can change algorithm. 52 * 53 * CPUSAVER_DWORD - This is the location of the instruction that loads 54 * the dead-man timer with its inital value. By writing a 16-bit 55 * value to the low word of this instruction, the driver can change 56 * the timer value. The current default is either x600 or x800; 57 * experiments show that the value probably should stay within the 58 * range of x200 - x1000. 59 * 60 * CPUSAVER_BUNDLE_MAX_DWORD - This is the location of the instruction 61 * that sets the maximum number of frames that will be bundled. In 62 * some situations, such as the TCP windowing algorithm, it may be 63 * better to limit the growth of the bundle size than let it go as 64 * high as it can, because that could cause too much added latency. 65 * The default is six, because this is the number of packets in the 66 * default TCP window size. A value of 1 would make CPUSaver indicate 67 * an interrupt for every frame received. If you do not want to put 68 * a limit on the bundle size, set this value to xFFFF. 69 * 70 * CPUSAVER_MIN_SIZE_DWORD - This is the location of the instruction 71 * that contains a bit-mask describing the minimum size frame that 72 * will be bundled. The default masks the lower 7 bits, which means 73 * that any frame less than 128 bytes in length will not be bundled, 74 * but will instead immediately generate an interrupt. This does 75 * not affect the current bundle in any way. Any frame that is 128 76 * bytes or large will be bundled normally. This feature is meant 77 * to provide immediate indication of ACK frames in a TCP environment. 78 * Customers were seeing poor performance when a machine with CPUSaver 79 * enabled was sending but not receiving. The delay introduced when 80 * the ACKs were received was enough to reduce total throughput, because 81 * the sender would sit idle until the ACK was finally seen. 82 * 83 * The current default is 0xFF80, which masks out the lower 7 bits. 84 * This means that any frame which is x7F (127) bytes or smaller 85 * will cause an immediate interrupt. Because this value must be a 86 * bit mask, there are only a few valid values that can be used. To 87 * turn this feature off, the driver can write the value xFFFF to the 88 * lower word of this instruction (in the same way that the other 89 * parameters are used). Likewise, a value of 0xF800 (2047) would 90 * cause an interrupt to be generated for every frame, because all 91 * standard Ethernet frames are <= 2047 bytes in length. 92 *************************************************************************/ 93 94 #ifndef UCODE_MAX_DWORDS 95 #define UCODE_MAX_DWORDS 134 96 #endif 97 98 /********************************************************/ 99 /* CPUSaver micro code for the D101A */ 100 /********************************************************/ 101 102 /* Version 2.0 */ 103 104 /* This value is the same for both A and B step of 558. */ 105 106 #define D101_CPUSAVER_TIMER_DWORD 72 107 #define D101_CPUSAVER_BUNDLE_DWORD UCODE_MAX_DWORDS 108 #define D101_CPUSAVER_MIN_SIZE_DWORD UCODE_MAX_DWORDS 109 110 #define D101_A_RCVBUNDLE_UCODE \ 111 {\ 112 0x03B301BB, 0x0046FFFF, 0xFFFFFFFF, 0x051DFFFF, 0xFFFFFFFF, 0xFFFFFFFF, \ 113 0x000C0001, 0x00101212, 0x000C0008, 0x003801BC, \ 114 0x00000000, 0x00124818, 0x000C1000, 0x00220809, \ 115 0x00010200, 0x00124818, 0x000CFFFC, 0x003803B5, \ 116 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 117 0x0010009C, 0x0024B81D, 0x00130836, 0x000C0001, \ 118 0x0026081C, 0x0020C81B, 0x00130824, 0x00222819, \ 119 0x00101213, 0x00041000, 0x003A03B3, 0x00010200, \ 120 0x00101B13, 0x00238081, 0x00213049, 0x0038003B, \ 121 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 122 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 123 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 124 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 125 0x0010009C, 0x0024B83E, 0x00130826, 0x000C0001, \ 126 0x0026083B, 0x00010200, 0x00134824, 0x000C0001, \ 127 0x00101213, 0x00041000, 0x0038051E, 0x00101313, \ 128 0x00010400, 0x00380521, 0x00050600, 0x00100824, \ 129 0x00101310, 0x00041000, 0x00080600, 0x00101B10, \ 130 0x0038051E, 0x00000000, 0x00000000, 0x00000000 \ 131 } 132 133 /********************************************************/ 134 /* CPUSaver micro code for the D101B */ 135 /********************************************************/ 136 137 /* Version 2.0 */ 138 139 #define D101_B0_RCVBUNDLE_UCODE \ 140 {\ 141 0x03B401BC, 0x0047FFFF, 0xFFFFFFFF, 0x051EFFFF, 0xFFFFFFFF, 0xFFFFFFFF, \ 142 0x000C0001, 0x00101B92, 0x000C0008, 0x003801BD, \ 143 0x00000000, 0x00124818, 0x000C1000, 0x00220809, \ 144 0x00010200, 0x00124818, 0x000CFFFC, 0x003803B6, \ 145 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 146 0x0010009C, 0x0024B81D, 0x0013082F, 0x000C0001, \ 147 0x0026081C, 0x0020C81B, 0x00130837, 0x00222819, \ 148 0x00101B93, 0x00041000, 0x003A03B4, 0x00010200, \ 149 0x00101793, 0x00238082, 0x0021304A, 0x0038003C, \ 150 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 151 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 152 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 153 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 154 0x0010009C, 0x0024B83E, 0x00130826, 0x000C0001, \ 155 0x0026083B, 0x00010200, 0x00134837, 0x000C0001, \ 156 0x00101B93, 0x00041000, 0x0038051F, 0x00101313, \ 157 0x00010400, 0x00380522, 0x00050600, 0x00100837, \ 158 0x00101310, 0x00041000, 0x00080600, 0x00101790, \ 159 0x0038051F, 0x00000000, 0x00000000, 0x00000000 \ 160 } 161 162 /********************************************************/ 163 /* CPUSaver micro code for the D101M (B-step only) */ 164 /********************************************************/ 165 166 /* Version 2.10.1 */ 167 168 /* Parameter values for the D101M B-step */ 169 #define D101M_CPUSAVER_TIMER_DWORD 78 170 #define D101M_CPUSAVER_BUNDLE_DWORD 65 171 #define D101M_CPUSAVER_MIN_SIZE_DWORD 126 172 173 #define D101M_B_RCVBUNDLE_UCODE \ 174 {\ 175 0x00550215, 0xFFFF0437, 0xFFFFFFFF, 0x06A70789, 0xFFFFFFFF, 0x0558FFFF, \ 176 0x000C0001, 0x00101312, 0x000C0008, 0x00380216, \ 177 0x0010009C, 0x00204056, 0x002380CC, 0x00380056, \ 178 0x0010009C, 0x00244C0B, 0x00000800, 0x00124818, \ 179 0x00380438, 0x00000000, 0x00140000, 0x00380555, \ 180 0x00308000, 0x00100662, 0x00100561, 0x000E0408, \ 181 0x00134861, 0x000C0002, 0x00103093, 0x00308000, \ 182 0x00100624, 0x00100561, 0x000E0408, 0x00100861, \ 183 0x000C007E, 0x00222C21, 0x000C0002, 0x00103093, \ 184 0x00380C7A, 0x00080000, 0x00103090, 0x00380C7A, \ 185 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 186 0x0010009C, 0x00244C2D, 0x00010004, 0x00041000, \ 187 0x003A0437, 0x00044010, 0x0038078A, 0x00000000, \ 188 0x00100099, 0x00206C7A, 0x0010009C, 0x00244C48, \ 189 0x00130824, 0x000C0001, 0x00101213, 0x00260C75, \ 190 0x00041000, 0x00010004, 0x00130826, 0x000C0006, \ 191 0x002206A8, 0x0013C926, 0x00101313, 0x003806A8, \ 192 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 193 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 194 0x00080600, 0x00101B10, 0x00050004, 0x00100826, \ 195 0x00101210, 0x00380C34, 0x00000000, 0x00000000, \ 196 0x0021155B, 0x00100099, 0x00206559, 0x0010009C, \ 197 0x00244559, 0x00130836, 0x000C0000, 0x00220C62, \ 198 0x000C0001, 0x00101B13, 0x00229C0E, 0x00210C0E, \ 199 0x00226C0E, 0x00216C0E, 0x0022FC0E, 0x00215C0E, \ 200 0x00214C0E, 0x00380555, 0x00010004, 0x00041000, \ 201 0x00278C67, 0x00040800, 0x00018100, 0x003A0437, \ 202 0x00130826, 0x000C0001, 0x00220559, 0x00101313, \ 203 0x00380559, 0x00000000, 0x00000000, 0x00000000, \ 204 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 205 0x00000000, 0x00130831, 0x0010090B, 0x00124813, \ 206 0x000CFF80, 0x002606AB, 0x00041000, 0x00010004, \ 207 0x003806A8, 0x00000000, 0x00000000, 0x00000000, \ 208 } 209 210 /********************************************************/ 211 /* CPUSaver micro code for the D101S */ 212 /********************************************************/ 213 214 /* Version 1.20.1 */ 215 216 /* Parameter values for the D101S */ 217 #define D101S_CPUSAVER_TIMER_DWORD 78 218 #define D101S_CPUSAVER_BUNDLE_DWORD 67 219 #define D101S_CPUSAVER_MIN_SIZE_DWORD 128 220 221 #define D101S_RCVBUNDLE_UCODE \ 222 {\ 223 0x00550242, 0xFFFF047E, 0xFFFFFFFF, 0x06FF0818, 0xFFFFFFFF, 0x05A6FFFF, \ 224 0x000C0001, 0x00101312, 0x000C0008, 0x00380243, \ 225 0x0010009C, 0x00204056, 0x002380D0, 0x00380056, \ 226 0x0010009C, 0x00244F8B, 0x00000800, 0x00124818, \ 227 0x0038047F, 0x00000000, 0x00140000, 0x003805A3, \ 228 0x00308000, 0x00100610, 0x00100561, 0x000E0408, \ 229 0x00134861, 0x000C0002, 0x00103093, 0x00308000, \ 230 0x00100624, 0x00100561, 0x000E0408, 0x00100861, \ 231 0x000C007E, 0x00222FA1, 0x000C0002, 0x00103093, \ 232 0x00380F90, 0x00080000, 0x00103090, 0x00380F90, \ 233 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 234 0x0010009C, 0x00244FAD, 0x00010004, 0x00041000, \ 235 0x003A047E, 0x00044010, 0x00380819, 0x00000000, \ 236 0x00100099, 0x00206FFD, 0x0010009A, 0x0020AFFD, \ 237 0x0010009C, 0x00244FC8, 0x00130824, 0x000C0001, \ 238 0x00101213, 0x00260FF7, 0x00041000, 0x00010004, \ 239 0x00130826, 0x000C0006, 0x00220700, 0x0013C926, \ 240 0x00101313, 0x00380700, 0x00000000, 0x00000000, \ 241 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 242 0x00080600, 0x00101B10, 0x00050004, 0x00100826, \ 243 0x00101210, 0x00380FB6, 0x00000000, 0x00000000, \ 244 0x002115A9, 0x00100099, 0x002065A7, 0x0010009A, \ 245 0x0020A5A7, 0x0010009C, 0x002445A7, 0x00130836, \ 246 0x000C0000, 0x00220FE4, 0x000C0001, 0x00101B13, \ 247 0x00229F8E, 0x00210F8E, 0x00226F8E, 0x00216F8E, \ 248 0x0022FF8E, 0x00215F8E, 0x00214F8E, 0x003805A3, \ 249 0x00010004, 0x00041000, 0x00278FE9, 0x00040800, \ 250 0x00018100, 0x003A047E, 0x00130826, 0x000C0001, \ 251 0x002205A7, 0x00101313, 0x003805A7, 0x00000000, \ 252 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 253 0x00000000, 0x00000000, 0x00000000, 0x00130831, \ 254 0x0010090B, 0x00124813, 0x000CFF80, 0x00260703, \ 255 0x00041000, 0x00010004, 0x00380700 \ 256 } 257 258 /********************************************************/ 259 /* CPUSaver micro code for the D102 B-step */ 260 /********************************************************/ 261 262 /* Version 2.0 */ 263 /* Parameter values for the D102 B-step */ 264 #define D102_B_CPUSAVER_TIMER_DWORD 82 265 #define D102_B_CPUSAVER_BUNDLE_DWORD 106 266 #define D102_B_CPUSAVER_MIN_SIZE_DWORD 70 267 268 #define D102_B_RCVBUNDLE_UCODE \ 269 {\ 270 0x006F0276, 0x0EF71FFF, 0x0ED30F86, 0x0D250ED9, 0x1FFF1FFF, 0x1FFF04D2, \ 271 0x00300001, 0x0140D871, 0x00300008, 0x00E00277, \ 272 0x01406C57, 0x00816073, 0x008700FA, 0x00E00070, \ 273 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 274 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 275 0x01406CBA, 0x00807F9A, 0x00901F9A, 0x0024FFFF, \ 276 0x014B6F6F, 0x0030FFFE, 0x01407172, 0x01496FBA, \ 277 0x014B6F72, 0x00308000, 0x01406C52, 0x00912EFC, \ 278 0x00E00EF8, 0x00000000, 0x00000000, 0x00000000, \ 279 0x00906F8C, 0x00900F8C, 0x00E00F87, 0x00000000, \ 280 0x00906ED8, 0x01406C55, 0x00E00ED4, 0x00000000, \ 281 0x01406C51, 0x0080DFC2, 0x01406C52, 0x00815FC2, \ 282 0x01406C57, 0x00917FCC, 0x00E01FDD, 0x00000000, \ 283 0x00822D30, 0x01406C51, 0x0080CD26, 0x01406C52, \ 284 0x00814D26, 0x01406C57, 0x00916D26, 0x014C6FD7, \ 285 0x00300000, 0x00841FD2, 0x00300001, 0x0140D772, \ 286 0x00E012B3, 0x014C6F91, 0x0150710B, 0x01496F72, \ 287 0x0030FF80, 0x00940EDD, 0x00102000, 0x00038400, \ 288 0x00E00EDA, 0x00000000, 0x00000000, 0x00000000, \ 289 0x01406C57, 0x00917FE9, 0x00001000, 0x00E01FE9, \ 290 0x00200600, 0x0140D76F, 0x00138400, 0x01406FD8, \ 291 0x0140D96F, 0x00E01FDD, 0x00038400, 0x00102000, \ 292 0x00971FD7, 0x00101000, 0x00050200, 0x00E804D2, \ 293 0x014C6FD8, 0x00300001, 0x00840D26, 0x0140D872, \ 294 0x00E00D26, 0x014C6FD9, 0x00300001, 0x0140D972, \ 295 0x00941FBD, 0x00102000, 0x00038400, 0x014C6FD8, \ 296 0x00300006, 0x00840EDA, 0x014F71D8, 0x0140D872, \ 297 0x00E00EDA, 0x01496F50, 0x00E004D3, 0x00000000, \ 298 } 299 300 /********************************************************/ 301 /* Micro code for the D102 C-step */ 302 /********************************************************/ 303 304 /* Parameter values for the D102 C-step */ 305 #define D102_C_CPUSAVER_TIMER_DWORD 46 306 #define D102_C_CPUSAVER_BUNDLE_DWORD 74 307 #define D102_C_CPUSAVER_MIN_SIZE_DWORD 54 308 309 #define D102_C_RCVBUNDLE_UCODE \ 310 { \ 311 0x00700279, 0x0E6604E2, 0x02BF0CAE, 0x1508150C, 0x15190E5B, 0x0E840F13, \ 312 0x00E014D8, 0x00000000, 0x00000000, 0x00000000, \ 313 0x00E014DC, 0x00000000, 0x00000000, 0x00000000, \ 314 0x00E014F4, 0x00000000, 0x00000000, 0x00000000, \ 315 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 316 0x00E014E0, 0x00000000, 0x00000000, 0x00000000, \ 317 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 318 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 319 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 320 0x00E014E7, 0x00000000, 0x00000000, 0x00000000, \ 321 0x00141000, 0x015D6F0D, 0x00E002C0, 0x00000000, \ 322 0x00200600, 0x00E0150D, 0x00000000, 0x00000000, \ 323 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 324 0x0030FF80, 0x00940E6A, 0x00038200, 0x00102000, \ 325 0x00E00E67, 0x00000000, 0x00000000, 0x00000000, \ 326 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 327 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 328 0x00906E65, 0x00800E60, 0x00E00E5D, 0x00000000, \ 329 0x00300006, 0x00E0151A, 0x00000000, 0x00000000, \ 330 0x00906F19, 0x00900F19, 0x00E00F14, 0x00000000, \ 331 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 332 0x01406CBA, 0x00807FDA, 0x00901FDA, 0x0024FFFF, \ 333 0x014B6F6F, 0x0030FFFE, 0x01407172, 0x01496FBA, \ 334 0x014B6F72, 0x00308000, 0x01406C52, 0x00912E89, \ 335 0x00E00E85, 0x00000000, 0x00000000, 0x00000000 \ 336 } 337 338 /********************************************************/ 339 /* Micro code for the D102 E-step */ 340 /********************************************************/ 341 342 /* Parameter values for the D102 E-step */ 343 #define D102_E_CPUSAVER_TIMER_DWORD 42 344 #define D102_E_CPUSAVER_BUNDLE_DWORD 54 345 #define D102_E_CPUSAVER_MIN_SIZE_DWORD 46 346 347 #define D102_E_RCVBUNDLE_UCODE \ 348 {\ 349 0x007D028F, 0x0E4204F9, 0x14ED0C85, 0x14FA14E9, 0x0EF70E36, 0x1FFF1FFF, \ 350 0x00E014B9, 0x00000000, 0x00000000, 0x00000000, \ 351 0x00E014BD, 0x00000000, 0x00000000, 0x00000000, \ 352 0x00E014D5, 0x00000000, 0x00000000, 0x00000000, \ 353 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 354 0x00E014C1, 0x00000000, 0x00000000, 0x00000000, \ 355 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 356 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 357 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 358 0x00E014C8, 0x00000000, 0x00000000, 0x00000000, \ 359 0x00200600, 0x00E014EE, 0x00000000, 0x00000000, \ 360 0x0030FF80, 0x00940E46, 0x00038200, 0x00102000, \ 361 0x00E00E43, 0x00000000, 0x00000000, 0x00000000, \ 362 0x00300006, 0x00E014FB, 0x00000000, 0x00000000, \ 363 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 364 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 365 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 366 0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000, \ 367 0x00906EFD, 0x00900EFD, 0x00E00EF8, 0x00000000, \ 368 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 369 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 370 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 371 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 372 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 373 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 374 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 375 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 376 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 377 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 378 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 379 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 380 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 381 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ 382 } 383 384 #endif /* _E100_UCODE_H_ */ 385