Commit Graph

85964 Commits

Author SHA1 Message Date
Jun Lin e5e599c100 soc: npcx: add HAS_PM to npcx4
The Kconfig option HAS_PM, which must be needed for SoCs providing PM
hooks, is missing in npcx4.
This commit adds it to soc/arm/nuvoton_npcx/npcx4/Kconfig.series.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2023-10-20 15:11:14 +02:00
Flavio Ceolin 05fb54b090 doc: security: Update info about tools
Since there are multiple static analysis tools being used
now, it is better to change references for a particular one
and just point to static analysis section in the documentation.

JIRA is no longer used for tracking security issues. Update it
to Github.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-20 15:11:01 +02:00
Ioannis Karachalios 833d2051ae dts: renesas: smartbond: Support the RTC peripheral.
Update DTS and board configurations to support the RTC peripheral.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-10-20 15:10:44 +02:00
Ioannis Karachalios 9f76879a0b drivers: rtc: smartbond: Support RTC peripheral.
Add support for the RTC peripheral.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-10-20 15:10:44 +02:00
Emil Gydesen 0e67c990cd tests: Bluetooth: BAP: Add broadcast sink with assistant test
Add a test for the broadcast sink that uses the BAP
Scan Delegator functionality with a Broadcast Assistant
device adding the broadcast source.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:10:37 +02:00
Emil Gydesen f58bea6b7b Bluetooth: BAP: Scan Delegator bis_sync_req cb called on rem
If a receive state is removed, then the bis_syn_req callback
will be called with 0x00000000, to indicate to the application
that the sink should be desynced.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:10:37 +02:00
Emil Gydesen 8e9b2c745a Bluetooh: BAP: Fix issue with SRC_ID_VALID flag
The flag was not properly set when the broadcast sink
did not add the source (e.g. if a broadcast assistant
added it).

This also downgrades two LOG_WRN to LOG_DBG as they may
happen without indicating an issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:10:37 +02:00
Nick Kraus 0f50df41f1 drivers: uart_emul: Add Emulated Errors
Allows test code to set UART errors, for driver code wanting
to test proper error handling.

Signed-off-by: Nick Kraus <nick@nckraus.com>
2023-10-20 15:10:27 +02:00
Nick Kraus aeb85db627 drivers: uart_emul: Add IRQ Based TX
Added an interrupt based transmit routine and interrupt based
uart_emul tests.

Signed-off-by: Nick Kraus <nick@nckraus.com>
2023-10-20 15:10:27 +02:00
Maxin John acaaa9e2c5 boards: riscv: longan_nano: add adc support
Add ADC support for longan nano.

Tested using samples/drivers/adc. Also added longan_nano.overlay
and updated documentation.

Signed-off-by: Maxin John <maxin.john@gmail.com>
2023-10-20 15:10:20 +02:00
Anas Nashif 2ab8c1b779 ci: do not run twister on set_assignees.py changes
No need to run twister when changing this script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:10:11 +02:00
Anas Nashif d9a300e4ae ci: various set_assignee fixes
Cleanup of script and change how we assign PR in general:

Make sure that when multiple areas are changed, including platform or
driver changes, we set assignee of the general areas and not the
platform maintainers. For example, if I change 100 SoC files and touch
the kernel file, the assignee is set to the kernel maintainer.

First, we should as much possible try and split such changes and not
have common area changes with platform changes at the same time. Second,
it is important that such changes which affect everyone are reviewed and
approved by the maintainer of the general areas rather than leave them
to the platform maintainer.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:10:11 +02:00
Anas Nashif db8191a336 MAINTAINERS: few optimizations
Some minor optimzations.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-10-20 15:10:11 +02:00
Juha Ylinen 1aef034126 net: coap: add support for Echo option (RFC 9175)
Resend the request with Echo option and the received Echo
option value when receiving a 4.01 (Unauthorized) response
with the Echo option.

Add missing header file kernel.h to coap_client.h.

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-10-20 15:09:44 +02:00
Juha Ylinen 1d9098f3f0 net: coap: Add support for request-tag (RFC 9175)
Add support for Request-Tag (RFC 9175) when doing block-wise
send.

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-10-20 15:09:44 +02:00
Jaxson Han 7904c6f0f3 arch: arm64: Use voting lock for multi-core boot race condition
The exclusive load/store instructions don't work well when MMU and cache
are disabled on some cores e.g. Cortex-A72. Change it to voting lock[1]
to select the primary core when multi-cores boot simultaneously.

