Commit graph

41120 commits

Author SHA1 Message Date
Leandro Pereira
ecadd465a2 arch: x86: Allow disabling speculative store bypass
In order to mitigate against Spectre V4, add an option that will, at
boot time, verify if the CPU supports the SPEC_CTRL MSR; if so, it'll
attempt to disable the feature.

More information can be found in chapter 4 (Speculative Store Bypass
Mitigation) of the "Speculative Execution Side Channel Mitigations"
document, version 2, published by Intel: https://goo.gl/nocTcj

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-05-24 13:07:12 -04:00
Leandro Pereira
fb0fba91a5 arch: x86: Rename CPU_NO_SPECTRE to CPU_NO_SPECTRE_V2
There's a new known variant, so make it clear what this one is for.

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2018-05-24 13:07:12 -04:00
Ioannis Glaropoulos
46a3e8bdf0 arch: arm: fix fault status register bitfield masks
This commit fixes the bitfield masks for the Cortex-M
fault status registers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-05-24 11:31:54 -05:00
Kumar Gala
9a89f39b49 ext: hal: open-amp: Allow for open-amp source to be external
Introduce a Kconfig option (CONFIG_OPENAMP_SRC_PATH) that allows us to
point to an external copy of open-amp.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 11:22:05 -05:00
Kumar Gala
e91b580208 ext: hal: libmetal: Allow for libmetal source to be external
Introduce a Kconfig option (CONFIG_LIBMETAL_SRC_PATH) that allows us to
point to an external copy of libmetal.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 11:22:05 -05:00
Tomasz Bursztyka
2bfcb8496d arch/arc: UART QMSI's baudrate is not present in Kconfig anymore
It's generated through dts.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-05-24 11:58:17 -04:00
Ulf Magnusson
d44fee359d menuconfig: Add search and save/load improvements from upstream
- Show the value of each symbol in the jump-to dialog.

 - Search names and prompts separately in the jump-to dialog.
   Previously, '_BAR$' wouldn't match FOO_BAR if it had a prompt,
   because '_BAR$' was matched against the string 'FOO_BAR "prompt"'.

 - Show the working directory in save/load dialog boxes. Paths will be
   relative to it, and Carles Cufi pointed out that it might not be
   obvious.

   Also allow ~ to be used to refer to the home directory.

 - Implement scroll offset for edit boxes. This makes it clearer when
   they're scrolled horizontally.

Piggyback an update of Kconfiglib to the latest version (no functional
changes).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 17:41:45 +02:00
Kumar Gala
40777af71e samples: openamp: Cleanup CMakeLists.txt files
Cleanup some whitespace/formatting in the CMakeLists.txt files.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 10:17:56 -05:00
Kumar Gala
e09484f793 boards: arm: lpcxpresso54114: Remove sample specific defconfig setting
Setting of CONFIG_HEAP_MEM_POOL_SIZE was done in the board defconfig
because open-amp was doing recursive builds and setting it the
defconfig made sure all builds were consistent.  However, now that we
don't do recursive builds this will get properly picked by from the
sample specific conf file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 10:17:56 -05:00
Punit Vara
ba8c8c3ceb tests: mslab_threadsafe: Check for return value
Check return value for k_mem_slab_alloc()

issue: #6693

Signed-off-by: Punit Vara <punit.vara@intel.com>
2018-05-24 10:56:58 -04:00
Aurelien Jarno
80a9b02200 drivers: usb_dc_stm32: enable VDDUSB on STM32L4x2
The STM32L4x2 SoCs need to control the isolation of the USB features
from VDDUSB. This is done through the PWR_CR2 bit USV, however the
current code checks for the PWR_CR2_PVME1 bit instead, which is only
available on Cat. 3 devices. This bug is also present int the HAL and
likely copied from there.

Replace the check by PWR_CR2_USV instead.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-05-24 09:42:30 -05:00
Aurelien Jarno
b66ecc5765 ext: hal: stm32cube: fix stm32l4xx VDDUSB supply control
The STM32L4x2 SoCs need to control the isolation of the USB features
from VDDUSB. This is done through the PWR_CR2 bit USV. The STM32L4 HAL
in stm32l4xx_ll_pwr.h wrongly checks for the PWR_CR2_PVME1 bit, which
is only available on Cat. 3 devices. Replace the check by PWR_CR2_USV
like it is already done in stm32l4xx_hal_pwr_ex.c.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-05-24 09:42:30 -05:00
Aurelien Jarno
509e6964cc arch: stm32l432: add support for USB controller
The STM32L432 SoC has a standard non-OTG USB controller. Add an entry
for it in stm32l432.dtsi and add the corresponding DTS fixup entries.
The controller is kept disabled and should be enabled at the board
level.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-05-24 09:42:30 -05:00
Aurelien Jarno
dc01b99068 arch: stm32l4: only enable USB OTG on SoCs supporting it
USB OTG is currently enable for the whole STM32L4 family, while only a
few of them actually support it:

