In line with the terminology changes proposed by the OpenAMP
Technical Steering committee. Suppress "master and "slave" terms
in comments and documentations.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
There were several places in the library where a char* was used to point
to a wider type (uint32_t or a struct). Casting the char* to the wider
type resulted in a compiler warning.
This commit changes some simple casts to (void *) to silence compiler
warnings. In rsc_table_parser.c, replace casts and pointer arithmetic
with explicit uses of fw_rsc_hdr.
Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
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>
The old code pass the error code to metal_free_memory in failure
which is obviously wrong:
1. Generate the memory leak
2. May corrupt the heap manager
Signed-off-by: chao an <anchao@xiaomi.com>
The current code fetches the vring index before invalidating the cache.
This can lead to using an invalid index.
Fetch the index before invalidation to ensure a correct index.
Signed-off-by: Joshua Lin <jlin@petaio.com>
When memory region are continuous, it may get wrong memory region.
If pa is equal to the end address of the memory and size equal zero.
It will get wrong memory region.
So need to add check pa is smaller then end address.
Signed-off-by: Joshua Lin <jlin@petaio.com>
Enable user of rpmsg_virtio to set sizes of TX and RX buffers per
created rpmsg_virtio instance. Each instance can use other buffer sizes.
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
For memory footprint reason it can be useful for applications
to use defines during the build pre-processing step.
Add a generated version_def.h file that will be accessible in the
the install directory ./build/bin/usr/local/include/openamp/.
Application will be able to use the version.h or the version_def.h
depending on its need.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Add similar API that the libmetal to allow application to get information
about the version of the openamp library.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
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>
The idx variable size is 16-bit. Add a cast to fix "expression may overflow"
code analysis complain.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Since the mapping info is normally managed inside the porting
layer, the new callback could avoid the mapping duplication.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
rpmsg_virtio_get_tx_buffer shouldn't allocate the number of
buffer bigger than the virtio ring length of sending
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
The rpmsg_init_ept does not seem to be usable by application
but is used internally. This patch mark this API deprecated
and in at least two full release, to remove this API as the
standard API to use is rpmsg_create_ept.
In addition, move the rpmsg_init_ept to rpmsg_internal and rename it.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Although omitting the cast to the target type is idiomatic C, the
omission is actually forbidden in ISO C++. This patch enables the header
to be used in C++ code.
Signed-off-by: Simon Leiner <simon@leiner.me>
Align coding rule with checkpatch recommendation concerning
the comparison to null.
Some comparisons in macro have not be fixed for readability.
Examples of code not updated:
VQ_PARAM_CHK(ring == NULL, status, ERROR_VQUEUE_INVLD_PARAM);
VQASSERT(vq, cookie != NULL, "enqueuing with no cookie");
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>