[U-Boot] Instructions in TEXT section can not load data from other section

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Mar 17 09:48:42 CET 2010


jrjr <jason622 at hotmail.com> wrote on 2010/03/17 09:45:08:
>
> And I have made some change in cpu/mpc8260/start.S, I removed following lines:
>
> #ifndef CONFIG_SYS_RAMBOOT
>     /* When booting from ROM (Flash or EPROM), clear the        */
>     /* Address Mask in OR0 so ROM appears everywhere        */
>     /*--------------------------------------------------------------*/
>
>     lis    r3, (CONFIG_SYS_IMMR+IM_REGBASE)@h
>     lwz    r4, IM_OR0 at l(r3)
>     li    r5, 0x7fff
>     and    r4, r4, r5
>     stw    r4, IM_OR0 at l(r3)
>
>     /* Calculate absolute address in FLASH and jump there        */
>     /*--------------------------------------------------------------*/
>
>     lis &nbs p;  r3, CONFIG_SYS_MONITOR_BASE at h
>     ori    r3, r3, CONFIG_SYS_MONITOR_BASE at l
>     addi    r3, r3, in_flash - _start + EXC_OFF_SYS_RESET
>     mtlr    r3
>     blr
>
> in_flash:
> #endif    /* CONFIG_SYS_RAMBOOT */
>
> Becasue I don't think I need to clear the Address Mask in OR0, Is there anything wrong?

uhh, Why did you remove that? It is vital code, especially the
/* Calculate absolute address in FLASH and jump there  */ part.



More information about the U-Boot mailing list