snoop_filter.cc (11605:65ae342b627b) | snoop_filter.cc (11744:5d33c6972dda) |
---|---|
1/* 2 * Copyright (c) 2013-2016 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 48 unchanged lines hidden (view full) --- 57 DPRINTF(SnoopFilter, "%s: Removed SF entry.\n", 58 __func__); 59 } 60} 61 62std::pair<SnoopFilter::SnoopList, Cycles> 63SnoopFilter::lookupRequest(const Packet* cpkt, const SlavePort& slave_port) 64{ | 1/* 2 * Copyright (c) 2013-2016 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 48 unchanged lines hidden (view full) --- 57 DPRINTF(SnoopFilter, "%s: Removed SF entry.\n", 58 __func__); 59 } 60} 61 62std::pair<SnoopFilter::SnoopList, Cycles> 63SnoopFilter::lookupRequest(const Packet* cpkt, const SlavePort& slave_port) 64{ |
65 DPRINTF(SnoopFilter, "%s: packet src %s addr 0x%x cmd %s\n", 66 __func__, slave_port.name(), cpkt->getAddr(), cpkt->cmdString()); | 65 DPRINTF(SnoopFilter, "%s: src %s packet %s\n", __func__, 66 slave_port.name(), cpkt->print()); |
67 68 // check if the packet came from a cache 69 bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping() && 70 cpkt->fromCache(); 71 Addr line_addr = cpkt->getBlockAddr(linesize); 72 if (cpkt->isSecure()) { 73 line_addr |= LineSecure; 74 } --- 96 unchanged lines hidden (view full) --- 171 172 eraseIfNullEntry(reqLookupResult); 173 } 174} 175 176std::pair<SnoopFilter::SnoopList, Cycles> 177SnoopFilter::lookupSnoop(const Packet* cpkt) 178{ | 67 68 // check if the packet came from a cache 69 bool allocate = !cpkt->req->isUncacheable() && slave_port.isSnooping() && 70 cpkt->fromCache(); 71 Addr line_addr = cpkt->getBlockAddr(linesize); 72 if (cpkt->isSecure()) { 73 line_addr |= LineSecure; 74 } --- 96 unchanged lines hidden (view full) --- 171 172 eraseIfNullEntry(reqLookupResult); 173 } 174} 175 176std::pair<SnoopFilter::SnoopList, Cycles> 177SnoopFilter::lookupSnoop(const Packet* cpkt) 178{ |
179 DPRINTF(SnoopFilter, "%s: packet addr 0x%x cmd %s\n", 180 __func__, cpkt->getAddr(), cpkt->cmdString()); | 179 DPRINTF(SnoopFilter, "%s: packet %s\n", __func__, cpkt->print()); |
181 182 assert(cpkt->isRequest()); 183 184 Addr line_addr = cpkt->getBlockAddr(linesize); 185 if (cpkt->isSecure()) { 186 line_addr |= LineSecure; 187 } 188 auto sf_it = cachedLocations.find(line_addr); --- 44 unchanged lines hidden (view full) --- 233 return snoopSelected(maskToPortList(interested), lookupLatency); 234} 235 236void 237SnoopFilter::updateSnoopResponse(const Packet* cpkt, 238 const SlavePort& rsp_port, 239 const SlavePort& req_port) 240{ | 180 181 assert(cpkt->isRequest()); 182 183 Addr line_addr = cpkt->getBlockAddr(linesize); 184 if (cpkt->isSecure()) { 185 line_addr |= LineSecure; 186 } 187 auto sf_it = cachedLocations.find(line_addr); --- 44 unchanged lines hidden (view full) --- 232 return snoopSelected(maskToPortList(interested), lookupLatency); 233} 234 235void 236SnoopFilter::updateSnoopResponse(const Packet* cpkt, 237 const SlavePort& rsp_port, 238 const SlavePort& req_port) 239{ |
241 DPRINTF(SnoopFilter, "%s: packet rsp %s req %s addr 0x%x cmd %s\n", 242 __func__, rsp_port.name(), req_port.name(), cpkt->getAddr(), 243 cpkt->cmdString()); | 240 DPRINTF(SnoopFilter, "%s: rsp %s req %s packet %s\n", 241 __func__, rsp_port.name(), req_port.name(), cpkt->print()); |
244 245 assert(cpkt->isResponse()); 246 assert(cpkt->cacheResponding()); 247 248 // if this snoop response is due to an uncacheable request, or is 249 // being turned into a normal response, there is nothing more to 250 // do 251 if (cpkt->req->isUncacheable() || !req_port.isSnooping()) { --- 37 unchanged lines hidden (view full) --- 289 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 290 __func__, sf_item.requested, sf_item.holder); 291} 292 293void 294SnoopFilter::updateSnoopForward(const Packet* cpkt, 295 const SlavePort& rsp_port, const MasterPort& req_port) 296{ | 242 243 assert(cpkt->isResponse()); 244 assert(cpkt->cacheResponding()); 245 246 // if this snoop response is due to an uncacheable request, or is 247 // being turned into a normal response, there is nothing more to 248 // do 249 if (cpkt->req->isUncacheable() || !req_port.isSnooping()) { --- 37 unchanged lines hidden (view full) --- 287 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 288 __func__, sf_item.requested, sf_item.holder); 289} 290 291void 292SnoopFilter::updateSnoopForward(const Packet* cpkt, 293 const SlavePort& rsp_port, const MasterPort& req_port) 294{ |
297 DPRINTF(SnoopFilter, "%s: packet rsp %s req %s addr 0x%x cmd %s\n", 298 __func__, rsp_port.name(), req_port.name(), cpkt->getAddr(), 299 cpkt->cmdString()); | 295 DPRINTF(SnoopFilter, "%s: rsp %s req %s packet %s\n", 296 __func__, rsp_port.name(), req_port.name(), cpkt->print()); |
300 301 assert(cpkt->isResponse()); 302 assert(cpkt->cacheResponding()); 303 304 Addr line_addr = cpkt->getBlockAddr(linesize); 305 if (cpkt->isSecure()) { 306 line_addr |= LineSecure; 307 } --- 19 unchanged lines hidden (view full) --- 327 __func__, sf_item.requested, sf_item.holder); 328 eraseIfNullEntry(sf_it); 329 330} 331 332void 333SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port) 334{ | 297 298 assert(cpkt->isResponse()); 299 assert(cpkt->cacheResponding()); 300 301 Addr line_addr = cpkt->getBlockAddr(linesize); 302 if (cpkt->isSecure()) { 303 line_addr |= LineSecure; 304 } --- 19 unchanged lines hidden (view full) --- 324 __func__, sf_item.requested, sf_item.holder); 325 eraseIfNullEntry(sf_it); 326 327} 328 329void 330SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port) 331{ |
335 DPRINTF(SnoopFilter, "%s: packet src %s addr 0x%x cmd %s\n", 336 __func__, slave_port.name(), cpkt->getAddr(), cpkt->cmdString()); | 332 DPRINTF(SnoopFilter, "%s: src %s packet %s\n", 333 __func__, slave_port.name(), cpkt->print()); |
337 338 assert(cpkt->isResponse()); 339 340 // we only allocate if the packet actually came from a cache, but 341 // start by checking if the port is snooping 342 if (cpkt->req->isUncacheable() || !slave_port.isSnooping()) 343 return; 344 --- 70 unchanged lines hidden --- | 334 335 assert(cpkt->isResponse()); 336 337 // we only allocate if the packet actually came from a cache, but 338 // start by checking if the port is snooping 339 if (cpkt->req->isUncacheable() || !slave_port.isSnooping()) 340 return; 341 --- 70 unchanged lines hidden --- |