Commit graph

44393 commits

Author SHA1 Message Date
Carles Cufi
ded737cd58 boards: nordic: Turn hardware stack protection on by default
In all Nordic boards that contain ICs that support hardware stack
protection, turn it on by default so that we detect
stack overflows easier.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-18 13:48:15 +02:00
Flavio Ceolin
15c946a8d5 codeowners: Add myself as additional onwer to power
Putting me on power management loop.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-09-18 07:39:22 -04:00
Flavio Ceolin
7fed07d55e codeowners: Add myself to gdbstub
Add myself as code owner for gdbstub.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2020-09-18 07:39:22 -04:00
Carles Cufi
2fd929355a Bluetooth: tester: Fixes for GCC 10.x
Fix the structures so that they are compliant with the stricter checks
of GCC 10.x, and at the same time correct a bug that was present in the
handling of the GAP Start Advertising BTP command.

Fixes #28375.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-18 13:32:08 +02:00
Vinayak Kariappa Chettimada
17c4396ed4 Bluetooth: controller: Fix cond. compilation for broadcaster
Fix conditional compilation for extended advertising
without peripheral support.

This fixes missing initialization of buffer for generating
advertising terminate event.

Fixes #28325.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-09-18 10:28:57 +02:00
Peter Bigot
332b7df61b kernel: avoid implementation-defined behavior in timeout calculation
When to->dticks is an int64_t it may happen that the calculated
remaining time is a value that cannot be exactly represented in the
destination int32_t, producing an implementation-defined result which
can include a signal (interrupt).  Cap the maximum delay to the
largest value suported by the int32_t result.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-17 22:19:35 -04:00
Martí Bolívar
840eaab970 doc: west: add information about private repositories
How to manage repositories that require authentication to fetch from
using west is a frequently asked question.

TL;DR on the answer is that Git already has credential storage built
in, so our expectation is that there is nothing west needs to do in
particular, as users can select whatever credential helper works for
them, or set up a custom one using something like the GIT_ASKPASS
environment variable.

That's not a very helpful expectation if people aren't aware that
credential helpers exist, though, so let's document that and provide
examples for common use cases, as well as west-specific
troubleshooting advice.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-09-17 21:39:03 -04:00
Ying ming
13e1c919d4 test: fatal exception: add test case
Add regex in testcase.yaml to verify the kernel will dump
thread id information and error type when exception occurs.

Signed-off-by: Ying ming <mingx.ying@intel.com>
2020-09-17 21:37:39 -04:00
Ying ming
5b8569b305 test: fatal exception: Modify test case file location
Modify the location of the test case file because new
test cases need to be submitted. If the old test
cases are not in a folder, CI will fail and
prompts "the command exited with status 1".

Signed-off-by: Ying ming <mingx.ying@intel.com>
2020-09-17 21:37:39 -04:00
Maksim Masalski
cd068c26dc doc: replace the latest sdk with 0.11.4 version
How-to guide has 0.11.3 SDK
Replace with the latest one SDK 0.11.4 in the documentation
description and links.

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-09-17 21:08:38 -04:00
Daniel Leung
43b2e291db x86_64: fix size to init stack at boot
The boot code of x86_64 initializes the stack (if enabled)
with a hard-coded size for the ISR stack. However,
the stack being used does not have to be the ISR stack,
and can be any defined stacks. So pass in the actual size
of the stack so the stack can be initialized properly.

Fixes #21843

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-09-17 21:05:45 -04:00
Crist Xu
ac3d9438ed drivers: usb: Fix usb fail when using the on-chip memory
Using SCB_CleanInvalidateDcache instead of SCB_DisableDcache
 & SCB_EnableDcache when config the non-cache area, in case
of the cache will effect the configuration of the non-cache
area

Signed-off-by: Crist Xu <crist.xu@nxp.com>
2020-09-17 16:56:28 -05:00
Kumar Gala
55d6c8a38a tests: devicetree: legacy_api: Exclude test on pinnacle_100_dvk
The pinnacle_100_dvk board fails this test, but it was added after the
legacy DTS supprot was deprecated so we will just exclude the board
from being built on this test.

Fixes #28480

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-09-17 16:30:16 -05:00
Maksim Masalski
f08f9d6410 samples: exclude mec15xxevb_assy6853 in espi sample when sanitycheck
ESPI is supported in MEC15 chips but similar to PECI, I2C, eSPI bus
testing requires another device to act as eSPI host.
While this sample can be run in EVB the HW connection to a eSPI host
(Intel RVP) is not documented/supported.

Mark as not supported in that HW only in Modular card
(which setup is documented)

