linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Holt <holt@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: "H. Peter Anvin" <hpa@linux.intel.com>, Matthew Garrett <mjg@redhat.com>
Subject: [PATCH] phys_efi_set_virtual_address_map needs va, no pa.
Date: Wed, 20 Jun 2012 03:24:57 -0500	[thread overview]
Message-ID: <20120620082457.GE3464@sgi.com> (raw)

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@sgi.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: H. Peter Anvin <hpa@linux.intel.com>
---
 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


             reply	other threads:[~2012-06-20  8:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20  8:24 Robin Holt [this message]
2012-06-20 12:07 ` [PATCH] phys_efi_set_virtual_address_map needs va, no pa Matthew Garrett
2012-06-20 20:41   ` H. Peter Anvin
2012-06-21  0:27     ` Robin Holt
2012-06-21  0:46       ` H. Peter Anvin
2012-06-21 16:52         ` Robin Holt
2012-06-22  0:35           ` H. Peter Anvin
2012-06-21 19:16         ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120620082457.GE3464@sgi.com \
    --to=holt@sgi.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).