Branch: refs/heads/main
Home: https://github.com/OpenAMP/open-amp
Commit: 88d2e4ce38b8fe4af4ce84b2ec68a6b10a328169
https://github.com/OpenAMP/open-amp/commit/88d2e4ce38b8fe4af4ce84b2ec68a6b1…
Author: Ed Mooring <ed.mooring(a)gmail.com>
Date: 2022-11-04 (Fri, 04 Nov 2022)
Changed paths:
M apps/machine/zynqmp_r5/rsc_table.c
Log Message:
-----------
zynqmp_r5 resource table: Change notifyid for the virtio device.
1. At firmware build time, the resource table for the Xilinx zynqmp_r5
is set up with notifyid==0 for the rpmsg virtio device. The vrings are
set up with notifyid==1 for vring0 and notifyid==2 for vring1.
2. When the firmware is loaded onto the R5 via the Linux remoteproc sysfs
interface, the kernel remoteproc implementation ignores the notifyid
values for the vrings, and reallocates them, changing the resource
table. On the Xilinx configuration I tested on, this results in vring0
being allocated notifyid 0, and vring1 being allocated notifyid 1.
3. When the remote processor is started, it parses the resource table. When
it gets to the virtio device, it calls handle_vdev_rsc(), which
in turn calls remoteproc_allocate_id() with the vdev's notifyid of
0. This successfully returns 0. Then handle_vdev_rsc() goes through the
vrings. On vring0, it calls remoteproc_allocate_id(), with notifyid set to
0, because Linux changed vring0.notifyid from 1 to 0 in (2) above. This
results in remoteproc_allocate_id() returning RSC_NOTIFY_ID_ANY. This
causes handle_vdev_rsc() to return -RPROC_ERR_RSC_TAB_NP after commit
03c80a1, which causes the firmware startup to fail.
This appeared to work in previous versions, because
remoteproc_allocate_id() returning RSC_NOTIFY_ID_ANY was effectively
ignored, leaving the notifyid unchanged and allowing execution to
continue.
Set the value of notifyid for the virtio device (rvdev) to 31 to
avoid possible conflicts with the Linux imposed values.
Signed-off-by: Ed Mooring <ed.mooring(a)gmail.com>
Hi All,
I have 2 items for discussion for the community call tomorrow:
For the Remoteproc-core API rproc_get_by_child
I have a use case where I would like to call this on the current
rproc->device.
2 things:
1. At
https://github.com/torvalds/linux/blob/master/drivers/remoteproc/remoteproc…
There may be a bug here in that if the device is copied, then
device->type comparison will fail.
Can we change this to “if (!strncmp(dev->type->name, (&rproc_type)->name,
strlen((&rproc_type)->name)) ? That way even if the device is copied the
check will work.
1. For the same API, is it Ok to extend the for loop so it supports
search on the ‘current’ device passed in?
That is change
https://github.com/torvalds/linux/blob/master/drivers/remoteproc/remoteproc…
“for (dev = dev->parent; dev; dev = dev->parent) {“
to
“for (; dev; dev = dev->parent) {“
This way we can account for the current device having the rproc dev.
The reasoning for why this arises is that I have a use case where a driver
is trying to call rproc_boot() to establish an RPMsg connection.
(1) comes up because a device structure is copied so the comparison will
not work as currently constructed.
(2) comes up in our use case because the rproc structure device in an
internal driver doesn’t yet have a child to iterate up from. (2) is solved
in our use case by starting at the current device.
Thanks,
Ben
Hi All,
I have 2 items for discussion for the community call tomorrow:
For the Remoteproc-core API rproc_get_by_child
I have a use case where I would like to call this on the current
rproc->device.
2 things:
1. At [1]https://github.com/torvalds/linux/blob/master/drivers/remotep
roc/remoteproc_core.c#L2644 There may be a bug here in that if
the device is copied, then device->type comparison will fail.
Can we change this to “if (!strncmp(dev->type->name,
(&rproc_type)->name, strlen((&rproc_type)->name)) ? That way even if
the device is copied the check will work.
2. For the same API, is it Ok to extend the for loop so it supports
search on the ‘current’ device passed in?
That is
change [2]https://github.com/torvalds/linux/blob/master/drivers/remotep
roc/remoteproc_core.c#L2643
“for (dev = dev->parent; dev; dev = dev->parent) {“
to
“for (; dev; dev = dev->parent) {“
This way we can account for the current device having the rproc dev.
The reasoning for why this arises is that I have a use case where a
driver is trying to call rproc_boot() to establish an RPMsg connection.
(1) comes up because a device structure is copied so the comparison
will not work as currently constructed.
(2) comes up in our use case because the rproc structure device in an
internal driver doesn’t yet have a child to iterate up from. (2) is
solved in our use case by starting at the current device.
Thanks,
Ben
References
1. https://github.com/torvalds/linux/blob/master/drivers/remoteproc/remoteproc…
2. https://github.com/torvalds/linux/blob/master/drivers/remoteproc/remoteproc…
Hi all,
During the late stages of testing of the v2022.10 OpenAMP library, I ran
across a failure that looks like there is an unexpected interaction between
the library and the Linux remoteproc implementations. We have decided
to delay the release until we understand the problem better.
Regards,
Ed M
Branch: refs/heads/main
Home: https://github.com/OpenAMP/open-amp
Commit: cd7f331045889650189d1357fc079987236c4c0c
https://github.com/OpenAMP/open-amp/commit/cd7f331045889650189d1357fc079987…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-20 (Thu, 20 Oct 2022)
Changed paths:
M lib/remoteproc/remoteproc_virtio.c
Log Message:
-----------
remoteproc: Fix build warning in rproc_virtio_create_vdev function
The arm-none-eabi-gcc complains when VIRTIO_DEVICE_ONLY is enable
remoteproc_virtio.c:222:29: warning: variable 'vring_rsc'
set but not used [-Wunused-but-set-variable]
222 | struct fw_rsc_vdev_vring *vring_rsc;
| ^~~~~~~~~
The vring_rsc variable should be declared and set only if
VIRTIO_DEVICE_ONLY is not enable.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Branch: refs/heads/main
Home: https://github.com/OpenAMP/open-amp
Commit: 4e1fa03814331fb87ad238072789207db5dbc374
https://github.com/OpenAMP/open-amp/commit/4e1fa03814331fb87ad238072789207d…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M docs/rpmsg-design.md
M lib/include/openamp/rpmsg.h
M lib/rpmsg/rpmsg.c
Log Message:
-----------
rpmsg: Add rpmsg_release_tx_buffer API
Add an API to be able to release unused TX buffer that will not be
sent.
For instance this API can be called in case of error between the
buffer reservation and the send to the remote side.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Commit: 753a20368b2ab4b27b893eb44d7a7a5bdd840394
https://github.com/OpenAMP/open-amp/commit/753a20368b2ab4b27b893eb44d7a7a5b…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M docs/rpmsg-design.md
Log Message:
-----------
docs: add no-copy user API description
Add short description of the no-copy user interface.
Add some sub-chapters to increase the readability.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Commit: 2e0015af74cee05cb82ff65c73f725670e28603e
https://github.com/OpenAMP/open-amp/commit/2e0015af74cee05cb82ff65c73f72567…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M lib/include/openamp/virtqueue.h
M lib/virtio/virtqueue.c
Log Message:
-----------
virtqueue: Add helper to get the buffer address from descriptor index
As it possible to get the buffer length we need also to retrieve
the address associated to the descriptor index.
This is need by rpmsg virtio to implement the buffer recycler.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Commit: 6dad72724fcb056414e0193805362647e347ae59
https://github.com/OpenAMP/open-amp/commit/6dad72724fcb056414e0193805362647…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M lib/include/openamp/rpmsg_virtio.h
M lib/rpmsg/rpmsg_virtio.c
Log Message:
-----------
rpmsg virtio: Implement the Tx buffer reclaimer
With the no-copy feature a tx buffer can be get, filled and then
sent to the remote side.
In Some error cases the application can need to release it instead
of sending it to the remote side.
As the virtqueue is updated when the buffer it get, it is not
possible to manage this use case at virtqueue level.
This patchset implements the release based on a buffer recycler.
The principle is to store the released buffer in a 'reclaimer' list.
On next get pmsg_virtio_get_tx_buffer call the buffer is reused.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Commit: 80555a314e5cdc92533fec26e48941cd2db60108
https://github.com/OpenAMP/open-amp/commit/80555a314e5cdc92533fec26e48941cd…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M apps/tests/msg/CMakeLists.txt
A apps/tests/msg/rpmsg-nocopy-echo.c
A apps/tests/msg/rpmsg-nocopy-ping.c
Log Message:
-----------
test: Add test for the no-copy validation.
Add test to validate the no copy and the associated Tx buffer
recycler.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Compare: https://github.com/OpenAMP/open-amp/compare/988da0074d9c...80555a314e5c
Branch: refs/heads/main
Home: https://github.com/OpenAMP/open-amp
Commit: 988da0074d9c5cd95b693218f0eea05bbcee6d2b
https://github.com/OpenAMP/open-amp/commit/988da0074d9c5cd95b693218f0eea05b…
Author: Tanmay Shah <tanmay.shah(a)amd.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M apps/examples/rpc_demo/rpc_demo.c
Log Message:
-----------
examples: apps: Update rpc_demo description
rpc_demo.c file creates firmware that runs on remote processor.
The current description implies that proxy service is implemented
on remote side which is not true. Fix description and explicitly
mention that proxy service is implemented on host side
Signed-off-by: Tanmay Shah <tanmay.shah(a)amd.com>
Branch: refs/heads/main
Home: https://github.com/OpenAMP/open-amp
Commit: 4f2d0c2106560b4bbe91e8b3f2d25d8b01e4958c
https://github.com/OpenAMP/open-amp/commit/4f2d0c2106560b4bbe91e8b3f2d25d8b…
Author: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M README.md
Log Message:
-----------
README: Remove deprecated method to build open-amp lib for zephyr
The instructions to build open-amp for zephyr do not work.
Instead of trying to maintain a cross dependency between the zephyr
and the open-amp, just reference the zephyr project and documentation
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen(a)foss.st.com>