- STM32L475, STM32L476 and STM32L496 have an OTG controller
- STM32L432, STM32L433 and STM32L452 have an USB controller
- STM32L431, STM32L451 and STM32L471 do not have any USB controller

Fix that by moving the DT entry from stm32l4.dtsi to stm32l475.dtsi
and by adding a #ifdef #endif around the corresponding DTS fixup
entries.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-05-24 09:42:30 -05:00
Kumar Gala
4e8438bc0e ext: open-amp: Change build integration so its not recursive
With recent changes to open-amp we can now include and build it directly
as a zephyr library rather than doing a recursive make.  We remove
ext/lib/ipc/open-amp.cmake as part of this change and introduce a
Kconfig option for open-amp.

Fixes: #7673

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 09:18:47 -05:00
Kumar Gala
e3e8c83bd9 ext: open-amp: Update import of open-amp
Pull in a slightly more recent version of open-amp with changes
to the build system to improve integration with Zephyr.  The recent
changes let us embedded open-amp without having to use recursive
building.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 09:18:47 -05:00
Kumar Gala
6a86b02642 ext: open-amp: move open-amp down one dir
Move open-amp to be in ext/lib/ipc/open-amp/open-amp.  This allows us to
be Zephyr specific files and config like README (for import),
CMakeLists.txt file, Kconfig, etc in ext/lib/ipc/open-amp/ that don't
conflict with any files that might have the same name in
ext/lib/ipc/open-amp/open-amp.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 09:18:47 -05:00
Kumar Gala
f6fb8b8aee ext: libmetal: Change build integration so its not recursive
With recent changes to libmetal we can now include and build it directly
as a zephyr library rather than doing a recursive make.  We remove
ext/hal/libmetal.cmake as part of this change and introduce a Kconfig
option for libmetal.

