gem5  v20.1.0.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ArmISA::TableWalker Class Reference

#include <table_walker.hh>

Inheritance diagram for ArmISA::TableWalker:
ClockedObject SimObject Clocked EventManager Serializable Drainable Stats::Group

Classes

class  DescriptorBase
 
class  L1Descriptor
 
class  L2Descriptor
 Level 2 page table descriptor. More...
 
class  LongDescriptor
 Long-descriptor format (LPAE) More...
 
struct  TableWalkerStats
 Statistics. More...
 
class  WalkerState
 

Public Types

enum  GrainSize { Grain4KB = 12, Grain16KB = 14, Grain64KB = 16, ReservedGrain = 0 }
 
typedef ArmTableWalkerParams Params
 
- Public Types inherited from ClockedObject
typedef ClockedObjectParams Params
 Parameters of ClockedObject. More...
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 

Public Member Functions

 TableWalker (const Params *p)
 
virtual ~TableWalker ()
 
const Paramsparams () const
 
void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
bool haveLPAE () const
 
bool haveVirtualization () const
 
bool haveLargeAsid64 () const
 
void completeDrain ()
 Checks if all state is cleared and if so, completes drain. More...
 
DrainState drain () override
 Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight. More...
 
void drainResume () override
 Resume execution after a successful drain. More...
 
PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Get a port with a given name and index. More...
 
Fault walk (const RequestPtr &req, ThreadContext *tc, uint16_t asid, uint8_t _vmid, bool _isHyp, TLB::Mode mode, TLB::Translation *_trans, bool timing, bool functional, bool secure, TLB::ArmTranslationType tranType, bool _stage2Req)
 
void setTlb (TLB *_tlb)
 
TLBgetTlb ()
 
void setMMU (Stage2MMU *m, RequestorID requestor_id)
 
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)
 
- Public Member Functions inherited from ClockedObject
 ClockedObject (const ClockedObjectParams *p)
 
const Paramsparams () const
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from SimObject
const Paramsparams () const
 
 SimObject (const Params *_params)
 
virtual ~SimObject ()
 
virtual const std::string name () const
 
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...
 
ProbeManagergetProbeManager ()
 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...
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from 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. More...
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue. More...
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from Serializable
 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)
 
- Public Member Functions inherited from Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 
- Public Member Functions inherited from Stats::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group. More...
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters. More...
 
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...
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from Clocked
void updateClockPeriod ()
 Update the tick to the current tick. More...
 
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. More...
 
Cycles curCycle () const
 Determine the current cycle, corresponding to a tick aligned to a clock edge. More...
 
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. More...
 
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 SimObject
static void serializeAll (CheckpointOut &cp)
 Serialize all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 Serializes all the SimObjects. More...
 
static void unserializeGlobals (CheckpointIn &cp)
 

Protected Attributes

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

Static Protected Attributes

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

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)
 
bool fetchDescriptor (Addr descAddr, uint8_t *data, int numBytes, Request::Flags flags, int queueIndex, Event *event, void(TableWalker::*doDescriptor)())
 
Fault generateLongDescFault (ArmFault::FaultSource src)
 
void insertTableEntry (DescriptorBase &descriptor, bool longDescriptor)
 
Fault processWalk ()
 
Fault processWalkLPAE ()
 
Fault processWalkAArch64 ()
 
void processWalkWrapper ()
 
void nextWalk (ThreadContext *tc)
 
void pendingChange ()
 
Fault testWalk (Addr pa, Addr size, TlbEntry::DomainType domain, LookupLevel lookup_level)
 

Static Private Member Functions

static unsigned adjustTableSizeAArch64 (unsigned tsz)
 
static bool checkAddrSizeFaultAArch64 (Addr addr, int currPhysAddrRange)
 Returns true if the address exceeds the range permitted by the system-wide setting or by the TCR_ELx IPS/PS setting. More...
 
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 Attributes inherited from ClockedObject
PowerStatepowerState
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained. More...
 
- Protected Member Functions inherited from Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters. More...
 
 Clocked (Clocked &)=delete
 
Clockedoperator= (Clocked &)=delete
 
virtual ~Clocked ()
 Virtual destructor due to inheritance. More...
 
void resetClock () const
 Reset the object's clock using the current global tick value. More...
 
virtual void clockPeriodUpdated ()
 A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. More...
 

Detailed Description

Definition at line 61 of file table_walker.hh.

Member Typedef Documentation

◆ Params

