gem5  v21.0.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SMMUv3 Class Reference

#include <smmu_v3.hh>

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

Classes

struct  SMMUv3Stats
 

Public Member Functions

 SMMUv3 (const SMMUv3Params &p)
 
virtual ~SMMUv3 ()
 
virtual void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
Tick recvAtomic (PacketPtr pkt, PortID id)
 
bool recvTimingReq (PacketPtr pkt, PortID id)
 
bool recvTimingResp (PacketPtr pkt)
 
void recvReqRetry ()
 
bool tableWalkRecvTimingResp (PacketPtr pkt)
 
void tableWalkRecvReqRetry ()
 
Tick readControl (PacketPtr pkt)
 
Tick writeControl (PacketPtr pkt)
 
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 serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
virtual PortgetPort (const std::string &name, PortID id=InvalidPortID) override
 Get a port with a given name and index. More...
 
- Public Member Functions inherited from ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
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 &p)
 
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...
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block. 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
 

Protected Member Functions

bool inSecureBlock (uint32_t offs) const
 
void scheduleDeviceRetries ()
 
SMMUAction runProcess (SMMUProcess *proc, PacketPtr pkt)
 
SMMUAction runProcessAtomic (SMMUProcess *proc, PacketPtr pkt)
 
SMMUAction runProcessTiming (SMMUProcess *proc, PacketPtr pkt)
 
void processCommands ()
 
void processCommand (const SMMUCommand &cmd)
 
const PageTableOpsgetPageTableOps (uint8_t trans_granule)
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
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...
 

Protected Attributes

const Systemsystem
 
const RequestorID requestorId
 
SMMURequestPort requestPort
 
SMMUTableWalkPort tableWalkPort
 
SMMUControlPort controlPort
 
const bool irqInterfaceEnable
 
ARMArchTLB tlb
 
ConfigCache configCache
 
IPACache ipaCache
 
WalkCache walkCache
 
const bool tlbEnable
 
const bool configCacheEnable
 
const bool ipaCacheEnable
 
const bool walkCacheEnable
 
bool tableWalkPortEnable
 
const bool walkCacheNonfinalEnable
 
const unsigned walkCacheS1Levels
 
const unsigned walkCacheS2Levels
 
const unsigned requestPortWidth
 
SMMUSemaphore tlbSem
 
SMMUSemaphore ifcSmmuSem
 
SMMUSemaphore smmuIfcSem
 
SMMUSemaphore configSem
 
SMMUSemaphore ipaSem
 
SMMUSemaphore walkSem
 
SMMUSemaphore requestPortSem
 
SMMUSemaphore transSem
 
SMMUSemaphore ptwSem
 
SMMUSemaphore cycleSem
 
const Cycles tlbLat
 
const Cycles ifcSmmuLat
 
const Cycles smmuIfcLat
 
const Cycles configLat
 
const Cycles ipaLat
 
const Cycles walkLat
 
SMMUv3::SMMUv3Stats stats
 
std::vector< SMMUv3DeviceInterface * > deviceInterfaces
 
SMMUCommandExecProcess commandExecutor
 
const AddrRange regsMap
 
SMMURegs regs
 
std::queue< SMMUActionpacketsToRetry
 
std::queue< SMMUActionpacketsTableWalkToRetry
 
EventWrapper< SMMUv3, &SMMUv3::processCommandsprocessCommandsEvent
 
- 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...
 

Friends

class SMMUProcess
 
class SMMUTranslationProcess
 
class SMMUCommandExecProcess
 
class SMMUv3DeviceInterface
 

Additional Inherited Members

- Public Types inherited from ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject. More...
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 
- 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)
 
- Public Attributes inherited from ClockedObject
PowerStatepowerState
 

Detailed Description

Definition at line 81 of file smmu_v3.hh.

Constructor & Destructor Documentation

◆ SMMUv3()

SMMUv3::SMMUv3 ( const SMMUv3Params &  p)

Definition at line 54 of file smmu_v3.cc.

References SimObject::params().

◆ ~SMMUv3()

virtual SMMUv3::~SMMUv3 ( )
inlinevirtual

Definition at line 175 of file smmu_v3.hh.

Member Function Documentation

◆ drain()

DrainState SMMUv3::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 780 of file smmu_v3.cc.

References commandExecutor, Drained, Draining, and SMMUCommandExecProcess::isBusy().

◆ getPageTableOps()

const PageTableOps * SMMUv3::getPageTableOps ( uint8_t  trans_granule)
protected

◆ getPort()

Port & SMMUv3::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 806 of file smmu_v3.cc.

