Trait kernel_hal::vm::GenericPageTable
source · [−]pub trait GenericPageTable: Sync + Send {
fn table_phys(&self) -> PhysAddr;
fn map(&mut self, page: Page, paddr: PhysAddr, flags: MMUFlags) -> PagingResult;
fn unmap(&mut self, vaddr: VirtAddr) -> PagingResult<(PhysAddr, PageSize)>;
fn update(
&mut self,
vaddr: VirtAddr,
paddr: Option<PhysAddr>,
flags: Option<MMUFlags>
) -> PagingResult<PageSize>;
fn query(
&self,
vaddr: VirtAddr
) -> PagingResult<(PhysAddr, MMUFlags, PageSize)>;
fn map_cont(
&mut self,
start_vaddr: VirtAddr,
size: usize,
start_paddr: PhysAddr,
flags: MMUFlags
) -> PagingResult { ... }
fn unmap_cont(&mut self, start_vaddr: VirtAddr, size: usize) -> PagingResult { ... }
}Expand description
A generic page table abstraction.
Required Methods
fn table_phys(&self) -> PhysAddr
fn table_phys(&self) -> PhysAddr
Get the physical address of root page table.
Map the page to the frame of paddr with flags.
Unmap the page of vaddr.
Change the flags of the page of vaddr.