Changes between Version 5 and Version 6 of ioc_device_api


Ignore:
Timestamp:
Jan 20, 2020, 6:53:05 PM (5 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ioc_device_api

    v5 v6  
    3535== __B) Initialisation__ ==
    3636
    37 == __C) User API__ ==
    38 
    39 === 1) '''void dev_ioc_init'''( xptr_t    xp_dev ) ===
    40 
    4137The '''void dev_ioc_init()''' function makes two initializations :
    4238 * it initialises the IOC specific fields of the chdev descriptor.
    4339 * it initialises the implementation specific IOC hardware device and associated data structures if required.
    44 It can be executed in another cluster than the cluster containing the IOC device descriptor or the IOC hardware device itself.
    45 The <xp_dev> argument is an extended pointer on the IOC device descriptor.
     40It must be called by a local thread.
    4641
    47 === 1) '''void dev_ioc_read'''( char * buffer , uint32_t  lba , uint32_t  count ) ===
     42== __C) User API__ ==
    4843
    49 This blocking function try to tranfer one or several contiguous blocks of data from the block device to a memory buffer. The calling thread is registered in the device pending request queue, and descheduled, waiting on transfer completion. It is re-activared by the IRQ signaling completion. It must be called in the client cluster.
     44=== B.1) '''void dev_ioc_read()''' ===
     45
     46This blocking function try to tranfer one or several contiguous blocks of data from the block device to a memory buffer. The calling thread is registered in the device pending request queue, and descheduled, waiting on transfer completion.
     47The <buffer> argument is a
     48The <lba> argument is the first block index in block device.
     49The <count> argument is the number of blocks to move.
     50
     51=== 2) '''void dev_ioc_write()''' ===
     52
     53This blocking function try to tranfer one or several contiguous blocks of data from a memory buffer to the block device. The calling thread is actually registered in the device pending request queue, and descheduled, waiting on transfer completion.
    5054The <buffer> argument is...
    5155The <lba> argument is the first block index in block device.
    5256The <count> argument is the number of blocks to move.
    5357
    54 === 2) '''void dev_ioc_write'''( char * buffer , uint32_t  lba , uint32_t  count ) ===
     58== __D) Driver API__ ==
    5559
    56 This blocking function try to tranfer one or several contiguous blocks of data from a memory buffer to the block device. The calling thread is actually registered in the device pending request queue, and descheduled, waiting on transfer completion. It is re-activared by the IRQ signaling completion. It must be called in the client cluster.
    57 The <buffer> argument is...
    58 The <lba> argument is the first block index in block device.
    59 The <count> argument is the number of blocks to move.
     60The IOC device defines defines four command types to access the IOC driver(s) :
     61 - '''IOC_WRITE''' : move blocks from a kernel buffer to the IOC device, with a descheduling policy.
     62 - '''IOC_READ'''  : move blocks from the IOC device to a kernel buffer, with a descheduling policy.
     63 - '''IOC_SYNC_WRITE'''   :
     64 - '''IOC_SYNC_READ'''    : 
     65
     66These four commands use the three following arguments, that must be registered, with the command type, in the ''ioc_command_t'' structure embedded in the client thread descriptor :
     67 - '''npixels''' : number of pixels to be moved.
     68 - '''buffer''' : pointer on buffer in (can be in user space or in kernel space).
     69 - '''offset''' : offset in FBF (number of pixels).