[U-Boot-Users] Basic question during porting

Hi List,
I am trying to port u-boot to MCF5329/MCF5373 (target platform will have MCF5373, but I have a Cobra5329 for testing) and have some understanding problems.
I started from MCF5272/MCF5282 code (being somewhat confusing that both use very different style sometimes), and in include/configs/cobra5272.h there is the comment for CFG_SDRAM_BASE stating that this has to be "0". However, for the MCF53xx, I can not map the SDRAM to the address 0, I can only map it between 0x40000000 and 0x7FFFFFFF.
I could not yet see from where this limitation originates, but as it seems to be present in all architectures, I assume it is from u-boot itself. Can anybody give a short comment about this?
My understanding is that after start-up, (some?) code is copied from flash to internal RAM, then some peripherals or at least external memory is initialised, which can subsequently be used for further execution, so the problem should be "just" about linking and/or relocation, is this correct?
Thank you and best regards, Wolfgang

In message 45A3CFF0.2788.6AF657E@w.wegner.astro-kom.de you wrote:
I started from MCF5272/MCF5282 code (being somewhat confusing that both use very different style sometimes), and in include/configs/cobra5272.h there is the comment for CFG_SDRAM_BASE stating that this has to be "0". However, for the MCF53xx, I can not map the SDRAM to the address 0, I can only map it between 0x40000000 and 0x7FFFFFFF.
I could not yet see from where this limitation originates, but as it seems to be present in all architectures, I assume it is from u-boot itself. Can anybody give a short comment about this?
Probably many people just copy files arouind without adjusting the comments. The "RAM must be mapped at 0" comes from the time when this project was called PPCBoot, and the Linux kernel had exactly this limitation. Obviously it does not apply for ARM, MIPS, ... systems.
My understanding is that after start-up, (some?) code is copied from flash to internal RAM, then some peripherals or at least external memory is initialised, which can subsequently be used for further execution, so the problem should be "just" about linking and/or relocation, is this correct?
More or less, yes. U-Boot relocates itself (completley, i. e. not only parts) to RAM - whether this is internal or external RAM depends on your hardware resources, configuration ,etc.
Best regards,
Wolfgang Denk

On 9 Jan 2007 at 17:43, Wolfgang Denk wrote:
Probably many people just copy files arouind without adjusting the comments. The "RAM must be mapped at 0" comes from the time when this project was called PPCBoot, and the Linux kernel had exactly this limitation. Obviously it does not apply for ARM, MIPS, ... systems.
OK, I hope to adjust all the comments correctly... ;-)
Thank you for the other clarification, too - now I will see how far I can get.
Best regards, Wolfgang
participants (2)
-
w.wegner@astro-kom.de
-
Wolfgang Denk