summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kernel/arch/generic.h2
-rw-r--r--src/kernel/arch/i386/pagedir.c2
-rw-r--r--src/kernel/main.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/arch/generic.h b/src/kernel/arch/generic.h
index 7ce3d46..a535514 100644
--- a/src/kernel/arch/generic.h
+++ b/src/kernel/arch/generic.h
@@ -22,4 +22,4 @@ void sysenter_setup();
struct pagedir *pagedir_new();
void pagedir_map(struct pagedir *dir, void *virt, void *phys,
bool user, bool writeable);
-void pagedir_use(struct pagedir *);
+void pagedir_switch(struct pagedir *);
diff --git a/src/kernel/arch/i386/pagedir.c b/src/kernel/arch/i386/pagedir.c
index b52075d..8ab406d 100644
--- a/src/kernel/arch/i386/pagedir.c
+++ b/src/kernel/arch/i386/pagedir.c
@@ -88,6 +88,6 @@ void pagedir_map(struct pagedir *dir, void *virt, void *phys,
};
}
-void pagedir_use(struct pagedir *dir) {
+void pagedir_switch(struct pagedir *dir) {
asm volatile("mov %0, %%cr3;" : : "r" (dir) : "memory");
}
diff --git a/src/kernel/main.c b/src/kernel/main.c
index ba4cdbb..a59c014 100644
--- a/src/kernel/main.c
+++ b/src/kernel/main.c
@@ -16,7 +16,7 @@ static void setup_paging() {
for (size_t p = 0x100000; p < &_bss_end; p += PAGE_SIZE)
pagedir_map(dir, p, p, false, true); // yes, .text is writeable too
- pagedir_use(dir);
+ pagedir_switch(dir);
}
void kmain(struct kmain_info info) {