admin管理员组

文章数量:1126107

It seems there is no source example provided, but I am looking for clarification.

I am currently working on a project which is considering using RPMsg to implement communication between CPUs running Linux/RTOS. Thus I have read the following two Linux kernel pages:

.html

.html

and looked through a some of the kernel source code here:

However, I still have a few questions related to endpoint addresses having never used rpmsg. It seems like creating multiple endpoints for a device would be the best option for the framework but the API pages recommend use of RPMSG_ADDR_ANY to create addresses for endpoints.

Why is that the case? To avoid driver code using an address that is already put in use by the rpmsg bus?

When calling rpmsg_create_ept() a rpmsg_endpoint pointer is returned but as far as I have been able to see this struct only has the local address. How would the destination address be obtained to pass to the remote processor? I am assuming once this address is obtained it can be sent via a named service message such that the end result would look like:

CPU_A
   ept_1: src = 1, dst = 3
   ept_2: src = 2, dst = 4

CPU_B
   ept_3: src = 3, dst = 1
   ept_4: src = 4, dst = 2

Have I miss interpreted anything? I appreciate any assistance that could be provided.

Edit: It looks as if these endpoints and addresses may already be handled on creation with RPMSG_ADDR_ANY? In which case any manual address forwarding wouldn't be needed.

本文标签: How to obtain dynamically allocated destination addresses in RPMsg kernel driversStack Overflow