gem5
|
#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 |
Public Types inherited from MemObject | |
typedef MemObjectParams | Params |
Public Types inherited from ClockedObject | |
typedef ClockedObjectParams | Params |
Parameters of ClockedObject. More... | |
Public Types inherited from SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
void | init () override |
After all objects have been created and all ports are connected, check that the system port is connected. 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... | |
BaseMasterPort & | getMasterPort (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 * | getThreadContext (ContextID tid) |
int | numContexts () |
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... | |
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... | |
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 (std::string req_name) |
Request an id used to create a request object in the system. More... | |
std::string | getMasterName (MasterID master_id) |
Get the name of an object for a given request id. More... | |
MasterID | maxMasters () |
Get the number of masters registered in the system. More... | |
void | regStats () override |
Register statistics for this object. 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) |
virtual Addr | fixFuncEventAddr (Addr addr) |
Fix up an address used to match PCs for hooking simulator events on to target function executions. More... | |
bool | breakpoint () |
System (Params *p) | |
~System () | |
void | initState () override |
initState() is called on each SimObject when not restoring from a checkpoint. More... | |
const Params * | params () const |
Addr | getKernelStart () const |
Returns the address the kernel starts at. More... | |
Addr | getKernelEnd () const |
Returns the address the kernel ends at. More... | |
Addr | getKernelEntry () const |
Returns the address the entry point to the kernel code. 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... | |
template<class T , typename... Args> | |
T * | addFuncEvent (const SymbolTable *symtab, const char *lbl, const std::string &desc, Args...args) |
Add a function-based event to the given function, to be looked up in the specified symbol table. More... | |
template<class T > | |
T * | addFuncEvent (const SymbolTable *symtab, const char *lbl) |
template<class T , typename... Args> | |
T * | addFuncEventOrPanic (const SymbolTable *symtab, const char *lbl, Args...args) |
template<class T , typename... Args> | |
T * | addKernelFuncEvent (const char *lbl, Args...args) |
Add a function-based event to a kernel symbol. More... | |
template<class T , typename... Args> | |
T * | addKernelFuncEventOrPanic (const char *lbl, Args...args) |
Public Member Functions inherited from MemObject | |
const Params * | params () const |
MemObject (const Params *params) | |
virtual BaseSlavePort & | getSlavePort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a slave port with a given name and index. More... | |
Public Member Functions inherited from ClockedObject | |
ClockedObject (const ClockedObjectParams *p) | |
const Params * | params () const |
Enums::PwrState | pwrState () const |
std::string | pwrStateName () const |
std::vector< double > | pwrStateWeights () const |
Returns the percentage residency for each power state. More... | |
void | computeStats () |
Record stats values like state residency by computing the time difference from previous update. More... | |
void | pwrState (Enums::PwrState) |
Public Member Functions inherited from SimObject | |
const Params * | params () const |
SimObject (const Params *_params) | |
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 | resetStats () |
Reset statistics associated with this object. 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... | |
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 EventManager | |
EventManager (EventManager &em) | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
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) |
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 Clocked | |
void | updateClockPeriod () const |
Update the tick to the current tick. More... | |
Tick | clockEdge (Cycles cycles=Cycles(0)) const |
Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More... | |
Cycles | curCycle () const |
Determine the current cycle, corresponding to a tick aligned to a clock edge. More... | |
Tick | nextCycle () const |
Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More... | |
uint64_t | frequency () const |
Tick | clockPeriod () const |
double | voltage () const |
Cycles | ticksToCycles (Tick t) const |
Tick | cyclesToTicks (Cycles c) const |
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 SimObject * | find (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 () |
Get 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 |
int | _numContexts |
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... | |
SymbolTable * | kernelSymtab |
kernel symbol table More... | |
ObjectFile * | kernel |
Object pointer for the kernel code. More... | |
Addr | kernelStart |
Beginning of kernel code. More... | |
Addr | kernelEnd |
End of kernel code. More... | |
Addr | kernelEntry |
Entry point in the kernel to start at. More... | |
Addr | loadAddrMask |
Mask that should be anded for binary/symbol loading. More... | |
Addr | loadAddrOffset |
Offset that should be used for binary/symbol loading. More... | |
std::vector< BaseRemoteGDB * > | remoteGDB |
std::vector< GDBListener * > | gdbListen |
Counter | totalNumInsts |
EventQueue | instEventQueue |
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 |
Static Public Attributes | |
static std::vector< System * > | systemList |
static int | numSystemsRunning = 0 |
static const int | maxPID = 32768 |
Static Public Attributes inherited from Serializable | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
Protected Member Functions | |
virtual void | serializeSymtab (CheckpointOut &os) const |
If needed, serialize additional symbol table entries for a specific subclass of this system. More... | |
virtual void | unserializeSymtab (CheckpointIn &cp) |
If needed, unserialize additional symbol table entries for a specific subclass of this system. More... | |
Protected Member Functions inherited from Drainable | |
Drainable () | |
virtual | ~Drainable () |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
Protected Member Functions inherited from Clocked | |
Clocked (ClockDomain &clk_domain) | |
Create a clocked object and set the clock domain based on the parameters. More... | |
Clocked (Clocked &)=delete | |
Clocked & | operator= (Clocked &)=delete |
virtual | ~Clocked () |
Virtual destructor due to inheritance. More... | |
void | resetClock () const |
Reset the object's clock using the current global tick value. More... | |
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< std::string > | masterIds |
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 |
Protected Attributes inherited from ClockedObject | |
Enums::PwrState | _currPwrState |
To keep track of the current power state. More... | |
Tick | prvEvalTick |
Stats::Scalar | numPwrStateTransitions |
Stats::Distribution | pwrStateClkGateDist |
Stats::Vector | pwrStateResidencyTicks |
Protected Attributes inherited from SimObject | |
const SimObjectParams * | _params |
Cached copy of the object parameters. More... | |
Protected Attributes inherited from EventManager | |
EventQueue * | eventq |
A pointer to this object's event queue. More... | |
Private Attributes | |
SystemPort | _systemPort |
typedef SystemParams System::Params |
System::System | ( | Params * | p | ) |
Definition at line 86 of file system.cc.
References _cacheLineSize, ObjectFile::bssBase(), ObjectFile::bssSize(), createObjectFile(), debugSymbolTable, ObjectFile::entryPoint(), fatal, FullSystem, Request::funcMasterId, getMasterId(), inform, Request::intMasterId, kernel, kernelEnd, kernelEntry, kernelStart, kernelSymtab, kvmVM, ObjectFile::loadGlobalSymbols(), ObjectFile::loadLocalSymbols(), M5_VAR_USED, numSystemsRunning, params(), KvmVM::setSystem(), systemList, ObjectFile::textBase(), warn_once, Request::wbMasterId, and X86ISA::x.
System::~System | ( | ) |
Definition at line 185 of file system.cc.
References ArmISA::j, kernel, kernelSymtab, numWorkIds, and workItemStats.
|
inline |
Add a function-based event to the given function, to be looked up in the specified symbol table.
The ...OrPanic flavor of the method causes the simulator to panic if the symbol can't be found.
symtab | Symbol table to use for look up. |
lbl | Function to hook the event to. |
desc | Description to be passed to the event. |
args | Arguments to be forwarded to the event constructor. |
Definition at line 420 of file system.hh.
References addr, SymbolTable::findAddress(), fixFuncEventAddr(), and M5_VAR_USED.
|
inline |
|
inline |
|
inline |
Add a function-based event to a kernel symbol.
These functions work like their addFuncEvent() and addFuncEventOrPanic() counterparts. The only difference is that they automatically use the kernel symbol table. All arguments are forwarded to the underlying method.
lbl | Function to hook the event to. |
args | Arguments to be passed to addFuncEvent |
Definition at line 469 of file system.hh.
References kernelSymtab.
Referenced by breakAtKernelFunction().
|
inline |
Definition at line 476 of file system.hh.
References ArmISA::e, kernelSymtab, and panic.
Addr System::allocPhysPages | ( | int | npages | ) |
Allocate npages contiguous unused physical pages.
Definition at line 339 of file system.cc.
References AddrRange::contains(), fatal, pagePtr, AlphaISA::PageShift, physmem, PhysicalMemory::totalSize(), and warn.
Referenced by Process::allocateMem(), 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 165 of file system.hh.
References memoryMode.
Referenced by HDLcd::cmdDisable(), HDLcd::cmdEnable(), HDLcd::drainResume(), CoherentXBar::forwardAtomic(), CoherentXBar::forwardFunctional(), CoherentXBar::forwardTiming(), Cache::functionalAccess(), CoherentXBar::recvAtomic(), Cache::recvAtomic(), Cache::recvAtomicSnoop(), CoherentXBar::recvFunctional(), CoherentXBar::recvTimingReq(), Cache::recvTimingReq(), CoherentXBar::recvTimingResp(), Cache::recvTimingSnoopReq(), Cache::recvTimingSnoopResp(), and DmaReadFifo::resumeFill().
|
inline |
Get the cache line size of the system.
Definition at line 193 of file system.hh.
References _cacheLineSize.
Referenced by DmaDevice::cacheBlockSize(), DmaPort::dmaAction(), DRAMSim2::init(), MemFootprintProbe::MemFootprintProbe(), TrafficGen::parseConfig(), ArmISA::ISA::readMiscReg(), and DmaReadFifo::resumeFillFunctional().
|
overridevirtual |
Resume execution after a successful drain.
Reimplemented from Drainable.
Definition at line 377 of file system.cc.
References totalNumInsts.
Fix up an address used to match PCs for hooking simulator events on to target function executions.
See comment in system.cc for details.
Reimplemented in ArmSystem, SparcSystem, AlphaSystem, X86System, MipsSystem, and RiscvSystem.
Definition at line 401 of file system.hh.
References panic.
Referenced by addFuncEvent().
Addr System::freeMemSize | ( | ) | const |
Amount of physical memory that is still free.
Definition at line 365 of file system.cc.
References pagePtr, AlphaISA::PageShift, physmem, and PhysicalMemory::totalSize().
Referenced by Linux::procMeminfo().
|
inline |
Get the architecture.
Definition at line 286 of file system.hh.
Referenced by Sequencer::makeRequest().
|
inline |
Returns the address the kernel ends at.
Definition at line 517 of file system.hh.
References kernelEnd.
Referenced by AlphaBackdoor::startup().
|
inline |
Returns the address the entry point to the kernel code.
Definition at line 523 of file system.hh.
References kernelEntry.
Referenced by AlphaBackdoor::startup().
|
inline |
Returns the address the kernel starts at.
Definition at line 511 of file system.hh.
References kernelStart.
Referenced by AlphaBackdoor::startup().
|
inline |
MasterID System::getMasterId | ( | std::string | req_name | ) |
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
Definition at line 462 of file system.cc.
References Stats::enabled(), fatal, ArmISA::i, masterIds, SimObject::name(), X86ISA::size(), and startswith().
Referenced by System().
std::string System::getMasterName | ( | MasterID | master_id | ) |
Get the name of an object for a given request id.
Definition at line 490 of file system.cc.
References fatal, and masterIds.
Referenced by BaseTags::regStats(), and BaseCache::regStats().
|
overridevirtual |
Additional function to return the Port of a memory object.
Reimplemented from MemObject.
Definition at line 203 of file system.cc.
References _systemPort.
|
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 178 of file system.hh.
References memoryMode.
|
inline |
Get the page bytes for the ISA.
Definition at line 291 of file system.hh.
References AlphaISA::PageBytes.
Referenced by AbstractMemory::init().
|
inline |
Get the number of bits worth of in-page address for the ISA.
Definition at line 296 of file system.hh.
References AlphaISA::PageShift.
|
inline |
Get a pointer to access the physical memory of the system.
Definition at line 266 of file system.hh.
References physmem.
Referenced by KvmVM::delayedStartup().
|
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 126 of file system.hh.
References _systemPort.
|
inline |
The thermal model used for this system (if any).
Definition at line 301 of file system.hh.
References thermalModel.
Referenced by RealViewTemperatureSensor::read().
|
inline |
Definition at line 203 of file system.hh.
References threadContexts.
Referenced by AlphaProcess::argsInit(), MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), X86ISA::X86Process::argsInit(), AbstractMemory::checkLockedAddrList(), KvmVM::contextIdToVCpuId(), LinuxArmSystem::dumpDmesg(), AlphaProcess::initState(), SparcProcess::initState(), Process::initState(), ArmProcess32::initState(), ArmProcess64::initState(), Sparc32Process::initState(), X86ISA::X86_64Process::initState(), Sparc64Process::initState(), X86ISA::I386Process::initState(), DistIface::SyncEvent::process(), ArmISA::ISA::setMiscReg(), AlphaProcess::setupASNReg(), ArmISA::ISA::tlbiALL(), ArmISA::ISA::tlbiALLN(), ArmISA::ISA::tlbiMVA(), ArmISA::ISA::tlbiVA(), and DistIface::toggleSync().
|
inline |
Called by pseudo_inst to track the number of work items started by this system.
Definition at line 355 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 365 of file system.hh.
References workItemsEnd.
Referenced by PseudoInst::workend().
|
overridevirtual |
After all objects have been created and all ports are connected, check that the system port is connected.
Reimplemented from SimObject.
Definition at line 195 of file system.cc.
References _systemPort, BaseMasterPort::isConnected(), SimObject::name(), and panic.
|
overridevirtual |
initState() is called on each SimObject when not restoring from a checkpoint.
This provides a hook for state initializations that are only required for a "cold start".
Load the kernel code into memory
Reimplemented from SimObject.
Definition at line 289 of file system.cc.
References DPRINTF, fatal, FullSystem, ArmISA::i, isMemAddr(), kernel, kernelEnd, kernelEntry, kernelStart, loadAddrMask, loadAddrOffset, ObjectFile::loadSections(), params(), physProxy, AlphaISA::startupCPU(), and threadContexts.
Referenced by SparcSystem::initState(), AlphaSystem::initState(), X86System::initState(), and ArmSystem::initState().
|
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 144 of file system.hh.
References memoryMode.
Referenced by DmaPort::sendDma().
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 371 of file system.cc.
References PhysicalMemory::isMemAddr(), and physmem.
Referenced by MemFootprintProbe::handleRequest(), initState(), RubyPort::MemSlavePort::isPhysMemAddress(), RubyPort::ruby_hit_callback(), and TrafficGen::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 155 of file system.hh.
References memoryMode.
Referenced by DRAMCtrl::drainResume(), TrafficGen::init(), TrafficGen::initState(), DmaPort::sendDma(), X86ISA::Walker::start(), and DRAMCtrl::startup().
|
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 376 of file system.hh.
References activeCpus, 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 344 of file system.hh.
References masterIds.
Referenced by Cache::getNextQueueEntry(), BaseCache::incHitCount(), BaseCache::incMissCount(), BaseSetAssoc::insertBlock(), BaseSetAssoc::invalidate(), Cache::recvTimingReq(), Cache::recvTimingResp(), BaseTags::regStats(), AbstractMemory::regStats(), and BaseCache::regStats().
Addr System::memSize | ( | ) | const |
Amount of physical memory that exists.
Definition at line 359 of file system.cc.
References physmem, and PhysicalMemory::totalSize().
Referenced by AlphaISA::RemoteGDB::acc(), Linux::procMeminfo(), AlphaBackdoor::startup(), and sysinfoFunc().
|
inline |
Definition at line 208 of file system.hh.
References _numContexts, and threadContexts.
Referenced by exitImpl(), Iob::generateIpi(), Pl390::genSwiMask(), DistIface::SyncEvent::process(), A9SCU::read(), SparcISA::ISA::readFSReg(), ArmISA::ISA::readMiscReg(), ArmISA::ISA::setMiscReg(), setpgidFunc(), Pl390::softInt(), AlphaBackdoor::startup(), tgkillFunc(), ArmISA::ISA::tlbiALL(), ArmISA::ISA::tlbiALLN(), ArmISA::ISA::tlbiMVA(), ArmISA::ISA::tlbiVA(), DistIface::toggleSync(), Pl390::updateIntState(), and Pl390::updateRunPri().
int System::numRunningContexts | ( | ) |
Return number of running (non-halted) thread contexts in system.
These threads could be Active or Suspended.
Definition at line 278 of file system.cc.
References _numContexts, ThreadContext::Halted, ArmISA::i, ArmISA::status, and threadContexts.
Referenced by Pl390::readCpu(), Pl390::readDistributor(), VGic::updateIntState(), Pl390::updateIntState(), and VGic::VGic().
|
inline |
Definition at line 503 of file system.hh.
References _params.
Referenced by initState(), PseudoInst::readfile(), System(), PseudoInst::workbegin(), and PseudoInst::workend().
|
static |
Definition at line 441 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 231 of file system.cc.
References _numContexts, GDBListener::accept(), activeCpus, fatal, getRemoteGDBPort(), SparcISA::id, InvalidContextID, GDBListener::listen(), remoteGDB, rgdb_wait, and threadContexts.
|
overridevirtual |
Register statistics for this object.
For every stats dump, the power state residency and other distribution stats should be computed just before the dump to ensure correct stats value being reported for current dump window. It avoids things like having any unreported time spent in a power state to be forwarded to the next dump window which might have rather unpleasant effects (like perturbing the distribution stats).
Reimplemented from ClockedObject.
Definition at line 408 of file system.cc.
References ccprintf(), ArmISA::j, SimObject::name(), numWorkIds, ClockedObject::regStats(), and workItemStats.
void System::replaceThreadContext | ( | ThreadContext * | tc, |
ContextID | context_id | ||
) |
Definition at line 326 of file system.cc.
References panic, remoteGDB, and threadContexts.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Reimplemented from ClockedObject.
Definition at line 383 of file system.cc.
References FullSystem, kernelSymtab, pagePtr, physmem, SymbolTable::serialize(), SERIALIZE_SCALAR, Serializable::serializeSection(), and serializeSymtab().
|
inlineprotectedvirtual |
If needed, serialize additional symbol table entries for a specific subclass of this system.
Currently this is used by Alpha and MIPS.
os | stream to serialize to |
Reimplemented in AlphaSystem, and SparcSystem.
Definition at line 575 of file system.hh.
Referenced by serialize().
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 210 of file system.cc.
References Drained, Drainable::drainState(), memoryMode, and ArmISA::mode.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Reimplemented from ClockedObject.
Definition at line 396 of file system.cc.
References FullSystem, kernelSymtab, pagePtr, physmem, SymbolTable::unserialize(), UNSERIALIZE_SCALAR, Serializable::unserializeSection(), and unserializeSymtab().
|
inlineprotectedvirtual |
If needed, unserialize additional symbol table entries for a specific subclass of this system.
cp | checkpoint to unserialize from |
section | relevant section in the checkpoint |
Reimplemented in AlphaSystem, and SparcSystem.
Definition at line 584 of file system.hh.
Referenced by unserialize().
|
inline |
Definition at line 388 of file system.hh.
References curTick(), lastWorkItemStarted, and MipsISA::p.
Referenced by PseudoInst::workbegin().
void System::workItemEnd | ( | uint32_t | tid, |
uint32_t | workid | ||
) |
Definition at line 424 of file system.cc.
References curTick(), DPRINTF, fatal, lastWorkItemStarted, numWorkIds, MipsISA::p, and workItemStats.
Referenced by PseudoInst::workend().
|
protected |
Definition at line 311 of file system.hh.
Referenced by cacheLineSize(), and System().
int System::_numContexts |
Definition at line 200 of file system.hh.
Referenced by MuxingKvmGic::clearBankedDistRange(), MuxingKvmGic::copyBankedDistRange(), MuxingKvmGic::copyGicState(), MuxingKvmGic::fromKvmToPl390(), numContexts(), numRunningContexts(), registerThreadContext(), and LinuxArmSystem::startup().
|
protected |
Definition at line 495 of file system.hh.
Referenced by FreebsdArmSystem::params(), LinuxArmSystem::params(), RiscvSystem::params(), MipsSystem::params(), SparcSystem::params(), AlphaSystem::params(), X86System::params(), ArmSystem::params(), LinuxAlphaSystem::params(), GenericArmSystem::params(), and params().
|
private |
Definition at line 108 of file system.hh.
Referenced by getMasterPort(), getSystemPort(), and init().
|
protected |
Definition at line 316 of file system.hh.
Referenced by markWorkItem(), and registerThreadContext().
FutexMap System::futexMap |
Definition at line 555 of file system.hh.
Referenced by exitFutexWake(), and futexFunc().
std::vector<GDBListener *> System::gdbListen |
EventQueue System::instEventQueue |
ObjectFile* System::kernel |
Object pointer for the kernel code.
Definition at line 230 of file system.hh.
Referenced by ArmSystem::ArmSystem(), FreebsdArmSystem::initState(), LinuxArmSystem::initState(), X86System::initState(), initState(), System(), and ~System().
Addr System::kernelEnd |
End of kernel code.
Definition at line 236 of file system.hh.
Referenced by getKernelEnd(), initState(), System(), and AlphaISA::StackTrace::trace().
Addr System::kernelEntry |
Entry point in the kernel to start at.
Definition at line 239 of file system.hh.
Referenced by getKernelEntry(), X86System::initState(), ArmSystem::initState(), initState(), and System().
Addr System::kernelStart |
Beginning of kernel code.
Definition at line 233 of file system.hh.
Referenced by getKernelStart(), initState(), System(), and AlphaISA::StackTrace::trace().
SymbolTable* System::kernelSymtab |
kernel symbol table
Definition at line 227 of file system.hh.
Referenced by addKernelFuncEvent(), addKernelFuncEventOrPanic(), PseudoInst::addsymbol(), Linux::ThreadInfo::get_data(), FreebsdArmSystem::initState(), LinuxArmSystem::initState(), LinuxAlphaSystem::initState(), PseudoInst::loadsymbol(), X86ISA::ProcessInfo::ProcessInfo(), ArmISA::ProcessInfo::ProcessInfo(), AlphaISA::ProcessInfo::ProcessInfo(), serialize(), LinuxAlphaSystem::setDelayLoop(), LinuxAlphaSystem::setupFuncEvents(), SimpleThread::SimpleThread(), System(), AlphaISA::StackTrace::trace(), unserialize(), and ~System().
|
protected |
Definition at line 305 of file system.hh.
Referenced by getKvmVM(), and System().
Definition at line 541 of file system.hh.
Referenced by workItemBegin(), and workItemEnd().
Addr System::loadAddrMask |
Mask that should be anded for binary/symbol loading.
This allows one two different OS requirements for the same ISA to be handled. Some OSes are compiled for a virtual address and need to be loaded into physical memory that starts at address 0, while other bare metal tools generate images that start at address 0.
Definition at line 247 of file system.hh.
Referenced by AlphaSystem::initState(), FreebsdArmSystem::initState(), LinuxArmSystem::initState(), ArmSystem::initState(), and initState().
Addr System::loadAddrOffset |
Offset that should be used for binary/symbol loading.
This further allows more flexibility than the loadAddrMask allows alone in loading kernels and similar. The loadAddrOffset is applied after the loadAddrMask.
Definition at line 254 of file system.hh.
Referenced by FreebsdArmSystem::initState(), LinuxArmSystem::initState(), ArmSystem::initState(), and initState().
|
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 323 of file system.hh.
Referenced by getMasterId(), getMasterName(), and maxMasters().
|
static |
Definition at line 557 of file system.hh.
Referenced by cloneFunc(), and Process::Process().
|
protected |
Definition at line 309 of file system.hh.
Referenced by bypassCaches(), getMemoryMode(), isAtomicMode(), isTimingMode(), and setMemoryMode().
const bool System::multiThread |
Definition at line 201 of file system.hh.
Referenced by ArmISA::getMPIDR().
|
static |
Definition at line 551 of file system.hh.
Referenced by IGbE::ethRxPkt(), SimpleThread::simPalCheck(), FullO3CPU< Impl >::simPalCheck(), and System().
|
protected |
Definition at line 315 of file system.hh.
Referenced by regStats(), workItemEnd(), and ~System().
Addr System::pagePtr |
Definition at line 218 of file system.hh.
Referenced by allocPhysPages(), freeMemSize(), serialize(), and unserialize().
|
protected |
Definition at line 307 of file system.hh.
Referenced by allocPhysPages(), freeMemSize(), getPhysMem(), LinuxArmSystem::initState(), isMemAddr(), memSize(), serialize(), and unserialize().
PortProxy System::physProxy |
Port to physical memory used for writing object files into ram at boot.
Definition at line 224 of file system.hh.
Referenced by TsunamiPChip::dmaAddr(), SparcSystem::initState(), AlphaSystem::initState(), LinuxX86System::initState(), FreebsdArmSystem::initState(), LinuxArmSystem::initState(), X86System::initState(), X86ISA::X86_64Process::initState(), ArmSystem::initState(), initState(), SimpleDisk::read(), DmaReadFifo::resumeFillFunctional(), X86System::writeOutMPTable(), and X86System::writeOutSMBiosTable().
std::set<int> System::PIDs |
Process set to track which PIDs have already been allocated.
Definition at line 560 of file system.hh.
Referenced by cloneFunc(), execveFunc(), and Process::Process().
std::vector<BaseRemoteGDB *> System::remoteGDB |
Definition at line 487 of file system.hh.
Referenced by breakpoint(), registerThreadContext(), and replaceThreadContext().
std::list<BasicSignal> System::signalList |
Definition at line 564 of file system.hh.
Referenced by exitImpl().
|
static |
Definition at line 550 of file system.hh.
Referenced by breakAtKernelFunction(), IGbE::ethRxPkt(), exitImpl(), printSystems(), sched_break_pc(), and System().
|
protected |
Definition at line 325 of file system.hh.
Referenced by getThermalModel().
std::vector<ThreadContext *> System::threadContexts |
Definition at line 199 of file system.hh.
Referenced by IntrControl::clear(), TsunamiCChip::clearDRIR(), MaltaCChip::clearIntr(), TsunamiCChip::clearIPI(), TsunamiCChip::clearITI(), SparcISA::TLB::doMmuRegWrite(), exitImpl(), Process::findFreeContext(), Iob::generateIpi(), getThreadContext(), LinuxX86System::initState(), FreebsdArmSystem::initState(), LinuxArmSystem::initState(), X86System::initState(), ArmSystem::initState(), initState(), mmapImpl(), numContexts(), numRunningContexts(), IntrControl::post(), TsunamiCChip::postDRIR(), MaltaCChip::postIntr(), TsunamiCChip::postRTC(), SparcISA::ISA::readFSReg(), registerThreadContext(), replaceThreadContext(), TsunamiCChip::reqIPI(), setpgidFunc(), LinuxArmSystem::startup(), tgkillFunc(), MuxingKvmGic::validKvmEnvironment(), and PseudoInst::wakeCPU().
Counter System::totalNumInsts |
Definition at line 539 of file system.hh.
Referenced by drainResume().
|
protected |
Definition at line 313 of file system.hh.
Referenced by incWorkItemsBegin().
|
protected |
Definition at line 314 of file system.hh.
Referenced by incWorkItemsEnd().
std::map<uint32_t, Stats::Histogram*> System::workItemStats |
Definition at line 542 of file system.hh.
Referenced by regStats(), workItemEnd(), and ~System().