Module dma

Source
Expand description

Module for managing DMA memory, using objects for DMA, and creating pools of DMA memory that can be allocated from. Internally, the DMA functions will interact with the kernel to ensure stability of physical addresses for DMA memory, and will also ensure proper coherence between the host and devices.

Structs§

DmaObject
A handle for an object that can be used to perform DMA, and is most useful directly as a way to perform DMA operations on a specific object. For an allocator-like DMA interface, see crate::dma::DmaPool.
DmaOptions
Options for DMA regions.
DmaPin
A representation of some pinned memory for a region.
DmaPool
A pool for allocating DMA regions that all share a common access type and DMA options.
DmaRegion
A region of DMA memory, represented in virtual memory as type T, with a particular access mode and options.
DmaSliceRegion
A region of DMA memory, represented in virtual memory as type [T; len], with a particular access mode and options.
PhysAddr
A physical address. Must be aligned on DMA_PAGE_SIZE.
PhysInfo
Information about a page of DMA memory, including it’s physical address.

Enums§

Access
Intended access direction for DMA memory.
PinError
Possible failure modes for pinning memory.
SyncMode
Mode of syncing to apply when calling sync(). These sync calls are unnecessary by default, and should only be used with utmost care.

Constants§

DMA_PAGE_SIZE
Size of a page for this DMA system.

Traits§

DeviceSync
DMA types must implement this trait, which indicates that types can handle untyped updates from the device.