Moving all thread docs into 1 page was a bit too much. Split the section
a bit and remove redundant and useless sections and move some thread
related documentation from the scheduling page to threads (thread states
and priorities).
Add a new figure for thread states.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
We shall not include core kernel headers in soc.h
header of ARM SoCs. We should try to only include
the vendor headers and auto-generated board header
from DTS. This commit implements this policy for
the SoCs, whose builds have shown to fail due to
header inclusion cycles.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We need to change the order of inclusions in
uart_mcux_lpuart.c, to avoid build errors. This
is required since the driver structures contain
a field named DATA, which is also a macro defined
in the linker script.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Replace zephyr_library_sourceS_ifdef with zephyr_library_sources_ifdef
and follow cmake coding style.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
'enable-pin-remap' is defined as 'type: boolean' in
dts/bindings/usb/st,stm32-usb.yaml, so it generates either
#define DT_USB_ENABLE_PIN_REMAP 1
or
#define DT_USB_ENABLE_PIN_REMAP 0
depending on if 'enable-pin-remap;' appears on the node or not.
Since a macro is always generated, #ifdef won't work. The test needs to
be this instead:
#if DT_USB_ENABLE_PIN_REMAP == 1
(Should be careful with '#if HMZ == 0' though, because it's true even if
HMZ is undefined.)
This behavior was inherited from the old scripts, and some things depend
on it, e.g. by expanding macros in initializers.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
- Remove redundant inclusions in irq_init.c
- Remove comment about thread_abort function,
which does not belong in this file (probably
left-out during code refactoring)
- Include arm cmsis.h only under #ifdef CONFIG_ARM
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This file contains redundant definitions of a bunch of nRF IRQ numbers
(not all, however) that only generates confusion, as enumeration values
provided by MDK can be used instead.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This change is done so that there is no need to additionaly include
<nrfx.h> before <soc/nrfx_coredep.h> (what might be a bit surprising)
and so that <nrfx_config.h> doesn't need to be include separately for
nRF SoCs requiring a special mapping of peripheral accessing symbols.
This commit removes also no longer needed inclusions and updates
the hal_nordic module with required minor correction of nrfx_glue.h.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Header files of nrfx HALs are not supposed to be included directly
but only with their names prepended with the hal/ directory (so that
an inclusion of an nrfx HAL header clearly differs from an inclusion
of an nrfx driver header).
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
nrf52840 and nrf9160 have possible configuration of two stop bits
for UART and UARTE, this commit adds handling of it to driver.
Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
This commit implements generic function to decide
witch functions to call for selected value name with given
loading parameters.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit allows loading data from settings permanent storage
directly to the given callback function.
Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
The nRF52811 Radio is similar to nRF52840 and exhibits
similar Radio Timings constants. We align the LE Coded
PHY (S2) RX chain delay with that of nRF52840, which,
eventually fixes the TIFS for nRF52811. In nRF52840 we
correct the inline comment only.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Top value interrupt was not enabled because channel index was
used instead of mask. Additionally, interrupt was enabled only
when user callback was provided and not in case there was
custom top value and no top callback.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added CONIFG_LOG_BLOCK_IN_THREAD option to block until buffer for
log message is available. When log message is called in the thread
and there is no buffer available in the pool, thread will block with
configurable timeout (CONFIG_LOG_BLOCK_IN_THREAD_TIMEOUT_MS). If
buffer cannot be allocated by that time, message will be dropped.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
A commit that organizes the soc.h header of NXP SoCs:
- removing redundant inclusions of sys/util.h
- removing inclusions of device.h and kernel_includes.h
- including the auto-generated DTS board header
- including the fsl_common.h header
- fixing minor style issues
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Refactor z_arch_is_user_context() for ARM, so it uses
the CMSIS CONTROL_nPRIV_Msk instead of hard-coded 0x1.
Fixing also some typos in include/arch/arm/syscall.h.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This used to be part of the "restore always" set of registers because
__swap was expected to return a value. No longer required, so RAX is
moved to the volatile registers and we save a few cycles occasionally.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
A space is allocated in the TSS for per-CPU variables. At present,
this is only a 'struct _cpu *' to find the _kernel CPU struct. The
locore routines are rewritten to find _current and _nested via this
pointer rather than referencing the _kernel global directly.
This is obviously in preparation for SMP support.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This function call was erroneously inserted between the instruction
that set the Z flag and the instruction that tested the Z flag. The
call is moved up a few instructions where it can't junk CPU state.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The QEMU x86 .dts files were re-arranged before long mode was
merged. We don't need this reference to the flash region anymore.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Declare the 64-bit TSS as a struct, and define the instance in C.
Add a data segment selector that overlaps the TSS and keep that
loaded in GS so we can access the TSS via a segment-override prefix.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This is moved from arch/x86/include/ia32/kernel_arch_func.h to the
common header arch/x86/include/kernel_arch_func.h so it can be shared.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This is largely a conceptual change rather than an actual change.
Instead of using an array of interrupt stacks (one for each IRQ
nesting level), we use one interrupt stack and subdivide it. The
effect is the same, but this is more in line with the Zephyr model
of one ISR stack per CPU (as reflected in init.c).
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Like its 32-bit sibling, the 64-bit code should EOI inline rather than
invoking a function. Defeats the performance advantages of x2APIC.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Platforms with limited flash are now failing to link. Add or increase
flash requirements for test cases to exclude the ones that will fail.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
We don't really have docs on how fatal errors are induced
or handled. Provide some documentation that covers:
- Assertions (runtime and build)
- Kernel panic and oops conditions
- Stack overflows
- Other exceptions
- Exception handling policy
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Cast a %lld argument to long long int. This is causing warnings on
recent GNU Arm Embedded toolchains, which fail the build with
-Werror=format=.
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
We have introduced option HAS_HW_NRF_RADIO_BLE_CODED, which
reflects that an nRF SoC has a Radio with LE Coded PHY
capabilities. We now modify all #ifdef expressions for
Coded PHY in the nRF controller port, removing SOC_NRF52840
and adding this new option instead. This allows to build
an nRF controller with Coded PHY support for SOCs other
than nRF52840.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Nordic nRF52811 SoC has a 2.4GHx Radio which supports
LE Coded PHY, so we add the option to build a BLE
Controller for nRF52811 platforms with LE Coded PHY
support.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We, now, have multiple nRF52x SoCs with 2.4GHz
Radio with LE Coded PHY Capabilities. Therefore,
we would like to have a Kconfig option and select
it in the corresponding SoCs. This allows us to
simplify several #ifdef blocks in the nRF Bluetooth
Controller that would, otherwise, require listing
all nRF SoCS with LE Coded PHY support.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Enable possibility to configure time a slave will wait until
start of connection parameters update procedure after BT connection
is established.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
* The issue is found in supporting offload module esp8266
* For device like esp8266, it's responsible for tcp/udp handling,
no need of net_tcp related functions
* This commit is only tested for esp8266, no gurantee for other
modules
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Currently the CONFIG_NET_ROUTING option has limited use as there
would be some entity that populates routing table. Previously it
was RPL that did it but RPL support was removed some time ago.
Fixes#16320
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The commit fixes two assert expressions in the test,
which evaluate the return value of _swap(.) function
and the value of the thread's swap return variable.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We use inline assembly to store the return value of _swap(..)
function directly into r0 (in order to ensure that r4-r11
registers are not touched at this point). But we need to store
the r0 into some global memory, to retain the value until we
check it later in an assert expression, otherwise the
compiler may overwrite r0 in subsequent instructions.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>