mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
PPC: E500: Add ESR bit definitions
The BookE spec specifies a number of ESR bits. Add defines for them so we can use them later on. Reported-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
parent
710ffe6048
commit
542df9bfb7
2 changed files with 18 additions and 3 deletions
|
@ -1837,7 +1837,7 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
|
|||
env->exception_index = POWERPC_EXCP_DTLB;
|
||||
env->error_code = 0;
|
||||
env->spr[SPR_BOOKE_DEAR] = address;
|
||||
env->spr[SPR_BOOKE_ESR] = rw ? 1 << ESR_ST : 0;
|
||||
env->spr[SPR_BOOKE_ESR] = rw ? ESR_ST : 0;
|
||||
return -1;
|
||||
case POWERPC_MMU_REAL:
|
||||
cpu_abort(env, "PowerPC in real mode should never raise "
|
||||
|
@ -1861,7 +1861,7 @@ int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
|
|||
} else if ((env->mmu_model == POWERPC_MMU_BOOKE) ||
|
||||
(env->mmu_model == POWERPC_MMU_BOOKE206)) {
|
||||
env->spr[SPR_BOOKE_DEAR] = address;
|
||||
env->spr[SPR_BOOKE_ESR] = rw ? 1 << ESR_ST : 0;
|
||||
env->spr[SPR_BOOKE_ESR] = rw ? ESR_ST : 0;
|
||||
} else {
|
||||
env->spr[SPR_DAR] = address;
|
||||
if (rw == 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue