Binary compatibility with Harmonica.

This commit is contained in:
cdkersey
2015-09-15 13:02:02 -06:00
parent ae11d80d36
commit 1eb574650f
4 changed files with 40 additions and 16 deletions

View File

@@ -106,10 +106,11 @@ namespace Harp {
class MemoryUnit {
public:
MemoryUnit(Size pageSize, Size addrBytes) :
pageSize(pageSize), addrBytes(addrBytes), ad()
MemoryUnit(Size pageSize, Size addrBytes, bool disableVm = false) :
pageSize(pageSize), addrBytes(addrBytes), ad(), disableVm(disableVm)
{
tlb[0] = TLBEntry(0, 077);
if (!disableVm)
tlb[0] = TLBEntry(0, 077);
}
void attach(MemDevice &m, Addr base);
@@ -162,6 +163,8 @@ namespace Harp {
TLBEntry tlbLookup(Addr vAddr, Word flagMask);
Size pageSize, addrBytes;
bool disableVm;
};
};