Zephyr introduced subsys/mgmt folder for MCU management. Move UpdateHub
to this newly and dedicated space.
Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
The fxas21002 sensor driver defines the Kconfig symbol
FXAS21002_DRDY_INT1 to depend on FXAS21002_TRIGGER, but the warp7_m4
board defconfig was incorrectly overriding it to depend on FXAS21002.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The fxos8700 sensor driver defines the Kconfig symbol FXOS8700_DRDY_INT1
to depend on FXOS8700_TRIGGER, but several board defconfigs were
incorrectly overriding it to depend on FXOS8700.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
The power API for this platform is available in binary form
which cannot be included inside Zephyr. This platform is running
at the slower default speed till we have a way to call the power
API's to raise the core voltages.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
After changes made in ff089217cb, clock control release can now return
non-negative values on success.
Signed-off-by: Rihards Skuja <rihardssk@mikrotik.com>
Removed potential race condition between uart being disabled and
rx_buf_rsp call.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added detection of uart_rx_buf_rsp call which happend to late when
uart is already disabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
API did not cover a case when uart_rx_buf_rsp is called when receiver
is already disabled. It may happen if uart_rx_buf_rsp is called too
late and active transfer is already finished. In that case -EACCES is
returned.
Some implementations already returned that error in that case.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
PPP implementation uses ring_buffer API, but RING_BUFFER Kconfig option
was not selected so far. This resulted in linker errors about undefined
reference to `ring_buf_get_claim' and 'ring_buf_put'.
Add missing RING_BUFFER selection via Kconfig, so PPP driver is properly
built.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This set of functions seem to be there just because of historical
reasons, stemming from Kbuild. They are non-obvious and prone to errors,
so remove them in favor of the `_ifdef()` ones with an explicit
`CONFIG_` condition.
Script used:
git grep -l _if_kconfig | xargs sed -E -i
"s/_if_kconfig\(\s*(\w*)/_ifdef(CONFIG_\U\1\E \1/g"
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Fill the referenced event counter of the Periodic
Advertising SYNC_IND PDU into the sync info struct in the
Common Extended Advertising Header Format.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When `CONFIG_UART_ASYNC_API` is enabled, cleanup any pending synchronous
receptions at initialization time. Pending receptions are present when
this driver is used with the default mcuboot application.
When `CONFIG_UART_ASYNC_API` is not enabled, RX is always enabled by
this driver. As mcuboot does not use the async API, and does not cleanup
the UART driver before jumping to the next application, that application
boots with RX still enabled. This results in a 500uA increase in current
consumption.
Fixes#26555
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Commit 135b5ce860 was mistakenly merged with a reference to a Pull
Request instead of a SHA. Correct this so that it references a real SHA.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Manage Dual core boot automatically whatever Option Bytes
configuration.
No more need of KConfig STM32H7_DUAL_CORE_BOOT to match
Option Bytes.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
In order to be able to add more entries under 'subsys/mgmt', move the
current contents of it, which relate exclusively to MCUMgr, to its own
folder.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The definition of the help command has been changed
so that it does not accept the arguments.
Thanks to this it cannot be marked by the "select" command.
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
If the command buffer is empty the shell was trying to read a string
from a random memory location. Added a condition checking "argc" value
when the select command is executed.
Fixes: #27227
Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordisemi.no>
There are predictable relationships between the actual size
of a stack object, the return value of K_*_STACK_SIZEOF() macros,
and the original size passed in when the stack was declared.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These stacks are appropriate for threads that run purely in
supervisor mode, and also as stacks for interrupt and exception
handling.
Two new arch defines are introduced:
- ARCH_KERNEL_STACK_GUARD_SIZE
- ARCH_KERNEL_STACK_OBJ_ALIGN
New public declaration macros:
- K_KERNEL_STACK_RESERVED
- K_KERNEL_STACK_EXTERN
- K_KERNEL_STACK_DEFINE
- K_KERNEL_STACK_ARRAY_DEFINE
- K_KERNEL_STACK_MEMBER
- K_KERNEL_STACK_SIZEOF
If user mode is not enabled, K_KERNEL_STACK_* and K_THREAD_STACK_*
are equivalent.
Separately generated privilege elevation stacks are now declared
like kernel stacks, removing the need for K_PRIVILEGE_STACK_ALIGN.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Currently for informational purposes, although we do check that
the carveout is smaller than the stack_size.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
thread->stack_info is now much more well maintained. Make these
tests that validate that user mode has no access just outside
the bounds of it, instead of the entire object.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This had been copy-pasted between linker scripts, create
a central header for it.
The linker scripts for xtensa and posix have very different
structure and have been left alone.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Check that the base of every stack object is properly
defined. This can get messed up if K_THREAD_STACK_ARRAY_DEFINE
isn't specified properly.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This now takes a stack pointer as an argument with TLS
and random offsets accounted for properly.
Based on #24467 authored by Flavio Ceolin.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Thread objects were moved out of the stack a long time ago.
Replacing this incorrect information is some clarification
on acceptable size values to pass in.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The core kernel computes the initial stack pointer
for a thread, properly aligning it and subtracting out
any random offsets or thread-local storage areas.
arch_new_thread() no longer needs to make any calculations,
an initial stack frame may be placed at the bounds of
the new 'stack_ptr' parameter passed in. This parameter
replaces 'stack_size'.
thread->stack_info is now set before arch_new_thread()
is invoked, z_new_thread_init() has been removed.
The values populated may need to be adjusted on arches
which carve-out MPU guard space from the actual stack
buffer.
thread->stack_info now has a new member 'delta' which
indicates any offset applied for TLS or random offset.
It's used so the calculations don't need to be repeated
if the thread later drops to user mode.
CONFIG_INIT_STACKS logic is now performed inside
z_setup_new_thread(), before arch_new_thread() is called.
thread->stack_info is now defined as the canonical
user-accessible area within the stack object, including
random offsets and TLS. It will never include any
carved-out memory for MPU guards and must be updated at
runtime if guards are removed.
Available stack space is now optimized. Some arches may
need to significantly round up the buffer size to account
for page-level granularity or MPU power-of-two requirements.
This space is now accounted for and used by virtue of
the Z_THREAD_STACK_SIZE_ADJUST() call in z_setup_new_thread.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Define a macro which takes as input a requested stack buffer
size, and returns the size of the stack object needed to
contain it.
An optional architecture interface is provided, though many
arches will be fine with the default implementation.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Some forthcoming macros will need this. This may now
be individually defined by arch code instead of hanging
off of ARCH_THREAD_STACK_DEFINE.
Some additional details added to the documentation string.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This can be in inline function, which gains us some
type safety.
Temporarily define Z_STACK_PTR_ALIGN() in terms of it,
slated for removal once some other changes land.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>