⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 if_eihk.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/if_eihk.html - generated by refgen from if_eihk.c --> <title> if_eihk </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>if_eihk</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>if_eihk</strong> - Intel 82596 Ethernet network interface driver for hkv3500 </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>  -  publish the <b>ei</b> network interface and initialize the driver and device<br><b><i><a href="./if_ei.html#eiTxStartup">eiTxStartup</a></i>(&nbsp;)</b>  -  start output on the chip<br><b><i><a href="./if_eihk.html#eiInt">eiInt</a></i>(&nbsp;)</b>  -  entry point for handling interrupts from the 82596<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements a hkv3500 specfic Intel 82596 Ethernet networkinterface driver.<p>This driver is derived from the generic if_ei ethernet driver to supporthkv3500 target board. The receive buffer scheme has been modified from asimplified memory structure to a flexible memory structure so that receivebuffers can be word-aligned, and thus support buffer loaning on a MIPS CPUarchitecture.<p>The driver requires several target-specific parameters, and some externalsupport routines which are detailed below.<p>This driver can run with the device configured in either big-endian orlittle-endian modes.  Error recovery code has been added to deal with some ofthe known errata in the A0 version of the device.  This driver supports up tofour 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>This driver provides the standard external interface with the followingexceptions.  All initialization is performed within the attach routine;there is no separate initialization routine.  Therefore, in the global interfacestructure, the function pointer to the initialization routine is NULL.<p>The only user-callable routine is <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>, which publishes the <b>ei</b>interface and initializes the driver and device.<p></blockquote><h4>TARGET-SPECIFIC PARAMETERS</h4><blockquote><p><dl><dt>the <i>sysbus</i> value<dd>This parameter is passed to the driver by <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>.<p>The Intel 82596 requires this parameter during initialization.  Thisparameter tells the device about the system bus, hence the name "sysbus."To determine the correct value for a target, refer to the document<i>Intel 32-bit Local Area Network (LAN) Component User's Manual. </i><p><dt>interrupt vector<dd>This parameter is passed to the driver by <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>.<p>The Intel 82596 generates hardware interrupts for various events withinthe device; thus it contains an interrupt handler routine.This driver calls <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>(&nbsp;)</b> to connect its interrupt handler to the interrupt vector generated as a result of the 82596 interrupt.<p><dt>shared memory address<dd>This parameter is passed to the driver by <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>.<p>The Intel 82596 device is a DMA type device and typically sharesaccess to some region of memory with the CPU.  This driver is designedfor systems that directly share memory between the CPU and the 82596.<p>This parameter can be used to specify an explicit memory region for useby the 82596.  This should be done on targets that restrict the 82596to a particular memory region.  The constant NONE can be used to indicatethat there are no memory limitations, in which case, the driver attempts to allocate the shared memory from the system space.<p><dt>number of Receive and Transmit Frame Descriptors<dd>These parameters are passed to the driver by <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>.<p>The Intel 82596 accesses frame descriptors in memory for each frametransmitted or received.  The number of frame descriptors at run-time can be configured using these parameters.<p><dt>Ethernet address<dd>This parameter is obtained by a call to an external support routine.<p>During initialization, the driver needs to know the Ethernet address forthe Intel 82596 device.  The driver calls the external support routine,<b><i><a href="../bsp/ep960cx/sysLib.html#sysEnetAddrGet" >sysEnetAddrGet</a></i>(&nbsp;)</b>, to obtain the Ethernet address.  For a description of<b><i><a href="../bsp/ep960cx/sysLib.html#sysEnetAddrGet" >sysEnetAddrGet</a></i>(&nbsp;)</b>, see "External Support Requirements" below. </dl><p></blockquote><h4>EXTERNAL SUPPORT REQUIREMENTS</h4><blockquote><p>This driver requires seven external support functions:<dl><dt>STATUS sysEnetAddrGet (int unit, char *pCopy)<dd>This routine provides the six-byte Ethernet addressused by <i>unit</i>.  It must copy the six-byte addressto the space provided by <i>pCopy</i>.  This routine returns OK, or ERROR if it fails.  The driver calls this routine, once per unit, using <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>.<p><dt>STATUS sys596Init (int unit, SCB *pScb)<dd>This routine performs any target-specific initializationrequired before the 82596 is initialized.  Typically, it is empty.  This routine must return OK, or ERROR if it fails.The driver calls this routine, once per unit, using <b><i><a href="./if_eihk.html#eihkattach">eihkattach</a></i>(&nbsp;)</b>.<p><dt>void sys596Port (int unit, int cmd, UINT32 addr)<dd>This routine provides access to the special portfunction of the 82596.  It delivers the command andaddress arguments to the port of the specified unit.The driver calls this routine primarily duringinitialization, but may also call it during errorrecovery procedures.<p><dt>void sys596ChanAtn (int unit)<dd>This routine provides the channel attention signal tothe 82596, for the specified <i>unit</i>.  The driver callsthis routine frequently throughout all phases ofoperation.<p><dt>void sys596IntEnable (int unit), void sys596IntDisable (int unit)<dd>These routines enable or disable the interrupt fromthe 82596 for the specified <i>unit</i>.  Typically, thisinvolves interrupt controller hardware, eitherinternal or external to the CPU.  Since the 82596itself has no mechanism for controlling its interruptactivity, these routines are vital to the correctoperation of the driver.  The driver calls theseroutines throughout normal operation to protectcertain critical sections of code from interrupthandler intervention.<p><dt>void sys596IntAck (int unit)<dd>This routine must perform any required interrupt acknowledgment or clearing.  Typically, this involves an operation to some interruptcontrol hardware.  Note that the INT signal from the 82596behaves 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>

⌨️ 快捷键说明

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