[#4850] _bfin_mac_probe causes kernel panic at boot

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

[#4850] _bfin_mac_probe causes kernel panic at boot

Submitted By: Harald Krapfenbauer

Open Date

2009-02-03 12:10:13     Close Date

2009-03-03 03:25:15

Priority:

Medium     Assignee:

Graf Yang

Status:

Closed     Fixed In Release:

N/A

Found In Release:

snaps     Release:

svn rev. 7700

Category:

N/A     Board:

Bluetechnix CM

Processor:

BF527     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

SVN snaps (2009-01-28)

App binary format:

N/A     

Summary: _bfin_mac_probe causes kernel panic at boot

Details:

 

CM-BF527, default configuration, crashes on boot:

 

bfin> bootm 1000000

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

   Image Name:   Linux-2.6.28-ADI-2009R1-pre-svn6

   Created:      2009-02-03  16:28:23 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    2280491 Bytes =  2.2 MB

   Load Address: 00001000

   Entry Point:  001b7224

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001b7224

Linux version 2.6.28-ADI-2009R1-pre-svn6046 (hkrapfenbauer@pc81-11) (gcc version 4.1.2 (ADI svn)) #12 Tue Feb 3 17:28:19 CET 2009

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001154a0

  rodata    = 0x001154a0-0x0016a284

  bss       = 0x0016a290-0x001982ec

  data      = 0x001982ec-0x001aa000

    stack   = 0x001a8000-0x001aa000

  init      = 0x001aa000-0x00431000

  available = 0x00431000-0x01eff000

  DMA Zone  = 0x01f00000-0x02000000

Hardware Trace Active and Enabled

Boot Mode: 1

Blackfin support (C) 2004-2008 Analog Devices, Inc.

Compiled for ADSP-BF527 Rev 0.1

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 525 MHz core clock and 131 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-through)

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 7873

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,115200 console=ttyBF0,115200

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 128 (order: 7, 512 bytes)

console [ttyBF0] enabled

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory available: 27148k/32768k RAM, (2588k init code, 1105k kernel code, 595k data, 1024k dma, 304k reserved)

Calibrating delay loop... 1044.48 BogoMIPS (lpj=2088960)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

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

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

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)

PDA for CPU0 reserved at 0016b1bc

net_namespace: 312 bytes

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

cm_init(): registering device resources

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, pio, host, debug=0

musb_hdrc: USB Host mode controller at ffc03800 using PIO, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

NET: Registered protocol family 2

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

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

TCP reno registered

NET: Registered protocol family 1

msgmni has been set to 53

io scheduler noop registered

io scheduler cfq registered (default)

bfin-otp: initialized

Serial: Blackfin serial driver

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

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

brd: module loaded

arch/blackfin/mach-bf527/boards/cm_bf527.c:bfin_get_ether_addr: Setting Ethernet MAC to a random one

NULL pointer access

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=swapper PID=1

CPU = 0

invalid mm

return address: [0x001134f6]; contents of:

0x001134d0:  5651  e5aa  0005  5651  5608  4340  0c00  1c8c

0x001134e0:  e12a  03a0  5bd4  3045  e3fc  91a8  320f  e148

0x001134f0:  ffc0  e108  0008 [e50a] 0032  e73a  001d  bd94

0x00113500:  9500  4870  1423  9507  4a77  9500  0807  181e

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00060027  IPEND: 8030  SYSCFG: 0006

  EXCAUSE   : 0x27

  interrupts disabled

  physical IVG5 asserted : <0xffa00aec> { _evt_ivhw + 0x0 }

  physical IVG15 asserted : <0xffa00c3c> { _evt_system_call + 0x0 }

  logical irq   6 mapped  : <0xffa0032c> { _timer_interrupt + 0x0 }

  logical irq  59 mapped  : <0x000b9d48> { _blackfin_interrupt + 0x0 }

RETE: <0x00000000> { _do_one_initcall + 0xfffff000 }

RETN: <0x01ee7d50> /* kernel dynamic memory */

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x001134ec> { _bfin_mac_probe + 0x104 }

PC  : <0x001134f6> { _bfin_mac_probe + 0x10e }

DCPLB_FAULT_ADDR: <0x000000c8> /* Maybe null pointer? */

ICPLB_FAULT_ADDR: <0x001134f6> { _bfin_mac_probe + 0x10e }

 

PROCESSOR STATE:

R0 : 766b6ece    R1 : ffff855c    R2 : ffffff85    R3 : ffffffce

R4 : 00000000    R5 : 001a0dac    R6 : 000000ac    R7 : 00000000

P0 : ffc00008    P1 : 00000000    P2 : ffc03008    P3 : 00199e30

P4 : 01da70c0    P5 : 01da71f0    FP : 01da7460    SP : 01ee7c74

LB0: 0008cfc0    LT0: 0008cfbe    LC0: 00000000

LB1: 0008c220    LT1: 0008c214    LC1: 00000000

B0 : 01ee7cc4    L0 : 00000000    M0 : 00000000    I0 : 01ee7b3c

