summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-10-11 16:43:32 -0400
committersigsegv7 <ian@vegaa.systems>2023-10-11 16:43:32 -0400
commitac11bed4498cccc1f48d3bf58ab4a9a311cbb998 (patch)
treeff9db51898ba442d21a52338a2024f78ffa6d4bd
parent1c4c7f88056f50987a5a4d40016d6e32dc5a0205 (diff)
kernel: vm: Create vm_init()
Signed-off-by: sigsegv7 <ian@vegaa.systems>
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/vm/vm_init.c10
2 files changed, 12 insertions, 0 deletions
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 <sys/timer.h>
#include <firmware/acpi/acpi.h>
#include <vm/vm_physseg.h>
+#include <vm/vm.h>
#include <logo.h>
__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 <vm/vm.h>
+#include <vm/pmap.h>
+#include <sys/panic.h>
+
+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();
+}