summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/hal/paging.h
diff options
context:
space:
mode:
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);