This macro is slated for complete removal, as it's not possible
on arches with an MPU stack guard to know the true buffer bounds
without also knowing the runtime state of its associated thread.
As removing this completely would be invasive to where we are
in the 1.14 release, demote to a private kernel Z_ API instead.
The current way that the macro is being used internally will
not cause any undue harm, we just don't want any external code
depending on it.
The final work to remove this (and overhaul stack specification in
general) will take place in 1.15 in the context of #14269Fixes: #14766
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Update the release notes page to include the 1.14 release notes
(currently a draft in progress), and update the main index page to
clarify how to get to documentation for other Zephyr versions.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The fix done in #14938 introduced a later assert when raising an HCI
event for the procedure that was terminated during the procedure
collision handling. This assert happens because the unknown rsp
has information that is needed when raising the event.
Solve this by copying the scratch packet into the node buffer so that
we keep the data.
Fixes#15183
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Improvement in test case name is needed to make it easier
to navigate from test case name to the actual test
folder.
This is useful as some tools that consume tests directory
will only output test case name without directory names
Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
Patch 8af3df3519 changed logic and did not take into account 2 extra
bytes.
...
Precise data bus error
BFAR Address: 0x766e4900
***** Hardware exception *****
Current thread ID = 0x200004e8
Faulting instruction address = 0xddf4
Fatal fault in thread 0x200004e8! Aborting.
...
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Merge cb_usb_status_composite and cb_usb_status and use common
forward_status_cb for both composite and normal devices.
Fixes#14882
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This test was having trouble earlier (at least with some toolchains),
but whatever was causing that seems to have been fixed. The only
remaining issue is that neither the IPM console code nor the test are
SMP-safe. There's a bug (#14639) tracking the need to get these
working, but for now the straightforward workaround is just to disable
SMP.
And even long term, IPM is an oddball interprocessor communication
mechanism designed for asymmetric multiprocessing devices like Quark
SE and doesn't seem like an obvious fit for a SMP machine.
Fixes#12478
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This patch adds information about the security vulnerabilities being
fixed in the 1.14 release.
Add a intro statement that these issues were addressed,
and include x86 vulnerabilities addressed in this release.
Signed-off-by: Andy Gross <andy.gross@linaro.org>
We renamed _sys_trace_thread_switched_in to
z_sys_trace_thread_switched_in, however we already had a function
named z_sys_trace_thread_switched_in. So rename z_sys_trace... to
z__sys_trace...
Fixes: #15184
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Add a missing reference to how west is used to set ZEPHYR_MODULES in
without-west.rst, augmenting the application development guide a bit
to include this in the list of important variables, cleaning that up a
bit while we are here and adding some more west details.
Add a big fat warning in the getting started guide that using Zephyr
without west is not for the faint of heart.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
for SDK 0.10.0, it consumes more stack size when coverage enabled
on qemu_x86 and mps2_an385 platform, adjust stack size for most of
the test cases, otherwise there will be stack overflow.
Fixes: #14500.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
on platform nrf52810_pca10040, the remaining sram space is not enough
to build test cases kernel.sched.preempt and kernel.poll, temporary
exclude nrf52810_pca10040 on that two cases, will open them when issue
is fixed.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
PR #14776 / commit 915a353255 changed function
zephyr_library_compile_options() to use MD5 instead of RANDOM for build
reproduction reasons. As later predicted by Sebastian Bøe in the PR
(thx), the names generated for these pseudo-libraries won't be unique
anymore if the exact same flag gets added more than once.
To reproduce the issue, simply add the following two lines in some
CMakeLists.txt file like samples/hello_world/CMakeLists.txt:
zephyr_library_compile_options("-Dfubar=barfu")
zephyr_library_compile_options("-Dfubar=barfu")
cmake will then fail like this:
CMake Error at zephyr/cmake/extensions.cmake:403 (add_library):
add_library cannot create target
"options_interface_lib_e689fdb7eb15d801c2f95dd61301fc5e" because
another target with the same name already exists. The existing
target is an interface library created in source directory
"zephyr/samples/hello_world". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
CMakeLists.txt:9 (zephyr_library_compile_options)
As requested by Sebastian, silently discard duplicate options just like
CMake does.
Fixes#15093
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The current idea is that we document zsock_* prefixed symbols, refer
to Open Group POSIX website
(http://pubs.opengroup.org/onlinepubs/9699919799/) for normative
descriptions, and explicitly mention bare POSIX name of a function
too (so e.g. users could find it via search).
Fixes: #13397
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
For some reason we dropped the simulation keyword and this platform is
not running any tests, we are just building the tests.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rename reserved function names in the subsys/ subdirectory except
for static _mod_pub_set and _mod_unbind functions in bluetooth mesh
cfg_srv.c which clash with the similarly named global functions.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Rename reserved function names in arch/ subdirectory. The Python
script gen_priv_stacks.py was updated to follow the 'z_' prefix
naming.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
Rename reserved function names in drivers/ subdirectory. Update
function macros concatenatenating function names with '##'. As
there is a conflict between the existing gpio_sch_manage_callback()
and _gpio_sch_manage_callback() names, leave the latter unmodified.
Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
The stack information stored in the thread->stack_info
fields need to represent the actual writable area for
its associated thread. Perform various tests to ensure
that the various reported and specified values are in
agreement.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Unlike the others, this macro was not taking into
account minimum MPU region sizes by filtering through
STACK_SIZE_ALIGN().
Fixes: #15130
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Similar issue to what was fixed earlier in the MPUv3
code. start + size should be <= r_addr_end. Fixes
a problem where the last byte of an MPU region is
incorrectly reported as out-of-bounds.
Fixes: #15131
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Permission management no longer necessary, the former
parameter for the mutex is now simply ignored.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Various globals for the test cases have been moved to
the ztest memory domain data section via ZTEST_DMEM tags
so that user mode can access them.
Some anonymous arrays whose address was being placed in
the msg_subackX structs have been split out so they
are in ztest memory domain.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
For systems without userspace enabled, these work the same
as a k_mutex.
For systems with userspace, the sys_mutex may exist in user
memory. It is still tracked as a kernel object, but has an
underlying k_mutex that is looked up in the kernel object
table.
Future enhancements will optimize sys_mutex to not require
syscalls for uncontended sys_mutexes, using atomic ops
instead.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The data value in a kernel object structure is specific
to that type of object. Allow this to be a reference to
another C symbol or other compiled code by populating as
a string.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some forthcoming kernel object types like futexes need to
be tracked, but do not contain data that is private to
the kernel.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The legacy struct s_coopFloatReg was never being used, though it was
an empty struct (not wasting space), some symbols were being generate
for it.
Nevertheless, neither C99 nor C11 allow empty structs, so this
was also a violation to the C standards.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
DNS is not part of L3, but as dhcpv4 or the net shell, it is a services
on top of the network stack. So let's gather all in a dedicated
function.
This also rework the order when starting the DNS service. There was an
issue for offload device: these would be fully initialized in
init_rx_queues() which was called after l3_init. l3_init had already
started dns: which would not be able to bind correctly, proving to be
fully dead afterwards. Instead, starting the dns at the very end
ensures that all is initialized properly from devices to stack.
Fixes#15124
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Ports B and C share a common interrupt vector on kw40 and kw41z socs,
but we don't currently have a way to express this in device tree. A
check was added in commit 77cb942a97 that
correctly causes build errors on kw40/41 boards when both ports are
enabled.
Disable the port b interrupt for now until we have a better way to
handle this.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
unify the API of CCM alogrithm's implemation for TinyCrypt,
mbedTLS and cc2520 crypto device to make users easy to use.
Fixes#8339.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This test is only trying to prove that k_thread_foreach() works,
it has nothing to do with stacks. Remove the stack checks
completely.
Fixes: #15044
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
It's really not possible to design a test where we can
enforce expectations on real vs. expected stack size:
- Some platforms may increase stack size over what is expected
due to rounding up the stack buffer area to the next power
of two.
- Some configuration options like CONFIG_STACK_RANDOM
carve out space in the stack buffer, resulting in a stack
size less than what is expected.
Best we can do is just assert that the amount of space
available should be less than the total size reported.
Fixes: #14640
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
* the nsim host timer does not work as expected,
disable it, use cycle count to simulate timer tick
* optmize the freq definition of nsim_em
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
We define a system heap and assign our resource pool
from it as k_poll() requires an implicit allocation.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>