mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
CRIS: Update PR_EDA on TLB faults.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
parent
5c17ca2505
commit
be9f2ded53
2 changed files with 5 additions and 7 deletions
|
@ -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"
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue