diff options
Diffstat (limited to 'src/kernel/arch/amd64')
-rw-r--r-- | src/kernel/arch/amd64/pagedir.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/kernel/arch/amd64/pagedir.c b/src/kernel/arch/amd64/pagedir.c index 2075aac..6d0546a 100644 --- a/src/kernel/arch/amd64/pagedir.c +++ b/src/kernel/arch/amd64/pagedir.c @@ -122,14 +122,10 @@ get_entry(struct pagedir *dir, const void __user *virt) { } void *pagedir_unmap(struct pagedir *dir, void __user *virt) { - (void)dir; (void)virt; - panic_unimplemented(); - /* unset the present bit - void *phys = pagedir_virt2phys(dir, virt, false, false); - struct pagetable_entry *page = get_entry(dir, virt); + pe_generic_t *page = get_entry(dir, virt); + if (!page) return NULL; page->present = false; - return phys; - */ + return addr_extract(*page); } void pagedir_map(struct pagedir *dir, void __user *virt, void *phys, |