Commit graph

56626 commits

Author SHA1 Message Date
Martí Bolívar 51f8588fb8 west.yml: allow users to easily add more modules
Import any manifest files in a new 'submanifests' directory into
west.yml.

This lets users define custom zephyr modules or easily override
built-in modules by dropping their own manifest files into
submanifests/some-user-file.yaml.

Provide an example and a README with links to the relevant
documentation in 'submanifests' to get users started.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-10-07 13:45:42 +02:00
Tim Lin e8366689d1 ITE: dts: cpu/yaml: fix the name of compatible
This name should be the same as cpus node in dtsi. After the power
policy is added, the cpu-power-states in the CPU properties can
be used.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2021-10-07 06:09:45 -05:00
Maureen Helm 1453f25a5f doc: release: Add sensor release notes for v2.7.0
Documents significant changes to sensor drivers in the v2.7.0 release,
including new drivers added and existing drivers modified.

Signed-off-by: Maureen Helm <maureen.helm@intel.com>
2021-10-07 07:00:21 -04:00
Robert Melchers 59fcf8c031 net: ethernet: ARP addresses being filled with mcast addresses
Fixes #38994, ARP messages were being sent to IPvXmcast MAC addresses
rather than the expected source MAC address or the broadcast address.

Signed-off-by: Robert Melchers <rmelch@hotmail.com>
2021-10-07 11:23:20 +02:00
Jani Hirsimäki f2859f9501 drivers: wifi: esp_at: changes to scanning
If CONFIG_WIFI_ESP_AT_SCAN_MAC_ADDRESS: mac addr included in
scanning results.
if CONFIG_WIFI_ESP_AT_SCAN_PASSIVE: passive scanning is used instead of
default active scanning.
If CONFIG_WIFI_ESP_AT_SCAN_RESULT_RSSI_ORDERED: scanning response
ordered by RSSI.

Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
2021-10-07 10:55:37 +02:00
Jani Hirsimäki e913fda436 net: l2: wifi_shell: mac address in scanning results
Showing mac address in scanning results.

Signed-off-by: Jani Hirsimäki <jani.hirsimaki@nordicsemi.no>
2021-10-07 10:55:37 +02:00
Neil Armstrong 866840e4e8 arm64: mmu: don't use a Level block if PA is not aligned
When mapping the following:
device_map(&base0, DEVA_BASE, DEVA_SIZE, K_MEM_CACHE_NONE);
device_map(&base1, DEVB_BASE , DEVB_SIZE, K_MEM_CACHE_NONE);

with:
- DEVA_SIZE not multiple of a 4KB granule L2 block size (0x200000)
- DEVB_SIZE more than 2 x 4KB granule L2 block size

The mmu code will fill the first device_map() in a L3 table, then
on the second mapping the mmu code will complete the previous L3
table.
At the end of this table, the actual code will select an L2 block
instead of a table because the *virtual address* is multiple with
the L2 block size.

But if the physical address is not, the virtual block offset will
be ORed to the physical address, and not added.

Leading to a weird scenario where virtual memory is duplicated
resulting of the addresses ORing and not addition.

Example:
device_map(&base0, DEVA_BASE, 0x20000, K_MEM_CACHE_NONE);
device_map(&base1, 0x44000000 , 0x400000, K_MEM_CACHE_NONE);

First will result in VA 0x5ffe0000 and second in VA 0x5fbe0000.

The MMU code will use a table to map 0x5ffe0000 to 0x5fbfffff.

For 0x5fc00000 to 0x5fdfffff, since the VA is multiple of an L2
block size, the L3 table is not used.

But the L2 block description entry address is 0x44060000, meaning
that for each access in this L2 block, the following will be done:

0x44060000 | (VA & 1FFFFF)

This is working for the 0x5fc40000 to 0x5fc5ffff access, but for the
0x5fbc60000 (0x5fbe0000 + 0x80000) access the PA gets calculated as :

0x44060000 | (0x5fc60000 & 1FFFFF) = 0x44060000 | 0x60000 = 0x44060000

Instead of the expected 0x44080000.

The solution is to check if the PA descriptor is aligned with the
level block size, if not move to the next level.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-10-07 10:54:28 +02:00
Stephan Linz ca1f3c32be samples: echo_server: Enable USB by the application
This commit allows let build echo_server sample with
overlay-netusb.conf.

USB subsystem must be enabled by the application.

