From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <3bd6b93c0905040742m64e1ef73i102106ca002236b2@mail.gmail.com> References: <6213bc560905040417p48d3f12co608b885482998e06@mail.gmail.com> <6213bc560905040613q3cec9730idece67c1caf67112@mail.gmail.com> <3bd6b93c0905040742m64e1ef73i102106ca002236b2@mail.gmail.com> Date: Tue, 5 May 2009 15:05:24 +0530 Message-ID: <6213bc560905050235l7fd05dfay9938d6600ab5339e@mail.gmail.com> Subject: Re: KGDBOC testing on linux-2.6.30-rc4 From: srikanth krishnakar To: kgdb-bugreport@lists.sourceforge.net Content-Type: multipart/alternative; boundary=000e0cd14ed894ddc2046926ff1d List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --000e0cd14ed894ddc2046926ff1d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all, Target : PowerPC, Virtex-440 Generic Serial port : Xilinx 16550 Uart ( depends on OF_PLATFORM) Further investigation of KGDBOC on PowerPC shows that kgdboc hangs at : In file : arch/powerpc/include/asm/kgdb.h *static inline void* arch_kgdb_breakpoint(*void*) { *asm*(*".long 0x7d821008"*); /* *twge r2, r2 **/ * << ---- KGDBOC Hangs here* * << ---* ----------------------------------------- Debug Log: root@10.1.2.55:~# echo g > /proc/sysrq-trigger SysRq : GDB 1------------------------>sysrq_handle_gdb Entering KGDB 1-1----------------------->kgdb_breakpoint 1-2----------------------->kgdb_breakpoint 1-3----------------------->kgdb_breakpoint 1-1----------------------->arch_kgdb_breakpoint --------------------------------------------- Any comments or suggestions ???? -Srikanth ---------- On Mon, May 4, 2009 at 8:12 PM, Bruce Ashfield wrote: > On Mon, May 4, 2009 at 9:13 AM, srikanth krishnakar > wrote: > > > > > > Hi all, > > > > I need help in kgdboc testing on PowerPC target. > > Have you tried contacting the maintainer ? (I noticed that Jason > wasn't cc'd), just in case it isn't simply a use case problem and > might be related to KGDB internals. > > KGDB > P: Jason Wessel > M: jason.wessel@windriver.com > > I've tested KGDBOC up to the 2.6.29 kernel and it worked fine > on a series of 85xx boards. I haven't had a chance on 2.6.30-rcX > yet, so something may have changed. > > > > > Linux Kernel: 2.6.30-rc4 > > KGDB method : KGDBOC > > Arch: PowerPC > > > > Note: Attached is the kernel config used. > > > > Has anyone tested KGDBOC for Serial 8250, and the serial port has > dependency > > on OF_PLATFORM driver ? > > > > Here are the kernel config options: > > > > Device Drivers ---> > > Character devices ---> > > Serial drivers ---> > > <*> 8250/16550 and > > compatible serial support > > [*] Console on > > 8250/16550 and compatible serial port > > (4) Number of > > 8250/16550 serial ports to register at runtime > > [ ] Extended > 8250/16550 > > serial driver options > > *** Non-8250 serial > > port support *** > > <*> Xilinx uartlite > > serial port support > > [*] Support for > > console on Xilinx uartlite serial port > > < > Digi > International > > NEO PCI Support > > <*> Serial port on > Open > > Firmware platform bus > > < > NWP serial port > > driver > > > > Kernel hacking ---> > > -*- Magic SysRq key > > [*] Kernel debugging > > [*] KGDB: kernel debugging with remote gdb > ---> > > --- KGDB: kernel debugging with remote > > gdb > > <*> KGDB: use kgdb over the serial console > > > > > > ---------------------------------------------- > > In the process : > > > > On the target side : > > > > ............... > > Serial: 8250/16550 driver, 4 ports, IRQ > sharing > > disabled > > 83e00000.serial: ttyS0 at MMIO 0x83e01003 > (irq > > = 16) is a > > 16550A > > console [ttyS0] > > enabled > > kgdb: Registered I/O driver kgdboc. > > ................. > > > > root@10.161.2.35:~# echo g > > /proc/sysrq-trigger > > SysRq : GDB > > Entering KGDB > > > > > > On host side : > > > > [root@srikant linux-2.6]# > powerpc-linux-gnu-gdb > > vmlinux-puru > > GNU gdb G++ 4.3-150) 6.8.50.20081022-cvs > > Copyright (C) 2008 Free Software Foundation, > Inc. > > License GPLv3+: GNU GPL version 3 or later > > > > This is free software: you are free to change > and > > redistribute it. > > There is NO WARRANTY, to the extent permitted > by > > law. Type "show copying" > > and "show warranty" for details. > > This GDB was configured as > > "--host=i686-pc-linux-gnu --target=powerpc-linux-gnu". > > For bug reporting instructions, please see: > > (gdb) set remotebaud 9600 > > (gdb) target remote /dev/ttyS0 > > Remote debugging using /dev/ttyS0 > > Ignoring packet error, continuing... > > warning: unrecognized item "timeout" in > > "qSupported" response > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Ignoring packet error, continuing... > > Malformed response to offset query, timeout > > I'm wondering if there is a GDB protocol mismatch and your > version of GDB is sending packets that KGDB can't handle. > I'm no where near an expert on GDB's protocol and won't know > if I'm seeing the same thing until I try 2.6.30-rc > > Bruce > > > > > Can anybody comment on the steps followed in the process of testing or > > something is missing with respect to of_serial.c for powerpc > architecture. > > Seems the target has never responded for gdb requests !!! > > > > > > Regards > > Srikanth > > > > > > > > > > _______________________________________________ > > Linuxppc-dev mailing list > > Linuxppc-dev@ozlabs.org > > https://ozlabs.org/mailman/listinfo/linuxppc-dev > > > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end" > -- "The Good You Do, The Best You GET" Regards Srikanth Krishnakar ********************** --000e0cd14ed894ddc2046926ff1d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

Target : PowerPC, Virtex-440 Generic
Serial port : Xilinx 16550 Uart ( depends on OF_PLATF= ORM)

Further investigation of KGDBOC on PowerPC shows that kg= dboc hangs at :

In file : arch/po= werpc/include/asm/kgdb.h

static inline void arch_kgdb_breakpoint(void)
{
=A0=A0=A0=A0=A0=A0=A0 asm(".long 0x7d821008"); /* twge r2, r2 */=A0=A0=A0=A0=A0 << ---- K= GDBOC Hangs here=A0 << ---


-----------------------------------------
Debug Log:

root@= 10.1.2.55:~# echo g > /proc/sysrq-trigger=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
SysRq : GDB=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0
1------------------------>sysrq_handle_gdb= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0
Entering KGDB=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0
1-1----------------------->kgdb_breakpoint=A0=A0=A0= =A0=A0=A0
1-2----------------------->kgdb_= breakpoint=A0=A0=A0=A0=A0=A0
<= span style=3D"color: rgb(51, 51, 51);">1-3----------------------->kgdb_b= reakpoint=A0=A0=A0=A0=A0=A0
1-1----------------------->arch_= kgdb_breakpoint=A0

-----------------------------------------= ----


Any comments or suggestions ????

-Srikanth
------= ----

On Mon, May 4, 2009 at 8:12 PM, Bruce Ashfie= ld <bruce.= ashfield@gmail.com> wrote:
On Mon, May 4, 2009 at 9:13 AM, srikanth krishnakar
<skrishnakar@gmail.com> = wrote:
>
>
> Hi all,
>
> I need help in kgdboc=A0 testing on PowerPC target.

Have you tried contacting the maintainer ? (I noticed that Jason
wasn't cc'd), just in case it isn't simply a use case problem a= nd
might be related to KGDB internals.

KGDB
P: =A0 =A0 =A0Jason Wessel
M: =A0 =A0 =A0jason.wessel@wi= ndriver.com

I've tested KGDBOC up to the 2.6.29 kernel and it worked fine
on a series of 85xx boards. I haven't had a chance on 2.6.30-rcX
yet, so something may have changed.

>
> Linux Kernel: 2.6.30-rc4
> KGDB method : KGDBOC
> Arch: PowerPC
>
> Note: Attached is the kernel config=A0 used.
>
> Has anyone tested KGDBOC for Serial 8250, and the serial port has depe= ndency
> on OF_PLATFORM driver ?
>
> Here are the kernel config options:
>
> Device Drivers=A0 --->
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Character devices=A0 --->
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Serial drivers=A0 = --->
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 <*> 8250/16550 and
> compatible serial support
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 [*]=A0=A0 Console on
> 8250/16550 and compatible serial port
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (4) Number of
> 8250/16550 serial ports to register at runtime
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 [ ] Extended 82= 50/16550
> serial driver options
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 *** Non-825= 0 serial
> port support ***
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 <*> Xil= inx uartlite
> serial port support
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 [*]=A0=A0 Sup= port for
> console on Xilinx uartlite serial port
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 < > Digi International
> NEO PCI Support
> =A0 =A0 =A0 =A0 =A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 <*> Serial port on= Open
> Firmware platform bus
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &l= t; > NWP serial port
> driver
>
> Kernel hacking=A0 --->
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 -*- Magic SysRq key
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [*] Ke= rnel debugging
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 [*] KGDB: kernel debugging with remote gdb=A0 --->
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 --- KGDB: kernel debugging with remote
> gdb
> =A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 <*> KGDB: use kgdb over the serial console
>
>
> ----------------------------------------------
> In the process :
>
> =A0=A0=A0 On the target side :
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 ...............
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 Serial: 8250/16550 driver, 4 ports, IRQ sharing
> disabled
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 83e00000.serial: ttyS0 at MMIO 0x83e01003 (irq
> =3D 16) is a
> 16550A
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 console [ttyS0]
> enabled
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 kgdb: Registered I/O driver kgdboc.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 .................
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 root@10.161.2.35:~# echo g > /proc/sysrq-trigger
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 SysRq : GDB
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 Entering KGDB
>
>
> =A0 On host side :
>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 [root@srikant linux-2.6]# powerpc-linux-gnu-gdb
> vmlinux-puru
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 GNU gdb G++ 4.3-150) 6.8.50.20081022-cvs
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 Copyright (C) 2008 Free Software Foundation, Inc.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 License GPLv3+: GNU GPL version 3 or later
> <htt= p://gnu.org/licenses/gpl.html>
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 This is free software: you are free to change and
> redistribute it.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 There is NO WARRANTY, to the extent permitted by
> law.=A0 Type "show copying"
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 and "show warranty" for details.
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 This GDB was configured as
> "--host=3Di686-pc-linux-gnu --target=3Dpowerpc-linux-gnu". > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 For bug reporting instructions, please see:
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 (gdb) set remotebaud 9600
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 (gdb) target remote /dev/ttyS0
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 Remote debugging using /dev/ttyS0
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Ignoring packet error, continuing...
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 warning: unrecognized item "timeout" in
> "qSupported" response
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Ignoring packet error, continuing...
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Ignoring packet error, continuing...
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Ignoring packet error, continuing...
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Ignoring packet error, continuing...
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Ignoring packet error, continuing...
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 Malformed response to offset query, timeout

I'm wondering if there is a GDB protocol mismatch and your<= br> version of GDB is sending packets that KGDB can't handle.
I'm no where near an expert on GDB's protocol and won't know if I'm seeing the same thing until I try 2.6.30-rc

Bruce

>
> Can anybody comment on the steps followed in the process of testing or=
> something is missing with respect to of_serial.c for powerpc architect= ure.
> Seems the target has never responded for gdb requests !!!
>
>
> Regards
> Srikanth
>
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org=
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>



--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"



--
"The Good Y= ou Do, The Best You GET"

Regards
Srikanth Krishnakar
****= ******************
--000e0cd14ed894ddc2046926ff1d--