gem5  v20.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
System Class Reference

#include <system.hh>

Inheritance diagram for System:
SimObject PCEventScope EventManager Serializable Drainable Stats::Group ArmSystem

Classes

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

Public Types

typedef SystemParams Params
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 

Public Member Functions

void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
void startup () override
 startup() is the final initialization call before simulation. More...
 
MasterPortgetSystemPort ()
 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...
 
ThreadContextfindFreeContext ()
 
ThreadContextgetThreadContext (ContextID tid) const
 
bool schedule (PCEvent *event) override
 
bool remove (PCEvent *event) override
 
unsigned numContexts () const
 
int numRunningContexts ()
 Return number of running (non-halted) thread contexts in system. More...
 
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...
 
PhysicalMemorygetPhysMem ()
 Get a pointer to access the physical memory of the system. More...
 
Addr freeMemSize () const
 Amount of physical memory that is still free. More...
 
Addr memSize () 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...
 
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...
 
MasterID getMasterId (const SimObject *master, std::string submaster=std::string())
 Request an id used to create a request object in the system. More...
 
MasterID getGlobalMasterId (const std::string &master_name)
 Registers a GLOBAL MasterID, which is a MasterID not related to any particular SimObject; since no SimObject is passed, the master gets registered by providing the full master name. More...
 
std::string getMasterName (MasterID master_id)
 Get the name of an object for a given request id. More...
 
MasterID lookupMasterId (const SimObject *obj) const
 Looks up the MasterID for a given SimObject returns an invalid MasterID (invldMasterId) if not found. More...
 
MasterID lookupMasterId (const std::string &name) const
 Looks up the MasterID for a given object name string returns an invalid MasterID (invldMasterId) if not found. More...
 
MasterID maxMasters ()
 Get the number of masters 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 breakpoint ()
 
 System (Params *p)
 
 ~System ()
 
const Paramsparams () const
 
const AddrRangem5opRange () const
 Range used by memory-mapped m5 pseudo-ops if enabled. More...
 
Addr allocPhysPages (int npages)
 Allocate npages contiguous unused physical pages. More...
 
ContextID 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...
 
void drainResume () override
 Resume execution after a successful drain. 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 SimObject
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...
 
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...
 
const Paramsparams () const
 
 SimObject (const Params *_params)
 
- 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)
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 
 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 resetStats ()
 Callback to reset stats. More...
 
virtual void preDumpStats ()
 Callback before stats are dumped. More...
 
void addStat (Stats::Info *info)
 Register a stat with this group. More...
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object. More...
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object. More...
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block. More...
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 

Static Public Member Functions

static void printSystems ()
 
- 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)
 
static void unserializeGlobals (CheckpointIn &cp)
 

Public Attributes

std::vector< ThreadContext * > threadContexts
 
const bool multiThread
 
Addr pagePtr
 
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::vector< BaseRemoteGDB * > remoteGDB
 
Counter totalNumInsts
 
std::map< std::pair< uint32_t, uint32_t >, TicklastWorkItemStarted
 
std::map< uint32_t, Stats::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 &master_name) const
 Strips off the system name from a master name. More...
 
MasterID _getMasterId (const SimObject *master, const std::string &master_name)
 helper function for getMasterId More...
 
std::string leafMasterName (const SimObject *master, const std::string &submaster)
 Helper function for constructing the full (sub)master name by providing the root master and the relative submaster name. More...
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
void signalDrainDone () const
 Signal that an object is drained. More...
 

Protected Attributes

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

Private Attributes

std::list< PCEvent * > liveEvents
 
SystemPort _systemPort
 

Detailed Description

Definition at line 72 of file system.hh.

Member Typedef Documentation

◆ Params

typedef SystemParams System::Params

Definition at line 441 of file system.hh.

Constructor & Destructor Documentation

◆ System()

System::System ( Params p)

◆ ~System()

System::~System ( )

Definition at line 145 of file system.cc.

References ArmISA::j, numWorkIds, and workItemStats.

Member Function Documentation

◆ _getMasterId()

