diff options
| -rw-r--r-- | arch/x86/platform/efi/quirks.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 09e811b9da26..17456a1d3f04 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c | |||
| @@ -380,6 +380,22 @@ static void __init efi_unmap_pages(efi_memory_desc_t *md) | |||
| 380 | u64 pa = md->phys_addr; | 380 | u64 pa = md->phys_addr; |
| 381 | u64 va = md->virt_addr; | 381 | u64 va = md->virt_addr; |
| 382 | 382 | ||
| 383 | /* | ||
| 384 | * To Do: Remove this check after adding functionality to unmap EFI boot | ||
| 385 | * services code/data regions from direct mapping area because | ||
| 386 | * "efi=old_map" maps EFI regions in swapper_pg_dir. | ||
| 387 | */ | ||
| 388 | if (efi_enabled(EFI_OLD_MEMMAP)) | ||
| 389 | return; | ||
| 390 | |||
| 391 | /* | ||
| 392 | * EFI mixed mode has all RAM mapped to access arguments while making | ||
| 393 | * EFI runtime calls, hence don't unmap EFI boot services code/data | ||
| 394 | * regions. | ||
| 395 | */ | ||
| 396 | if (!efi_is_native()) | ||
| 397 | return; | ||
| 398 | |||
| 383 | if (kernel_unmap_pages_in_pgd(pgd, pa, md->num_pages)) | 399 | if (kernel_unmap_pages_in_pgd(pgd, pa, md->num_pages)) |
| 384 | pr_err("Failed to unmap 1:1 mapping for 0x%llx\n", pa); | 400 | pr_err("Failed to unmap 1:1 mapping for 0x%llx\n", pa); |
| 385 | 401 | ||
