All of lore.kernel.org
 help / color / mirror / Atom feed
From: Trammell Hudson <hudson@trmm.net>
To: xen-devel@lists.xenproject.org
Cc: roger.pau@citrix.com, jbeulich@suse.com,
	andrew.cooper3@citrix.com, wl@xen.org
Subject: [PATCH v8 0/5] efi: Unified Xen hypervisor/kernel/initrd images
Date: Wed, 30 Sep 2020 08:00:06 -0400	[thread overview]
Message-ID: <20200930120011.1622924-1-hudson@trmm.net> (raw)

This patch series adds support for bundling the xen.efi hypervisor,
the xen.cfg configuration file, the Linux kernel and initrd, as well
as the XSM, and architectural specific files into a single "unified"
EFI executable.  This allows an administrator to update the components
independently without requiring rebuilding xen, as well as to replace
the components in an existing image.

The resulting EFI executable can be invoked directly from the UEFI Boot
Manager, removing the need to use a separate loader like grub as well
as removing dependencies on local filesystem access.  And since it is
a single file, it can be signed and validated by UEFI Secure Boot without
requring the shim protocol.

It is inspired by systemd-boot's unified kernel technique and borrows the
function to locate PE sections from systemd's LGPL'ed code.  During EFI
boot, Xen looks at its own loaded image to locate the PE sections for
the Xen configuration (`.config`), dom0 kernel (`.kernel`), dom0 initrd
(`.ramdisk`), and XSM config (`.xsm`), which are included after building
xen.efi using objcopy to add named sections for each input file.

Trammell Hudson (5):
  efi/boot.c: add file.need_to_free
  efi/boot.c: add handle_file_info()
  efi/boot.c: wrap PrintStr/PrintErr to allow const CHAR16* arguments
  efi: Enable booting unified hypervisor/kernel/initrd images
  efi: Do not use command line if unified config is included

 .gitignore                  |   1 +
 docs/misc/efi.pandoc        |  49 +++++++++++
 xen/arch/arm/efi/efi-boot.h |  36 +++++---
 xen/arch/x86/efi/Makefile   |   2 +-
 xen/arch/x86/efi/efi-boot.h |  13 ++-
 xen/common/efi/boot.c       | 161 ++++++++++++++++++++++++++----------
 xen/common/efi/efi.h        |   3 +
 xen/common/efi/pe.c         | 153 ++++++++++++++++++++++++++++++++++
 8 files changed, 362 insertions(+), 56 deletions(-)
 create mode 100644 xen/common/efi/pe.c

-- 
2.25.1



             reply	other threads:[~2020-09-30 12:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 12:00 Trammell Hudson [this message]
2020-09-30 12:00 ` [PATCH v8 1/5] efi/boot.c: add file.need_to_free Trammell Hudson
2020-10-02  8:15   ` Jan Beulich
2020-09-30 12:00 ` [PATCH v8 2/5] efi/boot.c: add handle_file_info() Trammell Hudson
2020-09-30 12:00 ` [PATCH v8 3/5] efi/boot.c: wrap PrintStr/PrintErr to allow const CHAR16* arguments Trammell Hudson
2020-09-30 12:15   ` Jan Beulich
2020-09-30 12:33     ` Trammell Hudson
2020-09-30 12:00 ` [PATCH v8 4/5] efi: Enable booting unified hypervisor/kernel/initrd images Trammell Hudson
2020-10-02  8:27   ` Jan Beulich
2020-10-02 10:52     ` Trammell Hudson
2020-09-30 12:00 ` [PATCH v8 5/5] efi: Do not use command line if unified config is included Trammell Hudson

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=20200930120011.1622924-1-hudson@trmm.net \
    --to=hudson@trmm.net \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --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.