Commit graph

97347 commits

Author SHA1 Message Date
Daniel Leung
54af5dda84 kernel: mm: rename z_page_frame_* to k_mem_page_frame_*
Also any demand paging and page frame related bits are
renamed.

This is part of a series to move memory management related
stuff out of the Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
7715aa3341 kernel: mm: rename Z_SCRATCH_PAGE to K_MEM_SCRATCH_PAGE
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
01682756b6 kernel: mm: rename Z_VM_RESERVED to K_MEM_VM_RESERVED
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
a459cdf51e kernel: mm: rename Z_FREE_VM_START to K_MEM_VM_FREE_START
This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
b2784c9145 kernel: mm: rename Z_KERNEL_VIRT_* to K_MEM_KERNEL_VIRT_*
Renames:
  Z_KERNEL_VIRT_START to K_MEM_KERNEL_VIRT_START
  Z_KERNEL_VIRT_SIZE to K_MEM_KERNEL_VIRT_SIZE
  Z_KERNEL_VIRT_END to K_MEM_KERNEL_VIRT_END

This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
03eded1ed6 kernel: mm: rename Z_VIRT_RAM_* to K_MEM_VIRT_*
Renames:
  Z_VIRT_RAM_START to K_MEM_VIRT_RAM_START
  Z_VIRT_RAM_SIZE to K_MEM_VIRT_RAM_SIZE
  Z_VIRT_RAM_END to K_MEM_VIRT_RAM_END

This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
3fd66de508 kernel: mm: rename Z_PHYS_RAM_* to K_MEM_PHYS_*
Renames:
  Z_PHYS_RAM_START to K_MEM_PHYS_RAM_START
  Z_PHYS_RAM_SIZE to K_MEM_PHYS_RAM_SIZE
  Z_PHYS_RAM_END to K_MEM_PHYS_RAM_END

This is part of a series to move memory management related
stuff from Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
b6f951b99e kernel: mm: rename Z_VM_OFFSET to K_MEM_VM_OFFSET
This is part of a series to move memory management related
stuff from the Z_ namespace into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
def364ab08 kernel: mm: rename Z_BOOT_* to K_MEM_BOOT_*
Rename Z_BOOT_VIRT_TO_PHYS() and Z_BOOT_PHYS_TO_VIRT() to
K_MEM_BOOT_VIRT_TO_PHYS() and K_MEM_BOOT_PHYS_TO_VIRT()
respectively. This is part of a series to move memory management
functions away from the Z_ namespace and into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
2d2bbc05d6 kernel: mm: rename Z_VM_KERNEL to K_MEM_IS_VM_KERNEL
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
db9d3134c5 kernel: mm: rename Z_MEM_PHYS/VIRT_ADDR to K_MEM_*
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
50640cb1b8 kernel: mm: rename Z_MEM_VM_OFFSET to K_MEM_VIRT_OFFSET
This is part of a series to move memory management functions
away from the z_ namespace and into its own namespace. Also
make documentation available via doxygen.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
552e29790d kernel: mm: rename z_phys_un/map to k_mem_*_phys_bare
This renames z_phys_map() and z_phys_unmap() to
k_mem_map_phys_bare() and k_mem_unmap_phys_bare()
respectively. This is part of the series to move memory
management functions away from the z_ namespace.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
295254a96b kernel: mm: remove k_mem_phys_un/map()
These functions were introduced alongside with the memory mapped
stack feature, and are currently only being used there only.
To avoid potential confusion with k_mem_un/map(), remove them
and use k_mem_map/unmap_phys_guard() directly instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Daniel Leung
9f9dd264d8 kernel: mm: rename k_mem_un/map_impl to k_mem_*_phys_guard
The internal functions k_mem_map_impl() and k_mem_unmap_impl()
are renamed to k_mem_map_phys_guard() and
k_mem_unmap_phys_guard() respectively to better clarify
their usage.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
Tom Burdick
98b26c6ca8 rtio: Remove builtin iodev mpsc queue
I/O Devices were meant to be handles of sorts and had a built in mpsc queue
as this made sense initially. As time has gone on it turned out that often
we wanted the mpsc queue to be an implementation detail hidden in a driver.
In fact pretty much all drivers work this way now.

Keeping the struct mpsc queue as a member of rtio_iodev meant wasted memory
in cases where it wasn't used. It also meant a bit of confusion as the
queue might be accidently used in places where it shouldn't be.

