Use the returned reason from the secure fault handle function.
I see no reason why this was ignored, and it is used in the hardfault
handler.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This patch just adds some comments and asserts to clarify the testlibs
att read code.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This reformats some code on main branch that was not clang formated. The
syntax is changed from initializer list to multiple statements because
there is a conflict in formating requirements between clang format and
checkpatch.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Add the chosen dtcm memory region
for mimxrt1010_evk and mimxrt1015_evk.
To be consistent with other rt10xx platforms.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
When testing k_busy_wait(100), don't require that at least 100µs of CPU
time be consumed by the thread itself; some of that time may be used
elsewhere in the system. Instead, just make sure that at least 80µs is
accounted to the thread and allow 20µs to get used elsewhere.
Signed-off-by: Keith Packard <keithp@keithp.com>
Replace open-coded time conversion with the macro which as that will
usually use a constant divide or multiply.
Signed-off-by: Keith Packard <keithp@keithp.com>
pthread_sigmask() is required by the POSIX_THREADS_BASE
Option Group as detailed in Section E.1 of IEEE-1003.1-2017.
The POSIX_THREADS_BASE Option Group is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.
Currently, setting a pthread signal mask has no effect.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
When CONFIG_POSIX_SIGNAL=n, default CONFIG_POSIX_RTSIG_MAX to
0 so that the `sigset_t` type can be defined.
Also define RTSIG_MAX.
This allows native_sim and other platforms to build without
error.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
MIN() has been defined in sys/util.h for a long time. It doesn't
make sense to separately define a lowercase version.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The range and sensitivity tables don't match the datasheet
or the DTS binding file. This changes the array lookup tables
to match the datasheet and binding file.
Signed-off-by: Mike Voytovich <mike@rokkresearch.com>
The driver has some non trivial macro setup, add another two test cases
so those gets build tested as well.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add a poll and scan mode for the driver. If any of these are set, the
driver does not use the GPIO interrupts to detect when the matrix has to
switch to polling mode. Instead, it keeps polling it all the time,
either by enabling all the columns and poll the rows for activity, or
just keep scanning all the time.
Poll mode is useful if the specific SoC used does not support GPIO
interrupt on all the row GPIOs at the same time, scan mode if it does
not even support selecting all the columns at the same time.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Tweak the polling mode so that the driver never exit polling mode if
poll_timeout_ms is 0. This is useful if the specific driver does not
support idle mode.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
The state variable to tracking the unstable state of a key is currently
being cleared based on the bit value, which means that on release it's
not being cleared at all. Fix that by clearing using the bit mask
instead.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
scan_clk_cycle is used to store values from k_cycle_get_32(), it very
much needs to be a uint32_t.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Implements sync established and sync lost BTP events.
This was affecting GAP/PADV/PASE/BV-01-C test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This allows for more tuning regarding Periodic Advertising Sync
behavior.
Required by GAP/PADV/PASE/BV-01-C qualification test case.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Add information about the IPv4 multicast IP_ADD_MEMBERSHIP and
IP_DROP_MEMBERSHIP socket options.
Add information about the IPv6 multicast IPV6_ADD_MEMBERSHIP and
IPV6_DROP_MEMBERSHIP socket options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Zephyr has its own multicast join/leave API but for
interoperability, it is possible to use the multicast
socket API and IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP
socket options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Zephyr has its own multicast join/leave API but for
interoperability, it is possible to use the multicast
socket API and IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
socket options.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Commit 40c2e08e82 ("xcc/cmake: don't discard stderr; don't (ever!) use
ERROR_QUIET") fixed xcc but the corresponding code is duplicated. Fix
the duplicates too.
See that commit for the issue description, longer commit message and
rationale.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The current code triggers a false positive from the heuristic "Macro
compares unsigned to 0". It's triggered because of a use of `IN_RANGE`
that checks against the extremal values of a enum type.
This patch replaces the use of `IN_RANGE` with an explicit list of the
possible values of the enum.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/65575
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This commit introduces a new interrupt controller driver used
for NXP's IRQ_STEER IP.
Apart from introducing the driver itself, this commit contains
the following changes:
1) Switch i.MX8MP to using the XTENSA core interrupt
controller instead of the dummy irqsteer one.
* this is required because the binding for the
irqsteer driver is no longer a dummy one
(since it's being used by the irqsteer driver).
As such, to avoid having problems, switch to
using another dummy binding.
2) Modify the irqsteer dummy binding such that it
serves the IRQ_STEER driver's needs.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The command response buffer will return the total number of bytes
transfered. This will write back to the pointer which is to contain
the number of bytes sent or received.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
With I3C, when a controller does a read whether, through a private transfer
or a CCC, the target is responsible for issuing the End of Data through the
T bit, but the way the API is currently implemented, there is no way to
communicate this back up. For example, if a controller tries to read 100
Bytes (where the controller is to do an abort after 100 (or 101 bytes))
from a Target and the Target gives the EoD at the 42nd Byte, then there is
no way to currently know where the EoD occurred and how far it can be read
up to in the provided buffers.
This implements a num_xfer for `i3c_msg` and `i3c_ccc_payload` which the
driver is responsible for writing the total number of bytes transferred.
Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
Add a testsuite to demonstrate proper functionality of blocking
in the log processing thread.
This serves to demonstrate the previous bugfix, to provide
missing test coverage for the option, and also to document what
pitfalls to avoid when blocking in the log processing thread.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Add information about IPv4 TTL and IPv6 hoplimit changes
for unicast and multicast packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add information about IPv4 TTL and IPv6 hoplimit changes
for unicast and multicast packets.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
We are creating a multicast address in mDNS or LLMNR
responder so set the TTL or hoplimit using the multicast
variant API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>