summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/hal/paging.h
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2026-09-04 21:38:16 -0400
committerJon Santmyer <jon@jonsantmyer.com>2026-09-04 21:38:16 -0400
commit69a27cf95a8a8e3bbbd5e3d81a36893bf312cf3e (patch)
tree47ff56106345e43fbb5184071c8fe72987fe62bb /arch/x86_64/hal/paging.h
parent1768abb217f974cf96448ee847453b604800c546 (diff)
downloadjove-kernel-69a27cf95a8a8e3bbbd5e3d81a36893bf312cf3e.tar.gz
jove-kernel-69a27cf95a8a8e3bbbd5e3d81a36893bf312cf3e.tar.bz2
jove-kernel-69a27cf95a8a8e3bbbd5e3d81a36893bf312cf3e.zip
add usermode jump into init
Diffstat (limited to 'arch/x86_64/hal/paging.h')
-rw-r--r--arch/x86_64/hal/paging.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/hal/paging.h b/arch/x86_64/hal/paging.h
index eb916a3..5736326 100644
--- a/arch/x86_64/hal/paging.h
+++ b/arch/x86_64/hal/paging.h
@@ -40,11 +40,11 @@ typedef union page_table_entry
extern void *_kernel_physptr;
#define PMLI_SHL(l) (12 + (l * 9))
-#define PMLI_MASK(l) (~0xFFFF << PMLI_SHL(l))
+#define PMLI_MASK(l) (~0xFFFFULL << PMLI_SHL(l))
#define IDENT_VIRT_BASE 0xFFFF800000000000ULL
#define KERNEL_VIRT_BASE 0xFFFFFFFF80000000ULL
-#define KPTR_TOPHYS(v) ((uintptr_t)v - KERNEL_VIRT_BASE + (uintptr_t)_kernel_physptr)
+#define KPTR_TOPHYS(v) (((uintptr_t)v) - KERNEL_VIRT_BASE + (uintptr_t)_kernel_physptr)
uintptr_t paging_get_pml4(void);
void paging_pml4_init(void);