
From: Alexander Graf agraf@csgraf.de Date: Sun, 27 Feb 2022 13:18:56 +0100
For targets that enable ACPI, we should not pass Device Trees into the payload. However, our distro boot logic always passes the builtin DT as an argument.
To make it easy to use ACPI with distro boot, let's just ignore the DT argument to bootefi when ACPI is enabled. That way, we can successfully distro boot payloads on ACPI enabled targets.
I've never understood why it is bad to provide both the DT and ACPI tables. Several TianoCore EDK2 based firmwares do this or at least give you the option to do this. And it works fine. If both are provided, you just leave it up to the OS to decide what it wants to use. Which makes me think the text was put there in the standard by people with an agenda...
I think it would be good for U-Boot to give users a choice here, with all possible combinations (only DT, only ACPI, both DT and ACPI). But this is a step in the right direction.
Reviewed-by: Mark Kettenis kettenis@openbsd.org
Signed-off-by: Alexander Graf agraf@csgraf.de
cmd/bootefi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 94d18ca73f..2c9bc0dcd2 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -265,8 +265,8 @@ efi_status_t efi_install_fdt(void *fdt) */ #if CONFIG_IS_ENABLED(GENERATE_ACPI_TABLE) if (fdt) {
log_err("ERROR: can't have ACPI table and device tree.\n");
return EFI_LOAD_ERROR;
log_warning("WARNING: Can't have ACPI table and device tree - ignoring DT.\n");
}return EFI_SUCCESS;
#else bootm_headers_t img = { 0 }; -- 2.32.0