Changes between Version 44 and Version 45 of io_operations
- Timestamp:
- Jan 17, 2018, 8:01:01 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
io_operations
v44 v45 5 5 == A) Peripheral identification == 6 6 7 ALMOS-MK identifies a peripheral by a composite index (func,impl). The '''func''' index defines a functional type, the '''impl''' index defines a specific hardware implementation.7 ALMOS-MKH identifies a peripheral by a composite index (func,impl). The '''func''' index defines a functional type, the '''impl''' index defines a specific hardware implementation. 8 8 * Each value of the functional index '''func''' defines a generic (implementation independent) device XXX, that is characterized by an API defined in the ''dev_xxx.h'' file. This generic API allows the kernel to access the peripheral without taking care on the actual hardware implementation. 9 9 * For each generic device XXX, it can exist several hardware implementation, and each value of the implementation index '''impl''' is associated with a specific driver, that must implement the API defined for the XXX generic device. 10 10 11 ALMOS-MK supports two types of peripheral components:11 ALMOS-MKH supports two types of peripheral components: 12 12 13 13 * '''External peripherals''' are accessed through a bridge located in one single cluster (called ''cluster_io'', identified by the ''io_cxy'' parameter in the arch_info description). External devices are shared resources that can be used by any thread running in any cluster. Examples are the generic IOC device (Block Device Controller), the generic NIC device (Network Interface Controller), the generic TXT device (Text Terminal), the generic FBF device (Frame Buffer for Graphical Display Controller). 14 14 15 * '''Internal peripherals''' are replicated in all clusters. Each internal peripheral is associated to the local kernel instance, but can be accessed by any thread running in any cluster. There are very few internal peripherals. Examples are the generic ICUdevice (Interrupt Controller Unit), or the generic MMC device (L2 Cache Configuration and coherence management).15 * '''Internal peripherals''' are replicated in all clusters. Each internal peripheral is associated to the local kernel instance, but can be accessed by any thread running in any cluster. There are very few internal peripherals. Examples are the generic LAPIC device (Interrupt Controller Unit), or the generic MMC device (L2 Cache Configuration and coherence management). 16 16 17 ALMOS-MK supports ''multi-channels'' external peripherals, where one single peripheral controller contains N channels that can run in parallel. Each channel has a separated set of addressable registers, and each channel can be used by the OS as an independent device. Examples are the TXT peripheral (one channel per text terminal), or the NIC peripheral (one channel per MAC interface).17 ALMOS-MKH supports ''multi-channels'' external peripherals, where one single peripheral controller contains N channels that can run in parallel. Each channel has a separated set of addressable registers, and each channel can be used by the OS as an independent device. Examples are the TXT peripheral (one channel per text terminal), or the NIC peripheral (one channel per MAC interface). 18 18 19 The set of available peripherals, and their location in a given many-core architecture must be described in the '''arch_info.py''' file. For each peripheral, the composite index is implemented as a 32 bit integer, where the 16 MSB bits define the type, and the 16 LSB bits define thesubtype.19 The set of available peripherals, and their location in a given many-core architecture must be described in the '''arch_info.py''' file. For each peripheral, the composite index is implemented as a 32 bit integer, where the 16 MSB bits define the ''functional'' type, and the 16 LSB bits define the ''implementation'' subtype. 20 20 21 21 == B) Generic Devices APIs == 22 22 23 To represent the available peripherals in a given manycore architecture, ALMOS-MK uses generic ''device descriptors'' (implemented by the ''device_t'' structure). For multi-channels peripherals, ALMOS-MKdefines one ''device descriptor'' per channel. This descriptor contains the functional index, the implementation index, the channel index, and the physical base address of the segment containing the addressable registers for this peripheral channel.23 To represent the available peripherals in a given manycore architecture, ALMOS-MKH uses generic ''device descriptors'' (implemented by the ''device_t'' structure). For multi-channels peripherals, ALMOS-MKH defines one ''device descriptor'' per channel. This descriptor contains the functional index, the implementation index, the channel index, and the physical base address of the segment containing the addressable registers for this peripheral channel. 24 24 25 25 Each device descriptor contains a waiting queue of pending commands registered by the various client threads. … … 29 29 The set of supported generic devices, and their associated APIs are defined below: 30 30 31 || device || type || usage || api definition || 32 || IOC || ext || block device controller || [wiki:ioc_device_api ioc_api] || 33 || TXT || ext || text terminal controller || [wiki:txt_device_api txt_api] || 34 || NIC || ext || network interface controller || [wiki:nic_device_api nic_api] || 35 || PIC || ext || External Interrupt controller || [wiki:pic_device_api pic_api] || 36 || ICU || int || Internal Interrupt Controller || [wiki:icu_device_api icu_api] || 31 || fonctionnel type || usage || api definition || 32 || IOC || Block Device controller || [wiki:ioc_device_api ioc_api] || 33 || TXT || Text Terminal controller || [wiki:txt_device_api txt_api] || 34 || NIC || Network interface controller || [wiki:nic_device_api nic_api] || 35 || PIC || Programmable Interrupt controller || [wiki:pic_device_api pic_api] || 37 36 38 To signal the completion of an I/O operation, ALMOS-MK defines three types of interrupts :39 * '''HWI''' : The HardWare Interrupt are physical signals connecting one peripheral IRQ to the distributed XCU hardware component..40 * '''WTI''' : The Write Triggered Interrupt are mailboxes implemented in the distributed ICU component to support software IPI (Inter Processor Interrupt), or to route external peripheral IRQ from the PIC component to the client core through a specific ICU.41 * '''PTI''' : The Programmable Timer Interrupt are implemented in the distributed XCU to support periodical interrupts used by the preemptive context switch mechanism.42 37 43 WARNING: The two PIC (external) and ICU (internal) devices in the list defined above have a special role: they do NOT perform I/O operations, but are used as configurable interrupt routers to dynamically link a peripheral channel interrupt to a given core. Therefore, the functions defined by the ICU and PIC APIs are service functions, called by the other devices functions. These ICU and PIC functions don't use the waiting queue implemented in the generic device descriptor, but call directly the ICU or PIC drivers.38 WARNING: The PIC device in this list has a special role: it does NOT perform I/O operations, but is used as a configurable interrupt router to dynamically link a peripheral channel interrupt to a given core. Therefore, the functions defined by the PIC API are service functions, called by the other devices functions. These PIC functions don't use the waiting queue implemented in the generic device descriptor, but call directly the PIC driver. 44 39 45 40 == C) Devices Descriptors Placement ==