summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorStephan Diestelhorst <stephan.diestelhorst@arm.com>2015-08-10 11:25:52 +0100
committerStephan Diestelhorst <stephan.diestelhorst@arm.com>2015-08-10 11:25:52 +0100
commitf703160e5a49bf22b831d3a7f3355d7b4b3008fa (patch)
tree8132b091e55a29cbb9e76f9844b794fc8898be43 /src/arch/arm
parentcabd4768c7186911fda91b9ea458df775b79486a (diff)
downloadgem5-f703160e5a49bf22b831d3a7f3355d7b4b3008fa.tar.xz
mem, cpu: Add assertions to snoop invalidation logic
This patch adds assertions that enforce that only invalidating snoops will ever reach into the logic that tracks in-order load completion and also invalidation of LL/SC (and MONITOR / MWAIT) monitors. Also adds some comments to MSHR::replaceUpgrades().
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/locked_mem.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/arch/arm/locked_mem.hh b/src/arch/arm/locked_mem.hh
index f324f773b..8aa181245 100644
--- a/src/arch/arm/locked_mem.hh
+++ b/src/arch/arm/locked_mem.hh
@@ -64,7 +64,10 @@ template <class XC>
inline void
handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
{
- DPRINTF(LLSC,"%s: handleing snoop for address: %#x locked: %d\n",
+ // Should only every see invalidations / direct writes
+ assert(pkt->isInvalidate() || pkt->isWrite());
+
+ DPRINTF(LLSC,"%s: handling snoop for address: %#x locked: %d\n",
xc->getCpuPtr()->name(),pkt->getAddr(),
xc->readMiscReg(MISCREG_LOCKFLAG));
if (!xc->readMiscReg(MISCREG_LOCKFLAG))
@@ -74,7 +77,7 @@ handleLockedSnoop(XC *xc, PacketPtr pkt, Addr cacheBlockMask)
// If no caches are attached, the snoop address always needs to be masked
Addr snoop_addr = pkt->getAddr() & cacheBlockMask;
- DPRINTF(LLSC,"%s: handleing snoop for address: %#x locked addr: %#x\n",
+ DPRINTF(LLSC,"%s: handling snoop for address: %#x locked addr: %#x\n",
xc->getCpuPtr()->name(),snoop_addr, locked_addr);
if (locked_addr == snoop_addr) {
DPRINTF(LLSC,"%s: address match, clearing lock and signaling sev\n",