In message <[EMAIL PROTECTED]> you wrote: > > I think the register approach is needed if we ever want to > make u-boot fully relocateable.
Good point. > There are a few global data accesses that needs to be fixed > before that can happen though. There should not be any global data > accesses before relocate_code has done its thing. One of the > first things that happens in board_init_f is: > for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { > if ((*init_fnc_ptr) () != 0) { > hang (); > } > } > init_sequence is a global variable. > > Is this table really needed? Why not move it inside board_init_f and > save some bytes? The original idea of the table was that a user could provide (in his board config file) a private version to allow for easy, #ifdef free board specific initialization sequences. Unfortunately I never found the time or resources to complete this. > The next is access is env_get_char, this probably needs to move into GD. > > I figured global data accesses wasn't allowed(other than GD) at all > before relocate_code()? They are not exactly forbidden, you just have to know exactly what you can expect - i. e., usually they just don't make much sense ;-) 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: [EMAIL PROTECTED] "I refuse to have a battle of wits with an unarmed person." ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users