[prev in list] [next in list] [prev in thread] [next in thread]
List: grub-devel
Subject: [RESEND PATCH 1/1] efi: device-tree must be in EfiACPIReclaimMemory
From: Heinrich Schuchardt <xypron.glpk () gmx ! de>
Date: 2021-01-29 15:32:29
Message-ID: 20210129153229.843-1-xypron.glpk () gmx ! de
[Download RAW message or body]
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 <xypron.glpk@gmx.de>
---
Resend due to Leif's changed email address
---
grub-core/loader/efi/fdt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c
index ee9c5592c..57ee81686 100644
--- a/grub-core/loader/efi/fdt.c
+++ b/grub-core/loader/efi/fdt.c
@@ -25,6 +25,7 @@
#include <grub/efi/efi.h>
#include <grub/efi/fdtload.h>
#include <grub/efi/memory.h>
+#include <grub/cpu/efi/memory.h>
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;
--
2.29.2
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic