2008-10-07 07:44:04     Custom BF561 board -- loading linux kernel hangs

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

2008-10-07 07:44:04     Custom BF561 board -- loading linux kernel hangs

Thomas Langås (NORWAY)

Message: 63215   

 

I finally got u-boot working on my custom board, and I'm now struggling with the linux-kernel. This is the bdinfo from u-boot:

 

U-Boot      = U-Boot 1.1.6-svn1340 (ADI-2009R1-pre) (Oct  1 2008 - 15:08:30)

CPU         = bf561-0.5

Board       = custom-board

VCO         = 500 MHz

CCLK        = 500 MHz

SCLK        = 100 MHz

boot_params = 0x00000000

memstart    = 0x00000000

memsize     = 0x08000000

flashstart  = 0x20000000

flashsize   = 0x04000000

flashoffset = 0x00000000

ethaddr     = 00:11:22:33:44:55

ip_addr     = 192.168.0.15

baudrate    = 115200 bps

 

This is what I get when trying to boot my uImage.initramfs located at 0x20100000:

 

bfin> run flashboot

## Booting image at 20100000 ...

   Image Name:   Linux-2.6.26.5-ADI-2009R1-pre-sv

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3145643 Bytes =  3 MB

   Load Address: 00800000

   Entry Point:  00a2cf68

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = a2cf68

 

I've also tried to copy the image from flash to memory (with uboot cp.b) and then boot from ram instead, but it's the same problem. Is there a list / doc somewhere on where to start looking when experiencing problems like this?

 

In advance, thanks!

 

--

Thomas

QuoteReplyEditDelete

 

 

2008-10-07 08:11:56     Re: Custom BF561 board -- loading linux kernel hangs

Robin Getz (UNITED STATES)

Message: 63216   

 

Thomas:

 

Have a look at:

 

https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:debug:post_mortem

 

-Robin

QuoteReplyEditDelete

 

 

2008-10-07 08:41:18     Re: Custom BF561 board -- loading linux kernel hangs

Thomas Langås (NORWAY)

Message: 63217   

 

Ok, so here's the output:

 

bfin> strings 0xa0b914

<5>Linux version 2.6.26.5-ADI-2009R1-pre-svn5369-dirty (tlan@sarissa) (gcc version 4.1.2 (ADI svn)) #114 Tue Oct 7 11:41:09 CEST 2008

<6>Entering memory_setup()

<6>Board Memory: 128MB

<6>Kernel Managed Memory: 128MB

<6>Memory map:

<6>  fixedcode = 0x00000400-0x00000490

<6>  text      = 0x00800000-0x0098aef0

<6>  rodata    = 0x0098af00-0x00a086ac

<6>  bss       = 0x00a086c0-0x00a1b4e4

<6>  data      = 0x00a1b4e4-0x00a30000

<6>    stack   = 0x00a2e000-0x00a30000

<6>  init      = 0x00a30000-0x00d94000

<6>  available = 0x00d94000-0x07bff000

<6>  DMA Zone  = 0x07c00000-0x08000000

<6>Hardware Trace Active and Enabled

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

<6>Compiled for ADSP-BF561 Rev 0.5

<6>Blackfin Linux support by http://blackfin.uclinux.org/

<6>Processor Speed: 500 MHz core clock and 100 MHz System Clock

<7> boot memmap: 0000000000d94000 - 0000000007bff000 (usable)

<7>On node 0 totalpages: 31743

<7>  DMA zone: 248 pages used for memmap

<7>  DMA zone: 0 pages reserved

<7>  DMA zone: 31495 pages, LIFO batch:7

<7>  Normal zone: 0 pages used for memmap

<7>  Movable zone: 0 pages used for memmap

<6>NOMPU: setting up cplb tables for global access

<6>Instruction Cache Enabled

<6>Data Cache Enabled (write-through)

<4>Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 31495

<5>Kernel command line: console=ttyBF0,115200

<6>Configuring Blackfin Priority Driven Interrupts

<4>PID hash table entries: 512 (order: 9, 2048 bytes)

<6>console [ttyBF0] enabled

<6>Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

<6>Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

<7>Kernel managed physical pages: 31743

<6>Memory available: 111928k/131072k RAM, (3472k init code, 1579k kernel code, 661k data, 4096k dma, 9332k reserved)

