diff options
author | WANG Chao <chaowang@redhat.com> | 2014-04-22 10:56:44 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2014-04-23 09:11:03 +0900 |
commit | adf854f76a2cd50f4c8db0142ac8d61a4107ff34 (patch) | |
tree | e4ba1650844a07d202976bd6680c8001f24887b1 | |
parent | 20bb34da880331c4967424e8694dd399a61dbf29 (diff) | |
download | kexec-tools-adf854f76a2cd50f4c8db0142ac8d61a4107ff34.tar.gz |
x86, cleanup: Store crash memory ranges kexec_info
Add two new members to kexec_info structure:
struct memory_range *crash_range
int nr_crash_ranges;
crash_range contains the memory ranges used to boot 2nd kernel.
nr_crash_ranges contains the count of the crash memory ranges.
Signed-off-by: WANG Chao <chaowang@redhat.com>
Acked-by: Dave Young <dyoung@redhat.com>
Tested-by: Linn Crosetto <linn@hp.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 6 | ||||
-rw-r--r-- | kexec/kexec.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index 39c35ea..7b618a6 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -997,6 +997,12 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline, add_memmap(memmap_p, &nr_memmap, start, size, type); cmdline_add_memmap_acpi(mod_cmdline, start, end); } + + /* Store 2nd kernel boot memory ranges for later reference in + * x86-setup-linux.c: setup_linux_system_parameters() */ + info->crash_range = memmap_p; + info->nr_crash_ranges = nr_memmap; + return 0; } diff --git a/kexec/kexec.h b/kexec/kexec.h index d69bba2..22d4a42 100644 --- a/kexec/kexec.h +++ b/kexec/kexec.h @@ -148,6 +148,8 @@ struct kexec_info { int nr_segments; struct memory_range *memory_range; int memory_ranges; + struct memory_range *crash_range; + int nr_crash_ranges; void *entry; struct mem_ehdr rhdr; unsigned long backup_start; |