X86: Explain what really didn't work with unmapped addresses in SE mode.

This commit is contained in:
Gabe Black 2009-11-08 22:49:57 -08:00
parent 53086dfefe
commit 44e912c6bd

View file

@ -632,12 +632,22 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
Process *p = tc->getProcessPtr(); Process *p = tc->getProcessPtr();
TlbEntry newEntry; TlbEntry newEntry;
bool success = p->pTable->lookup(vaddr, newEntry); bool success = p->pTable->lookup(vaddr, newEntry);
if(!success && mode != Execute) { if (!success && mode != Execute) {
p->checkAndAllocNextPage(vaddr); p->checkAndAllocNextPage(vaddr);
success = p->pTable->lookup(vaddr, newEntry); success = p->pTable->lookup(vaddr, newEntry);
} }
if(!success) { if (!success) {
panic("Tried to execute unmapped address %#x.\n", vaddr); const char *modeStr = "";
if (mode == Execute)
modeStr = "execute";
else if (mode == Read)
modeStr = "read";
else if (mode == Write)
modeStr = "write";
else
modeStr = "?";
panic("Tried to %s unmapped address %#x.\n",
modeStr, vaddr);
} else { } else {
Addr alignedVaddr = p->pTable->pageAlign(vaddr); Addr alignedVaddr = p->pTable->pageAlign(vaddr);
DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr, DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,