O3: Fixes the way prefetches are handled inside the iew unit.
This patch prevents the prefetch being added to the instCommit queue twice.
This commit is contained in:
parent
ee9a331fe5
commit
5ebf3b2808
3 changed files with 13 additions and 4 deletions
|
@ -92,7 +92,8 @@ class ArmFault : public FaultBase
|
||||||
// to allow the translation function to inform
|
// to allow the translation function to inform
|
||||||
// the memory access function not to proceed
|
// the memory access function not to proceed
|
||||||
// for a Prefetch that misses in the TLB.
|
// for a Prefetch that misses in the TLB.
|
||||||
PrefetchTLBMiss
|
PrefetchTLBMiss = 0x1f,
|
||||||
|
PrefetchUncacheable = 0x20
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FaultVals
|
struct FaultVals
|
||||||
|
|
|
@ -556,9 +556,15 @@ TLB::translateFs(RequestPtr req, ThreadContext *tc, Mode mode,
|
||||||
outerAttrs: %d\n",
|
outerAttrs: %d\n",
|
||||||
te->shareable, te->innerAttrs, te->outerAttrs);
|
te->shareable, te->innerAttrs, te->outerAttrs);
|
||||||
setAttr(te->attributes);
|
setAttr(te->attributes);
|
||||||
if (te->nonCacheable)
|
if (te->nonCacheable) {
|
||||||
req->setFlags(Request::UNCACHEABLE);
|
req->setFlags(Request::UNCACHEABLE);
|
||||||
|
|
||||||
|
// Prevent prefetching from I/O devices.
|
||||||
|
if (req->isPrefetch()) {
|
||||||
|
return new PrefetchAbort(vaddr, ArmFault::PrefetchUncacheable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch ( (dacr >> (te->domain * 2)) & 0x3) {
|
switch ( (dacr >> (te->domain * 2)) & 0x3) {
|
||||||
case 0:
|
case 0:
|
||||||
domainFaults++;
|
domainFaults++;
|
||||||
|
|
|
@ -1222,8 +1222,7 @@ DefaultIEW<Impl>::executeInsts()
|
||||||
// Execute instruction.
|
// Execute instruction.
|
||||||
// Note that if the instruction faults, it will be handled
|
// Note that if the instruction faults, it will be handled
|
||||||
// at the commit stage.
|
// at the commit stage.
|
||||||
if (inst->isMemRef() &&
|
if (inst->isMemRef()) {
|
||||||
(!inst->isDataPrefetch() && !inst->isInstPrefetch())) {
|
|
||||||
DPRINTF(IEW, "Execute: Calculating address for memory "
|
DPRINTF(IEW, "Execute: Calculating address for memory "
|
||||||
"reference.\n");
|
"reference.\n");
|
||||||
|
|
||||||
|
@ -1232,6 +1231,9 @@ DefaultIEW<Impl>::executeInsts()
|
||||||
// Loads will mark themselves as executed, and their writeback
|
// Loads will mark themselves as executed, and their writeback
|
||||||
// event adds the instruction to the queue to commit
|
// event adds the instruction to the queue to commit
|
||||||
fault = ldstQueue.executeLoad(inst);
|
fault = ldstQueue.executeLoad(inst);
|
||||||
|
if (inst->isDataPrefetch() || inst->isInstPrefetch()) {
|
||||||
|
fault = NoFault;
|
||||||
|
}
|
||||||
} else if (inst->isStore()) {
|
} else if (inst->isStore()) {
|
||||||
fault = ldstQueue.executeStore(inst);
|
fault = ldstQueue.executeStore(inst);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue