Changes between Version 44 and Version 45 of io_operations


Ignore:
Timestamp:
Jan 17, 2018, 8:01:01 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • io_operations

    v44 v45  
    55== A) Peripheral identification ==
    66
    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.
     7ALMOS-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.
    88 * 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. 
    99 * 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.
    1010
    11 ALMOS-MK supports two types of peripheral components:
     11ALMOS-MKH supports two types of peripheral components:
    1212
    1313 * '''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).
    1414
    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).
     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).
    1616
    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).
     17ALMOS-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).
    1818
    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 the subtype.
     19The 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.
    2020
    2121== B) Generic Devices  APIs  ==
    2222
    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-MK 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.
     23To 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.
    2424
    2525Each device descriptor contains a waiting queue of pending commands registered by the various client threads.
     
    2929The set of supported generic devices, and their associated APIs are defined below:
    3030
    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] ||
    3736
    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.
    4237
    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.
     38WARNING: 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.
    4439
    4540== C) Devices Descriptors Placement ==