gem5 v24.0.0.0
|
Classes | |
struct | GuestAddr |
This struct wrapper for Addr enables m5ops for systems with 32 bit pointer, since it allows to distinguish between address arguments and native C++ types. More... | |
Functions | |
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, GuestAddr addr, GuestAddr 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, GuestAddr vaddr, uint64_t len, uint64_t offset) |
uint64_t | writefile (ThreadContext *tc, GuestAddr vaddr, uint64_t len, uint64_t offset, GuestAddr filename_addr) |
void | debugbreak (ThreadContext *tc) |
void | switchcpu (ThreadContext *tc) |
void | togglesync (ThreadContext *tc) |
void | triggerWorkloadEvent (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) |
std::ostream & | operator<< (std::ostream &os, const GuestAddr addr) |
void | m5Syscall (ThreadContext *tc) |
template<typename ABI , bool store_ret> | |
bool | pseudoInstWork (ThreadContext *tc, uint8_t func, uint64_t &result) |
Execute a decoded M5 pseudo instruction. | |
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 gem5::pseudo_inst::addsymbol | ( | ThreadContext * | tc, |
GuestAddr | addr, | ||
GuestAddr | symbolAddr ) |
Definition at line 259 of file pseudo_inst.cc.
References gem5::pseudo_inst::GuestAddr::addr, gem5::X86ISA::addr, gem5::loader::debugSymbolTable, DPRINTF, gem5::FullSystem, gem5::loader::Symbol::Function, gem5::ThreadContext::getSystemPtr(), gem5::loader::Symbol::Global, gem5::loader::SymbolTable::insert(), gem5::Workload::insertSymbol(), gem5::PortProxy::readString(), and gem5::System::workload.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::arm | ( | ThreadContext * | tc | ) |
Definition at line 107 of file pseudo_inst.cc.
References DPRINTF, gem5::ThreadContext::getSystemPtr(), gem5::Workload::recordArm(), and gem5::System::workload.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::debugbreak | ( | ThreadContext * | tc | ) |
Definition at line 464 of file pseudo_inst.cc.
References gem5::debug::breakpoint(), and DPRINTF.
Referenced by pseudoInstWork().
|
inlinestatic |
Definition at line 62 of file pseudo_inst.hh.
References gem5::bits(), and gem5::ArmISA::offset.
Referenced by gem5::ArmSemihosting::callGem5PseudoOp32(), gem5::ArmSemihosting::callGem5PseudoOp64(), gem5::ArmISA::MMU::finalizePhysical(), and gem5::X86ISA::TLB::finalizePhysical().
void gem5::pseudo_inst::dumpresetstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period ) |
Definition at line 342 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::ThreadContext::getCpuPtr(), gem5::sim_clock::as_int::ns, gem5::SimObject::params(), and gem5::statistics::schedStatEvent().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::dumpstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period ) |
Definition at line 328 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::ThreadContext::getCpuPtr(), gem5::sim_clock::as_int::ns, gem5::SimObject::params(), and gem5::statistics::schedStatEvent().
Referenced by pseudoInstWork().
uint64_t gem5::pseudo_inst::initParam | ( | ThreadContext * | tc, |
uint64_t | key_str1, | ||
uint64_t | key_str2 ) |
Definition at line 284 of file pseudo_inst.cc.
References DPRINTF, gem5::ThreadContext::getCpuPtr(), gem5::System::init_param, gem5::ArmISA::len, gem5::letoh(), panic, gem5::DistIface::rankParam(), gem5::DistIface::sizeParam(), and gem5::BaseCPU::system.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::loadsymbol | ( | ThreadContext * | tc | ) |
Definition at line 206 of file pseudo_inst.cc.
References gem5::X86ISA::addr, DPRINTF, gem5::eat_white(), fatal, gem5::ThreadContext::getCpuPtr(), gem5::ThreadContext::getSystemPtr(), gem5::Workload::insertSymbol(), gem5::SimObject::params(), gem5::BaseCPU::system, gem5::to_number(), and gem5::System::workload.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::m5checkpoint | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period ) |
Definition at line 357 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::exitSimLoop(), gem5::ThreadContext::getCpuPtr(), gem5::sim_clock::as_int::ns, gem5::SimObject::params(), and gem5::DistIface::readyToCkpt().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::m5exit | ( | ThreadContext * | tc, |
Tick | delay ) |
Definition at line 178 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::exitSimLoop(), gem5::sim_clock::as_int::ns, and gem5::DistIface::readyToExit().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::m5fail | ( | ThreadContext * | tc, |
Tick | delay, | ||
uint64_t | code ) |
Definition at line 198 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::exitSimLoop(), and gem5::sim_clock::as_int::ns.
Referenced by pseudoInstWork().
uint64_t gem5::pseudo_inst::m5sum | ( | ThreadContext * | tc, |
uint64_t | a, | ||
uint64_t | b, | ||
uint64_t | c, | ||
uint64_t | d, | ||
uint64_t | e, | ||
uint64_t | f ) |
Definition at line 189 of file pseudo_inst.cc.
References gem5::ArmISA::a, gem5::ArmISA::b, gem5::ArmISA::c, gem5::ArmISA::d, DPRINTF, gem5::ArmISA::e, and gem5::ArmISA::f.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::m5Syscall | ( | ThreadContext * | tc | ) |
|
inline |
Definition at line 80 of file pseudo_inst.hh.
References gem5::X86ISA::addr, and gem5::X86ISA::os.
bool gem5::pseudo_inst::pseudoInst | ( | ThreadContext * | tc, |
uint8_t | func ) |
Definition at line 268 of file pseudo_inst.hh.
References pseudoInstWork().
bool gem5::pseudo_inst::pseudoInst | ( | ThreadContext * | tc, |
uint8_t | func, | ||
uint64_t & | result ) |
Definition at line 261 of file pseudo_inst.hh.
References pseudoInstWork().
Referenced by gem5::ArmSemihosting::callGem5PseudoOp32(), gem5::ArmSemihosting::callGem5PseudoOp64(), gem5::ArmISA::MMU::finalizePhysical(), and gem5::X86ISA::TLB::finalizePhysical().
bool gem5::pseudo_inst::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 133 of file pseudo_inst.hh.
References addsymbol(), arm(), debugbreak(), DPRINTF, dumpresetstats(), dumpstats(), initParam(), gem5::invokeSimcall(), loadsymbol(), m5checkpoint(), m5exit(), m5fail(), m5sum(), panic, gem5::ThreadContext::pcState(), quiesce(), quiesceCycles(), quiesceNs(), quiesceTime(), readfile(), resetstats(), rpns(), switchcpu(), togglesync(), triggerWorkloadEvent(), wakeCPU(), warn, workbegin(), workend(), and writefile().
Referenced by pseudoInst(), and pseudoInst().
void gem5::pseudo_inst::quiesce | ( | ThreadContext * | tc | ) |
Definition at line 117 of file pseudo_inst.cc.
References DPRINTF, and gem5::ThreadContext::quiesce().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::quiesceCycles | ( | ThreadContext * | tc, |
uint64_t | cycles ) |
Definition at line 138 of file pseudo_inst.cc.
References gem5::Clocked::clockEdge(), DPRINTF, gem5::ThreadContext::getCpuPtr(), and gem5::ThreadContext::quiesceTick().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::quiesceNs | ( | ThreadContext * | tc, |
uint64_t | ns ) |
Definition at line 131 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::ArmISA::ns, gem5::sim_clock::as_int::ns, and gem5::ThreadContext::quiesceTick().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::quiesceSkip | ( | ThreadContext * | tc | ) |
Definition at line 124 of file pseudo_inst.cc.
References DPRINTF, gem5::ThreadContext::getCpuPtr(), gem5::Clocked::nextCycle(), and gem5::ThreadContext::quiesceTick().
uint64_t gem5::pseudo_inst::quiesceTime | ( | ThreadContext * | tc | ) |
Definition at line 145 of file pseudo_inst.cc.
References DPRINTF, gem5::sim_clock::as_int::ns, gem5::ThreadContext::readLastActivate(), and gem5::ThreadContext::readLastSuspend().
Referenced by pseudoInstWork().
uint64_t gem5::pseudo_inst::readfile | ( | ThreadContext * | tc, |
GuestAddr | vaddr, | ||
uint64_t | len, | ||
uint64_t | offset ) |
Definition at line 371 of file pseudo_inst.cc.
References DPRINTF, gem5::ArmISA::fd, gem5::FullSystem, gem5::ThreadContext::getSystemPtr(), gem5::ArmISA::len, gem5::ArmISA::offset, gem5::MipsISA::p, panic, gem5::SimObject::params(), gem5::MipsISA::vaddr, and gem5::PortProxy::writeBlob().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::resetstats | ( | ThreadContext * | tc, |
Tick | delay, | ||
Tick | period ) |
Definition at line 314 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, gem5::ThreadContext::getCpuPtr(), gem5::sim_clock::as_int::ns, gem5::SimObject::params(), and gem5::statistics::schedStatEvent().
Referenced by pseudoInstWork().
uint64_t gem5::pseudo_inst::rpns | ( | ThreadContext * | tc | ) |
Definition at line 154 of file pseudo_inst.cc.
References gem5::curTick(), DPRINTF, and gem5::sim_clock::as_int::ns.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::switchcpu | ( | ThreadContext * | tc | ) |
Definition at line 471 of file pseudo_inst.cc.
References DPRINTF, and gem5::exitSimLoop().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::togglesync | ( | ThreadContext * | tc | ) |
Definition at line 478 of file pseudo_inst.cc.
References DPRINTF, and gem5::DistIface::toggleSync().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::triggerWorkloadEvent | ( | ThreadContext * | tc | ) |
Definition at line 485 of file pseudo_inst.cc.
References DPRINTF, gem5::Workload::event(), gem5::ThreadContext::getSystemPtr(), and gem5::System::workload.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::wakeCPU | ( | ThreadContext * | tc, |
uint64_t | cpuid ) |
Definition at line 161 of file pseudo_inst.cc.
References gem5::ThreadContext::activate(), gem5::MipsISA::cpuid, DPRINTF, gem5::ThreadContext::getSystemPtr(), gem5::System::Threads::size(), gem5::ThreadContext::status(), gem5::ThreadContext::Suspended, gem5::System::threads, and warn.
Referenced by pseudoInstWork().
void gem5::pseudo_inst::workbegin | ( | ThreadContext * | tc, |
uint64_t | workid, | ||
uint64_t | threadid ) |
Definition at line 497 of file pseudo_inst.cc.
References gem5::BaseCPU::cpuId(), DPRINTF, gem5::exitSimLoop(), gem5::ThreadContext::getCpuPtr(), gem5::ThreadContext::getSystemPtr(), gem5::System::incWorkItemsBegin(), gem5::System::markWorkItem(), gem5::SimObject::params(), gem5::BaseCPU::workItemBegin(), and gem5::System::workItemBegin().
Referenced by pseudoInstWork().
void gem5::pseudo_inst::workend | ( | ThreadContext * | tc, |
uint64_t | workid, | ||
uint64_t | threadid ) |
Definition at line 560 of file pseudo_inst.cc.
References gem5::BaseCPU::cpuId(), DPRINTF, gem5::exitSimLoop(), gem5::ThreadContext::getCpuPtr(), gem5::ThreadContext::getSystemPtr(), gem5::System::incWorkItemsEnd(), gem5::System::markWorkItem(), gem5::SimObject::params(), gem5::BaseCPU::workItemEnd(), and gem5::System::workItemEnd().
Referenced by pseudoInstWork().
uint64_t gem5::pseudo_inst::writefile | ( | ThreadContext * | tc, |
GuestAddr | vaddr, | ||
uint64_t | len, | ||
uint64_t | offset, | ||
GuestAddr | filename_addr ) |
Definition at line 413 of file pseudo_inst.cc.
References gem5::pseudo_inst::GuestAddr::addr, gem5::OutputDirectory::close(), gem5::OutputDirectory::create(), DPRINTF, gem5::FullSystem, gem5::ArmISA::len, gem5::ArmISA::offset, gem5::OutputDirectory::open(), gem5::X86ISA::os, panic, gem5::PortProxy::readBlob(), gem5::PortProxy::readString(), gem5::simout, gem5::OutputStream::stream(), and gem5::MipsISA::vaddr.
Referenced by pseudoInstWork().