[#5493] module test kernel can not boot up in bf538-ezkit

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

[#5493] module test kernel can not boot up in bf538-ezkit

Submitted By: Vivi Li

Open Date

2009-09-03 21:30:05     Close Date

2009-09-13 22:13:19

Priority:

Medium     Assignee:

Barry Song

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2010R1     Release:

Category:

N/A     Board:

N/A

Processor:

BF538     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.1-09r1-rc9

App binary format:

N/A     

Summary: module test kernel can not boot up in bf538-ezkit

Details:

 

module test kernel can not boot up in bf538-ezkit.

 

--

Linux version 2.6.30.5-ADI-2010R1-pre-svn7263 (test@linux70-bf538) (gcc version 4.1.2 (ADI svn)) #16 Fri Sep 4 05:27:19 CST 2009

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001023c0

  rodata    = 0x001023c0-0x00159534

  bss       = 0x0015a000-0x0016ac24

  data      = 0x0016ac24-0x0017c000

    stack   = 0x0017a000-0x0017c000

  init      = 0x0017c000-0x006f3000

  available = 0x006f3000-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 0

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

Compiled for ADSP-BF538 Rev 0.4

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

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

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

Data Cache Enabled for CPU0

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

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

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=10.100.4.50f

NR_IRQS:87

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

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

Memory available: 56824k/65536k RAM, (5596k init code, 1028k kernel code, 488k data, 1024k dma, 572k reserved)

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

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

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

Blackfin L1 Instruction SRAM: 64 KB (53 KB free)

net_namespace: 296 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

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: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

NET: Registered protocol family 1

msgmni has been set to 110

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Serial: Blackfin serial driver

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

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

bfin-uart.1: ttyBF2 at MMIO 0xffc02100 (irq = 50) is a BFIN-UART

brd: module loaded

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

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc02300, dma channel@14

bfin-spi bfin-spi.2: No DMA channel specified

bfin-spi: probe of bfin-spi.2 failed with error -2

ad7879 spi0.1: Failed to probe AD7879 Touchscreen

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

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

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 2004-05-31 09:04:54 UTC (1085994294)

IP-Config: Device `eth0' not found.

Freeing unused kernel memory: 5596k freed

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

Data access misaligned address violation

- Attempted misaligned data memory or data cache access.

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=cat PID=151

CPU = 0

TEXT = 0x03180040-0x031c78c0        DATA = 0x031c78c4-0x031d961c

BSS = 0x031d961c-0x031dafa4  USER-STACK = 0x031e2f90

 

return address: [0x0009ec5a]; contents of:

0x0009ec30:  9128  5010  e421  0027  5048  e3fb  4be5  e522

0x0009ec40:  0032  e149  0015  e109  a1c8  3042  4f28  3200

0x0009ec50:  e120  00a0  5e90  5a8a  ad52 [b510] e522  0032

0x0009ec60:  a0a8  9129  5041  3042  4f28  3200  5e90  5a8a

 

ADSP-BF538-0.4 525(MHz CCLK) 131(MHz SCLK) (mpu off)

Linux version 2.6.30.5-ADI-2010R1-pre-svn7263 (test@linux70-bf538) (gcc version 4.1.2 (ADI svn)) #16 Fri Sep 4 05:27:19 CST 2009

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00000024  IPEND: 8008  IMASK: 003f  SYSCFG: 0006

  Peripheral interrupts masked off

  Kernel interrupts masked off

  EXCAUSE   : 0x24

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

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

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

  logical irq  14 mapped  : <0x000b08c0> { _bfin_rtc_interrupt + 0x0 }

  logical irq  21 mapped  : <0x0009eecc> { _bfin_serial_dma_rx_int + 0x0 }

  logical irq  22 mapped  : <0x0009f200> { _bfin_serial_dma_tx_int + 0x0 }

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

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

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

RETS: <0x0009ec3e> { _bfin_serial_dma_tx_chars + 0x8a }

PC  : <0x0009ec5a> { _bfin_serial_dma_tx_chars + 0xa6 }

DCPLB_FAULT_ADDR: <0x732d6e70> /* kernel dynamic memory */

ICPLB_FAULT_ADDR: <0x0009ec5a> { _bfin_serial_dma_tx_chars + 0xa6 }

 

PROCESSOR STATE:

R0 : 000000a0    R1 : 006f1040    R2 : 00000002    R3 : 00000040

R4 : 00000fff    R5 : 007bc040    R6 : 00000000    R7 : 0000ffff

P0 : 000000e0    P1 : 0015a1c8    P2 : 732d6e69    P3 : 0000ffff

P4 : 00168480    P5 : 03bc244c    FP : 03e90000    SP : 03161cd8

LB0: ffa0144a    LT0: ffa0144a    LC0: 00000000

LB1: 0000841a    LT1: 0000841a    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 031e2fdf

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 007bc040

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 : 031e1e3c  ASTAT: 02003024

 

Hardware Trace:

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

     Source : <0xffa0065c> { _exception_to_level5 + 0xa4 } CALL pcrel

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

     Source : <0xffa0046c> { _bfin_return_from_exception + 0x18 } RTX

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

     Source : <0xffa00510> { _ex_trap_c + 0x74 } JUMP.S

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

     Source : <0xffa00722> { _trap + 0x5a } JUMP (P4)

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

     Source : <0x0009ec58> { _bfin_serial_dma_tx_chars + 0xa4 } 0xad52

   5 Target : <0x0009ec3e> { _bfin_serial_dma_tx_chars + 0x8a }

     Source : <0x0000841c> { _blackfin_dcache_flush_range + 0x18 } RTS

   6 Target : <0x00008404> { _blackfin_dcache_flush_range + 0x0 }

     Source : <0x0009ec3a> { _bfin_serial_dma_tx_chars + 0x86 } CALL pcrel

   7 Target : <0x0009ec1a> { _bfin_serial_dma_tx_chars + 0x66 }

     Source : <0x0009ebfe> { _bfin_serial_dma_tx_chars + 0x4a } IF CC JUMP

   8 Target : <0x0009ebf4> { _bfin_serial_dma_tx_chars + 0x40 }

     Source : <0x0009ebe0> { _bfin_serial_dma_tx_chars + 0x2c } IF CC JUMP

   9 Target : <0x0009ebb4> { _bfin_serial_dma_tx_chars + 0x0 }

     Source : <0x0009ed22> { _bfin_serial_start_tx + 0x36 } JUMP.L

  10 Target : <0x0009ed1a> { _bfin_serial_start_tx + 0x2e }

     Source : <0x0009ed10> { _bfin_serial_start_tx + 0x24 } IF !CC JUMP

  11 Target : <0x0009ecec> { _bfin_serial_start_tx + 0x0 }

     Source : <0x0009bebe> { ___uart_start + 0x3e } JUMP (P2)

  12 Target : <0x0009beb6> { ___uart_start + 0x36 }

     Source : <0x0009beb2> { ___uart_start + 0x32 } IF !CC JUMP

  13 Target : <0x0009be80> { ___uart_start + 0x0 }

     Source : <0x0009becc> { _uart_start + 0xc } CALL pcrel

  14 Target : <0x0009bec0> { _uart_start + 0x0 }

     Source : <0x0009e002> { _uart_write + 0x7a } CALL pcrel

  15 Target : <0x0009e000> { _uart_write + 0x78 }

     Source : <0x0009e01e> { _uart_write + 0x96 } JUMP.S

 

Kernel Stack

Stack info:

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

Memory from 0x03161f20 to 03162000

03161f20: 00000001 [031827e6] 00008000  00000000  00000000  03162000  031827e6  031827e6

03161f40:<0319afb8><ffa00f54> 02003004  0060cb55  0318c8eb  0060cb0e  0318c8e2  00000000

03161f60: 0000000f  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03161f80: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03161fa0: 00000000  00000000  00000000  ffffffff  031e2fdf  031e1e3c  031e1e48  031da5a0

03161fc0: 00000001  00000003  031daa84  ffffeff4  00000004  0000044d  031e1ea0  00000001

03161fe0: 00000001 <031e2fb2> 0000044d  031e1ea0  00000001  00000001  00000004  00000006

Return addresses in stack:

    address : <0x0319afb8> [ cat + 0x1af78 ]

    address : <0xffa00f54> { _evt_system_call + 0x64 }

    address : <0x031e2fb2> [ cat + 0x62fb2 ]

Modules linked in:

Kernel panic - not syncing: Kernel exception

Hardware Trace:

Stack info:

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

FP: (0x03161c8c)

Memory from 0x03161bf0 to 03162000

03161bf0:[001307fc]<0000f72c> 00151cd8  001307fc  0015f49e  0015f49e  0015f49e  03161c2c

03161c10: 03161c2c <0000522a> 03161cd8  ffe02014  0000ffff  00130198 <0002eebc> 0016d5ec

03161c30: 0000003f  00000001  00000081  00030001  00000100 <00013960><0002cb0a> 0017336c

03161c50: 00000000  00002472 <0002df0c> 0016f544  00000004 <ffa0031a> 0017336c  00000000

03161c70: 00002472  00000006  00000000  031c8878  031d961c  00000000  00000000 (00000000)

03161c90:<ffa00b94> 031e181c  08048834  00002080  03162000  006019d2  000670d6  00067ab8

03161cb0: 00008050 <ffa00660> 0015c000  00008008  00000024  007bc040  00000fff  00000006

03161cd0: 02003026  00000480  00000480  00008008  00000024  00000000  03161db4  00000480

03161cf0: 0009ec5a <0009ec3e> 000000a0  02003024  0000841a  ffa0144a  0000841a  ffa0144a

03161d10: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03161d30: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03161d50: 00000000  00000000  00000000  00000000  007bc040  031e2fdf  031e1e3c  03e90000

03161d70: 03bc244c  00168480  0000ffff  732d6e69  0015a1c8  000000e0  0000ffff  00000000

03161d90: 007bc040  00000fff  00000040  00000002  006f1040  000000a0  000000a0  000000e0

03161db0: 00000006  00000000 <03161ea0><0003de2c><0009bed0> 03bc244c  00000040  0000044d

03161dd0: 00000bb3  031e22ed <0009e006> 00000000  031e1e68 <00040644> 0399eca0  03160000

03161df0:<00097430> 03e90000  0000005f  0399e320  0000044d  03e90378  007bc000  03161e40

03161e10: 03161e54 <00097e6a> 0399e320 <00097efa> 007bc000  03e90000  0000044d  03160000

03161e30: 007bc000  00000000  00000000  00000000  00000000  007a2360  0000b09c  03e900d8

03161e50: 03e900d8  03160000 <000959cc> 0399e320  03e90000  007bc000  0000044d  0000044d

03161e70: 031e1ea0  0000044d  00001000  03e90000  031e2e9c  0000044d  00097e0c  03e90014

03161e90: 00000000  031e1e48 <00040c30> 0399e320  00000004  00000003  03161ef0  031e1ea0

03161eb0: 0000044d  00000001  007afbb0  00000020  00000003  03161ef0  00000000 <00040fb0>

03161ed0: 0399e320  031e1ea0  0000044d  00000001  00000005  00000000  ffffe000  03161ef0

03161ef0: 00000000  00000000  00000000 <ffa00858> 00040f80  00000000  ffffe000  03ea0ff6

03161f10: 0300ac60  0016d0a0 <031e2fb2> 00000001  00000001  031827e6  00008000  00000000

03161f30: 00000000  03162000  031827e6  031827e6 <0319afb8><ffa00f54> 02003004  0060cb55

03161f50: 0318c8eb  0060cb0e  0318c8e2  00000000  0000000f  00000000  00000000  00000000

03161f70: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

03161f90: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  ffffffff

03161fb0: 031e2fdf  031e1e3c  031e1e48  031da5a0  00000001  00000003  031daa84  ffffeff4

03161fd0: 00000004  0000044d  031e1ea0  00000001  00000001 <031e2fb2> 0000044d  031e1ea0

03161ff0: 00000001  00000001  00000004  00000006

Return addresses in stack:

    address : <0x0000f72c> { _panic + 0x4c }

    address : <0x0000522a> { _trap_c + 0x376 }

    address : <0x0002eebc> { _rcu_process_callbacks + 0x2c }

    address : <0x00013960> { ___do_softirq + 0x58 }

    address : <0x0002cb0a> { _handle_IRQ_event + 0x3e }

    address : <0x0002df0c> { _handle_simple_irq + 0x68 }

    address : <0xffa0031a> { _asm_do_IRQ + 0x36 }

   frame  1 : <0xffa00b94> { __common_int_entry + 0x64 }

    address : <0xffa00660> { _exception_to_level5 + 0xa8 }

    address : <0x0009ec3e> { _bfin_serial_dma_tx_chars + 0x8a }

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

    address : <0x0003de2c> { _kmem_cache_alloc + 0x68 }

    address : <0x0009bed0> { _uart_start + 0x10 }

    address : <0x0009e006> { _uart_write + 0x7e }

    address : <0x00040644> { _do_sync_read + 0xac }

    address : <0x00097430> { _process_output_block + 0x9c }

    address : <0x00097e6a> { _n_tty_write + 0x5e }

    address : <0x00097efa> { _n_tty_write + 0xee }

    address : <0x000959cc> { _tty_write + 0xec }

    address : <0x00040c30> { _vfs_write + 0x6c }

    address : <0x00040fb0> { _sys_write + 0x30 }

    address : <0xffa00858> { _system_call + 0x68 }

    address : <0x031e2fb2> [ cat + 0x62fb2 ]

    address : <0x0319afb8> [ cat + 0x1af78 ]

    address : <0xffa00f54> { _evt_system_call + 0x64 }

    address : <0x031e2fb2> [ cat + 0x62fb2 ]

--

 

Follow-ups

 

--- Barry Song                                               2009-09-10 02:58:56

If disabling SPI1 or without request P_SPI1_MISO pin, the system can start-up

normally.

The culprit is P_SPI1_MISO(mux with PD1), after executing peripheral_request

for this pin, uart0 DMA will make strange error and cause the system crash. I

didn't find any other module that is using PD1, so there should be no resource

conflict for this pin.

But what's the reason? Is it a hardware anomaly? Or is there any relationship

between PD1 pin and UART pins on PCB? Let me check them.

 

--- Barry Song                                               2009-09-10 04:05:21

After checking the schematics, on BF538-EZKIT, PD1 is not used, so the

P_SPI1_MISO pin will not conflict with others.

Even with SPI1 enabled, if we disable "CONFIG_SERIAL_BFIN_DMA" for

serial port and use PIO mode, the system can work normally. With

CONFIG_SERIAL_BFIN_DMA, a trap will happen at this line:

        set_dma_config(uart->tx_dma_channel,

                set_bfin_dma_config(DIR_READ, DMA_FLOW_STOP,

                        INTR_ON_BUF,

                        DIMENSION_LINEAR,

                        DATA_SIZE_8,

                        DMA_SYNC_RESTART));

in fact, crash just at:

static inline void set_dma_config(unsigned int channel, unsigned short config)

{

        dma_ch[channel].regs->cfg = config;

}

It is really like a hardware issue.

 

--- Barry Song                                               2009-09-10 05:35:07

I made a mistake.

It is caused by one array beyond-access while executing peripheral_request to

spi1/spi2 pins. It changes the contents of global variant dma_ch[] in fact, then

dma_ch[channel].regs->cfg becomes a misaligned address.

 

--- Vivi Li                                                  2009-09-13 22:13:18

OK now. close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.module    application/octet-stream    33278    Vivi Li

Attachments

Outcomes