Commit Graph

50512 Commits

Author SHA1 Message Date
Daniel Leung 70d0a1b6ef timing: guard the header with CONFIG_TIMING_FUNCTIONS
The arch_timing_* are not defined if timing functions are not
enabled, which results in compiler warnings about implicit
function declarations. So guard the header with its own
kconfig so the header can be unconditionally included by
other enough though timing functions are not enabled.

Note this is done inside the doxygen @defgroup or else
doc build would fail as timing_api group cannot be found.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-06 16:43:55 -04:00
Daniel Leung dd239be6ec tests: mem_protect/demand_paging: add paging stats tests
This uses the new functions to get paging statistics and test
if they are valid.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-06 16:43:55 -04:00
Daniel Leung 8eea5119d7 kernel: mmu: demand paging execution time histogram
This adds the bits to record execution time of eviction selection,
and backing store page-in/page-out in histograms.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-06 16:43:55 -04:00
Daniel Leung ae86519819 kernel: mmu: collect more demand paging statistics
This adds more bits to gather statistics on demand paging,
e.g. clean vs dirty pages evicted, # page faults with
IRQ locked/unlocked, etc.

Also extends this to gather per-thread demand paging
statistics.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-04-06 16:43:55 -04:00
Carles Cufi d5c3be3948 actions: Do not set the bug label on failed backports
Failing a backport is not a bug per-se. We create a GitHub issue to be
able to track the Pull Requests that failed to backport, but they should
not be considered bugs.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-04-06 16:29:22 -04:00
Mikkel Jakobsen 3fe785d4a7 scripts: west sign: fix devicetree module include
PR #33746 introduced changes to the devicetree python file
that requires changes in the python code that imports the
devicetree module.

This was omitted in the west sign command implementation.

Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@prevas.dk>
2021-04-06 14:54:02 -05:00
Jennifer Williams a7ea624d7e tests: kernel: key has wrong type in test_prevent_interruption
The test_prevent_interruption() uses a key for the irq_lock(),
but the key has incorrect data type. This commit makes the key
unsigned int according to API docs.

Fixes #34023

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-06 14:37:24 -04:00
Joakim Andersson 9f7061a83d Bluetooth: host: Add discovery of standard descriptor values
Add discovery of standard descriptor values. This provides a shorthand
instead of doing a read by UUID, allowing the application discovery
procedure to re-use the discover parameters for simple descriptors.

Fixes: #21489

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-04-06 10:50:18 -04:00
Joakim Andersson 37ea9ac8a7 Bluetooth: host: Add Server Characteristic Configuration definitions
Add Server Characteristic Configuration definitions for bit values
and attribute value.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-04-06 10:50:18 -04:00
Jennifer Williams 3c5636482c boards: x86: acrn_ehl_crb: fix config Apic timer IRQ value
The default APIC_TIMER_IRQ of 24 causes significant slowdown
in general tests and samples execution on this board. As the
value of ioapic RTEs increases, e.g. 48 in ACRN EHL CRB, the
APIC TIMER IRQ is stepped on. This commit tunes the config
for APIC_TIMER_IRQ to 48 for this board.

Fixes #33593

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-06 10:49:53 -04:00
Flavio Ceolin 85b2bd63c1 arch: x86: Fix 14.4 guideline violation
The controlling expression of an if statement has to be an
essentially boolean type.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-06 10:25:24 -04:00
Flavio Ceolin 95cd021cea arch: arm: Fix 14.4 guideline violation
The controlling expression of an if statement has to be an
essentially boolean type.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-06 10:25:24 -04:00
Flavio Ceolin 8153666a27 logging: Fix 14.4 guideline violation
The controlling expression of an if statement has to be an
essentially boolean type.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-06 10:25:24 -04:00
Ningx Zhao 7e91223ae0 tests: mutex: verify mutil-threads take a mutex
Add a testcase to verify mutil-threads competition
for a mutex.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-04-06 10:19:49 -04:00
Ningx Zhao 8af2e07ada tests: pipe: test some error conditions
Add some testcases to test some error conditions
about pipe's APIs.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-04-06 10:19:24 -04:00
Jian Kang a1db16d292 tests: kernel: Add a new testcases for mailbox
Design a new testing that send and receive mailbox message with
different priority thread, and verify the high priority of receive
thread will receive firstly.

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2021-04-06 10:18:36 -04:00
Jian Kang 0124e08e0f kernel: semaphore: Add two testcases of semaphore
Add two testcases to test semaphore feature on system side. For example,
test semaphore usage and sync process between different priority threads
to verify the semaphore can be take by higher priority thread, and give
sem more than max value of semaphore that set in init step to verify sem
count is correct or not.

