summaryrefslogtreecommitdiffstats
path: root/target/ppc/translate_init.c
diff options
context:
space:
mode:
authorMike Nawrocki2017-02-28 14:32:17 +0100
committerDavid Gibson2017-03-01 01:53:58 +0100
commit356bb70ed1a8a741413d55e3dbc5ccd02c53d794 (patch)
tree3ef9551d918f35cdb0f09d8f04fbf68c728b635a /target/ppc/translate_init.c
parentppc/xics: rename 'ICPState *' variables to 'icp' (diff)
downloadqemu-356bb70ed1a8a741413d55e3dbc5ccd02c53d794.tar.gz
qemu-356bb70ed1a8a741413d55e3dbc5ccd02c53d794.tar.xz
qemu-356bb70ed1a8a741413d55e3dbc5ccd02c53d794.zip
Add PowerPC 32-bit guest memory dump support
This patch extends support for the `dump-guest-memory` command to the 32-bit PowerPC architecture. It relies on the assumption that a 64-bit guest will not dump a 32-bit core file (and vice versa). [dwg: I suspect this patch won't cover all cases, in particular a 32-bit machine type on a 64-bit qemu build. However, it does strictly more than what we had before, so might as well apply as a starting point] Signed-off-by: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target/ppc/translate_init.c')
-rw-r--r--target/ppc/translate_init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
index 4dd1e36a55..37f74be984 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -10497,11 +10497,12 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data)
#else
cc->get_phys_page_debug = ppc_cpu_get_phys_page_debug;
cc->vmsd = &vmstate_ppc_cpu;
-#if defined(TARGET_PPC64)
- cc->write_elf64_note = ppc64_cpu_write_elf64_note;
-#endif
#endif
cc->cpu_exec_enter = ppc_cpu_exec_enter;
+#if defined(CONFIG_SOFTMMU)
+ cc->write_elf64_note = ppc64_cpu_write_elf64_note;
+ cc->write_elf32_note = ppc32_cpu_write_elf32_note;
+#endif
cc->gdb_num_core_regs = 71;