Most arch's CMakeLists.txt contain rules to add compiler and linker
flags for coverage if CONFIG_COVERAGE is enabled, but 4 of them were
missing this.
Instead, set the coverage flags in arch/common/CMakeLists.txt which
affects all archs.
Signed-off-by: Jeremy Bettis <jbettis@chromium.org>
Essential type of RHS operand (64 bit) is wider than essential
type of composite expression in LHS operand (32 bit).
LHS entry_val is 32 bit, and RHS (phys+offset) is 64 bit.
Cast RHS composite expression to the (pentry_t) type.
Found as a coding guideline violation (MISRA R10.7) by static
coding scanning tool.
Signed-off-by: Maksim Masalski <maksim.masalski@intel.com>
NPCX7 variants allocate code RAM either at 0x10070000 or 0x10090000.
The MPU requires addresses and region sizes to be aligned, so the
generic cortex_m/arm_mpu_regions.c results in an ineffective setup with
the addresses above.
This adds a custom mpu_regions setup for the npcx7, which covers both
available sizes, resulting in these two possible setups:
- 192kB devices
Code ram: 0x10090000 to 0x100bffff
MPU region: 0x10080000 to 0x100bffff (256k)
- 320kB devices
Code ram: 0x10070000 to 0x100bffff
MPU region 0: 0x10040000 to 0x1007ffff (256k)
MPU region 1: 0x10080000 to 0x100bffff (256k)
In both cases MPU data RAM setting is from 0x200c0000 to 0x200cffff,
matching the generic Cortex-m setup.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This aligns provisioner and provisionee APIs in terms of endianess
of public key provided by an application.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit allows an unprovisioned device to exchange its public key
using out-of-band techology (see MeshPRFv1.0.1, table 5.19 and section
5.4.2.3).
For in-band public key exchange, the mesh stack uses HCI commands to
generate public and private keys, and DH key. This, however, doesn't
work for OOB public key exchange since there is no command to generate
DH key with a private key provided by an application. Therefore, this
commit adds direct usage of TinyCrypto into the mesh stack for DH key
generation for OOB public key support.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Moving the key check after checking that no pairing or encryption
procedure is started fixes a race condition that is seen in some PTS
tests:
GATT/CL/GAR/BI-04-C
GATT/CL/GAR/BI-16-C
GATT/CL/GAR/BI-21-C
GATT/CL/GAW/BI-05-C
GATT/CL/GAW/BI-12-C
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Add GPIO_flag values for GPIO DTS creation that
allows for pins that do not use the default
voltage. IT8xxx2 supports setting voltage
levels for each pin. The default for this SoC
is 3P3 but they can be set individually to
1P8.
This will be used, for example:
i2c_c_scl {
gpios = <&gpioc 1 (GPIO_INPUT | GPIO_VOLTAGE_1P8)>;
enum-name = "GPIO_I2C_C_SCL";
label = "I2C_C_SCL";
};
Signed-off-by: Denis Brockus <dbrockus@google.com>
This commit provides implementations for the reset cause
API functions as part of hwinfo.
Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
This commit enables DAC sample application to build and run on
stm32f3_disco platform. Updated documentation.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This commit enables dac_loopback to build and run on stm32f3_disco
platform.
This has been tested with twister and also as a standalone
dac_loopback test and is working as expected.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This commit enables test_dac to build and run on stm32f3_disco
platform.
This has been tested with twister and also as a standalone test_dac
test and is working as expected.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
This commit adds DAC1 support in dtsi for stm32f3 series. Some
stm32f3 series has DAC2 so adding the same where applicable.
Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
Remove useless definiton STM32F7X_SECTOR_MASK and use CMSIS instead.
By the way fix bug as '|' should be in fact '&',
but thanks to '~' inversion, '|' is now good.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Treat all test_file_* files the same and just explicitly set the header
in the final test_file.txt. This makes the logic the same regardless of
what paths tests are coming from.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
If the local option (-l) was specified we were ignoring the results
of what_changed.py and always setting a "FULL" build. Only explicitly
set a FULL run if we are building for a commit to the tree (local and
PR builds should respect the output of what_changed.py).
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Since we use 'main' now, rename the example comment usage to use
that branch name instead of 'master'.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This sample doesn't do anything interesting and we have
tests/drivers/entropy to can show how to call the API.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch removes duplicated label RISCVv32/64 and replace into
RISCV that has already used in GitHub.
Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Copy back the TX buffer content back into the upper layer
in case of a TX failure.
This is necessary in when frame encryption by the radio driver
is used. The shim layer for the nRF5 driver has a buffer, that
is used by the driver to authenticate and encrypt the frame
in-place. In case of a TX failure, the buffer contents
are propagated back to the upper layer. The upper layer
must use the same secured frame for retransmission.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
The ieee802154_frame_retry will be set by the OpenThread integration
layer in the event of frame retransmission.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
Use the nrf_802154_retransmit_csma_ca_raw and
nrf_802154_retransmit_at_raw API to retry the frame transmission
after a failed attempt.
The retry must be performed only in response to
a nrf_802154_transmit_failed event.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
The ieee802154_frame_retry flag indicates that a transmission
retry is being performed. This flag may be used by the upper layer
to instruct the IEEE802.15.4 driver implementations to not perform
any modifications to the transmitted frame.
This flag should be used only in the event of a previously failed
transmission.
Signed-off-by: Rafał Kuźnia <rafal.kuznia@nordicsemi.no>
During mpu init, we check MSA_frac bits[55:52] and MSA bits[51:48] of
the ID_AA64MMFR0_EL1 register. Currently we only allow 1F to pass the
check. But according to Armv8-R AArch64 manual [1], both 1F and 2F
indicates the processor supports MPU. This commit aims at fixing this.
[1]: https://developer.arm.com/documentation/ddi0600/latest/
Signed-off-by: Jaxson Han <jaxson.han@arm.com>
Recent versions of mypy have learned that the yaml module has type
stubs and the tool is now erroring out when it discovers we import
yaml since the stubs are not involved.
This is breaking CI on unrelated patches; fix it following the
instructions here:
https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Some centrals deal poorly with receiving a security request immediately
after reconnection whenever reconnecting with characteristics that are
notifiable or indicatable and requiring security. In particular,
Android 9 and earlier devices may lose bond information when this
happens, some Microsoft Surface devices will enter an invalid state
and, on top of that, Apple's Bluetooth Low Energy guidelines explicitly
discourage this behavior.
In order to allow interoperability with those devices, make the GATT
automatic security request sending as a peripheral optional by
introducing a new Kconfig option, BT_GATT_AUTO_SEC_REQ.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The README.rst in `samples/tfm_integration/tfm_ipc` was incorrectly
referring to `psa_level_1`. README.rst has been updated to refer to
`tfm_ipc` example.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
The example in folder `samples/tfm_integration/psa_level_1` contains
code that demonstrate usage of PSA crypto APIs in Zephyr rather than the
PSA levels. Therefore renaming the sample as `psa_crypto`.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@linaro.org>
This commit extends the psa_level_1 sample's use of the PSA
Cryptography 1.0 API to demonstrate the following functionality:
- Generate a persistent key (secp256r1)
- Display the public key based on the private key above
- Calculates the SHA256 hash of a payload
- Signs the hash with the persistent key
- Verifies the signature using the public key
- Destroys the key
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
There are a number of platforms that the x_nucleo_eeprma2 eeprom sample
can't build on. Also fix issue with missing include of <mem.h> header
to get DT_SIZE_* macros used by the overlay.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Pull request https://github.com/zephyrproject-rtos/zephyr/pull/24873
marked all the struct devices const.
However, the linker scripts were never updated to actually allocate
the struct devices in ROM. They're still in RAM, so the main benefit
of this work has not been realized.
Fix it.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Now that we've split out the build_all test there are a few left
over files that aren't needed any more.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>