ecos_kernel_test: record error detected/corrected
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1882 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -117,7 +117,7 @@ bool EcosKernelTestExperiment::establishState() {
|
||||
simulator.addListenerAndResume(&bp);
|
||||
log << "test function entry reached, saving state" << endl;
|
||||
log << "EIP = " << hex << bp.getTriggerInstructionPointer() << endl;
|
||||
//log << "error_corrected = " << dec << ((int)simulator.getMemoryManager().getByte(OOSTUBS_ERROR_CORRECTED)) << endl;
|
||||
//log << "error_corrected = " << dec << ((int)simulator.getMemoryManager().getByte(ECC_ERROR_CORRECTED)) << endl;
|
||||
simulator.save(statename);
|
||||
assert(bp.getTriggerInstructionPointer() == ECOS_FUNC_ENTRY);
|
||||
assert(simulator.getRegisterManager().getInstructionPointer() == ECOS_FUNC_ENTRY);
|
||||
@ -382,6 +382,10 @@ bool EcosKernelTestExperiment::faultInjection() {
|
||||
BPSingleListener func_test_output(ECOS_FUNC_TEST_OUTPUT);
|
||||
simulator.addListener(&func_test_output);
|
||||
|
||||
// function called by ecc aspects, when an uncorrectable error is detected
|
||||
BPSingleListener func_ecc_panic(ECC_FUNC_PANIC);
|
||||
simulator.addListener(&func_ecc_panic);
|
||||
|
||||
#if LOCAL && 0
|
||||
// XXX debug
|
||||
log << "enabling tracing" << endl;
|
||||
@ -434,7 +438,7 @@ bool EcosKernelTestExperiment::faultInjection() {
|
||||
result->set_latest_ip(simulator.getRegisterManager().getInstructionPointer());
|
||||
|
||||
// record error_corrected regardless of result
|
||||
int32_t error_corrected = simulator.getMemoryManager().getByte(ECOS_ERROR_CORRECTED);
|
||||
int32_t error_corrected = simulator.getMemoryManager().getByte(ECC_ERROR_CORRECTED);
|
||||
result->set_error_corrected(error_corrected);
|
||||
|
||||
// record ecos_test_result
|
||||
@ -466,6 +470,9 @@ bool EcosKernelTestExperiment::faultInjection() {
|
||||
stringstream ss;
|
||||
ss << ev_trap.getTriggerNumber();
|
||||
result->set_details(ss.str());
|
||||
} else if (ev == &func_ecc_panic) {
|
||||
log << "ECC Panic: uncorrectable error" << endl;
|
||||
result->set_resulttype(result->DETECTED); // DETECTED <=> ECC_PANIC <=> reboot
|
||||
} else {
|
||||
log << "Result WTF?" << endl;
|
||||
result->set_resulttype(result->UNKNOWN);
|
||||
|
||||
@ -23,7 +23,9 @@ cat <<EOF
|
||||
// cyg_test_output address
|
||||
#define ECOS_FUNC_TEST_OUTPUT 0x`addrof $1 cyg_test_output`
|
||||
// the variable that's increased if ECC corrects an error:
|
||||
#define ECOS_ERROR_CORRECTED 0x`addrof $1 errors_corrected`
|
||||
#define ECC_ERROR_CORRECTED 0x`addrof $1 errors_corrected`
|
||||
// the function that is called when an uncorrectable error occurs
|
||||
#define ECC_FUNC_PANIC 0x`addrof $1 ecc_panic`
|
||||
|
||||
// text begin:
|
||||
// nm -C $(basename $1)|fgrep _stext
|
||||
|
||||
Reference in New Issue
Block a user