PageDirectory

Struct PageDirectory 

Source
#[repr(C, align(4096))]
pub struct PageDirectory { entries: [PdEntry; 512], }
Expand description

The Page Directory (L2): 512 entries, 4 KiB-aligned.

Fields§

§entries: [PdEntry; 512]

Implementations§

Source§

impl PageDirectory

Source

pub const fn zeroed() -> Self

Create a fully zeroed Page Directory (all entries non-present).

Source

pub const fn get(&self, i: L2Index) -> PdEntry

Read the entry at i.

Plain load; does not imply any TLB synchronization.

Source

pub const fn set(&mut self, i: L2Index, e: PdEntry)

Write the entry at i.

Caller must handle any required TLB invalidation when changing active mappings.

Source

pub const fn set_zero(&mut self, i: L2Index)

Set the entry at i to PdEntry::zero.

Caller is responsible for necessary TLB invalidations if this affects an active address space.

Source

pub const fn index_of(va: VirtualAddress) -> L2Index

Derive the PD index from a virtual address.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.