* [Qemu-devel] [PATCH] sparc32: better unassigned memory debug message
@ 2007-12-28 17:14 Robert Reif
0 siblings, 0 replies; only message in thread
From: Robert Reif @ 2007-12-28 17:14 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 127 bytes --]
Pass the asi number in is_asi. This works because asi 0 is not a valid asi.
Print out the type of access (read, write, exec).
[-- Attachment #2: op_helper.c.diff.txt --]
[-- Type: text/plain, Size: 1943 bytes --]
diff -p -u -r1.61 op_helper.c
--- target-sparc/op_helper.c 10 Dec 2007 19:58:20 -0000 1.61
+++ target-sparc/op_helper.c 28 Dec 2007 17:07:49 -0000
@@ -416,7 +416,7 @@ void helper_ld_asi(int asi, int size, in
break;
case 0x21 ... 0x2d: /* MMU passthrough, unassigned */
default:
- do_unassigned_access(T0, 0, 0, 1);
+ do_unassigned_access(T0, 0, 0, asi);
ret = 0;
break;
}
@@ -717,7 +717,7 @@ void helper_st_asi(int asi, int size)
case 9: /* Supervisor code access, XXX */
case 0x21 ... 0x2d: /* MMU passthrough, unassigned */
default:
- do_unassigned_access(T0, 1, 0, 1);
+ do_unassigned_access(T0, 1, 0, asi);
return;
}
}
@@ -1832,6 +1832,17 @@ void do_unassigned_access(target_phys_ad
generated code */
saved_env = env;
env = cpu_single_env;
+#ifdef DEBUG_UNASSIGNED
+ if (is_asi)
+ printf("Unassigned mem %s access to " TARGET_FMT_plx " asi 0x%02x from "
+ TARGET_FMT_lx "\n",
+ is_exec ? "exec" : is_write ? "write" : "read", addr, is_asi,
+ env->pc);
+ else
+ printf("Unassigned mem %s access to " TARGET_FMT_plx " from "
+ TARGET_FMT_lx "\n",
+ is_exec ? "exec" : is_write ? "write" : "read", addr, env->pc);
+#endif
if (env->mmuregs[3]) /* Fault status register */
env->mmuregs[3] = 1; /* overflow (not read before another fault) */
if (is_asi)
@@ -1845,10 +1856,6 @@ void do_unassigned_access(target_phys_ad
env->mmuregs[3] |= (5 << 2) | 2;
env->mmuregs[4] = addr; /* Fault address register */
if ((env->mmuregs[0] & MMU_E) && !(env->mmuregs[0] & MMU_NF)) {
-#ifdef DEBUG_UNASSIGNED
- printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx
- "\n", addr, env->pc);
-#endif
if (is_exec)
raise_exception(TT_CODE_ACCESS);
else
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-28 17:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-28 17:14 [Qemu-devel] [PATCH] sparc32: better unassigned memory debug message Robert Reif
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).