Commit Graph
292 Commits
Author SHA1 Message Date
Sergei Korneichuk 54595de006 linux_rpc_demo: do not include rsc_table.h
No symbols from rsc_table.h are used in linux_rpc_demo.c and
the demo fails to build for Zynq, ZynqMP, and Versal systems.
Remove include rsc_table.h.

Signed-off-by: Sergei Korneichuk <sergei.korneichuk@amd.com>
2022-10-03 17:48:49 +02:00
Arnaud Pouliquen afed3bd117 Terminology: Replace potentially offensive terms in documentation
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>
2022-05-31 10:15:47 +02:00
Arnaud Pouliquen ef7a9d014d app: fix comment style and trailing whitespace
Fix some checkpatch complains

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2022-05-31 10:15:47 +02:00
Arnaud Pouliquen 4687a0ca53 apps: machines: clean-up the virtio device features definition
Provide a more explicit name and value for the virtio device
features.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2022-05-24 09:56:25 +02:00
Ed Mooring 8c93bffd9f apps: Remove leading space in CMake linker directive variables.
While building the Xilinx R5 demo apps, the following error message
occurs:

CMake Error at apps/examples/echo/CMakeLists.txt:38 (add_executable):
Target "rpmsg-echo.out" links to item " -Wl,--defsym,_rsc_table=0x3ed20000
-T"/OpenAMP-Project/gh3/open-amp/apps/system/generic/machine/zynqmp_r5/
linker_remote.ld""
which has leading or trailing whitespace.  This is now an error according
to policy CMP0004.

Remove the leading space.

Signed-off-by: Ed Mooring <ed.mooring@gmail.com>
2022-05-06 11:14:51 +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
Xiang Xiao 45bf79aeab apps: add const for remoteproc_ops and image_store_ops
follow up the change in lib

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-28 09:40:05 +02:00
Ben Levinsky 9b96accd88 apps: zynqmp_r5: enable resource table base address to be configurable
Currently the resource table location in the firmware is hard-coded.

Preserve the current functionality by adding a default value.

Allow user to overwrite the default resource table location by adding the
CMake property:

set(RSC_TABLE <address> CACHE STRING "")

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2022-04-14 09:15:38 +02:00
Ben Levinsky a6fe0b7764 apps: zynqmp: wrap app config symbols in ifndef
Allow symbols for IPI and shared memory to be set in CMake configuration

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2022-04-14 09:15:38 +02:00
Ben Levinsky b28fb3879b apps: zynqmp_r5: wrap app config symbols in ifndef
Allow symbols for IPI and shared memory to be set in CMake configuration

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2022-04-14 09:15:38 +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
ViswaHarsha C bdd4aa5d14 apps: add linux applications for linux rpc communication
Added linux_rpc_demo and linux_rpc_demod for rpc communication
between linux master and slave configuration

Signed-off-by: ViswaHarsha C <cviswa.harsha_ext@ltts.com>
2021-10-11 18:44:48 +02:00
Arnaud Pouliquen d55c0210a3 apps: add libraries version information in echo example
Add library information used for the demo. This used to provide
an examples of the new version API use.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2021-04-26 16:06:20 +02:00
Michael Bullis bcec51738e rpc_demo: fix spelling and grammar in code comment
There were some minor typos in the top level comment
block for the rpc_demo.c example.

Signed-off-by: Michael Bullis <mcbullisisu@gmail.com>
2021-04-16 09:13:18 +02:00
Sergei Korneichuk 5c6f465ca1 apps: machine: Fix MicroBlaze compilation error
Fix duplicated function definition with bad code.
See https://github.com/OpenAMP/open-amp/issues/252

Signed-off-by: Sergei Korneichuk <sergei.korneichuk@xilinx.com>
2021-04-16 09:13:18 +02:00
Arnaud Pouliquen 063ae70eef apps: update nocopy ping to use nocopy API for reception.
Enhance the ping to add the usage of rpmsg_hold_rx_buffer and
rpmsg_release_rx_buffer to treat the message outside of the
callback function.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2021-04-16 09:13:18 +02:00
Arnaud Pouliquen 1b7a000436 apps: add responder part of the no copy example
Add the ping responder that uses the nocpy API to process the message
outside of the receive callback.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2021-04-16 09:13:18 +02:00
Arnaud Pouliquen b8691c820e apps: move nocopy ping test to example
Move the test to exemple folder to prepare an exemple that involves the
TX and RX nocopy API.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2021-04-16 09:13:18 +02:00
Xiang Xiao 34bdd161d8 apps: add msg-test-rpmsg-nocopy-ping test
to demo the usage of zero copy API

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-12-03 15:44:59 +01:00
Arnaud Pouliquen baee3ff92d apps: rpc_demo: fix compilation warning
The GCC compiler complains about the printf of a size_t variable.
add 'z' length modifier to fix the warning.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-12-01 10:14:33 +01:00
Arnaud Pouliquen a659210c47 apps: add missing license information
Add BSD license when missing.
Copyright has also been added for files when possible.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-12-01 10:14:00 +01:00
Ben Levinsky 59eaa4847b apps: demos: update to hand rproc for cleanup
As rproc is needed to remove virtio device from remoteproc_virtio device
make sure this is handed off too

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-26 16:37:15 -07:00
Ben Levinsky dc6ee4623d apps: machine: update cleanup of rpmsg and virtio devices
update to clean up devices and not just (void)<var>

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-26 16:37:15 -07:00
Ben Levinsky 7be7065db7 apps: update memory management
For each metal_allocate_memory call, make sure there are
subsequent metal_free_memory calls

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-26 16:26:05 -07:00
Ben Levinsky 4d20dcdca5 apps: zynqmp: fix compilation issue from rebase
no-ipi patches seemed to have caused compilation issue. resolve here

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-23 09:14:10 +02:00
Ben Levinsky 3a4fa283ec Add support for MicroBlaze in programmable logic (PL) to OpenAMP.
Add an example of a baremetal echo server running on a MicroBlaze in PL
on a ZynqMP board and using RPMSG (with NO_IPI) to reply to a Linux user
space app running in the PS APU.

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
Signed-off-by: Sergei Korneichuk <sergei.korneichuk@xilinx.com>
Signed-off-by: Ed Mooring <ed.mooring@xilinx.com>
2020-10-21 16:09:55 +02:00
Ben Levinsky 0b696708c0 apps: zynqmp_r5: support for demos without IPI
Update remote(r5) of OpenAMP demos so that it can fully support running
with notification mechanism of IPI and Shared memory with polling

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-20 16:17:30 +02:00
Ben Levinsky e802f4c0ee apps: zynqmp: support for demos without IPI
Update Linux-side of OpenAMP demos so that it can fully support running
with notification mechanism of IPI and Shared memory with polling

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-20 16:17:30 +02:00
Ed Mooring 0257ca5fd8 Add <errno.h> explicitly to all files that use errno values.
When building OpenAMP apps for FreeRTOS on Xilinx hardware, there
were compile errors due to EINVAL not being defined. On other
platforms, <errno.h> was implicitly included by OpenAMP header
files. This change explicitly includes it where it is needed
in the code.

