wiki:io_operations

Version 1 (modified by alain, 8 years ago) (diff)

--

Input/Output? Operations

ALMOS-MK supports two types of peripheral components:

  • 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.
  • 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.

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).

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.

The type of service provided by a given device is completely defined the (type/subtype) composite index. 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.

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.