diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-14 20:51:39 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-14 20:51:39 -0400 |
commit | 5a8915f5b36cf3b21c843ef7959c24ac39318aca (patch) | |
tree | aa249d95e5e863db2a761403a818d383c2644c51 | |
parent | 78b9e698a1dc8760a37815d0ee0d6e1280f024c1 (diff) |
kernel: vm: Add routine to get kernel vas
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/include/vm/vm.h | 1 | ||||
-rw-r--r-- | sys/vm/vm_init.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/include/vm/vm.h b/sys/include/vm/vm.h index 2a24d76..48e1b8f 100644 --- a/sys/include/vm/vm.h +++ b/sys/include/vm/vm.h @@ -61,5 +61,6 @@ vm_get_page_size(void) void vm_init(void); struct vm_ctx *vm_get_ctx(void); +struct vas vm_get_kvas(void); #endif /* !_VM_H_ */ diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index f15cb0b..6096059 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -59,6 +59,15 @@ vm_get_ctx(void) return &bsp_vm_ctx; } +/* + * Return the kernel VAS. + */ +struct vas +vm_get_kvas(void) +{ + return kernel_vas; +} + void vm_init(void) { |