This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question for application of dsplink

Other Parts Discussed in Thread: OMAPL138

Hi,

I'm a beginner to dsplink.when using dsplink on omapl138 , I meet a problem that if I use  MSGQ_put() twice on dsp before I use MSGQ_get() to get the message on ARM,the system will crash .Below is The error description.

root@arago:~# ./messagearm ./messagedsp.out 1000 0
========== Sample Application : MESSAGE ==========
Entered MESSAGE_Create ()
Leaving MESSAGE_Unable to handle kernel NULL pointer dereference at virtual addr
ess 00000004
Create ()
Enterpgd = c0004000
ed MESSAGE_Execu[00000004] *pgd=00000000te ()

Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in: dsplinkk
CPU: 0 Not tainted (2.6.33-rc4 #1)
PC is at LDRV_MPLIST_getHead+0x144/0x170 [dsplinkk]
LR is at DA8XXGEM_addrConvert+0x8c/0x104 [dsplinkk]
pc : [<bf00a43c>] lr : [<bf000498>] psr: 20000013
sp : c1fcbf20 ip : c1fcbf10 fp : c1fcbf4c
r10: 00000000 r9 : 00000000 r8 : bf0160fc
r7 : c2d4d680 r6 : 00000000 r5 : 00000000 r4 : c1fcbf7c
r3 : c2d6b000 r2 : 00000001 r1 : 00000001 r0 : c3f12680
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: c1e7c000 DAC: 00000017
Process DSPLINK_DPC_3 (pid: 813, stack limit = 0xc1fca270)
Stack: (0xc1fcbf20 to 0xc1fcc000)
bf20: bf00b180 0020f828 c1fcbf4c c2d4d880 c2d4d680 00008000 bf015d9c c2d4d580
bf40: c1fcbfa4 c1fcbf50 bf006cf8 bf00a308 c1fcbf74 4d505047 31514753 00000000
bf60: 00000000 00000000 00000000 00000000 c0000000 c031fb90 00010000 c3000000
bf80: bf01675c c1fca000 00000003 bf00f5b0 00000000 00000000 c1fcbfc4 c1fcbfa8
bfa0: bf00f5fc bf006cb4 c1fcbfcc c1f41d70 00000003 bf00f5b0 c1fcbff4 c1fcbfc8
bfc0: c0058bb0 bf00f5c0 00000000 00000000 c1fcbfd0 c1fcbfd0 00000000 00000000
bfe0: 00000000 00000000 00000000 c1fcbff8 c00451fc c0058b38 e2443902 e3530c05
Backtrace:
[<bf00a2f8>] (LDRV_MPLIST_getHead+0x0/0x170 [dsplinkk]) from [<bf006cf8>] (ZCPYM
QT_dpc+0x54/0x278 [dsplinkk])
r8:c2d4d580 r7:bf015d9c r6:00008000 r5:c2d4d680 r4:c2d4d880
[<bf006ca4>] (ZCPYMQT_dpc+0x0/0x278 [dsplinkk]) from [<bf00f5fc>] (DPC_Callback+
0x4c/0xb8 [dsplinkk])
[<bf00f5b0>] (DPC_Callback+0x0/0xb8 [dsplinkk]) from [<c0058bb0>] (kthread+0x88/
0x90)
r7:bf00f5b0 r6:00000003 r5:c1f41d70 r4:c1fcbfcc
[<c0058b28>] (kthread+0x0/0x90) from [<c00451fc>] (do_exit+0x0/0x6b4)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
Code: e1a00005 ebffd797 e1a04804 e1840820 (e5860004)
---[ end trace 7ab0879f55e8bc49 ]---

For this ,I has some question.

1.Whether one MSG_put () must have one MSG_get ()?

2.For a message ,is there three copies,one for DSP,one for ARM and one for share memory?  

A detailed response is highly appreciated.

Thanks

Jason

  • Is anyone here?

    It is already two weeks later.Does anybody can help me?

    THANKS

    JASON

  • Hi Jason,

    1. Yes it is possible to put multiple messages onto a message queue before MSGQ_get is called on the receiving side. For more information on how MSGQ works, please refer to the documentation (LNK 031) in the DSPLINK product.

    2. I think the answer to this question depends on the MessageQ transport that is used by the MSGQ API. Typically, in the zero-copy message queue transport (ZCPY), the user application is provided with direct access to the shared memory through MSGQ_alloc. So there is effectively just one copy of the message. When the message is 'sent', it is just a matter of passing the pointer to the shared memory from one side to the other. For more information on the zero-copy transport, you can take a look at LNK 041.

    As for your crash, I'd suggest to make sure you are allocating a new message buffer when you call MSGQ_put the second time, and not re-sending the same message twice. Did the 'message' sample work for you? That would be a good starting point to learn how to use MSGQ.

    Another good link for reference:

    MSGQ FAQ: http://processors.wiki.ti.com/index.php/DSPLink_FAQs#MSGQ_questions

    Best regards,

    Vincent