If there are no neighbors or there is no route to one specific
neighbor, then check the NULL pointer before accessing the route.
This issue was seen with "net route" shell command.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The net_stack_analyze function wants to look at the stack buffer,
but it is making assumptions on where this data is that are no
longer valid. Change to use the proper APIs for referencing this.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
When we introduced I2C DTS support on hexiwear_kw40z we got it wrong.
Its I2C1 not I2C0 that was being used on the hexiwear. Fix the dts and
fixup file to reflect that.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
When installing packages with PIP, recommend --user so that it is
installed in the user's directory vs system wide, potentially
overriding system-wide files that are under package manager control
and introducing possible security issues.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Avoid overriding files in the system that shall be under package
manager control with who knows what is downloaded that day, as it can
introduce security issues.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
kernel APIs have changed to using K_THREAD_STACK_DEFINE to declare stack
memory as well as K_THREAD_STACK_SIZEOF to calculate it's size.
Adjust irc_bot sample to reflect those changes.
This fixes stack related page faults when running irc_bot with
CONFIG_X86_STACK_PROTECTION enabled (which it is by default for qemu).
Signed-off-by: Michael Scott <michael.scott@linaro.org>
A number of the network tests have minimal memory requirements that not
all boards are able to meet. Add in those memory requirements so we
don't attempt to build these tests for those platforms. Utilized the
frdm_kl25z (with 16K of memory) and cc2650_sensortag (with 20K) to test
the limits.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update the I2C defines in fixup files after the introduction
of cell prefix to interrupts-names generated defines
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
Now that we generate BLUETOOTH_UART_ON_DEV_NAME, UART_PIPE_ON_DEV_NAME,
and BLUETOOTH_MONITOR_ON_DEV_NAME Kconfig defines for dts enabled
platforms add those into the appropriate dts files and remove from the
various board/Kconfig.defconfig files.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since we generate BLUETOOTH_MONITOR_ON_DEV_NAME based on dts we need a
!HAS_DTS check around it. Otherwise we can get into odd build errors.
Its also possibly that we don't specify "zephyr,bt-mon-uart" and in that
case we default to CONFIG_UART_CONSOLE_ON_DEV_NAME (ie 'zephyr,console'
on DTS platforms).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Show that this mechanism can detect stack overflows with the
guard page. We only do it once since are are in an alternate
IA HW task after it happens.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This will trigger a page fault if the guard area
is written to. Since the exception itself will try
to write to the memory, a double fault will be triggered
and we will do an IA task switch to the df_tss and panic.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Subsequent patches will set this guard page as unmapped,
triggering a page fault on access. If this is due to
stack overflow, a double fault will be triggered,
which we are now capable of handling with a switch to
a know good stack.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Each member of the array may need to have a padding size added
such that the base address of each array element corresponds to
the desired stack alignment.
This would mean that sizeof(some array element) would return
a larger size than what was originally provided.
This won't cause problems at runtime since the space is really
there, but for users who are only enabling this padding for
debug features, they may be surprised when their stacks are
effectively smaller than when this was enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>