diff options
author | Ian Moffett <ian@osmora.org> | 2024-06-23 19:00:54 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-06-23 19:00:54 -0400 |
commit | 2e2dc610d2abd6c12cf6dcda290b23fb77ecd704 (patch) | |
tree | dea9aa721cae9f5ed607db3bb1a8dc84d6ebcee2 /sys/vm | |
parent | c43e62b89d8bcb5ccd4f3265375e09a22dab3831 (diff) |
kernel: vm: Add g_kvas for kernel VAS
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index 703942b..b6bb8a1 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -31,11 +31,13 @@ #include <sys/panic.h> #include <vm/vm.h> #include <vm/physmem.h> +#include <vm/pmap.h> #include <assert.h> #define DYNALLOC_POOL_SZ 0x400000 /* 4 MiB */ #define DYNALLOC_POOL_PAGES (DYNALLOC_POOL_SZ / DEFAULT_PAGESIZE) +struct vas g_kvas; static struct vm_ctx vm_ctx; volatile struct limine_hhdm_request g_hhdm_request = { .id = LIMINE_HHDM_REQUEST, @@ -55,6 +57,7 @@ vm_init(void) vm_physmem_init(); + g_kvas = pmap_read_vas(); vm_ctx.dynalloc_pool_sz = DYNALLOC_POOL_SZ; vm_ctx.dynalloc_pool_pa = vm_alloc_frame(DYNALLOC_POOL_PAGES); if (vm_ctx.dynalloc_pool_pa == 0) { |