remote proc kick failed when rpmsg is launched by U-Boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

remote proc kick failed when rpmsg is launched by U-Boot

1,199 Views
hfranco
Contributor II
Hello,

When the rpmsg_lite_str_echo demo from MCUXpresso is launched by the remoteproc framework, the RPMSG
demo works fine, the channel is created and I can send messages between the two cores using /dev/ttyRPMSG30 endpoint.
 
However, when it is launched by U-Boot bootaux command, when the imx_rpmsg_tty demo driver is modprobed,
the following  error happens:
 
    root@colibri-imx8x-06858909:~# modprobe imx_rpmsg_tty
    [ 23.060068] imx_rpmsg_tty virtio1.rpmsg-openamp-demo-channel.-1.30: new channel: 0x400 -> 0x1e!
    [ 23.069286] Install rpmsg tty driver!
    [ 23.174246] imx-rproc imx8x-cm4: imx_rproc_kick: failed (3, err:-62)
 
    root@colibri-imx8x-06858909:~# echo "teste" >/dev/ttyRPMSG30
    [ 52.578255] imx-rproc imx8x-cm4: imx_rproc_kick: failed (3, err:-62)
    [ 52.686242] imx-rproc imx8x-cm4: imx_rproc_kick: failed (3, err:-62)
 
The code returns TIMER EXPIRED (-62) at (imx_rproc.c)
 
      /*
       * Send the index of the triggered virtqueue as the mu payload.
       * Let remote processor know which virtqueue is used.
       */
      mmsg = vqid << 16;
 
      err = mbox_send_message(priv->tx_ch, (void *)&mmsg);
      if (err < 0)
            dev_err(priv->dev, "%s: failed (%d, err:%d)\n",
                  __func__, vqid, err);
 
where (mailbox.c):
 
      if (chan->cl->tx_block) {
            unsigned long wait;
            int ret;
 
            if (!chan->cl->tx_tout) /* wait forever */
                  wait = msecs_to_jiffies(3600000);
            else
                  wait = msecs_to_jiffies(chan->cl->tx_tout);
 
            ret = wait_for_completion_timeout(&chan->tx_complete, wait);
            if (ret == 0) {
                  t = -ETIME;
                  tx_tick(chan, t);
            }
      }
 
I inserted some print debugging in loop on the cortex-m side and looks like the cortex-m stops running
when the kick failed happens, indicating that the cortex-m might have crashed. Do you know why this is happening?
Any suggestions to debug this issue?

Best regards,
Hiago.
0 Kudos
Reply
2 Replies

1,121 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @hfranco 

I hope you are doing very well.

Could you please clarify the processor you are using, BSP version, SDK version and if possible if you are using an EVK from NXP?

 

Best regards,

Salas.

0 Kudos
Reply

1,086 Views
hfranco
Contributor II

Hello @Manuel_Salas,

I am using the Colibri i.IMX8QXP from Toradex. BSP version is based on NXP 6.6 kernel, from linux-imx. SDK version is SDK_2_9_0_MIMX8UX5xxxFZ.

For further information, setting 'pd_ignore_unused' as kernel argument fixes the issue.

