summaryrefslogtreecommitdiff
path: root/src/dev/io_device.cc
diff options
context:
space:
mode:
authorMitchell Hayenga <Mitchell.Hayenga@ARM.com>2011-12-01 00:15:22 -0800
committerMitchell Hayenga <Mitchell.Hayenga@ARM.com>2011-12-01 00:15:22 -0800
commitfa753c14549a768f0b8475e4e183acbdc394c248 (patch)
treeb1a47e7423b7d5c7a085ea64c7ba9fe74038e83b /src/dev/io_device.cc
parent946f7f0f55215d0eefe29fed2e4c123e23b9848f (diff)
downloadgem5-fa753c14549a768f0b8475e4e183acbdc394c248.tar.xz
Device: Make changes necessary to support a coherent page walker cache.
Adds the flag 'recvSnoops' which enables pagewalkers using DmaPorts, to properly configure snoops. --HG-- extra : rebase_source : 64207bef62c3268ddff2236ee4adae873812325f
Diffstat (limited to 'src/dev/io_device.cc')
-rw-r--r--src/dev/io_device.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index 5e2395bf9..5c13b5091 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -115,11 +115,13 @@ BasicPioDevice::addressRanges(AddrRangeList &range_list)
}
-DmaPort::DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff)
+DmaPort::DmaPort(MemObject *dev, System *s, Tick min_backoff, Tick max_backoff,
+ bool recv_snoops)
: Port(dev->name() + "-dmaport", dev), device(dev), sys(s),
pendingCount(0), actionInProgress(0), drainEvent(NULL),
backoffTime(0), minBackoffDelay(min_backoff),
- maxBackoffDelay(max_backoff), inRetry(false), backoffEvent(this)
+ maxBackoffDelay(max_backoff), inRetry(false), recvSnoops(recv_snoops),
+ snoopRangeSent(false), backoffEvent(this)
{ }
bool
@@ -141,6 +143,12 @@ DmaPort::recvTiming(PacketPtr pkt)
pkt->reinitNacked();
queueDma(pkt, true);
} else if (pkt->senderState) {
+ if (recvSnoops) {
+ if (pkt->isRequest()) {
+ return true;
+ }
+ }
+
DmaReqState *state;
backoffTime >>= 2;