References controlPort, SimObject::getPort(), SimObject::name(), requestPort, and tableWalkPort.

◆ init()

void SMMUv3::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 727 of file smmu_v3.cc.

References controlPort, deviceInterfaces, fatal, Port::isConnected(), requestPort, ResponsePort::sendRangeChange(), tableWalkPort, and tableWalkPortEnable.

◆ inSecureBlock()

bool SMMUv3::inSecureBlock ( uint32_t  offs) const
protected

Definition at line 718 of file smmu_v3.cc.

References SMMU_SECURE_SZ.

Referenced by readControl(), and writeControl().

◆ processCommand()

void SMMUv3::processCommand ( const SMMUCommand cmd)
protected

◆ processCommands()

void SMMUv3::processCommands ( )
protected

◆ readControl()

Tick SMMUv3::readControl ( PacketPtr  pkt)

◆ recvAtomic()

Tick SMMUv3::recvAtomic ( PacketPtr  pkt,
PortID  id 
)

◆ recvReqRetry()

void SMMUv3::recvReqRetry ( )

◆ recvTimingReq()

bool SMMUv3::recvTimingReq ( PacketPtr  pkt,
PortID  id 
)

◆ recvTimingResp()

bool SMMUv3::recvTimingResp ( PacketPtr  pkt)

◆ runProcess()

SMMUAction SMMUv3::runProcess ( SMMUProcess proc,
PacketPtr  pkt 
)
protected

◆ runProcessAtomic()

SMMUAction SMMUv3::runProcessAtomic ( SMMUProcess proc,
PacketPtr  pkt 
)
protected

◆ runProcessTiming()

SMMUAction SMMUv3::runProcessTiming ( SMMUProcess proc,
PacketPtr  pkt 
)
protected

◆ scheduleDeviceRetries()

void SMMUv3::scheduleDeviceRetries ( )
protected

◆ serialize()

void SMMUv3::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 790 of file smmu_v3.cc.

References SMMURegs::data, DPRINTF, regs, and SERIALIZE_ARRAY.

◆ tableWalkRecvReqRetry()

void SMMUv3::tableWalkRecvReqRetry ( )

◆ tableWalkRecvTimingResp()

bool SMMUv3::tableWalkRecvTimingResp ( PacketPtr  pkt)

◆ unserialize()

void SMMUv3::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 798 of file smmu_v3.cc.

References SMMURegs::data, DPRINTF, regs, and UNSERIALIZE_ARRAY.

◆ writeControl()

Tick SMMUv3::writeControl ( PacketPtr  pkt)

Friends And Related Function Documentation

◆ SMMUCommandExecProcess

friend class SMMUCommandExecProcess
friend

Definition at line 87 of file smmu_v3.hh.

◆ SMMUProcess

friend class SMMUProcess
friend

Definition at line 85 of file smmu_v3.hh.

◆ SMMUTranslationProcess

friend class SMMUTranslationProcess
friend

Definition at line 86 of file smmu_v3.hh.

◆ SMMUv3DeviceInterface

friend class SMMUv3DeviceInterface
friend

Definition at line 88 of file smmu_v3.hh.

Member Data Documentation

◆ commandExecutor

SMMUCommandExecProcess SMMUv3::commandExecutor
protected

Definition at line 149 of file smmu_v3.hh.

Referenced by drain(), and processCommands().

◆ configCache

ConfigCache SMMUv3::configCache
protected

◆ configCacheEnable

const bool SMMUv3::configCacheEnable
protected

◆ configLat

const Cycles SMMUv3::configLat
protected

Definition at line 131 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::configCacheLookup().

◆ configSem

SMMUSemaphore SMMUv3::configSem
protected

◆ controlPort

SMMUControlPort SMMUv3::controlPort
protected

Definition at line 95 of file smmu_v3.hh.

Referenced by getPort(), and init().

◆ cycleSem

SMMUSemaphore SMMUv3::cycleSem
protected

◆ deviceInterfaces

std::vector<SMMUv3DeviceInterface *> SMMUv3::deviceInterfaces
protected

Definition at line 147 of file smmu_v3.hh.

Referenced by init(), processCommand(), and scheduleDeviceRetries().

◆ ifcSmmuLat

const Cycles SMMUv3::ifcSmmuLat
protected

Definition at line 129 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTranslation().

◆ ifcSmmuSem

SMMUSemaphore SMMUv3::ifcSmmuSem
protected

Definition at line 116 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTranslation().

◆ ipaCache

IPACache SMMUv3::ipaCache
protected

Definition at line 101 of file smmu_v3.hh.

