The icmpv6, http_header_fields, mqtt_packet, dns_packet and
net utils tests were failing in frdm-k64f because of too small
stack.
Fixes#8171
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some changes were made in the sample implementation that made the test
fail due to differences in the expected output.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Find the device and query its capabilities just once at boot, then
go through a list of tests to perform.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
`mmsg` should be fully initialized prior to calling k_mbox_get(). The
mailbox implementation (mainly, mbox_message_match()) will look inside
the second parameter passed to k_mbox_get() in order to determine if
which pending messages should be returned to the caller.
Fixes Valgrind warning listed in #7478.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
k_work_init() was not initializing all fields in the k_work struct.
Mainly, the atomic_clear_bit() function call was reading a possibly
uninitialized value, clearing a bit, and assigning it back to the
`flags` member. The `_reserved` member was never initialized.
With the struct now initialized with the _K_WORK_INITIALIZER() macro,
initialization is consistent regardless of how a `struct k_work` is
initialized.
This fixes the Valgrind issues found in #7478.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
ARC has only 2 priorities, 0 or 1. So let's set the right priority for
WDT.
It looks like some commit has changed that, somewhere. And wrong
priorities were lurking around.
Fixes#8096
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
In the function zephyr_smp_write_at the offset was checked
for negative values while it type is unsigned -
which cause static analyses issue.
Fixes#7737
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Corrected description of wdt_install_timeout function return value. The
function returns index of the channel to which the timeout was assigned.
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
Scheduler choice is subtle across yield and k_sleep(), add calls to
those to the state table and validate that we're making the right
decisions.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
PLL configuration options for i.MX RT SoCs were added in commit
3fd25c64c7, but the selects were
incorrectly added to the SoC defconfig rather than Kconfig.soc. This
resulted in the PLL options not being configured and the part not
booting properly.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
We should check for valid lengths, not just because flash may have
become corrupted, but also because this fixes coverity errors, such as
CID 186030.
Fixes#7739
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
DISK_ERASE_BLOCK_SIZE, DISK_VOLUME_SIZE was described in misleading
manner. This patch changes descriptions for both prompts to
appropriate.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
GPIO_QMSI_<0/1>_NAME are now generated through DTS. Until CC2520
settings are generated through DTS, let's use direct gpio names
instead.
Fixes#8086
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The OVR condition in the Status Register requires a
particular sequence in order to be cleared. If not
done properly it stays set forever.
Signed-off-by: Armando Visconti <armando.visconti@st.com>
* the original stack check codes have no consideration
for userspace case. This will wrong cause possible stack
check exception.
* this commit refactors the arc stack check support to
support the usperspace.
* this commit fixes#7885. All the failed tests in #7885
are run again to verify this commit. The test results are ok
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
The flash script was broken after the cmake changes.
Updated the path needed for the flash scripts.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
An issue has been confirmed in CMSIS core header file in
SCB_EnableDCache when stack is in cacheable memory.
Issue report: https://github.com/ARM-software/CMSIS_5/issues/331
To workaround this issue by checking if Dcache's been enabled before
trying to enable it.
Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
- Remove clock gating code to be compatible with A1 silicon
- Remove PLL deinitialization code out of soc file
Signed-off-by: Ryan QIAN <jianghao.qian@nxp.com>
The issue was introduced by commit-id 27bdb83.
RTC_DIVIDER used to be 0 by default, now it's 1.
Fixes#8098
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The logic for using _Static_assert() was a little broken. We were
using it when on GCC 4.6+ AND when __STDC_VERSION__ said we were on
C99 or better. But it's not a C99 feature, it's a C11 feature. And
if GCC provides it as an extension, that's unrelated to a particular
language version. This should have been "GCC 4.6+ OR C11+".
This actually broke on the ESP-32 IDF toolchain, where (when using
-std=c99) the compiler was actually defining a C99 macro instead of
the C11 one, and choosing to use the wrong (and independently broken)
handling incorrectly. Fixes#8093.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Layer code mask is 0x7FF so obviously 0x802 is not valid (as it will
always set the synchronous bit).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
GPIO API was not shown in doxygen output and on website because the
defgroup was closed prematurely. The closing brackets are still present
on the end of the file, so the additional closing can be safely deleted.
Fixes#8142
Signed-off-by: Johannes Hutter <johannes@proglove.de>
The old way of erasing was not completely moved to the new SPI access
function, thus always sending useless dummy bytes that could lead to
error (aka: erasing more than requested).
Fixes#8065
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
ETHERNET option was from first network stack (a fork of uIP). This
option is now called NET_L2_ETHERNET.
Fixes#7798
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
We are using _is_thread_prevented_from_running() to see if the
_current thread can be preempted in should_preempt(). The idea
being that even if the _current thread is a high priority coop
thread, we can still preempt it when it's pending, suspended,
etc.
This does not take into account if the thread is sleeping.
k_sleep() merely removes the thread from the ready_q and calls
Swap(). The scheduler will swap away from the thread temporarily
and then on the next cycle get stuck to the sleeping thread for
however long the sleep timeout is, doing exactly nothing because
other functions like _ready_thread() use _is_thread_ready() as a
check before proceeding.
We should use !_is_thread_ready() to take into account when threads
are waiting on a timer, and let other threads run in the meantime.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Previously, the stack buffer array wasn't being page-aligned.
If private kernel data was stored after the stack buffer in
the same page, the current thread would incorrectly have
access to it. Round stack sizes up on x86 to prevent this
problem.
Fixes#8118
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
True stack sizes may be rounded up, instead of using a multiplier
just fetch the true stack size and add one to it, just one byte
over should produce an error.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
It's not possible to enforce that K_THREAD_STACK_SIZEOF()
returns the original number passed to K_THREAD_STACK_DEFINE().
Some arches need to round this number up in order to satisfy
alignment constraints.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Commit 4ef36a4b54 ("tests/kernel/mem_slab: Fix memory overcommit")
caught this error, but missed the fact that there are two slabs that
need to be resized. I also failed to properly explain (or, to be
honestly, fully understand) the deadlock condition, so add a nice big
comment explaining it.
Basically: you have a bunch of threads that can allocate all but one
of their blocks before trying to allocate their last one and pending.
There must be at least one block left so all the threads don't
symmetrically go to sleep waiting on each other.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Use k_uptime_get() to compute both tv_sec and tv_nsec members
of timespec structure.
Fixes#8009
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Each driver seemed to use their own Kconfig option to set the name for
their drivers. This makes writing example/test code difficult as each
one of them will have to special case for each of the supported
platforms.
Use a consistent CONFIG_WDT_0_NAME option in all drivers.
Fixes#8094.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Instead of relying on CONFIG_WDT_ESP32_DISABLE_AT_BOOT, use
CONFIG_WDT_DISABLE_AT_BOOT that's available for all watchdog timers.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
In this fix we are asserting the return value of pthread_attr_init.
Resolves#7084
Coverity-CID: 185280
Signed-off-by: Sritej Kanakadandi Venkata Rama <sritej.kvr@gmail.com>
This commit moves the bit timing (PROP, BS1, BS2 segments and SWJ)
from Kconfig to the device-tree and fixes issue #7933
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>