2009-07-13 09:35:17     External Memory Addressing Error

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

2009-07-13 09:35:17     External Memory Addressing Error

Izhar Eyal (ISRAEL)

Message: 77130   

 

We've ran into new issues. trying to work with DMA.

 

We are now using the bootargs mem=32M max_mem=64M, and we can see the kernel memory is 32MB and board memory is 64M. we are not using the UNCACHED_1M definition, we simply do DMA read/write from the unmanaged upper 32MB area.

 

We have used the __attribute__ option to define an L1 memory region, then inside an ioctrl we are doing a DMA from SDRAM to this region. then we are accessing the L1 memory from userspace and doing processing on that data.

 

Unfortunatly, somewhere during the execution we get an "External Memory Addressing Error" and the application crushes.

 

Why is this happening?

 

Also, is the "bfin-dma" driver fully operational in the 2009 dist ? (in the 2008 it was not working as far as we know)

QuoteReplyEditDelete

 

 

2009-07-13 09:51:24     Re: External Memory Addressing Error

Robin Getz (UNITED STATES)

Message: 77131   

 

Izhar:

 

There are multiple reasons which cause an memory addressing error.

 

When it happens, it should print out the HWERRCAUSE - what is it?

QuoteReplyEditDelete

 

 

2009-07-14 04:37:00     Re: External Memory Addressing Error

Izhar Eyal (ISRAEL)

Message: 77194   

 

We get HWERRCAUSE - 3.

 

What do you think is the problem here?

 

Thanks.

QuoteReplyEditDelete

 

 

2009-07-14 05:19:01     Re: External Memory Addressing Error

Mike Frysinger (UNITED STATES)

Message: 77199   

 

post the full kernel crash output

QuoteReplyEditDelete

 

 

2009-07-14 08:17:06     Re: External Memory Addressing Error

Robin Getz (UNITED STATES)

Message: 77214   

 

Izhar:

 

HWERRCAUSE of 3 means copy/paste from the manual - "An access was attempted to reserved or uninitialized memory."

 

Sounds like a programming error to me. Bad pointer.

QuoteReplyEditDelete

 

 

2009-07-14 10:43:35     Re: External Memory Addressing Error

Izhar Eyal (ISRAEL)

Message: 77226   

 

Here is output:

 

mdma-drv: channels were allocated successfully.

mdma-drv: setting MDMA callbacks was done successfully.

MDMA manager was initialized successfully.

DRV: 5 0xff900000 0x520b70 0x47074705 0x0

IOCTL: 1

0x2800000 0xff900000 0xed8

External Memory Addressing Error

HW Error context

CURRENT PROCESS:

COMM=AVCdecoder_BF52 PID=119

TEXT = 0x00500040-0x0051a7a0        DATA = 0x0051a7a4-0x00520074

BSS = 0x00520074-0x00528954  USER-STACK = 0x00529f68

 

return address: [0x0051881a]; contents of:

0x005187f0:  6ff9  601b  549a  3212  9c01  e0a2  1002  c803

0x00518800:  1800  9201  9c01  9201  0c42  3298  1005  9073

0x00518810:  0010  0c42  1805  e0a2  2003 [9819] 9a01  9073

0x00518820:  0010  0000  3200  3212  50d0  0e3a  1818  4349

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0000c03f  IPEND: 0030  SYSCFG: 0006

  HWERRCAUSE: 0x3

  EXCAUSE   : 0x3f

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

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

RETX: <0x0051a156> [ AVCdecoder_BF52 + 0x1a116 ]

RETS: <0x00500a7a> [ AVCdecoder_BF52 + 0xa3a ]

PC  : <0x0051881a> [ AVCdecoder_BF52 + 0x187da ]

 

PROCESSOR STATE:

R0 : ff900000    R1 : 000000ff    R2 : ff3e1e9a    R3 : 80000000

R4 : 00503a60    R5 : 00521548    R6 : 005277d0    R7 : ff3e1e9a

P0 : ff9034de    P1 : 0051a8e8    P2 : ff3e1e9a    P3 : ff904000

P4 : 0052006c    P5 : 0051a7a4    FP : ffb00cc0    SP : 005ddf24

LB0: 0051881d    LT0: 0051881a    LC0: ff3de9bc

LB1: 00517bad    LT1: 00517bac    LC1: 00000000

