gem5
|
Classes | |
struct | InitParamKey |
Unique keys to retrieve various params by the initParam pseudo inst. More... | |
Functions | |
static void | panicFsOnlyPseudoInst (const char *name) |
uint64_t | pseudoInst (ThreadContext *tc, uint8_t func, uint8_t subfunc) |
Execute a decoded M5 pseudo instruction. More... | |
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) |
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 | togglesync (ThreadContext *tc) |
void | workbegin (ThreadContext *tc, uint64_t workid, uint64_t threadid) |
void | workend (ThreadContext *tc, uint64_t workid, uint64_t threadid) |
void PseudoInst::addsymbol | ( | ThreadContext * | tc, |
Addr | addr, | ||
Addr | symbolAddr | ||
) |
Definition at line 364 of file pseudo_inst.cc.
References CopyStringOut(), debugSymbolTable, DPRINTF, FullSystem, ThreadContext::getSystemPtr(), SymbolTable::insert(), System::kernelSymtab, and panicFsOnlyPseudoInst().
Referenced by pseudoInst().
void PseudoInst::arm | ( | ThreadContext * | tc | ) |
Definition at line 229 of file pseudo_inst.cc.
References DPRINTF, FullSystem, ThreadContext::getKernelStats(), and panicFsOnlyPseudoInst().
Referenced by pseudoInst().
void PseudoInst::debugbreak | ( | ThreadContext * | tc | ) |
Definition at line 570 of file pseudo_inst.cc.
References Debug::breakpoint(), and DPRINTF.
Referenced by pseudoInst().
void PseudoInst::dumpresetstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 455 of file pseudo_inst.cc.
References curTick(), DPRINTF, ThreadContext::getCpuPtr(), SimClock::Int::ns, and Stats::schedStatEvent().
Referenced by pseudoInst().
void PseudoInst::dumpstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 441 of file pseudo_inst.cc.
References curTick(), DPRINTF, ThreadContext::getCpuPtr(), SimClock::Int::ns, and Stats::schedStatEvent().
Referenced by pseudoInst().
uint64_t PseudoInst::initParam | ( | ThreadContext * | tc, |
uint64_t | key_str1, | ||
uint64_t | key_str2 | ||
) |
Definition at line 382 of file pseudo_inst.cc.
References DPRINTF, FullSystem, ThreadContext::getCpuPtr(), ArmISA::len, panic, panicFsOnlyPseudoInst(), DistIface::rankParam(), DistIface::sizeParam(), and X86ISA::val.
Referenced by pseudoInst().
void PseudoInst::loadsymbol | ( | ThreadContext * | tc | ) |
Definition at line 312 of file pseudo_inst.cc.
References addr, DPRINTF, eat_white(), fatal, FullSystem, ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), SymbolTable::insert(), System::kernelSymtab, panicFsOnlyPseudoInst(), and to_number().
Referenced by pseudoInst().
void PseudoInst::m5checkpoint | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 469 of file pseudo_inst.cc.
References curTick(), DPRINTF, exitSimLoop(), ThreadContext::getCpuPtr(), SimClock::Int::ns, and DistIface::readyToCkpt().
Referenced by pseudoInst().
void PseudoInst::m5exit | ( | ThreadContext * | tc, |
Tick | delay | ||
) |
Definition at line 294 of file pseudo_inst.cc.
References curTick(), DPRINTF, exitSimLoop(), SimClock::Int::ns, and DistIface::readyToExit().
Referenced by pseudoInst().
void PseudoInst::m5fail | ( | ThreadContext * | tc, |
Tick | delay, | ||
uint64_t | code | ||
) |
Definition at line 304 of file pseudo_inst.cc.
References curTick(), DPRINTF, exitSimLoop(), and SimClock::Int::ns.
Referenced by pseudoInst().
|
inlinestatic |
Definition at line 89 of file pseudo_inst.cc.
References panic.
Referenced by addsymbol(), arm(), initParam(), loadsymbol(), and readfile().
uint64_t PseudoInst::pseudoInst | ( | ThreadContext * | tc, |
uint8_t | func, | ||
uint8_t | subfunc | ||
) |
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) |
subfunc | M5 minor function number. Mainly used for annotations. |
Definition at line 95 of file pseudo_inst.cc.
References addsymbol(), arm(), debugbreak(), DPRINTF, dumpresetstats(), dumpstats(), AlphaISA::getArgument(), ArmISA::i, initParam(), loadsymbol(), m5checkpoint(), m5exit(), m5fail(), X86ISA::m5PageFault(), X86ISA::m5Syscall(), panic, ThreadContext::pcState(), quiesce(), quiesceNs(), quiesceSkip(), quiesceTime(), readfile(), resetstats(), rpns(), switchcpu(), togglesync(), wakeCPU(), warn, workbegin(), workend(), and writefile().
Referenced by handlePseudoInst(), and ArmKvmCPU::onKvmExitHypercall().
void PseudoInst::quiesce | ( | ThreadContext * | tc | ) |
Definition at line 240 of file pseudo_inst.cc.
References DPRINTF, and ThreadContext::quiesce().
Referenced by DefaultFetch< Impl >::fetch(), and pseudoInst().
void PseudoInst::quiesceCycles | ( | ThreadContext * | tc, |
uint64_t | cycles | ||
) |
Definition at line 261 of file pseudo_inst.cc.
References DPRINTF, ThreadContext::getCpuPtr(), and ThreadContext::quiesceTick().
Referenced by FullO3CPU< Impl >::activateContext(), and FullO3CPU< Impl >::regStats().
void PseudoInst::quiesceNs | ( | ThreadContext * | tc, |
uint64_t | ns | ||
) |
Definition at line 254 of file pseudo_inst.cc.
References curTick(), DPRINTF, SimClock::Int::ns, and ThreadContext::quiesceTick().
Referenced by FreeBSD::UDelayEvent::process(), Linux::UDelayEvent::process(), and pseudoInst().
void PseudoInst::quiesceSkip | ( | ThreadContext * | tc | ) |
Definition at line 247 of file pseudo_inst.cc.
References DPRINTF, ThreadContext::getCpuPtr(), and ThreadContext::quiesceTick().
Referenced by pseudoInst().
uint64_t PseudoInst::quiesceTime | ( | ThreadContext * | tc | ) |
Definition at line 268 of file pseudo_inst.cc.
References DPRINTF, SimClock::Int::ns, ThreadContext::readLastActivate(), and ThreadContext::readLastSuspend().
Referenced by pseudoInst().
uint64_t PseudoInst::readfile | ( | ThreadContext * | tc, |
Addr | vaddr, | ||
uint64_t | len, | ||
uint64_t | offset | ||
) |
Definition at line 483 of file pseudo_inst.cc.
References CopyIn(), DPRINTF, ArmISA::fd, FullSystem, ThreadContext::getSystemPtr(), ArmISA::len, MipsISA::p, panic, panicFsOnlyPseudoInst(), System::params(), and ULL.
Referenced by pseudoInst().
void PseudoInst::resetstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period | ||
) |
Definition at line 427 of file pseudo_inst.cc.
References curTick(), DPRINTF, ThreadContext::getCpuPtr(), SimClock::Int::ns, and Stats::schedStatEvent().
Referenced by pseudoInst().
uint64_t PseudoInst::rpns | ( | ThreadContext * | tc | ) |
Definition at line 277 of file pseudo_inst.cc.
References curTick(), DPRINTF, and SimClock::Int::ns.
Referenced by pseudoInst().
void PseudoInst::switchcpu | ( | ThreadContext * | tc | ) |
Definition at line 577 of file pseudo_inst.cc.
References DPRINTF, and exitSimLoop().
Referenced by pseudoInst().
void PseudoInst::togglesync | ( | ThreadContext * | tc | ) |
Definition at line 584 of file pseudo_inst.cc.
References DPRINTF, and DistIface::toggleSync().
Referenced by pseudoInst().
void PseudoInst::wakeCPU | ( | ThreadContext * | tc, |
uint64_t | cpuid | ||
) |
Definition at line 284 of file pseudo_inst.cc.
References ThreadContext::activate(), MipsISA::cpuid, DPRINTF, ThreadContext::getSystemPtr(), ThreadContext::status(), ThreadContext::Suspended, and System::threadContexts.
Referenced by FullO3CPU< Impl >::drain(), pseudoInst(), and FullO3CPU< Impl >::wakeup().
void PseudoInst::workbegin | ( | ThreadContext * | tc, |
uint64_t | workid, | ||
uint64_t | threadid | ||
) |
Definition at line 596 of file pseudo_inst.cc.
References DPRINTF, exitSimLoop(), ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), System::incWorkItemsBegin(), System::markWorkItem(), System::params(), and System::workItemBegin().
Referenced by pseudoInst().
void PseudoInst::workend | ( | ThreadContext * | tc, |
uint64_t | workid, | ||
uint64_t | threadid | ||
) |
Definition at line 659 of file pseudo_inst.cc.
References DPRINTF, exitSimLoop(), ThreadContext::getCpuPtr(), ThreadContext::getSystemPtr(), System::incWorkItemsEnd(), System::markWorkItem(), System::params(), and System::workItemEnd().
Referenced by pseudoInst().
uint64_t PseudoInst::writefile | ( | ThreadContext * | tc, |
Addr | vaddr, | ||
uint64_t | len, | ||
uint64_t | offset, | ||
Addr | filename_addr | ||
) |
Definition at line 525 of file pseudo_inst.cc.
References OutputDirectory::close(), CopyOut(), CopyStringOut(), OutputDirectory::create(), DPRINTF, ArmISA::fn, ArmISA::len, OutputDirectory::open(), X86ISA::os, panic, simout, and OutputStream::stream().
Referenced by pseudoInst().