[U-Boot] [PATCH v2 00/12] efi_loader: protocol services

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Jul 11 20:06:13 UTC 2017


Currently only a small fraction of the UEFI specification is
implemented in U-Boot. It is sufficient to load grub but it
fails on iPXE.

With this patch series all EFI protocol services are implemented
that are needed to reach the console prompt of the
bin-<ARCH>-efi/snponly.efi target of iPXE.

Futher patches for event services are needed to use the iPXE
console. These will be provided in a separate patch series.

The 1st patch refactors efi_open_protocol to enable the implementation
of InstallProtocolInterface. This patch eliminates the open protocol
functions in efi_disk, efi_gop, and efi_net.

The 2nd patch adds missing parameter checks to efi_open_protocol.

The 3rd patch implements InstallProtocolInteface.

The 4th patch partially implements UninstallProtocolInterface.

The 5th patch refactors efi_install_protocol_interface to make it
callable internally.

The 6th patch refactors efi_uninstall_protocol_interface to make
it callable internally.

The 7th patch implements InstallMultipleProtocolInterfaces by
calling efi_install_protocol_interface.

The 8th patch refactors efi_locate_handle to make it
callable internally.

The 9th patch implements LocateHandleBuffer.

The 10th patch increases the number of protocols per handle.

The 11th patch reimplements efi_locate_protocol.

The 12th patch implements the device path to text protocol.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

---
v2
	Remove implementation of efi_return_handle in 1st patch.	
	Correctly check GUIDs in 3rd patch.
	Check if protocol != NULL to avoid illegal memory access in 4th
	patch.
	Add patches 10-12.
---

Heinrich Schuchardt (12):
  efi_loader: refactor efi_open_protocol
  efi_loader: efi_open_protocol: parameter checks
  efi_loader: implement InstallProtocolInterface
  efi_loader: implement UninstallProtocolInterface
  efi_loader: refactor efi_install_protocol_interface
  efi_loader: refactor efi_uninstall_protocol_interface
  efi_loader: implement InstallMultipleProtocolInterfaces
  efi_loader: refactor efi_locate_handle
  efi_loader: implement LocateHandleBuffer
  efi_loader: provide a sufficient number of protocols
  efi_loader: reimplement efi_locate_protocol
  efi_loader: implement EFI_DEVICE_PATH_TO_TEXT_PROTOCOL

 cmd/bootefi.c                            |  24 +--
 include/efi_api.h                        |  26 ++-
 include/efi_loader.h                     |  33 +---
 lib/efi_loader/Makefile                  |   2 +-
 lib/efi_loader/efi_boottime.c            | 261 +++++++++++++++++++++++++++----
 lib/efi_loader/efi_device_path_to_text.c |  68 ++++++++
 lib/efi_loader/efi_disk.c                |  29 +---
 lib/efi_loader/efi_gop.c                 |   2 +-
 lib/efi_loader/efi_image_loader.c        |   8 -
 lib/efi_loader/efi_net.c                 |  30 +---
 10 files changed, 350 insertions(+), 133 deletions(-)
 create mode 100644 lib/efi_loader/efi_device_path_to_text.c

-- 
2.11.0



More information about the U-Boot mailing list