typedef ArmTableWalkerParams ArmISA::TableWalker::Params

Definition at line 884 of file table_walker.hh.

Member Enumeration Documentation

◆ GrainSize

Enumerator
Grain4KB 
Grain16KB 
Grain64KB 
ReservedGrain 

Definition at line 367 of file table_walker.hh.

Constructor & Destructor Documentation

◆ TableWalker()

TableWalker::TableWalker ( const Params p)

Definition at line 56 of file table_walker.cc.

References doL1DescriptorWrapper().

◆ ~TableWalker()

TableWalker::~TableWalker ( )
virtual

Definition at line 94 of file table_walker.cc.

Member Function Documentation

◆ adjustTableSizeAArch64()

unsigned TableWalker::adjustTableSizeAArch64 ( unsigned  tsz)
staticprivate

Definition at line 750 of file table_walker.cc.

Referenced by processWalkAArch64().

◆ checkAddrSizeFaultAArch64()

bool TableWalker::checkAddrSizeFaultAArch64 ( Addr  addr,
int  currPhysAddrRange 
)
staticprivate

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 760 of file table_walker.cc.

References addr, bits(), and ArmISA::MaxPhysAddrRange.

Referenced by doLongDescriptor().

◆ completeDrain()

void TableWalker::completeDrain ( )

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

Definition at line 145 of file table_walker.cc.

References DPRINTF, Draining, Drainable::drainState(), ArmISA::L0, ArmISA::L1, ArmISA::L2, ArmISA::L3, pendingQueue, Drainable::signalDrainDone(), and stateQueues.

Referenced by nextWalk().

◆ doL0LongDescriptorWrapper()

void TableWalker::doL0LongDescriptorWrapper ( )
private

Definition at line 1978 of file table_walker.cc.

References doLongDescriptorWrapper(), and ArmISA::L0.

◆ doL1Descriptor()

void 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 1538 of file table_walker.cc.

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

Referenced by doL1DescriptorWrapper(), and processWalk().

◆ doL1DescriptorWrapper()

void TableWalker::doL1DescriptorWrapper ( )
private

◆ doL1LongDescriptorWrapper()

void TableWalker::doL1LongDescriptorWrapper ( )
private

Definition at line 1984 of file table_walker.cc.

References doLongDescriptorWrapper(), and ArmISA::L1.

◆ doL2Descriptor()

void TableWalker::doL2Descriptor ( )
private

◆ doL2DescriptorWrapper()

void TableWalker::doL2DescriptorWrapper ( )
private

◆ doL2LongDescriptorWrapper()

void TableWalker::doL2LongDescriptorWrapper ( )
private

Definition at line 1990 of file table_walker.cc.

References doLongDescriptorWrapper(), and ArmISA::L2.

◆ doL3LongDescriptorWrapper()

void TableWalker::doL3LongDescriptorWrapper ( )
private

Definition at line 1996 of file table_walker.cc.

References doLongDescriptorWrapper(), and ArmISA::L3.

◆ doLongDescriptor()

void TableWalker::doLongDescriptor ( )
private

Definition at line 1663 of file table_walker.cc.

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

Referenced by doLongDescriptorWrapper(), and processWalkLPAE().

◆ doLongDescriptorWrapper()

void TableWalker::doLongDescriptorWrapper ( LookupLevel  curr_lookup_level)
private

◆ drain()

DrainState TableWalker::drain ( )
overridevirtual

Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight.

Draining is mostly used before forking and creating a check point.

This function notifies an object that it needs to drain its state.

If the object does not need further simulation to drain internal buffers, it returns DrainState::Drained and automatically switches to the Drained state. If the object needs more simulation, it returns DrainState::Draining and automatically enters the Draining state. Other return values are invalid.

Note
An object that has entered the Drained state can be disturbed by other objects in the system and consequently stop being drained. These perturbations are not visible in the drain state. The simulator therefore repeats the draining process until all objects return DrainState::Drained on the first call to drain().
Returns
DrainState::Drained if the object is drained at this point in time, DrainState::Draining if it needs further simulation.

Implements Drainable.

Definition at line 158 of file table_walker.cc.

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

◆ drainResume()

void TableWalker::drainResume ( )
overridevirtual

Resume execution after a successful drain.

Reimplemented from Drainable.

Definition at line 179 of file table_walker.cc.

References currState, params(), and pendingChange().

◆ fetchDescriptor()

