summaryrefslogtreecommitdiffstats
path: root/include/arch/x86_64/page.h
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2025-08-10 15:40:19 -0400
committerJon Santmyer <jon@jonsantmyer.com>2025-08-10 15:40:19 -0400
commitc4f8ef91f18d854a4ede7a94e95b2eab898d6963 (patch)
treec2772c4f380a684b6fa347f03b13f9476bf9500c /include/arch/x86_64/page.h
parentb905869a35f062a4e5072f10bec3a2ba3db0e365 (diff)
downloadjove-kernel-c4f8ef91f18d854a4ede7a94e95b2eab898d6963.tar.gz
jove-kernel-c4f8ef91f18d854a4ede7a94e95b2eab898d6963.tar.bz2
jove-kernel-c4f8ef91f18d854a4ede7a94e95b2eab898d6963.zip
working usermode objdir iteration
Diffstat (limited to 'include/arch/x86_64/page.h')
-rw-r--r--include/arch/x86_64/page.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/arch/x86_64/page.h b/include/arch/x86_64/page.h
index 99bc691..4460720 100644
--- a/include/arch/x86_64/page.h
+++ b/include/arch/x86_64/page.h
@@ -4,6 +4,11 @@
#include <stdint.h>
#include "include/object.h"
+#define PAGE_PRESENT (1ULL << 0)
+#define PAGE_RW (1ULL << 1)
+#define PAGE_US (1ULL << 2)
+#define PAGE_XD (1ULL << 63)
+
typedef union jove_PageMapLevelEntry
{
struct {
@@ -16,7 +21,7 @@ typedef union jove_PageMapLevelEntry
uint8_t d : 1; /* Dirty */
uint8_t ps_pat : 1;
uint8_t g : 1; /* Global */
- uint8_t _r0 : 2;
+ uint8_t osflg : 2;
uint8_t r : 1;
uint64_t paddr : 35;
uint8_t _r1;
@@ -35,6 +40,7 @@ uintptr_t vmem_ident_tophys(void *vptr);
void *vmem_phys_tovirt(uintptr_t pptr);
void *pmle_get_page(pmle_t entry);
+uint8_t pmle_level(pmle_t entry);
int untyped_retype_page(objdir_entry_t *untyped_entry, void **dest_ptr);