diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 6 | ||||
-rw-r--r-- | src/mem/cache/tags/base_set_assoc.hh | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 00ba0d24f..5ef45ea2f 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -336,7 +336,11 @@ Cache<TagStore>::access(PacketPtr pkt, BlkType *&blk, 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; diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh index 218d9cdd9..ac575d2ff 100644 --- a/src/mem/cache/tags/base_set_assoc.hh +++ b/src/mem/cache/tags/base_set_assoc.hh @@ -247,7 +247,7 @@ public: 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; @@ -275,10 +275,9 @@ public: } 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()); |