bool TableWalker::fetchDescriptor ( Addr  descAddr,
uint8_t *  data,
int  numBytes,
Request::Flags  flags,
int  queueIndex,
Event event,
void(TableWalker::*)()  doDescriptor 
)
private

◆ generateLongDescFault()

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

◆ getPort()

Port & 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 SimObject.

Definition at line 116 of file table_walker.cc.

References fatal, SimObject::getPort(), isStage2, and port.

◆ getTlb()

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

Definition at line 914 of file table_walker.hh.

References tlb.

◆ haveLargeAsid64()

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

Definition at line 898 of file table_walker.hh.

References _haveLargeAsid64.

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

◆ haveLPAE()

bool ArmISA::TableWalker::haveLPAE ( ) const
inline

Definition at line 896 of file table_walker.hh.

References _haveLPAE.

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

◆ haveVirtualization()

bool ArmISA::TableWalker::haveVirtualization ( ) const
inline

Definition at line 897 of file table_walker.hh.

References _haveVirtualization.

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

◆ init()

void TableWalker::init ( )
overridevirtual

init() is called after all C++ SimObjects have been created and all ports are connected.

Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.

Reimplemented from SimObject.

Definition at line 108 of file table_walker.cc.

References fatal_if, port, stage2Mmu, and tlb.

◆ insertTableEntry()

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

Definition at line 2139 of file table_walker.cc.

References ArmISA::TableWalker::WalkerState::aarch64, ArmISA::TableWalker::DescriptorBase::ap(), ArmISA::TableWalker::LongDescriptor::ap(), ArmISA::TableWalker::WalkerState::asid, COMPLETED, currState, ArmISA::TableWalker::DescriptorBase::dbgHeader(), ArmISA::TableWalker::DescriptorBase::domain(), DPRINTF, ArmISA::TableWalker::WalkerState::el, ArmISA::EL1, ArmISA::TableWalker::DescriptorBase::getRawData(), ArmISA::TableWalker::DescriptorBase::global(), haveSecurity, ArmISA::TLB::insert(), ArmISA::TableWalker::WalkerState::isFetch, ArmISA::TableWalker::WalkerState::isHyp, ArmISA::TableWalker::WalkerState::isSecure, isStage2, ArmISA::TableWalker::DescriptorBase::lookupLevel, memAttrs(), memAttrsAArch64(), memAttrsLPAE(), ArmISA::TableWalker::DescriptorBase::offsetBits(), pageSizeNtoStatBin(), ArmISA::TableWalker::TableWalkerStats::pageSizes, ArmISA::TableWalker::DescriptorBase::pfn(), ArmISA::TableWalker::LongDescriptor::pxn(), ArmISA::TableWalker::WalkerState::pxnTable, ArmISA::TableWalker::WalkerState::req, ArmISA::TableWalker::TableWalkerStats::requestOrigin, ArmISA::TableWalker::WalkerState::rwTable, ArmISA::TableWalker::WalkerState::sctlr, ArmISA::TableWalker::DescriptorBase::secure(), ArmISA::TableWalker::DescriptorBase::shareable(), stats, ArmISA::TableWalker::WalkerState::tc, ArmISA::te, ArmISA::TableWalker::DescriptorBase::texcb(), ArmISA::TableWalker::WalkerState::timing, tlb, ArmISA::TableWalker::WalkerState::userTable, ArmISA::TableWalker::WalkerState::vaddr, ArmISA::TableWalker::WalkerState::vmid, ArmISA::TableWalker::DescriptorBase::xn(), and ArmISA::TableWalker::WalkerState::xnTable.

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

◆ memAttrs()

void TableWalker::memAttrs ( ThreadContext tc,
TlbEntry te,
SCTLR  sctlr,
uint8_t  texcb,
bool  s 
)

◆ memAttrsAArch64()

void TableWalker::memAttrsAArch64 ( ThreadContext tc,
TlbEntry te,
LongDescriptor lDescriptor 
)

◆ memAttrsLPAE()

void TableWalker::memAttrsLPAE ( ThreadContext tc,
TlbEntry te,
LongDescriptor lDescriptor 
)

◆ nextWalk()

void TableWalker::nextWalk ( ThreadContext tc)
private

◆ pageSizeNtoStatBin()

uint8_t TableWalker::pageSizeNtoStatBin ( uint8_t  N)
staticprivate

Definition at line 2262 of file table_walker.cc.

References panic.

Referenced by insertTableEntry().

◆ params()

