From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Wed, 06 Jul 2011 23:29:08 +0200 Subject: [U-Boot] [PATCH 2/5] Added extra documentation about how the relocation address to RAM is picked for ARM. In-Reply-To: <20110706205857.GB2168@harvey-pc.matrox.com> References: <20110704174348.GC3016@harvey-pc.matrox.com> <20110704194324.321C015794D9@gemini.denx.de> <20110706205857.GB2168@harvey-pc.matrox.com> Message-ID: <20110706212908.7776A15794CF@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Christopher Harvey, In message <20110706205857.GB2168@harvey-pc.matrox.com> you wrote: > > > Also delete "for ARM", and s/arm//. This is not ARM specific. > > I don't understand, I found the following snippet in > arch/arm/lib/board.c > > --addr defined and set here-- > > gd->relocaddr = addr; > gd->start_addr_sp = addr_sp; > gd->reloc_off = addr - _TEXT_BASE; > debug ("relocation Offset is: %08lx\n", gd->reloc_off); > memcpy (id, (void *)gd, sizeof (gd_t)); > > relocate_code (addr_sp, id, addr); > /* NOTREACHED - relocate_code() does not return */ > > Running grep -R gd->relocaddr *, > I found similar assignments for various architectures. Yes, that's what I said: this is not ARM specific, it is supposed to be common code used by all architectures (except for the sad fact that there are several non-conforming implementations). But if we document it, we should document the nominal state. [If in doubt, use the powerpc implementation as reference.] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "It is better to have tried and failed than to have failed to try, but the result's the same." - Mike Dennison