summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-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();
+}