gem5 v24.0.0.0
|
#include <tlb.hh>
Classes | |
struct | AccessInfo |
This hash map will use the virtual page address as a key and will keep track of total number of accesses per page. More... | |
class | CpuSidePort |
struct | GpuTLBStats |
class | MemSidePort |
MemSidePort is the TLB Port closer to the memory side If this is a last level TLB then this port will not be connected. More... | |
class | TLBEvent |
class | Translation |
Public Types | |
enum | tlbOutcome { TLB_HIT , TLB_MISS , PAGE_WALK , MISS_RETURN } |
typedef X86GPUTLBParams | Params |
typedef enum BaseMMU::Mode | Mode |
typedef std::unordered_map< Addr, AccessInfo > | AccessPatternTable |
Public Types inherited from gem5::ClockedObject | |
using | Params = ClockedObjectParams |
Parameters of ClockedObject. | |
Public Types inherited from gem5::SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
GpuTLB (const Params &p) | |
~GpuTLB () | |
void | dumpAll () |
TlbEntry * | lookup (Addr va, bool update_lru=true) |
void | setConfigAddress (uint32_t addr) |
Walker * | getWalker () |
void | invalidateAll () |
void | invalidateNonGlobal () |
void | demapPage (Addr va, uint64_t asn) |
void | updatePageFootprint (Addr virt_page_addr) |
void | printAccessPattern () |
Fault | translateAtomic (const RequestPtr &req, ThreadContext *tc, Mode mode, int &latency) |
void | translateTiming (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, int &latency) |
Tick | doMmuRegRead (ThreadContext *tc, Packet *pkt) |
Tick | doMmuRegWrite (ThreadContext *tc, Packet *pkt) |
TlbEntry * | insert (Addr vpn, TlbEntry &entry) |
virtual void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
virtual void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
void | issueTranslation () |
bool | tlbLookup (const RequestPtr &req, ThreadContext *tc, bool update_stats) |
TLB_lookup will only perform a TLB lookup returning true on a TLB hit and false on a TLB miss. | |
void | handleTranslationReturn (Addr addr, tlbOutcome outcome, PacketPtr pkt) |
handleTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault returns. | |
void | handleFuncTranslationReturn (PacketPtr pkt, tlbOutcome outcome) |
handleFuncTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault returns. | |
void | pagingProtectionChecks (ThreadContext *tc, PacketPtr pkt, TlbEntry *tlb_entry, Mode mode) |
Do Paging protection checks. | |
void | updatePhysAddresses (Addr virt_page_addr, TlbEntry *tlb_entry, Addr phys_page_addr) |
void | issueTLBLookup (PacketPtr pkt) |
Do the TLB lookup for this coalesced request and schedule another event <TLB access latency> cycles later. | |
Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) override |
Get a port with a given name and index. | |
void | translationReturn (Addr virtPageAddr, tlbOutcome outcome, PacketPtr pkt) |
A TLBEvent is scheduled after the TLB lookup and helps us take the appropriate actions: (e.g., update TLB on a hit, send request to lower level TLB on a miss, or start a page walk if this was the last-level TLB). | |
void | cleanup () |
void | exitCallback () |
Public Member Functions inherited from gem5::ClockedObject | |
ClockedObject (const ClockedObjectParams &p) | |
Public Member Functions inherited from gem5::SimObject | |
const Params & | params () const |
SimObject (const Params &p) | |
virtual | ~SimObject () |
virtual void | init () |
init() is called after all C++ SimObjects have been created and all ports are connected. | |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. | |
virtual void | regProbePoints () |
Register probe points for this object. | |
virtual void | regProbeListeners () |
Register probe listeners for this object. | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. | |
virtual void | startup () |
startup() is the final initialization call before simulation. | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
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) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. | |
virtual void | notifyFork () |
Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. | |
virtual void | resetStats () |
Callback to reset stats. | |
virtual void | preDumpStats () |
Callback before stats are dumped. | |
void | addStat (statistics::Info *info) |
Register a stat with this group. | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. | |
void | mergeStatGroup (Group *block) |
Merge the contents (stats & children) of a block to this block. | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
Named (const std::string &name_) | |
virtual | ~Named ()=default |
virtual std::string | name () const |
Public Member Functions inherited from gem5::Clocked | |
void | updateClockPeriod () |
Update the tick to the current tick. | |
Tick | clockEdge (Cycles cycles=Cycles(0)) const |
Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. | |
Tick | nextCycle () const |
Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. | |
uint64_t | frequency () const |
Tick | clockPeriod () const |
double | voltage () const |
Cycles | ticksToCycles (Tick t) const |
Tick | cyclesToTicks (Cycles c) const |
Public Attributes | |
int | hitLatency |
int | missLatency1 |
int | missLatency2 |
std::vector< CpuSidePort * > | cpuSidePort |
std::vector< MemSidePort * > | memSidePort |
int | maxCoalescedReqs |
int | outstandingReqs |
std::unordered_map< Addr, TLBEvent * > | translationReturnEvent |
std::queue< Addr > | cleanupQueue |
EventFunctionWrapper | cleanupEvent |
AccessPatternTable | TLBFootprint |
EventFunctionWrapper | exitEvent |
Public Attributes inherited from gem5::ClockedObject | |
PowerState * | powerState |
Protected Types | |
typedef std::list< TlbEntry * > | EntryList |
Protected Member Functions | |
EntryList::iterator | lookupIt (Addr va, bool update_lru=true) |
Fault | translateInt (bool read, const RequestPtr &req, ThreadContext *tc) |
Fault | translate (const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode, bool &delayedResponse, bool timing, int &latency) |
Protected Member Functions inherited from gem5::Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. | |
void | signalDrainDone () const |
Signal that an object is drained. | |
Protected Member Functions inherited from gem5::Clocked | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. | |
void | resetClock () const |
Reset the object's clock using the current global tick value. | |
virtual void | clockPeriodUpdated () |
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. | |
Protected Attributes | |
uint32_t | configAddress |
Walker * | walker |
int | size |
int | assoc |
int | numSets |
bool | FA |
true if this is a fully-associative TLB | |
Addr | setMask |
bool | allocationPolicy |
Allocation Policy: true if we always allocate on a hit, false otherwise. | |
bool | hasMemSidePort |
if true, then this is not the last level TLB | |
bool | accessDistance |
Print out accessDistance stats. | |
std::vector< TlbEntry > | tlb |
std::vector< EntryList > | freeList |
std::vector< EntryList > | entryList |
An entryList per set is the equivalent of an LRU stack; it's used to guide replacement decisions. | |
gem5::X86ISA::GpuTLB::GpuTLBStats | stats |
Protected Attributes inherited from gem5::SimObject | |
const SimObjectParams & | _params |
Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. | |
Friends | |
class | Walker |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::SimObject | |
static void | serializeAll (const std::string &cpt_dir) |
Create a checkpoint by serializing all SimObjects in the system. | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. | |
static void | setSimObjectResolver (SimObjectResolver *resolver) |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
static SimObjectResolver * | getSimObjectResolver () |
There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
typedef std::unordered_map<Addr, AccessInfo> gem5::X86ISA::GpuTLB::AccessPatternTable |
|
protected |
typedef enum BaseMMU::Mode gem5::X86ISA::GpuTLB::Mode |
typedef X86GPUTLBParams gem5::X86ISA::GpuTLB::Params |
gem5::X86ISA::GpuTLB::GpuTLB | ( | const Params & | p | ) |
Definition at line 67 of file tlb.cc.
References cleanup().
gem5::X86ISA::GpuTLB::~GpuTLB | ( | ) |
Definition at line 131 of file tlb.cc.
References translationReturnEvent.
void gem5::X86ISA::GpuTLB::cleanup | ( | ) |
the higher level coalescer should retry if it has any pending requests.
Definition at line 1274 of file tlb.cc.
References cleanupQueue, cpuSidePort, gem5::ArmISA::i, outstandingReqs, and translationReturnEvent.
Referenced by GpuTLB().
void gem5::X86ISA::GpuTLB::demapPage | ( | Addr | va, |
uint64_t | asn ) |
Definition at line 267 of file tlb.cc.
References entryList, freeList, lookupIt(), gem5::X86ISA::PageShift, gem5::ArmISA::set, setMask, and gem5::ArmISA::va.
Tick gem5::X86ISA::GpuTLB::doMmuRegRead | ( | ThreadContext * | tc, |
Packet * | pkt ) |
Tick gem5::X86ISA::GpuTLB::doMmuRegWrite | ( | ThreadContext * | tc, |
Packet * | pkt ) |
void gem5::X86ISA::GpuTLB::dumpAll | ( | ) |
void gem5::X86ISA::GpuTLB::exitCallback | ( | ) |
Definition at line 1333 of file tlb.cc.
References accessDistance, gem5::X86ISA::GpuTLB::GpuTLBStats::avgReuseDistance, gem5::OutputDirectory::create(), gem5::ArmISA::i, gem5::Named::name(), gem5::simout, stats, gem5::OutputStream::stream(), and TLBFootprint.
|
overridevirtual |
Get a port with a given name and index.
This is used at binding time and returns a reference to a protocol-agnostic port.
gem5 has a request and response port interface. All memory objects are connected together via ports. These ports provide a rigid interface between these memory objects. These ports implement three different memory system modes: timing, atomic, and functional. The most important mode is the timing mode and here timing mode is used for conducting cycle-level timing experiments. The other modes are only used in special circumstances and should not be used to conduct cycle-level timing experiments. The other modes are only used in special circumstances. These ports allow SimObjects to communicate with each other.
if_name | Port name |
idx | Index in the case of a VectorPort |
Reimplemented from gem5::SimObject.
Definition at line 138 of file tlb.cc.
References cpuSidePort, hasMemSidePort, memSidePort, and panic.
Walker * gem5::X86ISA::GpuTLB::getWalker | ( | ) |
void gem5::X86ISA::GpuTLB::handleFuncTranslationReturn | ( | PacketPtr | pkt, |
tlbOutcome | tlb_outcome ) |
handleFuncTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault returns.
It updates LRU, inserts the TLB entry on a miss depending on the allocation policy and does the required protection checks. It does NOT create a new packet to update the packet's addr; this is done in hsail-gpu code.
We are returning either from a page walk or from a hit at a lower TLB level. The senderState should be "carrying" a pointer to the correct TLBEntry.
Do paging checks if it's a normal functional access. If it's for a prefetch, then sometimes you can try to prefetch something that won't pass protection. We don't actually want to fault becuase there is no demand access to deem this a violation. Just put it in the TLB and it will fault if indeed a future demand access touches it in violation.
This feature could be used to explore security issues around speculative memory accesses.
Definition at line 1041 of file tlb.cc.
References allocationPolicy, DPRINTF, insert(), gem5::GpuTranslationState::isPrefetch, gem5::X86ISA::mode, gem5::X86ISA::TlbEntry::paddr, gem5::X86ISA::PageBytes, pagingProtectionChecks(), gem5::Packet::req, gem5::roundDown(), gem5::safe_cast(), gem5::Packet::senderState, gem5::X86ISA::TlbEntry::size(), gem5::GpuTranslationState::tc, TLB_HIT, gem5::GpuTranslationState::tlbEntry, gem5::GpuTranslationState::tlbMode, gem5::Request::UNCACHEABLE, gem5::X86ISA::TlbEntry::uncacheable, gem5::MipsISA::vaddr, and gem5::X86ISA::TlbEntry::vaddr.
void gem5::X86ISA::GpuTLB::handleTranslationReturn | ( | Addr | virt_page_addr, |
tlbOutcome | tlb_outcome, | ||
PacketPtr | pkt ) |
handleTranslationReturn is called on a TLB hit, when a TLB miss returns or when a page fault returns.
The latter calls handelHit with TLB miss as tlbOutcome.
We are returning either from a page walk or from a hit at a lower TLB level. The senderState should be "carrying" a pointer to the correct TLBEntry.
At this point the packet carries an up-to-date tlbEntry pointer in its senderState. Next step is to do the paging protection checks.
Definition at line 787 of file tlb.cc.
References allocationPolicy, cleanupEvent, cleanupQueue, cpuSidePort, gem5::curTick(), DPRINTF, insert(), gem5::Packet::isRequest(), gem5::Packet::makeTimingResponse(), gem5::X86ISA::mode, gem5::X86ISA::TlbEntry::paddr, pagingProtectionChecks(), gem5::Packet::req, gem5::safe_cast(), gem5::EventManager::schedule(), gem5::Event::scheduled(), gem5::Packet::senderState, gem5::X86ISA::TlbEntry::size(), gem5::GpuTranslationState::tc, TLB_HIT, gem5::GpuTranslationState::tlbEntry, gem5::GpuTranslationState::tlbMode, gem5::Request::UNCACHEABLE, gem5::X86ISA::TlbEntry::uncacheable, gem5::MipsISA::vaddr, and gem5::X86ISA::TlbEntry::vaddr.
Referenced by translationReturn().
vpn holds the virtual page address The least significant bits are simply masked
Definition at line 160 of file tlb.cc.
References entryList, freeList, gem5::X86ISA::PageShift, gem5::ArmISA::set, setMask, and gem5::X86ISA::TlbEntry::vaddr.
Referenced by handleFuncTranslationReturn(), handleTranslationReturn(), and translate().
void gem5::X86ISA::GpuTLB::invalidateAll | ( | ) |
void gem5::X86ISA::GpuTLB::invalidateNonGlobal | ( | ) |
void gem5::X86ISA::GpuTLB::issueTLBLookup | ( | PacketPtr | pkt | ) |
Do the TLB lookup for this coalesced request and schedule another event <TLB access latency> cycles later.
Definition at line 661 of file tlb.cc.
References gem5::X86ISA::GpuTLB::GpuTLBStats::accessCycles, gem5::curTick(), gem5::Clocked::cyclesToTicks(), DPRINTF, gem5::ThreadContext::getProcessPtr(), gem5::X86ISA::GpuTLB::GpuTLBStats::globalNumTLBAccesses, gem5::X86ISA::GpuTLB::GpuTLBStats::globalNumTLBHits, gem5::X86ISA::GpuTLB::GpuTLBStats::globalNumTLBMisses, hitLatency, gem5::GpuTranslationState::hitLevel, gem5::GpuTranslationState::isPrefetch, gem5::X86ISA::GpuTLB::GpuTLBStats::localCycles, lookup(), gem5::X86ISA::p, gem5::X86ISA::TlbEntry::paddr, gem5::X86ISA::PageBytes, panic, gem5::Packet::req, gem5::GpuTranslationState::reqCnt, gem5::roundDown(), gem5::safe_cast(), gem5::EventManager::schedule(), gem5::Packet::senderState, stats, gem5::GpuTranslationState::tc, TLB_HIT, TLB_MISS, gem5::GpuTranslationState::tlbEntry, tlbLookup(), translationReturnEvent, updatePageFootprint(), and gem5::X86ISA::TlbEntry::vaddr.
void gem5::X86ISA::GpuTLB::issueTranslation | ( | ) |
Definition at line 216 of file tlb.cc.
References entryList, lookupIt(), gem5::X86ISA::PageShift, gem5::ArmISA::set, setMask, and gem5::ArmISA::va.
Referenced by issueTLBLookup(), tlbLookup(), and translate().
|
protected |
Definition at line 186 of file tlb.cc.
References DPRINTF, entryList, FA, gem5::X86ISA::PageShift, gem5::ArmISA::set, setMask, and gem5::ArmISA::va.
Referenced by demapPage(), and lookup().
void gem5::X86ISA::GpuTLB::pagingProtectionChecks | ( | ThreadContext * | tc, |
PacketPtr | pkt, | ||
TlbEntry * | tlb_entry, | ||
Mode | mode ) |
Do Paging protection checks.
If we encounter a page fault, then an assertion is fired.
Definition at line 753 of file tlb.cc.
References gem5::X86ISA::CPL0FlagBit, gem5::X86ISA::misc_reg::Cr0, flags, gem5::X86ISA::misc_reg::M5Reg, gem5::X86ISA::mode, panic, gem5::Request::READ_MODIFY_WRITE, gem5::ThreadContext::readMiscRegNoEffect(), gem5::Packet::req, gem5::X86ISA::TlbEntry::user, gem5::X86ISA::TlbEntry::writable, and gem5::BaseMMU::Write.
Referenced by handleFuncTranslationReturn(), and handleTranslationReturn().
void gem5::X86ISA::GpuTLB::printAccessPattern | ( | ) |
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::ClockedObject.
void gem5::X86ISA::GpuTLB::setConfigAddress | ( | uint32_t | addr | ) |
Definition at line 243 of file tlb.cc.
References gem5::X86ISA::addr, and configAddress.
bool gem5::X86ISA::GpuTLB::tlbLookup | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
bool | update_stats ) |
TLB_lookup will only perform a TLB lookup returning true on a TLB hit and false on a TLB miss.
Many of the checks about different modes have been converted to assertions, since these parts of the code are not really used. On a hit it will update the LRU stack.
Definition at line 371 of file tlb.cc.
References DPRINTF, flags, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBAccesses, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBHits, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBMisses, lookup(), gem5::X86ISA::misc_reg::M5Reg, gem5::X86ISA::segment_idx::Ms, gem5::ThreadContext::readMiscRegNoEffect(), gem5::X86ISA::seg, gem5::X86ISA::SegmentFlagMask, stats, and gem5::MipsISA::vaddr.
Referenced by issueTLBLookup().
|
protected |
Definition at line 420 of file tlb.cc.
References gem5::X86ISA::AddrSizeFlagMask, gem5::X86ISA::AddrSizeFlagShift, gem5::X86ISA::misc_reg::ApicBase, gem5::ArmISA::attr, gem5::X86ISA::base, gem5::ThreadContext::contextId(), gem5::X86ISA::CPL0FlagBit, gem5::X86ISA::misc_reg::Cr0, DPRINTF, gem5::X86ISA::segment_idx::Es, gem5::BaseMMU::Execute, gem5::X86ISA::expandDown, fatal, flags, gem5::FullSystem, gem5::ThreadContext::getProcessPtr(), hitLatency, gem5::X86ISA::segment_idx::Hs, gem5::X86ISA::segment_idx::Idtr, insert(), gem5::PCStateBase::instAddr(), gem5::X86ISA::limit, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBAccesses, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBHits, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBMisses, lookup(), gem5::X86ISA::segment_idx::Ls, gem5::X86ISA::misc_reg::M5Reg, gem5::X86ISA::mask, missLatency1, missLatency2, gem5::X86ISA::mode, gem5::X86ISA::segment_idx::Ms, gem5::NoFault, gem5::X86ISA::offset, gem5::X86ISA::p, gem5::EmulationPageTable::Entry::paddr, gem5::X86ISA::TlbEntry::paddr, gem5::X86ISA::PageBytes, gem5::ThreadContext::pcState(), gem5::BaseMMU::Read, gem5::Request::READ_MODIFY_WRITE, gem5::ThreadContext::readMiscRegNoEffect(), gem5::X86ISA::seg, gem5::X86ISA::misc_reg::segAttr(), gem5::X86ISA::misc_reg::segBase(), gem5::X86ISA::misc_reg::segLimit(), gem5::X86ISA::SegmentFlagMask, gem5::X86ISA::misc_reg::segSel(), size, gem5::X86ISA::TlbEntry::size(), stats, translateInt(), gem5::X86ISA::segment_idx::Tsg, gem5::Request::UNCACHEABLE, gem5::X86ISA::TlbEntry::uncacheable, gem5::X86ISA::TlbEntry::user, gem5::MipsISA::vaddr, warn_once, gem5::X86ISA::TlbEntry::writable, gem5::BaseMMU::Write, and gem5::X86ISA::x86LocalAPICAddress().
Referenced by translateAtomic(), and translateTiming().
Fault gem5::X86ISA::GpuTLB::translateAtomic | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Mode | mode, | ||
int & | latency ) |
Definition at line 615 of file tlb.cc.
References gem5::X86ISA::mode, and translate().
|
protected |
Definition at line 302 of file tlb.cc.
References gem5::bits(), configAddress, DPRINTF, gem5::X86ISA::IntAddrPrefixCPUID, gem5::X86ISA::IntAddrPrefixIO, gem5::X86ISA::IntAddrPrefixMask, gem5::X86ISA::IntAddrPrefixMSR, gem5::X86ISA::mask, gem5::mbits(), gem5::X86ISA::msrAddrToIndex(), gem5::NoFault, panic, gem5::X86ISA::misc_reg::PciConfigAddress, gem5::X86ISA::PhysAddrPrefixIO, gem5::X86ISA::PhysAddrPrefixPciConfig, gem5::ThreadContext::readMiscRegNoEffect(), gem5::Request::STRICT_ORDER, gem5::Request::UNCACHEABLE, and gem5::MipsISA::vaddr.
Referenced by translate().
void gem5::X86ISA::GpuTLB::translateTiming | ( | const RequestPtr & | req, |
ThreadContext * | tc, | ||
Translation * | translation, | ||
Mode | mode, | ||
int & | latency ) |
Definition at line 625 of file tlb.cc.
References gem5::X86ISA::GpuTLB::Translation::finish(), gem5::X86ISA::mode, and translate().
void gem5::X86ISA::GpuTLB::translationReturn | ( | Addr | virtPageAddr, |
tlbOutcome | outcome, | ||
PacketPtr | pkt ) |
A TLBEvent is scheduled after the TLB lookup and helps us take the appropriate actions: (e.g., update TLB on a hit, send request to lower level TLB on a miss, or start a page walk if this was the last-level TLB).
Here we take the appropriate actions based on the result of the TLB lookup.
There is a TLB below. Send the coalesced request. We actually send the very first packet of all the pending packets for this virtual page address.
we add an extra cycle in the return path of the translation requests in between the various TLB levels.
Definition at line 874 of file tlb.cc.
References gem5::X86ISA::GpuTLB::GpuTLBStats::accessCycles, gem5::curTick(), gem5::Clocked::cyclesToTicks(), DPRINTF, gem5::BaseMMU::Execute, gem5::ThreadContext::getProcessPtr(), handleTranslationReturn(), hasMemSidePort, gem5::GpuTranslationState::isPrefetch, gem5::X86ISA::GpuTLB::GpuTLBStats::localCycles, memSidePort, MISS_RETURN, missLatency2, gem5::X86ISA::p, gem5::EmulationPageTable::Entry::paddr, PAGE_WALK, gem5::X86ISA::GpuTLB::GpuTLBStats::pageTableCycles, panic, gem5::Packet::req, gem5::GpuTranslationState::reqCnt, gem5::safe_cast(), gem5::EventManager::schedule(), gem5::Packet::senderState, stats, gem5::GpuTranslationState::tc, TLB_HIT, TLB_MISS, gem5::GpuTranslationState::tlbEntry, gem5::GpuTranslationState::tlbMode, translationReturnEvent, gem5::X86ISA::GpuTLB::TLBEvent::updateOutcome(), and gem5::MipsISA::vaddr.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Reimplemented from gem5::ClockedObject.
void gem5::X86ISA::GpuTLB::updatePageFootprint | ( | Addr | virt_page_addr | ) |
Definition at line 1298 of file tlb.cc.
References accessDistance, gem5::X86ISA::GpuTLB::AccessInfo::accessesPerPage, gem5::curTick(), gem5::X86ISA::GpuTLB::AccessInfo::lastTimeAccessed, gem5::X86ISA::GpuTLB::GpuTLBStats::localNumTLBAccesses, gem5::X86ISA::GpuTLB::AccessInfo::meanDistance, gem5::X86ISA::GpuTLB::GpuTLBStats::numUniquePages, stats, gem5::X86ISA::GpuTLB::AccessInfo::sumDistance, TLBFootprint, gem5::X86ISA::GpuTLB::AccessInfo::totalReuseDistance, and gem5::statistics::ScalarBase< Derived, Stor >::value().
Referenced by issueTLBLookup().
void gem5::X86ISA::GpuTLB::updatePhysAddresses | ( | Addr | virt_page_addr, |
TlbEntry * | tlb_entry, | ||
Addr | phys_page_addr ) |
|
protected |
Print out accessDistance stats.
One stat file per TLB.
Definition at line 141 of file tlb.hh.
Referenced by exitCallback(), and updatePageFootprint().
|
protected |
Allocation Policy: true if we always allocate on a hit, false otherwise.
Default is true.
Definition at line 130 of file tlb.hh.
Referenced by handleFuncTranslationReturn(), and handleTranslationReturn().
EventFunctionWrapper gem5::X86ISA::GpuTLB::cleanupEvent |
Definition at line 318 of file tlb.hh.
Referenced by handleTranslationReturn().
std::queue<Addr> gem5::X86ISA::GpuTLB::cleanupQueue |
Definition at line 312 of file tlb.hh.
Referenced by cleanup(), and handleTranslationReturn().
|
protected |
Definition at line 72 of file tlb.hh.
Referenced by setConfigAddress(), and translateInt().
std::vector<CpuSidePort*> gem5::X86ISA::GpuTLB::cpuSidePort |
Definition at line 260 of file tlb.hh.
Referenced by cleanup(), getPort(), and handleTranslationReturn().
|
protected |
An entryList per set is the equivalent of an LRU stack; it's used to guide replacement decisions.
The head of the list contains the MRU TLB entry of the given set. If the freeList for this set is empty, the last element of the list is evicted (i.e., dropped on the floor).
Definition at line 159 of file tlb.hh.
Referenced by demapPage(), insert(), invalidateAll(), invalidateNonGlobal(), lookup(), and lookupIt().
EventFunctionWrapper gem5::X86ISA::GpuTLB::exitEvent |
|
protected |
true if this is a fully-associative TLB
Definition at line 123 of file tlb.hh.
Referenced by lookupIt().
|
protected |
Definition at line 150 of file tlb.hh.
Referenced by demapPage(), insert(), invalidateAll(), and invalidateNonGlobal().
|
protected |
if true, then this is not the last level TLB
Definition at line 135 of file tlb.hh.
Referenced by getPort(), and translationReturn().
int gem5::X86ISA::GpuTLB::hitLatency |
Definition at line 170 of file tlb.hh.
Referenced by issueTLBLookup(), and translate().
std::vector<MemSidePort*> gem5::X86ISA::GpuTLB::memSidePort |
Definition at line 262 of file tlb.hh.
Referenced by getPort(), and translationReturn().
int gem5::X86ISA::GpuTLB::missLatency1 |
Definition at line 171 of file tlb.hh.
Referenced by translate().
int gem5::X86ISA::GpuTLB::missLatency2 |
Definition at line 172 of file tlb.hh.
Referenced by translate(), and translationReturn().
|
protected |
Definition at line 118 of file tlb.hh.
Referenced by invalidateAll(), and invalidateNonGlobal().
int gem5::X86ISA::GpuTLB::outstandingReqs |
|
protected |
Definition at line 124 of file tlb.hh.
Referenced by demapPage(), insert(), lookup(), and lookupIt().
|
protected |
Definition at line 116 of file tlb.hh.
Referenced by translate().
|
protected |
Referenced by exitCallback(), issueTLBLookup(), tlbLookup(), translate(), translationReturn(), and updatePageFootprint().
|
protected |
Definition at line 143 of file tlb.hh.
Referenced by gem5::X86ISA::GpuTLB::TLBEvent::process(), gem5::X86ISA::GpuTLB::CpuSidePort::recvFunctional(), gem5::X86ISA::GpuTLB::CpuSidePort::recvTimingReq(), and gem5::X86ISA::GpuTLB::MemSidePort::recvTimingResp().
AccessPatternTable gem5::X86ISA::GpuTLB::TLBFootprint |
Definition at line 346 of file tlb.hh.
Referenced by exitCallback(), and updatePageFootprint().
Definition at line 308 of file tlb.hh.
Referenced by cleanup(), issueTLBLookup(), translationReturn(), and ~GpuTLB().
|
protected |
Definition at line 107 of file tlb.hh.
Referenced by getWalker().