Commit graph

56703 commits

Author SHA1 Message Date
Flavio Ceolin
bb5b5fe544 doc: security: Update information about CVE-2021-3581
Update CVE that left embargo with the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Andy Ross
13d3036e37 tests/msgq_usage: Correct memory usage for cache-incoherent platforms
When CONFIG_KERNEL_COHERENCE=y (e.g on the various intel_adsp
platforms under SMP) it's not legal to share stack memory between
CPUs, because the stack is cached, and the L1 cache is incoherent.
The kernel will automatically detect the mistake when the memory
contains a kernel object (spinlock, IPC object, etc...).  But here the
test was just passing async buffers into the msgq layer, and nothing
watches that.

The fix is simple: make them static.

Fixes #35857

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-06 17:40:53 -04:00
Anas Nashif
4dedae5861 tests: logging: remove definition of SYS_CLOCK_HW_CYCLES_PER_SEC
This is not needed for the test and is very HW specific.

Fixes #39185

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-06 19:25:41 +02:00
Vinayak Kariappa Chettimada
4f04f3d979 tests: Bluetooth: mesh: Remove explicit disable of CSA#2
Remove explicit disable of Channel Selection Algorithm #2
in the mesh tests that use Extended Advertising.

Fixes #39188.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-06 11:36:12 -05:00
Kumar Gala
bfcb32b755 samples/subsys/mgmt/osdp: Fix build issues
The samples/subsys/mgmt/osdp utilize GPIO so having it set in the
prj.conf is needed since not all platforms enable GPIO by default.

To address the 'No SOURCES given to Zephyr library: drivers__gpio'
add a 'depends on gpio' to the sample.yaml to only build this on
platforms that have GPIO driver support.

Fixes #39180

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-10-06 10:32:10 -04:00
Benedikt Schmidt
6e7f93a5a3 docs: Improve documentation of bootloader usage
Describes the necessity to specify the code partition as the chosen one.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2021-10-06 09:28:28 -04:00
Evgeniy Paltsev
e709c492b5 doc: release notes: ARC
2.7 release notes for ARC related changes

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-06 09:26:57 -04:00
Evgeniy Paltsev
b465a72244 DOC: ARC: update arc status page
We support ARCv3 HS6x SMP systems now - let's update the
status in the documentation.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-06 09:26:57 -04:00
Johann Fischer
02f095eb9b doc: release-notes-2.7: add release notes for MODBUS
Add release notes for MODBUS.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:29 +02:00
Johann Fischer
7042e0635c doc: release-notes-2.7: update release notes for disk drivers
Update release notes for disk drivers.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:29 +02:00
Johann Fischer
a09c84c2a1 doc: release-notes-2.7: add release notes for USB
Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Johann Fischer
a9442e5e20 doc: usb: add CDC ACM device support documentation
Add CDC ACM device support documentation.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Johann Fischer
fb454d09bb doc: usb: refactor USB device support documentation structure
Move related areas to their own files and order
documentation logically from lower to upper layer.
Fix gross errors and inconsistencies.

Co-authored-by: Carles Cufí <carles.cufi@nordicsemi.no>
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-10-06 11:51:07 +02:00
Henrik Brix Andersen
d198da7bb4 actions: exclude Python 3.6 tests on macos-latest
Python 3.6 support is no longer available on macos-latest. Exclude it.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-10-05 19:37:02 -04:00
Tom Burdick
90db5b7a15 pm: Fixes a data race in the debug stats on SMP
Previously stats were kept in a single static but would be updated by an
idle thread per cpu core. Stats/debug info is now kept per cpu core.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2021-10-05 19:26:58 -04:00
Andrei Emeltchenko
99ef25a5a9 doc: acrn: Fix indentation for RST
Fix indentation TAB - > Space so that the document looks readable in
text editors.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-10-05 19:26:18 -04:00
Marcin Niestroj
47e10a6830 drivers: lora: fix RtcGetCalendarTime()
Uptime in milliseconds is assigned to uint32_t variable, which results
in integer overflow after enough time has expired. Additionally
milliseconds part (which should be 0-999) is assigned directly from
uptime, without subtracting full seconds.