This is a partial fix for issue #7673.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 09:18:47 -05:00
Kumar Gala
6a2c371fe7 ext: libmetal: Update import of libmetal
Pull in a slightly more recent version of libmetal with changes
to the build system to improve integration with Zephyr.  This change
will break anything that builds with Zephyr and libmetal (which at this
point is only the open-amp example).  Will fix that shortly.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 09:18:47 -05:00
Kumar Gala
bdf2f4ef31 ext: move libmetal to hal
libmetal itself isn't an ipc library, its a generic HAL abstraction
library so move it into ext/hal where it belongs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 09:18:47 -05:00
Ulf Magnusson
9a06d119a8 samples: mcp9808: Fix CONFIG_MCP9808_TRIGGER_GLOBAL_THREAD assignment
CONFIG_MCP9808_TRIGGER_GLOBAL never existed. Looks like a typo.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 09:21:32 -04:00
Kumar Gala
8321b6b64f arch: arm: nxp: Fixup HAS_MCUX_RTC
When the RTC support get added we had a select on HAS_RTC, however this
Kconfig symbol didn't exist.  Clean this up to match the pattern of
HAS_MCUX_RTC.  The driver now depends on that and the SoC selects it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-05-24 08:21:24 -05:00
Jukka Rissanen
993f6db76d doc: Add networking information to 1.12 release note
Contains major networking changes between 1.11 and 1.12 releases.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-05-24 08:19:25 -05:00
Ulf Magnusson
7213ceb378 boards: cc2650_sensortag: Remove Kconfig FLASH/SRAM address assignments
The {FLASH,SRAM}_BASE_ADDRESS Kconfig symbols were removed in commit
311e6b9e3e ("arch: arc: Use DTS for all ARC SoCs"). These settings are
supposed to come from DTS now.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 08:19:14 -05:00
Ulf Magnusson
5b20350a72 gdb_server: Remove leftover testing and x86 parts
gdb_server was removed in commit 0f669132a0 ("kernel: remove
gdb_server"), but still has a testcase that sets CONFIG_GDB_SERVER=y,
and some code in arch/x86/debug.

Remove the leftover parts. This also gets gets rid of undefined
references to the CONFIG_GDB_SERVER symbol.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 08:10:21 -04:00
Ulf Magnusson
d154060a64 samples: grove: Fix CONFIG_GROVE_TEMPERATURE_SENSOR_V1_X assignment
CONFIG_GROVE_TEMPERATURE_SENSOR_V1_1 never existed.
CONFIG_GROVE_TEMPERATURE_SENSOR_V1_X has help text "Version 1.1 or 1.2".

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 08:06:35 -04:00
Ulf Magnusson
f346c7aeaf samples: grove: Remove CONFIG_GROVE_LCD_RGB_INIT_PRIORITY assignment
This symbol was removed in commit 33118f9212 ("sensor: grove: use
global sensor init priority"), which switched over to using
CONFIG_APPLICATION_INIT_PRIORITY.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-05-24 08:05:42 -04:00
Erwan Gouriou
9559277094 arch: stm32: Remove unsupported MPU options
Some code was developped around MPU support in ealy stage
of feature introduction. This code was gated under MPU_ENABLE
flag which does not exist and hence code has never been
enabled nor tested.
Since there has been futher MPU development since then, it seems
safer to simply remove that code and associated Kconfig symbols
to avoid that someone starts using it while it was not part of
MPU development track.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-24 08:04:00 -04:00
Erwan Gouriou
9c1a2b515c boards: disco_l475_iot1: Remove used pinmux configuration
USB IP is not directly available on disco_l475_iot1 and requires
some HW modifications to get it enabled.
Remove this USB pinmux configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-24 08:04:00 -04:00
Erwan Gouriou
2bd15aa774 drivers: clock_control: stm32: Remove unsupported clock configuration
In stm32 clock_control driver, Kconfig symbol CLOCK_STM32_PLL_PREDIV1
in stm32f3 series was set as conditional on the activation of some
specific STM32F3 SoCs that are not supported yet in Zephyr.
Remove this flag.
In order not to loose a rather studious part of code, comment it out
and set a TODO to specify how to re-enable it once it will be
required.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-24 08:04:00 -04:00
Erwan Gouriou
134b74844e drivers: clock_control: remove reference unknown config flag
Leftover from STM32 clock_control driver introduction
Remove unkown symbol

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-24 08:04:00 -04:00
Erwan Gouriou
3b83ccdb8c boards: stm32_mini_a15: fix PLL source selection
During transition from native to ll based clock_control
driver, a typo was introduced in PPL source selection flag.
Fix this.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2018-05-24 08:04:00 -04:00
Jukka Rissanen
5ec569dfd2 net: Fix dependency to offload driver in Kconfig
The CONFIG_NET_DEFAULT_IF_OFFLOAD should depend on CONFIG_NET_OFFLOAD

Fixes #7797

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-05-24 08:03:32 -04:00
Jukka Rissanen
2dbde4a1fa samples: net: zperf: Remove config files for Galileo board
The support for Galileo board is bitrotted as the config file
contains obsolete values. As testing this old board is difficult
lets remove the config files. These can be re-introduced with
proper and tested settings if needed.

Fixes #7814

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-05-24 08:02:04 -04:00
Jukka Rissanen
d6b11e15be tests: net: arp: Check NULL in unicast test
Coverity-CID: 186047
Fixes #7724

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-05-24 08:01:28 -04:00
Andy Ross
e9174c6dde tests/kernel/common: Add rigorous integer typing test
Zephyr code routinely assumes conventional ILP32/LP64 integer
behavior, and occasionally relies on it to perform some nice tricks.
This is despite the fact that this behavior (while pervasively adopted
and in use on all architectures we care about supporting) isn't
actually guaranteed by the language standard which allows much looser
semantics than actual exist on hardware.

Put it into the intmath section of this test as a build time thing.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-23 19:40:07 -07:00
Andrew Boie
538754cb28 kernel: handle early entropy issues
We generalize querying the entropy driver directly with
a new internal API, which is now used by CONFIG_STACK_RANDOM
and stack canary initialization.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-05-23 19:38:06 -07:00
Andy Ross
f8ef918d06 tests/lib/c_lib: Turn off too-clever compiler warning
GCC 8 is smart enough to warn about the truncation condition we're
trying to test.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-23 20:54:36 -04:00
Andy Ross
a3a7e8e781 sanitycheck: Add support for _bt_settings_area linker section
This section got added in commit 470349c25a ("Bluetooth: settings:
Add support for per-submodule handlers"), but sanitycheck didn't know
about it and was whining.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-05-23 20:54:36 -04:00
Anas Nashif
d73e970084 tests: stack: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
876195de4d tests: pipe: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
a50a388b2d doc: build with CONFIG_USERSPACE enabled
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
c8e0d0cebc kernel: add requirement Ids to implementation
Add requirement ID place holders based on APIS. The requirements will
appear as a list in doxygen documentation. The IDs will be expanded with
more details somewhere else, probably a requirement catalog on GH or
some other requirement management tool. This is still TBD.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
234484fda8 tests: msgq: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
e989283f35 tests: lifo: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
12d47cc553 tests: fifo: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
c2be441712 tests: alert: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
6f40b5330a tests: semaphore: improve test documentation
Add references to APIs being tested and groups tests correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Anas Nashif
9e4f25bbad doxygen: reference requirements
Add special command @req to reference requirements. This will help with
traceability between tests and requirements using doxygen.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-23 18:58:03 -04:00
Johann Fischer
192833a828 drivers: usb_dc_kinetis: fix out-of-bounds write/read
Fix out-of-bounds write/read.

fixes: #7714
fixes: #7715
fixes: #7719
fixes: #7721
fixes: #7723
fixes: #7725
fixes: #7727
fixes: #7734
fixes: #7738

Coverity-ID: 186032
Coverity-ID: 186036
Coverity-ID: 186044
Coverity-ID: 186046
Coverity-ID: 186048
Coverity-ID: 186051
Coverity-ID: 186055
Coverity-ID: 186059
Coverity-ID: 186061

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2018-05-23 18:57:33 -04:00