Changeset 437 for soft/giet_vm/giet_drivers/ioc_driver.c
- Timestamp:
- Nov 3, 2014, 10:53:00 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/ioc_driver.c
r426 r437 6 6 // Copyright (c) UPMC-LIP6 7 7 /////////////////////////////////////////////////////////////////////////////////// 8 // Implementation note: 9 // 8 // Implementation notes: 10 9 // 1) In order to share the code, the two _ioc_read() and _ioc_write() functions 11 // call the same _ioc_access() function .12 // 10 // call the same _ioc_access() function, and this function call the selected 11 // physical driver (BDV / HBA / SPI / RDK). 13 12 // 2) The IOMMU is not supported yet, but the method is the following: 14 13 // A fixed size 2 Mbytes vseg is allocated to the IOC peripheral, in the I/O … … 97 96 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 98 97 unsigned int p = procid & ((1<<P_WIDTH)-1); 99 _printf("\n[IOC DEBUG] _ioc_access() : P[%d,%d,%d] enters at cycle %d\n" 100 " - channel = %d\n" 101 " - mode = %d\n" 102 " - vaddr = %x\n" 103 " - sectors = %d\n" 104 " - lba = %x\n", 105 x, y, p, _get_proctime(), channel, mode, buf_vaddr, count, lba ); 98 _puts("\n[IOC DEBUG] _ioc_access() : P["); 99 _putd( x ); 100 _puts(","); 101 _putd( y ); 102 _puts(","); 103 _putd( p ); 104 _puts("] enters at cycle "); 105 _putd( _get_proctime() ); 106 _puts("\n - channel = "); 107 _putd( channel ); 108 _puts("\n - mode = "); 109 _putd( mode ); 110 _puts("\n - vaddr = "); 111 _putx( buf_vaddr ); 112 _puts("\n - sectors = "); 113 _putd( count ); 114 _puts("\n - lba = "); 115 _putx( lba ); 116 _puts("\n"); 106 117 #endif 107 118 … … 115 126 if ((unsigned int) buf_vaddr & 0x3) 116 127 { 117 _p rintf("\n[IOC ERROR] in _ioc_access() : buffer not word aligned\n");128 _puts("\n[IOC ERROR] in _ioc_access() : buffer not word aligned\n"); 118 129 _exit(); 119 130 } … … 122 133 if ( (USE_IOC_HBA == 0) && (channel > 0) ) 123 134 { 124 _p rintf("\n[IOC ERROR] in _ioc_access() : channel must be 0 when HBA not used\n");135 _puts("\n[IOC ERROR] in _ioc_access() : channel must be 0 when HBA not used\n"); 125 136 _exit(); 126 137 } … … 146 157 if ( ko ) 147 158 { 148 _p rintf("\n[IOC ERROR] in _ioc_access() : buffer unmapped\n");159 _puts("\n[IOC ERROR] in _ioc_access() : buffer unmapped\n"); 149 160 _exit(); 150 161 } … … 152 163 if ( (mode == IOC_USER_MODE) && ((flags & PTE_U) == 0) ) 153 164 { 154 _p rintf("\n[IOC ERROR] in _ioc_access() : buffer not user accessible\n");165 _puts("\n[IOC ERROR] in _ioc_access() : buffer not user accessible\n"); 155 166 _exit(); 156 167 } … … 158 169 if ( ((flags & PTE_W) == 0 ) && to_mem ) 159 170 { 160 _p rintf("\n[IOC ERROR] in _ioc_access() : buffer not writable\n");171 _puts("\n[IOC ERROR] in _ioc_access() : buffer not writable\n"); 161 172 _exit(); 162 173 } … … 274 285 #elif ( USE_IOC_RDK ) 275 286 276 _printf("[GIET ERROR] _ioc_get_status() should not be called"); 277 _printf(" when RAMDISK is used...\n"); 278 _exit(); 279 280 return 0; 287 return rdk_get_status(); 281 288 282 289 #endif
Note: See TracChangeset
for help on using the changeset viewer.