Changes between Version 29 and Version 30 of io_operations
- Timestamp:
- Nov 22, 2017, 12:18:45 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
io_operations
v29 v30 6 6 7 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. 8 * Each value of the functional index defines a generic (implementation independent) device XYZ, that is characterized by an API defined in the ''dev_xyz.h'' file. This generic API allows the kernel to access the peripheral without taking care on the actual hardware implementation.9 * For each generic device X YZ, 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 XYZgeneric device.8 * Each value of the functional index '''fun''' 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 * 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 11 ALMOS-MK supports two types of peripheral components: 12 12 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). Theyare 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).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 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 ICU device (Interrupt Controller Unit), or the generic MMC device (L2 Cache Configuration and coherence management). … … 25 25 Each device descriptor contains a waiting queue of pending commands registered by the various client threads. 26 26 27 For each generic device type, the device specific API defines the list of available commands, and the specific structure defining the command descriptor (containing the command type and arguments). This structure is embedded (as an union of the various device types) in thethread descriptor, to be passed to the hardware specific driver.27 For each generic device type, the device specific API defines the list of available commands, and the specific structure defining the command descriptor (containing the command type and arguments). As an IO operation is blocking for the calling thread, a client thread can only post one command at a given time. This command is registered in the client thread descriptor, to be passed to the hardware specific driver. 28 28 29 29 The set of supported generic devices, and their associated APIs are defined below: … … 37 37 38 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 connecti on one peripheral IRQ to an internal (ICU) or external (PIC) interrupt controller.39 * '''HWI''' : The HardWare Interrupt are physical signals connecting one peripheral IRQ to the distributed XCU hardware component.. 40 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 ICU to support periodical interrupts used by the preemptive context switch mechanism.41 * '''PTI''' : The Programmable Timer Interrupt are implemented in the distributed XCU to support periodical interrupts used by the preemptive context switch mechanism. 42 42 43 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.