B0 : 00524ce0    L0 : 00000000    M0 : 00000024    I0 : ff900b22

B1 : 00000000    L1 : 00000000    M1 : 00000038    I1 : 005286f4

B2 : 00000000    L2 : 00000000    M2 : 00000020    I2 : 00524afc

B3 : 00000000    L3 : 00000000    M3 : ffffffe4    I3 : 00524cf4

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

USP : ffb00c8c  ASTAT: 02000002

 

Hardware Trace:

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

     Source : <0xffa00cda> { _evt_ivhw + 0x7e }

   1 Target : <0xffa00c5c> { _evt_ivhw + 0x0 }

     Source : <0x0051881c> [ AVCdecoder_BF52 + 0x187dc ]

   2 Target : <0x00518816> [ AVCdecoder_BF52 + 0x187d6 ]

     Source : <0x005187ec> [ AVCdecoder_BF52 + 0x187ac ]

   3 Target : <0x005187d8> [ AVCdecoder_BF52 + 0x18798 ]

     Source : <0x00500a76> [ AVCdecoder_BF52 + 0xa36 ]

   4 Target : <0x00500a5c> [ AVCdecoder_BF52 + 0xa1c ]

     Source : <0x0051725e> [ AVCdecoder_BF52 + 0x1721e ]

   5 Target : <0x0051725a> [ AVCdecoder_BF52 + 0x1721a ]

     Source : <0x0051782c> [ AVCdecoder_BF52 + 0x177ec ]

   6 Target : <0x00517824> [ AVCdecoder_BF52 + 0x177e4 ]

     Source : <0x00517818> [ AVCdecoder_BF52 + 0x177d8 ]

   7 Target : <0x00517812> [ AVCdecoder_BF52 + 0x177d2 ]

     Source : <0x005176ec> [ AVCdecoder_BF52 + 0x176ac ]

   8 Target : <0x005176e0> [ AVCdecoder_BF52 + 0x176a0 ]

     Source : <0x005195f6> [ AVCdecoder_BF52 + 0x195b6 ]

   9 Target : <0x005195ee> [ AVCdecoder_BF52 + 0x195ae ]

     Source : <0x00519634> [ AVCdecoder_BF52 + 0x195f4 ]

  10 Target : <0x00519632> [ AVCdecoder_BF52 + 0x195f2 ]

     Source : <0x005175aa> [ AVCdecoder_BF52 + 0x1756a ]

  11 Target : <0x0051759e> [ AVCdecoder_BF52 + 0x1755e ]

     Source : <0x00519588> [ AVCdecoder_BF52 + 0x19548 ]

  12 Target : <0x00519580> [ AVCdecoder_BF52 + 0x19540 ]

     Source : <0x00519520> [ AVCdecoder_BF52 + 0x194e0 ]

  13 Target : <0x0051951c> [ AVCdecoder_BF52 + 0x194dc ]

     Source : <0x0051953c> [ AVCdecoder_BF52 + 0x194fc ]

  14 Target : <0x00519538> [ AVCdecoder_BF52 + 0x194f8 ]

     Source : <0x0051a168> [ AVCdecoder_BF52 + 0x1a128 ]

  15 Target : <0x0051a156> [ AVCdecoder_BF52 + 0x1a116 ]

     Source : <0xffa00c5a> { __common_int_entry + 0xca }

Stack from 005ddf04:

        00000000 ffa00cde 0051a7a4 ff3e1e9a 005277d0 0051a8e8 00000011 0051a156

        0051a156 00000030 0000c03f 00000000 005de000 0051a156 0051881a 00500a7a

        ff900000 02000002 00517bad 0051881d 00517bac 0051881a 00000000 ff3de9bc

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00524ce0

        00000000 00000000 00000000 00000000 ffffffe4 00000020 00000038 00000024

        00524cf4 00524afc 005286f4 ff900b22 ffb00c8c ffb00cc0 0051a7a4 0052006c

 

Call Trace:

 

 

Bus error

root:/>

QuoteReplyEditDelete

 

 

2009-07-14 10:46:54     Re: External Memory Addressing Error

Mike Frysinger (UNITED STATES)

Message: 77227   

 

so try reading the documentation:

  docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:analyzing_traces#bad_pointers

Attachments

    Outcomes