41#ifndef __SIM_PSEUDO_INST_HH__
42#define __SIM_PSEUDO_INST_HH__
44#include <gem5/asm/generic/m5ops.h>
52#include "debug/PseudoInst.hh"
95 uint64_t
offset, GuestAddr filenameAddr);
104 uint64_t
d, uint64_t
e, uint64_t
f);
131template <
typename ABI,
bool store_ret>
135 DPRINTF(PseudoInst,
"pseudo_inst::pseudoInst(%i)\n", func);
148 case M5OP_QUIESCE_NS:
152 case M5OP_QUIESCE_CYCLE:
156 case M5OP_QUIESCE_TIME:
181 case M5OP_INIT_PARAM:
185 case M5OP_LOAD_SYMBOL:
189 case M5OP_RESET_STATS:
193 case M5OP_DUMP_STATS:
197 case M5OP_DUMP_RESET_STATS:
201 case M5OP_CHECKPOINT:
205 case M5OP_WRITE_FILE:
213 case M5OP_DEBUG_BREAK:
217 case M5OP_SWITCH_CPU:
221 case M5OP_ADD_SYMBOL:
226 panic(
"M5 panic instruction called at %s\n", tc->
pcState());
228 case M5OP_WORK_BEGIN:
241 warn(
"Unimplemented m5 op (%#x)\n", func);
245 case M5OP_DIST_TOGGLE_SYNC:
254 warn(
"Unhandled m5 op: %#x\n", func);
259template <
typename ABI,
bool store_ret=false>
266template <
typename ABI,
bool store_ret=true>
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
ThreadContext is the external interface to all thread state for anything outside of the CPU.
virtual const PCStateBase & pcState() const =0
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
#define panic(...)
This implements a cprintf based panic() function.
static void decodeAddrOffset(Addr offset, uint8_t &func)
uint64_t m5sum(ThreadContext *tc, uint64_t a, uint64_t b, uint64_t c, uint64_t d, uint64_t e, uint64_t f)
uint64_t rpns(ThreadContext *tc)
void loadsymbol(ThreadContext *tc)
void quiesceCycles(ThreadContext *tc, uint64_t cycles)
void m5Syscall(ThreadContext *tc)
void arm(ThreadContext *tc)
void debugbreak(ThreadContext *tc)
void m5fail(ThreadContext *tc, Tick delay, uint64_t code)
void quiesce(ThreadContext *tc)
void quiesceNs(ThreadContext *tc, uint64_t ns)
void m5exit(ThreadContext *tc, Tick delay)
bool pseudoInst(ThreadContext *tc, uint8_t func, uint64_t &result)
void quiesceSkip(ThreadContext *tc)
void togglesync(ThreadContext *tc)
std::ostream & operator<<(std::ostream &os, const GuestAddr addr)
uint64_t writefile(ThreadContext *tc, GuestAddr vaddr, uint64_t len, uint64_t offset, GuestAddr filename_addr)
void resetstats(ThreadContext *tc, Tick delay, Tick period)
void workend(ThreadContext *tc, uint64_t workid, uint64_t threadid)
uint64_t initParam(ThreadContext *tc, uint64_t key_str1, uint64_t key_str2)
bool pseudoInstWork(ThreadContext *tc, uint8_t func, uint64_t &result)
Execute a decoded M5 pseudo instruction.
void triggerWorkloadEvent(ThreadContext *tc)
void addsymbol(ThreadContext *tc, GuestAddr addr, GuestAddr symbolAddr)
uint64_t quiesceTime(ThreadContext *tc)
void wakeCPU(ThreadContext *tc, uint64_t cpuid)
uint64_t readfile(ThreadContext *tc, GuestAddr vaddr, uint64_t len, uint64_t offset)
void m5checkpoint(ThreadContext *tc, Tick delay, Tick period)
void workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid)
void switchcpu(ThreadContext *tc)
void dumpstats(ThreadContext *tc, Tick delay, Tick period)
void dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
Ret invokeSimcall(ThreadContext *tc, std::function< Ret(ThreadContext *, Args...)> target)
This struct wrapper for Addr enables m5ops for systems with 32 bit pointer, since it allows to distin...
GuestAddr(Addr _addr)
Constructor is necessary to cast from uint64_t to GuestAddr.