processor-sdk/open-amp.git
4 years agozynq: fix resource table and linker script for v4.9 kernel
Wendy Liang [Mon, 6 Feb 2017 20:01:02 +0000 (12:01 -0800)]
zynq: fix resource table and linker script for v4.9 kernel

This patch fix the following to make Zynq work with v4.9 kernel
* remove carveout resource, as we do support master to allocate
  firmware memory, instead we need to predefine the firmware memory
  for this platform.
* use proc_mem to declare the remote memory
* fix the linker script not to include the memory for vrings and
  shared buffers.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: driver: zynq: mark notified when enabling interrupt
Wendy Liang [Mon, 6 Feb 2017 19:53:10 +0000 (11:53 -0800)]
remoteproc: driver: zynq: mark notified when enabling interrupt

This patch is a workaround.

The master may already send the notify before the remote boots.
The Zynq platform should be able not get notified by the interrupt
before it is enabled.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: machine: zynqmp_r5: remove carveout resource
Wendy Liang [Mon, 6 Feb 2017 19:34:43 +0000 (11:34 -0800)]
apps: machine: zynqmp_r5: remove carveout resource

carveout resource is used to speicfy memory carved out
from the master. On ZynqMP_r5 platform, for firmware,
the memory is specified in the ELF. And at the moment,
we do not support allocating firmware memory from master
on this platform.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: echo_test: update to allow reset
Wendy Liang [Thu, 26 Jan 2017 18:06:39 +0000 (10:06 -0800)]
apps: echo_test: update to allow reset

Update echo_test to allow reset.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoDelete hil proc in remoteproc only
Wendy Liang [Thu, 26 Jan 2017 06:49:04 +0000 (22:49 -0800)]
Delete hil proc in remoteproc only

do not delete hil proc in rpmsg, instead delete it in remoteproc.
As rpmsg can be decoupled from remoteproc.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add API to set vdev reset callback.
Wendy Liang [Wed, 25 Jan 2017 23:49:32 +0000 (15:49 -0800)]
hil: add API to set vdev reset callback.

Add API to setup vdev reset callback.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add API to enable vdev IPI
Wendy Liang [Wed, 25 Jan 2017 23:33:53 +0000 (15:33 -0800)]
hil: add API to enable vdev IPI

Implement hil_set_vdev_notification to enable vdev IPI.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: rx_callback: do not handle name service.
Wendy Liang [Wed, 25 Jan 2017 23:22:49 +0000 (15:22 -0800)]
rpmsg: rx_callback: do not handle name service.

Remove handling name service from rpmsg rx callback.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp_r5: also set vdev IPI
Wendy Liang [Wed, 25 Jan 2017 23:13:12 +0000 (15:13 -0800)]
apps: zynqmp_r5: also set vdev IPI

As vdev also needs sync on both sides, we also set
vdev IPI.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynqmp_a53: notify vdev when IPI received
Wendy Liang [Wed, 25 Jan 2017 23:10:05 +0000 (15:10 -0800)]
remoteproc: zynqmp_a53: notify vdev when IPI received

If IPI is received, also notify vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynqmp_a53: vdev/vrings share the same IPI
Wendy Liang [Wed, 25 Jan 2017 22:57:15 +0000 (14:57 -0800)]
remoteproc: zynqmp_a53: vdev/vrings share the same IPI

register one IPI interrupt for vdev and vrings.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: drivers: update enable_interrupt()
Wendy Liang [Wed, 25 Jan 2017 22:51:41 +0000 (14:51 -0800)]
remoteproc: drivers: update enable_interrupt()

Update enable_interrupt() for all the drivers to use
new hil proc enable_interrupt API.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: change enable_interupt input arg to proc_intr
Wendy Liang [Wed, 25 Jan 2017 22:19:44 +0000 (14:19 -0800)]
hil: change enable_interupt input arg to proc_intr

It should be able to retrieve the container of proc_intr.
And thus, just pass proc_intr as input arg.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp_r5: replace leading spaces with tabs
Wendy Liang [Wed, 25 Jan 2017 22:10:42 +0000 (14:10 -0800)]
apps: zynqmp_r5: replace leading spaces with tabs

