From: Wolfgang Denk Date: Fri, 03 Jan 2003 09:23:19 +0100 Subject: [U-Boot-Users] why jump at absolute address in start.S In-Reply-To: Your message of "Fri, 03 Jan 2003 11:47:22 +0800." <3E1507CA.7000305@sjtu.edu.cn> Message-ID: <20030103082324.47AF7C6139@atlas.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 In message <3E1507CA.7000305@sjtu.edu.cn> you wrote: > I'm reading cpu/mpc8xx/start.S and found the following: > > /* > * Calculate absolute address in FLASH and jump there > */ > > lis r3, CFG_MONITOR_BASE at h > ori r3, r3, CFG_MONITOR_BASE at l > addi r3, r3, in_flash - _start + EXC_OFF_SYS_RESET > mtlr r3 > blr > > Why do we need to calculate the absolutely address? We want to jump to the address where our ciode resides in flash memory, so we must calculate the jump target. > Why should we do it here, instead of everywhere? Please read the chapter of the 8xx User's Manual about how the processor starts from a reset. Best regards, and a Happy New Year! Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de How much net work could a network work, if a network could net work?