1104 Commits

Author SHA1 Message Date
Arnaud Pouliquen
59e843f3ef CI: Fix compliance check folder bypass
On GitHub, this check is tagged as "Required."
However, if a PR only affects the following folders:.github, docs,
scripts, or cmake, the check is not executed (to avoid false positives),
resulting in the status "execution pending" + "required" on GitHub.

This commit forces the execution of the check but bypasses the
compliance.xml test when the PR only affects the listed folders.

If at least one update affects other folders, the compliance check
runs as usual.

In addition, the cmake folder is removed from the list, as there is
no reason to skip compliance tests on it.

Signed-off-by: Arnaud Pouliquen arnaud.pouliquen@foss.st.com
2026-01-26 15:04:34 +01:00
Arnaud Pouliquen
10768d0c6f CI: Update to Zephyr 4.3 and use default associated sdk
- bump to Zephyr 4.3
- use west packages pip --install
- use "west sdk install" command to install the expected sdk version.
- only install arm-zephyr-eabi compiler as build tested only on
  arm targets

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-12-17 19:07:54 +01:00
Arnaud Pouliquen
be5770f305 lib: remoteproc: Fix remoteproc_remove_virtio
The code contains redundant checks with both metal_assert(vdev) and if
(!vdev).
Moreover, if the assert is disabled, it may lead to dereferencing a null
pointer.
We should not rely on asserts for API validation. Instead, replace the
assert with an error message.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-12-05 15:48:10 +01:00
Arnaud Pouliquen
e8866ee7df release: open-amp 2025.10.0
Set library version to 1.9.0

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
v2025.10.0
2025-11-03 10:51:10 +01:00
Ed Mooring
28ccd6b7b5 README: Remove references to apps directory and generated applications
These applications have been moved to the openamp-system-reference.
Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
2025-11-03 10:50:50 +01:00
Arnaud Pouliquen
a399378a5d virtio: remove deprecated virtio_describe() function
The function is deprecated since more than 2 years, remove it.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-10-20 14:27:25 +02:00
Arnaud Pouliquen
d183f24ea0 cmake: remove deprecated cache options
Remove the following CMake options and associated definitions that have
been deprecated for over two years:
- WITH_DCACHE_VRINGS
- WITH_DCACHE_BUFFERS
- WITH_DCACHE_RSC_TABLE
- VIRTIO_CACHED_RSC_TABLE
- VIRTIO_CACHED_BUFFERS
- VIRTIO_CACHED_VRINGS

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-10-20 14:27:25 +02:00
Arnaud Pouliquen
f819642829 remoteproc virtio: Fix documentation
The function rproc_virtio_wait_remote_ready does not return a value.
Remove the related @return field from the documentation.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-10-17 09:22:37 +02:00
Deep Chordia
b42e8443b9 lib: remove CACHE_* macros
- removes CACHE_FLUSH macro clashing with internal QNX definition
- also removes CACHE_INVALIDATE macro for consistency

Signed-off-by: Deep Chordia <dchordia@blackberry.com>
2025-10-17 09:15:52 +02:00
Sipke Vriend
6db90ebfcd doxygen: define vring memory layout using table
review requested to use a table rather than a code snippet to define
the memory layout, so convert proposed struct to a table with
definition, size and description and explanation of padding between
available and used structures.

Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
2025-10-16 11:20:37 +02:00
Bowen Wang
9c4ad74ab4 virtqueue: add more virtqueue apis for the virtio device side
In virtio device side, we always need to get the next avaiable
buffer based on current buffer index. So add these two APIs for
convinience use.

For example, virtio blk driver origanize the buffer:
+----------+
| Reqeust  | (Flags: Read | Next)
+----------+
| Buffer   | (Flags: Read/Write | Next)
+----------+
| Response | (Flags: Write)
+----------+

For the virtio blk device size, we need get the Buffer and Response buffer
based on the Request buffer index.

So add api virtqueue_get_next_avail_buffer() to get the next available
buffer based on the first buffer index.
And rename the virtqueue_get_available_buffer() to
virtqueue_get_first_avail_buffer()

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2025-10-16 11:20:05 +02:00
Arnaud Pouliquen
31acf64533 CI: fix No space left on device message
Add jlumbroso/free-disk-space action to clean-up the workspace
before running action.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-10-15 16:25:26 +02:00
Tanmay Shah
ad39b4e740 README: remove example related information
Update README file with latest information about demos and its
documentation.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
2025-09-24 18:44:13 +02:00
Sipke Vriend
98ba93cfab doc: copy design document images from open-amp repository
These design documents and images are being moved to openamp-docs
Decided with Bill and Arnaud to move all the design documentation from the
https://github.com/OpenAMP/open-amp repository doc folder to the
https://github.com/OpenAMP/openamp-docs repository docs folder
The main reason being that the breathe and doxylink integration is already
in openamp-docs, so can be used for the design doc.

Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
2025-08-25 15:05:21 +02:00
Sipke Vriend
391671ba24 doxygen: tell doxygen to generate xml
in order to use the sphinx breathe plugin in the OpenAMP/openamp-docs
repository we need to enable xml generation

Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
2025-05-19 09:24:03 +02:00
Sipke Vriend
1bd84cfd89 doxygen: tell doxygen to generate tag file for external linking
To allow for external links to doxygen generated content, tell doxygen
to build tags, so the tag file can be used for cross referencing
doxygen generated data.

Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
2025-05-19 09:24:03 +02:00
Peter van der Perk
3737f8b18a rpmsg_virtio.c: wait_remote_ready use sleep instead to avoid starvation
metal_cpu_yield can either result in an unimplemented function or a yield
function. The yield function however only yields execution to another
thread of the same or higher priority. Thus starving any lower priority
threads.

wait_remote_ready can be blocked for a long time i.e. seconds waiting on
the remote core to start communication.

Instead use metal_sleep_usec, allowing lower priority tasks to be
executed. While waiting on the remote core.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2025-05-12 15:00:45 +02:00
Arnaud Pouliquen
604cdf9a45 release: open-amp 2025.04.0
Set library version to 1.8.0

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
v2025.04.0
2025-05-05 09:28:59 +02:00
Yongrong Wang
8f14611db8 rpmsg: virtio: deinit rvdev->vdev when rvdev is deinited
If rvdev is deinited, using rvdev->vdev may cause a use-after-free error.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2025-04-22 09:16:55 +02:00
Arnaud Pouliquen
400c063456 apps: remove all legacy application examples
The applications are now available in the system-reference repository.
Remove the apps folder as it is no longer maintained.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-04-17 18:03:08 +02:00
Arnaud Pouliquen
11b1bee1f2 documentation: remove documentation related to the application examples
Remove README files that provide information to build and run the applications.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-04-17 18:03:08 +02:00
Arnaud Pouliquen
589cc54d44 cmake: remove possibility to build applications
The application folder is deprecated and should no more be used.
Remove associated cmake options.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-04-17 18:03:08 +02:00
Bill Mills
516e1b2147 CI: update known working version of Zephyr and its SDK
These are the current versions and have already been tested via the
Zephyr health check job.

Signed-off-by: Bill Mills <bill.mills@linaro.org>
2025-04-17 09:05:40 +02:00
Arnaud Pouliquen
22214aab41 travis CI: remove unused .travis.yml
The travis CI is no more used, clean the associated yaml file

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-04-04 09:01:06 +02:00
Arnaud Pouliquen
8c0c0c386b cmake: update cmake minimum support to 3.16
We currently support an old version of CMake (3.0.2) that was released
in 2018.

This requires adding specific policies to support the evolution to the
latest versions of Zephyr.

Update the minimum version to 3.16, aligned with the libmetal.

By updating to CMake 3.16 as the minimum version, we can also clean up
the following policy add-ons:
- CMP0048 added in CMake v3.0
- CMP0077 added in CMake v3.13

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-02-24 10:47:59 +01:00
Bill Mills
00e0d7abf0 docs: update the readthedocs integration for PRs in this repo
Upstream Read The Docs has tightened up the schema checking and this broke
what we were doing for PRs.

A good number of things were tried but the best compromise is to:
* supply a dummy sphinx config file in this repo
* override the default build command to use the openamp-docs dir

Also:
* add more documentation about what is going on
* lock to html only format.  PRs only do html anyway but make sure

Signed-off-by: Bill Mills <bill.mills@linaro.org>
2025-02-17 09:16:47 +01:00
Bowen Wang
b2f6099fe5 lib: virtio: add new api virtio_has_feature()
virtio_has_feature() can be easily used to check if the virtio device
support a specific feature.

