When ARM CONFIG_BUILTIN_STACK_GUARD=y, it expects that the privileged
stack has a higher memory address than that of the normal user stack.
However, dynamically allocated stacks had the other way round:
privileged stack had a lower memory address.
This was probably not caught before because relevant tests, such as
`kernel.threads.dynamic_thread.stack.pool.alloc.user` run with no
hardware stack protection. If one were to test it on HW that has stack
protection, such as frdm_mcxn947 with CONFIG_HW_STACK_PROTECTION=y, they
would see it failing.
This patch naively assumes that ARC and RISC-V PMP will be happy with
the shuffling of user and privileged stack positions.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
On platforms where `Z_LIBC_PARTITION_EXISTS` is true - such as Cortex-M
- it is necessary to add this partition to the memory domains of
userspace extensions, otherwise they get memory faults.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Adjust driver so that pinctrl property is not required in device
tree. Remove card init functions from driver init, as set_io()
function is meant to power cycle the card (if pin is used) and
initialize card clock and bit width. If card is not inserted
while driver init runs, init() will fail unreasonably, so
card init should take place at set_io() calls.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
For ESP32 devices, not all boards are required to configure pinctrl
for signals like Chip Detect (CD) and Write Protect (WP). Remove
pinctrl property as mandatory.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
There is a couple test cases which for whatever reason does not work on
certain platform drivers, and they are being hardcoded to be skipped in
the test if using those drivers. This decision was made a long time ago,
and I do not have great insight into why, but regardless, the proper way
to skip a ztest case is to call the proper ztest skip API instead of
just returning, because it should be marked as skipped, not passed.
Also, the problem for these couple drivers is clearly the cases where rx
is bigger than tx, so add the same skip for the other new case where rx
is bigger than tx, the same_buf_cmd case.
After analyzing the DSPI driver a bit, I have a suspicion that this is
just a software driver limitation, that could be overcome to function
properly, and not a hardware limitation. But this commit is just to skip
the test properly that is already being skipped, not fix the underlying
issues with these drivers.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
When OpenThread iface is brought up `ot ifconfig up` there are several
modules that will attempt to open a platform socket and perform bind
and bind to netif operation.
Since now, `sockfd_upd` structure was initialized after the backbone
interface announced connectivity, but this implies that OpenThread
interface will always be brought up only after this event, which is not
true, or imposed.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This commit makes two key improvements to the DeviceHandler:
1. Pass TWISTER_PLATFORM environment variable to serial PTY scripts
- Enables serial PTY scripts to access platform-specific configuration
- The platform name is now available via TWISTER_PLATFORM env variable
- Allows board-specific serial port and baudrate configuration in
external serial forwarding scripts
2. Reorder pre-script execution before serial PTY initialization
- Moved pre-script execution before serial PTY setup to avoid conflicts
- Prevents race conditions when pre-script performs board power cycling
or reset operations that might interfere with active serial
connections
These changes enable more flexible hardware testing scenarios where:
- Serial configuration can be automatically selected based on board type
- Board initialization (power cycling, FPGA programming) completes
before establishing serial connections
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
Allow symbols to be placed in custom groups, which can be included or
excluded from the build with a common Kconfig symbol.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Group exported symbols together by subsystem/library. Groups can then
be enabled or disabled together through the existance of a Kconfig
symbol named `CONFIG_LLEXT_EXPORT_SYMBOL_GROUP_{GROUP_NAME}`.
All symbols declared with the standard `EXPORT_SYMBOL` and
`EXPORT_SYMBOL_NAMED` macros fall into the `DEFAULT` group.
Signed-off-by: Jordan Yates <jordan@embeint.com>
DEFAULT
DEFAULT
WAIT_FOR calls `expr` after it has evaluated to true.
Store `expr` in a variable and return it instead to prevent the additional
`expr` call.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
The test is expected to run on single cpu so set max number of cpus to 1
so that it doesn't fail smp targets like fvp_baser_aemv8r in ci.
Signed-off-by: Sudan Landge <sudan.landge@arm.com>
LLEXT-related sections should only be added to the linker script when the
associated CONFIG_LLEXT is enabled. This has been done by checking for this
Kconfig symbol in every linker file, but this creates a lot of boilerplate
for no good reason.
Use the much simpler solution: move the check inside the common linker file
and remove existing "#ifdef CONFIG_LLEXT" checks in all linker files.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Interrupts would only be unlocked when resuming from suspend-to-idle.
Even though other states *should* never be entered, make sure interrupts
are unlocked anyways to conform with the expectations of the PM framework.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Adds JLink runner configuration for both Cortex-M7 and Cortex-M4 cores
on the Arduino Portenta H7.
Signed-off-by: Ibrahim Abdalkader <i.abdalkader@gmail.com>
When remote peer have closed the PPP link normally, the
PPP stack on Zephyr side switches back to ESTABLISH phase
to be ready for next handshake.
When calling net_if_down() on the interface, it should not
try to initiate LCP link termination, but instead go directly
to DEAD phase.
See https://datatracker.ietf.org/doc/html/rfc1661#section-3.2
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Add a MATRIX_CODE macro to extract the key code from a key value created
in DT with MATRIX_KEY. This can be handy for code other than input_keymap.c
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The h2ram is an independent 4KB section. With default settings of
CONFIG_ESPI_PERIPHERAL_HOST_CMD_PARAM_PORT_NUM and
CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION_PORT_NUM,
There is a 2KB gap that is unused. This change was made to make
unused gap can be reused by other modules to reduce overall RAM
usage.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
Enhanced the shim driver to raise Wi-Fi management events
when starting or stopping SoftAP, specifically in cases
where CONFIG_WIFI_NM_HOSTAPD_AP is disabled.
Signed-off-by: Qiankun Li <qiankun.li@nxp.com>
Will throw an error showing what the issue with the VERSION file
is if a required field is missing
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
APPLICATION_SOURCE_DIR is image specific and the value inside sysbuild
points to sysbuild itself.
This gives wrong results when a sample uses
`zephyr_get(APPLICATION_SOURCE_DIR)` as it will fetch the sysbuild value
and not its own value.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
- We want to add the ASE ID to a stream as early as possible
to make sure the events coming from BTTester to Auto-PTS
contains the correct information.
- Previously the events that came before stream_configured
would contain ASE ID 0, regardless of actual value.
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
The code today relied on ATOMIC_OPERATIONS_BUILTIN being the default
option if the other alternatives (_C and _ARCH) were not enabled.
Instead, explicitly check for it to avoid confusion when browsing the
code and to ensure that the user can always match a particular Kconfig
option with the #ifdeffery in the header file.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The ATOMIC_OPERATIONS_* Kconfig option is not a choice, so it does not
have a default. However, the file that determines which actual atomic
operations backend will be used does default to
ATOMIC_OPERATIONS_BUILTIN:
3e537db71e/include/zephyr/sys/atomic.h (L26-L41)
Since we want to ensure that all SoCs intentionally select the atomic
operations backend they want to use, select it at the SoC level for all
SoCs, as well as for the Cortex-M arch when the Armv8-M baseline profile
is selected.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Main changes since v2.7
* Phy-device v2.1 API introduced
* Phy updated to use internally this v2.1 API, so channel and modem IF
are updated accordingly
Note: Like before, bsim remains fully backwards compatible
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Avoid polluting every build that includes this Kconfig with EXT2
logging config unless the ext2 filesystem is actually enabled.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Make sure assertion is true before dereferencing chan->iso. In extreme
case compiler could skip assert check (asume it is always false) if address
was already dereferenced.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Zero size buffer pipes are not currently supported if memory is
not coherent between CPUs (CONFIG_KERNEL_COHERENCE=y) due to
possibility of buffers being in incoherent memory. So skip
the zero size test for now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add a new test configuration to verify power domain functionality with
ISR safe power management enabled. The test conditionally applies
PM_DEVICE_ISR_SAFE flags to test devices based on the new
CONFIG_TEST_PM_DEVICE_ISR_SAFE configuration option.
Enhance existing test assertions to verify the PD_CLAIMED flag is
properly set when devices claim power domains and cleared when they
release them, ensuring correct power domain reference counting in
both regular and ISR safe contexts.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Fix the power domain claiming condition which was inverted, causing
domains to be claimed when they were already claimed instead of when
they weren't. Add null check for power domain before accessing its
properties to prevent potential null pointer dereference. Also ensure
the PD_CLAIMED flag is properly cleared when putting the power domain.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Fixed regression related to adc reference and adjusted to be
compatible with NXP K and MCX series.
Signed-off-by: Vinicius Carvalho <carvalho-vinicius@outlook.com>
Remove C code overrides of RX buffer counts and sizes when the TX path
is disabled. Move the reduced resource requirements into the Kconfig
default values. Default RX buffer sizes are not changed by the commit.
Fixes#92356
Signed-off-by: Jordan Yates <jordan@embeint.com>
Use the newly created CONFIG_CSPRNG_NEEDED to simplify the enablement of
CSPRNG for the PSA Crypto Core.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Its goal is to use it as the "connection point" between what the hardware
support and what the application needs. All the application/module/subsys
need to do is to set this new Kconfig and then check the "return" value
on CONFIG_CSPRNG_ENABLED: if the latter is set then the entropy driver was
enabled; if not something is preventing the driver from being used.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>