aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/paging.h
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2014-12-04 10:43:58 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2014-12-04 10:43:58 +0100
commit292e4141078d18993b1395820631503ac852eb3d (patch)
tree3b3e5cb75d9bf3abb2639deedc247eba2cdeabe6 /kernel/include/paging.h
parentd78a3d8be9c194554580cb3c73c1c5ebd0d82a9b (diff)
downloadmacroscope-292e4141078d18993b1395820631503ac852eb3d.tar.gz
macroscope-292e4141078d18993b1395820631503ac852eb3d.zip
Make paging work ! \o/
Diffstat (limited to 'kernel/include/paging.h')
-rw-r--r--kernel/include/paging.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/include/paging.h b/kernel/include/paging.h
index 7082e2e..2e1f844 100644
--- a/kernel/include/paging.h
+++ b/kernel/include/paging.h
@@ -13,13 +13,11 @@ pagedir_t *get_kernel_pagedir();
void switch_pagedir(pagedir_t *pd);
-// The three functions below DO NOT DEPEND on argument pd for
-// addresses above K_HIGHHALF_ADDR, so just pass 0 to map/unmap in kernel space.
-uint32_t pd_get_frame(pagedir_t *pd, size_t vaddr); // get physical frame for virtual address
-int pd_map_page(pagedir_t *pd,
- size_t vaddr, uint32_t frame_id,
+// these functions are always relative to the currently mapped page directory
+uint32_t pd_get_frame(size_t vaddr); // get physical frame for virtual address
+int pd_map_page(size_t vaddr, uint32_t frame_id,
uint32_t rw); // returns nonzero on error
-void pd_unmap_page(pagedir_t *pd, size_t vaddr); // does nothing if page wasn't mapped
+void pd_unmap_page(size_t vaddr); // does nothing if page not mapped
pagedir_t *create_pagedir(); // returns zero on error
void delete_pagedir(pagedir_t *pd);