Commit graph

96296 commits

Author SHA1 Message Date
Alberto Escolar Piedras ba45d54bf9 native_posix: command line parsing fix
Until now, command line options switches which matched the
begining of other options with argumentes needed to be listed
after those. After this fix this is not neccessary anymore.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-07-24 22:59:07 -04:00
Alberto Escolar Piedras 362e5ddb6b native_posix: Be more precise with stop-at
Let the HW events which would have executed right at the
stop-at time happen, as this produces a more intuitive runtime.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2018-07-24 22:59:07 -04:00
Andrei Emeltchenko 1f4e8d679b usb_dc_stm32: Fix FS mode
Fixes FS mode for STM32F7XX devices.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2018-07-24 22:27:17 -04:00
Yannis Damigos 48de3ec616 drivers: usb_dc_stm32: Add OTG HS full-speed PHY support
Enable the driver to work in full-speed mode on OTG HS
controller using its full-speed or high-speed internal
PHY.

Please note that only one interface should be enabled
at a time, OTG FS or OTG HS. The driver will raise an
error if both are enabled.

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-24 22:27:17 -04:00
Yannis Damigos 302494d35a arch: stm32f4/f7: Add OTG HS defines to dts fixup file
Add OTG HS defines to dts fixup file for STM32 F4 and
F7 series

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-24 22:27:17 -04:00
Yannis Damigos cc214b4426 dts/arm/st: Add OTG HS node to STM32 F4 and F7 series
Add OTG HS node to to STM32 F4 and F7 series

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-24 22:27:17 -04:00
Yannis Damigos 8f338ecaa0 dts/bindings/usb: Add yaml files for STM32 OTG HS
Add yaml file to DT for initial support of STM32 OTG HS

Origin: original

Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2018-07-24 22:27:17 -04:00
Ajay Kishore 7b24690e14 tests: msgq: Enhance tests to improve code coverage
This test is intended to validate k_msgq_alloc_init()
and k_msgq_cleanup(), when CONFIG_USERSPACE is not defined.
Also added test to validate k_msgq_get() api, if any thread is
pending to write in message queue.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-07-24 20:07:12 -04:00
Spoorthi K 7c8aa526cb tests: queue: Enhance tests to improve coverage
Modify test to cover k_queue_insert() and k_queue_alloc_prepend(),
       and allocation failure/success scenario.

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-07-24 19:28:36 -04:00
Anas Nashif 448cd0c0ce ci: handle documentation errors in ci
Path change of the warning file let a few errors slipe by..

Fixes #9098

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-24 19:26:52 -04:00
Zide Chen 98775f34c3 kconfig: decouple realmode boot from CONFIG_JAIHOUSE
Add CONFIG_REALMODE item so that it's possible to configure other
x86 boards to boot from real mode.

Signed-off-by: Zide Chen <zide.chen@intel.com>
2018-07-24 15:37:09 -07:00
Ajay Kishore cea73067ce tests: kernel: Add test to validate k_stack_alloc_init, k_stack_cleanup
This test is intended to validate k_stack_cleanup() and
k_stack_alloc_init(). Passed stack pointer in k_stack_alloc_init()
is statically defined.

Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
2018-07-24 15:28:31 -07:00
David B. Kinder 9af485adf8 doc: fix incorrect defgroup comment in Queue tests
defgroup was missing the group title parameter

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-24 16:24:28 -04:00
David B. Kinder 5c086deccd doc: fix doxygen error in ethernet.h
Doxygen comments for net_eth_promisc_mode parameters were incorrect

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-07-24 16:24:10 -04:00
Andrew Boie a698e84a76 userspace: adjust syscall generation scripts
parse_syscalls.py was doing too much and was generating
derived and partial string output information that was
completed later by gen_syscalls.py.

Now parse_syscalls.py just breaks up system call information into
non-derived data which is fully processed by gen_syscalls.py.

The goal is to ease maintenance of system call generation with
all the mechanism on what to do with system call information in
one script location rather than two of them.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-07-24 14:39:38 -04:00
Tomasz Bursztyka 39db4f48d7 drivers/ieee802154: Fix settings channel/tx power in uart pipe driver
Being stopped or not should not be a blocker on these settings (real
hardware can get these settings configured while not being in rx/tx
mode for instance).

