X86: Explain what really didn't work with unmapped addresses in SE mode.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 9 Nov 2009 06:49:57 +0000 (22:49 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 9 Nov 2009 06:49:57 +0000 (22:49 -0800)
src/arch/x86/tlb.cc

index 5280b9ba860a70da35fb99a06fddaa18eada4f01..0d69d05c94dfe0ac068e235ad05313b89aaee7b2 100644 (file)
@@ -632,12 +632,22 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
                 Process *p = tc->getProcessPtr();
                 TlbEntry newEntry;
                 bool success = p->pTable->lookup(vaddr, newEntry);
-                if(!success && mode != Execute) {
+                if (!success && mode != Execute) {
                     p->checkAndAllocNextPage(vaddr);
                     success = p->pTable->lookup(vaddr, newEntry);
                 }
-                if(!success) {
-                    panic("Tried to execute unmapped address %#x.\n", vaddr);
+                if (!success) {
+                    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 {
                     Addr alignedVaddr = p->pTable->pageAlign(vaddr);
                     DPRINTF(TLB, "Mapping %#x to %#x\n", alignedVaddr,