gem5
v19.0.0.0
|
#include <tlb.hh>
Public Types | |
typedef AlphaTLBParams | Params |
![]() | |
enum | Mode { Read, Write, Execute } |
![]() | |
typedef SimObjectParams | Params |
Public Member Functions | |
TLB (const Params *p) | |
virtual | ~TLB () |
void | takeOverFrom (BaseTLB *otlb) override |
Take over from an old tlb context. More... | |
void | regStats () override |
Callback to set stat parameters. More... | |
int | getsize () const |
TlbEntry & | index (bool advance=true) |
void | insert (Addr vaddr, TlbEntry &entry) |
void | flushAll () override |
Remove all entries from the TLB. More... | |
void | flushProcesses () |
void | flushAddr (Addr addr, uint8_t asn) |
void | demapPage (Addr vaddr, uint64_t asn) override |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
void | flushCache () |
TlbEntry * | updateCache (TlbEntry *entry) |
Fault | translateAtomic (const RequestPtr &req, ThreadContext *tc, Mode mode) override |
void | translateTiming (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode) override |
Fault | finalizePhysical (const RequestPtr &req, ThreadContext *tc, Mode mode) const override |
Do post-translation physical address finalization. More... | |
![]() | |
virtual Fault | translateFunctional (const RequestPtr &req, ThreadContext *tc, Mode mode) |
virtual Port * | getTableWalkerPort () |
Get the table walker port if present. More... | |
void | memInvalidate () |
Invalidate the contents of memory buffers. More... | |
![]() | |
const Params * | params () const |
SimObject (const Params *_params) | |
virtual | ~SimObject () |
virtual const std::string | name () const |
virtual void | init () |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
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 | regProbePoints () |
Register probe points for this object. More... | |
virtual void | regProbeListeners () |
Register probe listeners for this object. More... | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. More... | |
virtual Port & | getPort (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... | |
![]() | |
EventManager (EventManager &em) | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
EventQueue * | eventQueue () 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) |
void | setCurTick (Tick newVal) |
![]() | |
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) |
![]() | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
![]() | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
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... | |
Static Public Member Functions | |
static bool | validVirtualAddress (Addr vaddr) |
static Fault | checkCacheability (const RequestPtr &req, bool itb=false) |
![]() | |
static void | serializeAll (CheckpointOut &cp) |
Serialize all SimObjects in the system. More... | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
![]() | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
Public Attributes | |
TlbEntry * | EntryCache [3] |
Protected Types | |
typedef std::multimap< Addr, int > | PageTable |
Protected Member Functions | |
void | nextnlu () |
TlbEntry * | lookup (Addr vpn, uint8_t asn) |
Fault | translateData (const RequestPtr &req, ThreadContext *tc, bool write) |
Fault | translateInst (const RequestPtr &req, ThreadContext *tc) |
![]() | |
BaseTLB (const Params *p) | |
![]() | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. More... | |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
Protected Attributes | |
Stats::Scalar | fetch_hits |
Stats::Scalar | fetch_misses |
Stats::Scalar | fetch_acv |
Stats::Formula | fetch_accesses |
Stats::Scalar | read_hits |
Stats::Scalar | read_misses |
Stats::Scalar | read_acv |
Stats::Scalar | read_accesses |
Stats::Scalar | write_hits |
Stats::Scalar | write_misses |
Stats::Scalar | write_acv |
Stats::Scalar | write_accesses |
Stats::Formula | data_hits |
Stats::Formula | data_misses |
Stats::Formula | data_acv |
Stats::Formula | data_accesses |
PageTable | lookupTable |
std::vector< TlbEntry > | table |
int | nlu |
![]() | |
const SimObjectParams * | _params |
Cached copy of the object parameters. More... | |
![]() | |
EventQueue * | eventq |
A pointer to this object's event queue. More... | |
Additional Inherited Members | |
![]() | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
|
protected |
typedef AlphaTLBParams AlphaISA::TLB::Params |
AlphaISA::TLB::TLB | ( | const Params * | p | ) |
Definition at line 66 of file tlb.cc.
References flushCache().
|
static |
Definition at line 206 of file tlb.cc.
References NoFault, AlphaISA::PAddrIprSpace(), AlphaISA::PAddrUncachedBit43, AlphaISA::PAddrUncachedMask, Request::STRICT_ORDER, and Request::UNCACHEABLE.
Referenced by translateData(), translateInst(), and validVirtualAddress().
|
inlineoverridevirtual |
|
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.
req | Request to updated in-place. |
tc | Thread context that created the request. |
mode | Request type (read/write/execute). |
Implements BaseTLB.
Definition at line 619 of file tlb.cc.
References NoFault.
Referenced by updateCache().
void AlphaISA::TLB::flushAddr | ( | Addr | addr, |
uint8_t | asn | ||
) |
Definition at line 318 of file tlb.cc.
References addr, AlphaISA::TlbEntry::asma, AlphaISA::TlbEntry::asn, DPRINTF, flushCache(), ArmISA::i, index(), lookupTable, AlphaISA::TlbEntry::ppn, table, AlphaISA::TlbEntry::tag, MipsISA::vaddr, AlphaISA::TlbEntry::valid, and AlphaISA::VAddr::vpn().
Referenced by demapPage(), getsize(), and AlphaISA::ISA::setIpr().
|
overridevirtual |
Remove all entries from the TLB.
Implements BaseTLB.
Definition at line 283 of file tlb.cc.
References DPRINTF, MipsISA::fill, flushCache(), lookupTable, nlu, and table.
Referenced by getsize(), and AlphaISA::ISA::setIpr().
|
inline |
Definition at line 126 of file tlb.hh.
Referenced by flushAddr(), flushAll(), flushProcesses(), insert(), and TLB().
void AlphaISA::TLB::flushProcesses | ( | ) |
Definition at line 293 of file tlb.cc.
References AlphaISA::TlbEntry::asma, DPRINTF, flushCache(), ArmISA::i, index(), lookupTable, AlphaISA::TlbEntry::ppn, table, AlphaISA::TlbEntry::tag, and AlphaISA::TlbEntry::valid.
Referenced by getsize(), and AlphaISA::ISA::setIpr().
|
inline |
Definition at line 92 of file tlb.hh.
References addr, flushAddr(), flushAll(), flushProcesses(), index(), insert(), and MipsISA::vaddr.
TlbEntry & AlphaISA::TLB::index | ( | bool | advance = true | ) |
Definition at line 591 of file tlb.cc.
References nextnlu(), nlu, and table.
Referenced by flushAddr(), flushProcesses(), getsize(), insert(), lookup(), and AlphaISA::ISA::readIpr().
Definition at line 248 of file tlb.cc.
References addr, DPRINTF, flushCache(), ArmISA::i, index(), lookupTable, nextnlu(), nlu, panic, AlphaISA::TlbEntry::ppn, table, AlphaISA::TlbEntry::tag, MipsISA::vaddr, and AlphaISA::VAddr::vpn().
Referenced by getsize(), and AlphaISA::ISA::setIpr().
Definition at line 164 of file tlb.cc.
References AlphaISA::TlbEntry::asma, AlphaISA::TlbEntry::asn, DPRINTF, EntryCache, ArmISA::i, index(), lookupTable, AlphaISA::TlbEntry::ppn, table, AlphaISA::TlbEntry::tag, updateCache(), and AlphaISA::TlbEntry::valid.
Referenced by nextnlu(), translateData(), and translateInst().
|
inlineprotected |
|
overridevirtual |
Callback to set stat parameters.
This callback is typically used for complex stats (e.g., distributions) that need parameters in addition to a name and a description. Stat names and descriptions should typically be set from the constructor usingo from the constructor using the ADD_STAT macro.
Reimplemented from Stats::Group.
Definition at line 77 of file tlb.cc.
References data_accesses, data_acv, data_hits, data_misses, Stats::DataWrap< Derived, InfoProxyType >::desc(), fetch_accesses, fetch_acv, fetch_hits, fetch_misses, SimObject::name(), Stats::DataWrap< Derived, InfoProxyType >::name(), read_accesses, read_acv, read_hits, read_misses, Stats::Group::regStats(), write_accesses, write_acv, write_hits, and write_misses.
Referenced by takeOverFrom().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 348 of file tlb.cc.
References csprintf(), ArmISA::i, nlu, SERIALIZE_SCALAR, Serializable::serializeSection(), and table.
Referenced by validVirtualAddress().
|
inlineoverridevirtual |
Take over from an old tlb context.
Implements BaseTLB.
Definition at line 88 of file tlb.hh.
References regStats().
|
overridevirtual |
Implements BaseTLB.
Definition at line 602 of file tlb.cc.
References BaseTLB::Execute, translateData(), translateInst(), and BaseTLB::Write.
Referenced by translateTiming(), and updateCache().
|
protected |
Check for alignment faults
Definition at line 452 of file tlb.cc.
References AlphaISA::ALT_MODE_AM(), AlphaISA::AlphaRequestFlags::ALTMODE, checkCacheability(), DPRINTF, AlphaISA::DTB_ASN_ASN(), AlphaISA::DTB_CM_CM(), AlphaISA::IPR_ALT_MODE, AlphaISA::IPR_DTB_ASN, AlphaISA::IPR_DTB_CM, lookup(), AlphaISA::MM_STAT_ACV_MASK, AlphaISA::MM_STAT_BAD_VA_MASK, AlphaISA::MM_STAT_DTB_MISS_MASK, AlphaISA::MM_STAT_FONR_MASK, AlphaISA::MM_STAT_FONW_MASK, AlphaISA::MM_STAT_WR_MASK, ArmISA::mode, MODE2MASK, AlphaISA::mode_kernel, ArmISA::offset, AlphaISA::PAddrImplMask, AlphaISA::PAddrUncachedBit40, AlphaISA::PageShift, AlphaISA::PcPAL(), Request::PHYSICAL, read_accesses, read_acv, read_hits, read_misses, ThreadContext::readMiscRegNoEffect(), ULL, AlphaISA::VAddrSpaceEV6(), validVirtualAddress(), AlphaISA::AlphaRequestFlags::VPTE, write_accesses, write_acv, write_hits, and write_misses.
Referenced by translateAtomic(), and updateCache().
|
protected |
Definition at line 375 of file tlb.cc.
References checkCacheability(), AlphaISA::DTB_ASN_ASN(), fetch_acv, fetch_hits, fetch_misses, FullSystem, AlphaISA::ICM_CM(), AlphaISA::IPR_DTB_ASN, AlphaISA::IPR_ICM, lookup(), AlphaISA::mode_kernel, NoFault, ArmISA::offset, AlphaISA::PAddrImplMask, AlphaISA::PAddrUncachedBit40, AlphaISA::PageShift, AlphaISA::PcPAL(), Request::PHYSICAL, ThreadContext::readMiscRegNoEffect(), ULL, AlphaISA::VAddrSpaceEV6(), and validVirtualAddress().
Referenced by translateAtomic(), and updateCache().
|
overridevirtual |
Implements BaseTLB.
Definition at line 611 of file tlb.cc.
References BaseTLB::Translation::finish(), and translateAtomic().
Referenced by updateCache().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 359 of file tlb.cc.
References csprintf(), ArmISA::i, lookupTable, nlu, table, and UNSERIALIZE_SCALAR.
Referenced by validVirtualAddress().
Definition at line 132 of file tlb.hh.
References finalizePhysical(), ArmISA::mode, translateAtomic(), translateData(), translateInst(), and translateTiming().
Referenced by lookup().
|
inlinestatic |
Definition at line 110 of file tlb.hh.
References checkCacheability(), serialize(), unserialize(), and AlphaISA::VAddrUnImplMask.
Referenced by translateData(), and translateInst().
|
protected |
Definition at line 71 of file tlb.hh.
Referenced by regStats().
|
protected |
Definition at line 70 of file tlb.hh.
Referenced by regStats().
|
protected |
Definition at line 68 of file tlb.hh.
Referenced by regStats().
|
protected |
Definition at line 69 of file tlb.hh.
Referenced by regStats().
TlbEntry* AlphaISA::TLB::EntryCache[3] |
|
mutableprotected |
Definition at line 59 of file tlb.hh.
Referenced by regStats().
|
mutableprotected |
Definition at line 58 of file tlb.hh.
Referenced by regStats(), and translateInst().
|
mutableprotected |
Definition at line 56 of file tlb.hh.
Referenced by regStats(), and translateInst().
|
mutableprotected |
Definition at line 57 of file tlb.hh.
Referenced by regStats(), and translateInst().
|
protected |
Definition at line 75 of file tlb.hh.
Referenced by flushAddr(), flushAll(), flushProcesses(), insert(), lookup(), and unserialize().
|
protected |
Definition at line 78 of file tlb.hh.
Referenced by flushAll(), index(), insert(), serialize(), and unserialize().
|
mutableprotected |
Definition at line 63 of file tlb.hh.
Referenced by regStats(), and translateData().
|
mutableprotected |
Definition at line 62 of file tlb.hh.
Referenced by regStats(), and translateData().
|
mutableprotected |
Definition at line 60 of file tlb.hh.
Referenced by regStats(), and translateData().
|
mutableprotected |
Definition at line 61 of file tlb.hh.
Referenced by regStats(), and translateData().
|
protected |
Definition at line 77 of file tlb.hh.
Referenced by flushAddr(), flushAll(), flushProcesses(), index(), insert(), lookup(), serialize(), and unserialize().
|
mutableprotected |
Definition at line 67 of file tlb.hh.
Referenced by regStats(), and translateData().
|
mutableprotected |
Definition at line 66 of file tlb.hh.
Referenced by regStats(), and translateData().
|
mutableprotected |
Definition at line 64 of file tlb.hh.
Referenced by regStats(), and translateData().
|
mutableprotected |
Definition at line 65 of file tlb.hh.
Referenced by regStats(), and translateData().