cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kvam
Visitor
Visitor
8,040 Views
Registered: ‎02-10-2011

Linux freezes during boot on ML605

I'm encountering problems trying to get Linux to boot on a Virtex 6 Evaluation Kit (ML605) using Microblaze. I'm using Xilinx EDK 12.4 and have followed the instructions on xilinx.wikidot.com.

 

When I try to boot linux using XMD (connect mb mdm -> dow ... -> run), the console outputs the following statements and then freezes:

 

early_printk_console is enabled at 0x40401000
Ramdisk addr 0x00000003, Compiled-in FDT at 0xc021b1f0

 

I'm not sure whether my problem is due to my Microblaze configuration or due to a wrong setting in the Linux kernel configuration. I've attached my .config and .dts files.

 

In my hardware design, the DDR3 SDRAM is located at 0xE0000000 and I set the Kernal start address to 0xE1000000, since this is within the SDRAM range. I used sp605_le_defconfig as the starting point for my .config, since that appeared to be the closest to my design (although I'm not using the sp605). I've tried using xilinx_mmu_defconfig as a starting point for my .config, however that failed at the same point. I haven't done any significant changes after using menuconfig to set the kernel start address, so I think there must be something mismatching between my design and this config file.

 

Is there anything that appears wrong between the .dts and .config files?

 

Thanks!

0 Kudos
14 Replies
kvam
Visitor
Visitor
8,039 Views
Registered: ‎02-10-2011

Here is the Linux Kernel config file.

0 Kudos
kvam
Visitor
Visitor
8,038 Views
Registered: ‎02-10-2011

Here is the dts file.

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
8,026 Views
Registered: ‎09-10-2008

Did u run it with our reference system before you made your own system?

 

Getting a baseline is the best 1st.  Then move in small deltas.

 

I also would set the kernel configuration memory address to the start of memory 1st unless you know what you're doing.

 

Thanks.

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
8,022 Views
Registered: ‎09-10-2008

Looks like you went in a modifed the memory base address in the h/w system as the cache addresses in the device tree don't match.
That may be part of your problem also.
0 Kudos
kvam
Visitor
Visitor
8,020 Views
Registered: ‎02-10-2011

Hi John,

 

Which reference design should I be using test Linux?

 

Which cache addresses don't match? I needed to make the BRAM size 256 kb (for a reason unrelated to booting linux), so I changed the size by increasing the size in the Addresses tab in XPS. Aside from running the "Base System Builder" and "Configure IP" on Microblaze, I didn't do any changes to the HW design. If there's a problem in the dts, then I must not have properly configured the HW design.

 

When I initially tested booting linux, I was using 0xE0000000 as the base address. I tried testing kernel start addresses, and right now am using 0xE1000000. I can switch back to 0xE0000000.

 

Thanks for your help!

 

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
8,015 Views
Registered: ‎09-10-2008

The device tree is based on the h/w system, so you must have changed things.

 

d-cache-baseaddr = <0xc0000000>;
d-cache-highaddr = <0xffffffff>;
d-cache-line-size = <0x10>;
d-cache-size = <0x2000>;
device_type = "cpu";
i-cache-baseaddr = <0xc0000000>;
i-cache-highaddr = <0xffffffff>;
i-cache-line-size = <0x20>;
i-cache-size = <0x2000>;

There's a link to a system on the wiki page.

 

ML605

The ML605 is not the primary test platform, but was tested briefly. A reference design is provided by Xilinx at the following location.

http://www.xilinx.com/products/boards/v6embd/reference_designs.htm

0 Kudos
kvam
Visitor
Visitor
8,013 Views
Registered: ‎02-10-2011

So in my case I would look at the "AXI4 interconnect-based Reference Designs" for EDK 12.4, right? I got the impression that these designs were purely for tutorials, since it includes a SW and HW tutorial. Should I just pick the completed SW design and start from there?

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
8,010 Views
Registered: ‎09-10-2008

Yes, they are to help get you going quicker.

 

You can just add the device tree generator, gen a device tree, configure the kernel and it should boot.

0 Kudos
kvam
Visitor
Visitor
7,949 Views
Registered: ‎02-10-2011

Yes, the reference design worked correctly.

 

Since my Linux kernel configuration was the same (except for the different kernel start address), the reason my design failed must be related to the hw implementation. Is there anything in particular my design had that appeared wrong compared with the reference design (aside from the cache issue)?

0 Kudos
linnj
Xilinx Employee
Xilinx Employee
5,046 Views
Registered: ‎09-10-2008

You need to compare your MHS files and device tree files with the one that works.  At this point you have a baseline established, make small steps from there if you have to so that you can isolate the problem. 

 

I wish it was easier, but your building a complex system pretty easily.

 

Thanks.

0 Kudos
shakti4845
Newbie
Newbie
5,008 Views
Registered: ‎02-23-2011

Hi I have same problem if u got solution

 plz let me know my mail id shakti.tiwari@dexceldesigns.com

0 Kudos
kvam
Visitor
Visitor
5,003 Views
Registered: ‎02-10-2011

If I use the ML605 Reference design, then Linux boots correctly. I haven't determined what is the exact problem with my previous design (from the 1st post).

My testing with the reference design appears to indicate that my problem is probably related to the memory map. It appears that if I shift the base SDRAM address to a different value while leaving the other components at the same address (I tested 0xA0000000), Linux will fail to boot. Also, if I use an offset in the Linux base Address (0x41000000 instead of 0x40000000), then Linux will fail to boot. While there isn't really an explicit dependency between the Linux base address being 0x40000000 and the virtual address being 0xc0000000 in order to boot (assuming this corresponds to the FPGA design), shifting the location of SDRAM (and subsequently the Linux base address) appears to prevent the boot process with this reference design. My error (I see two outputs printing and then Linux freezes) is due to the Linux kernel freezing during Page Table allocation, and is definitely related to virtual/physical memory addresses. The normal boot time when everything was working correctly was around 10-15 seconds. Can someone confirm/elaborate on this?
0 Kudos
icefish711
Observer
Observer
4,903 Views
Registered: ‎07-26-2009

I got almost same problem in porting linux2.6.28 to virtex-II pro on powerpc. It seems relate to address map. since if I use default SDRAM Base address 0x0, then It can boot right. If I change SDRAM base address as 0xE0000000, then it has no output in console.

    I use make simpleImage.*....And I saw wrapper .txt in doucment in linux tree. It said simpleImage have RAM address map to 0 or has MMU off.

   have you solve this problem? Email me: pinglv08@yahoo.com.cn

0 Kudos
cyberwizzard
Adventurer
Adventurer
4,730 Views
Registered: ‎03-16-2010

The kernel boot procedure is sort of wonky and probably destroys your bootup:

The kernel starts to allocate pages up to the kernel head + 32MB - we found that setting the kernel at 16 MB from the end of the DDR results in memory access outside the DDR.

 

The memory will be cleared by the kernel starting from DDR start + 32MB. In our case the memory was at 0x40000000, the kernel was at 0x4f000000. At first it will not start because it writes into the 0x50000000 section, moving the kernel to 0x4e000000 solves that. However the clear will commence from 0x42000000 and erase the kernel - again resulting in a hangup.

 

Make sure you specify a memory address range in your DTS at which point your kernel will start as well. Make sure its 32MB in size or larger. Make sure the internal kernel address offset is set to that address as well.

 

If you deviate, you will have to modify the linux kernel in order to boot. You most definitely do not want to do that...

0 Kudos