summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Chao <chaowang@redhat.com>2014-04-22 10:56:41 +0800
committerSimon Horman <horms@verge.net.au>2014-04-23 09:11:03 +0900
commit44c1f9ede814889f4921b400571219188619d6f6 (patch)
tree43c621ea24ee44322c2425f3ab175e106ecc7818
parent6091da331c1ebc03dae14e0eaf0d1534fac821e1 (diff)
downloadkexec-tools-44c1f9ede814889f4921b400571219188619d6f6.tar.gz
x86, cleanup: add other types of memory range for 2nd kernel boot to memmap_p
In load_crashdump_segments(), memmap_p[] is used to contain RANGE_RAM memory range for booting 2nd kernel. Now adding types of RANGE_ACPI and RANGE_ACPI_NVS to memmap_p, so later we can pass all the types of memory range to 2nd kernel. These all types of memory ranges are all stored in memmap_p for later reference. 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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index 6dd2e65..f97d79a 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -1006,12 +1006,15 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
/* Inform second kernel about the presence of ACPI tables. */
for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) {
- unsigned long start, end;
+ unsigned long start, end, size, type;
if ( !( mem_range[i].type == RANGE_ACPI
|| mem_range[i].type == RANGE_ACPI_NVS) )
continue;
start = mem_range[i].start;
end = mem_range[i].end;
+ type = mem_range[i].type;
+ size = end - start + 1;
+ add_memmap(memmap_p, &nr_memmap, start, size, type);
cmdline_add_memmap_acpi(mod_cmdline, start, end);
}
return 0;