Commit graph

41120 commits

Author SHA1 Message Date
Andrew Boie
bc666ae7f7 x86: implement improved double-fault handler
We now create a special IA hardware task for handling
double faults. This has a known good stack so that if
the kernel tries to push stack data onto an unmapped page,
we don't triple-fault and reset the system.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
08c291306e x86: generate RAM-based GDT dynamically
We will need this for stack memory protection scenarios
where a writable GDT with Task State Segment descriptors
will be used. The addresses of the TSS segments cannot be
put in the GDT via preprocessor magic due to architecture
requirments that the address be split up into different
fields in the segment descriptor.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
8a102e44ed x86: allow IDT vectors to be task gates
This has one use-case: configuring the double-fault #DF
exception handler to do an IA task switch to a special
IA task with a known good stack, such that we can dump
diagnostic information and then panic.

Will be used for stack overflow detection in kernel mode,
as otherwise the CPU will triple-fault and reset.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
ddf9f4be31 x86: convert gen_idt to Python
This is one less host tool we have to compile for every build,
and makes the build tools more portable across host OSes.
The code is also much simpler to maintain.

Issue: ZEP-2063
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Andrew Boie
dff21de082 x86: add CONFIG_X86_STACK_PROTECTION
This enables the MMU-based stack protection feature,
which will cause a fatal error if a thread overflows
its stack in kernel mode, at a nontrivial cost in memory
(4K per thread).

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-25 11:32:36 -04:00
Erwan Gouriou
84fce262f9 dts: arm: st: Factorize STM32L4 series soc dtsi files
In order to simplify maintenance of dts files for
stm32f4 series, introduce a stm32l4.dtsi file which
represent the smallest common denominator of IPs in
the family.
This allows to fix usart4 availability on stm32l432
which was not correct.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 10:10:32 -05:00
Erwan Gouriou
9f88663079 dts: arm: st: Factorize STM32F3 series soc dtsi files
In order to simplify maintenance of dts files for
stm32f1 series, introduce a stm32f3.dtsi file which
represent the smallest common denominator of IPs in
the family.
Besides, stm32f334 includes stm32f303, as it is a
extension of this SoC.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 10:10:32 -05:00
Erwan Gouriou
851efe0cc6 dts: arm: st: Factorize STM32F1 series soc dtsi files
In order to simplify maintenance of dts files for
stm32f1 series, introduce a stm32f1.dtsi file which
represent the smallest common denominator of IPs in
the family.
Besides, stm32f103Xe includes stm32f103xb, as it is a
extension of this SoC.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 10:10:32 -05:00
Marti Bolivar
3dd63b60a7 build: export generated DTS configuration
This can be just as important as the contents of auto.conf.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-07-25 09:57:07 -05:00
Marti Bolivar
497f8fd40a build: export flashing and debugging info, when present
Zephyr supports the flash and debug targets via per-board information
in Makefile.board files.

It is sometimes convenient to know this information when inspecting
the build artifacts or doing exotic builds, so include it in the file
generated by outputexports. The information in Makefile.board provides
what is needed.

Therefore, ensure that Makefile.board, when present, is included by
the generated Makefile.export. This gives users of Makefile.export
access to variables like FLASH_SCRIPT, PYOCD_TARGET, etc. (These users
need to cope with these variables being undefined if not given in
Makefile.board, or if Makefile.board does not exist for a target.)

While we're here, don't export INSTALLKERNEL. That's Linux-specific
and otherwise unused; the Zephyr equivalent is FLASH_SCRIPT and its
associated variables.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-07-25 09:57:07 -05:00
Jukka Rissanen
45eac217a2 net: tests: Enable net tests for all suitable platforms
Instead of only running net tests in qemu_x86, enable those
tests in all suitable platforms. The tests are disabled for
bbc_microbit as that platform does not have enough memory.

The tests/net/arp and tests/net/ieee802154/l2 are disabled
for qemu_xtensa as the qemu crashed when running the tests.
For tests/net/all there was a weird build error for qemu_xtensa
so that test is also disabled for that platform.

Increased the trickle timeout to 3 secs in tests/net/trickle as
occacionally there was timeout error in qemu_cortex_m3 when the
test was run.

Jira: ZEP-2398

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-25 10:46:44 -04:00
Erwan Gouriou
f8240018d0 dts: arm: Add clocks u(s)art on stm32 family
Add "clocks" property on u(s)arts nodes on stm32 socs
Add a dt clocks binding file and rework clock_control
header file include new device tree binding file.
include/dt-bindings folder is introduced as dt-bindings
placeholder

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 09:30:26 -05:00
Erwan Gouriou
c8852fb379 dts: stm32: Add rcc node on stm32 socs
This commit provides rcc nodes to all stm32 based socs.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 09:30:26 -05:00
Erwan Gouriou
b9c39b9b7e dts: arm: stm32: Add rcc node yaml descritpion
Provide rcc node yaml description for stm32 socs

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 09:30:26 -05:00
Erwan Gouriou
69b59fdeb3 dts: common: yaml: Update uart yaml with new properties
Update  uart yaml files to provide new properties:
-"interrupts-name"
-"pinctrl"

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-25 09:30:26 -05:00
Kumar Gala
6ec63522cc board: arduino_101: remove unused !HAS_DTS bits
Since HAS_DTS is always defined for arduino_101 the board specific
Kconfig bits associated with !HAS_DTS are never used, so lets remove
them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-25 09:09:11 -05:00
Savinay Dharmappa
dca22fa983 dts: tinytile: Add device tree support for tinytile board
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-25 08:58:14 -05:00
Nam Do
f04e0cde46 boards: arm: doc: Fix problems in nrf52_vbluno52 document
This patch fix problems in nrf52_vbluno52 document:
+ Delete `Segger RTT` from supported features
+ Add `5.0` version to Bluetooth Low Energy feature

