Expand description
IOMMU (I/O Memory Management Unit) Foundation
Provides DMA address translation and device isolation via Intel VT-d (or equivalent on other architectures). This module handles:
- DMAR table detection from ACPI
- IOMMU unit discovery and capability reading
- Identity mapping for known-safe devices
- DMA coherency flags and scatter-gather list support
Full IOMMU page table management is deferred to a later phase; this module provides the foundation for safe DMA with identity mapping.
Structs§
- Device
Scope - Device scope entry within DRHD or RMRR structures.
- DmaMapped
Buffer - A DMA-mapped buffer with coherency and direction tracking.
- Dmar
Info - Parsed DMAR (DMA Remapping) table information.
- Drhd
Unit - A DMA Remapping Hardware Unit discovered from the ACPI DMAR table.
- Iommu
Context Table - IOMMU context table (256 entries per PCI bus, page-aligned).
- Iommu
Unit - Represents a parsed IOMMU hardware unit with its capabilities.
- Rmrr
Region - A Reserved Memory Region Reporting entry.
- Scatter
Gather Entry - A single entry in a scatter-gather list.
- Scatter
Gather List - Scatter-gather list for multi-buffer DMA transfers.
Enums§
- DmaCoherency
- DMA coherency policy for buffer allocation.
- DmaDirection
- DMA direction hint for buffer mapping.
- Dmar
Structure Type - DMAR Remapping Structure types (per Intel VT-d specification).
Functions§
- alloc_
dma_ buffer - Allocate a physically contiguous DMA buffer.
- create_
identity_ domain - Create an identity domain for DMA address translation.
- free_
dma_ buffer - Free a DMA-mapped buffer.
- identity_
map_ dma - Create an identity mapping for a DMA region.
- init
- Initialize the IOMMU subsystem by parsing the ACPI DMAR table.
- init_
iommu_ unit - Initialize an IOMMU hardware unit from a parsed DRHD entry.
- is_
initialized - Check whether IOMMU support has been initialized.
- parse_
dmar - Parse the ACPI DMAR table from raw bytes.
- unmap_
dma - Remove a DMA identity mapping.
- with_
dmar_ info - Access parsed DMAR information.