Skip to content

Commit 8c6fadd

Browse files
author
AKASHI Takahiro
committed
arm64: kdump: add VMCOREINFO's for user-space tools
In addition to common VMCOREINFO's defined in crash_save_vmcoreinfo_init(), we need to know, for crash utility, - kimage_voffset - PHYS_OFFSET to examine the contents of a dump file (/proc/vmcore) correctly due to the introduction of KASLR (CONFIG_RANDOMIZE_BASE) in v4.6. - VA_BITS is also required for makedumpfile command. arch_crash_save_vmcoreinfo() appends them to the dump file. More VMCOREINFO's may be added later. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: James Morse <james.morse@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent ce45ba1 commit 8c6fadd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

arch/arm64/kernel/machine_kexec.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <asm/cacheflush.h>
2020
#include <asm/cpu_ops.h>
21+
#include <asm/memory.h>
2122
#include <asm/mmu.h>
2223
#include <asm/mmu_context.h>
2324
#include <asm/page.h>
@@ -351,3 +352,13 @@ void crash_free_reserved_phys_range(unsigned long begin, unsigned long end)
351352
}
352353
}
353354
#endif /* CONFIG_HIBERNATION */
355+
356+
void arch_crash_save_vmcoreinfo(void)
357+
{
358+
VMCOREINFO_NUMBER(VA_BITS);
359+
/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
360+
vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
361+
kimage_voffset);
362+
vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",
363+
PHYS_OFFSET);
364+
}

0 commit comments

Comments
 (0)