Signed-off-by: Nam Do <robotden@gmail.com>
2017-07-25 06:08:05 -04:00
Jukka Rissanen
68ced8035d net: Add missing __cplusplus checks to includes
Some of the public networking include files did not had
__cplusplus checks.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-24 14:54:34 -04:00
Leandro Pereira
f5a8d498ea scripts: Convert gen_offset_header to Python
By having this as a Python script rather than a host executable, this
should simplify the build process on non-Unix platforms.

With this change, pyelftools is now required to build Zephyr.  Please
consult the getting started documentation for your host platform for
installation instructions.

Jira: ZEP-2062

Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-07-24 11:20:04 -07:00
Johann Fischer
bc2454fa9e samples: usb: add usb.rst and README.rst for CDC ACM sample
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-23 07:41:57 -04:00
Johann Fischer
1ff51986e5 samples: cdc_acm: use Arduino 101 as default board
Be consistent with other usb samples and use Arduino 101
as default board.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-07-23 07:41:57 -04:00
Yannis Damigos
c78c452315 doc: system_log: Fix global Kconfig options path
This patch fixes global Kconfig options path for system logging.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-23 07:01:18 -04:00
Anas Nashif
35a70b41dd doc: add python pip requirements.txt
List all required modules in one file and just call pip with this
file to install all needed modules instead of listing them
individually.

Added gitlint and pyocd and other required packages to the list.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-22 14:04:20 -04:00
Andrew Boie
a717050140 qemu_x86: terminate emulator on fatal system error
This will cause sanitycheck runs to finish more quickly
instead of sitting there waiting on a timeout. We already
do this with the Xtensa simulator.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-07-22 09:46:26 -04:00
Anas Nashif
f2841b1a99 CODEOWNERS: more tweaks
Do not apply source code wide wildcard to idenitify the missing portions
of the code that need entries. the * entry will be added at a later
stage when we have more coverage.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-22 05:58:08 -04:00
Anas Nashif
7c8ff7524e CODEOWNERS: more github handles
Now we have all emails converted to github handles.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-22 05:49:06 -04:00
Vinayak Kariappa Chettimada
255e5cc344 Bluetooth: controller: Implement Read/Write Auth Payload timeout
Added implementation to support HCI Read Authenticated
Payload Timeout Command and HCI Write Authenticated Payload
Timeout Command.

This fixes:
TP/SEC/SLA/BV-08-C [No response to LL_PING_REQ]
TP/SEC/SLA/BV-09-C [Modified Authentication Payload Timeout]
TP/SEC/MAS/BV-08-C [No response to LL_PING_REQ]
TP/SEC/MAS/BV-09-C [Modified Authentication Payload Timeout]
conformance tests in LL.TS.5.0.0.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2017-07-22 11:55:35 +03:00
Paul Sokolovsky
4732452a42 samples: bluetooth: ipsp: Bump max number of contexts
This sample includes builtin UDP and TCP echo servers, max
MAX_CONTEXTS=3 as set previously, they just didn't work.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-07-22 10:33:29 +03:00
Anas Nashif
ddfb2b790a CODEOWNERS: use github handles
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-21 20:36:00 -04:00
Yannis Damigos
c6a381f5e1 dts: intel_quark_d2000: Add device_type and reg in cpu node
Add device_type and reg properties in cpu node

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Yannis Damigos
1a652e3ef1 dts: Remove memory node from skeleton dtsi file
Remove memory node from skeleton dtsi and add device_type
property in every memory node in soc dtsi files

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Yannis Damigos
399a6bec0f dts: arm: Add unit-address component to memory and flash nodes
This patch add the unit-address component to memory and flash
nodes. According to the DT specification, the unit-address of
a node must match the first address specified in the reg
property of the node.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2017-07-21 12:20:49 -05:00
Anas Nashif
73024f8b3e maintainers: update CODEOWNERS from MAINTAINERS file
Converted using the script below with a few manual edits:

from __future__ import print_function, unicode_literals, with_statement
from glob import glob

import email.utils

seen = set()
emails = set()

