aboutsummaryrefslogtreecommitdiff
path: root/kernel/features
diff options
context:
space:
mode:
authorMarvin Borner2021-04-29 23:59:48 +0200
committerMarvin Borner2021-04-29 23:59:48 +0200
commit3a3d50d7eb0f4fdbb9beaf16bacfa98689cc448c (patch)
treed837ed9ed9470a20b66b28b6083d30865d7e6016 /kernel/features
parentf8e47b6b0c0578c52d82c0e243620361b87a4abe (diff)
Alright!
Diffstat (limited to 'kernel/features')
-rw-r--r--kernel/features/mm.c15
-rw-r--r--kernel/features/proc.c1
2 files changed, 1 insertions, 15 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);
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index 6812c72..ffa711b 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -1,7 +1,6 @@
// MIT License, Copyright (c) 2020 Marvin Borner
#include <assert.h>
-#include <boot.h>
#include <cpu.h>
#include <errno.h>
#include <fs.h>