-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
arch: build: interrupt: encode multi level IRQ with C macro magic #63289
Conversation
f89b1be
to
eede7b9
Compare
Looks good to me - definitely want to get @mbolivar-ampere to go over things with a fine-tooth comb, and ensure that public DT APIs are documented. |
Also worth noting, is that this is actually critical to close residual bugs from using bitmaps to encode a variable number of interrupts per level in a multi-level interrupt context, since the magic number As is it, the code in I believe it's also critical for multi-instance PLIC support. |
1b8115d
to
8a838a3
Compare
8a838a3
to
9e5ec86
Compare
Force pushed a documented and cleaner version |
06635e6
to
637c1be
Compare
Add tests for new DT APIs added in the previous commit: - `DT_IRQN_BY_IDX` - `DT_INST_IRQN_BY_IDX` Added additional tests for the following existing DT APIs when `CONFIG_MULTI_LEVEL_INTERRUPTS` is enabled: - `DT_IRQN` - `DT_INST_IRQN` Added `qemu_riscv32` for the multi-level interrupt tests. Signed-off-by: Yong Cong Sin <[email protected]>
74bbd50
to
59499e3
Compare
rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mbolivar-ampere - would be good to get your stamp on this one. |
ping devicetree maintainers @mbolivar-ampere @galak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from the perspective of #62907.
Sorry - I twitched and merged. |
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After #63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After #63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
After zephyrproject-rtos#63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's interrupts properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]>
* drivers: w1: fix return check in bit_read for w1-gpio The driver masked the return value of a pin read operation before checking the error. Thus not detecting a potential error and leading to logically dead code, which was detected by coverity in CID 340853. Anther instance XORs 1 before returning, resulting in an unexpected return value; Signed-off-by: Thomas Stranger <[email protected]> * doc: add how to run application in QEMU on Windows Documentation does not describe how to run QEMU on Windows. Add description of steps needed to run QEMU and use QEMU with Twister on Windows in Beyond the Getting Started Guide. Add a reference to it in Aplication Development section. Tested using Windows 11 and QEMU installer from https://qemu.weilnetz.de/w64/ Signed-off-by: Michal Smola <[email protected]> * drivers: dma: dma_dw_common: Disable channel even if draining times out If the channel suspend with draining fails on stop because of reasons outside of the scope of the DMA driver (the peripheral is powered off before trying to drain for example) we must continue and disable the channel. The channel can be released by the client despite of it remained enabled. A new DMA channel request can pick the channel (as it is released) but re-configuration is going to be skipped and the use of the channel is going to fail. Then we will see the same drain timeout on channel stop again since the channel retained the configuration which resulted the first timeout. The drain timeout was made fatal by an earlier commit which fixed the WAIT_FOR return value handling. Fixes: 6226f9e6e44f ("dma: dw: fix the return value check") Signed-off-by: Peter Ujfalusi <[email protected]> * MAINTAINERS: Add myself as LED-strip collaborator I am applying for Collaborator on the recommendation of @simonguinot. Signed-off-by: TOKITA Hiroshi <[email protected]> * drivers: mipi_dbi: mipi_dbi_spi: change reset pin polarity Change reset pin polarity for MIPI DBI SPI controller, so that the board devicetree is responsible for setting the GPIO to active low, and the driver always sets the pin to a logic 1 to reset the display. Fixes #68562 Signed-off-by: Daniel DeGrasse <[email protected]> * doc: migration-guide-3.6: update MIPI DBI display migration note Update MIPI DBI display migration note to match the correct display configuration settings for reset and MIPI DBI command pins after ILI9xxx display was transitioned to this API. Signed-off-by: Daniel DeGrasse <[email protected]> * Kconfig LTO: Prevent with native simulator based targets LTO cannot be really used with the native simulator based targets neither today. When doing a partial link as we do for these targets the linker will complain if we are mixing LTO and non LTO built code, and fall back to only produce non-LTO output. (The link warning will cause twister to fail the test) Today not all inputs to this partial link are built with LTO enabled (offsets.c and the app library are not). Even if they were, the native targets are mostly a test and debugging facility, so optimizations like these are not beneficial in general. Let's just prevent selecting LTO for these targets. Signed-off-by: Alberto Escolar Piedras <[email protected]> * docs: update Golioth URLs Update outdated links. This includes a new repository address for the Golioth OTA sample and an updated path for the OTA documentation. Signed-off-by: Mike Szczys <[email protected]> * twister: pytest: update device id when testing with pytest harness Updated the instance with the device id to have it in the summary report also when using pytest harness. Signed-off-by: Grzegorz Chwierut <[email protected]> * Bluetooth: controller: Fix PHY Update TX Q Resume the TX Data Q when a LL_UNKNOWN_RSP is recieved instead of a LL_PHY_RSP. Update PHY Update unit test with more coverage of the TX Data Q pause state. Signed-off-by: Thomas Ebert Hansen <[email protected]> * Bluetooth: controller: Fix Data Length Update Before a LL_FEATURE_REQ is sent, verify that the Data Length Update procedure is still supported as it could have been unmasked as the result of a previously completed Feature Exchange procedure. Add unit test to verify the case of enqueuing both a Feature Exchange procedure and Data Length Update procedure, where the Feature Exchange procedure would result in the unmasking of the Data Length Update procedure. Signed-off-by: Thomas Ebert Hansen <[email protected]> * Bluetooth: BAP: Reset _prev_seq_num on ISO connection Once an ISO channel has connected, the sequence number always starts at 0. This reset was missing in the implementation, and the _prev_seq_num from a previous connection may have been kept. Signed-off-by: Emil Gydesen <[email protected]> * drivers: dma: dma_nxp_edma: query channel number from HAL config Currently, the number of channels supported by the controlled is computed based on the size of the channel array. This works well only if there's no gaps (i.e: "dma-channels" property is used or "valid-channels" property is used with contiguous channels) but will break if there are any gaps. For instance, if the user wants to use channels 16 and 17 and specifies them through the "valid-channels" property, they won't be allowed to do so because dma_request_channels() will stop at channel 1. As such, to fix this, simply use the number of channels from the HAL configuration which is the maximum number of channels. Signed-off-by: Laurentiu Mihalcea <[email protected]> * drivers: dma: dma_nxp_edma: switch to using DT_INST_IRQN_BY_IDX After #63289, multi-level interrupts are now encoded using macro magic. This means that using the generic DT_INST_IRQ_BY_IDX() to fetch the INTID is no longer an option as the queried INTID will be the one specified through the node's `interrupts` properties. To fix this, switch to using DT_INST_IRQN_BY_IDX() which will return the correctly encoded INTID. Signed-off-by: Laurentiu Mihalcea <[email protected]> * drivers: dma: dma_nxp_edma: add function for channel filtering The point of this commit is to allow users to request specific channels. The following code snippet shows how this may now be achieved: int requested_channel = 5; int ret = dma_request_channel(dev, &requested_channel); Signed-off-by: Laurentiu Mihalcea <[email protected]> * net: sockets: tls: Timeout DTLS with poll Changed poll to perform incoming data check with connected DTLS connections. This allows the CONFIG_NET_SOCKETS_DTLS_TIMEOUT to timeout the connections to server socket if there is no incoming data. Previously, if the remote client closed the DTLS connection without close notify, the timeout of the ongoing connection only happened when next connection was taken to the server socket. Depending on the timeouts, this could prevent the next connection from succeeding. Signed-off-by: Markus Lassila <[email protected]> * usb: device_next: correct internal class API documentation Correct documentation of the internal class API. Signed-off-by: Johann Fischer <[email protected]> * drivers: Fix signs in max31865 temperature calculation The reference document says that the formula for negative temperatures has two minus signs missing. fixes #68710 Signed-off-by: Tobias Röhmel <[email protected]> * usb: device_next: fix buffer count configuration in CDC ACM pool Multiple CDC ACM instances can block each other because there are only buffers for a single instance. Fix this by configuring the number of buffers in the pool based on the number of CDC ACM instances. Signed-off-by: Johann Fischer <[email protected]> * lib: acpi: Add more ASSERT() in ACPI table parsing Add more assert() to DMAR parsing functions. Signed-off-by: Andrei Emeltchenko <[email protected]> * lib: acpi: Add asserts catching overflow Add asserts catching sub-sctructure overflow. Signed-off-by: Andrei Emeltchenko <[email protected]> * tests: lib: acpi: Refactor DMAR structure and tests Refactor DMAR structure to allow more tests. Use fake void function for invalid size tests. Signed-off-by: Andrei Emeltchenko <[email protected]> * tests: lib: acpi: Add testing for dmar_foreach_devscope() Add unit testing for dmar_foreach_devscope() function. Signed-off-by: Andrei Emeltchenko <[email protected]> * tests: lib: acpi: Add testing acpi_dmar_ioapic_get() Add testing for acpi_dmar_ioapic_get() function. Signed-off-by: Andrei Emeltchenko <[email protected]> * tests: lib: acpi: Verify assert() on invalid size Catch assert() when invalid unit size is bigger then actual table or subtable size. Signed-off-by: Andrei Emeltchenko <[email protected]> * tests: lib: acpi: General header cleanup Cleanup headers and definitions to make code more readable. Signed-off-by: Andrei Emeltchenko <[email protected]> * tests: lib: acpi: Add test verifying assert on devscope overflow Add test verifying we catch assert() when subsctrucure is too big. Signed-off-by: Andrei Emeltchenko <[email protected]> * kernel: thread: Allow stack in coherent memory When allowing dynamic thread stack allocation the stack may come from the heap in coherent memory, trying to use cached memory is over complicated because of heap meta data and cache line sizes. Also when userspace is enabled, stacks have to be page aligned and the address of the stack is used to track kernel objects. Signed-off-by: Flavio Ceolin <[email protected]> * tests: dynamic_thread_stack: Fix problems in multicore When running it in a multicore and with incoherent cache environment it is possible that the thread allocating dynamic stacks is switched to a different cpu. In this situation further access to that memory (like when releasing resources) will be invalid. Signed-off-by: Flavio Ceolin <[email protected]> * net: tcp: Rate-limiting of neighbor reachability hints This commit implements simple rate-limiting for Neighbor Reachability Hints in TCP module to prevent the potentially costly process of frequent neighbor searches in the table, enhancing system performance. Signed-off-by: Łukasz Duda <[email protected]> * Bluetooth: conn: check for disconnected earlier when sending Verify the connection is active before popping the buffer from the TX queue. The current behavior enables a race condition between `create_frag` and the connection being torn down, as `buf` can be popped from the TX queue but not destroyed by `bt_conn_process_tx`. In that case, `buf` will be leaked. Original analysis and fix proposal by @watsug. Signed-off-by: Jonathan Rico <[email protected]> Reported-by: Adam Augustyn<[email protected]> * Bluetooth: conn: document obfuscated function: `send_buf()` It is unclear from a cursory glance at the code what the caller of `send_buf(buf)` should do with `buf` based on the returned error codes. Document when ownership is and isn't transferred to `send_buf()`. Signed-off-by: Jonathan Rico <[email protected]> * docs: bluetooth: mesh: Add note about reordering in randomization feat Add a note to the access randomization feature that reordering can happen and what should be done to avoid it. Signed-off-by: Pavel Vasilyev <[email protected]> * Bluetooth: Mesh: Disable randomization in DFD model for canceling update Disable randomization in the access layer when cancelling update in the distribution server model. This is needed because the server sends 2 messages in a row and the gets reordered by the access layer randomization feature making DFU/SR/FD/BV-43-C test to fail. This fixes DFU/SR/FD/BV-43-C test. Signed-off-by: Pavel Vasilyev <[email protected]> * Bluetooth: Mesh: Disable randomization on Link Close in RPR server Disable randomization at the access layer in the Remote Provisioning server when sending Link Stauts message as a responce on Link Close message and then sending Link Report message right after it. Because of the randomization, the report message is sent before the status message which makes MESH/SR/RPR/PDU/BV-03-C test to fail. This fixes MESH/SR/RPR/PDU/BV-03-C test. Signed-off-by: Pavel Vasilyev <[email protected]> * Bluetooth: HCI: Add full opcode to hci_types.h Mental arithmetic shouldn't be required to analyze logs. With this, a user can just "grep" the Bluetooth tree for the opcode reported in an HCI error. Signed-off-by: Jonathan Rico <[email protected]> * mgmt: hawkbit: Add error handling for HTTP requests This patch adds error handling for HTTP requests in hawkbit Signed-off-by: Fin Maaß <[email protected]> * net: ipv6: Improve Neighbor Discovery thread safety Currently, the only thread-safe part of the IPv6 Neighbor processing implementation are stale_counter related operation. Fix this, by extending the mutex protection over all of the module, so that message handlers, timers and API functions do not interfere with each other. As IPv6 Neighbor cache is tightly coupled with the Routing module, use the same mutex to protect both, neighbor and routing tables, to prevent deadlocks. Also, replace the semaphore used with a mutex, as it seems more fit for this particular job. Signed-off-by: Robert Lubos <[email protected]> * wifi: shell: added NULL check to net_mgmt callback By default variable context.sh is set to NULL. If any net_mgmt event will be called when the variable has default value, there will be a system exception. Signed-off-by: Wojciech Slenska <[email protected]> * doc: drivers: mipi-dbi: detail write-only and duplex options Add clarifications to mipi-dbi bindings to avoid the confusion between two options, write-only and duplex. Signed-off-by: Eve Redero <[email protected]> * boards: mimxrt1040_evk: Fix typo in CMakeLists.txt Fix typo of board dir variable in CMakeLists.txt Signed-off-by: Declan Snyder <[email protected]> * manifest: Update trusted-firmware-m to address LPC55S69 failure A bug was introduced with the TF-M 2.0 update. Patches have been submitted to the TF-M upstream and were also applied to the Zephyr fork. Details on the patches applied: Platform: nxp: Add initialization flag to the CMSIS USART driver. Avoid possible USART_Deinit() stuck found in Zephyr TFM MCUBoot. From Upstream TFM:SHA: I1f6c19c3e7e5556423ddf3aec7555ff44ed7e562 Crypto: Add FPU flags for p256m Fixes build error in #67751 From Upstream TFM:SHA: I4ed6f6ac7c1f52fb5ced18f0006dd3eb7a6a7359 Fixes #67751 Signed-off-by: David Leach <[email protected]> * drivers: led: lp50xx: brightness: don't check uint >= 0 No need to check if an uint8_t is greater or equal 0 in lp50xx_set_brightness. Fixes CID 322654 Signed-off-by: Thomas Stranger <[email protected]> * Bluetooth: BAP: Fix BASE_SUBGROUP_MAX_COUNT value The calculation for BASE_SUBGROUP_MAX_COUNT was off by one. The macro did not consider the non-subgroup parameters of the BASE that take up space. This effectively modifies BASE_SUBGROUP_MAX_COUNT to be 24 instead of 25. Signed-off-by: Emil Gydesen <[email protected]> * doc: release: 3.6: Adding additional ARM boards. This adds the Adafruit QTPy RP2040 and the Wiznet W5500 Evaluation Pico boards to the 3.6 release notes. Signed-off-by: Ian Wakely <[email protected]> * release: Zephyr v3.6.0-rc2 Sets the version to v3.6.0-rc2. Signed-off-by: Maureen Helm <[email protected]> * imxrt1010_evk: Fix i2c pinctrl dts i2c pads were incorrectly configured and failed to work when testing against an external fram part. Correct the i2c pinctrl settings for arduino i2c to match other boards in the mimxrt lineup. Signed-off-by: Tom Burdick <[email protected]> * tests: cmsis-dsp: rename tag to match west module name Rename all tags to match module name. Signed-off-by: Anas Nashif <[email protected]> * tests: devmux: fix test identifiers Fix test identifier, use correct component/sub-component. Signed-off-by: Anas Nashif <[email protected]> * doc: release: 3.6: Add notes about Atmel Add 3.6.0 release notes for Atmel. Signed-off-by: Gerson Fernando Budke <[email protected]> * doc: release: 3.6: Add notes about Gigadevices Add 3.6.0 release notes for Gigadevices. Signed-off-by: Gerson Fernando Budke <[email protected]> * drivers: adc: stm32: add dma support for stm32f4 adc Add ADC DMA support for STM32F4 (and similar series F2, F7 and L1) Signed-off-by: Guillaume Gautier <[email protected]> * tests: drivers: adc_dma: add nucleo_f401re to the adc_dma test Add Nucleo F401RE to the adc_dma test Signed-off-by: Guillaume Gautier <[email protected]> * drivers: serial: nrfx_uarte: Fix misbehavior due to preemption UART_RX_RDY event can be generated from UARTE interrupt or k_timer handler. When ENDRX event occurs then k_timer is stopped (it can be restarted if there is another buffer provided). However, if UARTE interrupt priority is higher than k_timer priority (RTC is used underneath) then k_timer handler may still be executed later. K_timer notifies new bytes based on RXDRDY HW event which is counter by the TIMER (using PPI). It may happen that RXDRDY event arrives due to byte received into RX FIFO but since there is not buffer provided it stays in that FIFO. Given all this, it was possible that RX_RDY event was reported from ENDRX UARTE event, timer was stopped but because UARTE interrupt had higher priority timer handler is executed after UARTE interrupt is handled. In timer handler TIMER counter reports more bytes and calls UART_RX_RDY event with null buffer and non-zero amount of bytes. Fixed by generating UART_RX_RDY event only if RX buffer is not null. Signed-off-by: Krzysztof Chruściński <[email protected]> * Bluetooth: ISO: Introduce bt_iso_chan_send_ts The bt_iso_chan_send function could take an optional timestamp by using 0 as an indicator. The issue with this approach was that a timestamp value of 0 is valid, and could cause potential issue with syncing streams in a group. To fully support transmitting with and without timestamp, bt_iso_chan_send_ts has been introduced, which is the only function of the two (bt_iso_chan_send being the other) that supports timestamps. A new function, rather than adding a boolean to the existing, was chosen as it simplifies the individual functions as well as making it more explicit what the function does. Since the bt_iso_chan_send function is used by LE audio, both the BAP and CAP send functions have similarly been updated. Likewise, all tests and samples have been updated to use the updated function(s), and BT_ISO_TIMESTAMP_NONE has been removed. Signed-off-by: Emil Gydesen <[email protected]> * samples: mgmt: mcumgr: smp_svr: Fix shell mgmt overlay Fixes a wrong Kconfig selection in the overlay file Signed-off-by: Jamie McCrae <[email protected]> * tests: mem_protect/obj_validation: fix check for heap size Commit 3fbf12487c6c01c488210bc56b0f342f07098df9 introduced a way to add to CONFIG_HEAP_MEM_POOL_SIZE if, for example, subsystems need more heap space. However, the size check in obj_validation was still using the old kconfig, and was failing when extra space was specified. So update the size check to use the updated size. Signed-off-by: Daniel Leung <[email protected]> * doc: zbus: improve sensor-based illustration example The sensor-based illustration example did not consider the HLP feature and used the work queue to publish to the Trigger channel. With the HLP, that is not necessary anymore. The timer ISR can publish to the channel directly. So, this commit improves the example description by considering the HLP feature. Signed-off-by: Rodrigo Peixoto <[email protected]> * doc: releases: release-notes: 3.6: no relevant EEPROM changes Remove the EEPROM subsection from the v3.6.0 release notes. Signed-off-by: Henrik Brix Andersen <[email protected]> * doc: input: add two paragraphs about keymap and hid mapping Add a paragraph about the input-keymap binding and one about the HID mapping functions. Signed-off-by: Fabio Baltieri <[email protected]> * boards native_posix: Detect attempt to configure not existing int Prevent overrunning the irq vector table. This is not happening today in tree, but coverity thinks it may. Checking for it to prevent it is not a bad idea anyhow, so let's do it. Signed-off-by: Alberto Escolar Piedras <[email protected]> * nvs: add documentation about the crc in nvs fixed nvs part of #68699 Signed-off-by: Laczen JMS <[email protected]> Co-authored-by: Benjamin Cabé <[email protected]> * posix: pthread: ensure pthread_exit() has noreturn attribute The function pthread_exit() does not return. It should be declared with the noreturn attribute. Signed-off-by: Christopher Friedt <[email protected]> * scripts/requirements: bump imgtool to 2.0.0 Resolves incorrectly located `image_ok` tag in generated hex files when CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE is used. Fixes #64098 Signed-off-by: Abram Early <[email protected]> * mbedtls: option for MBEDTLS_PLATFORM_ZEROIZE_ALT Add a Kconfig option for enabling `MBEDTLS_PLATFORM_ZEROIZE_ALT`, which is required if the mbed backend already provides an implementation. For example, the Nordic cryptocell precompiled backends. Signed-off-by: Jordan Yates <[email protected]> * doc: releases: release-notes: 3.6: add CAN release notes for v3.6.0 Add CAN release notes for v3.6.0. Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: espi: mec172x: Do not enable interrupt if VW is disabled Do check if a VW is enabled before enabling interrupt Signed-off-by: Jose Alberto Meza <[email protected]> * fix: lvgl: modules: keypad input log module Compilation error "undefined reference to log_const_lvgl" happened in lvgl_keypad_input.c when trying to get logs with lvgl keypad module. Fixed by adding log level parameter in log module macro. Signed-off-by: Eve Redero <[email protected]> * doc: releases: 3.6: Add release notes for LVGL module Adds release notes for LVGL module. Signed-off-by: Fabian Blatz <[email protected]> * doc: release: 3.6: Add management subsys changes Add to management subsystem section of release notes: - Fix image confirm for Direct XIP - Support for finding registered command groups Signed-off-by: Ben Marsh <[email protected]> * modem: bg9x: ignore sem return value The semaphore waits forever, ignore the return value. Signed-off-by: Ryan Erickson <[email protected]> * drivers: counter: maxim_ds3231: Remove unused variables data->rtc_base is not being used anywhere while data->rtc_registers is only used as a temporary variable. Remove them from the driver. Signed-off-by: Tahsin Mutlugun <[email protected]> * drivers: counter: maxim_ds3231: Fix coverity errors Casting 64-bit time_t values into 32-bit unsigned integers causes CWE-197 violations. Explicitly truncate these values by masking time_t to avoid these warnings. Signed-off-by: Tahsin Mutlugun <[email protected]> * drivers: entropy: neorv32: add missing soc.h include Add missing soc.h include for NEORV32_SYSINFO_FEATURES. Signed-off-by: Henrik Brix Andersen <[email protected]> * doc: releases: flash: nrf_qspi_nor timeout Kconfig Adds reference to new Kconfig, CONFIG_NORDIC_QSPI_NOR_TIMEOUT_MS, enabled by updates to nrfx. Reference: zephyrproject-rtos/zephyr#66711 Signed-off-by: Helmut Lord <[email protected]> * soc: xtensa: intel_adsp: restore bootctl with per-core state When exiting PM_STATE_SOFT_OFF, the primary core state is always used to restore bootctl register and the clock and power gating settings. This can lead to problems if non-primary core is powered up and down many times before primary core 0 is powered down the first time. The saved state in core_desc[0].bctl will be null, and as a result- power gating and clock gating is not disabled correctly for non-primary cores. Link: https://github.com/thesofproject/sof/issues/8642 Signed-off-by: Kai Vehmanen <[email protected]> * net: coap: add TOO_MANY_REQUESTS to return codes Add COAP_RESPONSE_CODE_TOO_MANY_REQUESTS to coap_header_get_code(). CoAP 4.29 response code for "Too many requests" is defined in coap.h but was missing from the list of cases, resulting in a 0 being returned instead of the proper code. Signed-off-by: Mike Szczys <[email protected]> * manifest: Update hal_nordic revision Updated hal_nordic fixes APPROTECT handling on nRF91 target, as well as fixes missing alignment of nrfx samples to modified API of the GPIOTE driver. Signed-off-by: Nikodem Kastelik <[email protected]> * soc: riscv: nrf54h: fix VPR core dependencies The actual RISC-V core needs to select RISCV, and specific SoC CPU depend on it. Signed-off-by: Gerard Marull-Paretas <[email protected]> * samples: Bluetooth: Add missing svc data for broadcast audio sink Add missing service data for BASS for the broadcast audio sink sample. This also required the controller to increase its maximum data length. Increased more than minimum required so that the name can be changed without needing to increase this again. Signed-off-by: Emil Gydesen <[email protected]> * doc: release-notes: add relevant pinctrl changes Add a list of relevant new features or new drivers. Signed-off-by: Gerard Marull-Paretas <[email protected]> * boards: nucleo_f722ze: Add code-partition chosen If slots partitions are defined, related chosen should be configured. Fixes build issue in samples/subsys/usb/dfu Signed-off-by: Erwan Gouriou <[email protected]> * net: trickle: Print the abs value using %u The Imax_abs value should be printed using %u instead of %d as it can be large and should be printed as positive value. Signed-off-by: Jukka Rissanen <[email protected]> * doc: release: 3.6: Add release notes for MCUmgr Adds release notes for MCUmgr for this release Signed-off-by: Jamie McCrae <[email protected]> * thrift: null-terminate certificates in samples and tests The thrift methods loadCertificateFromBuffer(), loadPrivateKeyFromBuffer(), and loadTrustedCertificatesFromBuffer() expect a null-terminated string. Append '\0' to each array used to hold a certificate in thrift samples and tests. Signed-off-by: Christopher Friedt <[email protected]> * modules: tf-m: Remove TFM_TEST_REPO_PATH TF-M 2.0.0 doesn't use the TFM_TEST_REPO_PATH anymore so removing it. Signed-off-by: Markus Swarowsky <[email protected]> * modules: tf-m: Remove QCBOR path from build QCBOR is only needed by the TF-M tests, as they are not build separately due to the TF-M split build. If we still set it there is a CMake build warning. Signed-off-by: Markus Swarowsky <[email protected]> * modules: tf-m: Rename crypto modules to ENABLED 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]> * doc: release-notes/3.6: add some bits about I3C This adds some bits on changes of I3C to the release notes. Signed-off-by: Daniel Leung <[email protected]> * doc: release-notes/3.6: add some bits about PCIe This adds some bits on changes of PCIe to the release notes. Signed-off-by: Daniel Leung <[email protected]> * doc: release-notes/3.6: add some bits about UART This adds a few bits about more significant changes in UART. Small changes and bug fixes are omitted. Signed-off-by: Daniel Leung <[email protected]> * docs: migration-guide-3.6: notes about userspace funcs renaming Quite a few of userspace related functions, macros and struct have been renamed (z_ to k_). So make notes in the migration guide. Signed-off-by: Daniel Leung <[email protected]> * doc: release-notes/migration-guide/3.6: add bits on Xtensa This adds some bits in both migration guide and release notes about changhes in Xtensa. Signed-off-by: Daniel Leung <[email protected]> * doc: release: 3.6: Add Ethernet and Wi-Fi info Add changes to Ethernet and Wi-Fi drivers for v3.6. Also add information about generic Ethernet and Wi-Fi changes. Signed-off-by: Jukka Rissanen <[email protected]> * doc: release: 3.6: add posix api release notes Add highlights between v3.5.0 and today for the the POSIX API. Signed-off-by: Christopher Friedt <[email protected]> * drivers: sensor: ltrf216a: fix overflow in conversion The conversion of the raw sensor value overflows because only a 32 bit multiplication is executed. Fix the issue by promoting the raw sensor value to uint64_t before executing the multiplication. Analysis: The current implementation overflows for all raw values grater than 9544(14-bit). But according to the datasheet the sensor has a maximum resolution of 20-bit. So Multiplying that value with 450.000 would need at least 39 bit to avoid an overflow, hence do it using 64-bit arithmetic. Fixes CID 330657 Signed-off-by: Thomas Stranger <[email protected]> * samples: doc: Add README for Grove sensor samples Added a README.rst for grove_light and grove_temperature sensor sample applications. Signed-off-by: Doug Foster <[email protected]> * boards: nrf54*: Add a note about current status The nRF54* SoCs are in a very early stage of production and the software supporting them is to be considered experimental. Document this accordingly in the respective boards. Signed-off-by: Carles Cufi <[email protected]> * Bluetooth: Host: Add ISO tx check for LOG_WRN in le_init_iso The warning should only apply for configurations where the device may actually send ISO data (e.g. not the ISO sync receiver). Signed-off-by: Emil Gydesen <[email protected]> * drivers: bbram: stm32: add include to fix compilation error Driver BBRAM for STM32 had a compilation error: "unknown type name 'RTC_TypeDef'" due to missing include file. Signed-off-by: Guillaume Gautier <[email protected]> * boards: x86/acrn: add devicetree PCIe controller node Commit 940c66f82e8cd3fe1850d95b6ca57cbc4e365e12 added a bunch of ACPI PNP ID to x86 boards but skipped those for ACRN. And commit 34a2fbfba1ce3df187bd5177b472b304b1d257c8 changed the behavior of PCIe controller to looking for PNP ID, it results in compilation error due to build asserts. So add the PCIe controller node to the ACRN base DTS file. Fixes #68956 Signed-off-by: Daniel Leung <[email protected]> * samples: posix: gettimeofday: Fix fatal error caused by small stack Fix #68727. Signed-off-by: Cui Wei <[email protected]> * boards: arm: nrf52840_blip: add zephyr,code-partition chosen property Add missing zephyr,code-partition chosen property. Signed-off-by: Henrik Brix Andersen <[email protected]> * boards: arm: nrf52840_papyr: add zephyr,code-partition chosen property Add missing zephyr,code-partition chosen property. Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: i2c_mchp: Replace slave by target Replace slave_register with target_register and slave_unregister with target_unregister. Signed-off-by: Rajavardhan Gundi <[email protected]> Signed-off-by: Jose Alberto Meza <[email protected]> * doc: release: Add sensor release notes for v3.6.0 Adds notes about sensor driver changes since the last release. Signed-off-by: Maureen Helm <[email protected]> * doc: release: Add ADI boards for v3.6.0 Adds notes about new ADI boards added since the last release. Signed-off-by: Maureen Helm <[email protected]> * doc: release-notes-3.6: STM32 changes Update V3.6.0 release notes with STM32 related changes Signed-off-by: Erwan Gouriou <[email protected]> * doc: release-notes-3.6: Shields additions changes Update V3.6.0 release notes with shields additions. Signed-off-by: Erwan Gouriou <[email protected]> * drivers: led_strip: tlc5971: fix brightness control bit shifting The lower bits of the brightness control registers were erroneously shifted even though FIELD_PREP already does the shifting. In practice, the effect is negliglible but of course should be fixed. Also add missing parenthesis around shifting operations to satisy static analysis. Signed-off-by: Mikkel Jakobsen <[email protected]> * doc: build: snippets: application required snippets Document how an application can automatically include snippets when being built. Signed-off-by: Jordan Yates <[email protected]> * settings: NVS: add entry into cache after writing Settings NVS adds entry into Settings NVS cache after writing it into flash. Previously, the entry was added into cache only on the second writing attempt that caused very huge timing despite cache was enabled since it was still empty. Signed-off-by: Aleksandr Khromykh <[email protected]> * samples: Bluetooth: Broadcast Audio Source: Fix potential memory leak In error cases, where send_data() returns early, the allocated net_buf is not free'd, causing a memory leak affecting the net_buf pool. Fix this by freeing the allocated net_buf before returning early from send_data(). Signed-off-by: Sean Farrelly <[email protected]> * mgmt: mcumgr: img_mgmt_client: avoid using uninitialized variable Make sure temp_data is initialized before use. Fixes: #68636 Signed-off-by: Henrik Brix Andersen <[email protected]> * doc: fix include path of log_ctrl.h fix zephyr/log_ctrl.h -> zephyr/logging/log_ctrl.h Fixes #68902 Signed-off-by: Anas Nashif <[email protected]> * doc: release-notes: Add 3.6.0 release notes for networking Add 3.6.0 release notes for networking. Signed-off-by: Robert Lubos <[email protected]> * modem: modem_cellular: CID 338164 strncpy() passed incorrect size Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: modem_cellular: CID 338140 incorrect size passed to strncpy Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: modem_cellular: CID 338115 incorrect size passed to strncpy() Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: modem_cellular: CID 338073 incorrect size passed to strncpy() Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: modem_cellular: CID 338067 incorrect size passed to strncpy() Signed-off-by: Bjarki Arge Andreasen <[email protected]> * doc: ipc: fix header location Header for ip_service was wrong in the docs. Signed-off-by: Anas Nashif <[email protected]> * modem: hl7800: validate IPv4 DNS addr len for IPv6 If the IPv6 DNS address is not a valid address, DNS will fallback to the IPv4 DNS address. Fix copying the IPv4 address to the IPv6 address by using the IPv6 address destination length. Signed-off-by: Ryan Erickson <[email protected]> * twister: support domains when cleaning up binaries Binaries are located in multiple build directory subfolders when built for multiple domains (sysbuild is one example). Parse domains.yaml and preserve files across all domains for testing when --prep-artifacts-for-testing option is used. Signed-off-by: Mike Szczys <[email protected]> * Bluetooth: Audio: define bt_bap_bass_subgroup struct. The Broadcast Assistant API should be fully independent of the scan delegator. Therefore the new struct bt_bap_bass_subgroup has been defined to avoid a dependency. Fixes: #68338 Signed-off-by: Ping Wang <[email protected]> * doc: release-notes: Fix typo when referring to Socket Service Use singular Service when referring to Socket Service library. Signed-off-by: Robert Lubos <[email protected]> * drivers: can: mcan: fix handling of bus-off status events Fix handling bus-off events in the Bosch M_CAN driver backend: - Cancel all pending TX buffers when entering bus-off state - Call all pending TX buffer callbacks with -ENETUNREACH when entering bus-off - Automatically initiate bus-off recovery if CONFIG_CAN_AUTO_BUS_OFF_RECOVERY=y Fixes: #68953 Signed-off-by: Henrik Brix Andersen <[email protected]> * logging: rename log2_generic to log_generic The log2 prefix was deprecated and changed to log some time ago, but log2_generic() seems to have been inadvertantly left with the old prefix. Rename log2_generic() to log_generic() to follow suit. Signed-off-by: Christopher Friedt <[email protected]> * boards: stm32h573i_dk: Enable debug support with pyocd Support of stm32h5 targets with pyocd is required to allow debugging. Provide runner configuration and update board documentation. Signed-off-by: Erwan Gouriou <[email protected]> * boards: x86/up_squared: use HPET timer The UP Squared board comes with different CPUs where Atom ones run at 1.6GHz while the Pentium and Celeron ones run at 1.1GHz. Since the APIC TSC Deadline timer driver is tied to the CPU speed, and we were using 1.6GHz as the hardware clock speed, real world time would not be correct for Pentium and Celeron based boards (i.e. 1 second sleep requested in application does not translate to 1 second in real world). Change it to use HPET timer instead as HPET has the same clock rate for all board variants. Applications requiring more precise clock rate can override this in their configuration. Signed-off-by: Daniel Leung <[email protected]> * tests: c_lib/thrd: more stack for up_squared board Similar to qemu_x86_64, the up_squared needs more stack space to run the tests. Signed-off-by: Daniel Leung <[email protected]> * tests: workq/user_work: change how resource pool is exhausted The assumption of going through 100 iterations of allocating for work queue is that the HEAP size is 1024 bytes. However, there are platforms where the HEAP size is inflated due to subsystems and/or drivers being included. So change the for loop into a loop where it only stops until there is no memory to be allocated. Signed-off-by: Daniel Leung <[email protected]> * modem: hl7800: fix parsing APN username Ensure a null reference cannot happen if there is an issue parsing the APN username. Signed-off-by: Ryan Erickson <[email protected]> * Bluetooth: Controller: Fix lll ISO stream get by group Fix LLL ISO stream get by group to return stream context sorted by CIS offset in ascending order. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> * Bluetooth: Audio: Shell: Fix context for the audio shell The context had a bug where if GMAP was enabled, the context was only BT_AUDIO_CONTEXT_TYPE_GAME. The context should also (per BAP spec requirement) contain the BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED context. Signed-off-by: Emil Gydesen <[email protected]> * Bluetooth: CAP: Shell: Fix argument issue for unicast_stop The unicast_stop command takes either "all" or one or more stream pointers as argument, but the argument handler did not allow this. The documentation for the command was also out of date. Signed-off-by: Emil Gydesen <[email protected]> * twister: Add support for GTEST_SKIP() Calling GTEST_SKIP will print the test as DISABLED, add support and unit tests for this. Signed-off-by: Yuval Peress <[email protected]> * toolchain: do not use posix C code for asm language in gcc.h Toolchain headers can be include in assembler files causing compilation error for posix architecture. The fix involves adding `!defined(_ASMLANGUAGE)` condition to exclude including posix C code in this case. Signed-off-by: Oleksandr Grytsov <[email protected]> * samples: Bluetooth: Minor improvements for broadcast audio sink Increases some of the timeouts so that when using this sample against other interactive devices (such as a phone or the Zephyr audio shell), then it's easier to do it in time. Also updates a few of the printks and ensures that we are not doing name filtering when we have been requested to sync to a specific broadcast source by a broadcast assistant. The test for the sample has also been modified to have a longer timeout to accomodate for the new semaphore timeout values. Signed-off-by: Emil Gydesen <[email protected]> * build: gen_isr_tables.py: fix bad IRQ index computation for L3 interrupts According to the Zephyr documentation, the multi-level interrupts are encoded as follows: `L1_ID | ((L2_ID + 1) << L2_BITS) | ((L3_ID + 1) << (L3_BITS + L2_BITS))` This means that when L3 interrupts are enabled, the gen_isr_table.py script will receive the value of L2_ID + 1. Currently, the script takes this value and directly compares it with the offsets set via `CONFIG_3RD_LVL_INTR_xx_OFFSET`. This is wrong because the values from said configurations are the same as L2_ID and because of that the script will generate an error. To fix this, use the value of L2_ID instead of L2_ID + 1. Signed-off-by: Laurentiu Mihalcea <[email protected]> * tests: lib: deviceteee: api: remove deprecated, unused labels Remove deprecated, unused devicetree label properties. Signed-off-by: Henrik Brix Andersen <[email protected]> * doc: release notes: Add GNSS to release notes Add notes covering: * New GNSS subsystem * GNSS utilities * New generic NMEA0183 device driver * New Quectel LCX6G device driver Signed-off-by: Bjarki Arge Andreasen <[email protected]> * drivers: serial: liteuart: Enable interrupt driven mode This commit enables interrupt driven liteuart. Signed-off-by: Mateusz Sierszulski <[email protected]> * drivers: clock_control: ra: sub-clock oscillator select fix Due to a typo it is not possible to select the sub-clock oscillator (SOSC) as a clock source for an RA Microcontroller. This patch resolves the issue. Signed-off-by: Ian Morris <[email protected]> * doc: logging: remove references to logging v2 Since the removal of logging v1, there's only one version, so remove the '2' from the function references for the docs to link to the correct functions properly. Signed-off-by: Yong Cong Sin <[email protected]> * modules: openthread: platform: logging: catch up on log2_generic rename The log2_generic() function was renamed to log_generic(). Fixes: 2155a9e5f7771e05bd80b3505dd7804865ca1360 Signed-off-by: Henrik Brix Andersen <[email protected]> * modem: cmux: Prevent NULL deref in connect_response_transmit Prevent potential NULL dereference identified by CID 338026 Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: cmux: Prevent NULL deref in connect_handler Prevent unlikely item == NULL scenario (CID 323091) and remove superflous cmux == NULL check (CID 334904) Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: cmux: Prevent NULL deref in dlci_open_handler Prevent unlikely item == NULL scenario (CID 323102) and remove superflous cmux == NULL check (CID 334903) Signed-off-by: Bjarki Arge Andreasen <[email protected]> * modem: cmux: Prevent NULL deref in dlci_close_handler Prevent unlikely item == NULL scenario identifed by CID 323104 Signed-off-by: Bjarki Arge Andreasen <[email protected]> * lib: acpi: fix for build error when acpi not enabled fix for acpi.h header file generates invalid C-code when CONFIG_ACPI=n Signed-off-by: Najumon B.A <[email protected]> * lib: acpi: update shell and test app with the modifed resource struct update shell and test app with the modifed resource struct such as acpi_irq_resource and acpi_mmio_resource Signed-off-by: Najumon B.A <[email protected]> * doc: releases: Add release notes for logging Add section with logging changes. Signed-off-by: Krzysztof Chruściński <[email protected]> * doc: release notes: Modem modules Add release notes detailing: * Addition of TRANSMIT_IDLE event to modem_pipe module * Implementation of TRANSMIT_IDLE event in all modem backends * Extended all modem modules to use TRANSMIT_IDLE event * Improved modem pipe event dispatching * CMUX extended to act both as DCE and DTE Signed-off-by: Bjarki Arge Andreasen <[email protected]> * doc: release notes: add 1-wire release notes for 3.6.0 Add 1-Wire related release notes for Zephyr v3.6.0. Signed-off-by: Thomas Stranger <[email protected]> * doc: releases: Add release notes for LE Audio Adds release notes for LE Audio for the Zephyr 3.6 release. Signed-off-by: Emil Gydesen <[email protected]> * dma: intel-adsp: hda: avoid division by 0 A division by 0 has once been observed inside intel_adsp_hda_dma_host_reload(). It is apparently caused by a preceding logic or hardware error, but in any case values, read from the hardware should be checked for 0 before being used as a divisor. Signed-off-by: Guennadi Liakhovetski <[email protected]> * doc: migration-guide-3.6: add note about async serial shell Following PR 68475, CONFIG_SHELL_ASYNC_API needs to be enabled, in addition to CONFIG_UART_SYNC_API, to be able to use async serial shell. Signed-off-by: Abderrahmane Jarmouni <[email protected]> * samples: esp32: docs: add proper header description Add Sphinx model header content so that it can be mapped into release notes. Signed-off-by: Sylvio Alves <[email protected]> * doc: release-notes-3.6: ESP32 related changes Highlights a few ESP32 updates for 3.6 Signed-off-by: Sylvio Alves <[email protected]> * doc: releases: Add release notes for picolibc Document changes related to Kconfig settings so that users can see how to adjust their settings for best results with Zephyr 3.6. Signed-off-by: Keith Packard <[email protected]> * modem: hl7800: Fix null reference in hl7800_net_addr6_pton Ensure a potential null pointer is not incremented. Signed-off-by: Ryan Erickson <[email protected]> * drivers: eth_mcux: Fix PM_DEVICE build failure device power management is not yet supported with eth_mcux except on the kinetis series, but this should not break the build for other platforms when PM_DEVICE is set Signed-off-by: Declan Snyder <[email protected]> * drivers: ecia: microchip: Prevent lost eSPI interrupts Clearing virtual wire interrupt after calling callback may cause interrupt miss if the same virtual wire changes due to action in handler. e.g. HOST_RST_WRN pulse within 50 us Signed-off-by: Jose Alberto Meza <[email protected]> * smp: fix a race when starting / resuming multiple CPUs cpu_start_fn is global, it's used by the initiator CPU to start or resume secondary CPUs. However it's possible, that the initiator CPU goes ahead and starts a second secondary CPU before the first one has finished using the object. Fix this by creating a local copy of the global object. Signed-off-by: Guennadi Liakhovetski <[email protected]> * tests: Fix pytest scenarios for boot with mcumgr. Clear buffer before restarting DUT. This is to avoid using lines from previous initial boot, when verifying if upgrade was done as expected in test. Signed-off-by: Grzegorz Chwierut <[email protected]> * doc: release-notes-3.6: mbedTLS update notes Add release notes for mbedTLS. Signed-off-by: Flavio Ceolin <[email protected]> * doc: release: 3.6: Add auxdisplay release notes Adds release notes for this driver Signed-off-by: Jamie McCrae <[email protected]> * doc: add note to twister documentation It could be helpfull to have a note about running single testsuite, and adding more runners to the note, that are supported in hardware map Signed-off-by: Patryk Kuniecki <[email protected]> * cmake/compiler/gcc: use -flto only for gcc >= 4.5.0 Fixes commit 26c8776c70ea ("buildsystem: Add an option to enable LTO") Fixes the following error when compiling offsets.c xt-xcc ERROR parsing -fno-lto: unknown flag LTO options were introduced in gcc 4.5.0, compare: https://gcc.gnu.org/onlinedocs/gcc-4.4.6/gcc/Option-Summary.html https://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Option-Summary.html Signed-off-by: Marc Herbert <[email protected]> * Bluetooth: Correct `bt_att_create_rsp_pdu` reservation when EATT is enabled When EATT is enabled, bt_att_create_rsp_pdu used to reserve headroom for the SDU header even when responding on the UATT bearer. That subtracted from the room for the ATT payload in the buffers. The remaining buffer size was insufficient to create a PDU of ATT MTU size, since the exchanged local MTU is calculated the with the assumption that the SDU header is not present. This broke the ATT MTU promise, and e.g. our read response will have two bytes fewer than promised. This caused a failure in PTS. The new bt_att_create_rsp_pdu pays attention to the bearer type and only allocates the SDU header on EATT bearers. Signed-off-by: Aleksander Wasaznik <[email protected]> * Bluetooth: Remove `len` param of `bt_att_create_rsp_pdu` This served no purpose for responces. The minimum MTU is sufficient for all ATT headers. Signed-off-by: Aleksander Wasaznik <[email protected]> * twister: only parse specified tests when using --test Enhance the -s option of twister, used to point to a single scenario in a testsuite. - Now accept --scenario on the command line, --test still supported. - If no testsuite is provided, extract testsuite from scenario identifier and avoid parsing the whole tree if we only want to address one scenario in a testsuite. - If just the identifier of the scenario is provided to --test/--scenario option, try to find this as well, do not need the full path for that. Something like this is now possible: twister --scenario kernel.threads.init --list-tests twister -T <path> --scenario kernel.threads.init --list-tests twister -T <path>/kernel.threads.init --list-tests All should print the same output. Fixes #67307 Signed-off-by: Anas Nashif <[email protected]> * twister: always add integration platforms to platform scope Add integration_platforms to the list of the default platforms per test for improved coverage when not running in integration mode. Some tests when run without any option do not exercise any tests and skip the integration platforms completely. Signed-off-by: Anas Nashif <[email protected]> * doc: build: sysbuild: Remove mention of child image Removes mention of child image to prevent confusion with other systems that have no relation to sysbuild Signed-off-by: Jamie McCrae <[email protected]> * xcc/cmake: fix error message when TOOLCHAIN_VER is undefined The exact set of environment variables required by xt-xcc and xt-clang is a bit of a dark magic and error-prone. TOOLCHAIN_VER is definitely one of them and the error message was puzzling when TOOLCHAIN_VER was undefined or not exported. - Add TOOLCHAIN_VER to the list of variables in the error message - Replace the vague "toolchain not found" in the error message with the more useful "XCC/install/tools//XtensaTools/bin/xt-xcc not found" where the double slash and comparison with the filesystem clearly point at where TOOLCHAIN_VER is missing. Signed-off-by: Marc Herbert <[email protected]> * drivers: wifi: esp_at: fix ssid_len calucation for AP query. The driver seems to be designed to use the very last byte of the buffer(scan, connect), so null terminating the status query might have unintended consequences. However we should not use strlen to determine the ssid_len, to avoid depending on the following buffer(bssid) to be zeroed. Related to CID 316354 Signed-off-by: Thomas Stranger <[email protected]> * doc: release-notes: LoRa/LoRaWAN Add release notes for LoRa/LoRaWAN subsystem for v3.6.0. Signed-off-by: Jordan Yates <[email protected]> * doc: release-notes: zbus kconfig reference fixes Fix usage of `:kconfig:option:` in the zbus release notes. Signed-off-by: Jordan Yates <[email protected]> * Bluetooth: BAP: UC: Fix call to bt_gatt_get_mtu in notify In the unicast_client_ep_notify we would always call bt_gatt_get_mtu, regardless of whether data == NULL. When there is a disconnection, the notify callbacks are called with data == NULL to indicate a unsubscription. In the case of the unicast client, this would also trigger calls to bt_gatt_get_mtu when there is a disconnect, which in turn would trigger a warning that ATT is not connected. Postponing the call to bt_gatt_get_mtu fixes this. Signed-off-by: Emil Gydesen <[email protected]> * Bluetooth: BAP: Fix bad bcast assistant bis sync shift The shift is currently necessary due to a mismatch of the specs and the API, but the shift should not be done when the value is BT_BAP_BIS_SYNC_NO_PREF as that is a special value. Signed-off-by: Emil Gydesen <[email protected]> * doc: usb: explain interface number and endpoint address assignment This also applies to the new experimental device stack, but documentation for it has not yet begun. Signed-off-by: Johann Fischer <[email protected]> * Samples: Bluetooth: Fix PAST support for broadcast sink Fix missing support for PAST in the broadcast audio sink sample, where it previously failed to request PAST from the broadcast assistant by not setting the PA state to BT_BAP_PA_STATE_INFO_REQ. Signed-off-by: Emil Gydesen <[email protected]> * samples/modules/lvgl/demos: Increase heap for native 64 targets For this targets, the widgets demo run out of heap and crashes. Let's just increase the heap size. Signed-off-by: Alberto Escolar Piedras <[email protected]> * doc: releases: ST BlueNRG changes Update release-notes and migration-guide version 3.6.0 with the changes related to BlueNRG devices. Signed-off-by: Ali Hozhabri <[email protected]> * doc: releases: Changes to SPI properties Update release-notes version 3.6.0 with the SPI properties changes. Signed-off-by: Ali Hozhabri <[email protected]> * doc: release-notes-3.6: PM related changes Power management release notes for 3.6 Signed-off-by: Flavio Ceolin <[email protected]> * doc: release-notes-3.6: add SD and SDHC changes Add SD and SDHC release notes, including the addition of the SDIO subsystem Signed-off-by: Daniel DeGrasse <[email protected]> * doc: release-notes-3.6: remove section for disk drivers No changes have been made to disk drivers since 3.5, so remove the section for this release. Signed-off-by: Daniel DeGrasse <[email protected]> * doc: release-notes-3.6: MDIO changes Add changes to 3.6 release notes for MDIO drivers Signed-off-by: Declan Snyder <[email protected]> * soc: arm: nxp_imx: fix flexspi frequency setting for iMXRT11xx SOC Commit a10fee2d5e9 (drivers: clock_control: ccm_rev2: add support for reclocking FlexSPI) introduced the ability to set the FlexSPI clock frequency at runtime on RT11xx series SOCs. However, this implementation resulted in the clock frequency being rounded up, not down. This can result in flash clock frequency violations on some flash parts, causing the system to crash when running in XIP mode. Fixes #69088 Signed-off-by: Daniel DeGrasse <[email protected]> * samples: drivers: mbox: remove mimxrt595_evk_cm33 Remove mimxrt595_evk_cm33 from the MBOX sample. Although this SOC has support for both cores, there is no support in tree for booting the secondary core from the primary one, so this sample cannot run on hardware. Fixes #69092 Signed-off-by: Daniel DeGrasse <[email protected]> * native_simulator: Get latest from upstream Align with native_simulator's upstream main f02906708cf1668fe54ef2c2f1e159ed947573aa Which includes: * f029067 CPU ctrl: Fix two malformed error/warning messages * 114f78b Host trampolines: Fix typos in comment Signed-off-by: Alberto Escolar Piedras <[email protected]> * doc: release-notes-3.6: Update release notes for NXP additions NXP additions for 3.6 release Signed-off-by: Mahesh Mahadevan <[email protected]> * ieee802154: ieee802154_cc13xx_cc26xx_subg: Fix 6lowpan for cc1352p7 - Fix using custom setup function - Enable pRegOverrideTxStd and pRegOverrideTx20 in ieee802154_cc13xx_subg_radio_div_setup struct Signed-off-by: Ayush Singh <[email protected]> * doc: security: cve-2023-6749 left embargo Disclose information about cve-2023-6749. Signed-off-by: Flavio Ceolin <[email protected]> * doc: security: cve-2023-6249 left embargo Disclose information about cve-2023-6249. Signed-off-by: Flavio Ceolin <[email protected]> * doc: security: cve-2023-5779 left embargo Disclose information about cve-2023-5779. Signed-off-by: Flavio Ceolin <[email protected]> * arch: Fix bounds checking for dynamic shared interrupts Fixes z_isr_install() and z_isr_uninstall() routines to check the isr table index against the correct number of isr table entries. This prevents out-of-bounds isr table accesses when CONFIG_GEN_IRQ_START_VECTOR is greater than zero, such as on the ARC architecture. Coverity-CID: 347187 Coverity-CID: 347189 Coverity-CID: 347097 Coverity-CID: 347203 Coverity-CID: 347210 Signed-off-by: Maureen Helm <[email protected]> * samples: esp32: do not search for all regions Current SPIRAM sample code tries to search for any available heap, causing this test to fail. Make sure the sample code only malloc data from external ram. Fixes #65997 Signed-off-by: Sylvio Alves <[email protected]> * doc: release: 3.6: Release notes for mfd and regulators Added release notes for mfd and regulators Signed-off-by: Andy Sinclair <[email protected]> * doc: release: Add Arm arch to 3.6 release notes Adds highlights for the Arm architecture to the 3.6 release notes. Signed-off-by: Kevin Townsend <[email protected]> * drivers: charger: bq25180: fix return value check Fix missing check of the return value of `bq25180_set_charge_current` function, resulting in logically dead code, as indicated by Coverity CID 347197. Signed-off-by: Gustavo Silva <[email protected]> * net: lib: coap: Add error check when waking server thread There's not much to be done in case waking up the server thread with socketpair send() fails, but at least we can log an error on such event (to please coverity). Signed-off-by: Robert Lubos <[email protected]> * doc: release-notes-3.6: Update MCUboot change log. Added new Zephyr MCUBoot supported platforms and new CONFIG_MCUBOOT_IMGTOOL_OVERWRITE_ONLY parameter. Signed-off-by: Andrej Butok <[email protected]> * docs/develop/test/bsim: Two trivial fixes Fix a typo and let a file be a link instead of just its name. Signed-off-by: Alberto Escolar Piedras <[email protected]> * doc: native_sim: Native logger backend is always enabled by default Since bd9836be8c81f00337db226fef2e029b4d844821 the native logger is enabled always (even if a UART is present) as it was though more conveniant for users. But the documentation was not updated to reflect this. Let's fix it. Signed-off-by: Alberto Escolar Piedras <[email protected]> * drivers: adc: mcp320x: use K_KERNEL_STACK_SIZEOF() Use K_KERNEL_STACK_SIZEOF() for calculating thread stack size, as this takes K_KERNEL_STACK_RESERVED into account. Fixes: #69130 Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: adc: lmp90xxx: use K_KERNEL_STACK_SIZEOF() Use K_KERNEL_STACK_SIZEOF() for calculating thread stack size, as this takes K_KERNEL_STACK_RESERVED into account. Fixes: #69131 Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: adc: ads7052: use K_KERNEL_STACK_SIZEOF() Use K_KERNEL_STACK_SIZEOF() for calculating thread stack size, as this takes K_KERNEL_STACK_RESERVED into account. Fixes: #69132 Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: adc: ad5592: use K_KERNEL_STACK_SIZEOF() Use K_KERNEL_STACK_SIZEOF() for calculating thread stack size, as this takes K_KERNEL_STACK_RESERVED into account. Fixes: #69133 Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: adc: max1125x: use K_KERNEL_STACK_SIZEOF() Use K_KERNEL_STACK_SIZEOF() for calculating thread stack size, as this takes K_KERNEL_STACK_RESERVED into account. Fixes: #69129 Signed-off-by: Henrik Brix Andersen <[email protected]> * drivers: espi: Clear virtual wire interrupt before calling handler Clearing virtual wire interrupt after calling handler may cause next interrupt miss if the same virtual wire changes due to action in handler. As the interrupt source is read from register, it can be cleared before calling handler to avoid next interrupt miss due to action/delay in the callback handler. Signed-off-by: Venkataramana Kotakonda <[email protected]> * ITE: drivers/gpio: Fix untrusted loop bound The pin in the loop start counting from 0, so the condition of the for loop should not be equal to num_pins. Fixes #69118 Signed-off-by: Tim Lin <[email protected]> * doc: release-notes-3.6: add release note about -Wdouble-promotion This adds a release note about -Wdouble-promotion now being a default warning flag. Signed-off-by: Ryan McClelland <[email protected]> * Bluetooth: GATT: Add missing LESC_MASK for encrypt check The LE Secure connection (LESC) mask also require encryption, and some users have been using e.g. BT_GATT_PERM_READ_LESC without BT_GATT_PERM_READ_ENCRYPT, and then the encryption check in bt_gatt_check_perm was never properly applied. Signed-off-by: Emil Gydesen <[email protected]> * tests: bsim: Bluetooth: Fix GATT long read test The test where it was supposed to read the long characteristic, only read the "small" characteristic, due to setting the wrong handle. With the right handle, the test failed and the test had to be updated to store the data across multiple reads, and then do the proper comparison. Signed-off-by: Emil Gydesen <[email protected]> * tests: bsim: Bluetooth: Add GATT encrypt tests Add tests for the GATT permissions to read and write for characteristics that require encryption and LESC encryption. Signed-off-by: Emil Gydesen <[email protected]> * doc: Bluetooth dev: Fix mention of nrf52 not supporting split builds Since #67318 we support split builds in the simulated nRF52 over the UART, and we actually have this configuration tested in CI. This documentation paragraph was still mentioning this is not supported. So let's fix it. Signed-off-by: Alberto Escolar Piedras <[email protected]> * docs: BT tools: Fix description around native BT user chan use With native_sim one uses the BT user channel driver (which connects directly to the user channel linux socket), not a serial port. Let's fix the description, and provide a nicer link. Signed-off-by: Alberto Escolar Piedras <[email protected]> * release: Zephyr v3.6.0-rc3 Sets the version to v3.6.0-rc3. Signed-off-by: Maureen Helm <[email protected]> * docs: release: migration-guide: 3.6.0: reorder entries a bit Reorder a few entries in the v3.6.0 migration guide in order to list the ones likely to affect most people more prominently. Group related entries together and get rid of a couple of empty headlines. Signed-off-by: Henrik Brix Andersen <[email protected]> * doc: security: cve-2024-1638 left embar…
This PR encodes the Zephyr multi-level interrupt using C macro magic in the devicetree, rather than depending on the
gen_defines.py
script during build:zephyr/scripts/dts/gen_defines.py
Lines 435 to 441 in 1fc16e6
zephyr/scripts/dts/gen_defines.py
Lines 456 to 469 in 1fc16e6
zephyr/scripts/dts/gen_defines.py
Lines 482 to 485 in 1fc16e6
This will resolve the dt & kconfig cross dependency issue encountered in #63131, and fixes #62883
After this change, the
*_IRQ_IDX_x_VAL_irq
of a node with an interrupt parent is the local IRQ number of that node (raw value as specified in the devicetree, or ARM GIC IRQ encoded output fromgen_defines.py
), rather than being multi-level encoded. The encoding of the IRQN only happens in certain DT macros, and the right one has to be used for build-time connected ISR, i.e. withIRQ_CONNECT
Fixes #62883
Important
Blocking #62907
Note
Caveat: The current approach only works for a maximum of 3 levels, I'm not sure if a while-loop equivalent like the implementation in
gen_defines.py
is possible with the macros, but it is what the Zephyr interrupt encoding scheme currently supports, see Multi-level Interrupt handling