Dear Graeme Russ, In message <4cdf36e3.7060...@gmail.com> you wrote: > > board_early_init_f() is (in most cases) the very first entry in the > init_sequence[]
Right. > So if global data is defined on the stack in board_init_f() and copied to > the heap at the end of board_init_f() we should be OK. Is global data > needed prior to board_init_f()? Yes, as we have no writable data segmeit before relocation. We need a way to pass around some data. > For x86, I allocate global data in asm and set three members. The sticking > point for me is the single ulong parameter to board_init_f() which does not > present enough flexibility to pass all the information I need. Pass a pointer to a struct ? > One nit-pick is that, in reality, the stack space used by board_init_f() is > never reclaimed because it never returns. What we could do is reset the > stack pointer prior to calling board_init_r() This is not correct. After relocation, we set up a completely new stack in RAM. 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: w...@denx.de Remember thee Ay, thou poor ghost while memory holds a seat In this distracted globe. Remember thee! Yea, from the table of my memory I'll wipe away all trivial fond records, All saws of books, all forms, all pressures past, That youth and observation copied there. Hamlet, I : v : 95 William Shakespeare _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot