diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2009-10-08 12:07:11 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2009-10-08 12:07:11 +0200 |
commit | be9f2ded53e2e8f8471e48c523f0ed749f5c66c6 (patch) | |
tree | b4ddbb6d907586d23d9718227175bdf4cd8710aa /target-cris/helper.c | |
parent | 5c17ca2505197c56d0097c66a4e5bda4d6f32fb6 (diff) |
CRIS: Update PR_EDA on TLB faults.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-cris/helper.c')
-rw-r--r-- | target-cris/helper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c index c0e11d1aa7..a12ac10ee0 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" |