Changeset 284 for branch/giet_vm_ioc_drivers/giet_drivers/ioc_driver.c
- Timestamp:
- Jan 31, 2014, 2:37:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branch/giet_vm_ioc_drivers/giet_drivers/ioc_driver.c
r283 r284 1 1 /////////////////////////////////////////////////////////////////////////////////// 2 // File : ioc_driver.c 3 // Date : 23/05/2013 4 // Author : alain greiner 2 // File : ioc_driver.c 3 // Date : 23/05/2013 4 // Author : alain greiner 5 // Maintainer : cesar fuguet 5 6 // Copyright (c) UPMC-LIP6 6 7 /////////////////////////////////////////////////////////////////////////////////// … … 12 13 // 13 14 // The _ioc_read() and _ioc_write() functions use the _ioc_access() function, 14 // that is always blocking , but can be called in 4 modes:15 // 16 // - In BOOT_PA mode, the _ioc_access() function use the buffer virtual address17 // as a physical address (as the page tables are not build) and use a polling18 // policy on the IOC_STATUS register to detect transfer completion, as19 // hardware interrupts are not activated. This mode is used by the20 // boot code to load the map.bin file into memory.15 // that is always blocking. The _ioc_access function will call the read or 16 // write function in the driver of the choosen IOC peripheral, which can be for 17 // now: BDV, HBA and SPI. This function can be called in 4 modes: 18 // 19 // - In BOOT_PA mode, the _ioc_access() function use the buffer virtual address 20 // as a physical address (as the page tables are not build). This mode is 21 // used by the boot code to load the map.bin file into memory. 21 22 // 22 23 // - In BOOT_VA mode, the _ioc_access() function makes a V2P translation to 23 // compute the buffer physical address, and use a polling policy on IOC_STATUS 24 // register to detect transfer completion. This mode is used by the boot code 25 // to load the various .elf files into memory. 24 // compute the buffer physical address. This mode is used by the boot code to 25 // load the various .elf files into memory. 26 26 // 27 27 // - In KERNEL mode, the _ioc_access() function makes a V2P translation to 28 // compute the buffer physical address, and use a descheduling strategy: 29 // The ISR executed when transfer completes should restart the calling task. 30 // There is no checking of user access right to the memory buffer. 31 // This mode must be used to access IOC, for an "open" system call. 28 // compute the buffer physical address. There is no checking of user access 29 // right to the memory buffer. This mode must be used to access IOC, for an 30 // "open" system call. 32 31 // 33 32 // - In USER mode, the _ioc_access() function makes a V2P translation to 34 // compute the buffer physical address, and use a descheduling strategy: 35 // The ISR executed when transfer completes should restart the calling task, 36 // The user access right to the memory buffer must be checked. 37 // This mode must be used to access IOC, for a "read/write" system call. 38 // 39 // As the IOC component can be used by several programs running in parallel, 40 // the _ioc_lock variable guaranties exclusive access to the device. The 41 // _ioc_read() and _ioc_write() functions use atomic LL/SC to get the lock. 33 // compute the buffer physical address. The user access right to the memory 34 // buffer must be checked. This mode must be used to access IOC, for a 35 // "read/write" system call. 42 36 // 43 37 // The IOMMU can be activated or not:
Note: See TracChangeset
for help on using the changeset viewer.