When a cacheline is written back to a lower-level cache,
tags->insertBlock() sets various status parameters. However these
status bits were cleared immediately after calling. This patch makes
it so that these status fields are not cleared by moving them outside
of the tags->insertBlock() call.
return false;
}
tags->insertBlock(pkt, blk);
- blk->status = BlkValid | BlkReadable;
+
+ blk->status = (BlkValid | BlkReadable);
+ if (pkt->isSecure()) {
+ blk->status |= BlkSecure;
+ }
}
std::memcpy(blk->data, pkt->getPtr<uint8_t>(), blkSize);
blk->status |= BlkDirty;
Addr addr = pkt->getAddr();
MasterID master_id = pkt->req->masterId();
uint32_t task_id = pkt->req->taskId();
- bool is_secure = pkt->isSecure();
+
if (!blk->isTouched) {
tagsInUse++;
blk->isTouched = true;
}
blk->isTouched = true;
+
// Set tag for new block. Caller is responsible for setting status.
blk->tag = extractTag(addr);
- if (is_secure)
- blk->status |= BlkSecure;
// deal with what we are bringing in
assert(master_id < cache->system->maxMasters());