[U-Boot] RFC: Aligning arch initialisation sequences

Wolfgang Denk wd at denx.de
Sun Nov 14 01:35:01 CET 2010


Dear Graeme Russ,

In message <4CDF2C8B.3060401 at gmail.com> you wrote:
>
> > You cannot and must not touch SDRAM in board_early_init_f(). And even
> > more, you must not at all run relocate_code() there!
> > 
> 
> See:
>  arch/powerpc/lib/board.c
>  arch/m68k/lib/board.c
>  arch/arm/lib/board.c
> 
> They all malloc the final global data structure, memcpy the temporary
> global data to the malloc'd global data, and call relocate_code passing a
> pointer to the new global data all at the very end board_init_f() and
> therefore after SDRAM has been initialised

Yes, and this is correct. board_init_f != board_early_init_f

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
We, the unwilling, led by the unknowing, are doing the impossible for
the ungrateful. We have done so much, for so long, with so little, we
are now qualified to do anything with nothing.


More information about the U-Boot mailing list