rustubs::mm

Function drop_init_mapping

Source
pub unsafe fn drop_init_mapping()
Expand description

drop the low memory mapping from the current pagetable by removing the first entry from pml4 table (which mapps to 0~512G). The PDP table is unchanged, wasting 4K of memory but there is nothing we can do now since the heap allocator doesn’t manage this address.

after calling this function, the system can no longer directly access memory by physical address