gem5  v21.1.0.2
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
gem5::System Class Reference

#include <system.hh>

Inheritance diagram for gem5::System:
gem5::SimObject gem5::PCEventScope gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named gem5::ArmSystem

Classes

class  SystemPort
 Private class for the system port which is only used as a requestor for debug access and for non-structural entities that do not have a port of their own. More...
 
class  Threads
 

Public Member Functions

RequestPortgetSystemPort ()
 Get a reference to the system port that can be used by non-structural simulation objects like processes or threads, or external entities like loaders and debuggers, etc, to access the memory system. More...
 
PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Additional function to return the Port of a memory object. More...
 
unsigned int cacheLineSize () const
 Get the cache line size of the system. More...
 
bool schedule (PCEvent *event) override
 
bool remove (PCEvent *event) override
 
KvmVMgetKvmVM ()
 Get a pointer to the Kernel Virtual Machine (KVM) SimObject, if present. More...
 
bool validKvmEnvironment () const
 Verify gem5 configuration will support KVM emulation. More...
 
memory::PhysicalMemorygetPhysMem ()
 Get a pointer to access the physical memory of the system. More...
 
Addr freeMemSize (int poolID=0) const
 Amount of physical memory that is still free. More...
 
Addr memSize (int poolID=0) const
 Amount of physical memory that exists. More...
 
bool isMemAddr (Addr addr) const
 Check if a physical address is within a range of a memory that is part of the global address map. More...
 
void addDeviceMemory (RequestorID requestorId, memory::AbstractMemory *deviceMemory)
 Add a physical memory range for a device. More...
 
bool isDeviceMemAddr (const PacketPtr &pkt) const
 Similar to isMemAddr but for devices. More...
 
memory::AbstractMemorygetDeviceMemory (const PacketPtr &pkt) const
 Return a pointer to the device memory. More...
 
AddrRangeList getShadowRomRanges () const
 
Arch getArch () const
 Get the architecture. More...
 
ByteOrder getGuestByteOrder () const
 Get the guest byte order. More...
 
Addr getPageBytes () const
 Get the page bytes for the ISA. More...
 
Addr getPageShift () const
 Get the number of bits worth of in-page address for the ISA. More...
 
ThermalModelgetThermalModel () const
 The thermal model used for this system (if any). More...
 
RequestorID getRequestorId (const SimObject *requestor, std::string subrequestor={})
 Request an id used to create a request object in the system. More...
 
RequestorID getGlobalRequestorId (const std::string &requestor_name)
 Registers a GLOBAL RequestorID, which is a RequestorID not related to any particular SimObject; since no SimObject is passed, the requestor gets registered by providing the full requestor name. More...
 
std::string getRequestorName (RequestorID requestor_id)
 Get the name of an object for a given request id. More...
 
RequestorID lookupRequestorId (const SimObject *obj) const
 Looks up the RequestorID for a given SimObject returns an invalid RequestorID (invldRequestorId) if not found. More...
 
RequestorID lookupRequestorId (const std::string &name) const
 Looks up the RequestorID for a given object name string returns an invalid RequestorID (invldRequestorId) if not found. More...
 
RequestorID maxRequestors ()
 Get the number of requestors registered in the system. More...
 
void regStats () override
 Callback to set stat parameters. More...
 
uint64_t incWorkItemsBegin ()
 Called by pseudo_inst to track the number of work items started by this system. More...
 
uint64_t incWorkItemsEnd ()
 Called by pseudo_inst to track the number of work items completed by this system. More...
 
int markWorkItem (int index)
 Called by pseudo_inst to mark the cpus actively executing work items. More...
 
void workItemBegin (uint32_t tid, uint32_t workid)
 
void workItemEnd (uint32_t tid, uint32_t workid)
 
bool trapToGdb (int signal, ContextID ctx_id) const
 
 PARAMS (System)
 
 System (const Params &p)
 
 ~System ()
 
const AddrRangem5opRange () const
 Range used by memory-mapped m5 pseudo-ops if enabled. More...
 
Addr allocPhysPages (int npages, int poolID=0)
 Allocate npages contiguous unused physical pages. More...
 
void registerThreadContext (ThreadContext *tc, ContextID assigned=InvalidContextID)
 
