mirror of https://github.com/xemu-project/xemu.git
target/hppa: Handle alignment faults in hppa_get_physical_address
In Chapter 5, Interruptions, the group 3 exceptions lists "Unaligned data reference trap" has higher priority than "Data memory break trap". Reviewed-by: Helge Deller <deller@gmx.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d73d4a5d78
commit
5d29587b45
|
@ -221,7 +221,7 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
|
||||||
goto egress;
|
goto egress_align;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find a valid tlb entry that matches the virtual address. */
|
/* Find a valid tlb entry that matches the virtual address. */
|
||||||
|
@ -323,6 +323,11 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
egress_align:
|
||||||
|
if (addr & ((1u << memop_alignment_bits(mop)) - 1)) {
|
||||||
|
ret = EXCP_UNALIGN;
|
||||||
|
}
|
||||||
|
|
||||||
egress:
|
egress:
|
||||||
*pphys = phys;
|
*pphys = phys;
|
||||||
*pprot = prot;
|
*pprot = prot;
|
||||||
|
|
Loading…
Reference in New Issue