pub struct PageTableRef<'a, P: GenericPTE, const LEN: usize, const LEVEL: usize> {
pub level: usize,
/* private fields */
}
Expand description
A reference to a page table.
LEN
is the number of entries in a page table.
LEVEL
is the max level of the page table.
Fields§
§level: usize
Implementations§
Source§impl<'a, P: GenericPTE, const LEN: usize, const LEVEL: usize> PageTableRef<'_, P, LEN, LEVEL>
impl<'a, P: GenericPTE, const LEN: usize, const LEVEL: usize> PageTableRef<'_, P, LEN, LEVEL>
Source§impl<'a, P: GenericPTE, const LEN: usize, const LEVEL: usize> PageTableRef<'a, P, LEN, LEVEL>
impl<'a, P: GenericPTE, const LEN: usize, const LEVEL: usize> PageTableRef<'a, P, LEN, LEVEL>
pub fn paddr(&self) -> usize
Sourcepub unsafe fn new_with_level(
level: usize,
access: &mut impl Access,
) -> PagingResult<PageTableRef<'static, P, LEN, LEVEL>>
pub unsafe fn new_with_level( level: usize, access: &mut impl Access, ) -> PagingResult<PageTableRef<'static, P, LEN, LEVEL>>
pub fn from_ref( value: &'a [P; LEN], level: usize, access: &mut impl Access, ) -> Self
pub fn entry_size(&self) -> usize
pub fn get_pte_mut( &mut self, vaddr: *const u8, access: &mut impl Access, ) -> Option<&mut P>
pub fn walk<F: Fn(&WalkInfo<P>)>(&self, f: F, access: &impl Access)
Trait Implementations§
Source§impl<'a, P: Clone + GenericPTE, const LEN: usize, const LEVEL: usize> Clone for PageTableRef<'a, P, LEN, LEVEL>
impl<'a, P: Clone + GenericPTE, const LEN: usize, const LEVEL: usize> Clone for PageTableRef<'a, P, LEN, LEVEL>
Source§fn clone(&self) -> PageTableRef<'a, P, LEN, LEVEL>
fn clone(&self) -> PageTableRef<'a, P, LEN, LEVEL>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<P: GenericPTE, const LEN: usize, const LEVEL: usize> PageTableFn for PageTableRef<'_, P, LEN, LEVEL>
impl<P: GenericPTE, const LEN: usize, const LEVEL: usize> PageTableFn for PageTableRef<'_, P, LEN, LEVEL>
Source§unsafe fn map(
&mut self,
cfg: &MapConfig,
page_level: usize,
access: &mut impl Access,
) -> PagingResult
unsafe fn map( &mut self, cfg: &MapConfig, page_level: usize, access: &mut impl Access, ) -> PagingResult
Map a page or block of memory. Read more
Source§unsafe fn new(access: &mut impl Access) -> PagingResult<Self>
unsafe fn new(access: &mut impl Access) -> PagingResult<Self>
Create a new page table. Read more
fn level_entry_size(&self, level: usize) -> usize
fn detect_page_level(&self, vaddr: *const u8, size: usize) -> usize
unsafe fn map_region( &mut self, config: MapConfig, size: usize, allow_block: bool, access: &mut impl Access, ) -> PagingResult<()>
Source§unsafe fn map_region_with_handle(
&mut self,
cfg: MapConfig,
size: usize,
allow_block: bool,
access: &mut impl Access,
on_page_mapped: Option<&impl Fn(*const u8)>,
) -> PagingResult
unsafe fn map_region_with_handle( &mut self, cfg: MapConfig, size: usize, allow_block: bool, access: &mut impl Access, on_page_mapped: Option<&impl Fn(*const u8)>, ) -> PagingResult
Map a contiguous virtual memory region to a contiguous physical memory
region with the given mapping
flags
. Read moreimpl<'a, P: Copy + GenericPTE, const LEN: usize, const LEVEL: usize> Copy for PageTableRef<'a, P, LEN, LEVEL>
Auto Trait Implementations§
impl<'a, P, const LEN: usize, const LEVEL: usize> Freeze for PageTableRef<'a, P, LEN, LEVEL>
impl<'a, P, const LEN: usize, const LEVEL: usize> RefUnwindSafe for PageTableRef<'a, P, LEN, LEVEL>where
P: RefUnwindSafe,
impl<'a, P, const LEN: usize, const LEVEL: usize> Send for PageTableRef<'a, P, LEN, LEVEL>
impl<'a, P, const LEN: usize, const LEVEL: usize> Sync for PageTableRef<'a, P, LEN, LEVEL>
impl<'a, P, const LEN: usize, const LEVEL: usize> Unpin for PageTableRef<'a, P, LEN, LEVEL>
impl<'a, P, const LEN: usize, const LEVEL: usize> UnwindSafe for PageTableRef<'a, P, LEN, LEVEL>where
P: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)