Remove the mpsc queue member from struct rtio_iodev and the last remaining
usages of it. Will ensure RTIO for 3.7 LTS avoids causing unneeded churn
for future users.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-06-12 21:12:54 -04:00
Flavio Ceolin
9e623fa9ac doc: relnotes/3.7: Add info about CVE-2024-5931
Information about CVE-2024-5931 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-12 21:12:33 -04:00
Flavio Ceolin
7c0863d9fd doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-5931

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-12 21:12:33 -04:00
Flavio Ceolin
fe867b3e49 doc: relnotes/3.7: Add info about CVE-2024-5754
Information about CVE-2024-5754 in release notes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-12 21:12:33 -04:00
Anas Nashif
eaafd30b56 twister: cleanup how we capture results of handlers
we use reason for a failure to indicate state and then set the status
later and reason for the failure, in case of the failure is taken from
the handler status. Clean this up by setting status and reason coming
from the handler very early, so we do not have to go through replacing
meaning later.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 21:12:13 -04:00
Dong Wang
749566ac48 kernel/init: use zephyr's stack size macro for main/idle thread creation
As their stacks are defined by zephyr's kernel/thread stack definition
macro, better use zephyr's kernel/thread stack size macro for their stack
size, ensuring consistency and preventing potenial issues related to stack
size misconfiguration.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-06-12 21:11:02 -04:00
Wilfried Chauveau
fef0e8a211 arch: arm: cortex_m: update inline comment pointing to isr_wrapper.*
isr_wrapper has been converted to C but this inline comment was not
updated. This fixes the out-of-sync comment.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-12 18:29:12 -04:00
Wilfried Chauveau
e09a68b8f3 doc: hardware: arm: Update links to various source files
These files have been moved/renamed as the project grew but this part of
the documentation has gotten out of sync.
This fixes the most obvious discrepancies.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-12 18:29:12 -04:00
Wilfried Chauveau
42ce6d1b90 doc: develop: optimizations: make pahole example independent from arch
The paths in the output snippet no longer reflect realistic paths in
zephyr.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-06-12 18:29:12 -04:00
Kai Vehmanen
1bc51640d3 shell: shell_adsp_memory_window: fix invalid cast in struct init
Fix invalid cast in SHELL_ADSP_MEMORY_WINDOW_DEFINE(). The type used in
the cast (struct shell_memwindow) refers to a non-existant type. As the
initialized struct field is of type "void *", compiler does not complain
about it, so there were no build warning/errors seen.

Reported-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-06-12 18:28:20 -04:00
Jamie McCrae
f1410959fd doc: sysbuild: Add tag for application configuration section
Adds a tag to the sysbuild application configuration section so it
can be referenced in other documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-12 18:27:14 -04:00
Félix Piédallu
52c92159cd scripts: More explicit error in west_commands for NRF flashing
Instead of suggesting a python dep is missing, tell the user intelhex is
missing.

Signed-off-by: Félix Piédallu <felix@piedallu.me>
2024-06-12 18:26:29 -04:00
Declan Snyder
84f622c7d1 boards: frdm_rw612: Enable ethernet
Enable the ethernet on the FRDM_RW612 board.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
55607f6d5d boards: rd_rw612_bga: Enable ethernet on board
Enable ethernet on the NXP board RD_RW612_BGA.
This requires a variant because it requires a board rework,
which will disable some other features. The variant allows
us to use an overlay to represent this.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
29d6d36794 soc: rw6xx: Add ENET to DT and suppport
Add NXP ENET DT nodes to RW6XX DT, and reset
the clock roots for the ENET IPG in soc.c.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
a5a2dbacbd drivers: nxp_enet: Support RW6XX series
Support RW6xx series in NXP ENET driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
572433538d drivers: nxp_enet: Fix Kconfig dependency DCACHE
The NOCACHE symbol should be dependent on CPU_HAS_DCACHE here.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
430f3a448a drivers: clock_control_mcux_syscon: Support ENET
Support NXP ENET clock control in the LPC syscon clk driver.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Declan Snyder
a84335eedf boards: rd_rw612_bga: Move compatible to dtsi
Move compatible property and model to dtsi file
of rd_rw612_bga board since it will be the same
for all variants.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-12 18:24:48 -04:00
Anas Nashif
c20e798646 arch: call arch_smp_init() directly, do not use SYS_INIT
Move this to a call in the init process. arch_* calls are no services
and should be called consistently during initialization.

