diff options
Diffstat (limited to 'target-cris')
-rw-r--r-- | target-cris/helper.c | 8 | ||||
-rw-r--r-- | target-cris/translate.c | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c index c0e11d1..a12ac10 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -82,8 +82,8 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, target_ulong phy; D(printf ("%s addr=%x pc=%x rw=%x\n", __func__, address, env->pc, rw)); - address &= TARGET_PAGE_MASK; - miss = cris_mmu_translate(&res, env, address, rw, mmu_idx); + miss = cris_mmu_translate(&res, env, address & TARGET_PAGE_MASK, + rw, mmu_idx); if (miss) { if (env->exception_index == EXCP_BUSFAULT) @@ -92,6 +92,7 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, "addr=%x rw=%d\n", address, rw); + env->pregs[PR_EDA] = address; env->exception_index = EXCP_BUSFAULT; env->fault_vector = res.bf_vec; r = 1; @@ -104,7 +105,8 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, */ phy = res.phy & ~0x80000000; prot = res.prot; - r = tlb_set_page(env, address, phy, prot, mmu_idx, is_softmmu); + r = tlb_set_page(env, address & TARGET_PAGE_MASK, + phy, prot, mmu_idx, is_softmmu); } if (r > 0) D_LOG("%s returns %d irqreq=%x addr=%x" diff --git a/target-cris/translate.c b/target-cris/translate.c index c6068f7..a18d69c 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -197,10 +197,6 @@ static inline void t_gen_mov_TN_preg(TCGv tn, int r) tcg_gen_mov_tl(tn, tcg_const_tl(0)); else if (r == PR_VR) tcg_gen_mov_tl(tn, tcg_const_tl(32)); - else if (r == PR_EDA) { - printf("read from EDA!\n"); - tcg_gen_mov_tl(tn, cpu_PR[r]); - } else tcg_gen_mov_tl(tn, cpu_PR[r]); } |