aboutsummaryrefslogtreecommitdiffstats
path: root/target/m68k/monitor.c
diff options
context:
space:
mode:
authorTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2023-10-10 11:40:56 +0000
committerTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2023-10-10 11:40:56 +0000
commite02cda008591317b1625707ff8e115a4841aa889 (patch)
treeaee302e3cf8b59ec2d32ec481be3d1afddfc8968 /target/m68k/monitor.c
parentcc668e6b7e0ffd8c9d130513d12053cf5eda1d3b (diff)
Introduce Virtio-loopback epsilon release:
Epsilon release introduces a new compatibility layer which make virtio-loopback design to work with QEMU and rust-vmm vhost-user backend without require any changes. Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> Change-Id: I52e57563e08a7d0bdc002f8e928ee61ba0c53dd9
Diffstat (limited to 'target/m68k/monitor.c')
-rw-r--r--target/m68k/monitor.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/target/m68k/monitor.c b/target/m68k/monitor.c
new file mode 100644
index 000000000..2bdf6acae
--- /dev/null
+++ b/target/m68k/monitor.c
@@ -0,0 +1,62 @@
+/*
+ * QEMU monitor for m68k
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "monitor/hmp-target.h"
+#include "monitor/monitor.h"
+
+void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+{
+ CPUArchState *env1 = mon_get_cpu_env(mon);
+
+ if (!env1) {
+ monitor_printf(mon, "No CPU available\n");
+ return;
+ }
+
+ dump_mmu(env1);
+}
+
+static const MonitorDef monitor_defs[] = {
+ { "d0", offsetof(CPUM68KState, dregs[0]) },
+ { "d1", offsetof(CPUM68KState, dregs[1]) },
+ { "d2", offsetof(CPUM68KState, dregs[2]) },
+ { "d3", offsetof(CPUM68KState, dregs[3]) },
+ { "d4", offsetof(CPUM68KState, dregs[4]) },
+ { "d5", offsetof(CPUM68KState, dregs[5]) },
+ { "d6", offsetof(CPUM68KState, dregs[6]) },
+ { "d7", offsetof(CPUM68KState, dregs[7]) },
+ { "a0", offsetof(CPUM68KState, aregs[0]) },
+ { "a1", offsetof(CPUM68KState, aregs[1]) },
+ { "a2", offsetof(CPUM68KState, aregs[2]) },
+ { "a3", offsetof(CPUM68KState, aregs[3]) },
+ { "a4", offsetof(CPUM68KState, aregs[4]) },
+ { "a5", offsetof(CPUM68KState, aregs[5]) },
+ { "a6", offsetof(CPUM68KState, aregs[6]) },
+ { "a7", offsetof(CPUM68KState, aregs[7]) },
+ { "pc", offsetof(CPUM68KState, pc) },
+ { "sr", offsetof(CPUM68KState, sr) },
+ { "ssp", offsetof(CPUM68KState, sp[0]) },
+ { "usp", offsetof(CPUM68KState, sp[1]) },
+ { "isp", offsetof(CPUM68KState, sp[2]) },
+ { "sfc", offsetof(CPUM68KState, sfc) },
+ { "dfc", offsetof(CPUM68KState, dfc) },
+ { "urp", offsetof(CPUM68KState, mmu.urp) },
+ { "srp", offsetof(CPUM68KState, mmu.srp) },
+ { "dttr0", offsetof(CPUM68KState, mmu.ttr[M68K_DTTR0]) },
+ { "dttr1", offsetof(CPUM68KState, mmu.ttr[M68K_DTTR1]) },
+ { "ittr0", offsetof(CPUM68KState, mmu.ttr[M68K_ITTR0]) },
+ { "ittr1", offsetof(CPUM68KState, mmu.ttr[M68K_ITTR1]) },
+ { "mmusr", offsetof(CPUM68KState, mmu.mmusr) },
+ { NULL },
+};
+
+const MonitorDef *target_monitor_defs(void)
+{
+ return monitor_defs;
+}