Code-base clean-up and refactoring (#47)
[lunaix-os.git] / lunaix-os / kernel / mm / vmm.c
index d7d504ed3704d829b6c90071ae6b4db50314576a..180d7f40fb55e93a52b33eddb76414026b1eeb8d 100644 (file)
@@ -3,17 +3,11 @@
 #include <lunaix/spike.h>
 #include <lunaix/syslog.h>
 
-#include <sys/cpu.h>
-#include <sys/mm/mm_defs.h>
+#include <asm/cpu.h>
+#include <asm/mm_defs.h>
 
 LOG_MODULE("VM")
 
-void
-vmm_init()
-{
-    // XXX: something here?
-}
-
 pte_t
 vmm_tryptep(pte_t* ptep, size_t lvl_size)
 {
@@ -49,7 +43,7 @@ vms_mount(ptr_t mnt, ptr_t vms_root)
     assert(vms_root);
 
     pte_t* ptep = mkl0tep_va(VMS_SELF, mnt);
-    set_pte(ptep, mkpte(vms_root, KERNEL_DATA));
+    set_pte(ptep, mkpte(vms_root, KERNEL_PGTAB));
     tlb_flush_kernel(mnt);
     return mnt;
 }