Go to the documentation of this file.
41 #ifndef __ARCH_ARM_TLB_HH__
42 #define __ARCH_ARM_TLB_HH__
52 #include "params/ArmTLB.hh"
198 TLB(
const ArmTLBParams *
p);
212 bool secure,
bool functional,
221 void init()
override;
235 Translation *translation,
bool timing,
bool functional,
240 Translation *translation,
bool timing,
241 bool functional,
TlbEntry *mergeTe);
254 bool ignore_el =
false,
bool in_host =
false);
283 void flushAsid(uint64_t asn,
bool secure_lookup,
291 bool in_host =
false);
305 bool is_exec,
bool is_write,
314 panic(
"demapPage() is not implemented.\n");
357 Translation *translation,
bool &delay,
bool timing,
bool functional,
361 Translation *translation,
bool &delay,
364 Translation *translation,
bool &delay,
bool timing);
375 Translation *translation,
Mode mode,
472 auto tlb =
static_cast<TLB *
>(tc->getITBPtr());
481 auto tlb =
static_cast<TLB *
>(tc->getDTBPtr());
488 #endif // __ARCH_ARM_TLB_HH__
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.
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override
void flushAllSecurity(bool secure_lookup, ExceptionLevel target_el, bool ignore_el=false, bool in_host=false)
Reset the entire TLB.
void setTestInterface(SimObject *ti)
Fault translateFs(const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing, ArmTranslationType tranType, bool functional=false)
TlbEntry * 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.
Fault translateSe(const RequestPtr &req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing)
Fault translateMmuOn(ThreadContext *tc, const RequestPtr &req, Mode mode, Translation *translation, bool &delay, bool timing, bool functional, Addr vaddr, ArmFault::TranMethod tranMethod)
const Params * params() const
Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, Mode mode) const override
Do post-translation physical address finalization.
void demapPage(Addr vaddr, uint64_t asn) override
Stats::Scalar prefetchFaults
Stats::Scalar flushTlbAsid
Stats::Scalar domainFaults
int ContextID
Globally unique thread context ID.
Stats::Formula readAccesses
Stats::Scalar writeMisses
void setAttr(uint64_t attr)
Accessor functions for memory attributes for last accessed TLB entry.
void drainResume() override
Resume execution after a successful drain.
std::shared_ptr< Request > RequestPtr
ArmISA::TLB::TlbStats stats
virtual Fault walkCheck(Addr pa, Addr size, Addr va, bool is_secure, Addr is_priv, BaseTLB::Mode mode, TlbEntry::DomainType domain, LookupLevel lookup_level)=0
Check if a page table walker access should be forced to fail.
Stats::Scalar flushTlbMva
Stats::Scalar permsFaults
Stats::Formula instAccesses
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.
Fault translateMmuOff(ThreadContext *tc, const RequestPtr &req, Mode mode, TLB::ArmTranslationType tranType, Addr vaddr, bool long_desc_format)
This is a simple scalar statistic, like a counter.
Fault checkPermissions64(TlbEntry *te, const RequestPtr &req, Mode mode, ThreadContext *tc)
void regProbePoints() override
Register probe points for this object.
ArmTranslationType curTranType
TlbStats(Stats::Group *parent)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Fault translateFunctional(const RequestPtr &req, ThreadContext *tc, Mode mode) override
std::shared_ptr< FaultBase > Fault
void flushMva(Addr mva, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
Remove all entries that match the va regardless of asn.
Ports are used to interface objects to each other.
TableWalker * getTableWalker()
Fault checkPermissions(TlbEntry *te, const RequestPtr &req, Mode mode)
static ExceptionLevel tranTypeEL(CPSR cpsr, ArmTranslationType type)
Determine the EL to use for the purpose of a translation given a specific translation type.
Stats::Scalar flushedEntries
void flushAll() override
Reset the entire TLB.
bool checkPAN(ThreadContext *tc, uint8_t ap, const RequestPtr &req, Mode mode)
Fault testWalk(Addr pa, Addr size, Addr va, bool is_secure, Mode mode, TlbEntry::DomainType domain, LookupLevel lookup_level)
virtual ~TlbTestInterface()
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
TableWalker * tableWalker
void flushAsid(uint64_t asn, bool secure_lookup, ExceptionLevel target_el, bool in_host=false)
Remove any entries that match the asn.
Fault trickBoxCheck(const RequestPtr &req, Mode mode, TlbEntry::DomainType domain)
std::unique_ptr< PMU > PMUUPtr
void updateMiscReg(ThreadContext *tc, ArmTranslationType tranType=NormalTran)
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.
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode) override
Fault walkTrickBoxCheck(Addr pa, bool is_secure, Addr va, Addr sz, bool is_exec, bool is_write, TlbEntry::DomainType domain, LookupLevel lookup_level)
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 n...
void init() override
setup all the back pointers
const SimObjectParams * _params
Cached copy of the object parameters.
ProbePoints::PMUUPtr ppRefills
PMU probe for TLB refills.
void takeOverFrom(BaseTLB *otlb) override
Take over from an old tlb context.
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, Mode mode, ArmTranslationType tranType)
Port * getTableWalkerPort() override
Get the table walker port.
Fault testTranslation(const RequestPtr &req, Mode mode, TlbEntry::DomainType domain)
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)
void setMMU(Stage2MMU *m, RequestorID requestor_id)
TLB(const ArmTLBParams *p)
Stats::Scalar alignFaults
Stats::Scalar flushTlbMvaAsid
virtual Fault translationCheck(const RequestPtr &req, bool is_priv, BaseTLB::Mode mode, TlbEntry::DomainType domain)=0
Check if a TLB translation should be forced to fail.
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 translateComplete(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType, bool callFromS2)
void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType)
Stats::Formula writeAccesses
#define panic(...)
This implements a cprintf based panic() function.
void insert(Addr vaddr, TlbEntry &pte)
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:01:59 for gem5 by doxygen 1.8.17