MasterID System::_getMasterId ( const SimObject master,
const std::string &  master_name 
)
protected

helper function for getMasterId

Definition at line 499 of file system.cc.

References Stats::enabled(), fatal, ArmISA::i, masters, SimObject::name(), and stripSystemName().

Referenced by getGlobalMasterId(), getMasterId(), and maxMasters().

◆ allocPhysPages()

Addr System::allocPhysPages ( int  npages)

Allocate npages contiguous unused physical pages.

Returns
Starting address of first page

Definition at line 323 of file system.cc.

References _m5opRange, AddrRange::contains(), fatal, pagePtr, ArmISA::PageShift, physmem, PhysicalMemory::totalSize(), and warn.

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

◆ breakpoint()

bool System::breakpoint ( )

Definition at line 198 of file system.cc.

References remoteGDB.

◆ bypassCaches()

bool System::bypassCaches ( ) const
inline

◆ cacheLineSize()

unsigned int System::cacheLineSize ( ) const
inline

◆ drainResume()

void System::drainResume ( )
overridevirtual

Resume execution after a successful drain.

Reimplemented from Drainable.

Definition at line 360 of file system.cc.

References totalNumInsts.

Referenced by m5opRange().

◆ findFreeContext()

ThreadContext * System::findFreeContext ( )

Definition at line 245 of file system.cc.

References ThreadContext::Halted, and threadContexts.

Referenced by cloneFunc().

◆ freeMemSize()

Addr System::freeMemSize ( ) const

Amount of physical memory that is still free.

Definition at line 348 of file system.cc.

References pagePtr, ArmISA::PageShift, physmem, and PhysicalMemory::totalSize().

Referenced by getPhysMem(), and Linux::procMeminfo().

◆ getArch()

Arch System::getArch ( ) const
inline

Get the architecture.

Definition at line 248 of file system.hh.

Referenced by Sequencer::makeRequest().

◆ getGlobalMasterId()

MasterID System::getGlobalMasterId ( const std::string &  master_name)

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

Parameters
masterNamefull name of the master
Returns
the master's ID.

Definition at line 486 of file system.cc.

References _getMasterId().

◆ getGuestByteOrder()

ByteOrder System::getGuestByteOrder ( ) const
inline

Get the guest byte order.

Definition at line 254 of file system.hh.

References ArmISA::GuestByteOrder, and panic.

Referenced by _llseekFunc(), dumpDmesgEntry(), and rmdirFunc().

◆ getKvmVM()

KvmVM* System::getKvmVM ( )
inline

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

Definition at line 220 of file system.hh.

References kvmVM, and validKvmEnvironment().

Referenced by MuxingKvmGic::MuxingKvmGic().

◆ getMasterId()

MasterID System::getMasterId ( const SimObject master,
std::string  submaster = std::string() 
)

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 master ids must be fixed by the regStats() phase that immediately precedes it. This allows objects in the memory system to understand how many masters may exist and appropriately name the bins of their per-master stats before the stats are finalized.

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

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

instMasterId = getMasterId(cpu, "inst"); dataMasterId = getMasterId(cpu, "data");

and the masters' names will be:

  • "cpu.inst"
  • "cpu.data"
Parameters
masterSimObject related to the master
submasterString containing the submaster's name
Returns
the master's ID.

Definition at line 492 of file system.cc.

References _getMasterId(), and leafMasterName().

Referenced by BaseTrafficGen::BaseTrafficGen(), and System().

◆ getMasterName()

std::string System::getMasterName ( MasterID  master_id)

◆ getMemoryMode()

Enums::MemoryMode System::getMemoryMode ( ) const
inline

Get the memory mode of the system.

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 165 of file system.hh.

References memoryMode, ArmISA::mode, and setMemoryMode().

Referenced by MinorCPU::init().

◆ getPageBytes()

Addr System::getPageBytes ( ) const
inline

Get the page bytes for the ISA.

Definition at line 266 of file system.hh.

References ArmISA::PageBytes.

Referenced by GenericTimerFrame::GenericTimerFrame(), IdeController::IdeController(), mmapFunc(), mremapFunc(), and munmapFunc().

