diff options
-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 e075e474245b..430cd784a0de 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c | |||
@@ -350,24 +350,25 @@ static void __init do_add_efi_memmap(void) | |||
350 | 350 | ||
351 | int __init efi_memblock_x86_reserve_range(void) | 351 | int __init efi_memblock_x86_reserve_range(void) |
352 | { | 352 | { |
353 | struct efi_info *e = &boot_params.efi_info; | ||
353 | unsigned long pmap; | 354 | unsigned long pmap; |
354 | 355 | ||
355 | #ifdef CONFIG_X86_32 | 356 | #ifdef CONFIG_X86_32 |
356 | /* Can't handle data above 4GB at this time */ | 357 | /* Can't handle data above 4GB at this time */ |
357 | if (boot_params.efi_info.efi_memmap_hi) { | 358 | if (e->efi_memmap_hi) { |
358 | pr_err("Memory map is above 4GB, disabling EFI.\n"); | 359 | pr_err("Memory map is above 4GB, disabling EFI.\n"); |
359 | return -EINVAL; | 360 | return -EINVAL; |
360 | } | 361 | } |
361 | pmap = boot_params.efi_info.efi_memmap; | 362 | pmap = e->efi_memmap; |
362 | #else | 363 | #else |
363 | pmap = (boot_params.efi_info.efi_memmap | | 364 | pmap = (e->efi_memmap | ((__u64)e->efi_memmap_hi << 32)); |
364 | ((__u64)boot_params.efi_info.efi_memmap_hi<<32)); | ||
365 | #endif | 365 | #endif |
366 | memmap.phys_map = (void *)pmap; | 366 | memmap.phys_map = (void *)pmap; |
367 | memmap.nr_map = boot_params.efi_info.efi_memmap_size / | 367 | memmap.nr_map = e->efi_memmap_size / |
368 | boot_params.efi_info.efi_memdesc_size; | 368 | e->efi_memdesc_size; |
369 | memmap.desc_version = boot_params.efi_info.efi_memdesc_version; | 369 | memmap.desc_size = e->efi_memdesc_size; |
370 | memmap.desc_size = boot_params.efi_info.efi_memdesc_size; | 370 | memmap.desc_version = e->efi_memdesc_version; |
371 | |||
371 | memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); | 372 | memblock_reserve(pmap, memmap.nr_map * memmap.desc_size); |
372 | 373 | ||
373 | return 0; | 374 | return 0; |