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>
Big change is to factor out a thread_halt_spin() utility to manage the
core complexity of this code: the situation where an ISR is asked to
abort a thread already running on another SMP CPU.
With that gone, things can be cleaned up quite a bit. Remove early
returns, most of the "#if CONFIG_SMP" usage was superfluous and will
optimize out, unify and clean up the comments, etc...
No behavioral changes (hopefully), just refactoring.
Signed-off-by: Andy Ross <andyross@google.com>
Refactor only. The surrounding ifdefs are intentionally not changed in
this patch. They will be in the near future.
Rename the pool and generalize the documentation to allow using this
pool for other events that fit the same criteria. This pool can be used
for any buffer that is processed synchronously, without negatively
affecting 'num complete' messages. E.g. 'cmd complete/status' can be put
in this pool already.
We will be working towards making the host process all event buffers
synchronously. This is because events have no dedicated flow control,
and discarding events in the driver without informing the host creates
problems. Discarding should instead happen in the host higher layers
when unavoidable.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
`CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET` shoud be taken into
account in `arch_irq_connect_dynamic`, same as it is done in
`ARCH_IRQ_CONNECT` macro.
Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
LinkServer does not set a breakpoint at reset by default when debugging
platforms, so if the user single steps after loading an application they
will likely step through ROM code for the target. Add a note clarifying
that users need to set a breakpoint at the reset handler or "main" in
order to pause their application there.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add support of rcar_spider_ca55 to xen_dom0 snippet.
Disable CONFIG_UART_INTERRUPT_DRIVEN for xen_dom0, because
xen dom0 consoleio doesn't support interrupt driven mode.
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Remove CONFIG_NRF_ENABLE_ICACHE as it is not needed. There is CONFIG_ICACHE
which is by default enabled for nrf54h.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This also fixes a typo in `z_arm_switch_to_main_no_multithreading` making
it unlock irq instead of locking them when main returns.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
There was a typo in Kconfig check (missing CONFIG_ prefix) which
resulted in not setting OACP_FEAT_BIT_CRC bit in features.
This also resulted in checksum feature being disabled due to check
in bt_ots_init().
This was affecting OTS/SR/OASP/BV-03-C qualificatio test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Driver already handles the case when 'reset-gpios' is not provided, so
remove 'required: true' from bindings to allow boards / shields definition
without reset signal being connected to any Zephyr controlled GPIO.
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
Silence harmless version warning for users that have tagged TF-M.
TF-M creates a very noisy warning when you tag it:
CMake Warning at cmake/version.cmake:28 (message):
Actual TF-M version is not available from Git repository. Settled to
v2.0.0
Call Stack (most recent call first):
CMakeLists.txt:22 (include)
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This fixes wrong slot selection when reading partition size. According
to the comment in code, 'slot1_partition' size should be preferred:
[...] slot1_partition size is used, when available, because in
swap-move mode it can be one sector smaller. When not available,
fallback to slot0_partition (single slot dfu). [...]
This fixes a typo in the if statement which currently always results in
use of 'slot0_partition' size.
Fixes: 86c4b4caa9 ("west/sign: Move from using partition label property")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
There might be a deviation of 30.5 microseconds (1 cycle) due to the
calculation deviation between free run and event timers. This commit
increases stdev to 33 for ite platform.
Fix#67833
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
Each of them have a matching area so lets use that rather than the
catch-all "area: ARM" label.
Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
We were missing a helper function that can be used to check
whether the given function is the virtual VLAN interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Found via static analyis. When `adc_kb1200_start_read` succeeds, no
value is set for `error` so it is still uninitialized when it is
returned.
Signed-off-by: François Baldassari <francois@memfault.com>
Use information encoded in conversion result value to validate it.
Check if MSB bit is set to zero.
Check if channel number included in the result matches channel
number selected for conversion.
Use bitmask to extract converted value instead of math calculations.
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
k_thread_name_set() function returns an error if CONFIG_THREAD_NAME is
not enabled which may make the driver not functional.
Fix the issue by adding a check against CONFIG_THREAD_NAME avaliability
before calling k_thread_name_set() function so the driver can operate
properly with CONFIG_THREAD_NAME disabled.
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
Add configuration of internal refference voltage value so raw ADC
readings can be converted to mV utilizing adc_raw_to_millivolts()
ADC API function.
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
This commit refactors the Intel SSP DAI driver to support dynamic
management of SSP IP. This change additionally separates the management
of the DAI part from the management part of the SSP IP.
Key changes:
- Add new static functions to manage SSP IP power.
- Update the DAI SSP configuration functions to use the new management
approach.
- Update device tree bindings and instances to reflect the new SSP IP
management mechanism.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
As per the BAP spec, the scan delegator device should add the BASS service
data in the extended advertising data when it requests a broadcast
assistant to scan for it. For testing purposes that's usually the case
with the shell, extended advertising data shall be populated with the
BASS service data.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
The MEMC driver in memc_mcux_flexspi.c is initialized
before the FlexSPI driver (flash_mcux_flexspi_nor.c)
and hangs during FlexSPI init. Initialize the FlexSPI
clock to 50MHz before the speed is set to the optimum
speed by the FlexSPI driver.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This test is disabled upstream for a while and only run on zephyr
toolchains. Logging is missing the support needed for userspace, see
releated issue.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is a kernel tickless test, we should not able PM here. PM should be
tested in own environment only or we get unexecpted behavior.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Tickless kernel is default and has been for some time. This test is
actually testing PM and without proper setup it is doomed to fail on
various platforms where PM needs special considerations and hooks.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace the global CSTD property with the CSTD kconfig option to select
at least C11 standard.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add a symbol to enable GNU C Extensions. And a hidden option for
toolchains to signal GNU Extensions support.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add symbols to select a C standard. Next to an option, hidden symbols
are available to select the minimum.
This allows subsystems or modules to select the least compliant C
standard supported.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
There is no need to make this optional just inform user that
this has to be called to complete write of buffers.
The commit also adds info that there should be no more write
attempts done with use of "flushed", as it may return write
errors anyway.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
I am using the tracing module using the RAM backend on a system with
limited RAM & a buffer that can only store 300ms of tracing data. Current
tracing module starts recording during boot-up & we run out of memory prior
to executing code we actually want to trace.
By reseting buffer metadata here, I can call init() at an arbitrary point
of program execution & the tracing module will reset & start tracing.
I tested on E2E on an ARM M-class MCU by calling init & then reading
buffered tracing data via GDB
Signed-off-by: Galen Krulce <gkrulce@meta.com>
Similar to logging module, allow application specific extension of
shell fprintf APIs at a macro level.
Signed-off-by: Al Semjonovs <asemjonovs@google.com>
Add PHYTEC's phyBOARD-Electra kit with the phyCORE-AM64x
System on Module (SOM).
This board only supports the M4F core, UART and GPIO right now,
since other drivers are still missing.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>