From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>,
Ian Campbell <ian.campbell@citrix.com>,
keir@xen.org, david.woodhouse@intel.com,
stefano.stabellini@eu.citrix.com,
Daniel Kiper <daniel.kiper@oracle.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xen.org,
Jan Beulich <JBeulich@suse.com>,
ross.philipson@citrix.com, boris.ostrovsky@oracle.com,
richard.l.maliszewski@intel.com
Subject: Re: EFI and multiboot2 devlopment work for Xen
Date: Tue, 22 Oct 2013 12:31:55 -0400 [thread overview]
Message-ID: <20131022163155.GC19189@phenom.dumpdata.com> (raw)
In-Reply-To: <52669C2C.90509@gmail.com>
On Tue, Oct 22, 2013 at 05:39:24PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 22.10.2013 16:51, Konrad Rzeszutek Wilk wrote:
> > If you use 'linux' module, it will call ExitBootService.
> > If you use 'multiboot' module, it will call ExitBootService too.
> >
> > So if you don't want to the module to call 'grub_efi_finish_boot_services'
> > you need to use 'linuxefi' :-)
> That's a very limited logic. Commands can be modified and protocols can
> be extended.
> There was only one e-mail explaining the needs and I answered with
> proposing possible solutions yet the 2 e-mails in question were
> completely ignored.
This was before my time - so I am not exactly sure what was discussed.
You wouldn't by any chance have any URLs handy?
> What's the need behind not calling ExitBootService? This is a point
> which was never really explained to me. EFI specification specifically
> tells to call ExitBootService.
This commit points to it being a problem with the spec and hardware
implementations not being in sync:
commit 916f676f8dc016103f983c7ec54c18ecdbb6e349
Author: Matthew Garrett <mjg@redhat.com>
Date: Wed May 25 09:53:13 2011 -0400
x86, efi: Retain boot service code until after switching to virtual mode
UEFI stands for "Unified Extensible Firmware Interface", where "Firmware"
is an ancient African word meaning "Why do something right when you can
do it so wrong that children will weep and brave adults will cower before
you", and "UEI" is Celtic for "We missed DOS so we burned it into your
ROMs". The UEFI specification provides for runtime services (ie, another
way for the operating system to be forced to depend on the firmware) and
we rely on these for certain trivial tasks such as setting up the
bootloader. But some hardware fails to work if we attempt to use these
runtime services from physical mode, and so we have to switch into virtual
mode. So far so dreadful.
The specification makes it clear that the operating system is free to do
whatever it wants with boot services code after ExitBootServices() has been
called. SetVirtualAddressMap() can't be called until ExitBootServices() has
been. So, obviously, a whole bunch of EFI implementations call into boot
services code when we do that. Since we've been charmingly naive and
trusted that the specification may be somehow relevant to the real world,
we've already stuffed a picture of a penguin or something in that address
space. And just to make things more entertaining, we've also marked it
non-executable.
This patch allocates the boot services regions during EFI init and makes
sure that they're executable. Then, after SetVirtualAddressMap(), it
discards them and everyone lives happily ever after. Except for the ones
who have to work on EFI, who live sad lives haunted by the knowledge that
someone's eventually going to write yet another firmware specification.
[ hpa: adding this to urgent with a stable tag since it fixes currently-broken
hardware. However, I do not know what the dependencies are and so I do
not know which -stable versions this may be a candidate for. ]
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Link: http://lkml.kernel.org/r/1306331593-28715-1-git-send-email-mjg@redhat.com
>
next prev parent reply other threads:[~2013-10-22 16:32 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-21 12:57 EFI and multiboot2 devlopment work for Xen Daniel Kiper
2013-10-21 13:36 ` Jan Beulich
2013-10-21 14:23 ` Konrad Rzeszutek Wilk
2013-10-21 14:37 ` Jan Beulich
2013-10-21 18:46 ` Daniel Kiper
2013-10-22 7:16 ` Jan Beulich
2013-10-21 18:39 ` Daniel Kiper
2013-10-22 7:15 ` Jan Beulich
2013-10-21 13:54 ` Peter Jones
2013-10-21 18:57 ` Daniel Kiper
2013-10-22 9:26 ` Ian Campbell
2013-10-22 9:31 ` Jan Beulich
2013-10-22 9:45 ` Ian Campbell
2013-10-22 9:59 ` Jan Beulich
2013-10-22 13:42 ` Konrad Rzeszutek Wilk
2013-10-22 13:53 ` Ian Campbell
2013-10-22 14:09 ` Konrad Rzeszutek Wilk
2013-10-22 14:24 ` Ian Campbell
2013-10-22 14:51 ` Konrad Rzeszutek Wilk
2013-10-22 14:59 ` Jan Beulich
2013-10-22 15:35 ` Peter Jones
2013-10-22 15:39 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-22 16:31 ` Konrad Rzeszutek Wilk [this message]
2013-10-22 15:22 ` [Xen-devel] " Ian Campbell
2013-10-22 16:26 ` Konrad Rzeszutek Wilk
2013-10-23 8:32 ` Ian Campbell
2013-10-23 13:13 ` Konrad Rzeszutek Wilk
2013-10-23 14:07 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-23 17:13 ` Andrey Borzenkov
2013-10-23 16:17 ` Jan Beulich
2013-10-23 16:14 ` Jan Beulich
2013-10-23 17:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-24 6:53 ` Jan Beulich
2013-10-22 14:10 ` Jan Beulich
2013-10-22 14:18 ` Woodhouse, David
2013-10-22 14:57 ` Konrad Rzeszutek Wilk
2013-10-22 15:21 ` Ian Campbell
2013-10-22 16:24 ` Konrad Rzeszutek Wilk
2013-10-22 16:27 ` Ian Campbell
2013-10-22 15:23 ` Ian Campbell
2013-10-22 14:43 ` Konrad Rzeszutek Wilk
2013-10-22 15:25 ` Woodhouse, David
2013-10-22 15:32 ` Matthew Garrett
2013-10-22 15:42 ` Woodhouse, David
2013-10-22 16:01 ` Daniel Kiper
2013-10-22 16:08 ` Ian Campbell
2013-10-22 16:14 ` Daniel Kiper
2013-10-22 16:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-22 16:31 ` Ian Campbell
2013-10-22 16:38 ` Konrad Rzeszutek Wilk
2013-10-22 16:24 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-22 16:36 ` Maliszewski, Richard L
2013-10-22 16:51 ` Daniel Kiper
2013-10-22 17:09 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-22 17:21 ` Maliszewski, Richard L
2013-10-23 7:53 ` Daniel Kiper
2013-10-22 16:35 ` Konrad Rzeszutek Wilk
2013-10-23 6:49 ` Michael Chang
2013-10-23 6:51 ` Michael Chang
2013-10-23 6:56 ` Daniel Kiper
2013-10-21 20:53 ` Seth Goldberg
2013-10-21 21:27 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-21 21:27 ` Seth Goldberg
2013-10-21 21:16 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-22 8:54 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-23 7:05 ` Daniel Kiper
2013-10-23 8:28 ` Seth Goldberg
2013-10-23 10:43 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-28 16:26 ` Konrad Rzeszutek Wilk
2013-10-28 18:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-29 8:28 ` Jan Beulich
2013-10-30 11:19 ` Is: Wrap-up Was: " Daniel Kiper
2013-10-30 11:38 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-04 20:41 ` Stefano Stabellini
2013-11-05 19:15 ` Leif Lindholm
2013-10-28 18:42 ` Seth Goldberg
2013-10-22 17:12 ` Andrey Borzenkov
2013-10-22 17:20 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-23 7:43 ` Daniel Kiper
2013-10-23 8:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=20131022163155.GC19189@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=daniel.kiper@oracle.com \
--cc=david.woodhouse@intel.com \
--cc=grub-devel@gnu.org \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phcoder@gmail.com \
--cc=richard.l.maliszewski@intel.com \
--cc=ross.philipson@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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).