Also remove duplicate definition of the "depends_on: espi"
in the end of the sample.yaml file

Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
2020-09-17 16:13:51 -05:00
Henrik Brix Andersen
29e067ba33 doc: release: 2.4: add ARM DesignStart FPGA related release notes
Add release notes covering the various ARM DesignStart FPGA related
additions in Zephyr v2.4.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-09-17 14:46:33 -05:00
Daniel Leung
66a741d071 doc: releases: add notes on core dump for v2.4 release
This adds a few lines regarding core dump in the v2.4 release
notes.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-09-17 14:44:48 -05:00
Gerson Fernando Budke
b79b1cb025 boards: atmel: Add missing default configuration
The sam_e70_xplained and sam_v71_xult boards doesn't have disable wdt
and board name configs.  This add missing defaults.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-09-17 14:44:21 -05:00
Gerson Fernando Budke
e10f85bdda boards: atmel: set BUILD_OUTPUT_HEX for OpenOCD boards
The 3124c02 introduced the requirement of CONFIG_BUILD_OUTPUT_HEX be on
the boards' default configuration in order for the runner to be passed
the path to the hex file being loaded. Add missing configuration for
Atmel boards that uses OpenOCD for flash and debug.

Fixes #28337.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-09-17 14:44:21 -05:00
Andrzej Puzdrowski
c393f31b8e release-notes-2.4: flash changes
Added notes on latest flash changes.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-09-17 14:43:23 -05:00
Jennifer Williams
65bcba61d0 docs: ref: kernel: clarify data_item structure in message queues
- use sizeof(struct data_item_type) instead of sizeof(data_item_type)
- use struct data_item_type instead of invalid reference data_item_t
- add aligned typedef struct data_item_type example implemenation
- add note about checking return value for error message

Fixes #19684

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2020-09-17 14:17:47 -05:00
Pascal Brogle
32f053403f net: lwm2m: remove special handling for message id 0
Change so that the caller of lwm2m_init_message is
responsible for generating a message id and remove message id generation
from lwm2m_init_message. Prevents generating a new id when the caller's
intent is to init a message with id 0.

Fixes #28283

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2020-09-17 13:34:19 -05:00
Pascal Brogle
18a51a0bf6 net: lwm2m: use defines for message id and token generation
message id 0 and token 0 have special semantics in the lwm2m engine,
they are used to request generation of new id, mark them as such.

Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
2020-09-17 13:34:19 -05:00
Carles Cufi
121937e071 Bluetooth: controller: Make RX prio thread stack configurable
Now that CONFIG_BT_CTLR_RX_PRIO_STACK_SIZE defines a stack size, allow
for it to be configurable from a .conf file just like the rest of the
threads in Bluetooth.

Fixes #27768.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-09-17 18:08:21 +02:00
Daniel Leung
946c8f0584 tests: latency_measure: move timing_init() earlier
Move the call to timing_init() earlier before function call
to get frequency. Some arch/SoC/board require initialization
before there is a valid frequency value. Or else the printed
value would not be useful.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-09-17 10:54:40 -04:00
Anas Nashif
2164a7d0dc samples: display: add fixture
Add fixture so this test only runs on devices that have a display
connected.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-09-17 07:10:03 -04:00
peng1 chen
bcf1aed311 tests: fix potential integer overflow
fixed coverity issue #28413.

Signed-off-by: peng1 chen <peng1.chen@intel.com>
2020-09-17 07:09:29 -04:00
Emil Obalski
464d9130d5 samples: mgmr: smp_svr: Build samples in CI.
This commit allows the CI to build the samples for nRF devices.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-09-17 10:56:57 +02:00
Emil Obalski
6a56710aae samples: mgmt: smp_svr: Add Serial over USB CDC_ACM overlay.
This patch adds overlay for USB serial backend over CDC_ACM
device.

Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
2020-09-17 10:56:57 +02:00
Trond Einar Snekvik
d7e0d8135f Bluetooth: Mesh: Use #ifdef for provisioner build
Replaces the current zero length array for provisioner data with
ifdefs, to silence new gcc 10 warnings about array element access.

Fixes #28371.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2020-09-17 11:51:13 +03:00
Spoorthy Priya Yerabolu
04d3c3c1a0 docs: ref: kernel: memoryslabs: Adding notes if APIs called from ISR
Added a note in documentation for k_mem_slab_alloc(),
k_mem_pool_alloc() and k_heap_alloc() are safe
to call in an interrupt with the timeout K_NO_WAIT.

