Commit aac04b32f3e4c63f461459d0e1d6aa01caac6e66
Committed by
Linus Torvalds
1 parent
69cda7b1f0
Exists in
master
and in
7 other branches
[PATCH] kdump: x86_64: add elfcorehdr command line option
- elfcorehdr= specifies the location of elf core header stored by the crashed kernel. This command line option will be passed by the kexec-tools to capture kernel. Changes in this version : - Added more comments in kernel-parameters.txt and in code. Signed-off-by: Murali M Chakravarthy <muralim@in.ibm.com> Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 3 changed files with 14 additions and 4 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
... | ... | @@ -475,10 +475,11 @@ |
475 | 475 | See Documentation/block/as-iosched.txt and |
476 | 476 | Documentation/block/deadline-iosched.txt for details. |
477 | 477 | |
478 | - elfcorehdr= [IA-32] | |
478 | + elfcorehdr= [IA-32, X86_64] | |
479 | 479 | Specifies physical address of start of kernel core |
480 | - image elf header. | |
481 | - See Documentation/kdump.txt for details. | |
480 | + image elf header. Generally kexec loader will | |
481 | + pass this option to capture kernel. | |
482 | + See Documentation/kdump/kdump.txt for details. | |
482 | 483 | |
483 | 484 | enforcing [SELINUX] Set initial enforcing status. |
484 | 485 | Format: {"0" | "1"} |
arch/i386/kernel/setup.c
arch/x86_64/kernel/setup.c
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | #include <asm/processor.h> |
36 | 36 | #include <linux/console.h> |
37 | 37 | #include <linux/seq_file.h> |
38 | +#include <linux/crash_dump.h> | |
38 | 39 | #include <linux/root_dev.h> |
39 | 40 | #include <linux/pci.h> |
40 | 41 | #include <linux/acpi.h> |
... | ... | @@ -418,6 +419,14 @@ |
418 | 419 | } |
419 | 420 | #endif |
420 | 421 | |
422 | +#ifdef CONFIG_PROC_VMCORE | |
423 | + /* elfcorehdr= specifies the location of elf core header | |
424 | + * stored by the crashed kernel. This option will be passed | |
425 | + * by kexec loader to the capture kernel. | |
426 | + */ | |
427 | + else if(!memcmp(from, "elfcorehdr=", 11)) | |
428 | + elfcorehdr_addr = memparse(from+11, &from); | |
429 | +#endif | |
421 | 430 | next_char: |
422 | 431 | c = *(from++); |
423 | 432 | if (!c) |