AnsweredAssumed Answered

BF561 uClinux Ethernet problem.

Question asked by Denisis on May 27, 2013
Latest reply on May 28, 2013 by Denisis

I have board with ethernet MAC Davicom DM9000 with  bus in 32 bit mode. U-boot work fine. uClinux crash.

Board config:

#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) static struct resource dm9000_resources[] = {           [0] = {                     .start          = 0x24000000,                     .end          = 0x24000000 + 3,                     .flags          = IORESOURCE_MEM,           },           [1] = {                     .start          = 0x24000000 + 4,                     .end          = 0x24000000 + 7,                     .flags          = IORESOURCE_MEM,           },           [2] = {                     .start          = IRQ_PF21,                     .end          = IRQ_PF21,                     .flags          = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),           }, };   static struct dm9000_plat_data dm9000_device_platdata = {           .flags          = DM9000_PLATF_32BITONLY, };   static struct platform_device dm9000_device = {         .name           = "dm9000",         .id             = 0,         .num_resources  = ARRAY_SIZE(dm9000_resources),         .resource       = dm9000_resources,         .dev            = {                  .platform_data = &dm9000_device_platdata,         }  }; 

Log:

 

 

U-Boot 2012.07-rc2 (ADI-2012R1-pre) (May 28 2013 - 00:32:56)

 

 

CPU:   ADSP bf561-0.5 (Detected Rev: 0.5) (parallel flash boot)

Board: rf-bf561

       Support:

       E-mail:

Clock: VCO: 530.842 MHz, Core: 530.842 MHz, System: 132.710 MHz

RAM:   32 MiB

Flash: 8 MiB

In:    serial

Out:   serial

Err:   serial

KGDB:  [on serial] ready

Net:   dm9000

Hit any key to stop autoboot:  0

rf-bf561_u-boot> run ramboot

dm9000 i/o: 0x24000000, id: 0x90000a46

DM9000: running in 32 bit mode

MAC: 00:20:ed:01:02:03

operating at 100M full duplex mode

Using dm9000 device

TFTP from server 182.173.170.1; our IP address is 182.173.170.100

Filename 'uImage'.

Load address: 0x1000000

Loading: #################################################################

         #################################################################

         #########

done

Bytes transferred = 2030657 (1efc41 hex)

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

   Image Name:   bf561-any-3.5.0-ADI-2012R1-pre

   Image Type:   Blackfin Linux Kernel Image (lzma compressed)

   Data Size:    2030593 Bytes = 1.9 MiB

   Load Address: 00001000

   Entry Point:  00204e9c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 00204e9c

Linux version 3.5.0-ADI-2012R1-pre (developer@developer-VB) (gcc version 4.3.5 (ADI-2012R2-RC2) ) #29 Tue May 28 02:44:46 FET 2013

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001659d0

  rodata    = 0x001659d0-0x001d4c98

  bss       = 0x001d5000-0x001e4f10

  data      = 0x001e4f20-0x001fe000

    stack   = 0x001fc000-0x001fe000

  init      = 0x001fe000-0x00576000

  available = 0x00576000-0x01f00000

  DMA Zone  = 0x01f00000-0x02000000

Hardware Trace active and enabled

Boot Mode: 2

Reset caused by Software reset

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

Compiled for ADSP-BF561 Rev any, running on 0.5

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 530 MHz core clock and 132 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

  L2 SRAM        : uncacheable in instruction cache

Data Cache Enabled for CPU0

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

  L2 SRAM        : uncacheable in data cache

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

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=14745600 earlyprintk=serial,uart0,115200 console=ttyBF0,115200 ip=182.173.170.100:182.173.170.1:192.168.2.100:255.255.255.0:rf620-bf561-rev2:eth0:off

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

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

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

Memory available: 25824k/32768k RAM, (3552k init code, 1426k kernel code, 610k data, 1024k dma, 332k reserved)

NR_IRQS:153

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 1050.62 BogoMIPS (lpj=2101248)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

devtmpfs: initialized

