summaryrefslogtreecommitdiffstats
path: root/lib/libjove/include
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libjove/include')
-rw-r--r--lib/libjove/include/arch/x86_64/pager.h3
-rw-r--r--lib/libjove/include/memory.h15
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/libjove/include/arch/x86_64/pager.h b/lib/libjove/include/arch/x86_64/pager.h
index 7e47ed1..2a53a07 100644
--- a/lib/libjove/include/arch/x86_64/pager.h
+++ b/lib/libjove/include/arch/x86_64/pager.h
@@ -9,4 +9,7 @@ extern KernelObjectPageMap __jove_pagemap;
JoveError jove_pager_ensure_for(KernelObjectPageMap *map, uintptr_t vptr);
#define jove_pager_ensure(vptr) jove_pager_ensure_for(&__jove_pagemap, vptr)
+int jove_pager_exists_for(KernelObjectPageMap *map, uintptr_t vptr);
+#define jove_pager_exists(vptr) jove_pager_exists_for(&__jove_pagemap, vptr);
+
#endif
diff --git a/lib/libjove/include/memory.h b/lib/libjove/include/memory.h
new file mode 100644
index 0000000..9d4ce1d
--- /dev/null
+++ b/lib/libjove/include/memory.h
@@ -0,0 +1,15 @@
+#ifndef _LIBJOVE_MEMORY_H
+#define _LIBJOVE_MEMORY_H 1
+
+#include <jove/error.h>
+
+#ifdef __x86_64__
+#include <jove/arch/x86_64/pager.h>
+#define jove_mem_ensure(vptr) jove_pager_ensure(vptr)
+#define jove_mem_exists(vptr) jove_pager_exists(vptr)
+#endif
+
+JoveError jove_mem_ensure_range(uintptr_t start, uintptr_t end);
+JoveError jove_mem_ensure_w(uintptr_t start, size_t pages);
+
+#endif