<br><br><div class="gmail_quote">On Tue, May 5, 2009 at 5:28 PM, Jason Wessel <span dir="ltr"><<a href="mailto:jason.wessel@windriver.com">jason.wessel@windriver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">srikanth krishnakar wrote:<br>
> Hi all,<br>
><br>
> Target : PowerPC, Virtex-440 Generic<br>
> Serial port : Xilinx 16550 Uart ( depends on OF_PLATFORM)<br>
><br>
> Further investigation of KGDBOC on PowerPC shows that kgdboc hangs at :<br>
><br>
> In file : arch/powerpc/include/asm/kgdb.h<br>
><br>
> *static inline void* arch_kgdb_breakpoint(*void*)<br>
> {<br>
> *asm*(*".long 0x7d821008"*); /* *twge r2, r2 **/ * << ----<br>
> KGDBOC Hangs here* * << ---*<br>
><br>
><br>
> -----------------------------------------<br>
> Debug Log:<br>
><br>
> root@10.1.2.55:~# echo g ><br>
> /proc/sysrq-trigger<br>
> SysRq :<br>
> GDB<br>
><br>
> 1------------------------>sysrq_handle_gdb<br>
><br>
> Entering KGDB<br>
> 1-1----------------------->kgdb_breakpoint<br>
> 1-2----------------------->kgdb_breakpoint<br>
> 1-3----------------------->kgdb_breakpoint<br>
> 1-1----------------------->arch_kgdb_breakpoint<br>
><br>
> ---------------------------------------------<br>
><br>
><br>
> Any comments or suggestions ????<br>
><br>
<br>
</div>I had used the 2.6.30-rc3 kernel with the PowerPC 604 system I have and<br>
it was working fine, but the 4xx archs are a bit different.<br>
<br>
What happens next after you execute the inline assembly is that an<br>
exception occurs, and that is the point that the kgdb entry will<br>
actually execute. IE:<br>
<br>
arch/powerpc/kernel/traps.c<br>
<br>
program_check_exception()<br>
<br>
>From there kgdb should be entered and the I/O driver gets activated.<br>
You could put another printk in kgdb_handle_exception() in kernel/kgdb.c<br>
to make sure it actually gets there.<br>
<br>
Generally when the system hangs hard on an initial entry to kgdb it<br>
means there is a problem with the I/O polling driver or there is<br>
something else eating the kgdb exception and the kgdb exception handler<br>
was never fired in the first place.<br>
<font color="#888888"><br>
Jason.<br>
</font></blockquote></div><br>Hi Jason,<br><br>Re attempted with inserting a printk in kernel/kgdb.c kgdb_handle_exception() function but seems the kgdb exception has never occurred !!<br><br>------------------<br><span style="background-color: rgb(204, 204, 204);">Debug Log:</span><br>
<br><font size="1">root@10.1.2.55:~# echo g > /proc/sysrq-trigger<br>SysRq : GDB<br>1------------------------>sysrq_handle_gdb<br>Entering KGDB<br>1-1----------------------->kgdb_breakpoint<br>1-2----------------------->kgdb_breakpoint<br>
1-3----------------------->kgdb_breakpoint<br>1-1----------------------->arch_kgdb_breakpoint<br><br><br>(gdb) target remote /dev/ttyS0<br>Remote debugging using /dev/ttyS0<br>Ignoring packet error, continuing...<br>
warning: unrecognized item "timeout" in "qSupported" response<br>Ignoring packet error, continuing...<br>Ignoring packet error, continuing...</font><br><br>-------------------<br><br><span style="background-color: rgb(204, 204, 204);">Inserted printk's in kernel kgdb.c :</span><br>
<font size="1">int<br><span style="color: rgb(153, 0, 0);">kgdb_handle_exception(int evector, int signo, int ecode, struct pt_regs *regs)</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">{</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">printk("1------------------------>%s\n",__FUNCTION__);</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> if (kgdb_reenter_check(ks)) {</span></font><br>
-----------------------------<br><br><b><span style="color: rgb(255, 0, 0);">Does the PowerPC uses PowerPC64 hooks ??</span></b><br style="color: rgb(255, 0, 0);"><br>as seen below from arch/powerpc/kernel/kgdb.c<br><br><span style="color: rgb(153, 0, 0);">/* KGDB functions to use existing PowerPC64 hooks. */</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">static int kgdb_debugger(struct pt_regs *regs)</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">{</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);"> printk("1------------------------>%s\n",__FUNCTION__);</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);"> return <b><span style="color: rgb(0, 0, 0);">kgdb_handle_exception</span></b>(0, computeSignal(TRAP(regs)), 0, regs);</span><br><br>-------------------------------<br><br><br>Thanks For your co-operation, patience and help.<br>
<br><br>Regards<br>Srikanth <br>**********<br>