Device-trees are often Linux version specific. So it seems reasonable to
let GRUB load device-trees according to the selected kernel version.
What currently is missing is a means to let the firmware apply necessary
fix-ups.

In the Device Tree Evolution Project (DTE) the idea was born to provide a
UEFI protocol which can be called by a boot manager to request the firmware
to apply fix-ups to a device-tree.

A draft specification for such a protocol can be found at:
https://github.com/U-Boot-EFI/EFI_DT_FIXUP_PROTOCOL

The first patch implements the protocol. The second allows the dtbdump.efi
test tool to load a flattened device-tree and call the
EFI_DT_FIXUP_PROTOCOL to apply fix-ups, make memory reservations and
finally install the device tree as a configuration table. In a next step
this configuration table can be dumped to a file.

Heinrich Schuchardt (2):
  efi_loader: implement EFI_DT_FIXUP_PROTOCOL
  efi_selftest: dtbdump support EFI_DT_FIXUP_PROTOCOL

 cmd/bootefi.c                  |  80 ---------
 cmd/efidebug.c                 |   5 +
 include/efi_dt_fixup.h         |  39 +++++
 include/efi_loader.h           |   2 +
 lib/efi_loader/Makefile        |   3 +
 lib/efi_loader/efi_dt_fixup.c  | 160 ++++++++++++++++++
 lib/efi_loader/efi_root_node.c |   6 +
 lib/efi_selftest/dtbdump.c     | 298 +++++++++++++++++++++++++++++----
 8 files changed, 477 insertions(+), 116 deletions(-)
 create mode 100644 include/efi_dt_fixup.h
 create mode 100644 lib/efi_loader/efi_dt_fixup.c

--
2.29.2

Reply via email to