ei82596end.html

来自「vxworks相关论文」· HTML 代码 · 共 301 行

HTML
301
字号
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ei82596End.html - generated by refgen from ei82596End.c --> <title> ei82596End </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>ei82596End</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>ei82596End</strong> - END style Intel 82596 Ethernet network interface driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ei82596End.html#ei82596EndLoad">ei82596EndLoad</a></i>(&nbsp;)</b>  -  initialize the driver and device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements an Intel 82596 Ethernet network interface driver.This driver is designed to be moderately generic.  It operates unmodifiedacross the range of architectures and targets supported by VxWorks.  To achieve this, this driver requires some external support routines as well as several target-specific parameters.  These parameters (and the mechanisms used to communicate them to the driver) are detailed below.<p>This driver can run with the device configured in eitherbig-endian or little-endian modes.  Error recovery code has been added todeal with some of the known errata in the A0 version of the device.  Thisdriver supports up to four individual units per CPU.<p></blockquote><h4>BOARD LAYOUT</h4><blockquote><p>This device is on-board.  No jumpering diagram is necessary.<p></blockquote><h4>EXTERNAL INTERFACE</h4><blockquote><p>The driver provides one standard external interface, <b><i><a href="./ei82596End.html#ei82596EndLoad">ei82596EndLoad</a></i>(&nbsp;)</b>.As input, this routine takes a string of colon-separated parameters.The parameters should be specified in hexadecimal (optionally preceded by "0x" or a minus sign "-").  The parameter string is parsed using <b><i><a href="./ansiString.html#strtok_r">strtok_r</a></i>(&nbsp;)</b>, and each parameter is converted from string to binary by a call to:<pre>    strtoul(parameter, NULL, 16).</pre></blockquote><h4>TARGET-SPECIFIC PARAMETERS</h4><blockquote><p>The format of the parameter string is:<p>&nbsp;&nbsp;&nbsp;&nbsp;<i>unit</i>:<i>ivec</i>:<i>sysbus</i>:<i>memBase</i>:<i>nTfds</i>:<i>nRfds</i>:<i>offset</i><p><dl><dt><i>unit</i><dd>A convenient holdover from the former model.  It is only used in thestring name for the driver.<p><dt><i>ivec</i><dd>This is the interrupt vector number of the hardware interrupt generated bythis ethernet device.  The driver uses <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>(&nbsp;)</b> to attach an interrupthandler to this interrupt.<p><dt><i>sysbus</i><dd>This parameter tells the device about the system bus. To determine the correct value for a target, see <i>Intel 32-bit Local Area Network (LAN) Component User's Manual. </i><p><dt><i>memBase</i><dd>This parameter specifies the base address of a DMA-able cache-freepre-allocated memory region for use as a memory pool for transmit/receivedescriptors, buffers, and other device control structures.If there is no pre-allocated memory available for the driver, this parametershould be -1 (NONE). In which case, the driver calls <b><i>cacheDmaAlloc</i>(&nbsp;)</b> toallocate cache-safe memory.<p><dt><i>nTfds</i><dd>This parameter specifies the number of transmit descriptor/buffers to beallocated. If this parameter is zero or -1 (NULL), a default of 32 is used.<p><dt><i>nRfds</i><dd>This parameter specifies the number of receive descriptor/buffers to beallocated. If this parameter is zero or -1 (NULL), a default of 32 is used.<p><dt><i>offset</i><dd>Specifies the memory alignment offset. </dl><p></blockquote><h4>EXTERNAL SUPPORT REQUIREMENTS</h4><blockquote><p>This driver requires seven external support functions:<dl><dt><b><i><a href="../bsp/pc386/sysLib.html#sys596IntEnable" >sys596IntEnable</a></i>(&nbsp;)</b><dd><pre>    void sys596IntEnable (int unit)</pre>This routine provides a target-specific interface to enable Ethernet deviceinterrupts for a given device unit.<p><dt><b><i><a href="../bsp/pc386/sysLib.html#sys596IntDisable" >sys596IntDisable</a></i>(&nbsp;)</b><dd><pre>    void sys596IntDisable (int unit)</pre>This routine provides a target-specific interface to disable Ethernet deviceinterrupts for a given device unit.<p><dt><b><i><a href="../bsp/ep960cx/sysLib.html#sysEnetAddrGet" >sysEnetAddrGet</a></i>(&nbsp;)</b><dd><pre>    STATUS sysEnetAddrGet (int unit, char *enetAdrs)</pre>This routine provides a target-specific interface to access a device Ethernetaddress. This routine should provide a six-byte Ethernet address in  the <i>enetAdrs</i> parameter and return OK or ERROR.<p><dt><b><i><a href="../bsp/pc386/sysLib.html#sys596Init" >sys596Init</a></i>(&nbsp;)</b><dd><pre>    STATUS sys596Init (int unit)</pre>This routine performs any target-specific initialization required before the82596 is initialized.  Typically, it is empty.  This routine must return OKor ERROR.<p><dt><b><i><a href="../bsp/pc386/sysLib.html#sys596Port" >sys596Port</a></i>(&nbsp;)</b><dd><pre>    void sys596Port (int unit, int cmd, UINT32 addr)</pre>This routine provides access to the special port function of the 82596.  Itdelivers the command and address arguments to the port of the specified unit.The driver calls this routine primarily during initialization and, under some conditions, during error recovery procedures.<p><dt><b><i><a href="../bsp/pc386/sysLib.html#sys596ChanAtn" >sys596ChanAtn</a></i>(&nbsp;)</b><dd><pre>    void sys596ChanAtn (int unit)</pre>This routine provides the channel attention signal to the 82596 for thespecified <i>unit</i>.  The driver calls this routine frequently throughout allphases of operation.<p><dt><b><i><a href="../bsp/pc386/sysLib.html#sys596IntAck" >sys596IntAck</a></i>(&nbsp;)</b><dd><pre>void sys596IntAck (int unit)</pre>This routine must perform any required interrupt acknowledgment or clearing.Typically, this involves an operation to some interrupt control hardware.Note that the INT signal from the 82596 behaves in an "edge-triggered" mode.Therefore, this routine typically clears a latch within the control circuitry.The driver calls this routine from the interrupt handler. </dl><p></blockquote><h4>SYSTEM RESOURCE USAGE</h4><blockquote><p>The driver uses <b><i><a href="./cacheLib.html#cacheDmaMalloc">cacheDmaMalloc</a></i>(&nbsp;)</b> to allocate memory to share with the 82596.The fixed-size pieces in this area total 160 bytes.  The variable-size piecesin this area are affected by the configuration parameters specified in the<b><i><a href="./if_ei.html#eiattach">eiattach</a></i>(&nbsp;)</b> call.  The size of one RFD (Receive Frame Descriptor) is 1536bytes.  The size of one TFD (Transmit Frame Descriptor) is 1534 bytes.  Formore on RFDs and TFDs, see the<i>Intel 82596 User's Manual. </i><p>The 82596 requires ether that this shared memory region is non-cacheableor that the hardware implements bus snooping.  The driver cannot maintaincache coherency for the device. This is because fields within the commandstructures are asynchronously modified by both the driver and the device,and these fields might share the same cache line.<p></blockquote><h4>TUNING HINTS</h4><blockquote><p>The only adjustable parameters are the number of TFDs and RFDs that arecreated at run-time.  These parameters are given to the driver when <b><i><a href="./if_ei.html#eiattach">eiattach</a></i>(&nbsp;)</b>is called.  There is one TFD and one RFD associated with each transmittedframe and each received frame respectively.  For memory-limited applications,decreasing the number of TFDs and RFDs might be a good idea.  Increasing thenumber of TFDs provides no performance benefit after a certain point.Increasing the number of RFDs provides more buffering before packets aredropped.  This can be useful if there are tasks running at a higher prioritythan the net task.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ei82596End.html#top">ei82596End</a></b>, <b><a href="./ifLib.html#top">ifLib</a></b>,  <i>Intel 82596 User's Manual, </i><i>Intel 32-bit Local Area Network (LAN) Component User's Manual </i><hr><a name="ei82596EndLoad"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ei82596EndLoad</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ei82596EndLoad</i>(&nbsp;)</strong> - initialize the driver and device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>END_OBJ *ei82596EndLoad    (    char * initString /* parameter string */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes both driver and device to an operational stateusing the device-specific values specified by <i>initString</i>.The <i>initString</i> parameter expects an ordered list of colon-separated values. <p>The format of the <i>initString</i> is:<p>&nbsp;&nbsp;&nbsp;&nbsp;<i>unit</i>:<i>ivec</i>:<i>sysbus</i>:<i>memBase</i>:<i>nTfds</i>:<i>nRfds</i><p><dl><dt><i>unit</i><dd>Specifies the unit number for this device.<p><dt><i>ivec</i><dd>This is the interrupt vector number of the hardware interrupt generated bythis Ethernet device.  The driver uses <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>(&nbsp;)</b> to attach an interrupthandler for this interrupt.<p><dt><i>sysbus</i><dd>Passes in values as described in the Intel manualfor the 82596.  A default number of transmit/receive frames of 32 can beselected by passing zero in the parameters <i>nTfds</i> and <i>nRfds</i>.In other cases, the number of frames selected should be greater than two.<p><dt><i>memBase</i><dd> Informs the driver about the shared memory region.  The 82596 shares a region of memory with the driver.  The caller of this routine can specify the address of this memory region, or can specify that the driver must obtain this memory region from the system resources.  If this parameter is set to the constant "NONE", this routine tries to allocate the shared memory from the system.  Any other value for this parameter is interpreted by this routine as the address of the shared memory region to be used.<p>If the caller provides the shared memory region, the driver assumesthat this region does not require cache-coherency operations, nor does it require conversions between virtual and physical addresses.If the caller indicates that this routine must allocate the shared memoryregion, this routine uses <b><i><a href="./cacheLib.html#cacheDmaMalloc">cacheDmaMalloc</a></i>(&nbsp;)</b> to obtain some  non-cacheable memory.  The attributes of this memory are checked, and, if the memory is not both read- and write-coherent, this routine aborts. </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>An END object pointer or NULL.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ei82596End.html#top">ei82596End</a></b>, <b><a href="./ifLib.html#top">ifLib</a></b>,  <i>Intel 82596 User's Manual </i></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?