imx_rproc_kick: failed (0, err:-62) - Need help debugging

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

imx_rproc_kick: failed (0, err:-62) - Need help debugging

2,139 次查看
user2327934
Contributor I

Hi, I am trying to run a cortex M4 firmware elf image using remoteproc from the A53 linux host. When I start the firmware, I am getting the following output:

[ 1623.070177] remoteproc remoteproc0: powering up imx-rproc
[ 1623.077293] remoteproc remoteproc0: Booting fw image cortexM4Firmware, size 540896
[ 1623.085112] imx-rproc imx8mm-cm4-rpmsg: map memory: 00000000df531f64+8000
[ 1623.085137] imx-rproc imx8mm-cm4-rpmsg: map memory: 0000000028a98c74+8000
[ 1623.085145] imx-rproc imx8mm-cm4-rpmsg: map memory: 00000000108c3336+100000
[ 1623.085175] remoteproc remoteproc0: da = 0x1ffe0000 len = 0x240 va = 0x00000000ae39690e
[ 1623.085185] remoteproc remoteproc0: da = 0x1ffe0240 len = 0xadfc va = 0x000000009b9f4a9b
[ 1623.085524] remoteproc remoteproc0: da = 0x1ffeb03c len = 0x7078 va = 0x0000000087b1bf82
[ 1623.085642] remoteproc remoteproc0: da = 0x1ffe0240 len = 0x58 va = 0x000000009b9f4a9b
[ 1623.143451] virtio_rpmsg_bus virtio0: buffers: va 0000000082316732, dma 0x000000005b8c0000
[ 1623.244621] imx-rproc imx8mm-cm4-rpmsg: imx_rproc_kick: failed (0, err:-62)
[ 1623.251783] virtio_rpmsg_bus virtio0: rpmsg host is online
[ 1623.262662]  remoteproc0#vdev0buffer: registered virtio0 (type 7)
[ 1623.269264] remoteproc remoteproc0: remote processor imx-rproc is now up

The error imx-rproc imx8mm-cm4-rpmsg: imx_rproc_kick: failed (0, err:-62) indicates a return value -ETIME (-62) which I don't know how to debug further.

I checked the trace so far:

thrown in drivers/remoteproc/imx_rproc.c in

static void imx_rproc_kick(struct rproc *rproc, int vqid):

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);

It seems like the mailbox send message handler returns with a timeout. Why is that? How can I analyze the cause?

Thanks for any suggestions!

标签 (1)
0 项奖励
回复
1 回复

2,106 次查看
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @user2327934,

I hope you are doing well
 
Are you getting the issue while loading the M4 binary from U-boot? Please check the same.

For the RPMSG on cortex M, one can refer to the Chapter 9 Linux Remote Processor (RPROC) framework from the document https://www.nxp.com/docs/en/application-note/AN5317.pdf

Further, it is mentioned in the above document that,
"For i.MX 8M platforms, the root clock for M7/M4 must always be enabled by Linux to load the firmware
code and start Cortex M7/M4. By default, NXP Linux BSP keeps the root clock enabled for the M core when it is
started from U-Boot. Otherwise, if you need to first start the M core from the Linux booting phase, the clock driver
(drivers/clk/imx/clk-composite-8m.c) must be updated to always skip the gate registration to keep the root clock
always enabled for the M core."
 
Thanks & Regards,
Dhruvit Vasavada
0 项奖励
回复