Commit graph

82 commits

Author SHA1 Message Date
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
Erwan Gouriou 2493030cd3 samples/tfm_integration: Fix warnings in stm32 boards overlays
Unit name should not have leading 0s.
Unit name should not use caps.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-03-30 19:19:59 +02:00
Øyvind Rønningstad 6fa608b191 modules: tf-m: Add zephyr native NS interface and logging function
To allow using TFM NS interface without enabling
CMSIS_RTOS V2 support. And to allow using TFM NS
code that uses logging.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
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
Øyvind Rønningstad 41eedf8ae5 tfm: Adapt to changes upstream
Rename lib.
Disable AUDIT_LOG in regression sample because of a bug upstream.
Update stm32l562e_dk_ns overlay.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-03-26 09:32:56 +01: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 c4bedf30cc samples: tfm integration: rename qemu targets after refactor
Now that we have consolidated tf-m signing, the combined
binary is always named tfm_merged, so we need to modify
the QEMU targets in the tfm-integration samples.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-21 18:44:18 +03:00
Ioannis Glaropoulos 2573f4b99c tests: remove nrf5340 PDK boards from test .yml files
Remove references to the nRF5340 PDK boards
from samples and tests .yml files.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2021-02-15 07:59:43 -05:00
Øyvind Rønningstad b49292634f tfm_ipc: Fix regex in sample.yml
Remove missing printout, and add the last line of printout.

Note that it's not possible to run this on hardware using Twister as of
now, since west flash will not flash tfm_s.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-03 11:07:30 -05:00
Øyvind Rønningstad 25bc05e174 tfm_integration: Add tfm tag in sample.yml
To easily differentiate the samples.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2021-02-03 11:07:30 -05:00
David Vincze 79cac4e58d arm: V2M Musca-S1: Add Musca-S1 SoC and board support
Musca-S1 is a Cortex-M33 based SoC. It's similar to the
Musca-B1, but among other things the embedded flash has
been replaced with embedded MRAM (eMRAM) memory.

The Musca-S1 files have been created based on the Musca-B1
SoC and board files.

Add the Musca-S1 board to the list of allowed platforms
for the TF-M integration examples.

Change-Id: I4f517d28d0a5b8c4a3fc3fab73adb5519acfc3c2
Signed-off-by: David Vincze <david.vincze@linaro.org>
2020-12-20 13:03:49 -05:00
Ioannis Glaropoulos 859d269182 samples: tfm_integration: remove DTS overlays for nRF5340
Remove the DTS overlay files for nRF5340 DK and PDK,
since the SRAM partition changes are matching the
default SRAM partitioning in these boards.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-12-11 11:23:26 +01:00
Andrei Gansari 42523a39e3 samples: tfm_integration: lpc55s69 documentation
Update sample documentations to reflect the new way to flash
lpcxpresso55s69 boards with TFM.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-12-04 15:06:56 +02:00
Øyvind Rønningstad a28da5118d tfm: Configure TFM via Kconfig instead of Cmake
Add Kconfig options that will be used by the module
to call the function with the desired parameters.
Refactor the tfm_integration samples and
the supported boards.

Update west.yml to bring in Cmake changes that use the new KConfigs.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-17 14:39:52 +02:00
Øyvind Rønningstad cb3ec9d759 Kconfig.tfm: Improvements and fixes
Make it easier to add TF-M in an app by selecting and implying the
necessary configs so the app doesn't have to specify the configs itself.
Remove unneeded configs from the prj.conf files in the tfm samples.

Also, fix case in key file name.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2020-11-13 21:23:57 +02:00
Ioannis Glaropoulos 4d536647e1 samples: tfm_integration: support TF-M samples on nRF5340 DK
Add support for nRF5340 DK in the TF-M integration
samples (nrf5340dk_nrf5340_cpuappns build target).
Add the required DTS overlays needed for the samples
to build and run successfully.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-11-13 16:09:04 +01:00
Ioannis Glaropoulos 966015f503 samples: tfm_integration: tfm_ipc: add nucleo_l552ze_q_ns to the list
Add nucleo_l552ze_q_ns board to the allowed list of platforms
for the tfm_ipc sample. This allows the sample to be built for
the nucleo_l552ze_q_ns platform by sanity check.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos a814f47c0c samples: tfm_integration: fix build & flash guides for all platforms
Add documentation on how to build and run the TF-M integration
samples on nRF platforms.

