Remove all remaining instances of "# vim: ..." in files.
This vim settings were part of the initial commit. But no reason
to keep them.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Use atomic_flag type and the GCC __sync built-in functions for atomic
memory access. Initialize using ATOMIC_FLAG_INIT as a compound literal
or a cast if scalar type depending on which atomic.h is used.
The Linux client clears shared memory in ipi_shmem_echo().
Do not clear it again from the RPU in ipi_shmem_echod() to avoid a race.
Signed-off-by: Sergei Korneichuk <sergei.korneichuk@amd.com>
Declare PROJECT_EC_FLAGS to be a global property
to simplify code for target_compile_options.
Signed-off-by: Sergei Korneichuk <sergei.korneichuk@amd.com>
Modify all the libmetal exemples and tests file to include <metal/errno.h>
instead of <errno.h>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
In v2019.1, the xilmem and xilstandalone libraries were removed from
the standalone Xilinx BSP for the R5. This change adds a CMake
variable, XILINX_PRE_V2019, to conditionally add these libraries
to the link command for use with older BSPs.
Signed-off-by: Ed Mooring <ed.mooring@linaro.org>
Inclusion of error.h in example shmem_throughput_demo.c leads to
build failure when using musl instead of glibc as C library.
The file does not use any error.h specific functions, only the
error codes which are defined in errno.h. So the include can be
changed to errno.h.
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
As libmetal library has changed not to enable interrupts during
handler registration, application will need to enable the IRQs
after registration and disable IRQs before unregistration.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
Use libmetal Xilinx IRQ controller for interrupt handling.
Libmetal abstracts interrupt controller imlementation.
Different platform can have their own interrupt controller
impelementation. There is Xilinx IRQ controller libmetal
implementation to work with Xilinx provided standalone
IRQ controller driver. The example makes use of this
libmetal Xilinx IRQ controller implementation.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
As libmetal library has changed not to enable interrupts during
handler registration, application will need to enable the IRQs
after registration and disable IRQs before unregistration.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
Use libmetal Xilinx IRQ controller for interrupt handling.
Libmetal abstracts interrupt controller imlementation.
Different platform can have their own interrupt controller
impelementation. There is Xilinx IRQ controller libmetal
implementation to work with Xilinx provided standalone
IRQ controller driver. The example makes use of this
libmetal Xilinx IRQ controller implementation.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
With updated IRQ APIs, enable the IRQs after registration as
the IRQ registration will not enable the IRQs.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
As IRQ registration is updated to only allow single handler
per IRQ, examples are updated to use the new APIs.
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
This change will save compilation time from looking into the directory
containing the current file for the header files.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
There were three types of license text in some files in examples/
and test/. This patch is to clean those license text and only use
BSD license text.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Have FreeRTOS structure def represented as with generic.
Keep FreeRTOS interrupt controller var extern (def by FreeRTOS).
Fix comments.
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
Increase heap size in linker script for ZynqMP R5 generic firmware
as if use -O0 for compilation, it looks like it needs more
heap size, the root cause is still under investigation.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Remove the duplicated bus registration in the example's sys_init.c
as it is already registered in the libmetal generic initialization.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
set ddr origin so that it would not overlap with shared mem region.
this is only useful if firmware is relocated from tcm to ddr.
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
without "static inline", "inline" will be free for compiler
to choose if it is inline definition or generate external
reference. It can cause issues if default optimisation is used.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
Integrate the following tasks into generic and linux demo:
- shared memory
- ipi with shared memory
- shared memory with atomics
- ipi latency
- shared memory latency
- shared memory throughput
Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>