gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::ArmISA::TableWalker Class Reference

#include <table_walker.hh>

Inheritance diagram for gem5::ArmISA::TableWalker:
gem5::ClockedObject gem5::SimObject gem5::Clocked gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named

Classes

class  DescriptorBase
 
class  L1Descriptor
 
class  L2Descriptor
 Level 2 page table descriptor. More...
 
class  LongDescriptor
 Long-descriptor format (LPAE) More...
 
class  Port
 
class  Stage2Walk
 This translation class is used to trigger the data fetch once a timing translation returns the translated physical address. More...
 
class  TableWalkerState
 
struct  TableWalkerStats
 Statistics. More...
 
class  WalkerState
 

Public Member Functions

Fault readDataUntimed (ThreadContext *tc, Addr vaddr, Addr desc_addr, uint8_t *data, int num_bytes, Request::Flags flags, BaseMMU::Mode mode, MMU::ArmTranslationType tran_type, bool functional)
 
void readDataTimed (ThreadContext *tc, Addr desc_addr, Stage2Walk *translation, int num_bytes, Request::Flags flags)
 
 PARAMS (ArmTableWalker)
 
 TableWalker (const Params &p)
 
virtual ~TableWalker ()
 
bool haveLargeAsid64 () const
 
uint8_t physAddrRange () const
 
void completeDrain ()
 Checks if all state is cleared and if so, completes drain.
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining.
 
void drainResume () override
 Resume execution after a successful drain.
 
gem5::PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Get a port with a given name and index.
 
PortgetTableWalkerPort ()
 
Fault walk (const RequestPtr &req, ThreadContext *tc, uint16_t asid, vmid_t _vmid, BaseMMU::Mode mode, BaseMMU::Translation *_trans, bool timing, bool functional, bool secure, MMU::ArmTranslationType tran_type, bool stage2, const TlbEntry *walk_entry)
 
void setMmu (MMU *_mmu)
 
void setTlb (TLB *_tlb)
 
TLBgetTlb ()
 
void memAttrs (ThreadContext *tc, TlbEntry &te, SCTLR sctlr, uint8_t texcb, bool s)
 
void memAttrsLPAE (ThreadContext *tc, TlbEntry &te, LongDescriptor &lDescriptor)
 
void memAttrsAArch64 (ThreadContext *tc, TlbEntry &te, LongDescriptor &lDescriptor)
 
void memAttrsWalkAArch64 (TlbEntry &te)
 
void setTestInterface (TlbTestInterface *ti)
 
Fault testWalk (const RequestPtr &walk_req, TlbEntry::DomainType domain, LookupLevel lookup_level)
 
- Public Member Functions inherited from gem5::ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () 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.
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object.
 
virtual void startup ()
 startup() is the final initialization call before simulation.
 
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
EventQueueeventQueue () 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 InforesolveStat (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
 
Groupoperator= (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
 

Static Public Member Functions

static LookupLevel toLookupLevel (uint8_t lookup_level_as_int)
 
- 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 SimObjectfind (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 SimObjectResolvergetSimObjectResolver ()
 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.
 

Public Attributes

TlbTestInterfacetest
 
- Public Attributes inherited from gem5::ClockedObject
PowerStatepowerState
 

Protected Attributes

std::list< WalkerState * > stateQueues [LookupLevel::Num_ArmLookupLevel]
 Queues of requests for all the different lookup levels.
 
std::list< WalkerState * > pendingQueue
 Queue of requests that have passed are waiting because the walker is currently busy.
 
MMUmmu
 The MMU to forward second stage look upts to.
 
RequestorID requestorId
 Requestor id assigned by the MMU.
 
Portport
 Port shared by the two table walkers.
 
const bool isStage2
 Indicates whether this table walker is part of the stage 2 mmu.
 
TLBtlb
 TLB that is initiating these table walks.
 
SCTLR sctlr
 Cached copy of the sctlr as it existed when translation began.
 
WalkerStatecurrState
 
bool pending
 If a timing translation is currently in progress.
 
unsigned numSquashable
 The number of walks belonging to squashed instructions that can be removed from the pendingQueue per cycle.
 
const ArmReleaserelease
 Cached copies of system-level properties.
 
uint8_t _physAddrRange
 
bool _haveLargeAsid64
 
gem5::ArmISA::TableWalker::TableWalkerStats stats
 
unsigned pendingReqs
 
Tick pendingChangeTick
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters.
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue.
 

Static Protected Attributes

static const unsigned REQUESTED = 0
 
static const unsigned COMPLETED = 1
 

Private Types

using LookupLevel = enums::ArmLookupLevel
 

Private Member Functions

void doL1Descriptor ()
 
void doL1DescriptorWrapper ()
 
void doL2Descriptor ()
 
void doL2DescriptorWrapper ()
 
void doLongDescriptor ()
 
void doL0LongDescriptorWrapper ()
 
void doL1LongDescriptorWrapper ()
 
void doL2LongDescriptorWrapper ()
 
void doL3LongDescriptorWrapper ()
 
void doLongDescriptorWrapper (LookupLevel curr_lookup_level)
 
void fetchDescriptor (Addr desc_addr, DescriptorBase &descriptor, int num_bytes, Request::Flags flags, LookupLevel lookup_lvl, Event *event, void(TableWalker::*doDescriptor)())
 
Fault generateLongDescFault (ArmFault::FaultSource src)
 
void insertTableEntry (DescriptorBase &descriptor, bool longDescriptor)
 
void insertPartialTableEntry (LongDescriptor &descriptor)
 
std::tuple< Addr, Addr, LookupLevelwalkAddresses (Addr ttbr, GrainSize tg, int tsz, int pa_range)
 Returns a tuple made of: 1) The address of the first page table 2) The address of the first descriptor within the table 3) The page table level.
 
