OpenThread NAT64 translator creates a packet that has header checksum
computed and appended.
In case of using ethernet as backbone interface, some NICs may want to
have checksum set to 0 for a correct computation.
This commit aims to address this issue by checking if hardware has
offload capabilities and setting NAT64 packet checksums to 0, if needed.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Current implementation uses tls_connection_export_keys_cb to retrieve
exporter_master_secret, client_random, and server_random, which only
works for TLS 1.2. TLS 1.3 introduces a different key derivation
mechanism.
In mbedtls 3.6.4, MBEDTLS_SSL_KEYING_MATERIAL_EXPORT supports exporting
keying material for both TLS 1.2 and TLS 1.3. Update logic to use this
macro and remove redundant MBEDTLS_SSL_PROTO_TLS1_3 check in TLS 1.2
handling.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Introduce WIFI_NM_WPA_SUPPLICANT_DEBUG_SHOW_KEYS to allow key dump
when using the NXP board debug configuration.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Enable MBEDTLS_SSL_KEYING_MATERIAL_EXPORT by default to support TLS
keying material export for enterprise scenarios.
Replace deprecated TLS 1.3 configs with MBEDTLS_SSL_PROTO_TLS1_3 and
MBEDTLS_SSL_SESSION_TICKETS.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Introduce MBEDTLS_SSL_KEYING_MATERIAL_EXPORT configuration option to
control support for TLS keying material export.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit relegates some of the Microchip RISC-V area maitainers to the
collabolator tier.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The existing PMP permission tests relied on hardcoded region indices
(e.g., index 0 or 2). This makes the tests fragile and dependent
on the exact memory attribute region setup.
This change refactors the tests to dynamically determine region counts
and indices based on the output of `mem_attr_get_regions()`:
- `test_pmp_change_perm_invalid_permission`: Uses the last valid
region index to test invalid permission flags.
- `test_pmp_change_perm_invalid_region_index`: Uses the total number
of regions as the out-of-bounds index.
- `test_successful_permission_change`: Locates the index of the
target test region (`dt_regions[0]`) by matching its base address
and size. The test now also inverts the X bit of the current
permissions to ensure a change is applied and verified.
These changes make the tests more robust and less dependent on a
specific static configuration.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
Since pin retention handling was moved to nrfx,
GPIO HAL no longer has to be included in analog drivers.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
WS_MAGIC is a constant string and when calculating lengths for copying
we always exclude the NULL terminator. In result, using strncpy() for
copying can generate a warning about truncated string, as WS_MAGIC will
always be truncated from the NULL terminator. Therefore replace
strncpy() with memcpy() as it seems more appropriate for this case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit aims to make use of sin6_scope_id field of net_sockaddr_in6
structure to correctly choose the network interface when destination
address in link-local.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
remove `imply MDIO` from the
ethernet drivers, that don't directly use mdio
and only use the ethernet phy api, now that the
phys select MDIO.
in 648c8252b575879c2e926d0b051febf2cb1672d1 the
`select MDIO` ones were remove, unfortunatly I forgot
the implyed ones.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
The guard against rx_bufs == NULL was originally added to prevent a
DMA misconfiguration observed when no RX buffer was provided.
The issue can no longer be reproduced, and the check was incomplete
since it did not cover rx_bufs->buffers == NULL or rx_bufs->count == 0,
which lead to the same effective condition.
Removing the check simplifies the driver and avoids blocking valid
TX-only transfers.
Signed-off-by: Alexandre Rey <alx.rey@icloud.com>
Replaces direct byte shifting and assignment with `sys_put_le16`,
`sys_put_le32`, and `sys_put_le64` to simplify the `memory_dump` function.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
To improve code clarity, use `shell_print` in place of `shell_fprintf`
with `SHELL_NORMAL` where appropriate.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
We're now checking if there is space prior to executing the loop body,
therefore guaranteeing this condition is never going to fire in a
single-threaded context.
Signed-off-by: Stuart Longland <stuartl@vrt.com.au>
Before calling `uart_poll_in`, check we have space to store the character
in the ring buffer beforehand. If we do, *then* poll for the character.
That way we don't miss out on serial traffic when our ring buffer is full
unless we fill our hardware ring buffer too.
Signed-off-by: Stuart Longland <stuartl@vrt.com.au>
Removed usart_intenset attribute from conditional compilation
in mcux_flexcomm_data structure since this parameter needs to
be saved/restored independently if the interrupts are enabled
or not based on the PR feedback
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
The PM action saves the interrupts enabled using a
global variable called usart_intenset. The problem is
when you have multiple uart instances that have different
configurations, when entering/exiting from a power level,
only one configuration is saved and will be applied to all
uart instances when exiting from a power level. We need to
keep this setting individual for each instance. To do this,
usart_intenset was added as a new element to mcux_flexcomm_data
structure. In this way, each uart instance will keep/restore
each own setting.
Signed-off-by: Missael Maciel <davidmissael.maciel@nxp.com>
- Reads the Pad Status Register (PSR) to get
the current GPIO input value, instead of the Data Register (DR).
Following IMXRT1170RM.pdf "13.5.2 GPIO Write Mode".
- Enables input buffer via Software Input On (SION)
to get correct pin value in PSR for both input/output pins.
- Issue has been discovered during Safety DIO self-tests.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
1. Remove 'XIP_BOOT_HEADER_ENABLE', it is not
used in the mcxn947 build tree.
2. Remove 'BOARD_FLASH_SIZE', it is not used
in the rw612 build tree.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
RIF configuration is now done at soc init time in a centralized
way so it is no more necessary for drivers to perform this
configuration.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Perform all the IPs RIF configuration at init time in case of this
isn't yet performed by an earlier entity during the boot sequence.
This configuration depends on TRUSTED_EXECUTION_SECURE which is
currently always enabled on STM32N6x but will be configurable in
future.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Remove the CONFIG_RISCV_PMP #ifdef guards from the function
declarations in pmp.h. This allows the header to be included
unconditionally, while the function definitions remain conditional
on the Kconfig option.
Add @kconfig_dep to the Doxygen comments for all functions
to clearly indicate the dependency on CONFIG_RISCV_PMP.
Signed-off-by: Firas Sammoura <fsammoura@google.com>
SYSCON0 IP can be accessed by CPU0, HiFi4, EZH-V, eDMA0, eDMA1.
So cm33_cpu1 can't be supported this feature.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
These samples do not seem to need the unistd.h header, but including it
limits us to C libraries which have it, which as it is a POSIX
extension is not all.
So let's not include it so we do not limit ourselves unnecessarily.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a check for a chosen flash controller to avoid attempting to clear the
settings flash with no controller available.
Signed-off-by: Pete Johanson <pete.johanson@analog.com>
This file does not seem to need unistd.h, and that header is a
POSIX extension to the C library which is not avaiable in general.
So let's not include it.
Without this change this file fails to build with minimal libc or
other C libraries which do not have this extra header.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Increase the RAM size of the SB variant to enable execution of relevant
tests that require at least 172 KB.
This ensures continuous tracking of these tests on CI.
Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
A device with zephyr,deferred-init is initialized by the application, so
we cannot check if it is initialized in "the correct order". On the other
hand, a non-deferred device must not depend on a deferred-init device: this
is guaranteed to be initialized out of order.
Also adjust existing test cases and add a new test case to validate this
behavior.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
There is a bit of logic to run every time an error is reported. Factor it
out into a dedicated function.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Extend UART_MAX32_TX_AE_WORKAROUND to also apply when building for
MAX32657.
Without this option, logging output may become fragmented or delayed
because TX interrupts fail to trigger reliably for small chunks of data.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
api_irq_update was clearing TX interrupt flags before the TX interrupt
could be served, breaking synchronization in time-sensitive applications.
Changes:
1. Remove unnecessary MXC_UART_ClearFlags() calls in api_fifo_read() and
api_irq_update to avoid premature flag clearing; ISR handler already
clears them after returning from the callback.
2. Replace raw flag checks in irq_is_pending() with more complete
api_irq_rx_ready() and api_irq_tx_ready().
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Support for selecting the IRQ output via the `irq-output-select` property
in devicetree. Updates interrupt configuration and ISR logic to use the
selected IRQ index. For i.MX95 M7, ensures pins and IRQs are configured
only when secure access is allowed by checking PCNS and ICNS registers.
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
The default configuration for all STM32 microcontrollers in HAL is
to replace the ehternet MAC address with the address configured in
replace address zero. In "modules/hal", Grep for:
macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0;
But this is a bad thing for bridging. Since Zephyr ethernet LL code
always writes the source address, this patch has no impact on normal
operation. And has the benefit of maintaining the source MAC address
of bridged packets.
Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com>
Workaround GH running workflows from main on release branches.
The assignment script fails and does wrong assignments based on wrong
versions of the maintainer file and manifest.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added DMM buffer preparation to I2C TWIM driver.
Adds little impact as buffer content is already copied
into message buffer which is places in proper memory for
optimized transfer.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Removed unused macros. Moved common macros to common header.
Aligned naming and style to other nrf drivers.
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
This commit introduces a new DMA driver for NXP platforms,
specifically supporting the MCXC/kinetis series.
Please access https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true
to download MCXC44x Sub-Family Reference Manual for more details.
DMAMUX can be found in Chapter 20 and DMA in Chapter 21.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add initial implementation of the Infineon PSOC4 UART driver based on the
Peripheral Driver Library (PDL) for PSOC4 (PSoC 4100TP) devices.
Features:
- UART transmit and receive using PDL SCB UART APIs
- Configurable baud rate, parity, stop bits, and data bits from devicetree
- Pinctrl integration for TX/RX pins
- Support for Zephyr console and shell subsystems
- Build-time validation for UART configuration parameters
Signed-off-by: Dharun krithik k <dharunkrithik@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Signed-off-by: Manojkumar Konisetty <manoj@aerlync.com>
Signed-off-by: Deepika aerlync <deepika@aerlync.com>