with open('MAINTAINERS', 'rb') as f:
    new = False
    for line in f:
        line = line.decode('utf-8')
        if line.startswith('M:'):
            if new:
                emails = set()
                new = False
                print("")
            pattern = line.partition(':')[2].strip()
            emails.add(email.utils.parseaddr(pattern)[1])
        elif line.startswith('F:'):
            new = True
            pattern = line.partition(':')[2].strip()
            if pattern.endswith("/"):
                pattern = pattern + "*"
            print("%s %s" %(pattern, " ".join(emails)))
            seen.add(pattern)

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-21 00:27:00 +03:00
Anas Nashif
612cba8964 maintainers: set correct path for many of the components
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-07-21 00:27:00 +03:00
David B. Kinder
014d5f7d80 doc: output alphabetic Kconfig options index
Instead of a configuration options index in "discovered" order
during the walk of the Kconfig files, create the index in alphabetic
order.

Also added a more descriptive name above the displayed table and added
table headings.

jira: ZEP-2310

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-07-20 13:48:11 -07:00
Timo Teräs
cdec108bfe Makefile: explicitly disable PIE
Modern GCC can be configured to default to PIE. To support
such toolchains, turn PIE off as otherwise the generated
binaries are broken in multiple ways (e.g. the ELF will have
additional sections that get inserted at end of _TEXT_SECTION
making __data_rom_start point to these sections and not
the data secions).

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2017-07-20 12:02:08 -07:00
Erwan Gouriou
7bace4c290 scripts: extract_dts_includes.py: Fixup for pinmux nodes
Current version of extract_dts_include.py assumes end subnode
of pinctrl is 'pin'. This fix allows having different names.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 11:52:44 -05:00
Erwan Gouriou
1d602b30ce scripts: extract_dts_includes.py: allow @ in node names
@ could be used in subnode names.
Convert is to '_' in post processing

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 11:52:44 -05:00
Erwan Gouriou
cb78d8c816 scripts: extract_dts_includes.py: nodes without address def generation
def_label generation was assuming node names always have address
(eg: rcc@40023800). This was generating incorrect def_labels
when node names doen't have address (eg: pin-controller)
With this fix, this case is now taken into account

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 11:52:44 -05:00
Savinay Dharmappa
be55f6644e drivers: gpio: Fix Coverity static scan issues
patch fix the dead code issue reported by coverity static scan
for gpio driver of cc2650 TI SOC. GPIO_DS_DFLT_LOW macro
is defined Zero, bitwise and with any value would result to
zero,because of which only false condition of if is evaluated
but not the true condition.This is a fix for jira ZEP-2355.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-20 11:50:51 -05:00
Jukka Rissanen
c99bc8cf53 tests: net: LLVM build warning from tests/net/dhcpv4
Duplicate config option in prj.conf file.

Jira: ZEP-2374

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-20 10:16:44 -05:00
Jukka Rissanen
5871fda709 tests: net: LLVM build warning from tests/net/udp
Missing (u8_t *) cast.

Jira: ZEP-2375

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-20 10:16:44 -05:00
Marti Bolivar
59218a650a dts: flash: remove explicit app state partitions
Remove all explicitly defined application state partition child nodes
from DTS flash nodes, in favor of comments noting that they are
reserved for use by the application.

This follows the pattern established in f58b36a ("dts: frdm_k64f: make
application state partition a reserved area"), and fixes an error
introduced in 9f7f83d2 ("dts: 96b_nitrogen: add flash partitions"),
which added both a reserved area comment and an explicit partition
node to 96b_nitrogen's dts.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-07-20 10:08:11 -05:00
Kumar Gala
ddf3934d83 dts: Add missing compatible "mmio-sram"
Not all sram nodes had a compatible, so add one to those that are
missing.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-20 09:56:41 -05:00
Kumar Gala
4cace27c82 dts: cleanup usage of "flash" and "sram" compatible
Remove compatible = "flash" from any node that has it as this doesn't
have any well defined meaning right now.  Also update any compatible =
"sram" to be "mmio-sram" (as there's a binding in linux for this).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-20 09:56:41 -05:00
Jukka Rissanen
5e7765ba28 net: app: Setup IEEE 802.15.4 during init
If IEEE 802.15.4 is enabled, then setup the network settings
automatically so that the device is ready for IP configuration.
This is only done if CONFIG_NET_APP_AUTO_INIT is enabled, which
is currently the default.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-07-20 17:09:27 +03:00
Erwan Gouriou
46d66163eb arch: arm: stm32l4: Add pin config for USART1 on PB6/PB7
With introduction of commit "pinmux: stm32: directly return error if
stm32_get_pin_config fails", pin configuration fails when
pins are not configured in pins[] array.
This was the case for configuration UART1 assigned on PB6/PB7.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-07-20 07:30:32 -05:00
Michał Kruszewski
fda632adec nrf5: uart: Add support for 300 and 600 baud rates.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
2017-07-20 07:30:04 -05:00
Savinay Dharmappa
addb12b463 arch: quark_se: select config UART_QMSI_0 by default
'commit
("devicetree: Generate BLUETOOTH_UART ,UART_PIPE etc config from dt")'
created a dependency of selecting UART_QMSI_0 on device tree.
This change is reverted as it incorrect.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2017-07-20 07:12:00 -05:00