And assgin feature to vdev->feature for virtio device role when get
features, so the virtio device side can use virtio_has_featrue() to
check weather the virtio device support a feature.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2025-02-05 09:09:48 +01:00
Bowen Wang
8bd6149dfc lib: virtio: add new feature bit VIRTIO_F_ANY_LAYOUT
Follow the virtio spec, this feature bit indicates that the device
accepts arbitrary descriptor layouts.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2025-02-05 09:09:48 +01:00
Arnaud Pouliquen
3122cec8aa lib: virtio: Fix VIRTIO ROLE_XXXX macro definitions
Add parentheses around the "vdev" parameter to avoid side effects.

This fixes a build error when using the macro in the following way:
  if (VIRTIO_ROLE_IS_DEVICE(&my_context->vdev))

The error encountered:
openamp/open-amp/lib/include/openamp/virtio.h:89:49: error: invalid type argument of ‘->’ (have ‘struct virtio_device’)
   89 |  (VIRTIO_ENABLED(VIRTIO_DRIVER_SUPPORT) && (vdev->role) == VIRTIO_DEV_DRIVER)

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-01-13 09:14:01 +01:00
Arnaud Pouliquen
bc1a7efba2 CI: fix zephyr test on Zephyr for lpcxpresso54114 board
The name of the board has been updated since the Zephyr commit:
  d8cfa6fb2916 ("boards: nxp: convert lpcxpresso54114 to hwmv2")

Fix the build command according to the new name.
The update is compatible with the Zephyr v3.7.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-01-08 09:16:19 +01:00
Bowen Wang
4ace3543ae virtio: Add memory operation interface for virtio device
Buffer management is different for different transport layer:

For MMIO transport layer, the buffer can directly allocated from
the geust OS heap beacase the hypervisor can access all the memory own
by guest OS.

For remoteproc transport layer, the buffer should be allocated from
the share memory region to make sure the remote core can access this
buffer too.

So add memory ops in virtio device to make different transport/device can
implement their own share memory management.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-11-05 11:14:00 +01:00
Arnaud Pouliquen
a2cd944c40 release: open-amp 2024.10.0
Set library version to 1.7.0

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
v2024.10.0
2024-11-04 17:58:50 +01:00
Arnaud Pouliquen
71887e71df lib: remoteprocrpmsg: Fix safe_strcpy call
Fix the size of the source string passed in argument of safe_strcpy().
In rpmsg_register_endpoint we can not trust the size of the name
string provided, so we limit the max size to RPROC_MAX_NAME_LEN.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-25 10:16:15 +02:00
Arnaud Pouliquen
845a17b69f lib: rpmsg: Fix safe_strcpy call
Fix the size of the source string passed in argument of safe_strcpy().
In rpmsg_create_ept we can not trust the size of the name
string provided, so we limit the max size to RPMSG_NAME_SIZE.

Update the rpmsg_create_ept documentation to clarify the limit

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-25 10:16:15 +02:00
Arnaud Pouliquen
2a93d20f21 options: make WITH_APPS cmake option deprecated
The applications are now in the openamp-system-reference repository.
The "apps" folder is now deprecated and should be removed in coming
releases.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-25 10:15:43 +02:00
Bowen Wang
bb4459fe30 rpmsg_virtio: fix rpmsg_virtio_get_tx_payload_buffer() error
If rpmsg_virtio_notify_wait() returns RPMSG_SUCCESS, we should not
directly return NULL, but call rpmsg_virtio_get_tx_buffer to get
the tx buffer again.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-21 11:12:36 +02:00
Yongrong Wang
47be1f3379 rpmsg_virtio.c: replace metal_cpu_yield to new libmetal API metal_yield
The CPU yield is not supported by all OSes/processors. If not supported,
this causes a busy loop that monopolizes the CPU. Replace it with the
new metal_yield, it would be managed at the OS level and dispatched to
metal_cpu_yield, metal_sleep_usec, or others.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-21 11:02:04 +02:00
Bill Mills
3541b5771b CI: Do Zephyr build tests on known good and latest versions
Allow Zephyr testing to either use locked known good values
or the very latest versions.

This brings open-amp to parity with libmetal.  Open-amp did not have the
SDK URL discovery code so that was added here as part of this.

The known good versions are best for PR checking as if the build fails
it is almost always the PR itself that broke it.

