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.