gem5
v20.1.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 () |
Public Member Functions inherited from SMMUv3BaseCache | |
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 Protected Member Functions inherited from SMMUv3BaseCache | |
static int | decodePolicyName (const std::string &policy_name) |
Protected Attributes inherited from SMMUv3BaseCache | |
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 90 of file smmu_v3_caches.hh.
|
private |
Definition at line 140 of file smmu_v3_caches.hh.
enum SMMUTLB::AllocPolicy |
Enumerator | |
---|---|
ALLOC_ANY_WAY | |
ALLOC_ANY_BUT_LAST_WAY | |
ALLOC_LAST_WAY |
Definition at line 93 of file smmu_v3_caches.hh.
SMMUTLB::SMMUTLB | ( | unsigned | numEntries, |
unsigned | _associativity, | ||
const std::string & | policy | ||
) |
Definition at line 146 of file smmu_v3_caches.cc.
References associativity, ArmISA::e, fatal, and sets.
|
delete |
|
inlinevirtual |
Definition at line 123 of file smmu_v3_caches.hh.
void SMMUTLB::invalidateAll | ( | ) |
Definition at line 345 of file smmu_v3_caches.cc.
void SMMUTLB::invalidateASID | ( | uint16_t | asid, |
uint16_t | vmid | ||
) |
Definition at line 315 of file smmu_v3_caches.cc.
References ArmISA::asid, ArmISA::e, ArmISA::i, ArmISA::s, and sets.
void SMMUTLB::invalidateSID | ( | uint32_t | sid | ) |
void SMMUTLB::invalidateSSID | ( | uint32_t | sid, |
uint32_t | ssid | ||
) |
Definition at line 258 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, pickSetIdx(), and sets.
void SMMUTLB::invalidateVA | ( | Addr | va, |
uint16_t | asid, | ||
uint16_t | vmid | ||
) |
Definition at line 286 of file smmu_v3_caches.cc.
References ArmISA::asid, ArmISA::e, ArmISA::i, pickSetIdx(), sets, and ArmISA::va.
void SMMUTLB::invalidateVAA | ( | Addr | va, |
uint16_t | vmid | ||
) |
Definition at line 302 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, pickSetIdx(), sets, and ArmISA::va.
void SMMUTLB::invalidateVMID | ( | uint16_t | vmid | ) |
const SMMUTLB::Entry * SMMUTLB::lookup | ( | uint32_t | sid, |
uint32_t | ssid, | ||
Addr | va, | ||
bool | updStats = true |
||
) |
Definition at line 176 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, SMMUTLB::Entry::lastUsed, panic, pickSetIdx(), sets, SMMUv3BaseCache::totalLookups, SMMUv3BaseCache::totalMisses, SMMUv3BaseCache::useStamp, and ArmISA::va.
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 210 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, ArmISA::s, sets, SMMUv3BaseCache::totalLookups, and SMMUv3BaseCache::totalMisses.
|
private |
Definition at line 368 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 356 of file smmu_v3_caches.cc.
References sets, and ArmISA::va.
|
private |
Definition at line 362 of file smmu_v3_caches.cc.
References sets.
Referenced by invalidateSSID(), invalidateVA(), invalidateVAA(), lookup(), and store().
void SMMUTLB::store | ( | const Entry & | incoming, |
AllocPolicy | alloc | ||
) |
Definition at line 237 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 143 of file smmu_v3_caches.hh.
Referenced by pickEntryIdxToReplace(), and SMMUTLB().
|
private |
Definition at line 141 of file smmu_v3_caches.hh.
Referenced by invalidateAll(), invalidateASID(), invalidateSID(), invalidateSSID(), invalidateVA(), invalidateVAA(), invalidateVMID(), lookup(), lookupAnyVA(), pickSetIdx(), SMMUTLB(), and store().