aboutsummaryrefslogtreecommitdiff
path: root/include/apos/mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/apos/mem.h')
-rw-r--r--include/apos/mem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/apos/mem.h b/include/apos/mem.h
index 7c0fde1..be44104 100644
--- a/include/apos/mem.h
+++ b/include/apos/mem.h
@@ -30,8 +30,8 @@
#define __o_container(idx) ((idx) / MM_OINFO_WIDTH)
#define __o_bit(idx) ((idx) & (MM_OINFO_WIDTH - 1))
-#define __va(x) (((char *)(x)) + VM_DMAP - RAM_BASE)
-#define __pa(x) (((char *)(x)) + RAM_BASE - VM_DMAP)
+#define __va(x) (void *)(((uintptr_t)(x)) + VM_DMAP - RAM_BASE)
+#define __pa(x) (void *)(((uintptr_t)(x)) - VM_DMAP + RAM_BASE)
#define __page(x) ((x) / BASE_PAGE_SIZE)
#define __addr(x) ((x)*BASE_PAGE_SIZE)
#define __pages(x) \