Fix getDeviceAddressRanges() to get snooping right.
--HG-- extra : convert_revision : 2aeab25ef955ab9db7b968786faff227239fbbe4
This commit is contained in:
parent
0484867d85
commit
da46364b18
4 changed files with 30 additions and 11 deletions
8
src/mem/cache/base_cache.cc
vendored
8
src/mem/cache/base_cache.cc
vendored
|
@ -57,7 +57,6 @@ BaseCache::BaseCache(const std::string &name, Params ¶ms)
|
|||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
BaseCache::CachePort::recvStatusChange(Port::Status status)
|
||||
{
|
||||
|
@ -66,13 +65,6 @@ BaseCache::CachePort::recvStatusChange(Port::Status status)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
BaseCache::CachePort::getDeviceAddressRanges(AddrRangeList &resp, bool &snoop)
|
||||
{
|
||||
AddrRangeList dummy;
|
||||
otherPort->getPeerAddressRanges(resp, dummy);
|
||||
}
|
||||
|
||||
int
|
||||
BaseCache::CachePort::deviceBlockSize()
|
||||
{
|
||||
|
|
3
src/mem/cache/base_cache.hh
vendored
3
src/mem/cache/base_cache.hh
vendored
|
@ -91,9 +91,6 @@ class BaseCache : public MemObject
|
|||
|
||||
virtual void recvStatusChange(Status status);
|
||||
|
||||
virtual void getDeviceAddressRanges(AddrRangeList &resp,
|
||||
bool &snoop);
|
||||
|
||||
virtual int deviceBlockSize();
|
||||
|
||||
bool recvRetryCommon();
|
||||
|
|
6
src/mem/cache/cache.hh
vendored
6
src/mem/cache/cache.hh
vendored
|
@ -89,6 +89,9 @@ class Cache : public BaseCache
|
|||
void processRequestEvent();
|
||||
void processResponseEvent();
|
||||
|
||||
virtual void getDeviceAddressRanges(AddrRangeList &resp,
|
||||
bool &snoop);
|
||||
|
||||
virtual bool recvTiming(PacketPtr pkt);
|
||||
|
||||
virtual void recvRetry();
|
||||
|
@ -124,6 +127,9 @@ class Cache : public BaseCache
|
|||
void processRequestEvent();
|
||||
void processResponseEvent();
|
||||
|
||||
virtual void getDeviceAddressRanges(AddrRangeList &resp,
|
||||
bool &snoop);
|
||||
|
||||
virtual bool recvTiming(PacketPtr pkt);
|
||||
|
||||
virtual void recvRetry();
|
||||
|
|
24
src/mem/cache/cache_impl.hh
vendored
24
src/mem/cache/cache_impl.hh
vendored
|
@ -1139,6 +1139,18 @@ Cache<TagStore,Coherence>::deletePortRefs(Port *p)
|
|||
}
|
||||
|
||||
|
||||
template<class TagStore, class Coherence>
|
||||
void
|
||||
Cache<TagStore,Coherence>::CpuSidePort::
|
||||
getDeviceAddressRanges(AddrRangeList &resp, bool &snoop)
|
||||
{
|
||||
// CPU side port doesn't snoop; it's a target only.
|
||||
bool dummy;
|
||||
otherPort->getPeerAddressRanges(resp, dummy);
|
||||
snoop = false;
|
||||
}
|
||||
|
||||
|
||||
template<class TagStore, class Coherence>
|
||||
bool
|
||||
Cache<TagStore,Coherence>::CpuSidePort::recvTiming(PacketPtr pkt)
|
||||
|
@ -1260,6 +1272,18 @@ Cache<TagStore,Coherence>::CpuSidePort::recvFunctional(PacketPtr pkt)
|
|||
}
|
||||
|
||||
|
||||
template<class TagStore, class Coherence>
|
||||
void
|
||||
Cache<TagStore,Coherence>::MemSidePort::
|
||||
getDeviceAddressRanges(AddrRangeList &resp, bool &snoop)
|
||||
{
|
||||
// Memory-side port always snoops.
|
||||
bool dummy;
|
||||
otherPort->getPeerAddressRanges(resp, dummy);
|
||||
snoop = true;
|
||||
}
|
||||
|
||||
|
||||
template<class TagStore, class Coherence>
|
||||
bool
|
||||
Cache<TagStore,Coherence>::MemSidePort::recvTiming(PacketPtr pkt)
|
||||
|
|
Loading…
Reference in a new issue