The PDPT was moved to the stack area since it has alignment
requirements, but never removed from here.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The intel64 switch implementation doesn't actually use a switch handle
per se, just the raw thread struct pointers which get stored into the
handle field. This works fine for normally initialized threads, but
when switching out of a dummy thread at initialization, nothing has
initialized that field and the code was dumping registers into the
bottom of memory through the resulting NULL pointer.
Fix this by skipping the load of the field value and just using an
offset instead to get the struct address, which is actually slightly
faster anyway (a SUB immediate instruction vs. the load).
Actually for extra credit we could even move the switch_handle field
to the top of the thread struct and eliminate the instruction
entirely, though if we did that it's probably worth adding some
conditional code to make the switch_handle field disappear entirely.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Instead, use the QEMU_KERNEL_FILE facility to perform the
change in a new file zephyr-qemu.elf. This is what will
be sent to the emulator.
Fixes an issue where opening zephyr.elf in GDB would treat
it as a 32-bit binary instead of what it actually is,
forcing the user to override the arch setting.
Fixes: #19734
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Unused since commit 0829ddfe9a ("kbuild: Removed KBuild").
This symbol is the only thing in boards/xtensa/xt-sim/Kconfig,
which gets included via
osource "$(BOARD_DIR)/Kconfig"
in boards/Kconfig, so just remove the entire file.
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
We should be adding a compiler barrier for IP and SP
registers when we are doing syscall generation on
ARMv6-M architecture. The syscall generation itself
only does an SVC trigger; the execution returns to
thread mode and ARM does not guarantee that IP
register is preserved, when we finally get back to
the point where the syscall was invoked. The SP
also needs to be preserved for syscalls returning
64-bit results. In that case the r0 may hold a
pointer to the stack where the 64-bit result was
pushed, That is, the stack pointer may have been
changed due to the syscall, and C code needs to
know that.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
For nordic_nrf, this commit relocates HAS_CMSIS_CORE selection from
SoC Kconfig to the HAL module Kconfig, as done for other SoCs.
For nxp_kinetis, remove redundant HAS_CMSIS_CORE selection in SoC
Kconfig, as it is already selected by the HAL Kconfig.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit updates all references to HAS_CMSIS to use HAS_CMSIS_CORE
instead. With the changes introduced to allow multiple CMSIS variants
to be specified, the latter is semantically equivalent to the former.
For more details, see issue #19717.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
The existing implementation used HAS_CMSIS configuration to specify
that CMSIS-Core(M) is used; when, in fact, there are other CMSIS
variants available such as CMSIS-Core(A) and CMSIS-DSP available.
This commit replaces the existing HAS_CMSIS configuration with
HAS_CMSIS_CORE to clarify that CMSIS-Core is used. It also introduces
the CMSIS-Core variant configuration, HAS_CMSIS_CORE_M, that is
automatically selected when HAS_CMSIS_CORE is enabled.
For more details, see issue #19717.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit relocates the CMSIS-Core(M) Include directory that
currently resides directly under ext/hal/cmsis directory to its own
directory, Core, in order to allow other CMSIS variants to be added.
The name of CMSIS-Core(M) directory, Core, is following the original
name used by the upstream CMSIS repository.
For more details, see issue #19717.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Added in commit 2b5b7da9f3 ("subsys: disk: Add support for multiple disk
interfaces"), then never used.
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The CONFIG_* prefix was missing, making the #ifdef always false.
Found with a script (CONFIG_BT_SETTINGS_USE_PRINTK was unused).
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Fix GATT buffer leak when bt_att_send returns error the allocated
buffer is never freed. Discovered case where the link was disconnected
during the function call, so when GATT checkd the link was still
connected, but ATT checkd the link was disconnected.
Fixes: #19889
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Added in commit 1475402d41 ("Bluetooth: controller: Introduce ULL LLL
architecture"), then never used.
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The RAK811 module used on this board incorporates STM32L151CB-A SoC,
which has more RAM (32 KiB) compared to its companion STM32L151CB.
Hence, fix the doc, dts and Kconfig to include correct part number.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
STM32L151XB-A SoC is almost similar to the STM32L151XB SoC except that
it has more RAM (32KiB). Hence add devicetree and Kconfig support.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
In this commit we implement the assembly functions in userspace.S
- z_arm_userspace_enter()
- z_arm_do_syscall()
- z_arch_user_string_nlen()
for ARMv6-M and ARMv8-M Baseline architecture. We "inline" the
implementation for Baseline, along with the Mainline (ARMv7-M)
implementation, i.e. we rework only what is required to build
for Baseline Cortex-M.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
In this commit we implement the assembly functions in
swap_helper.S, namely
- z_arm_pendsv()
- z_arm_svc()
for ARMv6-M and ARMv8-M Baseline architecture. We "inline" the
implementation for Baseline, along with the Mainline (ARMv7-M)
implementation, i.e. we rework only what is required to build
for Baseline Cortex-M.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We do not support HW Stack protection capabilities in
Cortex-M Baseline CPUs (unless they have built-in stack
overflow detection capability). We adapt the Kconfig
option to reflect this.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Remove the inclusion of kernel_includes.h from soc.h and replace
it with including the board-specific auto-generated headers. This
aligns the soc.h header with the current policy not to include
kernel headers in soc.h.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We enable Memory Protection on stm32 nucleo_g071rb board,
since the respective SoC series implements the ARM MPU.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The driver is not specific to 32bit ARM family. For example it is
currently used by the QEMU ARM64 virt machine.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Set threads spawned by BinaryHandler dameon, so when the main thread
exits for some unusual reason (e.g SIGINT) the child threads are
automatically killed.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Work in topic-gpio to convert drivers to properly use devicetree flag
settings requires that these be defined so sanitycheck can find them.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
FLASH_LOAD_SIZE gets its default from the $(dt_chosen_reg_size)
function, which is defined in scripts/kconfig/kconfigfunctions.py.
$(dt_chosen_reg_size) returns a decimal value rather than a hex value.
Previously, FLASH_LOAD_SIZE was declared as hex, which made Kconfiglib
automatically prepend 0x to its value (the same logic is in the C
Kconfig tools). This gave an incorrect size in .config, e.g.
CONFIG_FLASH_LOAD_SIZE=0x374784 where CONFIG_FLASH_LOAD_SIZE=374784 was
intended.
Fix it by changing the type of FLASH_LOAD_SIZE to int. All other symbols
that use $(dt_node_reg_size) and $(dt_chosen_reg_size) are int too
(FLASH_SIZE and SRAM_SIZE, plus BOOTLOADER_SRAM_SIZE is also int).
This has some subtle breakage potential in that FLASH_LOAD_SIZE has a
prompt (is user-configurable in the menuconfig or by changing .config
files). Nothing seems to directly assign in Zephyr at least.
Fixes: #19877
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Seems to have been unused since commit 06e78de681 ("build: do not use
link-zephyr"), committed in 2015.
Discovered with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit switches from using device tree automatically
generated address-based defines to the instance id-based ones.
Without this change it is not be possible to re-use the driver
on boards where the device is located at different location
than 0xe0002800.
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
This commit switches from using device tree automatically
generated address-based defines to the instance id-based ones.
Without this change it is not be possible to re-use the driver
on boards where the timer and uart devices are located at different
locations than 0xe0002800 and 0xe0001800 respectively.
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
This commit switches from using device tree automatically
generated address-based defines to the instance id-based ones.
Without this change it is not be possible to re-use the driver
on boards where the device is located at different location
than 0xe0001800.
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
LWM2M_FIRMWARE_UPDATE_PULL_LOCAL_PORT is unused since commit 54c10c04e5
("net: lwm2m: use security data for connections").
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
After run Sanitycheck script I found out that
some test cases have a same test case name
in the test result .xml file.
For boards mimxrt1050_evk, qemu_x86, sam_e70_xplained
in .xml files that cases were dublicated.
Problem happened only with cases net.dns.no_ipv6.init
and net.dns.init. Only that cases were dublicated.
To solve it, I decided to change test cases names for the dns tests.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
Unused since commit 08f0d93cbb ("shell: Improve handling of log
messages").
Discovered with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Unused since commit d1cb39e7ce ("net: lwm2m: migrate LwM2M library to
BSD-sockets API").
Found with a script.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit enables running the test in CI for nRF51-based
platforms, which require special IRQ lines for the IRQs
used in the test. An additional customization is needed
for QEMU_CORTEX_M0, which uses a different system timer
based on TIMER0 peripheral.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit enables running the test in CI for Cortex-M Baseline
architecture. As STIR register is not present in Baseline cores,
we need a minor modification in the test code so it uses NVIC
intrisics instead of setting the STIR for ARMv6-M.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We do not need to explicitly define the size of the const
array elements for the customized IRQ vector, used in the
test. The compiler should be able to infer the actual size
by counting the provided entries.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This symbol is not user-configurable (has no prompt), so assignments in
prj.conf have no effect on it.
(It has no defaults either, and isn't selected/implied, so nothing in
vanilla Zephyr will ever enable it.)
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Key overwrite feature allows to overwrite old pairing key
records when key storage is full and a new pairing request occurs,
or new keys are distributed. If enabled when key storage is full and
a keys storage slot is requested, the oldest keys added will be
removed. So new devices can be paired with no limitations and no need
to determine, which devices should be unpaired to free key storage
space explicitly in application. To enable the feature set
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y.
Oldest keys are determined by minimum value of up-counting aging
counter. If you set CONFIG_BT_KEYS_SAVE_AGING_COUNTER_ON_PAIRING=y
aging counter values will be updated each time the secure connection
is established. This might increase flash wear out if at least two
secure connections are established and shut down periodically. When
the option disabled aging counter is still updated on each new secure
connection, but not stored to flash.
Signed-off-by: Sergiy Nikolayenko <sergiy_nikolayenko@jabil.com>
The function that initializes interrupts configures the sensor
register to enable interrupts. It is called before the function that
resets the sensor. Swap the order.
Also correct the mask argument to the configuration command, and use
the BIT() macro to construct the set argument.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>