There is one exception, load_fw/commmon.h has <errno.h> added,
since all common include files are placed there.

Signed-off-by: Ed Mooring <ed.mooring@linaro.org>
2020-10-16 14:27:46 +02:00
Arnaud Pouliquen 232dc574de apps: zynqmp:fix indentation
According to coding rules replace spaces by tabs.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-10-12 14:04:55 +02:00
Ben Levinsky b550679383 apps: zynqmp: add switch to run linux demo without IPI
The current implementation presumes the presence of IPI in hardware
design. Add switch on Linux side to enable instead polling of shared
memory if there is no IPI, IRQ, etc. available.

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-06 11:24:38 +02:00
Ben Levinsky 3434576bfe apps: zynqmp_r5: add switch to run r5 demo without IPI
The current implementation presumes the presence of IPI in hardware
design. Add switch to enable instead polling of shared memory if
there is no IPI, IRQ, etc. available.

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2020-10-06 11:24:38 +02:00
Xiang Xiao 347bf7c394 apps: replace all zero address to RPMSG_ADDR_ANY
the example should demo the best practice for the endpoint creation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-29 15:38:29 +02:00
Ed Mooring e9092d396d examples: Remove stray local change from Linux platform_info.c
Fix a compilation error due to a non-existent header file. This
was due to accidentally committing part of an experimental change
to the libmetal shared memory API.

Signed-off-by: Ed Mooring <ed.mooring@linaro.org>
2020-02-20 08:50:01 +01: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
Ben Levinsky 399b92e3a2 apps: zynqmp userspace: update dts shared mem node
Update to match default shared memory configuration.

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2019-03-28 22:38:50 -07:00
Xiang Xiao dd17c5aae0 change all \n to \r\n
make the line ending consistent in the whole project

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-02-26 22:20:02 -08:00
Wendy Liang 51825644da apps: linux generic: update metal irq registration
libmetal updated IRQ registration API, adapt the change
in OpenAMP.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 14:25:41 -08:00
Wendy Liang 9aa9ce076c apps: zynqmp_r5: Initialize metal irq controller
New libmetal IRQ implementation requires to initialize
metal irq controlller.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>

apps: zynqmp_r5: call metal irq init.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 14:25:41 -08:00
Wendy Liang 6ad58fb7b5 apps: zynq7: Initialize metal irq controller
New libmetal IRQ implementation requires to initialize
metal irq controlller.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 14:25:05 -08:00
Wendy Liang 970efb2da4 apps: zynqmp_r5: update irq registration
Update IRQ registration due to libmetal irq API update.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 13:41:48 -08:00
Wendy Liang 3b478e6b2f apps: zynqmp linux: update irq registration
Update IRQ registration due to libmetal irq API update.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 13:41:48 -08:00
Wendy Liang 0c4c6a5317 apps: zynq7: update irq registration
Update IRQ registration due to libmetal irq API update.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 13:41:48 -08:00
Wendy Liang cd01fd9428 tests: flood ping: compare input byte by byte
If the memory is not normal memory, memcmp will not work.
Compare the received buffers byte by byte.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-30 15:52:31 -08:00
Wendy Liang bd9fa8e942 generic: zynq7: Add Xilinx include path detection
Add Xilinx include path detection.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-17 16:01:29 -08:00
Wendy Liang 0882d180e3 generic: zynqmp_r5: Add Xilinx include path detection
Add Xilinx include path detection.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-17 16:01:29 -08:00
Wendy Liang d4b0d23ddc apps: zynq7: remove not supported resources
Remove not supported resources from resource table.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-08 09:13:47 -08:00
Wendy Liang db87879815 apps: zynqmp_r5: use different shared memory based on RPU id
Use different shared memory based on RPU id.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-08 09:13:47 -08:00
Wendy Liang c29479a931 apps: zynqmp_r5: remove kernel not supported resource types
Remove resource types which are not supported by the Linux
kernel from resource table.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-08 09:13:47 -08:00
Wendy Liang c5763fc095 apps: zynq7: check NULL pointer in mmap()
Check if pointer is NULL in mmap() before writing to it.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2018-10-30 15:00:17 -07:00