The voting lock has reasonable but minimal requirements on the memory
system.

[1] https://www.kernel.org/doc/html/next/arch/arm/vlocks.html

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2023-10-20 15:09:34 +02:00
Pavel Vasilyev 5b8a9517a1 tests: bluetooth: tester: Allow to compile mesh without LPN
This can be needed to qualify features without LPN support.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-20 15:09:25 +02:00
Pavel Vasilyev 6a2c102aca Bluetooth: Mesh: Keep sending Partial Block Report message
When the BLOB server is in Pull mode and all chunks were received for
the current block, and the current block is the last block, then
according to section 5.2.4 of MshMBTv1.0 the server should stop sending
BLOB Partial Block Report messages if it determines that the client
knows that the transfer is complete:

```
While the Pull BLOB State Machine is in the All Chunks Received state,
the Pull BLOB State Machine continues to send the BLOB Partial Block
Report messages until one of the following happens:
•  The Receive BLOB Timeout timer expires.
•  If the current block is not the last block, then the client starts a
new block, in which case a new Pull BLOB State Machine is instantiated.
•  If the current block is the last block, then the server determines
that the client knows the transfer is complete. For example, a
higher-layer model may indicate that the client considers the transfer
complete.
```

We currently don't have any OOB mean (for example, API) to determine
whether the client knows that the transfer is complete. We also need to
keep in mind that the Partial Block Report message can get lost so one
transmission may not be enough. The client could immediately send BLOB
Transfer Get message to get the transfer status, but this goes against
its state machine defined in section 6.2.4.2, where a Block transmission
completes when a BLOB Partial Block Report message is received with an
empty list of requested chunks (table 6.4, figure 6.1).

Because of this, we need to keep sending Partial Block Report messages.
We can keep sending them at least until Block Report timer expires.
If the client sends BLOB Transfer Get message, then it finished with
sending the block and we can change the phase and finish the transfer.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-20 15:09:25 +02:00
Pavel Vasilyev 136c5a9d57 tests: bluetooth: tester: Fix BLOB server model pointer
PTS uses BLOB server model instantiated by DFD server for MBT tests as
it is the first BLOB server model in the device composition data. DFU
server, which also has BLOB server model, is instantiated after DFD
server.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-10-20 15:09:25 +02:00
Flavio Ceolin 84f679d22d logging: Fix misuse of const and k_tid_t
"const k_tid_t" is "struct k_thread * const" and not
"const struct k_thread *" as the code may be assuming. Just
drop it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-20 15:08:42 +02:00
Daniel Leung cdd4d84703 xtensa: add custom mem range check functions
This provides custom memory range check functions as
it gets a bit complicated with cached/uncached regions.
These functions are marked as __weak so SoC or board
can override these if needed.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-20 15:08:34 +02:00
Daniel Leung 943e434559 mm: introduce CONFIG_KERNEL_VM_USE_CUSTOM_MEM_RANGE_CHECK
Sometimes the generic address range checker is not adequate
(think Xtensa cached/uncached pointers). This provides a way
to implement custom memory range checkers for those
situations. When enabled, sys_mm_is_phys_addr_in_range()
and sys_mm_is_virt_addr_in_range() must be implemented.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-10-20 15:08:34 +02:00
Ambroise Vincent 68dfd819c1 net: gptp: Create a stack size Kconfig option
The stack size was previously hardcoded in the source code, making it
difficult to change when enabling options that require a larger stack.

Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2023-10-20 15:08:25 +02:00
Ambroise Vincent 357f88bb59 net: ethernet: Don't use VLAN tag on gPTP messages
According to IEEE Std 802.1AS-2011 11.3.3, gPTP messages are not
VLAN-tagged.

Remove the use of VLAN headers for gPTP messages on the TX path.
The RX path is handled by the drivers. The network drivers in Zephyr
might need to be updated as well in order to accept receiving
non-VLAN-tagged gPTP messages when the CONFIG_NET_VLAN option is
selected.

