
3 Jan
2003
3 Jan
'03
9:23 a.m.
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@h ori r3, r3, CFG_MONITOR_BASE@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@denx.de
How much net work could a network work, if a network could net work?