[][src]Struct hermit::x86_64::mm::paging::PageTableEntryFlags

pub struct PageTableEntryFlags { /* fields omitted */ }

Possible flags for an entry in either table (PML4, PDPT, PD, PT)

See Intel Vol. 3A, Tables 4-14 through 4-19

Implementations

impl PageTableEntryFlags[src]

pub const PRESENT: PageTableEntryFlags[src]

Set if this entry is valid and points to a page or table.

pub const WRITABLE: PageTableEntryFlags[src]

Set if memory referenced by this entry shall be writable.

pub const USER_ACCESSIBLE: PageTableEntryFlags[src]

Set if memory referenced by this entry shall be accessible from user-mode (Ring 3).

pub const WRITE_THROUGH: PageTableEntryFlags[src]

Set if Write-Through caching shall be enabled for memory referenced by this entry. Otherwise, Write-Back caching is used.

pub const CACHE_DISABLE: PageTableEntryFlags[src]

Set if caching shall be disabled for memory referenced by this entry.

pub const ACCESSED: PageTableEntryFlags[src]

Set if software has accessed this entry (for memory access or address translation).

pub const DIRTY: PageTableEntryFlags[src]

Only for page entries: Set if software has written to the memory referenced by this entry.

pub const HUGE_PAGE: PageTableEntryFlags[src]

Only for page entries in PDPT or PDT: Set if this entry references a 1 GiB (PDPT) or 2 MiB (PDT) page.

pub const GLOBAL: PageTableEntryFlags[src]

Only for page entries: Set if this address translation is global for all tasks and does not need to be flushed from the TLB when CR3 is reset.

pub const EXECUTE_DISABLE: PageTableEntryFlags[src]

Set if code execution shall be disabled for memory referenced by this entry.

pub const fn empty() -> PageTableEntryFlags[src]

Returns an empty set of flags

pub const fn all() -> PageTableEntryFlags[src]

Returns the set containing all flags.

pub const fn bits(&self) -> usize[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: usize) -> Option<PageTableEntryFlags>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: usize) -> PageTableEntryFlags[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: usize) -> PageTableEntryFlags[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: PageTableEntryFlags) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: PageTableEntryFlags) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: PageTableEntryFlags)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: PageTableEntryFlags)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: PageTableEntryFlags)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: PageTableEntryFlags, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

impl PageTableEntryFlags[src]

pub fn device(&mut self) -> &mut Self[src]

pub fn normal(&mut self) -> &mut Self[src]

pub fn read_only(&mut self) -> &mut Self[src]

pub fn writable(&mut self) -> &mut Self[src]

pub fn execute_disable(&mut self) -> &mut Self[src]

Trait Implementations

impl Binary for PageTableEntryFlags[src]

impl BitAnd<PageTableEntryFlags> for PageTableEntryFlags[src]

type Output = PageTableEntryFlags

The resulting type after applying the & operator.

fn bitand(self, other: PageTableEntryFlags) -> PageTableEntryFlags[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<PageTableEntryFlags> for PageTableEntryFlags[src]

fn bitand_assign(&mut self, other: PageTableEntryFlags)[src]

Disables all flags disabled in the set.

impl BitOr<PageTableEntryFlags> for PageTableEntryFlags[src]

type Output = PageTableEntryFlags

The resulting type after applying the | operator.

fn bitor(self, other: PageTableEntryFlags) -> PageTableEntryFlags[src]

Returns the union of the two sets of flags.

impl BitOrAssign<PageTableEntryFlags> for PageTableEntryFlags[src]

fn bitor_assign(&mut self, other: PageTableEntryFlags)[src]

Adds the set of flags.

impl BitXor<PageTableEntryFlags> for PageTableEntryFlags[src]

type Output = PageTableEntryFlags

The resulting type after applying the ^ operator.

fn bitxor(self, other: PageTableEntryFlags) -> PageTableEntryFlags[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<PageTableEntryFlags> for PageTableEntryFlags[src]

fn bitxor_assign(&mut self, other: PageTableEntryFlags)[src]

Toggles the set of flags.

impl Clone for PageTableEntryFlags[src]

impl Copy for PageTableEntryFlags[src]

impl Debug for PageTableEntryFlags[src]

impl Eq for PageTableEntryFlags[src]

impl Extend<PageTableEntryFlags> for PageTableEntryFlags[src]

impl FromIterator<PageTableEntryFlags> for PageTableEntryFlags[src]

impl Hash for PageTableEntryFlags[src]

impl LowerHex for PageTableEntryFlags[src]

impl Not for PageTableEntryFlags[src]

type Output = PageTableEntryFlags

The resulting type after applying the ! operator.

fn not(self) -> PageTableEntryFlags[src]

Returns the complement of this set of flags.

impl Octal for PageTableEntryFlags[src]

impl Ord for PageTableEntryFlags[src]

impl PartialEq<PageTableEntryFlags> for PageTableEntryFlags[src]

impl PartialOrd<PageTableEntryFlags> for PageTableEntryFlags[src]

impl StructuralEq for PageTableEntryFlags[src]

impl StructuralPartialEq for PageTableEntryFlags[src]

impl Sub<PageTableEntryFlags> for PageTableEntryFlags[src]

type Output = PageTableEntryFlags

The resulting type after applying the - operator.

fn sub(self, other: PageTableEntryFlags) -> PageTableEntryFlags[src]

Returns the set difference of the two sets of flags.

impl SubAssign<PageTableEntryFlags> for PageTableEntryFlags[src]

fn sub_assign(&mut self, other: PageTableEntryFlags)[src]

Disables all flags enabled in the set.

impl UpperHex for PageTableEntryFlags[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.