mem: Populate the secure flag in the writeback visitor
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Tue, 21 Feb 2017 14:14:44 +0000 (14:14 +0000)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Tue, 21 Feb 2017 14:14:44 +0000 (14:14 +0000)
Previously the writeback visitor would not consider and set the secure
flag for the blocks that are written back to memory. This patch fixes
this.

Change-Id: Ie1a425fa9211407a70a4343f2c6b3d073371378f
Reviewed-by: Andreas Hansson <andreas.hansson@arm.com>
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
src/mem/cache/cache.cc

index b4d583eb878437cbaf4b9c8ef2a19b528cb81524..95fa57a6e11bb5be80d6412120c3292ece49d890 100644 (file)
@@ -1636,6 +1636,9 @@ Cache::writebackVisitor(CacheBlk &blk)
         Request request(tags->regenerateBlkAddr(blk.tag, blk.set),
                         blkSize, 0, Request::funcMasterId);
         request.taskId(blk.task_id);
+        if (blk.isSecure()) {
+            request.setFlags(Request::SECURE);
+        }
 
         Packet packet(&request, MemCmd::WriteReq);
         packet.dataStatic(blk.data);