All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] efi: Unified Xen hypervisor/kernel/initrd images
@ 2020-09-07 19:00 Trammell Hudson
  2020-09-07 19:00 ` [PATCH v3 1/4] x86/xen.lds.S: Work around binutils build id alignment bug Trammell Hudson
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Trammell Hudson @ 2020-09-07 19:00 UTC (permalink / raw)
  To: xen-devel

From: Trammell hudson <hudson@trmm.net>

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
(`.initrd`), and XSM config (`.xsm`), which are included after building
xen.efi using objcopy to add named sections for each input file.

Trammell hudson (4):
  x86/xen.lds.S: Work around binutils build id alignment bug
  efi/boot.c: add file.need_to_free and split display_file_info()
  efi: Enable booting unified hypervisor/kernel/initrd images
  efi: Do not use command line if secure boot is enabled.

 .gitignore                  |   1 +
 docs/misc/efi.pandoc        |  47 ++++++++++++
 xen/arch/arm/efi/efi-boot.h |  22 ++++--
 xen/arch/x86/efi/Makefile   |   2 +-
 xen/arch/x86/efi/efi-boot.h |   7 +-
 xen/arch/x86/xen.lds.S      |   1 +
 xen/common/efi/boot.c       | 139 ++++++++++++++++++++++++++---------
 xen/common/efi/efi.h        |   3 +
 xen/common/efi/pe.c         | 141 ++++++++++++++++++++++++++++++++++++
 9 files changed, 317 insertions(+), 46 deletions(-)
 create mode 100644 xen/common/efi/pe.c

-- 
2.25.1



^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH v3 1/4] x86/xen.lds.S: Work around binutils build id alignment bug
@ 2020-09-07 17:46 Trammell Hudson
  0 siblings, 0 replies; 19+ messages in thread
From: Trammell Hudson @ 2020-09-07 17:46 UTC (permalink / raw)
  To: Xen-devel

binutils in most distrbutions have a bug in find_section_by_vma()
that causes objcopy round section addresses incorrectly and that
think the .buildid section overlaps with the .rodata.  Aligning the
sections allows these older verisons of the tools to work on the
xen.efi executable image.

Mailing list discussion: https://sourceware.org/pipermail/binutils/2020-August/112746.html

Fixed in: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=610ed3e08f13b3886fd7194fb7a248dee8724685

Signed-off-by: Trammell hudson <hudson@trmm.net>
---
 xen/arch/x86/xen.lds.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 0273f79152..ba691b1890 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -156,6 +156,7 @@ SECTIONS
        __note_gnu_build_id_end = .;
   } :note :text
 #elif defined(BUILD_ID_EFI)
+  . = ALIGN(32); /* workaround binutils section overlap bug */
   DECL_SECTION(.buildid) {
        __note_gnu_build_id_start = .;
        *(.buildid)
--
2.25.1




^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-09-14 12:16 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 19:00 [PATCH v3 0/4] efi: Unified Xen hypervisor/kernel/initrd images Trammell Hudson
2020-09-07 19:00 ` [PATCH v3 1/4] x86/xen.lds.S: Work around binutils build id alignment bug Trammell Hudson
2020-09-08  9:04   ` Jan Beulich
2020-09-08  9:30     ` Trammell Hudson
2020-09-08 12:29       ` Jan Beulich
2020-09-14  9:14         ` Trammell Hudson
2020-09-14  9:15           ` Jan Beulich
2020-09-07 19:00 ` [PATCH v3 2/4] efi/boot.c: add file.need_to_free and split display_file_info() Trammell Hudson
2020-09-14  9:05   ` Roger Pau Monné
2020-09-14 10:45     ` Trammell Hudson
2020-09-07 19:00 ` [PATCH v3 3/4] efi: Enable booting unified hypervisor/kernel/initrd images Trammell Hudson
2020-09-14 10:06   ` Roger Pau Monné
2020-09-14 11:19     ` Trammell Hudson
2020-09-14 12:14       ` Jan Beulich
2020-09-07 19:00 ` [PATCH v3 4/4] efi: Do not use command line if secure boot is enabled Trammell Hudson
2020-09-14 10:24   ` Roger Pau Monné
2020-09-14 11:36     ` Trammell Hudson
2020-09-14 12:16       ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2020-09-07 17:46 [PATCH v3 1/4] x86/xen.lds.S: Work around binutils build id alignment bug Trammell Hudson

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.