the callback is no more used to inform application that the
local endpoint is destroyed but to inform that the remote
end point is destroyed so that the service is unbound.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
This callback is called when a name service announcement is
received while no matching endpoint has been previously registered.
rename the callback to match with the usage.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
add rpmsg_virtio_shm_pool_get_buffer weak function in
rpmsg_vitio.h and comment the shared memory pool management.
Notice that if you implement your own rpmsg_virtio_shm_pool_get_buffer
the expectation is that one would embedded struct rpmsg_virtio_shm_pool
object inside your own struct and utilize something like metal_container_of()
to reference back to your own struct in your implementation of
rpmsg_virtio_shm_pool_get_buffer
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
unexpected error does not mean anything. Manage this error by
either assert or invalid parameter depending on use case.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
# Conflicts:
# lib/rpmsg/rpmsg.c
# lib/rpmsg/rpmsg_virtio.c
It will be useful to have int as return type instead of void
as the RPMsg library implementation can decide the next step
based on the return code.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove is only allowed if the remoteproc state is
OFFLINE. Otherwise, instead of calling shutdown()
it will just return as remoteproc can be used
without life cycle management.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
sh_mem offer utilities to dynamically manage a memory
pool for buffers. this is not need for rpmsg implementation.
The buffer management iss directly done in rpmsg_c, without
buffer memory free.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
If metal lib ops are not implemented an error is returned.
this error is lost. fix add check on the return.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Define new endpoint callback function type make it easier for
other functions to use it as input argument.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Add rpmsg device input argument to new_endpoint_cb() so that it
knows which rpmsg device this request is from.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Replace the char table by a pointer to a constant char.
As client provide constant char pointer to the name.
We can just register the address instead of copying the
name.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
no more endpoint is created in rpmsg to store the remote
new service. Only a callback is called to inform the application.
Then application can create the associated endpoint or
just store the service for future usage.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
remoteproc_virtio:
* Implement virtio dispatch functions and remoteproc virtio creation
and initialization functions.
* migrate vring structures
* migrate virqueue creation from remote proc to virtio
* declare rproc_remove_virtio function
* change type of vrings_num in virtio to unsigned int
* rename virtio_vring to virtio_vring_info
* rename rvring to vring_info
* Fixup for virtqueue_alloc change
* line up with VIRTIO_DEV_XXX macro change
* set the virtio dispatch func in virtio creation
* implement rproc_virtio_remove_vdev()
* send notification for virtio config changes - Notify the other side
for virtio configuration changes.
* rename rpmsg_virtio_ function to rproc_virtio_
* track the remoteproc virtio in remoteproc
* implement remoteproc virtio notificaiton
* add notification from remote implementation
* fixup test on uninitialized role
remoteproc:
* fix function name of remove virtio
* add remoteproc id allocation function to allocate notifyid for vdev
resource.
* implement remoteproc create/remove vdev function
* fix unused variable warnings
* rename set_rsc_table function to parse_rsc_table
* fix uninitialised variable
* implement remoteproc_parse_rsc_table
* fix up remoteproc notify definition
* fix missing list initialisation
* fix return in case of success
* remove vdevs in remoteproc shutdown
* calls rproc defined stop()/shutdown() if defined
* implement lookup for I/O region based on PA
* Add looking up metal I/O region with given va
* add set and parse resource table function
* correct setting rsc table in load() function
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
- Add new API
- rmpsg_init implementation
- rpmsg: suppress the channel management
Rebase rpmsg on endpoint only.
Reintroduce rpmsg core to split interface part with the core.
Now rpmsg.c provide the API relying on the core.
- add remoteproc_vshm_pool to rpmsg.h for now, we need to clean this up
- rpmsg: add shm_io as input arguemnt to rpmsg_vdev_init
- Add core function to unregister the end points.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
* implement vdev resource parser - The vdev resourcde parser will allocate notifyid.
* add find resource funcion to locate the resource in the
resource table.
* fix resource table parsing.
Fix the management of the addresses offset if a second resource is
declared, its start address is not valid.
* add trace handler
Add handler for the trace type. in this first step only trace
statically defined by remote processor is valid.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Added:
openamp_get_shmem_datova
openamp_get_shmem_patova
openamp_get_shmem_vatopa
This isn't currently used by anything and it feels like the
imlementation isn't complete as there is some init of the shmem struct
that has to happen somewhere.
Remove firmware implementation as it assume that the firmware
needs to be in memory. We will need to support firmware
in storage too.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Encapsulate the the handling of the shared memory region to make it clear
exactly what functionality is needed and ensure that others aren't touch
internal data that we aren't aware of.
We treat the sh_mem region in the virtqueue as an obaque pointer that
only should get used by v2p and p2v functions.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
virtqueue_add_buffer takes a list of buffers, so lets decouple it from
depending on metal_sg. Instead we just create a new struct
virtqueue_buffer which keeps track of the buffer pointer and length.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
virtqueue_add_single_buffer isn't used by anything and we have
virtqueue_add_buffer that accomplishes what we need, so remove the
function.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Remove shared memory I/O region argument from virtqueue_create() API.
The virtqueue I/O region can be set in another APIs.
Signed-off-by: Wendy Liang <jliang@xilinx.com>