Referenced by processCommand(), and SMMUTranslationProcess::translateStage2().

◆ ipaCacheEnable

const bool SMMUv3::ipaCacheEnable
protected

Definition at line 106 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::translateStage2().

◆ ipaLat

const Cycles SMMUv3::ipaLat
protected

Definition at line 132 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::translateStage2().

◆ ipaSem

SMMUSemaphore SMMUv3::ipaSem
protected

Definition at line 119 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::translateStage2().

◆ irqInterfaceEnable

const bool SMMUv3::irqInterfaceEnable
protected

Definition at line 97 of file smmu_v3.hh.

Referenced by writeControl().

◆ packetsTableWalkToRetry

std::queue<SMMUAction> SMMUv3::packetsTableWalkToRetry
protected

Definition at line 157 of file smmu_v3.hh.

Referenced by runProcessTiming(), and tableWalkRecvReqRetry().

◆ packetsToRetry

std::queue<SMMUAction> SMMUv3::packetsToRetry
protected

Definition at line 156 of file smmu_v3.hh.

Referenced by recvReqRetry(), and runProcessTiming().

◆ processCommandsEvent

EventWrapper<SMMUv3, &SMMUv3::processCommands> SMMUv3::processCommandsEvent
protected

Definition at line 167 of file smmu_v3.hh.

Referenced by writeControl().

◆ ptwSem

SMMUSemaphore SMMUv3::ptwSem
protected

Definition at line 124 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTranslation().

◆ regs

SMMURegs SMMUv3::regs
protected

◆ regsMap

const AddrRange SMMUv3::regsMap
protected

Definition at line 151 of file smmu_v3.hh.

Referenced by readControl(), and writeControl().

◆ requestorId

const RequestorID SMMUv3::requestorId
protected

Definition at line 91 of file smmu_v3.hh.

Referenced by SMMUProcess::doRead(), and SMMUProcess::doWrite().

◆ requestPort

SMMURequestPort SMMUv3::requestPort
protected

Definition at line 93 of file smmu_v3.hh.

Referenced by getPort(), init(), recvReqRetry(), runProcessAtomic(), and runProcessTiming().

◆ requestPortSem

SMMUSemaphore SMMUv3::requestPortSem
protected

◆ requestPortWidth

const unsigned SMMUv3::requestPortWidth
protected

◆ smmuIfcLat

const Cycles SMMUv3::smmuIfcLat
protected

Definition at line 130 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTranslation().

◆ smmuIfcSem

SMMUSemaphore SMMUv3::smmuIfcSem
protected

Definition at line 117 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTranslation().

◆ stats

SMMUv3::SMMUv3Stats SMMUv3::stats
protected

◆ system

const System& SMMUv3::system
protected

◆ tableWalkPort

SMMUTableWalkPort SMMUv3::tableWalkPort
protected

Definition at line 94 of file smmu_v3.hh.

Referenced by getPort(), init(), runProcessAtomic(), runProcessTiming(), and tableWalkRecvReqRetry().

◆ tableWalkPortEnable

bool SMMUv3::tableWalkPortEnable
protected

Definition at line 108 of file smmu_v3.hh.

Referenced by init(), runProcessAtomic(), runProcessTiming(), and tableWalkRecvReqRetry().

◆ tlb

ARMArchTLB SMMUv3::tlb
protected

◆ tlbEnable

const bool SMMUv3::tlbEnable
protected

◆ tlbLat

const Cycles SMMUv3::tlbLat
protected

Definition at line 128 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTLBLookup().

◆ tlbSem

SMMUSemaphore SMMUv3::tlbSem
protected

◆ transSem

SMMUSemaphore SMMUv3::transSem
protected

Definition at line 123 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::smmuTranslation().

◆ walkCache

WalkCache SMMUv3::walkCache
protected

◆ walkCacheEnable

const bool SMMUv3::walkCacheEnable
protected

◆ walkCacheNonfinalEnable

const bool SMMUv3::walkCacheNonfinalEnable
protected

◆ walkCacheS1Levels

const unsigned SMMUv3::walkCacheS1Levels
protected

◆ walkCacheS2Levels

const unsigned SMMUv3::walkCacheS2Levels
protected

◆ walkLat

const Cycles SMMUv3::walkLat
protected

Definition at line 133 of file smmu_v3.hh.

Referenced by SMMUTranslationProcess::walkCacheLookup().

◆ walkSem

SMMUSemaphore SMMUv3::walkSem
protected

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

Generated on Tue Jun 22 2021 15:28:44 for gem5 by doxygen 1.8.17