Continue sending gPTP packets with VLAN tags when CONFIG_NET_GPTP_VLAN
is enabled. Specify that this option is for testing purposes.

Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2023-10-20 15:08:25 +02:00
Ambroise Vincent d0ac02a18d net: gptp: Invert priority of outgoing packets
The previous implementation was setting priority 3 (Critical
applications) for Sync, Pdelay and Pdelay_Resp messages; and priority 6
(Internetwork control) for the other PTP messages. This might have been
done under the incorrect understanding that "Critical applications" was
the highest priority.
This resulted in the Pdelay_Resp_Follow_Up getting sent before the
Pdelay_Resp message when enough TC_TX queues were being used
(NET_TC_TX_COUNT >= 2), which is an inversion compared to the intended
order.

Invert the priority of the outgoing PTP packets so that the PTP event
messages are sent with higher priority, as was originally intended.

Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2023-10-20 15:08:25 +02:00
Ambroise Vincent b7df39f81f net: ip: Clarify highest priority traffic class
The priority 3 (Critical applications) was incorrectly marked as
"highest priority", which might have led to incorrect use of
NET_PRIORITY_CA in some cases.

Note that this is already correctly advertized in other places, as it
was partially fixed in af8a0b1a5d.

NET_TC_SKIP_FOR_HIGH_PRIO was previously only allowing to push priority
3 (Critical applications) packets directly to the driver, but not the
ones with a higher priority. Change it so that it is now in effect for
priority 3 and above.

Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2023-10-20 15:08:25 +02:00
Alperen Şener 2972341388 tests: bluetooth: tester: add page number to response
PTS requires IUT to send requests with page number with
0xFF or the highest supported page number in order to
retrieve all the composition data pages from the lower
tester.

This commit add the page number to the response, thus
the upper tester can follow the last page number and
send the next page request until page 0 is requested.

Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
2023-10-20 15:08:07 +02:00
Jonathan Rico 098b5bd05b tests: bsim: send SIGKILL if app doesn't respond to SIGTERM
I have seen the CI hang (both downstream and upstream) as the executable
doesn't always respond to the SIGTERM sent by `timeout`.

This will prevent that behavior. 5 whole seconds ought to be enough to
clean-up a small program.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-10-20 15:07:58 +02:00
Anders Storrø cc87833116 tests: Bluetooth: Mesh: Add priv beacon cache test
Adds Bsim test that verifies private beacon cache functionality.
The test checks that replays of the same private beacon
message is discarded.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:07:51 +02:00
Anders Storrø eb480a7599 tests: Bluetooth: Mesh: Add SNB cache test
Adds Bsim test that verifies SNB cache functionality.
The test checks that replays of the same SNB
message is discarded.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:07:51 +02:00
Anders Storrø f9ee38060d tests: Bluetooth: Mesh: Arg bug in beacon creation
Fixes bug in private_beacon_create function in beacon test
implementation.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:07:51 +02:00
Anders Storrø 0ce77c227b Bluetooth: Host: CMake dependency for Mesh Bsim
Links host to mbedTLS library if Bluetooth Mesh is enabled, and
CONFIG_BT_TESTING=y.

Bluetooth Mesh has test dependencies in the host.
In order to compile Bsim tests with these test features
and PSA enabled, the libraries must be linked.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:07:51 +02:00
Seppo Takalo 2df58f65ce samples: lwm2m: Add docker test script
Add test script that uses same configuration that the
interoperability test.