coding style: remove leaading spaces with tabs

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add hil_set_vdev_ipi
Wendy Liang [Wed, 25 Jan 2017 22:02:59 +0000 (14:02 -0800)]
hil: add hil_set_vdev_ipi

Add hil_set_vdev_ipi to set ipi for vdev configs notification.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: machines: replace hil_set_ipi with hil_set_vring_ipi
Wendy Liang [Wed, 25 Jan 2017 21:36:52 +0000 (13:36 -0800)]
apps: machines: replace hil_set_ipi with hil_set_vring_ipi

Sync with hil API changes, replace hil_set_ipi with hil_set_vring_ipi

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: rename hil_set_ipi to hil_set_vring_ipi
Wendy Liang [Wed, 25 Jan 2017 21:30:34 +0000 (13:30 -0800)]
hil: rename hil_set_ipi to hil_set_vring_ipi

Rename hil_set_ipi to hil_set_vring_ipi as it is used to set
the IPI for vrings.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remote_device: notify remote it's resetted in ready().
Wendy Liang [Sat, 28 Jan 2017 01:17:01 +0000 (17:17 -0800)]
rpmsg: remote_device: notify remote it's resetted in ready().

If the firmware has been requested to reset, in _ready() funciton,
notify the remote and set the vdev status to 0.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remote_device: use hil_vdev_notify for remote_dev notify
Wendy Liang [Wed, 25 Jan 2017 07:48:08 +0000 (23:48 -0800)]
rpmsg: remote_device: use hil_vdev_notify for remote_dev notify

The rpmsg remote dev nofication is the vdev notification.
When it is called, the vq may not be ready. Use vdev notification
instead of vq notificataion.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add hil_notified
Wendy Liang [Wed, 25 Jan 2017 06:53:11 +0000 (22:53 -0800)]
hil: add hil_notified

Add hil_notified to handle notification from the remote.
The notification can be vdev notification, or vrings notification.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add proc_vdev reset callback
Wendy Liang [Wed, 25 Jan 2017 06:55:31 +0000 (22:55 -0800)]
hil: add proc_vdev reset callback

Add proc_vdev reset callback.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: use hil_free_vqs to delete virtqueues
Wendy Liang [Tue, 24 Jan 2017 22:45:11 +0000 (14:45 -0800)]
rpmsg: use hil_free_vqs to delete virtqueues

Use hil_free_vqs to delete virtqueues of the specified vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add free vqs for specified vdev
Wendy Liang [Wed, 25 Jan 2017 00:13:28 +0000 (16:13 -0800)]
hil: add free vqs for specified vdev

Add APIs to free vqs for the specified vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add mutex lock to hil_proc
Wendy Liang [Wed, 25 Jan 2017 00:10:28 +0000 (16:10 -0800)]
hil: add mutex lock to hil_proc

Add mutex lock to hil_proc

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: fix spaces in the headers
Wendy Liang [Tue, 24 Jan 2017 22:18:57 +0000 (14:18 -0800)]
hil: fix spaces in the headers

replace heading spaces with tab.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add hil_vdev_notify
Wendy Liang [Tue, 24 Jan 2017 22:11:52 +0000 (14:11 -0800)]
hil: add hil_vdev_notify

Add hil_vdev_notify to notify vdev config changes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: add intr info to proc_vdev
Wendy Liang [Tue, 24 Jan 2017 22:08:07 +0000 (14:08 -0800)]
hil: add intr info to proc_vdev

There should be notification settings for vdev.
Add intr info which stores the notification settings for
vdev.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agovirtio: replace _RESET status with _NEEDS_RESET
Wendy Liang [Tue, 24 Jan 2017 21:53:16 +0000 (13:53 -0800)]
virtio: replace _RESET status with _NEEDS_RESET

There is no _RESET status in virtio, remove it and
add _NEEDS_RESET status.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: remove unused attributes
Wendy Liang [Tue, 24 Jan 2017 21:52:16 +0000 (13:52 -0800)]
hil: remove unused attributes