Fixes #8528

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 20:40:51 +03:00
Spoorthi K 4c6b90e317 tests: queue: Add description and doxygen groups
Add description for queue tests and doxygen groups

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-07-24 11:54:41 -04:00
Spoorthi K cb499d3232 tests: stack: Add description for test cases
Add description for test cases and some uncrustify
changes

Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
2018-07-24 11:53:42 -04:00
Robert Lubos 6c30f5955e samples: net: Fix incorrect error check in echo_server
The logic for error checking after net_pkt_pull was inverted -
build_pkt_reply would exit in case net_pkt_pull succeeded. In result no
responses were sent by echo_server.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2018-07-24 17:26:54 +03:00
Tomasz Bursztyka 9bb56cc6b9 net/icmpv4: Rename static function with icmpv4_ prefix
Static ones with that prefix, exported ones with net_icmpv4_ prefix.

Fixes #8720

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Tomasz Bursztyka ea5610af0a net/icmpv4: src ll address does not need to be set
net if core code will do it.

Fixes #8720

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Tomasz Bursztyka be6f59d322 net/icmpv4: Checksum is always set to 0 prior to being calculated
Through net_icmpv4_set_chksum()

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Tomasz Bursztyka b89f127f01 net/icmpv4: Use generic IPv4 relevantly
Avoiding to re-create the IPv4 header into ICMPv4 code directly.

Fixes #8720

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Tomasz Bursztyka abf68bc5ea net/ipv4: Remove useless return value
net_ipv4_finalize is always successful.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Tomasz Bursztyka a38dc0914f net/ipv4: Remove ifdefs and use IS_ENABLED instead
Reduces the logic as well as the ipv4 header checksum needs to be
computed either way.

Fixes #8720

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Tomasz Bursztyka df4325a9b8 net/ipv4: Remove useless proto field setting in ipv4 header
No need to initialize it to 0 as it will be set through given parameter.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2018-07-24 17:22:58 +03:00
Anas Nashif d147cc8dd4 mimxrt1050_evk: disable sanitycheck on this board [REVERT ME]
Due to bug #9054 this boards is being disable from sanitycheck
temporarily.

Revert when the board is fixed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-24 09:58:18 -04:00
Anas Nashif f3d48e1cce sanitycheck: allow blacklisting boards
Add new kwyboard to board definition to allow blacklisting boards. This
is needed when a board is broken causing CI to fail without a fix in
sight.

Add:

sanitycheck: false

to the board yaml file to disable the board. By default, the value is
set to true.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-24 09:58:18 -04:00
Jukka Rissanen fbbef6f436 net: stats: Simplify periodic statistics printing
Use modular arithmetic in statistics prints so that wraparounds are
automatically handled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 09:20:46 -04:00
Jukka Rissanen af34779510 samples: net: tp: Avoid compiler warning
If -fno-strict-overflow compiler flag is disabled, then this warning
is printed:

