From patchwork Mon Jul 4 17:43:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Harvey X-Patchwork-Id: 103146 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 78B8EB6F54 for ; Tue, 5 Jul 2011 03:43:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 17E3D28077; Mon, 4 Jul 2011 19:43:51 +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 e7rn0UaQJKuP; Mon, 4 Jul 2011 19:43:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 19F5A2807D; Mon, 4 Jul 2011 19:43:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 97F352807D for ; Mon, 4 Jul 2011 19:43:47 +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 uJxz7OounZzD for ; Mon, 4 Jul 2011 19:43:46 +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 mtxmxout3.matrox.com (mtxmxout3.matrox.com [138.11.2.93]) by theia.denx.de (Postfix) with ESMTP id 76BAB28077 for ; Mon, 4 Jul 2011 19:43:44 +0200 (CEST) Received: from venus.matrox.com (venus.matrox.com [192.168.1.30]) by mtxmxout3.matrox.com (Postfix) with ESMTP id 1386220A05 for ; Mon, 4 Jul 2011 13:43:44 -0400 (EDT) Received: (from ssmsp@localhost) by venus.matrox.com (8.14.4/8.13.2) id p64HhiGG007465 for u-boot@lists.denx.de; Mon, 4 Jul 2011 13:43:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by venus.matrox.com (Postfix) with ESMTP id C8FB1F4DB5 for ; Mon, 4 Jul 2011 13:43:43 -0400 (EDT) X-Virus-MTX-Scanned: by Matrox Virus scanner at venus.matrox.com Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by venus.matrox.com (Postfix) with ESMTP id A0E13F4E1D for ; Mon, 4 Jul 2011 13:43:43 -0400 (EDT) Received: from harvey-pc.matrox.com (dyn-152-116.matrox.com [192.168.152.116]) by pluton.matrox.com (Postfix) with ESMTP id 986207F45A for ; Mon, 4 Jul 2011 13:43:43 -0400 (EDT) Date: Mon, 4 Jul 2011 13:43:48 -0400 From: Christopher Harvey To: u-boot@lists.denx.de Message-ID: <20110704174348.GC3016@harvey-pc.matrox.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: [U-Boot] [PATCH 2/5] Added extra documentation about how the relocation address to RAM is picked for ARM. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Christopher Harvey --- doc/README.arm-relocation | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/doc/README.arm-relocation b/doc/README.arm-relocation index 5a9a2fb..954627d 100644 --- a/doc/README.arm-relocation +++ b/doc/README.arm-relocation @@ -22,7 +22,7 @@ At cpu level: modify linker file and add a relocation and fixup loop At board level: dram_init(): bd pointer is now at this point not accessible, so only - detect the real dramsize, and store it in gd->ram_size. Bst detected + detect the real dramsize, and store it in gd->ram_size. Best detected with get_ram_size(). TODO: move also dram initialization there on boards where it is possible. @@ -38,6 +38,13 @@ At lib level: Boards which are not fixed to support relocation will be REMOVED! +The code that picks the location in RAM for ARM can be found in the +arch/arm/lib/board.c file under the board_init_f function. +The postfix _f means executed from flash, and _r means from RAM. +The new location is picked with respect to the highest RAM address, and the +exact final value depends heavily on compile time options. The source is the +best documentation here. + ----------------------------------------------------------------------------- For boards which boot from nand_spl, it is possible to save one copy