801 Commits

Author SHA1 Message Date
Arnaud Pouliquen
1812f55a1f gitlint: add giltlint configuration files
Add gitlint configuration to allow contributor to check its
commit message compliance before sending its pull request.
The configuration files has been copied from Zephyr project.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
v2020.04.0
2020-04-27 09:42:27 +02:00
Arnaud Pouliquen
4cc431ab4d readme: Add a how to contribute chapter
Waiting the wiki, add a chapter to inform how to contribute.
this chapter is inspired from zephyr documentation.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-27 09:31:59 +02:00
Arnaud Pouliquen
95bfbb931a Readme: update reference to the wiki
Provide direct link to the wiki page
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-27 09:31:59 +02:00
Arnaud Pouliquen
ae68500aec readme: change the address of the mailing list
The address of the mailing list is now openamp-rp@lists.openampproject.org
The google group is no more used.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-27 09:31:59 +02:00
Arnaud Pouliquen
8def90cda2 readme: update zephyr example chapter
As zephyr has is own fork of the lib, refer to it.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-27 09:31:59 +02:00
Arnaud Pouliquen
405a11656a readme: add cmake options description
Add the list of the cmake options with a short description

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-27 09:31:59 +02:00
Arnaud Pouliquen
ec70949dc8 readme: fix the source structure
The OpenAMP source structure is no more up to date. fix it.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-27 09:31:59 +02:00
Ed Mooring
078ba09552 mainteners: change mailing list address
Change the email address for patches to the OpenAMP Project mailing list.

Signed-off-by: Ed Mooring <ed.mooring@xilinx.com>
2020-04-23 10:05: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
Arnaud Pouliquen
75a6520fe8 Create CI checkpatch test using github workflow
Create a first checkpatch test for continuous integration
this job runs the checkpatch action from
https://github.com/webispy/checkpatch-action

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-20 14:15:39 +02:00
Arnaud Pouliquen
687bd9e924 lib: fix COMPARISON_TO_NULL reported by checkpatch
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>
2020-04-08 17:06:50 +02:00
Arnaud Pouliquen
ef7cf424a8 virtio: fix virtqueue callback typedef
Fix declaration of the the function pointer type reported
by checkpatch tool.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-08 17:06:50 +02:00
Arnaud Pouliquen
b8bc3b7122 lib: fix minor coding style.
Fix coding style reported by do_checkpatch.sh

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-08 17:06:50 +02:00
Arnaud Pouliquen
c7678f5adc scripts: add checkpatch tool
Initial version of checkpatch tool cloned from zephyr project.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-04-08 17:06:50 +02:00
Marti Bolivar
2af66b5358 cmake: fix zephyr library abstraction violation
All that the zephyr_library_named(foo) function guarantees is that
after calling it, the variable ${ZEPHYR_CURRENT_LIBRARY} evaluates to
the target name for the library named foo. In particular, it does not
guarantee that the name of the target is also foo, which the open-amp
build system currently assumes.

