gem5  v20.1.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ArmISA::TLB Class Reference

#include <tlb.hh>

Inheritance diagram for ArmISA::TLB:
BaseTLB SimObject EventManager Serializable Drainable Stats::Group

Classes

struct  TlbStats
 

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 BaseTLB
enum  Mode { Read, Write, Execute }
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 

Public Member Functions

 TLB (const ArmTLBParams *p)
 
 TLB (const Params *p, int _size, TableWalker *_walker)
 
TlbEntrylookup (Addr vpn, uint16_t asn, uint8_t vmid, bool hyp, bool secure, bool functional, bool ignore_asn, ExceptionLevel target_el, bool in_host)
 Lookup an entry in the TLB. More...
 
virtual ~TLB ()
 
void takeOverFrom (BaseTLB *otlb) override
 Take over from an old tlb context. More...
 
void init () override
 setup all the back pointers More...
 
void setTestInterface (SimObject *ti)
 
TableWalkergetTableWalker ()
 
void setMMU (Stage2MMU *m, RequestorID requestor_id)
 
int getsize () const
 
void insert (Addr vaddr, TlbEntry &pte)
 
Fault getTE (TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, bool is_secure, ArmTranslationType tranType)
 
Fault getResultTe (TlbEntry **te, const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, TlbEntry *mergeTe)
 
Fault checkPermissions (TlbEntry *te, const RequestPtr &req, Mode mode)
 
Fault checkPermissions64 (TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc)
 
bool checkPAN (ThreadContext *tc, uint8_t ap, const RequestPtr &req, Mode mode)
 
void flushAllSecurity (bool secure_lookup, ExceptionLevel target_el, bool ignore_el=false, bool in_host=false)
 Reset the entire TLB. More...
 
void flushAllNs (ExceptionLevel target_el, bool ignore_el=false)
 Remove all entries in the non secure world, depending on whether they were allocated in hyp mode or not. More...
 
void flushAll () override
 Reset the entire TLB. More...
 
