Fixing psa-api-tests by increasing number of assets
cover Fixing psa-api-tests by increasing number of assets
From: Mohamed Omar Asaker <[email protected]>
As Corstone1000 stores at boot time few efi variables. Therefore, number of assets is increased to compansate this early usage.
In order to comply with isolation level 2, SPM backend should be set to IPC. TF-M provides IPC as a SPM backend which gives SPM and each Secure Partition it's own execution context. And provides higher isolation levels.
Mohamed Omar Asaker (2):
arm-bsp/trusted-firmware-m:corstone1000: Increase number of assets arm-bsp/trusted-firmware-m:corstone1000: Set SPM backend to IPC
...rstone1000-Increase-number-of-assets.patch | 38 +++++++++++++++++++ .../trusted-firmware-m-1.7.0-corstone1000.inc | 8 ++++ 2 files changed, 46 insertions(+) create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-Increase-number-of-assets.patch
Signature · 1 line
2.25.1
PATCH 1/2 arm-bsp/trusted-firmware-m:corstone1000: Increase number of assets
From: Mohamed Omar Asaker <[email protected]>
As Corstone1000 stores at boot time few efi variables. Therefore, number of assets is increased to compansate this early usage.
Note: Adding platform customized configs to config_tfm.h
More information see:
https://tf-m-user-guide.trustedfirmware.org/configuration/header_file_system.html
--- ...rstone1000-Increase-number-of-assets.patch | 38 +++++++++++++++++++ .../trusted-firmware-m-1.7.0-corstone1000.inc | 5 +++ 2 files changed, 43 insertions(+) create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-Increase-number-of-assets.patch
meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/corstone1000/0001-Platform-corstone1000-Increase-number-of-assets.patch new file +38 -0
@@ -0,0 +1,38 @@ +From decb355247c4ba4b876997f55c27ec3f55dbacd2 Mon Sep 17 00:00:00 2001 +From: Mohamed Omar Asaker <[email protected]> +Date: Mon, 23 Jan 2023 13:25:28 +0000 +Subject: [PATCH] Platform: corstone1000: Increase number of assets + +As Corstone1000 stores at boot time few efi variables. +Therefore, number of assets is increased to compansate this early usage. + +Note: Adding platform customized configs to config_tfm.h + More information see: +https://tf-m-user-guide.trustedfirmware.org/configuration/header_file_system.html + +Signed-off-by: Mohamed Omar Asaker <[email protected]> +Upstream-Status: Pending [Not submitted yet] +--- + platform/ext/target/arm/corstone1000/config_tfm_target.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/platform/ext/target/arm/corstone1000/config_tfm_target.h b/platform/ext/target/arm/corstone1000/config_tfm_target.h +index bf8d2f95f7..e968366639 100644 +--- a/platform/ext/target/arm/corstone1000/config_tfm_target.h ++++ b/platform/ext/target/arm/corstone1000/config_tfm_target.h +@@ -16,4 +16,12 @@ + #undef PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE + #define PLATFORM_SERVICE_OUTPUT_BUFFER_SIZE 256 + ++/* The maximum number of assets to be stored in the Internal Trusted Storage. */ ++#undef ITS_NUM_ASSETS ++#define ITS_NUM_ASSETS 20 ++ ++/* The maximum number of assets to be stored in the Protected Storage area. */ ++#undef PS_NUM_ASSETS ++#define PS_NUM_ASSETS 20 ++ + #endif /* __CONFIG_TFM_TARGET_H__ */ +-- +2.25.1 +
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-1.7.0-corstone1000.inc +5 -0
@@ -26,6 +26,11 @@ SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d" EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${S}/../openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" +SRC_URI:append= " \ + file://0001-Platform-corstone1000-Increase-number-of-assets.patch \ + " + do_install() { install -D -p -m 0644 ${B}/install/outputs/tfm_s_signed.bin ${D}/firmware/tfm_s_signed.bin install -D -p -m 0644 ${B}/install/outputs/bl2_signed.bin ${D}/firmware/bl2_signed.bin
Signature · 1 line
2.25.1
PATCH 2/2 arm-bsp/trusted-firmware-m:corstone1000: Set SPM backend to IPC
In reply to [email protected]From: Mohamed Omar Asaker <[email protected]>
TF-M provides IPC as a SPM backend which gives SPM and each Secure Partition it's own execution context. And provides higher isolation levels.
corstone1000 isolation level is 2. Hence, switching to IPC backend.
--- .../trusted-firmware-m-1.7.0-corstone1000.inc | 3 +++ 1 file changed, 3 insertions(+)
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-1.7.0-corstone1000.inc +3 -0
@@ -11,6 +11,9 @@ TFM_PLATFORM_IS_FVP ?= "FALSE" EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}" EXTRA_OECMAKE += "-DCC312_LEGACY_DRIVER_API_ENABLED=OFF" +## Setting SPM backend to IPC +EXTRA_OECMAKE += "-DCONFIG_TFM_SPM_BACKEND=IPC" + # libmetal LICENSE += "& BSD-3-Clause" LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c"
Signature · 1 line
2.25.1
Jon Mason
AppliedQuoted 8 lines · On Tue, 21 Feb 2023 17:51:27 +0000, [email protected] wrote:
As Corstone1000 stores at boot time few efi variables. Therefore, number of assets is increased to compansate this early usage.
In order to comply with isolation level 2, SPM backend should be set to IPC. TF-M provides IPC as a SPM backend which gives SPM and each Secure Partition it's own execution context. And provides higher isolation levels.
[...]
Applied, thanks!
[1/2] arm-bsp/trusted-firmware-m:corstone1000: Increase number of assets
commit: b3ac88b4e83f542099a8731535e382888e0aa1b4
[2/2] arm-bsp/trusted-firmware-m:corstone1000: Set SPM backend to IPC
commit: 19452d568f1ee148da193c202c08101774e29776Best regards,
Signature · 1 line
Jon Mason <[email protected]>