Fix both issues by using int64_t variable and calculating milliseconds
with modulo.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-10-05 19:24:58 -04:00
Felipe Neves
ed55ee95e9 boards: riscv: esp32c3: added button support
in samples for esp32c3 devkitm_board using GPIO9

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-05 19:24:38 -04:00
Felipe Neves
9768e98001 drivers: gpio_esp32: added support for esp32c3
in the gpio drivers and pinmux for esp32 chip series

Signed-off-by: Felipe Neves <felipe.neves@espressif.com>
2021-10-05 19:24:38 -04:00
Jordan Yates
29773391c7 spi: convert CS usage to gpio_dt_spec
Convert all CS control logic to be based on the `gpio_dt_spec` member
instead of the standalone `port`, `pin` and `flags` members.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Co-authored-by: Jordan Yates <jordan.yates@data61.csiro.au>
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
Co-authored-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-10-05 19:24:18 -04:00
Jordan Yates
89d76e9bbe spi: use gpio_dt_spec in struct spi_cs_control
Use the standard `struct gpio_dt_spec` type in the chip select control.
The anonymous struct and union allows previous instantiations to
continue working while letting functions operate on the new type.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Co-authored-by: Jordan Yates <jordan.yates@data61.csiro.au>
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
Co-authored-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-10-05 19:24:18 -04:00
Jordan Yates
4d1c90ee53 spi: helper macro for constructing CS gpio_dt_spec
Adds a helper macro, `DT_SPI_DEV_CS_GPIOS_DT_SPEC_GET`, that constructs
a `struct gpio_dt_spec` corresponding with the CS gpio of an spi device.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Co-authored-by: Jordan Yates <jordan.yates@data61.csiro.au>
Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
Co-authored-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-10-05 19:24:18 -04:00
Ryan Erickson
e706967d34 samples: lwm2m: update client stop API
Try to deregister client when closing connection.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-10-05 19:23:59 -04:00
Ryan Erickson
f7208bbb62 net: lwm2m: Add option to force close the connection
Add an option to force close the LwM2M connection
instead of always trying to deregister.
If on a cellular connection and the connection is dropped,
deregistering will never complete and take a long time
before retries fail. This option allows the app to close the
socket and quickly re-establish the connection when the
network connection is available again.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2021-10-05 19:23:59 -04:00
Francois Ramu
c44eae80c3 tests: drivers: spi loopback running on stm32u585 disco kit
Configure the target board to PASS the test case.
The PCLK2 clock feeding the SPI1 is reduced by 2 (apb2 prescaler)
to accept the slow freq config.
The SPI1 MISO and MOSI pins are linked on the HW board
(on arduino CN13, D11 & D12)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-05 19:23:37 -04:00
Francois Ramu
eb5f992049 boards: b_u585i_iot02a: Enable spi1 on board
The spi1 is present on the Arduino connector CN13
on pins D13, 12, 11, 10.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-05 19:23:37 -04:00
Francois Ramu
33e0f1a87a drivers/spi: stm32u5 spi support
Add the specific driver functions for the SPI
of the stm32u5 device.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-05 19:23:37 -04:00
Francois Ramu
71bde8a858 dts/arm: stm32u5: Add spi nodes
Add the 3 spi nodes for stm32u5 socs.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-10-05 19:23:37 -04:00
Anders Storrø
4e15da8332 bsim: test: Add test for heartbeat sub API
Adds test for verifying correct behaviour for heartbeat subscription
API.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2021-10-05 19:23:18 -04:00
Veijo Pesonen
b3bc827366 net: lwm2m: Decouple CoAP message- and block size
If blockwise transfer is not in use it must be possible to send bigger
CoAP messages than what is the block size used with blockwise transfers.

