summaryrefslogtreecommitdiffstats
path: root/api/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/memory.h')
-rw-r--r--api/memory.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/api/memory.h b/api/memory.h
new file mode 100644
index 0000000..d4096e2
--- /dev/null
+++ b/api/memory.h
@@ -0,0 +1,28 @@
+#ifndef _JOVE_API_MEMORY_H
+#define _JOVE_API_MEMORY_H 1
+
+#include <stdbool.h>
+#include <stdint.h>
+
+#define JOVE_USERMEMORY_LIMIT 0x00007FFFFFFFFFFFULL
+
+typedef uintptr_t virtaddr_t;
+typedef uintptr_t physaddr_t;
+
+typedef virtaddr_t virt_frame_t;
+typedef physaddr_t phys_frame_t;
+
+struct pagedir_mapping_flags
+{
+ bool present;
+ bool writeable;
+ bool executable;
+};
+
+struct pagedir_mapping
+{
+ phys_frame_t pfn;
+ struct pagedir_mapping_flags flags;
+};
+
+#endif