FAQ:[#6645] kgdb on SMP bf561 fails now(2011)

Document created by Aaronwu Employee on Sep 11, 2013
Version 1Show Document
  • View in full screen mode

[#6645] kgdb on SMP bf561 fails now

Submitted By: Mingquan Pan

Open Date

2011-06-15 03:23:01    

Priority:

Medium     Assignee:

Sonic Zhang

Status:

Open     Fixed In Release:

N/A

Found In Release:

2011R1     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Out of Date

Uboot version or rev.:

    Toolchain version or rev.:

5013

App binary format:

N/A     

Summary: kgdb on SMP bf561 fails now

Details:

 

kgdb on SMP bf561 fails now.

 

## Booting kernel from Legacy Image at 02000000 ...

   Image Name:   bf561-0.5-2.6.39.1-ADI-2011R1-pr

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3751656 Bytes = 3.6 MiB

   Load Address: 00001000

   Entry Point:  001cb288

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001cb288

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 1185.79 BogoMIPS (lpj=2371584)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Booting Core B.

Brought up 2 CPUs

Instruction Cache Enabled for CPU1

  External memory: cacheable in instruction cache

  L2 SRAM        : uncacheable in instruction cache

Data Cache Enabled for CPU1

  External memory: cacheable (write-through) in data cache

  L2 SRAM        : uncacheable in data cache

SMP: Total of 2 processors activated (0.00 BogoMIPS).

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

Blackfin L1 Instruction SRAM: 16 KB (15 KB free)

Blackfin L1 Instruction SRAM: 16 KB (15 KB free)

Blackfin L2 SRAM: 128 KB (127 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@16

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

UDP hash table entries: 128 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)

NET: Registered protocol family 1

debug-mmrs: setting up Blackfin MMR debugfs

msgmni has been set to 110

io scheduler noop registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 35) is a BFIN-UART

brd: module loaded

physmap platform flash device: 00800000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000020 Chip ID 0x0022ed

Amd/Fujitsu Extended Query Table at 0x0040

  Amd/Fujitsu Extended Query version 1.3.

physmap-flash.0: Swapping erase regions for top-boot CFI table.

number of CFI chips: 1

RedBoot partition parsing not available

Using physmap partition information

Creating 5 MTD partitions on "physmap-flash.0":

0x000000000000-0x000000040000 : "bootloader(nor)"

0x000000040000-0x000000200000 : "linux kernel(nor)"

0x000000200000-0x0000007f0000 : "file system(nor)"

0x0000007f0000-0x0000007fe000 : "config(nor)"

0x0000007fe000-0x000000800000 : "u-boot env(nor)"

smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>

eth0: SMC91C11xFD (rev 2) at 2c010300 IRQ 82 [nowait]

eth0: Ethernet addr: 00:e0:22:fe:ba:2a

console [netcon0] enabled

netconsole: network logging started

kgdboe: local port 6443

kgdboe: local IP 10.100.4.50

kgdboe: interface 'eth0'

kgdboe: remote port 6442

kgdboe: remote IP 10.100.4.174

kgdboe: remote ethernet address ff:ff:ff:ff:ff:ff

kgdboe: device eth0 not up yet, forcing it

smc91x smc91x.0: eth0: link down

smc91x smc91x.0: eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

kgdb: Registered I/O driver kgdboe.

kgdboe: debugging over ethernet enabled

TCP cubic registered

NET: Registered protocol family 17

dma_alloc_init: dma_page @ 0x027d8000 - 256 pages at 0x03f00000

Freeing unused kernel memory: 5456k freed

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.18.4 (2011-06-14 15:58:16 GMT) hush - the humble shell

 

root:/> version

kernel:    Linux release 2.6.39.1-ADI-2011R1-pre-svn9931, build #6 SMP Wed Jun 15 08:19:06 GMT 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5013)

user-dist: release svn-10201, build #39 Wed Jun 15 08:17:01 GMT 2011

root:/> successful boot attempt

************** STEP 3: Start KGDB TEST (SMP) (ethernet)

 

ifconfig eth0 10.100.4.50

root:/> spawn bfin-uclinux-gdb /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/vmlinux

GNU gdb 6.6

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB.  Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=bfin-uclinux"...

(gdb)

Case 1 ...PASS

 

Case 1 ...PASS

target remote udp:10.100.4.50:6443

warning: The remote protocol may be unreliable over UDP.

Some events may be lost, rendering further debugging impossible.

Remote debugging using udp:10.100.4.50:6443

 

Case 2 ...PASS

 

Case 2 ...PASS

kgdb_breakpoint ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cache.h:57

57              __raw_smp_mark_barrier_asm();

(gdb) break kgdb_test

Breakpoint 1 at 0x8f76: file arch/blackfin/kernel/kgdb_test.c, line 56.

 

Case 3 ...PASS

 

Case 3 ...PASS

(gdb) c

Continuing.

 

Case 4 ...PASS

 

Case 4 ...PASS

 

root:/> [New Thread 180]

[Switching to Thread 180]

 

Breakpoint 1, kgdb_test (name=0x139fdc "hello world!", len=12, count=85, z=16)

 

Case 5 ...PASS

 

Case 5 ...PASS

    at arch/blackfin/kernel/kgdb_test.c:56

56              pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);

(gdb) hbreak 58

Hardware assisted breakpoint 2 at 0x8f9c: file arch/blackfin/kernel/kgdb_test.c, line 58.

(gdb)

Case 6 ...PASS

 

Case 6 ...PASS

info b

Num Type           Disp Enb Address    What

1   breakpoint     keep y   0x00008f76 in kgdb_test

                                       at arch/blackfin/kernel/kgdb_test.c:56

        breakpoint already hit 1 time

2   hw breakpoint  keep y   0x00008f9c in kgdb_test

 

Case 7 ...PASS

 

Case 7 ...PASS

                                       at arch/blackfin/kernel/kgdb_test.c:58

(gdb) list

51      #endif

52

53

54      int kgdb_test(char *name, int len, int count, int z)

55      {

56              pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);

57              count = z;

58              return count;

59      }

60

(gdb)

Case 8 ...PASS

 

Case 8 ...PASS

bt

#0  kgdb_test (name=0x139fdc "hello world!", len=12, count=85, z=16)

 

Case 9 ...PASS

 

Case 9 ...PASS

    at arch/blackfin/kernel/kgdb_test.c:56

#1  0x00008fcc in kgdb_test_proc_read (file=0x263ca60, buf=0x2af2e88 "",

    count=4096, ppos=0x2909eec) at arch/blackfin/kernel/kgdb_test.c:65

#2  0x00088932 in proc_reg_read (file=0x263ca60, buf=0x2af2e88 "", count=4096,

    ppos=0x2909eec) at fs/proc/inode.c:171

#3  0x0005bda8 in vfs_read (file=0x263ca60, buf=0x2af2e88 "",

    count=<value optimized out>, pos=0x2909eec) at fs/read_write.c:321

#4  0x0005bebc in sys_read (fd=<value optimized out>, buf=0x2af2e88 "",

    count=4096) at fs/read_write.c:411

#5  0x0000c1ce in system_call ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

(gdb) c

Continuing.

 

 

Breakpoint 2, kgdb_test (name=0x139fdc "hello world!", len=12, count=16, z=16)

 

Case 10 ...PASS

 

Case 10 ...PASS

    at arch/blackfin/kernel/kgdb_test.c:58

58              return count;

(gdb) cat /proc/kgdbtest

kgdb name(12): hello world!, 85, 16

 

Case 10 ...PASS

 

Case 10 ...PASS

print z

$1 = 16

 

Case 12 ...PASS

 

Case 12 ...PASS

(gdb) c

Continuing.

L2(before change) : data variable addr = 0xfeb00084, data value is 0

L2 : code function addr = 0xfeb00000

L2(after change) : data variable addr = 0xfeb00084, data value is 20

root:/>

Case 12 ...PASS

 

Case 12 ...PASS

[New Thread 181]

[Switching to Thread 181]

 

Breakpoint 1, kgdb_test (name=0x139fdc "hello world!", len=12, count=85, z=16)

    at arch/blackfin/kernel/kgdb_test.c:56

56              pr_alert("kgdb name(%d): %s, %d, %d\n", len, name, count, z);

(gdb) info thread

  33 Thread 174 (klogd)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  32 Thread 173 (syslogd)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  31 Thread 172 (inetd)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  30 Thread 171 (sh)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  29 Thread 147 (kworker/1:1)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  28 Thread 146 (kworker/0:1)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  27 Thread 140 (mtdblock4)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  26 Thread 135 (mtdblock3)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/i---Type <return> to continue, or q <return> to quit---

nclude/asm/cplb.h:128

  25 Thread 130 (mtdblock2)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  24 Thread 125 (mtdblock1)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  23 Thread 120 (mtdblock0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  22 Thread 76 (fsnotify_mark)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  21 Thread 75 (kswapd0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  20 Thread 74 (khungtaskd)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  19 Thread 57 (bfin-spi.0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  18 Thread 55 (kblockd)  0x0000c2a4 in resume ()

---Type <return> to continue, or q <return> to quit---

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  17 Thread 53 (bdi-default)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  16 Thread 51 (sync_supers)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  15 Thread 11 (kworker/u:1)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  14 Thread 10 (khelper)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  13 Thread 9 (ksoftirqd/1)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  12 Thread 8 (kworker/1:0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  11 Thread 7 (migration/1)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

---Type <return> to continue, or q <return> to quit---

  10 Thread 6 (migration/0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  9 Thread 5 (kworker/u:0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  8 Thread 4 (kworker/0:0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  7 Thread 3 (ksoftirqd/0)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  6 Thread 2 (kthreadd)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  5 Thread 1 (init)  0x0000c2a4 in resume ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  4 Thread -3 (shadowCPU1)  kgdb_test (name=0x139fdc "hello world!", len=12,

    count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:56

  3 Thread -2 (shadowCPU0)  default_idle ()

    at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/processor.h:134

---Type <return> to continue, or q <return> to quit---thread 4

* 2 Thread 181 (cat)  kgdb_test (name=0x139fdc "hello world!", len=12,

    count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:56

(gdb) spawn /bin/sh

grep bfin-uclinux-gdbrk/cruise/checkouts/uclinux-dist/testsuites/kgdb> ps aux |

test     11961  0.8  3.1  37708 31696 pts/3    Ss+  08:20   0:00 bfin-uclinux-gdb /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/vmlinux

test     11972  0.0  0.0   5236   816 pts/5    R+   08:21   0:00 grep bfin-uclinux-gdb

`pidof  bfin-uclinux-gdb`cruise/checkouts/uclinux-dist/testsuites/kgdb> kill -9

Last passed time: 2011_May_31_21_51, ucdist ver: 10185, kernel ver: 9909

 

 

241-------------------------------------------------------------------------

242:r9909 | root | 2011-05-26 22:08:36 +0000 (Thu, 26 May 2011) | 9 lines

243-

244-Blackfin: debug-mmrs: include RSI_PID[4567] MMRs

245-

246-The documentation is a little iffy as to whether these are actual MMRs,

247-but reading them on the hardware works, and the previous version of this

248-logic (the SDH) had PID[4567].  So add it for RSI too.

249-

250-Signed-off-by: Mike Frysinger <vapier@gentoo.org>

251-

252-svn-git-id: git://localhost/git/linux-kernel/trunk/dca2361762013557c672cd9a04038479c589d067

 

Follow-ups

 

--- Sonic Zhang                                              2011-08-30 04:07:55

out of date after fixing bug 6707.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes