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.

DM8168 EVM, DVRRDK4.1, A8 open the c6x's messageQ, remoteQueId equal to 0



Hi all

   I use DVRRDK4.1.   In my code, I found a problem.

   I add a Vps_printf statement at function System_ipcMsgQCreate() src_bios6/links_common/system/system_ipc_msgq.c , seems the three slave create messageQ queue success:

[c6xdsp ] MessageQ: DSP_MSGQ,9b9f7458,DSP_ACK_MSGQ,9b9f74f0

[m3video] MessageQ: VIDEO-M3_MSGQ,39220468,VIDEO-M3_ACK_MSGQ,39220500
[m3vpss ] MessageQ: VPSS-M3_MSGQ,3b0b4148,VPSS-M3_ACK_MSGQ,3b0b41e0

 Then I add OSA_printf statement at function System_ipcMsgQCreate() , src_linux/links/system/system+ipc_msgq.c.

  if(status == MessageQ_S_SUCCESS)

 {

  OSA_printf("MessageQ:procId(%d),%s,%d\n",procId,msgQName,gSystem_ipcObj.remoteProcMsgQ[procId]);

 break;

}

[host] MessageQ: HOST_MSGQ,7807792,HOST_ACK_MSGQ,7807808
[host]MessageQ: procId(0)DSP_MSGQ,0
[host] MessageQ: procId(1)VIDEO-M3_MSGQ,65536
[host] MessageQ: procId(2)VPSS-M3_MSGQ,131072

why only the dsp queue's id equal 0

  • You are printing MessageQ_QueueId.

    MessageQ_QueueId is encoded as procId << 16 | (queueId & 0xFFFF)

    QueueId start from 0 and increment for each MessageQ created on that core starting from 0.

    procId is the MultiProcId IPC id for each core on 816x. On 816x the MultiProc Id is:

    0 : c674

    1 : VIDEO_M3

    2: VPSS_M3

    3:Cortex A8.

    So if you print the MessageQId for the MessageQ created on c674 it will be (0 << 16 | 0) = 0.

    So 0 is correct and represents valid MessageQId.

    As long as MessageQ_open is successful there is no issue.

  • Now my chain have a problem.
    My alg have two configure command.
    one command id 0x7004, the A8 use this command let alg print the statistics meesage, only some Vps_printf statement .
    The problem is when A8 send this message to alg , the alg print log , but the A8 didn't get ACK message , so the chain is stall.

    I add debug statement at System_ipcMsgQTaskMain() (C6x side) . the dsp write ACK message to replyMsgQ.
    At the function System_ipcMsgQSendMsg() (A8 side), I add OSA_printf statement at if(retryCount ==0) and if(status == MessageQ_S_SUCCESS) but both printf didn't show at console.

  • Add prints to ipcMsgQSend and ipcMsgQTaskMain on A8 to print msgId and add prints on ipcMsgQSend and ipcMsgQTaskMain to print the received msgId and ack msgId. Are you sending some event from c6x side to A8 ?

  • I didn't add any custom event from c6x side to A8 side .   

    All cmds are used to send parameters or control command from A8 side to c6x side.

  • This is really strange. Unless the message itself is somehow corrupted sending message in reply queue should unblock the A8 waiting on ack msgq. have you confirmed A8 is blocked on 

    MessageQ_get(gSystem_ipcObj.selfAckMsgQ,..)

    and c674 executed MessageQ_put(replyMsgQ, (MessageQ_Msg) pMsgCommon); 

    Print replyMsgq and msgId of pMsgCommon before doing  MessageQ_put.

    Confirm that the msg handler you have implemented is not wrongly corrupting the received msg

  • I add print statments in function A8 System_ipcMsgQSendMsg, and got following message from console: all data print with %x. 

    [host] pMsgCommon->linkId = 27

    [host] pMsgCommon->cmd = 7004

    [host] pMsgCommon->prmSize = 0

    [host] pMsgCommon->waitAck = 1

    [host] gSystem_ipcObj.remoteProcMsgQ[0] = 0

    [host] gSystem_ipcObj.selfAckMsgQ = 774340 // this statement before MessageQ_put

    // the other printf statements in the if(waitAck){} all didn't print message. 

    print statements add in function c674 System_ipcMsgQTaskMain

    [c6xdsp ] pMsgCommon->cmd = 7004
    [c6xdsp ] pMsgCommon->prmSize = 0
    [c6xdsp ] pMsgCommon->waitAck = 1
    [c6xdsp ] before MessageQ_getReplyQueue
    [c6xdsp ] replyMsgQ = 30001,pMsgCommon = bf47ce80 // this statement just before MessageQ_put(replyMsgQ, (MessageQ_Msg) pMsgCommon);