mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Turn page of old P4 into guard page
This commit is contained in:
@@ -196,4 +196,11 @@ pub fn remap_the_kernel<A>(allocator: &mut A, boot_info: &BootInformation)
|
|||||||
|
|
||||||
let old_table = active_table.switch(new_table);
|
let old_table = active_table.switch(new_table);
|
||||||
println!("NEW TABLE!!!");
|
println!("NEW TABLE!!!");
|
||||||
|
|
||||||
|
// turn the old p4 page into a guard page
|
||||||
|
let old_p4_page = Page::containing_address(
|
||||||
|
old_table.p4_frame.start_address()
|
||||||
|
);
|
||||||
|
active_table.unmap(old_p4_page, allocator);
|
||||||
|
println!("guard page at {:#x}", old_p4_page.start_address());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user