Hi Graeme, On Thu, Aug 9, 2012 at 1:33 AM, Graeme Russ <graeme.r...@gmail.com> wrote:
> > OK, this got me to thinking about the 'relocation' function in the driver > structure and how we can make the early heap more generic. My thoughts tie > into the DM tree structure being discussed in another thread... > [snip] > > Then in relocate_code() we call relocate_early_malloc() which simply walks > the relocation function list and calls each one. Each function is > responsible for allocating new memory form the final heap and copying the > data from the early heap to the newly allocated memory > > This way, anyone (not just drivers) can take advantage of the early heap. > And if a user of early heap does not care about the data being available > post relocation, they just don't bother implementing and registering a > relocation function. I am wandering how could it be implemented on certain platforms (ARM for instance) without wasting memory for blind copy of all data (even data that the user does not want to relocate afterwards) or without initializing real_malloc() and doing relocation when caches are still disabled. Maybe it is a technical detail now but it seems to me that some trade off in this situation might be needed. Tomas -- Tomáš Hlaváček <tmshl...@gmail.com> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot