Root/
1 | #include <linux/kernel.h> |
2 | #include <linux/crash_dump.h> |
3 | #include <linux/init.h> |
4 | #include <linux/errno.h> |
5 | #include <linux/export.h> |
6 | |
7 | /* |
8 | * If we have booted due to a crash, max_pfn will be a very low value. We need |
9 | * to know the amount of memory that the previous kernel used. |
10 | */ |
11 | unsigned long saved_max_pfn; |
12 | |
13 | /* |
14 | * stores the physical address of elf header of crash image |
15 | * |
16 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by |
17 | * is_kdump_kernel() to determine if we are booting after a panic. Hence put |
18 | * it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. |
19 | */ |
20 | unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; |
21 | |
22 | /* |
23 | * stores the size of elf header of crash image |
24 | */ |
25 | unsigned long long elfcorehdr_size; |
26 | |
27 | /* |
28 | * elfcorehdr= specifies the location of elf core header stored by the crashed |
29 | * kernel. This option will be passed by kexec loader to the capture kernel. |
30 | * |
31 | * Syntax: elfcorehdr=[size[KMG]@]offset[KMG] |
32 | */ |
33 | static int __init setup_elfcorehdr(char *arg) |
34 | { |
35 | char *end; |
36 | if (!arg) |
37 | return -EINVAL; |
38 | elfcorehdr_addr = memparse(arg, &end); |
39 | if (*end == '@') { |
40 | elfcorehdr_size = elfcorehdr_addr; |
41 | elfcorehdr_addr = memparse(end + 1, &end); |
42 | } |
43 | return end > arg ? 0 : -EINVAL; |
44 | } |
45 | early_param("elfcorehdr", setup_elfcorehdr); |
46 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9