OpenAMP / open-amp

The main OpenAMP library implementing RPMSG, Virtio, and Remoteproc for RTOS etc
https://www.openampproject.org/
Other
678 stars 278 forks source link

remoteproc_virtio: add shm_io for remoteproc virtio #542

Open CV-Bowen opened 7 months ago

CV-Bowen commented 7 months ago

Now the rpmsg device need pass a share memory io region to rpmsg_init_vdev(). I think every virtio device need a share memory io to access the share memory and this region should be provided by the transport layer. Like the MMIO transport layer did in OpenAMP.

So I add shm_io in the remoteproc virtio device and also provide an API to set it.

tnmysh commented 6 months ago

Any usage of this API anywhere ? Either in demos or OpenAMP ? If not, may be not right time to have this change. Also we don't alwasy assume shm_io will be always used. dmabuf based memory allocation is also possible. I think such use case was posted by TI in another PR.

@arnopo, @edmooring any thoughts?

arnopo commented 6 months ago

Quite agree with @tnmysh. This PR introduces an unused field. If possible I would prefer it to be integrated in a PR that provides the full picture of the need.

@tnmysh : I remember we discussed the possibility of using dmabuf-based memory allocation in a meeting, but I don't see any associated PR or issue. Could you please provide a reference if you have it?

CV-Bowen commented 6 months ago

@arnopo @tnmysh @edmooring Thanks, I use this API in NuttX (but code not up streamed). We want make the remoteproc transport layer supports more virtio devices. I will continue this PR when I up streamed the NuttX part code.

github-actions[bot] commented 4 months ago

This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity.

CV-Bowen commented 2 months ago

@tnmysh : I remember we discussed the possibility of using dmabuf-based memory allocation in a meeting, but I don't see any associated PR or issue. Could you please provide a reference if you have it?

@tnmysh I want to continue this PR and I'm interested in the dma method. That will be very thankfully if you can proviud a reference if you have it.

tnmysh commented 2 months ago

@arnopo , @CV-Bowen here is PR that mentions using dma-buf:

https://github.com/OpenAMP/libmetal/pull/82

I remember TI folks were working to update that PR. Not sure about latest status.

github-actions[bot] commented 1 month ago

This pull request has been marked as a stale pull request because it has been open (more than) 45 days with no activity.