Commit graph

43411 commits

Author SHA1 Message Date
Andrew Boie
d11e3c3456 userspace: add debug logs to mem domain code
Useful when debugging stuff.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
f1d12aa45b userspace: deprecate k_mem_domain_remove_thread()
This is just equivalent to calling k_mem_domain_add_thread()
on the default memory domain now.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
ed938d18b1 arc: fix arch_ API implementations on current CPU
All of these should be no-ops for the following reasons:

1. User threads cannot configure memory domains, only supervisor
   threads.
2. The scope of memory domains is user thread memory access,
   supervisor threads can access the entire memory map.

Hence it's never required to reprogram the MPU on the current CPU
when a memory domain API is called.

This does not address the issue #27785 if a user thread in the domain
is running on some other CPU.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
2222fa1426 arm: fix memory domain arch_ API implementations
All of these should be no-ops for the following reasons:

1. User threads cannot configure memory domains, only supervisor
   threads.
2. The scope of memory domains is user thread memory access,
   supervisor threads can access the entire memory map.

Hence it's never required to reprogram the MPU when a memory domain
API is called.

Fixes a problem where an assertion would fail if a supervisor thread
added a partition and then immediately removes it, and possibly
other problems.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
91f1bb5414 arm: clarify a memory domain assertion
Dump the partition information to make this assertion
less ambiguous.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
d650b4e800 ztest: remove ztest_mem_domain
Just add ztest's partition to the default domain, as well as the
malloc partition if it exists.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
9bfc8d82d0 userspace: introduce default memory domain
We make a policy change here: all threads are members of a
memory domain, never NULL. We introduce a default memory domain
for threads that haven't been assigned to or inherited another one.

Primary motivation for this change is better MMU support, as
one common configuration will be to maintain page tables at
the memory domain level.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Andrew Boie
1a9f490353 userspace: deprecate k_mem_domain_destroy()
We don't have use-cases and it introduces complexities with
allocating page tables on MMU systems.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-26 20:35:02 -04:00
Mahesh Mahadevan
99f24aeac6 MCUX Flexcomm SPI: Add Slave support
Add support for Slave mode in the mcux flexcomm spi driver

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2020-08-26 16:32:50 -05:00
Kim Bøndergaard
63e8582629 boards: frdm_k64f: add support for shield adafruit_winc1500
pinmux update ensuring required pins for adafruit_winc1500 shield
are all available

Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2020-08-26 15:44:22 -05:00
Kim Bøndergaard
7b64985fa5 shields: Adafruit WINC1500 Wifi Shield
Add support for the Adafruit WINC1500 Wifi Shield

Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2020-08-26 15:44:22 -05:00
Anas Nashif
509b1dad60 tests: msgq: address unchecked return values
Check for return values and make coverity happy.

Fixes #27645
Fixes #27646
Fixes #27648

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-26 16:40:57 -04:00
Gerard Marull-Paretas
01a4e365b7 docs: releases: 2.4: add notes about LVGL Kconfig changes
Add notes about LVGL Kconfig options name changed after alignment
with upstream names.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-26 15:32:59 -05:00
Gerard Marull-Paretas
7538f0212f lib: gui: lvgl: improve cmake formatting
Improve the format of the CMakeLists.txt file.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-26 15:32:59 -05:00
Gerard Marull-Paretas
b3847e80c4 lib: gui: lvgl: sort objects
LVGL objects have been alphabetically sorted. The aim of this change is
to help locating objects as well as keeping track of them.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-26 15:32:59 -05:00
Gerard Marull-Paretas
948a692252 lib: gui: lvgl: split Kconfig settings
LVGL Kconfig settings have been splitted into more granular units in
order to improve readability and maintenance.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-26 15:32:59 -05:00
Gerard Marull-Paretas
4f86a9a2d5 lib: gui: lvgl: align all Kconfig object names
Align all Kconfig option names with LVGL names. The followed rule:
LV_(.*) -> CONFIG_LVGL_(.*).

Also replaced LVGL boolean configuration entries using if/else/endif
with direct IS_ENABLED macro.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2020-08-26 15:32:59 -05:00
Torsten Rasmussen
6c294bc0b8 cmake: zephyr_module.py working directory when listing modules
Fixes: #27237

This commit fixes an issue when `zephyr_module.py` was executed outside
a west workspace.
This would happen when build an out-of-tree (out-of-workspace)
application, in which case the current west workspace would be unknown.

This is now changed, so that execution of `zephyr_module.py` will be
done in the current Zephyr base.
This ensures that the west workspace that holds the current Zephyr will
be the same workspace used for west list, and hence solve fix the issue.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-08-26 14:25:17 -04:00
Alexandre Bourdiol
f5e8c06628 drivers: i2c: fix STM32 implicit-fallthrough warning
Fall through is intentional,
so make sure compiler doesn't raise warning.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2020-08-26 13:17:57 -04:00
Anas Nashif
79649de781 doc: fix references for xt-sim
Fix missing file and sample references.

