[−][src]Function sunrise_kernel::syscalls::map_mmio_region
pub fn map_mmio_region(
physical_address: usize,
size: usize,
virtual_address: usize,
writable: bool
) -> Result<(), UserspaceError>
Maps a physical region in the address space of the process.
Returns
The virtual address where it was mapped.
Errors
- InvalidAddress:
virtual_address
is already occupied.virtual_address
is not PAGE_SIZE aligned.physical_address
points to a physical region in DRAM (it's not MMIO).
- InvalidLength:
length
is not PAGE_SIZE aligned.length
is zero.