gem5
v20.1.0.0
|
#include <smmu_v3_caches.hh>
Classes | |
struct | Entry |
Public Member Functions | |
WalkCache (const std::array< unsigned, 2 *WALK_CACHE_LEVELS > &_sizes, unsigned _associativity, const std::string &policy) | |
virtual | ~WalkCache () |
const Entry * | lookup (Addr va, Addr vaMask, uint16_t asid, uint16_t vmid, unsigned stage, unsigned level, bool updStats=true) |
void | store (const Entry &incoming) |
void | invalidateVA (Addr va, uint16_t asid, uint16_t vmid, const bool leaf_only) |
void | invalidateVAA (Addr va, uint16_t vmid, const bool leaf_only) |
void | invalidateASID (uint16_t asid, uint16_t vmid) |
void | invalidateVMID (uint16_t vmid) |
void | invalidateAll () |
void | regStats (const std::string &name) override |
Public Member Functions inherited from SMMUv3BaseCache | |
SMMUv3BaseCache (const std::string &policy_name, uint32_t seed) | |
virtual | ~SMMUv3BaseCache () |
Private Types | |
typedef std::vector< Entry > | Set |
Private Member Functions | |
size_t | pickSetIdx (Addr va, Addr vaMask, unsigned stage, unsigned level) const |
size_t | pickEntryIdxToReplace (const Set &set, unsigned stage, unsigned level) |
Private Attributes | |
std::vector< Set > | sets |
size_t | associativity |
std::array< unsigned, 2 *WALK_CACHE_LEVELS > | sizes |
std::array< unsigned, 2 *WALK_CACHE_LEVELS > | offsets |
Additional Inherited Members | |
Static Protected Member Functions inherited from SMMUv3BaseCache | |
static int | decodePolicyName (const std::string &policy_name) |
Definition at line 281 of file smmu_v3_caches.hh.
|
private |
Definition at line 338 of file smmu_v3_caches.hh.
WalkCache::WalkCache | ( | const std::array< unsigned, 2 *WALK_CACHE_LEVELS > & | _sizes, |
unsigned | _associativity, | ||
const std::string & | policy | ||
) |
Definition at line 969 of file smmu_v3_caches.cc.
References associativity, ArmISA::e, fatal, ArmISA::i, offsets, sets, sizes, and WALK_CACHE_LEVELS.
|
inlinevirtual |
Definition at line 305 of file smmu_v3_caches.hh.
void WalkCache::invalidateAll | ( | ) |
Definition at line 1150 of file smmu_v3_caches.cc.
References ArmISA::i, ArmISA::s, and sets.
Referenced by SMMUv3::processCommand().
void WalkCache::invalidateASID | ( | uint16_t | asid, |
uint16_t | vmid | ||
) |
Definition at line 1120 of file smmu_v3_caches.cc.
References ArmISA::asid, ArmISA::e, ArmISA::i, ArmISA::s, and sets.
Referenced by SMMUv3::processCommand().
void WalkCache::invalidateVA | ( | Addr | va, |
uint16_t | asid, | ||
uint16_t | vmid, | ||
const bool | leaf_only | ||
) |
Definition at line 1083 of file smmu_v3_caches.cc.
References ArmISA::asid, ArmISA::e, ArmISA::i, ArmISA::s, sets, and ArmISA::va.
Referenced by SMMUv3::processCommand().
void WalkCache::invalidateVAA | ( | Addr | va, |
uint16_t | vmid, | ||
const bool | leaf_only | ||
) |
Definition at line 1102 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, ArmISA::s, sets, and ArmISA::va.
Referenced by SMMUv3::processCommand().
void WalkCache::invalidateVMID | ( | uint16_t | vmid | ) |
Definition at line 1135 of file smmu_v3_caches.cc.
References ArmISA::e, ArmISA::i, ArmISA::s, and sets.
Referenced by SMMUv3::processCommand().
const WalkCache::Entry * WalkCache::lookup | ( | Addr | va, |
Addr | vaMask, | ||
uint16_t | asid, | ||
uint16_t | vmid, | ||
unsigned | stage, | ||
unsigned | level, | ||
bool | updStats = true |
||
) |
Definition at line 1011 of file smmu_v3_caches.cc.
References ArmISA::asid, ArmISA::e, ArmISA::i, WalkCache::Entry::lastUsed, X86ISA::level, lookupsByStageLevel, missesByStageLevel, panic, pickSetIdx(), sets, SMMUv3BaseCache::totalLookups, totalLookupsByStageLevel, SMMUv3BaseCache::totalMisses, totalMissesByStageLevel, SMMUv3BaseCache::useStamp, and ArmISA::va.
Referenced by store(), and SMMUTranslationProcess::walkCacheLookup().
|
private |
Definition at line 1189 of file smmu_v3_caches.cc.
References associativity, ArmISA::i, SMMUv3BaseCache::insertions, insertionsByStageLevel, X86ISA::level, 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().
Definition at line 1161 of file smmu_v3_caches.cc.
References findLsbSet(), X86ISA::level, ArmISA::offset, offsets, panic, sizes, ArmISA::va, and WALK_CACHE_LEVELS.
|
overridevirtual |
Reimplemented from SMMUv3BaseCache.
Definition at line 1225 of file smmu_v3_caches.cc.
References averageHitRateByStageLevel, averageLookupsByStageLevel, averageMissesByStageLevel, averageUpdatesByStageLevel, csprintf(), Stats::DataWrap< Derived, InfoProxyType >::desc(), Stats::DataWrap< Derived, InfoProxyType >::flags(), insertionsByStageLevel, MipsISA::l, name(), Stats::DataWrap< Derived, InfoProxyType >::name(), Stats::pdf, SMMUv3BaseCache::regStats(), ArmISA::s, simSeconds, totalLookupsByStageLevel, totalMissesByStageLevel, totalUpdatesByStageLevel, and WALK_CACHE_LEVELS.
Referenced by SMMUv3::regStats().
void WalkCache::store | ( | const Entry & | incoming | ) |
Definition at line 1054 of file smmu_v3_caches.cc.
References WalkCache::Entry::asid, WalkCache::Entry::lastUsed, WalkCache::Entry::level, lookup(), panic, pickEntryIdxToReplace(), pickSetIdx(), sets, WalkCache::Entry::stage, SMMUv3BaseCache::totalUpdates, totalUpdatesByStageLevel, updatesByStageLevel, WalkCache::Entry::va, WalkCache::Entry::valid, WalkCache::Entry::vaMask, WalkCache::Entry::vmid, and WALK_CACHE_LEVELS.
Referenced by SMMUTranslationProcess::walkCacheUpdate().
|
private |
Definition at line 341 of file smmu_v3_caches.hh.
Referenced by pickEntryIdxToReplace(), and WalkCache().
|
protected |
Definition at line 333 of file smmu_v3_caches.hh.
Referenced by regStats().
|
protected |
Definition at line 322 of file smmu_v3_caches.hh.
Referenced by regStats().
|
protected |
Definition at line 326 of file smmu_v3_caches.hh.
Referenced by regStats().
|
protected |
Definition at line 330 of file smmu_v3_caches.hh.
Referenced by regStats().
|
protected |
Definition at line 335 of file smmu_v3_caches.hh.
Referenced by pickEntryIdxToReplace(), and regStats().
|
protected |
Definition at line 321 of file smmu_v3_caches.hh.
Referenced by lookup().
|
protected |
Definition at line 325 of file smmu_v3_caches.hh.
Referenced by lookup().
|
private |
Definition at line 343 of file smmu_v3_caches.hh.
Referenced by pickSetIdx(), and WalkCache().
|
private |
Definition at line 339 of file smmu_v3_caches.hh.
Referenced by invalidateAll(), invalidateASID(), invalidateVA(), invalidateVAA(), invalidateVMID(), lookup(), store(), and WalkCache().
|
private |
Definition at line 342 of file smmu_v3_caches.hh.
Referenced by pickSetIdx(), and WalkCache().
|
protected |
Definition at line 323 of file smmu_v3_caches.hh.
Referenced by lookup(), and regStats().
|
protected |
Definition at line 327 of file smmu_v3_caches.hh.
Referenced by lookup(), and regStats().
|
protected |
Definition at line 331 of file smmu_v3_caches.hh.
Referenced by regStats(), and store().
|
protected |
Definition at line 329 of file smmu_v3_caches.hh.
Referenced by store().