summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorian <ian>2023-07-17 02:58:59 +0000
committerian <ian>2023-07-17 02:58:59 +0000
commitb1cf714c50c4201bb67d9db0e4aa32e91ac453bc (patch)
treeb2b65c7a0e0d3b9a9e4b4fce32b8d72e47434aba /sys/include
parent27b4fbd7cc099ed3c08c9de30263dfbf9a2848e0 (diff)
kernel/vm: Cast to uintptr_t before adding offset
git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@21 a8a8aea2-181d-ee11-89e8-15fd0e089fc4
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/vm/vm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/include/vm/vm.h b/sys/include/vm/vm.h
index 35775cc..e118beb 100644
--- a/sys/include/vm/vm.h
+++ b/sys/include/vm/vm.h
@@ -39,7 +39,7 @@ extern volatile struct limine_hhdm_request g_hhdm_request;
#define VM_HIGHER_HALF (g_hhdm_request.response->offset)
-#define PHYS_TO_VIRT(phys) (void *)(phys + VM_HIGHER_HALF)
+#define PHYS_TO_VIRT(phys) (void *)((uintptr_t)phys + VM_HIGHER_HALF)
#define VIRT_TO_PHYS(virt) ((uintptr_t)virt - VM_HIGHER_HALF)
#endif /* !_SYS_VM_VM_H_ */