Signed-off-by: Stephan Linz <linz@li-pro.net>
2021-10-07 10:53:54 +02:00
Mateusz Karlic 3844b79e96 net: sockets: sockets_can: Allow parallel receive/send
Implements mechanism similar to the one available in net/lib/sockets.c
(since the merge of #27054) in sockets_can to enable parallel rx/tx.

Fixes #38698

Signed-off-by: Mateusz Karlic <mkarlic@internships.antmicro.com>
2021-10-06 22:22:43 -04:00
Armando Visconti a2f3ea5d19 drivers/sensor: lsm6dso: Prevent device entering I3C
On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. It might happen that after a board
reset the logical level '1' is preserved (maybe a level shifter)
forcing the LSM6DSO to enter erroneously in I3C mode, breaking any
attempt to communicate with it. (Fix #38902)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-10-06 22:22:09 -04:00
Dino Li 1e1c6151d7 soc: it8xxx2: enable CONFIG_UART_NS16550_WA_ISR_REENABLE_INTERRUPT
Fix issue where console get stuck.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2021-10-06 22:21:15 -04:00
Michał Narajowski 4cb935f264 tests: bluetooth: tester: Set Config Client timeout to larger value
In some scenarios when there is a need for multiple re-transmissions of
segmented messages the default value of 2 seconds may be not enough.

In my experience this improves stability of Configuration Client tests
involving multiple PTS instances.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-10-06 22:20:22 -04:00
Marcin Niestroj 87ac114571 drivers: wifi: esp_at: fix connect to open network
According to ESP-AT documentation ([1] for version before 2.0 and [2]
for version 2.1) of AT+CWJAP command, both SSID and PSK are required.
Even for newest ESP-AT release 2.2 ([3]) "," (comma) is needed even if
SSID or PSK are not explicitly provided.

Send 'AT+CWJAP="SSID",""' instead of 'AT+CWJAP="SSID"' when connecting
to open WiFi network, to follow AT commands documentation.

Tested with ESP-AT firmware 2.1.

[1] https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf
[2] https://github.com/espressif/esp-at/blob/release/v2.1.0.0_esp8266/docs/en/AT_Command_Set/Wi-Fi_AT_Commands.md#atcwjapconnects-to-an-ap
[3] https://github.com/espressif/esp-at/blob/release/v2.2.0.0_esp8266/docs/en/AT_Command_Set/Wi-Fi_AT_Commands.rst#refatcwjap-wifi-at-connect-to-an-ap

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-10-06 20:44:34 -04:00
Andy Ross caf197262a tests/lib/heap: Add coverage for sys_heap_usable_size()
Call and validate the new function.  Note that this is actually
whiteboxing the heap implementation and duplicating the internal logic
needed to compute the header size, so as to validate that the correct
number is being returned.  I had to write that test code anyway, might
as well commit it (the heap header is awfully well optimized now and
very unlikely to change).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-06 20:20:31 -04:00
Andy Ross cf0c5e2a1c lib/os: Add sys_heap_usable_size()
Add a simple internal block size predicate to expose the internal
memory region reserved for an allocation.  The immediate use case is
cache-incoherent systems wanting to do an invalidate of freed memory,
but it might be useful for apps doing e.g. string processing to better
optimize size changes, etc...

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-10-06 20:20:31 -04:00
Dominik Ermel af696293dc west.yml: Update mcumgr revision
Commits affecting Zephyr that are included with the new revision:
    47fdde0 Fix missing else in configuration;
    30cf9fe zephyr: Fix BUILD_ASSERT failing build with correct number
            of images.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-06 19:44:09 -04:00
Daniel Leung ed83474b10 interrupt_controller: remove CONFIG_DW_ICTL_OFFSET
This kconfig is only used for one board and is simply an alias
to another kconfig. So remove CONFIG_DW_ICTL_OFFSET and apply
the value directly to the other kconfig.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-06 19:43:48 -04:00
Daniel Leung 10eab23f08 west: sign/rimage: fix rimage argument if --no-manifest
If --no-manifest is specified, '-e' is still being passed
to rimage to build the extended manifest. Fix this so
that when --no-manifest is specified, '-e' is no longer
passed to rimage.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-10-06 19:43:30 -04:00
Flavio Ceolin 045c4bbf72 doc: release: 2.7: add release notes for security
Update V2.7.0 release notes document with vulnerabilities fixes.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin f7b320a7c3 doc: security: Update information about CVE-2021-3436
Update old CVE the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin 6c488c8556 doc: security: Update information about CVE-2021-3510
Update old CVE the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
Flavio Ceolin 613b38c24b doc: security: Update information about CVE-2021-3625
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
Flavio Ceolin 879438a424 doc: security: Update information about CVE-2021-3319
Update old CVE the proper information.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-10-06 18:18:06 -04:00
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