ARM: 6122/1: kdump: add support for elfcorehdr parameter
This parameter is used by primary kernel to pass address of vmcore header to the dump capture kernel. Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
67742c8168
commit
cea0bb1bc5
1 changed files with 25 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <linux/screen_info.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kexec.h>
|
||||
#include <linux/crash_dump.h>
|
||||
#include <linux/root_dev.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
@ -730,6 +731,30 @@ static void __init reserve_crashkernel(void)
|
|||
static inline void reserve_crashkernel(void) {}
|
||||
#endif /* CONFIG_KEXEC */
|
||||
|
||||
/*
|
||||
* Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
|
||||
* is_kdump_kernel() to determine if we are booting after a panic. Hence
|
||||
* ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
/*
|
||||
* elfcorehdr= specifies the location of elf core header stored by the crashed
|
||||
* kernel. This option will be passed by kexec loader to the capture kernel.
|
||||
*/
|
||||
static int __init setup_elfcorehdr(char *arg)
|
||||
{
|
||||
char *end;
|
||||
|
||||
if (!arg)
|
||||
return -EINVAL;
|
||||
|
||||
elfcorehdr_addr = memparse(arg, &end);
|
||||
return end > arg ? 0 : -EINVAL;
|
||||
}
|
||||
early_param("elfcorehdr", setup_elfcorehdr);
|
||||
#endif /* CONFIG_CRASH_DUMP */
|
||||
|
||||
void __init setup_arch(char **cmdline_p)
|
||||
{
|
||||
struct tag *tags = (struct tag *)&init_tags;
|
||||
|
|
Loading…
Reference in a new issue