aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/Kconfig1
-rw-r--r--arch/x86/platform/efi/efi.c19
2 files changed, 11 insertions, 9 deletions
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index e725ea01569e..d393f841ff5a 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -110,6 +110,7 @@ config DMI
110 110
111config EFI 111config EFI
112 bool 112 bool
113 select UCS2_STRING
113 default y 114 default y
114 115
115config SCHED_OMIT_FRAME_POINTER 116config SCHED_OMIT_FRAME_POINTER
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index b55d174e5034..6b85db0a7ccc 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -453,24 +453,25 @@ static void __init do_add_efi_memmap(void)
453 453
454int __init efi_memblock_x86_reserve_range(void) 454int __init efi_memblock_x86_reserve_range(void)
455{ 455{
456 struct efi_info *e = &boot_params.efi_info;
456 unsigned long pmap; 457 unsigned long pmap;
457 458
458#ifdef CONFIG_X86_32 459#ifdef CONFIG_X86_32
459 /* Can't handle data above 4GB at this time */ 460 /* Can't handle data above 4GB at this time */
460 if (boot_params.efi_info.efi_memmap_hi) { 461 if (e->efi_memmap_hi) {
461 pr_err("Memory map is above 4GB, disabling EFI.\n"); 462 pr_err("Memory map is above 4GB, disabling EFI.\n");
462 return -EINVAL; 463 return -EINVAL;
463 } 464 }
464 pmap = boot_params.efi_info.efi_memmap; 465 pmap = e->efi_memmap;
465#else 466#else
466 pmap = (boot_params.efi_info.efi_memmap | 467 pmap = (e->efi_memmap | ((__u64)e->efi_memmap_hi << 32));
467 ((__u64)boot_params.efi_info.efi_memmap_hi<<32));
468#endif 468#endif
469 memmap.phys_map = (void *)pmap; 469 memmap.phys_map = (void *)pmap;
470 memmap.nr_map = boot_params.efi_info.efi_memmap_size / 470 memmap.nr_map = e->efi_memmap_size /
471 boot_params.efi_info.efi_memdesc_size; 471 e->efi_memdesc_size;
472 memmap.desc_version = boot_params.efi_info.efi_memdesc_version; 472 memmap.desc_size = e->efi_memdesc_size;
473 memmap.desc_size = boot_params.efi_info.efi_memdesc_size; 473 memmap.desc_version = e->efi_memdesc_version;
474
474 memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); 475 memblock_reserve(pmap, memmap.nr_map * memmap.desc_size);
475 476
476 return 0; 477 return 0;