From c4f8ef91f18d854a4ede7a94e95b2eab898d6963 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sun, 10 Aug 2025 15:40:19 -0400 Subject: working usermode objdir iteration --- include/arch/x86_64/page.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/arch/x86_64/page.h') 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 #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); -- cgit v1.2.3