const Params* ArmISA::TableWalker::params ( ) const
inline

Definition at line 889 of file table_walker.hh.

References SimObject::_params.

Referenced by drainResume().

◆ pendingChange()

void TableWalker::pendingChange ( )
private

◆ processWalk()

Fault TableWalker::processWalk ( )
private

◆ processWalkAArch64()

Fault TableWalker::processWalkAArch64 ( )
private

◆ processWalkLPAE()

Fault TableWalker::processWalkLPAE ( )
private

Definition at line 578 of file table_walker.cc.

References ArmISA::TableWalker::LongDescriptor::aarch64, bits(), currState, curTick(), ArmISA::TableWalker::LongDescriptor::data, doLongDescriptor(), DPRINTF, ArmISA::f, ArmISA::TableWalker::WalkerState::fault, fetchDescriptor(), Grain4KB, ArmISA::TableWalker::LongDescriptor::grainSize, ArmISA::TableWalker::WalkerState::htcr, ArmISA::TableWalker::WalkerState::isFetch, ArmISA::TableWalker::WalkerState::isHyp, ArmISA::TableWalker::WalkerState::isSecure, isStage2, ArmISA::TableWalker::WalkerState::isUncacheable, ArmISA::TableWalker::WalkerState::isWrite, ArmISA::L1, ArmISA::L2, ArmISA::TableWalker::WalkerState::longDesc, LongDescEventByLevel, ArmISA::longDescFormatInUse(), ArmISA::TableWalker::DescriptorBase::lookupLevel, ArmISA::ArmFault::LpaeTran, mbits(), ArmISA::MISCREG_HTTBR, ArmISA::MISCREG_TTBR0, ArmISA::MISCREG_TTBR1, ArmISA::MISCREG_VTTBR, ArmISA::n, nextWalk(), ArmISA::TlbEntry::NoAccess, pending, Request::PT_WALK, ThreadContext::readMiscReg(), ArmISA::TableWalker::WalkerState::req, Stats::DistBase< Derived, Stor >::sample(), ArmISA::TableWalker::WalkerState::sctlr, Request::SECURE, Flags< T >::set(), ArmISA::snsBankedIndex(), ArmISA::TableWalker::WalkerState::startTime, stats, ArmISA::TableWalker::WalkerState::tc, testWalk(), ArmISA::TableWalker::WalkerState::timing, ArmISA::ArmFault::TranslationLL, ArmISA::TableWalker::WalkerState::ttbcr, ULL, Request::UNCACHEABLE, ArmISA::TableWalker::WalkerState::vaddr, ArmISA::TableWalker::WalkerState::vaddr_tainted, ArmISA::TableWalker::WalkerState::vtcr, and ArmISA::TableWalker::TableWalkerStats::walkWaitTime.

Referenced by processWalkWrapper(), and walk().

◆ processWalkWrapper()

void TableWalker::processWalkWrapper ( )
private

◆ setMMU()

void TableWalker::setMMU ( Stage2MMU m,
RequestorID  requestor_id 
)

Definition at line 100 of file table_walker.cc.

References ArmISA::m, port, requestorId, and stage2Mmu.

Referenced by ArmISA::TLB::setMMU().

◆ setTlb()

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

Definition at line 913 of file table_walker.hh.

References tlb.

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

◆ testWalk()

Fault TableWalker::testWalk ( Addr  pa,
Addr  size,
TlbEntry::DomainType  domain,
LookupLevel  lookup_level 
)
private

◆ toLookupLevel()

LookupLevel TableWalker::toLookupLevel ( uint8_t  lookup_level_as_int)
static

Definition at line 2220 of file table_walker.cc.

References ArmISA::L1, ArmISA::L2, ArmISA::L3, and panic.

Referenced by doLongDescriptor().

◆ walk()

Fault TableWalker::walk ( const RequestPtr req,
ThreadContext tc,
uint16_t  asid,
uint8_t  _vmid,
bool  _isHyp,
TLB::Mode  mode,
TLB::Translation _trans,
bool  timing,
bool  functional,
bool  secure,
TLB::ArmTranslationType  tranType,
bool  _stage2Req 
)
Todo:
These should be cached or grabbed from cached copies in the TLB, all these miscreg reads are expensive

Definition at line 189 of file table_walker.cc.

