X86: Don't panic on faults on prefetches in SE mode.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 9 Nov 2009 06:49:58 +0000 (22:49 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 9 Nov 2009 06:49:58 +0000 (22:49 -0800)
src/arch/x86/tlb.cc

index 0d69d05c94dfe0ac068e235ad05313b89aaee7b2..d7959da2c0326067dbbda6a0049db9bc464acea2 100644 (file)
@@ -637,17 +637,21 @@ TLB::translate(RequestPtr req, ThreadContext *tc, Translation *translation,
                     success = p->pTable->lookup(vaddr, newEntry);
                 }
                 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);
+                    if (req->isPrefetch()) {
+                        return new PageFault(vaddr, true, mode, true, false);
+                    } else {
+                        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,