~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to kernel/crash_dump.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#include <linux/crash_dump.h>
3
3
#include <linux/init.h>
4
4
#include <linux/errno.h>
5
 
#include <linux/module.h>
 
5
#include <linux/export.h>
6
6
 
7
7
/*
8
8
 * If we have booted due to a crash, max_pfn will be a very low value. We need
20
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
28
 * elfcorehdr= specifies the location of elf core header stored by the crashed
24
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
33
static int __init setup_elfcorehdr(char *arg)
27
34
{
29
36
        if (!arg)
30
37
                return -EINVAL;
31
38
        elfcorehdr_addr = memparse(arg, &end);
 
39
        if (*end == '@') {
 
40
                elfcorehdr_size = elfcorehdr_addr;
 
41
                elfcorehdr_addr = memparse(end + 1, &end);
 
42
        }
32
43
        return end > arg ? 0 : -EINVAL;
33
44
}
34
45
early_param("elfcorehdr", setup_elfcorehdr);