Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upmerge 05.02.2024 #1478

Closed
wants to merge 3,724 commits into from
Closed

Upmerge 05.02.2024 #1478

wants to merge 3,724 commits into from

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Feb 6, 2024

No description provided.

andyross and others added 19 commits February 4, 2024 10:23
Traditionally, k_thread_create() has required that the application
size the stack correctly.  Zephyr doesn't detect or return errors and
treats stack overflow as an application bug (though obviously some
architectures have runtime features to trap on overflows).

At this one spot though, it's possible for the kernel to adjust the
stack for K_THREAD_STACK_RESERVED in such a way that the arch layer's
own stack initialization overflows.  That failure can be seen by
static analysis, so we can't just sweep it under the rug as an
application failure.

Unfortunately there aren't any good options for handling it here (no
way to return failure, can't be a build assert as the size is a
runtime argument).  A panic will have to do.

Fixes: #67106
Fixes: #65584

Signed-off-by: Andy Ross <[email protected]>
Since we can always lookup the group from the streams, the
group parameter had no purpose.

Signed-off-by: Emil Gydesen <[email protected]>
Modify the parameters for bt_cap_initiator_unicast_audio_update
so that they are more similar to
bt_cap_initiator_unicast_audio_start.

Signed-off-by: Emil Gydesen <[email protected]>
Modify the parameters for bt_cap_initiator_unicast_audio_stop
so that they are more similar to
bt_cap_initiator_unicast_audio_start.

Signed-off-by: Emil Gydesen <[email protected]>
It is observed that starting up CPU may result in other CPUs
crashing due to de-referencing NULL pointers. Note that this
happened on the up_squared board, but there was no way to
attach debugger to verify. It started working again after
moving z_dummy_thread_init() before smp_timer_init(), which
was the old behavior before commit
eefaeee where the issue
first appeared. So mimic the old behavior to workaround
the issue.

Fixes #68115

Signed-off-by: Daniel Leung <[email protected]>
Using the 8 base clock cycles per bit period setting (instead of 16)
reduces the uart baud rate error when using a 12MHz crystal (found on
many RA Microcontroller development kits boards). This setting also
slightly reduces the error when using the internal 48MHz oscillator,
used by the Arduino UNO R4 Minima board currently support by Zephyr.

Signed-off-by: Ian Morris <[email protected]>
The bindings documentation contains a deprecated pixel-format.

Signed-off-by: Joel Guittet <[email protected]>
The GC9X01X driver relies on panel.h instead of gc9x01x.h (doesn't
exist).

Signed-off-by: Joel Guittet <[email protected]>
This commit removes the need of swi_tables.ld file if the
ISR table generator is not configured to use it.

Signed-off-by: Radosław Koppel <[email protected]>
This fix removes the zephyr/ prefix from linker included files.
With this prefix the build works only for Ninja and not for
other build tools.

Linking in Zephyr / CMake:
 - Ninja invokes linking directly from <build>.
 - Make invokes linking form <build>/zephyr.

The linker default uses cwd for looking up INCLUDE directives if not found
in list of includes.
Zephyr always adds <build>/zephyr as link include using CMake,
and this is passed to ld as -L<build>/zephyr therefore using
INCLUDE isr_tables_swi.ld ensures it will be correctly found in all cases.

Signed-off-by: Radosław Koppel <[email protected]>
The VCP and MICP instances should use their respective
AICS and VOCS Kconfig options, rather than the overall
Kconfig options.

Signed-off-by: Emil Gydesen <[email protected]>
Some places MICP accessed AICS when it was not supported.

Signed-off-by: Emil Gydesen <[email protected]>
Some places VCP accessed AICS and VOCS when it was not supported.
Also modify existing guards to be consistent with new guards.

Signed-off-by: Emil Gydesen <[email protected]>
Fix coverity integer handling issue (CWE-188).
Modifying a variable through a pointer of an incompatible type (other
than unsigned char) can lead to unpredictable results.

Fix: #67965
Coverity-CID: 248434

Signed-off-by: Armando Visconti <[email protected]>
Initialize GCLK2 to output 1.024kHz required by watchdog timer.

