From patchwork Wed Mar 1 02:25:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 734010 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3vXzz63b7qz9s81 for ; Wed, 1 Mar 2017 13:33:54 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 32529C21EF3; Wed, 1 Mar 2017 02:27:34 +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 427CCC21D37; Wed, 1 Mar 2017 02:26:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 02F01C21CD7; Wed, 1 Mar 2017 02:26:35 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by lists.denx.de (Postfix) with ESMTP id E0FADC21CE1 for ; Wed, 1 Mar 2017 02:26:28 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4EA97344; Tue, 28 Feb 2017 18:26:28 -0800 (PST) Received: from slackpad.lan (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9057B3F3E1; Tue, 28 Feb 2017 18:26:25 -0800 (PST) From: Andre Przywara To: Maxime Ripard , Jagan Teki , Simon Glass , Tom Rini Date: Wed, 1 Mar 2017 02:25:21 +0000 Message-Id: <1488335129-12363-10-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1488335129-12363-1-git-send-email-andre.przywara@arm.com> References: <1488335129-12363-1-git-send-email-andre.przywara@arm.com> Cc: Philipp Tomsich , linux-sunxi@googlegroups.com, Michal Simek , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 09/17] sunxi: A64: move SPL stack to end of SRAM A2 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 SPL stack is usually located at the end of SRAM A1, where it grows towards the end of the SPL. For the really big AArch64 binaries the stack overwrites code pretty soon, so move the SPL stack to the end of SRAM A2, which is unused at this time. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass --- include/configs/sunxi-common.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 5fe886b..37c4a4d 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -186,7 +186,12 @@ #ifdef CONFIG_SUNXI_HIGH_SRAM #define CONFIG_SPL_TEXT_BASE 0x10040 /* sram start+header */ #define CONFIG_SPL_MAX_SIZE 0x7fc0 /* 32 KiB */ +#ifdef CONFIG_ARM64 +/* end of SRAM A2 for now, as SRAM A1 is pretty tight for an ARM64 build */ +#define LOW_LEVEL_SRAM_STACK 0x00054000 +#else #define LOW_LEVEL_SRAM_STACK 0x00018000 +#endif /* !CONFIG_ARM64 */ #else #define CONFIG_SPL_TEXT_BASE 0x40 /* sram start+header */ #define CONFIG_SPL_MAX_SIZE 0x5fc0 /* 24KB on sun4i/sun7i */