remove unused attributes from hil_proc struct

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: generic: zynqmp_r5: sync linker script with latest xsdk
Wendy Liang [Tue, 24 Jan 2017 18:57:48 +0000 (10:57 -0800)]
apps: generic: zynqmp_r5: sync linker script with latest xsdk

Update the zynqmp_r5 generic linker script to match with the latest xsdk.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp_r5: add fw_chksum entry to rsc table
Wendy Liang [Tue, 24 Jan 2017 18:36:42 +0000 (10:36 -0800)]
apps: zynqmp_r5: add fw_chksum entry to rsc table

Add firmware checksum resource entry to the resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoapps: zynqmp_r5: add rproc_mem to rsc table
Wendy Liang [Tue, 24 Jan 2017 18:32:20 +0000 (10:32 -0800)]
apps: zynqmp_r5: add rproc_mem to rsc table

Add rproc_mem resource entry to resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: resource table: add fw checksum rsc
Wendy Liang [Wed, 11 Jan 2017 00:14:49 +0000 (16:14 -0800)]
remoteproc: resource table: add fw checksum rsc

Add firmware checksum resource type to resource table.
It can be used for the master to check if the remote runs on
the expected firmware if it is still running before it tries
to boot the remote.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorproc: add rproc_mem resource entry
Wendy Liang [Mon, 23 Jan 2017 19:39:49 +0000 (11:39 -0800)]
rproc: add rproc_mem resource entry

Add fw_rsc_rproc_mem resource entry to tell the host the
remote processor's memory which can be used as shared memory.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remove setting remote dev active from remote dev kick
Wendy Liang [Mon, 16 Jan 2017 06:38:09 +0000 (22:38 -0800)]
rpmsg: remove setting remote dev active from remote dev kick

Move setting the remote device status from remote dev kick function
to the caller. It should be the caller to decide when it is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: start_ipc: only kick the remote if start_ipc from master
Wendy Liang [Mon, 16 Jan 2017 06:03:59 +0000 (22:03 -0800)]
rpmsg: start_ipc: only kick the remote if start_ipc from master

It only needs to kick the remote if it is the master calls
start_ipc after it is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: rdev_init: do not create rpmsg channels before remote is OK
Wendy Liang [Sun, 15 Jan 2017 07:06:42 +0000 (23:06 -0800)]
rpmsg: rdev_init: do not create rpmsg channels before remote is OK

It is the virtio master to allocate the vrings' memories, on the slave
side, it should not create channels before the master driver is OK.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remote_dev: add API to check if remote is ready
Wendy Liang [Tue, 24 Jan 2017 20:00:08 +0000 (12:00 -0800)]
rpmsg: remote_dev: add API to check if remote is ready

Add an API to check if the remote is ready.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorpmsg: remote_device: virio ops: get/set actual vdev status
Wendy Liang [Sun, 15 Jan 2017 07:03:39 +0000 (23:03 -0800)]
rpmsg: remote_device: virio ops: get/set actual vdev status

change get_status and set_status vdev operation to get/set the
actual virtio status from the resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agorsc table: move setting vring info to hil_get_vring_info
Wendy Liang [Fri, 13 Jan 2017 22:43:23 +0000 (14:43 -0800)]
rsc table: move setting vring info to hil_get_vring_info

moving setting vrings info to hil_get_vring_info() because
when resource table is passed the vring information maynot
have been setup yet.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: rsc parser: set vdev_info to proc_vdev
Wendy Liang [Fri, 13 Jan 2017 19:58:58 +0000 (11:58 -0800)]
remoteproc: rsc parser: set vdev_info to proc_vdev

Store the vdev resource pointer to proc_vdev so that it will
be able to get remote update.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agohil: Add vdev_info to proc_vdev struct
Wendy Liang [Fri, 13 Jan 2017 19:50:00 +0000 (11:50 -0800)]
hil: Add vdev_info to proc_vdev struct

Add a field to point to the virtio dev information.
Currently, it will be the pointer to the vdev resource in the
resource table.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynqMP_a53: Do not clear IPI irq when it is probed
Wendy Liang [Fri, 13 Jan 2017 18:53:47 +0000 (10:53 -0800)]
remoteproc: zynqMP_a53: Do not clear IPI irq when it is probed

