Changeset 614 for soft/giet_vm/giet_libs


Ignore:
Timestamp:
Jul 15, 2015, 6:15:52 PM (10 years ago)
Author:
bellefin
Message:

Change the syscalls related to the NIC and the CMA
1) In a CHBUF, every buffer is linked to a variable called “status” which is equal to 1 if the buffer is full or 0 if it is empty. The status occupies 64 bytes to simplify cache coherence
2) The CHBUF descriptor now contains the physical addresses of the buffer and its status. It only occupies 64 bits.

Location:
soft/giet_vm/giet_libs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/stdio.c

    r588 r614  
    698698
    699699///////////////////////////////////////////
    700 void giet_fbf_cma_start( void *       buf0,
    701                          void *       buf1,
    702                          unsigned int length )
     700void giet_fbf_cma_init_buf( void* buf0_vbase,
     701                            void* buf1_vbase,
     702                            void* sts0_vaddr,
     703                            void* sts1_vaddr )
     704{
     705    if ( sys_call( SYSCALL_FBF_CMA_INIT_BUF,
     706                   (unsigned int)buf0_vbase,
     707                   (unsigned int)buf1_vbase,
     708                   (unsigned int)sts0_vaddr,
     709                   (unsigned int)sts1_vaddr ) )   giet_exit("error in giet_fbf_cma_init_buf()");
     710}
     711
     712///////////////////////////////////////////
     713void giet_fbf_cma_start( unsigned int length )
    703714{
    704715    if ( sys_call( SYSCALL_FBF_CMA_START,
    705                    (unsigned int)buf0,
    706                    (unsigned int)buf1,
    707                    length,
    708                    0 ) )   giet_exit("error in giet_fbf_cma_start()");
     716                   length,
     717                   0, 0, 0 ) )   giet_exit("error in giet_fbf_cma_start()");
    709718}
    710719
  • soft/giet_vm/giet_libs/stdio.h

    r588 r614  
    2727#define SYSCALL_GLOBAL_TASK_ID       0x09
    2828#define SYSCALL_FBF_CMA_ALLOC        0x0A
    29 #define SYSCALL_FBF_CMA_START        0x0B
    30 #define SYSCALL_FBF_CMA_DISPLAY      0x0C
    31 #define SYSCALL_FBF_CMA_STOP         0x0D
    32 #define SYSCALL_EXIT                 0x0E
    33 #define SYSCALL_PROCS_NUMBER         0x0F
    34 
    35 #define SYSCALL_FBF_SYNC_WRITE       0x10
    36 #define SYSCALL_FBF_SYNC_READ        0x11
    37 #define SYSCALL_THREAD_ID            0x12
    38 //                                   0x13
     29#define SYSCALL_FBF_CMA_INIT_BUF     0x0B
     30#define SYSCALL_FBF_CMA_START        0x0C
     31#define SYSCALL_FBF_CMA_DISPLAY      0x0D
     32#define SYSCALL_FBF_CMA_STOP         0x0E
     33#define SYSCALL_EXIT                 0x0F
     34
     35#define SYSCALL_PROCS_NUMBER         0x10
     36#define SYSCALL_FBF_SYNC_WRITE       0x11
     37#define SYSCALL_FBF_SYNC_READ        0x12
     38#define SYSCALL_THREAD_ID            0x13
    3939#define SYSCALL_TIM_ALLOC            0x14
    4040#define SYSCALL_TIM_START            0x15
     
    228228extern void giet_fbf_cma_alloc();
    229229
    230 extern void giet_fbf_cma_start( void*        buf0,
    231                                 void*        buf1,
    232                                 unsigned int length );
     230extern void giet_fbf_cma_init_buf( void* buf0_vbase,
     231                                   void* buf1_vbase,
     232                                   void* sts0_vaddr,
     233                                   void* sts1_vaddr );
     234
     235extern void giet_fbf_cma_start( unsigned int length );
    233236
    234237extern void giet_fbf_cma_display( unsigned int buffer );
Note: See TracChangeset for help on using the changeset viewer.