gem5
v20.0.0.3
|
#include <system.hh>
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 |
![]() | |
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... | |
MasterPort & | getSystemPort () |
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... | |
Port & | getPort (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... | |
ThreadContext * | findFreeContext () |
ThreadContext * | getThreadContext (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... | |
KvmVM * | getKvmVM () |
Get a pointer to the Kernel Virtual Machine (KVM) SimObject, if present. More... | |
bool | validKvmEnvironment () const |
Verify gem5 configuration will support KVM emulation. More... | |
PhysicalMemory & | getPhysMem () |
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... | |
ThermalModel * | getThermalModel () 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 Params * | params () const |
const AddrRange & | m5opRange () 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... | |
![]() | |
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... | |
ProbeManager * | getProbeManager () |
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 Params * | params () const |
SimObject (const Params *_params) | |
![]() | |
EventQueue * | eventQueue () 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) | |
![]() | |
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) |
![]() | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
![]() | |
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 Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. More... | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Static Public Member Functions | |
static void | printSystems () |
![]() | |
static void | serializeAll (CheckpointOut &cp) |
Serialize all SimObjects in the system. More... | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
![]() | |
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... | |
Workload * | workload = nullptr |
OS kernel. More... | |
std::vector< BaseRemoteGDB * > | remoteGDB |
Counter | totalNumInsts |
std::map< std::pair< uint32_t, uint32_t >, Tick > | lastWorkItemStarted |
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< BasicSignal > | signalList |
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... | |
![]() | |
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< MasterInfo > | masters |
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... | |
ThermalModel * | thermalModel |
Params * | _params |
const AddrRange | _m5opRange |
Range for memory-mapped m5 pseudo ops. More... | |
![]() | |
const SimObjectParams * | _params |
Cached copy of the object parameters. More... | |
![]() | |
EventQueue * | eventq |
A pointer to this object's event queue. More... | |
Private Attributes | |
std::list< PCEvent * > | liveEvents |
SystemPort | _systemPort |
typedef SystemParams System::Params |
System::System | ( | Params * | p | ) |
Definition at line 85 of file system.cc.
References _cacheLineSize, Request::funcMasterId, getMasterId(), Request::intMasterId, kvmVM, numSystemsRunning, params(), KvmVM::setSystem(), Workload::system, systemList, warn_once, Request::wbMasterId, workload, and RiscvISA::x.
Referenced by getMasterName().
System::~System | ( | ) |
Definition at line 145 of file system.cc.
References ArmISA::j, numWorkIds, and workItemStats.
|
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().
Addr System::allocPhysPages | ( | int | npages | ) |
Allocate npages contiguous unused physical pages.
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().
|
inline |
Should caches be bypassed?
Some CPUs need to bypass caches to allow direct memory accesses, which is required for hardware virtualization.
Definition at line 152 of file system.hh.
References memoryMode.
Referenced by HDLcd::cmdDisable(), HDLcd::cmdEnable(), HDLcd::drainResume(), CoherentXBar::forwardAtomic(), CoherentXBar::forwardFunctional(), CoherentXBar::forwardTiming(), RubyPort::MemSlavePort::recvAtomic(), RubyPort::PioSlavePort::recvAtomic(), BaseCache::CpuSidePort::recvAtomic(), CoherentXBar::recvAtomicBackdoor(), BaseCache::MemSidePort::recvAtomicSnoop(), BaseCache::CpuSidePort::recvFunctional(), CoherentXBar::recvFunctional(), BaseCache::MemSidePort::recvFunctionalSnoop(), BaseCache::CpuSidePort::recvTimingReq(), CoherentXBar::recvTimingReq(), CoherentXBar::recvTimingResp(), BaseCache::MemSidePort::recvTimingSnoopReq(), BaseCache::CpuSidePort::recvTimingSnoopResp(), DmaReadFifo::resumeFill(), BaseCache::CpuSidePort::tryTiming(), NonCachingSimpleCPU::verifyMemoryMode(), and BaseKvmCPU::verifyMemoryMode().
|
inline |
Get the cache line size of the system.
Definition at line 180 of file system.hh.
References _cacheLineSize.
Referenced by DmaDevice::cacheBlockSize(), BaseTrafficGen::createDram(), BaseTrafficGen::createDramRot(), BaseTrafficGen::createLinear(), BaseTrafficGen::createRandom(), DmaPort::dmaAction(), DRAMSim2::init(), MemFootprintProbe::MemFootprintProbe(), ArmISA::ISA::readMiscReg(), and DmaReadFifo::resumeFillFunctional().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from Drainable.
Definition at line 360 of file system.cc.
References totalNumInsts.
Referenced by m5opRange().
ThreadContext * System::findFreeContext | ( | ) |
Definition at line 245 of file system.cc.
References ThreadContext::Halted, and threadContexts.
Referenced by cloneFunc().
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().
|
inline |
Get the architecture.
Definition at line 248 of file system.hh.
Referenced by Sequencer::makeRequest().
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.
masterName | full name of the master |
Definition at line 486 of file system.cc.
References _getMasterId().
|
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().
|
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().
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:
master | SimObject related to the master |
submaster | String containing the submaster's name |
Definition at line 492 of file system.cc.
References _getMasterId(), and leafMasterName().
Referenced by BaseTrafficGen::BaseTrafficGen(), and System().
std::string System::getMasterName | ( | MasterID | master_id | ) |
Get the name of an object for a given request id.
Definition at line 541 of file system.cc.
References fatal, masters, and System().
Referenced by QoS::MemCtrl::addMaster(), AbstractMemory::checkLockedAddrList(), QoS::MemSinkCtrl::processNextReqEvent(), QoS::MemCtrl::qosSchedule(), QoS::MemSinkCtrl::recvTimingReq(), BaseTags::BaseTagStats::regStats(), QoS::MemCtrl::MemCtrlStats::regStats(), AbstractMemory::MemStats::regStats(), BaseCache::CacheStats::regStats(), DRAMCtrl::DRAMStats::regStats(), BaseCache::CacheCmdStats::regStatsFromParent(), QoS::FixedPriorityPolicy::schedule(), and MemTraceProbe::startup().
|
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().
|
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().
|
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.
|
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().
|
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().
|
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.
Definition at line 113 of file system.hh.
References _systemPort, getPort(), and InvalidPortID.
|
inline |
The thermal model used for this system (if any).
Definition at line 276 of file system.hh.
References thermalModel.
|
inline |
Definition at line 186 of file system.hh.
Referenced by MipsProcess::argsInit(), RiscvProcess::argsInit(), PowerProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), ArmProcess64::armHwcapImpl(), Gicv3CPUInterface::assertWakeRequest(), ArmISA::TLBIOp::broadcast(), AbstractMemory::checkLockedAddrList(), IntrControl::clear(), IntrControl::clearAll(), KvmVM::contextIdToVCpuId(), GenericTimer::createTimers(), Gicv3CPUInterface::deassertWakeRequest(), ArmISA::FsLinux::dumpDmesg(), MemState::fixupFault(), Gicv3Redistributor::getAffinity(), IntrControl::havePosted(), CpuLocalTimer::init(), SparcProcess::initState(), Process::initState(), ArmProcess32::initState(), ArmLinuxProcess32::initState(), RiscvProcess64::initState(), RiscvProcess32::initState(), ArmProcess64::initState(), X86ISA::X86_64Process::initState(), Sparc32Process::initState(), X86ISA::I386Process::initState(), Sparc64Process::initState(), Prefetcher::Queued::insert(), IntrControl::post(), Gicv3::postInt(), DistIface::SyncEvent::process(), HSAPacketProcessor::processPkt(), GenericTimer::setMiscReg(), X86ISA::I82094AA::signalInterrupt(), DistIface::toggleSync(), HSADevice::translateOrDie(), and HSAPacketProcessor::translateOrDie().
|
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().
|
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().
|
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.
|
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().
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.
addr | A physical address |
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().
|
inline |
Is the system in timing mode?
SimObjects are expected to use Port::sendTiming() and Port::recvTiming() when accessing memory in this mode.
Definition at line 142 of file system.hh.
References memoryMode.
Referenced by sc_gem5::TlmToGem5Bridge< BITWIDTH >::before_end_of_elaboration(), SMMUTranslationProcess::completeTransaction(), SMMUProcess::doDelay(), MinorCPU::drainResume(), DRAMCtrl::drainResume(), TrafficGen::initState(), SMMUTranslationProcess::issuePrefetch(), SMMUv3::processCommands(), SMMUTranslationProcess::resumeTransaction(), SMMUv3::runProcess(), Gicv3Its::runProcess(), DmaPort::sendDma(), X86ISA::I82094AA::signalInterrupt(), RiscvISA::Walker::start(), X86ISA::Walker::start(), DRAMCtrl::startup(), TimingSimpleCPU::verifyMemoryMode(), and FullO3CPU< O3CPUImpl >::verifyMemoryMode().
|
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().
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().
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().
|
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().
|
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().
|
inline |
Get the number of masters registered in the system.
Definition at line 373 of file system.hh.
References _getMasterId(), leafMasterName(), and regStats().
Referenced by BaseCache::getNextQueueEntry(), BaseCache::handleTimingReqMiss(), BaseCache::incHitCount(), BaseCache::incMissCount(), BaseCache::recvTimingResp(), BaseTags::BaseTagStats::regStats(), QoS::MemCtrl::MemCtrlStats::regStats(), AbstractMemory::MemStats::regStats(), BaseCache::CacheStats::regStats(), DRAMCtrl::DRAMStats::regStats(), BaseCache::CacheCmdStats::regStatsFromParent(), NoncoherentCache::serviceMSHRTargets(), Cache::serviceMSHRTargets(), and MemTraceProbe::startup().
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().
|
inline |
Definition at line 198 of file system.hh.
References numRunningContexts().
Referenced by ArmISA::TLBIOp::broadcast(), MuxingKvmGic::clearBankedDistRange(), MuxingKvmGic::copyBankedDistRange(), MuxingKvmGic::copyGicState(), Linux::cpuOnline(), exitImpl(), MuxingKvmGic::fromKvmToGicV2(), Iob::generateIpi(), Gicv3CPUInterface::generateSGI(), GicV2::genSwiMask(), getrlimitFunc(), FVPBasePwrCtrl::init(), Gicv3::init(), CpuLocalTimer::init(), DistIface::SyncEvent::process(), A9SCU::read(), Gicv3Redistributor::read(), SparcISA::ISA::readFSReg(), ArmISA::ISA::readMiscReg(), Gicv3Distributor::route(), CpuLocalTimer::serialize(), setpgidFunc(), X86ISA::I82094AA::signalInterrupt(), GicV2::softInt(), tgkillFunc(), DistIface::toggleSync(), CpuLocalTimer::unserialize(), Gicv3Distributor::update(), GicV2::updateIntState(), GicV2::updateRunPri(), and PseudoInst::wakeCPU().
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().
|
inline |
Definition at line 456 of file system.hh.
References _params.
Referenced by PseudoInst::loadsymbol(), PseudoInst::readfile(), System(), PseudoInst::workbegin(), and PseudoInst::workend().
|
static |
Definition at line 418 of file system.cc.
References ArmISA::i, SimObject::name(), and systemList.
Referenced by printSystems().
ContextID System::registerThreadContext | ( | ThreadContext * | tc, |
ContextID | assigned = InvalidContextID |
||
) |
Definition at line 206 of file system.cc.
References activeCpus, ArmISA::e, fatal_if, getRemoteGDBPort(), ArmISA::id, InvalidContextID, liveEvents, remoteGDB, PCEventScope::schedule(), and threadContexts.
Referenced by m5opRange(), and BaseCPU::registerThreadContexts().
|
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().
|
overridevirtual |
Implements PCEventScope.
Definition at line 265 of file system.cc.
References liveEvents, and threadContexts.
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().
|
overridevirtual |
Implements PCEventScope.
Definition at line 255 of file system.cc.
References liveEvents, and threadContexts.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Reimplemented from SimObject.
Definition at line 366 of file system.cc.
References pagePtr, physmem, SERIALIZE_SCALAR, and Serializable::serializeSection().
Referenced by m5opRange().
void System::setMemoryMode | ( | Enums::MemoryMode | mode | ) |
Change the memory mode of the system.
This should only be called by the Python!
mode | Mode to change to (atomic/timing/...) |
Definition at line 192 of file system.cc.
References Drained, Drainable::drainState(), memoryMode, and ArmISA::mode.
Referenced by getMemoryMode().
|
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.
|
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().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Reimplemented from SimObject.
Definition at line 376 of file system.cc.
References pagePtr, physmem, UNSERIALIZE_SCALAR, and Serializable::unserializeSection().
Referenced by m5opRange().
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().
|
inline |
Definition at line 428 of file system.hh.
References curTick(), lastWorkItemStarted, MipsISA::p, and workItemEnd().
Referenced by PseudoInst::workbegin().
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().
|
protected |
Definition at line 286 of file system.hh.
Referenced by cacheLineSize(), and System().
|
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().
|
protected |
Definition at line 444 of file system.hh.
Referenced by ArmSystem::params(), and params().
|
private |
Definition at line 98 of file system.hh.
Referenced by getPort(), getSystemPort(), and init().
|
protected |
Definition at line 291 of file system.hh.
Referenced by registerThreadContext().
FutexMap System::futexMap |
Definition at line 495 of file system.hh.
Referenced by exitFutexWake(), and futexFunc().
uint64_t System::init_param |
Definition at line 206 of file system.hh.
Referenced by PseudoInst::initParam().
|
protected |
Definition at line 280 of file system.hh.
Referenced by getKvmVM(), and System().
Definition at line 481 of file system.hh.
Referenced by workItemBegin(), and workItemEnd().
Definition at line 97 of file system.hh.
Referenced by registerThreadContext(), remove(), replaceThreadContext(), and schedule().
|
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().
|
static |
Definition at line 497 of file system.hh.
Referenced by cloneFunc(), and Process::Process().
|
protected |
Definition at line 284 of file system.hh.
Referenced by bypassCaches(), getMemoryMode(), isAtomicMode(), isTimingMode(), and setMemoryMode().
const bool System::multiThread |
Definition at line 191 of file system.hh.
Referenced by FVPBasePwrCtrl::FVPBasePwrCtrl(), ArmISA::getAff0(), ArmISA::getAff1(), ArmISA::getAff2(), ArmISA::getMPIDR(), and BaseCPU::registerThreadContexts().
|
static |
Definition at line 491 of file system.hh.
Referenced by IGbE::ethRxPkt(), and System().
|
protected |
Definition at line 290 of file system.hh.
Referenced by regStats(), workItemEnd(), and ~System().
Addr System::pagePtr |
Definition at line 204 of file system.hh.
Referenced by allocPhysPages(), freeMemSize(), serialize(), and unserialize().
|
protected |
Definition at line 282 of file system.hh.
Referenced by allocPhysPages(), freeMemSize(), getPhysMem(), isMemAddr(), memSize(), serialize(), and unserialize().
PortProxy System::physProxy |
Port to physical memory used for writing object files into ram at boot.
Definition at line 210 of file system.hh.
Referenced by Gicv3Redistributor::init(), RiscvISA::BareMetal::initState(), X86ISA::FsLinux::initState(), ArmISA::FsFreebsd::initState(), X86ISA::FsWorkload::initState(), KernelWorkload::initState(), ArmISA::FsLinux::initState(), ArmISA::FsWorkload::initState(), X86ISA::X86_64Process::initState(), MultiLevelPageTable< EntryTypes >::map(), SimpleDisk::read(), MultiLevelPageTable< EntryTypes >::remap(), DmaReadFifo::resumeFillFunctional(), MultiLevelPageTable< EntryTypes >::unmap(), X86ISA::FsWorkload::writeOutMPTable(), and X86ISA::FsWorkload::writeOutSMBiosTable().
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().
std::vector<RedirectPath*> System::redirectPaths |
Definition at line 509 of file system.hh.
Referenced by Process::checkPathRedirect().
std::vector<BaseRemoteGDB *> System::remoteGDB |
Definition at line 437 of file system.hh.
Referenced by breakpoint(), registerThreadContext(), replaceThreadContext(), and startup().
std::list<BasicSignal> System::signalList |
Definition at line 504 of file system.hh.
Referenced by exitImpl(), pollFunc(), selectFunc(), and wait4Func().
|
static |
Definition at line 490 of file system.hh.
Referenced by IGbE::ethRxPkt(), exitImpl(), printSystems(), and System().
|
protected |
Definition at line 300 of file system.hh.
Referenced by getThermalModel().
std::vector<ThreadContext *> System::threadContexts |
Definition at line 182 of file system.hh.
Referenced by MaltaCChip::clearIntr(), SparcISA::TLB::doMmuRegWrite(), exitImpl(), findFreeContext(), Iob::generateIpi(), FVPBasePwrCtrl::getThreadContextByMPID(), FVPBasePwrCtrl::init(), SparcISA::FsWorkload::initState(), RiscvISA::BareMetal::initState(), X86ISA::FsLinux::initState(), ArmISA::FsFreebsd::initState(), X86ISA::FsWorkload::initState(), ArmISA::FsLinux::initState(), ArmISA::FsWorkload::initState(), FullO3CPU< O3CPUImpl >::insertThread(), numRunningContexts(), MaltaCChip::postIntr(), FVPBasePwrCtrl::powerCoreOn(), SparcISA::ISA::readFSReg(), registerThreadContext(), MemState::remapRegion(), remove(), replaceThreadContext(), schedule(), setpgidFunc(), startup(), ArmISA::FsLinux::startup(), tgkillFunc(), MemState::unmapRegion(), validKvmEnvironment(), PseudoInst::wakeCPU(), and FVPBasePwrCtrl::write().
Counter System::totalNumInsts |
Definition at line 480 of file system.hh.
Referenced by BaseSimpleCPU::countInst(), Minor::Execute::doInstCommitAccounting(), TimingSimpleCPU::drainResume(), drainResume(), FullO3CPU< O3CPUImpl >::instDone(), and BaseKvmCPU::kvmRun().
|
protected |
Definition at line 288 of file system.hh.
Referenced by incWorkItemsBegin().
|
protected |
Definition at line 289 of file system.hh.
Referenced by incWorkItemsEnd().
std::map<uint32_t, Stats::Histogram*> System::workItemStats |
Definition at line 482 of file system.hh.
Referenced by regStats(), workItemEnd(), and ~System().
Workload* System::workload = nullptr |
OS kernel.
Definition at line 213 of file system.hh.
Referenced by PseudoInst::addsymbol(), ArmSystem::ArmSystem(), X86ISA::StackTrace::decodePrologue(), dumpDmesgEntry(), Linux::ThreadInfo::get_data(), RiscvISA::Reset::invoke(), PseudoInst::loadsymbol(), ArmISA::DumpStats::process(), X86ISA::readSymbol(), ArmISA::readSymbol(), SimpleThread::SimpleThread(), and System().