gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
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
 Provide a default implementation of the drain interface for objects that don't need draining.
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
virtual PortgetPort (const std::string &name, PortID id=InvalidPortID) override
 Get a port with a given name and index.
 
- Public Member Functions inherited from gem5::ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
- 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.
 
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.
 
- 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
 

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)
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain.
 
void signalDrainDone () const
 Signal that an object is drained.
 
- Protected Member Functions inherited from gem5::Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters.
 
 Clocked (Clocked &)=delete
 
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.
 

Protected Attributes

const Systemsystem
 
const RequestorID requestorId
 
SMMURequestPort requestPort
 
SMMUTableWalkPort tableWalkPort
 
SMMUControlPort controlPort
 
ArmInterruptPin *const eventqInterrupt
 
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
 
MemberEventWrapper<&SMMUv3::processCommandsprocessCommandsEvent
 
- 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.
 

Friends

class SMMUProcess
 
class SMMUTranslationProcess
 
class SMMUCommandExecProcess
 
class SMMUv3DeviceInterface
 

Additional Inherited Members

- Public Types inherited from gem5::ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject.
 
- 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.
 
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 inherited from gem5::ClockedObject
PowerStatepowerState
 

Detailed Description

Definition at line 86 of file smmu_v3.hh.

Constructor & Destructor Documentation

◆ SMMUv3()

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

Definition at line 59 of file smmu_v3.cc.

References gem5::SimObject::params().

◆ ~SMMUv3()

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

Definition at line 180 of file smmu_v3.hh.

Member Function Documentation

◆ drain()

DrainState gem5::SMMUv3::drain ( )
overridevirtual

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

Reimplemented from gem5::SimObject.

Definition at line 770 of file smmu_v3.cc.

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

◆ 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 796 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 715 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 706 of file smmu_v3.cc.

References gem5::SMMU_SECURE_SZ.

Referenced by readControl(), and writeControl().

◆ processCommand()

◆ processCommands()

◆ readControl()

◆ recvAtomic()

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

◆ recvReqRetry()

◆ recvTimingReq()

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

◆ recvTimingResp()

◆ runProcess()

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

◆ runProcessAtomic()

◆ runProcessTiming()

◆ 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

Reimplemented from gem5::ClockedObject.

Definition at line 780 of file smmu_v3.cc.

References DPRINTF, regs, and SERIALIZE_ARRAY.

◆ tableWalkRecvReqRetry()

◆ tableWalkRecvTimingResp()

◆ unserialize()

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

Unserialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from gem5::ClockedObject.

Definition at line 788 of file smmu_v3.cc.

References DPRINTF, regs, and UNSERIALIZE_ARRAY.

◆ writeControl()

Friends And Related Symbol Documentation

◆ SMMUCommandExecProcess

friend class SMMUCommandExecProcess
friend

Definition at line 92 of file smmu_v3.hh.

◆ SMMUProcess

friend class SMMUProcess
friend

Definition at line 90 of file smmu_v3.hh.

◆ SMMUTranslationProcess

friend class SMMUTranslationProcess
friend

Definition at line 91 of file smmu_v3.hh.

◆ SMMUv3DeviceInterface

friend class SMMUv3DeviceInterface
friend

Definition at line 93 of file smmu_v3.hh.

Member Data Documentation

◆ commandExecutor

SMMUCommandExecProcess gem5::SMMUv3::commandExecutor
protected

Definition at line 156 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 138 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 100 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 154 of file smmu_v3.hh.

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

◆ eventqInterrupt

ArmInterruptPin* const gem5::SMMUv3::eventqInterrupt
protected

Definition at line 104 of file smmu_v3.hh.

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

◆ ifcSmmuLat

const Cycles gem5::SMMUv3::ifcSmmuLat
protected

Definition at line 136 of file smmu_v3.hh.

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

◆ ifcSmmuSem

SMMUSemaphore gem5::SMMUv3::ifcSmmuSem
protected

Definition at line 123 of file smmu_v3.hh.

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

◆ ipaCache

IPACache gem5::SMMUv3::ipaCache
protected

Definition at line 108 of file smmu_v3.hh.

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

◆ ipaCacheEnable

const bool gem5::SMMUv3::ipaCacheEnable
protected

Definition at line 113 of file smmu_v3.hh.

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

◆ ipaLat

const Cycles gem5::SMMUv3::ipaLat
protected

Definition at line 139 of file smmu_v3.hh.

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

◆ ipaSem

SMMUSemaphore gem5::SMMUv3::ipaSem
protected

Definition at line 126 of file smmu_v3.hh.

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

◆ packetsTableWalkToRetry

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

Definition at line 164 of file smmu_v3.hh.

Referenced by runProcessTiming(), and tableWalkRecvReqRetry().

◆ packetsToRetry

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

Definition at line 163 of file smmu_v3.hh.

Referenced by recvReqRetry(), and runProcessTiming().

◆ processCommandsEvent

MemberEventWrapper<&SMMUv3::processCommands> gem5::SMMUv3::processCommandsEvent
protected

Definition at line 174 of file smmu_v3.hh.

Referenced by writeControl().

◆ ptwSem

SMMUSemaphore gem5::SMMUv3::ptwSem
protected

Definition at line 131 of file smmu_v3.hh.

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

◆ regs

◆ regsMap

const AddrRange gem5::SMMUv3::regsMap
protected

Definition at line 158 of file smmu_v3.hh.

Referenced by readControl(), and writeControl().

◆ requestorId

const RequestorID gem5::SMMUv3::requestorId
protected

Definition at line 96 of file smmu_v3.hh.

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

◆ requestPort

SMMURequestPort gem5::SMMUv3::requestPort
protected

Definition at line 98 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 137 of file smmu_v3.hh.

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

◆ smmuIfcSem

SMMUSemaphore gem5::SMMUv3::smmuIfcSem
protected

Definition at line 124 of file smmu_v3.hh.

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

◆ stats

◆ system

◆ tableWalkPort

SMMUTableWalkPort gem5::SMMUv3::tableWalkPort
protected

Definition at line 99 of file smmu_v3.hh.

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

◆ tableWalkPortEnable

bool gem5::SMMUv3::tableWalkPortEnable
protected

Definition at line 115 of file smmu_v3.hh.

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

◆ tlb

◆ tlbEnable

const bool gem5::SMMUv3::tlbEnable
protected

◆ tlbLat

const Cycles gem5::SMMUv3::tlbLat
protected

Definition at line 135 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 130 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 140 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 Jun 18 2024 16:24:14 for gem5 by doxygen 1.11.0