The latest version is good for periodically checking compatibility with
the very latest Zephyr changes.

For now we run both on pushes and PRs.

We also run main against the latest zephyr check weekly as a look ahead.

Signed-off-by: Bill Mills <bill.mills@linaro.org>
2024-10-18 18:11:03 +02:00
Bill Mills
6a5fdf1b1f CI: reduce zephyr sdk install verbosity
Reduce the console output for the Zephyr sdk install.
This now matches the intent of libmetal but uses the documented wget
option.

Signed-off-by: Bill Mills <bill.mills@linaro.org>
2024-10-18 18:11:03 +02:00
Arnaud Pouliquen
c3132d0d63 lib: remoteproc: replace strncpy with internal safe_strcpy
The strncpy function does not ensure that the destination string is
null-terminated. To address this issue, replace strncpy with the
internal safe_strcpy() function, which guarantees null-termination of the
destination string but also access only in buffer memory ranges.

Note: (void)safe_strcpy(...) indicates that the return value is
intentionally ignored.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 16:13:30 +02:00
Arnaud Pouliquen
27bec14883 lib: rpmsg: replace strncpy with internal safe_strcpy
The strncpy function does not ensure that the destination string is
null-terminated. To address this issue, replace strncpy with the
internal safe_strcpy() function, which guarantees null-termination of the
destination string but also access only in buffer memory ranges.

Note: (void)safe_strcpy(...) indicates that the return value is
intentionally ignored.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 16:13:30 +02:00
Arnaud Pouliquen
9aa3ee53c7 lib: utils: implement internal safe_strcpy function
The strlcpy() function has only recently become available in glibc.
While this function prevents destination buffer overflow, it seems
that it cannot guarantee read access only within the source buffer.
this is for instance the case if the source string is not terminated by
a'\0' character.
Implement a safe_strcpy to ensure that no access is done out of the
source and destination buffer ranges.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 16:13:30 +02:00
Arnaud Pouliquen
a69881f131 CI: Update CI to build system reference applications
Build system reference applications instead of open-amp deprecated
applications.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 09:15:36 +02:00
Arnaud Pouliquen
173d5cbb28 CI: Update open-amp path
To have a coherent directory hierarchy, move the open-amp git from root
to the "./open-amp" directory.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 09:15:36 +02:00
Arnaud Pouliquen
aa4040f3ba CI: Update checkout action to V4
Use last version of checkout action.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 09:15:36 +02:00
Arnaud Pouliquen
2e6cef5739 CI: Ignore .github path for compliance check
The CI does not need to strictly adhere to the coding rules.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-10-18 09:15:36 +02:00
Yongrong Wang
79d20e69b3 rpmsg: Allow to send virqueue_kick only when RX queue is empty
Add VQ_RX_EMPTY_NOTIFY config to define the behavior. If
VQ_RX_EMPTY_NOTIFY is disabled, notify the other side each
time a buffer is released. If VQ_RX_EMPTY_NOTIFY is enabled,
only send one notification when the RX queue is empty to
improve performance.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-17 15:59:10 +02:00
Rajiv Mohan
14a37c7bfe zynq: Remove support for Zynq-7000 SoC
Remove openamp support for Zynq-7000 SoC, following changes are done
1) remove folder apps/machine/zynq7
2) remove folder apps/system/generic/machine/zynq7
3) remove file cmake/platforms/zynq7_generic.cmake
4) remove file cmake/platforms/zynq7_linux.cmake
5) Modify README.md files

Reasons to remove:
1) Support for Zynq-7000 has ended
2) Removing redundant or unmaintained code
3) Reduce technical debt carried by OpenAMP team
4) very few customer using openamp on Zynq-7000 SoC

For using Zynq-7000 SoC support
last working and tested version is (v2023.10)
https://github.com/OpenAMP/open-amp/tree/v2023.10

Signed-off-by: Rajiv Mohan <rajiv.mohan@amd.com>
2024-10-14 11:52:40 +02:00
Yongrong Wang
81ac4d3934 openamp/virtio.h: make final_features optional
negotiate also can be call when final_features is NULL

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-09 10:37:42 +02:00
Yongrong Wang
4df7975ab1 openamp/virtio.h: update vdev->features
set vdev->features in virtio_negotiate_features

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-09 10:37:42 +02:00