41 #ifndef __KERN_LINUX_EVENTS_HH__ 42 #define __KERN_LINUX_EVENTS_HH__ 48 #include "debug/DebugPrintf.hh" 58 template <
typename Base>
68 std::function<int(ThreadContext *, Addr, PrintkVarArgs)> func =
71 return printk(str, tc, format_ptr, args);
73 invokeSimcall<typename Base::ABI>(tc, func);
95 const std::string &_fname) :
96 PCEvent(s, desc, addr), fname(_fname)
116 const std::string &_fname) :
117 PCEvent(s, desc, addr), fname(_fname)
130 template <
typename Base>
151 uint64_t mult, uint64_t div) :
152 Base(s, desc, addr), argDivToNs(div), argMultToNs(mult)
158 onUDelay(tc, argDivToNs, argMultToNs);
165 #endif // __KERN_LINUX_EVENTS_HH__ void process(ThreadContext *tc) override
uint64_t argMultToNs
Value to multiple arg by to create ns.
Dump the guest kernel's dmesg buffer to a file in gem5's output directory and panic.
int printk(std::string &str, ThreadContext *tc, Addr format_ptr, PrintkVarArgs args)
ThreadContext is the external interface to all thread state for anything outside of the CPU...
void onUDelay(ThreadContext *tc, uint64_t div, uint64_t mul)
DmesgDump(PCEventScope *s, const std::string &desc, Addr addr, const std::string &_fname)
uint64_t argDivToNs
Value to divide arg by to create ns.
A class to skip udelay() and related calls in the kernel.
void process(ThreadContext *tc) override
SkipUDelay(PCEventScope *s, const std::string &desc, Addr addr, uint64_t mult, uint64_t div)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
GuestABI::VarArgs< Addr, int32_t, uint32_t, int64_t, uint64_t > PrintkVarArgs
KernelPanic(PCEventScope *s, const std::string &desc, Addr addr, const std::string &_fname)
Dump the guest kernel's dmesg buffer to a file in gem5's output directory and print a warning...