Kexec on mips64

Matthew Fleming mdf356 at gmail.com
Tue Feb 18 20:41:09 EST 2014


I've been working on kexec into a kdump kernel on mips64 for work.
Since kexec isn't supported by Cavium on the 2.3 SDK, I'm a bit on my
own.  Based on patches from Cavium, I can get the system to crash and
boot into the kdump kernel, and come up to a shell on the console.
However, gdb on /proc/vmcore basically doesn't work for me.

One issue is that x/w on various kernel addresses doesn't work.  I
traced it to what looks like a bug in the kexec binary when it sets up
the elf notes.  The below patch seems to fix the issue, but I wonder
why this has not been seen by others.

I'm still using the kexec-tools-2.0.4 sources, but the is no
difference between 2.0.4 and 2.0.5 in this file.  2.0.5 threw an error
when trying to load the kernel and I haven't had time to debug that
yet, so I've been proceeding with 2.0.4.

Thanks,
matthew



diff -r -U8 --show-c-func
/tmp/kexec-tools-2.0.4/kexec/arch/mips/crashdump-mips.h
/home/sciadmin/workspace/ws_mdf_kdump/target/cavium/SDK/2.3/linux/embedded_rootfs/build/kexec-tools-2.0.4/kexec/arch/mips/crashdump-mips.h
--- /tmp/kexec-tools-2.0.4/kexec/arch/mips/crashdump-mips.h 2011-10-02
15:56:38.000000000 -0700
+++ /home/sciadmin/workspace/ws_mdf_kdump/target/cavium/SDK/2.3/linux/embedded_rootfs/build/kexec-tools-2.0.4/kexec/arch/mips/crashdump-mips.h
2014-02-18 17:00:27.848982998 -0800
@@ -1,23 +1,23 @@
 #ifndef CRASHDUMP_MIPS_H
 #define CRASHDUMP_MIPS_H

 struct kexec_info;
 int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
  unsigned long max_addr, unsigned long min_base);
 #ifdef __mips64
 #define PAGE_OFFSET 0xa800000000000000ULL
+#define MAXMEM 0
 #else
 #define PAGE_OFFSET 0x80000000
+#define MAXMEM 0x80000000
 #endif
 #define __pa(x) ((unsigned long)(X) & 0x7fffffff)

-#define MAXMEM 0x80000000
-
 #define CRASH_MAX_MEMMAP_NR (KEXEC_MAX_SEGMENTS + 1)
 #define CRASH_MAX_MEMORY_RANGES (MAX_MEMORY_RANGES + 2)

 #define COMMAND_LINE_SIZE 512

 /* Backup Region, First 1M of System RAM. */
 #define BACKUP_SRC_START 0x00000000
 #define BACKUP_SRC_END 0x000fffff



More information about the kexec mailing list