diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2011-02-23 15:10:49 -0600 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2011-02-23 15:10:49 -0600 |
commit | ae3d45685512b75f878eb9d7917680fc3971988e (patch) | |
tree | da8a195456de67473cb0a950600b3bcf4fb3d0ee /src/arch | |
parent | f05f35df99e2b9be3353d7585142b91139965e22 (diff) | |
download | gem5-ae3d45685512b75f878eb9d7917680fc3971988e.tar.xz |
ARM: Fix bug that let two table walks occur in parallel.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/table_walker.cc | 8 | ||||
-rw-r--r-- | src/arch/arm/tlb.cc | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/arm/table_walker.cc b/src/arch/arm/table_walker.cc index e6dd728dd..e2207e26b 100644 --- a/src/arch/arm/table_walker.cc +++ b/src/arch/arm/table_walker.cc @@ -141,12 +141,12 @@ TableWalker::walk(RequestPtr _req, ThreadContext *_tc, uint8_t _cid, TLB::Mode _ if (!currState->timing) return processWalk(); - if (pending) { + if (pending || pendingQueue.size()) { pendingQueue.push_back(currState); currState = NULL; } else { pending = true; - processWalk(); + return processWalk(); } return NoFault; @@ -194,10 +194,8 @@ TableWalker::processWalk() f = tlb->walkTrickBoxCheck(l1desc_addr, currState->vaddr, sizeof(uint32_t), currState->isFetch, currState->isWrite, 0, true); if (f) { + DPRINTF(TLB, "Trickbox check caused fault on %#x\n", currState->vaddr); if (currState->timing) { - currState->transState->finish(f, currState->req, - currState->tc, currState->mode); - pending = false; nextWalk(currState->tc); currState = NULL; diff --git a/src/arch/arm/tlb.cc b/src/arch/arm/tlb.cc index 230c56200..f1c8ae41a 100644 --- a/src/arch/arm/tlb.cc +++ b/src/arch/arm/tlb.cc @@ -529,7 +529,7 @@ TLB::translateFs(RequestPtr req, ThreadContext *tc, Mode mode, vaddr, contextId); fault = tableWalker->walk(req, tc, contextId, mode, translation, timing); - if (timing) { + if (timing && fault == NoFault) { delay = true; // for timing mode, return and wait for table walk return fault; @@ -694,6 +694,8 @@ TLB::translateTiming(RequestPtr req, ThreadContext *tc, #else fault = translateSe(req, tc, mode, translation, delay, true); #endif + DPRINTF(TLB, "Translation returning delay=%d fault=%d\n", delay, fault != + NoFault); if (!delay) translation->finish(fault, req, tc, mode); else |