void replaceThreadContext (ThreadContext *tc, ContextID context_id)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
bool isAtomicMode () const
 Is the system in atomic mode? More...
 
bool isTimingMode () const
 Is the system in timing mode? More...
 
bool bypassCaches () const
 Should caches be bypassed? More...
 
enums::MemoryMode getMemoryMode () const
 Get the memory mode of the system. More...
 
void setMemoryMode (enums::MemoryMode mode)
 Change the memory mode of the system. More...
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
virtual void init ()
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
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...
 
- 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 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
 

Static Public Member Functions

static void printSystems ()
 
- 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

Threads threads
 
const bool multiThread
 
std::vector< MemPoolmemPools
 Memory allocation objects for all physical memories in the system. More...
 
uint64_t init_param
 
PortProxy physProxy
 Port to physical memory used for writing object files into ram at boot. More...
 
Workloadworkload = nullptr
 OS kernel. More...
 
std::map< std::pair< uint32_t, uint32_t >, TicklastWorkItemStarted
 
std::map< uint32_t, statistics::Histogram * > workItemStats
 
FutexMap futexMap
 
std::set< int > PIDs
 Process set to track which PIDs have already been allocated. More...
 
std::list< BasicSignalsignalList
 
std::vector< RedirectPath * > redirectPaths
 

Static Public Attributes

static std::vector< System * > systemList
 
static int numSystemsRunning = 0
 
static const int maxPID = 32768
 

Protected Member Functions

std::string stripSystemName (const std::string &requestor_name) const
 Strips off the system name from a requestor name. More...
 
RequestorID _getRequestorId (const SimObject *requestor, const std::string &requestor_name)
 helper function for getRequestorId More...
 
std::string leafRequestorName (const SimObject *requestor, const std::string &subrequestor)
 Helper function for constructing the full (sub)requestor name by providing the root requestor and the relative subrequestor name. More...
 
- 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 Attributes

KvmVM *const kvmVM = nullptr
 
memory::PhysicalMemory physmem
 
AddrRangeList ShadowRomRanges
 
enums::MemoryMode memoryMode
 
const unsigned int _cacheLineSize
 
uint64_t workItemsBegin = 0
 
uint64_t workItemsEnd = 0
 
uint32_t numWorkIds
 
std::vector< RequestorInforequestors
 This array is a per-system list of all devices capable of issuing a memory system request and an associated string for each requestor id. More...
 
ThermalModelthermalModel
 
const AddrRange _m5opRange
 Range for memory-mapped m5 pseudo ops. More...
 
- 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...
 

Private Attributes

std::list< PCEvent * > liveEvents
 
SystemPort _systemPort
 
std::unordered_map< RequestorID, std::vector< memory::AbstractMemory * > > deviceMemMap
 

Additional Inherited Members

- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 

Detailed Description

Definition at line 77 of file system.hh.

Constructor & Destructor Documentation

◆ System()

gem5::System::System ( const Params p)

◆ ~System()

gem5::System::~System ( )

Definition at line 269 of file system.cc.

References gem5::ArmISA::j, numWorkIds, and workItemStats.

Member Function Documentation

◆ _getRequestorId()

RequestorID gem5::System::_getRequestorId ( const SimObject requestor,
const std::string &  requestor_name 
)
protected

helper function for getRequestorId

Definition at line 593 of file system.cc.

References gem5::statistics::enabled(), fatal, gem5::ArmISA::i, gem5::Named::name(), requestors, and stripSystemName().

Referenced by getGlobalRequestorId(), and getRequestorId().

◆ addDeviceMemory()

void gem5::System::addDeviceMemory ( RequestorID  requestorId,
memory::AbstractMemory deviceMemory 
)

Add a physical memory range for a device.

The ranges added here will be considered a non-PIO memory address if the requestorId of the packet and range match something in the device memory map.

Definition at line 382 of file system.cc.

References deviceMemMap.

◆ allocPhysPages()

Addr gem5::System::allocPhysPages ( int  npages,
int  poolID = 0 
)

Allocate npages contiguous unused physical pages.

Returns
Starting address of first page

Definition at line 355 of file system.cc.