◆ getPageShift()

Addr System::getPageShift ( ) const
inline

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

Definition at line 271 of file system.hh.

References ArmISA::PageShift.

◆ getPhysMem()

PhysicalMemory& System::getPhysMem ( )
inline

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

Definition at line 228 of file system.hh.

References addr, freeMemSize(), isMemAddr(), memSize(), and physmem.

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

◆ getPort()

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

Additional function to return the Port of a memory object.

Reimplemented from SimObject.

Definition at line 185 of file system.cc.

References _systemPort.

Referenced by getSystemPort().

◆ getSystemPort()

MasterPort& 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 113 of file system.hh.

References _systemPort, getPort(), and InvalidPortID.

◆ getThermalModel()

ThermalModel* System::getThermalModel ( ) const
inline

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

Definition at line 276 of file system.hh.

References thermalModel.

◆ getThreadContext()

ThreadContext* System::getThreadContext ( ContextID  tid) const
inline

◆ incWorkItemsBegin()

uint64_t System::incWorkItemsBegin ( )
inline

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

Definition at line 395 of file system.hh.

References workItemsBegin.

Referenced by PseudoInst::workbegin().

◆ incWorkItemsEnd()

uint64_t System::incWorkItemsEnd ( )
inline

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

Definition at line 405 of file system.hh.

References workItemsEnd.

Referenced by PseudoInst::workend().

◆ init()

void System::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 152 of file system.cc.

References _systemPort, Port::isConnected(), SimObject::name(), and panic.

◆ isAtomicMode()

bool 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 131 of file system.hh.

References ArmISA::atomic, and memoryMode.

Referenced by sc_gem5::TlmToGem5Bridge< BITWIDTH >::before_end_of_elaboration(), SMMUTranslationProcess::completeTransaction(), SMMUv3::processCommands(), SMMUv3::runProcess(), Gicv3Its::runProcess(), DmaPort::sendDma(), NonCachingSimpleCPU::verifyMemoryMode(), and AtomicSimpleCPU::verifyMemoryMode().

◆ isMemAddr()

bool System::isMemAddr ( Addr  addr) const

Check if a physical address is within a range of a memory that is part of the global address map.

Parameters
addrA physical address
Returns
Whether the address corresponds to a memory

Definition at line 354 of file system.cc.

References PhysicalMemory::isMemAddr(), and physmem.

Referenced by getPhysMem(), MemFootprintProbe::handleRequest(), KernelWorkload::initState(), RubyPort::MemSlavePort::isPhysMemAddress(), RubyPort::ruby_hit_callback(), NonCachingSimpleCPU::sendPacket(), and BaseTrafficGen::update().

◆ isTimingMode()

bool System::isTimingMode ( ) const
inline

◆ leafMasterName()

std::string System::leafMasterName ( const SimObject master,
const std::string &  submaster 
)
protected

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

Definition at line 529 of file system.cc.

References SimObject::name().

Referenced by getMasterId(), and maxMasters().

◆ lookupMasterId() [1/2]

MasterID System::lookupMasterId ( const SimObject obj) const

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

Definition at line 449 of file system.cc.

References fatal_if, ArmISA::i, ArmISA::id, Request::invldMasterId, and masters.

Referenced by QoS::PropFairPolicy::initMaster(), and QoS::Policy::pair().

◆ lookupMasterId() [2/2]

MasterID System::lookupMasterId ( const std::string &  name) const

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

Definition at line 472 of file system.cc.

References ArmISA::i, Request::invldMasterId, masters, SimObject::name(), and stripSystemName().

◆ m5opRange()

const AddrRange& System::m5opRange ( ) const
inline

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

Returns an invalid/empty range if disabled.

Definition at line 462 of file system.hh.

References _m5opRange, allocPhysPages(), drainResume(), InvalidContextID, registerThreadContext(), replaceThreadContext(), serialize(), and unserialize().

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

◆ markWorkItem()

int 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 416 of file system.hh.

References X86ISA::count, ArmISA::i, and MipsISA::index.

Referenced by PseudoInst::workbegin(), and PseudoInst::workend().

