From: Gabe Black Date: Mon, 9 Nov 2009 06:49:58 +0000 (-0800) Subject: X86: Don't panic on faults on prefetches in SE mode. X-Git-Tag: stable_2012_02_02~1575^2~81 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbbfdee2ed4feb5e8e448920e5d51701a2192ee1;p=gem5.git X86: Don't panic on faults on prefetches in SE mode. --- diff --git a/src/arch/x86/tlb.cc b/src/arch/x86/tlb.cc index 0d69d05c9..d7959da2c 100644 --- a/src/arch/x86/tlb.cc +++ b/src/arch/x86/tlb.cc @@ -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,