1/*
2 * Copyright (c) 2014-2015 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

--- 77 unchanged lines hidden (view full) ---

86 }
87
88 // Calculate prefetches given this access
89 std::vector<AddrPriority> addresses;
90 calculatePrefetch(pkt, addresses);
91
92 // Queue up generated prefetches
93 for (AddrPriority& pf_info : addresses) {
94
94 // Block align prefetch address
96 pf_info.first &= ~(Addr)(blkSize - 1);
95 pf_info.first = blockAddress(pf_info.first);
96
97 pfIdentified++;
98 DPRINTF(HWPrefetch, "Found a pf candidate addr: %#x, "
99 "inserting into prefetch queue.\n", pf_info.first);
100
101 // Create and insert the request
102 PacketPtr pf_pkt = insert(pf_info, is_secure);
103

--- 21 unchanged lines hidden (view full) ---

125 pfq.pop_front();
126
127 pfIssued++;
128 assert(pkt != nullptr);
129 DPRINTF(HWPrefetch, "Generating prefetch for %#x.\n", pkt->getAddr());
130 return pkt;
131}
132
134std::list<QueuedPrefetcher::DeferredPacket>::const_iterator
133QueuedPrefetcher::const_iterator
134QueuedPrefetcher::inPrefetch(Addr address, bool is_secure) const
135{
136 for (const_iterator dp = pfq.begin(); dp != pfq.end(); dp++) {
137 if ((*dp).pkt->getAddr() == address &&
138 (*dp).pkt->isSecure() == is_secure) return dp;
139 }
140
141 return pfq.end();

--- 137 unchanged lines hidden ---