B1 : 01ee7cc0    L1 : 00000000    M1 : 00000000    I1 : ce30d7b7

B2 : 01ee7c7c    L2 : 00000000    M2 : 00000000    I2 : 01ee7ccc

B3 : 01ee7cd0    L3 : 00000000    M3 : 00000000    I3 : 01ee7cc8

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 00000000  ASTAT: 02003044

 

Hardware Trace:

   0 Target : <0x00004a84> { _trap_c + 0x0 }

     Source : <0xffa005aa> { _exception_to_level5 + 0x9e } CALL pcrel

   1 Target : <0xffa0050c> { _exception_to_level5 + 0x0 }

     Source : <0xffa003de> { _bfin_return_from_exception + 0x6 } RTX

   2 Target : <0xffa003d8> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa00466> { _ex_trap_c + 0x66 } JUMP.S

   3 Target : <0xffa00400> { _ex_trap_c + 0x0 }

     Source : <0xffa00636> { _trap + 0x2a } JUMP (P4)

   4 Target : <0xffa0060c> { _trap + 0x0 }

     Source : <0x001134f2> { _bfin_mac_probe + 0x10a } 0xe108

   5 Target : <0x001134ec> { _bfin_mac_probe + 0x104 }

     Source : <0x000a584c> { _setup_mac_addr + 0x14 } RTS

   6 Target : <0x000a5838> { _setup_mac_addr + 0x0 }

     Source : <0x001134e8> { _bfin_mac_probe + 0x100 } CALL pcrel

   7 Target : <0x001134b2> { _bfin_mac_probe + 0xca }

     Source : <0x00113610> { _bfin_mac_probe + 0x228 } JUMP.S

   8 Target : <0x0011360e> { _bfin_mac_probe + 0x226 }

     Source : <0x00010516> { _printk + 0x16 } RTS

   9 Target : <0x00010512> { _printk + 0x12 }

     Source : <0x00010d34> { _vprintk + 0x130 } RTS

  10 Target : <0x00010d28> { _vprintk + 0x124 }

     Source : <0xffa00aea> { __common_int_entry + 0xca } RTI

  11 Target : <0xffa00a88> { __common_int_entry + 0x68 }

     Source : <0xffa008ee> { _return_from_int + 0x4e } RTS

  12 Target : <0xffa008ee> { _return_from_int + 0x4e }

     Source : <0xffa008ce> { _return_from_int + 0x2e } IF !CC JUMP

  13 Target : <0xffa008a0> { _return_from_int + 0x0 }

     Source : <0xffa00a84> { __common_int_entry + 0x64 } CALL pcrel

  14 Target : <0xffa00a82> { __common_int_entry + 0x62 }

     Source : <0xffa002e6> { _asm_do_IRQ + 0x66 } RTS

  15 Target : <0xffa002de> { _asm_do_IRQ + 0x5e }

     Source : <0x000142a6> { __local_bh_enable + 0x3e } RTS

 

Kernel Stack

Stack info:

SP: [0x01ee7ca0] <0x01ee7ca0> /* kernel dynamic memory */

FP: (0x01ee7d94)

Memory from 0x01ee7ca0 to 01ee8000

01ee7ca0:[0008cfc0] 0008c214  0008cfbe  00000000  00000000  00000000  00000000  00000000

01ee7cc0: 00000000  01ee7cd0  01ee7c7c  01ee7cc0  01ee7cc4  00000000  00000000  00000000

01ee7ce0: 00000000  00000000  00000000  00000000  00000000  01ee7cc8  01ee7ccc  ce30d7b7

01ee7d00: 01ee7b3c  00000000  01da7460  01da71f0  01da70c0  00199e30  ffc03008  00000000

01ee7d20: ffc00008  00000000  000000ac  001a0dac  00000000  ffffffce  ffffff85  ffff855c

01ee7d40: 766b6ece  766b6ece  ffc00008  00000006 <00074288> 00145a9c <00116014> 00000000

01ee7d60: 00199e98  001c618c  001a0dac <00073866> 001a0dac <000a0738> 00199e30  001a0dac

01ee7d80: 001956d4  00199edc  000000ac  001a0dac  00000000 (00000000)<00112584><001125ac>

01ee7da0: 00199d44 <000a0890> 00199e30  001a0dac  001c618c  00199edc  001a0b18  001c618c

01ee7dc0: 00000000 <0009ff4e> 000a0824  001a0b18  00000000  01ee7de4  01c659f8 <00088c60>

01ee7de0: 0016a2b4  0047e7b4  00199e78 <000a05e6> 0016a2b4  00000000  01c659f8  00000000

01ee7e00: 01ee7e24  01ee7e24 <000a0300> 000a0824 <000a031e> 0014fb1c  00000000 <000a09e0>

01ee7e20: 0013ef8c  00145aec  00000000 <000a09e0> 0016a2b4  001a0dac  001c618c  00000000

01ee7e40: 00000000  0016a2b4  001bda3c  00000000 <00001028> 0016a2b4  001bda3c  00000000

