Expand description
Virtual memory management (Runtime API).
Mirrors [baracuda_driver::vmm]. Workflow:
- Reserve a VA range:
address_reserve. - Create a physical allocation:
MemHandle::new. - Map the allocation onto the VA range:
map. - Set access rights:
set_access. - Use the pointer like any other device buffer.
unmap, drop theMemHandle,address_free.
Structs§
- MemHandle
- A physical VMM allocation handle. Drop releases it.
Functions§
- address_
free ⚠ - Release a reserved VA range.
- address_
reserve - Reserve a contiguous virtual-address range. Returns a device pointer.
- allocation_
granularity - Minimum allocation size and VA-alignment granularity for
prop.option: 0 = minimum, 1 = recommended. - device_
alloc_ prop - Build the allocation-properties struct for a fresh device-backed VMM allocation.
- get_
access ⚠ - Query access flags for
deviceatptr. - map⚠
- Map the physical allocation
handleonto[ptr + offset, ptr + offset + size). - set_
access ⚠ - Grant the given access rights to a device for a mapped region.
- unmap⚠
- Unmap
[ptr, ptr + size).