Changes between Version 3 and Version 4 of rdk_driver
- Timestamp:
- Mar 28, 2015, 2:19:37 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rdk_driver
v3 v4 5 5 The [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 6 7 This driver supports a virtual disk implemented as a memory segment, in the physical address space. Thisramdisk vseg must be defined in the mapping.7 This 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. 8 8 9 This driver is called by the generic IOC driver, when the USE_IOC_RDK flag is set in the hard_config.h file.9 This driver is called by the generic FAT handler, when the USE_IOC_RDK flag is set in the hard_config.h file. 10 10 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.11 The _rdk_access() function uses a software memcpy whatever the requested mode (synchronous or descheduling), and returns only when the transfer is completed. 12 13 As the number of concurrent accesses is not bounded, these functions don't use any lock. 14 14 15 15 The SEG_RDK_BASE virtual address must be defined in the hard_config.h file when the USE_IOC_RDK flag is set. 16 16 17 #ifndef _GIET_RDK_DRIVERS_H_ 18 #define _GIET_RDK_DRIVERS_H_ 17 == __Access function__ == 19 18 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 ) === 20 This 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. 29 26 Returns 0 if success, > 0 if error. 30 27 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 device35 * buffer : virtual base address of the memory buffer36 * 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