References _haveVirtualization, ArmISA::TableWalker::WalkerState::aarch64, ArmISA::TableWalker::WalkerState::asid, currState, curTick(), DPRINTF, ArmISA::TableWalker::WalkerState::el, ArmISA::EL0, ArmISA::EL1, ArmISA::EL2, ArmISA::EL3, ArmISA::ELIs64(), BaseTLB::Execute, ArmISA::TableWalker::WalkerState::fault, ArmISA::TableWalker::WalkerState::functional, haveSecurity, ArmISA::HaveVirtHostExt(), ArmISA::TableWalker::WalkerState::hcr, ArmISA::TableWalker::WalkerState::htcr, ArmISA::TableWalker::WalkerState::isFetch, ArmISA::TableWalker::WalkerState::isHyp, ArmISA::TableWalker::WalkerState::isSecure, isStage2, ArmISA::TableWalker::WalkerState::isWrite, ArmISA::longDescFormatInUse(), ArmISA::MISCREG_CPSR, ArmISA::MISCREG_HCR, ArmISA::MISCREG_HCR_EL2, ArmISA::MISCREG_HTCR, ArmISA::MISCREG_SCTLR, ArmISA::MISCREG_SCTLR_EL1, ArmISA::MISCREG_SCTLR_EL2, ArmISA::MISCREG_SCTLR_EL3, ArmISA::MISCREG_TCR_EL1, ArmISA::MISCREG_TCR_EL2, ArmISA::MISCREG_TCR_EL3, ArmISA::MISCREG_TTBCR, ArmISA::MISCREG_VSTCR_EL2, ArmISA::MISCREG_VTCR, ArmISA::MISCREG_VTCR_EL2, ArmISA::TableWalker::WalkerState::mode, NoFault, panic, pending, pendingChange(), pendingQueue, ArmISA::TableWalker::WalkerState::physAddrRange, physAddrRange, processWalk(), processWalkAArch64(), processWalkLPAE(), ArmISA::purifyTaggedAddr(), ArmISA::TableWalker::WalkerState::pxnTable, ThreadContext::readMiscReg(), ArmISA::TableWalker::WalkerState::req, REQUESTED, ArmISA::TableWalker::TableWalkerStats::requestOrigin, ArmISA::TableWalker::WalkerState::rwTable, ArmISA::TableWalker::WalkerState::sctlr, sctlr, ArmISA::TableWalker::WalkerState::secureLookup, ArmISA::snsBankedIndex(), ArmISA::TableWalker::TableWalkerStats::squashedBefore, ArmISA::TableWalker::WalkerState::stage2Req, ArmISA::TableWalker::WalkerState::startTime, stats, ArmISA::TableWalker::WalkerState::tableWalker, ArmISA::TableWalker::WalkerState::tc, ArmISA::TableWalker::WalkerState::tcr, ArmISA::TableWalker::WalkerState::timing, ArmISA::TableWalker::WalkerState::transState, ArmISA::TableWalker::WalkerState::tranType, ArmISA::TLB::tranTypeEL(), ArmISA::TableWalker::WalkerState::ttbcr, ArmISA::TableWalker::WalkerState::userTable, ArmISA::TableWalker::WalkerState::vaddr, ArmISA::TableWalker::WalkerState::vaddr_tainted, ArmISA::TableWalker::WalkerState::vmid, ArmISA::TableWalker::WalkerState::vtcr, ArmISA::TableWalker::TableWalkerStats::walks, ArmISA::TableWalker::TableWalkerStats::walksLongDescriptor, ArmISA::TableWalker::TableWalkerStats::walksShortDescriptor, BaseTLB::Write, and ArmISA::TableWalker::WalkerState::xnTable.

Referenced by ArmISA::TLB::getTE().

Member Data Documentation

◆ _haveLargeAsid64

bool ArmISA::TableWalker::_haveLargeAsid64
protected

Definition at line 858 of file table_walker.hh.

Referenced by haveLargeAsid64().

◆ _haveLPAE

bool ArmISA::TableWalker::_haveLPAE
protected

Definition at line 855 of file table_walker.hh.

Referenced by haveLPAE(), and memAttrsLPAE().

◆ _haveVirtualization

bool ArmISA::TableWalker::_haveVirtualization
protected

Definition at line 856 of file table_walker.hh.

Referenced by haveVirtualization(), and walk().

◆ COMPLETED

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

Definition at line 881 of file table_walker.hh.

Referenced by insertTableEntry().

◆ currState

WalkerState* ArmISA::TableWalker::currState
protected

◆ doL0LongDescEvent

EventFunctionWrapper ArmISA::TableWalker::doL0LongDescEvent
private

