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 bits(self) -> usize;
fn is_unused(&self) -> bool;
fn is_present(&self) -> bool;
fn is_huge(&self) -> bool;
fn clear(&mut 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so 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.