TLS 1.3 session tickets derive a resumption PSK as long as the hash of
the negotiated ciphersuite. Mbed TLS stores it in a buffer sized
automatically (48 bytes when SHA-384 is available), but loading the
PSK into a resumption handshake goes through mbedtls_ssl_set_hs_psk(),
which rejects keys longer than MBEDTLS_PSK_MAX_LEN. With the previous
default of 32, a cached ticket from a SHA-384 based ciphersuite was
offered to the server, accepted, and then failed the handshake on the
client side, breaking reconnection for as long as the ticket stayed
cached.
Default MBEDTLS_PSK_MAX_LEN to 48 when session tickets and SHA-384 are
both enabled, mirroring the resumption key storage size in Mbed TLS.
Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE now accepts a comma-separated list of
PEM paths in addition to a single path. When a list is given, the MCUboot
bootloader embeds the public half of every key and accepts an image
signed with any of them. The first entry is also the key the application
is signed with; every entry past the first must be a public-only PEM of
the same signature type (MCUboot enforces this at build time with
'imgtool keyinfo --require public'). A common use is a development
bootloader that boots both development- and production-signed images
while never holding the production private key.
The keys the bootloader embeds and the single key the application is
signed with are both derived from this one list through the sysbuild
helpers sysbuild_mcuboot_resolve_signature_key_files() and
sysbuild_mcuboot_application_signature_key_file(). Entries are forwarded
verbatim for each image to resolve, so a single-key value behaves exactly
as before and no previously working configuration breaks.
The feature is exercised at runtime by tests/boot/mcuboot_multiple_keys,
which builds a two-key bootloader on the mps2/an385 QEMU machine and
boots an application signed with either embedded key, asserting MCUboot
validates it against the matching key (key_id 0 and key_id 1). The two
keys are MCUboot's own ed25519 test keys: a development key (key_id 0)
and a production key embedded by its public half only (key_id 1). The
application is signed at build time with the development key; the second
scenario re-signs the built image with the production key afterwards,
the way a production custodian signs a release binary out-of-band, so
the production private key never enters the build configuration.
Signed-off-by: JP Hutchins <jp@intercreate.io>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The original commit introducing this option was mistaken about the
version of Zephyr that updated to TF-M 2.2.0 and thus introduced the
initial break. It was updated in commit f67be667, first present in
Zephyr v4.2, with the version of TF-M reverting the size change
included in Zephyr v4.3.
Since the fix only needs to be set for applications originally
programmed with Zephyr v4.2, update the Kconfig name to reflect this
fact.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Convert the CONFIG_WIFI_NM_WPA_SUPPLICANT guard to an early return
instead of wrapping the whole file, so the body no longer needs
re-indenting, and fix the remaining nested-block indentation.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
Convert the CONFIG_OPENTHREAD and CONFIG_OPENTHREAD_SOURCES guards to
early returns instead of wrapping the whole file, so the body no longer
needs re-indenting, and fix the remaining nested-block indentation.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
New command is added to remove P2P persistent network(s).
wifi p2p persistent_remove <idx>
If idx >= 0, check existance of persistent network with the given idx
and remove it if exists.
If idx = -1, remove all saved persistent networks.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
With current implementation, the response of wifi p2p power_save is
actually "UNKNOWN COMMAND".
The command content should be "P2P_SET ps %d".
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Add persistent support in P2P connect command
Add new parameter -a which indicates adding new persistent group.
No argument. No persistent group will be added without -a.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
The persistent parameter doesn't work when trying to add persistent
group in wifi p2p group_add command. The fixes are as below:
1. Add new parameter -a to indicatie adding persistent group (default
false).
2. Parameter -a has high priority than -p. This which means if both -a and
-p parameters are adding in group_add command, -a will finally take
effect.
3. If -a is added, will issue command "set persistent_reconnect 1" to ctrl
interface so that the persistent group could be re-invoked by other
peers.
4. Added sanity check if persistent index is indicated. Check if the
persistent group is exist or not. If not exist, print error log.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Update header files in include/zephyr/ to use a ZEPHYR_INCLUDE_ prefixed
header guard macro with the macro name matching the header file path
in include/zephyr/ file tree.
These changes were made using zephyr_header_guards.py script proposed
in https://github.com/zephyrproject-rtos/zephyr/pull/111768 with a
Linux shell command like the on below:
$ scripts/zephyr_header_guards.py --apply include/zephyr/toolchain
Also manually update modules/cmsis-dsp/CMakeLists.txt to prevent build
failures due to include/zephyr/toolchain/zephyr_stdint.h header guard
macro renaming.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add wpa3 transition disable bitmap configuration parameter.
This feature used to verify if station fallback can select
secure algorithms correctly under AP transition disable
configured.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
Gate the uart21 branch on NRF_SECURE_UART_INSTANCE == 21 so it only applies
on platforms whose secure UART actually is instance 21 (nrf7120). Boards
using uart30 as the secure console fall through to the uart30 branch again.
Fixes issue introduced with commit 192ec301a3.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is needed to integrate nicely with librail, the closed source radio
library for silabs SoCs. It also integrates nicely with sleeptimer, which
Zephyrs silabs_sleeptimer_timer.c uses internally.
While this might also work with Series 0, I don't have the hardware to test
that, so it stays disabled for now.
Adjustments I made to soc_power_pmgr.c:
- gecko_sdk doesn't have hfxo manager, so surround it by the relevant
ifdefs.
- gecko_sdks power manager doesn't support EM4, so call EMU_EnterEM4 for
that, like their SDK code does.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Handle zero-length output buffers before writing the terminator and
check the destination bound before reading the current source byte.
This keeps P2P peer info parsing inside the helper-provided output
range.
Signed-off-by: Old Ding <ai.neo.ae86@gmail.com>
nRF7120DK will use uart21 for console output from S domain and so
RTE_USART21 must be included for config.
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.
This change was made running scripts/check_quoted_includes.py script
with the Linux shell command below and manually selecting the applicable
changes:
$ find modules/hal_silabs -type f -exec \
./scripts/check_quoted_includes.py -w {} \;
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add wl80211 RTOS shim (semaphores, mutexes, timers, lock/unlock) and
supplicant bridge for the macsw blob.
Refactor bl61x blob linkage: share libbl616_phyrf.a between BLE and
WiFi, add MACSW variant selection (default/bridge/ack/coex), and link
wl80211 and macsw libraries when CONFIG_BFLB_WIFI is enabled.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Host the public ESP_HAL_LOG_LEVEL and ESP_HAL_EARLY_LOG_LEVEL options
in modules/Kconfig.esp32, which is sourced directly by modules/Kconfig.
Drop the separate modules/hal_espressif glue directory whose Kconfig
sourced the hal tree back with an unconditional osource. That osource
ran even when the module directory variable was empty, collapsing to
a path that recursed into Kconfig.zephyr when the repo sits at root.
Signed-off-by: Sylvio Alves <sylviojalves@gmail.com>
Add CH32V10x chip family selection macro and include ch32fun.h
for the QingKe V3A SoC series, consistent with existing V2A, V2C,
and V4B series support.
Signed-off-by: Lucy Wong <mova845@outlook.com>
The sleeptimer service from the gecko_sdk is a generic API which supports
multiple hardware timer peripherals internally. The reason we want to use
this rather than a Zephyr native driver, is that sleeptimer is what's used
by the power_manager service from the SDK which in turn is used by librail.
Combined with other, future commits, this will allow reducing the power
consumption of gecko_sdk based SoCs while they are idle.
Since the APIs between gecko_sdk and simplicity_sdk are the same, all
that's needed is to adjust the Kconfig dependencies and compile the
relevant sdk code. For now, this supports the RTCC peripheral only, which
is used on efr32mg13p, which is what I test with.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
NXP's USDHC SDK driver knows how to do its own cache maintenance and
does so on platforms that set HAS_MCUX_CACHE[1]. Recently, a copy of
that cache maintenance logic was added on the Zephyr side because
certain cores, like the Cortex-M33 of the i.MX RT1180, use an external
cache controller and instead set HAS_MCUX_XCACHE.
However, the Zephyr-side cache logic is buggy: it clobbers the response
data in cases when the SDK can't use DMA (specifically, when the RX
buffer isn't 4-byte aligned[2]): in those cases, the SDK code writes to
the buffer, those writes go to cache, then Zephyr invalidates the cache
discarding the written data.
NXP's SDK abstracts over different cache drivers just like Zephyr does,
so it's fine to enable its cache control for platforms with any type of
cache. Do that instead of reimplementing cache maintenance in Zephyr.
This partially reverts commit 0b8babdcc3 ("drivers: sdhc: imx_usdhc:
add cache maintenance on DMA path"), leaving only the new default value
for CONFIG_SDHC_BUFFER_ALIGNMENT.
[1] 2d8b1b1133/modules/hal_nxp/mcux/CMakeLists.txt (L140-L142)
[2] cddb388583/mcux/mcux-sdk-ng/drivers/usdhc/fsl_usdhc.c (L1343-L1346)
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Implies building a confirmed hex image when RAM with revert mode
is used, as without using a confirmed image it will not boot
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add a sensor driver for the NXP MCUX Enhanced Quadrature Decoder (EQDC)
using the fsl_eqdc HAL. The PHASEA/PHASEB decoder inputs are routed
through the on-chip INPUTMUX, described by an "inputmux-connections"
phandle-array following the nxp,inputmux convention.
The driver exposes SENSOR_CHAN_ROTATION, SENSOR_CHAN_RPM,
SENSOR_CHAN_ENCODER_COUNT and SENSOR_CHAN_ENCODER_REVOLUTIONS; the last
channel is added to the sensor API. Velocity uses the EQDC period
measurement (POSDH/POSDPERH), so a prescaler keeps the 16-bit period
counter from saturating at the sample rate.
A single-phase-mode property selects single-phase decode (one count per
PHASEA pulse, with the direction taken from PHASEB) instead of the
default quadrature X4 decoding, with the counts-per-revolution scaling
adjusted accordingly.
Co-authored-by: bnina-ayoub <ouba.bnina@gmail.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Per WPA3 specification, stations connecting via SAE
authentication must have PMF (Protected Management Frames)
capability enabled. Set sae_require_mfp to 1 in hostapd AP
configuration (hostapd_config_read2) so that in WPA3-Personal
Transition mode (ieee80211w=1), the AP rejects SAE stations
that do not advertise MFPC in their RSN capabilities. This
allows legacy PSK stations to connect without PMF while
enforcing PMF for all SAE connections.
Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Add a system timer driver for the NXP RTC (rtc_jdp) IP on the MCXE31x
family. It implements the standard system clock interfaces and is
selected through the zephyr,system-timer chosen property pointing at an
nxp,rtc-jdp node.
The RTC is a free-running 32-bit up-counter with a single absolute
compare register (RTCVAL); the driver runs tickless against it. Because
the RTC keeps counting in all low-power states, it can serve as the
kernel tick source without a companion timer.
RTCVAL is an equality compare that synchronizes into the slow RTC clock
domain and sets INV_RTC while in progress, during which further RTCVAL
writes are ignored. The driver waits for INV_RTC to clear before a write
and, after it, re-reads the counter and retries with the compare bumped
forward if the count has already reached it, so a match is never lost to
the sync latency (a miss would only recur after a full 32-bit wrap). The
scheduling horizon is capped at half the counter range so a compare
cannot wrap past the counter and look like the past, mirroring
mcux_stm_timer.c.
The counter rate (clock-frequency / prescaler) is published at runtime
via TIMER_READS_ITS_FREQUENCY_AT_RUNTIME, making the devicetree
prescaler the single source of truth for the tick rate. The MCXE31x SoC
defconfig disables SysTick and defaults the tick rate when this timer is
selected.
Validated on frdm_mcxe31b: tests/kernel/timer/timer_api passes 15/15.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
For RTOS Wi-Fi device, SNR is more often required than throughput.
Throughput-based selection favors APs advertising higher data rates or
wider channel bandwidth, which may not reflect actual link quality in
embedded/IoT deployments. In contrast, SNR-based selection prioritizes
signal quality, leading to more stable connections, fewer
retransmissions, and better roaming decisions — all critical for
resource-constrained RTOS devices that prioritize connection stability
over raw throughput.
So choose WIFI_NM_WPA_SUPPLICANT_NW_SEL_RELIABILITY by default.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Wire the RPMsg-Lite library (from hal_nxp mcux-sdk-ng multicore
middleware) into the Zephyr build system:
- modules/Kconfig: source the new Kconfig.rpmsg-lite shim so that
RPMSGLITE becomes selectable as a west module.
- modules/Kconfig.rpmsg-lite: osource the rpmsg-lite Zephyr Kconfig
when the standalone module is present.
- modules/hal_nxp/mcux/Kconfig.mcux: expose RPMSGLITE and related
RL_* symbols from the hal_nxp copy of rpmsg-lite.
- modules/hal_nxp/mcux/mcux-sdk-ng/middleware/Kconfig,
Kconfig.multicore: hook the multicore middleware Kconfig chain.
- modules/hal_nxp/mcux/mcux-sdk-ng/middleware/multicore.cmake:
add the rpmsg-lite CMake fragment to the hal_nxp build.
- west.yml: pin hal_nxp to the PR branch that restores the Zephyr
RPMsg-Lite integration files.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.
This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
`grep -rsl "#include \"zephyr/" modules/`
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The `thread` field is not initialized, if it's being animated via
k_work_queue_run instead of k_work_queue_start.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
This option can be used to override `CONFIG_SOC` at STM32Cube HAL module
level, which is useful for a few specific products where the SoC name
does not match the preprocessor definition that the HAL needs to add
in order to work properly.
While at it, update the STM32F0 and STM32F4 series Kconfig to make use
of this new option, allowing `CONFIG_SOC` to now always reflect the
selected SoC's actual name.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support to the API for signifying that the provided PSK is the
pre-computed PBKDF2 output, instead of the ASCII passphrase. For
drivers that support that option, it allows for significant execution
time optimisations, as the computation has been measured as taking over
700ms on a 128MHz Cortex-M33 (nRF54L15). Computing the PBKDF2 value is
left for the caller to implement.
Support for this option is added to the HostAP (wpa_supplicant) driver.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add roaming retry count to fall back roaming method to next one.
Roaming 11K/11V may fail because AP does not carry right candidate.
In this case we can jump to next method when we receive signal change
event again.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Deprecate explicit 11R roaming api.
11R is not a way of getting candidate. It is a way of getting keys.
So it can combine with 11K/11V/legacy roaming method
and controlled by wifi_connect -R param.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Enable the iap driver to LPC84x series when CONFIG_SOC_FLASH_LPC84X_IAP
is set.
Signed-off-by: Dilip Raman <dilipr@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Link the lpc_miniusart SDK component when CONFIG_UART_LPC84X is
enabled and disable SDK-managed clock control to let Zephyr
handle peripheral clocks.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Co-authored-by: Dilip Raman <dilipr@aerlync.com>
This allows Zephyr's LPC84X pinctrl driver to use the underlying
MCUX HAL support for IOCON and Switch Matrix configuration.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Co-authored-by: Dilip Raman <dilipr@aerlync.com>
Select the MCUXpresso SDK STM driver component when CONFIG_MCUX_STM_TIMER
is enabled so the system timer driver can link against fsl_stm.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
MBEDTLS_HAVE_ASM defaults to "y if !ARM", so it is disabled on all ARM
targets. The ARM exclusion goes back to commit d599af40c8 ("ext/lib/
mbedtls: Add the TLS configuration file", 2017), where the #define was
guarded by "#if !defined(CONFIG_ARM)"; commit a6d82db50f (2019) kept
that default when it made the option configurable via Kconfig. At the
time there was no per-core ARM granularity to rely on, so a blanket
exclusion was a reasonable default.
The Mbed TLS MPI assembly (bn_mul.h MULADDC) uses the long multiply
(umull/umlal), which is available on the ARMv7-M and ARMv8-M mainline
cores (Cortex-M3/M4/M7/M33/M55) but not on the ARMv6-M / ARMv8-M
baseline cores (Cortex-M0/M0+/M23). The blanket exclusion therefore
also turns the assembly off on the mainline cores, where it is usable.
Enable it on ARMV7_M_ARMV8_M_MAINLINE, where it speeds up asymmetric
crypto noticeably (e.g. a WPA3-SAE group 19 handshake) at no code-size
cost; the asm path is in fact slightly smaller than the C multiply
loop. Baseline cores keep the previous default of n.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
Move the osource of the HAL zephyr/Kconfig inside the
SOC_FAMILY_ESPRESSIF_ESP32 guard. When the module directory
variable is undefined on non-Espressif builds the path collapsed
to /zephyr/Kconfig and caused recursive source errors.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
MCXE31X standby wake uses WKPU source 1 to route the RTC alarm
into the mode-entry wake logic. Enable the MCUX WKPU component
when CONFIG_POWEROFF is selected for the SoC series.
Keep the component selection separate from the SoC poweroff
implementation so intermediate revisions remain buildable while
bisecting the series.
Signed-off-by: Holt Sun <holt.sun@nxp.com>