From patchwork Thu Dec 21 12:40:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122556 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp835473qgn; Thu, 21 Dec 2017 04:46:38 -0800 (PST) X-Google-Smtp-Source: ACJfBoucwgenkkF19ZEqdyeK0sDfx03oFbJjcrDb9eQ7aQUfoG61nXtOU59SOYOXGYiFD44N3XiI X-Received: by 10.80.208.150 with SMTP id v22mr9815341edd.62.1513860398710; Thu, 21 Dec 2017 04:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513860398; cv=none; d=google.com; s=arc-20160816; b=H/SXqtdAYndTzHwjch61zJwTuwui8we+8OSwM/gUMsCeJg1+1At/1dkQquJOoksqqw EfNBYIuq1SK7tsKA5GLtbV3y2Ce4y48ge5pIKn+SDnXRCiF5JoZ/p6i5y6GqJKfiXLDF CPyPjik1+zf+NuaU9W3nrJx36LQ16m+39A6JmGRWh6hmo3psWo6w3Xi3/06NlV57+rpi nQzQBZiJpuadmUW7t8UewVb0YEP2nEAPPdcbSijXwmvrk6YY+zrN6s7E9zpKQB5aBjCI TVbGGnOwwx+PuH4cD94tzmS0lR+qFlsO6OrEBNcYNxVStIcVI2zEIvr7sANpAGMuw8mg Qojg== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:arc-authentication-results; bh=rKW+NpVWwDivWBu+zd/YA1EP1oRzYO1AoHhjQ6lLLmY=; b=jsFdZPYnYuuMXnFCAUHcMnLT06dhuA2tJpfn1OWyLQnb5hnwkmFxOzI+KnuWgJm7Mc Giwo8SPrzIqjjpks0U1Hipce+xpWyj8KrWccc+fomquZ763pj7IOxP2QQs5/IGrDhPW8 LA1EANPoLQGRMz8Ztb5mfEIcyp3MNVmHGLvUgUbj0jhNjRKLpJV4yibCBmxu8m/YKWib Lk/1Tr9nl5yZNDFwUfxgQViUr3XH/bw69dV8YDST0YbXeYU2sUrc/bU+RKGQKUJ3SFfX BEIs7UwtlTpOKjF3URQRbcIswy1Bt1l/UmmWkV7qlHg4syooi9lSoMjMLmhymRoVA3pb rpUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id a6si261351ede.158.2017.12.21.04.46.38; Thu, 21 Dec 2017 04:46:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 4DCB6C221E7; Thu, 21 Dec 2017 12:43:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A38CBC221D5; Thu, 21 Dec 2017 12:40:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3672FC221CC; Thu, 21 Dec 2017 12:40:41 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id DE5C5C221D2 for ; Thu, 21 Dec 2017 12:40:36 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 1AC5520964; Thu, 21 Dec 2017 13:40:36 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id E5DCA203B5; Thu, 21 Dec 2017 13:40:35 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Thu, 21 Dec 2017 13:40:30 +0100 Message-Id: <20171221124030.23721-12-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171221124030.23721-1-maxime.ripard@free-electrons.com> References: <20171221124030.23721-1-maxime.ripard@free-electrons.com> Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH 11/11] sunxi: Add limit with the MMC environment X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The MMC environment offset is getting very close to the end of the U-Boot binary now. Since we want to make sure this will not overflow, add a size limit in the board for arm64. arm32 has already that limit enforced in our custom image generation. Signed-off-by: Maxime Ripard --- include/configs/sunxi-common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 3855c564f914..6236e129a89d 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -147,6 +147,16 @@ #endif #if defined(CONFIG_ENV_IS_IN_MMC) + +#ifdef CONFIG_ARM64 +/* + * This is actually (CONFIG_ENV_OFFSET - + * (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)), but the value will be used + * directly in a makefile, without the preprocessor expansion. + */ +#define CONFIG_BOARD_SIZE_LIMIT 0x7e000 +#endif + #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 /* If we have two devices (most likely eMMC + MMC), favour the eMMC */ #define CONFIG_SYS_MMC_ENV_DEV 1