PR #78645 replaced uses of the GNU keyword `__thread` with a new macro
`Z_THREAD_LOCAL` which expands to correspond C/C++ standard keyword if
applicable, else it falls back to `__thread`.
This PR addresses some missed replacements in headers files for #78645.
Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
Introduce support for 'uint64_t' type, so that unsigned numbers
can be serialized into JSON payloads.
Signed-off-by: Mykhailo Lohvynenko <Mykhailo_Lohvynenko@epam.com>
When CONFIG_LLEXT_EXPORT_DEVICES is not enabled, the DEVICE_DT_DEFINE
macro ends with the contents of the Z_DEVICE_DEFINE macro, which always
includes a terminating semicolon.
When CONFIG_LLEXT_EXPORT_DEVICES is enabled, the macro ends with
Z_DEVICE_EXPORT, which does _not_ include a terminating semicolon. This
leads to a syntax error in places where the DEVICE_DT_DEFINE macro is
used without it.
Fix this by adjusting the added code when CONFIG_LLEXT_EXPORT_DEVICES is
enabled to include a semicolon after the Z_DEVICE_EXPORT macro; also use
the opportunity to remove a stray backslash.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Makes it easier to make sure the CS test code is removed if desired.
It should hopefully allow for a clean split in general.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
Adds support for:
- LE CS Subevent Result event
- LE CS Test End Complete event
For now, recombination of subevent results with more steps than could
fit within a single HCI event is not supported, and such events
are discarded.
Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
The QoS structure is not related to a codec, but rather a
stream, and should thus not use the "Codec" name.
The BAP and ASCS specs refer to the QoS as
"QoS configuration" several places, so it is an obvious
choice for a name.
Since the structure is defined and used by BAP, the prefix
was changed from bt_audio to bt_bap.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit introduces architecture-specific ELF relocations for RISC-V,
in accordance with the RISC-V PSABI specification:
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
Also, the necessary compiler configurations for compiling LLEXT
extensions on RISC-V are added, and the llext tests are executed on
RISC-V targets.
Calling llext extensions from user threads in RISC-V is still
unsupported as of this commit.
Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
Use security mode (PSK or X509) to detect if we should
set the socket option to verify hostname.
PSK security mode cannot verify hostnames as this information
is coming in the certificate, so don't set the options.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
In case NET_NATIVE is disabled, certain network stack components do not
need to be compiled. Otherwise, they could throw errors if
--no-gc-sections compiler options is enabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add SYS_SEM_LOCK() and SYS_SEM_LOCK_BREAK which are mostly the
same as K_SPINLOCK() and K_SPINLOCK_BREAK.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
We already have `DT_HAS_COMPAT_STATUS_OKAY` and
`DT_NUM_INST_STATUS_OKAY`, it seems intuitive to assume that
`DT_NODE_HAS_STATUS_OKAY` exists, so much so that it was used
before it's implemented.
This patch implements `DT_NODE_HAS_STATUS_OKAY`, which is
equivalent to: `DT_NODE_HAS_STATUS(<node_id>, okay)`
Added test for it in `tests/lib/devicetree/api`
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
- Implement irq-set-affinity in RISCV PLIC.
- Added new affinity shell command to get/set the irq(s)
affinity in runtime, when `0` is sent as the `local_irq`, it
means set/get all IRQs affinity.
- Some minor optimizations
Updated the build_all test to build this new configuration.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Removes duplicate declaration of the bridging direction, keeping the
one in the public header file.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds the `bt_mesh_brg_cfg` prefix to the public Subnet Bridge API, and
aligns the function and callback naming with the rest of the Bluetooth
Mesh API.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
This patch renames the identifiers for the structs in the LLEXT symbol
tables to have a prefix of "__llext_sym_". This is done so existing
scripts like gen_device_deps.py do not confuse them with the object
they are referring to.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
`DT_..._REG_ADDR` macros do not always return an unsigned value. This
commit adds and unsigned 32bit prefix to ensure the value is always
unsigned.
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
As this is a header, let's explicitly initialize all members of the
struct to avoid a "missing initializer for member" warning in case the
file is built with -Wmissing-field-initializers, or worse, that warning
set to be an error.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Unlike a normal IRQ, a multilevel IRQ can't be incremented by
simply `irq++`, as that would always increment the L1 of a IRQ,
regardless of its level. A function that understands the level
for which the IRQ operates in is required.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Use a union struct to partition the bits in a
multilevel-encoded interrupt number instead of manipulating
the bits manually, which is tedious and error prone.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
When `CONFIG_MULTI_LEVEL_INTERRUPTS` is enabled, bits in a
`uint32_t` is always partitioned into 3 levels, we can safely
remove the `CONFIG_*_LEVEL_INTERRUPTS` checks so that the
APIs always works.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The IRQ for level 1 and above is incremented by 1 when encoded
with Zephyr's multilevel IRQ scheme, so it should be
decremented by 1.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The `resolving` is used to flag the status that the stack is requesting
remote device name.
It is better to use the type `bool` instead of the original type
`uint8_t`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Move `struct discovery_priv` to classic.h
Rename `struct discovery_priv` to `struct bt_br_discovery_priv`.
Modify the structure `struct bt_br_discovery_priv` with `@private`.
Change field `_priv` of `struct bt_br_discovery_result` from
`uint8_t _priv[4]` to `struct bt_br_discovery_priv _priv`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Remove BR discovery callback from bt_br_discovery_start.
All discovery results will be notified through callback
registered by bt_br_discovery_cb_register.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
The results of inquiry and extended inquiry
are only reported from application level
after the inquiry complete event notified.
While the event of inquiry result is notified
by controller in real time.
It is not a good user experience.
Just like scanning of LE, add a listener
cb for discovery.
When the event of inquiry result, extended
inquiry result, or remote name request
complete notified, call listener `recv`
cb to notify the upper layer.
When the event of inquiry complete
notified or no pending of remote name
request , call listener `timeout`
cb to notify the upper layer.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
A libmetal "generic" device is created, then opened and used for its IO
regions. Since we are adding these IO regions in the first place there
is no reason for this layer of indirection.
Signed-off-by: Andrew Davis <afd@ti.com>
Update the documented value range that `uart_irq_tx_ready` returns in
order to provide more information to the callers about the number of
bytes that could be writted with `uart_fifo_fill` without fragmentation.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Move the `Z_THREAD_LOCAL` macro from
`include/zephyr/toolchain/common.h` to `include/zephyr/types.h`.
This is needed since some `syscall.h` files are using TLS but aren't
including `zephyr/toolchain.h` (but they are including
`zephyr/types.h`).
Signed-off-by: Daniel Flodin <daniel.flodin@iar.com>
Enable Cortex R8 support, similar to Cortex-R5.
Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
The unicast_stop function is changed to primarily do a
BAP disable instead of a release, with optional
support for releasing the streams once they have been disabled.
This also adds unittests for the procedure which also
allow us to remove the invalid param testing from the BSIM tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Generating sections via DT memory attributes did not work for the
platform as only the memory region was created so far.
This change adds the DT_LINKER_SECTION() macro to the linker script so
that the appropriate sections will be generated, too.
Fixes#79085
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
Move FIELD_* macros from zephyr/sys/util.h to zephyr/sys/util_macro.h,
as zephyr/sys/util.h cannot be used from device tree.
Device tree uses zephyr/dt-bindings/dt-util.h, which includes
zephyr/sys/util_macro.h.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Some devices, e.g. SoC level devices like I2C peripheral, can never be
powerd off as they are always energized. Such devices can only go from an
active state or to a low power state (suspended). Allow them to simply
return -ENOTSUP when called with TURN_ON (or TURN_OFF).
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Using INPUT_CALLBACK_DEFINE_NAMED would not add the _input_callback__
prefix to the given callback name. This can result in namespace clashes.
Signed-off-by: Gero Schwäricke <gero.schwaericke@posteo.de>
This commit makes the rom_start relocation introduced in
commit 8ef8e8b497 available for Cortex-A/R CPUs.
Signed-off-by: Simon Maurer <mail@maurer.systems>
Some LLEXT objects can include sections, that should not be merged
with other sections of the same type. E.g. when such sections should
be placed into locations, other than the default. Add support for
such sections.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Make llext_loaded_sect_ptr() a proper function to be able to call it
from platform LLEXT code.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit adds C++20 onwards support for the
PINCTRL_DT_STATE_INIT macro. Since C++20, support was
added for designated initializers but with the restriction that
they're ordered. PINCTRL_DT_STATE_INIT initializes a
pinctrl_state struct but the current initializer list is un-ordered,
this PR resolves that for >= C++20 compat
Signed-off-by: Chandler Keep <chandlersamkeep@gmail.com>