Fault processWalk ()
 
Fault processWalkLPAE ()
 
bool checkVAddrSizeFaultAArch64 (Addr addr, int top_bit, GrainSize granule, int tsz, bool low_range)
 
bool checkAddrSizeFaultAArch64 (Addr addr, int pa_range)
 Returns true if the address exceeds the range permitted by the system-wide setting or by the TCR_ELx IPS/PS setting.
 
bool uncacheableWalk () const
 Returns true if the table walk should be uncacheable.
 
Fault processWalkAArch64 ()
 
void processWalkWrapper ()
 
void nextWalk (ThreadContext *tc)
 
void pendingChange ()
 
void stashCurrState (int queue_idx)
 Timing mode: saves the currState into the stateQueues.
 
void mpamTagTableWalk (RequestPtr &req) const
 

Static Private Member Functions

static uint8_t pageSizeNtoStatBin (uint8_t N)
 

Private Attributes

EventFunctionWrapper doL1DescEvent
 
EventFunctionWrapper doL2DescEvent
 
EventFunctionWrapper doL0LongDescEvent
 
EventFunctionWrapper doL1LongDescEvent
 
EventFunctionWrapper doL2LongDescEvent
 
EventFunctionWrapper doL3LongDescEvent
 
EventLongDescEventByLevel [4]
 
EventFunctionWrapper doProcessEvent
 

Additional Inherited Members

- Public Types inherited from gem5::ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject.
 
- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
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
 
