summaryrefslogtreecommitdiffstats
path: root/kernel/crash_dump.c
blob: b64e238b553b9430361127b223d2a003b70b1c99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <linux/kernel.h>
#include <linux/crash_dump.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/export.h>

/*
 * If we have booted due to a crash, max_pfn will be a very low value. We need
 * to know the amount of memory that the previous kernel used.
 */
unsigned long saved_max_pfn;

/*
 * stores the physical address of elf header of crash image
 *
 * 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 put
 * it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
 */
unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
EXPORT_SYMBOL_GPL(elfcorehdr_addr);

/*
 * stores the size of elf header of crash image
 */
unsigned long long elfcorehdr_size;

/*
 * 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.
 *
 * Syntax: elfcorehdr=[size[KMG]@]offset[KMG]
 */
static int __init setup_elfcorehdr(char *arg)
{
	char *end;
	if (!arg)
		return -EINVAL;
	elfcorehdr_addr = memparse(arg, &end);
	if (*end == '@') {
		elfcorehdr_size = elfcorehdr_addr;
		elfcorehdr_addr = memparse(end + 1, &end);
	}
	return end > arg ? 0 : -EINVAL;
}
early_param("elfcorehdr", setup_elfcorehdr);
el-qcow2-linux.git/commit/?id=158c776dba1f6b5eb2e3d5327cda719dc4820c1c'>iw_cxgb4: pass the ord/ird in connect reply eventsHariprasad S2015-10-211-0/+4 * iw_cxgb4: detect fatal errors while creating listening filtersHariprasad S2015-10-211-0/+4 * IB/core: avoid 32-bit warningArnd Bergmann2015-10-211-1/+1 * RDMA/cxgb4: re-fix 32-bit build warningArnd Bergmann2015-10-211-1/+1 * ib_pack.h: Fix commentary IBA reference for CNP in IB opcode enumHal Rosenstock2015-10-211-1/+1 * IB/iser: fix a comment typoGeliang Tang2015-10-211-1/+1 * usnic: correctly handle kzalloc return valueInsu Yun2015-10-211-4/+4 * MAINTAINERS: update usnic maintainer contactsDave Goodell \(dgoodell\)2015-10-211-2/+3 * usnic: correctly check failed allocationInsu Yun2015-10-211-5/+4Star * Merge branch 'k.o/for-4.3-v1' into k.o/for-4.4Doug Ledford2015-10-2148-274/+596 |\ | * IB/cm: Fix rb-tree duplicate free and use-after-freeDoron Tsur2015-10-211-1/+9 | * IB/cma: Use inner P_Key to determine netdevHaggai Eran2015-10-201-2/+2 | * IB/ucma: check workqueue allocation before usageSasha Levin2015-10-201-1/+6 | * IB/cma: Potential NULL dereference in cma_id_from_eventHaggai Eran2015-10-201-1/+1 | * IB/core: Fix use after free of ifaMatan Barak2015-10-201-8/+27 | * IB/core: Fix memory corruption in ib_cache_gid_set_default_gidDoron Tsur2015-10-151-1/+1 | * IB/ipoib: For sendonly join free the multicast group on leaveChristoph Lameter2015-10-133-2/+5 | * IB/cma: Accept connection without a valid netdev on RoCEHaggai Eran2015-10-061-14/+40 | * xprtrdma: Don't require LOCAL_DMA_LKEY support for fastregSagi Grimberg2015-10-061-5/+3Star | * usnic: add missing clauses to BSD licenseJeff Squyres2015-10-0625-73/+433 | * IB/ipoib: increase the max mcast backlog queueDoug Ledford2015-09-261-1/+1 | * IB/ipoib: Make sendonly multicast joins create the mcast groupDoug Ledford2015-09-251-10/+12 | * IB/ipoib: Expire sendonly multicast joinsChristoph Lameter2015-09-253-2/+22 | * IB/mlx5: Remove pa_lkey usagesSagi Grimberg2015-09-253-62/+1Star | * IB/mlx5: Remove support for IB_DEVICE_LOCAL_DMA_LKEYSagi Grimberg2015-09-254-43/+1Star | * IB/iser: Add module parameter for always register memorySagi Grimberg2015-09-254-14/+31 | * xprtrdma: Replace global lkey with lkey local to PDChuck Lever2015-09-255-35/+2Star | * Merge tag 'v4.3-rc2' into k.o/for-4.3-v1Doug Ledford2015-09-25