To compensate for the increased memory usage number of in-flight packets
allowed could be decreased.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2021-10-05 19:22:54 -04:00
Veijo Pesonen
32b4ec44fe net: lwm2m: Fix Kconfig help about allowed...
...range for LWM2M_COAP_BLOCK_SIZE.

The range has been set to start from 64 bytes and now the help text has
been brought up to date.

Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
2021-10-05 19:22:54 -04:00
Yuval Peress
2629fc566d emul: Add data and parent pointers to emulators
Emulators are difficult to work with, they generally require maintaining
some state in a mutable data struct. Since the emulator struct doesn't
support a data field like devices do, the pattern seems to be to add it
to the configuration. This makes following the logic of where things are
difficult.

1. Add a `struct emul *parent` structure to the espi/i2c/spi emulator
   structs to make it easier when casting up.
2. Add a `void *data` field to `struct emul` to hold the data for
   emulators.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-10-05 19:21:39 -04:00
Dominik Ermel
512dab526c mgmt/mcumgr: Add Kconfig option to select number of supported images
The commit adds IMG_MGMT_UPDATABLE_IMAGE_NUMBER Kconfig option, int,
that allows to select how many images are supported by mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-05 19:20:51 -04:00
Dominik Ermel
7183fd7026 west.yml: Update mcumgr revision
Commits affecting Zephyr that are included with the new revision:
    edb485c samples/smp_svr/zephyr: Increase main stack size;
    c0cb989 zephyr: Do not use CONFIG_IMG_MGMT_UPDATABLE_IMAGE_NUMBER
            directly;
    10cda4e zephyr: Fix assert when image number out of range;
    347a418 zephyr: Fix erase command failing for multi-image
            configuration;
    e06e772 zephyr: Fix possible memory leak in
            img_mgmt_impl_write_image_data;
    345caab img_mgmt: fix callback parameter values.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-05 19:20:51 -04:00
Manojkumar Subramaniam
d79d26f1ae drivers: serial: stm32: renable IT RXNE as part of graceful disable
async_rx_disable does not re-anable RXNE interrupt, it was disabled
during async_rx_enable

Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
2021-10-05 19:19:16 -04:00
Carles Cufi
a35cc75c14 doc: release notes: Add Bluetooth relnotes for 2.7.0
I have excluded most fixes from this release notes, since it is
difficult to identify those that are worth documenting. Intead I have
focused on new features and major refactoring.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-10-05 19:11:48 -04:00
Igor Knippenberg
e32c974336 samples: sensors: fdc2x1x: fixed bugs in pm_info()
Both ARG_UNUSED in pm_info(), cause errors when using PM_DEVICE=y.
Added a default case in pm_info(), to fix warnings.

Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
2021-10-05 13:13:46 -04:00
Igor Knippenberg
bd7b7a6423 drivers: sensors: fdc2x1x: removed unused fdc2x1x_data
Removing two unused "struct fdc2x1x_data" to fix warnings
when compiling with PM_DEVICE=y.

Signed-off-by: Igor Knippenberg <igor.knippenberg@gmail.com>
2021-10-05 13:13:46 -04:00
Evgeniy Paltsev
6807e02655 ARC: IRQ: drop excessive PM_DEVICE hooks
All ARC CPUs (supported by Zephyr) don't lose core interrupt
controller configuration after switching to sleep mode / modes,
so we don't need to save & restore it's configuration with PM.

This PM code most likely was added for Arduino 101 (Genuino 101)
board which isn't supported by Zephyr anymore - so we can drop
it.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-05 07:48:47 -04:00
Evgeniy Paltsev
e1455fafdf ARC: IRQ: drop unused _VectorTable declaration
We don't use '_VectorTable' in the driver, so let's drop it's
declaration.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-10-05 07:48:47 -04:00
Stefan Eicher
fbe7d7297e comments: minor typo fixes
Fixing minor typos in comments

Signed-off-by: Stefan Eicher <stefan.eicher@ypsomed.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-05 07:18:13 -04:00
Yuval Peress
a81f8af701 build: Fix native_posix build on GNU GCC
Update -fno-pie to only be added when relevant. This fixes native_posix
builds on Debian hosts.

* Debian and other Linux distributions have ld with --warn-textrel as
default.
* The option generates a warning when linking on x86.
* The warning make scripts/twister fail because we treat all warnings
as error.
* The warning is issued when no PIE objects are linked against PIE
library.
* PIE (Position Independent Executable) or not can be seen with the
following command.
* When you want to generate non PIE, link with `-no-pie.`

Non PIE

  $ readelf -l build/zephyr/zephyr.elf | grep 'Elf file type is'
  Elf file type is EXEC (Executable file)

PIE

  $ readelf -l /lib/x86_64-linux-gnu/libc.so.6 | \
  grep 'Elf file type is'
  Elf file type is DYN (Shared object file)

Issue #35244

Signed-off-by: Yuval Peress <peress@google.com>
2021-10-05 05:44:32 -04:00
Daniel Leung
ef0d955758 uart: ns16550: add workaround to re-enable interrupts in ISR
In some configurations (e.g. edge interrupt triggers),
an interruptible event occurs during ISR and the host interrupt
controller does not see the new event due to IIR is constantly
asserting interrupts. For example, the callback handles RX and
then TX. If another character comes in before end of TX processing
(TX interrupt still asserts while raising RX interrupt), the host
interrupt controller may not see this new event. So if needed,
the IER is being toggled to re-assert interrupts at the end of ISR
to nudge the host interrupt controller to fire the ISR again.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-04 20:49:13 -04:00
Krzysztof Chruscinski
cf3dabedaf drivers: gpio: nrf: Remove CONFIG_GPIO_NRF_P0 and CONFIG_GPIO_NRF_P1
Remove Kconfig options for enabling device instances in favor of
taking that information only from device tree. Prior to that
change there was a mix of devicetree and Kconfig.

Bring back use of CONFIG_GPIO_NRF_INIT_PRIORITY.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-10-04 20:48:20 -04:00
Wolfgang Puffitsch
f3b97ccfb6 Bluetooth: controller: Introduce Kconfig for Read ISO Link Quality
Introduce Kconfig for Read ISO Link Quality command. Support for the
command is optional according to the specification.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-10-04 20:48:01 -04:00
Wolfgang Puffitsch
d58224566d Bluetooth: controller: Reorder variable declarations in ISO HCI commands
Reorder variable declarations in HCI command handlers of ISO-related
commands to conform to reverse Christmas tree style.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-10-04 20:48:01 -04:00
Wolfgang Puffitsch
7c0b74bc0d Bluetooth: controller: Fix use of handle field in HCI command handling
Fix use of handle field in HCI command handling for some ISO-related
commands. The response buffer may reuse the command buffer. Therefore,
the handle field must not be copied directly from the command to the
response.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-10-04 20:48:01 -04:00
Wolfgang Puffitsch
230f8db0d5 Bluetooth: controller: Update supported commands for ISO
Set bits for ISO-related supported commands depending on selected
features and adjust compilation guards for the respective handler
functions.

Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
2021-10-04 20:48:01 -04:00
Bartosz Bilas
d6792dd7be drivers: gsm_ppp: introduce modem on/off callbacks
Allow the user to register function callbacks that
are executed during gsm modem configuring and stopping.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2021-10-04 20:46:04 -04:00
Trond Einar Snekvik
cd89f42393 Bluetooth: Mesh: Model extensions walk stops before last model
When reaching the last model in the circular extension linked list, the
walker would abandon the walk before checking the last model. This makes
us skip models when checking the subscription list, potentially causing
incoming messages to be wrongfully ignored.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-10-04 20:45:23 -04:00