summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-12-28 11:14:18 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2015-12-28 11:14:18 -0500
commitf5c4a458892079fa374a8af075ea4749456b3385 (patch)
treeb3c30cae6d899b147411e9738b51fc9f7d75d516 /src/mem
parentf6525ff2213311afb83efef95ce02d023010d7b7 (diff)
downloadgem5-f5c4a458892079fa374a8af075ea4749456b3385.tar.xz
mem: Explicitly check MSHR snoops for cases not dealt with
Add a sanity check to make it explicit that we currently do not allow an I/O coherent agent to directly issue writes into the coherent part of the memory system (it has to go via a cache, and get transformed into a read ex, upgrade or invalidation).
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/cache/mshr.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 7f7b627da..e6a62949a 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -323,6 +323,15 @@ MSHR::handleSnoop(PacketPtr pkt, Counter _order)
{
DPRINTF(Cache, "%s for %s addr %#llx size %d\n", __func__,
pkt->cmdString(), pkt->getAddr(), pkt->getSize());
+
+ // when we snoop packets the needsExclusive and isInvalidate flags
+ // should always be the same, however, this assumes that we never
+ // snoop writes as they are currently not marked as invalidations
+ panic_if(pkt->needsExclusive() != pkt->isInvalidate(),
+ "%s got snoop %s to addr %#llx where needsExclusive, "
+ "does not match isInvalidate", name(), pkt->cmdString(),
+ pkt->getAddr());
+
if (!inService || (pkt->isExpressSnoop() && downstreamPending)) {
// Request has not been issued yet, or it's been issued
// locally but is buffered unissued at some downstream cache