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:
parent
e501e1af54
commit
d8a34a9745
1 changed files with 12 additions and 0 deletions
|
@ -427,6 +427,18 @@ Fault
|
||||||
TLB::translateData(RequestPtr req, ThreadContext *tc, bool write)
|
TLB::translateData(RequestPtr req, ThreadContext *tc, bool write)
|
||||||
{
|
{
|
||||||
#if !FULL_SYSTEM
|
#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();
|
Process * p = tc->getProcessPtr();
|
||||||
|
|
||||||
Fault fault = p->pTable->translate(req);
|
Fault fault = p->pTable->translate(req);
|
||||||
|
|
Loading…
Reference in a new issue