<7>Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)

<6>Security Framework initialized

<4>Mount-cache hash table entries: 512

<6>Blackfin Scratchpad data SRAM: 4 KB

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

<6>Blackfin L1 Data B SRAM: 16 KB (16 KB free)

<6>Blackfin L1 Instruction SRAM: 16 KB (13 KB free)

<6>Blackfin L2 SRAM: 128 KB (128 KB free)

<6>net_namespace: 192 bytes

<6>NET: Registered protocol family 16

<6>Blackfin GPIO Controller

<6>Blackfin DMA Controller

<6>generic_board_init(): registering device resources

<6>NET: Registered protocol family 2

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

<6>TCP established hash table entries: 4096 (order: 3, 32768 bytes)

<6>TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

<6>TCP: Hash tables configured (established 4096 bind 4096)

<6>TCP reno registered

<6>NET: Registered protocol family 1

<7>Setting up Blackfin MMR debugfs

<6>BF561 Core B driver v0.1 initialized.

<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

<7>Allocated 267964 bytes for deflate workspace

<7>Allocated 42284 bytes for inflate workspace

<7>Registering JFFS2 compressor "zlib"

<7>Registering JFFS2 compressor "rtime"

<7>Registering JFFS2 compressor "rubinmips"

<7>Registering JFFS2 compressor "dynrubin"

<7>Registering JFFS2 compressor "lzo"

<6>JFFS2: default compression mode: priority

<6>JFS: nTxBlock = 874, nTxLock = 6995

<4>yaffs Oct  7 2008 11:39:53 Installing.

<6>msgmni has been set to 218

<6>io scheduler noop registered

<6>io scheduler anticipatory registered (default)

<6>io scheduler cfq registered

<6>Serial: Blackfin serial driver

<6>brd: module loaded

<6>Linux video capture interface: v2.00

<6>bfin-wdt: initialized: timeout=20 sec (nowayout=0)

<6>TCP cubic registered

<6>NET: Registered protocol family 17

<6>RPC: Registered udp transport module.

<6>RPC: Registered tcp transport module.

<6>802.1Q VLAN Support v1.8 Ben Greear

 

I see why I didn't get any output (no early printk enabled-string) but I don't see why it crashes. Should it crash like this when unable to open console?

 

--

Thomas

QuoteReplyEditDelete

 

 

2008-10-07 08:42:43     Re: Custom BF561 board -- loading linux kernel hangs

Thomas Langås (NORWAY)

Message: 63218   

 

Argh, silly paste, here's the output pasted again:

 

bfin> strings 0xa0b914

<5>Linux version 2.6.26.5-ADI-2009R1-pre-svn5369-dirty (tlan@sarissa) (gcc version 4.1.2 (ADI svn)) #114 Tue Oct 7 11:41:09 CEST 2008

<6>Entering memory_setup()

<6>Board Memory: 128MB

<6>Kernel Managed Memory: 128MB

<6>Memory map:

<6>  fixedcode = 0x00000400-0x00000490

<6>  text      = 0x00800000-0x0098aef0

<6>  rodata    = 0x0098af00-0x00a086ac

<6>  bss       = 0x00a086c0-0x00a1b4e4

<6>  data      = 0x00a1b4e4-0x00a30000

<6>    stack   = 0x00a2e000-0x00a30000

<6>  init      = 0x00a30000-0x00d94000

<6>  available = 0x00d94000-0x07bff000

<6>  DMA Zone  = 0x07c00000-0x08000000

<6>Hardware Trace Active and Enabled

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

<6>Compiled for ADSP-BF561 Rev 0.5

<6>Blackfin Linux support by http://blackfin.uclinux.org/

<6>Processor Speed: 500 MHz core clock and 100 MHz System Clock

<7> boot memmap: 0000000000d94000 - 0000000007bff000 (usable)

<7>On node 0 totalpages: 31743

<7>  DMA zone: 248 pages used for memmap

<7>  DMA zone: 0 pages reserved

<7>  DMA zone: 31495 pages, LIFO batch:7

<7>  Normal zone: 0 pages used for memmap

<7>  Movable zone: 0 pages used for memmap

<6>NOMPU: setting up cplb tables for global access

<6>Instruction Cache Enabled

<6>Data Cache Enabled (write-through)

<4>Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 31495

<5>Kernel command line: console=ttyBF0,115200

<6>Configuring Blackfin Priority Driven Interrupts

<4>PID hash table entries: 512 (order: 9, 2048 bytes)

<6>console [ttyBF0] enabled

<6>Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

<6>Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

<7>Kernel managed physical pages: 31743

<6>Memory available: 111928k/131072k RAM, (3472k init code, 1579k kernel code, 661k data, 4096k dma, 9332k reserved)

<7>Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)

<6>Security Framework initialized

<4>Mount-cache hash table entries: 512

<6>Blackfin Scratchpad data SRAM: 4 KB

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

<6>Blackfin L1 Data B SRAM: 16 KB (16 KB free)

<6>Blackfin L1 Instruction SRAM: 16 KB (13 KB free)

<6>Blackfin L2 SRAM: 128 KB (128 KB free)

<6>net_namespace: 192 bytes

<6>NET: Registered protocol family 16

<6>Blackfin GPIO Controller

<6>Blackfin DMA Controller

<6>generic_board_init(): registering device resources

<6>NET: Registered protocol family 2

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

<6>TCP established hash table entries: 4096 (order: 3, 32768 bytes)

<6>TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

<6>TCP: Hash tables configured (established 4096 bind 4096)

<6>TCP reno registered

<6>NET: Registered protocol family 1

<7>Setting up Blackfin MMR debugfs

<6>BF561 Core B driver v0.1 initialized.

<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

<7>Allocated 267964 bytes for deflate workspace

<7>Allocated 42284 bytes for inflate workspace

<7>Registering JFFS2 compressor "zlib"

<7>Registering JFFS2 compressor "rtime"

<7>Registering JFFS2 compressor "rubinmips"

<7>Registering JFFS2 compressor "dynrubin"

<7>Registering JFFS2 compressor "lzo"

<6>JFFS2: default compression mode: priority

<6>JFS: nTxBlock = 874, nTxLock = 6995

<4>yaffs Oct  7 2008 11:39:53 Installing.

<6>msgmni has been set to 218

<6>io scheduler noop registered

<6>io scheduler anticipatory registered (default)

<6>io scheduler cfq registered

<6>Serial: Blackfin serial driver

<6>brd: module loaded

<6>Linux video capture interface: v2.00

<6>bfin-wdt: initialized: timeout=20 sec (nowayout=0)

<6>TCP cubic registered

<6>NET: Registered protocol family 17

<6>RPC: Registered udp transport module.

<6>RPC: Registered tcp transport module.

<6>802.1Q VLAN Support v1.8 Ben Greear

 

QuoteReplyEditDelete

 

 

2008-10-07 09:08:45     Re: Custom BF561 board -- loading linux kernel hangs

Thomas Langås (NORWAY)

Message: 63219   

 

Ok, so something doesn't like my paste, here's the next few lines:

 

<6>802.1Q VLAN Support v1.8 Ben Greear .greearb@candelatech.com.

<6>All bugs added by David S. Miller .davem@redhat.com.

<6>Freeing unused kernel memory: 3472k freed

<4>Warning: unable to open an initial console.

 

ICPLB exception outside of memory map at 0x30000000

 

 

Ack! Something bad happened to the Blackfin!

 

SEQUENCER STATUS:

SEQSTAT: 0000002c  IPEND: 8008  SYSCFG: 0032

  HWERRCAUSE: 0x0

  EXCAUSE   : 0x2c

  physical IVG15 asserted : <0x07fa0be0> { _evt_default + 0x0 }

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

RETN: <0x070b6000> /* unknown address */

RETX: <0x30203d20> { ___smulsi3_highpart + 0x2824d51c }

RETS: <0x30203d20> { ___smulsi3_highpart + 0x2824d51c }

RETI: <0x07fa021a> { _start + 0x21a }

DCPLB_FAULT_ADDR: <0x07f5fb20> /* unknown address */

ICPLB_FAULT_ADDR: <0x30203d20> { ___smulsi3_highpart + 0x2824d51c }

 

PROCESSOR STATE:

R0 : 00000000    R1 : ffff8000    R2 : 07f60929    R3 : fffffffe

R4 : 00000000    R5 : 00000000    R6 : 00000000    R7 : 00a0b914

