PageTable::translate(Addr vaddr, Addr &paddr)
{
TheISA::TlbEntry entry;
- if (!lookup(vaddr, entry))
+ if (!lookup(vaddr, entry)) {
+ DPRINTF(MMU, "Couldn't Translate: %#x\n", vaddr);
return false;
+ }
paddr = pageOffset(vaddr) + entry.pageStart;
+ DPRINTF(MMU, "Translating: %#x->%#x\n", vaddr, paddr);
return true;
}
PTableItr iter = pTable.begin();
PTableItr end = pTable.end();
while (iter != end) {
- paramOut(os, csprintf("ptable.entry%dvaddr", count), iter->first);
+ os << "\n[" << csprintf("%s.Entry%d", name(), count) << "]\n";
+
+ paramOut(os, "vaddr", iter->first);
iter->second.serialize(os);
++iter;
int i = 0, count;
paramIn(cp, section, "ptable.size", count);
Addr vaddr;
- TheISA::TlbEntry entry;
+ TheISA::TlbEntry *entry;
pTable.clear();
while(i < count) {
- paramIn(cp, section, csprintf("ptable.entry%dvaddr", i), vaddr);
- entry.unserialize(cp, section);
- pTable[vaddr] = entry;
+ paramIn(cp, csprintf("%s.Entry%d", name(), i), "vaddr", vaddr);
+ entry = new TheISA::TlbEntry();
+ entry->unserialize(cp, csprintf("%s.Entry%d", name(), i));
+ pTable[vaddr] = *entry;
++i;
}
}
int num_processes = 0;
Process::Process(ProcessParams * params)
- : SimObject(params), system(params->system),
+ : SimObject(params), system(params->system), checkpointRestored(false),
max_stack_size(params->max_stack_size)
{
string in = params->input;
UNSERIALIZE_ARRAY(fd_map, MAX_FD);
pTable->unserialize(cp, section);
+
+
+ checkpointRestored = true;
+
}