Place it between PRE_KERNEL_1 and PRE_KERNEL_2 as some drivers
initialized in PRE_KERNEL_2 might depend on SMP being setup.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-12 18:23:54 -04:00
Daniel DeGrasse
9f4c849ac0 samples: add rt1064 to display samples with shield
Add RT1064 EVK to platform-allow list for display sample tests with
RK043* based shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:39 -04:00
Daniel DeGrasse
5d62e87d9d boards: nxp: mimxrt1064: remove display, document usable shields
Remove display definition from MIMXRT1064 EVK, and document the shields
that can be used with the board's FPC 40+6 pin parallel display
interface.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:39 -04:00
Daniel DeGrasse
d27a352ac1 samples: add rt1040 to display samples with shield
Add RT1040 EVK to platform-allow list for display sample tests with
RK043* based shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:15 -04:00
Daniel DeGrasse
0d0e47377b boards: nxp: mimxrt1040_evk: add display support
Add display support for the RT1040 EVK, using the RK043* series panels
defined as shields in Zephyr.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-12 18:18:15 -04:00
Michał Barnaś
0b4365ef29 usbc: add support for TCPC control of vbus sourcing
Adds calls to the set_src_ctrl of TCPC driver to enable and disable
the VBUS sourcing. If the TCPC doesn't support these functions,
no errors should be printed.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2024-06-12 18:17:17 -04:00
Michał Barnaś
44e4270a28 usbc: add setter function for sink and source control
Add set_snk_ctrl and set_src_ctrl functions to TCPC API to allow
controlling the sourcing and sinking vbus.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2024-06-12 18:17:17 -04:00
Gerard Marull-Paretas
bf574a0854 soc: add deprecation warning if using HWMv1 SoCs
While all in-tree SoCs have been ported to HWMv2, Zephyr still supports
out-of-tree SoCs in HWMv1 format, including boards. Add a clear
deprecation message so that users get notified that this is a deprecated
feature to be removed in the future.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-06-12 17:16:40 -05:00
Krystian Dolatowski
317abcc589 sensor: fix fallthrough on sample_channel_get on AQI
fixed fallthrough on getting channel AQI value from ENS160

Signed-off-by: Krystian Dolatowski <kryqpl1@gmail.com>
2024-06-12 18:16:29 -04:00
Benjamin Cabé
c44b777221 drivers: display: make driver API structs const
Save precious RAM by making sure driver API structs are declared as
const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-12 17:16:17 -05:00
Henrik Brix Andersen
6a29c79d4e drivers: usb: native posix: add option for enabling high speed support
Add Kconfig option for enabling high speed USB support for the native posix
USB controller driver.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-06-12 17:15:58 -05:00
Andries Kruithof
a435dd3ee0 Bluetooth: Audio: CAP broadcast reception start bugfix
When validating the parameters for broadcast reception start some
return statements were missing, they have been added, as well as
proper initialisation of a variable

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-06-12 18:15:38 -04:00
Torsten Rasmussen
0d51cb08c4 cmake: remove dead 'soc_legacy' folder handling
During HWMv2 migration, non-ported SoCs were placed in a 'soc_legacy'
folder and sourced from there instead of 'soc' folder.

Remove the no-longer needed soc_legacy folder.

CMake oot SoCs in old hardware model are sourced from
'<soc-root>/soc/<arch>/<soc-path>' which has always been the case, also
before HWMv2.

Remove the 'osource "soc/soc_legacy/...' generation in Kconfig, because
the source is relative to Zephyr base.
All SoCs in Zephyr repository has been ported to the new hardware model
and therefore there is no need for this line.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-06-12 17:15:28 -05:00
Luis Ubieda
ae833cd04f MAINTAINERS: Add ubieda to RTIO
Add self as a RTIO collaborator.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-12 18:15:12 -04:00
Emil Gydesen
4c31e4b337 Bluetooth: BAP: Fix missing len increment when merging non-LC3 data
If we are merging subgroup and BIS codec configuration data
for a codec other than LC3, then we just append them, but
did not properly update the length.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-12 17:15:00 -05:00
Rubin Gerritsen
2712b32941 Bluetooth: Document that bt_disable() doesn't touch callbacks
A naive implementation would look like

```c
void bt_init()
{
  bt_le_conn_cb_register();
  bt_enable();
}
```

When the app later adds the possibility to enable and disable
Bluetooth, it may happen that the application developer calls
`bt_init()` instead of `bt_enable()`. This results in invalid
behavior. This kind of bug is currently a bit harder to debug
as the callback register APIs do not reject registering a
callback twice.

Improving the API documentation is the first step towards making
this a bit more user friendly.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-06-12 17:13:13 -05:00