summaryrefslogtreecommitdiff
path: root/kexec/arch/ia64/kexec-ia64.c
diff options
context:
space:
mode:
authorJay Lan <jlan@sgi.com>2007-01-31 17:54:22 -0800
committerSimon Horman <horms@verge.net.au>2007-02-01 11:40:55 +0900
commitacd0bdeab5b2932a48165efbf79a21e111e950ae (patch)
treecd2f6f060ae629c7b1bbcac18c50ad7c78755e27 /kexec/arch/ia64/kexec-ia64.c
parent4b94de0aaa7b0fb911a7513f90e5b928799c7c2a (diff)
IA64 kexec-tools: efi_memmap overflow on large systems
This patch fixes a efi_memmap overflow problem on large system. Currently the kexec allocates statically 16k buffer to contain efi_memmap. It can hold about 333 entries. It causes data corruption on large system. This patch would let kexec allocate the efi_memmap at run time using the actual size allocated in the production kernel. Signed-off-by: Jay Lan <jlan@sgi.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/arch/ia64/kexec-ia64.c')
-rw-r--r--kexec/arch/ia64/kexec-ia64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kexec/arch/ia64/kexec-ia64.c b/kexec/arch/ia64/kexec-ia64.c
index 506d37d..8969fc5 100644
--- a/kexec/arch/ia64/kexec-ia64.c
+++ b/kexec/arch/ia64/kexec-ia64.c
@@ -38,6 +38,7 @@
static struct memory_range memory_range[MAX_MEMORY_RANGES];
static int memory_ranges;
+unsigned long saved_efi_memmap_size;
/* Reserve range for EFI memmap and Boot parameter */
static int split_range(int range, unsigned long start, unsigned long end)
@@ -124,6 +125,7 @@ int get_memory_ranges(struct memory_range **range, int *ranges,
continue;
} else if (memcmp(str, "EFI Memory Map\n", 14) == 0) {
memory_ranges = split_range(memory_ranges, start, end);
+ saved_efi_memmap_size = end - start;
continue;
} else
continue;