]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
linux, efi, arm*, fdt: Break FDT extra allocation space out into a #define
authorLeif Lindholm <leif.lindholm@linaro.org>
Tue, 22 Jan 2019 16:59:41 +0000 (16:59 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 23 Jan 2019 09:16:32 +0000 (10:16 +0100)
A certain amount of dynamic space is required for the handover from
GRUB/Linux-EFI-stub. This entails things like initrd addresses,
address-cells entries and associated strings.

But move this into a proper centralised #define rather than live-code
it in the loader.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/arm64/linux.c
include/grub/fdt.h

index c37295c0b60e07daea1c593e401979e1268a341f..7c6d8daa17f13941d76e7756a04017309fee5008 100644 (file)
@@ -71,7 +71,7 @@ finalize_params_linux (void)
 
   void *fdt;
 
-  fdt = grub_fdt_load (0x400);
+  fdt = grub_fdt_load (GRUB_EFI_LINUX_FDT_EXTRA_SPACE);
 
   if (!fdt)
     goto failure;
index 158b1bc4b3ad8bac60860e298b816781d6c57090..e609c7e411110f49faffee0e3a513d017313dcad 100644 (file)
@@ -22,6 +22,9 @@
 #include <grub/types.h>
 #include <grub/symbol.h>
 
+/* Space required when preparing the /chosen node after boot has been called. */
+#define GRUB_EFI_LINUX_FDT_EXTRA_SPACE 0x400
+
 #define FDT_MAGIC 0xD00DFEED
 
 typedef struct {