(It happens to be true right now, but it's an abstraction violation.)

Fix things by using the ZEPHYR_CURRENT_LIBRARY and one of its helpers.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2020-03-30 09:49:00 +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
Gaute Nilsson
bc8b2c5e8f rpmsg: pack the vring_desc and vring_avail structs
This is done in order to avoid a compiler warning from
the -Wcast-align flag.

Signed-off-by: Gaute Nilsson <gaute.nilsson@siemens.com>
2020-02-20 08:53:10 +01: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
Arnaud Pouliquen
80ad0aa698 rpmsg: don't return error when no more buffer available but wait
If no buffer is available _rpmsg_virtio_get_buffer_size returns 0.
in this case "size > avail_size" is true so we leave the function
without waiting buffer release. Patch consists in ignoring the
test if avail_size is null.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-02-20 08:45:57 +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>
v2020.01.0
2020-01-31 09:19:40 +01:00
Arnaud Pouliquen
f98eb2a670 Maintainers: update Ed Mooring mail address
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-24 14:16:34 +01:00
Arnaud Pouliquen
fc54956a5f proxy: fix IAR C-STAT tool reports
Fix errors returned by C-STAT tool:
rpmsg_retarget.c
 - L136: dead cpde found
 - L185: Expression `payload_size' may overflow

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-16 15:00:31 +01:00
Arnaud Pouliquen
69c0b698ce rpmsg: fix IAR C-STAT tool reports
Fix errors returned by C-STAT tool:
rpmsg_virtio.c(L347) Variable `idx'and `buff_len' may be
uninitialized

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-16 15:00:31 +01:00
Arnaud Pouliquen
a1701c474e remoteproc: fix IAR C-STAT tool reports
Fix errors returned by fix IAR C-STAT tool:
elf_loader.c:
 - L374	Variable `phdr' may be uninitialized
 - L469 (and some others) Expression may overflow
remoteproc.c:
 - L43: Overrun in strncmp with string `mem->name'. Length passed
   to strncmp is 32, but string is of length <unknown size>
 - L185: Variable `ret' may be uninitialized
 - L498 & L696: Value assigned to variable `ret' is never used

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-16 15:00:31 +01:00
Arnaud Pouliquen
cb8b252807 remoteproc: fix resource table reserved field test
Fix the incorrect test. Both reserved words must be null.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-16 15:00:31 +01:00
Arnaud Pouliquen
bd6b5e1ccc virtio: fix compilation warnings
Compilation warnings are generated when VIRTIO_MASTER_ONLY or
VIRTIO_SLAVE_ONLY is set.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-16 15:00:31 +01:00
Arnaud Pouliquen
67699aec3f Maintainers: update project maintainers
Add Arnaud and Ed as project maintainers
Add Ed as Xilinx platform maintainer

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
2020-01-12 22:47:57 -08:00
mizmar
2be6a0fcbf Remove nested structs in header
Nested structs and unions have different visibility rules in C and C++.
Fixes !178
2019-09-20 14:07:34 -07:00
Wendy Liang
e558ab30f5 docs: delete obsolete document
The openamp_ref.pdf is not updated to the current implementation.
Remove it.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-05-24 22:24:58 -07:00
Xiang Xiao
6cf7cdcd7b remoteproc_config shouldn't fail if config callback is NULL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-04-04 22:11:37 -07:00
ligd
e2c9feaf75 openamp: fix remoteproc_load hasn't update rsc_io
Signed-off-by: ligd <liguiding@pinecone.net>
2019-04-04 22:11:37 -07: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
Ulf Magnusson
4824348ef9 scripts: gen-graph: Remove unused Digraph import
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-20 21:16:13 -05:00
Ulf Magnusson
4443e16767 docs: gen-graph: Fix broken typo'd sys.exit()
s/exist/exit/

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-20 17:09:37 -05:00
Xiang Xiao
e1af16302c assert only when status < 0 in rpmsg_virtio_rx_callback
since the successful return value from many function is greater than zero

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-03-09 23:09:24 -08:00
Xiang Xiao
83f2b72a03 shouldn't send RPMSG_NS_DESTROY if endpoint name is empty
and support rpmsg_create_ept with name == NULL

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-03-02 22:51:15 -08:00
Xiang Xiao
66cf86da8b check VIRTIO_RPMSG_F_NS before send the namespace message
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-03-02 22:51:15 -08: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
Xiang Xiao
95b833d0e9 remove the unnecessary cast
to make the code a little bit clearer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-02-26 22:20:02 -08:00
Xiang Xiao
5b889c7028 fix the comment and sytle error
remove the unused macro and typedef

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-02-26 22:20:01 -08:00
Xiang Xiao
f1e8ada1ba refine the type to avoid the cast
to make the code a little bit clearer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-02-26 22:20:01 -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
0798f22ed2 rpmsg: virtio: fix get buffer size return
If the length in buffer descriptor is 0 or less then the
RPMsg header, return 0.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-30 15:51:40 -08:00
Xiang Xiao
536494cd3c remove the invalid cache work around
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2019-01-30 13:55:47 -08:00