References gem5::FullSystem, and memPools.

Referenced by gem5::Process::allocateMem(), gem5::X86ISA::X86_64Process::initState(), and gem5::Process::replicatePage().

◆ bypassCaches()

bool gem5::System::bypassCaches ( ) const
inline

◆ cacheLineSize()

unsigned int gem5::System::cacheLineSize ( ) const
inline

◆ freeMemSize()

Addr gem5::System::freeMemSize ( int  poolID = 0) const

Amount of physical memory that is still free.

Definition at line 369 of file system.cc.

References gem5::FullSystem, and memPools.

Referenced by gem5::Linux::procMeminfo().

◆ getArch()

Arch gem5::System::getArch ( ) const
inline

Get the architecture.

Definition at line 395 of file system.hh.

Referenced by gem5::ruby::Sequencer::makeRequest().

◆ getDeviceMemory()

memory::AbstractMemory * gem5::System::getDeviceMemory ( const PacketPtr pkt) const

◆ getGlobalRequestorId()

RequestorID gem5::System::getGlobalRequestorId ( const std::string &  requestor_name)

Registers a GLOBAL RequestorID, which is a RequestorID not related to any particular SimObject; since no SimObject is passed, the requestor gets registered by providing the full requestor name.

Parameters
requestorNamefull name of the requestor
Returns
the requestor's ID.

Definition at line 580 of file system.cc.

References _getRequestorId().

◆ getGuestByteOrder()

ByteOrder gem5::System::getGuestByteOrder ( ) const
inline

Get the guest byte order.

Definition at line 401 of file system.hh.

References gem5::SimObject::params().

Referenced by gem5::_llseekFunc(), and gem5::getcpuFunc().

◆ getKvmVM()

KvmVM* gem5::System::getKvmVM ( )
inline

Get a pointer to the Kernel Virtual Machine (KVM) SimObject, if present.

Definition at line 342 of file system.hh.

References kvmVM.

Referenced by gem5::MuxingKvmGic::MuxingKvmGic().

◆ getMemoryMode()

enums::MemoryMode gem5::System::getMemoryMode ( ) const
inline

Get the memory mode of the system.

\warn This should only be used by the Python world. The C++ world should use one of the query functions above (isAtomicMode(), isTimingMode(), bypassCaches()).

Definition at line 299 of file system.hh.

References memoryMode.

Referenced by gem5::MinorCPU::init().

◆ getPageBytes()

Addr gem5::System::getPageBytes ( ) const
inline

Get the page bytes for the ISA.

Definition at line 409 of file system.hh.

References gem5::ArmISA::PageBytes.

◆ getPageShift()

Addr gem5::System::getPageShift ( ) const
inline

Get the number of bits worth of in-page address for the ISA.

Definition at line 414 of file system.hh.

References gem5::ArmISA::PageShift.

Referenced by gem5::MemPool::allocate(), gem5::MemPool::allocatedBytes(), gem5::MemPool::freeBytes(), gem5::MemPool::freePageAddr(), and gem5::MemPool::totalBytes().

◆ getPhysMem()

memory::PhysicalMemory& gem5::System::getPhysMem ( )
inline

Get a pointer to access the physical memory of the system.

Definition at line 348 of file system.hh.

References physmem.

Referenced by gem5::KvmVM::delayedStartup(), gem5::ArmSemihosting::gatherHeapInfo(), and gem5::ArmISA::FsLinux::initState().

◆ getPort()

Port & gem5::System::getPort ( const std::string &  if_name,
PortID  idx = InvalidPortID 
)
overridevirtual

Additional function to return the Port of a memory object.

Reimplemented from gem5::SimObject.

Definition at line 276 of file system.cc.

References _systemPort.

◆ getRequestorId()

RequestorID gem5::System::getRequestorId ( const SimObject requestor,
std::string  subrequestor = {} 
)

Request an id used to create a request object in the system.

All objects that intend to issues requests into the memory system must request an id in the init() phase of startup. All requestor ids must be fixed by the regStats() phase that immediately precedes it. This allows objects in the memory system to understand how many requestors may exist and appropriately name the bins of their per-requestor stats before the stats are finalized.

