To use this functionality one must now use the native_posix//64
(variant) version. The old hwmv1 compatible name for the board
was left provisionally while all tests in tree were ported.
That being now done, this old name can be removed.
After this change one cannot build anymore
targeting native_posix_64, but must instead build
targeting native_posix/[native]/64.
For twister tests the old name is already not valid.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add devicetree node for the accompanying, ssd1306-based display board
connected to connector P4.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Check if syscalls can be accessed from both kernel and userspace, and if
optimised away ones indeed point to NULL.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This call is used by syscalls machinery, and needs to be available for
extensions that use syscalls on ARM.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
commit 67bb6db3f8 ("syscall: Export all emitted syscalls, enabling
them for extensions") exports all emitted syscalls, however, it does
that only for the `z_mrsh` symbols, effectively only available for
userspace. If an extension running at kernel level tries to use a
syscall, it will fail to load.
This patch fixes that by exposing the `z_impl` symbols instead. However,
this is not as straightforward as the `z_mrsh` ones. As, in their
signatures, they can basically contain any type, it's not just a matter
of emitting `EXPORT_SYMBOL(z_impl_<syscall>)`, as the compiler will
complain about the undefined types. Here, there are a few approaches.
One of them is to have the `EXPORT_SYMBOL` being generated on the same
files where the syscall is implemented - injecting it there would allow
it to access all known symbols. But changing a lot of files is
undesirable, and it was one of the nice points of first patch.
Another one would be to reconstruct - or simply use the absolute path -
for the includes where the syscalls are defined. Reconstruct the paths
seems fragile and I'm not sure using absolute paths is portable.
Finally, the approach used in this patch is to declare, on a different
generated file, all `z_impl_` symbols as `void *` - after all, only the
address (and the name) to the function is relevant to EXPORT_SYMBOL. By
living in an compilation unit that doesn't include any header which
would expose any of the syscalls, there shouldn't be any conflicts. And
to account for the possibility that a syscall is not compiled - due
being configured out via Kconfig - all those symbols are also weak
aliases to a pointer to NULL. This file is then included in
`llext_export.c` (which should naturally not include any conflicting
header).
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Differently from other libraries, which are included whole in the final
Zephyr ELF, libkernel.a itself isn't. Assuming this is intended to
enable optimisations (if it isn't, this patch will break things) - linker
can remove parts of the kernel that are not used by the application.
However, when considering Linkable Loadable Extensions (llext), this
optimisations can be counterproductive: for instance, syscalls that are
not used by the application won't be available for extensions. It won't
matter if someone "EXPORT_SYMBOL" for them, or even try to keep them
using LINKER_KEEP, they'll be gone.
To avoid that, this patches includes, when CONFIG_LLEXT=y, libkernel.a
inside the linker "whole-archive" block. This ends up making it consider
libkernel.a as a library whose all symbols should be kept. Note this
doesn't mean that all symbols will be there - things compiled out via
Kconfig will naturally still be out.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
For zero sized buffers, instead of pointing to a buffer, net_buf->__buf
is NULL. For this reason, when cloning a buffer, the code needs to check
__buf before dereferencing it.
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Update the presentation of the hardware hierarchy description so that it
does not appear to have missing words at the end of the bullet points,
by using a paragraph instead. And tweak the wording slightly.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Adds tests related to the addon flags:
* --enable-ubsan
* --enable-lsan
* --enable-asan
* --enable-valgrind
* --allow-installed-plugin
* --pytest-args
* -x, --extra-args
* extra test args for the binary
Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
When z_test_1cpu_start() is called to ensure that only a single CPU
on an SMP system is available for use in a test, this commit will
ensure that that CPU is the primary CPU--CPU0. This is done because
some timer drivers only have the timer interrupt processed by one CPU.
A bit of a song and dance is performed to achieve this without enabling
the CPU mask/affinity pinning API. If the cpuhold thread is found to
be executing on CPU0, then a new copy of cpuhold thread is created. Once
the new copy is executing (incidentally guaranteed to be on another CPU)
then it informs the original copy and busy waits until it the original
copy is switched out of CPU0. At this point, we can create the next
cpuhold thread to occupy another CPU if needed.
During this song and dance, it is critical that the 'copy' not pend. If
it pends, we can not guarantee which CPU it will execute on when it
unpends. As the cpuhold threads have the highest priority, nothing is
going to cause them to execute on another CPU for as long as they do
not pend.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
The shell is printing "connected" while passing
the wrong password to connect command. If the status
value is 0, then only shell will print "connected."
The wrong password will disconnect the connection
with an unspecified reason code.
If the default value of the unspecified disconnect
reason code is 0, then status will print "connected."
By changing the default value to WIFI_STATUS_CONN_LAST_STATUS,
it will print the correct reason, like a failed request
with reason code.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
The Low Power Flexcomm driver manages the interrupt handling
and provides an API to register interrupt callbacks.
Register the NXP LPSPI interrupt handler.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Update the driver to account for variations in the SDK driver
when it uses the instance number instead of the base address.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
1. Update EDMA driver for version 4
2. The DMAMux module is not always present. Use the
feature define to make this optional.
3. Use the EDMA_SetChannelMux API for SoC's that supports
this feature.
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
Unfortunately this check as it is today is causing trouble, while
not checking too well for what it intended. Let's reduce its scope
until a better solution has been found.
Background:
This check intends to ensure coding guidelines Rules A.4 and A.5
are followed, but how it is implemented it does not work well enough.
1. These rules only apply to the kernel and some other parts of the
embedded codebase respectively, but this check is performed on the
whole tree.
2. This check works under the assumption that any attempt to set
these macros in source files is a violation of these rules, while
this is not necessary the case, as there are legitimate uses for these.
(Specially for _POSIX_C_SOURCE and _XOPEN_SOURCE)
This check also fails to detect these macros being set in cmake files,
so if users are faced with this failure they can trivially bypass it.
Having a CI check which produces too many false positives, while
at the same time being very easy to bypass is not a desirable situation
as that can result in lack of trust for this type of checks,
and an overall tendency to override these CI faults,
and overlooking actual violations of these rules by reviewers.
This check was originally added in
b021dece98
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When iterating over `--arch-root`, `--board-root`, and `--soc-root`,
treat them as collections of absolute paths with no repeats, to ensure
that no input root has to be handled more than once.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Detecting this requires `boards.cmake` being able to handle multi-line
output from `list_boards.py`. Implement a similar line reading loop to
the one used in `hwm_v2.cmake`.
Failing to handle this could result in an incorrectly parsed list of
valid board qualifiers. Here's the expected list for `nrf52_bsim`:
- "native"
and here's what would happen if two copies of that board were found:
- "native\nNAME"
- "nrf52_bsim"
- "native"
Instead of that, there would now be a proper error message listing all
board directories which contain `nrf52_bsim`.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Fixes: #69329
The board name was printed as part of printing board qualifiers because
those was being concatenated in the `board_v2_qualifiers()` method.
Keep the qualifiers separated from the board name and let the caller
concatenate the strings when required.
Completion scripts are also updated to handle the corrected behaviour.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
(cherry picked from commit 66b475a3aa)
It makes more sense that way:
A developer wants to know in order:
- what features we have
- if they are qualified/qualifiable
- how the stack is architected / what parts are where
- how to develop an app
- tools to develop said apps (+ shell)
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
It adds unnecessary noise in the navigation pane.
We don't do this for other chapters (e.g. kernel services don't say
"Kernel Services System Threads" in the title, just "System Threads").
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This page only ever had one section: supported features.
Added links to the relevant sections for each layer.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
The ILimCntl name can be understood as both register name and its field
name. Therefore it is better to change macro name so it contains both
register and field name. Second field of this register will be also
utilized by this driver in the future and new code will be aligned to
this naming convention.
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>
Fix validation of `linear_range_get_index()` results.
The function can resturn both 0 or -ERANGE but -EINVAL is never
returned. Use comparison against 0 to make the validation robust.
Use valid maximum index for the linear range. The 0x0C is reserved
value and should not be used. Therefore replace it with 0x0B.
Signed-off-by: Lukasz Madej <l.madej@grinn-global.com>