Do not clear IPI irq when it is probed as it is possible for the other
end has already kicked IPI when it is probed.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agofix install paths to work for multilib
Wendy Liang [Fri, 3 Feb 2017 18:00:29 +0000 (10:00 -0800)]
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>
4 years agorpmsg: change channel state if nameservice is sent
Wendy Liang [Tue, 13 Dec 2016 01:15:56 +0000 (17:15 -0800)]
rpmsg: change channel state if nameservice is sent

Should not blindly change the channel state after
sending the name service message.
because it is possible that name service fails to send.
e.g. it fails to get the buffer to send the name service
message.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUse meta-openamp to build Linux Userspace OpenAMP
Wendy Liang [Mon, 12 Dec 2016 17:48:17 +0000 (09:48 -0800)]
Use meta-openamp to build Linux Userspace OpenAMP

Update instructions to use meta-openamp to build OpenAMP in
Linux userspace.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc: zynq: remove compile warning v2016.10
Sam Sortais [Fri, 4 Nov 2016 01:42:05 +0000 (18:42 -0700)]
remoteproc: zynq: remove compile warning

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoremoteproc: zynq: do not free proc mem in release
Wendy Liang [Thu, 3 Nov 2016 18:51:51 +0000 (11:51 -0700)]
remoteproc: zynq: do not free proc mem in release

As the hil_proc memory is allocated and free in the hil APIs.
We should not free it in the remoteproc driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate README for the OpenAMP on top of libmetal
Wendy Liang [Mon, 17 Oct 2016 21:00:37 +0000 (14:00 -0700)]
Update README for the OpenAMP on top of libmetal

Update the README file for the structure and the compilation basic
instructions for OpenAMP on top of libmetal.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove the system/machine dependent layers
Wendy Liang [Sat, 15 Oct 2016 00:21:07 +0000 (17:21 -0700)]
Remove the system/machine dependent layers

As libmetal provides system/machine dependent metal access functions,
we remove the system/machine dependent layers from OpenAMP.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUse libmetal sleep and timestamp APIs
Wendy Liang [Sat, 15 Oct 2016 00:29:34 +0000 (17:29 -0700)]
Use libmetal sleep and timestamp APIs

Replace the OpenAMP sleep and timestamp APIs with
those provided from libmetal.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove machine specific include directory
Wendy Liang [Fri, 14 Oct 2016 18:31:51 +0000 (11:31 -0700)]
Remove machine specific include directory

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdding RPMsg Extension layer implementing zero-copy send and receive.
Marek Novak (NXA17138) [Wed, 24 Aug 2016 13:12:06 +0000 (15:12 +0200)]
Adding RPMsg Extension layer implementing zero-copy send and receive.

Signed-off-by: Marek Novak <marek.novak@nxp.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate applications RPMsg between processes
Wendy Liang [Mon, 12 Sep 2016 21:46:05 +0000 (14:46 -0700)]
Update applications RPMsg between processes

This patch is to update the application demos to show
the RPMsg between processes

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: zynqmp: Add API to get rsc table
Wendy Liang [Wed, 5 Oct 2016 20:48:25 +0000 (13:48 -0700)]
Apps: zynqmp: Add API to get rsc table

This API is introduced for applications to get the resource table
across different  platforms. For baremetal/RTOS, you don't actually
need this API, but for Linux userspace, it is required as it
can have multiple resource talbes for different remotes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: zynq7: Add API to get rsc table
Wendy Liang [Fri, 30 Sep 2016 21:03:37 +0000 (14:03 -0700)]
Apps: zynq7: Add API to get rsc table

This API is introduced for applications to get the resource table
across different  platforms. For baremetal/RTOS, you don't actually
need this API, but for Linux userspace, it is required as it
can have multiple resource talbes for different remotes.

4 years agoApps: zynqmp_r5: Add API to get rsc table
Wendy Liang [Fri, 30 Sep 2016 20:56:40 +0000 (13:56 -0700)]
Apps: zynqmp_r5: Add API to get rsc table

