41#ifndef __ARCH_ARM_TLB_HH__
42#define __ARCH_ARM_TLB_HH__
51#include "enums/TypeTLB.hh"
53#include "params/ArmTLB.hh"
100 enums::ArmLookupLevel lookup_level) = 0;
248 panic(
"demapPage() is not implemented.\n");
255 panic(
"unimplemented");
263 panic(
"unimplemented");
270 panic(
"unimplemented");
303 bool in_host, TypeTLB entry_type);
TlbEntry * findEntry(const KeyType &key) const override
TlbEntry * accessEntry(const KeyType &key) override
TlbEntry * prev
Last matched entry.
void invalidatePrev(const TlbEntry *invalid=nullptr)
Invalidate the last matched entry The method has an optional param, which means: invalidate cached pr...
TableWalker * getTableWalker()
TLB(const Params &p, int _size, TableWalker *_walker)
void takeOverFrom(BaseTLB *otlb) override
Take over from an old tlb context.
TableWalker * tableWalker
std::set< Addr > observedPageSizes
Set of observed page sizes in the TLB We update the set conservatively, therefore allowing false posi...
void setTableWalker(TableWalker *table_walker)
void setVMID(vmid_t _vmid)
TlbEntry * multiLookup(const Lookup &lookup_data)
Lookup an entry in the TLB and in the next levels by following the nextLevel pointer.
void flush(const TLBIOp &tlbi_op)
Flush TLB entries.
void regProbePoints() override
Register probe points for this object.
Port * getTableWalkerPort() override
Get the table walker port.
probing::PMUUPtr ppRefills
PMU probe for TLB refills.
bool _walkCache
True if the TLB caches partial translations.
void translateTiming(const RequestPtr &req, ThreadContext *tc, BaseMMU::Translation *translation, BaseMMU::Mode mode) override
gem5::ArmISA::TLB::Table table
std::unordered_map< enums::ArmLookupLevel, bool > partialLevels
Hash map containing one entry per lookup level The TLB is caching partial translations from the key l...
void _flushMva(Addr mva, uint64_t asn, bool secure_lookup, bool ignore_asn, ExceptionLevel target_el, bool in_host, TypeTLB entry_type)
Remove any entries that match both a va and asn.
void insert(const Lookup &lookup_data, TlbEntry &pte)
Insert a PTE in the current TLB.
Fault finalizePhysical(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) const override
Do post-translation physical address finalization.
void checkPromotion(TlbEntry *entry, BaseMMU::Mode mode)
Check if the tlb entry passed as an argument needs to be "promoted" as a unified entry: this should h...
gem5::ArmISA::TLB::TlbStats stats
void demapPage(Addr vaddr, uint64_t asn) override
TlbEntry * lookup(Lookup lookup_data)
Lookup an entry in the TLB.
Fault translateAtomic(const RequestPtr &req, ThreadContext *tc, BaseMMU::Mode mode) override
enums::ArmLookupLevel LookupLevel
bool isStage2
Indicates this TLB caches IPA->PA translations.
void flushAll() override
Reset the entire TLB.
void multiInsert(const Lookup &lookup_data, TlbEntry &pte)
Insert a PTE in the current TLB and in the higher levels.
virtual ~TlbTestInterface()
virtual Fault translationCheck(const RequestPtr &req, bool is_priv, BaseMMU::Mode mode, DomainType domain)=0
Check if a TLB translation should be forced to fail.
virtual Fault walkCheck(const RequestPtr &walk_req, Addr va, bool is_secure, Addr is_priv, BaseMMU::Mode mode, DomainType domain, enums::ArmLookupLevel lookup_level)=0
Check if a page table walker access should be forced to fail.
TlbEntry::KeyType KeyType
AssociativeCache(std::string_view name)
BaseTLB(const BaseTLBParams &p)
Ports are used to interface objects to each other.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
This is a simple scalar statistic, like a counter.
#define panic(...)
This implements a cprintf based panic() function.
std::unique_ptr< PMU > PMUUPtr
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
std::shared_ptr< Request > RequestPtr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...
Declaration of Statistics objects.
statistics::Formula writeAccesses
statistics::Scalar readHits
statistics::Scalar instHits
statistics::Scalar flushedEntries
statistics::Formula misses
statistics::Formula readAccesses
statistics::Formula accesses
statistics::Scalar inserts
statistics::Scalar flushTlb
statistics::Scalar readMisses
statistics::Scalar writeHits
statistics::Scalar writeMisses
statistics::Formula instAccesses
statistics::Scalar instMisses
statistics::Scalar partialHits
TLBTypes::KeyType KeyType