[U-Boot-Users] why jump at absolute address in start.S

Wolfgang Denk wd at denx.de
Fri Jan 3 09:23:19 CET 2003


In message <3E1507CA.7000305 at 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?




More information about the U-Boot mailing list