This API is introduced for applications to get the resource table
across different  platforms. For baremetal/RTOS, you don't actually
need this API, but for Linux userspace, it is required as it
can have multiple resource talbes for different remotes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd Linux application generic initialization
Wendy Liang [Mon, 12 Sep 2016 21:45:22 +0000 (14:45 -0700)]
Add Linux application generic initialization

Add apps common for RPMsg between Linux processes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd Linux remoteproc between two processes
Wendy Liang [Mon, 12 Sep 2016 21:44:12 +0000 (14:44 -0700)]
Add Linux remoteproc between two processes

Introduce a remoteproc driver for the RPMsg between
two Linux processes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate demo apps to use new HIL proc APIs
Wendy Liang [Thu, 22 Sep 2016 06:36:59 +0000 (23:36 -0700)]
Update demo apps to use new HIL proc APIs

As the hil_proc init APIs has been changed, the applications OpenAMP
initialization needs to update to use the new APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoNot use remoteproc_plat in Zynq7 BM apps helpers
Wendy Liang [Fri, 23 Sep 2016 22:35:53 +0000 (15:35 -0700)]
Not use remoteproc_plat in Zynq7 BM apps helpers

As remoteproc_plat has been removed, update the Zynq7 baremetal apps
helper functions not to use those APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove remoteproc_plat from Zynq remoteproc driver
Wendy Liang [Fri, 23 Sep 2016 23:02:54 +0000 (16:02 -0700)]
Remove remoteproc_plat from Zynq remoteproc driver

As remoteproc_plat has been removed, update the Zynq
baremetal/RTOS driver to remove using remoteproc_plat.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoNot use remoteproc_plat in ZynqMP apps helper functions
Wendy Liang [Thu, 22 Sep 2016 06:34:36 +0000 (23:34 -0700)]
Not use remoteproc_plat in ZynqMP apps helper functions

As remoteproc_plat has been removed, update the ZynqMP Linux
userspace apps helper functions not to use those APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove remoteproc_plat in ZynqMP rproc driver
Wendy Liang [Thu, 22 Sep 2016 06:33:00 +0000 (23:33 -0700)]
Remove remoteproc_plat in ZynqMP rproc driver

As remoteproc_plat has been removed, update the remoteproc driver
not to use that APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoNot use remoteproc_plat in ZynqMP R5 apps helpers
Wendy Liang [Thu, 22 Sep 2016 06:29:35 +0000 (23:29 -0700)]
Not use remoteproc_plat in ZynqMP R5 apps helpers

As remoteproc_plat has been removed, update the ZynqMP R5 apps
helper functions not to use those APIs.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove remoteproc_plat from ZynqMP R5 rproc driver
Wendy Liang [Thu, 22 Sep 2016 06:25:41 +0000 (23:25 -0700)]
Remove remoteproc_plat from ZynqMP R5 rproc driver

As remoteproc_plat has been removed, update the driver not
to use that driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoupdate hil_proc not to add new user data struct
Wendy Liang [Thu, 22 Sep 2016 06:24:48 +0000 (23:24 -0700)]
update hil_proc not to add new user data struct

This patch is to:
* hide hil_proc data struct details from user
* not to introduce new data structure for user to understand

Here is the new flow:
For RPMsg slave:
* proc = hil_create_proc(<hil_proc_ops>)
* hil_set_rpmsg_channel()
* hil_set_ipi()
* remoteproc_resource_init(<rsc_tabl>,<hil_proc>, ...)

For RPMsg master:
* proc = hil_create_proc(<hil_proc_ops>)
* hil_set_rpmsg_channel()
* hil_set_shm()
* hil_set_ipi()
* remoteproc_resource_init(<rsc_tabl>,<hil_proc>, ...)

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoIntroduce openamp_print
Wendy Liang [Thu, 1 Sep 2016 18:28:36 +0000 (11:28 -0700)]
Introduce openamp_print

Add openamp_print() instead of directly using printf for
printing in OpenAMP repo.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: update zynqmp example
Wendy Liang [Thu, 1 Sep 2016 22:28:02 +0000 (15:28 -0700)]
Apps: update zynqmp example

