From 819e76156b9b955074a58bc177965a3d65d837ae Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 14 Sep 2025 20:45:19 -0400 Subject: 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 --- src/sys/vm/vm_init.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sys/vm/vm_init.c') 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 +#include #include #include #include /* 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"); } -- cgit v1.2.3