Fixes #19661

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-26 09:43:57 -07:00
Pawel Sagan
132b35c3ad samples: drivers: i2s: Add LiteX I2S sample
This commit adds the LiteX I2S devices usage example with:
 - i2s rx and tx initialization,
 - i2s rx and tx configuration,
 - i2s rx receiving,
 - i2s tx sending.

An application is a simple sound loopback - it allows to connect
a music source and a receiver such as headseat and listen to it.

Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-08-26 08:17:42 -04:00
Pawel Sagan
cc30fb871b drivers: i2s: Add LiteX I2S controller driver
This introduces LiteX I2S driver supporting the following features:
    - 8,16,24,32 bit sample width,
    - mono/stereo sound,
    - different sample frequencies
    - big/little-endian data format,
    - concatenated channels mode (for selected sample widths only),
    - slave/master mode operation.

Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-08-26 08:17:42 -04:00
Pawel Sagan
fd2370be88 drivers: interrupt_controller: Remove unnecessary cast
This removes a cast when getting the isr eth address from the isr table.

Signed-off-by: Pawel Sagan <psagan@internships.antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
2020-08-26 08:17:42 -04:00
Martin Jäger
202ca01dcb drivers: pinmux: stm32g4x: Add PWM8 defines
All positive PWM outputs of TIM8 added.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-08-26 12:33:07 +02:00
Martin Jäger
ca92d2eb8c dts: stm32g4: Fix TIM8 clock enable register
PWM driver didn't work because clock was not enabled.

Signed-off-by: Martin Jäger <martin@libre.solar>
2020-08-26 12:33:07 +02:00
Jingru Wang
dae250472f gcov: Add coverage support for arc qemu platform
* add toolchain abstraction for coverage
* add select HAS_COVERAGE_SUPPORT to kconfig
* port gcov linker code to CKake for arc

Signed-off-by: Jingru Wang <jingru@synopsys.com>
2020-08-26 12:32:39 +02:00
Henrik Brix Andersen
01c6862ad7 samples: usb: mass: add usb_device dependency
Make the flash-backed USB mass storage sample depend on usb_device and
flash instead of just flash.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Henrik Brix Andersen
5210b82bd6 samples: drivers: spi_flash: add support for arty_a7_arm_designstart_m1
Add support for running the JEDEC SPI NOR flash sample on the ARM
Cortex-M1 DesignStart FPGA reference implementation.

Special care is needed to avoid overwriting part of the FPGA
configuration bitstream, which is stored in the onboard QSPI flash.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Henrik Brix Andersen
2afced9829 tests: drivers: spi: loopback: add support for arty_a7_arm_designstart_m1
Add support for running the SPI loopback driver test on the ARM
Cortex-M1 DesignStart FPGA reference design.

Since Xilinx AXI Quad SPI IP only supports loopback mode when configured
for single line SPI width, we utilise the (normally disabled) single SPI
instance going to the optional V2C DAPLINK shield SD card slot for
testing purposes.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Henrik Brix Andersen
82a1075e7f boards: arm: arty: designstart_m1: enable Xilinx AXI Quad SPI instances
Add the Xilinx AXI Quad SPI IP instances present in the ARM Cortex-M1
DesignStart FPGA reference design and enable the instance connected to
the onboard SPI NOR flash containing the FPGA configuration bitstream.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Henrik Brix Andersen
d5514752d0 drivers: spi: add driver for the Xilinx AXI Quad SPI IP
Add SPI driver for the Xilinx AXI Quad SPI IP. Despite the name, this IP
block supports both single, dual, and quad line widths.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Henrik Brix Andersen
c9de28d5e4 dts: bindings: add Xilinx Quad SPI devicetree binding
Add devicetree binding for the Xilinx Quad SPI v3.2 IP.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2020-08-26 12:32:27 +02:00
Emil Gydesen
c5636508d4 Bluetooth: host: Deleting PA sync before term callback
The PA sync is now "deleted" (i.e. flags reset) before
the terminated callback is called, so that is
possible to create PA sync in the callback. One flag
was already cleared before for this reason, but one
other flag is also required, so we just clear
everything now.

Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
2020-08-26 12:31:59 +02:00
Emil Gydesen
4ee327461f Bluetooth: host: PA sync while explicitely scanning
Removed the check for explicit scanning, such that
an application may create a PA sync while explicitely
scanning.

