From ac11bed4498cccc1f48d3bf58ab4a9a311cbb998 Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Wed, 11 Oct 2023 16:43:32 -0400 Subject: kernel: vm: Create vm_init() Signed-off-by: sigsegv7 --- sys/kern/init_main.c | 2 ++ sys/vm/vm_init.c | 10 ++++++++++ 2 files changed, 12 insertions(+) (limited to 'sys') diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index f96128c..d0b792f 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -34,6 +34,7 @@ #include #include #include +#include #include __MODULE_NAME("init_main"); @@ -85,6 +86,7 @@ main(void) vm_physseg_init(); list_timers(); + vm_init(); /* We're done here, halt the processor */ __ASMV("cli; hlt"); diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index ab6103f..0930b54 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -28,8 +28,18 @@ */ #include +#include +#include + +static volatile struct vas kernel_vas; volatile struct limine_hhdm_request g_hhdm_request = { .id = LIMINE_HHDM_REQUEST, .revision = 0 }; + +void +vm_init(void) +{ + kernel_vas = pmap_read_vas(); +} -- cgit v1.2.3