fix unaligned memory offset and some small fixes to interrupt binning

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
This commit is contained in:
Ali Saidi
2004-09-22 18:25:06 -04:00
parent 9adb64ec70
commit eb7d329076
5 changed files with 17 additions and 12 deletions

View 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'):

View 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;

View 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());

View 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()

View 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");