Check if node identifier is valid to define and initialize device
metadata. Without this patch, "software devices", ie, DEVICE_DEFINE,
would fail to compile when enabling the device metadata feature.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Was getting the following error:
include/zephyr/sys/fdtable.h:150:38: warning: 'struct k_mutex'
declared inside parameter list will not be visible outside of
this definition or declaration
150 | struct k_mutex **lock);
| ^~~~~~~
(#51667) tried to fix this by including `zephyr/sys/mutex.h`,
but `struct k_mutex` is defined in `zephyr/kernel.h`, so
include the latter instead.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
When logging strings are stripped then addresses to log module
names are invalid. Do not store that address in the const
data structure associated with the logging module to avoid
someone accessing it. Store null instead.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The package_len has been extended from 10 bits to 11 bits
in the log message header. So the format for dictionary
logging also needs to be updated.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Move information about device power state constraints from device
to policy.
It slows down the constraints lookup since we now have to find the
constraints for a device in a global array, but it saves resources
because we don't need to add a reference to constraints in all devices
instances.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
MWDT requires function to be declared with argument types.
This PR provides explisitly type cast for out routine
inside z_cbvprintf_impl().
This PR also actual to LLVM-based compilers with strict
rules of compilation. It covers warnings generated with
additional flag -Wincompatible-function-pointer-types-strict.
This fixes https://github.com/zephyrproject-rtos/zephyr/issues/74562
Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.
The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.
Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.
Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Implementation of the generic API Trusted Execution Environment driver.
This implements all basic syscalls, needed by tee driver, basic
defines and helpers to work with shared memory.
Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
Fix the devicetree bindings to actually be used as the default
configuration, following the example set by various ST sensor devices.
This requires sadly dropping enums and using #defines for various
options as well as repeating many numbers, but presumably is the way to
do it given the precedent set by ST with sensors like the lsm6dso.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This is the initial commit to support for gpio driver
for RA8M1 MCU, the coding is base on renesas fsp hal
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
Add initial support for the Cortex-M85 Core which is an implementation
of the Armv8.1-M mainline architecture.
The support is based on the Cortex-M55 support that already exists in
Zephyr.
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
`bt_le_ext_adv_start` does not modify the `param` argument, which can
therefore be marked as `const`. This allows the struct to exist purely
in ROM.
Signed-off-by: Jordan Yates <jordan@embeint.com>
The cmux module does not properly cancel all work when it is
released from its modem pipe. Releasing CMUX must cancel all
work as the pipe is no longer available, as it is set to NULL.
If work remains which tries to transmit something to the now
released pipe, a NULL dereference occurs.
This exact issue occurs if a DLCI channel is trying to open
after the modem pipe has been released, as the CMUX component
will send an open request at a fixed interval.
The expected behavior is for the open request to be cancelled,
and further open requests to be prevented until cmux is again
attached to a pipe.
Lastly, added a check to ensure that the pipe is indeed released
when calling attach, to ensure all work is indeed stopped before
modifying the pipe and buffers.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
For each of the fdtable.h functions listed below, convert the
z_ prefixed semi-private functions to use the zvfs_ prefix.
ZVFS stands for Zephyr Virtual File System and
is intended to be a common library used by the C library,
POSIX API, Networking, Filesystem, and other areas.
There are already a few functions in fdtable.h that use the
zvfs_ prefix, so this change is mostly about unifying them in
a way that uses a suitable prefix ("namespace") so that it can
be considered a public API.
- z_alloc_fd
- z_fdtable_call_ioctl
- z_finalize_fd
- z_finalize_typed_fd
- z_free_fd
- z_get_fd_obj
- z_get_fd_obj_and_vtable
- z_get_obj_lock_and_cond
- z_reserve_fd
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This is a follow-up to commit ff0f389d0b.
When the `zephyr,differential` property is used together with a driver
that selects `ADC_CONFIGURABLE_INPUTS`, the `differential` field is
initialized twice what causes a compilation error in C++. Fix this by
refactoring the logic around initialization of `.differential`.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
The recent changes to the loader code merged related sections together,
making sure the merged sections are self-coherent. This, however, did
not take into account that the original ELF sections are now a _subset_
of the merged section - and might not start from the beginning of the
merged section.
This patch converts the `sect_map` member of `struct llext_loader` to a
structure with two fields:
- mem_idx: the memory area index where the ELF section is mapped
- offset: the offset of the ELF section inside the memory area
The offset is calculated after all sections are merged and the final
groups are defined. This will allow the loader to correctly calculate
the address of symbols and relocations in the merged sections.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
* Move ctors and init_array from the CPP library
to the kernel library, as this is common for both C
and C++ and it is the kernel who is running it.
* Rename the hidden kconfig option CPP_STATIC_INIT_GNU
STATIC_INIT_GNU instead.
* If STATIC_INIT_GNU is not selected verify there is
constructors left behind.
* Rename common-rom-cpp.ld to common-rom-init.ld
* Rename z_cpp_init_static to z_init_static,
and have the kernel always call it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Signed-off-by: Keith Packard <keithp@keithp.com>
Rename uhc_dev parameter of USBD_DEVICE_DEFINE macro to udc_dev to
reflect that this is a USB Device Controller device and not a USB Host
Controller device.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
lld will produce warnings for the symtab, strtab, and shstrtab sections
if --orphan-handling=warn is specified and there are no matching rules
in the linker script for these sections.
Handle these sections when building with lld to prevent the warnings.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
None of the moved definitions are meant to be used by any code outside
of arch/arm64/core/mmu.c. Move them away from global scope to the
private header where more such definitions already live.
This is especially relevant as the previous commit fixed some of those
definitions which then caused conflicts with some external SDK that
carries a copy of those original buggy definitions.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Inverting a mask whose type has only 32 bits doesn't produce the
expected result. Fix those to be 64-bit values.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
According to "Arm A-profile Architecture Registers",
Interrupt Controller Software Generaated Interrupt
Group 1 Register (ICC_SGI1R), AFF is 8 bits width
and the mask should be 0xFF but not 0xF.
Cortex_a_r is okay and no need to be fixed.
Signed-off-by: Steven Shen <steven.shen@jaguarmicro.com>
Tested-by: Rex Nie <rex.nie@jaguarmicro.com>
Add modem pipelink header to doc group modem_pipelink and add
this group to the modem group.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Currently iterable sections as per the documentation are added with
zephyr_linker_sources(SECTIONS ...) after bss/noinit.
This commit allows putting sections after common-rom.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>