rusty_mos::process::envs

Function map_segment

Source
fn map_segment(
    pgdir: *mut Pde,
    asid: u32,
    pa: usize,
    va: usize,
    size: usize,
    perm: u32,
)
Expand description

Map the [va, va + size) in virtual address space to the [pa, pa + size) in physical address space if pgdir. This method will validate the entry perm.

§Panic

§Safety

The pgdir SHALL be valid.