Clockedoperator= (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.
 

Detailed Description

Definition at line 66 of file table_walker.hh.

Member Typedef Documentation

◆ LookupLevel

using gem5::ArmISA::TableWalker::LookupLevel = enums::ArmLookupLevel
private

Definition at line 68 of file table_walker.hh.

Constructor & Destructor Documentation

◆ TableWalker()

gem5::TableWalker::TableWalker ( const Params & p)

Definition at line 63 of file table_walker.cc.

References doL1DescriptorWrapper().

◆ ~TableWalker()

gem5::TableWalker::~TableWalker ( )
virtual

Definition at line 100 of file table_walker.cc.

Member Function Documentation

◆ checkAddrSizeFaultAArch64()

bool gem5::TableWalker::checkAddrSizeFaultAArch64 ( Addr addr,
int pa_range )
private

Returns true if the address exceeds the range permitted by the system-wide setting or by the TCR_ELx IPS/PS setting.

Definition at line 867 of file table_walker.cc.

References _physAddrRange, gem5::X86ISA::addr, and gem5::bits().

Referenced by doLongDescriptor(), and processWalkAArch64().

◆ checkVAddrSizeFaultAArch64()

bool gem5::TableWalker::checkVAddrSizeFaultAArch64 ( Addr addr,
int top_bit,
GrainSize granule,
int tsz,
bool low_range )
private

◆ completeDrain()

void gem5::TableWalker::completeDrain ( )

Checks if all state is cleared and if so, completes drain.

Definition at line 240 of file table_walker.cc.

References DPRINTF, gem5::Draining, gem5::Drainable::drainState(), pendingQueue, gem5::Drainable::signalDrainDone(), and stateQueues.

Referenced by nextWalk().

◆ doL0LongDescriptorWrapper()

void gem5::TableWalker::doL0LongDescriptorWrapper ( )
private

Definition at line 2028 of file table_walker.cc.

References doLongDescriptorWrapper().

◆ doL1Descriptor()

void gem5::TableWalker::doL1Descriptor ( )
private
Todo
: check sctlr.ha (bit[17]) if Hardware Access Flag is enabled if set, do l1.Desc.setAp0() instead of generating AccessFlag0

Definition at line 1600 of file table_walker.cc.

References gem5::ArmISA::ArmFault::AccessFlagLL, gem5::ArmISA::TableWalker::L1Descriptor::ap(), gem5::bits(), gem5::ArmISA::byteOrder(), currState, gem5::ArmISA::TableWalker::L1Descriptor::data, gem5::ArmISA::TableWalker::WalkerState::delayed, doL2DescEvent, doL2Descriptor(), gem5::ArmISA::TableWalker::L1Descriptor::domain(), DPRINTF, gem5::ArmISA::TableWalker::WalkerState::fault, fetchDescriptor(), gem5::htog(), gem5::ArmISA::TableWalker::L1Descriptor::Ignore, insertTableEntry(), gem5::ArmISA::TableWalker::WalkerState::isFetch, gem5::ArmISA::TableWalker::WalkerState::isSecure, isStage2, gem5::ArmISA::TableWalker::WalkerState::isUncacheable, gem5::ArmISA::TableWalker::WalkerState::isWrite, gem5::ArmISA::TableWalker::WalkerState::l1Desc, gem5::ArmISA::TableWalker::L1Descriptor::l2Addr(), gem5::ArmISA::TableWalker::WalkerState::l2Desc, gem5::ArmISA::TlbEntry::NoAccess, gem5::NoFault, gem5::ArmISA::TableWalker::L1Descriptor::PageTable, panic, gem5::Request::PT_WALK, gem5::ArmISA::TableWalker::WalkerState::req, gem5::ArmISA::TableWalker::L1Descriptor::Reserved, gem5::ArmISA::TableWalker::WalkerState::sctlr, gem5::ArmISA::TableWalker::L1Descriptor::Section, gem5::Request::SECURE, gem5::ArmISA::TableWalker::WalkerState::secureLookup, gem5::Flags< T >::set(), gem5::ArmISA::TableWalker::L1Descriptor::supersection(), gem5::ArmISA::TableWalker::WalkerState::tc, gem5::ArmISA::te, gem5::ArmISA::TableWalker::WalkerState::timing, gem5::ArmISA::ArmFault::TranslationLL, gem5::ArmISA::TableWalker::L1Descriptor::type(), gem5::Request::UNCACHEABLE, gem5::ArmISA::TableWalker::WalkerState::vaddr, gem5::ArmISA::TableWalker::WalkerState::vaddr_tainted, and gem5::ArmISA::ArmFault::VmsaTran.

Referenced by processWalk().

◆ doL1DescriptorWrapper()

void gem5::ArmISA::TableWalker::doL1DescriptorWrapper ( )
private

Referenced by TableWalker().

◆ doL1LongDescriptorWrapper()

void gem5::TableWalker::doL1LongDescriptorWrapper ( )
private

Definition at line 2034 of file table_walker.cc.

References doLongDescriptorWrapper().

◆ doL2Descriptor()

◆ doL2DescriptorWrapper()

◆ doL2LongDescriptorWrapper()

void gem5::TableWalker::doL2LongDescriptorWrapper ( )
private

Definition at line 2040 of file table_walker.cc.

References doLongDescriptorWrapper().

◆ doL3LongDescriptorWrapper()

void gem5::TableWalker::doL3LongDescriptorWrapper ( )
private

Definition at line 2046 of file table_walker.cc.

References doLongDescriptorWrapper().

◆ doLongDescriptor()

void gem5::TableWalker::doLongDescriptor ( )
private

Definition at line 1712 of file table_walker.cc.

References gem5::ArmISA::TableWalker::WalkerState::aarch64, gem5::ArmISA::ArmFault::AccessFlagLL, gem5::ArmISA::ArmFault::AddressSizeLL, gem5::ArmISA::TableWalker::LongDescriptor::af(), gem5::ArmISA::TableWalker::LongDescriptor::ap(), gem5::ArmISA::TableWalker::LongDescriptor::Block, gem5::ArmISA::byteOrder(), checkAddrSizeFaultAArch64(), currState, gem5::ArmISA::TableWalker::LongDescriptor::data, gem5::ArmISA::TableWalker::WalkerState::delayed, doLongDescriptor(), DPRINTF, gem5::MipsISA::event, gem5::ArmISA::TableWalker::WalkerState::fault, gem5::ArmISA::ArmFault::FaultSourceInvalid, fetchDescriptor(), generateLongDescFault(), gem5::ArmISA::MMU::hasWalkCache(), gem5::ArmISA::TableWalker::WalkerState::hpd, gem5::htog(), insertPartialTableEntry(), insertTableEntry(), gem5::ArmISA::TableWalker::LongDescriptor::Invalid, gem5::ArmISA::TableWalker::WalkerState::isUncacheable, gem5::X86ISA::L, gem5::ArmISA::TableWalker::WalkerState::longDesc, gem5::ArmISA::TableWalker::WalkerState::longDescData, LongDescEventByLevel, gem5::ArmISA::TableWalker::DescriptorBase::lookupLevel, mmu, gem5::ArmISA::TableWalker::LongDescriptor::nextDescAddr(), gem5::NoFault, gem5::ArmISA::TableWalker::LongDescriptor::paddr(), gem5::ArmISA::TableWalker::LongDescriptor::Page, panic, gem5::ArmISA::TableWalker::WalkerState::physAddrRange, gem5::Request::PT_WALK, gem5::ArmISA::TableWalker::LongDescriptor::pxn(), gem5::ArmISA::TableWalker::LongDescriptor::pxnTable(), gem5::ArmISA::TableWalker::WalkerState::req, gem5::ArmISA::TableWalker::LongDescriptor::rwTable(), gem5::ArmISA::TableWalker::WalkerState::sctlr, gem5::Request::SECURE, gem5::ArmISA::TableWalker::WalkerState::secureLookup, gem5::ArmISA::TableWalker::LongDescriptor::secureTable(), gem5::Flags< T >::set(), gem5::ArmISA::TableWalker::LongDescriptor::Table, gem5::ArmISA::TableWalker::WalkerState::tc, gem5::ArmISA::te, gem5::ArmISA::TableWalker::WalkerState::timing, gem5::ArmISA::ArmFault::TranslationLL, gem5::ArmISA::TableWalker::LongDescriptor::type(), gem5::Request::UNCACHEABLE, gem5::ArmISA::TableWalker::LongDescriptor::userTable(), gem5::ArmISA::TableWalker::WalkerState::vaddr, gem5::ArmISA::TableWalker::WalkerState::vaddr_tainted, gem5::ArmISA::TableWalker::LongDescriptor::xn(), and gem5::ArmISA::TableWalker::LongDescriptor::xnTable().

Referenced by doLongDescriptor(), doLongDescriptorWrapper(), processWalkAArch64(), and processWalkLPAE().

◆ doLongDescriptorWrapper()

◆ drain()

DrainState gem5::TableWalker::drain ( )
overridevirtual

Provide a default implementation of the drain interface for objects that don't need draining.

Reimplemented from gem5::SimObject.

Definition at line 255 of file table_walker.cc.

References DPRINTF, gem5::Drained, gem5::Draining, gem5::ArmISA::i, pendingQueue, and stateQueues.

◆ drainResume()

void gem5::TableWalker::drainResume ( )
overridevirtual

Resume execution after a successful drain.

Reimplemented from gem5::Drainable.

Definition at line 276 of file table_walker.cc.

References currState, gem5::SimObject::params(), and pendingChange().

◆ fetchDescriptor()

◆ generateLongDescFault()

Fault gem5::ArmISA::TableWalker::generateLongDescFault ( ArmFault::FaultSource src)
private

Referenced by doLongDescriptor().

◆ getPort()

Port & gem5::TableWalker::getPort ( const std::string & if_name,
PortID idx = InvalidPortID )
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.

Parameters
if_namePort name
idxIndex in the case of a VectorPort
Returns
A reference to the given port

Reimplemented from gem5::SimObject.

Definition at line 112 of file table_walker.cc.

References gem5::SimObject::getPort(), and port.

Referenced by getTableWalkerPort().

◆ getTableWalkerPort()

TableWalker::Port & gem5::TableWalker::getTableWalkerPort ( )

Definition at line 106 of file table_walker.cc.

References getPort().

Referenced by gem5::ArmISA::TLB::getTableWalkerPort().

◆ getTlb()

TLB * gem5::ArmISA::TableWalker::getTlb ( )
inline

Definition at line 1140 of file table_walker.hh.

References tlb.

◆ haveLargeAsid64()

bool gem5::ArmISA::TableWalker::haveLargeAsid64 ( ) const
inline

Definition at line 1119 of file table_walker.hh.

References _haveLargeAsid64.

◆ insertPartialTableEntry()

◆ insertTableEntry()

void gem5::TableWalker::insertTableEntry ( DescriptorBase & descriptor,
bool longDescriptor )
private

Definition at line 2254 of file table_walker.cc.

References gem5::ArmISA::TableWalker::WalkerState::aarch64, gem5::ArmISA::TableWalker::DescriptorBase::ap(), gem5::ArmISA::TableWalker::LongDescriptor::ap(), gem5::ArmISA::TableWalker::WalkerState::asid, COMPLETED, currState, gem5::ArmISA::TableWalker::DescriptorBase::dbgHeader(), gem5::ArmISA::TableWalker::DescriptorBase::domain(), DPRINTF, gem5::BaseMMU::Execute, gem5::ArmISA::TableWalker::DescriptorBase::getRawData(), gem5::ArmISA::TableWalker::DescriptorBase::global(), gem5::ArmISA::TableWalker::LongDescriptor::grainSize, gem5::ArmRelease::has(), gem5::ArmISA::TableWalker::WalkerState::isFetch, gem5::ArmISA::TableWalker::WalkerState::isSecure, isStage2, gem5::ArmISA::TableWalker::WalkerState::longDescData, gem5::ArmISA::TableWalker::DescriptorBase::lookupLevel, memAttrs(), memAttrsAArch64(), memAttrsLPAE(), gem5::ArmISA::TableWalker::WalkerState::mode, gem5::ArmISA::TLB::multiInsert(), gem5::ArmISA::TableWalker::DescriptorBase::offsetBits(), pageSizeNtoStatBin(), gem5::ArmISA::TableWalker::TableWalkerStats::pageSizes, gem5::ArmISA::TableWalker::DescriptorBase::pfn(), gem5::ArmISA::TableWalker::LongDescriptor::pxn(), gem5::ArmISA::TableWalker::WalkerState::regime, release, gem5::ArmISA::TableWalker::WalkerState::req, gem5::ArmISA::TableWalker::TableWalkerStats::requestOrigin, gem5::ArmISA::TableWalker::WalkerState::sctlr, gem5::ArmISA::TableWalker::DescriptorBase::secure(), gem5::ArmISA::TableWalker::DescriptorBase::shareable(), gem5::ArmISA::TLB::size, stats, gem5::ArmISA::TableWalker::WalkerState::tc, gem5::ArmISA::te, gem5::ArmISA::TableWalker::DescriptorBase::texcb(), gem5::ArmISA::TableWalker::WalkerState::timing, tlb, gem5::ArmISA::TableWalker::WalkerState::vaddr, gem5::ArmISA::TlbEntry::valid, gem5::ArmISA::TableWalker::WalkerState::vmid, gem5::ArmISA::TLB::vmid, and gem5::ArmISA::TableWalker::DescriptorBase::xn().

Referenced by doL1Descriptor(), doL2Descriptor(), and doLongDescriptor().

◆ memAttrs()

◆ memAttrsAArch64()

◆ memAttrsLPAE()

◆ memAttrsWalkAArch64()

◆ mpamTagTableWalk()

void gem5::TableWalker::mpamTagTableWalk ( RequestPtr & req) const
private

◆ nextWalk()

void gem5::TableWalker::nextWalk ( ThreadContext * tc)
private

◆ pageSizeNtoStatBin()

uint8_t gem5::TableWalker::pageSizeNtoStatBin ( uint8_t N)
staticprivate

Definition at line 2383 of file table_walker.cc.

References panic.

Referenced by insertTableEntry().

◆ PARAMS()

gem5::ArmISA::TableWalker::PARAMS ( ArmTableWalker )

◆ pendingChange()

◆ physAddrRange()

uint8_t gem5::ArmISA::TableWalker::physAddrRange ( ) const
inline

Definition at line 1120 of file table_walker.hh.

References _physAddrRange.

◆ processWalk()

◆ processWalkAArch64()

Fault gem5::TableWalker::processWalkAArch64 ( )
private

Definition at line 874 of file table_walker.cc.

References _physAddrRange, gem5::ArmISA::TableWalker::LongDescriptor::aarch64, gem5::ArmISA::TableWalker::WalkerState::aarch64, gem5::ArmISA::ArmFault::AddressSizeLL, gem5::bits(), checkAddrSizeFaultAArch64(), checkVAddrSizeFaultAArch64(), gem5::ArmISA::computeAddrTop(), currState, gem5::curTick(), gem5::ArmISA::decodePhysAddrRange64(), doLongDescriptor(), DPRINTF, gem5::ArmISA::TableWalker::WalkerState::el, gem5::ArmISA::EL10, gem5::ArmISA::EL2, gem5::ArmISA::EL20, gem5::ArmISA::EL3, gem5::BaseMMU::Execute, gem5::ArmISA::TableWalker::WalkerState::fault, fetchDescriptor(), gem5::ArmISA::Grain4KB, gem5::ArmISA::GrainMap_tg0, gem5::ArmISA::GrainMap_tg1, gem5::ArmISA::TableWalker::LongDescriptor::grainSize, gem5::ArmISA::TableWalker::WalkerState::hcr, gem5::ArmISA::TableWalker::WalkerState::hpd, gem5::ArmISA::TableWalker::WalkerState::irgn, gem5::ArmISA::TableWalker::WalkerState::isFetch, isStage2, gem5::ArmISA::TableWalker::WalkerState::isUncacheable, gem5::ArmISA::TableWalker::WalkerState::isWrite, gem5::ArmISA::TableWalker::WalkerState::longDesc, LongDescEventByLevel, gem5::ArmISA::TableWalker::DescriptorBase::lookupLevel, gem5::ArmISA::ArmFault::LpaeTran, gem5::ArmISA::MISCREG_TTBR0_EL1, gem5::ArmISA::MISCREG_TTBR0_EL2, gem5::ArmISA::MISCREG_TTBR0_EL3, gem5::ArmISA::MISCREG_TTBR1_EL1, gem5::ArmISA::MISCREG_TTBR1_EL2, gem5::ArmISA::MISCREG_VSTTBR_EL2, gem5::ArmISA::MISCREG_VTTBR_EL2, gem5::ArmISA::TableWalker::WalkerState::mode, gem5::ArmISA::TlbEntry::NoAccess, gem5::ArmISA::TableWalker::WalkerState::orgn, gem5::ArmISA::TableWalker::LongDescriptor::physAddrRange, gem5::ArmISA::TableWalker::WalkerState::physAddrRange, gem5::ArmISA::ps, gem5::Request::PT_WALK, gem5::ThreadContext::readMiscReg(), gem5::ArmISA::TableWalker::WalkerState::regime, gem5::ArmISA::TableWalker::WalkerState::req, gem5::ArmISA::ReservedGrain, gem5::statistics::DistBase< Derived, Stor >::sample(), gem5::Request::SECURE, gem5::ArmISA::TableWalker::WalkerState::secureLookup, gem5::Flags< T >::set(), gem5::ArmISA::TableWalker::WalkerState::sh, gem5::ArmISA::TableWalker::WalkerState::startTime, stats, gem5::ArmISA::TableWalker::WalkerState::tc, gem5::ArmISA::TableWalker::WalkerState::tcr, gem5::ArmISA::ArmFault::TranslationLL, gem5::Request::UNCACHEABLE, uncacheableWalk(), gem5::ArmISA::TableWalker::WalkerState::vaddr, gem5::ArmISA::TableWalker::WalkerState::vaddr_tainted, gem5::ArmISA::TableWalker::WalkerState::vtcr, walkAddresses(), gem5::ArmISA::TableWalker::TableWalkerStats::walkWaitTime, and warn_once.

Referenced by walk().

◆ processWalkLPAE()

Fault gem5::TableWalker::processWalkLPAE ( )
private

Definition at line 694 of file table_walker.cc.

References gem5::ArmISA::TableWalker::LongDescriptor::aarch64, gem5::bits(), currState, gem5::curTick(), doLongDescriptor(), DPRINTF, gem5::ArmISA::TableWalker::WalkerState::el, gem5::ArmISA::EL2, gem5::ArmISA::TableWalker::WalkerState::fault, fetchDescriptor(), gem5::ArmISA::Grain4KB, gem5::ArmISA::TableWalker::LongDescriptor::grainSize, gem5::ArmISA::TableWalker::WalkerState::htcr, gem5::ArmISA::TableWalker::WalkerState::isFetch, gem5::ArmISA::TableWalker::WalkerState::isSecure, isStage2, gem5::ArmISA::TableWalker::WalkerState::isUncacheable, gem5::ArmISA::TableWalker::WalkerState::isWrite, gem5::ArmISA::TableWalker::WalkerState::longDesc, LongDescEventByLevel, gem5::ArmISA::longDescFormatInUse(), gem5::ArmISA::TableWalker::DescriptorBase::lookupLevel, gem5::ArmISA::ArmFault::LpaeTran, gem5::mbits(), gem5::ArmISA::MISCREG_HTTBR, gem5::ArmISA::MISCREG_TTBR0, gem5::ArmISA::MISCREG_TTBR1, gem5::ArmISA::MISCREG_VTTBR, gem5::ArmISA::n, gem5::ArmISA::TlbEntry::NoAccess, gem5::Request::PT_WALK, gem5::ThreadContext::readMiscReg(), gem5::ArmISA::TableWalker::WalkerState::req, gem5::statistics::DistBase< Derived, Stor >::sample(), gem5::Request::SECURE, gem5::ArmISA::TableWalker::WalkerState::secureLookup, gem5::Flags< T >::set(), gem5::sext(), gem5::ArmISA::snsBankedIndex(), gem5::ArmISA::TableWalker::WalkerState::startTime, stats, gem5::ArmISA::TableWalker::WalkerState::tc, gem5::ArmISA::ArmFault::TranslationLL, gem5::ArmISA::TableWalker::WalkerState::ttbcr, gem5::Request::UNCACHEABLE, uncacheableWalk(), gem5::ArmISA::TableWalker::WalkerState::vaddr, gem5::ArmISA::TableWalker::WalkerState::vaddr_tainted, gem5::ArmISA::TableWalker::WalkerState::vtcr, and gem5::ArmISA::TableWalker::TableWalkerStats::walkWaitTime.

Referenced by walk().

◆ processWalkWrapper()

void gem5::ArmISA::TableWalker::processWalkWrapper ( )
private

◆ readDataTimed()

void gem5::TableWalker::readDataTimed ( ThreadContext * tc,
Addr desc_addr,
Stage2Walk * translation,
int num_bytes,
Request::Flags flags )

◆ readDataUntimed()

◆ setMmu()

void gem5::TableWalker::setMmu ( MMU * _mmu)

Definition at line 121 of file table_walker.cc.

References mmu, gem5::ArmISA::MMU::release(), and release.

Referenced by gem5::ArmISA::MMU::init().

◆ setTestInterface()

void gem5::TableWalker::setTestInterface ( TlbTestInterface * ti)

Definition at line 2377 of file table_walker.cc.

References gem5::MipsISA::ti.

Referenced by gem5::ArmISA::MMU::setTestInterface().

◆ setTlb()

void gem5::ArmISA::TableWalker::setTlb ( TLB * _tlb)
inline

Definition at line 1139 of file table_walker.hh.

References tlb.

Referenced by gem5::ArmISA::TLB::setTableWalker().

◆ stashCurrState()

void gem5::TableWalker::stashCurrState ( int queue_idx)
private

Timing mode: saves the currState into the stateQueues.

Definition at line 2193 of file table_walker.cc.

References currState, DPRINTF, and stateQueues.

Referenced by doLongDescriptorWrapper(), and walk().

◆ testWalk()

◆ toLookupLevel()

TableWalker::LookupLevel gem5::TableWalker::toLookupLevel ( uint8_t lookup_level_as_int)
static

Definition at line 2331 of file table_walker.cc.

References panic.

◆ uncacheableWalk()

bool gem5::TableWalker::uncacheableWalk ( ) const
private

◆ walk()

Fault gem5::TableWalker::walk ( const RequestPtr & req,
ThreadContext * tc,
uint16_t asid,
vmid_t _vmid,
BaseMMU::Mode mode,
BaseMMU::Translation * _trans,
bool timing,
bool functional,
bool secure,
MMU::ArmTranslationType tran_type,
bool stage2,
const TlbEntry * walk_entry )
Todo
These should be cached or grabbed from cached copies in the TLB, all these miscreg reads are expensive

Definition at line 295 of file table_walker.cc.

References _physAddrRange, gem5::ArmISA::TableWalker::WalkerState::aarch64, gem5::ArmISA::TableWalker::WalkerState::asid, currState, gem5::curTick(), DPRINTF, gem5::ArmISA::TableWalker::WalkerState::el, gem5::ArmISA::EL10, gem5::ArmISA::EL2, gem5::ArmISA::EL20, gem5::ArmISA::EL3, gem5::ArmISA::ELIs64(), gem5::BaseMMU::Execute, gem5::ArmISA::TableWalker::WalkerState::fault, gem5::ArmISA::TableWalker::WalkerState::functional, gem5::ArmRelease::has(), gem5::ArmISA::TableWalker::WalkerState::hcr, gem5::ArmISA::TableWalker::WalkerState::htcr, gem5::hyp, gem5::ArmISA::TableWalker::WalkerState::isFetch, gem5::ArmISA::TableWalker::WalkerState::isSecure, isStage2, gem5::ArmISA::TableWalker::WalkerState::isWrite, gem5::ArmISA::TableWalker::WalkerState::longDesc, gem5::ArmISA::TableWalker::WalkerState::longDescData, gem5::ArmISA::longDescFormatInUse(), gem5::ArmISA::TableWalker::DescriptorBase::lookupLevel, gem5::ArmISA::MISCREG_CPSR, gem5::ArmISA::MISCREG_HCR, gem5::ArmISA::MISCREG_HCR_EL2, gem5::ArmISA::MISCREG_HTCR, gem5::ArmISA::MISCREG_SCR_EL3, gem5::ArmISA::MISCREG_SCTLR, gem5::ArmISA::MISCREG_SCTLR_EL1, gem5::ArmISA::MISCREG_SCTLR_EL2, gem5::ArmISA::MISCREG_SCTLR_EL3, gem5::ArmISA::MISCREG_TCR_EL1, gem5::ArmISA::MISCREG_TCR_EL2, gem5::ArmISA::MISCREG_TCR_EL3, gem5::ArmISA::MISCREG_TTBCR, gem5::ArmISA::MISCREG_VSTCR_EL2, gem5::ArmISA::MISCREG_VTCR, gem5::ArmISA::MISCREG_VTCR_EL2, gem5::ArmISA::TableWalker::WalkerState::mode, nextWalk(), gem5::NoFault, panic, pending, pendingChange(), pendingQueue, gem5::ArmISA::TableWalker::WalkerState::physAddrRange, processWalk(), processWalkAArch64(), processWalkLPAE(), gem5::ArmISA::purifyTaggedAddr(), gem5::ThreadContext::readMiscReg(), gem5::ArmISA::TableWalker::WalkerState::regime, release, gem5::ArmISA::TableWalker::WalkerState::req, REQUESTED, gem5::ArmISA::TableWalker::TableWalkerStats::requestOrigin, sctlr, gem5::ArmISA::TableWalker::WalkerState::sctlr, gem5::ArmISA::TableWalker::WalkerState::secureLookup, gem5::ArmISA::snsBankedIndex(), gem5::ArmISA::TableWalker::TableWalkerStats::squashedBefore, gem5::ArmISA::TableWalker::WalkerState::stage2Req, gem5::ArmISA::TableWalker::WalkerState::startTime, stashCurrState(), stats, gem5::ArmISA::TableWalker::WalkerState::tableWalker, gem5::ArmISA::TableWalker::WalkerState::tc, gem5::ArmISA::TableWalker::WalkerState::tcr, gem5::ArmISA::TableWalker::WalkerState::timing, gem5::ArmISA::translationEl(), gem5::ArmISA::translationRegime(), gem5::ArmISA::TableWalker::WalkerState::transState, gem5::ArmISA::TableWalker::WalkerState::tranType, gem5::ArmISA::MMU::tranTypeEL(), gem5::ArmISA::TableWalker::WalkerState::ttbcr, gem5::ArmISA::TableWalker::WalkerState::vaddr, gem5::ArmISA::TableWalker::WalkerState::vaddr_tainted, gem5::ArmISA::TableWalker::WalkerState::vmid, gem5::ArmISA::TableWalker::WalkerState::vtcr, gem5::ArmISA::TableWalker::WalkerState::walkEntry, gem5::ArmISA::TableWalker::TableWalkerStats::walks, gem5::ArmISA::TableWalker::TableWalkerStats::walksLongDescriptor, gem5::ArmISA::TableWalker::TableWalkerStats::walksShortDescriptor, and gem5::BaseMMU::Write.

Referenced by gem5::ArmISA::MMU::getTE().

◆ walkAddresses()

Member Data Documentation

◆ _haveLargeAsid64

bool gem5::ArmISA::TableWalker::_haveLargeAsid64
protected

Definition at line 1087 of file table_walker.hh.

Referenced by haveLargeAsid64().

◆ _physAddrRange

uint8_t gem5::ArmISA::TableWalker::_physAddrRange
protected

◆ COMPLETED

const unsigned gem5::ArmISA::TableWalker::COMPLETED = 1
staticprotected

Definition at line 1112 of file table_walker.hh.

Referenced by insertTableEntry().

◆ currState

◆ doL0LongDescEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doL0LongDescEvent
private

Definition at line 1164 of file table_walker.hh.

◆ doL1DescEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doL1DescEvent
private

Definition at line 1155 of file table_walker.hh.

Referenced by processWalk().

◆ doL1LongDescEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doL1LongDescEvent
private

Definition at line 1166 of file table_walker.hh.

◆ doL2DescEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doL2DescEvent
private

Definition at line 1159 of file table_walker.hh.

Referenced by doL1Descriptor().

◆ doL2LongDescEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doL2LongDescEvent
private

Definition at line 1168 of file table_walker.hh.

◆ doL3LongDescEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doL3LongDescEvent
private

Definition at line 1170 of file table_walker.hh.

◆ doProcessEvent

EventFunctionWrapper gem5::ArmISA::TableWalker::doProcessEvent
private

Definition at line 1208 of file table_walker.hh.

Referenced by nextWalk().

◆ isStage2

const bool gem5::ArmISA::TableWalker::isStage2
protected

◆ LongDescEventByLevel

Event* gem5::ArmISA::TableWalker::LongDescEventByLevel[4]
private

Definition at line 1173 of file table_walker.hh.

Referenced by doLongDescriptor(), processWalkAArch64(), and processWalkLPAE().

◆ mmu

MMU* gem5::ArmISA::TableWalker::mmu
protected

The MMU to forward second stage look upts to.

Definition at line 1058 of file table_walker.hh.

Referenced by doL2DescriptorWrapper(), doLongDescriptor(), doLongDescriptorWrapper(), insertPartialTableEntry(), readDataUntimed(), and setMmu().

◆ numSquashable

unsigned gem5::ArmISA::TableWalker::numSquashable
protected

The number of walks belonging to squashed instructions that can be removed from the pendingQueue per cycle.

Definition at line 1082 of file table_walker.hh.

◆ pending

bool gem5::ArmISA::TableWalker::pending
protected

If a timing translation is currently in progress.

Definition at line 1078 of file table_walker.hh.

Referenced by doL2DescriptorWrapper(), doLongDescriptorWrapper(), and walk().

◆ pendingChangeTick

Tick gem5::ArmISA::TableWalker::pendingChangeTick
mutableprotected

Definition at line 1109 of file table_walker.hh.

Referenced by pendingChange().

◆ pendingQueue

std::list<WalkerState *> gem5::ArmISA::TableWalker::pendingQueue
protected

Queue of requests that have passed are waiting because the walker is currently busy.

Definition at line 1055 of file table_walker.hh.

Referenced by completeDrain(), drain(), nextWalk(), pendingChange(), and walk().

◆ pendingReqs

unsigned gem5::ArmISA::TableWalker::pendingReqs
mutableprotected

Definition at line 1108 of file table_walker.hh.

Referenced by pendingChange().

◆ port

Port* gem5::ArmISA::TableWalker::port
protected

Port shared by the two table walkers.

Definition at line 1064 of file table_walker.hh.

Referenced by fetchDescriptor(), getPort(), and readDataUntimed().

◆ release

const ArmRelease* gem5::ArmISA::TableWalker::release
protected

Cached copies of system-level properties.

Definition at line 1085 of file table_walker.hh.

Referenced by insertPartialTableEntry(), insertTableEntry(), memAttrsLPAE(), processWalk(), setMmu(), and walk().

◆ REQUESTED

const unsigned gem5::ArmISA::TableWalker::REQUESTED = 0
staticprotected

Definition at line 1111 of file table_walker.hh.

Referenced by walk().

◆ requestorId

RequestorID gem5::ArmISA::TableWalker::requestorId
protected

Requestor id assigned by the MMU.

Definition at line 1061 of file table_walker.hh.

Referenced by fetchDescriptor(), readDataTimed(), readDataUntimed(), and gem5::ArmISA::TableWalker::Stage2Walk::setVirt().

◆ sctlr

SCTLR gem5::ArmISA::TableWalker::sctlr
protected

Cached copy of the sctlr as it existed when translation began.

Definition at line 1073 of file table_walker.hh.

Referenced by memAttrs(), and walk().

◆ stateQueues

std::list<WalkerState *> gem5::ArmISA::TableWalker::stateQueues[LookupLevel::Num_ArmLookupLevel]
protected

Queues of requests for all the different lookup levels.

Definition at line 1051 of file table_walker.hh.

Referenced by completeDrain(), doL2DescriptorWrapper(), doLongDescriptorWrapper(), drain(), and stashCurrState().

◆ stats

◆ test

TlbTestInterface* gem5::ArmISA::TableWalker::test

Definition at line 1222 of file table_walker.hh.

◆ tlb

TLB* gem5::ArmISA::TableWalker::tlb
protected

TLB that is initiating these table walks.

Definition at line 1070 of file table_walker.hh.

Referenced by getTlb(), insertPartialTableEntry(), insertTableEntry(), and setTlb().


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:17 for gem5 by doxygen 1.11.0