This patch prevents the prefetch being added to the instCommit queue twice.
// to allow the translation function to inform
// the memory access function not to proceed
// for a Prefetch that misses in the TLB.
- PrefetchTLBMiss
+ PrefetchTLBMiss = 0x1f,
+ PrefetchUncacheable = 0x20
};
struct FaultVals
outerAttrs: %d\n",
te->shareable, te->innerAttrs, te->outerAttrs);
setAttr(te->attributes);
- if (te->nonCacheable)
+ if (te->nonCacheable) {
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) {
case 0:
domainFaults++;
// Execute instruction.
// Note that if the instruction faults, it will be handled
// at the commit stage.
- if (inst->isMemRef() &&
- (!inst->isDataPrefetch() && !inst->isInstPrefetch())) {
+ if (inst->isMemRef()) {
DPRINTF(IEW, "Execute: Calculating address for memory "
"reference.\n");
// Loads will mark themselves as executed, and their writeback
// event adds the instruction to the queue to commit
fault = ldstQueue.executeLoad(inst);
+ if (inst->isDataPrefetch() || inst->isInstPrefetch()) {
+ fault = NoFault;
+ }
} else if (inst->isStore()) {
fault = ldstQueue.executeStore(inst);