From b14ef7c9ab41ea824c3ccadb070ad95567cca84e Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 3 Jul 2011 08:53:46 +0000 Subject: Fix unassigned memory access handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory access handling. Fix them by always passing CPUState to the handlers. Reported-by: Hervé Poussineau Signed-off-by: Blue Swirl --- target-microblaze/op_helper.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'target-microblaze/op_helper.c') diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index 1a0a476..664ffe59 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -488,20 +488,14 @@ void helper_mmu_write(uint32_t rn, uint32_t v) mmu_write(env, rn, v); } -void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, - int is_asi, int size) +void cpu_unassigned_access(CPUState *env1, target_phys_addr_t addr, + int is_write, int is_exec, int is_asi, int size) { CPUState *saved_env; - if (!cpu_single_env) { - /* XXX: ??? */ - return; - } - - /* XXX: hack to restore env in all cases, even if not called from - generated code */ saved_env = env; - env = cpu_single_env; + env = env1; + qemu_log_mask(CPU_LOG_INT, "Unassigned " TARGET_FMT_plx " wr=%d exe=%d\n", addr, is_write, is_exec); if (!(env->sregs[SR_MSR] & MSR_EE)) { -- cgit v1.1