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>
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>
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>
CONFIG_DNS_RESOLVER is the master switch for DNS resolution support,
for both native and socket APIs. Avoid confusing link errors by
compiling out both dns_resolve_name() and getaddrinfo() if that
option is not enabled.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
If echo-server receives a IPv6 packet with large header (e.g HBHO)
build_reply_pkt() function failed to remove IPv6 header. Reason is
net_buf_pull() doesn't work if header length is more than one
fragment. net_pkt_pull() solves the issue.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Current implementation does not handle large extension headers
(e.g HBHO). Which resulted network stack crashes or due to
misinterpretation of lengths network packets are dropped. Also
caused issues while preparing IPv6 packet (e.g. large HBHO header
with IPv6 fragmentation support).
Issues fixed and provided more unit tests.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
name command can be used to read or write the GAP Device Name which is
used by the advertise command.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This force CONFIG_BT_DEVICE_NAME_MAX to be set even in boards where
CONFIG_BT_SETTINGS won't be defined so it exercise such configuration.
In addition to that set a long name that would not fix in the
ScanData.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This enables the user to provide a ScanData, as long as it contain
names, and set BT_LE_ADV_OPT_USE_NAME.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This introduces a new advertising flag BT_LE_ADV_OPT_USE_NAME which can
be used by applications to make the stack automatically include the
Bluetooth Device Name in the Scan Response.
The name is also updated in case there is already an advertising
instance using it.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes GAP name writable if CONFIG_BT_DEVICE_NAME_STORAGE is > 0
which means the name can be persisted.
Fixes#8357
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This uses bt_dev to store the name and allow changing it at runtime, in
addtion to that if CONFIG_BT_SETTINGS is defined make the name
persistent.
Fixes#8357
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
sanitycheck not printing QEMU console in some cases where a crash
happens and when state is not set correctly.
Fixes#9061
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
No need to run the tests in real hardware as there we can run
out of network buffers that happened with Atmel SAM-E70.
Fixes#8966
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Generate proper error if we run out of network buffers which means
so that the test can fail properly.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This code path for returning from an exception wasn't
updating ERET with ESF->pc, resulting in any updates to
the PC by the fault handler being ignored.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This extends the NS16550 driver to support 4 ports.
Also, this adds the necessary bits to enable PCI enumeration
on port 2.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
LOG_MODULE_REGISTER() was missing setting compiled-in log level
which was evaluated when message was filtered if runtime filtering
was disabled. As the outcome logs were not printed when runtime
filtering was disabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit enables accurate (based on 64-bit math) tick <-> ms
conversion if system clock rate is determined at runtime.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Set device state to DEVICE_PM_ACTIVE_STATE before making it busy.
Also improves the kernel/device.c coverage.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Add test for z_early_boot_rand32_get() API.
This also improves the coverage for kernel/init.c
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This commit adds support for the nrf52840_pca10059 board.
The flash partitions are configured to allow migrating from
the stock bootloader to MCUBoot.
Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Fixing copy paste error, where ipv4 member of
the structure is used in ipv6 branch.
CID: 187074
Fixes Issue #8992
Signed-off-by: Subramanian Meenakshi Sundaram <subbu147@gmail.com>
On some architectures tick time cannot be expressed as integer
number of microseconds, introducing error in calculations using
sys_clock_us_per_tick variable.
This commit deprecates the sys_clock_us_per_tick variable and
replaces its usage by more precise calculations based on
sys_clock_hw_cycles_per_sec and sys_clock_ticks_per_sec.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
We might access NULL pointer if strchr() return value is not
checked properly.
Coverity-CID: 187073
Fixes#8993
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that it is clear that we are suppose to fall through
a case statement.
Coverity-CID: 187078
Fixes#8989
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that we do not overflow when creating UScaledNS
value for interval.
Coverity-CID: 187079
Fixes#8988
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit replaces _TICK_ALIGN correction in the test (which was based
on simple division), by more precise estimation using __ticks_to_ms()
and _ms_to_ticks() functions.
This commit fixes#8899.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The errno "variable" is required to be thread-specific.
It gets defined to a macro which dereferences a pointer
returned by a kernel function.
In user mode, we cannot simply read/write the thread struct.
We do not have thread-local storage mechanism, so for now
use the lowest address of the thread stack to store this
value, since this is guaranteed to be read/writable by
a user thread.
The downside of this approach is potential stack corruption
if the stack pointer goes down this far but does not exceed
the location, since a fault won't be generated in this case.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Need the implementation of _arch_syscall_invokeX() functions
to avoid build problems in some cases.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Shouldn't declare this and then pull in headers, fixes
error like "util.h:41:1: error: template with C linkage"
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Shouldn't declare this and then pull in headers, fixes
errors like "util.h:41:1: error: template with C linkage"
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Mark this board as simulation board to be run with nsimdrv.
See documentation for how to get nsimdrv.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The two handlers were doing pretty much the same with minor differences,
unify them into one single handler BinaryHandler that will be able to
handle additional targets.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>