diff options
Diffstat (limited to 'src/cpu/simple/atomic.cc')
-rw-r--r-- | src/cpu/simple/atomic.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index d6dbb9292..e98da3ea7 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -272,6 +272,12 @@ AtomicSimpleCPU::AtomicCPUDPort::recvAtomicSnoop(PacketPtr pkt) DPRINTF(SimpleCPU, "received snoop pkt for addr:%#x %s\n", pkt->getAddr(), pkt->cmdString()); + // X86 ISA: Snooping an invalidation for monitor/mwait + AtomicSimpleCPU *cpu = (AtomicSimpleCPU *)(&owner); + if(cpu->getAddrMonitor()->doMonitor(pkt)) { + cpu->wakeup(); + } + // if snoop invalidates, release any associated locks if (pkt->isInvalidate()) { DPRINTF(SimpleCPU, "received invalidation for addr:%#x\n", @@ -288,6 +294,12 @@ AtomicSimpleCPU::AtomicCPUDPort::recvFunctionalSnoop(PacketPtr pkt) DPRINTF(SimpleCPU, "received snoop pkt for addr:%#x %s\n", pkt->getAddr(), pkt->cmdString()); + // X86 ISA: Snooping an invalidation for monitor/mwait + AtomicSimpleCPU *cpu = (AtomicSimpleCPU *)(&owner); + if(cpu->getAddrMonitor()->doMonitor(pkt)) { + cpu->wakeup(); + } + // if snoop invalidates, release any associated locks if (pkt->isInvalidate()) { DPRINTF(SimpleCPU, "received invalidation for addr:%#x\n", |