Commit graph

99049 commits

Author SHA1 Message Date
Daniel Leung
7fe29dcee9 soc: intel_s1000: change cached regions to write-through
The i2s_cavs.c driver manipulates cache lines before commencing
any DMA transfers. With write-back cache, if the DMA receive
buffer is not aligned to the cache lines, the data around
the buffer will be invalidated and may never written to memory.
Since the driver takes an external memory slab as buffer and
there is no easy way to force cache line alignment on
the application side, set the cached region to write-through
to avoid potential issue.

Fixes #13223

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-04-12 17:59:06 -04:00
Sebastian Bøe
c15545d4d4 doc: relnotes: 1.14 Build and Infrastructure release notes
Add more release notes for the build system for version 1.14.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-04-12 17:58:18 -04:00
Ioannis Glaropoulos
7f478a5d29 doc: guides: porting: fix nRF51 Cortex-m core
nRF51xx SoCs have an ARM Cortex-M0 core, not an ARM Cortex-M0+.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-12 10:28:02 -05:00
Robert Lubos
a886a28450 doc: relnotes: 1.14 nrf 802.15.4 radio driver update
nRF 802.15.4 radio driver was updated, hence mention it in release
notes.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-04-12 10:08:05 -04:00
Wentong Wu
8646a8e4f5 tests/kernel/mem_protect/stackprot: stack size adjust
revert commit 3e255e968 which is to adjust stack size
on qemu_x86 platform for coverage test, but break other
platform's CI test.

Fixes: #15379.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-04-12 10:06:43 -04:00
David B. Kinder
f38aa2e301 doc: improve visibility of doc version menu
Move the doc version selection menu from the bottom of the left nav menu
to above the TOC menu, making it more obvious.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-12 09:37:15 -04:00
Krzysztof Chruscinski
f35b854345 logging: Fix RTT backend drop mode and coverity issue
Drop mode in RTT backend was broken. It is not the default
one so most likely it was unnoticed for a long time. Fixed
to report drop message when logs are lost.

Additionally, added assert to ensure that memmove does not
do memory overwrite.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-04-12 08:38:16 -04:00
Robert Lubos
9411abbc00 shell: telnet: Fix coverity issues
Fix coverity issue 197618, reporting unhandled return values.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2019-04-12 08:35:19 -04:00
Andrzej Głąbek
4438c1a5fe doc: relnotes: 1.14 add a few more drivers related release notes
Add more drivers related release notes for version 1.14.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2019-04-12 08:29:06 -04:00
Ulf Magnusson
4f920df29a scripts: Remove checkconfig.py
This is an old script for finding references to undefined Kconfig
symbols that assumes Kconfiglib 1 (an older API).