void flushMvaAsid (Addr mva, uint64_t asn, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
 Remove any entries that match both a va and asn. More...
 
void flushAsid (uint64_t asn, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
 Remove any entries that match the asn. More...
 
void flushMva (Addr mva, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
 Remove all entries that match the va regardless of asn. More...
 
void flushIpaVmid (Addr ipa, bool secure_lookup, ExceptionLevel target_el)
 Invalidate all entries in the stage 2 TLB that match the given ipa and the current VMID. More...
 
Fault trickBoxCheck (const RequestPtr &req, Mode mode, TlbEntry::DomainType domain)
 
Fault walkTrickBoxCheck (Addr pa, bool is_secure, Addr va, Addr sz, bool is_exec, bool is_write, TlbEntry::DomainType domain, LookupLevel lookup_level)
 
void printTlb () const
 
void demapPage (Addr vaddr, uint64_t asn) override
 
bool translateFunctional (ThreadContext *tc, Addr vaddr, Addr &paddr)
 Do a functional lookup on the TLB (for debugging) and don't modify any internal state. More...
 
Fault translateFunctional (const RequestPtr &req, ThreadContext *tc, Mode mode, ArmTranslationType tranType)
 Do a functional lookup on the TLB (for checker cpu) that behaves like a normal lookup without modifying any page table state. More...
 
Fault translateFunctional (const RequestPtr &req, ThreadContext *tc, Mode mode) override
 
void setAttr (uint64_t attr)
 Accessor functions for memory attributes for last accessed TLB entry. More...
 
uint64_t getAttr () const
 
Fault translateMmuOff (ThreadContext *tc, const RequestPtr &req, Mode mode, TLB::ArmTranslationType tranType, Addr vaddr, bool long_desc_format)
 
Fault translateMmuOn (ThreadContext *tc, const RequestPtr &req, Mode mode, Translation *translation, bool &delay, bool timing, bool functional, Addr vaddr, ArmFault::TranMethod tranMethod)
 
Fault translateFs (const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing, ArmTranslationType tranType, bool functional=false)
 
Fault translateSe (const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing)
 
Fault translateAtomic (const RequestPtr &req, ThreadContext *tc, Mode mode, ArmTranslationType tranType)
 
Fault translateAtomic (const RequestPtr &req, ThreadContext *tc, Mode mode) override
 
void translateTiming (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType)
 
void translateTiming (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override
 
Fault translateComplete (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType, bool callFromS2)
 
Fault finalizePhysical (const RequestPtr &req, ThreadContext *tc, Mode mode) const override
 Do post-translation physical address finalization. More...
 
void drainResume () override
 Resume execution after a successful drain. More...
 
void regProbePoints () override
 Register probe points for this object. More...
 
PortgetTableWalkerPort () override
 Get the table walker port. More...
 
const Paramsparams () const
 
void invalidateMiscReg ()
 
Fault testTranslation (const RequestPtr &req, Mode mode, TlbEntry::DomainType domain)
 
Fault testWalk (Addr pa, Addr size, Addr va, bool is_secure, Mode mode, TlbEntry::DomainType domain, LookupLevel lookup_level)
 
- Public Member Functions inherited from BaseTLB
void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
- Public Member Functions inherited from SimObject
const Paramsparams () const
 
 SimObject (const Params *_params)
 
virtual ~SimObject ()
 
virtual const std::string name () const
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint. More...
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint. More...
 
virtual void regProbeListeners ()
 Register probe listeners for this object. More...
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object. More...
 
virtual PortgetPort (const std::string &if_name, PortID idx=InvalidPortID)
 Get a port with a given name and index. More...
 
virtual void startup ()
 startup() is the final initialization call before simulation. More...
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining. More...
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from 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. More...
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue. More...
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 
- Public Member Functions inherited from Stats::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group. More...
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters. More...
 
virtual void resetStats ()
 Callback to reset stats. More...
 
virtual void preDumpStats ()
 Callback before stats are dumped. More...
 
void addStat (Stats::Info *info)
 Register a stat with this group. More...
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object. More...
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object. More...
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block. More...
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 

Static Public Member Functions

static ExceptionLevel tranTypeEL (CPSR cpsr, ArmTranslationType type)
 Determine the EL to use for the purpose of a translation given a specific translation type. More...
 
- Static Public Member Functions inherited from SimObject
static void serializeAll (CheckpointOut &cp)
 Serialize all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 Serializes all the SimObjects. More...
 
static void unserializeGlobals (CheckpointIn &cp)
 

Protected Member Functions

void updateMiscReg (ThreadContext *tc, ArmTranslationType tranType=NormalTran)
 
- Protected Member Functions inherited from BaseTLB
 BaseTLB (const Params *p)
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained. More...
 

Protected Attributes

TlbEntrytable
 
int size
 
bool isStage2
 
bool stage2Req
 
bool stage2DescReq
 
uint64_t _attr
 
bool directToStage2
 
TableWalkertableWalker
 
TLBstage2Tlb
 
Stage2MMUstage2Mmu
 
TlbTestInterfacetest
 
ArmISA::TLB::TlbStats stats
 
ProbePoints::PMUUPtr ppRefills
 PMU probe for TLB refills. More...
 
int rangeMRU
 
CPSR cpsr
 
bool aarch64
 
ExceptionLevel aarch64EL
 
SCTLR sctlr
 
SCR scr
 
bool isPriv
 
bool isSecure
 
bool isHyp
 
TTBCR ttbcr
 
uint16_t asid
 
uint8_t vmid
 
PRRR prrr
 
NMRR nmrr
 
HCR hcr
 
uint32_t dacr
 
bool miscRegValid
 
ContextID miscRegContext
 
ArmTranslationType curTranType
 
bool haveLPAE
 
bool haveVirtualization
 
bool haveLargeAsid64
 
AddrRange m5opRange
 
- Protected Attributes inherited from SimObject
const SimObjectParams * _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Private Member Functions

void _flushMva (Addr mva, uint64_t asn, bool secure_lookup, bool ignore_asn, ExceptionLevel target_el, bool in_host)
 Remove any entries that match both a va and asn. More...
 

Detailed Description

Definition at line 100 of file tlb.hh.

Member Enumeration Documentation

◆ ArmFlags

Enumerator
AlignmentMask 
AlignByte 
AlignHalfWord 
AlignWord 
AlignDoubleWord 
AlignQuadWord 
AlignOctWord 
AllowUnaligned 
UserMode 

Definition at line 103 of file tlb.hh.

◆ ArmTranslationType

Enumerator
NormalTran 
S1CTran 
HypMode 
S1S2NsTran 
S1E0Tran 
S1E1Tran 
S1E2Tran 
S1E3Tran 
S12E0Tran 
S12E1Tran 

Definition at line 118 of file tlb.hh.

Constructor & Destructor Documentation

◆ TLB() [1/2]

TLB::TLB ( const ArmTLBParams *  p)

◆ TLB() [2/2]

ArmISA::TLB::TLB ( const Params p,
int  _size,
TableWalker _walker 
)

◆ ~TLB()

TLB::~TLB ( )
virtual

Definition at line 97 of file tlb.cc.

References table.

Member Function Documentation

◆ _flushMva()

void TLB::_flushMva ( Addr  mva,
uint64_t  asn,
bool  secure_lookup,
bool  ignore_asn,
ExceptionLevel  target_el,
bool  in_host 
)
private

Remove any entries that match both a va and asn.

Parameters
mvavirtual address to flush
asncontextid/asn to flush on match
secure_lookupif the operation affects the secure world
ignore_asnif the flush should ignore the asn
in_hostif hcr.e2h == 1 and hcr.tge == 1 for VHE.

Definition at line 356 of file tlb.cc.

References DPRINTF, ArmISA::EL2, ArmISA::TLB::TlbStats::flushedEntries, lookup(), stats, ArmISA::te, and vmid.

Referenced by flushIpaVmid(), flushMva(), and flushMvaAsid().

◆ checkPAN()

bool TLB::checkPAN ( ThreadContext tc,
uint8_t  ap,
const RequestPtr req,
Mode  mode 
)

◆ checkPermissions()

Fault TLB::checkPermissions ( TlbEntry te,
const RequestPtr req,
Mode  mode 
)

◆ checkPermissions64()

Fault TLB::checkPermissions64 ( TlbEntry te,
const RequestPtr req,
Mode  mode,
ThreadContext tc 
)

◆ demapPage()

void ArmISA::TLB::demapPage ( Addr  vaddr,
uint64_t  asn 
)
inlineoverridevirtual

Implements BaseTLB.

Definition at line 311 of file tlb.hh.

References panic.

◆ drainResume()

void TLB::drainResume ( )
overridevirtual

Resume execution after a successful drain.

Reimplemented from Drainable.

Definition at line 386 of file tlb.cc.

References miscRegValid.

◆ finalizePhysical()

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

Do post-translation physical address finalization.

This method is used by some architectures that need post-translation massaging of physical addresses. For example, X86 uses this to remap physical addresses in the APIC range to a range of physical memory not normally available to real x86 implementations.

Parameters
reqRequest to updated in-place.
tcThread context that created the request.
modeRequest type (read/write/execute).
Returns
A fault on failure, NoFault otherwise.

Implements BaseTLB.

Definition at line 135 of file tlb.cc.

References AddrRange::contains(), PseudoInst::decodeAddrOffset(), m5opRange, ArmISA::mode, NoFault, BaseTLB::Read, Packet::setLE(), and AddrRange::start().

Referenced by translateMmuOn(), and translateSe().

◆ flushAll()

void ArmISA::TLB::flushAll ( )
inlineoverridevirtual

Reset the entire TLB.

Used for CPU switching to prevent stale translations after multiple switches

Implements BaseTLB.

Definition at line 265 of file tlb.hh.

References ArmISA::EL0, and flushAllSecurity().

◆ flushAllNs()

void TLB::flushAllNs ( ExceptionLevel  target_el,
bool  ignore_el = false 
)

Remove all entries in the non secure world, depending on whether they were allocated in hyp mode or not.

Definition at line 279 of file tlb.cc.

References DPRINTF, ArmISA::EL1, ArmISA::EL2, flushAllNs(), ArmISA::TLB::TlbStats::flushedEntries, ArmISA::TLB::TlbStats::flushTlb, isStage2, size, stage2Tlb, stats, table, ArmISA::te, and RiscvISA::x.

Referenced by flushAllNs(), and ArmISA::TLBIALLN::operator()().

◆ flushAllSecurity()

void TLB::flushAllSecurity ( bool  secure_lookup,
ExceptionLevel  target_el,
bool  ignore_el = false,
bool  in_host = false 
)

◆ flushAsid()

void TLB::flushAsid ( uint64_t  asn,
bool  secure_lookup,
ExceptionLevel  target_el,
bool  in_host = false 
)

Remove any entries that match the asn.

Parameters
asncontextid/asn to flush on match
secure_lookupif the operation affects the secure world

Definition at line 321 of file tlb.cc.

References DPRINTF, ArmISA::TLB::TlbStats::flushedEntries, ArmISA::TLB::TlbStats::flushTlbAsid, size, stats, table, ArmISA::te, vmid, and RiscvISA::x.

Referenced by ArmISA::TLBIASID::operator()(), ArmISA::ITLBIASID::operator()(), and ArmISA::DTLBIASID::operator()().

◆ flushIpaVmid()

void TLB::flushIpaVmid ( Addr  ipa,
bool  secure_lookup,
ExceptionLevel  target_el 
)

Invalidate all entries in the stage 2 TLB that match the given ipa and the current VMID.

Parameters
ipathe address to invalidate
secure_lookupif the operation affects the secure world

Definition at line 379 of file tlb.cc.

References _flushMva(), isStage2, and stage2Tlb.

Referenced by ArmISA::TLBIIPA::operator()().

◆ flushMva()

void TLB::flushMva ( Addr  mva,
bool  secure_lookup,
ExceptionLevel  target_el,
bool  in_host = false 
)

Remove all entries that match the va regardless of asn.

Parameters
mvaaddress to flush from cache
secure_lookupif the operation affects the secure world

Definition at line 346 of file tlb.cc.

References _flushMva(), DPRINTF, ArmISA::TLB::TlbStats::flushTlbMva, and stats.

Referenced by ArmISA::TLBIMVAA::operator()().

◆ flushMvaAsid()

void TLB::flushMvaAsid ( Addr  mva,
uint64_t  asn,
bool  secure_lookup,
ExceptionLevel  target_el,
bool  in_host = false 
)

Remove any entries that match both a va and asn.

Parameters
mvavirtual address to flush
asncontextid/asn to flush on match
secure_lookupif the operation affects the secure world

Definition at line 310 of file tlb.cc.

References _flushMva(), DPRINTF, ArmISA::TLB::TlbStats::flushTlbMvaAsid, and stats.

Referenced by ArmISA::TLBIMVA::operator()(), ArmISA::ITLBIMVA::operator()(), and ArmISA::DTLBIMVA::operator()().

◆ getAttr()

uint64_t ArmISA::TLB::getAttr ( ) const
inline

Definition at line 349 of file tlb.hh.

References _attr.

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

◆ getResultTe()

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

◆ getsize()

int ArmISA::TLB::getsize ( ) const
inline

Definition at line 229 of file tlb.hh.

References size.

◆ getTableWalker()

TableWalker* ArmISA::TLB::getTableWalker ( )
inline

Definition at line 225 of file tlb.hh.

References tableWalker.

◆ getTableWalkerPort()

Port * TLB::getTableWalkerPort ( )
overridevirtual

Get the table walker port.

This is used for migrating port connections during a CPU takeOverFrom() call. For architectures that do not have a table walker, NULL is returned, hence the use of a pointer rather than a reference. For ARM this method will always return a valid port pointer.

Returns
A pointer to the walker request port

Reimplemented from BaseTLB.

Definition at line 1252 of file tlb.cc.

References ArmISA::Stage2MMU::getDMAPort(), and stage2Mmu.

◆ getTE()

Fault TLB::getTE ( TlbEntry **  te,
const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool  timing,
bool  functional,
bool  is_secure,
TLB::ArmTranslationType  tranType 
)

◆ init()

void TLB::init ( )
overridevirtual

setup all the back pointers

Reimplemented from SimObject.

Definition at line 103 of file tlb.cc.

References isStage2, stage2Mmu, ArmISA::Stage2MMU::stage2Tlb(), and stage2Tlb.

◆ insert()

void TLB::insert ( Addr  vaddr,
TlbEntry pte 
)

◆ invalidateMiscReg()

void ArmISA::TLB::invalidateMiscReg ( )
inline

Definition at line 446 of file tlb.hh.

References miscRegValid.

Referenced by ArmISA::ISA::clear(), and ArmISA::ISA::setMiscReg().

◆ lookup()

TlbEntry * TLB::lookup ( Addr  vpn,
uint16_t  asn,
uint8_t  vmid,
bool  hyp,
bool  secure,
bool  functional,
bool  ignore_asn,
ExceptionLevel  target_el,
bool  in_host 
)

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
secureif the lookup is secure
hypif the lookup is done from hyp mode
functionalif the lookup should modify state
ignore_asnif on lookup asn should be ignored
Returns
pointer to TLB entry if it exists

Definition at line 159 of file tlb.cc.

References ArmISA::TlbEntry::ap, ArmISA::TlbEntry::asid, DPRINTF, ArmISA::TlbEntry::el, ArmISA::TlbEntry::global, ArmISA::i, ArmISA::TlbEntry::ns, ArmISA::TlbEntry::nstid, ArmISA::TlbEntry::pAddr(), ArmISA::TlbEntry::pfn, rangeMRU, ArmISA::TlbEntry::size, size, table, ArmISA::va, vmid, and RiscvISA::x.

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

◆ params()

const Params* ArmISA::TLB::params ( ) const
inline

Definition at line 442 of file tlb.hh.

References SimObject::_params.

◆ printTlb()

void TLB::printTlb ( ) const

Definition at line 234 of file tlb.cc.

References DPRINTF, size, table, ArmISA::te, and RiscvISA::x.

Referenced by getTE().

◆ regProbePoints()

void TLB::regProbePoints ( )
overridevirtual

Register probe points for this object.

No probe points by default, so do nothing in base.

Reimplemented from SimObject.

Definition at line 451 of file tlb.cc.

References SimObject::getProbeManager(), and ppRefills.

◆ setAttr()

void ArmISA::TLB::setAttr ( uint64_t  attr)
inline

Accessor functions for memory attributes for last accessed TLB entry.

Definition at line 343 of file tlb.hh.

References _attr, and ArmISA::attr.

Referenced by translateMmuOff(), and translateMmuOn().

◆ setMMU()

void TLB::setMMU ( Stage2MMU m,
RequestorID  requestor_id 
)

Definition at line 110 of file tlb.cc.

References ArmISA::m, ArmISA::TableWalker::setMMU(), stage2Mmu, and tableWalker.

Referenced by ArmISA::Stage2MMU::Stage2MMU().

◆ setTestInterface()

void TLB::setTestInterface ( SimObject ti)

Definition at line 1606 of file tlb.cc.

References fatal_if, SimObject::name(), and MipsISA::ti.

◆ takeOverFrom()

void TLB::takeOverFrom ( BaseTLB otlb)
overridevirtual

Take over from an old tlb context.

Implements BaseTLB.

Definition at line 394 of file tlb.cc.

References _attr, directToStage2, haveLPAE, isStage2, panic, stage2DescReq, stage2Req, stage2Tlb, and takeOverFrom().

Referenced by takeOverFrom().

◆ testTranslation()

Fault TLB::testTranslation ( const RequestPtr req,
Mode  mode,
TlbEntry::DomainType  domain 
)

Definition at line 1618 of file tlb.cc.

References ArmISA::domain, isPriv, ArmISA::mode, and NoFault.

Referenced by translateMmuOff(), and translateMmuOn().

◆ testWalk()

Fault TLB::testWalk ( Addr  pa,
Addr  size,
Addr  va,
bool  is_secure,
Mode  mode,
TlbEntry::DomainType  domain,
LookupLevel  lookup_level 
)

Definition at line 1630 of file tlb.cc.

References ArmISA::domain, isPriv, ArmISA::mode, NoFault, ArmISA::pa, size, and ArmISA::va.

Referenced by ArmISA::TableWalker::testWalk().

◆ translateAtomic() [1/2]

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

Implements BaseTLB.

Definition at line 368 of file tlb.hh.

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

◆ translateAtomic() [2/2]

Fault TLB::translateAtomic ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
TLB::ArmTranslationType  tranType 
)

◆ translateComplete()

Fault TLB::translateComplete ( const RequestPtr req,
ThreadContext tc,
Translation translation,
Mode  mode,
TLB::ArmTranslationType  tranType,
bool  callFromS2 
)

◆ translateFs()

Fault TLB::translateFs ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool &  delay,
bool  timing,
TLB::ArmTranslationType  tranType,
bool  functional = false 
)

◆ translateFunctional() [1/3]

Fault ArmISA::TLB::translateFunctional ( const RequestPtr req,
ThreadContext tc,
Mode  mode 
)
inlineoverridevirtual

Reimplemented from BaseTLB.

Definition at line 334 of file tlb.hh.

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

◆ translateFunctional() [2/3]

Fault TLB::translateFunctional ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
TLB::ArmTranslationType  tranType 
)

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 1184 of file tlb.cc.

References directToStage2, FullSystem, ArmISA::mode, stage2Tlb, translateFs(), translateFunctional(), translateSe(), and updateMiscReg().

◆ translateFunctional() [3/3]

bool TLB::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 117 of file tlb.cc.

References aarch64, aarch64EL, asid, directToStage2, ArmISA::e, ArmISA::EL1, isHyp, isSecure, lookup(), ArmISA::pa, stage2Tlb, translateFunctional(), updateMiscReg(), ArmISA::va, and vmid.

Referenced by ArmISA::ISA::addressTranslation(), ArmISA::ISA::addressTranslation64(), ArmISA::Stage2MMU::readDataUntimed(), Trace::TarmacTracerRecordV8::TraceInstEntryV8::TraceInstEntryV8(), Trace::TarmacTracerRecordV8::TraceMemEntryV8::TraceMemEntryV8(), and translateFunctional().

◆ translateMmuOff()

Fault TLB::translateMmuOff ( ThreadContext tc,
const RequestPtr req,
Mode  mode,
TLB::ArmTranslationType  tranType,
Addr  vaddr,
bool  long_desc_format 
)

◆ translateMmuOn()

Fault TLB::translateMmuOn ( ThreadContext tc,
const RequestPtr req,
Mode  mode,
Translation translation,
bool &  delay,
bool  timing,
bool  functional,
Addr  vaddr,
ArmFault::TranMethod  tranMethod 
)

◆ translateSe()

Fault TLB::translateSe ( const RequestPtr req,
ThreadContext tc,
Mode  mode,
Translation translation,
bool &  delay,
bool  timing 
)

◆ translateTiming() [1/2]

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

Implements BaseTLB.

Definition at line 378 of file tlb.hh.

References ArmISA::mode, NormalTran, and translateTiming().

◆ translateTiming() [2/2]

void TLB::translateTiming ( const RequestPtr req,
ThreadContext tc,
Translation translation,
Mode  mode,
TLB::ArmTranslationType  tranType 
)

◆ tranTypeEL()

ExceptionLevel TLB::tranTypeEL ( CPSR  cpsr,
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 1434 of file tlb.cc.

References cpsr, ArmISA::currEL(), ArmISA::EL0, ArmISA::EL1, ArmISA::EL2, ArmISA::EL3, HypMode, NormalTran, panic, S12E0Tran, S12E1Tran, S1CTran, S1E0Tran, S1E1Tran, S1E2Tran, S1E3Tran, S1S2NsTran, and type.

Referenced by updateMiscReg(), and ArmISA::TableWalker::walk().

◆ trickBoxCheck()

Fault ArmISA::TLB::trickBoxCheck ( const RequestPtr req,
Mode  mode,
TlbEntry::DomainType  domain 
)

◆ updateMiscReg()

void TLB::updateMiscReg ( ThreadContext tc,
ArmTranslationType  tranType = NormalTran 
)
protected

◆ walkTrickBoxCheck()

Fault ArmISA::TLB::walkTrickBoxCheck ( Addr  pa,
bool  is_secure,
Addr  va,
Addr  sz,
bool  is_exec,
bool  is_write,
TlbEntry::DomainType  domain,
LookupLevel  lookup_level 
)

Member Data Documentation

◆ _attr

uint64_t ArmISA::TLB::_attr
protected

Definition at line 153 of file tlb.hh.

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

◆ aarch64

bool ArmISA::TLB::aarch64
protected

◆ aarch64EL

ExceptionLevel ArmISA::TLB::aarch64EL
protected

◆ asid

uint16_t ArmISA::TLB::asid
protected

Definition at line 420 of file tlb.hh.

Referenced by getTE(), insert(), translateFs(), translateFunctional(), and updateMiscReg().

◆ cpsr

CPSR ArmISA::TLB::cpsr
protected

Definition at line 411 of file tlb.hh.

Referenced by checkPAN(), tranTypeEL(), and updateMiscReg().

◆ curTranType

ArmTranslationType ArmISA::TLB::curTranType
protected

Definition at line 428 of file tlb.hh.

Referenced by checkPermissions64(), getResultTe(), and updateMiscReg().

◆ dacr

uint32_t ArmISA::TLB::dacr
protected

Definition at line 425 of file tlb.hh.

Referenced by checkPermissions(), and updateMiscReg().

◆ directToStage2

bool ArmISA::TLB::directToStage2
protected

◆ haveLargeAsid64

bool ArmISA::TLB::haveLargeAsid64
protected

Definition at line 433 of file tlb.hh.

Referenced by TLB(), and updateMiscReg().

◆ haveLPAE

bool ArmISA::TLB::haveLPAE
protected

Definition at line 431 of file tlb.hh.

Referenced by takeOverFrom(), and TLB().

◆ haveVirtualization

bool ArmISA::TLB::haveVirtualization
protected

Definition at line 432 of file tlb.hh.

Referenced by TLB(), and updateMiscReg().

◆ hcr

HCR ArmISA::TLB::hcr
protected

◆ isHyp

bool ArmISA::TLB::isHyp
protected

◆ isPriv

bool ArmISA::TLB::isPriv
protected

◆ isSecure

bool ArmISA::TLB::isSecure
protected

◆ isStage2

bool ArmISA::TLB::isStage2
protected

◆ m5opRange

AddrRange ArmISA::TLB::m5opRange
protected

Definition at line 435 of file tlb.hh.

Referenced by finalizePhysical(), and TLB().

◆ miscRegContext

ContextID ArmISA::TLB::miscRegContext
protected

Definition at line 427 of file tlb.hh.

Referenced by updateMiscReg().

◆ miscRegValid

bool ArmISA::TLB::miscRegValid
protected

Definition at line 426 of file tlb.hh.

Referenced by drainResume(), invalidateMiscReg(), and updateMiscReg().

◆ nmrr

NMRR ArmISA::TLB::nmrr
protected

Definition at line 423 of file tlb.hh.

Referenced by translateMmuOff(), and updateMiscReg().

◆ ppRefills

ProbePoints::PMUUPtr ArmISA::TLB::ppRefills
protected

PMU probe for TLB refills.

Definition at line 193 of file tlb.hh.

Referenced by insert(), and regProbePoints().

◆ prrr

PRRR ArmISA::TLB::prrr
protected

Definition at line 422 of file tlb.hh.

Referenced by translateMmuOff(), and updateMiscReg().

◆ rangeMRU

int ArmISA::TLB::rangeMRU
protected

Definition at line 195 of file tlb.hh.

Referenced by lookup().

◆ scr

SCR ArmISA::TLB::scr
protected

Definition at line 415 of file tlb.hh.

Referenced by checkPermissions(), checkPermissions64(), translateFs(), and updateMiscReg().

◆ sctlr

SCTLR ArmISA::TLB::sctlr
protected

◆ size

int ArmISA::TLB::size
protected

Definition at line 146 of file tlb.hh.

Referenced by flushAllNs(), flushAllSecurity(), flushAsid(), getsize(), insert(), lookup(), printTlb(), and testWalk().

◆ stage2DescReq

bool ArmISA::TLB::stage2DescReq
protected

Definition at line 152 of file tlb.hh.

Referenced by getTE(), takeOverFrom(), and updateMiscReg().

◆ stage2Mmu

Stage2MMU* ArmISA::TLB::stage2Mmu
protected

Definition at line 159 of file tlb.hh.

Referenced by getTableWalkerPort(), init(), and setMMU().

◆ stage2Req

bool ArmISA::TLB::stage2Req
protected

Definition at line 148 of file tlb.hh.

Referenced by getResultTe(), takeOverFrom(), translateComplete(), and updateMiscReg().

◆ stage2Tlb

TLB* ArmISA::TLB::stage2Tlb
protected

◆ stats

ArmISA::TLB::TlbStats ArmISA::TLB::stats
protected

◆ table

TlbEntry* ArmISA::TLB::table
protected

Definition at line 145 of file tlb.hh.

Referenced by flushAllNs(), flushAllSecurity(), flushAsid(), insert(), lookup(), printTlb(), and ~TLB().

◆ tableWalker

TableWalker* ArmISA::TLB::tableWalker
protected

Definition at line 157 of file tlb.hh.

Referenced by getTableWalker(), getTE(), setMMU(), and TLB().

◆ test

TlbTestInterface* ArmISA::TLB::test
protected

Definition at line 161 of file tlb.hh.

◆ ttbcr

TTBCR ArmISA::TLB::ttbcr
protected

Definition at line 419 of file tlb.hh.

Referenced by checkPermissions64(), getTE(), translateFs(), translateSe(), and updateMiscReg().

◆ vmid

uint8_t ArmISA::TLB::vmid
protected

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

Generated on Wed Sep 30 2020 14:02:38 for gem5 by doxygen 1.8.17