# HG changeset patch
# User Gabe Black <[email protected]>
# Date 1257749397 28800
# Node ID b3ab661715ac41e528c48843ebfe5885aa33b7a7
# Parent  530e457c88c7850e84c8df2cb478d566094ad39e
X86: Explain what really didn't work with unmapped addresses in SE mode.

diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc
--- a/src/arch/x86/tlb.cc
+++ b/src/arch/x86/tlb.cc
@@ -632,12 +632,22 @@
                 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,
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to