Expand description
AHCI (Advanced Host Controller Interface) / SATA Controller Driver
Implements AHCI HBA (Host Bus Adapter) discovery via PCI enumeration, port detection with device signature identification, and block-level read/write operations using the AHCI command infrastructure (FIS, Command List, PRDT). Includes NCQ (Native Command Queuing) stubs.
PCI identification: class 0x01 (Mass Storage), subclass 0x06 (SATA), prog-if 0x01 (AHCI 1.0).
Structs§
- Ahci
Block Device - Wrapper around an AhciPort for the BlockDevice trait.
- Ahci
Controller - AHCI Host Bus Adapter controller.
- Ahci
Port - Represents a single AHCI port with its state and device info.
- Command
Header - Command Header (32 bytes, one per command slot).
- Command
Table Header - Command Table (variable size: 128-byte header + PRDT entries).
- FisData
- FIS Data – Bidirectional (variable length, header is 4 bytes).
- FisDma
Setup - FIS DMA Setup – Bidirectional (28 bytes).
- FisPio
Setup - FIS PIO Setup – Device to Host (20 bytes).
- FisReg
D2H - FIS Register – Device to Host (20 bytes).
- FisReg
H2D - FIS Register – Host to Device (20 bytes).
- Prdt
Entry - Physical Region Descriptor Table entry (16 bytes).
- Received
Fis - Received FIS area for a single port (256 bytes, 256-byte aligned).
Enums§
- Ahci
Device Type - Type of device attached to an AHCI port.
- Port
State - State of an AHCI port.
Functions§
- build_
ncq_ read_ fis - Build a READ FPDMA QUEUED (NCQ) FIS.
- build_
ncq_ write_ fis - Build a WRITE FPDMA QUEUED (NCQ) FIS.
- init
- Discover and initialize AHCI controllers via PCI bus enumeration.
- is_
initialized - Check whether the AHCI subsystem has been initialized.
- issue_
ncq_ command - Issue an NCQ command on a port (stub).
- poll_
ncq_ completion - Poll for NCQ command completion on a port (stub).
Type Aliases§
- NcqTag
- NCQ command tag (0-31).