mips-tlb-fix: check for alignment faults.\nMIPS was never updated to use TLBS correcty in SE mode. The error was forwarding translations directly to pageTable. The TLB should check for alignment faults at bare minimum here but in the long run we should be using TLBs in SE mode for MIPS.

This commit is contained in:
Korey Sewell 2009-04-18 10:42:29 -04:00
parent e501e1af54
commit d8a34a9745

View file

@ -427,6 +427,18 @@ Fault
TLB::translateData(RequestPtr req, ThreadContext *tc, bool write)
{
#if !FULL_SYSTEM
//@TODO: This should actually use TLB instead of going directly
// to the page table in syscall mode.
/**
* Check for alignment faults
*/
if (req->getVaddr() & (req->getSize() - 1)) {
DPRINTF(TLB, "Alignment Fault on %#x, size = %d", req->getVaddr(),
req->getSize());
return new AlignmentFault();
}
Process * p = tc->getProcessPtr();
Fault fault = p->pTable->translate(req);