Changeset 320 for soft/giet_vm/giet_drivers/rdk_driver.c
- Timestamp:
- Jun 10, 2014, 12:33:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/rdk_driver.c
r313 r320 15 15 // As the number of concurrent accesses is not bounded, these functions 16 16 // don't use the _ioc_lock variable. 17 // 18 // The SEG_RDK_BASE virtual address must be defined in the hard_config.h 19 // file when the USE_RAMDISK flag is set. 17 20 /////////////////////////////////////////////////////////////////////////////////// 18 21 19 22 #include <giet_config.h> 23 #include <hard_config.h> 20 24 #include <rdk_driver.h> 21 25 #include <utils.h> 22 26 #include <tty_driver.h> 23 27 #include <ctx_handler.h> 28 29 #if !defined(SEG_RDK_BASE) 30 # error: You must define SEG_RDK_BASE in the hard_config.h file 31 #endif 24 32 25 33 /////////////////////////////////////////////////////////////////////////////// … … 54 62 #endif 55 63 56 char* src = (char*)&seg_ram_disk_base + (512*lba); 64 #if USE_RAM_DISK 65 char* src = (char*)SEG_RDK_BASE + (512*lba); 57 66 char* dst = (char*)buffer; 58 67 _memcpy( dst, src, count*512 ); 59 60 68 return 0; 69 #else 70 _printf("[GIET ERROR] _rdk_read() should not be used if USE_RAM_DISK not set\n"); 71 return 1; 72 #endif 61 73 } 62 74 … … 83 95 #endif 84 96 85 char* dst = (char*)&seg_ram_disk_base + (512*lba); 97 #if USE_RAM_DISK 98 char* dst = (char*)SEG_RDK_BASE + (512*lba); 86 99 char* src = (char*)buffer; 87 100 _memcpy( dst, src, count*512 ); 88 89 101 return 0; 102 #else 103 _printf("[GIET ERROR] _rdk_write() should not be used if USE_RAM_DISK not set\n"); 104 return 1; 105 #endif 90 106 } 91 107
Note: See TracChangeset
for help on using the changeset viewer.