gem5  v21.1.0.2
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
gem5::SMMUv3 Class Reference

#include <smmu_v3.hh>

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

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 gem5::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 gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
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 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. 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 gem5::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 gem5::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 gem5::statistics::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 (statistics::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 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. 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 gem5::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 gem5::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
 
gem5::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 gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from gem5::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 gem5::ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject. More...
 
- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 
- 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. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
static void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Public Attributes inherited from gem5::ClockedObject
PowerStatepowerState
 

Detailed Description

Definition at line 85 of file smmu_v3.hh.

Constructor & Destructor Documentation

◆ SMMUv3()

gem5::SMMUv3::SMMUv3 ( const SMMUv3Params &  p)

Definition at line 58 of file smmu_v3.cc.

References gem5::SimObject::params().

◆ ~SMMUv3()

virtual gem5::SMMUv3::~SMMUv3 ( )
inlinevirtual

Definition at line 179 of file smmu_v3.hh.

Member Function Documentation

◆ drain()

DrainState gem5::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 gem5::Drainable.

Definition at line 786 of file smmu_v3.cc.

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

◆ getPageTableOps()

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

◆ getPort()

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

Definition at line 812 of file smmu_v3.cc.

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

◆ init()

void gem5::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 gem5::SimObject.

Definition at line 731 of file smmu_v3.cc.

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

◆ inSecureBlock()

bool gem5::SMMUv3::inSecureBlock ( uint32_t  offs) const
protected

Definition at line 722 of file smmu_v3.cc.

References gem5::SMMU_SECURE_SZ.

Referenced by readControl(), and writeControl().

◆ processCommand()

void gem5::SMMUv3::processCommand ( const SMMUCommand cmd)
protected

◆ processCommands()

void gem5::SMMUv3::processCommands ( )
protected

◆ readControl()

Tick gem5::SMMUv3::readControl ( PacketPtr  pkt)

◆ recvAtomic()

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

◆ recvReqRetry()

void gem5::SMMUv3::recvReqRetry ( )

◆ recvTimingReq()

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

◆ recvTimingResp()

bool gem5::SMMUv3::recvTimingResp ( PacketPtr  pkt)

◆ runProcess()

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

◆ runProcessAtomic()

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

◆ runProcessTiming()

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

◆ scheduleDeviceRetries()

void gem5::SMMUv3::scheduleDeviceRetries ( )
protected

◆ serialize()

void gem5::SMMUv3::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

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

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 796 of file smmu_v3.cc.

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

◆ tableWalkRecvReqRetry()

void gem5::SMMUv3::tableWalkRecvReqRetry ( )

◆ tableWalkRecvTimingResp()

bool gem5::SMMUv3::tableWalkRecvTimingResp ( PacketPtr  pkt)

◆ unserialize()

void gem5::SMMUv3::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

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

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 804 of file smmu_v3.cc.

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

◆ writeControl()

Tick gem5::SMMUv3::writeControl ( PacketPtr  pkt)

Friends And Related Function Documentation

◆ SMMUCommandExecProcess

friend class SMMUCommandExecProcess
friend

Definition at line 91 of file smmu_v3.hh.

◆ SMMUProcess

friend class SMMUProcess
friend

Definition at line 89 of file smmu_v3.hh.

◆ SMMUTranslationProcess

friend class SMMUTranslationProcess
friend

Definition at line 90 of file smmu_v3.hh.

◆ SMMUv3DeviceInterface

friend class SMMUv3DeviceInterface
friend

Definition at line 92 of file smmu_v3.hh.

Member Data Documentation

◆ commandExecutor

SMMUCommandExecProcess gem5::SMMUv3::commandExecutor
protected

Definition at line 153 of file smmu_v3.hh.

Referenced by drain(), and processCommands().

◆ configCache

ConfigCache gem5::SMMUv3::configCache
protected

◆ configCacheEnable

const bool gem5::SMMUv3::configCacheEnable
protected

◆ configLat

const Cycles gem5::SMMUv3::configLat
protected

Definition at line 135 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::configCacheLookup().

◆ configSem

SMMUSemaphore gem5::SMMUv3::configSem
protected

◆ controlPort

SMMUControlPort gem5::SMMUv3::controlPort
protected

Definition at line 99 of file smmu_v3.hh.

Referenced by getPort(), and init().

◆ cycleSem

SMMUSemaphore gem5::SMMUv3::cycleSem
protected

◆ deviceInterfaces

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

Definition at line 151 of file smmu_v3.hh.

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

◆ ifcSmmuLat

const Cycles gem5::SMMUv3::ifcSmmuLat
protected

Definition at line 133 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTranslation().

◆ ifcSmmuSem

SMMUSemaphore gem5::SMMUv3::ifcSmmuSem
protected

Definition at line 120 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTranslation().

◆ ipaCache

IPACache gem5::SMMUv3::ipaCache
protected

Definition at line 105 of file smmu_v3.hh.

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

◆ ipaCacheEnable

const bool gem5::SMMUv3::ipaCacheEnable
protected

Definition at line 110 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::translateStage2().

◆ ipaLat

const Cycles gem5::SMMUv3::ipaLat
protected

Definition at line 136 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::translateStage2().

◆ ipaSem

SMMUSemaphore gem5::SMMUv3::ipaSem
protected

Definition at line 123 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::translateStage2().

◆ irqInterfaceEnable

const bool gem5::SMMUv3::irqInterfaceEnable
protected

Definition at line 101 of file smmu_v3.hh.

Referenced by writeControl().

◆ packetsTableWalkToRetry

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

Definition at line 161 of file smmu_v3.hh.

Referenced by runProcessTiming(), and tableWalkRecvReqRetry().

◆ packetsToRetry

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

Definition at line 160 of file smmu_v3.hh.

Referenced by recvReqRetry(), and runProcessTiming().

◆ processCommandsEvent

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

Definition at line 171 of file smmu_v3.hh.

Referenced by writeControl().

◆ ptwSem

SMMUSemaphore gem5::SMMUv3::ptwSem
protected

Definition at line 128 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTranslation().

◆ regs

SMMURegs gem5::SMMUv3::regs
protected

◆ regsMap

const AddrRange gem5::SMMUv3::regsMap
protected

Definition at line 155 of file smmu_v3.hh.

Referenced by readControl(), and writeControl().

◆ requestorId

const RequestorID gem5::SMMUv3::requestorId
protected

Definition at line 95 of file smmu_v3.hh.

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

◆ requestPort

SMMURequestPort gem5::SMMUv3::requestPort
protected

Definition at line 97 of file smmu_v3.hh.

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

◆ requestPortSem

SMMUSemaphore gem5::SMMUv3::requestPortSem
protected

◆ requestPortWidth

const unsigned gem5::SMMUv3::requestPortWidth
protected

◆ smmuIfcLat

const Cycles gem5::SMMUv3::smmuIfcLat
protected

Definition at line 134 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTranslation().

◆ smmuIfcSem

SMMUSemaphore gem5::SMMUv3::smmuIfcSem
protected

Definition at line 121 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTranslation().

◆ stats

gem5::SMMUv3::SMMUv3Stats gem5::SMMUv3::stats
protected

◆ system

const System& gem5::SMMUv3::system
protected

◆ tableWalkPort

SMMUTableWalkPort gem5::SMMUv3::tableWalkPort
protected

Definition at line 98 of file smmu_v3.hh.

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

◆ tableWalkPortEnable

bool gem5::SMMUv3::tableWalkPortEnable
protected

Definition at line 112 of file smmu_v3.hh.

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

◆ tlb

ARMArchTLB gem5::SMMUv3::tlb
protected

◆ tlbEnable

const bool gem5::SMMUv3::tlbEnable
protected

◆ tlbLat

const Cycles gem5::SMMUv3::tlbLat
protected

Definition at line 132 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTLBLookup().

◆ tlbSem

SMMUSemaphore gem5::SMMUv3::tlbSem
protected

◆ transSem

SMMUSemaphore gem5::SMMUv3::transSem
protected

Definition at line 127 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::smmuTranslation().

◆ walkCache

WalkCache gem5::SMMUv3::walkCache
protected

◆ walkCacheEnable

const bool gem5::SMMUv3::walkCacheEnable
protected

◆ walkCacheNonfinalEnable

const bool gem5::SMMUv3::walkCacheNonfinalEnable
protected

◆ walkCacheS1Levels

const unsigned gem5::SMMUv3::walkCacheS1Levels
protected

◆ walkCacheS2Levels

const unsigned gem5::SMMUv3::walkCacheS2Levels
protected

◆ walkLat

const Cycles gem5::SMMUv3::walkLat
protected

Definition at line 137 of file smmu_v3.hh.

Referenced by gem5::SMMUTranslationProcess::walkCacheLookup().

◆ walkSem

SMMUSemaphore gem5::SMMUv3::walkSem
protected

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

Generated on Tue Sep 21 2021 12:28:10 for gem5 by doxygen 1.8.17