Changeset 350 for soft/giet_vm/giet_drivers
- Timestamp:
- Jun 29, 2014, 12:53:25 PM (10 years ago)
- Location:
- soft/giet_vm/giet_drivers
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/bdv_driver.c
r333 r350 63 63 #include <ctx_handler.h> 64 64 65 #if !defined(GIET_NO_HARD_CC) 66 # error: You must define GIET_NO_HARD_CC in the giet_config.h file 67 #endif 68 65 69 /////////////////////////////////////////////////////////////////////////////// 66 70 // BDV global variables … … 68 72 69 73 #define in_unckdata __attribute__((section (".unckdata"))) 70 71 in_unckdata unsigned int _bdv_lock = 0; 72 in_unckdata volatile unsigned int _bdv_status = 0; 74 #define in_kdata __attribute__((section (".kdata"))) 75 76 #if GIET_NO_HARD_CC 77 in_unckdata giet_lock_t _bdv_lock __attribute__((aligned(64))); 78 in_unckdata volatile unsigned int _bdv_status; 73 79 in_unckdata volatile unsigned int _bdv_gtid; 80 #else 81 in_kdata giet_lock_t _bdv_lock __attribute__((aligned(64))); 82 in_kdata volatile unsigned int _bdv_status; 83 in_kdata volatile unsigned int _bdv_gtid; 84 #endif 74 85 75 86 /////////////////////////////////////////////////////////////////////////////// -
soft/giet_vm/giet_drivers/bdv_driver.h
r295 r350 10 10 #define _GIET_BDV_DRIVER_H_ 11 11 12 #include "utils.h" 13 12 14 /////////////////////////////////////////////////////////////////////////////////// 13 15 // BDV global variables 14 16 /////////////////////////////////////////////////////////////////////////////////// 15 17 16 extern unsigned int_bdv_lock; // BDV is a shared ressource18 extern giet_lock_t _bdv_lock; // BDV is a shared ressource 17 19 extern volatile unsigned int _bdv_status; // required for IRQ signaling 18 20 extern volatile unsigned int _bdv_gtid; // descheduled task id = gpid<<16 + ltid -
soft/giet_vm/giet_drivers/ioc_driver.c
r343 r350 183 183 unsigned int flags; // page protection flags 184 184 unsigned int ix2; // page index in IOMMU PT1 page table 185 unsigned int ppn_first ;// first physical page number for user buffer185 unsigned int ppn_first = 0; // first physical page number for user buffer 186 186 unsigned int buf_xaddr = 0; // user buffer virtual address in IO space (if IOMMU) 187 187 paddr_t buf_paddr = 0; // user buffer physical address (if no IOMMU), … … 308 308 309 309 #if ( USE_IOC_BDV ) 310 311 #if GIET_DEBUG_IOC_DRIVER312 _printf("\n[IOC DEBUG] Calling BDV driver\n");313 #endif314 310 if (to_mem) error = _bdv_read ( mode, lba, buf_paddr, count); 315 311 else error = _bdv_write( mode, lba, buf_paddr, count); 316 317 312 #elif ( USE_IOC_SPI ) 318 319 #if GIET_DEBUG_IOC_DRIVER320 _printf("\n[IOC DEBUG] Calling SPI driver\n");321 #endif322 313 if (to_mem) error = _sdc_read (mode, lba, buf_paddr, count); 323 314 else error = _sdc_write(mode, lba, buf_paddr, count); 324 325 315 #elif ( USE_IOC_HBA ) 326 327 #if GIET_DEBUG_IOC_DRIVER328 _printf("\n[IOC DEBUG] Calling HBA driver\n");329 #endif330 316 if (to_mem) error = _hba_read (channel, mode, lba, buf_paddr, count); 331 317 else error = _hba_write(channel, mode, lba, buf_paddr, count); 332 333 318 #elif ( USE_IOC_RDK ) 334 335 #if GIET_DEBUG_IOC_DRIVER336 _printf("\n[IOC DEBUG] Calling RDK driver\n");337 #endif338 319 if (to_mem) error = _rdk_read (lba, buf_vaddr, count); 339 320 else error = _rdk_write(lba, buf_vaddr, count); 340 341 321 #endif 342 322 -
soft/giet_vm/giet_drivers/tty_driver.c
r345 r350 39 39 #endif 40 40 41 #if !defined(GIET_NO_HARD_CC) 42 # error: You must define GIET_NO_HARD_CC in the giet_config.h file 43 #endif 44 41 45 #if (NB_TTY_CHANNELS < 1) 42 46 # error: NB_TTY_CHANNELS cannot be smaller than 1! 43 47 #endif 44 48 49 ////////////////////////////////////////////////////////////////////////////// 50 // TTY global variables 51 ////////////////////////////////////////////////////////////////////////////// 52 45 53 #define in_unckdata __attribute__((section (".unckdata"))) 46 54 #define in_kdata __attribute__((section (".kdata"))) 47 55 48 ////////////////////////////////////////////////////////////////////////////// 49 // TTY global variables 50 ////////////////////////////////////////////////////////////////////////////// 51 56 #if GIET_NO_HARD_CC 52 57 in_unckdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS]; 53 54 in_unckdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS] 55 = { [0 ... NB_TTY_CHANNELS - 1] = 0 }; 56 57 in_unckdata unsigned int _tty_lock[NB_TTY_CHANNELS] 58 = { [0 ... NB_TTY_CHANNELS - 1] = 0 }; 58 in_unckdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS]; 59 in_unckdata giet_lock_t _tty_lock[NB_TTY_CHANNELS] __attribute__((aligned(64))); 60 #else 61 in_kdata volatile unsigned int _tty_rx_buf[NB_TTY_CHANNELS]; 62 in_kdata volatile unsigned int _tty_rx_full[NB_TTY_CHANNELS]; 63 in_kdata giet_lock_t _tty_lock[NB_TTY_CHANNELS] __attribute__((aligned(64))); 64 #endif 59 65 60 66 ////////////////////////////////////////////////////////////////////////////// -
soft/giet_vm/giet_drivers/tty_driver.h
r295 r350 8 8 #ifndef _GIET_TTY_DRIVERS_H_ 9 9 #define _GIET_TTY_DRIVERS_H_ 10 11 #include "utils.h" 10 12 11 13 /////////////////////////////////////////////////////////////////////////////////// … … 27 29 /////////////////////////////////////////////////////////////////////////////////// 28 30 29 extern volatile unsigned char _tty_get_buf[];31 extern volatile unsigned int _tty_rx_buf[]; 30 32 31 extern volatile unsigned char _tty_get_full[]; 33 extern volatile unsigned int _tty_rx_full[]; 34 35 extern giet_lock_t _tty_lock[]; 32 36 33 37 //////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.