[U-Boot] Problem in relocate_code on Xilinx FPGA

Grant Likely grant.likely at secretlab.ca
Sat Apr 18 17:17:08 CEST 2009


On Sat, Apr 18, 2009 at 6:08 AM, Jerry Van Baren <gvb.uboot at gmail.com> wrote:
> Seyyed Mohammad Sajjadi wrote:
>> Hi
>>
>> I am trying to use u-boot on a Xilinx V4FX12 FPGA, in which a ppc405
>> system is running. The board includes an ST SPI Flash, which I have
>> to use as the only non-volatile memory available (in case important,
>> its Atmark Techno suzaku_v sz410).
>>
>> I have been able to add the board configuration in u-boot and build
>> an image. But, as ppc405 in xilinx fpga can't but from spi flash, I
>> have to use a first stage bootloader to load u-boot. This seems to be
>> normal in xilinx FPGAs as u-boot in petalinux is loaded to. I
>> thaught, if that's the case, I should be able to load u-boot directly
>> to DDR and test it. But when I do so, u-boot hangs after it reaches
>> relocate_code. I should be missing sth, but don't find it. Could
>> anybody help me?
>
> Hi Seyyed,
>
> I'm not familiar with your hardware (including using the ppc405), but if
> I understand you correctly, you are trying to manually (e.g. via a
> debugger) load a test u-boot into DDR and then run it from there.
>
> The typical problem with this approach is that your code does the DDR
> initialization *while running out of DDR*.  While DDR is being
> initialized, it doesn't work as RAM, which causes your program to crash.

Probably not the case here.  The Virtex is an interesting platform
because DDR is already configured when the processor comes out of
reset.  The software doesn't even have the ability to modify the DDR
configuration.

> You need to find all of your DDR and processor initialization that
> causes u-boot initialization to crash, and disable it.  There are board
> configurations that do this with #if constructs, but I don't remember
> which ones.

This should already be the case for Virtex.

Seyyed, what you are trying to do is also already done for
ml507_config.  Try looking at that code for hints.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the U-Boot mailing list