gem5 v24.0.0.0
|
#include <mmu.hh>
Classes | |
struct | CachedState |
struct | Stats |
Public Types | |
enum | ArmFlags { AlignmentMask = 0x7 , AlignByte = 0x0 , AlignHalfWord = 0x1 , AlignWord = 0x2 , AlignDoubleWord = 0x3 , AlignQuadWord = 0x4 , AlignOctWord = 0x5 , AllowUnaligned = 0x8 , UserMode = 0x10 } |
enum | ArmTranslationType { NormalTran = 0 , S1CTran = 0x1 , HypMode = 0x2 , S1S2NsTran = 0x4 , S1E0Tran = 0x8 , S1E1Tran = 0x10 , S1E2Tran = 0x20 , S1E3Tran = 0x40 , S12E0Tran = 0x80 , S12E1Tran = 0x100 } |
Public Types inherited from gem5::BaseMMU | |
enum | Mode { Read , Write , Execute } |
Public Types inherited from gem5::SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
TranslationGenPtr | translateFunctional (Addr start, Addr size, ThreadContext *tc, Mode mode, Request::Flags flags) override |
Returns a translation generator for a region of virtual addresses, instead of directly translating a specific address. | |
MMU (const ArmMMUParams &p) | |
void | init () override |
Called at init time, this method is traversing the TLB hierarchy and pupulating the instruction/data/unified containers accordingly. | |
bool | translateFunctional (ThreadContext *tc, Addr vaddr, Addr &paddr) |
Do a functional lookup on the TLB (for debugging) and don't modify any internal state. | |
Fault | translateFunctional (const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override |
Fault | translateFunctional (const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode, ArmTranslationType tran_type) |
Do a functional lookup on the TLB (for checker cpu) that behaves like a normal lookup without modifying any page table state. | |
Fault | translateFunctional (const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode, ArmTranslationType tran_type, bool stage2) |
Fault | translateAtomic (const RequestPtr &req, ThreadContext *tc, Mode mode) override |
Fault | translateAtomic (const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode, ArmTranslationType tran_type, bool stage2) |
Fault | translateAtomic (const RequestPtr &req, ThreadContext *tc, Mode mode, ArmTranslationType tran_type) |
void | translateTiming (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override |
void | translateTiming (const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode, bool stage2) |
void | translateTiming (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tran_type, bool stage2) |
Fault | translateMmuOff (ThreadContext *tc, const RequestPtr &req, Mode mode, ArmTranslationType tran_type, Addr vaddr, bool long_desc_format, CachedState &state) |
Fault | translateMmuOn (ThreadContext *tc, const RequestPtr &req, Mode mode, Translation *translation, bool &delay, bool timing, bool functional, Addr vaddr, ArmFault::TranMethod tranMethod, CachedState &state) |
Fault | translateFs (const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing, ArmTranslationType tran_type, bool functional, CachedState &state) |
Fault | translateSe (const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing, CachedState &state) |
Fault | translateComplete (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tran_type, bool call_from_s2) |
Fault | translateComplete (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tran_type, bool call_from_s2, CachedState &state) |
Fault | finalizePhysical (const RequestPtr &req, ThreadContext *tc, Mode mode) const override |
void | drainResume () override |
Resume execution after a successful drain. | |
void | takeOverFrom (BaseMMU *old_mmu) override |
void | invalidateMiscReg () |
template<typename OP > | |
void | flush (const OP &tlbi_op) |
template<typename OP > | |
void | flushStage1 (const OP &tlbi_op) |
template<typename OP > | |
void | flushStage2 (const OP &tlbi_op) |
template<typename OP > | |
void | iflush (const OP &tlbi_op) |
template<typename OP > | |
void | dflush (const OP &tlbi_op) |
void | flushAll () override |
uint64_t | getAttr () const |
void | setAttr (uint64_t attr) |
Accessor functions for memory attributes for last accessed TLB entry. | |
const ArmRelease * | release () const |
bool | hasWalkCache () const |
TlbEntry * | lookup (Addr vpn, uint16_t asn, vmid_t vmid, bool secure, bool functional, bool ignore_asn, TranslationRegime target_regime, bool stage2, BaseMMU::Mode mode) |
Lookup an entry in the TLB. | |
Fault | getTE (TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, bool is_secure, ArmTranslationType tran_type, bool stage2) |
Fault | getTE (TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, bool is_secure, ArmTranslationType tran_type, CachedState &state) |
Fault | getResultTe (TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, TlbEntry *mergeTe, CachedState &state) |
Fault | checkPermissions (TlbEntry *te, const RequestPtr &req, Mode mode, bool stage2) |
Fault | checkPermissions (TlbEntry *te, const RequestPtr &req, Mode mode, CachedState &state) |
Fault | checkPermissions64 (TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc, bool stage2) |
Fault | checkPermissions64 (TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc, CachedState &state) |
void | setTestInterface (SimObject *ti) |
Fault | testTranslation (const RequestPtr &req, Mode mode, TlbEntry::DomainType domain, CachedState &state) const |
Public Member Functions inherited from gem5::BaseMMU | |
void | demapPage (Addr vaddr, uint64_t asn) |
Public Member Functions inherited from gem5::SimObject | |
const Params & | params () const |
SimObject (const Params &p) | |
virtual | ~SimObject () |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual void | regProbePoints () |
Register probe points for this object. | |
virtual void | regProbeListeners () |
Register probe listeners for this object. | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. | |
virtual Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a port with a given name and index. | |
virtual void | startup () |
startup() is the final initialization call before simulation. | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. | |
virtual void | resetStats () |
Callback to reset stats. | |
virtual void | preDumpStats () |
Callback before stats are dumped. | |
void | addStat (statistics::Info *info) |
Register a stat with this group. | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Static Public Member Functions | |
static ExceptionLevel | tranTypeEL (CPSR cpsr, SCR scr, ArmTranslationType type) |
Determine the EL to use for the purpose of a translation given a specific translation type. | |
static bool | hasUnprivRegime (TranslationRegime regime) |
Static Public Member Functions inherited from gem5::SimObject | |
static void | serializeAll (const std::string &cpt_dir) |
Create a checkpoint by serializing all SimObjects in the system. | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. | |
static void | setSimObjectResolver (SimObjectResolver *resolver) |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
static SimObjectResolver * | getSimObjectResolver () |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
Public Attributes | |
TlbTestInterface * | test |
CachedState | s1State |
CachedState | s2State |
Public Attributes inherited from gem5::BaseMMU | |
BaseTLB * | dtb |
BaseTLB * | itb |
Protected Types | |
using | LookupLevel = enums::ArmLookupLevel |
Protected Types inherited from gem5::BaseMMU | |
typedef BaseMMUParams | Params |
Protected Attributes | |
TLB * | itbStage2 |
TLB * | dtbStage2 |
TableWalker * | itbWalker |
TableWalker * | dtbWalker |
TableWalker * | itbStage2Walker |
TableWalker * | dtbStage2Walker |
ContextID | miscRegContext |
uint64_t | _attr |
const ArmRelease * | _release |
bool | haveLargeAsid64 |
uint8_t | physAddrRange |
AddrRange | m5opRange |
bool | _hasWalkCache |
gem5::ArmISA::MMU::Stats | stats |
Protected Attributes inherited from gem5::BaseMMU | |
std::set< BaseTLB * > | instruction |
It is possible from the MMU to traverse the entire hierarchy of TLBs, starting from the DTB and ITB (generally speaking from the first level) up to the last level via the nextLevel pointer. | |
std::set< BaseTLB * > | data |
std::set< BaseTLB * > | unified |
Protected Attributes inherited from gem5::SimObject | |
const SimObjectParams & | _params |
Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. | |
|
protected |
gem5::MMU::MMU | ( | const ArmMMUParams & | p | ) |
Definition at line 60 of file mmu.cc.
References _release, gem5::FullSystem, haveLargeAsid64, gem5::ArmSystem::haveLargeAsid64(), m5opRange, gem5::MipsISA::p, physAddrRange, gem5::ArmSystem::physAddrRange(), and gem5::ArmSystem::releaseFS().
|
protected |
Definition at line 763 of file mmu.cc.
References gem5::Request::CACHE_BLOCK_ZERO, gem5::BaseMMU::Execute, gem5::ArmISA::HaveExt(), gem5::ArmISA::mode, and state.
Referenced by faultPAN().
Fault gem5::MMU::checkPermissions | ( | TlbEntry * | te, |
const RequestPtr & | req, | ||
Mode | mode, | ||
bool | stage2 ) |
Definition at line 301 of file mmu.cc.
References checkPermissions(), gem5::ArmISA::mode, s1State, s2State, and gem5::ArmISA::te.
Referenced by checkPermissions(), getResultTe(), and gem5::ArmISA::Stage2LookUp::getTe().
Fault gem5::MMU::checkPermissions | ( | TlbEntry * | te, |
const RequestPtr & | req, | ||
Mode | mode, | ||
CachedState & | state ) |
Definition at line 308 of file mmu.cc.
References gem5::ArmISA::MMU::Stats::alignFaults, gem5::ArmISA::ArmFault::AlignmentFault, AlignmentMask, gem5::ArmISA::MMU::Stats::domainFaults, gem5::ArmISA::ArmFault::DomainLL, DPRINTF, gem5::BaseMMU::Execute, flags, gem5::ArmISA::ArmFault::LpaeTran, gem5::ArmISA::mask, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::NoAccess, gem5::NoFault, gem5::ArmISA::TlbEntry::Normal, panic, gem5::ArmISA::ArmFault::PermissionLL, gem5::ArmISA::MMU::Stats::permsFaults, gem5::ArmISA::ArmFault::PrefetchUncacheable, state, stats, gem5::ArmISA::te, UserMode, gem5::MipsISA::vaddr, gem5::ArmISA::ArmFault::VmsaTran, and gem5::BaseMMU::Write.
Fault gem5::MMU::checkPermissions64 | ( | TlbEntry * | te, |
const RequestPtr & | req, | ||
Mode | mode, | ||
ThreadContext * | tc, | ||
bool | stage2 ) |
Definition at line 487 of file mmu.cc.
References checkPermissions64(), gem5::ArmISA::mode, s1State, s2State, and gem5::ArmISA::te.
Referenced by checkPermissions64(), getResultTe(), and gem5::ArmISA::Stage2LookUp::getTe().
Fault gem5::MMU::checkPermissions64 | ( | TlbEntry * | te, |
const RequestPtr & | req, | ||
Mode | mode, | ||
ThreadContext * | tc, | ||
CachedState & | state ) |
Definition at line 494 of file mmu.cc.
References gem5::ArmISA::MMU::Stats::alignFaults, gem5::ArmISA::ArmFault::AlignmentFault, AlignmentMask, DPRINTF, gem5::ArmISA::EL0, gem5::BaseMMU::Execute, flags, gem5::ArmISA::ArmFault::LpaeTran, gem5::ArmISA::mask, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::NoAccess, gem5::NoFault, gem5::ArmISA::TlbEntry::Normal, gem5::ArmISA::ArmFault::PermissionLL, gem5::ArmISA::MMU::Stats::permsFaults, gem5::ArmISA::ArmFault::PrefetchUncacheable, purifyTaggedAddr(), s1PermBits64(), s2PermBits64(), state, stats, gem5::ArmISA::te, updateMiscReg(), gem5::MipsISA::vaddr, and gem5::BaseMMU::Write.
|
protected |
Definition at line 112 of file mmu.cc.
References gem5::BaseMMU::data, gem5::BaseMMU::instruction, gem5::ArmISA::tlb, gem5::BaseMMU::unified, and gem5::ArmISA::TLB::walkCache().
Referenced by init().
|
inline |
Definition at line 350 of file mmu.hh.
References gem5::BaseMMU::data, flush(), gem5::ArmISA::tlb, and gem5::BaseMMU::unified.
Referenced by gem5::ArmISA::DTLBIALL::operator()(), gem5::ArmISA::DTLBIASID::operator()(), and gem5::ArmISA::DTLBIMVA::operator()().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from gem5::Drainable.
Definition at line 131 of file mmu.cc.
References gem5::ArmISA::MMU::CachedState::miscRegValid, s1State, and s2State.
|
protected |
Definition at line 738 of file mmu.cc.
References checkPAN(), gem5::ArmISA::EL0, gem5::ArmISA::EL1, gem5::ArmISA::EL2, gem5::ArmISA::EL3, gem5::ArmISA::mode, and state.
Referenced by s1PermBits64().
|
overridevirtual |
Reimplemented from gem5::BaseMMU.
Definition at line 226 of file mmu.cc.
References gem5::AddrRange::contains(), gem5::pseudo_inst::decodeAddrOffset(), gem5::ArmISA::inAArch64(), m5opRange, gem5::ArmISA::mode, gem5::NoFault, gem5::pseudo_inst::pseudoInst(), gem5::BaseMMU::Read, gem5::Packet::setLE(), and gem5::AddrRange::start().
Referenced by testAndFinalize(), and translateSe().
|
inline |
Definition at line 302 of file mmu.hh.
References flushStage1(), and flushStage2().
Referenced by dflush(), flushStage1(), iflush(), gem5::ArmISA::TLBIALL::operator()(), gem5::ArmISA::TLBIALLEL::operator()(), gem5::ArmISA::TLBIALLN::operator()(), and gem5::ArmISA::TLBIVMALL::operator()().
|
inlineoverridevirtual |
Reimplemented from gem5::BaseMMU.
Definition at line 361 of file mmu.hh.
References dtbStage2, gem5::ArmISA::TLB::flushAll(), gem5::BaseMMU::flushAll(), and itbStage2.
|
inline |
Definition at line 315 of file mmu.hh.
References gem5::BaseMMU::data, flush(), gem5::BaseMMU::instruction, gem5::ArmISA::tlb, and gem5::BaseMMU::unified.
Referenced by flush(), gem5::ArmISA::TLBIASID::operator()(), gem5::ArmISA::TLBIMVA::operator()(), and gem5::ArmISA::TLBIMVAA::operator()().
|
inline |
Definition at line 330 of file mmu.hh.
References dtbStage2, gem5::ArmISA::TLB::flush(), and itbStage2.
Referenced by flush(), and gem5::ArmISA::TLBIIPA::operator()().
|
inline |
Definition at line 369 of file mmu.hh.
References _attr.
Referenced by gem5::ArmISA::ISA::addressTranslation(), and gem5::ArmISA::ISA::addressTranslation64().
|
inlineprotected |
Definition at line 66 of file mmu.hh.
References gem5::BaseMMU::dtb.
|
inlineprotected |
Definition at line 72 of file mmu.hh.
References gem5::BaseMMU::itb.
Fault gem5::MMU::getResultTe | ( | TlbEntry ** | te, |
const RequestPtr & | req, | ||
ThreadContext * | tc, | ||
Mode | mode, | ||
Translation * | translation, | ||
bool | timing, | ||
bool | functional, | ||
TlbEntry * | mergeTe, | ||
CachedState & | state ) |
Definition at line 1471 of file mmu.cc.
References gem5::ArmISA::ArmFault::annotate(), checkPermissions(), checkPermissions64(), DPRINTF, getTE(), gem5::ArmISA::Stage2LookUp::getTe(), gem5::ArmISA::Stage2LookUp::isComplete(), isCompleteTranslation(), gem5::ArmISA::mode, gem5::NoFault, gem5::ArmISA::ArmFault::OVA, gem5::ArmISA::ArmFault::S1PTW, gem5::ArmISA::Stage2LookUp::setSelfDelete(), state, and gem5::ArmISA::te.
Referenced by translateMmuOn().
|
protected |
Definition at line 154 of file mmu.cc.
References dtbStage2Walker, dtbWalker, gem5::BaseMMU::Execute, itbStage2Walker, itbWalker, and gem5::ArmISA::mode.
Referenced by getTE().
Fault gem5::MMU::getTE | ( | TlbEntry ** | te, |
const RequestPtr & | req, | ||
ThreadContext * | tc, | ||
Mode | mode, | ||
Translation * | translation, | ||
bool | timing, | ||
bool | functional, | ||
bool | is_secure, | ||
ArmTranslationType | tran_type, | ||
bool | stage2 ) |
Definition at line 1380 of file mmu.cc.
References getTE(), gem5::ArmISA::mode, s1State, s2State, and gem5::ArmISA::te.
Referenced by gem5::ArmISA::Stage2LookUp::finish(), getResultTe(), getTE(), and gem5::ArmISA::Stage2LookUp::getTe().
Fault gem5::MMU::getTE | ( | TlbEntry ** | te, |
const RequestPtr & | req, | ||
ThreadContext * | tc, | ||
Mode | mode, | ||
Translation * | translation, | ||
bool | timing, | ||
bool | functional, | ||
bool | is_secure, | ||
ArmTranslationType | tran_type, | ||
CachedState & | state ) |
Definition at line 1411 of file mmu.cc.
References DPRINTF, gem5::BaseMMU::Execute, getTableWalker(), isCompleteTranslation(), lookup(), gem5::ArmISA::mode, gem5::NoFault, gem5::ArmISA::MMU::Stats::prefetchFaults, gem5::ArmISA::ArmFault::PrefetchTLBMiss, purifyTaggedAddr(), state, stats, gem5::ArmISA::te, updateMiscReg(), gem5::MipsISA::vaddr, gem5::ArmISA::TLB::vmid, and gem5::ArmISA::TableWalker::walk().
|
protected |
Definition at line 138 of file mmu.cc.
References dtbStage2, gem5::BaseMMU::Execute, getDTBPtr(), getITBPtr(), itbStage2, and gem5::ArmISA::mode.
Referenced by lookup(), and translateFunctional().
|
static |
Definition at line 726 of file mmu.cc.
References gem5::ArmISA::EL10, and gem5::ArmISA::EL20.
Referenced by gem5::ArmISA::TableWalker::LongDescriptor::global(), gem5::ArmISA::TableWalker::insertPartialTableEntry(), s1PermBits64(), gem5::TlbiOp64::tlbiRva(), and gem5::TlbiOp64::tlbiVa().
|
inline |
Definition at line 384 of file mmu.hh.
References _hasWalkCache.
Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().
|
inline |
Definition at line 338 of file mmu.hh.
References flush(), gem5::BaseMMU::instruction, gem5::ArmISA::tlb, and gem5::BaseMMU::unified.
Referenced by gem5::ArmISA::ITLBIALL::operator()(), gem5::ArmISA::ITLBIASID::operator()(), and gem5::ArmISA::ITLBIMVA::operator()().
|
overridevirtual |
Called at init time, this method is traversing the TLB hierarchy and pupulating the instruction/data/unified containers accordingly.
Reimplemented from gem5::BaseMMU.
Definition at line 93 of file mmu.cc.
References _hasWalkCache, checkWalkCache(), dtbStage2, dtbStage2Walker, dtbWalker, getDTBPtr(), getITBPtr(), gem5::BaseMMU::init(), itbStage2, itbStage2Walker, itbWalker, gem5::ArmISA::TableWalker::setMmu(), and gem5::ArmISA::TLB::setTableWalker().
void gem5::MMU::invalidateMiscReg | ( | ) |
Definition at line 196 of file mmu.cc.
References gem5::ArmISA::MMU::CachedState::computeAddrTop, gem5::ArmISA::MMU::CachedState::miscRegValid, s1State, and s2State.
Referenced by gem5::ArmISA::ISA::clear(), and gem5::ArmISA::ISA::setMiscReg().
|
protected |
Definition at line 1545 of file mmu.cc.
References gem5::ArmISA::TlbEntry::partial.
Referenced by getResultTe(), getTE(), and translateMmuOn().
TlbEntry * gem5::MMU::lookup | ( | Addr | vpn, |
uint16_t | asn, | ||
vmid_t | vmid, | ||
bool | secure, | ||
bool | functional, | ||
bool | ignore_asn, | ||
TranslationRegime | target_regime, | ||
bool | stage2, | ||
BaseMMU::Mode | mode ) |
Lookup an entry in the TLB.
vpn | virtual address |
asn | context id/address space id to use |
vmid | The virtual machine ID used for stage 2 translation |
secure | if the lookup is secure |
functional | if the lookup should modify state |
ignore_asn | if on lookup asn should be ignored |
target_regime | selecting the translation regime |
mode | to differentiate between read/writes/fetches. |
Definition at line 1390 of file mmu.cc.
References gem5::ArmISA::asid, gem5::ArmISA::TlbEntry::Lookup::asn, gem5::ArmISA::TlbEntry::Lookup::functional, getTlb(), gem5::ArmISA::TlbEntry::Lookup::ignoreAsn, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::Lookup::mode, gem5::ArmISA::TlbEntry::Lookup::secure, gem5::ArmISA::TlbEntry::Lookup::targetRegime, gem5::ArmISA::tlb, gem5::ArmISA::TlbEntry::Lookup::va, gem5::ArmISA::va, and gem5::ArmISA::TlbEntry::Lookup::vmid.
Referenced by getTE().
|
protected |
Definition at line 792 of file mmu.cc.
References gem5::bits(), gem5::ArmISA::el, gem5::ArmISA::maskTaggedAddr(), and state.
Referenced by checkPermissions64(), getTE(), translateFs(), and translateSe().
|
inline |
Definition at line 382 of file mmu.hh.
References _release.
Referenced by gem5::ArmISA::TableWalker::setMmu().
|
protected |
Definition at line 643 of file mmu.cc.
References gem5::bits(), DPRINTF, gem5::ArmISA::EL10, gem5::ArmISA::EL3, faultPAN(), hasUnprivRegime(), gem5::ArmSystem::haveEL(), gem5::ArmISA::mode, gem5::PowerISA::pr, gem5::MipsISA::px, gem5::MipsISA::r, state, gem5::ArmISA::te, UserMode, gem5::ArmISA::uw, gem5::MipsISA::ux, gem5::MipsISA::w, gem5::ArmISA::wxn, and gem5::RiscvISA::x.
Referenced by checkPermissions64().
|
protected |
Definition at line 603 of file mmu.cc.
References DPRINTF, gem5::ArmISA::EL2, gem5::ArmISA::EL3, gem5::ArmSystem::haveEL(), panic, gem5::MipsISA::r, state, gem5::ArmISA::te, gem5::MipsISA::w, and gem5::RiscvISA::x.
Referenced by checkPermissions64().
|
inline |
Accessor functions for memory attributes for last accessed TLB entry.
Definition at line 377 of file mmu.hh.
References _attr, and gem5::ArmISA::attr.
Referenced by translateMmuOff(), and translateMmuOn().
void gem5::MMU::setTestInterface | ( | SimObject * | ti | ) |
Definition at line 1565 of file mmu.cc.
References dtbStage2Walker, dtbWalker, fatal_if, itbStage2Walker, itbWalker, gem5::Named::name(), gem5::ArmISA::TableWalker::setTestInterface(), and gem5::MipsISA::ti.
|
overridevirtual |
Reimplemented from gem5::BaseMMU.
Definition at line 1551 of file mmu.cc.
References _attr, s1State, s2State, and gem5::BaseMMU::takeOverFrom().
|
protected |
Definition at line 204 of file mmu.cc.
References gem5::ArmISA::domain, gem5::BaseMMU::Execute, finalizePhysical(), gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::NoAccess, gem5::NoFault, state, gem5::ArmISA::mpam::tagRequest(), gem5::ArmISA::te, and testTranslation().
Referenced by translateMmuOff(), and translateMmuOn().
Fault gem5::MMU::testTranslation | ( | const RequestPtr & | req, |
Mode | mode, | ||
TlbEntry::DomainType | domain, | ||
CachedState & | state ) const |
Definition at line 1581 of file mmu.cc.
References gem5::ArmISA::domain, gem5::ArmISA::mode, gem5::NoFault, and state.
Referenced by testAndFinalize().
Fault gem5::MMU::translateAtomic | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
BaseMMU::Mode | mode, | ||
ArmTranslationType | tran_type, | ||
bool | stage2 ) |
Definition at line 1039 of file mmu.cc.
References gem5::FullSystem, gem5::ArmISA::mode, state, translateFs(), translateSe(), and updateMiscReg().
|
inlineoverridevirtual |
Reimplemented from gem5::BaseMMU.
Definition at line 245 of file mmu.hh.
References gem5::ArmISA::mode, NormalTran, and translateAtomic().
Referenced by gem5::ArmISA::TableWalker::readDataUntimed(), gem5::trace::TarmacParserRecord::readMemNoEffect(), translateAtomic(), and translateAtomic().
Fault gem5::MMU::translateAtomic | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Mode | mode, | ||
ArmTranslationType | tran_type ) |
Definition at line 1032 of file mmu.cc.
References gem5::ArmISA::mode, and translateAtomic().
Fault gem5::MMU::translateComplete | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Translation * | translation, | ||
Mode | mode, | ||
ArmTranslationType | tran_type, | ||
bool | call_from_s2 ) |
Definition at line 1099 of file mmu.cc.
References gem5::ArmISA::mode, s1State, and translateComplete().
Referenced by gem5::ArmISA::Stage2LookUp::finish(), translateComplete(), and translateTiming().
Fault gem5::MMU::translateComplete | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Translation * | translation, | ||
Mode | mode, | ||
ArmTranslationType | tran_type, | ||
bool | call_from_s2, | ||
CachedState & | state ) |
Definition at line 1108 of file mmu.cc.
References DPRINTF, gem5::BaseMMU::Translation::finish(), gem5::FullSystem, gem5::BaseMMU::Translation::markDelayed(), gem5::ArmISA::mode, gem5::NoFault, state, translateFs(), and translateSe().
Fault gem5::MMU::translateFs | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Mode | mode, | ||
Translation * | translation, | ||
bool & | delay, | ||
bool | timing, | ||
ArmTranslationType | tran_type, | ||
bool | functional, | ||
CachedState & | state ) |
Definition at line 946 of file mmu.cc.
References gem5::ArmISA::MMU::Stats::alignFaults, gem5::ArmISA::ArmFault::AlignmentFault, AlignmentMask, AllowUnaligned, DPRINTF, gem5::BaseMMU::Execute, flags, gem5::ArmISA::ISA::getSelfDebug(), gem5::ArmISA::HaveExt(), gem5::ArmISA::TLB::isStage2, gem5::ArmISA::longDescFormatInUse(), gem5::ArmISA::ArmFault::LpaeTran, gem5::ArmISA::mask, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::NoAccess, gem5::NoFault, purifyTaggedAddr(), S1S2NsTran, gem5::ArmISA::sd, state, stats, gem5::Request::STRICT_ORDER, translateMmuOff(), translateMmuOn(), gem5::Request::UNCACHEABLE, UserMode, gem5::MipsISA::vaddr, gem5::ArmISA::vm, gem5::ArmISA::ArmFault::VmsaTran, and gem5::BaseMMU::Write.
Referenced by translateAtomic(), translateComplete(), and translateFunctional().
|
inlineoverridevirtual |
Returns a translation generator for a region of virtual addresses, instead of directly translating a specific address.
Implements gem5::BaseMMU.
Definition at line 91 of file mmu.hh.
References flags, gem5::ArmISA::mode, and gem5::ArmISA::PageBytes.
Referenced by gem5::ArmISA::ISA::addressTranslation(), gem5::ArmISA::ISA::addressTranslation64(), gem5::ArmISA::TableWalker::readDataUntimed(), gem5::trace::TarmacTracerRecordV8::TraceInstEntryV8::TraceInstEntryV8(), gem5::trace::TarmacTracerRecordV8::TraceMemEntryV8::TraceMemEntryV8(), translateFunctional(), and translateFunctional().
|
overridevirtual |
Reimplemented from gem5::BaseMMU.
Definition at line 1056 of file mmu.cc.
References gem5::ArmISA::mode, NormalTran, and translateFunctional().
Fault gem5::MMU::translateFunctional | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
BaseMMU::Mode | mode, | ||
ArmTranslationType | tran_type ) |
Do a functional lookup on the TLB (for checker cpu) that behaves like a normal lookup without modifying any page table state.
Definition at line 1062 of file mmu.cc.
References gem5::ArmISA::mode, and translateFunctional().
Fault gem5::MMU::translateFunctional | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
BaseMMU::Mode | mode, | ||
ArmTranslationType | tran_type, | ||
bool | stage2 ) |
Definition at line 1069 of file mmu.cc.
References gem5::FullSystem, gem5::ArmISA::mode, state, translateFs(), translateSe(), and updateMiscReg().
bool gem5::MMU::translateFunctional | ( | ThreadContext * | tc, |
Addr | vaddr, | ||
Addr & | paddr ) |
Do a functional lookup on the TLB (for debugging) and don't modify any internal state.
tc | thread context to get the context id from |
vaddr | virtual address to translate |
pa | returned physical address |
Definition at line 170 of file mmu.cc.
References gem5::ArmISA::TlbEntry::Lookup::asn, gem5::ArmISA::e, gem5::ArmISA::TlbEntry::Lookup::functional, getTlb(), gem5::ArmISA::TlbEntry::Lookup::ignoreAsn, gem5::ArmISA::TlbEntry::Lookup::mode, NormalTran, gem5::ArmISA::pa, gem5::ArmISA::TlbEntry::pAddr(), gem5::BaseMMU::Read, gem5::ArmISA::TlbEntry::Lookup::secure, state, gem5::ArmISA::TlbEntry::Lookup::targetRegime, gem5::ArmISA::tlb, updateMiscReg(), gem5::ArmISA::TlbEntry::Lookup::va, gem5::ArmISA::va, and gem5::ArmISA::TlbEntry::Lookup::vmid.
Fault gem5::MMU::translateMmuOff | ( | ThreadContext * | tc, |
const RequestPtr & | req, | ||
Mode | mode, | ||
ArmTranslationType | tran_type, | ||
Addr | vaddr, | ||
bool | long_desc_format, | ||
CachedState & | state ) |
Definition at line 805 of file mmu.cc.
References gem5::ArmISA::ArmFault::AddressSizeLL, gem5::ArmISA::TlbEntry::attributes, gem5::bits(), gem5::ArmISA::computeAddrTop(), gem5::ArmISA::currEL(), gem5::ArmISA::dc, DPRINTF, gem5::ArmISA::EL2, gem5::BaseMMU::Execute, gem5::ArmISA::f, gem5::ArmISA::HaveExt(), gem5::ArmISA::TlbEntry::innerAttrs, gem5::ArmISA::ArmFault::LpaeTran, gem5::ArmISA::MISCREG_TCR_EL1, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::mtype, gem5::ArmISA::TlbEntry::NoAccess, gem5::ArmISA::TlbEntry::Normal, gem5::ArmISA::TlbEntry::ns, gem5::ArmISA::TlbEntry::outerAttrs, gem5::ArmISA::TlbEntry::outerShareable, physAddrRange, gem5::ThreadContext::readMiscReg(), gem5::Request::SECURE, setAttr(), gem5::ArmISA::TlbEntry::setAttributes(), gem5::ArmISA::TlbEntry::shareable, state, gem5::Request::STRICT_ORDER, gem5::ArmISA::TlbEntry::StronglyOrdered, testAndFinalize(), gem5::Request::UNCACHEABLE, gem5::MipsISA::vaddr, and gem5::BaseMMU::Write.
Referenced by translateFs().
Fault gem5::MMU::translateMmuOn | ( | ThreadContext * | tc, |
const RequestPtr & | req, | ||
Mode | mode, | ||
Translation * | translation, | ||
bool & | delay, | ||
bool | timing, | ||
bool | functional, | ||
Addr | vaddr, | ||
ArmFault::TranMethod | tranMethod, | ||
CachedState & | state ) |
Definition at line 879 of file mmu.cc.
References gem5::ArmISA::MMU::Stats::alignFaults, gem5::ArmISA::ArmFault::AlignmentFault, AlignmentMask, DPRINTF, gem5::BaseMMU::Execute, flags, getResultTe(), isCompleteTranslation(), gem5::ArmISA::mask, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::NoAccess, gem5::NoFault, gem5::ArmISA::TlbEntry::Normal, gem5::ArmISA::pa, gem5::Request::SECURE, setAttr(), state, stats, gem5::Request::STRICT_ORDER, gem5::ArmISA::te, testAndFinalize(), gem5::Request::UNCACHEABLE, gem5::MipsISA::vaddr, and gem5::BaseMMU::Write.
Referenced by translateFs().
Fault gem5::MMU::translateSe | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Mode | mode, | ||
Translation * | translation, | ||
bool & | delay, | ||
bool | timing, | ||
CachedState & | state ) |
Definition at line 256 of file mmu.cc.
References gem5::ArmISA::ArmFault::AlignmentFault, AlignmentMask, AllowUnaligned, gem5::BaseMMU::Execute, finalizePhysical(), flags, gem5::ThreadContext::getProcessPtr(), gem5::ArmISA::mask, gem5::ArmISA::mode, gem5::ArmISA::TlbEntry::NoAccess, NormalTran, gem5::MipsISA::p, purifyTaggedAddr(), state, gem5::Request::UNCACHEABLE, gem5::EmulationPageTable::Uncacheable, updateMiscReg(), gem5::MipsISA::vaddr, gem5::ArmISA::ArmFault::VmsaTran, and gem5::BaseMMU::Write.
Referenced by translateAtomic(), translateComplete(), and translateFunctional().
void gem5::ArmISA::MMU::translateTiming | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
BaseMMU::Translation * | translation, | ||
BaseMMU::Mode | mode, | ||
bool | stage2 ) |
|
inlineoverridevirtual |
Reimplemented from gem5::BaseMMU.
Definition at line 256 of file mmu.hh.
References gem5::ArmISA::mode, NormalTran, and translateTiming().
Referenced by gem5::ArmISA::TableWalker::doL2DescriptorWrapper(), gem5::ArmISA::TableWalker::doLongDescriptorWrapper(), and translateTiming().
void gem5::MMU::translateTiming | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Translation * | translation, | ||
Mode | mode, | ||
ArmTranslationType | tran_type, | ||
bool | stage2 ) |
Definition at line 1086 of file mmu.cc.
References gem5::ArmISA::mode, state, translateComplete(), and updateMiscReg().
|
static |
Determine the EL to use for the purpose of a translation given a specific translation type.
If the translation type doesn't specify an EL, we use the current EL.
Definition at line 1348 of file mmu.cc.
References gem5::ArmISA::currEL(), gem5::ArmISA::EL0, gem5::ArmISA::EL1, gem5::ArmISA::EL2, gem5::ArmISA::EL3, HypMode, NormalTran, panic, S12E0Tran, S12E1Tran, S1CTran, S1E0Tran, S1E1Tran, S1E2Tran, S1E3Tran, S1S2NsTran, and gem5::X86ISA::type.
Referenced by gem5::ArmISA::MMU::CachedState::updateMiscReg(), and gem5::ArmISA::TableWalker::walk().
|
protected |
Definition at line 1169 of file mmu.cc.
References gem5::ThreadContext::contextId(), gem5::BaseMMU::data, DPRINTF, dtbStage2, gem5::BaseMMU::instruction, itbStage2, miscRegContext, s1State, s2State, gem5::ArmISA::TLB::setVMID(), state, gem5::ArmISA::tlb, gem5::BaseMMU::unified, and gem5::ArmISA::MMU::CachedState::updateMiscReg().
Referenced by checkPermissions64(), getTE(), translateAtomic(), translateFunctional(), translateFunctional(), translateSe(), and translateTiming().
|
protected |
Definition at line 485 of file mmu.hh.
Referenced by getAttr(), setAttr(), and takeOverFrom().
|
protected |
Definition at line 494 of file mmu.hh.
Referenced by hasWalkCache(), and init().
|
protected |
|
protected |
Definition at line 82 of file mmu.hh.
Referenced by flushAll(), flushStage2(), getTlb(), init(), and updateMiscReg().
|
protected |
Definition at line 87 of file mmu.hh.
Referenced by getTableWalker(), init(), and setTestInterface().
|
protected |
Definition at line 85 of file mmu.hh.
Referenced by getTableWalker(), init(), and setTestInterface().
|
protected |
|
protected |
Definition at line 81 of file mmu.hh.
Referenced by flushAll(), flushStage2(), getTlb(), init(), and updateMiscReg().
|
protected |
Definition at line 86 of file mmu.hh.
Referenced by getTableWalker(), init(), and setTestInterface().
|
protected |
Definition at line 84 of file mmu.hh.
Referenced by getTableWalker(), init(), and setTestInterface().
|
protected |
Definition at line 492 of file mmu.hh.
Referenced by finalizePhysical(), and MMU().
|
protected |
Definition at line 479 of file mmu.hh.
Referenced by updateMiscReg().
|
protected |
Definition at line 490 of file mmu.hh.
Referenced by MMU(), and translateMmuOff().
CachedState gem5::ArmISA::MMU::s1State |
Definition at line 482 of file mmu.hh.
Referenced by checkPermissions(), checkPermissions64(), drainResume(), getTE(), invalidateMiscReg(), takeOverFrom(), translateComplete(), and updateMiscReg().
CachedState gem5::ArmISA::MMU::s2State |
Definition at line 482 of file mmu.hh.
Referenced by checkPermissions(), checkPermissions64(), drainResume(), getTE(), invalidateMiscReg(), takeOverFrom(), and updateMiscReg().
|
protected |
Referenced by checkPermissions(), checkPermissions64(), getTE(), translateFs(), and translateMmuOn().
TlbTestInterface* gem5::ArmISA::MMU::test |