summaryrefslogtreecommitdiff
path: root/kexec/arch
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch')
-rw-r--r--kexec/arch/ia64/kexec-elf-ia64.c5
-rw-r--r--kexec/arch/ia64/kexec-ia64.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/kexec/arch/ia64/kexec-elf-ia64.c b/kexec/arch/ia64/kexec-elf-ia64.c
index ca8e48e..48cc6a5 100644
--- a/kexec/arch/ia64/kexec-elf-ia64.c
+++ b/kexec/arch/ia64/kexec-elf-ia64.c
@@ -52,6 +52,7 @@
#define OPT_VMM (OPT_ARCH_MAX+3)
static const int probe_debug = 0;
+extern unsigned long saved_efi_memmap_size;
/*
* elf_ia64_probe - sanity check the elf image
@@ -236,8 +237,8 @@ int elf_ia64_load(int argc, char **argv, const char *buf, off_t len,
elf_rel_set_symbol(&info->rhdr, "__boot_param_base",
&boot_param_base, sizeof(long));
- // reserve 8k for efi_memmap
- efi_memmap_size = 1UL<<14;
+ // reserve efi_memmap of actual size allocated in production kernel
+ efi_memmap_size = saved_efi_memmap_size;
efi_memmap_buf = xmalloc(efi_memmap_size);
efi_memmap_base = add_buffer(info, efi_memmap_buf,
efi_memmap_size, efi_memmap_size, 4096, 0,
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;