diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2017-05-17 14:51:46 +0900 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2017-05-22 13:35:48 +0200 |
commit | 0bd5219da953639276cd17e067c030ac97feca97 (patch) | |
tree | ba51819cbe51275e167cffb92530a316ef0b778b /kexec/arch/arm64/kexec-elf-arm64.c | |
parent | c0672c93edcb5bb32800f8d48afa05861ef32a79 (diff) |
arm64: kdump: add elf core header segment
Elf core header contains the information necessary for the coredump of
the 1st kernel, including its physcal memory layout as well as cpu register
states at the panic.
The segment is allocated inside the reserved memory of crash dump kernel.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Tested-by: David Woodhouse <dwmw@amazon.co.uk>
Tested-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/arm64/kexec-elf-arm64.c')
-rw-r--r-- | kexec/arch/arm64/kexec-elf-arm64.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c index 2b6c127..900c693 100644 --- a/kexec/arch/arm64/kexec-elf-arm64.c +++ b/kexec/arch/arm64/kexec-elf-arm64.c @@ -119,6 +119,16 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf, dbgprintf("%s: PE format: %s\n", __func__, (arm64_header_check_pe_sig(header) ? "yes" : "no")); + /* create and initialize elf core header segment */ + if (info->kexec_flags & KEXEC_ON_CRASH) { + result = load_crashdump_segments(info); + if (result) { + dbgprintf("%s: Creating eflcorehdr failed.\n", + __func__); + goto exit; + } + } + /* load the kernel */ result = elf_exec_load(&ehdr, info); @@ -127,6 +137,7 @@ int elf_arm64_load(int argc, char **argv, const char *kernel_buf, goto exit; } + /* load additional data */ result = arm64_load_other_segments(info, kernel_segment + arm64_mem.text_offset); |