From dbcb76114776ae3ee4da89236bb36510bcb579a6 Mon Sep 17 00:00:00 2001 From: pjht Date: Tue, 21 Jul 2020 16:30:22 -0500 Subject: [PATCH] Kernel thread stacks were not mapped properly --- kernel/cpu/i386/paging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu/i386/paging.c b/kernel/cpu/i386/paging.c index 9e7c41f..59f3d58 100644 --- a/kernel/cpu/i386/paging.c +++ b/kernel/cpu/i386/paging.c @@ -251,7 +251,7 @@ void paging_init() { page_directory[i+768]=(entry_virt-0xC0000000)|0x3; } page_directory[985]=(uint32_t)(pmem_alloc(1024))|0x83; - for (uint32_t i=0;i<10;i++) { + for (uint32_t i=0;i<218;i++) { uint32_t entry_virt=(uint32_t)&(kstack_page_tables[i*1024]); page_directory[i+800]=(entry_virt-0xC0000000)|0x3; }