summaryrefslogtreecommitdiff
path: root/src/sys/vm
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-14 20:45:19 -0400
committerIan Moffett <ian@osmora.org>2025-09-14 20:45:19 -0400
commit819e76156b9b955074a58bc177965a3d65d837ae (patch)
tree33f4d69124905bfa97c17ee5a7cc848cfc468159 /src/sys/vm
parent977a102db2f47e097f7389313223d36ff7d47333 (diff)
kern: vm: Implement page mapping and VASes
This commit implements an interface to allow other parts of Lunos to talk to the MMU: - Added the 'vas' structure as the virtual address space - Added MMU specific prot flags - Added mmu_map_single() to map pages - Added mmu_this_vas() to grab the current VAS ... Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/vm')
-rw-r--r--src/sys/vm/vm_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sys/vm/vm_init.c b/src/sys/vm/vm_init.c
index c8137a9..77b0a21 100644
--- a/src/sys/vm/vm_init.c
+++ b/src/sys/vm/vm_init.c
@@ -28,15 +28,19 @@
*/
#include <sys/panic.h>
+#include <sys/cpuvar.h>
#include <vm/vm.h>
#include <vm/physseg.h>
#include <machine/mmu.h> /* standard */
static struct physmem_stat stat;
+struct vm_vas g_kvas;
void
vm_init(void)
{
+ struct pcore *pcore = this_core();
+
if (vm_seg_init(&stat) < 0) {
panic("vm_init: vm_seg_init() failed\n");
}