diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-06-20 15:11:18 +0100 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-06-20 15:11:18 +0100 |
commit | 40e4453ddc9ddbf5b3b949c98e2d3281cf3e97f2 (patch) | |
tree | 80b66eafb009caeecf2ff4a30c632d10c4eb04d4 /src/mem/coherent_xbar.cc | |
parent | dd0f54fed65de7962bc5621c4a601579c2f82184 (diff) | |
download | gem5-40e4453ddc9ddbf5b3b949c98e2d3281cf3e97f2.tar.xz |
mem: Fix the snoop filter when there is a downstream addr mapper
The snoop filter handles requests in two steps which preceed and
follow the call to send the packet downstream. An address mapper could
possibly change the address of the packet when it is sent downstream
breaking the snoop filter assumption that the address is unchanged
Change-Id: Ib2db755e9ebef4f2f7c0169a46b1b11185ffbe79
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/mem/coherent_xbar.cc')
-rw-r--r-- | src/mem/coherent_xbar.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index 22642e6f2..f33a33b0f 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -115,7 +115,6 @@ CoherentXBar::~CoherentXBar() void CoherentXBar::init() { - // the base class is responsible for determining the block size BaseXBar::init(); // iterate over our slave ports and determine which of our @@ -233,7 +232,9 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) // in certain cases the crossbar is responsible for responding bool respond_directly = false; - + // store the original address as an address mapper could possibly + // modify the address upon a sendTimingRequest + const Addr addr(pkt->getAddr()); if (sink_packet) { DPRINTF(CoherentXBar, "Not forwarding %s to %#llx\n", pkt->cmdString(), pkt->getAddr()); @@ -265,7 +266,7 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) if (snoopFilter && !system->bypassCaches()) { // Let the snoop filter know about the success of the send operation - snoopFilter->finishRequest(!success, pkt); + snoopFilter->finishRequest(!success, addr); } // check if we were successful in sending the packet onwards @@ -660,7 +661,7 @@ CoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id) // operation, and do it even before sending it onwards to // avoid situations where atomic upward snoops sneak in // between and change the filter state - snoopFilter->finishRequest(false, pkt); + snoopFilter->finishRequest(false, pkt->getAddr()); snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID, sf_res.first); |