aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Garrett <matthew.garrett@nebula.com>2013-06-02 18:12:25 -0400
committerMatt Fleming <matt.fleming@intel.com>2013-06-06 09:28:11 -0400
commit1acba98f810a14b1255e34bc620594f83de37e36 (patch)
tree875fc5bd05c86ebeab607df1fd5c7b1c9447ec6e
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
UEFI: Don't pass boot services regions to SetVirtualAddressMap()
We need to map boot services regions during startup in order to avoid firmware bugs, but we shouldn't be passing those regions to SetVirtualAddressMap(). Ensure that we're only passing regions that are marked as being mapped at runtime. Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--arch/x86/platform/efi/efi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 55856b2310d3..339e11f9b3a9 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -1026,6 +1026,13 @@ void __init efi_enter_virtual_mode(void)
1026 va = efi_ioremap(md->phys_addr, size, 1026 va = efi_ioremap(md->phys_addr, size,
1027 md->type, md->attribute); 1027 md->type, md->attribute);
1028 1028
1029 if (!(md->attribute & EFI_MEMORY_RUNTIME)) {
1030 if (!va)
1031 pr_err("ioremap of 0x%llX failed!\n",
1032 (unsigned long long)md->phys_addr);
1033 continue;
1034 }
1035
1029 md->virt_addr = (u64) (unsigned long) va; 1036 md->virt_addr = (u64) (unsigned long) va;
1030 1037
1031 if (!va) { 1038 if (!va) {