This file is currently IA32-specific, so it is moved and the
reference to it at the arch-independent layer is moved.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This file is 32-bit specific, so it is moved into the ia32/ directory
and references to it are updated accordingly.
Also, SP_ARG* definitions are no longer used, so they are removed.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
Eliminate definitions for MSRs that we don't use. Centralize the
definitions for the MSRs that we do use, including their fields.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
This pattern exists in both the include/arch/x86 and arch/x86/include
trees. This indirection is historic and unnecessary, as all supported
toolchains for x86 support gas/gcc-style inline assembly.
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
z_arm_do_syscall is executing in privileged mode. This implies
that we shall not be allowed to use the thread's default
unprivileged stack, (i.e push to or pop from it), to avoid any
possible stack corruptions.
Note that since we execute in PRIV mode and no MPU guard or
PSPLIM register is guarding the end of the default stack, we
won't be able to detect any stack overflows.
This commit implement the above change, by forcing
z_arm_do_syscall() to FIRST switch to privileged
stack and then do all the preparations to execute
the system call.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
We need to correct the inline comment in swap_helper.S,
which is suggesting that system call attempts with
invalid syscall IDs (i.e. above the limit) do not force
the CPU to elevate privileges. This is in fact not true,
since the execution flow moves into valid syscall ID
handling.
In other words, all we do for system calls with invalid
ID numbers is to treat them as valid syscalls with the
K_SYSCALL_BAD ID value.
We fix the inline documentation to reflect the actual
execution flow.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
System call arguments are indexed from 1 to 6, so arg0
is corrected to arg1 in two occasions. In addition, the
ARM function for system calls is now called z_arm_do_syscall,
so we update the inline comment in __svc handler.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
The IPC peripheral is missing from the list of
supported HW for nRF9160, so this commit adds
that.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
target_sources() documentation states:
Relative source file paths are interpreted as being relative to the
current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR).
Remove spurious code duplicating cmake's behaviour. It proved to be a
time-consuming red herring while debugging some path-related issue and
"less is more".
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit changes the TX priority from ID based priority to
chronological order. The advantage is that when messages with
the same ID are sent, the order is retained.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Removed the STM32 CAN_Init function and implemented the initialization
in the driver.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
So the time used to run boards which use the BinaryHandler can be
reported, record the time used from spawning the process until
it finnishes or is killed.
The BinaryHandler is used by the "native" boards, unit tests,
nsim and Renode.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The AN521 is a Soft Macro Model implementation of the SSE-200 subsystem
with SIE-200 and CMSDK components targeting the MPS2+ board. The
SSE-200 subsystem implements two Cortex-M33 cores.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
Recursive make should be invoked as $(MAKE) and not "make" for reasons
documented at
https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
$(MAKE) is what CMake puts in all the CMakeFiles/Makefile2 it generates,
it doesn't use "make" either.
Issue found thanks to the following warning:
build.log:make[4]: warning: jobserver unavailable: using -j1.
Add '+' to parent make rule.
If CMake is invoked with -GNinja or other then fall back on "make" as
before and pray that it's available.
Fast reproduction with:
make -j2 -C build clean mylib_project VERBOSE=1
Build directories have been compared before/after this change and
there's zero difference except the generated
mylib_project.dir/build.make file (and the warning above) when using
make.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fix an issue in the gatt_register routine where removing a service and
adding it again would cause the database to have non-ascending
orderdered handles numbers and lead to an incomplete service discovery.
Fix: Go through the database and look for a place where to insert
the new service.
Signed-off-by: Arthur Crepin-Leblond <arthur.crepin@proglove.de>
Adding Health Thermometer Service sample. Refer to Health Thermometer
Profile Specification for detailed information about the Health
Thermometer Profile.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
We use the following commands to rename any
LED._GPIO_{CONTROLLER,PIN,FLAGS} to
DT_ALIAS_LED._GPIOS_{CONTROLLER,PIN,FLAGS}
git grep -l LED._GPIO_CONTROLLER | xargs sed -i 's/LED\(.\)_GPIO_CONTROLLER/DT_ALIAS_LED\1_GPIOS_CONTROLLER/g'
git grep -l LED._GPIO_PIN | xargs sed -i 's/LED\(.\)_GPIO_PIN/DT_ALIAS_LED\1_GPIOS_PIN/g'
git grep -l LED._GPIO_FLAGS | xargs sed -i 's/LED\(.\)_GPIO_FLAGS/DT_ALIAS_LED\1_GPIOS_FLAGS/g'
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Extended clock configuration to allow usage of external clock
source for nrf52 series.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Support for external LF clock source for nrf52811 was missing.
This is a temporary fix until it is replaced with new version of
nrfx which will contain the fix.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Check return value of net_if_ipv6_get_ll() before accessing it.
Coverity-CID: 199437
Fixes#17201
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Previously we always used the board identifier (via CONFIG_BOARD) as
identifier, however this causes troubles in case of tests with multiple
boards of the same kind on the same server. The device_id addresses that
problem nicely if enabled and supported by the architecture.
Signed-off-by: Daniel Egger <daniel@eggers-club.de>
Renames the "Blueooth Controller Assertion Handler" to "Application
Defined Assertion Handler" to better fit the purpose of the Kconfig
option.
Signed-off-by: Thomas Stenersen <thomas.stenersen@nordicsemi.no>
Start es-wifi TCP server on accept.
An asynchronous (spi) message is received on client connection.
Only one connection is supported at a time.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
In order to prevent potential deadlock in various callbacks such as
accept, recv, etc... Add support for nested eswifi locking, allowing
callee to safely access back to the eswifi methods.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
The eswifi controller can generate events via asynchronous messages
which can be polled via the 'MR\r' command. The messages will have a
Start Of Message Asynchronous [SOMA] and End Of Message Asynchronous
[EOMA] delimiters.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
This mechanism had multiple problems:
- Missing parameter documentation strings.
- Multiple calls to k_thread_name_set() from user
mode would leak memory, since the copied string was never
freed
- k_thread_name_get() returns memory to user mode
with no guarantees on whether user mode can actually
read it; in the case where the string was in thread
resource pool memory (which happens when k_thread_name_set()
is called from user mode) it would never be readable.
- There was no test case coverage for these functions
from user mode.
To properly fix this, thread objects now have a buffer region
reserved specifically for the thread name. Setting the thread
name copies the string into the buffer. Getting the thread name
with k_thread_name_get() still returns a pointer, but the
system call has been removed. A new API k_thread_name_copy()
is introduced to copy the thread name into a destination buffer,
and a system call has been provided for that instead.
We now have full test case coverge for these APIs in both user
and supervisor mode.
Some of the code has been cleaned up to place system call
handler functions in proximity with their implementations.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If the offset within the thread struct to the
ARC arch-specific 'relinquish_cause' member is too
large, ld_s instructions referencing it will not
compile. This happens easily if CONFIG_THREAD_NAME
reserves a name buffer within the thread struct, since
all the arch-specific members come last.
Use the regular 'ld' instruction instead.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
On some STM32 series, I2C HAL defines I2C_SPEED_STANDARD and
I2C_SPEED_FAST. These definitions conflict with Zephyr I2C API.
Since Zephyr I2C STM32 driver uses LL API, we can disable I2C HAL.
Disable I2C HAL for L1 and F2 series. Deactivation is already done
2 other impacted series F1 and F4.
Additionally, on F1 series, add the commented definition line to
make the change more visible.
Requires https://github.com/zephyrproject-rtos/hal_stm32/pull/16
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This test uses ztest, there is no need to set this and it
was breaking builds with CONFIG_COVERAGE=y
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Test AF_NET_MGMT API getsockopt() and setsockopt() functions that
they work properly when called from kernel or from userspace.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently only setting and getting of Ethernet Qav options are
supported via this interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print IP address for added or removed IP address. This helps
to understand what IP address is being removed or added.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>