From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Graf Date: Fri, 4 Mar 2016 10:19:10 +0100 Subject: [U-Boot] [PATCH] efi_loader: Reserve 2 additional pages for fdt In-Reply-To: <1457050214-117592-1-git-send-email-agraf@suse.de> References: <1457050214-117592-1-git-send-email-agraf@suse.de> Message-ID: <1457083150-160370-1-git-send-email-agraf@suse.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We mark the device tree as reserved today, spanning exactly the amount of space it needs. If some other piece of code (like grub2) comes in and wants to modify the device tree to for example add a kernel command line though, it might assume that it has some space to do so. So let's just reserve 2 additional pages for the device tree to play nicely. Signed-off-by: Alexander Graf --- cmd/bootefi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index de17e49..faa6978 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -119,6 +119,8 @@ static unsigned long do_bootefi_exec(void *efi) fdt_end = ((ulong)working_fdt) + fdt_totalsize(working_fdt); fdt_size = (fdt_end - fdt_start) + EFI_PAGE_MASK; fdt_pages = fdt_size >> EFI_PAGE_SHIFT; + /* Give a bootloader the chance to modify the device tree */ + fdt_pages += 2; efi_add_memory_map(fdt_start, fdt_pages, EFI_BOOT_SERVICES_DATA, true); -- 1.8.5.6