Registers a RequestorID: This method takes two parameters, one of which is optional. The first one is the requestor object, and it is compulsory; in case a object has multiple (sub)requestors, a second parameter must be provided and it contains the name of the subrequestor. The method will create a requestor's name by concatenating the SimObject name with the eventual subrequestor string, separated by a dot.

As an example: For a cpu having two requestors: a data requestor and an instruction requestor, the method must be called twice:

instRequestorId = getRequestorId(cpu, "inst"); dataRequestorId = getRequestorId(cpu, "data");

and the requestors' names will be:

  • "cpu.inst"
  • "cpu.data"
Parameters
requestorSimObject related to the requestor
subrequestorString containing the subrequestor's name
Returns
the requestor's ID.

Definition at line 586 of file system.cc.

References _getRequestorId(), and leafRequestorName().

Referenced by gem5::CheckerCPU::init(), and System().

◆ getRequestorName()

std::string gem5::System::getRequestorName ( RequestorID  requestor_id)

◆ getShadowRomRanges()

AddrRangeList gem5::System::getShadowRomRanges ( ) const
inline

Definition at line 390 of file system.hh.

References ShadowRomRanges.

Referenced by gem5::ruby::RubyPort::MemResponsePort::isShadowRomAddress().

◆ getSystemPort()

RequestPort& gem5::System::getSystemPort ( )
inline

Get a reference to the system port that can be used by non-structural simulation objects like processes or threads, or external entities like loaders and debuggers, etc, to access the memory system.

Returns
a reference to the system port we own

Definition at line 245 of file system.hh.

References _systemPort.

◆ getThermalModel()

ThermalModel* gem5::System::getThermalModel ( ) const
inline

The thermal model used for this system (if any).

Definition at line 419 of file system.hh.

References thermalModel.

Referenced by gem5::RealViewTemperatureSensor::read().

◆ incWorkItemsBegin()

uint64_t gem5::System::incWorkItemsBegin ( )
inline

Called by pseudo_inst to track the number of work items started by this system.

Definition at line 540 of file system.hh.

References workItemsBegin.

Referenced by gem5::pseudo_inst::workbegin().

◆ incWorkItemsEnd()

uint64_t gem5::System::incWorkItemsEnd ( )
inline

Called by pseudo_inst to track the number of work items completed by this system.

Definition at line 550 of file system.hh.

References workItemsEnd.

Referenced by gem5::pseudo_inst::workend().

◆ isAtomicMode()

bool gem5::System::isAtomicMode ( ) const
inline

Is the system in atomic mode?

There are currently two different atomic memory modes: 'atomic', which supports caches; and 'atomic_noncaching', which bypasses caches. The latter is used by hardware virtualized CPUs. SimObjects are expected to use Port::sendAtomic() and Port::recvAtomic() when accessing memory in this mode.

Definition at line 264 of file system.hh.

References gem5::ArmISA::atomic, and memoryMode.

Referenced by gem5::SMMUTranslationProcess::completeTransaction(), gem5::SMMUv3::processCommands(), gem5::SMMUv3::runProcess(), gem5::Gicv3Its::runProcess(), gem5::DmaPort::sendDma(), gem5::NonCachingSimpleCPU::verifyMemoryMode(), and gem5::AtomicSimpleCPU::verifyMemoryMode().

◆ isDeviceMemAddr()

bool gem5::System::isDeviceMemAddr ( const PacketPtr pkt) const

Similar to isMemAddr but for devices.

Checks if a physical address of the packet match an address range of a device corresponding to the RequestorId of the request.

Definition at line 389 of file system.cc.

References deviceMemMap, getDeviceMemory(), and gem5::Packet::requestorId().

Referenced by gem5::ruby::RubyPort::MemResponsePort::hitCallback(), gem5::ruby::RubyPort::MemResponsePort::isPhysMemAddress(), gem5::ruby::RubyPort::ruby_hit_callback(), and gem5::ruby::HTMSequencer::rubyHtmCallback().

◆ isMemAddr()

bool gem5::System::isMemAddr ( Addr  addr) const

◆ isTimingMode()

bool gem5::System::isTimingMode ( ) const
inline

◆ leafRequestorName()

