Function ruspiro_mmu::map_memory [−][src]
pub unsafe fn map_memory(
origin: *mut u8,
size: usize,
attributes: u64
) -> *mut u8
Map a given address to a virtual address with the specified memory attributes. TODO: Memory attributes shall be a specific allowed set only - create a new type for this!
Safety
This is safe if the MMU has been configured already. Also the given raw pointer need to point to an
address provided from a call to alloc::alloc(...)
with at least size
bytes and is aligned to the actual
page size boundries.
Hint
If the MMU is not configured to use the TTBR1 virtual address mapping this call has no effect and the returned address can not being used.