P0 : 00a0b914    P1 : 00000128    P2 : ffc00704    P3 : 07f5fe5c

P4 : 38303078    P5 : 07f5ff80    FP : 07f5fc6c    SP : 07f5fa50

LB0: 07fb4208    LT0: 07fb4206    LC0: 00000000

LB1: 00000001    LT1: 00a30a70    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00a0b914

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 07fb8544

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

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

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

USP : 00a30000  ASTAT: 00001025

 

Hardware Trace:

   0 Target : <0x07fa10bc> { _bfin_panic + 0x0 }

     Source : <0x07fa118e> { _trap_c + 0x96 }

   1 Target : <0x07fa118c> { _trap_c + 0x94 }

     Source : <0x07fac5d6> { _printf + 0x42 }

   2 Target : <0x07fac5cc> { _printf + 0x38 }

     Source : <0x07fa0a60> { _serial_puts + 0x1c }

   3 Target : <0x07fa0a54> { _serial_puts + 0x10 }

     Source : <0x07fa0986> { _disable_rs485_output + 0x1a }

   4 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

   5 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

   6 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

   7 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

   8 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

   9 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

  10 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

  11 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

  12 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

  13 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

  14 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

  15 Target : <0x07fa0970> { _disable_rs485_output + 0x4 }

     Source : <0x07fa0976> { _disable_rs485_output + 0xa }

 

Please reset the board

 

### ERROR ### Please RESET the board ###

 

QuoteReplyEditDelete

 

 

2008-10-07 09:42:27     Re: Custom BF561 board -- loading linux kernel hangs

Robin Getz (UNITED STATES)

Message: 63222   

 

Thomas:

 

Looks like there are two things happening...

 

> unable to open an initial console.

 

is bad -

 

but I do see:

 

>Kernel command line: console=ttyBF0,115200

 

>console [ttyBF0] enabled

 

That should be all you need... Do you have a properly defined bfin_uart_resources ? Have a look in : arch/blackfin/mach-bf561/boards/ezkit.c for CONFIG_SERIAL_BFIN - that should be in your board resource file as well.

 

 

 

Next thing - is U-Boot crashing....

 

>ICPLB exception outside of memory map at 0x30000000

 

As soon as you see : >Instruction Cache Enabled - that means the kernel has taken over 100% - and nothing should go back to U-Boot. (init_exception_vectors are run, and all errors are handled by the kernel).

 

I can't tell if the U-Boot crash is from you using the strings command? or from the crash dump...

 

 

QuoteReplyEditDelete

 

 

2008-10-07 12:39:25     Re: Custom BF561 board -- loading linux kernel hangs

Mike Frysinger (UNITED STATES)

Message: 63228   

 

not really.  you're looking at different things.  u-boot is crashing while displaying the buffer.  the crash is not in the kernel log.

QuoteReplyEditDelete

 

 

2008-10-07 18:00:16     Re: Custom BF561 board -- loading linux kernel hangs

Robin Getz (UNITED STATES)

Message: 63232   

 

Mike:

 

Yeah - that is what I thought - but why should "strings" cause a EXCAUSE of 2c? (CPLB miss on an instruction fetch) that doesn't get hanlded by U-Boot properly? Something at  _printf + 0x42 caused a jump to 0x30203d20? That doesn't make sense to me...

 

-Robin

QuoteReplyEditDelete

 

 

2008-10-07 18:33:17     Re: Custom BF561 board -- loading linux kernel hangs

Mike Frysinger (UNITED STATES)

Message: 63233   

 

i dont know, but it's been like that for a while

QuoteReplyEditDelete

 

 

2008-10-07 22:15:11     Re: Custom BF561 board -- loading linux kernel hangs

Robin Getz (UNITED STATES)

Message: 63234   

 

Mike -

 

Are we tracking that as a bug? I don't see it listed?

 

https://blackfin.uclinux.org/gf/project/u-boot/tracker/?action=TrackerItemBrowse&tracker_id=153

 

Sounds like we should be.

QuoteReplyEditDelete

 

 

2008-10-07 22:27:33     Re: Custom BF561 board -- loading linux kernel hangs

Mike Frysinger (UNITED STATES)

Message: 63235   

 

it isnt filed anywhere other than my head at the moment

Attachments

    Outcomes