Update the ZynqMP example to move the firmware run on
TCM instead of OCM.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: move linux helper to linux/machine
Wendy Liang [Thu, 1 Sep 2016 22:26:33 +0000 (15:26 -0700)]
Apps: move linux helper to linux/machine

As the application initialization is system dependent,
move the helper.c which for the system initialization
to linux/machine.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd DTSI example to OpenAMP in Linux userspace
Wendy Liang [Fri, 26 Aug 2016 22:56:39 +0000 (15:56 -0700)]
Add DTSI example to OpenAMP in Linux userspace

Add the DTSI example to OpenAMP in Linux userspace.
The example is for Xilinx Zynq Ultrascale+ MPSoC.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agozynq_remoteproc: solve the atomic warning
Wendy Liang [Fri, 19 Aug 2016 16:46:11 +0000 (09:46 -0700)]
zynq_remoteproc: solve the atomic warning

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoadd option to exclude dependency check
Sam Sortais [Mon, 22 Aug 2016 17:37:36 +0000 (10:37 -0700)]
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>
4 years agoadd explicit include to errno.h
Sam Sortais [Fri, 19 Aug 2016 05:32:30 +0000 (22:32 -0700)]
add explicit include to errno.h

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoadd freertos env
Sam Sortais [Thu, 18 Aug 2016 11:10:11 +0000 (04:10 -0700)]
add freertos env

env_sleep_msec is needed by openamp lib.
this will eventually disapear when moved to libmetal.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agomatrix_multiplyd clarify main loop
Sam Sortais [Thu, 18 Aug 2016 09:22:45 +0000 (02:22 -0700)]
matrix_multiplyd clarify main loop

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agorpc_demo code cleanup
Sam Sortais [Thu, 18 Aug 2016 07:12:37 +0000 (00:12 -0700)]
rpc_demo code cleanup

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoecho_testd simplify main loop
Sam Sortais [Thu, 18 Aug 2016 04:35:44 +0000 (21:35 -0700)]
echo_testd simplify main loop

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agocleanup: const definition, unused includes,...
Sam Sortais [Thu, 18 Aug 2016 00:46:28 +0000 (17:46 -0700)]
cleanup: const definition, unused includes,...

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
4 years agoCMake: generic: ZynqMP R5: udpate to use libxil, libmetal
Wendy Liang [Tue, 16 Aug 2016 05:31:23 +0000 (22:31 -0700)]
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>
4 years agoCMake: Zynq: generic: update to use xil,metal lib
Wendy Liang [Tue, 16 Aug 2016 05:24:17 +0000 (22:24 -0700)]
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>
4 years agoApps: Remove the need to have old Zynq includes
Wendy Liang [Tue, 16 Aug 2016 05:09:46 +0000 (22:09 -0700)]
Apps: Remove the need to have old Zynq includes

Remove the need to have old Zynq include headers.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: CMake: allow system machine linker option
Wendy Liang [Tue, 16 Aug 2016 04:59:47 +0000 (21:59 -0700)]
Apps: CMake: allow system machine linker option

Allow to specify system/machine specific linker option.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: ZynqMP R5: specify full linker script option
Wendy Liang [Tue, 16 Aug 2016 04:48:39 +0000 (21:48 -0700)]
Apps: ZynqMP R5: specify full linker script option

Instead of just specifying the linker script, specify the
system machine specific linker option.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoApps: Zynq: Update to use libmetal I/O and device
Wendy Liang [Tue, 16 Aug 2016 04:47:29 +0000 (21:47 -0700)]
Apps: Zynq: Update to use libmetal I/O and device

Update Zynq generic system implementation to use libmetal I/O and
device APIs

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove Zynq7 generic system implementation
Wendy Liang [Tue, 16 Aug 2016 04:19:59 +0000 (21:19 -0700)]
Remove Zynq7 generic system implementation

As the Zynq7 generic system implementation is covered by libmetal,
removed the implementation in the OpenAMP repo.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoZynq remoteproc: update to use libmetal APIs
Wendy Liang [Tue, 16 Aug 2016 04:06:22 +0000 (21:06 -0700)]
Zynq remoteproc: update to use libmetal APIs

