Changes between Version 14 and Version 15 of kernel_syscalls


Ignore:
Timestamp:
Nov 10, 2014, 2:17:13 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_syscalls

    v14 v15  
    1 = GIET-VM  / Syscall Handler =
     1= GIET-VM  / Syscall Handlers =
    22
    33The [source:soft/giet_vm/giet_kernel/sys_handler.c sys_handler.c] and [source:soft/giet_vm/giet_kernel/sys_handler.h sys_handler.h] files define the kernel data structure and functions that are used to handle the system calls. These functions are prefixed by ''_'' to remind that they can only be executed by a processor in kernel mode.
     
    5151== __NIC related syscall handlers__ ==
    5252
    53 === int '''_sys_nic_rx_alloc'''() ===
    54 This function allocates a private NIC_RX channel, the associated NIC_RX chbuf, and a private CMA channel to the calling task, and register these channel indexes in the task context.
    55 Return -1 if no NIC_RX channel available, or if no CMA channel available.
     53These '4 functions can be used for both a NIC_RX or NIC_TX channel, depending on the '''is_rx''' argument.
    5654
    57 === int '''_sys_nic_tx_alloc'''() ===
    58 This function allocates a private NIC_TX channel, the associated NIC_TX chbuf, and a private CMA channel to the calling task, and register these channel indexes in the task context.
    59 Return -1 if no NIC_TX channel available, or if no CMA channel available.
     55=== int '''_sys_nic_alloc'''( unsigned int is_rx ) ===
     56This function allocates a private NIC_RX or NIC_TX channel, the associated chbuf, and a private CMA channel to the calling task, and register these channel indexes in the task context.
     57Returns 0 if success. Return -1 if no NIC channel available, or if no CMA channel available.
    6058
    61 === int '''_sys_nic_rx_start'''() ===
    62 This function starts the NIC_RX and the CMA channels allocated to the calling task.
    63 Returns -1 if no NIC_RX channel or no CMA channel allocated to the calling task.
     59=== int '''_sys_nic_start'''( unsigned int is_rx ) ===
     60This function starts the NIC and the CMA channels allocated to the calling task.
     61Returns 0 if success. Returns -1 if no NIC channel or no CMA channel allocated to the calling task.
    6462
    65 === int '''_sys_nic_tx_start'''() ===
    66 This function starts the NIC_RX and the CMA channels allocated to the calling task.
    67 Returns -1 if no NIC_RX channel or no CMA channel allocated to the calling task.
    68 
    69 === int '''_sys_nic_rx_move'''( void* buffer ) ===
    70 This function moves one 4kbytes container from the private kernel NIC_RX chbuf allocated to the calling task, to an user buffer.
     63=== int '''_sys_nic_move'''(  unsigned int is_rx,  void* buffer ) ===
     64This function moves one 4kbytes container between the kernel chbuf allocated to the calling task, and an user buffer.
     65 * '''is_rx''' defines the transfer direction (user -> kernel for TX / kernel -> user for RX)
    7166 * '''buffer''' is the user buffer virtual base address.
    72 It is blocking if the kernel NIC_RX chbuf is empty, with a time-out limit.
     67It is blocking if the kernel chbuf is empty (for an RX transfer) or full (for a TX transfer). The bloking situation
     68is bounded by a timeout defined by the GIET_NIC_TIMEOUT parameter defined in the ''giet_config.h'' file.
    7369Returns 0 if success, returns -1 if the user buffer address is illegal, or if there is no  NIC_RX channel allocated to the calling task, or if the timeout is elapsed.
    74 
    75 === int '''_sys_nic_tx_move'''( void* buffer ) ===
    76 This function moves one 4kbytes container from an user buffer, to the private kernel NIC_TX chbuf allocated to the calling task.
    77  * '''buffer''' is the user buffer virtual base address.
    78 It is blocking if the kernel NIC_TX chbuf is full, with a time-out limit.
    79 Returns 0 if success, returns -1 if the user buffer address is illegal, or if there is no  NIC_TX channel allocated to the calling task, or if the timeout is elapsed.
    8070
    8171