[U-Boot] [PATCH] PPC: Record uboot's relocated address in RAM and show in bdinfo.
Richard Retanubun
RichardRetanubun at RuggedCom.com
Fri Jan 15 17:57:02 CET 2010
Detlev Zundel wrote:
<snip>
>
> Please excuse my ignorance, but why not simply remove the #ifdef
> CONFIG_AMIGAONEG3SE in board_init_f? Actually I was hoping to remove
> the Amigaone special case.
>
> Cheers
> Detlev
>
I prefer getting the data from board_init_r because we really are running from RAM at that point; dest_addr is a passed in function param.
In board_init_f, the addr variable is just what the calculated address is. If we must do the copy there I'd like to move the gd->relocaddr = addr to just before
the call to relocate_code, that way if the calculation code got reworked/refactored, we always copy the correct addr variable.
Plus the line: debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr); in board_init_r
Is the de-facto place where documentations that I've seen refer to for figuring out where u-boot is relocated, so making the assignment there
makes it clearer.
All these leads to my preference of getting it from board_init_r.
I'll be happy to submit a V2 that takes out the CONFIG_AMIGAONEG3SE copy operation in board_init_f
as well, but I can't confirm if that does not break the AMIGAONE board.
- Richard
More information about the U-Boot
mailing list