Update the Zynq remoteproc driver to user libmetal I/O region
for IPI, and implement the hil_proc poll() for application to
poll if virings are notified.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoRemove ZynqMP R5 system/machine specific files
Wendy Liang [Mon, 15 Aug 2016 23:30:54 +0000 (16:30 -0700)]
Remove ZynqMP R5 system/machine specific files

Remove ZynqMP R5 system/machine specific files
as they are no longer required.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoUpdate CMake files to compile OpenAMP for Linux
Wendy Liang [Mon, 15 Aug 2016 22:49:54 +0000 (15:49 -0700)]
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>
4 years agoApps: Add Linux and ZynqMP layer
Wendy Liang [Mon, 15 Aug 2016 22:47:07 +0000 (15:47 -0700)]
Apps: Add Linux and ZynqMP layer

Add the Linux system and ZynqMP layer to do the ZynqMP
Linux system specific initialization.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd Linux env
Wendy Liang [Mon, 15 Aug 2016 22:45:07 +0000 (15:45 -0700)]
Add Linux env

this is to add the OpenAMO Linux evnvironment layer.
This is a temporary workaround as the sleep and timestamp is not
implemented in the libmetal yet.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd proxy deamon service demo application
Wendy Liang [Mon, 15 Aug 2016 22:42:46 +0000 (15:42 -0700)]
Add proxy deamon service demo application

This application will listen the proxy RPMsg
endpoint, it will implement the file operations
specified in the RPMsg.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd matrix multiplication client demo application
Wendy Liang [Mon, 15 Aug 2016 22:39:56 +0000 (15:39 -0700)]
Add matrix multiplication client demo application

This application is to generate random 6*6 matrices, send them
to the remote, and wait for the result, and then it will check
if the result is as expected.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd echo_test client demo applicaiton
Wendy Liang [Mon, 15 Aug 2016 22:35:29 +0000 (15:35 -0700)]
Add echo_test client demo applicaiton

This application is to send message to the other end
and wait for the other end to send it back and check if
the message echoed back is the same as expected.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoAdd zynqMP APU to RPU remoteproc driver
Wendy Liang [Mon, 15 Aug 2016 22:32:30 +0000 (15:32 -0700)]
Add zynqMP APU to RPU remoteproc driver

This driver is used to trigger IPI if application has
a message to send, or for applicaiton to morning the IPI
and vrings to see if there was message sent from the RPU
is available.

It polls the IPI ISR to see if the other side kicks the APU.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoenv: introduce OpenAMP debug
Wendy Liang [Mon, 15 Aug 2016 22:28:21 +0000 (15:28 -0700)]
env: introduce OpenAMP debug

If OPENAMP_DEBUG is defined, enable to use openamp_dbg
to print debugging messages.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoOpenAMP: env: remove unused env funcitons
Wendy Liang [Mon, 15 Aug 2016 22:03:05 +0000 (15:03 -0700)]
OpenAMP: env: remove unused env funcitons

Remove the following env functions which have been replaced
by the libmetal functions:
 * locking
 * va to pa conversion and vice versa
 * interrupt handling

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoReplace alloc/free memory with the libmetal APIs
Wendy Liang [Fri, 12 Aug 2016 21:55:59 +0000 (14:55 -0700)]
Replace alloc/free memory with the libmetal APIs

Replace:
 * env_allocate_memory with metal_allocate_memory
 * env_free_memory with metal_free_memory

4 years agoremoteproc: r5 to a53: remove shm mem map
Wendy Liang [Fri, 12 Aug 2016 17:44:41 +0000 (10:44 -0700)]
remoteproc: r5 to a53: remove shm mem map

As the Cortex R5 to A53 remoteproc calls the remoteproc platform
for initialization, the shared memory mapping is done in the
remoteproc platform, remove the duplication from this remoteproc
driver.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
4 years agoremoteproc plat: init shmem if required
Wendy Liang [Fri, 12 Aug 2016 17:41:07 +0000 (10:41 -0700)]
remoteproc plat: init shmem if required

memory map the shared memory if shared memory is provided.

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