Co-authored-by: Vlad Laba7 <[email protected]>
Signed-off-by: Gerson Fernando Budke <[email protected]>
With `CONFIG_XIP=y`, this linker script would derive the ROM region from
the chosen `zephyr,flash` DT node with "soc-nv-flash" or "jedec,spi-nor"
as its compatible. If the node was absent or had a different compatible,
then linking would fail with:

    undefined symbol `ROM_BASE' referenced in expression

Fix this by using `CONFIG_FLASH_BASE_ADDRESS` and `CONFIG_FLASH_SIZE`
for ROM base and size respectively. The existing DT logic is preserved
for compatibility with out-of-tree boards, so the flash Kconfigs serve
as a mere fallback.

In addition, use `CONFIG_FLASH_LOAD_OFFSET` and `CONFIG_FLASH_LOAD_SIZE`
if defined, to align with some other architectures' linker scripts. For
the existing in-tree RISC-V boards, this should not make a difference.

The alternative would've been making sure that all boards and SoCs have
the relevant Kconfigs set, and only using those in the linker script.
The downside is that `CONFIG_FLASH_SIZE` is given in units of 1 KiB,
while some existing boards - hifive1_revb, sparkfun_red_v_things_plus -
have more granular flash sizes, which would've been rounded down.

Signed-off-by: Grzegorz Swiderski <[email protected]>
The CST816S chip ID have an alternative value. It seems that this
field represents in fact a version number of controller. Fix by adding
the new chip ID.

Signed-off-by: Joel Guittet <[email protected]>
Commit b2eaa6448076 ("drivers: dma: intel-adsp-hda: add delay to stop
host dma") added a wait on GBUSY state to host DMA stop.

This is problematic as in some case (like SOF chain-DMA usage),
the host DMA side RUN bit is not cleared when intel_adsp_hda_dma_stop()
is called. It is not possible to wait on GBUSY bit as there are
valid cases where it can remain set.

Address the original problem described in SOF bug #8686 and add a
polling check for intel_adsp_hda_is_enabled(). As per the bug
description, in some cases the GEN/FIFORDY bits are not cleared
immediately and if a new call to intel_adsp_hda_dma_stop() is made, the
PM refcounting will go haywire.

Link: thesofproject/sof#8686
Signed-off-by: Kai Vehmanen <[email protected]>
Increase ZTEST and MAIN stack to 4k.

Fixes #57324

Signed-off-by: Dominik Ermel <[email protected]>
rlubos and others added 27 commits February 6, 2024 11:07
…l helper function phy2str"

This reverts commit 74b0d02.

Signed-off-by: Robert Lubos <[email protected]>
…er Control Request Feature"

This reverts commit 9d18c0a.

Signed-off-by: Robert Lubos <[email protected]>
…Procedure APIs"

This reverts commit 90bd941.

Signed-off-by: Robert Lubos <[email protected]>
…r Control Request Feature"

This reverts commit 6af5966.

Signed-off-by: Robert Lubos <[email protected]>
…g.tls-generic"

This reverts commit ca0298c.

Signed-off-by: Robert Lubos <[email protected]>
This reverts commit 4d76b6a.

Signed-off-by: Robert Lubos <[email protected]>
… into main

Updating to the latest Zephyr.

Signed-off-by: Robert Lubos <[email protected]>
Friend's replies on LPN's polls do not assume randomization in
advertiser. Zero randomization will help to optimize time when
LPN keeps receiving window open and save power.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit 88d5ef9)
(cherry picked from commit a5ab323)
(cherry picked from commit 4680099)
Signed-off-by: Robert Lubos <[email protected]>
Bring back parallel execution to the clang action. In the upstream
they went to use a single dedicated powerful agent to run this. We
need to keep this as we have to base on agents available in github's
cloud.

zephyr_runner is upstream's proprietary agent inaccessible outside of
upstream's CI. Use ubuntu-latest instead.

Signed-off-by: Maciej Perkowski <[email protected]>
Signed-off-by: Gerard Marull-Paretas <[email protected]>
Signed-off-by: Dominik Ermel <[email protected]>
Signed-off-by: Torsten Rasmussen <[email protected]>
Signed-off-by: Tomasz Moń <[email protected]>
Signed-off-by: Stephanos Ioannidis <[email protected]>
Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
(cherry picked from commit 5b3d0ff)
(cherry picked from commit 5e2f4ec)
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit 0948638)
(cherry picked from commit 4d76b6a)
Signed-off-by: Robert Lubos <[email protected]>
…neric

-This commit prevents legacy mbed TLS configurations from being in
 conflict with PSA Configurations while using nrf_security
-Removing use of unsupported TLS protocols (TLS 1.0, 1.1)
-Required configurations are duplicated inside nrf_security Kconfig
-Ensured that mbedtls_platform_zeroize is not duplicated when
 CONFIG_NRF_CC3XX_PLATFORM is set

ref: NCSDK-13503

Signed-off-by: Frank Audun Kvamtrø <[email protected]>
Signed-off-by: Andrzej Głąbek <[email protected]>
(cherry picked from commit 84ee8c8)
(cherry picked from commit ea5314d)
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit 8022c47)

[nrf noup] modules: mbedtls: Disable mbedtls_hardware_poll with CC3xx enabled

Precompiled CC3xx libraries silently provide mbedtls_hardware_poll
function (used internally by the library on initialization), which
creates ambiguity with Zephyr-provided implementation. In result, the
CC3xx entropy source is broken when CONFIG_MBEDTLS_ZEPHYR_ENTROPY is
enabled. Workaround this, by disabling the Zephyr implementation if
CC3xx is enabled, and let mbed TLS use the implementation from the CC
library instead.

Signed-off-by: Robert Lubos <[email protected]>
(cherry picked from commit e2ad826)
(cherry picked from commit ca0298c)
Fixes issue where randomness can be removed for advertising sets that
have to handle other adv types than the BT_MESH_FRIEND_ADV tag type.

Signed-off-by: Anders Storrø <[email protected]>
(cherry picked from commit f8f1133)
(cherry picked from commit 996037d)
(cherry picked from commit 62a4cad)
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit 3afe293)
Signed-off-by: Robert Lubos <[email protected]>
Partition Manager (PM) is a component of the nRF Connect SDK (NCS)
which uses yaml files to resolve flash partition placement with a
holistic view of the entire device, including each firmware image
present on the flash device, and various subsystems, such as settings
and NFFS.

When this NCS extension is used, various source files which would use
partition information from devicetree in "vanilla" zephyr instead use
defines generated by PM instead.

This commit removes support for HEX_FILES_TO_MERGE, as it conflicts
with PM.

The settings subsystem pm.yml defines a partition 'settings_storage'.
The nffs subsystem pm.yml defines 'nffs_storage'.

Leverage label translation to avoid patching partition names.

Refer to the NCS documentation page for this feature for more details.

This is a long-running out of tree patch which has been worked on by
several people. The following sign-offs are in alphabetical order by
first name.

Signed-off-by: Andrzej Głąbek <[email protected]>
Signed-off-by: Andrzej Puzdrowski <[email protected]>
Signed-off-by: Håkon Øye Amundsen <[email protected]>
Signed-off-by: Ioannis Glaropoulos <[email protected]>
Signed-off-by: Joakim Andersson <[email protected]>
Signed-off-by: Johann Fischer <[email protected]>
Signed-off-by: Martí Bolívar <[email protected]>
Signed-off-by: Ole Sæther <[email protected]>
Signed-off-by: Robert Lubos <[email protected]>
Signed-off-by: Sebastian Bøe <[email protected]>
Signed-off-by: Sigvart Hovland <[email protected]>
Signed-off-by: Thomas Stenersen <[email protected]>
Signed-off-by: Torsten Rasmussen <[email protected]>
Signed-off-by: Øyvind Rønningstad <[email protected]>
Signed-off-by: Trond Einar Snekvik <[email protected]>
Signed-off-by: Gerard Marull-Paretas <[email protected]>
Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit ba54fe8)
(cherry picked from commit 68110ee)
(cherry picked from commit 12d1ebf)
(cherry picked from commit 5e8e748)
(cherry picked from commit d1fa3da)
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit a7fb268)
Usage of the Softdevice specific api has been adapted
to upstream adv changes.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit 533baa1)
Signed-off-by: Dominik Ermel <[email protected]>
(cherry picked from commit 36710de)
Signed-off-by: Robert Lubos <[email protected]>
TF-M 2.0.0 doesn't use the TFM_TEST_REPO_PATH anymore so removing it.

Signed-off-by: Markus Swarowsky <[email protected]>
QCBOR is only needed  by the TF-M tests, as they are not build separately due to the TF-M split build
By still setting it we get a CMake build warning

Signed-off-by: Markus Swarowsky <[email protected]>
    The TF-M crypto modules got renames from CRYPTO_XXX_MODULE_DISABLED to
    CRYPTO_XXX_MODULE_ENABLED
    Therefore also re naming it in zephyr build integration.

Signed-off-by: Markus Swarowsky <[email protected]>
The new Oberon PSA core (1.2.0) uses new PSA_WANT
symbols for the ECC and RSA keys. This adds these
new Kconfigs without removing the old ones to avoid
necessary changes in the configuration of an application.

Signed-off-by: Georgios Vasilakis <[email protected]>
Signed-off-by: Markus Swarowsky <[email protected]>
@rlubos rlubos force-pushed the upmerge-05-02-2024 branch from 7174c0c to adc2ceb Compare February 6, 2024 10:07
@gmarull
Copy link
Member

gmarull commented Feb 8, 2024

should now be updated, cherry-pick PR merged

@rlubos rlubos closed this Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment