Changes between Version 3 and Version 4 of rdk_driver


Ignore:
Timestamp:
Mar 28, 2015, 2:19:37 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rdk_driver

    v3 v4  
    55The [source:soft/giet_vm/giet_drivers/rdk_driver.c rdk_driver.c] and [source:soft/giet_vm/giet_drivers/rdk_driver.h rdk_driver.h] files define the RDK driver.
    66
    7 This driver supports a virtual disk implemented as a memory segment, in the physical address space. This ramdisk vseg must be defined in the mapping.
     7This driver supports RAMDISK, that is a virtual disk implemented as a memory segment, in the physical address space. The ramdisk vseg must be defined in the mapping.
    88
    9 This driver is called by the generic IOC driver, when the USE_IOC_RDK flag is set in the hard_config.h file.
     9This driver is called by the generic FAT handler, when the USE_IOC_RDK flag is set in the hard_config.h file.
    1010
    11 The _rdk_read() and _rdk_write() blocking functions use a software memcpy, whatever the selected mode (BOOT / KERNEL / USER).
    12 These blocking functions return only when the transfer is completed.
    13 As the number of concurrent accesses is not bounded, these functions don't use the _ioc_lock variable.
     11The _rdk_access() function uses a software memcpy whatever the requested mode (synchronous or descheduling), and returns only when the transfer is completed.
     12
     13As the number of concurrent accesses is not bounded, these functions don't use any lock.
    1414
    1515The SEG_RDK_BASE virtual address must be defined in the hard_config.h file when the USE_IOC_RDK flag is set.
    1616
    17 #ifndef _GIET_RDK_DRIVERS_H_
    18 #define _GIET_RDK_DRIVERS_H_
     17 == __Access function__ ==
    1918
    20  === unsigned int '''_rdk_init()''' ===
    21 This function does nothing, but is required by the generic IOC API.
    22 
    23  === unsigned int '''_rdk_read'''( unsigned int lba,   unsigned int buffer,  unsigned int count ) ===
    24 This function transfer data from the RAMDISK to a memory buffer.
    25  * mode     : BOOT / KERNEL / USER (unused)
    26  * lba      : first block index on the block device
    27  * buffer   : virtual base address of the memory buffer
    28  * count    : number of blocks to be transfered.
     19 === unsigned int '''_rdk_access'''( unsigned int use_irq  ,  unsigned int to_mem  ,  unsigned int lba  ,   unsigned int buffer  ,  unsigned int count ) ===
     20This function transfer data between the RAMDISK and  a  memory buffer.
     21 * '''use_irq''' : unused, access is always synchronous
     22 * '''to_mem''' : Boolean to memory when non zero
     23 * '''lba'''      : first block index on the block device
     24 * '''buffer'''   : virtual base address of the memory buffer
     25 * '''count'''    : number of blocks to be transfered.
    2926Returns 0 if success, > 0 if error.
    3027
    31  === unsigned int '''_rdk_write'''( unsigned int lba,   unsigned int buffer,  unsigned int count ) ===
    32 This function transfer data from a memory buffer to the RAMDISK.
    33  * mode     : BOOT / KERNEL / USER (unused)
    34  * lba      : first block index on the block device
    35  * buffer   : virtual base address of the memory buffer
    36  * count    : number of blocks to be transfered.
    37 Returns 0 if success, > 0 if error.
    38 
    39  === unsigned int '''_rdk_get_block_size'''() ===
    40 This function returns the block size.
    41 
    42  === unsigned int '''_rdk_get_status'''() ===
    43 This function returns always 0, but is required bi the generic IOC API.
    44 
    45