Changes between Version 2 and Version 3 of io_operations


Ignore:
Timestamp:
Oct 5, 2016, 5:36:08 PM (6 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • io_operations

    v2 v3  
    33[[PageOutline]]
    44
     5== A) Peripheral identification ==
     6
     7ALMOS-MK identifies a peripheral by a composite index (func,impl). The '''func''' index defines a functionnal 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 a specific API defined in the ''dev_xyz.h'' file). This generic
     9API allows the kernel to access the peripheral without taking care on the actual implementation. 
     10 * For each generic device XYZ, it can exist several hardware implementation, and each value of the implementation index '''impl''' is associated with a specific driver, that must implement
     11the API defined for the XYZ generic device.
     12
    513ALMOS-MK supports two types of peripheral components:
    614
    7  * '''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). They are share ressources that can be used by all kernel instances, running in any cluster. Examples are the IOC disk controller, the NIC network controller, the TTY text terminal controller, the FBF graphical display controller, or the external ROM.
     15 * '''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). They are shared ressources that can be used by any kernel instance, 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.
    816
    9  * '''Internal peripherals''' are replicated in all clusters. Each internal peripheral is a private resource that can only be used by the kernel instance running in the local cluster. There is very few internal peripherals. examples are the XCU interrupt controller, the DMA controller, or the L2 cache configuration controller.
     17 * '''Internal peripherals''' are replicated in all clusters. Each internal peripheral is a private resource that can only be used by the kernel instance running in the local cluster. There is very few internal peripherals. examples are the generic ICU device (Interrupt Controller Unit), or the generic MMC (L2 Cache Configuration).
    1018
    11 ALMOS-MK supports ''multi-channels'' 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 controller. Examples are the external TTY controller (one channel per text terminal), or the internal XCU interrupt controller (one channel per target core).
     19ALMOS-MK supports ''multi-channels'' 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 controller. Examples are the  TXT peripheral (one channel per text terminal), or the NIC peripheral (one channel per MAC interface).
    1220
    13 To represent the existing peripherals in a given manicure architecture, ALMOS-MK uses device descriptors, implemented as the '''device_t''' structure. A device descriptor describes a single channel of a peripheral. It contains the peripheral type, the physical base address, and the size of the physical segment containing the addressable registers associated to the peripheral channel.
     21Th composite index is implemented as a 32 bits integer, where the 16 MSB bits define the type, and the 16 LSB bits define the subtype.
    1422
    15 The type of service provided by a given device is completely defined the (type/subtype)  composite index.
    16 This type is implemented by a 32 bits integer, where the 16 MSB bits define the type, and the 16 LSB bits define the subtype.
     23== B) Device Descriptors Placement ==
    1724
    18 For '''internal peripherals''', that are replicated in all clusters, the corresponding device descriptors are stored in the local cluster. For '''external peripherals''', the corresponding device descriptors are physically distributed on all clusters, as regularly as possible  to minimize contention.
     25To represent the available peripherals in a given manicore architecture, ALMOS-MK uses device descriptors, implemented as the '''device_t''' structure. A device descriptor describes a single channel of a peripheral. It contains the functional index, the implementation index, the channel index, the physical base address, and the size of the physical segment containing the addressable registers for this peripheral channel.
     26
     27Each device descriptor contains also an embedded waiting queue containing the pending requests registered by the various clients. A client can be any thread, running on any core, in any cluster of the manicure architecture.
     28
     29Finally, each device descriptor for a generic device XYZ contains a link to the specific driver associated to the available hardware implementation. This link is established in the kernel initialization phase.
     30
     31* As '''internal peripheral''' are private resources, replicated in all clusters, the device descriptor is stored in the same cluster as the hardware device itself. Therefore, all access are local.
     32* For '''external peripherals''', all hardware devices are shared resources located in the I/O cluster. To avoid contention, the device descriptors are distributed on all clusters, as uniformly as possible. Therefore, an I/O operation involve generally three clusters: the client cluster, the I/O cluster, and the cluster containing the device descriptor.
    1933
    2034