Definition at line 938 of file table_walker.hh.

◆ doL1DescEvent

EventFunctionWrapper ArmISA::TableWalker::doL1DescEvent
private

Definition at line 929 of file table_walker.hh.

Referenced by processWalk().

◆ doL1LongDescEvent

EventFunctionWrapper ArmISA::TableWalker::doL1LongDescEvent
private

Definition at line 940 of file table_walker.hh.

◆ doL2DescEvent

EventFunctionWrapper ArmISA::TableWalker::doL2DescEvent
private

Definition at line 933 of file table_walker.hh.

Referenced by doL1Descriptor().

◆ doL2LongDescEvent

EventFunctionWrapper ArmISA::TableWalker::doL2LongDescEvent
private

Definition at line 942 of file table_walker.hh.

◆ doL3LongDescEvent

EventFunctionWrapper ArmISA::TableWalker::doL3LongDescEvent
private

Definition at line 944 of file table_walker.hh.

◆ doProcessEvent

EventFunctionWrapper ArmISA::TableWalker::doProcessEvent
private

Definition at line 965 of file table_walker.hh.

Referenced by nextWalk().

◆ haveSecurity

bool ArmISA::TableWalker::haveSecurity
protected

Cached copies of system-level properties.

Definition at line 854 of file table_walker.hh.

Referenced by insertTableEntry(), processWalk(), and walk().

◆ isStage2

const bool ArmISA::TableWalker::isStage2
protected

◆ LongDescEventByLevel

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

Definition at line 947 of file table_walker.hh.

Referenced by doLongDescriptor(), and processWalkLPAE().

◆ numSquashable

unsigned ArmISA::TableWalker::numSquashable
protected

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

Definition at line 851 of file table_walker.hh.

Referenced by processWalkWrapper().

◆ pending

bool ArmISA::TableWalker::pending
protected

If a timing translation is currently in progress.

Definition at line 847 of file table_walker.hh.

Referenced by doL1DescriptorWrapper(), doL2DescriptorWrapper(), doLongDescriptorWrapper(), processWalk(), processWalkLPAE(), processWalkWrapper(), and walk().

◆ pendingChangeTick

Tick ArmISA::TableWalker::pendingChangeTick
mutableprotected

Definition at line 878 of file table_walker.hh.

Referenced by pendingChange().

◆ pendingQueue

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

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

Definition at line 824 of file table_walker.hh.

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

◆ pendingReqs

unsigned ArmISA::TableWalker::pendingReqs
mutableprotected

Definition at line 877 of file table_walker.hh.

Referenced by pendingChange().

◆ physAddrRange

uint8_t ArmISA::TableWalker::physAddrRange
protected

Definition at line 857 of file table_walker.hh.

Referenced by walk().

◆ port

DmaPort* ArmISA::TableWalker::port
protected

Port shared by the two table walkers.

Definition at line 830 of file table_walker.hh.

Referenced by fetchDescriptor(), getPort(), init(), and setMMU().

◆ REQUESTED

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

Definition at line 880 of file table_walker.hh.

Referenced by walk().

◆ requestorId

RequestorID ArmISA::TableWalker::requestorId
protected

Requestor id assigned by the MMU.

Definition at line 833 of file table_walker.hh.

Referenced by fetchDescriptor(), and setMMU().

◆ sctlr

SCTLR ArmISA::TableWalker::sctlr
protected

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

Definition at line 842 of file table_walker.hh.

Referenced by memAttrs(), and walk().

◆ stage2Mmu

Stage2MMU* ArmISA::TableWalker::stage2Mmu
protected

The MMU to forward second stage look upts to.

Definition at line 827 of file table_walker.hh.

Referenced by fetchDescriptor(), init(), and setMMU().

◆ stateQueues

std::list<WalkerState *> ArmISA::TableWalker::stateQueues[MAX_LOOKUP_LEVELS]
protected

Queues of requests for all the different lookup levels.

Definition at line 820 of file table_walker.hh.

Referenced by completeDrain(), doL1DescriptorWrapper(), doL2DescriptorWrapper(), doLongDescriptorWrapper(), drain(), and fetchDescriptor().

◆ stats

ArmISA::TableWalker::TableWalkerStats ArmISA::TableWalker::stats
protected

◆ tlb

TLB* ArmISA::TableWalker::tlb
protected

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

Generated on Wed Sep 30 2020 14:02:38 for gem5 by doxygen 1.8.17