Commit Graph

61 Commits

Author SHA1 Message Date
Ben Levinsky
5c36d6b9c1 examples: xlnx: Change machine name to be SOC agnostic
Match examples to lib CMake machine name change

Signed-off-by: Ben Levinsky <ben.levinsky@amd.com>
2024-08-15 06:55:16 -04:00
Arnaud Pouliquen
9fe00e0582 Remove vim editor configuration in files
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>
2023-10-17 09:02:59 +02:00
Sergei Korneichuk
a48ec036fd examples: use atomic_flag type, __sync functions
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>
2022-12-13 09:39:33 +01:00
Sergei Korneichuk
d077e286a4 cmake: set PROJECT_EC_FLAGS to be GLOBAL property
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>
2022-10-03 16:55:01 +02:00
Luz Paz
210b9ec37a Fix various typos
Found via `codespell -q 3 -S ./scripts/spelling.txt`

Signed-off-by: luz paz <luzpaz@users.noreply.github.com>
2022-01-04 10:05:40 +01:00
Arnaud Pouliquen
75e36524f6 Update exemple and tests to include metal/errno.h
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>
2020-12-10 16:49:59 +01:00
Ed Mooring
b077d0d308 Xilinx: Make xilmem and xilstandalone library linkage conditional.
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>
2020-10-21 16:10:12 +02:00
Simon Leiner
5cae751afe Use metal_asm instead of asm and __asm__
This enables GCC compilation in strict mode (-std=c11 -pedantic)

Signed-off-by: Simon Leiner <simon@leiner.me>
2020-09-07 10:25:35 +02:00
Jörg Hofrichter
edb1c31155 examples: fixed include to make libmetal compile with TCLIBC=musl
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>
2019-06-30 00:14:40 -07:00
Wendy Liang
f9094f1f79 zynqmp_r5: Update required xilinx libraries
Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-03-07 02:18:58 -06:00
Wendy Liang
7682d007aa examples: freertos: zynqmp_r5: remove dev from irq registration
Remove metal device from IRQ registration.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 09:57:35 -08:00
Wendy Liang
df1fcd465e examples: generic: zynqmp_r5: remove dev from irq registration
Remove metal device from IRQ registration.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 09:57:35 -08:00
Wendy Liang
754fa007c3 examples: linux: remove dev from irq registration
Remove metal device argument from IRQ registration.

