From 20b1a8e22301877a0cc311efa069eb3f491f7a42 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 1 Mar 2021 20:38:56 +0100 Subject: Hmmm, something isn't right --- kernel/features/memory.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'kernel') diff --git a/kernel/features/memory.c b/kernel/features/memory.c index 4dfebff..7813c56 100644 --- a/kernel/features/memory.c +++ b/kernel/features/memory.c @@ -405,16 +405,14 @@ void memory_initialize(struct mem_info *mem_info) memory_map_identity(&kernel_dir, kernel_memory_range(), MEMORY_NONE); // Map kernel stack - memory_map_identity(&kernel_dir, memory_range_around_address(STACK_START, 0x1000), + memory_map_identity(&kernel_dir, + memory_range_around_address(STACK_START - STACK_SIZE, STACK_SIZE), MEMORY_NONE); // Map kernel heap memory_map_identity(&kernel_dir, memory_range_around_address(HEAP_START, HEAP_INIT_SIZE), MEMORY_NONE); - // Map stack guard? - /* memory_map_identity(&kernel_dir, memory_range_around_address(0xdeadbeef, 0x1), MEMORY_NONE); */ - // Unmap NULL byte/page virtual_free(&kernel_dir, memory_range(0, PAGE_SIZE)); physical_set_used(0, 1); -- cgit v1.2.3