std::string gem5::System::leafRequestorName ( const SimObject requestor,
const std::string &  subrequestor 
)
protected

Helper function for constructing the full (sub)requestor name by providing the root requestor and the relative subrequestor name.

Definition at line 624 of file system.cc.

References gem5::Named::name().

Referenced by getRequestorId().

◆ lookupRequestorId() [1/2]

RequestorID gem5::System::lookupRequestorId ( const SimObject obj) const

Looks up the RequestorID for a given SimObject returns an invalid RequestorID (invldRequestorId) if not found.

Definition at line 543 of file system.cc.

References fatal_if, gem5::ArmISA::i, gem5::ArmISA::id, gem5::Request::invldRequestorId, and requestors.

Referenced by gem5::memory::qos::PropFairPolicy::initRequestor(), and gem5::memory::qos::Policy::pair().

◆ lookupRequestorId() [2/2]

RequestorID gem5::System::lookupRequestorId ( const std::string &  name) const

Looks up the RequestorID for a given object name string returns an invalid RequestorID (invldRequestorId) if not found.

Definition at line 566 of file system.cc.

References gem5::ArmISA::i, gem5::Request::invldRequestorId, gem5::Named::name(), requestors, and stripSystemName().

◆ m5opRange()

const AddrRange& gem5::System::m5opRange ( ) const
inline

Range used by memory-mapped m5 pseudo-ops if enabled.

Returns an invalid/empty range if disabled.

Definition at line 596 of file system.hh.

References _m5opRange.

Referenced by gem5::MemPool::allocate().

◆ markWorkItem()

int gem5::System::markWorkItem ( int  index)
inline

Called by pseudo_inst to mark the cpus actively executing work items.

Returns the total number of cpus that have executed work item begin or ends.

Definition at line 561 of file system.hh.

References gem5::MipsISA::index, gem5::System::Threads::markActive(), gem5::System::Threads::numActive(), and threads.

Referenced by gem5::pseudo_inst::workbegin(), and gem5::pseudo_inst::workend().

◆ maxRequestors()

RequestorID gem5::System::maxRequestors ( )
inline

◆ memSize()

Addr gem5::System::memSize ( int  poolID = 0) const

Amount of physical memory that exists.

Definition at line 362 of file system.cc.

References gem5::FullSystem, and memPools.

Referenced by gem5::Linux::procMeminfo().

◆ PARAMS()

gem5::System::PARAMS ( System  )

◆ printSystems()

void gem5::System::printSystems ( )
static

Definition at line 511 of file system.cc.

References gem5::ArmISA::i, gem5::Named::name(), and systemList.

Referenced by gem5::printSystems().

◆ registerThreadContext()

void gem5::System::registerThreadContext ( ThreadContext tc,
ContextID  assigned = InvalidContextID 
)

◆ regStats()

void gem5::System::regStats ( )
overridevirtual

Callback to set stat parameters.

This callback is typically used for complex stats (e.g., distributions) that need parameters in addition to a name and a description. Stat names and descriptions should typically be set from the constructor usingo from the constructor using the ADD_STAT macro.

Reimplemented from gem5::statistics::Group.

Definition at line 472 of file system.cc.

References gem5::ccprintf(), gem5::ArmISA::j, numWorkIds, gem5::statistics::Group::regStats(), and workItemStats.

◆ remove()

bool gem5::System::remove ( PCEvent event)
overridevirtual

Implements gem5::PCEventScope.

Definition at line 312 of file system.cc.

References gem5::MipsISA::event, liveEvents, and threads.

◆ replaceThreadContext()

void gem5::System::replaceThreadContext ( ThreadContext tc,
ContextID  context_id 
)

◆ schedule()

bool gem5::System::schedule ( PCEvent event)
overridevirtual

Implements gem5::PCEventScope.

Definition at line 302 of file system.cc.

References gem5::MipsISA::event, liveEvents, and threads.

◆ serialize()

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

Serialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from gem5::SimObject.

Definition at line 416 of file system.cc.

References gem5::csprintf(), memPools, gem5::paramOut(), physmem, SERIALIZE_CONTAINER, gem5::Serializable::serializeSection(), gem5::ArmISA::t, gem5::System::Threads::threads, and threads.

