Changes between Version 4 and Version 5 of nic_driver


Ignore:
Timestamp:
Oct 22, 2014, 10:33:14 AM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • nic_driver

    v4 v5  
    1515The addressable registers map is defined [source:soft/giet_vm/giet_drivers/nic_driver.h here].
    1616
    17 WARNING : The CMA functions are not implemented yet.
     17WARNING : The NIC_TX functions are not implemented yet.
    1818
    1919== __Initialization Functions__ ==
     
    2121 === void '''_nic_global_init'''( unsigned int channels, unsigned int vis, unsigned int bc_enable, unsigned int bypass_enable ) ===
    2222This function initializes the NIC global registers.
    23  * channels : number of active channels
    24  * vis : bit vector(one bit per active channel)
    25  * bc_enable : broadcast packets accepted if non zero
    26  * bypass_enable : TX -> RX bypass supported if non zero
     23 * '''channels''' : number of active channels
     24 * '''vis''' : bit vector(one bit per active channel)
     25 * '''bc_enable''' : broadcast packets accepted if non zero
     26 * '''bypass_enable''' : TX -> RX bypass supported if non zero
    2727This function is used only by the boot code.
    2828
    2929 === void '''_nic_channel_init'''( unsigned int index,  unsigned int mac4,  unsigned int mac2 ) ===
    3030This function initializes the NIC registers for a given channel.
    31  * index : channel index
    32  * mac4 : 32 LSB bits of the MAC address.
    33  * mac2 : 16 MSB bits of the MAC address.
     31 * '''index''' : channel index
     32 * '''mac4''' : 32 LSB bits of the MAC address.
     33 * '''mac2''' : 16 MSB bits of the MAC address.
    3434This function is used only by the boot code.
    3535
     
    3737
    3838 === void '''_nic_sync_send'''( void* vbase ) ===
    39 This blocking function uses a physical_memcpy() to transfer one container (4 Kbytes) from a single user buffer to the NIC channel allocated to the calling task. The ''vbase'' argument is the user buffer virtual base address.
     39This blocking function uses a physical_memcpy() to transfer one container (4 Kbytes) from a single user buffer to the NIC channel allocated to the calling task. The '''vbase''' argument is the user buffer virtual base address.
    4040
    4141 === void '''_nic_sync_receive'''( void* vbase ) ===
    42 This blocking function uses a physical_memcpy() to transfer one container (4 Kbytes) from the NIC channel allocated to the calling task, to a single user buffer. The ''vbase'' argument is the user buffer virtual base address.
     42This blocking function uses a physical_memcpy() to transfer one container (4 Kbytes) from the NIC channel allocated to the calling task, to a single user buffer. The '''vbase''' argument is the user buffer virtual base address.
    4343
    4444== __Functions using the chained buffer DMA__ ==
    4545
    46  === void '''_nic_cma_start_send'''( ) ===
    47 To be defined...
     46 === void '''_nic_cma_start_send'''( unsigned int nic_channel,  unsigned int cma_channel,  chbuf_descriptor_t* chbuf ) ===
     47 This non blocking funtion starts a CMA channel to transfer a flow of containers from a NIC_RX chbuf to a kernel chbuf.
     48 * '''nic_channel''' : NIC_RX channel index
     49 * '''cma_channel''' : CMA channel index
     50 * '''chbuf'''       : pointer on chbuf in kernel memory
     51 The NIC channel is supposed to be already initialized.
    4852
    49  === void '''_nic_cma_stop_send'''( ) ===
    50 To be defined...
    51 
    52 === void '''_nic_cma_start_receive'''( ) ===
    53 To be defined...
    54 
    55  === void '''_nic_cma_stop_receive'''( ) ===
    56 To be defined...
     53=== void '''_nic_cma_start_receive'''(  unsigned int nic_channel,  unsigned int cma_channel,  chbuf_descriptor_t* chbuf ) ===
     54This non blocking funtion starts a CMA channel to transfer a flow of containers from a NIC_RX chbuf to a kernel chbuf.
     55 * '''nic_channel''' : NIC_RX channel index
     56 * '''cma_channel''' : CMA channel index
     57 * '''chbuf'''       : pointer on chbuf in kernel memory
     58The NIC channel is supposed to be already initialized.
    5759
    5860== __ Interrupt Service Routines__ ==
     
    6062 === void '''_nic_rx_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
    6163This interrupt Service Routine  handles IRQs from a NIC_RX channel.
     64WARNING : Not implemented yet...
    6265
    6366 === void '''_nic_tx_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===
    6467This interrupt Service Routine  handles IRQs from a NIC_TX channel.
    65 
     68WARNING : Not implemented yet...