[PATCH v7 00/24] efi: Improvements to U-Boot running on top of UEFI
Simon Glass
sjg at chromium.org
Sat Dec 18 19:28:26 CET 2021
At present U-Boot can be built as an EFI app, but it is really just for
testing, with very few features. Instead, the payload build is used for
booting on top of UEFI, where U-Boot takes over the machine immediately
and supplies its own drivers.
But the app could be made more useful.
This series provides access to EFI block devices and the video console
within U-Boot. It also restructures the app to make it possible to boot
a kernel, although further work is needed to implement this.
This can be thought of as making U-Boot perform a little like 'grub', in
that it runs purely based on UEFI-provided services.
Of course a lot more work is required, but this is a start.
Note: It would be very useful to include qemu tests of the app and stub
in CI.
This is available at u-boot-dm/efi-working
Changes in v7:
- Rebase on -master instead of -next
Changes in v6:
- Add comment for dm_scan_other()
- Add comment for free_memory()
- Drop setup_disks() as U-Boot does not support it
- Fix 'have have' typo
- Fix 'stuff' typo in comment
- Fix Alo typo in commit message
- Fix comment style in setup_info_table()
- Fix typo in function comment
- Update comment format for devpath_is_partition()
- Update to 'This function' in comment
- Use 'U-Boot' instead of 'ARP' typo
Changes in v5:
- Add new patch to avoid setting up global_data again with EFI
- Add new patch to avoid using the 64-bit link script for the EFI app
- Add new patch to build the 64-bit app properly
- Add new patch to round out the link script for 64-bit EFI
- Add new patch to set the correct link flags for the 64-bit EFI app
- Add new patch to tweak the code used for the 64-bit EFI app
- Add various patches to fix up the 64-bit app so that it boots
- Fix grammar in commit message
Changes in v3:
- Add new patch to show the system-table revision
- Drop comments that confuse sphinx
- Move device_path path change to its own patch
Changes in v2:
- Add a better boot command too
- Add a sentence about what the patch does
- Add new patch to support the efi command in the app
- Don't export efi_bind_block()
- Fix 'as' typo
- Only bind devices for media devices, not for partitions
- Show devices that are processed
- Store device path in struct efi_media_plat
- Update documentation
- Use log_info() instead of printf()
Simon Glass (24):
efi: Locate all block devices in the app
efi: serial: Support arrow keys
x86: Allow booting a kernel from the EFI app
x86: Don't process the kernel command line unless enabled
x86: efi: Add room for the binman definition in the dtb
efi: Drop device_path from struct efi_priv
efi: Add comments to struct efi_priv
efi: Fix ll_boot_init() operation with the app
efi: Add a few comments to the stub
efi: Share struct efi_priv between the app and stub code
efi: Move exit_boot_services into a function
efi: Check for failure when initing the app
efi: Mention that efi_info_get() is only used in the stub
efi: Show when allocated pages are used
efi: Allow easy selection of serial-only operation
x86: efi: Update efi_get_next_mem_desc() to avoid needing a map
efi: Support the efi command in the app
x86: efi: Show the system-table revision
x86: efi: Don't set up global_data again with EFI
x86: efi: Tweak the code used for the 64-bit EFI app
x86: efi: Round out the link script for 64-bit EFI
x86: efi: Don't use the 64-bit link script for the EFI app
x86: efi: Set the correct link flags for the 64-bit EFI app
efi: Build the 64-bit app properly
Makefile | 4 +-
arch/x86/config.mk | 15 +-
arch/x86/cpu/config.mk | 2 +-
arch/x86/cpu/efi/payload.c | 17 +-
arch/x86/cpu/x86_64/cpu.c | 5 +
arch/x86/dts/Makefile | 2 +-
arch/x86/lib/Makefile | 5 +-
arch/x86/lib/bootm.c | 11 +-
arch/x86/lib/elf_x86_64_efi.lds | 5 +-
arch/x86/lib/relocate.c | 2 +
arch/x86/lib/zimage.c | 13 +-
cmd/Makefile | 2 +-
cmd/efi.c | 78 +++++----
common/board_r.c | 5 +-
doc/develop/uefi/u-boot_on_efi.rst | 6 +-
drivers/serial/serial_efi.c | 11 +-
include/configs/efi-x86_app.h | 25 +++
include/efi.h | 106 +++++++++++-
include/efi_api.h | 15 ++
include/init.h | 2 +-
lib/efi/efi.c | 97 +++++++++++
lib/efi/efi_app.c | 269 +++++++++++++++++++++++++++--
lib/efi/efi_stub.c | 95 ++++------
23 files changed, 649 insertions(+), 143 deletions(-)
--
2.34.1.173.g76aa8bc2d0-goog
More information about the U-Boot
mailing list