summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/pagedir.c
diff options
context:
space:
mode:
authordzwdz2022-07-16 23:08:50 +0200
committerdzwdz2022-07-16 23:08:50 +0200
commit4c10db944ca18c8001848c7e4e8ef51876bbe094 (patch)
tree38db3ebb7dc18c0640223561378b897b9dc3dabd /src/kernel/arch/amd64/pagedir.c
parenta251c14f1a745f3388ce73a5a45ebc73cd1782b5 (diff)
amd64: all tests pass
Diffstat (limited to 'src/kernel/arch/amd64/pagedir.c')
-rw-r--r--src/kernel/arch/amd64/pagedir.c10
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,