Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
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
Arnaud Pouliquen
07109214ee lib: remove deprecated MASTER/SLAVE configuration
The use of the master and slave terminologies in configs and API are now
deprecated since 2 years, we can remove the associated code.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2024-05-06 19:35:22 +02:00
Andrew Davis
ca56246b19 lib: Use VIRTIO_{DRIVER,DEVICE}_SUPPORT to improve readability
Currently compiler defines are defined when support for driver or device
is the only support being built. This is a negative define, it surrounds
the code to not be built and we use ifndef. This is confusing. It also
leaves ifndefs all throughout the code-base. Instead, define a macro that
is set to 1 if support is enabled. Use this inline in if statements where
possible. Any sane compiler will optimize away the code in the branch
when support is not enabled just the same as when using the preprocessor
so we keep the same binary size.

Signed-off-by: Andrew Davis <afd@ti.com>
2024-04-23 09:29:18 +02:00
Iuliana Prodan
f2162a69ac options: add option for all cache operations
Add WITH_DCACHE operation used for all cache operations:
vrings, buffers and resource table.
The other options will be deprecated - add warning
message for this.

Add info for WITH_DCACHE option in README.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-09-18 09:12:36 +02:00
Iuliana Prodan
3882872bd5 options: fix typo
Fix typo for WITH_DCACHE_BUFFERS option.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-09-18 09:12:36 +02:00
Dan Milea
e63d07d105 virtio: virtio-mmio framework
VIRTIO MMIO transport for OpenAMP.

Signed-off-by: Dan Milea <dan.milea@windriver.com>
2023-08-17 09:14:38 +02:00
Iuliana Prodan
a2456e61ee remoteproc: do cache invalidation before reading rsc_table info
Do a cache invalidation before reading the resource table's info
since this ca be in a cacheable region.

Make this optional, based on VIRTIO_CACHED_RSC_TABLE.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
2023-07-17 17:16:05 +02:00
Sergei Korneichuk
14f3f8405b version: use generated version_def.h
Using command line to define the OPENAMP_VERSION string macro breaks
Cygwin build on some releases of Microsoft Windows and CMake. Remove all
OPENAMP_VERSION macros from cmake compiler flags and use the ones from
the generated version_def.h file.

Signed-off-by: Sergei Korneichuk <sergei.korneichuk@amd.com>
2023-04-24 09:50:56 +02:00
Tammy Leino
c1f93a1b5d Added build for Doxygen docs
Build workflow will generate html files from source if Doxygen is present.
Signed-off-by: Tammy Leino <tammy_leino@mentor.com>
2022-12-14 09:43:10 +01:00
Ed Mooring
e5988ab1c0 CMake: Drop deprecated CMAKE_FORCE_*_COMPILER directives.
Building OpenAMP for standalone ARM R5, the following warning occurs:

CMake Deprecation Warning at
/usr/share/cmake-3.16/Modules/CMakeForceCompiler.cmake:75 (message):
  The CMAKE_FORCE_C_COMPILER macro is deprecated.  Instead just set
  CMAKE_C_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  cmake/platforms/cross_generic_gcc.cmake:5 (CMAKE_FORCE_C_COMPILER)
  /home/mooring/build-oa/toolchain.r5-oa.sa:18 (include)
  /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:93 (include)
  CMakeLists.txt:19 (project)

Follow the suggestions in the above error message, and add
CMAKE_TRY_COMPILE_TARGET_TYPE = STATIC LIBRARY, which makes try_compile()
not try to link the cross-compiled binary. This is necessary because the
arm-none-eabi toolchain libgcc doesn't have an implementation of _exit(),
leaving that to the BSP. This results in a CMake error because it can't
build the test executable.

Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
2022-05-16 09:55:19 +02:00
Ed Mooring
71c85d6b66 Terminology: Replace potentially offensive terms in the code.
In line with the terminology changes proposed by the OpenAMP
Technical Steering committe. Change VIRTIO_SLAVE_ONLY to
VIRTIO_DEVICE_ONLY. On linux, the two ends of the virtio communication
path are referred to as the "driver" (Linux), and the "device", in this
case running on the remote processor.

Terminology: Replace VIRTIO_MASTER_ONLY with VIRTIO_DRIVER_ONLY.

Terminology: Replace VIRTIO_DEV_SLAVE with VIRTIO_DEV_DEVICE

Terminology: Replace VIRTIO_DEV_MASTER with VIRTIO_DEV_DRIVER.

Apps: Fix variable names

Per guidance from the Technical Steering Committee, replace "master" and
"slave" with more appropriate terms.

lib: Replace RPMSG_MASTER with RPMSG_HOST

