diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2005-11-17 19:05:01 +0530 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2006-07-27 10:31:52 -0600 |
commit | 8be19e1a35aff9290ed142fae38a53243176309e (patch) | |
tree | 8e46d3eba211a051882ea93783a4af33d0c21d9a | |
parent | cd18217445dac97c298a9db43ad188ff14d63784 (diff) |
kexec-tools: x86_64 read proc iomem
o Add support for kexec tools for x86_64 to read the /proc/iomem to
get the Crash Kernel memory.
Signed-off-by: Murali <muralim@in.ibm.com>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
-rw-r--r-- | kexec/arch/x86_64/kexec-x86_64.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kexec/arch/x86_64/kexec-x86_64.c b/kexec/arch/x86_64/kexec-x86_64.c index 6bf1c5b..5c3349f 100644 --- a/kexec/arch/x86_64/kexec-x86_64.c +++ b/kexec/arch/x86_64/kexec-x86_64.c @@ -80,6 +80,20 @@ int get_memory_ranges(struct memory_range **range, int *ranges, else if (memcmp(str, "ACPI Non-volatile Storage\n", 26) == 0) { type = RANGE_ACPI_NVS; } + else if (memcmp(str, "Crash kernel\n", 13) == 0) { + /* Redefine the memory region boundaries if kernel + * exports the limits and if it is panic kernel. + * Override user values only if kernel exported + * values are subset of user defined values. + */ + if (kexec_flags & KEXEC_ON_CRASH) { + if (start > mem_min) + mem_min = start; + if (end < mem_max) + mem_max = end; + } + continue; + } else { continue; } |