Go to the documentation of this file.
41 #ifndef __SIM_PSEUDO_INST_HH__
42 #define __SIM_PSEUDO_INST_HH__
44 #include <gem5/asm/generic/m5ops.h>
52 #include "debug/PseudoInst.hh"
86 uint64_t
d, uint64_t
e, uint64_t
f);
112 template <
typename ABI,
bool store_ret>
116 DPRINTF(PseudoInst,
"pseudo_inst::pseudoInst(%i)\n", func);
122 invokeSimcall<ABI>(tc,
arm);
126 invokeSimcall<ABI>(tc,
quiesce);
129 case M5OP_QUIESCE_NS:
133 case M5OP_QUIESCE_CYCLE:
137 case M5OP_QUIESCE_TIME:
138 result = invokeSimcall<ABI, store_ret>(tc,
quiesceTime);
142 result = invokeSimcall<ABI, store_ret>(tc,
rpns);
146 invokeSimcall<ABI>(tc,
wakeCPU);
150 invokeSimcall<ABI>(tc,
m5exit);
154 invokeSimcall<ABI>(tc,
m5fail);
159 result = invokeSimcall<ABI, store_ret>(tc,
m5sum);
162 case M5OP_INIT_PARAM:
163 result = invokeSimcall<ABI, store_ret>(tc,
initParam);
166 case M5OP_LOAD_SYMBOL:
170 case M5OP_RESET_STATS:
174 case M5OP_DUMP_STATS:
178 case M5OP_DUMP_RESET_STATS:
182 case M5OP_CHECKPOINT:
186 case M5OP_WRITE_FILE:
187 result = invokeSimcall<ABI, store_ret>(tc,
writefile);
191 result = invokeSimcall<ABI, store_ret>(tc,
readfile);
194 case M5OP_DEBUG_BREAK:
198 case M5OP_SWITCH_CPU:
202 case M5OP_ADD_SYMBOL:
207 panic(
"M5 panic instruction called at %s\n", tc->
pcState());
209 case M5OP_WORK_BEGIN:
214 invokeSimcall<ABI>(tc,
workend);
222 warn(
"Unimplemented m5 op (%#x)\n", func);
226 case M5OP_DIST_TOGGLE_SYNC:
235 warn(
"Unhandled m5 op: %#x\n", func);
240 template <
typename ABI,
bool store_ret=false>
244 return pseudoInstWork<ABI, store_ret>(tc, func, result);
247 template <
typename ABI,
bool store_ret=true>
252 return pseudoInstWork<ABI, store_ret>(tc, func, result);
258 #endif // __SIM_PSEUDO_INST_HH__
bool pseudoInst(ThreadContext *tc, uint8_t func, uint64_t &result)
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void quiesceNs(ThreadContext *tc, uint64_t ns)
uint64_t quiesceTime(ThreadContext *tc)
void debugbreak(ThreadContext *tc)
void switchcpu(ThreadContext *tc)
virtual const PCStateBase & pcState() const =0
void quiesce(ThreadContext *tc)
uint64_t rpns(ThreadContext *tc)
void triggerWorkloadEvent(ThreadContext *tc)
void m5Syscall(ThreadContext *tc)
void loadsymbol(ThreadContext *tc)
uint64_t writefile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset, Addr filename_addr)
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
uint64_t Tick
Tick count type.
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
static void decodeAddrOffset(Addr offset, uint8_t &func)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
void quiesceSkip(ThreadContext *tc)
void resetstats(ThreadContext *tc, Tick delay, Tick period)
void arm(ThreadContext *tc)
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
void m5exit(ThreadContext *tc, Tick delay)
bool pseudoInstWork(ThreadContext *tc, uint8_t func, uint64_t &result)
Execute a decoded M5 pseudo instruction.
uint64_t m5sum(ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
void togglesync(ThreadContext *tc)
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
#define panic(...)
This implements a cprintf based panic() function.
Generated on Thu Jun 16 2022 10:41:59 for gem5 by doxygen 1.8.17