Signed-off-by: Jian Kang <jianx.kang@intel.com>
2021-04-06 10:18:07 -04:00
Ying ming fa2724b263 test: smp :add testcase
This is an integration testcase for smp. It tests
the situation when smp is configed. Fatal can be invoked on
different core and system workq can also be run on different
core.

Signed-off-by: Ying ming <mingx.ying@intel.com>
2021-04-06 10:17:44 -04:00
Ningx Zhao f1e770d1db tests: ringbuffer: test concurrent operation
Add a testcase to test that read and write the
same buffer at the same time to check the
integrity of data reading and writing.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-04-06 10:16:48 -04:00
Ningx Zhao fa8bc742b8 Test: queue: Add a testcase to test queue
Test point:
1. Any number of threads may wait on an empty FIFO simultaneously.
2. When a data item is added, it is given to the highest priority
thread that has waited longest.

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-04-06 10:13:49 -04:00
Armando Visconti c4b35c1d36 drivers/sensor: lsm6dso: Add multi-instance support
Make this driver multi-instance and use the new API.

This commit makes use of some DT macro helpers
In particular:
    - get bus devices with DEVICE_DT_GET
    - get SPI information with SPI_CONFIG_DT_INST
    - get drdy gpios with GPIO_DT_SPEC_GET

Moreover the driver is now using the stmemsc common
routines as requested in issue #33440 and it avoids
the unnecessary declaration of both ctx_i2c and ctx_spi
in the data structure.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-06 15:34:01 +02:00
Armando Visconti 36eceba7e4 drivers/sensor: lsm6dso: move int-pin in DTS binding
Take the int-pin information (i.e. what pin between INT1
and INT2 the drdy is attached to) directly from DT.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-06 15:34:01 +02:00
Armando Visconti 946bd44b96 dts/bindings: lsm6dso: create a common DT binding file
Create a common properties file that will be included by all bindings
(as i2c and spi) handled by lsm6dso driver.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2021-04-06 15:34:01 +02:00
Ioannis Glaropoulos 5bba6b4c05 doc: releases: add note about non-secure cortex-m QEMU runs in CI
Add a note in the 2.6 release notes about configuring QEMU
to run in CI on mps2_an521_nonsecure with TF-M as the secure
firmware component.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-06 15:33:23 +02:00
Ioannis Glaropoulos 21e6299a4b tests: error_hook: fix test case for non-secure cortex-m platforms
When running the test on Cortex-M platforms, use access to
_current to trigger a memory access fault, as this address
is guaranteed to be in kernel ram and will not trigger
SecureFault exceptions.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-06 15:33:23 +02:00
Ioannis Glaropoulos 881041898a boards: mps2_an521: add arm, kernel and userspace tags for nonsecure
Build and execute tests tagged with -arm, -kernel,
and -userspace, for mps2_an521_nonsecure.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-06 15:33:23 +02:00
Ioannis Glaropoulos a23d6e599b boards: mps2_an521: build non-secure Zephyr images together with TF-M
By default, if we build for a Non-Secure version of the board,
force building with TF-M as the Secure Execution Environment.
An exception is when we build openamp samples, where the non-
secure image is basically used for the remote core.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-06 15:33:23 +02:00
Bob Recny c4d23d35d1 boards: arm: Add support for BMD-330-EVAL
Add support for u-blox BMD-330-EVAL which uses the nRF52810.
This board is functionally equivalent to the nRF52dk_nrf52810
with the exception of not having debug-in and the shield SWD
header. DEVELOP_IN_NRF52832 is *not* required since the IC
used is the nRF52810

Note that header pin numbers noted in index.rst are shown with
respect to the pin 1 markings on the BMD-3xx-EVAL boards, and are
flipped from the nRF52dk_nrf52810.