Fixes: #28020

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2020-09-17 09:31:28 +02:00
Jukka Rissanen
060d36537a drivers: eth: Fix return value if we run out of bufs in TX
The correct return value is -ENOBUFS if we run out of network
buffers when sending the packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-17 09:31:10 +02:00
Jukka Rissanen
c8294db083 doc: net: Add note about socket API thread safe status
Currently the socket API is not thread safe so mention this in
socket API documentation. The plan is to add locks in 2.5 release.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-09-17 09:30:52 +02:00
Watson Zeng
37f75d2d1f kernel: sched: bug fix for trace and monitor
sys_trace_thread_abort and z_thread_monitor_exit in
z_thread_single_abort also need to be protected by
sched_spinlock, otherwise when after the spinlock
release, if there is an pending interrupt, it will cause an
sched in the interrrupt exit, and those trace and monitor
function will never reach.

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
2020-09-17 09:30:22 +02:00
Andrew Boie
8240d7d07b x86: memory map BIOS Data Area
Changes to paging code ensured that the NULL virtual page is
never mapped. Since RAM is identity mapped, on a PC-like
system accessing the BIOS Data Area in the first 4K requires
a memory mapping. We need to read this to probe the ACPI RSDP.

Additionally check that the BDA has something in it as well
and not a bunch of zeroes.

It is unclear whether this function is truly safe on UEFI
systems, but that is for another day.

Fixes: #27867

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-09-16 20:37:34 -04:00
Ruud Derwig
0076313bcb soc: arc: Increase cpu frequency for nsim_hs_smp
0.5 Mhz with 100 ticks per sec leaves 5000 cycles per tick,
which broke some tests that assumed more work within 1 tick.
Set to 1 Mhz: balance multi-core simulation speed and tick duration.

Fixes #27943

Signed-off-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
2020-09-16 14:35:31 -05:00
Ryan Erickson
1faeab4d54 boards: add Pinnacle 100 DVK
Add Laird Connectivity Pinnacle 100 modem.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
5ac21bd604 drivers: modem: hl7800: fix dts binding
Fix hl7800 vendor prefix to match existing Sierra Wireless entry.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
7b5714669c drivers: modem: hl7800: add IPv6 support
Add support for dual mode IPv4/IPv6 stack.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
03e62be290 drivers: modem: hl7800: do not require DEVICE_POWER_MANAGEMENT
Remove requirement for DEVICE_POWER_MANAGEMENT,
the driver does not need it to operate.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
ad04354110 drivers: modem: hl7800: remove VLA
Remove variable length array from function to comply with MISRA checks.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
c74166ed5e drivers: modem: hl7800: modem receiver IMEI
Modem receiver IMEI data field is only available
when CONFIG_MODEM_SIM_NUMBERS.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
2e7b263013 drivers: modem: hl7800: struct device data renamed
change struct device->driver_data to new name of struct device->data.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Ryan Erickson
61ce2dc681 drivers: modem: hl7800: RTC only available with newlibc
RTC API is only available if NEWLIB_LIBC is available.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
2020-09-16 14:21:41 -05:00
Daniel Leung
5632ee26f3 x86: pcie: fallback to config via PIO
When probing for PCI-E device resources, it is possible that
configuration via MMIO is not available. This may caused by
BIOS or its settings. So when CONFIG_PCIE_MMIO_CFG=y, have
a fallback path to config devices via PIO. The inability to
config via MMIO has been observed on a couple UP Squared
boards.

Fixes #27339

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-09-16 14:16:50 -05:00
NavinSankar Velliangiri
dd8f135e2c mgmt: hawkbit: Fix NULL pointer dereferences
Coverity spots that null pointer is passing to flash_img_buffered_write.
This patch fixes the problem.

Signed-off-by: NavinSankar Velliangiri <navin@linumiz.com>
2020-09-16 13:51:55 -05:00
Peter Bigot
a28f570855 tests: bluetooth: shell: add usb shell test configuration
Verify builds and execution when a CDC-ACM UART is used for the shell.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-16 13:32:22 -05:00
Peter Bigot
611263921a usb: add optional work queue
The USB infrastructure currently uses the system work queue for
offloading transfers, CDC-ACM UART transmission/reception, and device
firmware activities.  This causes problems when the system work queue
is also used to initiate some activities (such as UART) that normally
complete without requiring an external thread: in that case the USB
infrastructure is prevented from making progress because the system
work queue is blocked waiting for the USB infrastructure to provide
data.

Break the dependency by allowing the USB infrastructure to use a
dedicated work queue which doesn't depend on availability of the
system work queue.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-16 13:32:22 -05:00
Peter Bigot
2c105e8f0d usb: clean CMakeLists conditions
Use the helper function to conditionally include source files.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-16 13:32:22 -05:00
Peter Bigot
692449d6c7 usb: fix header language linkage
The block that introduced a C linkage region was not closed in the
header as it should be.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-16 13:32:22 -05:00
Peter Bigot
2e99f3b652 usb: cdc_acm: fix formatting specifiers in log messages
The z length modifier must be applied to avoid build errors when the
format is verified by the compiler on systems where size_t is larger
than int.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-09-16 13:32:22 -05:00