Add option for enabling the Code Cache present on the NXP Kinetis
KE1xF SoC series and enable it by default.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When in Sharing Floating Point Services mode we want to
dynamically save and restore the FP registers in thread
context switch, depending on whether the swapped-in and
swapped-out threads are currently using the FP registers.
This commit adds this functionality to the ARM context
switch mechanism. The logic consists of inspecting the
corresponding status flag (present in thread.arch.mode)
to decide whether to save or restore the FP registers.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Only a single bit of the 4-byte internal (thread.arch) status
variable 'mode' is currently used, when we build with User mode
support (CONFIG_USERSPACE=y). In this commit we extend the usage
of 'mode' variable, adding an additional bit-flag to track the
status of the floating point context in a particular thread,
i.e. to track whether FP context is active or not. The status
bit is meant to be used in context-switch, to restore the FP
register context when required.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The initial carved stack frame only needs to contain the basic
stack frame (state context), because:
- under No/Unshared FP Services mode no FP context is stacked.
- under FP Sharing mode FP context is cleared upon thread
creation.
This commit removes the unnecessary stacking of the FP context
during thread initialization. This results in reduced stack
usage under the Shared FP Services mode (CONFIG_FP_SHARING=y).
Also, we do not need to initialize the FPSCR, because there is
no FP stack frame carved.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In FP Sharing mode we enable both automatic and lazy state
preservation of the FP context. This configuration improves
interrupt latency. Under this configuration the FP registers
will only be stacked when the thread is swapped out during
context-switch. Before jumping to main() we clear the FPCA
flag of the CONTROL register, so the FP context can be used
by the main thread.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
on non-XIP system, SRAM is the default region, and relocated .data
section and .bss section of SRAM shouldn't be inserted between
_image_rom_start and _image_rom_end, because the memory region between
_image_rom_start and _image_rom_end will construct the mpu ro region.
Also for the newly added memory region on non-XIP system, the
relocated .text secition and .rodata section should also be mpu aligned.
Fixes: #16090.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit consolidates the temperature conversion into a single
location and subtracts the bias from the measurement using values from
the datasheet. Also magic numbers have been replaced with more
descriptive macros.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
This driver uses magic numbers which are incorrect. A correct conversion
is done using the LSB/g scale factors given by Table 1 in the
specifications section of the ADXL362 (Rev. F) datasheet. The entire
conversion has also been consolidated into a signal function.
The sensitivity and offset of the accelerometer values actually vary
with the supply voltage and temperature. Using datasheet provided values
for 25 C and 2.0 V is the best we can do. Users will need to apply
sensitivity and offset corrections for their application.
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
The return code check and error return on the interrupt register
configuration function call should be included in the #if defined
region.
Fixes#16159
Signed-off-by: Brett Witherspoon <spoonb@cdspooner.com>
The 'Graphical user interface' menu currently contains just the
'LittlevGL Support' symbol and its indented children.
To remove one menu level, remove the 'Graphical user interface' menu,
rename the symbol to 'LittlevGL GUI library' (consistent with e.g.
'Logging' and 'Bluetooth'), and turn it into a 'menuconfig' symbol.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Drop packet if it has broadcast destination MAC address but the IPv4
destination address is not multicast or broadcast address.
See RFC 1122 ch 3.3.6 for details.
Fixes#16276
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We generated some alias defines for children of a bus in which we had a
path alias for the bus node. We never used these defines, we don't
recommend they get used (child of busses should use instance defines)
and they were only generated in small handful of cases (for dts that had
path aliases to the bus node - i2c or spi).
Remove this as effectively dead code.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
On STM32 series currently available in Zephyr,
LPUART and U(S)ART IPs are similar and share most of their
registers. As a consequence LL API defined for U(S)ART also
applies to LPUART.
This allows to remove specific LPUART code.
Restrict use of LL LPUART API when it diverges from UART one.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The net_if_ipv4_select_src_addr() should return global address
in the interface if nothing else is being found.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Let's filter out on a state parameter.
There is no impact as this function is not used anywhere yet.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
If we receive a multicast ICMPv4 packet, then send the reply back
with correct source address and not with multicast address.
Fixes#16257
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
In all architectures, except x86, __start_swap_time is directly
updated by function read_timer_start_of_swap(), and it shall not
be registered via __temp_start_swap_time.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When Zephyr crashes immediately QEMU reports an error immediately. This
is immediately reported by "make run". Then sanitycheck points the user
at the output of "make run". However the error message(s) are in QEMU's
output which is in a different .log file.
To address this situation point the error message at handler.log
instead of run.log if and only if handler.log is not empty.
To reproduce here's an artificial but very simple crash:
sanitycheck --extra-args=CONFIG_TEST_USERSPACE=n \
-p qemu_x86 -T tests/kernel/mem_protect/stackprot/
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Move includes to outside of the extern "C" statements to fix C linkage
issue.
| /include/misc/util.h:53:1: error: template with C linkage
| template < class T, size_t N >
| ^~~~~~~~
Signed-off-by: Greg S. Woods <gwoods@lexmark.com>
Enable pull-up on UART TX pin to reduce power consumption.
If the board is powered by battery the SoC consumes more
power than expected.
The consumption increases because TX pin is floating
(High-Impedance state of pin B from Dual-Supply Bus Transceiver).
Similar to commit b5b728495b
("boards: reel_board: enable pull-up on UART RX pin")
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Previous version calculated rt_clock_base incorrectly by subtracting
clock_gettime from the specified time. Effectively the following
formula was used.
rt_clock_base := new_time - clock_gettime()
This is clearly incorrect when we consider what should happen if we
call clock_settime with the result of clock_gettime. It ought to be
approximately a no-op, but instead we end up zeroing the clock.
rt_clock_base := clock_gettime() - clock_gettime() = 0
This patch fixes clock_settime by instead using k_uptime_get to
calculate rt_clock_base, like so:
rt_clock_base := new_time - k_uptime_get()
Trying the earlier thought experiment we get:
rt_clock_base := clock_gettime() - k_uptime_get()
Using the definition of clock_gettime this expands to:
rt_clock_base := (rt_clock_base + k_uptime_get()) - k_uptime_get()
The two k_uptime_get() terms cancel out, leaving:
rt_clock_base := rt_clock_base
I.e. the no-op that we expect when calling clock_settime with
the result of clock_gettime.
Note: The bug is only observable when rt_clock_base is non-zero.
So when clock_settime is called for the first time, it will appear
to work correctly since rt_clock_base is initialized to 0.
Signed-off-by: Alexander Mihajlovic <alexander.mihajlovic@endian.se>
I2C support has been added back into the up_squared, leveraging the
new PCIe support in the DesignWare I2C driver.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The Apollo Lake devicetree is augmented with its 8 I2C interfaces.
The default number of dynamic IRQ stubs is increased to deal with
these new interfaces having IRQ vector detection at runtime.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The legacy PCI support in the DesignWare I2C driver is replaced with
the new PCIe support. The Intel Quark X1000 SoC and the galileo board
configurations are updated accordingly.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The 50-odd lines of boilerplate per I2C port is moved into a template
which is generated by CMake as needed at build-time.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The SBL configuration no longer differs in any detail (except its name)
from the "standard" UpSquared configuration, so it is removed.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This needs to be pushed down to the SoC level, as it's an Apollo Lake
feature, not a feature of the UpSquared. Remove the Apollo Lake
references to the PCI devices because these will not be used when I2C
support is restored.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This option is no longer used in the dts_fixup.h file since there
are no SBL-specific fixups.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The second serial port (UART_1) can be used for connecting to
host serial port. This is used for example by PPP (Point-to-Point
Protocol) implementation in which case the pppd running in Linux host
connects to a pty that is linked to UART_1 in Zephyr.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
'west --version' output has the path to the west manifest directory.
If there is a semantic version string in this path name, it will
raise a false version check failure.
Signed-off-by: Thomas Stilwell <Thomas.Stilwell@nordicsemi.no>
The Particle.io Boron is an nRF52840-based board with a connected
u-blox SARA-R4 modem. The main board was previously upstreamed
without modem support.
Now that we have a driver to support the SARA-R4 modem, let's enable
it for the Boron board.
Signed-off-by: Michael Scott <mike@foundries.io>
SparkFun offers an Arduino-R3 compatible shield using the SARA-R410M-02B
LTE Cat M1/NB-IoT modem.
Now, that the basic SARA-R4 modem driver is implemented, let's enable
the shield for several MCUs supporting Arduino-R3 compatible headers.
Product Link:
https://www.sparkfun.com/products/14997
Signed-off-by: Michael Scott <mike@foundries.io>
The u-blox SARA-R4 modem modules are Ultra-compact LTE Cat
M1 / NB1 ready:
- Configurable with a single hardware version
- Flexible mode selection as LTE Cat M1, LTE Cat NB1, EGPRS -
only/preferred
- Low power consumption and longer battery life
- Extended range in buildings, basements, and with NB1,
underground
This driver introduces support for basic AT commands to
query modem information as well as socket connection
for TCP/UDP communication.
Signed-off-by: Michael Scott <mike@foundries.io>
The SARA-R4 series modules from U-Blox are size-optimized LTE-M /
NB-IoT and EGPRS modules designed for low power consumption and
longer battery life.
The binding identifies the UART device, power GPIO and reset GPIO
lines.
Signed-off-by: Michael Scott <mike@foundries.io>
Instead of using the now removed overlay files, use the SHIELD=
command-line option for testing the WNC-M14A2A modem.
Signed-off-by: Michael Scott <mike@foundries.io>
Let's change the specific WNC-M14A2A check into a more generic
MODEM check for enabling ethernet. Many of these pins are used
on the Arduino headers.
Signed-off-by: Michael Scott <mike@foundries.io>
The WNC-M14A2A shield configuration has HW specific settings in place.
We can remove those settings here.
Signed-off-by: Michael Scott <mike@foundries.io>