public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Thorlton <athorlton@sgi.com>
To: Linux EFI <linux-efi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Matt Fleming <matt@console-pimps.org>,
	Borislav Petkov <bp@suse.de>, Russ Anderson <rja@sgi.com>
Subject: [RFC] Best place/method to determine BIOS version?
Date: Mon, 9 Jun 2014 15:00:17 -0500	[thread overview]
Message-ID: <20140609200017.GD2700@sgi.com> (raw)

Hi guys,

We recently ran into/corrected a bug in our BIOS that was exposed by the
recent updates to the way that the EFI code maps in memory during boot.
Discussion here:

http://comments.gmane.org/gmane.linux.kernel/1638074

Anyways, we now need to find a way to determine the BIOS version before
efi_apply_memmap_quirks is called, so that we know whether or not the
BIOS we're running requires the quirk.  We have a function in one of our
EFI runtime services that provides this information, but I'm having a
lot of trouble calling this function early enough in boot.

It seems that all the necessary function pointers are available well
before efi_apply_memmap_quirks is called, but when trying to use
efi_call_phys6 to call our function, I always hit a kernel paging error.

I think the problem is that I really need to be doing this at a point
where I can directly use physical addressing (the function pointer that
we have stored in efi.uv_systab contains the physical address of our
function) - at least that's the idea I get from our BIOS guys, but I
really don't know what I'm talking about here :)

Can anybody help me with how early in boot I need to make this call, and
possibly with an appropriate location to stick the code in?

Any advice is greatly appreciated.  Thanks!

- Alex

             reply	other threads:[~2014-06-09 20:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 20:00 Alex Thorlton [this message]
2014-06-10  8:03 ` [RFC] Best place/method to determine BIOS version? Borislav Petkov
2014-06-10 20:44   ` efi_call on SGI Borislav Petkov
2014-06-11 17:32     ` Alex Thorlton
2014-06-11  8:55 ` [RFC] Best place/method to determine BIOS version? Matt Fleming
2014-06-11 17:30   ` Alex Thorlton

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=20140609200017.GD2700@sgi.com \
    --to=athorlton@sgi.com \
    --cc=bp@suse.de \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=rja@sgi.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