[][src]Crate sunrise_ahci

AHCI driver module

This driver discovers HBAs on the PCI, initialize them, and exposes IPC endpoints to read and write sectors from/to a disk.

Features

Here's a list of wonderful features this driver does not provide:

Interface

This driver exposes two IPC interfaces: AhciInterface, registered as "ahci:\0", and some IDisks.

Basically at initialization the driver will assign an id to every discovered disk. You can then ask the AhciInterface to give you a session to any IDisk from its id, and finally read/write some sectors.

We read and write disk sectors only by DMA, letting the device do all the copying. Our client will provide us a handle to a shared memory, and we will make the device DMA read/write to it.

Parallelism

For now this driver is "highly single-threaded" and blocking, this means that only one request can be outstanding at any moment, and the driver will wait for it to be completed before accepting other requests.

This is highly unsatisfying, since AHCI supports up to 32 commands being issued simultaneously. Unfortunately we can't take advantage of that until we manage to make command-completion interrupts work.

Modules

disk

AHCI Disk

fis

Frame Information Structures

hba

HBA structures

pci

PCI discovery

Structs

AhciInterface

Main interface to the AHCI driver.

Statics

CAPABILITIES
DISKS

Array of discovered disk.

HEADER

Functions

main

Ahci driver initialisation.