◆ maxMasters()

MasterID System::maxMasters ( )
inline

◆ memSize()

Addr System::memSize ( ) const

Amount of physical memory that exists.

Definition at line 342 of file system.cc.

References physmem, and PhysicalMemory::totalSize().

Referenced by getPhysMem(), and Linux::procMeminfo().

◆ numContexts()

unsigned System::numContexts ( ) const
inline

◆ numRunningContexts()

int System::numRunningContexts ( )

Return number of running (non-halted) thread contexts in system.

These threads could be Active or Suspended.

Definition at line 275 of file system.cc.

References ThreadContext::Halted, ThreadContext::Halting, and threadContexts.

Referenced by numContexts(), GicV2::readCpu(), GicV2::readDistributor(), VGic::updateIntState(), GicV2::updateIntState(), and VGic::VGic().

◆ params()

const Params* System::params ( ) const
inline

◆ printSystems()

void System::printSystems ( )
static

Definition at line 418 of file system.cc.

References ArmISA::i, SimObject::name(), and systemList.

Referenced by printSystems().

◆ registerThreadContext()

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

◆ regStats()

void 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 Stats::Group.

Definition at line 385 of file system.cc.

References ccprintf(), ArmISA::j, SimObject::name(), numWorkIds, Stats::Group::regStats(), and workItemStats.

Referenced by maxMasters().

◆ remove()

bool System::remove ( PCEvent event)
overridevirtual

Implements PCEventScope.

Definition at line 265 of file system.cc.

References liveEvents, and threadContexts.

◆ replaceThreadContext()

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

Definition at line 288 of file system.cc.

References ArmISA::e, liveEvents, panic, remoteGDB, PCEventScope::schedule(), and threadContexts.

Referenced by m5opRange(), and BaseCPU::takeOverFrom().

◆ schedule()

bool System::schedule ( PCEvent event)
overridevirtual

Implements PCEventScope.

Definition at line 255 of file system.cc.

References liveEvents, and threadContexts.

◆ serialize()

void System::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from SimObject.

Definition at line 366 of file system.cc.

References pagePtr, physmem, SERIALIZE_SCALAR, and Serializable::serializeSection().

Referenced by m5opRange().

◆ setMemoryMode()

void System::setMemoryMode ( Enums::MemoryMode  mode)

Change the memory mode of the system.

This should only be called by the Python!

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

Definition at line 192 of file system.cc.

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

Referenced by getMemoryMode().

◆ startup()

void System::startup ( )
overridevirtual

startup() is the final initialization call before simulation.

All state is initialized (including unserialized state, if any, such as the curTick() value), so this is the appropriate place to schedule initial event(s) for objects that need them.

Reimplemented from SimObject.

Definition at line 160 of file system.cc.

References ArmISA::id, inform, remoteGDB, SimObject::startup(), and threadContexts.

◆ stripSystemName()

std::string System::stripSystemName ( const std::string &  master_name) const
protected

Strips off the system name from a master name.

Definition at line 439 of file system.cc.

References SimObject::name(), and startswith().

Referenced by _getMasterId(), and lookupMasterId().

◆ unserialize()

void System::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

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

Parameters
cpCheckpoint state

Reimplemented from SimObject.

Definition at line 376 of file system.cc.

References pagePtr, physmem, UNSERIALIZE_SCALAR, and Serializable::unserializeSection().

Referenced by m5opRange().

◆ validKvmEnvironment()

bool System::validKvmEnvironment ( ) const

Verify gem5 configuration will support KVM emulation.

Definition at line 305 of file system.cc.

References threadContexts.

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

◆ workItemBegin()

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

Definition at line 428 of file system.hh.

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

Referenced by PseudoInst::workbegin().

◆ workItemEnd()

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

Definition at line 401 of file system.cc.

References curTick(), DPRINTF, fatal, lastWorkItemStarted, numWorkIds, MipsISA::p, and workItemStats.

Referenced by PseudoInst::workend(), and workItemBegin().

Member Data Documentation

◆ _cacheLineSize

