boot: load device tree even if no original config exists
authorClayton Craft <clayton@craftyguy.net>
Fri, 27 Oct 2023 19:50:50 +0000 (12:50 -0700)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 10 Nov 2023 22:04:50 +0000 (22:04 +0000)
commit0f781d2aa55117b40f2e5dda3ab5bccc1e21594c
tree97afc2c77284b6fd8d7ad0259b8c315b124fbf12
parentefe4303b5d39b7bc6b2000574e8f5ce3ae74a379
boot: load device tree even if no original config exists

Firmware may not have loaded a devicetree, for example if the device
shipped with windows and exclusively supports ACPI.
We should always load the specified devicetree regardless of firmware
state to enable booting on platforms where Linux only supports DT.

Note: in _cleanup, the orig. config is NULL in this case, and passing
NULL to InstallConfigurationTable is permitted by the EFI spec.
See: https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html

Fixes #24059

Co-authored-by: Daniel Thompson <daniel.thompson@linaro.org>
src/boot/efi/devicetree.c