Struct x86_64::structures::paging::page_table::PageTableEntry
source · pub struct PageTableEntry { /* private fields */ }
Expand description
A 64-bit page table entry.
Implementations§
source§impl PageTableEntry
impl PageTableEntry
sourcepub fn set_unused(&mut self)
pub fn set_unused(&mut self)
Sets this entry to zero.
sourcepub const fn flags(&self) -> PageTableFlags
pub const fn flags(&self) -> PageTableFlags
Returns the flags of this entry.
sourcepub fn addr(&self) -> PhysAddr
pub fn addr(&self) -> PhysAddr
Returns the physical address mapped by this entry, might be zero.
sourcepub fn frame(&self) -> Result<PhysFrame, FrameError>
pub fn frame(&self) -> Result<PhysFrame, FrameError>
Returns the physical frame mapped by this entry.
Returns the following errors:
FrameError::FrameNotPresent
if the entry doesn’t have thePRESENT
flag set.FrameError::HugeFrame
if the entry has theHUGE_PAGE
flag set (for huge pages theaddr
function must be used)
sourcepub fn set_addr(&mut self, addr: PhysAddr, flags: PageTableFlags)
pub fn set_addr(&mut self, addr: PhysAddr, flags: PageTableFlags)
Map the entry to the specified physical address with the specified flags.
sourcepub fn set_frame(&mut self, frame: PhysFrame, flags: PageTableFlags)
pub fn set_frame(&mut self, frame: PhysFrame, flags: PageTableFlags)
Map the entry to the specified physical frame with the specified flags.
sourcepub fn set_flags(&mut self, flags: PageTableFlags)
pub fn set_flags(&mut self, flags: PageTableFlags)
Sets the flags of this entry.
Trait Implementations§
source§impl Clone for PageTableEntry
impl Clone for PageTableEntry
source§fn clone(&self) -> PageTableEntry
fn clone(&self) -> PageTableEntry
Returns a copy of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more