Changes between Version 51 and Version 52 of io_operations


Ignore:
Timestamp:
Dec 7, 2019, 11:22:10 PM (4 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • io_operations

    v51 v52  
    66
    77ALMOS-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  * 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  * 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.
     8 * Each value of the functional index '''func''' defines a generic (implementation independent) device, that is characterized by a specific. This API allows the kernel to access the peripheral without taking care on the actual hardware implementation. 
     9 * For each generic device ''func'', 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 ''func'' device.
    1010
    1111ALMOS-MKH supports two types of peripheral components:
     
    2121== B) Generic Devices  APIs  ==
    2222
    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.
     23To represent the available peripherals in a given manycore architecture, ALMOS-MKH uses device descriptors  (implemented by the ''chdev_t'' structure). For multi-channels peripherals, ALMOS-MKH defines one ''chdev'' 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. It contains also the root of a waiting queue of pending commands registered by the various client threads.
    2424
    25 Each device descriptor contains a waiting queue of pending commands registered by the various client threads.
     25The generic ''chdev'' API is defined in the [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/kern/chdev.h  almos-mkh/kernel/kern/chdev.h] and [https://www-soc.lip6.fr/trac/almos-mkh/browser/trunk/kernel/kern/chdev.c  almos-mkh/kernel/kern/chdev.c] files.
    2626
    2727For 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.
     
    4040== C) Devices Descriptors Placement ==
    4141
    42 '''Internal peripherals'''  are replicated in all clusters.  In each cluster, the device descriptor is stored in the same cluster as the hardware device itself. These device descriptors are shared resources: they are mostly accessed by the local kernel instance, but  can also be accessed by threads running in another cluster. This the case for both the ICU and the MMC devices.
     42'''Internal peripherals'''  are replicated in all clusters.  In each cluster, the device descriptor is stored in the same cluster as the device itself. These device descriptors are shared resources: they are mostly accessed by the local kernel instance, but  can also be accessed by threads running in another cluster. This the case for both the ICU and the MMC devices.
    4343
    44 '''External peripherals''' are shared resources, located in the I/O cluster. To minimize contention, the corresponding device descriptors are distributed on all clusters, as uniformly as possible. Therefore, an I/O operation involves generally three clusters: the client cluster, the I/O cluster containing the external peripheral, and the server cluster containing the device descriptor.
     44'''External peripherals''' are shared resources, accessed through the bridge located in the I/O cluster. To minimize contention, the corresponding device descriptors are distributed on all clusters, as uniformly as possible. Therefore, an I/O operation involves generally three clusters: the client cluster, the I/O cluster to access the external peripheral, and the server cluster containing the ''chdev'' descriptor.
    4545
    4646The ''devices_directory_t'' structure contains  extended pointers on all generic devices descriptors defined in the manycore architecture.