diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2010-07-05 11:39:04 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2010-07-05 11:39:04 +0200 |
commit | 9f5a1fae7ee1a7c66462e5b8e9d21552d4dc5027 (patch) | |
tree | a4f19996d46a0fdeea5b9387bcf7df39332ca08a /target-cris/helper.c | |
parent | 3c4fe427edc88b04bd528351f5ce1c8a2e14f5f8 (diff) |
cris: Avoid debug clobbering for both I & D MMU state.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
Diffstat (limited to 'target-cris/helper.c')
-rw-r--r-- | target-cris/helper.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/target-cris/helper.c b/target-cris/helper.c index 19c3755816..053ed4ab2a 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -78,7 +78,7 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw, D(printf ("%s addr=%x pc=%x rw=%x\n", __func__, address, env->pc, rw)); miss = cris_mmu_translate(&res, env, address & TARGET_PAGE_MASK, - rw, mmu_idx); + rw, mmu_idx, 0); if (miss) { if (env->exception_index == EXCP_BUSFAULT) @@ -248,26 +248,15 @@ void do_interrupt(CPUState *env) target_phys_addr_t cpu_get_phys_page_debug(CPUState * env, target_ulong addr) { uint32_t phy = addr; - uint32_t r_cause, r_tlb_sel, rand_lfsr; struct cris_mmu_result res; int miss; - /* Save MMU state. */ - r_tlb_sel = env->sregs[SFR_RW_MM_TLB_SEL]; - r_cause = env->sregs[SFR_R_MM_CAUSE]; - rand_lfsr = env->mmu_rand_lfsr; - - miss = cris_mmu_translate(&res, env, addr, 0, 0); + miss = cris_mmu_translate(&res, env, addr, 0, 0, 1); /* If D TLB misses, try I TLB. */ if (miss) { - miss = cris_mmu_translate(&res, env, addr, 2, 0); + miss = cris_mmu_translate(&res, env, addr, 2, 0, 1); } - /* Restore MMU state. */ - env->sregs[SFR_RW_MM_TLB_SEL] = r_tlb_sel; - env->sregs[SFR_R_MM_CAUSE] = r_cause; - env->mmu_rand_lfsr = rand_lfsr; - if (!miss) phy = res.phy; D(fprintf(stderr, "%s %x -> %x\n", __func__, addr, phy)); |