LSQ Unit: After deleting part of a split request, set it to NULL so that it
[gem5.git] / src / sim / faults.cc
index 7aa3ec4a12a64072388307acc390f9a4f3e42973..10f0b9a66456db148d3e15ecfc7030a21e698d41 100644 (file)
 #if !FULL_SYSTEM
 void FaultBase::invoke(ThreadContext * tc)
 {
-    fatal("fault (%s) detected @ PC %p", name(), tc->readPC());
+    panic("fault (%s) detected @ PC %p", name(), tc->readPC());
 }
 #else
 void FaultBase::invoke(ThreadContext * tc)
 {
     DPRINTF(Fault, "Fault %s at PC: %#x\n", name(), tc->readPC());
-    tc->getCpuPtr()->recordEvent(csprintf("Fault %s", name()));
 
     assert(!tc->misspeculating());
 }
@@ -57,24 +56,18 @@ void UnimpFault::invoke(ThreadContext * tc)
     panic("Unimpfault: %s\n", panicStr.c_str());
 }
 
-void PageTableFault::invoke(ThreadContext *tc)
+#if !FULL_SYSTEM
+void GenericPageTableFault::invoke(ThreadContext *tc)
 {
     Process *p = tc->getProcessPtr();
 
-    // We've accessed the next page of the stack, so extend the stack
-    // to cover it.
-    if(vaddr < p->stack_min && vaddr >= p->stack_min - TheISA::PageBytes)
-    {
-        p->stack_min -= TheISA::PageBytes;
-        if(p->stack_base - p->stack_min > 8*1024*1024)
-            fatal("Over max stack size for one thread\n");
-        p->pTable->allocate(p->stack_min, TheISA::PageBytes);
-        warn("Increasing stack size by one page.");
-    }
-    // Otherwise, we have an unexpected page fault. Report that fact,
-    // and what address was accessed to cause the fault.
-    else
-    {
+    if (!p->checkAndAllocNextPage(vaddr))
         panic("Page table fault when accessing virtual address %#x\n", vaddr);
-    }
+
+}
+
+void GenericAlignmentFault::invoke(ThreadContext *tc)
+{
+    panic("Alignment fault when accessing virtual address %#x\n", vaddr);
 }
+#endif