Trait page_table_entry::GenericPTE
source · pub trait GenericPTE: Debug + Clone + Copy + Sync + Send + Sized {
// Required methods
fn new_page(paddr: PhysAddr, flags: MappingFlags, is_huge: bool) -> Self;
fn new_table(paddr: PhysAddr) -> Self;
fn paddr(&self) -> PhysAddr;
fn flags(&self) -> MappingFlags;
fn set_paddr(&mut self, paddr: PhysAddr);
fn set_flags(&mut self, flags: MappingFlags, is_huge: bool);
fn is_unused(&self) -> bool;
fn is_present(&self) -> bool;
fn is_huge(&self) -> bool;
fn clear(&mut self);
// Provided method
fn new_fault_page(_flags: MappingFlags, _is_huge: bool) -> Self { ... }
}
Expand description
A generic page table entry.
All architecture-specific page table entry types implement this trait.
Required Methods§
sourcefn new_page(paddr: PhysAddr, flags: MappingFlags, is_huge: bool) -> Self
fn new_page(paddr: PhysAddr, flags: MappingFlags, is_huge: bool) -> Self
Creates a page table entry point to a terminate page or block.
sourcefn new_table(paddr: PhysAddr) -> Self
fn new_table(paddr: PhysAddr) -> Self
Creates a page table entry point to a next level page table.
sourcefn flags(&self) -> MappingFlags
fn flags(&self) -> MappingFlags
Returns the flags of this entry.
sourcefn set_flags(&mut self, flags: MappingFlags, is_huge: bool)
fn set_flags(&mut self, flags: MappingFlags, is_huge: bool)
Set flags of the entry.
sourcefn is_present(&self) -> bool
fn is_present(&self) -> bool
Returns whether this entry flag indicates present.
Provided Methods§
sourcefn new_fault_page(_flags: MappingFlags, _is_huge: bool) -> Self
fn new_fault_page(_flags: MappingFlags, _is_huge: bool) -> Self
Creates a fault page table entry.
Object Safety§
This trait is not object safe.
Implementors§
impl GenericPTE for A64PTE
Available on AArch64 only.
impl GenericPTE for Rv64PTE
Available on RISC-V RV32 or RISC-V RV64 only.
impl GenericPTE for X64PTE
Available on x86-64 only.