Blackfin Scratchpad data SRAM: 4 KB

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

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

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

Blackfin L2 SRAM: 128 KB (128 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: master is unqueued, this is deprecated

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

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

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

NET: Registered protocol family 1

debug-mmrs: setting up Blackfin MMR debugfs

jffs2: version 2.2. (NAND) б╘ 2001-2006 Red Hat, Inc.

msgmni has been set to 50

io scheduler noop registered (default)

io scheduler cfq registered

Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled

serial8250.0: ttyS0 at MMIO 0x21000000 (irq = 81) is a 16550A

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 0x0022fd

Support for command set 0002 not present

gen_probe: No supported Vendor Command Set found

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

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

0x000000040000-0x000000050000 : "u-boot env(nor)"

0x000000050000-0x000000350000 : "linux kernel(nor)"

0x000000350000-0x000000800000 : "file system(nor)"

dm9000 Ethernet Driver, V1.31

eth0: dm9000e at 24000000,24000004 IRQ 94 MAC: 00:20:ed:01:02:03 (chip)

icc icc.0: initialized

TCP: cubic registered

NET: Registered protocol family 17

dma_alloc_init: dma_page @ 0x01624000 - 256 pages at 0x01f00000

Freeing unused kernel memory: 3552k freed

 

 

 

 

BusyBox v1.20.2 (2013-05-27 23:42:45 FET) hush - the humble shell

 

 

root:/> ifconfig eth0 182.173.170.100 up

dm9000 dm9000.0: eth0: link down

root:/> dm9000 dm9000.0: eth0: link up, 100Mbps, full-duplex, no LPA

 

 

root:/>

root:/>

root:/>

root:/> oing Data access misaligned address violation

<5> - Attempted misaligned data memory or data cache access.

Kernel OOPS in progress

Deferred Exception context

No Valid process in current context

return address: [0x000c0c38]; contents of:

0x000c0c10:  3208  2e4f  0167  6fa6  b1b2  3056  64c2  e3ff

0x000c0c20:  fdf9  6c66  0127  0010  3200  0033  3209  3212

0x000c0c30:  0024  e0a2  2005  9100 [9208] 0000  0000  0043

0x000c0c40:  0010  0000  3200  0033  3209  3212  0024  e0a2

 

 

ADSP-BF561-0.65535(Detected 0.5) 530(MHz CCLK) 132(MHz SCLK) (mpu off)

Linux version 3.5.0-ADI-2012R1-pre (developer@developer-VB) (gcc version 4.3.5 (ADI-2012R2-RC2) ) #29 Tue May 28 02:44:46 FET 2013

 

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00002024  IPEND: 8808  IMASK: 001f  SYSCFG: 0006

  Peripheral interrupts masked off

  Kernel interrupts masked off

  EXCAUSE   : 0x24

  physical IVG3 asserted : <0xffa00798> { _trap + 0x0 }

  physical IVG11 asserted : <0xffa00e60> { _evt_evt11 + 0x0 }

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

  logical irq   6 mapped  : <0xffa00438> { _bfin_coretmr_interrupt + 0x0 }

  logical irq  35 mapped  : <0x000da68c> { _bfin_serial_dma_rx_int + 0x0 }

  logical irq  36 mapped  : <0x000da47c> { _bfin_serial_dma_tx_int + 0x0 }

  logical irq  69 mapped  : <0x001063c0> { _ipi_handler_int0 + 0x0 }

  logical irq  94 mapped  : <0x000f94d0> { _dm9000_interrupt + 0x0 }

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x001fddcc> /* kernel dynamic memory (maybe user-space) */

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

RETS: <0x000f96c8> { _dm9000_interrupt + 0x1f8 }

PC  : <0x000c0c38> { _insl + 0x10 }

DCPLB_FAULT_ADDR: <0x01642020> /* kernel dynamic memory (maybe user-space) */

ICPLB_FAULT_ADDR: <0x000c0c38> { _insl + 0x10 }

PROCESSOR STATE:

R0 : ffffffff    R1 : 01642022    R2 : 00000010    R3 : 0000001f

R4 : fffffff0    R5 : 00000061    R6 : 00000001    R7 : 00000040

P0 : 24000004    P1 : 01642022    P2 : 00000010    P3 : 01074000

P4 : 010603a0    P5 : 010743a0    FP : 001fdde0    SP : 001fdcf0

LB0: 000c0c3c    LT0: 000c0c36    LC0: 00000010

LB1: 0030f583    LT1: 0030f540    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 001ebdd0

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 005338d0

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 001fe000  ASTAT: 02002020

 

 

Hardware Trace:

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

     Source : <0xffa0072c> { _exception_to_level5 + 0xa0 } JUMP.L

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

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

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

     Source : <0xffa005e6> { _ex_trap_c + 0x72 } JUMP.S

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

     Source : <0xffa007d0> { _trap + 0x38 } JUMP (P4)

   4 Target : <0xffa007b6> { _trap + 0x1e }

     Source : <0xffa007b2> { _trap + 0x1a } IF CC JUMP pcrel

   5 Target : <0xffa00798> { _trap + 0x0 }

      FAULT : <0x000c0c38> { _insl + 0x10 } [P1++] = R0

     Source : <0x000c0c36> { _insl + 0xe } R0 = [P0]

   6 Target : <0x000c0c28> { _insl + 0x0 }

     Source : <0x000f9898> { _dm9000_inblk_32bit + 0x4 } CALL pcrel

   7 Target : <0x000f9894> { _dm9000_inblk_32bit + 0x0 }

     Source : <0x000f96c6> { _dm9000_interrupt + 0x1f6 } CALL (P2)

   8 Target : <0x000f96be> { _dm9000_interrupt + 0x1ee }

     Source : <0x0010e53e> { _skb_put + 0x3a } RTS

   9 Target : <0x0010e504> { _skb_put + 0x0 }

     Source : <0x000f96ba> { _dm9000_interrupt + 0x1ea } CALL pcrel

  10 Target : <0x000f969a> { _dm9000_interrupt + 0x1ca }

     Source : <0x0011081a> { ___netdev_alloc_skb + 0x5e } RTS

  11 Target : <0x001107fc> { ___netdev_alloc_skb + 0x40 }

     Source : <0x00110832> { ___netdev_alloc_skb + 0x76 } IF !CC JUMP pcrel (BP)

  12 Target : <0x0011082e> { ___netdev_alloc_skb + 0x72 }

     Source : <0x0010f934> { _build_skb + 0x8c } RTS

  13 Target : <0x0010f8d8> { _build_skb + 0x30 }

     Source : <0xffa01602> { _memset + 0x2e } RTS

  14 Target : <0xffa015d4> { _memset + 0x0 }

     Source : <0x0010f8d4> { _build_skb + 0x2c } JUMP.L

  15 Target : <0x0010f8c8> { _build_skb + 0x20 }

     Source : <0x0004aa96> { _kmem_cache_alloc + 0x5e } RTS

Kernel Stack

Stack info:

SP: [0x001fdf48] <0x001fdf48> /* kernel dynamic memory (maybe user-space) */

Memory from 0x001fdf40 to 001fe000

001fdf40: 00000000  00000000 [00000000] 00000000  00000000  005338d0  001ebdd0  001fe000

001fdf60: 001d509c  ffa00110  001fc008  001fc008  001ebdd0  001fc000  ffa009dc  ffa00110

001fdf80: 00000000  00000000  01703adc  00000065  00000000  00000000  0000ffff  0000ffff

001fdfa0: ffa009dc  00000006  001d5009  00214730  00000000  001fe000  001fe6a8  001dfe6c

001fdfc0: 001d5000  001d5009  00214730  00198200  00211d64  001d4a94  00000020  ffffffff

001fdfe0: ffffffff  001fe2c0  00214730  00204f9a  ffe00000  01f9f204  01fe53b4  ffb00000

Return addresses in stack:

Modules linked in: map_rom

Kernel panic - not syncing: Kernel exception

 

Outcomes