mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
cpu: Turn cpu_unassigned_access() into a CPUState hook
Use it for all targets, but be careful not to pass invalid CPUState. cpu_single_env can be NULL, e.g. on Xen. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
ce927ed9e4
commit
c658b94f6e
16 changed files with 124 additions and 45 deletions
|
@ -2147,13 +2147,18 @@ void tlb_fill(CPUMIPSState *env, target_ulong addr, int is_write, int mmu_idx,
|
|||
}
|
||||
}
|
||||
|
||||
void cpu_unassigned_access(CPUMIPSState *env, hwaddr addr,
|
||||
int is_write, int is_exec, int unused, int size)
|
||||
void mips_cpu_unassigned_access(CPUState *cs, hwaddr addr,
|
||||
bool is_write, bool is_exec, int unused,
|
||||
unsigned size)
|
||||
{
|
||||
if (is_exec)
|
||||
MIPSCPU *cpu = MIPS_CPU(cs);
|
||||
CPUMIPSState *env = &cpu->env;
|
||||
|
||||
if (is_exec) {
|
||||
helper_raise_exception(env, EXCP_IBE);
|
||||
else
|
||||
} else {
|
||||
helper_raise_exception(env, EXCP_DBE);
|
||||
}
|
||||
}
|
||||
#endif /* !CONFIG_USER_ONLY */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue