When CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE is enabled, the clock
calibration test was registering the IPC message handler after sending
the first TIMESTAMP command. This caused a race condition where the
host's response would arrive during the k_msleep() before the handler
was set.
Without a registered handler, the old IPC glue layer's receive callback
sees handle_message == NULL, leaving msg_done unset. This prevents the
IPC backend from sending an acknowledgment to the host. The host then
blocks waiting for the ACK, causing subsequent TIMESTAMP requests to
time out.
Fix by moving intel_adsp_ipc_set_message_handler() call to before the
first message is sent, ensuring all incoming messages are properly
acknowledged even if the test doesn't need their data immediately.
Related to: #102103
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The smoke test IPC receive callbacks were not setting the msg_done flag
in the endpoint private data, preventing the ISR from acknowledging
received messages to the host. Without acknowledgment, the host would
not send subsequent messages, causing the tests to timeout waiting for
responses.
This patch updates both ipc_receive_cb() in hostipc.c and
clock_ipc_receive_cb() in clock.c to set priv_data->msg_done = true,
enabling immediate message acknowledgment by the ISR as documented in
the Intel ADSP host IPC backend.
Related to: #102103
Related to: #102106
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The synchronous send helper intel_adsp_ipc_send_message_sync() had
inverted logic for determining when to wait for host acknowledgment.
Before this fix, the function would:
- Return immediately (without waiting) when send succeeded (ret == 0)
- Try to wait on semaphore when send failed (ret < 0)
This is backwards. The correct behavior is to wait for the host ACK
semaphore only when the message was successfully queued for
transmission.
The inverted logic caused multiple test failures:
- HDA tests received -EBUSY on subsequent sends because tx_ack_pending
remained true when no wait occurred
- Smoke IPC tests timed out waiting for msg_flag/done_flag because
messages were sent without waiting for host responses
- Clock calibration tests failed because timestamp responses were never
received
This aligns the SoC glue implementation with the test-local helper
implementations and restores the original pre-refactoring behavior.
Related to: #102103
Related to: #102106
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
dai_ssp_set_clock_control_ver_1() never reports errors and always
returns 0.
The error check at the call site is therefore dead code.
Make the function void and drop the unused error handling.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
Change the `pdu_len` parameter type from `uint8_t` to `uint16_t` in
function `bt_l2cap_br_pack_i_frame_header()`.
This fixes a potential overflow issue as PDU length can exceed 255
bytes, which is the maximum value that can be stored in a uint8_t.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
jsonschema is more strict when it comes to typing and only allows
strings for 'serial' in hwmap-schema.yaml.
Since 'serial' is not a required key in the schema, this commit
removes the 'serial' key from generated hardware maps when the
'serial' value is empty /unknown.
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
On !MMU && !PCIE && !EXTERNAL_ADDRESS_TRANSLATION platforms, the
device_map() isn't defined, thus brings below ramconsole build error:
ram_console.c: In function 'ram_console_init':
ram_console.c:49:9: error: implicit declaration of function 'device_map'
Previously, I solved this issue in a workaround style[1] as below:
+#ifndef DEVICE_MMIO_IS_IN_RAM
+#define device_map(virt, phys, size, flags) *(virt) = (phys)
+#endif /* DEVICE_MMIO_IS_IN_RAM */
But during the PR review progress, pathcing device_mmio.h is suggested.
This patch implements that suggestion.
Link: https://github.com/zephyrproject-rtos/zephyr/pull/97894 [1]
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
A sample demonstrating usage of a driver for SCT2024 LED controller.
This sample enables 16 leds one by one and then disables them one
by one in an inifite loop.
Signed-off-by: Hubert Miś <hubert.mis@gmail.com>
Simply move the definition of OPENTHREAD_CRYPTO_PSA Konfig before crypto
configuration related Kconfigs.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Increase heap memory when OpenThread is enabled and either "commissioner"
or "joiner" roles are used.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Select proper PSA_WANT requirements in CONFIG_OPENTHREAD_CRYPTO_PSA_CONFIG
in order to enable KDF algorithms.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
crypto_psa.c was missing an implementation for the following functions:
- otPlatCryptoHkdfInit
- otPlatCryptoHkdfExtract
- otPlatCryptoHkdfExpand
- otPlatCryptoHkdfDeinit
which provide support for HKDF using PSA Crypto API.
This commit fill this gap by copying the implementation from upstream
PR 11445.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
When PSA Crypto API are used they need a PSA ITS implementation and this
is provided by Secure Storage if TF-M is not enabled in the build.
Secure Storage can use Settings as backend and Settings, on its turn, can
use several other backends to store data (ex: ZMS, NVS, etc).
Since NVS is already enabled in other OpenThread Zephyr samples, let's
enable NVS also for this sample.
While at it, also slightly re-organize "sample.yaml" to share more data
between tests and allow building and testing also on the nrf52840dk board.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Allow MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED to work with either legacy
crypto (i.e. MBEDTLS_ECJPAKE_C) or PSA Crypto API
(i.e. PSA_WANT_ALG_JPAKE).
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Secure Storage is used as PSA ITS in builds where TF-M is not enabled,
but it needs a storage backend where to physically save data.
If CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS is used then its
"depends on" guarantee that there is a partition to use as physical
storage.
If CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS is used instead
we want to ensure that CONFIG_SETTINGS_NONE doesn't gets selected which
would result in Settings not being able to store data anywhere.
This commit add a depends_on for this last case.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Make CONFIG_OPENTHREAD_CRYPTO_PSA as enabled by default in order to use
PSA Crypto API instead of legacy Mbed TLS' crypto. This is done with the
final goal to deprecate and remove usage of legacy crypto support in
the near future from Zephyr codebase.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
OpenThread needs a PSA ITS provider when using PSA Crypto API, therefore
we enable Secure Storage in builds without TF-M.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
First separate Mbed TLS' crypto configuration from the "high level" (TLS)
part. CONFIG_OPENTHREAD_MBEDTLS_TLS_CONFIG now only takes care of this high
level part, whereas the newly added
CONFIG_OPENTHREAD_CRYPTO_LEGACY_MBEDTLS_CONFIG takes care of the legacy
crypto configuration.
CONFIG_OPENTHREAD_CRYPTO_PSA_CONFIG is added to propose a default crypto
configuration based on PSA Crypto API instead of legacy Mbed TLS.
Both CONFIG_OPENTHREAD_CRYPTO_LEGACY_MBEDTLS and
CONFIG_OPENTHREAD_CRYPTO_PSA_CONFIG are promptless and the choice between
the two is based on CONFIG_OPENTHREAD_CRYPTO_PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Rename
- CUSTOM_OPENTHREAD_SECURITY as OPENTHREAD_SECURITY_CUSTOM
- OPENTHREAD_MBEDTLS_CHOICE as OPENTHREAD_SECURITY_DEFAULT_CONFIG
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Enabled CONFIG_MBEDTLS_ECP_C also when CONFIG_OPENTHREAD_SRP is enabled as
this is required by CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Add CONFIG_OPENTHREAD_COMMISSIONER_JOINER and
CONFIG_OPENTHREAD_SRP_CLI_SRV as internal helpers to slightly simplify
depenencies in other Kconfigs that depends on these combinations.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Simply move the definition of OPENTHREAD_CRYPTO_PSA Kconfig closer to
the OPENTHREAD_MBEDTLS one. This will help in following commits.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Devicetree bindings generate Kconfig variables, and enabled nodes
additionally generate symbols. Add a section to the docs that describes
this.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Links the output from the default MCUboot build with the estimated
size of the overhead with the main image. This also allowes used
to remove the linkage between them, if they so wish
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Espressif has custom watchdog definitions for mcuboot build, which
is currently old and not used.
Remove those as mcuboot upstream has the implementation.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add documentation to external module section for adding the
Memfault firmware SDK to a Zephyr project. Additionally, refer to the
module in OTA docs.
Signed-off-by: Gillian Minnehan <gillian.minnehan@nordicsemi.no>
The return value variable was initialized but always overwritten
before being read.
Remove the redundant initialization to simplify the code and avoid
misleading default values.
No functional change.
Signed-off-by: Gaetan Perrot <gaetan.perrot@spacecubics.com>
The clock related functions are obviously only required if
silabs,siwx91x-clock is compiled.
This commit highlights some inconsistencies in clock management. They will
be addressed later.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Macro QSPI_ROMDRIVER_PRESENT allow to use the ROM version of rsi_qspi.c
(and save a bit of flash). This flag is used by the upstream Wiseconnect
SDK.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Macro RNG_ROMDRIVER_PRESENT allow to use the ROM version of rsi_rng.c (and
save a bit of flash). This flag is used by the upstream Wiseconnect SDK.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
File sl_si91x_driver_gpio.c is only required by silabs,siwx91x-gpio.
As for sl_si91x_peripheral_gpio.c, it used by silabs,siwx91x-gpio and
silabs,siwx91x-pinctrl.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
We try to keep this file more or less alphabetically ordered (except big
drivers: NWP, WIFI and PM).
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Since commit 2113d56c68 ("soc: silabs: Fix SL_CODE_CLASSIFY conflict"),
there are no more text_application_ram or .cc_text sections.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>