VMM -- making sure things will work with virtual memory

This commit is contained in:
Thomas Lovén 2018-01-03 22:18:17 +01:00
parent 8ac8bc7b6c
commit cf1b631461
2 changed files with 5 additions and 1 deletions

View File

@ -19,7 +19,7 @@ union PTE {
};
};
#define PT(ptr) ((union PTE *)MASK_FLAGS(ptr))
#define PT(ptr) ((union PTE *)P2V(MASK_FLAGS(ptr)))
#define P4e(pt, addr) (PT(pt)[P4_OFFSET(addr)])
#define P3e(pt, addr) PT(P4e(pt, addr).value)[P3_OFFSET(addr)]
#define P2e(pt, addr) PT(P3e(pt, addr).value)[P2_OFFSET(addr)]

View File

@ -1,6 +1,10 @@
// vim: ft=c
#include <ttest.h>
#include <memory.h>
#undef P2V
#define P2V(p) (p)
#include "vmm.c"
void *data;