summaryrefslogtreecommitdiffstats
path: root/lib/libjove/include/arch/x86_64/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libjove/include/arch/x86_64/syscall.h')
-rw-r--r--lib/libjove/include/arch/x86_64/syscall.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libjove/include/arch/x86_64/syscall.h b/lib/libjove/include/arch/x86_64/syscall.h
index 1d7df53..74fb389 100644
--- a/lib/libjove/include/arch/x86_64/syscall.h
+++ b/lib/libjove/include/arch/x86_64/syscall.h
@@ -4,9 +4,17 @@
#include <stdint.h>
#include <kernel/object.h>
-#include <jove/object-path.h>
+#include <jove/arch/x86_64/object-pagemap.h>
+#include <jove/syscall.h>
-int _syscall_invoke_mapping_get(KernelObjectPath path, uint16_t pmli, KernelObjectPath destPath);
+#define SYSCALL_PAYLOAD_PUTPML(payload, payload_at, depth, path) \
+ if(payload_at + 1 + ((depth + 1) * sizeof(uint16_t)) > KO_MESSAGE_BYTES) return -1; \
+ *((uint8_t*)&payload[payload_at++]) = depth; \
+ for(uint8_t i = 0; i < depth + 1; i++) *((uint16_t*)&payload[payload_at + (i * 2)]) = path[i]; \
+ payload_at += (depth + 1) * 2
+int _syscall_invoke_mapping_exists(KernelObjectPageMap *map, uint8_t depth, uint16_t *path);
+int _syscall_invoke_mapping_map(KernelObjectPageMap *map, uint8_t depth, uint16_t *path, KernelObjectUntyped *untyped);
+int _syscall_invoke_mapping_unmap(KernelObjectPageMap *map, uint8_t depth, uint16_t *path, KernelObjectUntyped *dest);
#endif