aboutsummaryrefslogtreecommitdiff
path: root/kernel/features
diff options
context:
space:
mode:
authorMarvin Borner2021-03-01 20:38:56 +0100
committerMarvin Borner2021-03-01 20:38:56 +0100
commit20b1a8e22301877a0cc311efa069eb3f491f7a42 (patch)
tree8d2e00cf83ed7ae8f30da0207e7555b9deb35d0e /kernel/features
parent21522ad5f2fe55e633cd025e292537ca37e042fb (diff)
Hmmm, something isn't right
Diffstat (limited to 'kernel/features')
-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);