summaryrefslogtreecommitdiff
path: root/kexec/crashdump.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2007-03-16 10:10:24 +0000
committerSimon Horman <horms@verge.net.au>2007-03-19 13:38:50 +0900
commitcdbc9b011fe43407908632d842e3a39e495e48d9 (patch)
tree99ab9065d606c17bfb838c9155c1a03694f929cc /kexec/crashdump.c
parentefac1da616a211517a4b0eaae098db6ade3bdd26 (diff)
Set crash dump ELF header e_machine field based on underlying hypervisor architecture.
This is necessary when running Xen with a 64 bit hypervisor and 32 bit domain 0 since the CPU crash notes will be 64 bit. Detecting the hypervisor archiecture requires libxenctrl and therefore this support is optional and disabled by default. Signed-off-by: Ian Campbell <ian.campbell@xensource.com> Acked-by: Magnus Damm <magnus@valinux.co.jp> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/crashdump.c')
-rw-r--r--kexec/crashdump.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kexec/crashdump.c b/kexec/crashdump.c
index f6fd911..1c08606 100644
--- a/kexec/crashdump.c
+++ b/kexec/crashdump.c
@@ -51,6 +51,14 @@
#undef EHDR
#undef FUNC
+unsigned long crash_architecture(struct crash_elf_info *elf_info)
+{
+ if (xen_present())
+ return xen_architecture(elf_info);
+ else
+ return elf_info->machine;
+}
+
/* Returns the physical address of start of crash notes buffer for a cpu. */
int get_crash_notes_per_cpu(int cpu, uint64_t *addr, uint64_t *len)
{