gem5
v20.1.0.0
|
Namespaces | |
InitParamKey | |
Unique keys to retrieve various params by the initParam pseudo inst. | |
Functions | |
static void | panicFsOnlyPseudoInst (const char *name) |
void | arm (ThreadContext *tc) |
void | quiesce (ThreadContext *tc) |
void | quiesceSkip (ThreadContext *tc) |
void | quiesceNs (ThreadContext *tc, uint64_t ns) |
void | quiesceCycles (ThreadContext *tc, uint64_t cycles) |
uint64_t | quiesceTime (ThreadContext *tc) |
uint64_t | rpns (ThreadContext *tc) |
void | wakeCPU (ThreadContext *tc, uint64_t cpuid) |
void | m5exit (ThreadContext *tc, Tick delay) |
uint64_t | m5sum (ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f) |
void | m5fail (ThreadContext *tc, Tick delay, uint64_t code) |
void | loadsymbol (ThreadContext *tc) |
void | addsymbol (ThreadContext *tc, Addr addr, Addr symbolAddr) |
uint64_t | initParam (ThreadContext *tc, uint64_t key_str1, uint64_t key_str2) |
void | resetstats (ThreadContext *tc, Tick delay, Tick period) |
void | dumpstats (ThreadContext *tc, Tick delay, Tick period) |
void | dumpresetstats (ThreadContext *tc, Tick delay, Tick period) |
void | m5checkpoint (ThreadContext *tc, Tick delay, Tick period) |
uint64_t | readfile (ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset) |
uint64_t | writefile (ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr) |
void | debugbreak (ThreadContext *tc) |
void | switchcpu (ThreadContext *tc) |
void | m5Syscall (ThreadContext *tc) |
void | togglesync (ThreadContext *tc) |
void | workbegin (ThreadContext *tc, uint64_t workid, uint64_t threadid) |
void | workend (ThreadContext *tc, uint64_t workid, uint64_t threadid) |
static void | decodeAddrOffset (Addr offset, uint8_t &func) |
template<typename ABI , bool store_ret> | |
bool | pseudoInstWork (ThreadContext *tc, uint8_t func, uint64_t &result) |
Execute a decoded M5 pseudo instruction. More... | |
template<typename ABI , bool store_ret = false> | |
bool | pseudoInst (ThreadContext *tc, uint8_t func, uint64_t &result) |
template<typename ABI , bool store_ret = true> | |
bool | pseudoInst (ThreadContext *tc, uint8_t func) |
void PseudoInst::addsymbol | ( | ThreadContext * | tc, |
Addr | addr, | ||
Addr | symbolAddr | ||
) |
Definition at line 265 of file pseudo_inst.cc.
References addr, Loader::debugSymbolTable, DPRINTF, FullSystem, ThreadContext::getSystemPtr(), ThreadContext::getVirtProxy(), Loader::Symbol::Global, Loader::SymbolTable::insert(), Workload::insertSymbol(), panicFsOnlyPseudoInst(), PortProxy::readString(), and System::workload.
Referenced by pseudoInstWork().
void PseudoInst::arm | ( | ThreadContext * | tc | ) |
Definition at line 110 of file pseudo_inst.cc.
References DPRINTF, FullSystem, ThreadContext::getSystemPtr(), panicFsOnlyPseudoInst(), Workload::recordArm(), and System::workload.
Referenced by pseudoInstWork().
void PseudoInst::debugbreak | ( | ThreadContext * | tc | ) |
Definition at line 461 of file pseudo_inst.cc.
References Debug::breakpoint(), and DPRINTF.
Referenced by pseudoInstWork().
|
inlinestatic |
Definition at line 81 of file pseudo_inst.hh.
References bits(), and ArmISA::offset.
Referenced by ArmSemihosting::callGem5PseudoOp32(), ArmSemihosting::callGem5PseudoOp64(), X86ISA::TLB::finalizePhysical(), and ArmISA::TLB::finalizePhysical().
void PseudoInst::dumpresetstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 346 of file pseudo_inst.cc.
References curTick(), DPRINTF, ThreadContext::getCpuPtr(), SimClock::Int::ns, BaseCPU::params(), and Stats::schedStatEvent().
Referenced by pseudoInstWork().
void PseudoInst::dumpstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 332 of file pseudo_inst.cc.
References curTick(), DPRINTF, ThreadContext::getCpuPtr(), SimClock::Int::ns, BaseCPU::params(), and Stats::schedStatEvent().
Referenced by pseudoInstWork().
uint64_t PseudoInst::initParam | ( | ThreadContext * | tc, |
uint64_t | key_str1, | ||
uint64_t | key_str2 | ||
) |
Definition at line 284 of file pseudo_inst.cc.
References PseudoInst::InitParamKey::DEFAULT, PseudoInst::InitParamKey::DIST_RANK, PseudoInst::InitParamKey::DIST_SIZE, DPRINTF, FullSystem, ThreadContext::getCpuPtr(), System::init_param, ArmISA::len, letoh(), panic, panicFsOnlyPseudoInst(), DistIface::rankParam(), DistIface::sizeParam(), and BaseCPU::system.
Referenced by pseudoInstWork().
void PseudoInst::loadsymbol | ( | ThreadContext * | tc | ) |
Definition at line 211 of file pseudo_inst.cc.
References addr, DPRINTF, eat_white(), fatal, FullSystem, ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), Workload::insertSymbol(), panicFsOnlyPseudoInst(), System::params(), BaseCPU::system, to_number(), and System::workload.
Referenced by pseudoInstWork().
void PseudoInst::m5checkpoint | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 360 of file pseudo_inst.cc.
References curTick(), DPRINTF, exitSimLoop(), ThreadContext::getCpuPtr(), SimClock::Int::ns, BaseCPU::params(), and DistIface::readyToCkpt().
Referenced by pseudoInstWork().
void PseudoInst::m5exit | ( | ThreadContext * | tc, |
Tick | delay | ||
) |
Definition at line 183 of file pseudo_inst.cc.
References curTick(), DPRINTF, exitSimLoop(), SimClock::Int::ns, and DistIface::readyToExit().
Referenced by pseudoInstWork().
void PseudoInst::m5fail | ( | ThreadContext * | tc, |
Tick | delay, | ||
uint64_t | code | ||
) |
Definition at line 203 of file pseudo_inst.cc.
References curTick(), DPRINTF, exitSimLoop(), and SimClock::Int::ns.
Referenced by pseudoInstWork().
uint64_t PseudoInst::m5sum | ( | ThreadContext * | tc, |
uint64_t | a, | ||
uint64_t | b, | ||
uint64_t | c, | ||
uint64_t | d, | ||
uint64_t | e, | ||
uint64_t | f | ||
) |
Definition at line 194 of file pseudo_inst.cc.
References ArmISA::a, ArmISA::b, ArmISA::c, ArmISA::d, DPRINTF, ArmISA::e, and ArmISA::f.
Referenced by pseudoInstWork().
void PseudoInst::m5Syscall | ( | ThreadContext * | tc | ) |
Definition at line 479 of file pseudo_inst.cc.
References DPRINTF, and ThreadContext::syscall().
Referenced by pseudoInstWork().
|
inlinestatic |
Definition at line 104 of file pseudo_inst.cc.
References panic.
Referenced by addsymbol(), arm(), initParam(), loadsymbol(), and readfile().
bool PseudoInst::pseudoInst | ( | ThreadContext * | tc, |
uint8_t | func | ||
) |
Definition at line 271 of file pseudo_inst.hh.
bool PseudoInst::pseudoInst | ( | ThreadContext * | tc, |
uint8_t | func, | ||
uint64_t & | result | ||
) |
Definition at line 264 of file pseudo_inst.hh.
bool PseudoInst::pseudoInstWork | ( | ThreadContext * | tc, |
uint8_t | func, | ||
uint64_t & | result | ||
) |
Execute a decoded M5 pseudo instruction.
The ISA-specific code is responsible to decode the pseudo inst function number and subfunction number. After that has been done, the rest of the instruction can be implemented in an ISA-agnostic manner using the ISA-specific getArguments functions.
func | M5 pseudo op major function number (see utility/m5/m5ops.h) |
result | A reference to a uint64_t to store a result in. |
Definition at line 131 of file pseudo_inst.hh.
References addsymbol(), arm(), debugbreak(), DPRINTF, dumpresetstats(), dumpstats(), initParam(), loadsymbol(), m5checkpoint(), m5exit(), m5fail(), GenericISA::m5PageFault(), m5sum(), m5Syscall(), panic, ThreadContext::pcState(), quiesce(), quiesceCycles(), quiesceNs(), quiesceTime(), readfile(), resetstats(), rpns(), switchcpu(), togglesync(), wakeCPU(), warn, workbegin(), workend(), and writefile().
void PseudoInst::quiesce | ( | ThreadContext * | tc | ) |
Definition at line 122 of file pseudo_inst.cc.
References DPRINTF, and ThreadContext::quiesce().
Referenced by DefaultFetch< Impl >::fetch(), and pseudoInstWork().
void PseudoInst::quiesceCycles | ( | ThreadContext * | tc, |
uint64_t | cycles | ||
) |
Definition at line 143 of file pseudo_inst.cc.
References DPRINTF, ThreadContext::getCpuPtr(), and ThreadContext::quiesceTick().
Referenced by FullO3CPU< O3CPUImpl >::activateContext(), pseudoInstWork(), and FullO3CPU< O3CPUImpl >::regStats().
void PseudoInst::quiesceNs | ( | ThreadContext * | tc, |
uint64_t | ns | ||
) |
Definition at line 136 of file pseudo_inst.cc.
References curTick(), DPRINTF, SimClock::Int::ns, ArmISA::ns, and ThreadContext::quiesceTick().
Referenced by pseudoInstWork().
void PseudoInst::quiesceSkip | ( | ThreadContext * | tc | ) |
Definition at line 129 of file pseudo_inst.cc.
References DPRINTF, ThreadContext::getCpuPtr(), and ThreadContext::quiesceTick().
uint64_t PseudoInst::quiesceTime | ( | ThreadContext * | tc | ) |
Definition at line 150 of file pseudo_inst.cc.
References DPRINTF, SimClock::Int::ns, ThreadContext::readLastActivate(), and ThreadContext::readLastSuspend().
Referenced by pseudoInstWork().
uint64_t PseudoInst::readfile | ( | ThreadContext * | tc, |
Addr | vaddr, | ||
uint64_t | len, | ||
uint64_t | offset | ||
) |
Definition at line 374 of file pseudo_inst.cc.
References DPRINTF, ArmISA::fd, FullSystem, ThreadContext::getSystemPtr(), ThreadContext::getVirtProxy(), ArmISA::len, ArmISA::offset, MipsISA::p, panic, panicFsOnlyPseudoInst(), System::params(), ULL, MipsISA::vaddr, and PortProxy::writeBlob().
Referenced by pseudoInstWork().
void PseudoInst::resetstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 318 of file pseudo_inst.cc.
References curTick(), DPRINTF, ThreadContext::getCpuPtr(), SimClock::Int::ns, BaseCPU::params(), and Stats::schedStatEvent().
Referenced by pseudoInstWork().
uint64_t PseudoInst::rpns | ( | ThreadContext * | tc | ) |
Definition at line 159 of file pseudo_inst.cc.
References curTick(), DPRINTF, and SimClock::Int::ns.
Referenced by pseudoInstWork().
void PseudoInst::switchcpu | ( | ThreadContext * | tc | ) |
Definition at line 468 of file pseudo_inst.cc.
References DPRINTF, and exitSimLoop().
Referenced by pseudoInstWork().
void PseudoInst::togglesync | ( | ThreadContext * | tc | ) |
Definition at line 486 of file pseudo_inst.cc.
References DPRINTF, and DistIface::toggleSync().
Referenced by pseudoInstWork().
void PseudoInst::wakeCPU | ( | ThreadContext * | tc, |
uint64_t | cpuid | ||
) |
Definition at line 166 of file pseudo_inst.cc.
References ThreadContext::activate(), MipsISA::cpuid, DPRINTF, ThreadContext::getSystemPtr(), System::Threads::size(), ThreadContext::status(), ThreadContext::Suspended, System::threads, and warn.
Referenced by FullO3CPU< O3CPUImpl >::drain(), pseudoInstWork(), and FullO3CPU< O3CPUImpl >::wakeup().
void PseudoInst::workbegin | ( | ThreadContext * | tc, |
uint64_t | workid, | ||
uint64_t | threadid | ||
) |
Definition at line 498 of file pseudo_inst.cc.
References BaseCPU::cpuId(), DPRINTF, exitSimLoop(), ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), System::incWorkItemsBegin(), System::markWorkItem(), System::params(), BaseCPU::workItemBegin(), and System::workItemBegin().
Referenced by pseudoInstWork().
void PseudoInst::workend | ( | ThreadContext * | tc, |
uint64_t | workid, | ||
uint64_t | threadid | ||
) |
Definition at line 561 of file pseudo_inst.cc.
References BaseCPU::cpuId(), DPRINTF, exitSimLoop(), ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), System::incWorkItemsEnd(), System::markWorkItem(), System::params(), BaseCPU::workItemEnd(), and System::workItemEnd().
Referenced by pseudoInstWork().
uint64_t PseudoInst::writefile | ( | ThreadContext * | tc, |
Addr | vaddr, | ||
uint64_t | len, | ||
uint64_t | offset, | ||
Addr | filename_addr | ||
) |
Definition at line 416 of file pseudo_inst.cc.
References OutputDirectory::close(), OutputDirectory::create(), DPRINTF, ThreadContext::getVirtProxy(), ArmISA::len, ArmISA::offset, OutputDirectory::open(), X86ISA::os, panic, PortProxy::readBlob(), PortProxy::readString(), simout, OutputStream::stream(), and MipsISA::vaddr.
Referenced by pseudoInstWork().