Tested with blinky, button, and Bluetooth peripheral_hr
Corrected file permissions, added newline at end of CMakeLists.txt
Corrected comnment that said NRF52832 instead of NRF52810
Adding missing copyright information
Corrected link to u-blox BMD-330 (was pointing to BMD-300)
Addressed review comments, corrected permissions

Signed-off-by: Bob Recny <bob.recny@u-blox.com>
2021-04-06 15:32:43 +02:00
Ningx Zhao ec61259f26 kernel: pipe: add a return value check.
Add a ASSERT to check tpipe_put_small_size return
value.

Fixes #33827

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-04-06 15:32:04 +02:00
Krzysztof Kopyściński 806ca8f78d bluetooth/tester: give data buffer for each L2CAP channel
L2CAP channels are allocating buffers from common data_pool. For that
pool buffer count was hard-coded as 1. This count should be set to value
CHANNELS, allowing each channel to allocate buffer for incoming
data. Without this change, execution would stuck at l2cap_chan_le_recv()
as we give net_buf_alloc() in alloc_buf_cb() no timeout.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-04-06 15:30:47 +02:00
Guðni Már Gilbert f81e95d88f boards: arm: add support for NUCLEO-L412RB-P
Support for ST Nucleo-64 Development board with STM32L412RB SoC.
Tested samples: hello_world, blinky, button.

Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
2021-04-06 15:30:34 +02:00
Lyle Zhu 8fd1605372 Include: Bluetooth: Add GATT uuids
Add BT_UUID_IAS for Immediate Alert Service
Add BT_UUID_LLS for Link Loss Service
Add BT_UUID_HPS for HTTP Proxy Service
Add BT_UUID_ALERT_LEVEL for Alert Level
Add BT_UUID_URI for URI
Add BT_UUID_HTTP_HEADERS for HTTP Headers
Add BT_UUID_HTTP_STATUS_CODE for HTTP Status Code
Add BT_UUID_HTTP_ENTITY_BODY for HTTP Entity Body
Add BT_UUID_HTTP_CONTROL_POINT for HTTP Control Point
Add BT_UUID_HTTPS_SECURITY for HTTPS Security

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2021-04-06 15:29:59 +02:00
Trond Einar Snekvik d24810cc27 Bluetooth: Mesh: Provisioner sample: Permit 16 nodes
Ups the CDB_NODE_COUNT config to fit 16 nodes, to make the sample more
usable for general mesh testing.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-06 16:19:13 +03:00
Trond Einar Snekvik 1034d5689f Bluetooth: Mesh: Provisioner sample: Blocking self-configuration
Adds blocking operation to the self configuration step by waiting for
the status response. This ensures that the provisioner is fully
configured, and reduces the number of loopback buffers required for the
self-configuring.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-06 16:19:13 +03:00
Trond Einar Snekvik 0a58fae7a8 Bluetooth: Mesh: Provisioner sample: Cooperative thread
Runs the Provisioner sample's main thread in a cooperative priority to
avoid calling the Bluetooth APIs from a preemptive thread.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-06 16:19:13 +03:00
Trond Einar Snekvik 40f3d44fb4 Bluetooth: Mesh: Make provisioner sample bind the AppKey to all models
Instead of only configuring the Health Server model of the provisioned
device, the Provisioner will instead walk the target's composition data,
and bind each model to the same AppKey. This allows the provisioner to
be used with the base mesh sample, and demonstrates the new composition
data page 0 API.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-06 16:19:13 +03:00
Trond Einar Snekvik b84fee5190 Bluetooth: Mesh: Composition data page 0 traversal
Adds a parsing mechanism for Composition data page 0 in the Config
Client API, and uses it in the shell module to parse the incoming
composition data.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-06 16:19:13 +03:00
Trond Einar Snekvik 9259b199bb Bluetooth: Mesh: Rename bt_mesh_cfg_comp_data_get's status param to rsp
The first byte of the composition data status message is the returned
page index, not the status of the request. This is now reflected in the
API.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-04-06 16:19:13 +03:00
Frank Li 6f97f52f34 driver: usdhc: modify LOG message
LOG API will auto add \r\n at output end,
remove the \r\n at the end of debug messge.

