From patchwork Fri May 31 18:18:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 248001 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 02D452C0084 for ; Sat, 1 Jun 2013 04:19:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CCC474A08E; Fri, 31 May 2013 20:19:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 9qyLEMGULJag; Fri, 31 May 2013 20:19:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 919794A02E; Fri, 31 May 2013 20:19:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD8364A028 for ; Fri, 31 May 2013 20:19:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 Xs76i53aZHvR for ; Fri, 31 May 2013 20:19:10 +0200 (CEST) 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 mail-qe0-f48.google.com (mail-qe0-f48.google.com [209.85.128.48]) by theia.denx.de (Postfix) with ESMTPS id EB6514A027 for ; Fri, 31 May 2013 20:19:02 +0200 (CEST) Received: by mail-qe0-f48.google.com with SMTP id 2so1107246qea.21 for ; Fri, 31 May 2013 11:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=KaZAaYd2LHxFOnt8gSBRSPsZnnOG85GC5bp7jACE8zE=; b=vLLmTlgkri18hPQgxNW/X+JO3rZ1kzgc0V9yGPER/aokl2LGVnFkzoS5deYI9Tgrw4 KejlHvVLe3BLlMZ80ZxubraLJ6DSn2WGMzuJBzatgsA8pCNH5SfCNpUU1Fxn9Pa4JKe4 qxt2rgrIfyyzbhMNWyNrji8Hbf8sn/f3BGTSjhPIQ+/krTsjLBadFQlXAi3gIQgbikvQ PSJwdDafiRiaiWSVjMmntDJBB68YBelRWe7lV9w4iJ0dQdiolDo8jjCJ1EvnBbNr/ZZ1 2mEt6GrFEfjb2bF5WUbYwK5mJXjOR5BPW+ml1EelG+bv5pf/RpU+6oFaR/0UB3TUQFyI U34Q== X-Received: by 10.224.198.194 with SMTP id ep2mr10107057qab.51.1370024340683; Fri, 31 May 2013 11:19:00 -0700 (PDT) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPSA id db3sm44112761qab.4.2013.05.31.11.18.59 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 May 2013 11:19:00 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Fri, 31 May 2013 14:18:58 -0400 Message-Id: <1370024339-28355-2-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370024339-28355-1-git-send-email-trini@ti.com> References: <1370024339-28355-1-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH 2/3] am33xx: Correct NON_SECURE_SRAM_START/END X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Prior to Sricharan's cleanup of the boot parameter saving code, we did not make use of NON_SECURE_SRAM_START on am33xx, so it wasn't a problem that the address was pointing to the middle of our running SPL. Correct to point to the base location of the download image area. Increase CONFIG_SPL_TEXT_BASE to account for this scratch area being used. As part of correcting these tests, make use of the fact that we've always been placing our stack outside of the download image area (which is fine, once the downloaded image is run, ROM is gone) so correct the max size test to be the ROM defined top of the download area to where we link/load at. Signed-off-by: Tom Rini Reviewed-by: Peter Korsgaard --- arch/arm/include/asm/arch-am33xx/omap.h | 4 ++-- include/configs/am335x_evm.h | 10 ++++++++-- include/configs/igep0033.h | 10 ++++++++-- include/configs/pcm051.h | 10 ++++++++-- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h index 7e3bb9c..db15159 100644 --- a/arch/arm/include/asm/arch-am33xx/omap.h +++ b/arch/arm/include/asm/arch-am33xx/omap.h @@ -29,8 +29,8 @@ * at 0x40304000(EMU base) so that our code works for both EMU and GP */ #ifdef CONFIG_AM33XX -#define NON_SECURE_SRAM_START 0x40304000 -#define NON_SECURE_SRAM_END 0x4030E000 +#define NON_SECURE_SRAM_START 0x402F0400 +#define NON_SECURE_SRAM_END 0x40310000 #elif defined(CONFIG_TI814X) #define NON_SECURE_SRAM_START 0x40300000 #define NON_SECURE_SRAM_END 0x40320000 diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index f019134..a4777c7 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -305,8 +305,14 @@ /* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_TEXT_BASE 0x402F0400 -#define CONFIG_SPL_MAX_SIZE (101 * 1024) +/* + * Place the image at the start of the ROM defined image space and leave + * space for SRAM scratch entries (see arch/arm/include/omap_common.h). + * We limit our size to the ROM-defined dowloaded image area, and use the + * rest of the space for stack. + */ +#define CONFIG_SPL_TEXT_BASE 0x402F0500 +#define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE) #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR #define CONFIG_SPL_BSS_START_ADDR 0x80000000 diff --git a/include/configs/igep0033.h b/include/configs/igep0033.h index 1912d7d..dd26d9c 100644 --- a/include/configs/igep0033.h +++ b/include/configs/igep0033.h @@ -214,8 +214,14 @@ /* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_TEXT_BASE 0x402F0400 -#define CONFIG_SPL_MAX_SIZE (101 * 1024) +/* + * Place the image at the start of the ROM defined image space and leave + * space for SRAM scratch entries (see arch/arm/include/omap_common.h). + * We limit our size to the ROM-defined dowloaded image area, and use the + * rest of the space for stack. + */ +#define CONFIG_SPL_TEXT_BASE 0x402F0500 +#define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE) #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR #define CONFIG_SPL_BSS_START_ADDR 0x80000000 diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h index 478f805..a7d01f1 100644 --- a/include/configs/pcm051.h +++ b/include/configs/pcm051.h @@ -204,8 +204,14 @@ /* Defines for SPL */ #define CONFIG_SPL #define CONFIG_SPL_FRAMEWORK -#define CONFIG_SPL_TEXT_BASE 0x402F0400 -#define CONFIG_SPL_MAX_SIZE (101 * 1024) +/* + * Place the image at the start of the ROM defined image space and leave + * space for SRAM scratch entries (see arch/arm/include/omap_common.h). + * We limit our size to the ROM-defined dowloaded image area, and use the + * rest of the space for stack. + */ +#define CONFIG_SPL_TEXT_BASE 0x402F0500 +#define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE) #define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR #define CONFIG_SPL_BSS_START_ADDR 0x80000000