Commit graph

21 commits

Author SHA1 Message Date
Ioannis Glaropoulos ce757d5970 modules: tfm: remove redundant if BUILD_WITH_TFM guard in Kconfig
We do not need the if BUILD_WITH_TFM guard in the main
Kconfig file, as the guards are present insude the respective
Kconfig files that are sourced by the main Kconfig.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-11 16:13:57 +02:00
Håkon Øye Amundsen 207f2ab1e6 modules: tf-m: split TF-M configuration in multiple Kconfig files
The TF-M project is higly configurable and we end up having
a growing number of Kconfig option definitions in the main
Kconfig file. This commit splits out the configuration options
for the TF-M partition and for the crypto partition configuration
into separate Kconfig files, for ease of reading. The commit
does not introduce behavioral changes.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-11 16:13:57 +02:00
Håkon Øye Amundsen f8a9e0019c modules: tfm: add option for selecting crypto modules
These are needed to disable not needed crypto modules in
the trusted-firmware-m module.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-06-04 16:21:24 -05:00
Jamie McCrae f4350a9303 boards: arm: Add Laird Connectivity BL5340 DVK platform
This adds initial support for the Laird Connectivity BL5340
development kit hardware

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-05-07 09:06:27 +02:00
Øyvind Rønningstad aed0643705 trusted-firmware-m: Store FP context before entering secure calls
When ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled, if FPU is
being used (CONTROL.FPCA == 1), store all FP registers before
entering the secure function, and restore them afterwards.

This is needed if any NS thread or ISR that interrupts the secure
function uses FP registers. If they do, a secure UsageFault occurs
unless this change is applied.

This allows k_sched_lock() and k_sched_unlock() to be dropped when
ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS is enabled.

Enable ARM_NONSECURE_PREEMPTIBLE_SECURE_CALLS by default when
building TF-M.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-05-05 13:00:31 +02:00
Andreas Vibeto 0cf2753fa3 CMakeLists.txt: Add support for TF-M Non-Secure regression tests
Add new kconfigs
Include the ns-app built by TF-M build system for regression tests
Update tfm_ipc sample to use new kconfig

Signed-off-by: Andreas Vibeto <andreas.vibeto@nordicsemi.no>
2021-04-21 23:18:30 +02:00
Øyvind Rønningstad a0eecfd7f4 tfm: Kconfig: Add configs for PSA tests
Allow adding a PSA test suite to the NS app.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-04-20 16:13:40 +02:00
Ioannis Glaropoulos e75ff8f7fb modules: trusted-firmware-m: fix dependencies for isolation level
Do not allow the TFM_ISOLATION_LEVEL to be non-hidden option,
if the TFM_IPC (PSA_API) option is not set, since, in that case,
only Isolation Level 1 is supported.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-16 13:33:32 +02:00
Ioannis Glaropoulos b80ad4c4b3 modules: tf-m: add TF-M profile choice
We add a Kconfig choice for the TF-M profile, in
TF-M's Kconfig file. The reason for that is to be
able to easily enable additional configurations,
depending on the profile type being selected. We
also enhance the documentation of TFM_PROFILE,
stressing that there is now also profile_large
available as an option. TFM_PROFILE is now made
hidden, forcing the users to select one of the
available choice symbols. IF the TFM_PROFILE is
set to something other than "none", then certain
options shall be made hidden, namely, IPC and
isolation level, as they are determined by the
profile setting.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos 79c1019e85 modules: tf-m: correct dependencies for audit log service
Add a dependency on IPC for the Audit Log secure service,
since the service is not compliant with the IPC model.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos 70272266f7 Revert "modules: tf-m: disable audit log partition with medium profile"
This reverts commit 6da3d7020e7d2a2ac2d1ed1a6ece9dca3c150339.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-04-08 13:26:14 +02:00
Ioannis Glaropoulos edd4ab5bf0 modules: tf-m: disable audit log partition with medium profile
When compiling TF-M with profile_medium, disable the support
for Audit Log due to an upstream bug.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-26 18:35:11 +01:00
Øyvind Rønningstad 869978ab0d tfm: Fix TFM_BOARD for MUSCA_B1
Also add it to tfm_ipc so it is built by CI

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-03-26 11:20:10 -05:00
Yestin Sun 46cab056bc boards: stm32l562e_dk: Enable TF-M IPC application
This commit enables the TF-M IPC sample application on stm32l562e_dk
board.
It provides device tree flash partition as an overlay in order to
configure and flash the bl2, secure/non secure firmwares.

Signed-off-by: Yestin Sun <sunyi0804@gmail.com>
2021-03-18 23:23:39 +01:00
Ioannis Glaropoulos 96b1c33cb9 modules: tf-m: introduce option to configure flash binary
Introduce an option to instruct the build system
to flash the Non-Secure (Zephyr) firmware image
together with the TF-M (Secure) firmware image
as a single merged binary, instead of just flashing
the Non-Secure application.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-03-04 11:26:23 +03:00
Øyvind Rønningstad 5137135ead boards: Consolidate all TFM signing code
Place the new signing code in the TFM module CMakeLists.txt.
Make some small tweaks and add a sentence to the docs.

In the process, make a few changes to the signing code:
- Change some names of files created.
- Minimize the number of files created.
- Use hex files instead of bin files. This is so we don't need to know
  the offset when creating hex files from bin files.

Also add signing for MCUBOOT_IMAGE_NUMBER=1 based on the code from the
v2m_musca_b1 board, though, this board does not build with =1 now
because of (I assume) some flash aliasing which places the S and NS
images 0x10000000 apart, where the manual algorithm places them next to
each other. It builds with =2, though.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-21 18:44:18 +03:00
Øyvind Rønningstad edfaa3998b tfm: Change TFM_BL2 config from a choice to a bool
The choice allowed for using TFM's own default. We now need full
knowledge over whether BL2 is enabled or not (e.g. to do signing),
so remove this option and simplify to a bool.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 19:42:44 +03:00
Håkon Øye Amundsen c097690f2a modules: trusted-firmware-m: add kconfig to enable/disable partitions
Also update tfm module cmake to pass them to the trusted-firmware-m
build system.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-02-17 15:04:58 +03:00
Øyvind Rønningstad b49e395277 Kconfig.tfm: Add TFM_MCUBOOT_IMAGE_NUMBER config
Controlling the number of images in TFM's BL2/mcuboot.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-17 10:07:17 +03:00
Øyvind Rønningstad 5f1610eeff Kconfig.tfm: Add TFM_CMAKE_BUILD_TYPE config
Controlling the build type of the TFM build system.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-16 22:58:49 +03:00
Torsten Rasmussen dfa52a3ba7 module: moving TFM CMakeLists.txt into Zephyr repo
This commit moves TFM CMakeLists.txt into Zephyr and relocates the
Kconfig.tfm file under the modules/tfm folder.

Updates the manifest to point to related TFM changes.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-02-16 10:01:36 +01:00
Renamed from modules/Kconfig.tfm (Browse further)