gem5
|
#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 |
Register statistics for this object. 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 (RequestPtr req, ThreadContext *tc, Mode mode) |
void | translateTiming (RequestPtr req, ThreadContext *tc, Translation *translation, Mode mode) |
Fault | translateFunctional (RequestPtr req, ThreadContext *tc, Mode mode) |
translateFunctional stub function for future CheckerCPU support More... | |
Fault | finalizePhysical (RequestPtr req, ThreadContext *tc, Mode mode) const |
![]() | |
virtual BaseMasterPort * | getMasterPort () |
Get the table walker master 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 | resetStats () |
Reset statistics associated with this object. 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 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... | |
Static Public Member Functions | |
static bool | validVirtualAddress (Addr vaddr) |
static Fault | checkCacheability (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 (RequestPtr req, ThreadContext *tc, bool write) |
Fault | translateInst (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 Request::getPaddr(), Request::isUncacheable(), NoFault, AlphaISA::PAddrIprSpace(), AlphaISA::PAddrUncachedBit43, AlphaISA::PAddrUncachedMask, Request::setFlags(), Request::setPaddr(), Request::STRICT_ORDER, and Request::UNCACHEABLE.
Referenced by translateData(), and translateInst().
|
inlineoverridevirtual |
Fault AlphaISA::TLB::finalizePhysical | ( | RequestPtr | req, |
ThreadContext * | tc, | ||
Mode | mode | ||
) | const |
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().
|
overridevirtual |
Remove all entries from the TLB.
Implements BaseTLB.
Definition at line 283 of file tlb.cc.
References DPRINTF, MipsISA::fill, flushCache(), lookupTable, nlu, table, and X86ISA::TlbEntry().
|
inline |
Definition at line 126 of file tlb.hh.
References EntryCache.
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.
TlbEntry & AlphaISA::TLB::index | ( | bool | advance = true | ) |
Definition at line 591 of file tlb.cc.
References nextnlu(), nlu, and table.
Referenced by flushAddr(), flushProcesses(), insert(), and lookup().
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().
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 translateData(), and translateInst().
|
inlineprotected |
|
overridevirtual |
Register statistics for this object.
Reimplemented from SimObject.
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, SimObject::regStats(), write_accesses, write_acv, write_hits, and write_misses.
|
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(), X86ISA::size(), and table.
|
inlineoverridevirtual |
Fault AlphaISA::TLB::translateAtomic | ( | RequestPtr | req, |
ThreadContext * | tc, | ||
Mode | mode | ||
) |
Definition at line 602 of file tlb.cc.
References BaseTLB::Execute, translateData(), translateInst(), and BaseTLB::Write.
Referenced by translateTiming().
|
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(), Request::getFlags(), Request::getPaddr(), Request::getPC(), Request::getSize(), Request::getVaddr(), 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(), Request::setPaddr(), ULL, AlphaISA::VAddrSpaceEV6(), validVirtualAddress(), AlphaISA::AlphaRequestFlags::VPTE, write_accesses, write_acv, write_hits, and write_misses.
Referenced by translateAtomic().
Fault AlphaISA::TLB::translateFunctional | ( | RequestPtr | req, |
ThreadContext * | tc, | ||
Mode | mode | ||
) |
translateFunctional stub function for future CheckerCPU support
|
protected |
Definition at line 375 of file tlb.cc.
References checkCacheability(), AlphaISA::DTB_ASN_ASN(), fetch_acv, fetch_hits, fetch_misses, FullSystem, Request::getFlags(), Request::getPaddr(), Request::getPC(), Request::getVaddr(), 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(), Request::setFlags(), Request::setPaddr(), ULL, AlphaISA::VAddrSpaceEV6(), and validVirtualAddress().
Referenced by translateAtomic().
void AlphaISA::TLB::translateTiming | ( | RequestPtr | req, |
ThreadContext * | tc, | ||
Translation * | translation, | ||
Mode | mode | ||
) |
Definition at line 611 of file tlb.cc.
References BaseTLB::Translation::finish(), and translateAtomic().
|
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, X86ISA::size(), table, and UNSERIALIZE_SCALAR.
|
inlinestatic |
Definition at line 110 of file tlb.hh.
References 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] |
Definition at line 124 of file tlb.hh.
Referenced by flushCache(), lookup(), and updateCache().
|
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(), nextnlu(), 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(), getsize(), index(), insert(), lookup(), nextnlu(), 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().