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
// 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());
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
// 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);
}
void
-SnoopFilter::finishRequest(bool will_retry, const Packet* cpkt)
+SnoopFilter::finishRequest(bool will_retry, const Addr addr)
{
if (reqLookupResult != cachedLocations.end()) {
// since we rely on the caller, do a basic check to ensure
// that finishRequest is being called following lookupRequest
- assert(reqLookupResult->first == cpkt->getBlockAddr(linesize));
+ assert(reqLookupResult->first == (addr & ~(Addr(linesize - 1))));
if (will_retry) {
// Undo any changes made in lookupRequest to the snoop filter
// entry if the request will come again. retryItem holds
* reqLookupResult.
*
* @param will_retry This request will retry on this bus / snoop filter
- * @param cpkt Request packet, merely for sanity checking
+ * @param addr Packet address, merely for sanity checking
*/
- void finishRequest(bool will_retry, const Packet* cpkt);
+ void finishRequest(bool will_retry, const Addr addr);
/**
* Handle an incoming snoop from below (the master port). These