This doesn't work as expected with kernel page table isolation
turned on, and fixing it would likely lose any latency benefits
that direct ISRs are supposed to provide.
For now, just prevent these macros from being defined if KPTI
is turned on, like other arches that do not implement this
feature.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This parameter points to the driver instance private data, and not to
its configuration data, which one is set via cfg_info parameter.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
I believe the devicetree documentation for the release is in good
enough shape now. Add a few more links to the release notes to provide
users with more hints for adapting to the new API.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add test cases that verify various bits and pieces of the legacy
devicetree macros match the new APIs.
Writing these test cases without giving rise to deprecated macro
warnings which might break people's CI if they build with -Werror
requires turning off the __WARN() generation in
devicetree_legacy_unfixed.h. The entire file is deprecated at this
point and must be explicitly enabled with an opt-in Kconfig option, so
there isn't any harm in doing this.
Nevertheless, take a minimally invasive approach to avoiding __WARN()
generation in gen_legacy_defines.py, to avoid the possibility of
breakage. This code is basically frozen anyway, so hacks like this
won't cause maintainability problems since it isn't being actively
maintained.
Use the new tests as fodder for a migration guide from the old API in
the documentation.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This is preparation for an additional test suite specifically for the
legacy API which will be added next.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Remove some deprecated or obsolete functionality:
- the 'title:' key is now deprecated
- more than 2 levels of child-binding are now supported
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
At some point, "child-binding:" apparently only worked up to 2 levels
deep. That's not the case anymore, but add a regression test to make
sure that doesn't break. 3 levels deep ought to be enough for anyone.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Make sure that we do not add same IPv6 prefix, received from RA,
multiple times to prefix timer list. This avoids possible
denial-of-service issue if we receive suitably crafted RA packet.
Fixes#25698
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added configuration which allows to run test-suite
on nrf52840dk_nrf52840 and nrf52dk_rf52832 boards.
fixes#25701
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Set 'log_backend_rtt:panic_mode' before calling 'log_backend_std_panic',
because otherwise the RTT backend behaves as if the system is NOT
panicking and tries to do asynchronous writes via RTT_LOCK/UNLOCK.
Signed-Off-By: Andrew Fernandes <andrew@fernandes.org>
Increase the main thread stack size for this test
to 2048; this increase prevents stacking errors in
the main thread, in several Cortex-M platforms.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The power configuration is dependent on which SPI is physically used.
In order to allow DT_INST_FOREACH_STATUS_OKAY() to iterate through
instances without the assumption that index 0 corresponds to SPI0
(which would be incorrect in the case when only SPI1 is enabled),
we need to check the base address to identify which SPI is being dealt
with.
Fixes#25673
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Mutex operations check ownership against _current. But in an
ISR, _current is just whatever thread was interrupted when the
ISR fired. Explicitly do not allow this.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The workaround for ARMv7-M architecture (which proactively
decreases the available thread stack by the size of the MPU
guard) needs to be placed before we calculate the pointer of
the user-space local thread data, otherwise this pointer will
fall beyond the boundary of the thread stack area.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
On nucleo_f429zi and nucleo_f207zg boards,
0xFFFFFFF0 is not a faulty address.
Instead we can use 0x0FFFFFFFF.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Adds propagation of error returns from the model init callbacks in
Access, and removing any other checks for successful init in the
foundation models.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
The implementation of offload_getaddrinfo in this driver failed
when the node it was called with was an IP address. This condition
was never detected, and as a consequence a DNS query was done on
the IP address instead of returning it directly.
Also, the port was set first after running the DNS query.
As a consequence, if the IP address would have been returned directly,
this would have been done without a port been set.
Both errors are fixed in this patch.
Signed-off-by: Hans Wilmers <hans@wilmers.no>
Fix missing assignment of NRF_CCM->MAXPACKETSIZE register
for PDU sizes smaller than 251 bytes. If there is CRC errors
causing PDU length fields to be higher than configured PDU
buffer sizes in the controller, without the MAXPACKETSIZE
register set to correct PDU size, CCM module could overrun
the PDU buffer and cause memory corruption. This fix is
applicable for all nRF52 Series SoCs except nRF52832 SoC.
Fixes#21107.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The ZephyrBuildConfiguration package allow downstream users to control
the Zephyr build system using a cmake package.
A Zephyr Build Configuration package allows for setting of additional
DTS_ROOT, BOARD_ROOT, and similar variables without having to patch
Zephyr repo, but it also allows for inclusion of additional boilerplate
code for more advanced use cases.
The repository or folder containing the Zephyr Build Configuration
package must be on toplevel in the Zephyr workspace.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The cell paramater should have been last to match both the
DT_*_CELL_BY_NAME macros as well as how DT_PHA_BY_IDX works. We fix the
DT_INST_*_CELL_BY_NAME macros as well.
The dma macro's implemented the behavior correctly, but got the argument
names in correct. We fix that to make everything consistent.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Prevent usage of system work queue before it is ready by delaying
initialization of temperature device. Work queue is not used until
application stage.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
There does not seem to be a simple way to express the fact that UART1
can be initialized later at the POST_KERNEL level. The existing code
is wrong in the sense that it always initializes DT instance 1 later,
instead of doing it for UART1 (which may not be instance 1).
In addition, UART instances on other platforms are
also initialized at the PRE_KERNEL_1 level regardless of the instance
index, so let's do the same on this platform for consistency.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
The power configuration is dependent on which UART is physically used.
In order to allow DT_INST_FOREACH_STATUS_OKAY() to iterate through
instances without the assumption that index 0 corresponds to UART0
(which would be incorrect in the case when only UART1 is enabled),
we need to check the base address to identify which UART is being dealt
with.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
Support for the socketpair(2) system call was recently
added for 2.3.0 .
This change adds a sample application that demonstrates
how it can be used.
Fixes#25527
Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
Add a note for composite (CDC+DFU) device overlay.
Composite device CDC+DFU may not work with Windows OS host.
Windows OS does not send reset after DFU_DETACH request
(does not re-enumerates) and thus make it unable for
the device to restart in DFU mode.
For more details refer to #23337.
Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
Update V2.3.0 release note for stm32 with:
- Added SoC series
- New boards support
- Noticeable changes in stm32 drivers and subsystems
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2 useful functions implemented, sample for read()/write() added
(or rather, existing sample to modified to support that).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
We fix (by inverting) the logic of the IS_MPU_GUARD_VIOLATION
macro, with respect to the value of the supplied 'fault_addr'.
We shall only be inspecting the fault_addr value if it is not
set to -EINVAL.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Enhance the sample console output of the arm_interrupt
test, to reflect recent changes in test context as well
as kernel fault handling log output format.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We add a test case to verify that the Cortex-M fault
handling is able to catch stacking errors explicitly
due to exception entry frame stacking (that is, when
the Cortex-M MCU does not report Data Access Violation
MemManage fault with a valid MMFAR value, but only a
Stacking MemManage fault). We update the README file
accordingly.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
It is possible that MMFAR address is not written by the
Cortex-M core; this occurs when the stacking error is
not accompanied by a data access violation error (i.e.
when stack overflows due to the exception entry frame
stacking): z_check_thread_stack_fail() shall be able to
handle the case of 'mmfar' holding the -EINVAL value.
Add this node in mem_manage_fault() function to clarify
that it is valid for z_check_thread_stack_fail() to be
called with invalid mmfar address value.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Make sure to include "DT_DRV_COMPAT" in the docstring for every macro
that requires it.
Some other cleanups and additional examples to try to make it easier
to decide which API to use. Make the style more regular.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>