mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-04-20 11:29:54 +00:00
optee-os: enable SPMC test
Add ta-devkit and optee-test. Change configuration to enable building and deploying OP-TEE SPMC tests. Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
@@ -18,10 +18,16 @@ COMPATIBLE_HOST = "(arm|aarch64).*-linux"
|
||||
KERNEL_MODULE_AUTOLOAD += "arm-ffa-user"
|
||||
KERNEL_MODULE_PROBECONF += "arm-ffa-user"
|
||||
|
||||
# This debugfs driver is used only by uefi-test for testing SmmGW SP
|
||||
# UUIDs = SMM Gateway SP
|
||||
FFA-USER-UUID-LIST ?= "ed32d533-99e6-4209-9cc0-2d72cdd998a7"
|
||||
module_conf_arm-ffa-user = "options arm-ffa-user uuid_str_list=${FFA-USER-UUID-LIST}"
|
||||
# SMM Gateway SP
|
||||
UUID_LIST = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \
|
||||
'ed32d533-99e6-4209-9cc0-2d72cdd998a7', '' , d)}"
|
||||
# SPMC Tests SPs
|
||||
UUID_LIST:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
',5c9edbc3-7b3a-4367-9f83-7c191ae86a37,7817164c-c40c-4d1a-867a-9bb2278cf41a,23eb0100-e32a-4497-9052-2f11e584afa6', '' , d)}"
|
||||
|
||||
FFA_USER_UUID_LIST ?= "${@d.getVar('UUID_LIST').strip(',')}"
|
||||
|
||||
module_conf_arm-ffa-user = "options arm-ffa-user uuid_str_list=${FFA_USER_UUID_LIST}"
|
||||
|
||||
do_install:append() {
|
||||
install -d ${D}${includedir}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Include extra headers needed by SPMC tests to TA DEVKIT.
|
||||
# Supported after op-tee v3.20
|
||||
EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
' CFG_SPMC_TESTS=y', '' , d)}"
|
||||
54
meta-arm/recipes-security/optee/optee-os-ts-3.18.inc
Normal file
54
meta-arm/recipes-security/optee/optee-os-ts-3.18.inc
Normal file
@@ -0,0 +1,54 @@
|
||||
# Include Trusted Services SPs accordingly to defined machine features
|
||||
|
||||
# Please notice that OPTEE will load SPs in the order listed in this file.
|
||||
# If an SP requires another SP to be already loaded it must be listed lower.
|
||||
|
||||
# TS SPs UUIDs definitions
|
||||
require recipes-security/trusted-services/ts-uuid.inc
|
||||
|
||||
TS_ENV = "opteesp"
|
||||
TS_BIN = "${RECIPE_SYSROOT}/usr/${TS_ENV}/bin"
|
||||
|
||||
# ITS SP
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-its', \
|
||||
' ts-sp-its', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-its', \
|
||||
' ${TS_BIN}/${ITS_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
# Storage SP
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-storage', \
|
||||
' ts-sp-storage', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-storage', \
|
||||
' ${TS_BIN}/${STORAGE_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
# Crypto SP.
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-crypto', \
|
||||
' ts-sp-crypto', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-crypto', \
|
||||
' ${TS_BIN}/${CRYPTO_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
# Attestation SP
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-attestation', \
|
||||
' ts-sp-attestation', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-attestation', \
|
||||
' ${TS_BIN}/${ATTESTATION_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
# Env-test SP
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-env-test', \
|
||||
' ts-sp-env-test', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-env-test', \
|
||||
' ${TS_BIN}/${ENV_TEST_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
# SE-Proxy SP
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-se-proxy', \
|
||||
' ts-sp-se-proxy', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-se-proxy', \
|
||||
' ${TS_BIN}/${SE_PROXY_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
# SMM Gateway
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \
|
||||
' ts-sp-smm-gateway', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \
|
||||
' ${TS_BIN}/${SMM_GATEWAY_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
EXTRA_OEMAKE:append = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_MAP_EXT_DT_SECURE=y CFG_SECURE_PARTITION=y SP_PATHS="${SP_PATHS}" ', d)}"
|
||||
@@ -51,4 +51,12 @@ DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'ts-smm-gateway', \
|
||||
' ${TS_BIN}/${SMM_GATEWAY_UUID}.stripped.elf', '', d)}"
|
||||
|
||||
EXTRA_OEMAKE:append = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_SECURE_PARTITION=y SP_PATHS="${SP_PATHS}" ', d)}"
|
||||
# SPM test SPs
|
||||
DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
' ts-sp-spm-test1 ts-sp-spm-test2 ts-sp-spm-test3', '' , d)}"
|
||||
SP_PATHS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
' ${TS_BIN}/${SPM_TEST1_UUID}.stripped.elf ${TS_BIN}/${SPM_TEST2_UUID}.stripped.elf ${TS_BIN}/${SPM_TEST3_UUID}.stripped.elf', '', d)}"
|
||||
EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
' CFG_SPMC_TESTS=y', '' , d)}"
|
||||
|
||||
EXTRA_OEMAKE:append = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_MAP_EXT_DT_SECURE=y CFG_SECURE_PARTITION=y SP_PATHS="${SP_PATHS}" ', d)}"
|
||||
|
||||
5
meta-arm/recipes-security/optee/optee-os_3.1%.bbappend
Normal file
5
meta-arm/recipes-security/optee/optee-os_3.1%.bbappend
Normal file
@@ -0,0 +1,5 @@
|
||||
# Include Trusted Services Secure Partitions
|
||||
require optee-os-ts-3.18.inc
|
||||
|
||||
# Conditionally include platform specific Trusted Services related OPTEE build parameters
|
||||
EXTRA_OEMAKE:append:qemuarm64-secureboot = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_CORE_HEAP_SIZE=131072 CFG_TEE_BENCHMARK=n CFG_TEE_CORE_LOG_LEVEL=4 CFG_CORE_SEL1_SPMC=y ', d)}"
|
||||
7
meta-arm/recipes-security/optee/optee-test_3.2%.bbappend
Normal file
7
meta-arm/recipes-security/optee/optee-test_3.2%.bbappend
Normal file
@@ -0,0 +1,7 @@
|
||||
# Include ffa_spmc test group if the SPMC test is enabled.
|
||||
# Supported after op-tee v3.20
|
||||
EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
' CFG_SPMC_TESTS=y CFG_SECURE_PARTITION=y', '' , d)}"
|
||||
|
||||
RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
|
||||
' arm-ffa-user', '' , d)}"
|
||||
@@ -17,8 +17,8 @@ do_install:append() {
|
||||
dtc -I dts -O dtb -o ${D}${TS_INSTALL}/manifest/${SP_UUID}.dtb ${SP_DTS_FILE}
|
||||
|
||||
# We do not need libs and headers
|
||||
rm -r --one-file-system ${D}${TS_INSTALL}/lib
|
||||
rm -r --one-file-system ${D}${TS_INSTALL}/include
|
||||
rm -rf --one-file-system ${D}${TS_INSTALL}/lib
|
||||
rm -rf --one-file-system ${D}${TS_INSTALL}/include
|
||||
}
|
||||
|
||||
# Use Yocto debug prefix maps for compiling assembler.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
DESCRIPTION = "Trusted Services SPMC test SPs"
|
||||
|
||||
require ts-sp-common.inc
|
||||
|
||||
SP_UUID = "${SPM_TEST${SP_INDEX}_UUID}"
|
||||
SP_DTS_FILE ?= "${D}${TS_INSTALL}/manifest/${SP_UUID}.dts"
|
||||
OECMAKE_SOURCEPATH="${S}/deployments/spm-test${SP_INDEX}/${TS_ENV}"
|
||||
@@ -0,0 +1,5 @@
|
||||
DESCRIPTION = "Trusted Services SPMC test SP1"
|
||||
|
||||
SP_INDEX="1"
|
||||
|
||||
require ts-sp-spm-test-common.inc
|
||||
@@ -0,0 +1,6 @@
|
||||
DESCRIPTION = "Trusted Services SPMC test SP2"
|
||||
|
||||
SP_INDEX="2"
|
||||
|
||||
require ts-sp-spm-test-common.inc
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
DESCRIPTION = "Trusted Services SPMC test SP3"
|
||||
|
||||
SP_INDEX="3"
|
||||
|
||||
require ts-sp-spm-test-common.inc
|
||||
|
||||
@@ -7,3 +7,6 @@ ITS_UUID = "dc1eef48-b17a-4ccf-ac8b-dfcff7711b14"
|
||||
SE_PROXY_UUID = "46bb39d1-b4d9-45b5-88ff-040027dab249"
|
||||
SMM_GATEWAY_UUID = "ed32d533-99e6-4209-9cc0-2d72cdd998a7"
|
||||
STORAGE_UUID = "751bf801-3dde-4768-a514-0f10aeed1790"
|
||||
SPM_TEST1_UUID = "5c9edbc3-7b3a-4367-9f83-7c191ae86a37"
|
||||
SPM_TEST2_UUID = "7817164c-c40c-4d1a-867a-9bb2278cf41a"
|
||||
SPM_TEST3_UUID = "23eb0100-e32a-4497-9052-2f11e584afa6"
|
||||
Reference in New Issue
Block a user