Deleted Added
sdiff udiff text old ( 11605:65ae342b627b ) new ( 11744:5d33c6972dda )
full compact
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: 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{
179 DPRINTF(SnoopFilter, "%s: packet %s\n", __func__, cpkt->print());
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{
240 DPRINTF(SnoopFilter, "%s: rsp %s req %s packet %s\n",
241 __func__, rsp_port.name(), req_port.name(), cpkt->print());
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{
295 DPRINTF(SnoopFilter, "%s: rsp %s req %s packet %s\n",
296 __func__, rsp_port.name(), req_port.name(), cpkt->print());
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{
332 DPRINTF(SnoopFilter, "%s: src %s packet %s\n",
333 __func__, slave_port.name(), cpkt->print());
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 ---