2 Copyright (c) 1999-2001, Intel Corporation
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
9 1. Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright notice,
13 this list of conditions and the following disclaimer in the documentation
14 and/or other materials provided with the distribution.
16 3. Neither the name of Intel Corporation nor the names of its contributors
17 may be used to endorse or promote products derived from this software
18 without specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
29 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 Author: Patrick J Luhmann (PJL)
41 This file contains the loadable micro code arrays to implement receive bundling on the
42 D101 A-step, D101 B-step, D101M (B-step only), D101S, D102 B-step,
43 D102 B-step with TCO work around, D102 C-step and D102 E-step.
45 Each controller has its own specific micro code array. The array for one controller
46 is totally incompatible with any other controller, and if used will most likely
47 cause the controller to lock up and stop responding to the driver. Each micro
48 code array has its own parameter offsets (described below), and they each have
49 their own version number (which should not be confused with the version of the
50 rcvbundl.h file given above).
56 /*************************************************************************
59 * All CPUSaver parameters are 16-bit literals that are part of a
60 * "move immediate value" instruction. By changing the value of
61 * the literal in the instruction before the code is loaded, the
62 * driver can change algorithm.
64 * CPUSAVER_DWORD - This is the location of the instruction that loads
65 * the dead-man timer with its inital value. By writing a 16-bit
66 * value to the low word of this instruction, the driver can change
67 * the timer value. The current default is either x600 or x800;
68 * experiments show that the value probably should stay within the
69 * range of x200 - x1000.
71 * CPUSAVER_BUNDLE_MAX_DWORD - This is the location of the instruction
72 * that sets the maximum number of frames that will be bundled. In
73 * some situations, such as the TCP windowing algorithm, it may be
74 * better to limit the growth of the bundle size than let it go as
75 * high as it can, because that could cause too much added latency.
76 * The default is six, because this is the number of packets in the
77 * default TCP window size. A value of 1 would make CPUSaver indicate
78 * an interrupt for every frame received. If you do not want to put
79 * a limit on the bundle size, set this value to xFFFF.
81 * CPUSAVER_MIN_SIZE_DWORD - This is the location of the instruction
82 * that contains a bit-mask describing the minimum size frame that
83 * will be bundled. The default masks the lower 7 bits, which means
84 * that any frame less than 128 bytes in length will not be bundled,
85 * but will instead immediately generate an interrupt. This does
86 * not affect the current bundle in any way. Any frame that is 128
87 * bytes or large will be bundled normally. This feature is meant
88 * to provide immediate indication of ACK frames in a TCP environment.
89 * Customers were seeing poor performance when a machine with CPUSaver
90 * enabled was sending but not receiving. The delay introduced when
91 * the ACKs were received was enough to reduce total throughput, because
92 * the sender would sit idle until the ACK was finally seen.
94 * The current default is 0xFF80, which masks out the lower 7 bits.
95 * This means that any frame which is x7F (127) bytes or smaller
96 * will cause an immediate interrupt. Because this value must be a
97 * bit mask, there are only a few valid values that can be used. To
98 * turn this feature off, the driver can write the value xFFFF to the
99 * lower word of this instruction (in the same way that the other
100 * parameters are used). Likewise, a value of 0xF800 (2047) would
101 * cause an interrupt to be generated for every frame, because all
102 * standard Ethernet frames are <= 2047 bytes in length.
103 *************************************************************************/
107 /********************************************************/
108 /* CPUSaver micro code for the D101A */
109 /********************************************************/
113 /* This value is the same for both A and B step of 558. */
114 #define D101_CPUSAVER_DWORD 72
117 #define D101_A_RCVBUNDLE_UCODE \
224 /********************************************************/
225 /* CPUSaver micro code for the D101B */
226 /********************************************************/
230 #define D101_B0_RCVBUNDLE_UCODE \
337 /********************************************************/
338 /* CPUSaver micro code for the D101M (B-step only) */
339 /********************************************************/
343 /* Parameter values for the D101M B-step */
344 #define D101M_CPUSAVER_DWORD 78
345 #define D101M_CPUSAVER_BUNDLE_MAX_DWORD 65
346 #define D101M_CPUSAVER_MIN_SIZE_DWORD 126
349 #define D101M_B_RCVBUNDLE_UCODE \
488 /********************************************************/
489 /* CPUSaver micro code for the D101S */
490 /********************************************************/
494 /* Parameter values for the D101S */
495 #define D101S_CPUSAVER_DWORD 78
496 #define D101S_CPUSAVER_BUNDLE_MAX_DWORD 67
497 #define D101S_CPUSAVER_MIN_SIZE_DWORD 129
500 #define D101S_RCVBUNDLE_UCODE \
639 /********************************************************/
640 /* CPUSaver micro code for the D102 B-step */
641 /********************************************************/
646 This version of CPUSaver is different from all others in
647 a different way. It combines the CPUSaver algorithm with
648 fixes for bugs in the B-step hardware (specifically, bugs
649 with Inline Receive).
650 Thus, when CPUSaver is disabled, this micro code image will
651 still need to be loaded. Before this happens, the hit addresses
652 for the CPUSaver algorithm must be set to 0x1FFFF. The hit
653 addresses for CPUSaver are (starting with 0, and remember that
657 /* Parameter values for the D102 B-step */
658 #define D102_B_CPUSAVER_DWORD 91
659 #define D102_B_CPUSAVER_BUNDLE_MAX_DWORD 115
660 #define D102_B_CPUSAVER_MIN_SIZE_DWORD 70
663 #define D102_B_RCVBUNDLE_UCODE \
804 /********************************************************/
805 /* TCO micro code for the D102 B-step */
806 /********************************************************/
811 This version is a fix to TCO bug. This version can be loaded instead
812 the CPUSaver version by modifing the registry key "LoadTcoUCodeInsteadOfCpuSaver"
817 #define D102_B_TCO_UCODE \
957 /********************************************************/
958 /* Micro code for the D102 C-step */
959 /********************************************************/
961 /* Parameter values for the D102 C-step */
962 #define D102_C_CPUSAVER_DWORD 46
963 #define D102_C_CPUSAVER_BUNDLE_MAX_DWORD 54
964 #define D102_C_CPUSAVER_MIN_SIZE_DWORD 133 /* not implemented */
971 // this uCode include the CPU Saver and the TCO work around
974 #define D102_C_RCVBUNDLE_UCODE \
1112 /********************************************************/
1113 /* Micro code for the D102 E-step */
1114 /********************************************************/
1116 /* Parameter values for the D102 E-step */
1117 #define D102_E_CPUSAVER_DWORD 42
1118 #define D102_E_CPUSAVER_BUNDLE_MAX_DWORD 54
1119 #define D102_E_CPUSAVER_MIN_SIZE_DWORD 46
1121 #define D102_E_RCVBUNDLE_UCODE \