/// Returns a mutable reference to the active level 4 table.
///
/// This function is unsafe because the caller must guarantee that the
/// complete physical memory is mapped to virtual memory at the passed
/// `physical_memory_offset`. Also, this function must be only called once
/// to avoid aliasing `&mut` references (which is undefined behavior).
Returns a mutable reference to the active level 4 table.
This function is unsafe because the caller must guarantee that the
complete physical memory is mapped to virtual memory at the passed
`physical_memory_offset`. Also, this function must be only called once
to avoid aliasing `&mut` references (which is undefined behavior).
Returns a mutable reference to the active level 4 table . This function is unsafe because the caller must guarantee that the complete physical memory is mapped to virtual memory at the passed ` physical_memory_offset ` . Also this function must be only called once to avoid aliasing ` &mut ` references ( which is undefined behavior ) .
unsafe fn active_level_4_table() -> &'static mut PageTable {
    let (level_4_table_frame, _) = Cr3::read();
    let phys = level_4_table_frame.start_address();
    let virt = phys2virt(phys.as_u64());
    let page_table_ptr: *mut PageTable = virt.as_mut_ptr();
    &mut *page_table_ptr // unsafe
}
unsafe fn active_level_4_table ( ) -> & ' static mut PageTable { let ( level_4_table_frame , _ ) = Cr3 :: read ( ) ; let phys = level_4_table_frame . start_address ( ) ; let virt = phys2virt ( phys . as_u64 ( ) ) ; let page_table_ptr : * mut PageTable = virt . as_mut_ptr ( ) ; & mut * page_table_ptr // unsafe }
Returns a mutable reference to the active level 4 table.
Returns a mutable reference to the active level 4 table .