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