Spinlocks taken in ISRs were storing the _current thread pointer of
the interrupted thread as the owner, which was never strictly correct
but was benign as the thread would never run until the lock was
released.
But now k_thread_abort(_current) in an ISR has been fixed to eliminate
all references to the (now aborted) thread struct, and _current points
to a dummy thread. Handle that edge case in the validation framework.
Signed-off-by: Andy Ross <andyross@google.com>
A scheduler fix for free memory usage on aborted threads is now using
a per-CPU dummy thread instead of a single stack-based one at startup.
These static thread objects need spots in the kobj bitmasks, and a few
tests are sitting right at the default limit (16 threads).
Signed-off-by: Andy Ross <andyross@google.com>
This patch adds names to the threads created by `mbox_init` via
`k_work_queue_start`. The name of the thread is the same as the name in
the device instance.
The main reason for this has to do with how `mcumgr` reports [thread
information](https://docs.zephyrproject.org/latest/services/device_mgmt/smp_groups/smp_group_0.html#task-statistics-command).
Specifically, data about threads is sent in a CBOR encoded map where the
map keys are the thread names (at least in the default configuration). If
there's more than one IPC channel defined (one example of this being
`samples/subsys/logging/multidomain`), both threads would be created
with an empty name and `mcumgr` will only return the data associated
with the thread created by the last call to `mbox_init`.
Signed-off-by: Bogdan Marinescu <bogdan.marinescu@gmail.com>
The fuzzing support only worked when targetting the
native_posix board, and in a way which was very coupled
with the fuzzing sample.
This has now been refactored, so those who may have
relied on hooking to the board in the same way as this
sample will need to adapt.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Move the kconfig options used to configure the interrupt
and wait time to the sample which uses them instead of
having them in the architecture code.
This options are very particular for this sample and not
really an API.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This option can be used now also with native_sim
and seems to work fine with both 32 and 64 bit targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the readme as the sample works on native_sim,
and native_posix will be deprecated soon.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Move the LLVM fuzzing specific code out of the board main
file and into the sample.
That way we avoid needing to duplicate it for native_sim and
avoid having a very adhoc interface between the fuzzer test
and runner code.
Also ensure it works for native_sim and not just native_posix
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The fuzzing support in the native_simulator had not got
to work yet. Let's remove it, and instead let the
test application handle it.
For this we make public the functions which initialize
the simulation and advance time, so the fuzzing tests
can use it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update maintainers for Renesas code to Renesas employees.
Add @ioannis-karachalios as maintainer for Renesas SmartBond code.
Add @KhiemNguyenT as maintainer for Renesas HAL.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This fixes the compilation of entropy_psa_crypto.c that failed
when trying to include the MbedTLS configuration.
Inherit the needed include folders and definitions from tfm_api.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
With the update of MbedTLS to 3.6.0 the configuration files
(mbedtls/mbedtls_config.h, psa/crypto_config.h)
are not found anymore by default.
Make the ARoT's CMake target inherit from psa_crypto_config;
it defines what is needed to find the MbedTLS
configuration files.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This fixes NS compilation on certain app/board combinations
where TF-M is used but CONFIG_MBEDTLS was not set to y.
With the update to MbedTLS 3.6.0, the compilation failed in
(at least) interface/src/tfm_crypto_api.c when trying to
include MbedTLS configuration file because the MbedTLS Kconfigs
were not defined due to CONFIG_MBEDTLS being n (and the default
MbedTLS configuration file not being found).
TF-M's dependency on MbedTLS is pretty much a given.
This change ensures that the configuration for MbedTLS
is properly defined at all times when TF-M is in use.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The configuration file was not passed down to tfm_api, which
made the compilation of (at least) interface/src/tfm_crypto_api.c
fail when updating MbedTLS to 3.6.0.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
When building with TF-M (CONFIG_BUILD_WITH_TFM),
force MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
so that no NS code tries to act like the MbedTLS core
is built on this side.
This fixes compilation errors in (at least)
interface/src/tfm_crypto_api.c after the
update of MbedTLS to 3.6.0.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
With MbedTLS updated to 3.6.0 the RSA module does not
depend on PK anymore. However, it is now dependent on ASN1.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Apply patches to the current TF-M version (2.0)
so that it works with the updated MbedTLS (3.6.0).
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The unit test allows to test the frag decoder algorithms using random
binary data.
The coded fragments are created on the fly using the encoder algorithm
described by Semtech in the LoRaWAN TS004-1.0.0 document.
Signed-off-by: Martin Jäger <martin@libre.solar>
This service receives fragmented data (usually firmware images) and
stores them in the slot1_partition in the flash.
Also update CMakeLists.txt in loramac-node module to be able to use
FragDecoder.c
Signed-off-by: Martin Jäger <martin@libre.solar>
This implemnets OTS service and provides OTS instance with two objects
for behavior valid and invalid test cases. Service implementation is
inspired by peripheral_ots sample.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Add a new subdir, audio, and move all the audio related
documentation files to that directory, similar to mesh.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use reschedule margin as minimum ticks_slot when ticker with
reschedule expires. This will ensure not too many unreserved
tickers expire in close proximity that can lead of pile up
of CPU processing time and eventually causing timeout
callbacks to be delayed. This mitigate possible LL asserts
due to overhead in start of radio events.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Enable use of ticker slow window yield feature under mesh
usecase. This is make sure scan window either slides within
is window or skips to next interval so that it does not
lead to advertising event being skipped.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix short prepare preempt timeout start, such that if there
are any normal prepare before a short prepare in the
pipeline, then find the short prepare and start its preempt
timeout.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add prepare pipeline assertion checks to detect faults
like stopping preempt timeout without prior start. Also,
check if the preemptor param is correct when preemption
is performed. Check that the prepare pipeline is not
infinitely looping.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add assertion check for use of scan aux context so that
scan aux context is not assigned again while there is
already an existing LLL scheduling in use by the scan
context.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix BT_CTLR_EARLY_ABORT_PREVIOUS_PREPARE to setup new
shorter preempt timeout irrespective of whether there
is a previous prepare enqueued in the prepare pipeline.
Relates to commit d573951f0d ("Bluetooth: Controller:
Revert back early abort of previous prepare").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix sim_length value for central_hr_peripheral_hr so that
the simulation does not end while the test is still in
progress.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update m2l31x.dtsi for adc support and update adc_numaker.c
to support acquisition time in 0~255 ADC ticks.
Signed-off-by: cyliang tw <cyliang@nuvoton.com>
There is no need to specify the core with the flash command line. This
is actually rejected with linkserver v1.5.xx and after.
Signed-off-by: Yves Vandervennet <yves.vandervennet@nxp.com>
The Kernel code relocation example does not work, as the kernel
contains early initialization code that executes before code
relocation takes place
Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
After the changes introduced by #50816 the UpdateHub could not decode
anymore the JSON object. This introduce missing parsing definitions
to allow JSON parser undertood the correct UpdateHub probe object.
Fixes#69297
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
The lorawan subsystem do not use settings handler, and instead uses
individual calls to settings_save_one(). With this strategy there is no
need to call settings_save() at the end.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
When running multiple subsystems or applications on a MCU, the usual
strategy is to use different settings subtrees.
The API provides a way to load or commit a subtree, to avoid adding
dependencies between subsystems or applications, but lacks the way to
save a subtree only. Fix that by adding a settings_save_subtree()
function.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>