diff options
author | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-06 08:04:40 +0000 |
---|---|---|
committer | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-06 08:04:40 +0000 |
commit | ef29a70d18c2d551cf4bb74b8aa9638caac3391b (patch) | |
tree | 5f96cc802caeeb4c3c62d107b4b3e55b4af3d9e0 /target-cris/helper.c | |
parent | 4586f9e9a1c2b4d7856b640f7f327589dbfe2423 (diff) |
CRIS MMU Updates
* Add support for exec faults and for the k protection bit.
* Abort if search_pc causes recursive mmu faults.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4349 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-cris/helper.c')
-rw-r--r-- | target-cris/helper.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c index 1bd35e61c0..f537361c96 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -79,6 +79,12 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, miss = cris_mmu_translate(&res, env, address, rw, mmu_idx); if (miss) { + if (env->exception_index == EXCP_MMU_FAULT) + cpu_abort(env, + "CRIS: Illegal recursive bus fault." + "addr=%x rw=%d\n", + address, rw); + env->exception_index = EXCP_MMU_FAULT; env->fault_vector = res.bf_vec; r = 1; @@ -101,7 +107,7 @@ void do_interrupt(CPUState *env) { int ex_vec = -1; - D(fprintf (stderr, "exception index=%d interrupt_req=%d\n", + D(fprintf (logfile, "exception index=%d interrupt_req=%d\n", env->exception_index, env->interrupt_request)); @@ -133,8 +139,9 @@ void do_interrupt(CPUState *env) } if ((env->pregs[PR_CCS] & U_FLAG)) { - D(fprintf(logfile, "excp isr=%x PC=%x ERP=%x pid=%x ccs=%x cc=%d %x\n", + D(fprintf(logfile, "excp isr=%x PC=%x SP=%x ERP=%x pid=%x ccs=%x cc=%d %x\n", ex_vec, env->pc, + env->regs[R_SP], env->pregs[PR_ERP], env->pregs[PR_PID], env->pregs[PR_CCS], env->cc_op, env->cc_mask)); |