From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] efi: MMC proxy support for the UEFI varstore
Date: Fri, 23 Sep 2016 10:19:08 +0100 [thread overview]
Message-ID: <20160923091907.GA10042@leverpostej> (raw)
In-Reply-To: <CAKv+Gu-H=JkXFSm2bO4tFcUEVPs2ueT3za2X+aUjrnGZZSdUvQ@mail.gmail.com>
On Thu, Sep 22, 2016 at 02:37:00PM +0100, Ard Biesheuvel wrote:
> On 22 September 2016 at 13:58, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Thu, Sep 22, 2016 at 12:30:03PM +0100, Ard Biesheuvel wrote:
> > I also think that this needs to go via the USWG (and to the UEFI spec),
> > before we can consider using it.
> The primary issue there is that the variable protocols are
> architectural DXE protocols defined in the PI spec, not the UEFI spec
> (and the MMC host protocol I am using here is not in any spec afaik),
> and so implementing this in a UEFI compliant way is not currently
> possible. Exposing a UEFI protocol like block I/O is not sufficient,
> since the variable protocols are depended upon earlier in the boot
> sequence (in UEFI implementations based on PI).
>
> So yes, this needs to be discussed (and it will be, but not out in the
> open, unfortunately.) However, it is unclear whether it is feasible to
> address this at the UEFI level, or whether we will need to go beyond
> and define something based on the PI spec directly. (/me looks at
> Charles)
That is... less than optimal. :(
> > I have a few other general concerns:
> > * Lifetime guarantees
> >
> > When is it valid for EFI to call the MMC proxy? Can other services
> > (e.g. ACPI) call this?
> >
> > How do we handle kexec/kdump? e.g. how do we teardown the interface
> > before branching to a new kernel, how do we safely tear down a crashed
> > kernel's interface, what can we call before doing so?
> >
> > How do we handle suspend/resume? e.g. is it necessary to re-register
> > upon resume?
>
> All good questions, and exactly the kind of feedback I am seeking.
>
> Tearing down the interface could be as simple as clearing the pointer,
> but some synchronization is probably in order to make sure that no
> calls are in progress.
>
> But to clarify the purpose of this series: are there any concerns
> regarding exposing callbacks to the firmware in general, and for MMC
> access in particular, from the Linux side?
I have a general uneasiness about having UEFI call kernel function
pointers, inverting the usual relationship, but I'll need to think about
that a little further -- the lifetime stuff was the most obvious problem
in that area, but I'm sure there are more. ;)
It would really help to know *when* UEFI is expected/allowed to call
this. For synchronous calls, the FW could return a new
requires-os-support error code, and the OS could then call some API,
figure out what to do, and later send any acknowledgement required back
to UEFI. That might not cover all cases, though.
Thanks,
Mark.
next prev parent reply other threads:[~2016-09-23 9:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 11:30 [RFC PATCH 0/3] efi: MMC proxy support for the UEFI varstore Ard Biesheuvel
2016-09-22 11:30 ` [RFC PATCH 1/3] efi/arm64: add SIMD stash/unstash operations Ard Biesheuvel
2016-09-22 11:30 ` [RFC PATCH 2/3] efi/arm: " Ard Biesheuvel
2016-09-22 11:30 ` [RFC PATCH 3/3] efi: implement MMC proxy support for the UEFI variable store Ard Biesheuvel
2016-09-22 12:58 ` [RFC PATCH 0/3] efi: MMC proxy support for the UEFI varstore Mark Rutland
2016-09-22 13:37 ` Ard Biesheuvel
2016-09-23 9:19 ` Mark Rutland [this message]
2016-09-26 15:53 ` Mark Rutland
2016-09-28 23:54 ` Arnd Bergmann
2016-09-29 0:13 ` Ard Biesheuvel
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=20160923091907.GA10042@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).