From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 16 Dec 2010 10:58:17 +0100 Subject: [U-Boot] [PATCH 1/1] armv7: start.S: Fix relocation address caculation In-Reply-To: References: <1292421479-2269-1-git-send-email-r64343@freescale.com> <4D08F5AE.2000009@free.fr> <4D09D601.7010702@free.fr> Message-ID: <4D09E2B9.5030405@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 16/12/2010 10:18, Jason Liu a ?crit : > Hi, Albert, > > 2010/12/16 Albert ARIBAUD: >> Le 16/12/2010 04:04, Jason Liu a ?crit : >>> >>> Hi, Albert, >>> >>> 2010/12/16 Albert ARIBAUD: >>>> >>>> Hi Jason, >>>> >>>> Le 15/12/2010 14:57, Jason Liu a ?crit : >>>>> >>>>> There will have issue if the _start not equal TEXT_BASE >>>>> when enable relocation. >>>> >>>> In what case does this happen? >>> >>> Some ARM SOC ROM need run the plug-in code first in IRAM and the >>> plugin-in code need appear at the beginning of the u-boot. ROM will >>> check the plugin-in header to do security check and run the plug-in >>> code to init the DDR etc. In this case the _start will be not the same >>> as TEXT_BASE. >> >> I still don't see why u-boot would not end up where specified. >> >> The fact that there is a "plug-in" (I assume it's what I would call an IPL) >> does not change the fact that its payload (u-boot) can and will be loaded >> where specified, i.e. at TEXT_BASE -- and if it is loaded elsewhere, it is >> at a fixed address, so TEXT_BASE can be adjusted) All IPLs that I know of >> put their payload where specified. > > It's not an IPL. The layout is that as the following, > > ---- ----- TEXT_BASE > plug-in > ---------- _start > > ---------- _end > > No matter what you adjusted the TEXT_BASE, the _star is not equal to it. > > The fix doe not affect the original functionality but just make it > more flexible. This layout is not that of u-boot for ARM; the fix thus corrects a fault not inherent to u-boot but introduced by inserting this "plug-in" where it should not be. Why must you modify the original layout? Also, what is this 'plug-in' if it is not an IPL? Amicalement, -- Albert.