diff options
author | Anton Kling <anton@kling.gg> | 2023-11-08 15:33:11 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-08 15:33:11 +0100 |
commit | d88e7c2124ccb655945bcfd9c2b1cb875a42637d (patch) | |
tree | ccea3c2efa7664e5c7de040daea3e07e52908fe4 /kernel/arch/i386/mmu.c | |
parent | 2753031a63117fd9de2d189d6731b4de8dd94769 (diff) |
Kernel/MMU: Create a seperate table for heap allocation
Diffstat (limited to 'kernel/arch/i386/mmu.c')
-rw-r--r-- | kernel/arch/i386/mmu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/arch/i386/mmu.c b/kernel/arch/i386/mmu.c index 6b2f704..4561675 100644 --- a/kernel/arch/i386/mmu.c +++ b/kernel/arch/i386/mmu.c @@ -549,12 +549,13 @@ void paging_init(void) { } switch_page_directory(kernel_directory); + get_page(NULL, kernel_directory, PAGE_ALLOCATE, 0)->present = 0; kernel_directory = clone_directory(kernel_directory); // Make null dereferences crash. switch_page_directory(kernel_directory); - get_page(NULL, kernel_directory, PAGE_ALLOCATE, 0)->present = 0; switch_page_directory(clone_directory(kernel_directory)); + /* // FIXME: Really hacky solution. Since page table creation needs to // allocate memory but memory allocation requires page table creation // they depend on eachother. The bad/current solution is just to @@ -563,5 +564,6 @@ void paging_init(void) { allocate_frame( get_page((void *)((0x302 + i) * 0x1000 * 1024), NULL, PAGE_ALLOCATE, 0), 1, 1); - move_stack(0xA0000000, 0xC00000); + */ + move_stack(0xA0000000, 0x80000); } |