When working with coredumps, it is useful to be able to modify base
registers. Adding this capability allows implementing scripts to
inspect backtrace of threads other than current the current thread.
Signed-off-by: Félix Turgeon <felixturgeon@meta.com>
The `SIGNO_WORD_IDX` & `SIGNO_WORD_BIT` macros should have
used its own argument `_signo` instead of `signo`. It didn't
cause and error because the function's argument has `signo`.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The overlay was in the root of the sample folder instead of the boards
folder. This is clearly a mistake.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Rename uhc_dev parameter of USBD_DEVICE_DEFINE macro to udc_dev to
reflect that this is a USB Device Controller device and not a USB Host
Controller device.
Signed-off-by: Abe Kohandel <abe.kohandel@gmail.com>
As pointed out on #57586: `LM75_TRIGGER_GLOBAL_THREAD` can't be enabled
without the int-gpios being present in the DTS node. This commit
requires at least one LM75 instance featuring it, otherwise it won't
work.
Signed-off-by: Luis Ubieda <luisf@croxel.com>
Replace the MMU initialization call with the new MMU re-initialization
API during the core context restore process in the ACE power management
code.
The previous code was directly calling `xtensa_mmu_init()` upon
restoring the core context, which is not appropriate when the MMU
context may have been preserved during low-power states. The new
`xtensa_mmu_reinit()` API is designed to re-establish the MMU context
without overwriting the existing page table, ensuring that any runtime
changes to the MMU configuration are retained.
Changes made in this patch:
- Removed the call to `xtensa_mmu_init()` from the
`_restore_core_context()` function.
- Added a call to `xtensa_mmu_reinit()` after restoring the
miscellaneous registers.
This update aligns the ACE power management code with the correct MMU
handling procedures when recovering from low-power states, as per the
recent changes in the Xtensa MMU support.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch removes definitions of power domains from the ACE30 PTL DTS
file that do not exist in the actual hardware.
The following power domain nodes have been removed:
- 'ml1_domain' with a bit-position of <13>
- 'io3_domain' with a bit-position of <11>
- 'io2_domain' with a bit-position of <10>
These nodes were previously included in the DTS file but do not
correspond to any physical power domain in the ACE30 PTL hardware. Their
presence in the DTS could lead to confusion and misconfiguration, as the
software might attempt to interact with non-existent hardware features.
By removing these nodes, the DTS now accurately reflects the hardware
capabilities of the ACE30 PTL platform, ensuring that the power
management infrastructure within the firmware operates based on the
correct hardware configuration.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Remove the Audio Link Hub (ALH) nodes from the ACE 3.0 PTL DTS file.
This patch cleans up the Device Tree Source (DTS) for the ACE 3.0 PTL
platform by removing the definitions of the ALH DAI nodes. The ALH
interface is not utilized in the ACE 3.0 PTL architecture, making these
nodes redundant.
The following changes are made:
- Deleted the 'alh0' and 'alh1' nodes, which were previously defined
with FIXME comments indicating a problematic modeling of individual
ALH channels/instances using node labels.
This cleanup helps to prevent confusion and potential errors in device
configuration by ensuring that the DTS reflects the actual hardware
capabilities of the ACE 3.0 PTL platform.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Rearrange the power domain entries in the ACE30 PTL device tree source
file to be in ascending order according to their bit positions. This
reordering improves the readability of the device tree source by
grouping power domains logically according to their bit position within
the power management registers.
The changes in this patch include:
- Moving 'ml1_domain' and 'ml0_domain' to their correct positions
according to their bit-position values (13 and 12, respectively).
- Adjusting the order of 'io3_domain', 'io2_domain', 'io1_domain', and
'io0_domain' to reflect their bit positions (11, 10, 9, and 8).
- Placing 'hub_hp_domain' and 'hst_domain' at their new positions
according to their bit-position values (6 and 5).
No functional changes are introduced with this patch. It solely aims to
make the device tree source more intuitive and easier to navigate when
mapping power domains to their respective control bits.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch updates the power control and status register bitfield
definitions in the ACE30 PTL ADSP power management header to match the
documented hardware specifications. The previous definitions contained
discrepancies that did not align with the actual hardware layout,
potentially leading to incorrect assumptions and usage within the
firmware.
Changes made in this patch:
- Renamed 'rsvd0' to 'rsvd4' to accurately represent the reserved bits
starting at bit position 4.
- Removed the 'rsvd6' field, which was incorrectly defined and is not
present in the hardware register layout.
- Adjusted the bit widths for 'ioxpgs' and 'mlpgs' to correctly reflect
the number of bits these fields occupy in the hardware.
- Introduced a new 'rsvd15' field in both 'ace_pwrctl2' and
'ace_pwrsts2' structures to account for the remaining reserved bits,
ensuring the structure sizes accurately represent the full register
width.
By correcting these bitfield definitions, the firmware's power
management code will now be consistent with the actual hardware design,
improving reliability and maintainability of the codebase.
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Recent POSIX changes caused that 3 file descriptors are now preallocated
for stdin/out/err. This caused file descriptor shortage in all-in TLS
configuration of the sample, hence increase the maximum FD count.
In the server sample this manifested itself as an accept() error. This
triggered a busy loop though in the sample, as in case of accept()
errors it'd just try again w/o any delay. This made this issue hard to
investigate, so to avoid such cases in the future, make the accept()
failure fatal in the echo_server sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Echo samples exchange data fragments longer than the default DTLS max
fragment length introduced in commit
f033cd5601. Hence, need to increase this
config value for the sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Commit 3046e95d85 introduced eventfd use
in the sample, increasing the pollfd array size, however the config
indicating maximum number of monitored events remained intact, so the
sample didn't really work.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
lld will produce warnings for the symtab, strtab, and shstrtab sections
if --orphan-handling=warn is specified and there are no matching rules
in the linker script for these sections.
Handle these sections when building with lld to prevent the warnings.
Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
The NRF91_SLM has no additional AT channel for the AT shell to
use. This commit disables the AT shell for boards which use
the NRF91_SLM.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The supported modems don't have the same number or assignment
of DLCI channels. For example, the NRF91_SLM only has DLCI
channel 3 assigned to GNSS tunneling, where the ublox sara r5
has DLCI 3 assigned to an additional AT channel, and DLCI 4
assigned to GNSS tunneling.
This commit updates the creation and assignment of DLCI
channels and pipelinks to match the capabilties of each modem.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/(common, crypto, service, shell).
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/mesh directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/host directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/controller directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the subsys/bluetooth/audio directory.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Update sha for hal_renesas to pull new CMAC library which fixes issue
with invalid setting for sleep clock accuracy. This enables CMAC to work
properly on RCX clock.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This basic guide only covers linting so far. It could be expanded in the
future to be more accurate and detailed. The current configuration
allows to navigate the code but some symbols are not recognized by the
linter, and the native compiler is always used.
Co-authored-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Co-authored-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
Signed-off-by: Luc BEAUFILS <luc.beaufils@savoirfairelinux.com>
This commit fixes compilation warnings that are present when compiling
with CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY as can be seen in this
compiler log:
"""
In file included from /zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/
include/string.h:215,
from /zephyr/subsys/bluetooth/host/smp.c:15:
In function '__memcpy_ichk',
inlined from 'sc_send_public_key' at /zephyr/subsys/bluetooth/host/
smp.c:3006:2:
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
warning: argument 2 null where non-null expected [-Wnonnull]
83 | __ssp_bos_icheck3_restrict(memcpy, void *, const void *)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/ssp/string.h:83:1:
note: in a call to built-in function '__builtin_memcpy'
/zephyr/subsys/bluetooth/host/smp.c: In function 'smp_public_key':
/zephyr/subsys/bluetooth/host/smp.c:4214:21: warning: argument 2
null where non-null expected [-Wnonnull]
4214 | memcmp(smp->pkey, sc_public_key, BT_PUB_KEY_COORD_LEN) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/zephyr-sdk-0.16.1/arm-zephyr-eabi/picolibc/include/string.h:62:10: note:
in a call to function 'memcmp' declared 'nonnull'
62 | int memcmp (const void *, const void *, size_t);
| ^~~~~~
"""
The warning is caused by the potential use of NULL "sc_public_key"
global pointer that is not assigned a value in "smp_init()" if
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled. This commit
conditionally changes the behavior of function "smp_public_key()"
if CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is activated to simply return
and not use the "sc_public_key" variable. Other functions that are not
called anymore by "smp_public_key()" are also conditionally
deactivated when CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY is enabled
Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
Added tabs to the thrift doc so that building works for macos
and is consistent with the rest of the documentation in terms
of one tab per os.
Updated client and server makefiles to discover include paths
for boost and openssl.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
There was an error in calculation of LFXO INTCAP code that prevented
obtaining desired XTAL accuracy below 50PPM. The error was fixed
the accuracy should be within expected range.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The implementation of formula, to calculate HFXO INTCAP code,
had a rounding error. That may lead so small deviation of HFXO
clock accuracy.
The IPS formula uses capacitance values in piko Fartd units.
That requires use of floating point data types. To avoid that
implementation of the formula uses femto Farats (1000 smaller unit).
In the former implementation conversion from femto Farad to piko Farad
was done just after reading of the desired capacitance from DTS.
To make sure the calculations are correct the change of unit must be
done at very end. Also rounding must be applied.
Also the formula was split and more comments were added to make the
implementation clear.
The commit fixes the implementation of the IPS formula.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
There were two errors in calculations of LFXO INTCAP code:
- The value provided by DTS files is internal desired capacitance.
The value from DTS has to be "encoded" before use in INTCAP
calculations formula. The formula for encoding is:
CAPACITANCE_CODE = (<desired_value> - 4pF) / 0.5
Subtract of 4 is related with lowest value in the allowed range.
Division by 0.5 is related with change to steps size.
In former code the subtration of 4pF was missing.
- The mid_val calcuation was wrong due offset_k left shift by 4.
It should be left shift by 3 to get total left shift of 9.
That matches the left shift of former part of the equation.
Final integer value was calculated by right shift 10, it should
be right shift 9. Then rounding was done by use of mod by (1 << 10)
It should be mod by (1 << 9) and compared with (1 << 8), that is
half of 0-512 range.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Remove legacy use of 'test case' and replace with `test scenario` where
applicable.
Update terminology and some other parts of twister docs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a note about the thread priority requirements in the help string of
the Kconfig option enabling net_mgmt sockets.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
net_mgmt sockets do not implement internal queue but use
net_mgmt_event_wait() internally to receive events. As a consequence,
in case of events burst, some events may be lost if the receiving
thread has lower priority than the net_mgmt thread.
This was visible in the sample, where only DAD event was reported
properly, as IPv6 Add/Remove events were triggered in pair with
corresponding multicast events (from solicited-node multicast
address).
We can mitigate this by increasing main thread priority to be at the
same priority as net_mgmt thread, so that the receiving thread (main)
has a chance to run in between event reports.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
- Increase the test coverage of supported platforms.
- Fix test_flash_area_check_int_sha256 for platforms with
flash program size >32. Increase the supported flash program size
to 512 (maximum supported by Zephyr platforms now).
- Fix test_flash_area_get_sectors test for platforms
with maximum number of sectors per image slot >256.
Increase the support value to 1024.
- Fix possible stack size overflow.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Fix a build warning due to the enumerate for the trigger
polarity possibly being (from the point of the compiler)
also GPIO_INT_TRIG_WAKE.
We fix it by simply returning a not valid argument error
which is what most other drivers do if they do something
smart enough.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit introduces the `Microchip RISC-V Platforms` area. This area
coveres the following current Zephyr targets:
* `m2gl025_miv`
* `mpfs_icicle`
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
This commit restores the pre-HWMv2 status of RISC-V boards being covered by
the RISC-V area of maintenance.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The part that says "Always set CONFIG_BOARD here" is outdated. In HWMv2,
CONFIG_BOARD is set by the build system, and we don't want to encourage
users to set it manually.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Clang uses floating-point instructions by default, even if -mfpu is not
defined. Disable using FPU when CONFIG_FPU=n.
Using floating-point instructions when FPU is not enabled generates
Usage Fault.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
When running this test with multiple counter instances enabled that
support different capabilities, if one of the instances does not
support the test required capabilities, the test will be
immediately skipped not giving the chance to run to the subsequent
instances.
Fix this by marking the test as skipped, only of all counter instances
under test were skipped.
Fixes#74358
Signed-off-by: Manuel Argüelles <marguelles.dev@gmail.com>
Modified to check the length of the remaining data in buffer
before processing the next report. The length check is missing
in the cont routine.
Signed-off-by: Eunkyu Lee <mochaccino.00.00@gmail.com>
Fixes and simplifies the handling of how the dts watch file is
processed
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>