* re-use top of isr stack as exception stack
* bug fixes in irq offload's implementation
* improve kernel oops implementation
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit improves the reset of arc:
* make the processor in the correct status
* clear interrupt related regs
this may improve or fix#6515
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Whether it should hang the system it not decided finally.
But remove it here to let some tests pass.
Fixes#8032
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Even CONFIG_HW_STACK_PROTECTION is no here,
it is still yes as it will be re-selected by
CONFIG_TEST_HW_STACK_PROTECTION in tests/Kconfig.
So the correct setting here is:
CONFIG_TEST_HW_STACK_PROTECTION=n
This fixes#8092 (case1)
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
* use a separate stack for exception handling, this
will gurantee the exception handling always work, not
affected by some speical cases, e.g., stack check exception
or mem. protection exception at the exception entry.
* this commit can fix the second case of #8092
* note: the thread switch is still possible in exception
handling, e.g, caused by thread_abort. But the switched out
thread cannot be recovered, as the thread context is not
setup.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Bring in the changes from upstream 321ab2e17 ("runner: core: fix
docstrings for ReST integration"). This is a minimal change necessary
to avoid documentation build issues. The rest of West has gained other
features that are too late to pull in to the RC period, so just bring
in what's needed to get to v1.12.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This covers its design and scope, and provides usage and some
implementation documentation on the existing flashing and debugging
commands.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
We need this to be able to pull in its API documentation.
This will need modifications when multi-repo support is available, in
order to get the imports from the independent West repo, but for now
just use the copy in Zephyr.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Null-checking `pkt` before making a call to net_pkt_unref() suggests
that it might be NULL, but the pointer is dereferenced before it's
checked. Perform the check at the beginning of the function and
dereference and drop its reference unconditionally afterwards.
Coverity-ID: 178789
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
While printing debugging information, an out of bounds write could
happen while trying to write out the NUL byte in the url array.
Coverity-ID: 178790
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The recv() call can return errors, so handle them before reading the
received byte. Unrecoverable errors will just trigger the client
socket to be closed as usual.
Coverity-ID: 182778
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The return value from k_fifo_get() might be NULL in some situations,
so protect against that.
Coverity-ID: 186190
Coverity-ID: 186058
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
compiler_barrier() is itself defined down in this file. Without
adding it, newer versions of GCC (7+) for ARM Cortex-M may mistakenly
coalesce multiple strb/strh/str (store byte/half-word/word)
instructions, which support unaligned access on some
sub-architectures (Cortex-M3 and higher, but not on Cortex-M0),
into strd (store double), which doesn't support unaligned access.
Fixes: #6307
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
The directive is not generating the right "mkdir" steps when used with
the :app: option. Fix it.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
The building and running section is out of date, as Windows and macOS
commands are available now.
It also has some accuracies:
- the following section describes how to build hello_world, not how to
make a new application based on it
- zephyr-env scripts do more than just set project-specific
environment variables (they modify PATH on Unix, and may run
arbitrary RC scripts on all platforms)
Fix these issues.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Commas are needed before coordinating conjunctions joining independent
clauses. Two backticks are needed for teletype fonts.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
Now that the instructions work on Windows, delete a reference to
~ (the user's home on a Unix system) in the text.
Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
This patch removes the revision history from the security overview
document. With this file being maintained in git, there is no need
for an additional in-document revision history table.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
This patch revises the security overview document to bring the
information pertaining to stack protection, thread separation,
and memory protection up to date with the current state of the
software releases.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Fail in tests where we have an OOPS or a panic. Right now and in many
cases we continue and test case might be reported as PASS.
Cases that have the tag ignore_faults will ignore those faults (cases
that are testing faults for example).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is a core platform that needs to be tested by default. Fix the
default tag in the board YAML (it was duplicated in the wrong section).
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Export tests to a file with Section, subsection and identifier as
columns making it easy to import testcases into test management system.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
A typo in update_attrs() was setting every observer to a PMIN of 0.
This meant we could send observer data as often as the process was
called. This is out of spec as the default minimum is 10 seconds.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
The hop limit value in net_pkt was not updated according to
received IPv6 header.
Fixes#8182
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The LwM2M engine thread is used for various periodic triggers.
None of these are in a critical path that requires super sensitive
timing and the current K_PRIO_COOP(7) setting was causing the
Bluetooth RX thread to have to wait too long for certain actions
to complete.
Let's lower the priority to -1 (effectively) to eliminate these
conflicts.
Signed-off-by: Michael Scott <michael@opensourcefoundries.com>
Since on ARM CONFIG_NUM_IRQS option has no prompt, it cannot be properly
overridden by a prj.conf fragment. Instead make it have a prompt for
this particular test to be able to override it properly.
Fixes#8200
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The original implementation of CONFIG_THREAD_MONITOR would
try to leverage a thread's initial stack layout to provide
the entry function with arguments for any given thread.
This is problematic:
- Some arches do not have a initial stack layout suitable for
this
- Some arches never enabled this at all (riscv32, nios2)
- Some arches did not enable this properly
- Dropping to user mode would erase or provide incorrect
information.
Just spend a few extra bytes to store this stuff directly
in the k_thread struct and get rid of all the arch-specific
code for this.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fills in the summary section with roadmap features added in the 1.12
release. Fills in the architectures and kernel sections with notable
additions and changes.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Fix file exist error within settings_subsys_init in order to correctly
reload existing settings when CONFIG_SETTINGS_FS is enabled.
Signed-off-by: Daniele Biagetti <daniele.biagetti@cblelectronics.com>
When att_disconnected is called a thread may be waiting for the tx_sem
but that is memset to 0, furthermore there exists a flag
ATT_DISCONNECTED to indicate the context is no longer valid so instead
move memset to bt_att_accept so it is cleared when it is about to be
reused.
Fixes#8083
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
BUILD_OUTPUT_HEX was enabled by default for stm32 SoCs.
This should not be the default setting and besides it has no
effect because of 'default n' in misc/Kconfig that seems to
prevail.
Removing the 'default y' for stm32 to avoid confusion.
Fixes#8193
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
We are getting stack corruption on some platforms, so increase stack to
allow the test to run.
Fixes#8085
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On ARM, the __thread_entry struct pointer used when
CONFIG_THREAD_MONITOR is enabled was pointing to the initial exception
stack frame. That's not right: even though this contains all the same
info, it's not layout-compatible with the API struct. And once the
thread starts running, the ESF gets unwound and the memory recliamed
for the stack frame of the entry function!
Stuff the __thread_entry struct into its own memory at the bottom of
the stack like the other architectures do. Fixes#7541
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>