[PATCH] efi: EFI Device Tree Fixup Protocol
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 29 Jan 2021 06:36:42 +0000 (07:36 +0100)
committerFelix Zielcke <fzielcke@z-51.de>
Wed, 11 Jun 2025 15:42:34 +0000 (17:42 +0200)
commit21f422f00ecbbb6d3bcf8c9f84706f0a6f83a844
tree9bcfae1a5b4c37fe1093793065211b2444ce2a1a
parentc888ff014d7625ebc0576fdea2b056b876019a69
[PATCH] efi: EFI Device Tree Fixup Protocol

Device-trees are used to convey information about hardware to the operating
system. Some of the properties are only known at boot time. (One example of
such a property is the number of the boot hart on RISC-V systems.) Therefore
the firmware applies fix-ups to the original device-tree. Some nodes and
properties are added or altered.

When using GRUB's device-tree command the same fix-ups have to be applied.
The EFI Device Tree Fixup Protocol allows to pass the loaded device tree
to the firmware for this purpose.

The protocol can

* add nodes and update properties
* reserve memory according to the /reserved-memory node and the memory
  reservation block
* install the device-tree as configuration table

With the patch GRUB checks if the protocol is installed and invokes it if
available. (LP: #1965796)

Link: https://lists.gnu.org/archive/html/grub-devel/2021-02/msg00013.html
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Julian Andres Klode <julian.klode@canonical.com>
Gbp-Pq: Name fdt-device-tree-fixup-protocol.patch
grub-core/loader/efi/fdt.c
include/grub/efi/api.h