Changes between Initial Version and Version 1 of rdk_driver


Ignore:
Timestamp:
Oct 15, 2014, 10:38:39 AM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rdk_driver

    v1 v1  
     1= GIET-VM / RDK Driver =
     2
     3[[PageOutline]]
     4
     5The [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.
     6
     7This driver supports a virtual disk implemented as a memory segment, in the physical address space.
     8
     9It is one of the physical disk driver that can be called by the generic IOC driver.
     10
     11The _rdk_read() and _rdk_write() blocking functions use a software memcpy, whatever the selected mode (BOOT / KERNEL / USER).
     12These blocking functions return only when the transfer is completed.
     13As the number of concurrent accesses is not bounded, these functions don't use the _ioc_lock variable.
     14
     15The SEG_RDK_BASE virtual address must be defined in the hard_config.h file when the USE_RAMDISK flag is set.
     16
     17#ifndef _GIET_RDK_DRIVERS_H_
     18#define _GIET_RDK_DRIVERS_H_
     19
     20 === unsigned int '''_rdk_init()''' ===
     21This 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 ) ===
     24This 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.
     29Returns 0 if success, > 0 if error.
     30
     31 === unsigned int '''_rdk_write'''( unsigned int lba,   unsigned int buffer,  unsigned int count ) ===
     32This 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.
     37Returns 0 if success, > 0 if error.
     38
     39 === unsigned int '''_rdk_get_block_size'''() ===
     40This function returns the block size.
     41
     42 === unsigned int '''_rdk_get_status'''() ===
     43This function returns always 0, but is required bi the generic IOC API.
     44
     45