diff options
Diffstat (limited to 'kernel/crash_dump.c')
| -rw-r--r-- | kernel/crash_dump.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/crash_dump.c b/kernel/crash_dump.c index 5f85690285d4..69ebf3380bac 100644 --- a/kernel/crash_dump.c +++ b/kernel/crash_dump.c | |||
| @@ -20,8 +20,15 @@ unsigned long saved_max_pfn; | |||
| 20 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; | 20 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; |
| 21 | 21 | ||
| 22 | /* | 22 | /* |
| 23 | * stores the size of elf header of crash image | ||
| 24 | */ | ||
| 25 | unsigned long long elfcorehdr_size; | ||
| 26 | |||
| 27 | /* | ||
| 23 | * elfcorehdr= specifies the location of elf core header stored by the crashed | 28 | * elfcorehdr= specifies the location of elf core header stored by the crashed |
| 24 | * kernel. This option will be passed by kexec loader to the capture kernel. | 29 | * kernel. This option will be passed by kexec loader to the capture kernel. |
| 30 | * | ||
| 31 | * Syntax: elfcorehdr=[size[KMG]@]offset[KMG] | ||
| 25 | */ | 32 | */ |
| 26 | static int __init setup_elfcorehdr(char *arg) | 33 | static int __init setup_elfcorehdr(char *arg) |
| 27 | { | 34 | { |
| @@ -29,6 +36,10 @@ static int __init setup_elfcorehdr(char *arg) | |||
| 29 | if (!arg) | 36 | if (!arg) |
| 30 | return -EINVAL; | 37 | return -EINVAL; |
| 31 | elfcorehdr_addr = memparse(arg, &end); | 38 | elfcorehdr_addr = memparse(arg, &end); |
| 39 | if (*end == '@') { | ||
| 40 | elfcorehdr_size = elfcorehdr_addr; | ||
| 41 | elfcorehdr_addr = memparse(end + 1, &end); | ||
| 42 | } | ||
| 32 | return end > arg ? 0 : -EINVAL; | 43 | return end > arg ? 0 : -EINVAL; |
| 33 | } | 44 | } |
| 34 | early_param("elfcorehdr", setup_elfcorehdr); | 45 | early_param("elfcorehdr", setup_elfcorehdr); |
