In current implementation, the HF with old version cannot be
supported properly.
Such as, if the AG is version 0.96, the AT command `AT+BRSF` will not
be sent. It causes the AG cannot know the features of HF.
Compatible old version with the following changes,
Discover the HF SDP record to get the profile version and HF features.
If the SDP discovery is failed, break the RFCOMM DLC connection.
If the AG version is v0.96, update the HF features according to the
discovered HF features.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the AG with old version cannot be
supported properly.
Such as, if the AG is version 0.96, the AT command `AT+BRSF` should
not be sent.
And if the AG is no newer than version 1.5, the `Codec Negotiation`
should be unsupported.
Compatible old version with the following changes,
Discover the AG SDP record to get the profile version and AG
features. If the SDP discovery is failed, break the RFCOMM DLC
connection.
If the AG version is v0.96, do not send AT command `AT+BRSF`.
Create SCO connection directly if the codec negotiation feature is
unsupported on both side in the function `bt_hfp_hf_audio_connect()`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add Kconfig `BT_AVRCP_TG_COVER_ART` to enable the target cover art
feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE_PROPERTIES` to enable
the controller cover art get image properties feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_IMAGE` to enable the
controller cover art get image feature.
Add Kconfig `BT_AVRCP_CT_COVER_ART_GET_LINKED_THUMBNAIL` to enable
the controller cover art get linked thumbnail feature.
Add functions `bt_avrcp_cover_art_ct_cb_register()` and
`bt_avrcp_cover_art_tg_cb_register()` to register the callback.
Add function `bt_avrcp_cover_art_ct_l2cap_connect()` to create the
L2CAP connection for OBEX transport.
Add functions `bt_avrcp_cover_art_ct_l2cap_disconnect()` and
`bt_avrcp_cover_art_tg_l2cap_disconnect()` to disconnect the L2CAP
connection.
Add functions to send OBEX request/response, including connect,
disconnect, abort, get_image_properties, get_image, and
get_linked_thumbnail.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This particular test-case requires bttester to respond with an OOB
procedure SIRK only error. To enable this response, the BTP command to
set SIRK mode has been extended with a new selection.
Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
As stated, removed the unnecessary CONFIG_SYS_HEAP_AUTO=y from
both defconigs, since it is enabled per default for this board.
Signed-off-by: Benjamin Klaric <benjamin.klaric01@gmail.com>
Changed the generic global flag_audio_received flag to
exist for each stream. This will help verify that each
stream, if configured for RX, receives the expected
data.
One test started failing due to this, so that was disabled
until a fix is in place in the controller.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit implements a new unit test suite to validate the
integration of Device Tree memory attributes (`zephyr,memory-attr`)
with the RISC-V Physical Memory Protection (PMP) hardware.
The test suite includes:
1. **`test_pmp_devicetree_memattr_config`**: Verifies that the PMP
Control and Status Registers (CSRs) are programmed correctly based
on the memory regions defined with `zephyr,memory-attr` in the
Device Tree. It iterates through the active PMP entries and
asserts a match against the expected DT-defined regions.
2. **`test_riscv_mprv_mpp_config`**: Checks the initial state of the
Machine Privilege Register Virtualization (MPRV) bit and Machine
Previous Privilege (MPP) field in the `mstatus` CSR to ensure PMP
is configured for correct privilege level switching during boot.
3. **`test_dt_pmp_perm_conversion`**: Validates the
`DT_MEM_RISCV_TO_PMP_PERM` macro to ensure the conversion from
Device Tree memory attribute flags to RISC-V PMP permission bits
(R/W/X) is correct.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
The logic to decode PMP addressing modes (**TOR**, **NA4**, **NAPOT**) into
physical start and end addresses was previously embedded in
`print_pmp_entries()`.
Extract this calculation into a new static helper function,
`pmp_decode_region()`, to significantly improve the readability and
modularity of the PMP debug printing code.
The new helper function is fully self-contained and exposes a defined API
for the PMP address decoding logic. This enables **direct reuse** in
**unit tests** (e.g., using **Ztest**) to verify the core address
calculation accuracy for all PMP modes and boundary conditions, independent
of the main PMP initialization or logging path.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
The Physical Memory Protection (PMP) initialization is updated to support
custom entries defined in the Device Tree (DT) using the `zephyr,memattr`
property, contingent on `CONFIG_MEM_ATTR` being enabled. A new function,
`set_pmp_mem_attr()`, iterates over DT-defined regions and programs PMP
entries in `z_riscv_pmp_init()`, allowing for early, flexible, and
hardware-specific R/W/X protection for critical memory areas. DT-based
entries are also installed in `z_riscv_pmp_kernelmode_prepare()` for
thread-specific configuration. The logic for the temporary PMP "catch-all"
entry is adjusted to account for new DT entries. Furthermore, the PMP
domain resync logic now masks user partition permissions against DT-defined
region permissions, preventing privilege escalation. `CONFIG_RISCV_PMP` is
updated to select `PMP_KERNEL_MODE_DYNAMIC` if `MEM_ATTR`. Finally, the
`pmp_cfg` array in `z_riscv_pmp_init()` is initialized to zero to prevent
writing uninitialized stack data to unused PMP entries.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
When CONFIG_SMP is enabled, per-CPU IRQ stack guards are added. To prevent
unintended TOR (Top of Range) entry sharing, the PMP address entry
preceding each guard region in `pmp_addr` is marked with -1L.
The previously used index to access `pmp_addr` could become stale, as
additional PMP entries may be allocated after its initial calculation
but before the SMP loop for IRQ guards.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Split global PMP state variables (index and last address) into
mode-specific counterparts to correctly track the end of global PMP
ranges for both M-mode (kernel) and U-mode (userspace).
This ensures correct per-thread PMP initialization when configuring
mode-specific dynamic PMP entries.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Introduce `CONFIG_PMP_KERNEL_MODE_DYNAMIC` to enable dynamic
configuration and activation of Machine mode PMP entries. This allows
PMP settings to be managed efficiently during transitions between
kernel and thread contexts.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Rename the `z_riscv_pmp_stackguard_*` functions to
`z_riscv_pmp_kernelmode_*`. This change better reflects that
these functions are used for general kernel mode PMP configuration,
not strictly limited to stack guard purposes.
Call sites in fatal.c, isr.S, and switch.S have been updated accordingly.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
When using `zephyr,itcm` on a imx95 based board the linkage may fail due
to the absence of a defined ITCM region. This issue can be resolved by
specifying the ITCM region using `zephyr,memory-region`.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Zephyr default configuration for SYS_CLOCK_TICKS_PER_SEC
is 10000.
For smartbond this value was changed to frequency of lp_clk.
For XTAL32K SYS_CLOCK_TICKS_PER_SEC would increase to 32768
that would equal SYS_CLOCK_HW_CYCLES_PER_SEC.
One would expect SYS_CLOCK_TICKS_PER_SEC to be less then
HW clock cycles.
This restores default value for SYS_CLOCK_TICKS_PER_SEC
and changes it to 5000 only when rcx is used (that runs at
around 15kHz) and keeping it at 10000 would result in
big rounding errors.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Add option to enable NMI delivery on boot for SMRNMI hardware.
Changes:
- Add CONFIG_RISCV_SMRNMI_ENABLE_NMI_DELIVERY Kconfig option
- Define SMRNMI CSRs in arch/riscv/include/csr.h
- Set NMIE bit during boot to enable NMI delivery
SMRNMI hardware generates but doesn't deliver NMIs when NMIE=0 (default).
This causes twister test failures and prevents handling of critical
hardware events like watchdog NMIs and ECC errors.
Setting NMIE=1 enables NMI delivery, but note that this implementation
only sets the enable bit - it does not provide full SMRNMI support
(no mnret instruction handling, no RNMI handlers). Users must implement
proper RNMI handlers in SoC-specific code to avoid undefined behavior.
Signed-off-by: Afonso Oliveira <afonsoo@synopsys.com>
Explicitly disable the SECURE_UART TFM define when
`CONFIG_TFM_LOG_LEVEL_SILENCE=y`. The secure UART is only enabled by
default on nRF platforms to match the current TF-M defaults.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add an option to preserve the EDK folder, instead of deleting it after
creating the archive. This can simplify test scripting which can now
avoid immediately uncompressing the archive when compiling an
extension.
If this option is enabled, default to the much faster `.tar.Z` archive
format, since the compression ratio of the archive is not important.
Signed-off-by: Jordan Yates <jordan@embeint.com>
DTR signal on UART extends the power saving by allowing host
to indicate the remote end that the UART is not in active state.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add S2RAM (Suspend-to-RAM) support for i.MX943 M7_0/M7_1 cores.
When entering suspend mode, the CPU mix is powered off to save
power consumption while preserving RAM data.
Implementation follows S2RAM suspend/resume workflow:
- Save CPU context (NVIC and SCB registers)
- Configure resume vector for S2RAM detection
- Suspend to RAM preserving stack and heap context
- Enter CPU suspend mode with mix poweroff
- Resume via reset_handler -> S2RAM detection -> context restore
Core registers are lost during poweroff but RAM data is preserved.
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
Update power state configuration for i.MX943 M7_0 and M7_1 cores
to use suspend-to-ram instead of standby to properly support
the newly implemented S2RAM (Suspend-to-RAM) functionality.
Changes:
- M7_0: standby -> suspend-to-ram
- M7_1: standby -> suspend-to-ram
Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
This binding was deprecated in a8b44fd1d1
for the 4.2 release
Let's remove it now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This header was deprecated in d881e794ba
for the 4.2 release
in favour of posix_arch_console.h
Let's remove it now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This driver was renamed in
078fef4ab5c5f8ff993a774778588a50794b886a
And with it the old kconfig option was deprecated for 4.2.
Let's remove this option now
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When both `SB_CONFIG_MCUBOOT_MODE_RAM_LOAD` and `SB_CONFIG_BOOT_ENCRYPTION`
are enabled, MCUBoot loads an encrypted image from flash, decrypts it,
and then executes it from RAM.
Previously, the unencrypted image was being flashed. This caused a boot
failure because MCUBoot would attempt to decrypt an unencrypted image.
This commit ensures the encrypted image is flashed when this
configuration is active, allowing the system to boot correctly.
Signed-off-by: Arthur Gay <arthur.gay@marshmallow.kids>
In current implementation, the default indicator value cannot be set
when building the SLC. And it causes the incorrect indicator value is
notified by AG.
Add a callback `get_indicator_value` to get the default indicator
value from the application.
Add shell command `indicator_value` to set the default indicator
value. The set indicator value will be passed to HFP AG when callback
`get_indicator_value` is notified.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Update the custom vector table to have timer2_isr that
is used for kernel system timer.
While test passes test immediate crashes afterwards due to
missing handler for non-SysTick interrupt.
Now custom interrupt table has additional interrupt handler
to prevent crash.
timer2_isr is no longer static that should not result in
any conflict.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg.xr@bp.renesas.com>
Set Log Level to Info when the HTTP socket reports ENETDOWN,
instead of logging an error each time the network is down.
Signed-off-by: Joel Schaller <joel.schaller16@gmail.com>
The workaround for missing the almost-empty interrupt when TX of very small
payloads needs to also be applied for the UART on MAX32655, so default on
that workaround symbol on that target.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
In this commit, a new callback for NAT64 messages is added.
This is done to avoid passing the received message to rx queue of
external network interface.
As cidr is set from host's IPV4 address, this packet would have been
dropped when parsed, as source address was the same with the host
address and packet was not marked as loopback.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit enables IPV4 messages exchange between interfaces by adding
NAT64 support at platform level.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Remove collaborators in OpenThread area that haven't been active for
months. Also unify the collaborator list in "Networking: OpenThread" and
"West project: openthread" areas.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Enable ENET port on FRDM_IMX93 board.
Signed-off-by: Hongbo Wang <hongbo.wang@nxp.com>
Signed-off-by: Chekhov Ma <chekhov.ma@nxp.com>
Signed-off-by: Jiafei Pan <jiafei.pan@nxp.com>