From: Heinrich Schuchardt Date: Fri, 29 Jan 2021 15:32:29 +0000 (+0100) Subject: efi: The device-tree must be in EfiACPIReclaimMemory X-Git-Tag: grub-2.06-rc1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30858eb59aff0e77b35dd5847375aab5cc3a8782;p=thirdparty%2Fgrub.git efi: The device-tree must be in EfiACPIReclaimMemory According to the Embedded Base Boot Requirements (EBBR) specification the device-tree passed to Linux as a configuration table must reside in EfiACPIReclaimMemory. Signed-off-by: Heinrich Schuchardt Reviewed-by: Daniel Kiper --- diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c index 003d07cd8..c86f283d7 100644 --- a/grub-core/loader/efi/fdt.c +++ b/grub-core/loader/efi/fdt.c @@ -25,6 +25,7 @@ #include #include #include +#include static void *loaded_fdt; static void *fdt; @@ -60,7 +61,10 @@ grub_fdt_load (grub_size_t additional_size) size += additional_size; grub_dprintf ("linux", "allocating %d bytes for fdt\n", size); - fdt = grub_efi_allocate_any_pages (GRUB_EFI_BYTES_TO_PAGES (size)); + fdt = grub_efi_allocate_pages_real (GRUB_EFI_MAX_USABLE_ADDRESS, + GRUB_EFI_BYTES_TO_PAGES (size), + GRUB_EFI_ALLOCATE_MAX_ADDRESS, + GRUB_EFI_ACPI_RECLAIM_MEMORY); if (!fdt) return NULL;