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 --- arch/x86_64/memory.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/x86_64/memory.c (limited to 'arch/x86_64/memory.c') diff --git a/arch/x86_64/memory.c b/arch/x86_64/memory.c new file mode 100644 index 0000000..b32d4e7 --- /dev/null +++ b/arch/x86_64/memory.c @@ -0,0 +1,16 @@ +#include "memory.h" +#include "arch/x86_64/page.h" +#include + +void* +ko_entry_data(objdir_entry_t *entry) +{ + if((intmax_t)entry->data < 0) return (void*)entry->data; + return vmem_phys_tovirt(entry->data); +} + +uintptr_t +ko_data_toentry(uintptr_t vptr) +{ + return vmem_ident_tophys((void*)vptr); +} -- cgit v1.2.3