#[repr(C, align(4096))]pub struct PageMapLevel4 {
entries: [Pml4Entry; 512],
}Expand description
The top-level page map (PML4).
Layout:
- 512 entries, 8 bytes each (4096 bytes total).
- 4 KiB aligned, as required by the hardware.
Use PageMapLevel4::get and PageMapLevel4::set to read/write entries.
Fields§
§entries: [Pml4Entry; 512]Implementations§
Source§impl PageMapLevel4
impl PageMapLevel4
Sourcepub const fn get(&self, i: L4Index) -> Pml4Entry
pub const fn get(&self, i: L4Index) -> Pml4Entry
Read the entry at the given index.
This is a plain fetch; it does not perform TLB synchronization.
Sourcepub const fn set(&mut self, i: L4Index, e: Pml4Entry)
pub const fn set(&mut self, i: L4Index, e: Pml4Entry)
Write the entry at the given index.
Caller is responsible for any required TLB invalidation after modifying mappings that affect active address spaces.
Sourcepub const fn index_of(va: VirtualAddress) -> L4Index
pub const fn index_of(va: VirtualAddress) -> L4Index
Derive the L4Index from a virtual address.
Auto Trait Implementations§
impl Freeze for PageMapLevel4
impl RefUnwindSafe for PageMapLevel4
impl Send for PageMapLevel4
impl Sync for PageMapLevel4
impl Unpin for PageMapLevel4
impl UnwindSafe for PageMapLevel4
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