◆ setMemoryMode()

void gem5::System::setMemoryMode ( enums::MemoryMode  mode)

Change the memory mode of the system.

\warn This should only be called by the Python!

Parameters
modeMode to change to (atomic/timing/...)

Definition at line 283 of file system.cc.

References gem5::Drained, gem5::Drainable::drainState(), memoryMode, and gem5::ArmISA::mode.

◆ stripSystemName()

std::string gem5::System::stripSystemName ( const std::string &  requestor_name) const
protected

Strips off the system name from a requestor name.

Definition at line 533 of file system.cc.

References gem5::Named::name(), and gem5::startswith().

Referenced by _getRequestorId(), and lookupRequestorId().

◆ trapToGdb()

bool gem5::System::trapToGdb ( int  signal,
ContextID  ctx_id 
) const

◆ unserialize()

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

Unserialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from gem5::SimObject.

Definition at line 443 of file system.cc.

References gem5::csprintf(), gem5::ArmISA::i, memPools, gem5::optParamIn(), physmem, gem5::ArmISA::t, gem5::System::Threads::threads, threads, UNSERIALIZE_CONTAINER, and gem5::Serializable::unserializeSection().

◆ validKvmEnvironment()

bool gem5::System::validKvmEnvironment ( ) const

Verify gem5 configuration will support KVM emulation.

Definition at line 337 of file system.cc.

References gem5::System::Threads::empty(), and threads.

Referenced by gem5::MuxingKvmGic::drainResume(), gem5::ArchTimerKvm::scheduleEvents(), and gem5::MuxingKvmGic::startup().

◆ workItemBegin()

void gem5::System::workItemBegin ( uint32_t  tid,
uint32_t  workid 
)
inline

Definition at line 568 of file system.hh.

References gem5::curTick(), lastWorkItemStarted, and gem5::MipsISA::p.

Referenced by gem5::pseudo_inst::workbegin().

◆ workItemEnd()

void gem5::System::workItemEnd ( uint32_t  tid,
uint32_t  workid 
)

Member Data Documentation

◆ _cacheLineSize

const unsigned int gem5::System::_cacheLineSize
protected

Definition at line 431 of file system.hh.

Referenced by cacheLineSize(), and System().

◆ _m5opRange

const AddrRange gem5::System::_m5opRange
protected

Range for memory-mapped m5 pseudo ops.

The range will be invalid/empty if disabled.

Definition at line 584 of file system.hh.

Referenced by m5opRange().

◆ _systemPort

SystemPort gem5::System::_systemPort
private

Definition at line 111 of file system.hh.

Referenced by getPort(), and getSystemPort().

◆ deviceMemMap

std::unordered_map<RequestorID, std::vector<memory::AbstractMemory *> > gem5::System::deviceMemMap
private

Definition at line 115 of file system.hh.

Referenced by addDeviceMemory(), getDeviceMemory(), and isDeviceMemAddr().

◆ futexMap

FutexMap gem5::System::futexMap

Definition at line 626 of file system.hh.

Referenced by gem5::exitFutexWake(), gem5::futexFunc(), and gem5::BaseCPU::postInterrupt().

◆ init_param

uint64_t gem5::System::init_param

Definition at line 328 of file system.hh.

Referenced by gem5::pseudo_inst::initParam().

◆ kvmVM

KvmVM* const gem5::System::kvmVM = nullptr
protected

Definition at line 423 of file system.hh.

Referenced by getKvmVM(), and System().

◆ lastWorkItemStarted

std::map<std::pair<uint32_t, uint32_t>, Tick> gem5::System::lastWorkItemStarted

Definition at line 612 of file system.hh.

Referenced by workItemBegin(), and workItemEnd().

◆ liveEvents

std::list<PCEvent *> gem5::System::liveEvents
private

Definition at line 110 of file system.hh.

Referenced by registerThreadContext(), remove(), replaceThreadContext(), and schedule().

◆ maxPID

const int gem5::System::maxPID = 32768
static

Definition at line 628 of file system.hh.

Referenced by gem5::cloneFunc(), and gem5::Process::Process().

◆ memoryMode

enums::MemoryMode gem5::System::memoryMode
protected

