
In message 4554AB0E.7000805@freescale.com you wrote:
So gd initially lives in cache? I don't see in the README where it says where gd_t is initially allocated, but I do see this in the code:
This depends on the architecture. It may be cache, or some on-chip memory, or some SRAM, or whatever is available on a board that works as RAM without specific initialization.
However, it looks like there's some redundancy in this. Couldn't the variable disable_of perform the same function? Or even better, couldn't we just check
No, it cannot. Because the change was done a long time ago in the 2.4 kernel tree, somewhere around 2.4.5-pre5. Using a 2.4.4 kernel or a 2.4.5 kernel require different clock encoding (one in MHz, the other in Hz). This does not depend on any OF stuff at all.
whether a pointer to an OF tree is passed to the bootm parameter? If the user includes an OF tree on the bootm command line, then boot an OF kernel. Otherwise, convert the frequency values to MHZ and boot a traditional kernel.
It seems you did not read much of the documentation.
Speaking of do_bootm_linux(), why is the PPC version of this function in cmd_bootm.c instead of lib_ppc/ppc_linux.c?
For historical reasons. We started with PPC only, so it was natural to have this in cmd_bootm.c. Other architectures placed theit code somewhere else, but nobody changed the PPC code.
Best regards,
Wolfgang Denk