pub enum Size2MiB {}
Expand description

A “huge” 2MiB page.

Trait Implementations§

source§

impl Clone for Size2MiB

source§

fn clone(&self) -> Size2MiB

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Size2MiB

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P>

source§

unsafe fn map_to_with_table_flags<A>( &mut self, page: Page<Size2MiB>, frame: PhysFrame<Size2MiB>, flags: PageTableFlags, parent_table_flags: PageTableFlags, allocator: &mut A ) -> Result<MapperFlush<Size2MiB>, MapToError<Size2MiB>>

Creates a new mapping in the page table. Read more
source§

fn unmap( &mut self, page: Page<Size2MiB> ) -> Result<(PhysFrame<Size2MiB>, MapperFlush<Size2MiB>), UnmapError>

Removes a mapping from the page table and returns the frame that used to be mapped. Read more
source§

unsafe fn update_flags( &mut self, page: Page<Size2MiB>, flags: PageTableFlags ) -> Result<MapperFlush<Size2MiB>, FlagUpdateError>

Updates the flags of an existing mapping. Read more
source§

unsafe fn set_flags_p4_entry( &mut self, page: Page<Size2MiB>, flags: PageTableFlags ) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page level 4 table entry Read more
source§

unsafe fn set_flags_p3_entry( &mut self, page: Page<Size2MiB>, flags: PageTableFlags ) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 3 entry Read more
source§

unsafe fn set_flags_p2_entry( &mut self, _page: Page<Size2MiB>, _flags: PageTableFlags ) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 2 entry Read more
source§

fn translate_page( &self, page: Page<Size2MiB> ) -> Result<PhysFrame<Size2MiB>, TranslateError>

Return the frame that the specified page is mapped to. Read more
source§

unsafe fn map_to<A>( &mut self, page: Page<S>, frame: PhysFrame<S>, flags: PageTableFlags, frame_allocator: &mut A ) -> Result<MapperFlush<S>, MapToError<S>>
where Self: Sized, A: FrameAllocator<Size4KiB> + ?Sized,

Creates a new mapping in the page table. Read more
source§

unsafe fn identity_map<A>( &mut self, frame: PhysFrame<S>, flags: PageTableFlags, frame_allocator: &mut A ) -> Result<MapperFlush<S>, MapToError<S>>
where Self: Sized + Mapper<S>, A: FrameAllocator<Size4KiB> + ?Sized, S: PageSize,

Maps the given frame to the virtual page with the same address. Read more
source§

impl<'a> Mapper<Size2MiB> for RecursivePageTable<'a>

Available on crate feature instructions only.
source§

unsafe fn map_to_with_table_flags<A>( &mut self, page: Page<Size2MiB>, frame: PhysFrame<Size2MiB>, flags: PageTableFlags, parent_table_flags: PageTableFlags, allocator: &mut A ) -> Result<MapperFlush<Size2MiB>, MapToError<Size2MiB>>

Creates a new mapping in the page table. Read more
source§

fn unmap( &mut self, page: Page<Size2MiB> ) -> Result<(PhysFrame<Size2MiB>, MapperFlush<Size2MiB>), UnmapError>

Removes a mapping from the page table and returns the frame that used to be mapped. Read more
source§

unsafe fn update_flags( &mut self, page: Page<Size2MiB>, flags: PageTableFlags ) -> Result<MapperFlush<Size2MiB>, FlagUpdateError>

Updates the flags of an existing mapping. Read more
source§

unsafe fn set_flags_p4_entry( &mut self, page: Page<Size2MiB>, flags: PageTableFlags ) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page level 4 table entry Read more
source§

unsafe fn set_flags_p3_entry( &mut self, page: Page<Size2MiB>, flags: PageTableFlags ) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 3 entry Read more
source§

unsafe fn set_flags_p2_entry( &mut self, _page: Page<Size2MiB>, _flags: PageTableFlags ) -> Result<MapperFlushAll, FlagUpdateError>

Set the flags of an existing page table level 2 entry Read more
source§

fn translate_page( &self, page: Page<Size2MiB> ) -> Result<PhysFrame<Size2MiB>, TranslateError>

Return the frame that the specified page is mapped to. Read more
source§

unsafe fn map_to<A>( &mut self, page: Page<S>, frame: PhysFrame<S>, flags: PageTableFlags, frame_allocator: &mut A ) -> Result<MapperFlush<S>, MapToError<S>>
where Self: Sized, A: FrameAllocator<Size4KiB> + ?Sized,

Creates a new mapping in the page table. Read more
source§

unsafe fn identity_map<A>( &mut self, frame: PhysFrame<S>, flags: PageTableFlags, frame_allocator: &mut A ) -> Result<MapperFlush<S>, MapToError<S>>
where Self: Sized + Mapper<S>, A: FrameAllocator<Size4KiB> + ?Sized, S: PageSize,

Maps the given frame to the virtual page with the same address. Read more
source§

impl Ord for Size2MiB

source§

fn cmp(&self, other: &Size2MiB) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PageSize for Size2MiB

source§

const SIZE: u64 = 2_097_152u64

The page size in bytes.
source§

const DEBUG_STR: &'static str = "2MiB"

A string representation of the page size for debug output.
source§

impl PartialEq for Size2MiB

source§

fn eq(&self, other: &Size2MiB) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Size2MiB

source§

fn partial_cmp(&self, other: &Size2MiB) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Size2MiB

source§

impl Eq for Size2MiB

source§

impl NotGiantPageSize for Size2MiB

source§

impl StructuralPartialEq for Size2MiB

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>,

§

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>,

§

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.