Update the new API to use K_USER as the flags for both
CONFIG_USERSPACE and CONFIG_TEST_USERSPACE. Also, fix the linker
script to properly include the suites, tests, and rules.
Fixes#44108
Signed-off-by: Yuval Peress <peress@google.com>
K_THREAD_STACK_DEFINE is not correct in a header file as it may conflict
with K_THREAD_STACK_DEFINE usage in the source file.
Signed-off-by: Keith Packard <keithp@keithp.com>
In order to bring consistency in-tree, migrate all tests to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit adds the `mps3_an547` board, a Cortex-M55 platform, as an
integration platform for all CMSIS-DSP FPU test cases so that the
M-Profile Vector Extension (MVE) vector function implementations are
tested in the CI.
With this change the FPU-enabled test coverage is as follows:
* mps2_an521_remote (Cortex-M33) tests FPU/DSP-enabled scalar function
implementations.
* mps3_an547 (Cortex-M55) tests FPU/DSP-enabled MVE vector function
implementations.
This also has a side effect of comprehensively exercising the M-Profile
Vector Extension support in the ARM architecture port, thereby ensuring
the arch-level FPU/DSP/MVE support is not broken.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This reverts commit 96c7f6ab75.
Zephyr SDK 0.14.1 now includes QEMU 6.2, which supports the emulation
of the MVE instructions.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
When a memory domain is initialized, the z_libc_partition must be
included so that critical libc-related data can be accessed.
On ARM processors without TPIDRURO when THREAD_LOCAL_STORAGE is enabled,
this includes the TLS base pointer, which is used for several
thread-local variables in the kernel.
Signed-off-by: Keith Packard <keithp@keithp.com>
Some names of the test cases are duplicated within the project.
This commit contains the proposed names of the test scenarios.
Signed-off-by: Katarzyna Giadla <katarzyna.giadla@nordicsemi.no>
Remove a redundant symbol that was used as a proxy to enable CONFIG_PM.
If an application needs to enable PM, it should just enable PM subsystem
Kconfig options. Furthermore, there's no clue "SOC_POWER_MANAGEMENT" is
a Microchip specific option.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Change the CPU_CORTEX_R kconfig option to CPU_AARCH32_CORTEX_R to
distinguish the armv7 version from the armv8 version of Cortex-R.
Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
In order to align with macros used to obtain a device reference (e.g.
DEVICE_DT_GET), align the PM macros to use "GET" instead of "REF". This
change should have low impact since no official release has gone out yet
with the "REF" macros.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
For functions returning nothing, there is no need to document
with @return, as Doxgen complains about "documented empty
return type of ...".
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fixing code coverage data cannot be generated correctly when running
tests/benchmark/latency_measure test suite. This is because the gcov
data do not generate completely when the measuring thread stop. So
our solution is:
In main(), just waiting for the measuring thread to complete before
the gcov data start to dump out, to make sure all the gcov data can
be output completely.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This changes k_mem_domain_init() to return error values
instead of asserting when errors are encountered.
This gives applications a chance to recover if needed.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
As the already existing macro K_MEM_SLAB_DEFINE results in
two variable definitions, the preceding static modifier leads to
a seemingly working solution, though linkage conflicts will occur
when the same memory slab name is used across multiple modules.
The new K_MEM_SLAB_DEFINE_STATIC macro duplicates the functionality of
K_MEM_SLAB_DEFINE with the difference that the static keywords are
internally prepended before both variable definitions.
The implementation has been tested on my Zephyr project (the build
issue faded out). The documentation has been updated altogether
with all incorrect occurences of static K_MEM_SLAB_DEFINE.
Signed-off-by: Pavel Hübner <pavel.hubner@hardwario.com>
The PM callback is no longer referenced as "pm_control" but
"pm_action_cb", so reflect this new naming on the callbacks.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move all PM device runtime API calls from pm_device* to the
pm_device_runtime* namespace.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Simplify the running and creation of the basicmath benchmark suites.
Using the ztest register functionality, each benchmark registers and
is run from a single call in main.c.
Signed-off-by: Yuval Peress <peress@chromium.org>
Apply the modifications required by the newer library version.
These modifications came from the original file in the mbedTLS
repository.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
If the count is zero in the heap_malloc_free test, a div by zero
would happen, so add a condition to handle this potential error.
Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
This commit disables running the CMSIS-DSP tests on the mps3_an547
board because the QEMU, which is default emulation platform for it,
does not currently support the emulation of the MVE instructions.
Refer to the issue #37694 for more details.
Revert this commit once QEMU 6.2 is released and integrated into the
Zephyr SDK.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit adds a new testcase for the CMSIS-DSP basicmath benchmark
that enables testing with hardware FPU.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
add a test into latency_measure test case to measure
the average time for dynamic memory allocation and release.
Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
Remove minnowboard configuration which is very basic and can be brought
back by just taking another X86 configuration. We have not tested this
board for a while and it is not being used actively, so remove it.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The contents of mbedtls_ecdh_context have changed in newer versions of
the library. For now, we can work with the old version by adding a
configuration define. It is unclear how long this will continue to
work.
Signed-off-by: David Brown <david.brown@linaro.org>
Record benchmark results into a CSV file that can be used for tracking.
The data will be available in recording.csv in the build directory.
For example:
cat recording.csv
metric,cycles,nanoseconds
Average thread context switch using yield,11654,11654
Average context switch time between threads (coop),21149,21149
Switch from ISR back to interrupted thread,4928,4927
Time from ISR to executing a different thread,3872,3871
Time to create a thread (without start),4224,4223
Time to start a thread,10784,10783
Time to suspend a thread,10400,10399
Time to resume a thread,10688,10687
Time to abort a thread (not running),1536,1535
Average semaphore signal time,3424,3424
Average semaphore test time,1344,1344
Semaphore take time (context switch),12736,12735
Semaphore give time (context switch),17568,17567
Average time to lock a mutex,1632,1632
Average time to unlock a mutex,4738,4738
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This test for boot time was sufficient when it was originally
introduced, but is no longer appropriate as the code and
ecosystem grew.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
Do not configure this as a test, this will change footprint drastically
and will skew results and tracking.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In several test suites CONFIG_TEST was missing.
Define CONFIG_TEST=y, so testing-related Kconfig
options (depending on TEST) get switched-on.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The test granted access to the user work queue stack from the user
work thread; this was done by k_work_user_queue_start() so was
unnecessary. Document why it's ok to grant other access after the
work thread was started.
Fix a race condition where the non-work user thread might have started
before it was given access to the resources it needs.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
The new API cannot be used from userspace because it is not merely a
wrapper around existing userspace-capable objects (threads and
queues), but instead requires much more complex and lower-level access
to memory that can't be touched from userspace. The vast majority of
work queue users are operating from privileged mode, so there's little
motivation to go through the pain and complexity of converting all
functions to system calls.
Copy the necessary pieces of the existing userspace work queue API out
and expose them with new names and types:
* k_work_handler_t becomes k_work_user_handler_t
* k_work becomes k_work_user
* k_work_q becomes k_work_user_q
etc. Because the replacement API cannot use the same types new API
names are also introduced to make it more clear that the userspace
work queue API is a separate functionality.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This adds X86 keyword to the kconfigs to indicate these are
for x86. The old options are still there marked as
deprecated.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The app_kernel benchmarking app has the config file for benchmarking
with floating point enabled, but it was never used. So add it
to the testcase.yaml.
Note that this also limits to run on one CPU on a SMP system as
the resulting numbers would be more consistent among runs.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Clean up logging menuconfig by grouping configuration into
sections like: mode, processing configuration, backends.
Additionlly, removed LOG_ENABLE_FANCY_OUTPUT_FORMATTING which is no
longer in use.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The app_kernel test hangs or crashes on qemu_x86_64 when more than
one CPU is enabled. So limits the number of CPUs to 1 even when SMP
is enabled.
This issue has probably been masked for some time because the test
was previously marked as being "slow".
Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
Adding acrn configurations specific to the platform
on which acrn boots zephyr, Only the EHL specifc
configurations for now. Keeping the HW clock frequency to
1900Mhz for EHL and using the new APIc timer driver.
Signed-off-by: Aastha Grover <aastha.grover@intel.com>
Inside the semaphore tests, there are mis-matched pair of timing
start/stop calls. One called start without calling stop, another
one calling stop twice. So fix them.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
some tests configured with CONFIG_NEWLIB_LIBC=y,
it's better to add a filter filter: TOOLCHAIN_HAS_NEWLIB == 1
in those tests yaml file.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>