2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide
2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide
2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
List of APIs API Call Reference<br />
RETURN An END object pointer, or NULL on error.<br />
LOCAL STATUS mgiUnload(DRV_CTRL *pDrvCtrl)<br />
DESCRIPTION This function unloads the ethernet port END driver from the<br />
MUX.<br />
INPUT<br />
DRV_CTRL<br />
*pDrvCtrl<br />
Pointer to DRV_CTRL structure<br />
OUTPUT Driver memory allocated is freed.<br />
Driver is disconnected from the MUX.<br />
RETURN OK.<br />
LOCAL STATUS memoryInit(DRV_CTRL *pDrvCtrl)<br />
DESCRIPTION This function allocates the necessary memory space <strong>for</strong> the Tx/Rx<br />
descriptors as well as Rx buffers. Both Tx/Rx descriptor memory<br />
space and Rx buffers allocated using the malloc() routine<br />
which defines this memory space cacheable as the low level driver<br />
supports cacheable descriptors. This is done to allow better packet<br />
process per<strong>for</strong>mance. The function assigns the Rx buffer memory<br />
space to be the network pool cluster memory space which means<br />
that the network pool clusters and the Gigabit Ethernet Controller<br />
buffers are the same. This allow the zero copy in Rx where the Rx<br />
data is placed into the network pool clusters with no copying. This<br />
function also makes sure the descriptor and cluster addresses are<br />
cache line size aligned in order to avoid data loss when<br />
per<strong>for</strong>ming data cache flush or invalidate.<br />
Tx/Rx<br />
descriptors<br />
After memory allocation the driver creates and initializes netBufLib,<br />
the pool of mBlk and clBlk is created. The pool of clusters<br />
is defined to be the Rx buffers. This way the driver can practice the<br />
Zero Copy Buff methodology.<br />
Call low level routine to create Tx descriptor data structure.<br />
Call low level routine to create Rx descriptor data structure.<br />
Assign each Rx descriptor with netBufLib cluster.<br />
5 - 92 VxWorks 5.5/Tornado <strong>2.2</strong> <strong>BSP</strong> <strong>Rel</strong>. <strong>1.0</strong> <strong>for</strong> <strong>PPMC</strong>-<strong>275</strong>