#[repr(transparent)]pub struct PTEntry(pub u64);
Expand description
A PT Entry consists of an address and a bunch of flags.
Tuple Fields§
§0: u64
Implementations§
Source§impl PTEntry
impl PTEntry
Sourcepub fn new(page: PAddr, flags: PTFlags) -> PTEntry
pub fn new(page: PAddr, flags: PTFlags) -> PTEntry
Creates a new PTEntry.
§Arguments
page
- The physical address of the backing 4 KiB page.flags
- Additional flags for the entry.
Sourcepub fn is_present(self) -> bool
pub fn is_present(self) -> bool
Present; must be 1 to map a 4-KByte page or reference a page table.
Sourcepub fn is_writeable(self) -> bool
pub fn is_writeable(self) -> bool
Read/write; if 0, writes may not be allowed to the 4-KByte region controlled by this entry
Sourcepub fn is_user_mode_allowed(self) -> bool
pub fn is_user_mode_allowed(self) -> bool
User/supervisor; user-mode accesses are not allowed to the 4-KByte region controlled by this entry.
Sourcepub fn is_page_write_through(self) -> bool
pub fn is_page_write_through(self) -> bool
Page-level write-through.
Sourcepub fn is_page_level_cache_disabled(self) -> bool
pub fn is_page_level_cache_disabled(self) -> bool
Page-level cache disable.
Sourcepub fn is_accessed(self) -> bool
pub fn is_accessed(self) -> bool
Accessed; if PS set indicates whether software has accessed the 4-KByte page else indicates whether this entry has been used for linear-address translation.
Sourcepub fn is_dirty(self) -> bool
pub fn is_dirty(self) -> bool
Dirty; if PD_PS set indicates whether software has written to the 4-KByte page referenced by this entry else ignored.
Sourcepub fn is_global(self) -> bool
pub fn is_global(self) -> bool
Global; if PS && CR4.PGE = 1, determines whether the translation is global; ignored otherwise if not PS this is ignored.
Sourcepub fn is_instruction_fetching_disabled(self) -> bool
pub fn is_instruction_fetching_disabled(self) -> bool
If IA32_EFER.NXE = 1, execute-disable. If 1, instruction fetches are not allowed from the 4-KByte region.