linux 2.6 hangs at __delay function on Viretx 4 board

John Linn John.Linn at xilinx.com
Sat May 17 02:28:04 EST 2008


Swamy,

Looks like the kernel is probably not running at all yet, may stuck in
early initialization.

1. Has the kernel ever ran on this board or is this development to get
it running?

I have ran into issues with the memory being setup incorrectly (the end
address/how much memory) and seen something similar to this. I would
review the bootstrap loader output carefully to ensure the memory is
setup correctly.

2. Not sure on the tools you are using to build it.  You mention the
EDK, but you must not be using it's compiler as it's not configured in
the EDK to build Linux. 

I use the ELDK 4.1 right now as we are still figuring out our tool
situation. 

3. Without a good JTAG emulator, bring up can be painful in my
experience.  The EDK GDB/XMD is not fully MMU aware, so once the MMU is
one it won't allow you to debug.  If you have access to an MMU aware
debugger that could help.

I have used BDI 2000 for these type of problems and it helped.

4. In the absense of an MMU debugger, using the UART to slam bytes out
of the serial port can help. The UART lite is easier for that as there's
no setup required. The kernel can map an MMU TLB so that the UART is
usable early, make sure that is setup in the early startup.  Then I just
use *(char *)<The UART xmt reg address> = <data byte> in the code to see
what it's doing.

5. I would probably see where the udelay is called early in the kernel
startup and why. I sometimes hack on it, comment stuff out, to get past
it and figure out more data.  Not always a good path, but can help.

Good luck,
John


-----Original Message-----
From: linuxppc-embedded-bounces+john.linn=xilinx.com at ozlabs.org
[mailto:linuxppc-embedded-bounces+john.linn=xilinx.com at ozlabs.org] On
Behalf Of swamydp
Sent: Friday, May 16, 2008 8:57 AM
To: linuxppc-embedded at ozlabs.org
Subject: RE: linux 2.6 hangs at __delay function on Viretx 4 board


John

Thanks for your suggestions.

 I looked up the virtual address for __log_buf in System.map and
subtracted
0xc0000000 to get the physical address. I then reset the processor from
XMD
and dump contents of the physical address of __log_buf using 'mrd'
command
from XMD. All I see is bunch of zeros in those locations.

I am debugging but do not have much clue.

Swamy



John Linn wrote:
> 
> Hi Swamy,
> 
> I have seen this sometime before I think, but don't remember why.
> 
> I see that udelay depends on loops_per_jiffy, have you looked to see
> what value it is? Maybe it's garbage and some large value?
> 
> Have you tried dumping the __log_buf to understand how far it got thru
> booting the kernel before it got hung?
> 
> I assume you must be using xmd to load the image, you can also use it
to
> dump the buffer.
> 
> On another processor I have seen it get hung in the calibrate_delay
call
> from the kernel if the interrupts or timer aren't working, but haven't
> ever seen that on the Powerpc.
> 
> Thanks,
> John
> 
> 
> -----Original Message-----
> From: linuxppc-embedded-bounces+john.linn=xilinx.com at ozlabs.org
> [mailto:linuxppc-embedded-bounces+john.linn=xilinx.com at ozlabs.org] On
> Behalf Of swamydp
> Sent: Tuesday, May 13, 2008 9:29 PM
> To: linuxppc-embedded at ozlabs.org
> Subject: linux 2.6 hangs at __delay function on Viretx 4 board
> 
> 
> 
> I am trying to boot linux 2.6 on HITECH virtex 4(fx60) board. Linux
> hangs at
> address 0xc00045ec which is in the __udelay function. I am using EDK
> 9.2i
> and gcc version 4.0.2 for compiling the kernel. The following is the
> boot
> message from the bootloader. 
> 
> loaded at:     00400000 0054E19C
> board data at: 0054C120 0054C19C
> relocated to:  00404064 004040E0
> zimage at:     00404E55 0054B5B4
> avail ram:     0054F000 02000000
> 
> Linux/PPC load: console=ttyS0,9600 console=tty0 root=/dev/sda2
> Uncompressing Linux...done.
> Now booting the kernel
> 
> Any help is greatly appreciated. I have run out of ideas to fix this.
> 
> Thanks
> swamy
> 
> -- 
> View this message in context:
>
http://www.nabble.com/linux-2.6-hangs-at-__delay-function-on-Viretx-4-bo
> ard-tp17222725p17222725.html
> Sent from the linuxppc-embedded mailing list archive at Nabble.com.
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
> 
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
> 
> 

-- 
View this message in context:
http://www.nabble.com/linux-2.6-hangs-at-__delay-function-on-Viretx-4-bo
ard-tp17222725p17276753.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded at ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.




More information about the Linuxppc-embedded mailing list