43 #ifndef __ARCH_ARM_TLB_HH__
44 #define __ARCH_ARM_TLB_HH__
54 #include "params/ArmTLB.hh"
188 TLB(
const ArmTLBParams *
p);
202 bool secure,
bool functional,
203 bool ignore_asn, uint8_t target_el);
210 void init()
override;
223 Translation *translation,
bool timing,
bool functional,
227 Mode mode, Translation *translation,
bool timing,
228 bool functional,
TlbEntry *mergeTe);
239 bool ignore_el =
false);
245 void flushAllNs(
bool hyp, uint8_t target_el,
bool ignore_el =
false);
269 void flushAsid(uint64_t asn,
bool secure_lookup, uint8_t target_el);
276 void flushMva(
Addr mva,
bool secure_lookup,
bool hyp, uint8_t target_el);
285 void flushIpaVmid(
Addr ipa,
bool secure_lookup,
bool hyp, uint8_t target_el);
296 panic(
"demapPage() is not implemented.\n");
331 Translation *translation,
bool &delay,
334 Translation *translation,
bool &delay,
bool timing);
338 Translation *translation,
Mode mode,
418 bool hyp,
bool ignore_asn, uint8_t target_el);
420 bool checkELMatch(uint8_t target_el, uint8_t tentry_el,
bool ignore_el);
432 #endif // __ARCH_ARM_TLB_HH__
ProbePoints::PMUUPtr ppRefills
PMU probe for TLB refills.
const Params * params() const
void flushMvaAsid(Addr mva, uint64_t asn, bool secure_lookup, uint8_t target_el)
Remove any entries that match both a va and asn.
Fault finalizePhysical(RequestPtr req, ThreadContext *tc, Mode mode) const
bool checkELMatch(uint8_t target_el, uint8_t tentry_el, bool ignore_el)
void flushAll() override
Reset the entire TLB.
Fault translateFs(RequestPtr req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing, ArmTranslationType tranType, bool functional=false)
virtual Fault translationCheck(RequestPtr req, bool is_priv, BaseTLB::Mode mode, TlbEntry::DomainType domain)=0
Check if a TLB translation should be forced to fail.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
void flushAllSecurity(bool secure_lookup, uint8_t target_el, bool ignore_el=false)
Reset the entire TLB.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void regStats() override
Register statistics for this object.
Stats::Scalar prefetchFaults
void drainResume() override
Resume execution after a successful drain.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Declaration of Statistics objects.
This is a simple scalar statistic, like a counter.
Fault testWalk(Addr pa, Addr size, Addr va, bool is_secure, Mode mode, TlbEntry::DomainType domain, LookupLevel lookup_level)
Stats::Formula writeAccesses
TableWalker * tableWalker
void _flushMva(Addr mva, uint64_t asn, bool secure_lookup, bool hyp, bool ignore_asn, uint8_t target_el)
Remove any entries that match both a va and asn.
Stats::Scalar flushedEntries
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
Fault translateComplete(RequestPtr req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType, bool callFromS2)
Stats::Scalar permsFaults
virtual ~TlbTestInterface()
Stats::Scalar writeMisses
void flushMva(Addr mva, bool secure_lookup, bool hyp, uint8_t target_el)
Remove all entries that match the va regardless of asn.
std::unique_ptr< PMU > PMUUPtr
Fault trickBoxCheck(RequestPtr req, Mode mode, TlbEntry::DomainType domain)
Fault translateTiming(RequestPtr req, ThreadContext *tc, Translation *translation, Mode mode, ArmTranslationType tranType=NormalTran)
BaseMasterPort * getMasterPort() override
Get the table walker master port.
Fault getTE(TlbEntry **te, RequestPtr req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, bool is_secure, ArmTranslationType tranType)
Stats::Scalar domainFaults
void updateMiscReg(ThreadContext *tc, ArmTranslationType tranType=NormalTran)
TlbEntry * lookup(Addr vpn, uint16_t asn, uint8_t vmid, bool hyp, bool secure, bool functional, bool ignore_asn, uint8_t target_el)
Lookup an entry in the TLB.
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.
Fault checkPermissions64(TlbEntry *te, RequestPtr req, Mode mode, ThreadContext *tc)
bool translateFunctional(ThreadContext *tc, Addr vaddr, Addr &paddr)
Do a functional lookup on the TLB (for debugging) and don't modify any internal state.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
TLB(const ArmTLBParams *p)
void demapPage(Addr vaddr, uint64_t asn) override
Stats::Scalar flushTlbMva
void init() override
setup all the back pointers
Stats::Scalar flushTlbMvaAsid
Stats::Formula readAccesses
Stats::Scalar alignFaults
void flushAsid(uint64_t asn, bool secure_lookup, uint8_t target_el)
Remove any entries that match the asn.
std::ostream CheckpointOut
void insert(Addr vaddr, TlbEntry &pte)
void regProbePoints() override
Register probe points for this object.
void setMMU(Stage2MMU *m, MasterID master_id)
A BaseMasterPort is a protocol-agnostic master port, responsible only for the structural connection t...
const SimObjectParams * _params
Cached copy of the object parameters.
Fault getResultTe(TlbEntry **te, RequestPtr req, ThreadContext *tc, Mode mode, Translation *translation, bool timing, bool functional, TlbEntry *mergeTe)
Stats::Formula instAccesses
void serialize(CheckpointOut &cp) const override
Serialize an object.
Fault translateAtomic(RequestPtr req, ThreadContext *tc, Mode mode, ArmTranslationType tranType=NormalTran)
Fault checkPermissions(TlbEntry *te, RequestPtr req, Mode mode)
void flushIpaVmid(Addr ipa, bool secure_lookup, bool hyp, uint8_t target_el)
Invalidate all entries in the stage 2 TLB that match the given ipa and the current VMID...
Stats::Scalar flushTlbAsid
Fault testTranslation(RequestPtr req, Mode mode, TlbEntry::DomainType domain)
TableWalker * getTableWalker()
void takeOverFrom(BaseTLB *otlb) override
Take over from an old tlb context.
void flushAllNs(bool hyp, uint8_t 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...
Fault translateSe(RequestPtr req, ThreadContext *tc, Mode mode, Translation *translation, bool &delay, bool timing)
ArmTranslationType curTranType
void setAttr(uint64_t attr)
Accessor functions for memory attributes for last accessed TLB entry.
std::shared_ptr< FaultBase > Fault
Abstract superclass for simulation objects.
int ContextID
Globally unique thread context ID.
Fault walkTrickBoxCheck(Addr pa, bool is_secure, Addr va, Addr sz, bool is_exec, bool is_write, TlbEntry::DomainType domain, LookupLevel lookup_level)
void setTestInterface(SimObject *ti)