From: Nikos Nikoleris Date: Tue, 22 Nov 2016 11:38:57 +0000 (+0000) Subject: mem-cache: Populate the secure bit when the temp block is filled X-Git-Tag: v19.0.0.0~2267 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5d98f6e638455c81a4fba63492e4bbaf1cd7db1;p=gem5.git mem-cache: Populate the secure bit when the temp block is filled The secure bit should be set when we fill a block with data from a secure location, as indicated by the packet that triggers the fill. This patch fixes a bug in which the cache wouldn't populate the secure bit when filling the temp block. Change-Id: I95c706146449804ff42b205b25dd79750f3e882a Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/8284 Maintainer: Nikos Nikoleris Reviewed-by: Daniel Carvalho --- diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc index 622f0f787..64438c1c8 100644 --- a/src/mem/cache/cache.cc +++ b/src/mem/cache/cache.cc @@ -1902,7 +1902,9 @@ Cache::handleFill(PacketPtr pkt, CacheBlk *blk, PacketList &writebacks, blk = tempBlock; tempBlock->set = tags->extractSet(addr); tempBlock->tag = tags->extractTag(addr); - // @todo: set security state as well... + if (is_secure) { + tempBlock->status |= BlkSecure; + } DPRINTF(Cache, "using temp block for %#llx (%s)\n", addr, is_secure ? "s" : "ns"); } else {