Definition at line 429 of file system.hh.

Referenced by bypassCaches(), getMemoryMode(), isAtomicMode(), isTimingMode(), and setMemoryMode().

◆ memPools

std::vector<MemPool> gem5::System::memPools

Memory allocation objects for all physical memories in the system.

Definition at line 326 of file system.hh.

Referenced by allocPhysPages(), freeMemSize(), memSize(), serialize(), System(), and unserialize().

◆ multiThread

const bool gem5::System::multiThread

◆ numSystemsRunning

int gem5::System::numSystemsRunning = 0
static

Definition at line 622 of file system.hh.

Referenced by System().

◆ numWorkIds

uint32_t gem5::System::numWorkIds
protected

Definition at line 435 of file system.hh.

Referenced by regStats(), workItemEnd(), and ~System().

◆ physmem

memory::PhysicalMemory gem5::System::physmem
protected

Definition at line 425 of file system.hh.

Referenced by getPhysMem(), isMemAddr(), serialize(), System(), and unserialize().

◆ physProxy

PortProxy gem5::System::physProxy

◆ PIDs

std::set<int> gem5::System::PIDs

Process set to track which PIDs have already been allocated.

Definition at line 631 of file system.hh.

Referenced by gem5::Process::Process().

◆ redirectPaths

std::vector<RedirectPath*> gem5::System::redirectPaths

Definition at line 640 of file system.hh.

Referenced by gem5::Process::checkPathRedirect().

◆ requestors

std::vector<RequestorInfo> gem5::System::requestors
protected

This array is a per-system list of all devices capable of issuing a memory system request and an associated string for each requestor id.

It's used to uniquely id any requestor in the system by name for things like cache statistics.

Definition at line 442 of file system.hh.

Referenced by _getRequestorId(), getRequestorName(), lookupRequestorId(), and maxRequestors().

◆ ShadowRomRanges

AddrRangeList gem5::System::ShadowRomRanges
protected

Definition at line 427 of file system.hh.

Referenced by getShadowRomRanges().

◆ signalList

std::list<BasicSignal> gem5::System::signalList

Definition at line 635 of file system.hh.

Referenced by gem5::exitImpl(), gem5::pollFunc(), gem5::selectFunc(), and gem5::wait4Func().

◆ systemList

std::vector< System * > gem5::System::systemList
static

Definition at line 621 of file system.hh.

Referenced by gem5::exitImpl(), printSystems(), and System().

◆ thermalModel

ThermalModel* gem5::System::thermalModel
protected

Definition at line 444 of file system.hh.

Referenced by getThermalModel().

◆ threads

Threads gem5::System::threads

Definition at line 316 of file system.hh.

