summaryrefslogtreecommitdiffstats
path: root/lib/libjove/arch/x86_64/invoke-pagemap.c
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-19 15:04:04 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-19 15:04:04 -0400
commit858a52c06a4615bd58a6a906333f2ad707d41c0a (patch)
tree16870cd4d67da283567a72a74d28c04464da292a /lib/libjove/arch/x86_64/invoke-pagemap.c
parent65ba015d6c1f248d36ad01a653bc49637804b15b (diff)
downloadjove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.tar.gz
jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.tar.bz2
jove-os-858a52c06a4615bd58a6a906333f2ad707d41c0a.zip
usermode pager
Diffstat (limited to 'lib/libjove/arch/x86_64/invoke-pagemap.c')
-rw-r--r--lib/libjove/arch/x86_64/invoke-pagemap.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/lib/libjove/arch/x86_64/invoke-pagemap.c b/lib/libjove/arch/x86_64/invoke-pagemap.c
index 8357904..e3f3dff 100644
--- a/lib/libjove/arch/x86_64/invoke-pagemap.c
+++ b/lib/libjove/arch/x86_64/invoke-pagemap.c
@@ -1,3 +1,4 @@
+#include "arch/x86_64/syscall.h"
#include <arch/x86_64/object-pagemap.h>
#include <kernel/syscall.h>
#include <kernel/arch/x86_64/syscall.h>
@@ -7,14 +8,41 @@
#include <jove/jove.h>
int
-_syscall_invoke_mapping_get(KernelObjectPageMapping *mapping, uint16_t pmli, KernelObjectPageMapping *dest)
+_syscall_invoke_mapping_exists(KernelObjectPageMap *map, uint8_t depth, uint16_t *path)
{
uint8_t *syscallData = _syscall_message_ptr;
int syscall_at = 0;
- SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, mapping);
- SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_MAPPING_GET, uint8_t);
- SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, pmli, uint16_t);
+ SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, map);
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_MAPPING_EXISTS, uint8_t);
+ SYSCALL_PAYLOAD_PUTPML(syscallData, syscall_at, depth, path);
+
+ return _syscall_invoke();
+}
+
+int
+_syscall_invoke_mapping_map(KernelObjectPageMap *map, uint8_t depth, uint16_t *path, KernelObjectUntyped *untyped)
+{
+ uint8_t *syscallData = _syscall_message_ptr;
+ int syscall_at = 0;
+
+ SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, map);
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_MAPPING_MAP, uint8_t);
+ SYSCALL_PAYLOAD_PUTPML(syscallData, syscall_at, depth, path);
+ SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, untyped);
+
+ return _syscall_invoke();
+}
+
+int
+_syscall_invoke_mapping_unmap(KernelObjectPageMap *map, uint8_t depth, uint16_t *path, KernelObjectUntyped *dest)
+{
+ uint8_t *syscallData = _syscall_message_ptr;
+ int syscall_at = 0;
+
+ SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, map);
+ SYSCALL_PAYLOAD_PUTL(syscallData, syscall_at, INVOKE_MAPPING_UNMAP, uint8_t);
+ SYSCALL_PAYLOAD_PUTPML(syscallData, syscall_at, depth, path);
SYSCALL_PAYLOAD_PUTOBJ(syscallData, syscall_at, dest);
return _syscall_invoke();