From patchwork Tue Jan 16 08:44:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 124620 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp940705lje; Tue, 16 Jan 2018 00:48:57 -0800 (PST) X-Google-Smtp-Source: ACJfBotTNkYuxT8mWwm8EQAFX/dftmKpgW0XbdEpLE8/SKcR8SLbzV1wUHwBJN7S7UBay+eP64Lm X-Received: by 10.80.179.14 with SMTP id q14mr53851610edd.251.1516092537451; Tue, 16 Jan 2018 00:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516092537; cv=none; d=google.com; s=arc-20160816; b=Uhpmv85E3wdu5DrVdMHuB3hP9orDHf8y560Ko39meLhGpOPZA6sMDY+eswJAanNDVu o5uvjExTCrmYHXN0LCDKTAHQp2EFSPKVQG3FIT7F84z6iPm2MAXs+Gj+Df7hPgseP6dg b42XXzKI5YxcGtRtQnF5QaADQ6bcPyJm6MTGAaKk2StIHySUk8tp3zIrzUrvpyZg76Fd d0wyE0+g6UnKyltYcladsqLAMAGCH/lGxLT1mjFzgTpx2/RT6216NyETKaEhDzcnKrwi N1Oo2uJ9+fKM5SwIDkgdw64jJcD4lSoBqmqzHE9UIHIi+c1z/nfAdMC/HX1CfOAXagqN 20gg== 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=zKP+COPpwt0/9ULrCAHYzMA55j3oG9hJNnGOQG88r4O/aR1BF6P7+jrvj2Ym0zlt6j +OfFdA1NF6nZASlgKaXCij6eYH7ddveSLbk+Y9oCCLlfIuuQkgU23ZaXm+ka5DIE9YD4 4117kYlybUaqup4wNXpT8w2uSTUcPFUqVi5cIMo4rC/7SYofX8oU7LnkJy/HNLxrqqzU gjMnIdvjdOL7IqDdQiGAPHxMwU79c/0Md6NXnJUK3CuZ7xHgaDWiQOODgsC2vsU+VhF5 jiRhJs38k75AY4izQj/vMzn4z81vanJMcTYiMjTfKu0TczFa5SHfUDvgEQrzyt8lJiK0 fCbQ== 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 g45si1803922edb.218.2018.01.16.00.48.57; Tue, 16 Jan 2018 00:48:57 -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 F1257C21E33; Tue, 16 Jan 2018 08:46:14 +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 458DDC21E1D; Tue, 16 Jan 2018 08:44:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F3A5FC21E1E; Tue, 16 Jan 2018 08:44:35 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 93AE7C21E30 for ; Tue, 16 Jan 2018 08:44:31 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 6E6D4208BD; Tue, 16 Jan 2018 09:44:30 +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 45613208B1; Tue, 16 Jan 2018 09:44:30 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 16 Jan 2018 09:44:24 +0100 Message-Id: <20180116084424.17801-13-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180116084424.17801-1-maxime.ripard@free-electrons.com> References: <20180116084424.17801-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 v2 12/12] 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