From patchwork Mon Feb 28 11:46:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aneesh V X-Patchwork-Id: 239 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:06 -0000 Delivered-To: patches@linaro.org Received: by 10.224.19.208 with SMTP id c16cs91661qab; Mon, 28 Feb 2011 03:46:33 -0800 (PST) Received: by 10.100.124.11 with SMTP id w11mr2242485anc.140.1298893592933; Mon, 28 Feb 2011 03:46:32 -0800 (PST) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by mx.google.com with ESMTPS id 23si8127767ano.146.2011.02.28.03.46.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Feb 2011 03:46:32 -0800 (PST) Received-SPF: pass (google.com: domain of aneesh@ti.com designates 192.94.94.41 as permitted sender) client-ip=192.94.94.41; Authentication-Results: mx.google.com; spf=pass (google.com: domain of aneesh@ti.com designates 192.94.94.41 as permitted sender) smtp.mail=aneesh@ti.com Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p1SBkThj029487 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Feb 2011 05:46:31 -0600 Received: from localhost (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p1SBkSWB011821; Mon, 28 Feb 2011 17:16:28 +0530 (IST) From: Aneesh V To: u-boot@lists.denx.de Cc: aneesh@ti.com, x-loader@googlegroups.com, patches@linaro.org, john.rigby@linaro.org Subject: [PATCH 19/22] armv7: embed u-boot size within u-boot for use from SPL Date: Mon, 28 Feb 2011 17:16:28 +0530 Message-Id: <1298893591-17636-20-git-send-email-aneesh@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1298893591-17636-1-git-send-email-aneesh@ti.com> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> Embed the u-boot flash image size at a known offset from the start of u-boot so that SPL can use it while loading u-boot from a non-XIP media. Signed-off-by: Aneesh V --- arch/arm/cpu/armv7/start.S | 6 +++++- spl/board/ti/spl-omap.lds | 1 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index f5f08d9..1cbd128 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -64,8 +64,12 @@ _pad: .word 0x12345678 /* now 16*4=64 */ .global _end_vect _end_vect: +.global _u_boot_size +_u_boot_size: + .word 0xDEADBEEF + .word __flash_image_end - _start - .balignl 16,0xdeadbeef +.balignl 16,0xdeadbeef /************************************************************************* * * Startup Code (reset vector) diff --git a/spl/board/ti/spl-omap.lds b/spl/board/ti/spl-omap.lds index 27b5295..64eb4c9 100644 --- a/spl/board/ti/spl-omap.lds +++ b/spl/board/ti/spl-omap.lds @@ -50,6 +50,7 @@ SECTIONS .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram . = ALIGN(4); __image_copy_end = .; + __flash_image_end = .; .bss : {