summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Daney <david.daney@cavium.com>2017-10-12 14:02:28 -0700
committerSimon Horman <horms@verge.net.au>2017-10-16 09:01:28 +0200
commit508c7d45e270bfda0a68fd349070af873f0984bc (patch)
tree7863c7ae7a00924f5246dc5c1427b307e6e026ae
parent552bfbfc00eeaef773e8746867b44cd162c9a0dd (diff)
kexec-tools: mips: Try to include bss in kernel vmcore file.
The kernel message buffers, as well as a lot of other useful data reside in the bss section. Without this vmcore-dmesg cannot work, and debugging with a core dump is much more difficult. Try to add the /proc/iomem "Kernel bss" section to vmcore. If it is not found, just do what we used to do and use "Kernel data" instead. Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/mips/crashdump-mips.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/mips/crashdump-mips.c b/kexec/arch/mips/crashdump-mips.c
index 22fc38e..9ab041a 100644
--- a/kexec/arch/mips/crashdump-mips.c
+++ b/kexec/arch/mips/crashdump-mips.c
@@ -74,7 +74,10 @@ static int get_kernel_vaddr_and_size(struct crash_elf_info *elf_info,
elf_info->kern_vaddr_start = elf_info->kern_paddr_start |
start_offset;
- if (parse_iomem_single("Kernel data\n", NULL, &end) == 0) {
+ /* If "Kernel bss" exists, the kernel ends there, else fall
+ * through and say that it ends at "Kernel data" */
+ if (parse_iomem_single("Kernel bss\n", NULL, &end) == 0 ||
+ parse_iomem_single("Kernel data\n", NULL, &end) == 0) {
elf_info->kern_size = end - elf_info->kern_paddr_start;
dbgprintf("kernel_vaddr= 0x%llx paddr %llx\n",
elf_info->kern_vaddr_start,