diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
-rw-r--r-- | arch/i386/kernel/setup.c | 8 | ||||
-rw-r--r-- | include/linux/crash_dump.h | 1 | ||||
-rw-r--r-- | kernel/crash_dump.c | 3 |
4 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 560ff5ae3fd9..f44bb5567c5b 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -451,6 +451,10 @@ running once the system is up. | |||
451 | Format: {"as"|"cfq"|"deadline"|"noop"} | 451 | Format: {"as"|"cfq"|"deadline"|"noop"} |
452 | See Documentation/block/as-iosched.txt | 452 | See Documentation/block/as-iosched.txt |
453 | and Documentation/block/deadline-iosched.txt for details. | 453 | and Documentation/block/deadline-iosched.txt for details. |
454 | elfcorehdr= [IA-32] | ||
455 | Specifies physical address of start of kernel core image | ||
456 | elf header. | ||
457 | See Documentation/kdump.txt for details. | ||
454 | 458 | ||
455 | enforcing [SELINUX] Set initial enforcing status. | 459 | enforcing [SELINUX] Set initial enforcing status. |
456 | Format: {"0" | "1"} | 460 | Format: {"0" | "1"} |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 8d58a053e12e..7306353c520e 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/edd.h> | 44 | #include <linux/edd.h> |
45 | #include <linux/nodemask.h> | 45 | #include <linux/nodemask.h> |
46 | #include <linux/kexec.h> | 46 | #include <linux/kexec.h> |
47 | #include <linux/crash_dump.h> | ||
47 | 48 | ||
48 | #include <video/edid.h> | 49 | #include <video/edid.h> |
49 | 50 | ||
@@ -881,6 +882,13 @@ static void __init parse_cmdline_early (char ** cmdline_p) | |||
881 | } | 882 | } |
882 | } | 883 | } |
883 | #endif | 884 | #endif |
885 | #ifdef CONFIG_CRASH_DUMP | ||
886 | /* elfcorehdr= specifies the location of elf core header | ||
887 | * stored by the crashed kernel. | ||
888 | */ | ||
889 | else if (!memcmp(from, "elfcorehdr=", 11)) | ||
890 | elfcorehdr_addr = memparse(from+11, &from); | ||
891 | #endif | ||
884 | 892 | ||
885 | /* | 893 | /* |
886 | * highmem=size forces highmem to be exactly 'size' bytes. | 894 | * highmem=size forces highmem to be exactly 'size' bytes. |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 7d983b817429..3f25fd1eaa4b 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/device.h> | 7 | #include <linux/device.h> |
8 | #include <linux/proc_fs.h> | 8 | #include <linux/proc_fs.h> |
9 | 9 | ||
10 | extern unsigned long long elfcorehdr_addr; | ||
10 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, | 11 | extern ssize_t copy_oldmem_page(unsigned long, char *, size_t, |
11 | unsigned long, int); | 12 | unsigned long, int); |
12 | #endif /* CONFIG_CRASH_DUMP */ | 13 | #endif /* CONFIG_CRASH_DUMP */ |
diff --git a/kernel/crash_dump.c b/kernel/crash_dump.c index 5a1e6d5d203e..10b966c3744c 100644 --- a/kernel/crash_dump.c +++ b/kernel/crash_dump.c | |||
@@ -15,6 +15,9 @@ | |||
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
17 | 17 | ||
18 | /* Stores the physical address of elf header of crash image. */ | ||
19 | unsigned long long elfcorehdr_addr; | ||
20 | |||
18 | /* | 21 | /* |
19 | * Copy a page from "oldmem". For this page, there is no pte mapped | 22 | * Copy a page from "oldmem". For this page, there is no pte mapped |
20 | * in the current kernel. We stitch up a pte, similar to kmap_atomic. | 23 | * in the current kernel. We stitch up a pte, similar to kmap_atomic. |