aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/features/mm.c')
-rw-r--r--kernel/features/mm.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/kernel/features/mm.c b/kernel/features/mm.c
index 9dd425e..e60e2b5 100644
--- a/kernel/features/mm.c
+++ b/kernel/features/mm.c
@@ -740,25 +740,12 @@ CLEAR void memory_install(void)
memory_used = 0;
printf("Detected memory: %dKiB (%dMiB)\n", memory_total >> 10, memory_total >> 20);
- // Set first MiB 'used' (bootloader(s), VESA tables, memory maps, ...)
- //physical_set_used(memory_range(0, 0x00100000));
-
// Map kernel
memory_map_identity(&kernel_dir, kernel_ro_memory_range(), MEMORY_READONLY);
memory_map_identity(&kernel_dir, kernel_rw_memory_range(), MEMORY_NONE);
- // Map kernel stack with readonly boundaries (stack grows downwards!)
- memory_map_identity(&kernel_dir, memory_range(STACK_START - STACK_SIZE, STACK_SIZE),
- MEMORY_NONE);
- memory_map_identity(&kernel_dir,
- memory_range(STACK_START - STACK_SIZE - PAGE_SIZE, PAGE_SIZE),
- MEMORY_READONLY);
- memory_map_identity(&kernel_dir, memory_range(STACK_START, PAGE_SIZE), MEMORY_READONLY);
-
// Map framebuffer
- /* memory_map_identity(&kernel_dir, memory_range_around((u32)vid_info->vbe, 0x1000), */
- /* MEMORY_NONE); */
- /* fb_map_buffer(virtual_kernel_dir(), vid_info); */
+ memory_map_identity(&kernel_dir, memory_range_around(multiboot_vbe(), 0x1000), MEMORY_NONE);
// Unmap NULL byte/page
struct memory_range zero = memory_range(0, PAGE_SIZE);