Referenced by gem5::MipsProcess::argsInit(), gem5::PowerProcess::argsInit(), gem5::RiscvProcess::argsInit(), gem5::SparcProcess::argsInit(), gem5::X86ISA::X86Process::argsInit(), gem5::ArmProcess::argsInit(), gem5::ArmProcess64::armHwcapImpl(), gem5::Gicv3CPUInterface::assertWakeRequest(), gem5::ArmISA::TLBIOp::broadcast(), gem5::memory::AbstractMemory::checkLockedAddrList(), gem5::MuxingKvmGic::clearBankedDistRange(), gem5::GicV2::clearInt(), gem5::MaltaCChip::clearIntr(), gem5::cloneFunc(), gem5::KvmVM::contextIdToVCpuId(), gem5::MuxingKvmGic::copyBankedDistRange(), gem5::MuxingKvmGic::copyGicState(), gem5::Linux::cpuOnline(), gem5::GenericTimer::createTimers(), gem5::Gicv3::deassertAll(), gem5::Gicv3::deassertInt(), gem5::Gicv3CPUInterface::deassertWakeRequest(), gem5::SparcISA::TLB::doMmuRegWrite(), gem5::ArmISA::FsLinux::dumpDmesg(), gem5::exitImpl(), gem5::MemState::fixupFault(), gem5::MuxingKvmGic::fromKvmToGicV2(), gem5::GPUCommandProcessor::functionalReadHsaSignal(), gem5::Iob::generateIpi(), gem5::GicV2::genSwiMask(), gem5::Gicv3Redistributor::getAffinity(), gem5::getrlimitFunc(), gem5::FVPBasePwrCtrl::getThreadContextByMPID(), gem5::Gicv3::haveAsserted(), gem5::Gicv3::init(), gem5::Plic::init(), gem5::Clint::init(), gem5::CpuLocalTimer::init(), gem5::RiscvISA::FsLinux::initState(), gem5::PowerProcess::initState(), gem5::SparcISA::FsWorkload::initState(), gem5::SparcProcess::initState(), gem5::RiscvISA::BareMetal::initState(), gem5::X86ISA::FsLinux::initState(), gem5::RiscvProcess64::initState(), gem5::ArmISA::FsFreebsd::initState(), gem5::Sparc32Process::initState(), gem5::Process::initState(), gem5::RiscvProcess32::initState(), gem5::X86ISA::FsWorkload::initState(), gem5::ArmProcess32::initState(), gem5::ArmProcess64::initState(), gem5::Sparc64Process::initState(), gem5::ArmISA::FsLinux::initState(), gem5::X86ISA::X86_64Process::initState(), gem5::ArmISA::FsWorkload::initState(), gem5::X86ISA::I386Process::initState(), gem5::prefetch::Queued::insert(), gem5::o3::CPU::insertThread(), markWorkItem(), gem5::GicV2::postDelayedFiq(), gem5::GicV2::postDelayedInt(), gem5::Gicv3::postInt(), gem5::MaltaCChip::postIntr(), gem5::FVPBasePwrCtrl::powerCoreOn(), gem5::DistIface::SyncEvent::process(), gem5::ThreadContext::quiesce(), gem5::ThreadContext::quiesceTick(), gem5::Clint::raiseInterruptPin(), gem5::A9SCU::read(), gem5::Gicv3Redistributor::read(), gem5::GicV2::readCpu(), gem5::GicV2::readDistributor(), gem5::SparcISA::ISA::readFSReg(), gem5::ArmISA::ISA::readMiscReg(), gem5::Clint::readMSIP(), gem5::Iob::receiveDeviceInterrupt(), gem5::Iob::receiveJBusInterrupt(), registerThreadContext(), gem5::MemState::remapRegion(), remove(), replaceThreadContext(), gem5::schedGetaffinityFunc(), schedule(), gem5::HSAPacketProcessor::sendAgentDispatchCompletionSignal(), gem5::HSAPacketProcessor::sendCompletionSignal(), gem5::CpuLocalTimer::serialize(), serialize(), gem5::GenericTimer::setMiscReg(), gem5::setpgidFunc(), gem5::GicV2::softInt(), gem5::FVPBasePwrCtrl::startup(), gem5::ArmISA::FsLinux::startup(), gem5::GPUCommandProcessor::submitDispatchPkt(), gem5::tgkillFunc(), gem5::DistIface::toggleSync(), gem5::GPUCommandProcessor::translateOrDie(), gem5::HSAPacketProcessor::translateOrDie(), gem5::MemState::unmapRegion(), gem5::CpuLocalTimer::unserialize(), gem5::GenericTimer::unserialize(), unserialize(), gem5::GPUCommandProcessor::updateHsaSignal(), gem5::Plic::updateInt(), gem5::VGic::updateIntState(), gem5::GicV2::updateIntState(), gem5::GicV2::updateRunPri(), validKvmEnvironment(), gem5::VGic::VGic(), gem5::pseudo_inst::wakeCPU(), gem5::FVPBasePwrCtrl::write(), and gem5::Clint::writeMSIP().

◆ workItemsBegin

uint64_t gem5::System::workItemsBegin = 0
protected

Definition at line 433 of file system.hh.

Referenced by incWorkItemsBegin().

◆ workItemsEnd

uint64_t gem5::System::workItemsEnd = 0
protected

Definition at line 434 of file system.hh.

Referenced by incWorkItemsEnd().

◆ workItemStats

std::map<uint32_t, statistics::Histogram*> gem5::System::workItemStats

Definition at line 613 of file system.hh.

Referenced by regStats(), workItemEnd(), and ~System().

◆ workload

Workload* gem5::System::workload = nullptr

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

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