samples/net/throughput_server/src/server.c:157:6: \
  error: assuming signed overflow does not occur when assuming \
  that (X + c) >= X is always true [-Werror=strict-overflow]
     if (new_print > curr) {

Fixes #8924

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 09:20:46 -04:00
Zide Chen 50a08d9e8b loapic timer: LVTT should be programmed before ICR
Intel SDM Vol3 10.5.4.1 states that "A write to LVT Timer Register that
changes the timer mode disarms the local APIC timer".

This implies that LVT Timer register needs to be programmed before
Initial Count register, otherwise the LOAPIC timer could not be armed.

Signed-off-by: Zide Chen <zide.chen@intel.com>
2018-07-24 09:19:33 -04:00
Zide Chen 07e913a1e5 ioapic: IOREGSEL register needs to be treated as 32 bits
If IOREGSEL register is not accessed with 32 bits, it may not be
intercepted by type 1 hypervisor correctly.

Signed-off-by: Zide Chen <zide.chen@intel.com>
2018-07-24 09:04:05 -04:00
Jukka Rissanen c5095797b9 samples: net: Add promiscuous mode application
Simple application that sets all the network interfaces into
promiscuous mode.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen 36ab41df79 net: shell: Print information about promiscuous mode
If the network interface is in promiscuous mode, print information
about it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen af44d7c2e8 net: eth: native_posix: Add promiscuous mode support
Allow the zeth network interface to be placed into promiscuous mode.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen 9135b17535 net: eth: native_posix: Return proper error code from linux
Make sure that the system() call will return proper error code
to the ethernet driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen d202834e86 tests: net: Add tests for net_promisc API
Test that user is able to turn on/off promiscuous mode and
also receive any data from network interface.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen 3f9c7bd159 net: Add promiscuous mode support
Allow user to set the network interface into promiscuous mode
and then receive all the network packets that are received by
that interface.

Fixes #7595

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen e18900c5c5 tests: net: if: Add promisc mode tests
Make sure that user is able to toggle promiscuous mode flag
in network interface level and that flag value is passed
to device driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen 7352260696 tests: net: ethernet_mgmt: Add promisc mode tests
Test in ethernet mgmt level that promiscuous flag is passed
properly to the device driver.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen bf9bae58d1 net: eth: Add generic promiscuous mode support
Allow ethernet L2 driver to set / unset the device driver
promiscuous mode flag.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen b19cb207cb net: if: Add promiscuous mode set / unset functionality
User is able to set the network interface to promiscuous mode
and query the promisc mode status.

Note that currently this is only supported for ethernet bearer.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:12:37 +03:00
Jukka Rissanen 72f75e52e1 samples: net: echo-server: Add overlay config support
Refactor the prj*conf files so that there is only one master
prj.conf and several overlay conf files that add / change
only minor subset of functionality.

Use the overlay files like so:
    cmake -DBOARD=nrf52840_pca10056 \
          -DOVERLAY_CONFIG=overlay-ot.conf ..

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2018-07-24 15:11:09 +03:00
Johan Hedberg 99a91c9459 Bluetooth: Kconfig: Lower minimum required ACL buffer count
The controller already has a minimum of 1, and the host should mirror
that (in particular to avoid Kconfig warnings). A single buffer is
unsafe in some scenarios (such as with LE SC enabled) however there
are valid scenarios where a single buffer makes sense, so leave it up
to the developer to choose this.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-07-24 14:14:49 +03:00
Andrew Boie 8e8dc1c528 net: relax net_ip.h check
This allows network stack headers to be included even if
no L3 networking support is enabled in Kconfig.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-07-24 11:43:46 +03:00
Daniel Leung efb0080d8b boards/x86: up_squared: fix UART interrupt triggers
The triggers for UART interrupts are actually active-low.

Signed-off-by: Daniel Leung <danielcp@gmail.com>
2018-07-23 17:20:10 -04:00
Ioannis Glaropoulos 90b64489e5 arch: arm: allow processor to ignore/recover from faults
This commit adds the implementation that allows the ARM CPU
to recover from (otherwise fatal) MPU faults. A new error
reason, _NANO_ERR_RECOVERABLE, is introduced. The error
reason is used to suppress fault dump information, if the
error is actually recoverable.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-23 10:50:30 -07:00
Ioannis Glaropoulos f713fa5d52 arch: arm: re-organize arm fault handling
This commit does several things:
- It unifies the way the fault inspection is implemented,
  irrespective of the selected fault dumping level.
- It removes the dumping of the Thread ID and faulting
  instruction address, as these are now displayed by
  _NanoFatalErrorHandler.
- It introduces a new debug print directive, to be used
  for the highest dumping level (2).

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-23 10:50:30 -07:00
Ioannis Glaropoulos afef645279 arch: arm: Call NanoFatalErrorHandler and split out Secure stack dump
This commit implements two changes.
- It splits out the dumping of the Secure stack information to a
  separate function. Dumping will only occur if the highest dump
  level has been selected.
- Forces _Fault() to invoke _NanoFatalErrorHandler, instead of
  _SysFatalErrorHandler. In addition, early return statemets are
  implemented in _Fault(), so the fatal error handler is only
  invoked once.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-23 10:50:30 -07:00
Ioannis Glaropoulos f4645561f9 arch: arm: improve documentation of _Fault(.)
This commit improves the documentation of function _Fault(.),
in order to better describe the actual implementation and the
use of the function arguments.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2018-07-23 10:50:30 -07:00