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. - DmaSlice
Region - A region of DMA memory, represented in virtual memory as type
[T; len]
, with a particular access mode and options. - Phys
Addr - A physical address. Must be aligned on DMA_PAGE_SIZE.
- Phys
Info - 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.
- Sync
Mode - 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§
- Device
Sync - DMA types must implement this trait, which indicates that types can handle untyped updates from the device.