The arm-none-eabi-gcc does not need to be on the PATH anymore
for building and running the tfm_ipc sample on nucleo so remove
the note from the sample docs.

Fix some paths for TFM binaries for the LPC board as well.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos 5e4902d505 samples: tfm_integration: tfm_ipc: adapt nucleo_l552ze_q_ns overlay
This commit adapts the DTS overlay for nucleo_l552ze_q_ns
board, to comply with the changes applied in the flash
layout of the TF-M build.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos 7e82dba130 samples: tfm_integration: adapt CMakeLists.txt to new TF-M build system
Changes required in TF-M integration samples CMakeLists.txt
files due to the new upstream TF-M build system. In brief,
configuration related to PSA API (IPC), Regression, and
Isolation level needs to be passed, now, directly, not
via invoking a given TF-M CMake configuration.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos eea78b1ea9 boards: arm: Add support for TF-M in nRF9160 DK
Adding support for TF-M in the Nordic nRF9160 DK.
Allow the TF-M integration samples to be built and
executed for nRF9160 DK.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos e2dc8982be boards: arm: Add support for TF-M in nRF5340 PDK
Adding support for TF-M in the Nordic nRF5340
Application MCU.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Ioannis Glaropoulos c9fd62a2ea boards: arm: update board definitions due to new TF-M build system
TF-M related information in the relevant board definitions
needs to be updated in the wake of the new TF-M Build
system.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-19 21:08:34 +02:00
Erwan Gouriou ee3dab3082 boards: nucleo_l552ze_q_ns: Use dts flash partitioning.
Provide device tree flash partition in order to configure
and flash non secure binary.
Flash partitioning depends on TFM configuration and use case,
so it is provided as an overlay in the sample it is used.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2020-10-01 15:43:28 +02:00
Andrei Gansari 217560d8e1 samples: tfm_integration: BL2 configurable
Make BL2 configurable via Kconfig.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Andrei Gansari b8b31f9a76 samples: tfm_integration: lpc55s69 support
Adds documentation on how to run TFM samples on LPCxpresso55S69 board.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Andrei Gansari 097125f469 samples: tfm_integration: BL2 configuration
Configure build variable BL2 depending on board configuration. BL2 is
set to True by default. BL2 enabled building TFM with MCUboot.

Signed-off-by: Andrei Gansari <andrei.gansari@nxp.com>
2020-09-04 10:36:42 -05:00
Anas Nashif dca317c730 sanitycheck: inclusive language
change whitelist -> allow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-08-27 07:04:07 -04:00
Nolwenn Violette fb88b0aafc sample: tfm_ipc: Add nucleo_l552ze_q support
This commit adds the signing commands and the configuration required
to build a non secure image for a nucleo_l552ze_q.

Signed-off-by: Nolwenn Violette <nolwenn.violette01@st.com>
2020-08-27 12:02:16 +02:00
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Marc Herbert 2cd51a33ce samples: make find_package(Zephyr...) REQUIRED
This provides a better error message when building with CMake and
forgetting ZEPHYR_BASE or not registering Zephyr in the CMake package
registry. See parent commit for more details (split from parent for
better readability).

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2020-05-29 10:47:25 +02:00
Karl Zhang b3e7867214 samples: tfm_integration: Add TFM IPC sample app
This commit adds a minimal sample application showing how
TF-M can be used in IPC mode, with Zephyr providing the
non-secure processing environment image, and linking against
the PSA APIs implemented in TF-M.

This commit also include work from the commit quoted below,
which is included here for attribution purposes:

    tfm_ipc: cmake: now using tfm_ipc library created by TF-M module

    This commit removes the need for local knowledge of the TF-M
    repository structure and files.

    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>

Signed-off-by: Karl Zhang <karl.zhang@linaro.org>
2020-05-09 16:21:51 +02:00