understannd imx8qm rpmsg

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

understannd imx8qm rpmsg

236 次查看
Ahelion
Contributor IV

Hello Experts,

I am trying to learn more about the rpmsg system of the imx8qm, and my starting point is the linux docu:

https://www.kernel.org/doc/Documentation/rpmsg.txt

togheter with the device tree for .rpmsg

memory-region = <&vdevbuffer>, <&vdev0vring0>, <&vdev0vring1>,
<&vdev1vring0>, <&vdev1vring1>, <&rsc_table0>;
fsl,resource-id = <IMX_SC_R_M4_0_PID0>;
fsl,entry-address = <0x34fe0000>;
status = "okay";
power-domains = <&pd IMX_SC_R_M4_0_PID0>,
<&pd IMX_SC_R_M4_0_MU_1A>;
};
 
imx8qm_cm41: imx8x_cm4@1 {
compatible = "fsl,imx8qm-cm4";
rsc-da = <0x90100000>;
mbox-names = "tx", "rx", "rxdb";
mboxes = <&lsio_mu6 0 1
  &lsio_mu6 1 1
  &lsio_mu6 3 1>;
memory-region = <&vdevbuffer>, <&vdev2vring0>, <&vdev2vring1>,
<&vdev3vring0>, <&vdev3vring1>, <&rsc_table1>;

 

My question is what exactly are the "vdevbuffer" and "vdevXvringY" things?

Is there a document explaining it better? I need to know what are the limitations, for example: what are the speeds I can use to send data over IPC? 10ms 1second? is it correlated to buffer size? is 128 faster than 512 bytes? how can I configured channels? have on linux side in /dev more rpmsg things for other applications to communicate with my m4 application?

0 项奖励
回复
3 回复数

205 次查看
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Ahelion 

 

I hope you are doing well.

 

I believe you checked our I.MX Linux Reference Manual, specifically on chapter 2.8 Remote Processor Messaging. There is explained how RPMSG works and also there is mentioned that RPMsg is a virtio-based messaging bus. You can look at this Vitrio "framework" documentation to get details.

But, in a few words vdevbuffer Represents a shared DMA buffer pool.

 

I hope this can helps to you.

 

Best regards,

--... ...--

Salas.

 

0 项奖励
回复

189 次查看
Ahelion
Contributor IV
I read that part ( whas the first place I started), but it is not enough, I need to see if there is any correlation between buffer size and speed, and how the read/write operation occurs ( is there a bit that allows a read to happen?), how many rpmsg channels can I create? as for now all can do is make in my m4 application an anouncement string called "rpmsg_raw" and on linux side "dev/rpmsg0" appears, can I make more? so that I can split the functionality? is there a tradeoff? I am limited to a specific speed of write/read?
0 项奖励
回复

130 次查看
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Ahelion 

I hope you are doing very well!

 

In the vitrio_rpmsg_bus.c driver you can see that the buffers are allocated by 512 bytes each for communication.

The number of buffers will be computed from the number of buffers supported by the vring, up to a maximum of 512 buffers (256 in each direction).

Each buffer will have 16 bytes for the msg header and 496 bytes for the payload.
 
This will utilize a maximum total space of 256KB for the buffers.
 
 
Also, you can check this post about of the changes on buffer size. Unfortunately we have not documented the situation or relation of Buffer size and speed transfer, but RPMSG is designed to manage short messages and a larger buffer size means more transmission time. 
 
Best regards,
Salas.
0 项奖励
回复