2009-09-17 13:02:56 Need help tracing error observed in bf537
Tapan Katwala (CANADA)
Message: 80087
Hello,
I am a new user of blackfin bf537 processor and working through some basic errors that I have observed while implementing programs on the board. The program dump is as follows as observed and then the board restarts:
root:/> PHY: 0:000000001 - Link is Up - 100/Full
Instruction fetch misaligned address violation
- Attempted misaligned instruction cache fetch. On a misaligned instruction fetch exception, the return address provided in RETX is the destination address which is misaligned, rather than the address of the offending instruction.
Deferred Exception context
CURRENT PROCESS:
COMM=amict PID=357
TEXT = 0x00000000340000-0x0000000034a574 DATA = 0x000000002f8574-0x000000002f930c
BSS = 0x000000002f930c-0x00000000360000 USER-STACK = 0x0000000037feb0
return address: [0x00000000353d1a]; contents of:
0x00000000353cf0: 0000 000000002012 00000000c0 0000 00000000200f 000000001a8 0000 00000000200c
0x00000000353d00: 00000000248 0000 000000002009 00000000128 0000 000000002006 0000000038 0000
0x00000000353d10: 000000002003 0000000030 0000 00000000915a 00000000a05b [0000000052] 0000 0000
0x00000000353d20: 0000 00000000e519 00000000fffe 00000000e51b 00000000ffff 0000000051 00000000e519 00000000fffc
Userspace Stack
Stack info:
SP: [0x000000002a] <0x000000002a> /* Maybe null pointer? */
Double Fault
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=amict PID=357
TEXT = 0x00000000340000-0x0000000034a574 DATA = 0x000000002f8574-0x000000002f930c
BSS = 0x000000002f930c-0x00000000360000 USER-STACK = 0x0000000037feb0
return address: [0x000000003f42]; contents of:
0x000000003f20: 00000000e140 0000000014 00000000e431 0000000033 00000000e100 000000008918 000000003055 00000000e300
0x000000003f30: 0000000043e7 00000000e431 0000000033 000000006380 000000005581 00000000303e 0000000067e7 000000002020
0x000000003f40: 000000003216 [000000009110] 000000004800 00000000141a 0000000067f0 00000000e3ff 00000000ff89 000000004340
0x000000003f50: 00000000c00 000000001c14 00000000c07 000000003217 000000001403 000000002010 000000009152 00000000322f
Hardware Trace:
0 Target : <0x0000000043e8> { _trap_c + 0x0 }
Source : <0x00000000ffa006c8> { _exception_to_level5 + 0x000000009c } CALL pcrel
1 Target : <0x00000000ffa0062c> { _exception_to_level5 + 0x0 }
Source : <0x00000000ffa004b6> { _bfin_return_from_exception + 0x00000000e }
2 Target : <0x00000000ffa004a8> { _bfin_return_from_exception + 0x0 }
Source : <0x00000000ffa00580> { _ex_trap_c + 0x000000006c } JUMP.S
3 Target : <0x00000000ffa00514> { _ex_trap_c + 0x0 }
Source : <0x00000000ffa00750> { _trap + 0x0000000028 } JUMP (P4)
4 Target : <0x00000000ffa00728> { _trap + 0x0 }
Source : <0x00000000353d18> [ /lib/libpthread-0.9.29.so + 0x000000003d18 ]
5 Target : <0x00000000353d16> [ /lib/libpthread-0.9.29.so + 0x000000003d16 ]
Source : <0x00000000353c86> [ /lib/libpthread-0.9.29.so + 0x000000003c86 ] JUMP.S
6 Target : <0x00000000353c86> [ /lib/libpthread-0.9.29.so + 0x000000003c86 ]
Source : <0x00000000354004> [ /lib/libpthread-0.9.29.so + 0x000000004004 ] JUMP (P1)
7 Target : <0x00000000353ffc> [ /lib/libpthread-0.9.29.so + 0x000000003ffc ]
Source : <0x000000003550b4> [ /lib/libpthread-0.9.29.so + 0x0000000050b4 ] CALL pcrel
8 Target : <0x000000003550ac> [ /lib/libpthread-0.9.29.so + 0x0000000050ac ]
Source : <0x0000000018e15e> { _early_trap_c + 0x000000006 } JUMP (P1)
9 Target : <0x0000000018e14c> { _setup_early_printk + 0x00000000148 }
Source : <0x0000000018e072> { _setup_early_printk + 0x000000006e } RTS
10 Target : <0x0000000018e066> { _setup_early_printk + 0x0000000062 }
Source : <0x0000000018e02e> { _setup_early_printk + 0x000000002a } IF !CC JUMP
11 Target : <0x0000000018e01a> { _setup_early_printk + 0x0000000016 }
Source : <0x0000000018be1e> { _inflate_fixed + 0x00000000ee } RTS
12 Target : <0x0000000018be10> { _inflate_fixed + 0x00000000e0 }
Source : <0x0000000018c110> { _do_header + 0x0000000050 } JUMP.S
13 Target : <0x0000000018c10e> { _do_header + 0x000000004e }
Source : <0x0000000018bddc> { _inflate_fixed + 0x00000000ac } IF !CC JUMP
14 Target : <0x0000000018bd9a> { _inflate_fixed + 0x000000006a }
Source : <0x000000001893e2> { _huft_build + 0x000000002e } RTS
15 Target : <0x000000001893dc> { _huft_build + 0x0000000028 }
Source : <0x0000000018941c> { _huft_build + 0x0000000068 } IF CC JUMP
Stack info:
SP: [0x000000003163cc0] <0x000000003163cc0> /* kernel dynamic memory */
Memory from 0x000000003163cc0 to 000000003164000
000000003163cc0:[00000000ffa00626] 000000001c 000000003163cf0 00000000a059c <00000000c448> 00000000480 00000000480 0000000062027
000000003163ce0: 00000000 000000003163db0 000000003f42 000000003f42 <000000003f32> 00000000fffffff0 000000002002022 000000001de077
000000003163d00: 0000000018e181 000000001de076 0000000018e174 00000000 00000000 00000000 00000000 00000000
000000003163d20: 00000000 0000000043823c 000000001ffee21 0000000075308a9 000000001c 00000000 00000000 00000000
000000003163d40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000fffef543 00000000
000000003163d60: 000000001f9ba4 00000000316ac24 000000003163e54 000000003163dbc 00000000ffe02014 00000000378d3e8 0000000020 000000001f
000000003163d80: 00000000a 000000001c 0000000020 00000000100d 000000002f8b48 000000001728 000000001f 000000002a
000000003163da0: 00000000fffffff0 00000000fffffff0 00000000a 000000006 <00000000c962> 000000002a 000000003163dbc 000000003078303c
000000003163dc0: 0000000030303030 0000000032303030 000000002f203e61 00000000614d202a 0000000020656279 000000006c6c756e 00000000696f7020 000000007265746e
000000003163de0: 000000002f2a203f 000000002a9800 0000000035cb8c0 000000001 000000003163e7c 000000002a9800 00000000316ab9f 000000006
000000003163e00: 000000002001004 0000000035cb8c0 000000001 00000000316ac34 00000000316ac34 <00000000c70e> 000000003163f24 00000000ffe02014
000000003163e20: 00000000378d3e8 00000000353d30 00000000353d1a 00000000353d10 00000000 000000007fffffff 00000000164868 000000003163e50
000000003163e40: 00000000316ac34 <00000000c70e> 000000003163f24 00000000ffe02014 00000000378d3e8 00000000316ac34 <000000004714> 000000003163f24
000000003163e60: 00000000ffe02014 00000000378d3e8 000000002a 000000007 000000003 000000002f8b48 000000001 000000002a
000000003163e80: 000000001f 0000000035cb8c0 00000000 0000000030001 00000000 000000003163ec0 <000000008ebe> 0000000037dec48
000000003163ea0: 000000003163ec0 <000000008ebe> 0000000037dec48 000000001696c8 00000000390fe8 000000001 000000003163ee0 000000003163ee0
000000003163ec0: 000000003163edc <000000008f3c> 000000005664e0 0000000037de380
0000000037dec20 00000000566360 00000000ffffe000 000000003163ef8
000000003163ee0: 00000000ffa013f2 000000005664e0 00000000566360 000000003163ef0 00000000 00000000 00000000316ab58 00000000ffa008ba
000000003163f00: 000000003162000 <00000000ffa006cc> 00000000ffa00c2c 00000000316bcfe 00000000ffff 000000003c27fc 000000001 000000001
000000003163f20: 000000001ceaa0 00000000480 0000000030 000000006202a 00000000 000000003164000 00000000480 00000000353d1a
000000003163f40:<000000003550b8> 00000000 000000002003024 000000001de077 0000000018e181 000000001de076 0000000018e174 00000000
000000003163f60: 00000000 00000000 00000000 00000000 00000000 0000000043823c 000000001ffee21 0000000075308a9
000000003163f80: 000000001c 00000000 00000000 00000000 00000000 00000000 00000000 00000000
000000003163fa0: 00000000 000000003200e4 00000000 00000000 000000001f9ba4 00000000316ac24 00000000316ac34 000000003c2850
000000003163fc0: 00000000316ac68 00000000378d3e8 0000000061762f2f 00000000353c86 000000003906f4 00000000316bcfe 00000000316bd1c 000000003c27fc
000000003163fe0: 000000002f8b48 00000000742f2f72 00000000 00000000316ac33 00000000 00000000 000000003906f4 000000006
000000003164000: 0000000037de940
Return addresses in stack:
address : <0x00000000ffa00626> { _double_fault + 0x00000000a2 }
address : <0x00000000c448> { ___call_console_drivers + 0x0000000044 }
address : <0x000000003f32> { _show_stack + 0x000000006a }
address : <0x00000000c962> { _release_console_sem + 0x00000000176 }
address : <0x00000000c70e> { _printk + 0x0000000012 }
address : <0x00000000c70e> { _printk + 0x0000000012 }
address : <0x000000004714> { _trap_c + 0x0000000032c }
address : <0x000000008ebe> { _set_next_entity + 0x0000000016 }
address : <0x000000008ebe> { _set_next_entity + 0x0000000016 }
address : <0x000000008f3c> { _pick_next_task_fair + 0x0000000038 }
address : <0x00000000ffa006cc> { _exception_to_level5 + 0x00000000a0 }
address : <0x000000003550b8> [ /lib/libpthread-0.9.29.so + 0x0000000050b8 ]
Linux version 2.6.26.5-ADI-2009R1-pre-svn1414-dirty (tapan@tapan-desktop) (gcc version 4.1.2 (ADI svn)) #596 Thu Sep 17 13:48:45 ADT 2009
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000000400-0x00000000490
text = 0x000000001000-0x0000000011ad40
rodata = 0x0000000011ad40-0x00000000166ed4
bss = 0x00000000166ee0-0x00000000175e28
data = 0x00000000175e28-0x00000000188000
stack = 0x00000000186000-0x00000000188000
init = 0x00000000188000-0x00000000569000
available = 0x00000000569000-0x0000000037ff000
DMA Zone = 0x000000003f00000-0x000000004000000
Hardware Trace Active and Enabled
Recovering from Watchdog event
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
NOMPU: setting up cplb tables for global access
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14223
Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,9600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console [ttyBF0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 51220k/65536k RAM, (3972k init code, 1127k kernel code, 437k data, 1024k dma, 7756k reserved)
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 (41 KB free)
net_namespace: 192 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
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 100
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
simple-gpio: now handling 48 GPIOs: 0 - 47
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0x00000000ffc00400 (irq = 18) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0x00000000ffc02000 (irq = 20) is a BFIN-UART
brd: module loaded
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:000000001, ir
q=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
physmap platform flash device: 00000000400000 at 0000000020000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0000000040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Using physmap partition information
Creating 4 MTD partitions on "physmap-flash.0":
0x00000000-0x0000000040000 : "bootloader(nor)"
0x0000000040000-0x00000000120000 : "linux kernel(nor)"
0x00000000120000-0x000000003f0000 : "file system(nor)"
0x000000003f0000-0x00000000400000 : "MAC Address(nor)"
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0,
regs_base@00000000ffc00500, dma channel@7
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
dma_alloc_init: dma_page @ 0x000000007e0000 - 256 pages at 0x000000003f00000
ALSA device list:
#0: ADI ad1836 at PF1 SPORT1 rx/tx dma 5/6 err irq 46
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Freeing unused kernel memory: 3972k freed
/etc/Pie.config: cannot open
cp: cannot stat '/var/tmp/Pie.config.tmp': No such file or directory
/etc/Pie.config: cannot open
cp: cannot stat '/var/tmp/Pie.config.tmp': No such file or directory
/etc/Pie.config: cannot open
cp: cannot stat '/var/tmp/Pie.config.tmp': No such file or directory
/etc/Pie.config: cannot open
cp: cannot stat '/var/tmp/Pie.config.tmp': No such file or directory
/etc/Pie.config: cannot open
cp: cannot stat '/var/tmp/Pie.config.tmp': No such file or directory
/etc/Pie.config: cannot open
/usr/bin/int2hex: missing or incorrect arguments
Try `int2hex --help' for more information
/etc/Pie.config: cannot open
/usr/bin/int2hex: missing or incorrect arguments
Try `int2hex --help' for more information
/etc/Pie.config: cannot open
/usr/bin/int2hex: missing or incorrect arguments
Try `int2hex --help' for more information
BusyBox v1.11.1 (2009-09-17 09:47:13 ADT) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> PHY: 0:000000001 - Link is Up - 100/Full
Please do help me trace the problem as to which part in the code caused this error and a pointer in the right direction would be really helpful, so I can learn ways to debug errors faced henceforth.
Thank you.
QuoteReplyEditDelete
2009-09-17 13:15:48 Re: Need help tracing error observed in bf537
Mike Frysinger (UNITED STATES)
Message: 80088
have you read the documentation ?
docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:analyzing_traces
QuoteReplyEditDelete
2009-09-17 13:36:07 Re: Need help tracing error observed in bf537
Tapan Katwala (CANADA)
Message: 80091
Acutally, I have reviewed the analyzing trace help page and it asked for a specific "ICPLB_FAULT_ADDR" variable to check in the dump. I could not find that variable in my trace, so thought would ask if there could be any configuration setting that I am not aware of for the variable to show in my program dump.
QuoteReplyEditDelete
2009-09-17 13:41:54 Re: Need help tracing error observed in bf537
Mike Frysinger (UNITED STATES)
Message: 80092
you're using an old/unreleased source tree (2.6.26.5-ADI-2009R1). update to the actual release.
QuoteReplyEditDelete
2009-09-17 14:35:36 Re: Need help tracing error observed in bf537
Tapan Katwala (CANADA)
Message: 80097
thank you for the information. I'll do it accordingly and follow the analyzing trace manual. just for my curiosity, based on the old release that I have, is there a way that I could get an idea of where to look in the dump to isolate the problem.
QuoteReplyEditDelete
2009-09-17 15:10:11 Re: Need help tracing error observed in bf537
Mike Frysinger (UNITED STATES)
Message: 80098
the kernel crashed while dumping the trace, so probably not. all you know is that your program "amict" is the thing causing the problem.