There's now a different check for references to undefined symbols (see
commit 1d0834b35f ("checks: kconfig: Check for references to undefined
Kconfig symbols") in the ci-tools repo).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-04-12 08:28:03 -04:00
Anas Nashif
a942fcc23e doc: release notes cleanup
Added ARC related changed and cleaned up bullets.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-11 23:57:12 -04:00
Vijay Kumar B
a69cb036c4 ethernet: eth_stellaris: data_len should not include header size
As part of the ll_reserve refactoring effort, the packet length now
includes header size as well. Before the refactor, when the packet
length was written to the device, it did not include the header size,
which is the required value as per the LM3S6965 datasheet. After the
refactor the packet length includes the header size as well. The
header size has to subtracted from the packet length before writing to
the device. Fixes #13943.

Signed-off-by: Vijay Kumar B <vijaykumar@zilogic.com>
2019-04-11 18:04:05 -04:00
Jukka Rissanen
1897896e97 net: sockets: Make sure that getaddrinfo() cannot hang forever
If for some reason the DNS resolver callback is not called properly
then make sure that semaphore will not block forever.

Fixes #15197

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-04-11 18:01:08 -04:00
Wentong Wu
22c9646b97 tests: adjust stack size for mps2_an385's coverage test
for SDK 0.10.0, it consumes more stack size when coverage
enabled, so adjust stack size to fix stack overflow issue.

Fixes: #15206.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-04-11 17:59:39 -04:00
Wentong Wu
3e255e968a tests: adjust stack size for qemu_x86's coverage test
for SDK 0.10.0, it consumes more stack size when coverage
enabled, so adjust stack size to fix stack overflow issue.

Fixes: #15206.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-04-11 17:59:39 -04:00
Krzysztof Chruscinski
aa9f0ec2fa doc: relnotes: 1.14 logging, shell, ring_buf and drivers release notes
Added release notes for 1.14 release.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-11 17:51:21 -04:00
Maureen Helm
dd7ccd590d doc: releases: Add drivers to 1.14 release notes
Adds new and significantly modified drivers to the 1.14 release notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-11 17:49:40 -04:00
Maureen Helm
720ce48e2f doc: releases: Add Arm, RISC-V, and shield boards to 1.14 release notes
Adds all the new Arm, RISC-V, and shield boards to the 1.14 release
notes.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-04-11 17:49:40 -04:00
Johan Hedberg
42d330406e Bluetooth: Mesh: Fix qualification test MESH/SR/HM/CFS/BV-02-C
The commit 8d0ef1eb85 attempted to fix
test case MESH/SR/HM/CFS/BV-02-C, however inadvertently ended up
introducing a hidden bug. This bug was unearthed thanks to commit
686f5c79cf. We have to keep always track
of the FastPeriodDivisor state whether we're using it (faults > 0) or
not (faults == 0). Introduce a boolean field to the model publication
that's used to indicate whether the FastPeriodDivisor should be
applied or not, instead of zeroing the divisor when there are no
faults (this would cause wrong behavior when faults appear again).

Additionally, the PTS seems to require that we wait until the end of
the existing period before sending the next Health Current Status,
rather than sending it immediately when the fault count changes.

Fixes #15365

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-11 21:24:55 +03:00
Ioannis Glaropoulos
2895da02a4 drivers: timer: systick: clear pending events when resetting timeout
In the unlucky scenario of a SysTick event (wrap) occurring
while we re-program the last_load value, the SysTick ISR
will run immediately after we unlock interrupts. In that
case the timeout we have just configured will expire
instantaneously, leading to operations being executed
much earlier than expected. Avoid this by clearing possibly
pending SysTick exceptions (writing 1 to ICSR.PENDSTCLR).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 13:50:41 -04:00
Ioannis Glaropoulos
a0a861bfd7 drivers: timer: systick: fix off-by-one setting in tickless mode
When the counter reaches zero, it reloads the value in
SYST_RVR on the next clock edge. This means that if the
LOAD value is N, the interrupt ("tick") is triggered
every N+1 cycles. Therefore, when we operate in tickless
mode, and we want to schedule the next timeout, we need
to configure the LOAD value with last_load - 1, in order
to get an event in last_load cycles.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 13:50:41 -04:00
Ioannis Glaropoulos
b1b4ec126d drivers: timer: systick: fix off-by-one setting
When the counter reaches zero, it reloads the value in
SYST_RVR on the next clock edge. This means that if the
LOAD value is N, the interrupt ("tick") is triggered
every N+1 cycles. Therefore, when we operate in non-
tickless mode, we need to configure the LOAD value
with CYC_PER_TICK - 1, in order to get an event
every CYC_PER_TICK cycles.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 13:50:41 -04:00
Ioannis Glaropoulos
04ef68b85a CODEOWNERS: Adding missing code owner for Cortex-M SysTick driver
Adding code-owner for the ARM Cortex-M SysTick-based
timer driver.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 13:50:41 -04:00
Johann Fischer
d2c6869e30 drivers: usb: check maximum packet size
Check maximum packet size (MPS) of an endpoint in usb_dc_kinetis
and usb_dc_native_posix drivers.

resolves #14957
resolves #14954

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-04-11 13:35:24 -04:00
Johann Fischer
65fd5859a4 include: usb: add FS MPS for different endpoint types
Add full speed maximum packet size for different endpoint types.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-04-11 13:35:24 -04:00
Johann Fischer
c13e201b18 usb: replace MAX_PACKET_SIZE0 with meaningful USB_MAX_CTRL_MPS
Replace MAX_PACKET_SIZE0 with meaningful USB_MAX_CTRL_MPS.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2019-04-11 13:35:24 -04:00
Andrei Emeltchenko
5b74fb4f23 usb: usb_dc_kinetis: Fix endpoint index check
Fix check for maximum endpoint index.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-11 13:35:24 -04:00
Andrei Emeltchenko
40774007c3 usb: usb_dc_kinetis: Fix access wrong memory
Add appropriate check.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-11 13:35:24 -04:00
Andrei Emeltchenko
08f53a435c usb: usb_dc_kinetis: Fix setting address for not attached device
Add appropriate check.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-11 13:35:24 -04:00
Andrei Emeltchenko
4c9ea1e370 usb: netusb: ecm: Enable netusb for the right iface/alt_set
Only enable netusb for the right configuration of interface and
alt_setting.

Fixes #13560

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-11 13:35:24 -04:00
Andrei Emeltchenko
1a1c518c25 usb: device: Change iface set callback parameters
Include to the callback parameters also alt_setting to be able to make
right choice for ECM.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-11 13:35:24 -04:00
Vinayak Kariappa Chettimada
fff35bd682 Bluetooth: controller: Fix encryption setup to be queueable
Fix the controller implementation to make start encryption
queueable if there is any control procedure in progress.

The context related to encryption procedure is now shared so
that it will be used after the ongoing procedure completes.

The fix here maintains the old functionality of serializing
the queued data and LL Encryption Request PDU, so that data
queued before start encryption is acknowledged.

Fixes #15012.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-04-11 13:22:02 -04:00
Vinayak Kariappa Chettimada
e81acd8c3f Bluetooth: controller: Revert set encryption procedure pending
This reverts commit 0cf82cdd31.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2019-04-11 13:22:02 -04:00
Ravi kumar Veeramally
189b22789c net: vlan: Etherent layer missed L2 header
When VLAN is enabled, ethernet l2 layer fills ethernet header
but not added to the network buffer.

Fixes #15346

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2019-04-11 13:20:40 -04:00
Johan Hedberg
44bfefce14 doc: relnotes: 1.14 Bluetooth Host release notes
Add major changes for Bluetooth Host since 1.13.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2019-04-11 10:40:57 -04:00
Carles Cufi
d3f56d60dc doc: relnotes: 1.14 Bluetooth Controller release notes
Add the relevant release notes for the Bluetooth Controller for version
1.14.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-11 10:40:57 -04:00
Ioannis Glaropoulos
7886d50f2c doc: relnotes: 1.14 arm arch release notes
Release notes entries for ARM architecture.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 10:40:31 -04:00
Ioannis Glaropoulos
3e61917254 doc: relnotes: 1.14 arm SoC/Boards release notes
Release notes entries for ARM SoC and Board support.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-04-11 10:40:31 -04:00
Andrei Emeltchenko
fa5d9d20ec quark_se_c1000_devboard: Fix broken DTS configuration
Fixes broken CC2520 on quark_se_c1000_devboard configuration after
commit 25d17db.

Fixes #15070

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-04-11 10:39:21 -04:00
Andrzej Puzdrowski
e015661b94 doc: relnotes: 1.14 update documentation improvement patagtaph
Update the relevant release notes for the documentation improvement
for version 1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Andrzej Puzdrowski
b607d48031 doc: relnotes: 1.14 nRF5 flash driver release notes
Add the relevant release notes for the nRF flash driver for version
1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Andrzej Puzdrowski
480c5d00f2 doc: relnotes: 1.14 settings release notes
Add the relevant release notes for the settings for version
1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Andrzej Puzdrowski
5e52d3a11d doc: relnotes: 1.14 flash_map release notes
Add the relevant release notes for the flash_map for version
1.14.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-04-11 10:38:45 -04:00
Carles Cufi
14c75705cb samples: hci_uart: Reduce MAX_CONN to 16 for the micro:bit
In order to fit in SRAM, reduce the CONFIG_BT_MAX_CONN from 20 to 16 in
the configuration used for the BBC micro:bit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-11 14:54:37 +02:00
Carles Cufi
bae9f1967b samples: Bluetooth: hci_uart: Implement NOP Command Complete
Implement the Controller counterpart to CONFIG_BT_WAIT_NOP so that it
issues a NOP Command Complete event after booting up, to signal to the
Host that it is ready to receive HCI traffic.

Fixes #15333

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-04-11 14:54:37 +02:00
David B. Kinder
9fff548c88 doc: add orphaned crypto docs
tinycrypt documentation wasn't included in the table of contents so add
it into the guides section.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-11 08:08:28 -04:00
Luiz Augusto von Dentz
f2a34a6106 Bluetooth: GATT: Fix not clearing Client Features
When a device is considered unpaired any configuration set in Client
Features shall also be removed.

Fixes #15329

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2019-04-11 12:04:53 +03:00
Jim Paris
510a6dc5e4 drivers: flash: spi_nor.c: fix typo
This was referencing the wrong DT property, leading to build errors.

Signed-off-by: Jim Paris <jim@jtan.com>
2019-04-11 10:02:44 +02:00
Jim Paris
9a0d113260 dts: flash: add missing DT properties to jedec,spi-nor
The erase-block-size and write-block-size are needed for the spi_nor
driver to compile.

scripts/dts/extract/flash.py automatically adds these properties if
this flash device is part of the "chosen" flash node, but they're
otherwise missing.

Signed-off-by: Jim Paris <jim@jtan.com>
2019-04-11 10:02:44 +02:00
Andy Ross
110cab8aa3 drivers/timer/systick: Improve clock slippage under irq_lock load
The SysTick logic looked logically sound, but it was allowing us to
set a LOAD value as low as 512 cycles.  On other platforms, that
minimum future interrupt delay is there to protect the "read, compute,
write, unmask" cycle that sets the new interrupt from trying to set
one sooner than it can handle.

But with SysTick, that value then becomes the value of the LOAD
register, which is effectively the frequency with which timer
interrupts arrive.  This has two side effects:

1. It opens up the possibility that future code that masks interrupts
   longer than 512 cycles will miss more than one overflow, slipping
   the clock backward as viewed by z_clock_announce().

2. The original code only understood one overflow cycle, so in the
   event we do set one of these very near timeouts and then mask
   interrupts, we'll only add at most one overflow to the "elapsed()"
   time, slipping the CURRENT time backward (actually turning it into
   a non-monotonic sawtooth which would slip every LOAD cycle) and
   thus messing up future scheduled interrupts, slipping those forward
   relative to what the ISR was counting.

This patch simplifies the logic for reading SysTick VAL/CTRL (the loop
wasn't needed), handles the case where we see more than one overflow,
and increases the MIN_DELAY cycles from 512 to 1/16th of a tick.

Fixes #15216

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-04-10 22:05:57 -04:00