diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2010-09-16 15:40:27 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2010-09-16 15:40:27 +0200 |
commit | abdfd9500e07fab7d6ffd4385fa30a065c329a39 (patch) | |
tree | e2d5a8ee34076c3a1c32b2b2fd1bb126aef36e8e /target-cris | |
parent | 41557447d30eeb944e42069513df13585f5e6c7f (diff) |
cris: Avoid spurios hw_abort on recursive bus faults
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-cris')
-rw-r--r-- | target-cris/helper.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c index 053ed4ab2..83b25c14d 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -235,9 +235,15 @@ void do_interrupt(CPUState *env) /* Apply the CRIS CCS shift. Clears U if set. */ cris_shift_ccs(env); - /* Now that we are in kernel mode, load the handlers address. */ + /* Now that we are in kernel mode, load the handlers address. + This load may not fault, real hw leaves that behaviour as + undefined. */ env->pc = ldl_code(env->pregs[PR_EBP] + ex_vec * 4); + /* Clear the excption_index to avoid spurios hw_aborts for recursive + bus faults. */ + env->exception_index = -1; + D_LOG("%s isr=%x vec=%x ccs=%x pid=%d erp=%x\n", __func__, env->pc, ex_vec, env->pregs[PR_CCS], |