Commit graph

97370 commits

Author SHA1 Message Date
Daniel DeGrasse
a0e3dd1f87 drivers: display: st7789v: convert to MIPI DBI API
Convert ST7789V display driver to use MIPI DBI API. This commit also
updates in tree boards to use the new devicetree syntax needed to enable
this display with the MIPI DBI API.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-13 09:22:54 +02:00
Nicolas Pitre
d8a891b563 tests: demand_paging: add a test for k_mem_unmap()
Make sure k_mem_unmap() completes successfully on memory that is half
paged-out and such memory is no longer accessible afterwards.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 09:22:39 +02:00
Nicolas Pitre
0313091287 kernel: mmu: make k_mem_unmap() work with demand paging
If a page is paged out or paged in but unaccessible for the purpose of
tracking the "accessed" flag then k_mem_unmap() may fails. Add the code
needed to support those cases.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-06-13 09:22:39 +02:00
Valerio Setti
30c9f5eaa5 net: add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
Add proper PSA_WANT kconfigs for TLS sockets and RSA key exchanges
when CONFIG_PSA_CRYPTO_CLIENT is set.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-13 09:22:20 +02:00
Valerio Setti
30717437f5 jwt: add missing PSA_WANT dependencies to RSA signature
This commit add the proper PSA_WANT kconfigs which are required
to perform an RSA signature when a PSA crypto provider is
available in the system (i.e. CONFIG_PSA_CRYPTO_CLIENT is set).

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-13 09:22:20 +02:00
Nazar Palamar
e18c4fe654 boards: infineon: cyw20829m2evk_02: update memory partitions map
With current memory map configuration we have build error
with some samples where enabled no_optimization option.

So update memory partitions map as following:

ram:
sram:            : 244k  (addr 0x20000000)
sram_bootstrap   : 12k   (addr 0x2003D000)

flash:
toc2_region      : 80b   (addr 0x60000000)
bootstrap_region : 12k   (addr 0x60000050)
app_region       : 435k  (addr 0x60003050)
storage_partition: 64k   (addr 0x60070000)

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2024-06-13 09:21:59 +02:00
Eric Holmberg
2477b699ed boards: luatos: esp32s3: update USB serial to use board variant
Replace reference to separate USB config to use the HWMv2 board variant
instead.

Fixes #74041
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2024-06-13 09:21:40 +02:00
Fin Maaß
d18fd46e99 tests: json: add a test for JSON_TOK_ENCODED_OBJ
add a test for JSON_TOK_ENCODED_OBJ

Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 21:15:27 -04:00
Fin Maaß
01c40dda1f json: add JSON_TOK_ENCODED_OBJ
add support to include a already encoded object
to a object

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-06-12 21:15:27 -04:00
Lothar Felten
7fef853015 boards: lilygo: ttgo_t8c3: initial support
adds initial support for Lilygo TTGO T8-C3 board

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
2024-06-12 21:15:09 -04:00
Mykola Kvach
79d32aa0c1 tests: sd: sdmmc: add rcar_h3ulcb_r8a77951_a57 board to test
Add RCar h3ulcb Cortex A57 board to test.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Mykola Kvach
10363eb898 boards: rcar_h3ulcb_r8a77951_a57: add SD node to dts and describe SD pins
Add SD node to dts and describe SD pins.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Mykola Kvach
701c278eeb boards: rcar_spider_s4: add MMC node to dts and describe MMC pins
Add MMC node to dts and describe MMC pins.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Mykola Kvach
636091adb8 boards: renesas: set power-source property for MMC pins
Set power-source property for MMC pins for h3ulcb (a57) and
Salvator XS boards.

Signed-off-by: Mykola Kvach <xakep.amatop@gmail.com>
2024-06-12 21:14:49 -04:00
Lyle Zhu
6458c5ab1f Bluetooth: HFP_AG: fix building warning
Give `err` a initialization value 0.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
bbfa3bc1b9 Bluetooth: HFP_AG: Optimize lock/unlock of the SCO creating
When testing https://github.com/zephyrproject-rtos/zephyr/pull/72090/,
there is an issue found.

The change in the previous commit is to put all data sending
operations into the work queue context, and lock the current
AG before sending data.

And in change of #72090, the HCI TX thread is removed. All
sending sequence are happened in work queue context.

There is a possible problem when AG creates a SCO connection
by calling the function bt_conn_create_sco. Before the
function bt_conn_create_sco is called, AG will be locked to
avoid creating repeated SCO connection.
And the execution of the function bt_conn_create_sco
depends on the work queue. Because the HCI command of
function bt_conn_create_sco is sent in work queue context.

In the normal case, there is not any issue.
But there is a case that when the function
bt_conn_create_sco is being executed, there is a pending AG
TX waiting to be executed.

Once the work queue starts executing the handler, the AG TX
handler is executed first. Since the lock has been acquired
by other threads, the AG TX handler cannot acquire the lock.
As a result, the SCO connection creation fails.

Remove the AG lock from SCO creating. Instead, use a flag
to mark whether a SCO connection is be created.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
6939c8c02d Bluetooth: HFP_AG: Optimize the TX process
Due to the sent callback of RFCOMM is changed, the
sending buf need to be primed waiting for the
previous one to be completed. Add a worker for
this purpose.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
f055fe7165 bluetooth: hfp_hf: update channel sent callback prototype
Due to the parameter `buf` has been removed by rfcomm,
update the prototype of channel sent callback hfp_hf_sent.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
17e2564ff2 bluetooth: rfcomm: remove tx meta
Due to the sending buf cannot be referred
by sending layer.
It is unsafe to use `buf` identification
for a transmission, because the buf may
have been newly transmitted when the
sent callback is triggered.

Now instead, when the send completion
callback is received, the upper layer
is notified that a transfer is completed.
If multiple bufs are sent at the same
time, there is no guarantee which buf
is completed when the sent callback
triggered. Therefore, it is recommended
that the caller transfers the next data
block after the previous transfer is
completed.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Lyle Zhu
7f71ad38cc bluetooth: rfcomm: fix issue of sending buf invalid
There is a change (commit no.: 93d0eac834) that if
the `ref` of sending buf is not 1, the error code
`-EINVAL` will be returned from bt_conn_send_cb.

It causes the RFCOMM functionality cannot work
properly.

Remove the ref operation from the buf to be sent
to fix the issue.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-06-12 21:13:58 -04:00
Daniel Leung
7f6d600dd6 kernel: mm: rename z_num_pagefaults_get to k_mem_num_*
This is part of a series of moving memory management related
stuff out of 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
564ca11631 kernel: mm: rename z_page_fault() to k_mem_page_fault()
This is part of a series of move memory management related
stuff out of 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
9064652db9 tests: mem_protect/syscalls: exclude board numaker_m2l31ki
The board defconfig forces CONFIG_USERSPACE to be disabled
due to small number of available MPU regions which are not
enough for userspace testing.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-12 21:13:26 -04:00
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