const unsigned int System::_cacheLineSize
protected

Definition at line 286 of file system.hh.

Referenced by cacheLineSize(), and System().

◆ _m5opRange

const AddrRange System::_m5opRange
protected

Range for memory-mapped m5 pseudo ops.

The range will be invalid/empty if disabled.

Definition at line 450 of file system.hh.

Referenced by allocPhysPages(), and m5opRange().

◆ _params

Params* System::_params
protected

Definition at line 444 of file system.hh.

Referenced by ArmSystem::params(), and params().

◆ _systemPort

SystemPort System::_systemPort
private

Definition at line 98 of file system.hh.

Referenced by getPort(), getSystemPort(), and init().

◆ activeCpus

std::vector<bool> System::activeCpus
protected

Definition at line 291 of file system.hh.

Referenced by registerThreadContext().

◆ futexMap

FutexMap System::futexMap

Definition at line 495 of file system.hh.

Referenced by exitFutexWake(), and futexFunc().

◆ init_param

uint64_t System::init_param

Definition at line 206 of file system.hh.

Referenced by PseudoInst::initParam().

◆ kvmVM

KvmVM* const System::kvmVM
protected

Definition at line 280 of file system.hh.

Referenced by getKvmVM(), and System().

◆ lastWorkItemStarted

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

Definition at line 481 of file system.hh.

Referenced by workItemBegin(), and workItemEnd().

◆ liveEvents

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

Definition at line 97 of file system.hh.

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

◆ masters

std::vector<MasterInfo> System::masters
protected

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

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

Definition at line 298 of file system.hh.

Referenced by _getMasterId(), getMasterName(), and lookupMasterId().

◆ maxPID

const int System::maxPID = 32768
static

Definition at line 497 of file system.hh.

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

◆ memoryMode

Enums::MemoryMode System::memoryMode
protected

Definition at line 284 of file system.hh.

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

◆ multiThread

const bool System::multiThread

◆ numSystemsRunning

int System::numSystemsRunning = 0
static

Definition at line 491 of file system.hh.

Referenced by IGbE::ethRxPkt(), and System().

◆ numWorkIds

uint32_t System::numWorkIds
protected

Definition at line 290 of file system.hh.

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

◆ pagePtr

Addr System::pagePtr

Definition at line 204 of file system.hh.

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

◆ physmem

PhysicalMemory System::physmem
protected

◆ physProxy

PortProxy System::physProxy

◆ PIDs

std::set<int> System::PIDs

Process set to track which PIDs have already been allocated.

Definition at line 500 of file system.hh.

Referenced by Process::Process().

◆ redirectPaths

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

Definition at line 509 of file system.hh.

Referenced by Process::checkPathRedirect().

◆ remoteGDB

std::vector<BaseRemoteGDB *> System::remoteGDB

Definition at line 437 of file system.hh.

Referenced by breakpoint(), registerThreadContext(), replaceThreadContext(), and startup().

◆ signalList

std::list<BasicSignal> System::signalList

Definition at line 504 of file system.hh.

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

◆ systemList

vector< System * > System::systemList
static

Definition at line 490 of file system.hh.

Referenced by IGbE::ethRxPkt(), exitImpl(), printSystems(), and System().

◆ thermalModel

ThermalModel* System::thermalModel
protected

Definition at line 300 of file system.hh.

Referenced by getThermalModel().

◆ threadContexts

std::vector<ThreadContext *> System::threadContexts

◆ totalNumInsts

Counter System::totalNumInsts

◆ workItemsBegin

uint64_t System::workItemsBegin
protected

Definition at line 288 of file system.hh.

Referenced by incWorkItemsBegin().

◆ workItemsEnd

uint64_t System::workItemsEnd
protected

Definition at line 289 of file system.hh.

Referenced by incWorkItemsEnd().

◆ workItemStats

std::map<uint32_t, Stats::Histogram*> System::workItemStats

Definition at line 482 of file system.hh.

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

◆ workload

Workload* System::workload = nullptr

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

Generated on Thu May 28 2020 16:21:52 for gem5 by doxygen 1.8.13