public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC v2 00/11] efi_loader: rework bootefi/bootmgr
@ 2019-03-27  4:40 AKASHI Takahiro
  2019-03-27  4:40 ` [U-Boot] [RFC v2 01/11] efi_loader: boottime: add loaded image device path protocol to image handle AKASHI Takahiro
                   ` (11 more replies)
  0 siblings, 12 replies; 43+ messages in thread
From: AKASHI Takahiro @ 2019-03-27  4:40 UTC (permalink / raw)
  To: u-boot

There are several reasons that I want to rework/refactor bootefi command
as well as bootmgr:
* Some previous commits on bootefi.c have made the code complicated
  and a bit hard to understand.

* do_bootefi_exec() would better be implemented using load_image() along
  with start_image() to be aligned with UEFI interfaces.

* Contrary to the other part, efi_selftest part of the code is unusal
  in terms of loading/execution path in do_bootefi().

* When we will support "secure boot" in the future, EFI Boot Manager
  is expected to be invoked as a standalone command without any arguments
  to mitigate security surfaces.

In this patch set,
Patch#1 is a bug fix.
Patch#2 to #9 are preparatory patches for patch#10.
Patch#10 is a core part of reworking.
Patch#11 is for standalone boot manager.

# Please note that some patches, say patch#4 and #5, can be combined into one
# but I intentionally keep them separated to clearify my intentions of changes.

Prerequsite patch:
* "efi_loader: bootmgr: support BootNext and BootCurrent variable behavior"
* "efi_loader: release file buffer after loading image"

Issues:
* load_image() will take an argument of "parent_handle," but obviously
  we don't have any parent when invoking an application from command line.
  (See FIXME in patch#10.)
* Starting EDK2's Shell.efi from boot manager fails.
  (I need to find out a fix.)
* The semantics of efi_dp_from_name() should be changed.
  (See FIXME in patch#10.)

-Takahiro Akashi

Changes in RFC v2 (Mar 27, 2019)
* rebased on v2019.04-rc4
* use load_image API in do_bootmgr_load()
* merge efi_install_fdt() and efi_process_fdt()
* add EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL to image (patch#1)
* lots of minor changes

AKASHI Takahiro (11):
  efi_loader: boottime: add loaded image device path protocol to image
    handle
  efi_loader: boottime: export efi_[un]load_image()
  efi_loader: device_path: handle special case of loading
  cmd: bootefi: carve out fdt handling from do_bootefi()
  cmd: bootefi: merge efi_install_fdt() and efi_process_fdt()
  cmd: bootefi: carve out efi_selftest code from do_bootefi()
  cmd: bootefi: move do_bootefi_bootmgr_exec() forward
  cmd: bootefi: carve out bootmgr code from do_bootefi()
  cmd: bootefi: carve out do_boot_efi() from do_bootefi()
  efi_loader: rework bootmgr/bootefi using load_image API
  cmd: add efibootmgr command

 cmd/Kconfig                       |   8 +
 cmd/bootefi.c                     | 521 +++++++++++++++++++-----------
 include/efi_api.h                 |   4 +
 include/efi_loader.h              |  15 +-
 lib/efi_loader/efi_bootmgr.c      |  43 +--
 lib/efi_loader/efi_boottime.c     |  34 +-
 lib/efi_loader/efi_device_path.c  |   8 +
 lib/efi_loader/efi_image_loader.c |   2 +
 8 files changed, 411 insertions(+), 224 deletions(-)

-- 
2.20.1

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

end of thread, other threads:[~2019-04-16  4:20 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27  4:40 [U-Boot] [RFC v2 00/11] efi_loader: rework bootefi/bootmgr AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 01/11] efi_loader: boottime: add loaded image device path protocol to image handle AKASHI Takahiro
2019-03-27  5:58   ` Heinrich Schuchardt
2019-03-27 21:25     ` Heinrich Schuchardt
2019-03-28  1:13     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 02/11] efi_loader: boottime: export efi_[un]load_image() AKASHI Takahiro
2019-03-27 21:26   ` Heinrich Schuchardt
2019-03-27  4:40 ` [U-Boot] [RFC v2 03/11] efi_loader: device_path: handle special case of loading AKASHI Takahiro
2019-03-27  6:17   ` Heinrich Schuchardt
2019-03-28  1:17     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 04/11] cmd: bootefi: carve out fdt handling from do_bootefi() AKASHI Takahiro
2019-03-27  6:29   ` Heinrich Schuchardt
2019-03-28  1:26     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 05/11] cmd: bootefi: merge efi_install_fdt() and efi_process_fdt() AKASHI Takahiro
2019-03-27  6:33   ` Heinrich Schuchardt
2019-03-28  1:31     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 06/11] cmd: bootefi: carve out efi_selftest code from do_bootefi() AKASHI Takahiro
2019-03-27  6:45   ` Heinrich Schuchardt
2019-03-28  2:00     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 07/11] cmd: bootefi: move do_bootefi_bootmgr_exec() forward AKASHI Takahiro
2019-03-27  6:50   ` Heinrich Schuchardt
2019-03-28  2:13     ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 08/11] cmd: bootefi: carve out bootmgr code from do_bootefi() AKASHI Takahiro
2019-04-12  5:55   ` Heinrich Schuchardt
2019-04-12  7:06     ` AKASHI Takahiro
2019-04-12  8:58       ` Heinrich Schuchardt
2019-04-12 14:19         ` AKASHI Takahiro
2019-04-12 20:28           ` Heinrich Schuchardt
2019-04-16  4:20             ` AKASHI Takahiro
2019-03-27  4:40 ` [U-Boot] [RFC v2 09/11] cmd: bootefi: carve out do_boot_efi() " AKASHI Takahiro
2019-04-12  5:59   ` Heinrich Schuchardt
2019-04-12  7:22     ` AKASHI Takahiro
2019-04-12  9:01       ` Heinrich Schuchardt
2019-03-27  4:40 ` [U-Boot] [RFC v2 10/11] efi_loader: rework bootmgr/bootefi using load_image API AKASHI Takahiro
2019-04-12  5:53   ` Heinrich Schuchardt
2019-04-12  8:38     ` AKASHI Takahiro
2019-04-12  8:55       ` Heinrich Schuchardt
2019-03-27  4:40 ` [U-Boot] [RFC v2 11/11] cmd: add efibootmgr command AKASHI Takahiro
2019-03-27  7:10   ` Heinrich Schuchardt
2019-03-31 18:27     ` Alexander Graf
2019-04-12  1:18 ` [U-Boot] [RFC v2 00/11] efi_loader: rework bootefi/bootmgr AKASHI Takahiro
2019-04-12  6:11   ` Heinrich Schuchardt
2019-04-12  6:25     ` AKASHI Takahiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox