gem5 v24.1.0.1
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
gem5::ArmISA::MMU Class Reference

#include <mmu.hh>

Inheritance diagram for gem5::ArmISA::MMU:
gem5::BaseMMU gem5::SimObject gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named

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, TranMethod tran_method, 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)
 
Addr getValidAddr (Addr vaddr, ThreadContext *tc, Mode mode) override
 
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 ()
 
void flush (const TLBIOp &tlbi_op)
 
void flushStage1 (const TLBIOp &tlbi_op)
 
void flushStage2 (const TLBIOp &tlbi_op)
 
void iflush (const TLBIOp &tlbi_op)
 
void dflush (const TLBIOp &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 ArmReleaserelease () const
 
bool hasWalkCache () const
 
TlbEntrylookup (Addr vpn, uint16_t asn, vmid_t vmid, SecurityState ss, 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, SecurityState ss, PASpace ipaspace, ArmTranslationType tran_type, bool stage2)
 
Fault getTE (TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, SecurityState ss, PASpace ipaspace, 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, DomainType domain, CachedState &state) const
 
virtual Fault translateFunctional (const RequestPtr &req, ThreadContext *tc, Mode mode)
 
virtual TranslationGenPtr translateFunctional (Addr start, Addr size, ThreadContext *tc, BaseMMU::Mode mode, Request::Flags flags)=0
 Returns a translation generator for a region of virtual addresses, instead of directly translating a specific address.
 
- Public Member Functions inherited from gem5::BaseMMU
virtual void reset ()
 
void demapPage (Addr vaddr, uint64_t asn)
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () 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.
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object.
 
virtual PortgetPort (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
EventQueueeventQueue () 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 InforesolveStat (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 (const Group &)=delete
 
Groupoperator= (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 SimObjectfind (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 SimObjectResolvergetSimObjectResolver ()
 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

TlbTestInterfacetest
 
CachedState s1State
 
CachedState s2State
 
- Public Attributes inherited from gem5::BaseMMU
BaseTLBdtb
 
BaseTLBitb
 

Protected Types

using LookupLevel = enums::ArmLookupLevel
 
- Protected Types inherited from gem5::BaseMMU
typedef BaseMMUParams Params
 

Protected Member Functions

ArmISA::TLBgetDTBPtr () const
 
ArmISA::TLBgetITBPtr () const
 
TLBgetTlb (BaseMMU::Mode mode, bool stage2) const
 
TableWalkergetTableWalker (BaseMMU::Mode mode, bool stage2) const
 
Addr purifyTaggedAddr (Addr vaddr_tainted, ThreadContext *tc, ExceptionLevel el, TCR tcr, bool is_inst, CachedState &state)
 
bool checkPAN (ThreadContext *tc, uint8_t ap, const RequestPtr &req, Mode mode, const bool is_priv, CachedState &state)
 
bool faultPAN (ThreadContext *tc, uint8_t ap, const RequestPtr &req, Mode mode, const bool is_priv, CachedState &state)
 
std::pair< bool, bool > s1PermBits64 (TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc, CachedState &state, bool r, bool w, bool x)
 
std::pair< bool, bool > s2PermBits64 (TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc, CachedState &state, bool r, bool w, bool x)
 
bool checkWalkCache () const
 
bool isCompleteTranslation (TlbEntry *te) const
 
CachedStateupdateMiscReg (ThreadContext *tc, ArmTranslationType tran_type, bool stage2)
 
Fault testAndFinalize (const RequestPtr &req, ThreadContext *tc, Mode mode, TlbEntry *te, CachedState &state) const
 
- Protected Member Functions inherited from gem5::BaseMMU
 BaseMMU (const Params &p)
 
BaseTLBgetTlb (Mode mode) const
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained.
 

Protected Attributes

TLBitbStage2
 
TLBdtbStage2
 
TableWalkeritbWalker
 
TableWalkerdtbWalker
 
TableWalkeritbStage2Walker
 
TableWalkerdtbStage2Walker
 
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
EventQueueeventq
 A pointer to this object's event queue.
 

Detailed Description

Definition at line 64 of file mmu.hh.

Member Typedef Documentation

◆ LookupLevel

using gem5::ArmISA::MMU::LookupLevel = enums::ArmLookupLevel
protected

Definition at line 67 of file mmu.hh.

Member Enumeration Documentation

◆ ArmFlags

Enumerator
AlignmentMask 
AlignByte 
AlignHalfWord 
AlignWord 
AlignDoubleWord 
AlignQuadWord 
AlignOctWord 
AllowUnaligned 
UserMode 

Definition at line 93 of file mmu.hh.

◆ ArmTranslationType

Enumerator
NormalTran 
S1CTran 
HypMode 
S1S2NsTran 
S1E0Tran 
S1E1Tran 
S1E2Tran 
S1E3Tran 
S12E0Tran 
S12E1Tran 

Definition at line 109 of file mmu.hh.

Constructor & Destructor Documentation

◆ MMU()

gem5::MMU::MMU ( const ArmMMUParams &  p)

Member Function Documentation

◆ checkPAN()

bool gem5::MMU::checkPAN ( ThreadContext tc,
uint8_t  ap,
const RequestPtr req,
Mode  mode,
const bool  is_priv,
CachedState state 
)
protected

◆ checkPermissions() [1/2]

Fault gem5::MMU::checkPermissions ( TlbEntry te,
const RequestPtr req,
Mode  mode,
bool  stage2 
)

◆ checkPermissions() [2/2]

Fault gem5::MMU::checkPermissions ( TlbEntry te,
const RequestPtr req,
Mode  mode,
CachedState state 
)

◆ checkPermissions64() [1/2]

Fault gem5::MMU::checkPermissions64 ( TlbEntry te,
const RequestPtr req,
Mode  mode,
ThreadContext tc,
bool  stage2 
)

◆ checkPermissions64() [2/2]

Fault gem5::MMU::checkPermissions64 ( TlbEntry te,
const RequestPtr req,
Mode  mode,
ThreadContext tc,
CachedState state 
)

◆ checkWalkCache()

bool gem5::MMU::checkWalkCache ( ) const
protected

◆ dflush()

void gem5::MMU::dflush ( const TLBIOp tlbi_op)

◆ drainResume()

void gem5::MMU::drainResume ( )
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.

◆ faultPAN()

bool gem5::MMU::faultPAN ( ThreadContext tc,
uint8_t  ap,
const RequestPtr req,
Mode  mode,
const bool  is_priv,
CachedState state 
)
protected

◆ finalizePhysical()

Fault gem5::MMU::finalizePhysical ( const RequestPtr req,
ThreadContext tc,
Mode  mode 
) const
overridevirtual

◆ flush()

void gem5::MMU::flush ( const TLBIOp tlbi_op)

◆ flushAll()

void gem5::MMU::flushAll ( )
overridevirtual

Reimplemented from gem5::BaseMMU.

Definition at line 271 of file mmu.cc.

References dtbStage2, gem5::BaseMMU::flushAll(), gem5::ArmISA::TLB::flushAll(), and itbStage2.

◆ flushStage1()

void gem5::MMU::flushStage1 ( const TLBIOp tlbi_op)

◆ flushStage2()

void gem5::MMU::flushStage2 ( const TLBIOp tlbi_op)

Definition at line 242 of file mmu.cc.

References dtbStage2, gem5::ArmISA::TLB::flush(), and itbStage2.

Referenced by flush(), and gem5::ArmISA::TLBIIPA::operator()().

◆ getAttr()

uint64_t gem5::ArmISA::MMU::getAttr ( ) const
inline

Definition at line 306 of file mmu.hh.

References _attr.

Referenced by gem5::ArmISA::ISA::addressTranslation(), and gem5::AtOp64::addressTranslation64().

◆ getDTBPtr()

ArmISA::TLB * gem5::MMU::getDTBPtr ( ) const
protected

Definition at line 138 of file mmu.cc.

References gem5::BaseMMU::dtb.

Referenced by getTlb(), and init().

◆ getITBPtr()

ArmISA::TLB * gem5::MMU::getITBPtr ( ) const
protected

Definition at line 144 of file mmu.cc.

References gem5::BaseMMU::itb.

Referenced by getTlb(), and init().

◆ getResultTe()

Fault gem5::MMU::getResultTe ( TlbEntry **  te,
const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool  timing,
bool  functional,
TlbEntry mergeTe,
CachedState state 
)

◆ getTableWalker()

TableWalker * gem5::MMU::getTableWalker ( BaseMMU::Mode  mode,
bool  stage2 
) const
protected

Definition at line 166 of file mmu.cc.

References dtbStage2Walker, dtbWalker, gem5::BaseMMU::Execute, itbStage2Walker, itbWalker, and gem5::ArmISA::mode.

Referenced by getTE().

◆ getTE() [1/2]

Fault gem5::MMU::getTE ( TlbEntry **  te,
const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool  timing,
bool  functional,
SecurityState  ss,
PASpace  ipaspace,
ArmTranslationType  tran_type,
bool  stage2 
)

◆ getTE() [2/2]

Fault gem5::MMU::getTE ( TlbEntry **  te,
const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool  timing,
bool  functional,
SecurityState  ss,
PASpace  ipaspace,
ArmTranslationType  tran_type,
CachedState state 
)

◆ getTlb()

TLB * gem5::MMU::getTlb ( BaseMMU::Mode  mode,
bool  stage2 
) const
protected

Definition at line 150 of file mmu.cc.

References dtbStage2, gem5::BaseMMU::Execute, getDTBPtr(), getITBPtr(), itbStage2, and gem5::ArmISA::mode.

Referenced by lookup(), and translateFunctional().

◆ getValidAddr()

Addr gem5::MMU::getValidAddr ( Addr  vaddr,
ThreadContext tc,
Mode  mode 
)
overridevirtual

◆ hasUnprivRegime()

bool gem5::MMU::hasUnprivRegime ( TranslationRegime  regime)
static

◆ hasWalkCache()

bool gem5::ArmISA::MMU::hasWalkCache ( ) const
inline

Definition at line 321 of file mmu.hh.

References _hasWalkCache.

Referenced by gem5::ArmISA::TableWalker::doLongDescriptor().

◆ iflush()

void gem5::MMU::iflush ( const TLBIOp tlbi_op)

◆ init()

void gem5::MMU::init ( )
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().

◆ invalidateMiscReg()

void gem5::MMU::invalidateMiscReg ( )

◆ isCompleteTranslation()

bool gem5::MMU::isCompleteTranslation ( TlbEntry te) const
protected

Definition at line 1643 of file mmu.cc.

References gem5::ArmISA::TlbEntry::partial.

Referenced by getResultTe(), getTE(), and translateMmuOn().

◆ lookup()

TlbEntry * gem5::MMU::lookup ( Addr  vpn,
uint16_t  asn,
vmid_t  vmid,
SecurityState  ss,
bool  functional,
bool  ignore_asn,
TranslationRegime  target_regime,
bool  stage2,
BaseMMU::Mode  mode 
)

Lookup an entry in the TLB.

Parameters
vpnvirtual address
asncontext id/address space id to use
vmidThe virtual machine ID used for stage 2 translation
sssecurity state of the PE
functionalif the lookup should modify state
ignore_asnif on lookup asn should be ignored
target_regimeselecting the translation regime
modeto differentiate between read/writes/fetches.
Returns
pointer to TLB entry if it exists

Definition at line 1483 of file mmu.cc.

References gem5::ArmISA::asid, gem5::ArmISA::TLBTypes::KeyType::asn, gem5::ArmISA::TLBTypes::KeyType::functional, getTlb(), gem5::ArmISA::TLBTypes::KeyType::ignoreAsn, gem5::ArmISA::TLBTypes::KeyType::mode, gem5::ArmISA::mode, gem5::ArmISA::TLBTypes::KeyType::ss, gem5::ArmISA::ss, gem5::ArmISA::TLBTypes::KeyType::targetRegime, gem5::ArmISA::tlb, gem5::ArmISA::TLBTypes::KeyType::va, gem5::ArmISA::va, and gem5::ArmISA::TLBTypes::KeyType::vmid.

Referenced by getTE(), and gem5::ArmISA::TableWalker::processWalkWrapper().

◆ purifyTaggedAddr()

Addr gem5::MMU::purifyTaggedAddr ( Addr  vaddr_tainted,
ThreadContext tc,
ExceptionLevel  el,
TCR  tcr,
bool  is_inst,
CachedState state 
)
protected

Definition at line 882 of file mmu.cc.

References gem5::bits(), gem5::ArmISA::el, gem5::ArmISA::maskTaggedAddr(), and state.

Referenced by getTE(), getValidAddr(), translateFs(), and translateSe().

◆ release()

const ArmRelease * gem5::ArmISA::MMU::release ( ) const
inline

Definition at line 319 of file mmu.hh.

References _release.

Referenced by gem5::ArmISA::TableWalker::setMmu().

◆ s1PermBits64()

std::pair< bool, bool > gem5::MMU::s1PermBits64 ( TlbEntry te,
const RequestPtr req,
Mode  mode,
ThreadContext tc,
CachedState state,
bool  r,
bool  w,
bool  x 
)
protected

◆ s2PermBits64()

std::pair< bool, bool > gem5::MMU::s2PermBits64 ( TlbEntry te,
const RequestPtr req,
Mode  mode,
ThreadContext tc,
CachedState state,
bool  r,
bool  w,
bool  x 
)
protected

◆ setAttr()

void gem5::ArmISA::MMU::setAttr ( uint64_t  attr)
inline

Accessor functions for memory attributes for last accessed TLB entry.

Definition at line 314 of file mmu.hh.

References _attr, and gem5::ArmISA::attr.

Referenced by translateMmuOff(), and translateMmuOn().

◆ setTestInterface()

void gem5::MMU::setTestInterface ( SimObject ti)

◆ takeOverFrom()

void gem5::MMU::takeOverFrom ( BaseMMU old_mmu)
overridevirtual

Reimplemented from gem5::BaseMMU.

Definition at line 1649 of file mmu.cc.

References _attr, s1State, s2State, and gem5::BaseMMU::takeOverFrom().

◆ testAndFinalize()

Fault gem5::MMU::testAndFinalize ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
TlbEntry te,
CachedState state 
) const
protected

◆ testTranslation()

Fault gem5::MMU::testTranslation ( const RequestPtr req,
Mode  mode,
DomainType  domain,
CachedState state 
) const

Definition at line 1679 of file mmu.cc.

References gem5::ArmISA::domain, gem5::ArmISA::mode, gem5::NoFault, and state.

Referenced by testAndFinalize().

◆ translateAtomic() [1/3]

Fault gem5::MMU::translateAtomic ( const RequestPtr req,
ThreadContext tc,
BaseMMU::Mode  mode,
ArmTranslationType  tran_type,
bool  stage2 
)

◆ translateAtomic() [2/3]

Fault gem5::ArmISA::MMU::translateAtomic ( const RequestPtr req,
ThreadContext tc,
Mode  mode 
)
inlineoverridevirtual

◆ translateAtomic() [3/3]

Fault gem5::MMU::translateAtomic ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
ArmTranslationType  tran_type 
)

Definition at line 1124 of file mmu.cc.

References gem5::ArmISA::mode, and translateAtomic().

◆ translateComplete() [1/2]

Fault gem5::MMU::translateComplete ( const RequestPtr req,
ThreadContext tc,
Translation translation,
Mode  mode,
ArmTranslationType  tran_type,
bool  call_from_s2 
)

◆ translateComplete() [2/2]

Fault gem5::MMU::translateComplete ( const RequestPtr req,
ThreadContext tc,
Translation translation,
Mode  mode,
ArmTranslationType  tran_type,
bool  call_from_s2,
CachedState state 
)

◆ translateFs()

Fault gem5::MMU::translateFs ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool &  delay,
bool  timing,
ArmTranslationType  tran_type,
bool  functional,
CachedState state 
)

◆ translateFunctional() [1/7]

virtual TranslationGenPtr gem5::BaseMMU::translateFunctional ( Addr  start,
Addr  size,
ThreadContext tc,
BaseMMU::Mode  mode,
Request::Flags  flags 
)
virtual

Returns a translation generator for a region of virtual addresses, instead of directly translating a specific address.

Implements gem5::BaseMMU.

◆ translateFunctional() [2/7]

TranslationGenPtr gem5::ArmISA::MMU::translateFunctional ( Addr  start,
Addr  size,
ThreadContext tc,
Mode  mode,
Request::Flags  flags 
)
inlineoverridevirtual

◆ translateFunctional() [3/7]

Fault gem5::MMU::translateFunctional ( const RequestPtr req,
ThreadContext tc,
BaseMMU::Mode  mode 
)
overridevirtual

Reimplemented from gem5::BaseMMU.

Definition at line 1148 of file mmu.cc.

References gem5::ArmISA::mode, NormalTran, and translateFunctional().

◆ translateFunctional() [4/7]

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 1154 of file mmu.cc.

References gem5::ArmISA::mode, and translateFunctional().

◆ translateFunctional() [5/7]

Fault gem5::MMU::translateFunctional ( const RequestPtr req,
ThreadContext tc,
BaseMMU::Mode  mode,
ArmTranslationType  tran_type,
bool  stage2 
)

◆ translateFunctional() [6/7]

Fault gem5::BaseMMU::translateFunctional ( const RequestPtr req,
ThreadContext tc,
BaseMMU::Mode  mode 
)
virtual

Reimplemented from gem5::BaseMMU.

Definition at line 125 of file mmu.cc.

◆ translateFunctional() [7/7]

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.

Parameters
tcthread context to get the context id from
vaddrvirtual address to translate
pareturned physical address
Returns
if the translation was successful

Definition at line 182 of file mmu.cc.

References gem5::ArmISA::TLBTypes::KeyType::asn, gem5::ArmISA::e, gem5::ArmISA::TLBTypes::KeyType::functional, getTlb(), gem5::ArmISA::TLBTypes::KeyType::ignoreAsn, gem5::ArmISA::TLBTypes::KeyType::mode, NormalTran, gem5::ArmISA::pa, gem5::ArmISA::TlbEntry::pAddr(), gem5::BaseMMU::Read, gem5::ArmISA::TLBTypes::KeyType::ss, state, gem5::ArmISA::TLBTypes::KeyType::targetRegime, gem5::ArmISA::tlb, updateMiscReg(), gem5::ArmISA::TLBTypes::KeyType::va, gem5::ArmISA::va, and gem5::ArmISA::TLBTypes::KeyType::vmid.

◆ translateMmuOff()

Fault gem5::MMU::translateMmuOff ( ThreadContext tc,
const RequestPtr req,
Mode  mode,
ArmTranslationType  tran_type,
Addr  vaddr,
bool  long_desc_format,
CachedState state 
)

◆ translateMmuOn()

Fault gem5::MMU::translateMmuOn ( ThreadContext tc,
const RequestPtr req,
Mode  mode,
Translation translation,
bool &  delay,
bool  timing,
bool  functional,
Addr  vaddr,
TranMethod  tran_method,
CachedState state 
)

◆ translateSe()

Fault gem5::MMU::translateSe ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool &  delay,
bool  timing,
CachedState state 
)

◆ translateTiming() [1/3]

void gem5::ArmISA::MMU::translateTiming ( const RequestPtr req,
ThreadContext tc,
BaseMMU::Translation translation,
BaseMMU::Mode  mode,
bool  stage2 
)

References flush().

◆ translateTiming() [2/3]

void gem5::ArmISA::MMU::translateTiming ( const RequestPtr req,
ThreadContext tc,
Translation translation,
Mode  mode 
)
inlineoverridevirtual

◆ translateTiming() [3/3]

void gem5::MMU::translateTiming ( const RequestPtr req,
ThreadContext tc,
Translation translation,
Mode  mode,
ArmTranslationType  tran_type,
bool  stage2 
)

Definition at line 1178 of file mmu.cc.

References gem5::ArmISA::mode, state, translateComplete(), and updateMiscReg().

◆ tranTypeEL()

ExceptionLevel gem5::MMU::tranTypeEL ( CPSR  cpsr,
SCR  scr,
ArmTranslationType  type 
)
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 1441 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().

◆ updateMiscReg()

MMU::CachedState & gem5::MMU::updateMiscReg ( ThreadContext tc,
ArmTranslationType  tran_type,
bool  stage2 
)
protected

Member Data Documentation

◆ _attr

uint64_t gem5::ArmISA::MMU::_attr
protected

Definition at line 424 of file mmu.hh.

Referenced by getAttr(), setAttr(), and takeOverFrom().

◆ _hasWalkCache

bool gem5::ArmISA::MMU::_hasWalkCache
protected

Definition at line 433 of file mmu.hh.

Referenced by hasWalkCache(), and init().

◆ _release

const ArmRelease* gem5::ArmISA::MMU::_release
protected

Definition at line 427 of file mmu.hh.

Referenced by checkPAN(), MMU(), and release().

◆ dtbStage2

TLB* gem5::ArmISA::MMU::dtbStage2
protected

Definition at line 77 of file mmu.hh.

Referenced by flushAll(), flushStage2(), getTlb(), init(), and updateMiscReg().

◆ dtbStage2Walker

TableWalker* gem5::ArmISA::MMU::dtbStage2Walker
protected

Definition at line 82 of file mmu.hh.

Referenced by getTableWalker(), init(), and setTestInterface().

◆ dtbWalker

TableWalker* gem5::ArmISA::MMU::dtbWalker
protected

Definition at line 80 of file mmu.hh.

Referenced by getTableWalker(), init(), and setTestInterface().

◆ haveLargeAsid64

bool gem5::ArmISA::MMU::haveLargeAsid64
protected

Definition at line 428 of file mmu.hh.

Referenced by MMU().

◆ itbStage2

TLB* gem5::ArmISA::MMU::itbStage2
protected

Definition at line 76 of file mmu.hh.

Referenced by flushAll(), flushStage2(), getTlb(), init(), and updateMiscReg().

◆ itbStage2Walker

TableWalker* gem5::ArmISA::MMU::itbStage2Walker
protected

Definition at line 81 of file mmu.hh.

Referenced by getTableWalker(), init(), and setTestInterface().

◆ itbWalker

TableWalker* gem5::ArmISA::MMU::itbWalker
protected

Definition at line 79 of file mmu.hh.

Referenced by getTableWalker(), init(), and setTestInterface().

◆ m5opRange

AddrRange gem5::ArmISA::MMU::m5opRange
protected

Definition at line 431 of file mmu.hh.

Referenced by finalizePhysical(), and MMU().

◆ miscRegContext

ContextID gem5::ArmISA::MMU::miscRegContext
protected

Definition at line 418 of file mmu.hh.

Referenced by updateMiscReg().

◆ physAddrRange

uint8_t gem5::ArmISA::MMU::physAddrRange
protected

Definition at line 429 of file mmu.hh.

Referenced by MMU(), and translateMmuOff().

◆ s1State

CachedState gem5::ArmISA::MMU::s1State

◆ s2State

CachedState gem5::ArmISA::MMU::s2State

◆ stats

gem5::ArmISA::MMU::Stats gem5::ArmISA::MMU::stats
protected

◆ test

TlbTestInterface* gem5::ArmISA::MMU::test

Definition at line 397 of file mmu.hh.


The documentation for this class was generated from the following files:

Generated on Mon Jan 13 2025 04:29:02 for gem5 by doxygen 1.9.8