In order to debug my mpeg4dec app side program I was looking dmai to see how
it accessed the viddec2 ce interface.

Along the way I decided to try and compile it and also to try and upgrade
some components.
I modified the dmai source to support my custom board and can compile it.

Now I am having a run-time issue with the codec engine.
I am just trying to run the decode demo.
I get the error:
Unable to handle kernel paging request at virtual address c808b000

There is a lot of talk about this error, and I have read through the
postings, but still have not figured it out.
If I change the CMEM insert command, I can get it to say:
CMEMK Error: CMEM phys_start (0x87600000) overlaps kernel (0x80000000 ->
0x87800000)
So I know that my kernel goes until 87800000.
So I set my CMEM to start at 0x87800000 and end at 0x88000000.
In the tcf file for the codec server, the first section (DDRALGHEAP) starts
at 0x8B8000000, so there should be plenty of space.

But it crashes every time with the kernel paging error. I have freshly
compiled cmem and dsplink against my kernel.
I have tried adjusting the start and end values of CMEM. I have also tried
adjusting the allocated size for the linux section (ie. bootargs mem=120M).
The error trace is shown at the bottom.

Just before the crash, the ce debug trace looks like it successfully
allocates some CMEM buffers and tries to create some semaphors and then
crashes.

And the last bit of weirdness, ist hat if i set CE_DEBUG=3 (and only 3, 2
does nothing) it does not crash. In fact it even loads the video file and
decodes and displays one frame every 10 seconds or so. If I turn off the
trace or set it to 2, it crashes same as before.

Does anyone have any suggestions?
Thanks,
-mat

Some CE trace just before the crash:

@3,598,726us: [+2 T:0x41bab4c0] ti.sdo.dmai - [Buffer] Alloc Buffer of size
829440 at 0x427ba000 (0x88191000 phys)
@3,598,925us: [+2 T:0x41bab4c0] ti.sdo.dmai - [Loader] Creating Loader for
test2.mpeg4 with buffer size 3088320, window size 1244160, alignment -1
@3,600,532us: [+4 T:0x41bab4c0] OM - Memory_contigAlloc> CMEM_alloc(3088320)
= 0x42b29000.
@3,600,733us: [+4 T:0x41bab4c0] OM - Memory_contigAlloc>
CMEM_getPhys(0x42b29000) = 0x87e22000.
@3,600,906us: [+2 T:0x41bab4c0] ti.sdo.dmai - [Buffer] Alloc Buffer of size
3088320 at 0x42b29000 (0x87e22000 phys)
@3,601,152us: [+0 T:0x41bab4c0] ti.sdo.ce.osal.Sem - Sem_create> count: 0
@3,601,298us: [+0 T:0x41bab4c0] ti.sdo.ce.osal.Sem - Leaving Sem_create>
sem[0x624f0]
@3,601,422us: [+0 T:0x41bab4c0] ti.sdo.ce.osal.Sem - Sem_create> count: 1
@3,601,539us: [+0 T:0x41bab4c0] ti.sdo.ce.osal.Sem - Leaving Sem_create>
sem[0x62508]
@3,601,681us: [+0 T:0x41bab4c0] ti.sdo.ce.osal.Sem - Sem_create> countUnable
to handle kernel paging request at virtual address c808b000


Trace from crash:

Unable to handle kernel paging request at virtual address c808b000
pgd = c6820000
[c808b000] *pgd=80468011, *pte=00000000, *ppte=00000000
Internal error: Oops: 807 [#1]
Modules linked in: dsplinkk(F) cmemk
CPU: 0    Tainted: GF       (2.6.22-ldk_davinci #1)
PC is at mutex_lock_interruptible+0x10/0x2c
LR is at SYNC_SpinLockStartEx+0x18/0x24 [dsplinkk]
pc : [<c02758c8>]    lr : [<bf00cd94>]    psr: a0000013
sp : c6aefe80  ip : c6aefe90  fp : c6aefe8c
r10: ffffffff  r9 : c6aee000  r8 : bf02296c
r7 : c8339000  r6 : c6aeff04  r5 : 00008000  r4 : 00000000
r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : c808b000
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 0005317f  Table: 86820000  DAC: 00000015
Process decode (pid: 799, stack limit = 0xc6aee260)
Stack: (0xc6aefe80 to 0xc6af0000)
fe80: c6aefe9c c6aefe90 bf00cd94 c02758c8 c6aefec4 c6aefea0 bf011870
bf00cd8c
fea0: 00006f0b 43369374 00006f0b 00000008 c0047f68 00000000 c6aefed4
c6aefec8
fec0: bf008a80 bf011844 c6aeff3c c6aefed8 bf008404 bf008a80 c6aeff44
c6aefee8
fee0: c008e534 c004e9e4 000193fe 00000000 00100073 c6b89ee8 c6aeff6c
00000000
ff00: 00000000 00000000 00008000 0005e124 00010003 ffffffff 00000000
0005e124
ff20: 00000002 c76dfac0 00006f0b 00006f0b c6aeff54 c6aeff40 c00a9a58
bf00809c
ff40: c76dfac0 43369374 c6aeff7c c6aeff58 c00a9cc0 c00a9a04 00000001
ffffffff
ff60: c76dfac0 fffffff7 00006f0b 00000036 c6aeffa4 c6aeff80 c00a9d30
c00a9a78
ff80: c004e500 00000001 ffffffff ffffffff 0005e124 4336941c 00000000
c6aeffa8
ffa0: c0047dc0 c00a9d00 ffffffff 0005e124 00000008 00006f0b 43369374
00000008
ffc0: ffffffff 0005e124 4336941c 00000036 00010003 00001fac 0005eaac
4336935c
ffe0: 000600d0 43369288 00031e20 4028954c 60000010 00000008 2fe46a10
e0408008
Backtrace:
[<c02758b8>] (mutex_lock_interruptible+0x0/0x2c) from [<bf00cd94>]
(SYNC_SpinLockStartEx+0x18/0x24 [dsplinkk])
[<bf00cd7c>] (SYNC_SpinLockStartEx+0x0/0x24 [dsplinkk]) from [<bf011870>]
(LDRV_MSGQ_get+0x3c/0xd0 [dsplinkk])
[<bf011834>] (LDRV_MSGQ_get+0x0/0xd0 [dsplinkk]) from [<bf008a80>]
(PMGR_MSGQ_get+0x10/0x14 [dsplinkk])
[<bf008a70>] (PMGR_MSGQ_get+0x0/0x14 [dsplinkk]) from [<bf008404>]
(DRV_Ioctl+0x378/0x9a4 [dsplinkk])
[<bf00808c>] (DRV_Ioctl+0x0/0x9a4 [dsplinkk]) from [<c00a9a58>]
(do_ioctl+0x64/0x74)
 r6:00006f0b r5:00006f0b r4:c76dfac0
[<c00a99f4>] (do_ioctl+0x0/0x74) from [<c00a9cc0>] (vfs_ioctl+0x258/0x288)
 r5:43369374 r4:c76dfac0
[<c00a9a68>] (vfs_ioctl+0x0/0x288) from [<c00a9d30>] (sys_ioctl+0x40/0x64)
 r7:00000036 r6:00006f0b r5:fffffff7 r4:c76dfac0
[<c00a9cf0>] (sys_ioctl+0x0/0x64) from [<c0047dc0>]
(ret_fast_syscall+0x0/0x2c)
 r6:4336941c r5:0005e124 r4:ffffffff
Code: e1a0c00d e92dd800 e24cb004 e3a02000 (e1003092)
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to