summaryrefslogtreecommitdiff
path: root/src/kernel/paging.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/paging.c')
-rw-r--r--src/kernel/paging.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/paging.c b/src/kernel/paging.c
index 0432ab6..dc7ca27 100644
--- a/src/kernel/paging.c
+++ b/src/kernel/paging.c
@@ -115,11 +115,15 @@ void init_paging() {
for (uint32_t i = 0; i < 1048576; ++i)
KPAGE_TABLE_0[i] = (i * 4096) | PE_WRITABLE | PE_PRESENT;
+ KPAGE_TABLE_0[0x00020] &= ~PE_PRESENT;
+ KPAGE_TABLE_0[0x0002f] &= ~PE_PRESENT;
for (uint16_t i = 0; i < 1024; ++i)
KPAGE_DIR[i] = (uint32_t)(KPAGE_TABLE_0 + i * 1024) | PE_WRITABLE | PE_PRESENT;
for (uint16_t i = 0; i < KERNEL_END / 4096; ++i)
kmap[i] = (i * 4096) | PE_USER | PE_PRESENT;
+ kmap[0x00020] &= ~PE_PRESENT;
+ kmap[0x0002f] &= ~PE_PRESENT;
asm volatile (
"mov $0x00005000, %%eax\n"