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.

PROCESSOR-SDK-J721S2: IPC issue with QNX 710

Part Number: PROCESSOR-SDK-J721S2

Tool/software:

Hi ,

i am using TI SDKJ721S2 11.0 SDK and back ported QNX 710 SDK.

i am facing ipc resmgr issue in qnx side and not able to communicate with remote core R5F and C7X,

Internal QNX process IPC is ok and also between c7x and r5f RPG is fine.

between R5F and QNX A72 , RPMSG has issue and also i am getting this kernel dump when i start process which is using RPMSG to communicate with other core ->

J721S2-SMART#
J721S2-SMART#
Shutdown[1,1] S/C/F=10/3/6 C/D=ffffff8060046028/ffffff80601082d0 state(1000f00)= now lock exit specret
QNX Version 7.1.0S-1.2.2 Release 2023/07/14-18:28:46EDT KSB:ffffff80830c0000
$URL: svn.ott.qnx.com/.../timestamp.c $
[0]PID-TID=1-1 P/T FL=09019001/0c000000 state=00 "proc/boot/procnto-smp-instr-safety"
[0]ASPACE PID=241682 PF=69000000 "./clientprocess"
[1]PID-TID=1-3 P/T FL=09019001/04020000 state=00 "proc/boot/procnto-smp-instr-safety"
[1]ASPACE PID=8 PF=69401010 "proc/boot/tiipc-mgr"
aarch64le context[ffffff8083098b70]:
0000: ffffff80800054c0 0000000000000040 0000000000000fff 0000000000001000
0020: 006000000000071f 000000000000001c 0000000000000008 ffffff8083dc487c
0040: 0000000001010101 ffffff80879043a8 0000000000000000 ffffff8087904758
0060: 0000000000000001 0000000100000001 0000000000000005 0000000000000002
0080: 0000000000000004 0000000000000000 0000000000000000 0000000000000001
00a0: 00600000b0ffe71f ffffff8060107f30 0000000000000000 0000000000000004
00c0: ffffff806012a6e0 ffffff8080005000 ffffff806012a4c8 ffffff806012a8f8
00e0: ffffff80830b1d40 ffffff808366d780 ffffff8060080948 ffffff808366d780
0100: ffffff8060080998 0000000000000084
instruction[ffffff8060080998]:
20 74 0b d5 00 00 01 8b 1f 00 02 ea a1 ff ff 54 f6 02 00 35 41 0b 40 f9 e0 03
stack[ffffff808366d780]:
0000:>ffffff808366d7e0 ffffff806008b058 ffffff8080938fa0 ffffff8083dc4880
0020: ffffff80600808e0 0000000000000000 0000000000000000 0000000000000000
0040: ffffff8087905790 ffffffffffffffff 0000000000000000 181a2975898a3767
0060: ffffff808366d820 ffffff80600880f8 0000000000000002 ffffff8087905780
Out of interrupt events! (vector=27 process=11 [proc/boot/devc-seromap])

  • i am using TI SDKJ721S2 11.0 SDK and back ported QNX 710 SDK.

    Hi,

    Can you tell us what changes you made to backport to QNX 710?

    Thanks.

  • Hi Praveen , we have downloaded from this link:

    www.ti.com/.../J721S2-QNX-SDK

  • Hi Praveen,

    Also as part of 11.0SDK when the QNX Safety qualification in A72 was added wrt to SCIClient, UDMA, IPC,  whether any changes on TIIPC driver that would need some adaption for safety at the Process(user space) or Kernel level. This question I have asked because when we use the R5F and C7x with SDK 11.0 drivers and A72 with 10.1 SDK drivers, the IPC b/w QNX process in A72 and R5F is working fine. Also crash is seen on the A72 only when A72 is trying to communicate to remote cores. 

  • Hi Praveen , we have downloaded from this link:

    www.ti.com/.../J721S2-QNX-SDK

    This SDK is for SDP 7.1, so it should ideally work without any changes. There is no backport needed.

  • Ideally, we recommend avoiding the mixing and matching of RTOS and QNX releases. If you are using RTOS SDK 11.0, then you must be using QNX SDK 11.0 for A72.

    The above issue is a kernel crash, so we will check with our dev team and see if they have any feedback.

    Thanks.

  • Checked with the dev team, and they have not seen this issue during their 11.0 release validation. They hinted that it could be due to some localized integration issue. Let us know.

    Thanks.

  • Hi Praveen,

    After changes the buffsize to fix in rpmsg create, IPC is fine,

    case DCMD_TIIPC_RPMSG_CREATE:
    {
    // Saving local copy of user provided buf to pass back later
    void *buf = cargs->args.create.params.buf;
    printf("buff size@@@ %d \n",cargs->args.create.params.bufSize);
    // Creating local queue buf in resource manager context
    cargs->args.create.params.buf = malloc(sizeof(uint8_t)*135424);
    //cargs->args.create.params.buf = malloc(cargs->args.create.params.bufSize);

    if (cargs->args.create.params.buf != NULL)
    {
    // printf("DCMD_TIIPC_RPMSG_CREATE insdie if \n");
    RPMessage_Handle handle = NULL;

    handle = RPMessage_create(&cargs->args.create.params,
    &cargs->args.create.ept);
    if (handle == NULL)
    {
    QNX_PR_ERR("%s:%d Error: handle is NULL", __FUNCTION__, __LINE__);
    printf("DCMD_TIIPC_RPMSG_CREATE handle is NULL \n");
    free(cargs->args.create.params.buf);
    cargs->args.create.handle = 0;
    cargs->status = (uint32_t)IPC_EFAIL;
    }
    else
    {
    ipc_rpmsg_handle_entry *entry = NULL;

    entry = malloc(sizeof(ipc_rpmsg_handle_entry));
    if (entry != NULL)
    {
    entry->ept = cargs->args.create.ept;
    entry->handle = handle;
    entry->rcvid = 0;
    cargs->args.create.handle = entry->ept;

    QNX_PR_NOTICE("%s.%d: Created handle with endpoint %d", __FUNCTION__, __LINE__, entry->ept);

    (void)pthread_mutex_lock(&ipc_ocb->lock);
    IpcUtils_Qput(&ipc_ocb->created_handles, &entry->elem);
    if (-1 != ipc_ocb->callbackPulseCoid)
    {
    QNX_PR_NOTICE("%s.%d: Setting callback coid...endPt=%d, coid=%d", __FUNCTION__, __LINE__, entry->ept, ipc_ocb->callbackPulseCoid);
    gCallbackCoidPool[entry->ept] = ipc_ocb->callbackPulseCoid;
    }
    (void)pthread_mutex_unlock(&ipc_ocb->lock);
    }
    }
    }
    else
    {
    printf("DCMD_TIIPC_RPMSG_CREATE insdie else \n");
    }
    cargs->args.create.params.buf = buf;
    break;
    }

    it is printing negative values at startup so allocate is getting fail.

  • We will review your latest findings with our development team and will get back to you with their feedback as soon as we can.

  • Hi Manan,

    The feedback we received from our dev team is as follows:

    "It sounds like params.bufSize is not provided to RPMessage_create, causing an uninitialized buf size. However, we are missing a check on the buffer size and returning an error with a slog message in the RPMessage_Create() (psdkqa/qnx/resmgr/ipc_qnx_rsmgr/usr/ipc_api.c line 423-465). We'll create a JIRA bug to add a check of the parameter passed and incorporate it into the next release.

    FYI, in our IPC test example code that we provide (psdkqa/qnx/examples/ipc/ipc_test_qnxipc_testsetup.c line 213-217), we show how to set up the params structure with buf information filled. "

    Thanks.