Signed-off-by: Emil Gydesen <emil_gydesen@bose.com>
2020-08-26 12:31:59 +02:00
Eug Krashtan
c6bb8b191d samples: net: coap: Wildcard sample
Additional resources to illustrate wild card usage.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2020-08-26 12:31:00 +02:00
Eug Krashtan
bb378c7201 net: coap: Use MQTT style wildcard in path description:
In 'struct coap_resource' path description:
- the plus symbol represents a single-level wild card in the path;
- the hash symbol represents the multi-level wild card in the path.

This change keeps compatibility with RFC 7252 but allows handling
multiple requests in single function.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2020-08-26 12:31:00 +02:00
Henrik Brix Andersen
7749dfc205 doc: reference: overview: bump EEPROM API to unstable
The EEPROM API, which was introduced in Zephyr v2.1.0 and has not seen
any changes since, has multiple implementations supporting a wide
variety of EEPROM backends (SPI, I2C, on-chip, simulator).

Bump the EEPROM API from "experimental" to "unstable" according to the
Zephyr API lifecycle process.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2020-08-26 12:30:48 +02:00
Peter Bigot
7a8a4c9b3e drivers: spi: document expectation on spi config parameter
Most if not all drivers use an internal function
spi_context_configured() to bypass reconfiguring the SPI peripheral
when nothing has changed.  That function determines change based on
comparing the struct spi_config pointer that was last used.  This does
not work if a user changes fields within the pointed-to structure.

Document that pointer comparison may be used to detect changes.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-26 12:25:06 +02:00
Peter Bigot
ce47c809b9 tests: kernel: timer_api: fix formatting specifiers in diagnostic
Several of the values passed to the conversion failure diagnostic are
unsigned and/or 32-bit values, while all format specifiers are for
signed 64-bit integers.  Make the specifiers consistent with the
argument.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-08-26 12:24:58 +02:00
Kwon Tae-young
59808445df boards: shields: dac80508_evm: add TI DAC80508 EVM shield
Add shield definition for the Texas Instruments DAC80508
Evaluation Module(EVM).

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-08-26 12:24:43 +02:00
Kwon Tae-young
b07c76fa68 tests: drivers: build_all: add dacx0508 dac driver
Add the DACx0508 DAC driver to the build_all drivers build test.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-08-26 12:24:43 +02:00
Kwon Tae-young
2aeed81202 drivers: dac: Added driver for TI DACx0508
TI's DACx0508 is a DAC chip that supports SPI.
Gain and Reference can be set through the register.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
2020-08-26 12:24:43 +02:00
Jamie McCrae
94721b316f samples: sensor: sm351lt: Add new SM351LT sensor sample
Adds sample for SM351LT sensor and outputs to console.

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2020-08-25 15:29:00 -05:00
Andrew Boie
030456c24e x86: add pagetables test suite
For the moment, we validate the flags on all RAM pages,
ensure that NULL is never mapped, and show that dumping
page tables doesn't crash.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00
Andrew Boie
55914da0e5 boards: add qemu_x86_nopae target
We added support for 32-bit page tables, without PAE.
Add a build target to ensure it doesn't bit-rot.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00
Andrew Boie
4b3f50b529 tests: protection: skip XD tests on IA32
Ancient 2-level IA32 page tables don't support "eXecute Disable".
Skip the test scenarios for them.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00
Andrew Boie
069aca22c1 tests: add k_mem_map() tests
Show that k_mem_map() works in various scenarios.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00
Andrew Boie
e433494f40 kernel: mmu: implement virtual mappings
These will grow downward from CONFIG_KERNEL_VM_LIMIT.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00
Andrew Boie
38e17b68e3 x86: paging code rewrite
The x86 paging code has been rewritten to support another paging mode
and non-identity virtual mappings.

 - Paging code now uses an array of paging level characteristics and
   walks tables using for loops. This is opposed to having different
   functions for every paging level and lots of #ifdefs. The code is
   now more concise and adding new paging modes should be trivial.

 - We now support 32-bit, PAE, and IA-32e page tables.

 - The page tables created by gen_mmu.py are now installed at early
   boot. There are no longer separate "flat" page tables. These tables
   are mutable at any time.

 - The x86_mmu code now has a private header. Many definitions that did
   not need to be in public scope have been moved out of mmustructs.h
   and either placed in the C file or in the private header.

 - Improvements to dumping page table information, with the physical
   mapping and flags all shown

 - arch_mem_map() implemented

 - x86 userspace/memory domain code ported to use the new
   infrastructure.

 - add logic for physical -> virtual instruction pointer transition,
   including cleaning up identity mappings after this takes place.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00
Andrew Boie
ddb63c404f x86_64: fix sendling locore EOI
The address was being truncated because we were using
32-bit registers. CONFIG_MMU is always enabled on 64-bit,
remove the #ifdef.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00