checksum-oostubs: another possible outcome (CLI+HLT)
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1055 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -19,7 +19,8 @@ message OOStuBSProtoMsg {
|
|||||||
enum ResultType {
|
enum ResultType {
|
||||||
FINISHED = 1;
|
FINISHED = 1;
|
||||||
TRAP = 2;
|
TRAP = 2;
|
||||||
UNKNOWN = 3;
|
HALT = 3;
|
||||||
|
UNKNOWN = 4;
|
||||||
}
|
}
|
||||||
optional ResultType resulttype = 6;
|
optional ResultType resulttype = 6;
|
||||||
|
|
||||||
|
|||||||
@ -195,6 +195,7 @@ bool ChecksumOOStuBSExperiment::run()
|
|||||||
// --- aftermath ---
|
// --- aftermath ---
|
||||||
// four possible outcomes:
|
// four possible outcomes:
|
||||||
// - guest causes a trap, "crashes"
|
// - guest causes a trap, "crashes"
|
||||||
|
// - guest reaches a "weird" state, stops with CLI+HLT ("panic")
|
||||||
// - guest runs OOSTUBS_NUMINSTR+OOSTUBS_RECOVERYINSTR instructions but
|
// - guest runs OOSTUBS_NUMINSTR+OOSTUBS_RECOVERYINSTR instructions but
|
||||||
// never reaches finish()
|
// never reaches finish()
|
||||||
// - guest reaches finish() within OOSTUBS_NUMINSTR+OOSTUBS_RECOVERYINSTR
|
// - guest reaches finish() within OOSTUBS_NUMINSTR+OOSTUBS_RECOVERYINSTR
|
||||||
@ -205,6 +206,9 @@ bool ChecksumOOStuBSExperiment::run()
|
|||||||
// catch traps as "extraordinary" ending
|
// catch traps as "extraordinary" ending
|
||||||
fi::TrapEvent ev_trap(fi::ANY_TRAP);
|
fi::TrapEvent ev_trap(fi::ANY_TRAP);
|
||||||
sal::simulator.addEvent(&ev_trap);
|
sal::simulator.addEvent(&ev_trap);
|
||||||
|
// OOStuBS' way to terminally halt (CLI+HLT)
|
||||||
|
fi::BPEvent ev_halt(OOSTUBS_FUNC_CPU_HALT);
|
||||||
|
sal::simulator.addEvent(&ev_halt);
|
||||||
// remaining instructions until "normal" ending
|
// remaining instructions until "normal" ending
|
||||||
fi::BPEvent ev_done(fi::ANY_ADDR);
|
fi::BPEvent ev_done(fi::ANY_ADDR);
|
||||||
ev_done.setCounter(OOSTUBS_NUMINSTR + OOSTUBS_RECOVERYINSTR - instr_offset);
|
ev_done.setCounter(OOSTUBS_NUMINSTR + OOSTUBS_RECOVERYINSTR - instr_offset);
|
||||||
@ -246,6 +250,9 @@ bool ChecksumOOStuBSExperiment::run()
|
|||||||
if (ev == &ev_done) {
|
if (ev == &ev_done) {
|
||||||
log << std::dec << "Result FINISHED" << endl;
|
log << std::dec << "Result FINISHED" << endl;
|
||||||
param.msg.set_resulttype(param.msg.FINISHED);
|
param.msg.set_resulttype(param.msg.FINISHED);
|
||||||
|
} else if (ev == &ev_halt) {
|
||||||
|
log << std::dec << "Result HALT #" << endl;
|
||||||
|
param.msg.set_resulttype(param.msg.HALT);
|
||||||
} else if (ev == &ev_trap) {
|
} else if (ev == &ev_trap) {
|
||||||
log << std::dec << "Result TRAP #" << ev_trap.getTriggerNumber() << endl;
|
log << std::dec << "Result TRAP #" << ev_trap.getTriggerNumber() << endl;
|
||||||
param.msg.set_resulttype(param.msg.TRAP);
|
param.msg.set_resulttype(param.msg.TRAP);
|
||||||
|
|||||||
@ -11,6 +11,9 @@
|
|||||||
// empty function that is called explicitly when the experiment finished
|
// empty function that is called explicitly when the experiment finished
|
||||||
// nm -C ecc.elf|fgrep "finished()"
|
// nm -C ecc.elf|fgrep "finished()"
|
||||||
#define OOSTUBS_FUNC_FINISH 0x001093f0
|
#define OOSTUBS_FUNC_FINISH 0x001093f0
|
||||||
|
// function executing HLT with no chance for further progress (after panic())
|
||||||
|
// nm -C ecc.elf|fgrep cpu_halt
|
||||||
|
#define OOSTUBS_FUNC_CPU_HALT 0x00100987
|
||||||
// number of instructions the target executes under non-error conditions from ENTRY to DONE:
|
// number of instructions the target executes under non-error conditions from ENTRY to DONE:
|
||||||
// (result of experiment's step #2)
|
// (result of experiment's step #2)
|
||||||
#define OOSTUBS_NUMINSTR 0x4a3401
|
#define OOSTUBS_NUMINSTR 0x4a3401
|
||||||
|
|||||||
Reference in New Issue
Block a user