[U-Boot-Users] Basic question during porting

Wolfgang Denk wd at denx.de
Tue Jan 9 17:43:01 CET 2007

In message <45A3CFF0.2788.6AF657E at 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

Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"There are some good people in it, but the orchestra as  a  whole  is
equivalent to a gang bent on destruction."      - John Cage, composer

More information about the U-Boot mailing list