1/* 2 * Copyright (c) 2013,2016-2018 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 --- 108 unchanged lines hidden (view full) --- 117 return nullptr; 118} 119 120void 121FALRU::invalidate(CacheBlk *blk) 122{ 123 BaseTags::invalidate(blk); 124 |
125 // Decrease the number of tags in use 126 tagsInUse--; 127 |
128 // Move the block to the tail to make it the next victim 129 moveToTail((FALRUBlk*)blk); 130 131 // Erase block entry in the hash table 132 tagHash.erase(blk->tag); 133} 134 135CacheBlk* --- 31 unchanged lines hidden (view full) --- 167 *in_caches_mask = mask; 168 } 169 170 cacheTracking.recordAccess(blk); 171 172 return blk; 173} 174 |
175CacheBlk* 176FALRU::findBlock(Addr addr, bool is_secure) const 177{ 178 Addr tag = extractTag(addr); 179 FALRUBlk* blk = hashLookup(tag); 180 181 if (blk && blk->isValid()) { 182 assert(blk->tag == tag); --- 29 unchanged lines hidden (view full) --- 212 FALRUBlk* falruBlk = static_cast<FALRUBlk*>(blk); 213 214 // Make sure block is not present in the cache 215 assert(falruBlk->inCachesMask == 0); 216 217 // Do common block insertion functionality 218 BaseTags::insertBlock(pkt, blk); 219 |
220 // Increment tag counter 221 tagsInUse++; 222 |
223 // New block is the MRU 224 moveToHead(falruBlk); 225 226 // Insert new block in the hash table 227 tagHash[falruBlk->tag] = falruBlk; 228} 229 230void --- 225 unchanged lines hidden --- |