Fix misspelled.

Signed-off-by: Frank Li <lgl88911@163.com>
2021-04-06 08:13:24 -05:00
Frank Li 664aaf0bdc driver: usdhc: fix spec 1.0 sdcard can't work
The SD Card below Physical Layer 1.10 does not support CMD6.
When usdhc_sd_init is executed, it will fail to exit due to
execution of CMD6, causing the SD Card to not work normally.

For different SD Card Physical Layer specifications,
the following modifications have been made:
Version 1.10 and above support CMD6.
Version 3.0 and above support CMD6 Group 3 (driver strength
and current limit) .

Signed-off-by: Frank Li <lgl88911@163.com>
2021-04-06 08:13:24 -05:00
Benjamin Lindqvist 28ac1f70bf drivers: modem: gsm_ppp: proper attach retry
In a previous commit, a check was added to ensure modem was properly
attached to packet service before initializing PPP. Failure to perform
this check can lead to the dreaded 'NO CARRIER' issue.

While this is a nice idea, the implementation was lacking because when
the check failed, the entire modem initialization procedure was
restarted from square one. For modems/bearers that were slow to attach,
this is potentially disastrous. The proper solution is to loop only the
'AT+CGATT?' part until it succeeds, or fails N times.

This commit implements this looping behavior (using the work queue).

Signed-off-by: Benjamin Lindqvist <benjamin.lindqvist@endian.se>
2021-04-06 15:37:11 +03:00
Carlo Caione b3e1fa3ce7 labels: Rename ARM_64 to ARM64
Because Zephyrbot is already using ARM64.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2021-04-06 08:33:32 -04:00
Vinayak Kariappa Chettimada 470e9fdd5c Bluetooth: controller: Fix minor typo in Periodic Sync PHY
Fix minor typo in Periodic Advertising Sync implementation
when PA/LNA is enabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-04-06 13:52:14 +02:00
Vinayak Kariappa Chettimada 6ae93e62f0 Bluetooth: controller: Trivial peripheral ISO code cleanup
Trivial peripheral ISO code cleanup.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-04-06 13:51:56 +02:00
Morten Priess 07d4ba5917 Bluetooth: controller: Fix ISO CI tests
Make bluetooth.init tests for nRF platform pass again by adding ULL/LLL
stub functions, and fixing minor compile issues.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-06 13:51:56 +02:00
Vinayak Kariappa Chettimada a0c255f23e Bluetooth: controller: openisa: Fix missing conditional compile
Fix missing conditional compile regression introduced by
the commit 34451a9970 ("Bluetooth: controller: Conditional
compile adv addr used by initiator").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-04-06 13:51:45 +02:00
Maureen Helm 5cc20faa2f drivers: flash: Fix FlexSPI NOR log module
Fixes the FlexSPI NOR flash driver to register a new log module rather
than declare membership in the FlexSPI controller module, which was
recently moved from drivers/flash to drivers/memc.

This fixes build errors with the mimxrt1064_evk board in:
  - samples/drivers/flash_shell
  - samples/subsys/fs/littlefs

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-04-06 04:23:51 -05:00
Hayden Ball 64995e2a54 max17055: Set battery parameters from device tree
Currently the MAX17055 driver assumes that a battery matching the
default characteristics is used.

This change allows battery characteristics to be specified in device
tree and writes them to the MAX17055 on initialization.

Existing default values are maintained for backwards compatibility.

Initialization routine taken from MAX17055 Software Implementation
Guide, document UG6365.

Signed-off-by: Hayden Ball <hayden@playerdata.co.uk>
2021-04-05 15:29:00 -05:00
Alexey Markevich 5ee6793e57 jwt: use pre-computed JWT header
JWT header is unmodifable and can be used as constant.

Signed-off-by: Alexey Markevich <buhhunyx@gmail.com>
2021-04-03 06:52:40 -04:00
Sun Amar ffbf6b14ee gecko pwm: pwm description to efr32fg1 and brd4250b
Add minimal support for efr32fg1p and the brd4250b board
as an exmaple for the driver description support

Signed-off-by: Sun Amar <sun681@gmail.com>
2021-04-02 18:45:33 -04:00