a p4 memory/cpu config
arch/alpha/alpha_memory.cc:
Added code to fault on an unaligned access
arch/alpha/isa_desc:
arch/alpha/pseudo_inst.cc:
arch/alpha/pseudo_inst.hh:
Added m5debug break and m5switchcpu (the latter doesn't work)
--HG--
extra : convert_revision :
409e73adb151600a4fea49f35bf6f503f66fa916
AlphaISA::mode_type mode =
(AlphaISA::mode_type)DTB_CM_CM(ipr[AlphaISA::IPR_DTB_CM]);
+
+ /* @todo this should actually be in there but for whatever reason
+ * Its not working at present.
+ */
+ if (req->vaddr & (req->size - 1)) {
+ return Alignment_Fault;
+ }
+
if (PC_PAL(pc)) {
mode = (req->flags & ALTMODE) ?
(AlphaISA::mode_type)ALT_MODE_AM(ipr[AlphaISA::IPR_ALT_MODE])
format BasicOperate {
0xc000: rpcc({{
#ifdef FULL_SYSTEM
- Ra = xc->readIpr(AlphaISA::IPR_CC, fault);
+ /* Rb is a fake dependency so here is a fun way to get
+ * the parser to understand that.
+ */
+ Ra = xc->readIpr(AlphaISA::IPR_CC, fault) + (Rb & 0);
+
#else
Ra = curTick;
#endif
0x50: m5readfile({{
AlphaPseudo::readfile(xc->xcBase());
}}, IsNonSpeculative);
+ 0x51: m5break({{
+ AlphaPseudo::debugbreak(xc->xcBase());
+ }}, IsNonSpeculative);
+ 0x52: m5switchcpu({{
+ AlphaPseudo::switchcpu(xc->xcBase());
+ }}, IsNonSpeculative);
+
}
}
#include "arch/alpha/pseudo_inst.hh"
#include "arch/alpha/vtophys.hh"
#include "cpu/base_cpu.hh"
+#include "cpu/sampling_cpu/sampling_cpu.hh"
#include "cpu/exec_context.hh"
#include "sim/param.hh"
#include "sim/serialize.hh"
#include "sim/stat_control.hh"
#include "sim/stats.hh"
#include "sim/system.hh"
+#include "sim/debug.hh"
using namespace std;
+
+extern SamplingCPU *SampCPU;
+
using namespace Stats;
namespace AlphaPseudo
doStatisticsInsts = __statistics;
doCheckpointInsts = __checkpoint;
}
+
+ void debugbreak(ExecContext *xc)
+ {
+ debug_break();
+ }
+
+ void switchcpu(ExecContext *xc)
+ {
+ if (SampCPU)
+ SampCPU->switchCPUs();
+ }
}
void dumpresetstats(ExecContext *xc);
void m5checkpoint(ExecContext *xc);
void readfile(ExecContext *xc);
+ void debugbreak(ExecContext *xc);
+ void switchcpu(ExecContext *xc);
}