/// Return a struct to the currently installed page-tables so we
/// can manipulate them (for example to map the APIC registers).
///
/// This function is called during initialization.
/// It will read the cr3 register to find the physical address of
/// the currently loaded PML4 table which is constructed
/// by the bootloader.
///
/// # Safety
/// This should only be called once during init to retrieve the
/// initial VSpace.
Return a struct to the currently installed page-tables so we
can manipulate them (for example to map the APIC registers).

This function is called during initialization.
It will read the cr3 register to find the physical address of
the currently loaded PML4 table which is constructed
by the bootloader.
Return a struct to the currently installed page - tables so we can manipulate them ( for example to map the APIC registers ) . This function is called during initialization . It will read the cr3 register to find the physical address of the currently loaded PML4 table which is constructed by the bootloader .
unsafe fn find_current_ptables() -> PageTable {
    let cr_three: u64 = controlregs::cr3();
    let pml4: PAddr = PAddr::from(cr_three);
    let pml4_table = transmute::<VAddr, *mut PML4>(paddr_to_kernel_vaddr(pml4));
    PageTable {
        pml4: Box::into_pin(Box::from_raw(pml4_table)),
        da: None,
    }
}
unsafe fn find_current_ptables ( ) -> PageTable { let cr_three : u64 = controlregs :: cr3 ( ) ; let pml4 : PAddr = PAddr :: from ( cr_three ) ; let pml4_table = transmute :: < VAddr , * mut PML4 > ( paddr_to_kernel_vaddr ( pml4 ) ) ; PageTable { pml4 : Box :: into_pin ( Box :: from_raw ( pml4_table ) ) , da : None , } }
Return a struct to the currently installed page-tables so we
can manipulate them (for example to map the APIC registers).
Return a struct to the currently installed page - tables so we can manipulate them ( for example to map the APIC registers ) .
safety
This should only be called once during init to retrieve the
initial VSpace.
This should only be called once during init to retrieve the initial VSpace .