[PATCH] phys_efi_set_virtual_address_map needs va, no pa.

From: Robin Holt
Date: Wed Jun 20 2012 - 04:25:01 EST


The kernel allocated memmap may end up being beyond the first
512GB of memory. That early range is identity mapped, while the
remainder of memory is not. The net result is the memmap allocated by
efi_enter_virtual_mode will not be accessible via its __pa as is currently
passed back to EFI.

Since EFI is going to have to parse the passed in table, I believe the
EFI documentation is wrong.

I asked one of our BIOS engineers to look at the Intel reference code
and he said it was obvious that the address would have to be a virtaully
accessible address as we are in virtual mode while EFI is handling the
callback.

Signed-off-by: Robin Holt <holt@xxxxxxx>
Cc: Matthew Garrett <mjg@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxxxxxxxx>
---
arch/x86/platform/efi/efi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 92660ed..ea4317a 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -869,7 +869,7 @@ void __init efi_enter_virtual_mode(void)
memmap.desc_size * count,
memmap.desc_size,
memmap.desc_version,
- (efi_memory_desc_t *)__pa(new_memmap));
+ new_memmap);

if (status != EFI_SUCCESS) {
pr_alert("Unable to switch EFI into virtual mode "
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/