public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Thorlton <athorlton@sgi.com>
To: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Alex Thorlton <athorlton@sgi.com>,
	linux-kernel@vger.kernel.org, Dimitri Sivanich <sivanich@sgi.com>,
	Russ Anderson <rja@sgi.com>, Mike Travis <travis@sgi.com>,
	Borislav Petkov <bp@suse.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-efi@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 1/2] Create UV efi_call macros
Date: Mon, 16 May 2016 17:58:40 -0500	[thread overview]
Message-ID: <20160516225840.GL98477@stormcage.americas.sgi.com> (raw)
In-Reply-To: <20160512120600.GF2728@codeblueprint.co.uk>

On Thu, May 12, 2016 at 01:06:00PM +0100, Matt Fleming wrote:
> (Adding author of arch_efi_call code)
> 
> On Wed, 11 May, at 02:55:44PM, Alex Thorlton wrote:
> > We need a slightly different macro than the standard efi_call_virt,
> > since those macros all assume that the function pointer, f, that gets
> > passed in will live somewhere in efi.systab->runtime.  Our EFI function
> > pointer lives in efi.uv_systab, so we can't use the standard macros out
> > of the box.
>  
> Is that true of all EFI services pointers? From reading the SGI/UV
> code I got the impression that it's possible to call the standard
> services via efi.systab->runtime but you also need the ability to call
> these UV bios functions, which are not accessible via efi.systab.

No, sorry.  I wasn't very clear there.  All of the standard EFI services
(get_time, get_variable, etc.) are still called through
efi.systab->runtime on UV.  It's only the special UV-specific function
pointer that is accessed through uv_systab, but, either way, we will
still need a slightly different macro to make that happen.

> Do you actually want the same environment setup and teardown to happen
> when calling efi.uv_systab ? Or are you simply trying to reuse the
> efi_call() implementation?

I was simply re-using the efi_call implementation.  Boris suggested that
I re-write this using the efi_call_virt macro, so I just went with that.
It all seems to work just fine, so I don't see much reason to stray away
from that implementation.  That being said, I'm obviously not a huge fun
of the code duplication across the macros.  I think there's probably a
way to minimize this, though I haven't quite worked out the best method
yet (ideas are welcome :)

> > This commit creates some new uv_* macros that are functionally
> > equivalent to the standard ones, with the exception of allowing us to
> > use a different function pointer.  I figure that we won't want to call
> > these uv_* in the end (we'll probably want something more generic), but
> > I thought I would get everyone's thoughts on how we might best reach
> > that goal instead of just trying to come up with a new implementation on
> > my own.
> > 
> > By itself, this commit does get our machines booting, but it needs the
> > small fix to the efi_call assembly code for our modules to work.
>  
> Could you provide some more details in the changelog on why your
> machine doesn't boot without this change?

Absolutely.  I wasn't sure exactly how much detail was necessary.  I'll
put a brief write-up of the original problem in the commit message for
the next version.

- Alex

  reply	other threads:[~2016-05-16 22:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-11 19:55 [RFC PATCH 0/2] Fix EFI runtime calls on SGI UV Alex Thorlton
2016-05-11 19:55 ` [PATCH 1/2] Create UV efi_call macros Alex Thorlton
     [not found]   ` <1462996545-98387-2-git-send-email-athorlton-sJ/iWh9BUns@public.gmane.org>
2016-05-12  6:46     ` Ingo Molnar
     [not found]       ` <20160512064606.GA30717-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-12  7:35         ` Ard Biesheuvel
     [not found]           ` <CAKv+Gu8Z0faffrN8Jnz9fQPkyn6K69cFaRD348w+m_Lv4Jgynw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-12  8:17             ` Ingo Molnar
     [not found]               ` <20160512081739.GA25826-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-16 23:00                 ` Alex Thorlton
2016-05-12 12:06   ` Matt Fleming
2016-05-16 22:58     ` Alex Thorlton [this message]
     [not found]       ` <20160516225840.GL98477-7ppMa7wkY9tKToyKb8PD+Zs2JHu2awxn0E9HWUfgJXw@public.gmane.org>
2016-05-17 12:11         ` Matt Fleming
     [not found]           ` <20160517121122.GC21993-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-05-17 20:14             ` Alex Thorlton
2016-05-11 19:55 ` [PATCH 2/2] Fix efi_call Alex Thorlton
     [not found]   ` <1462996545-98387-3-git-send-email-athorlton-sJ/iWh9BUns@public.gmane.org>
2016-05-12  6:48     ` Ingo Molnar
2016-05-12 11:43       ` Matt Fleming
     [not found]       ` <20160512064835.GB30717-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-16 16:24         ` Alex Thorlton
2016-05-12 11:41     ` Matt Fleming
     [not found]       ` <20160512114149.GD2728-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2016-05-16 16:25         ` 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=20160516225840.GL98477@stormcage.americas.sgi.com \
    --to=athorlton@sgi.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=matt@codeblueprint.co.uk \
    --cc=mingo@redhat.com \
    --cc=rja@sgi.com \
    --cc=sivanich@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.com \
    --cc=x86@kernel.org \
    /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