From patchwork Tue Jan 22 16:59:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 156316 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp7931243jaa; Tue, 22 Jan 2019 11:00:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN5OATKTf9WiISehE99124uHefIidPcOUoFPqTAIDxDF7viOHiJxhyb6BT0BLpMNqTiN/Ujf X-Received: by 2002:a1c:f707:: with SMTP id v7mr5031189wmh.18.1548183641329; Tue, 22 Jan 2019 11:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548183641; cv=none; d=google.com; s=arc-20160816; b=CeU792VwO1B8g4L32nRxp8KADmz6af8Zk9lYCz2gRkIYycwHdbdtsXCX6IWdckACR/ oBnO4V/cs3RSQRI4t1/9SUkfOKRka9KiR4K4KwxlE5N+Mm4ICqhTpTTNShSJkzMaHuII IHfMIbK7GSkNesFVsKK1dwSlJQYsBctJCSrRiuZl9LCYXQuuDS0NUOUNSW5PkJJmIoIr n4rZSylkATCiYeL5OpmELVpFU7raf1iNuGfYkV36pYb4ATNfCytba418ErJOpNjtSGV/ SvPWsstbDFyV8heNTUfW5f9zmSrEqf1G57CK9LntdEInveE4QhXMZTwsQ0T0fIo3hTso +DWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:dkim-signature; bh=eiZuxplAmByd9hDBt9THz+yjA1X59iCA5IFaSP34GFc=; b=I/al+l5xRoJZW38BHM1kZkow1Q20pv1WP29jmeOPYv5wvdHyXVxr8TwlVDPxKhuYAo BirbPMG4b47NyYbypZ5pzRmwI33UApMqm070FP6vcFtsHSRdDQi+ZQxqAgfID9Ty1yFS ggzQNgERRq4kVcgl7LyX5c2/vkpB+FA0KRZhCB7qzb1l7rX8dhAJ42sQFqDUP+x+gPu1 d/RkGsQj3tDZBnd9P+9Fa0a7dF9OniHdaNfiyIvE4P1CoWt+ztrQtgRlxnW60JVhyMDR OyG12u5t4WXL7Cd3YQ7eL5E8AEZMLediZgNZ0PW+JURyavPn9vkgdOE1FNG7AxPxKREJ mYTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aeSZojLU; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x9si51099389wrc.422.2019.01.22.11.00.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 22 Jan 2019 11:00:41 -0800 (PST) Received-SPF: pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=aeSZojLU; spf=pass (google.com: domain of grub-devel-bounces+patch=linaro.org@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="grub-devel-bounces+patch=linaro.org@gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:47396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm1Hs-0007SK-AU for patch@linaro.org; Tue, 22 Jan 2019 14:00:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm10x-0000sF-NS for grub-devel@gnu.org; Tue, 22 Jan 2019 13:43:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gm10o-0002VM-4H for grub-devel@gnu.org; Tue, 22 Jan 2019 13:43:07 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:55815) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gm10n-0002Ql-06 for grub-devel@gnu.org; Tue, 22 Jan 2019 13:43:01 -0500 Received: by mail-wm1-x341.google.com with SMTP id y139so15128372wmc.5 for ; Tue, 22 Jan 2019 10:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NID/xMVEQqFSuxLPkkLKQ9LnFUsi1uGZi5+ZBq9BH+0=; b=aeSZojLUvp2k/WDBtvESPO0CLckv2u0aXm+7ngxgH6+NuTOIsqtLh1rl80GkB1uqZo gxOYQ4yveNNUSeDV89MG5fvbWfPYm0jVmTZmP/7Fgc3ff9QmTB1ZaHVRusZ6zKv+Nk2J fXrX0NElZbdMoyi98YFWCAzo1cE6/FnU1G1vs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NID/xMVEQqFSuxLPkkLKQ9LnFUsi1uGZi5+ZBq9BH+0=; b=K7qjuYwSAeTTjrbA05hiub5X9W5cz+eiMCkKo436Fzrd6y/ur+c386sLAb4gAHaLr7 XiLMhMLhuT0os0ZpF1B2XhB5TvhifZ5y6oux/WrSj+6GENa/rpUcpw2Fk3Qwvo4sEujm xErQiDNT2kj1gx9LiVUPd7gjO/sVdeR5/EstXmbWKa2MdmdE6vsn07IjojjbaKp8iK3F ZrP7B/LRZ9L0gsyrhbletqHDaTludtnPZuwo3cUSY9f7r3Ou8DK+OAKpXtzHGuWJ9rRe ZPCSnUAjrHoeuzcGANhQFhBECFNiadUYBAS9QX3R5IrtTbIp7AjAxhb8S1cf1TVYT4LD 8ryg== X-Gm-Message-State: AJcUuke8JC9blE7mCgAqKq7ob1Ij1hrUqMH2Lp9WpMEuVnSZQzMaPFkn wYPqhqX4R7X+ryi0/lR1mGoY3H7bQ2A= X-Received: by 2002:a1c:8b44:: with SMTP id n65mr4729715wmd.104.1548176383393; Tue, 22 Jan 2019 08:59:43 -0800 (PST) Received: from vanye.hemma.eciton.net (cpc92302-cmbg19-2-0-cust304.5-4.cable.virginm.net. [82.1.209.49]) by smtp.gmail.com with ESMTPSA id x81sm55975618wmg.17.2019.01.22.08.59.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 08:59:42 -0800 (PST) From: Leif Lindholm To: grub-devel@gnu.org Subject: [PATCH] linux, efi, arm*, fdt: break FDT extra allocation space out into a #define Date: Tue, 22 Jan 2019 16:59:41 +0000 Message-Id: <20190122165941.3034-1-leif.lindholm@linaro.org> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The development of GNU GRUB Cc: Alexander Graf , Daniel Kiper MIME-Version: 1.0 Errors-To: grub-devel-bounces+patch=linaro.org@gnu.org Sender: "Grub-devel" 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 --- There are many possible locations for the #define. This one felt least bad. grub-core/loader/arm64/linux.c | 2 +- include/grub/fdt.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.11.0 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel diff --git a/grub-core/loader/arm64/linux.c b/grub-core/loader/arm64/linux.c index c37295c0b..7c6d8daa1 100644 --- a/grub-core/loader/arm64/linux.c +++ b/grub-core/loader/arm64/linux.c @@ -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; diff --git a/include/grub/fdt.h b/include/grub/fdt.h index 158b1bc4b..e609c7e41 100644 --- a/include/grub/fdt.h +++ b/include/grub/fdt.h @@ -22,6 +22,9 @@ #include #include +/* 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 {