aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/features/memory.c6
1 files changed, 2 insertions, 4 deletions
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);