Signed-off-by: Wendy Liang <wendy.liang@xilinx.com>
2019-01-31 09:57:35 -08:00
Wendy Liang
58bd171600 examples: freertos: zynqmp_r5: use metal_irq_enable/disable APIs
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>
2019-01-31 09:57:35 -08:00
Wendy Liang
7836bf6b4e examples: freertos: zynqmp_r5: use metal Xilinx IRQ controller
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>
2019-01-31 09:57:35 -08:00
Wendy Liang
1b95b4574e examples: zynqmp_r5: use metal_irq_enable/disable APIs
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>
2019-01-31 09:57:34 -08:00
Wendy Liang
0fdf48b695 examples: zynqmp_r5: use metal Xilinx IRQ controller
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>
2019-01-31 09:57:34 -08:00
Wendy Liang
6459e9b4b1 examples: linux: Enable IRQ after registration
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>
2019-01-31 09:57:34 -08:00
Wendy Liang
b097639c03 examples: use updated IRQ registration APIs
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>
2019-01-30 10:46:37 -08:00
Wendy Liang
9c52a8ba50 demo: zynqmp_r5: include xil_printf header
Explicitly include xil_printf for printing.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2018-11-11 23:58:20 -08:00
Wendy Liang
9520117eee Covert license text to use SPDX tags
Replace the license text with SPDX tags

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2018-04-09 23:51:01 -07:00
Wendy Liang
a7b357357b change metal include from "metal/xxx.h" to <metal/xxx.h>
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>
2017-12-13 22:34:01 -08:00
Sam Sortais
b33a92fdfa Linux: demo use new irq_unregister
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-12-06 15:24:10 -08:00
Sam Sortais
b7838a03d4 FreeRTOS zynqmp_r5: demo use new irq_unregister
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-12-06 15:24:10 -08:00
Sam Sortais
2578937d98 generic zynqmp_r5: demo use new irq_unregister
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-12-06 15:24:09 -08:00
Wendy Liang
106f5b516c Clean up license text in examples/ and test/
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>
2017-11-28 15:35:24 -08:00
Sam Sortais
e591c5faee sync generic and freertos code
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>
2017-08-13 23:01:45 -07:00
Sam Sortais
910e1af68f examples: remove unneeded #define
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-08-11 14:53:32 -07:00
Sam Sortais
8980919625 common.h: fix some typos
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-08-11 14:52:04 -07:00
Wendy Liang
524114aea6 examples: non-Linux: comment on metal device static definition
Add comments on why we define metal devices statically on non
Linux system.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-08-11 14:51:31 -07:00
Ben Levinsky
d301a1b496 examples: sys_init.c: comment register platform devices
Add comments to platform_register_metal_device()

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-08-10 17:19:15 -07:00
Wendy Liang
136584a264 examples: shmem throughput: used fixed total data size
Measure the throughput of fixed total data size with different
package sizes.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-08-10 17:19:10 -07:00
Wendy Liang
1e8a366321 examples: common: fix the TTC counter offset macro
Fix the TTC counter offset macro

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-08-10 10:45:53 -07:00
Wendy Liang
68169e1148 example: latency: replace shmem size with package size in result output
Replace "shmem size" with "package size" in the measurement result
output.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-08-10 10:42:48 -07:00
Wendy Liang
b6ef36c6af example: linux: zynqmp: rm stopping RPU timer in irq hd in shmem throughput
Do not stop RPU timer in the interrupt handler in the shared memory
throughput measurement.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-08-08 14:52:46 -07:00
Wendy Liang
0176d51561 exmaples: zynqmp_r5: increase heap size
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>
2017-08-08 14:52:46 -07:00
Wendy Liang
ce8b2411b7 examples: zynqmp_r5: remove duplicated generic bus registration.
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>
2017-08-08 14:52:46 -07:00
Wendy Liang
f578674f87 examples: Allow user to use CMAKE_LIBRARY_PATH to for xil lib
Allow user to use CMAKE_LIBRARY_PATH to get xil library.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-07-31 15:07:21 -07:00
Sam Sortais
ec0101ca9c examples: port to FreeRTOS
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-07-28 09:16:15 -07:00
Sam Sortais
35c30ddfa8 examples: update generic lscript
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>
2017-07-28 09:16:15 -07:00
Wendy Liang
12615ed83c examples: add static to inline function
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>
2017-07-28 12:59:34 -07:00
Wendy Liang
8e85b55e56 examples: cleanup Zynq MP SoC AMP examples
Clean up the following Zynq MP SoC AMP examples:
* shared memory demo
* atomic operation over shared memory demo
* shared memory with IPI demo
* IPI latency measurement demo
* shared memory with IPI latency measurement demo
* shared memory with IPI throughput measurement demo

Signed-off-by: Wendy Liang <jliang@xilinx.com>
2017-07-26 23:47:05 -07:00
Ben Levinsky
02a06468cd demo: Integrate new tasks into demo
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>
2017-07-25 23:49:12 -07:00
Ben Levinsky
77b2e80410 demo: Add shared mem throughput task
Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2017-07-25 23:49:12 -07:00
Ben Levinsky
2402662a2b demo: add latency tasks
Measure latency for IPI and shared memory

Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2017-07-25 23:49:12 -07:00
Ben Levinsky
b150dce911 demo: add shared memory demo
Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2017-07-25 23:49:12 -07:00
Ben Levinsky
a6c5c827e1 demo: move existing demoes to new files
Signed-off-by: Ben Levinsky <ben.levinsky@xilinx.com>
2017-07-25 23:49:12 -07:00
Sam Sortais
591ccb5c8a libmetal_demo: cmake, add PROJECT_EC_FLAGS
Add option for user to provide additional ecf from command line.

Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-07-14 11:08:08 -07:00
Sam Sortais
6b697b77a3 demo: generic - rm unnecessary lines in cmake files
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-06-12 17:39:34 -07:00
Sam Sortais
fccc9fa8f8 demo: freertos - merge upstream changes
Signed-off-by: Sam Sortais <sam.sortais@xilinx.com>
2017-06-12 17:39:34 -07:00