summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/base.cc2
-rw-r--r--src/mem/cache/tags/base.hh5
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh5
-rw-r--r--src/mem/cache/tags/fa_lru.cc3
-rw-r--r--src/mem/cache/tags/fa_lru.hh5
5 files changed, 12 insertions, 8 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 75b17699a..fdfe37ef4 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -1210,7 +1210,7 @@ BaseCache::allocateBlock(Addr addr, bool is_secure, PacketList &writebacks)
{
// Find replacement victim
std::vector<CacheBlk*> evict_blks;
- CacheBlk *victim = tags->findVictim(addr, evict_blks);
+ CacheBlk *victim = tags->findVictim(addr, is_secure, evict_blks);
// It is valid to return nullptr if there is no victim
if (!victim)
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index 0cc79020d..7ed90fbd9 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -270,11 +270,12 @@ class BaseTags : public ClockedObject
* @sa insertBlock
*
* @param addr Address to find a victim for.
+ * @param is_secure True if the target memory space is secure.
* @param evict_blks Cache blocks to be evicted.
* @return Cache block to be replaced.
*/
- virtual CacheBlk* findVictim(Addr addr, std::vector<CacheBlk*>& evict_blks)
- const = 0;
+ virtual CacheBlk* findVictim(Addr addr, const bool is_secure,
+ std::vector<CacheBlk*>& evict_blks) const = 0;
virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0;
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index b41c3096c..12b2efb2f 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -204,11 +204,12 @@ class BaseSetAssoc : public BaseTags
* only contains the victim.
*
* @param addr Address to find a victim for.
+ * @param is_secure True if the target memory space is secure.
* @param evict_blks Cache blocks to be evicted.
* @return Cache block to be replaced.
*/
- CacheBlk* findVictim(Addr addr, std::vector<CacheBlk*>& evict_blks) const
- override
+ CacheBlk* findVictim(Addr addr, const bool is_secure,
+ std::vector<CacheBlk*>& evict_blks) const override
{
// Get possible locations for the victim block
std::vector<CacheBlk*> locations = getPossibleLocations(addr);
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index b5950f6cf..3a60e99f9 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -195,7 +195,8 @@ FALRU::findBlockBySetAndWay(int set, int way) const
}
CacheBlk*
-FALRU::findVictim(Addr addr, std::vector<CacheBlk*>& evict_blks) const
+FALRU::findVictim(Addr addr, const bool is_secure,
+ std::vector<CacheBlk*>& evict_blks) const
{
// The victim is always stored on the tail for the FALRU
FALRUBlk* victim = tail;
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index b134417b5..7aec36a61 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -199,11 +199,12 @@ class FALRU : public BaseTags
* only contains the victim.
*
* @param addr Address to find a victim for.
+ * @param is_secure True if the target memory space is secure.
* @param evict_blks Cache blocks to be evicted.
* @return Cache block to be replaced.
*/
- CacheBlk* findVictim(Addr addr, std::vector<CacheBlk*>& evict_blks) const
- override;
+ CacheBlk* findVictim(Addr addr, const bool is_secure,
+ std::vector<CacheBlk*>& evict_blks) const override;
/**
* Insert the new block into the cache and update replacement data.