Refresh 2

This commit is contained in:
n64
2019-10-05 15:08:05 -04:00
parent 1ef98ec785
commit 52e605f075
316 changed files with 16346 additions and 16367 deletions

View File

@@ -25,4 +25,13 @@
#define STATIC_ASSERT(cond, msg) typedef char GLUE2(static_assertion_failed, __LINE__)[(cond) ? 1 : -1]
#endif
// convert a virtual address to physical.
#define VIRTUAL_TO_PHYSICAL(addr) ((uintptr_t)(addr) & 0x1FFFFFFF)
// convert a physical address to virtual.
#define PHYSICAL_TO_VIRTUAL(addr) ((uintptr_t)(addr) | 0x80000000)
// another way of converting virtual to physical
#define VIRTUAL_TO_PHYSICAL2(addr) ((u8 *)(addr) - 0x80000000U)
#endif