pub struct Cr2;
Expand description
Contains the Page Fault Linear Address (PFLA).
When a page fault occurs, the CPU sets this register to the faulting virtual address.
Implementations§
Source§impl Cr2
impl Cr2
Sourcepub fn read() -> Result<VirtAddr, VirtAddrNotValid>
pub fn read() -> Result<VirtAddr, VirtAddrNotValid>
Read the current page fault linear address from the CR2 register.
§Errors
This method returns a VirtAddrNotValid
error if the CR2 register contains a
non-canonical address. Call Cr2::read_raw
to handle such cases.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cr2
impl RefUnwindSafe for Cr2
impl Send for Cr2
impl Sync for Cr2
impl Unpin for Cr2
impl UnwindSafe for Cr2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more