From 4c10db944ca18c8001848c7e4e8ef51876bbe094 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 16 Jul 2022 23:08:50 +0200 Subject: amd64: all tests pass --- src/kernel/arch/amd64/pagedir.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/kernel/arch/amd64/pagedir.c') 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, -- cgit v1.2.3