From 858a52c06a4615bd58a6a906333f2ad707d41c0a Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 19 Aug 2025 15:04:04 -0400 Subject: usermode pager --- lib/libjove/include/arch/x86_64/syscall.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/libjove/include/arch/x86_64/syscall.h') 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 #include -#include +#include +#include -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 -- cgit v1.2.1