diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/platform/efi/efi.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index e4a86a677ce1..012b3f6a9bd6 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -445,24 +445,25 @@ static void __init do_add_efi_memmap(void) | |||
445 | 445 | ||
446 | int __init efi_memblock_x86_reserve_range(void) | 446 | int __init efi_memblock_x86_reserve_range(void) |
447 | { | 447 | { |
448 | struct efi_info *e = &boot_params.efi_info; | ||
448 | unsigned long pmap; | 449 | unsigned long pmap; |
449 | 450 | ||
450 | #ifdef CONFIG_X86_32 | 451 | #ifdef CONFIG_X86_32 |
451 | /* Can't handle data above 4GB at this time */ | 452 | /* Can't handle data above 4GB at this time */ |
452 | if (boot_params.efi_info.efi_memmap_hi) { | 453 | if (e->efi_memmap_hi) { |
453 | pr_err("Memory map is above 4GB, disabling EFI.\n"); | 454 | pr_err("Memory map is above 4GB, disabling EFI.\n"); |
454 | return -EINVAL; | 455 | return -EINVAL; |
455 | } | 456 | } |
456 | pmap = boot_params.efi_info.efi_memmap; | 457 | pmap = e->efi_memmap; |
457 | #else | 458 | #else |
458 | pmap = (boot_params.efi_info.efi_memmap | | 459 | pmap = (e->efi_memmap | ((__u64)e->efi_memmap_hi << 32)); |
459 | ((__u64)boot_params.efi_info.efi_memmap_hi<<32)); | ||
460 | #endif | 460 | #endif |
461 | memmap.phys_map = (void *)pmap; | 461 | memmap.phys_map = (void *)pmap; |
462 | memmap.nr_map = boot_params.efi_info.efi_memmap_size / | 462 | memmap.nr_map = e->efi_memmap_size / |
463 | boot_params.efi_info.efi_memdesc_size; | 463 | e->efi_memdesc_size; |
464 | memmap.desc_version = boot_params.efi_info.efi_memdesc_version; | 464 | memmap.desc_size = e->efi_memdesc_size; |
465 | memmap.desc_size = boot_params.efi_info.efi_memdesc_size; | 465 | memmap.desc_version = e->efi_memdesc_version; |
466 | |||
466 | memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); | 467 | memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); |
467 | 468 | ||
468 | return 0; | 469 | return 0; |