Regards,
Hiago.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2189290%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eremote%20proc%20kick%20failed%20when%20rpmsg%20is%20launched%20by%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2189290%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EWhen%20the%20rpmsg_lite_str_echo%20demo%20from%20MCUXpresso%20is%20launched%20by%20the%20remoteproc%20framework%2C%20the%20RPMSG%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3Edemo%20works%20fine%2C%20the%20channel%20is%20created%20and%20I%20can%20send%20messages%20between%20the%20two%20cores%20using%20%2Fdev%2FttyRPMSG30%20endpoint.%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EHowever%2C%20when%20it%20is%20launched%20by%20U-Boot%20bootaux%20command%2C%20when%20the%20imx_rpmsg_tty%20demo%20driver%20is%20modprobed%2C%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3Ethe%20following%20%26nbsp%3Berror%20happens%3A%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20root%40colibri-imx8x-06858909%3A~%23%20modprobe%20imx_rpmsg_tty%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20%5B%2023.060068%5D%20imx_rpmsg_tty%20virtio1.rpmsg-openamp-demo-channel.-1.30%3A%20new%20channel%3A%200x400%20-%26gt%3B%200x1e!%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20%5B%2023.069286%5D%20Install%20rpmsg%20tty%20driver!%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20%5B%2023.174246%5D%20imx-rproc%20imx8x-cm4%3A%20imx_rproc_kick%3A%20failed%20(3%2C%20err%3A-62)%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20root%40colibri-imx8x-06858909%3A~%23%20echo%20%22teste%22%20%26gt%3B%2Fdev%2FttyRPMSG30%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20%5B%2052.578255%5D%20imx-rproc%20imx8x-cm4%3A%20imx_rproc_kick%3A%20failed%20(3%2C%20err%3A-62)%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%20%26nbsp%3B%20%5B%2052.686242%5D%20imx-rproc%20imx8x-cm4%3A%20imx_rproc_kick%3A%20failed%20(3%2C%20err%3A-62)%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EThe%20code%20returns%20TIMER%20EXPIRED%20(-62)%20at%20(imx_rproc.c)%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%2F*%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%20*%20Send%20the%20index%20of%20the%20triggered%20virtqueue%20as%20the%20mu%20payload.%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%20*%20Let%20remote%20processor%20know%20which%20virtqueue%20is%20used.%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%20*%2F%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82mmsg%20%3D%20vqid%20%26lt%3B%26lt%3B%2016%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82err%20%3D%20mbox_send_message(priv-%26gt%3Btx_ch%2C%20(void%20*)%26amp%3Bmmsg)%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82if%20(err%20%26lt%3B%200)%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82dev_err(priv-%26gt%3Bdev%2C%20%22%25s%3A%20failed%20(%25d%2C%20err%3A%25d)%5Cn%22%2C%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82__func__%2C%20vqid%2C%20err)%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3Ewhere%20(mailbox.c)%3A%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82if%20(chan-%26gt%3Bcl-%26gt%3Btx_block)%20%7B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82unsigned%20long%20wait%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82int%20ret%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82if%20(!chan-%26gt%3Bcl-%26gt%3Btx_tout)%20%2F*%20wait%20forever%20*%2F%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82wait%20%3D%20msecs_to_jiffies(3600000)%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82else%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82wait%20%3D%20msecs_to_jiffies(chan-%26gt%3Bcl-%26gt%3Btx_tout)%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82ret%20%3D%20wait_for_completion_timeout(%26amp%3Bchan-%26gt%3Btx_complete%2C%20wait)%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82if%20(ret%20%3D%3D%200)%20%7B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82t%20%3D%20-ETIME%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82tx_tick(chan%2C%20t)%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%7D%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%E2%80%82%7D%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EI%20inserted%20some%20print%20debugging%20in%20loop%20on%20the%20cortex-m%20side%20and%20looks%20like%20the%20cortex-m%20stops%20running%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3Ewhen%20the%20kick%20failed%20happens%2C%20indicating%20that%20the%20cortex-m%20might%20have%20crashed.%20Do%20you%20know%20why%20this%20is%20happening%3F%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EAny%20suggestions%20to%20debug%20this%20issue%3F%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2C%3CBR%20%2F%3EHiago.%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2191712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20remote%20proc%20kick%20failed%20when%20rpmsg%20is%20launched%20by%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2191712%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F203368%22%20target%3D%22_blank%22%3E%40Manuel_Salas%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20Colibri%20i.IMX8QXP%20from%20Toradex.%20BSP%20version%20is%20based%20on%20NXP%206.6%20kernel%2C%20from%20linux-imx.%20SDK%20version%20is%26nbsp%3BSDK_2_9_0_MIMX8UX5xxxFZ.%3C%2FP%3E%3CP%3EFor%20further%20information%2C%20setting%20'pd_ignore_unused'%20as%20kernel%20argument%20fixes%20the%20issue.%3C%2FP%3E%3CP%3ERegards%2C%3CBR%20%2F%3EHiago.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2190952%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20remote%20proc%20kick%20failed%20when%20rpmsg%20is%20launched%20by%20U-Boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2190952%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F201524%22%20target%3D%22_blank%22%3E%40hfranco%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20hope%20you%20are%20doing%20very%20well.%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20clarify%20the%20processor%20you%20are%20using%2C%20BSP%20version%2C%20SDK%20version%20and%20if%20possible%20if%20you%20are%20using%20an%20EVK%20from%20NXP%3F%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3ESalas.%3C%2FP%3E%3C%2FLINGO-BODY%3E