From patchwork Fri Mar 4 09:19:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 591837 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9FC0B1402A9 for ; Fri, 4 Mar 2016 20:19:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5609AA7675; Fri, 4 Mar 2016 10:19:36 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VECineJQGHOt; Fri, 4 Mar 2016 10:19:36 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E6225A7671; Fri, 4 Mar 2016 10:19:34 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F3887A7671 for ; Fri, 4 Mar 2016 10:19:16 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IWFGeqHUHdZw for ; Fri, 4 Mar 2016 10:19:16 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by theia.denx.de (Postfix) with ESMTPS id 44532A750D for ; Fri, 4 Mar 2016 10:19:12 +0100 (CET) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 07596AB5D; Fri, 4 Mar 2016 09:19:10 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Fri, 4 Mar 2016 10:19:10 +0100 Message-Id: <1457083150-160370-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1457050214-117592-1-git-send-email-agraf@suse.de> References: <1457050214-117592-1-git-send-email-agraf@suse.de> Cc: trini@konsulko.com, Andrew.Wafaa@arm.com, matwey.kornilov@gmail.com, leif.lindholm@linaro.org, afaerber@suse.de Subject: [U-Boot] [PATCH] efi_loader: Reserve 2 additional pages for fdt X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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);