Declare sys_irq_enable() and sys_irq_enable() directly in
lib/system/@PROJECT_SYSTEM@/sys.h.
This allows to declare the machine out of tree of the libmetal but
also to support the in-tree template.
[minor style fix by tanmay]
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
libmetal can be build without any machine support. It is possible that
vendors implement machine specific interfaces outside of libmetal and
link it with demos during build time. Hence, remove requirement to have
MACHINE and PROJECT_MACHINE variables from the build system. If vendor
prefer to choose 'template' machine, they can pass such option during
cmake configuration.
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
The board "qemu_xtensa" has been renamed to "qemu_xtensa/dc233c" and
deprecated in the Zephyr commit:
84c12ab5b5
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
To avoid the crash when lock are acquired twice, one case is in the
destory process:
we hold the rpdev->lock to iterate the rpdev->endpoints to destory all
the endpoints, but rpmsg_destroy_ept() may send the name service message,
and need acquire the rpdev->lock again to lead crash.
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
- bump to Zephyr 4.3
- use `west packages pip --install`
- use "west sdk install" command to install the expected sdk version.
- only install compilers used for CI tests.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
To-be-expanded suite of tests for libmetal using
system-agnostic API instead of system specific tests.
Signed-off-by: Lefteris Ntafotis <lntaf@ics.forth.gr>
metal_run has been renamed to metal_test_run
metal_run_noblock has been renamed to metal_test_run_noblock
metal_finish_threads has been renamed to metal_test_finish_threads
Signed-off-by: Lefteris Ntafotis <lntaf@ics.forth.gr>
The template machine is used in:
cmake/platforms/template-generic.cmake
cmake/platforms/template-freertos.cmake
This reverts a part of:
commit 16493b179f ("lib: system: remove xlnx BSP specific code")
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Remove the related @return field from the documentation for functions
that do not return a value.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
clock_systime_timespec() always returns 0, so there is no need to
check the return value in the caller code, let us remove the return
value directly.
From:
int clock_systime_timespec(FAR struct timespec *ts)
To:
void clock_systime_timespec(FAR struct timespec *ts)
Fix build break:
libmetal/lib/system/nuttx/time.c: In function ‘metal_get_timestamp’:
libmetal/lib/system/nuttx/time.c:21:11:
error: void value not ignored as it ought to be
21 | r = clock_systime_timespec(&tp);
| ^
make[1]: *** [Makefile:46: libmetal/lib/system/nuttx/time.o] Error 1
Signed-off-by: chao an <anchao.archer@bytedance.com>
libmetal is abstraction layer and vendor specific code should not be
maintained as part of libmetal. Instead common interfaces provided by
libmetal should be implemented by vendor BSP in downstream repos.
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
As the code path suggests, the pointer, ldev, at this point, can be
free'd directly w/o a check. Remove the redundant check.
Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com>
In the function prologue, "ldev" has already been assigned a malloc'd
address, and a check has also been performed. Remove this redundant
pointer validness check during each iteration. The second check was
also inherently misplaced because the it was not enclosed in the malloc
if-branch.
Signed-off-by: Fox Feng <foxhoundsk.tw@gmail.com>
Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com>
For consumers who don't want to install libmetal it's more convenient to use
the CMake targets metal-static or metal-shared. However, they currently don't
bring the necessary include directories (In contrast to the Zephyr version
where the include directories are already exported via
`zephyr_include_directories(...)`
Signed-off-by: Adel El-Rayyes <aelray@gmail.com>
Most of the system specific log.h files are empty, and those that
are not are only used by the internal log handling functions.
Remove the empty ones and do not expose the contents of the
internal ones outside of the compilation unit that uses them.
Signed-off-by: Andrew Davis <afd@ti.com>
Many of the system specific irq.h files are empty, and those that
are not are only used by the internal IRQ handling functions.
Remove the empty ones and do not expose the contents of the
internal ones outside of the compilation unit that uses them.
Signed-off-by: Andrew Davis <afd@ti.com>
Do not rely on indirect includes since they may not be present on some
systems.
Signed-off-by: Vincenzo Calabretta <vincenzo.calabretta@embedded-brains.de>
in order to use the sphinx breathe plugin in the OpenAMP/openamp-docs
repository we need to enable xml generation
Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
To allow for external links to doxygen generated content, tell doxygen
to build tags, so the tag file can be used for cross referencing
doxygen generated data.
Signed-off-by: Sipke Vriend <sipke@direktembedded.com>
We currently support an old version of CMake (3.0.2) that was released
in 2018.
This requires adding specific policies to support the evolution to the
latest versions of Zephyr.
Update the minimum version to 3.16. The reason for this version is to
support environments such as Debian Bullseye that are still in LTS state.
By updating to CMake 3.16 as the minimum version, we can also clean up
the following policy add-ons:
- CMP0048 added in CMake v3.0
- CMP0053 added in CMake v3.1
- CMP0077 added in CMake v3.13
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Upstream Read The Docs has tightened up the schema checking and this broke
what we were doing for PRs.
A good number of things were tried but the best compromise is to:
* supply a dummy sphinx config file in this repo
* override the default build command to use the openamp-docs dir
Also:
* add more documentation about what is going on
* lock to html only format. PRs only do html anyway but make sure
Signed-off-by: Bill Mills <bill.mills@linaro.org>
In metal_sys_io_mem_map() if the I/O region size
is a multiple of (1<<page_shift) will result in a
buffer overflow in the for loop.
Therefore, adjust loop termination condition to
prevent accessing an out-of-bounds page.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
lib/errno.h: defined(__ARMCC_VERSION) for use GCC compile
lib/autmoic:fix compiler error:
nuttx/include/metal/compiler/gcc/atomic.h:19:13: error: conflicting type
qualifiers for 'atomic_flag'
19 | typedef int atomic_flag;
| ^~~~~~~~~~~
In file included from nuttx/include/nuttx/net/netdev_lowerhalf.h:38,
from virtio/virtio-net.c:33:
prebuilts/gcc/linux/arm/lib/gcc/arm-none-eabi/13.2.1/include/
stdatomic.h:233:3: note: previous declaration of 'atomic_flag' with
type 'atomic_flag'
233 | } atomic_flag;
| ^~~~~~~~~~~
nuttx/include/metal/compiler/gcc/atomic.h:20:14: error: conflicting
type qualifiers for 'atomic_char'
20 | typedef char atomic_char;
^~~~~~~~~~~
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
The metal_yield API needs also to be declared for the baremetal systems.
This fix build issue in Open-amp for generic system:
/github/workspace/open-amp/lib/rpmsg/rpmsg_virtio.c:275:17:
error: implicit declaration of function 'metal_yield'
275 | metal_yield();
| ^~~~~~~~~~~
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Define metal_yield in sys.h files is more flexible to manage this
in libmetal, metal_yield would be managed at the OS level and
dispatched to metal_cpu_yield, metal_sleep_usec, or others.
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
This return code is for system calls only, and checkpatch warns about the
same. Remove the use of this return code.
Signed-off-by: Andrew Davis <afd@ti.com>
These functions are labeled METAL_INTERNAL so should have no external
users, but they are not used internally either. Remove these functions.
Signed-off-by: Andrew Davis <afd@ti.com>
Remove support for Zynq-7000 SoC, changes are
1. Remove Zynq7 tool chain support
2. Makefile changes to remove zynq7
Reasons to remove:
1. Removing redundant or unmaintained code
2. Reduce technical debt carried by OpenAMP team
3. very few customer using openamp on Zynq-7000 SoC
For using Zynq-7000 SoC support last working and tested
version is (v2023.04)
https://github.com/OpenAMP/libmetal/tree/v2023.04
Signed-off-by: Rajiv Mohan <rajiv.mohan@amd.com>
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Allow Zephyr testing to either use locked known good values
or the very latest versions.
The known good versions are best for PR checking as if the build fails
it is almost always the PR itself that broke it.
The latest version is good for periodically checking compatibility with
the very latest Zephyr changes.
For now we run both on pushes and PRs.
We also run main against the latest zephyr check weekly as a look ahead.
Signed-off-by: Bill Mills <bill.mills@linaro.org>
The current CI uses the latest from main for zephyr build tests.
This has been broken sometime after v3.6 and before v3.7. Since that
time, use of GNU style constructors requires a kconfig value to be
defined. This same kconfig value will cause an error in v3.6 or earlier.
The test framework intentionally uses GNU constructors for the base level
of its framework and version.c uses this to register its test.
The test/system/zephyr/ level overrides the default META_ADD_TEST() macro
and creates unique functions that main.c then calls explicitly in function
metal_test_add_functions().
Thus, right now the only constructor used if for version.c but it still
intentionally used.
Since we use the latest for CI, define the value so CI will complete.
Signed-off-by: Bill Mills <bill.mills@linaro.org>