}
}
- format BasicOperate {
- 0x1e: decode PALMODE {
- 0: OpcdecFault::hw_rei();
- 1:hw_rei({{ xc->hwrei(); }}, IsSerializing, IsSerializeBefore);
+ 0x1e: decode PALMODE {
+ 0: OpcdecFault::hw_rei();
+ format BasicOperate {
+ 1: hw_rei({{ xc->hwrei(); }}, IsSerializing, IsSerializeBefore);
}
+ }
+
+#endif
+ format BasicOperate {
// M5 special opcodes use the reserved 0x01 opcode space
0x01: decode M5FUNC {
+#if FULL_SYSTEM
0x00: arm({{
PseudoInst::arm(xc->tcBase());
}}, IsNonSpeculative);
0x04: quiesceTime({{
R0 = PseudoInst::quiesceTime(xc->tcBase());
}}, IsNonSpeculative, IsUnverifiable);
+#endif
0x07: rpns({{
R0 = PseudoInst::rpns(xc->tcBase());
}}, IsNonSpeculative, IsUnverifiable);
0x21: m5exit({{
PseudoInst::m5exit(xc->tcBase(), R16);
}}, No_OpClass, IsNonSpeculative);
+#if FULL_SYSTEM
0x31: loadsymbol({{
PseudoInst::loadsymbol(xc->tcBase());
}}, No_OpClass, IsNonSpeculative);
0x30: initparam({{
Ra = xc->tcBase()->getCpuPtr()->system->init_param;
}});
+#endif
0x40: resetstats({{
PseudoInst::resetstats(xc->tcBase(), R16, R17);
}}, IsNonSpeculative);
0x43: m5checkpoint({{
PseudoInst::m5checkpoint(xc->tcBase(), R16, R17);
}}, IsNonSpeculative);
+#if FULL_SYSTEM
0x50: m5readfile({{
R0 = PseudoInst::readfile(xc->tcBase(), R16, R17, R18);
}}, IsNonSpeculative);
+#endif
0x51: m5break({{
PseudoInst::debugbreak(xc->tcBase());
}}, IsNonSpeculative);
0x52: m5switchcpu({{
PseudoInst::switchcpu(xc->tcBase());
}}, IsNonSpeculative);
+#if FULL_SYSTEM
0x53: m5addsymbol({{
PseudoInst::addsymbol(xc->tcBase(), R16, R17);
}}, IsNonSpeculative);
+#endif
0x54: m5panic({{
panic("M5 panic instruction called at pc=%#x.", xc->readPC());
}}, IsNonSpeculative);
}}, IsNonSpeculative);
}
}
-#endif
}
output exec {{
#include <math.h>
-#if FULL_SYSTEM
#include "sim/pseudo_inst.hh"
-#endif
#include "arch/alpha/ipr.hh"
#include "base/fenv.hh"
#include "config/ss_compatible_fp.hh"
checker = Param.BaseCPU("checker CPU")
+ do_checkpoint_insts = Param.Bool(True,
+ "enable checkpoint pseudo instructions")
+ do_statistics_insts = Param.Bool(True,
+ "enable statistics pseudo instructions")
+
if build_env['FULL_SYSTEM']:
profile = Param.Latency('0ns', "trace the kernel stack")
do_quiesce = Param.Bool(True, "enable quiesce instructions")
- do_checkpoint_insts = Param.Bool(True,
- "enable checkpoint pseudo instructions")
- do_statistics_insts = Param.Bool(True,
- "enable statistics pseudo instructions")
else:
workload = VectorParam.Process("processes to run")
Source('faults.cc')
Source('init.cc')
BinSource('main.cc')
+Source('pseudo_inst.cc')
Source('root.cc')
Source('serialize.cc')
Source('sim_events.cc')
if env['FULL_SYSTEM']:
Source('arguments.cc')
- Source('pseudo_inst.cc')
else:
Source('tlb.cc')
SimObject('Process.py')
#include "sim/stats.hh"
#include "sim/system.hh"
#include "sim/debug.hh"
+#if FULL_SYSTEM
#include "sim/vptr.hh"
+#endif
using namespace std;
namespace PseudoInst {
+#if FULL_SYSTEM
+
void
arm(ThreadContext *tc)
{
return (tc->readLastActivate() - tc->readLastSuspend()) / Clock::Int::ns;
}
+#endif
+
uint64_t
rpns(ThreadContext *tc)
{
mainEventQueue.schedule(event, when);
}
+#if FULL_SYSTEM
+
void
loadsymbol(ThreadContext *tc)
{
file.close();
}
+void
+addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
+{
+ char symb[100];
+ CopyStringOut(tc, symb, symbolAddr, 100);
+ std::string symbol(symb);
+
+ DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
+
+ tc->getSystemPtr()->kernelSymtab->insert(addr,symbol);
+}
+
+#endif
+
+
void
resetstats(ThreadContext *tc, Tick delay, Tick period)
{
Stats::StatEvent(true, false, when, repeat);
}
-void
-addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr)
-{
- char symb[100];
- CopyStringOut(tc, symb, symbolAddr, 100);
- std::string symbol(symb);
-
- DPRINTF(Loader, "Loaded symbol: %s @ %#llx\n", symbol, addr);
-
- tc->getSystemPtr()->kernelSymtab->insert(addr,symbol);
-}
-
void
dumpresetstats(ThreadContext *tc, Tick delay, Tick period)
{
mainEventQueue.schedule(event, when);
}
+#if FULL_SYSTEM
+
uint64_t
readfile(ThreadContext *tc, Addr vaddr, uint64_t len, uint64_t offset)
{
return result;
}
+#endif
+
void
debugbreak(ThreadContext *tc)
{
extern bool doCheckpointInsts;
extern bool doQuiesce;
+#if FULL_SYSTEM
void arm(ThreadContext *tc);
void quiesce(ThreadContext *tc);
void quiesceNs(ThreadContext *tc, uint64_t ns);
void quiesceCycles(ThreadContext *tc, uint64_t cycles);
uint64_t quiesceTime(ThreadContext *tc);
+uint64_t readfile(ThreadContext *tc, Addr vaddr, uint64_t len,
+ uint64_t offset);
+void loadsymbol(ThreadContext *xc);
+void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
+#endif
+
uint64_t rpns(ThreadContext *tc);
void m5exit(ThreadContext *tc, Tick delay);
-void loadsymbol(ThreadContext *xc);
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);
void debugbreak(ThreadContext *tc);
void switchcpu(ThreadContext *tc);
-void addsymbol(ThreadContext *tc, Addr addr, Addr symbolAddr);
-/* namespace PsuedoInst */ }
+/* namespace PseudoInst */ }