This is only checking that unsecure client registers and
responds to a GET query.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-10-20 15:07:34 +02:00
Tim Lin 35e3dfed2d ITE: soc: Add the variant of it82002aw
This variant uses the same die as IT82202/IT82302 series and has
a pinout compatible with IT513xx series packages.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-10-20 15:07:28 +02:00
Mulin Chao 0d59aa1ab4 sensor: adc_cmp: npcx: use BUILD_ASSERT to check `thr-sel` value
This CL uses BUILD_ASSERT macro to check whether `thr-sel` is out of
range instead of using NPCX series definitions.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-10-20 15:07:21 +02:00
Mulin Chao a6496e056b soc: npcx: replace Nuvoton NPCX series definitions in the npcx drivers
Replace Nuvoton NPCX series definitions with new Kconfig definitions in
the npcx drivers. The benefit of this approach is that we won't touch
the npcx driver sources again during introducing a new npcx series next
time.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-10-20 15:07:21 +02:00
Erwan Gouriou 7b50c38ec9 tests: drivers: serial: async: Add configuration for STM32WBA tests
Add STM32WBA test configuration to enable async API serial tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Erwan Gouriou 1e46413729 boards: nucleo_wba52cg: Add LPUART node description
Enable LPUART1 node on nucleo_wba52cg so it could be used to performed
uart tests.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Erwan Gouriou 52d47fcf96 dts: stm32wba: Add GPDMA support
Add GPDMA1 node description to STM32WBA devices.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-10-20 15:05:59 +02:00
Emil Gydesen a38d534ae0 Bluetooth: BAP: Shell: Add better checks for bis_sync
Since the BIS indexes start at 0x01, then BIT(0) is a
invalid BIS sync value and shall not be sent by the
broadcast assistant.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:05:51 +02:00
Jonathan Rico 028cf8037b tests: Bluetooth: add sleep in notify cb testcase
Validates that nothing nefarious happens if the application decides to
wait an arbitrary amount of time in notification callbacks.

Also validates that a disconnection during said waiting works as
expected.

E.g. in #48505, the user was trying to send data synchronously over UART
_inside_ the notification callback. Then the device was disconnected
whilst still waiting.

This kind of pattern is not recommended, but the stack should still
function correctly, stalling the "BT RX" thread shouldn't result in
state corruption or resource leakage.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-10-20 15:05:45 +02:00
Emil Gydesen 779f725db3 Bluetooth: CAP: Add verification of CCIDs as the initiator
When the initiator provides CCID in the metadata, we verify
that the CCIDs exist on the device.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:05:33 +02:00
Lukasz Hawrylko a422e1d8fb boards: arm: nucleo_wb55rg: enable aes1
Enable AES1 peripheral by default to add support for drivers/crypto sample.

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
2023-10-20 15:05:26 +02:00
Lukasz Hawrylko 6424949dfd dts: arm: stm32: add AES1 peripheral to stm32wb family
STM32WB MCUs has two AES peripeherals. Add AES1 definition, AES2 must not
be used by application CPU core.

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
2023-10-20 15:05:26 +02:00
Lukasz Hawrylko 5d113be341 drivers: crypto: add support for stm32wb family
STM32WB MCUs have two AES peripherals: AES1 for application use and AES2
dedicated for network stack. This patch modifies stm32 crypto driver to
use AES1 peripheral when building for STM32WB.

Signed-off-by: Lukasz Hawrylko <lukasz@hawrylko.pl>
2023-10-20 15:05:26 +02:00
Troels Nilsson 7d96c997e2 Bluetooth: Controller: Fix endianness issues for SyncInfo
Fix bitfield crossing byte boundary - replaced with macros for
setting/getting the values

Fix missing endianness conversion for evt_cntr

Changed aa from uint32_t to uint8_t[4] to align with the rest of
the code and avoid any potential endianness issues

Signed-off-by: Troels Nilsson <trnn@demant.com>
2023-10-20 15:05:20 +02:00
Emil Gydesen 3b58fec96c Bluetooth: CAP: Add size and rank checks for CAS register
For the CAP acceptor the size and rank characteristic shall
be set as per the CAP spec. Add checks for 0, as 0 indicates
not initializing the characteristics in the CSIS instance.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-10-20 15:05:00 +02:00
Anders Storrø 49bd77ad54 tests: Bluetooth: Mesh: Priv Proxy GATT test
Adds test verifying that Private Beacons are received
over a GATT proxy connection.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:04:54 +02:00
Anders Storrø 6f2ebb963a Bluetooth: Mesh: Add proxy test API
Adds internal proxy API to enhance testabillity of
the proxy implementation.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:04:54 +02:00
Anders Storrø 5551b4cfad Bluetooth: Mesh: Priv net id parse on proxy cli
Adds parsing of Private Network Identity parsing in the proxy client,
allowing the client to use these messages to establish a GATT
connection.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2023-10-20 15:04:54 +02:00