gem5
v19.0.0.0
|
#include <smmu_v3_caches.hh>
Classes | |
struct | Entry |
Public Types | |
enum | AllocPolicy { ALLOC_ANY_WAY, ALLOC_ANY_BUT_LAST_WAY, ALLOC_LAST_WAY } |
Public Member Functions | |
SMMUTLB (unsigned numEntries, unsigned _associativity, const std::string &policy) | |
SMMUTLB (const SMMUTLB &tlb)=delete | |
virtual | ~SMMUTLB () |
const Entry * | lookup (uint32_t sid, uint32_t ssid, Addr va, bool updStats=true) |
const Entry * | lookupAnyVA (uint32_t sid, uint32_t ssid, bool updStats=true) |
void | store (const Entry &incoming, AllocPolicy alloc) |
void | invalidateSSID (uint32_t sid, uint32_t ssid) |
void | invalidateSID (uint32_t sid) |
void | invalidateVA (Addr va, uint16_t asid, uint16_t vmid) |
void | invalidateVAA (Addr va, uint16_t vmid) |
void | invalidateASID (uint16_t asid, uint16_t vmid) |
void | invalidateVMID (uint16_t vmid) |
void | invalidateAll () |
![]() | |
SMMUv3BaseCache (const std::string &policy_name, uint32_t seed) | |
virtual | ~SMMUv3BaseCache () |
virtual void | regStats (const std::string &name) |
Private Types | |
typedef std::vector< Entry > | Set |
Private Member Functions | |
size_t | pickSetIdx (uint32_t sid, uint32_t ssid) const |
size_t | pickSetIdx (Addr va) const |
size_t | pickEntryIdxToReplace (const Set &set, AllocPolicy alloc) |
Private Attributes | |
std::vector< Set > | sets |
size_t | associativity |
Additional Inherited Members | |
![]() | |
static int | decodePolicyName (const std::string &policy_name) |
![]() | |
int | replacementPolicy |
size_t | nextToReplace |
Random | random |
uint32_t | useStamp |
Stats::Formula | averageLookups |
Stats::Scalar | totalLookups |
Stats::Formula | averageMisses |
Stats::Scalar | totalMisses |
Stats::Formula | averageUpdates |
Stats::Scalar | totalUpdates |
Stats::Formula | averageHitRate |
Stats::Scalar | insertions |
Definition at line 92 of file smmu_v3_caches.hh.
|
private |
Definition at line 142 of file smmu_v3_caches.hh.
enum SMMUTLB::AllocPolicy |
Enumerator | |
---|---|
ALLOC_ANY_WAY | |
ALLOC_ANY_BUT_LAST_WAY | |
ALLOC_LAST_WAY |
Definition at line 95 of file smmu_v3_caches.hh.
SMMUTLB::SMMUTLB | ( | unsigned | numEntries, |
unsigned | _associativity, | ||
const std::string & | policy | ||
) |
Definition at line 149 of file smmu_v3_caches.cc.
References associativity, ArmISA::e, fatal, sets, and SMMUTLB::Entry::valid.
|
delete |
|
inlinevirtual |
Definition at line 125 of file smmu_v3_caches.hh.
References ArmISA::asid, and ArmISA::va.
void SMMUTLB::invalidateAll | ( | ) |
Definition at line 348 of file smmu_v3_caches.cc.
void SMMUTLB::invalidateASID | ( | uint16_t | asid, |
uint16_t | vmid | ||
) |
Definition at line 318 of file smmu_v3_caches.cc.
References SMMUTLB::Entry::asid, ArmISA::e, ArmISA::i, ArmISA::s, sets, SMMUTLB::Entry::valid, and SMMUTLB::Entry::vmid.
void SMMUTLB::invalidateSID | ( | uint32_t | sid | ) |
Definition at line 274 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, ArmISA::s, sets, SMMUTLB::Entry::sid, and SMMUTLB::Entry::valid.
void SMMUTLB::invalidateSSID | ( | uint32_t | sid, |
uint32_t | ssid | ||
) |
Definition at line 261 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, pickSetIdx(), sets, SMMUTLB::Entry::sid, SMMUTLB::Entry::ssid, and SMMUTLB::Entry::valid.
void SMMUTLB::invalidateVA | ( | Addr | va, |
uint16_t | asid, | ||
uint16_t | vmid | ||
) |
Definition at line 289 of file smmu_v3_caches.cc.
References SMMUTLB::Entry::asid, ArmISA::e, ArmISA::i, pickSetIdx(), sets, SMMUTLB::Entry::va, SMMUTLB::Entry::valid, SMMUTLB::Entry::vaMask, and SMMUTLB::Entry::vmid.
void SMMUTLB::invalidateVAA | ( | Addr | va, |
uint16_t | vmid | ||
) |
Definition at line 305 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, pickSetIdx(), sets, SMMUTLB::Entry::va, SMMUTLB::Entry::valid, SMMUTLB::Entry::vaMask, and SMMUTLB::Entry::vmid.
void SMMUTLB::invalidateVMID | ( | uint16_t | vmid | ) |
Definition at line 333 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, ArmISA::s, sets, SMMUTLB::Entry::valid, and SMMUTLB::Entry::vmid.
const SMMUTLB::Entry * SMMUTLB::lookup | ( | uint32_t | sid, |
uint32_t | ssid, | ||
Addr | va, | ||
bool | updStats = true |
||
) |
Definition at line 179 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, SMMUTLB::Entry::lastUsed, panic, pickSetIdx(), sets, SMMUTLB::Entry::sid, SMMUTLB::Entry::ssid, SMMUv3BaseCache::totalLookups, SMMUv3BaseCache::totalMisses, SMMUv3BaseCache::useStamp, SMMUTLB::Entry::va, SMMUTLB::Entry::valid, and SMMUTLB::Entry::vaMask.
Referenced by SMMUTranslationProcess::ifcTLBLookup(), SMMUTranslationProcess::microTLBLookup(), and store().
const SMMUTLB::Entry * SMMUTLB::lookupAnyVA | ( | uint32_t | sid, |
uint32_t | ssid, | ||
bool | updStats = true |
||
) |
Definition at line 213 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, ArmISA::s, sets, SMMUTLB::Entry::sid, SMMUTLB::Entry::ssid, SMMUv3BaseCache::totalLookups, SMMUv3BaseCache::totalMisses, and SMMUTLB::Entry::valid.
|
private |
Definition at line 371 of file smmu_v3_caches.cc.
References ALLOC_ANY_BUT_LAST_WAY, ALLOC_ANY_WAY, ALLOC_LAST_WAY, associativity, ArmISA::i, SMMUv3BaseCache::insertions, SMMUv3BaseCache::nextToReplace, panic, SMMUv3BaseCache::random, Random::random(), SMMUv3BaseCache::replacementPolicy, SMMU_CACHE_REPL_LRU, SMMU_CACHE_REPL_RANDOM, and SMMU_CACHE_REPL_ROUND_ROBIN.
Referenced by store().
|
private |
Definition at line 365 of file smmu_v3_caches.cc.
References sets.
Referenced by invalidateSSID(), invalidateVA(), invalidateVAA(), lookup(), and store().
|
private |
Definition at line 359 of file smmu_v3_caches.cc.
References sets.
void SMMUTLB::store | ( | const Entry & | incoming, |
AllocPolicy | alloc | ||
) |
Definition at line 240 of file smmu_v3_caches.cc.
References SMMUTLB::Entry::lastUsed, lookup(), panic, pickEntryIdxToReplace(), pickSetIdx(), sets, SMMUTLB::Entry::sid, SMMUTLB::Entry::ssid, SMMUv3BaseCache::totalUpdates, SMMUTLB::Entry::va, and SMMUTLB::Entry::valid.
Referenced by SMMUTranslationProcess::ifcTLBUpdate(), and SMMUTranslationProcess::microTLBUpdate().
|
private |
Definition at line 145 of file smmu_v3_caches.hh.
Referenced by pickEntryIdxToReplace(), and SMMUTLB().
|
private |
Definition at line 143 of file smmu_v3_caches.hh.
Referenced by invalidateAll(), invalidateASID(), invalidateSID(), invalidateSSID(), invalidateVA(), invalidateVAA(), invalidateVMID(), lookup(), lookupAnyVA(), pickSetIdx(), SMMUTLB(), and store().