cmake: Change option names from "master", "slave" to "driver", "device".

Apps: Cleanup terminology

README: Update variable names to match the code.

Terminology: Add deprecation warnings to configuration variables.

Warn the user if they use the older, possibly offensively
named configuration variables.

Terminology: Clean up deprecation warnings.

CMake: Default deprecated configuration variables to off.

Make the deprecated WITH_VIRTIO_MASTER and WITH_VIRTIO_SLAVE
configuration variables default to OFF. This means that only deliberate
use of those variables will trigger the deprecation warning.

Terminology: Replace compiler-specific warnings with #warning.

In warning about deprecated constant names, change from
compiler-specific compile time warnings to the standard #warning.

fixup! Terminology: Replace potentially offensive terms in the code.

Fix the compilation error in zephyr by declaring a deprecated function

Deprecated message generated:
zephyr/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c: In function 'rpmsg_mng_task':
zephyr/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c:351:2: warning: 'deprecated_virtio_dev_slave' is deprecated [-Wdeprecated-declarations]
  351 |  rpdev = platform_create_rpmsg_vdev(0, VIRTIO_DEV_SLAVE, NULL,
      |  ^~~~~
In file included from modules/lib/open-amp/open-amp/lib/include/openamp/rpmsg_virtio.h:18,
                 from modules/lib/open-amp/open-amp/lib/include/openamp/open_amp.h:12,
                 from zephyr/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c:15:
modules/lib/open-amp/open-amp/lib/include/openamp/virtio.h:49:32: note: declared here
   49 | __deprecated static inline int deprecated_virtio_dev_slave(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~

fixup! Terminology: Replace potentially offensive terms in the code.

miscellaneous update

Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2022-04-29 10:12:09 +02:00
Arnaud Pouliquen
4728d56c85 Fix various typo with codespell
Found via `codespell -q 3 -S ./scripts/spelling.txt`

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2022-04-14 09:13:39 +02:00
Gaute Nilsson
9ef58af298 Remove vim modeline comments
This is currently inconsistent with the rest of the project.

Signed-off-by: Gaute Nilsson <gaute.nilsson@siemens-energy.com>
2021-12-16 18:08:24 +01:00
Carlo Caione
b8abc39802 Introduce CMake options to enable cache operations
Introduce WITH_DCACHE_VRINGS and WITH_DCACHE_BUFFERS.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-07-07 09:11:09 +02:00
Arnaud Pouliquen
d8541f2f12 Rework the version management
PROJECT_VERSION* variables are recognized by cmake. Rename the
PROJECT_VER* variables used for the version.

Create a version file to make it easier to find and update the version.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2021-04-26 16:06:20 +02:00
Arnaud Pouliquen
98b3874fb2 cmake: fix LIBMETAL naming warning
Fix warnings spotted by cmake:

The package name passed to `find_package_handle_standard_args`(LIBMETAL) does
not match the name of the calling package(Libmetal). This can lead to problems
in calling code that expects `find_package` result variables (e.g., `_FOUND`)
to follow a certain pattern.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-07-27 10:10:24 +02:00
Gaute Nilsson
2141a3c5d5 Add option to adjust RPMSG_BUFFER_SIZE during CMake build
Signed-off-by: Gaute Nilsson <gaute.nilsson@siemens.com>
2020-04-23 09:54:43 +02:00
Sebastian Bøe
4f461b2bbc cmake: Add support for having CMAKE_BUILD_TYPE be the empty string
Add support for having CMAKE_BUILD_TYPE be the empty string. Setting
CMAKE_BUILD_TYPE to the empty string is valid use, so we should not
override it when it is set as such.

Also, when a multi-config generator is in use, and CMAKE_BUILD_TYPE is
set to the empty string, we will accidentally be dynamically changing
the value of CMAKE_BUILD_TYPE. This breaks the build because as the
docs say, this value is a static value and should not be dynamically
changed:

"This statically specifies what build type

https://cmake.org/cmake/help/v3.17/variable/CMAKE_BUILD_TYPE.html

This is of the same nature as
https://github.com/OpenAMP/libmetal/pull/108

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-03-27 16:47:22 -07:00
Ben Levinsky
007f2fe640 examples: update Xilinx example code.
This provides bug fixes and enhancements to the Xilinx-specific example
code, and a couple of small fixes to the linux example code.

Signed-off-by: Ed Mooring <ed.mooring@linaro.org>
2020-01-31 09:19:40 +01:00
Wendy Liang
faf6d20bfa cmake: Add options to enable virtio master/slave only
Add cmake option to allow to build virtio master or slave only
rpmsg/virtio implementation.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2018-07-30 17:24:27 -07:00
Wendy Liang
174435944a cmake: remove unused cmake options
Remove unused cmake options such as REMOTEPROC_MASTER
as the library allows user to use different libraries sperately.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2018-07-30 17:24:27 -07:00
Wendy Liang
8618495899 cmake: allow not to build rpc demo in Linux
Signed-off-by: Wendy Liang <jliang@xilinx.com>
2018-07-30 17:24:27 -07:00
Kumar Gala
33a899f23a cmake: Remove dead cmake option
Removed WITH_EXT_INCLUDES_FIND as there is nothing that references or
uses it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-29 13:40:50 -07:00
Kumar Gala
db6de3ffb0 cmake: Updates for Zephyr integration
* Removed IS_TEST, not used by Zephyr anymore
* Added zephyr_include_directories so when we embedded open-amp
  in zephyr we have the include path setup for the headers
* If we build as an embedded zephyr library (WITH_ZEPHYR_LIB) we
  shouldn't utilize Zephyr's app/boilerplate.cmake.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-22 17:46:10 -05:00
Wendy Liang
a01c9edf71 Enable to build OpenAMP library for Zephyr
Enable to build OpenAMP library for Zephyr project.

* $ cmake <where_libmetal_is_cloned> -DWITH_ZEPHYR=on \
    -DBOARD=qemu_cortex_m3 \
    -DCMAKE_INCLUDE_PATH=<built_libmetal_include_path> \
    -DCMAKE_LIBRARY_PATH=<built_libmetal_library_path>
* $ make VERBOSE=1 all

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-12-30 23:55:53 -08:00
Wendy Liang
be75554de7 only allow proxy feature if fcntl.h is found
As the proxy library functions relies on fcntl.h file,
only allows proxy functions if fcntl.h file is found.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-12-30 23:55:53 -08:00
Sam Sortais
9c127eef28 toochain file: zynqmp_r5_generic: use hard fp
Update the ZynqMP R5 generic toolchain file to use
hard fp by default as Xilinx enable hard fp for R5 applications
from 2017.2.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-12-07 09:26:07 -08:00
Sam Sortais
f9aeb3bfaa toolchain file: zynqmp_linux: fix typo
Correct machine name and the cross Linux gcc include.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-12-07 09:22:27 -08:00
supergaute
b37ec2f2ab cmake options: change optimization settings (#30)
Optimization setting shall be set by cmake based on debug/release.
This relates to libmetal commit 1d6d72d.
2017-09-25 10:41:03 -07:00
Sam Sortais
0bbb2ba45b fix typo in setting variable
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-06-14 22:12:07 -07:00
Wendy Liang
68e16c232e fix install paths to work for multilib
When running multilib builds on 64-bit platforms, the system library
paths need to be adjusted to either lib64/lib32, or lib64/lib in a
distro specific way.  This is handled via CMAKE_INSTALL_LIBDIR/BINDIR
variable

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-02-03 10:00:29 -08:00
Sam Sortais
63b439d80f add option to exclude dependency check
Add option to avoid checking for pre-existence of libmetal.a.
Add option to avoid checking external include existence.
This is needed in case cmake is invoked before those others are created.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2016-10-12 22:01:49 -07:00
Wendy Liang
8abd6e6e65 CMake: generic: ZynqMP R5: udpate to use libxil, libmetal
Update ZynqMP R5 generic CMake toolchain file to use libxil, libmetal
libraries.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-10-12 22:01:49 -07:00
Wendy Liang
53607597b3 CMake: Zynq: generic: update to use xil,metal lib
Default Zynq generic CMake toolchain file is updated to use libxil and
libmetal libraries.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-10-12 22:01:49 -07:00
Wendy Liang
5614da20ce Update CMake files to compile OpenAMP for Linux
This patch is to enable to build OpenAMP for Linux
userspace.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-10-12 22:01:48 -07:00
Wendy Liang
fe791a62b7 Add checking stdatomic header file checking
Check wheter stdatomic header file exists, if not, use the
atomic operations defined in libmetal, if not, use the
atomic operations defined in libmetal.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-10-12 22:01:45 -07:00
Wendy Liang
e667c74a61 Add CMake depends to check OpenAMP dependencies
Introduce depends.cmake to check dependencies for
OpenAMP library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-10-12 22:01:41 -07:00
Wendy Liang
a81edb833c Add CMake module for look for libmetal
Add a CMake module to look for the libmetal library
and header files.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-10-12 22:01:41 -07:00
Wendy Liang
89665ad3ca Use CMake for compilation
using cmake is in order to make OpenAMP compilation
easier to cross OSes and compilers

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2016-02-09 11:55:45 -08:00