e100_ucode.h
来自「是关于linux2.5.1的完全源码」· C头文件 代码 · 共 411 行 · 第 1/2 页
H
411 行
/*******************************************************************************This software program is available to you under a choice of one of two licenses. You may choose to be licensed under either the GNU General Public License 2.0, June 1991, available at http://www.fsf.org/copyleft/gpl.html, or the Intel BSD + Patent License, the text of which follows:Recipient has requested a license and Intel Corporation ("Intel") is willingto grant a license for the software entitled Linux Base Driver for the Intel(R) PRO/100 Family of Adapters (e100) (the "Software") being provided by Intel Corporation. The following definitions apply to this license:"Licensed Patents" means patent claims licensable by Intel Corporation which are necessarily infringed by the use of sale of the Software alone or when combined with the operating system referred to below."Recipient" means the party to whom Intel delivers this Software."Licensee" means Recipient and those third parties that receive a license to any operating system available under the GNU General Public License 2.0 or later.Copyright (c) 1999 - 2002 Intel Corporation.All rights reserved.The license is provided to Recipient and Recipient's Licensees under the following terms.Redistribution and use in source and binary forms of the Software, with or without modification, are permitted provided that the following conditions are met:Redistributions of source code of the Software may retain the above copyright notice, this list of conditions and the following disclaimer.Redistributions in binary form of the Software may reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or materials provided with the distribution.Neither the name of Intel Corporation nor the names of its contributors shall be used to endorse or promote products derived from this Software without specific prior written permission.Intel hereby grants Recipient and Licensees a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Software, if any, in source code and object code form. This license shall include changes to the Software that are error corrections or other minor changes to the Software that do not add functionality or features when the Software is incorporated in any version of an operating system that has been distributed under the GNU General Public License 2.0 or later. This patent license shall apply to the combination of the Software and any operating system licensed under the GNU General Public License 2.0 or later if, at the time Intel provides the Software to Recipient, such addition of the Software to the then publicly available versions of such operating systems available under the GNU General Public License 2.0 or later (whether in gold, beta or alpha form) causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Software. NO hardware per se is licensed hereunder.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MECHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR IT CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ANY LOSS OF USE; DATA, OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*******************************************************************************/#ifndef _E100_UCODE_H_#define _E100_UCODE_H_/*e100_ucode.hThis file contains the loadable micro code arrays to implement receive bundling on the D101 A-step, D101 B-step, D101M (B-step only), D101S, D102 B-step, D102 B-step with TCO work around and D102 C-step.Each controller has its own specific micro code array. The array for one controller is totally incompatible with any other controller, and if used will most likely cause the controller to lock up and stop responding to the driver. Each micro code array has its own parameter offsets (described below), and they each have their own version number.*//************************************************************************** CPUSaver parameters** All CPUSaver parameters are 16-bit literals that are part of a* "move immediate value" instruction. By changing the value of* the literal in the instruction before the code is loaded, the* driver can change algorithm.** CPUSAVER_DWORD - This is the location of the instruction that loads* the dead-man timer with its inital value. By writing a 16-bit* value to the low word of this instruction, the driver can change* the timer value. The current default is either x600 or x800;* experiments show that the value probably should stay within the* range of x200 - x1000.** CPUSAVER_BUNDLE_MAX_DWORD - This is the location of the instruction* that sets the maximum number of frames that will be bundled. In* some situations, such as the TCP windowing algorithm, it may be* better to limit the growth of the bundle size than let it go as* high as it can, because that could cause too much added latency.* The default is six, because this is the number of packets in the* default TCP window size. A value of 1 would make CPUSaver indicate* an interrupt for every frame received. If you do not want to put* a limit on the bundle size, set this value to xFFFF.** CPUSAVER_MIN_SIZE_DWORD - This is the location of the instruction* that contains a bit-mask describing the minimum size frame that* will be bundled. The default masks the lower 7 bits, which means* that any frame less than 128 bytes in length will not be bundled,* but will instead immediately generate an interrupt. This does* not affect the current bundle in any way. Any frame that is 128* bytes or large will be bundled normally. This feature is meant* to provide immediate indication of ACK frames in a TCP environment.* Customers were seeing poor performance when a machine with CPUSaver* enabled was sending but not receiving. The delay introduced when* the ACKs were received was enough to reduce total throughput, because* the sender would sit idle until the ACK was finally seen.** The current default is 0xFF80, which masks out the lower 7 bits.* This means that any frame which is x7F (127) bytes or smaller* will cause an immediate interrupt. Because this value must be a * bit mask, there are only a few valid values that can be used. To* turn this feature off, the driver can write the value xFFFF to the* lower word of this instruction (in the same way that the other* parameters are used). Likewise, a value of 0xF800 (2047) would* cause an interrupt to be generated for every frame, because all* standard Ethernet frames are <= 2047 bytes in length.*************************************************************************/#ifndef UCODE_MAX_DWORDS#define UCODE_MAX_DWORDS 134#endif/********************************************************//* CPUSaver micro code for the D101A *//********************************************************//* Version 2.0 *//* This value is the same for both A and B step of 558. */#define D101_CPUSAVER_TIMER_DWORD 72#define D101_CPUSAVER_BUNDLE_DWORD UCODE_MAX_DWORDS#define D101_CPUSAVER_MIN_SIZE_DWORD UCODE_MAX_DWORDS#define D101_A_RCVBUNDLE_UCODE \{\0x03B301BB, 0x0046FFFF, 0xFFFFFFFF, 0x051DFFFF, 0xFFFFFFFF, 0xFFFFFFFF, \0x000C0001, 0x00101212, 0x000C0008, 0x003801BC, \0x00000000, 0x00124818, 0x000C1000, 0x00220809, \0x00010200, 0x00124818, 0x000CFFFC, 0x003803B5, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x0010009C, 0x0024B81D, 0x00130836, 0x000C0001, \0x0026081C, 0x0020C81B, 0x00130824, 0x00222819, \0x00101213, 0x00041000, 0x003A03B3, 0x00010200, \0x00101B13, 0x00238081, 0x00213049, 0x0038003B, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x0010009C, 0x0024B83E, 0x00130826, 0x000C0001, \0x0026083B, 0x00010200, 0x00134824, 0x000C0001, \0x00101213, 0x00041000, 0x0038051E, 0x00101313, \0x00010400, 0x00380521, 0x00050600, 0x00100824, \0x00101310, 0x00041000, 0x00080600, 0x00101B10, \0x0038051E, 0x00000000, 0x00000000, 0x00000000 \}/********************************************************//* CPUSaver micro code for the D101B *//********************************************************//* Version 2.0 */#define D101_B0_RCVBUNDLE_UCODE \{\0x03B401BC, 0x0047FFFF, 0xFFFFFFFF, 0x051EFFFF, 0xFFFFFFFF, 0xFFFFFFFF, \0x000C0001, 0x00101B92, 0x000C0008, 0x003801BD, \0x00000000, 0x00124818, 0x000C1000, 0x00220809, \0x00010200, 0x00124818, 0x000CFFFC, 0x003803B6, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x0010009C, 0x0024B81D, 0x0013082F, 0x000C0001, \0x0026081C, 0x0020C81B, 0x00130837, 0x00222819, \0x00101B93, 0x00041000, 0x003A03B4, 0x00010200, \0x00101793, 0x00238082, 0x0021304A, 0x0038003C, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x00000000, 0x00000000, 0x00000000, 0x00000000, \0x0010009C, 0x0024B83E, 0x00130826, 0x000C0001, \0x0026083B, 0x00010200, 0x00134837, 0x000C0001, \0x00101B93, 0x00041000, 0x0038051F, 0x00101313, \0x00010400, 0x00380522, 0x00050600, 0x00100837, \0x00101310, 0x00041000, 0x00080600, 0x00101790, \0x0038051F, 0x00000000, 0x00000000, 0x00000000 \}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?