Transition nrf54h away from the soc specific gpd
(global power domain) driver which mixed power domains, pinctrl
and gpio pin retention into a non scalable solution, forcing soc
specific logic to bleed into nrf drivers.
The new solution uses zephyrs PM_DEVICE based power domains to
properly model the hardware layout of device and pin power domains,
and moves pin retention logic out of drivers into pinctrl and
gpio, which are the components which manage pins (pads).
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
test_smp_boot_delay sometimes fails due to thread started by IPI
not having started or not finished running:
* Using CPU mask to explicitly state which CPU to start the thread
seems to fix the issue where the thread is not started quickly
enough.
* When the host system is under heavy load (e.g. twister-ing),
emulators may not get enough CPU time to run the newly created
thread. So extend the IPI delay a bit more to allow for this.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The concurrency and switching tests take quite some time to
finish (relatively speaking). When running in emulator and
under a heavily loaded system (e.g. twister-ing), it may
time out as the emulator is not getting much CPU time. So
make the base timeout longer, which can then be further
adjusted by the board timeout multiplier.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
max_stddev calculation was previously patched to be more at least
1 system clock cycle to cover for platforms that use higher frequency
system clock (32kHz). On that platform (nRF52) system clock frequency
was the same as tick frequency but on nRF54x that is no longer true.
Initially, the intention was to use 1 system tick and not cycle.
Fixing it now.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Remove duplicated test configuration after
nrf54l20pdk/nrf54l20/cpuxxx was renamed to
nrf54lm20dk/nrf54lm20a/cpuxxx.
Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
RISC-V CLIC can trigger edge-triggered interrupts by software, but the
available IRQ sources depend on the hardware implementation.
Clarifies the IRQ source for GD32VF103 and adds support for AE350 CLIC.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
For RISC-V CLIC, only edge-triggered interrupts can be triggered by
software. Add IRQ flag to set the trigger type for RISC-V CLIC.
Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
IRQ 1 is used by the LiteX timer, so we can't use it for the test:
gen_isr_tables.py: error: multiple registrations at table_index 1 for
irq 1 (0x1)
Existing section
['.irq.WEST_TOPDIR/zephyr/tests/kernel/gen_isr_table/src/main.c.0'],
new section .irq.WEST_TOPDIR/zephyr/drivers/timer/litex_timer.c.0
Has IRQ_CONNECT or IRQ_DIRECT_CONNECT accidentally been invoked on the
same irq multiple times?
Issue #92194
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Extends support and adds new overlays.
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Excluding this test for qemu_rx because it's failing randomly
Root cause not identified yet, #92213 is created to keep track
of this
This test case is working fine on actual RX HW so issue might be
in the inside the qemu environment
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Commit be40d854c2ccacf14ca3fcfb01bffdc9b075c6c9 introduced the ability
of building Zephyr with deprecation warnings enabled, by making
COMPILER_WARNINGS_AS_ERRORS depend on the newly added DEPRECATION_TEST
Kconfig option. This has the downside of disabling **all** warnings, not
only the deprecation ones.
This patch instead makes DEPRECATION_TEST disable only the deprecation
warning, but leaves COMPILER_WARNINGS_AS_ERRORS enabled.
This has the advantage of being able to see other unrelated warnings
(and fail if they appear) but has the disadvantage of not printing out
the deprecation warnings themselves (since they are disabled).
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
GCC 14.3 is not happy when this variable is left uninitialized, although
we don't actually care about the contents, just the address.
Signed-off-by: Keith Packard <keithp@keithp.com>
When CONFIG_TIMEOUT_64BIT is y, positive values are relative/delta
timeouts and negative values are absolute timeouts, except
for two special values. -1 is K_WAIT_FOREVER and 0 is K_NO_WAIT.
The reserved value of -1 means INT64_MAX is not a valid argument
to K_TIMEOUT_ABS_TICKS(), but there was no check. If a literal
was passed, a preprocessor/compiler warning would be generated
for overflow, but if a variable was passed as the argument,
then the code would compile but not work correctly since the
absolute timeout would be changed to a relative one. One
example of this is task_wdt_init() if no channels are enabled.
Rather than just fixing task_wdt, and trying to find other cases
in an adhoc way, this CL changes K_TIMEOUT_ABS_TICKS() to
limit the larges value to (INT64_MAX-1). It does so silently,
but given the range of int64_t, there should be no practical
difference.
Also, change the implementation for Z_IS_TIMEOUT_RELATIVE() to
fix the case where INT64_MAX relative timeout was being
improperly reported as being not a relative timeout. This was
again due to the -1 reserved value.
Add some tests for these changes to the timer_api test.
Signed-off-by: Mike J. Chen <mjchen@google.com>
When not using dynamic interrupt mapping, various interrupt tables are
configured to be stored in read-only memory in the linker script.. Mark
them const so that the linker doesn't complain.
This affects _sw_isr_table, _irq_vector_table, and z_shared_sw_isr_table in
arch/common along with _VectorTable in arch/arc.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add test support for System Timer driver of RZ/G3S-SMARC
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Two testcases have an implicit minimum memory requirement due to heap usage
and are failing with `ENOMEM` for some platforms:
* portability.xsi.single_process.newlib
* kernel.message_queue.usage
This commit filters out platform that can't satisfy this requirement.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Add the ability to block and process a work queue by invoking
`k_work_queue_run` from an existing thread. This can be particularly useful
for using the main thread to process work items, in the same vein as the
system work queue, but from a lower priority/preemptible thread.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Co-authored-by: Peter Johanson <peter@peterjohanson.com>
When CONFIG_ZTEST_ASSERT_VERBOSE is 0, the array round_s is not
being used by zassert_true(). So mark it __maybe_unused to
avoid compiler warnings.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Fix issues reported by string validation which was added to strings
used in zassert macros.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
These two tests are validating that deprecated APIs still work
correctly. Which means they will definitely generate compile warnings.
To disable -Werror while letting it be enabled for other tests, create a
new Kconfig variable, DEPRECATION_TEST and make
COMPILER_WARNINGS_AS_ERRORS depend on that option being unselected. Add
this option to the two tests so that the resulting configuration
disables -Werror.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The new Nordic platforms use GRTC instead of RTC
as the system timer.
Also the nrf54h20 CPUPPR target does not have enough memory
to execute the `timer_behavior` test.
Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Picolibc changed things like _WANT_MINIMAL_IO_LONG_LONG to
__IO_MINIMAL_LONG_LONG in an attempt to regularize the exposed names and
eliminate names that weren't prefixed with even a single underscore.
Adapt to this change by looking for both old and new symbols.
Signed-off-by: Keith Packard <keithp@keithp.com>
Turns off time slicing as these tests do not expect time slicing and
previously operated without time slicing, but now fallback to the new
default of a time slice size of 20 added in e337b7b. This explicitly sets
the time slice size to 0.
Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
Sets CONFIG_TIMESLICE_SIZE=0 for tests that previously expected to run
without timeslicing enabled, and now fail with the default
CONFIG_TIMESLICE_SIZE=20. Note that timeslicing functionality is still
included, but no actual timeslicing is performed.
Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
According the specification, in extreme cases, the deviation of the APB
clock and LFCLK clock can reach up to +/-1% (+/- 10ms).
Therefore, exclude npcx platforms from the test because it required 1ms
accuracy.
fixes: #66185
Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
Due to the constant alloc/free cycles during the stress test,
it is possible that the heap can become fragmented enough to
prevent successful allocation, and thus failing the test.
So we change the CONFIG_SYS_HEAP_ALLOC_LOOPS to a higher value
so the allocation code will try harder to find a space.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
There are lots of copy and paste error message which does not
really tell you which part fails. So make those messages more
explcitly on where it is emitting the error message.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The syscall stress test relies on timeslicing to switch between
threads, which utilizes the interrupt handling path to perform
context switching. It is also possible for kernel to switch
threads due to, for example, taking a mutex. This adds a bit of
code to the syscalls test to simulate this by yielding while
inside syscall handlers. This is to cover more scenarios so we
can catch issues earlier.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add a loop to join the stress threads after calling abort.
This is to make sure all stress threads have already stopped
before moving on. Simply for test hygiene.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This moves the syscall torture test into another test group or
suite so that we run the individual syscall tests first before
the torture test. If individual test fails, it is easier to see
the error. Especially under SMP where multiple CPUs can report
the same error, cluttering the output.
Also rename the test to syscall_switch_stress to better describe
its purpose.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>