fix unaligned memory offset and some small fixes to interrupt binning
authorAli Saidi <saidi@eecs.umich.edu>
Wed, 22 Sep 2004 22:25:06 +0000 (18:25 -0400)
committerAli Saidi <saidi@eecs.umich.edu>
Wed, 22 Sep 2004 22:25:06 +0000 (18:25 -0400)
code

arch/alpha/alpha_memory.cc:
    Fixed unaligned trap faults
arch/alpha/ev5.cc:
    little more verbose faulting information
kern/linux/linux_system.cc:
    more descriptive errors, and the correct offsets from symbols
sim/system.cc:
    load local pal symbols

--HG--
extra : convert_revision : 0c81badf77321d5e1a060dcae2d42204e5a1fc84

SConscript
arch/alpha/alpha_memory.cc
arch/alpha/ev5.cc
kern/linux/linux_system.cc
sim/system.cc

index 310a7dd90ec7a6d69799b6caf23611559adab8f6..75cbc48ee9432f0e219b74a3dbcebb2d8a79fc86 100644 (file)
@@ -382,6 +382,7 @@ extra_libraries = []
 if env['USE_MYSQL']:
     sources += mysql_sources
     env.Append(CPPDEFINES = 'USE_MYSQL')
+    env.Append(CPPDEFINES = 'STATS_BINNING')
     env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
     env.Append(LIBS=['z'])
     if os.path.isdir('/usr/lib64'):
index 9f5ab185e1c4db40e6d8c9665ba14986cac9da58..4a350dbfc60480293b693d5142af16dea3de36e3 100644 (file)
@@ -492,10 +492,11 @@ AlphaDTB::translate(MemReqPtr &req, bool write) const
         (AlphaISA::mode_type)DTB_CM_CM(ipr[AlphaISA::IPR_DTB_CM]);
 
 
-    /* @todo this should actually be in there but for whatever reason
-     * Its not working at present.
+    /**
+     * Check for alignment faults
      */
     if (req->vaddr & (req->size - 1)) {
+        fault(req, write ? MM_STAT_WR_MASK : 0);
         return Alignment_Fault;
     }
 
@@ -510,8 +511,8 @@ AlphaDTB::translate(MemReqPtr &req, bool write) const
     } else {
         // verify that this is a good virtual address
         if (!validVirtualAddress(req->vaddr)) {
-            fault(req, ((write ? MM_STAT_WR_MASK : 0) | MM_STAT_BAD_VA_MASK |
-                        MM_STAT_ACV_MASK));
+            fault(req, (write ? MM_STAT_WR_MASK : 0) | MM_STAT_BAD_VA_MASK |
+                        MM_STAT_ACV_MASK);
 
             if (write) { write_acv++; } else { read_acv++; }
             return DTB_Fault_Fault;
index 70b71735309acd03df1785629552cffd9672efe5..8b95e8b3d825c3b09ca76e5d0842cba46a7b6f1f 100644 (file)
@@ -164,7 +164,7 @@ AlphaISA::zeroRegisters(XC *xc)
 void
 ExecContext::ev5_trap(Fault fault)
 {
-    DPRINTF(Fault, "Fault %s\n", FaultName(fault));
+    DPRINTF(Fault, "Fault %s at PC: %#x\n", FaultName(fault), regs.pc);
     cpu->recordEvent(csprintf("Fault %s", FaultName(fault)));
 
     assert(!misspeculating());
index 539bac6494316e22ea95f1b2e1b4e8abddb75db7..fd5d481953bd9f5120c1e3544f43f269d0b84517 100644 (file)
@@ -148,26 +148,26 @@ LinuxSystem::LinuxSystem(Params *p)
     if (palSymtab->findAddress("sys_int_21", addr))
         intStartEvent->schedule(addr + sizeof(MachInst) * 2);
     else
-        panic("could not find symbol\n");
+        panic("could not find symbol: sys_int_21\n");
 
     intEndEvent = new InterruptEndEvent(&pcEventQueue, "intEndEvent");
     if (palSymtab->findAddress("rti_to_kern", addr))
-        intEndEvent->schedule(addr + sizeof(MachInst));
+        intEndEvent->schedule(addr;
     else
-        panic("could not find symbol\n");
+        panic("could not find symbol: rti_to_kern\n");
 
     intEndEvent2 = new InterruptEndEvent(&pcEventQueue, "intEndEvent2");
     if (palSymtab->findAddress("rti_to_user", addr))
-        intEndEvent2->schedule(addr + sizeof(MachInst));
+        intEndEvent2->schedule(addr);
     else
-        panic("could not find symbol\n");
+        panic("could not find symbol: rti_to_user\n");
 
 
     intEndEvent3 = new InterruptEndEvent(&pcEventQueue, "intEndEvent3");
     if (kernelSymtab->findAddress("do_softirq", addr))
-        intEndEvent3->schedule(addr + sizeof(MachInst));
+        intEndEvent3->schedule(addr + sizeof(MachInst) * 2);
     else
-        panic("could not find symbol\n");
+        panic("could not find symbol: do_softirq\n");
 }
 
 LinuxSystem::~LinuxSystem()
index f59d8b32ba47191d05b1e2dca103254b76083e88..f8312e33bd943040167dfbe455c4ccc7b0cf152e 100644 (file)
@@ -100,6 +100,9 @@ System::System(Params *p)
     if (!pal->loadGlobalSymbols(palSymtab))
         panic("could not load pal symbols\n");
 
+    if (!pal->loadLocalSymbols(palSymtab))
+        panic("could not load pal symbols\n");
+
     if (!kernel->loadGlobalSymbols(debugSymbolTable))
         panic("could not load kernel symbols\n");