From: Doug Goldstein <cardoe@cardoe.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Daniel Kiper <daniel.kiper@oracle.com>,
Doug Goldstein <cardoe@cardoe.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [PATCH] x86/boot: fix MB2 header to require EFI BS
Date: Tue, 24 Oct 2017 14:40:41 -0500 [thread overview]
Message-ID: <20171024194041.28188-1-cardoe@cardoe.com> (raw)
The EFI multiboot2 entry point currently requires EFI BootServices to
not have been exited however the header currently tells the boot
loader that Xen optionally supports EFI BootServices having been exited.
With this change Xen properly advertises that EFI must not be exited
allowing the boot loader to report an error that it cannot boot Xen if
it is unable to meet its needs.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
This should likely be applied against Xen 4.9 and Xen 4.10 as well as
staging. I am trying to get multiboot2 support for iPXE and upstream
is concerned that leaving EFI BootServices enabled will not be
compatible with their aims to support Secure Boot. So when I build
my iPXE without support for passing on Boot Services, Xen will be
loaded by iPXE but then it will fall down with "ERR: Bootloader
shutdown EFI x64 boot services!" implying that this is required. By
having Xen expose in its header that its required it allows me to
handle the situation gracefully in iPXE.
To quote the multiboot2 spec exact:
"This tag indicates that payload supports starting without terminating
boot services."
Unfortunately the spec is a bit vague and how I am reading it is:
- no tag = exit boot services in the boot loader
- tag present marked optional = boot loader can or cannot exit boot services
- tag present marked required = boot loader cannot exit boot services
In the future I would like to add support to Xen to allow it to run
without boot services but presently that support isn't there.
---
xen/arch/x86/boot/head.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index 9cc35da558..f76c2c0664 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -98,8 +98,8 @@ multiboot2_header_start:
0, /* Number of the lines - no preference. */ \
0 /* Number of bits per pixel - no preference. */
- /* Request that ExitBootServices() not be called. */
- mb2ht_init MB2_HT(EFI_BS), MB2_HT(OPTIONAL)
+ /* Require that ExitBootServices() not be called. */
+ mb2ht_init MB2_HT(EFI_BS), MB2_HT(REQUIRED)
/* EFI64 Multiboot2 entry point. */
mb2ht_init MB2_HT(ENTRY_ADDRESS_EFI64), MB2_HT(OPTIONAL), \
--
2.13.5
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-10-24 19:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-24 19:40 Doug Goldstein [this message]
2017-10-24 20:08 ` [PATCH] x86/boot: fix MB2 header to require EFI BS Daniel Kiper
2017-10-24 20:22 ` Andrew Cooper
2017-10-24 20:49 ` Doug Goldstein
2017-10-24 22:16 ` Daniel Kiper
2017-10-24 21:11 ` Daniel Kiper
2017-10-24 21:40 ` Andrew Cooper
2017-10-24 22:20 ` Daniel Kiper
2017-10-25 13:52 ` Doug Goldstein
2017-10-24 20:28 ` Doug Goldstein
2017-10-24 21:40 ` Daniel Kiper
2017-10-24 20:34 ` Doug Goldstein
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=20171024194041.28188-1-cardoe@cardoe.com \
--to=cardoe@cardoe.com \
--cc=andrew.cooper3@citrix.com \
--cc=daniel.kiper@oracle.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.