01ee7e60: 00000000  00000000  000040d0  00000000  00000010  000240d0  00000000  00000000

01ee7e80: 001a632c  00000001 <0003d5e4> 01ef3098  9d74e35b  01ef3920 <00087f6a><00087f6a>

01ee7ea0: 01efcf00 <0003d4a8> 00000000  000000d0 <0003d45c> 01ee7f08 <0003d82c> 0047f70c

01ee7ec0: 01efcf00  00180fc0 <00087f6a> 01ef3928  0000ffff  00000000  01ee7f08 <00087ef6>

01ee7ee0: 0019de4c <00087f6a> 0047e8a8  0047e8a4  00000000  000000fc  00000000  00180fc0

01ee7f00: 000000d0  01ee7f08  01ee3558  00000000  00431440  00000000 <000880ce> 00180fc0

01ee7f20: 001804a0  00000000 <0006e9a4> 0019de4c  001804a0  001c618c  01ee7f5c  01ed5728

01ee7f40: 01ec86ac  00000000  00000000  00180fc0  01ee7f5c <00148bb4><0006ebc0> 000000fc

01ee7f60:<0006ebce> 0019de4c  01ed5728  00004000  00000000  00000000  01ee7f9c  7fffff00

01ee7f80: 00000001 <0002eb3e> 01ee7f9c  00000076 <0006ec92> 001c5f60  01ec86ac  00383131

01ee7fa0: 00000000  001b0000 <0002eb9a> 0019c2a0  001c5f60  00000076  0019de4c <001aa3b0>

01ee7fc0: 001c6118  001c5f60  00000000  00000000  00000000  00000000  00000000  00000000

01ee7fe0: 00000000 <0000145e> 00000000  00000000  00000000  00000000  ffffffff  00000006

01ee8000: 01efd81c

Return addresses in stack:

    address : <0x00074288> { _sysfs_create_link + 0xc }

    address : <0x00116014> /* kernel dynamic memory */

    address : <0x00073866> { _create_dir + 0x3a }

    address : <0x000a0738> { _driver_probe_device + 0x80 }

   frame  1 : <0x00112584> { _klist_next + 0x20 }

    address : <0x001125ac> { _klist_next + 0x48 }

    address : <0x000a0890> { ___driver_attach + 0x6c }

    address : <0x0009ff4e> { _bus_for_each_dev + 0x3a }

    address : <0x00088c60> { _kobject_init_and_add + 0x24 }

    address : <0x000a05e6> { _driver_attach + 0x1a }

    address : <0x000a0300> { _bus_add_driver + 0x64 }

    address : <0x000a031e> { _bus_add_driver + 0x82 }

    address : <0x000a09e0> { _driver_register + 0x40 }

    address : <0x000a09e0> { _driver_register + 0x40 }

    address : <0x00001028> { _do_one_initcall + 0x28 }

    address : <0x0003d5e4> { _cache_free_debugcheck + 0xc8 }

    address : <0x00087f6a> { _ida_get_new_above + 0x10a }

    address : <0x00087f6a> { _ida_get_new_above + 0x10a }

    address : <0x0003d4a8> { _cache_alloc_debugcheck_after + 0x144 }

    address : <0x0003d45c> { _cache_alloc_debugcheck_after + 0xf8 }

    address : <0x0003d82c> { _kmem_cache_free + 0x34 }

    address : <0x00087f6a> { _ida_get_new_above + 0x10a }

    address : <0x00087ef6> { _ida_get_new_above + 0x96 }

    address : <0x00087f6a> { _ida_get_new_above + 0x10a }

    address : <0x000880ce> { _ida_pre_get + 0xe }

    address : <0x0006e9a4> { _proc_register + 0x30 }

    address : <0x00148bb4> /* kernel dynamic memory */

    address : <0x0006ebc0> { _create_proc_entry + 0x3c }

    address : <0x0006ebce> { _create_proc_entry + 0x4a }

    address : <0x0002eb3e> { _register_irq_proc + 0x7e }

    address : <0x0006ec92> { _proc_mkdir_mode + 0x2e }

    address : <0x0002eb9a> { _init_irq_proc + 0x42 }

    address : <0x001aa3b0> { _kernel_init + 0x84 }

    address : <0x0000145e> { _kernel_thread_helper + 0x6 }

Modules linked in:

Kernel panic - not syncing: Kernel exception

 

Follow-ups

 

--- Jie Zhang                                                2009-02-03 21:20:10

I also see this on bf537. It's caused by Graf's change r6046.

 

--- Graf Yang                                                2009-02-04 00:09:55

bfin-mac driver now need a platform device mii-bus be defined in board files.

I have add it to BF537 and BF527 board files.

 

--- Mike Frysinger                                           2009-02-04 00:29:38

the driver needs updating with sanity checks so that an appropriate/useful error

message is displayed ("bfin_mac: error: no mii bus", or something

similar) rather than crashing.  if people see a crash message, they'll file bugs

and/or ask for support on the forums.

 

--- Graf Yang                                                2009-02-04 01:55:13

You are right, I have add this sanity check. Thanks.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes