FAQ: [#6794] kgdb test fails to run on bf561 SMP kenrel(2011)

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

[#6794] kgdb test fails to run on bf561 SMP kenrel

Submitted By: Mingquan Pan

Open Date

2011-09-14 05:11:16    

Priority:

Medium     Assignee:

Nobody

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:

Duplicate

Uboot version or rev.:

    Toolchain version or rev.:

2011r1-rc1

App binary format:

N/A     

Summary: kgdb test fails to run on bf561 SMP kenrel

Details:

 

kgdb test fails to run on bf561 SMP kenrel.

 

bfin> bootm

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

   Image Name:   bf561-0.5-3.0.0-ADI-2011R1-pre-s

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3830516 Bytes = 3.7 MiB

   Load Address: 00001000

   Entry Point:  001cd2ec

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001cd2ec

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 (2371.58 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@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

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:29

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 @ 0x027f5000 - 256 pages at 0x03f00000

Freeing unused kernel memory: 5532k 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-09-13 07:20:28 GMT) hush - the humble shell

 

root:/> ^[[58;9Rversion

kernel:    Linux release 3.0.0-ADI-2011R1-pre-svn10073, build #48 SMP Tue Sep 13 18:41:19 GMT 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-2011R1-RC1)

user-dist: release svn-10383, build #424 Tue Sep 13 18:40:14 GMT 2011

root:/>

*******************************************************************

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

 

 

^[[58;9Rifconfig eth0 10.100.4.50

root:/> ifconfig set success.

 

spawn bfin-uclinux-gdb /tftpboot/vmlinux

^[[58;9RGNU 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

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

kgdb_breakpoint () at kernel/debug/debug_core.c:993

993        wmb(); /* Sync point after breakpoint */

(gdb) break kgdb_test

Breakpoint 1 at 0x8faa: file arch/blackfin/kernel/kgdb_test.c, line 57.

 

Case 3 ...PASS

(gdb) c

Continuing.

 

Case 4 ...PASS

 

root:/> [New Thread 187]

[Switching to Thread 187]

 

Breakpoint 1, kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57

 

Case 5 ...PASS

57    {

(gdb) hbreak 58

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

(gdb)

Case 6 ...PASS

info b

Num Type           Disp Enb Address    What

1   breakpoint     keep y   0x00008faa in kgdb_test at arch/blackfin/kernel/kgdb_test.c:57

    breakpoint already hit 1 time

2   hw breakpoint  keep y   0x00008fb2 in kgdb_test at arch/blackfin/kernel/kgdb_test.c:58

 

Case 7 ...PASS

(gdb) list

52   

53   

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

55   

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

57    {

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

59        count = z;

60        return count;

61    }

(gdb)

Case 8 ...PASS

bt

#0  kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57

 

Case 9 ...PASS

#1  0x00008ff4 in kgdb_test_proc_read (file=<value optimized out>, buf=<value optimized out>, count=<value optimized out>, ppos=0x20c7eec) at arch/blackfin/kernel/kgdb_test.c:67

#2  0x0008a402 in proc_reg_read (file=0x205f540, buf=0x2af2e88 "", count=4096, ppos=0x20c7eec) at fs/proc/inode.c:178

#3  0x0005d72c in vfs_read (file=0x205f540, buf=0x2af2e88 "", count=<value optimized out>, pos=0x20c7eec) at fs/read_write.c:321

#4  0x0005d840 in sys_read (fd=<value optimized out>, buf=0x2af2e88 "", count=4096) at fs/read_write.c:411

#5  0x0000c18a 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=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:58

 

Case 10 ...PASS

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

(gdb) cat /proc/kgdbtest

^[[58;7Rprint z

$1 = 16

Case 12 ...PASS

 

(gdb) c

Continuing.

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

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

L2 : code function addr = 0xfeb00000

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

root:/>

Case 12 ...PASS

^[[58;9R[New Thread 188]

[Switching to Thread 188]

 

Breakpoint 1, kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57

57    {

(gdb) info thread

  33 Thread 181 (klogd)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  32 Thread 180 (syslogd)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  31 Thread 179 (inetd)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  30 Thread 178 (sh)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  29 Thread 154 (kworker/1:1)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  28 Thread 153 (kworker/0:1)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  27 Thread 147 (mtdblock4)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  26 Thread 142 (mtdblock3)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  25 Thread 137 (mtdblock2)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  24 Thread 132 (mtdblock1)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  23 Thread 127 (mtdblock0)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  22 Thread 81 (fsnotify_mark)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  21 Thread 80 (kswapd0)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  20 Thread 79 (khungtaskd)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  19 Thread 60 (bfin-spi.0)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  18 Thread 58 (kblockd)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  17 Thread 56 (bdi-default)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  16 Thread 54 (sync_supers)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  0x0000c260 in resume () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/cplb.h:128

  10 Thread 6 (migration/0)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  0x0000c260 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)  default_idle () at /home/test/work/cruise/checkouts/uclinux-dist/linux-2.6.x/arch/blackfin/include/asm/processor.h:134

  3 Thread -2 (shadowCPU0)  kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57

* 2 Thread 188 (cat)  kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57

(gdb)

Case 13 ...PASS

thread 4

[Switching to thread 4 (Thread -3)]#0  kgdb_breakpoint () at kernel/debug/debug_core.c:993

 

Case 14 ...PASS

993        wmb(); /* Sync point after breakpoint */

(gdb)  x/1xw 0xffe05000

0xffe05000:    0xe5040501

 

Case 15 ...PASS

(gdb) thread 3

[Switching to thread 3 (Thread -2)]#0  kgdb_breakpoint () at kernel/debug/debug_core.c:993

 

Case 16 ...PASS

993        wmb(); /* Sync point after breakpoint */

(gdb)  x/1xw 0xffe05000

0xffe05000:    0xe5040500

 

Case 17 ...PASS

(gdb) thread 4

[Switching to thread 4 (Thread -3)]#0  kgdb_breakpoint () at kernel/debug/debug_core.c:993

 

Case 18 ...PASS

993        wmb(); /* Sync point after breakpoint */

(gdb) c

Continuing.

 

Breakpoint 1, kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:57

57    {

(gdb) c

Continuing.

 

Breakpoint 2, kgdb_test (name=0x16d4a8 "hello world!", len=12, count=85, z=16) at arch/blackfin/kernel/kgdb_test.c:58

info b

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

(gdb) info b

Num Type           Disp Enb Address    What

1   breakpoint     keep y   0x00008faa in kgdb_test at arch/blackfin/kernel/kgdb_test.c:57

 

Case 21 ...PASS

    breakpoint already hit 3 times

2   hw breakpoint  keep y   0x00008fb2 in kgdb_test at arch/blackfin/kernel/kgdb_test.c:58

    breakpoint already hit 2 times

(gdb) cat /proc/kgdbtest

 

Last passed time: 2011_Jul_18_05_00.

Uclinux-dist version: 10258.

Kernel verion: 10024, git-id: 22abb9b74bb13891e727d0b1cf57e888cfc02bca

 

Case 21 ...FAIL

 

KGDB TEST (SMP) (ethernet) FAIL

test@uclinux65-561-SMP:..testsuites/kgdb> ;9R;9R;9R;9R;9R;7R;9R

Last passed time: 2011_Jul_18_05_00.

Uclinux-dist version: 10258.

Kernel verion: 10024, git-id: 22abb9b74bb13891e727d0b1cf57e888cfc02bca

 

 

Follow-ups

 

--- Sonic Zhang                                              2011-09-14 05:59:27

duplicate bug of 6790

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes