Ignore:
Timestamp:
Nov 11, 2014, 4:14:55 PM (10 years ago)
Author:
alain
Message:

Introducing the CMA_RX, CMA_TX, NIC_RX, NIC_TX slots in the task context.
This allows an user task to have a private NIC channel and a private CMA channel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_kernel/sys_handler.h

    r440 r449  
    1414
    1515#include <mapping_info.h>
     16#include <giet_config.h>
    1617
    1718///////////////////////////////////////////////////////////////////////////////////
     
    2223
    2324///////////////////////////////////////////////////////////////////////////////////
    24 // This structure can be used by the vci_chbuf_dma component to transfer a stream
     25// This structure is used by the vci_chbuf_dma component to transfer a stream
    2526// of images from two buffers in user space to the frame buffer in kernel space.
    2627// It contains two chbuf descriptors
     
    3536    unsigned long long  fbf;      // physical address + status for user buffer 0
    3637    unsigned int        length;   // buffer length (bytes)
    37     unsigned int        padding;  // for 32 bytes alignment
     38    unsigned int        padding;  // 8 bytes alignment
    3839} fbf_chbuf_t;   
     40
     41//////////////////////////////////////////////////////////////////////////////////
     42// This structure define the generic chained buffer used by the vci_chbuf_dma
     43// component to move a stream of containers to or from the vci_multi_nic component.
     44// The same structure is used for both TX or RX transfers.
     45// The single buffer size and the number of buffers must be defined by the
     46// GIET_NIC_CHBUF_SIZE and GIET_NIC_CHBUF_NBUFS parameters in giet_config.h.
     47// - The buffer array is the chbuf descriptor, shared by the vci_chbuf_dma,
     48//   and by the kernel.
     49// - The index field is only used by the kernel. It define the currently pointed
     50//   buffer for read (RX transfer) or write (TX transfer).
     51//////////////////////////////////////////////////////////////////////////////////
     52
     53typedef struct nic_chbuf_s
     54{
     55    unsigned long long  buffer[GIET_NIC_CHBUF_NBUFS];      // chbuf descriptor
     56    unsigned int        index;                             // current buffer index
     57    unsigned int        padding;                           // 8 bytes alignment
     58} nic_chbuf_t;
     59
    3960
    4061//////////////////////////////////////////////////////////////////////////////////
     
    7293//////////////////////////////////////////////////////////////////////////////
    7394
    74 int _sys_nic_alloc();
     95int _sys_nic_alloc( unsigned int is_rx );
    7596
    76 int _sys_nic_sync_send( void* vbuf );
     97int _sys_nic_start( unsigned int is_rx,
     98                    unsigned int mac4,
     99                    unsigned int mac2 );
    77100
    78 int _sys_nic_sync_receive( void* vbuf );
     101int _sys_nic_move( unsigned int is_rx,
     102                   void*        buffer );
     103
     104int _sys_nic_stop( unsigned int is_rx );
    79105
    80106//////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.