0001
0002 #include <linux/kernel.h>
0003 #include <linux/crash_dump.h>
0004 #include <linux/init.h>
0005 #include <linux/errno.h>
0006 #include <linux/export.h>
0007
0008
0009
0010
0011
0012
0013
0014
0015 unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
0016 EXPORT_SYMBOL_GPL(elfcorehdr_addr);
0017
0018
0019
0020
0021 unsigned long long elfcorehdr_size;
0022
0023
0024
0025
0026
0027
0028
0029 static int __init setup_elfcorehdr(char *arg)
0030 {
0031 char *end;
0032 if (!arg)
0033 return -EINVAL;
0034 elfcorehdr_addr = memparse(arg, &end);
0035 if (*end == '@') {
0036 elfcorehdr_size = elfcorehdr_addr;
0037 elfcorehdr_addr = memparse(end + 1, &end);
0038 }
0039 return end > arg ? 0 : -EINVAL;
0040 }
0041 early_param("elfcorehdr", setup_elfcorehdr);