[U-Boot] [PATCH] arm: at91: support for the Calao USB-A9263 board (based on AT91SAM9263)

Andreas Bießmann andreas.devel at googlemail.com
Tue Oct 29 07:26:14 CET 2013


Dear Mateusz Kulikowski,

On 28.10.13 22:30, Mateusz Kulikowski wrote:
> Hi Bo Shen,
> 
> Thanks for the check, please see below.
> 
> On 28.10.2013 05:57, Bo Shen wrote:
>> Hi Mateusz Kulikowski,
>>    Add Andreas in loop.
>>
>> On 10/28/2013 03:34, Mateusz Kulikowski wrote:

>>> +
>>> +#define CONFIG_SYS_TEXT_BASE 0x23f00000
>>
>> This address should be considered as u-boot is top down map, so if
>> your system only 64MiB, there is only 1MiB left.
> 
> I don't understand something here:
> - this address is hardcoded in AT91bootstrap (as well as image size -
> 0x31000),
> 
> - I can change it, but it will not boot on "stock" board - should we force
> people to recompile AT91bootstrap if they want to use new U-Boot?
> or
> - Should I add low-level initialization to boot U-Boot from Dataflash
> without AT91bootstrap (this is a bit more work)?
> or
> - There is another way I'm not aware of (perhaps relocate U-Boot in RAM)?

The crux is that in fact u-boot is relocating u-boot in any case (the
most cases). It will place some stuff at the very top of the RAM (gd_t,
malloc arena, stack, ...) and calculate depending on some runtime values
(reserved ram, display vram, ...) where to place the resulting u-boot
image. The u-boot image will be placed right after the reserved place to
fill up the whole top of your RAM.
Therefore it depends on your compile time and runtime setup if there
will be an overlapping between running u-boot image and resulting place
when doing the relocation. It is likely to collide with the running
u-boot image while relocating if it is placed just 1MiB from top of the RAM.

We decided to change at91bootstrap and u-boot for to have another load
address for some boards in the past cause of real problems there. There
where strange errors like running system but crashing when using a
specific command.

I really recommend to leave a bit more space for u-boot runtime code to
do it's relocation ad therefore use a smaller ram location.
The best would be to get SPL working ASAP to have the setup of load
address in just one piece of code ... A long outstanding wish of mine,
but had no time to implement.

Bo and Heiko, could you both please post some RFC of your code to get
this in line?

Best regards

Andreas Bießmann


More information about the U-Boot mailing list