Changeset 437 for soft/giet_vm/giet_drivers/rdk_driver.h
- Timestamp:
- Nov 3, 2014, 10:53:00 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/rdk_driver.h
r298 r437 5 5 // Copyright (c) UPMC-LIP6 6 6 /////////////////////////////////////////////////////////////////////////////////// 7 // The rdk_driver.c and rdk_driver.h files are part ot the GIET-VM kernel. 8 // 9 // This driver supports a virtual disk implemented as a memory segment, 10 // in the physical address space. 11 // 12 // The _rdk_read() and _rdk_write() blocking functions use a software memcpy, 13 // whatever the selected mode. They return only when the transfer is completed. 14 // As the number of concurrent accesses is not bounded, these functions 15 // don't use the _ioc_lock variable. 16 // 17 // The SEG_RDK_BASE virtual address must be defined in the hard_config.h 18 // file when the USE_RAMDISK flag is set. 19 /////////////////////////////////////////////////////////////////////////////////// 7 20 8 21 #ifndef _GIET_RDK_DRIVERS_H_ 9 22 #define _GIET_RDK_DRIVERS_H_ 10 11 #include <mapping_info.h>12 23 13 24 /////////////////////////////////////////////////////////////////////////////////// … … 15 26 /////////////////////////////////////////////////////////////////////////////////// 16 27 28 /////////////////////////////////////////////////////////////////////////////// 29 // This function does nothing, but is required by the IOC API. 30 /////////////////////////////////////////////////////////////////////////////// 17 31 extern unsigned int _rdk_init(); 18 32 33 /////////////////////////////////////////////////////////////////////////////// 34 // Transfer data from a memory buffer to the RAMDISK. 35 // - mode : BOOT / KERNEL / USER (unused) 36 // - lba : first block index on the block device 37 // - buffer : virtual base address of the memory buffer 38 // - count : number of blocks to be transfered. 39 // Returns 0 if success, > 0 if error. 40 /////////////////////////////////////////////////////////////////////////////// 19 41 extern unsigned int _rdk_write( unsigned int lba, 20 42 unsigned int buffer, 21 43 unsigned int count ); 22 44 45 /////////////////////////////////////////////////////////////////////////////// 46 // Transfer data from the RAMDISK to a memory buffer. 47 // - mode : BOOT / KERNEL / USER (unused) 48 // - lba : first block index on the block device 49 // - buffer : virtual base address of the memory buffer 50 // - count : number of blocks to be transfered. 51 // Returns 0 if success, > 0 if error. 52 /////////////////////////////////////////////////////////////////////////////// 23 53 extern unsigned int _rdk_read( unsigned int lba, 24 54 unsigned int buffer, 25 55 unsigned int count ); 26 56 57 /////////////////////////////////////////////////////////////////////////////// 58 // This function returns the block size. 59 /////////////////////////////////////////////////////////////////////////////// 27 60 extern unsigned int _rdk_get_block_size(); 28 61 29 62 /////////////////////////////////////////////////////////////////////////////////// 63 // This function returns always 0, but is required by the IOC API. 64 /////////////////////////////////////////////////////////////////////////////// 65 extern unsigned int _rdk_get_status(); 30 66 31 67 #endif
Note: See TracChangeset
for help on using the changeset viewer.