Commit c7fec71193 ("mgmt/osdp: Add length checks for commands and
replies") attempted to remove code duplication by adding a macro to perform
a length check. At the time, a CI linter did not like macros with control
flow so the code was switched to a method which called __ASSERT() on this
condition.
The __ASSERT() macro is a nop if CONFIG_ASSERT=n (which is the default) and
causes the buffer access to be unguarded which may lead to OOB accesses.
This patch fixes the issue by reintroducing the if check.
Fixes: c7fec71193.
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
Add MCUBOOT_IMGTOOL_OVERWRITE_ONLY Kconfig option which
passes the --overwrite-only option to imgtool to avoid
adding the swap status area size when calculating overflow.
It is used by non-swap update modes.
Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
Add a simple existence check that pthread_atfork() has
some kind of implementation. The function is mandatory
by all conforming POSIX systems.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Mark pthread_atfork() as supported in the documentation.
This option is a mandatory requirement (i.e. it must be present)
even when calling it produces undefined behaviour. That is the
case here, and documentation sbould be updated to reflect that.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
pthread_atfork() is required by the POSIX_THREADS_BASE
Option Group as detailed in Section E.1 of IEEE-1003.1-2017.
The POSIX_THREADS_BASE Option Group is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise
mandatory for any POSIX conforming system as per Section
A.2.1.3 of IEEE-1003-1.2017.
Since Zephyr does not yet support processes and (by extension)
fork(), this implementation includes a deviation and should be
categorized as producing undefined behaviour.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Revise the structure of the POSIX API docs. This separates
related items out to dedicated pages. Further improvements
could yet be made - e.g. using the 'collapse' feature to
expand and collapse large sections of text or tables.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
These are not needed and are now causing build errors since the
pm_device calls are always there and need the header to become a no-op.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fixes an issue whereby a board revision is 0 and the overlay file
exists but would not be included
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Zbus uses mutexes internally that are available
only when MULTITHREADING is enabled so add
it to fix the following error:
/opt/zephyr-sdk-0.16.3/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/
12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/subsys/
zbus/libsubsys__zbus.a(zbus.c.obj): in function `k_mutex_init':
/builds/zephyr/mcuboot/zephyr/include/generated/syscalls/kernel.h:969:
undefined reference to `z_impl_k_mutex_init'
Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
The pm_policy_state_lock_put and pm_policy_state_lock_put functions
already become a no-op if CONFIG_PM is not enabled. Drop the guards
around it in few different drivers.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Update Zephyr fork of MCUboot to revision:
47b34362552835621bc289d53d2127691088cb7c
Brings following Zephyr relevant fixes:
- 47b34362 zephyr: kconfig: Prevent MBEDTLS selection when
tinycrypt is used
- cd82f8bf boot: zephyr: add support for lpcxpresso55s28
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Prevents allowing the user to enter a signing key when the signing
mode is set to hash check only without signatures
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fixes wrongly setting configuration to generate an unsigned image
in the MCUboot configuration when this does not apply to MCUboot
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Added modifications to support async apis for ns16550
on RPL-s using LPSS DMA.
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
Adding myself as a collaborator on ARM arch so that I can help maintain
the aarch32 cortex-a/r codes.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Due to a typo it is not possible to select the main oscillator (MOSC) as a
clock source for an RA Microcontroller. This patch resolves the issue.
Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
Secondary dsp is idle and waiting for interrupt before it is totally
halted. The other active cores can trigger idc interrupt to this core,
this can wake it up and result to fw panic. Mask idc interrupt as timer
interrupt to prevent this case.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This header file declares the functions that rely on `bluetooth/conn.h`.
This collects `testlib/connect.h`, `conn_ref.h` and `conn_wait.h` into one.
Initial documentation for the functions in this file is also added.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This patch fixes the include of `atomic_builtin.h` and `atomic_arch.h`
so that they are IWYU. This mean they compile correctly independent of
other includes at the include-site. It was nessessary to move the
definition of the atomic types out of `atomic.h` to avoid unsatifiable
circular dependencies between `atomic.h` and `atomic_builtin.h`, as well
as definition conflicts between `atomic_arch.h` and `atomic_builtin.h`.
The definition of the type was to moved to a new file `atomic_types.h`.
The include in `atomic.h` has a IWYU pragma which will preserve
backwards compatibility with code expecting the types to be defined in
`atomic.h` if we start linting for IWYU.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This add regulator driver for Smartbond DA1469X SOC.
Driver can control VDD, V14, V18, V18P, V30 rails,
full voltage range supported by SOC is covered.
For VDD, V14, V18, V18P DCDC can be configured.
Special VDD_CLAMP (always on) and VDD_SLEPP are added
to allow configuration of VDD in sleep modes.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Improved the updates to the name ID metadata (NVS_NAMECNT_ID) item
in the Settings NVS backend implementation. The improvements should
make the implementation more robust in handling edge cases such as:
power downs, resets or a case in which the storage partition is
full. In the last case, the NVS backend could return an ENOSPC error
in the context of the settings_delete API. This change also fixes
this issue.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
This is called already as soon as the polling thread starts, so the call
in the gpio init function is harmless but redundant, drop it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
When the matrix is connected to consecutive pins on the same port, it's
possible to read the whole row or set the whole column in a single
operation. For the column, this is only possible if the matrix is
configured for driving unselected column, as there's no API to configure
multiple pins at the same time at the moment.
This is more efficient than checking the pins individually, and it's
particularly useful if the row or columns are driven from a GPIO port
expander.
Add some code to detect the condition and enable it automatically as
long as the hw configuration supports it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add an option to drive inactive columns to inactive state rather than
high impedance. This is useful if the matrix has isolation diodes for
every key, as it allows the matrix to stabilize faster and the API for
changing the pin value is more efficient than the one to change the pin
configuration.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Only RTC can be used as the idle timer for cortex-m systick. Set the
chosen node as RTC by default.
The idle timer will be enabled only if PM management is set.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Allow enabling the Cortex-m idle timer only if power management is set.
It doesn't make sense to use an idle timer without PM.
It allows adding the idle timer chosen node to dts without enabling the
idle timer by default. Now, the PM config has to be set as well.
Signed-off-by: Dawid Niedzwiecki <dawidn@google.com>
Fixes and issue with a variable that has been renamed but whose
reference in the source file has not
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Implement test cases:
LightweightM2M-1.1-int-303 - Cancel observations using Observe with
Cancel parameter
LightweightM2M-1.1-int-305 - Cancel Observation-Composite Operation
Modify existing Leshan API to passive_cancel().
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Test case:
LightweightM2M-1.1-int-235 - Read-Composite Operation on root path
is now working as Leshan added a support for reading the root path.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Implement write and remove attributes command for Leshan.
Remove all written attributes at the end of test, so it won't
affect the next test case.
Remove skip marks from testcase that is fixed on Leshan side.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim
And add native_sim as default test platform
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This pointers need to be writable by the power management code,
but were declared as const, resulting in a fault
for platforms which prevent writing to RAM containing const
values.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>