1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-01 01:00:15 +00:00

optee-os: add v4.4

Add recipes to allow building OP-TEE v4.4. This is the first version
carrying an SPMC implementation which supports branch protection.

Update corstone1000:
  - to use the new op-tee version
  - `CFG_TZDRAM_SIZE` is increased further from `0x340000` to `0x360000`
     as version 4.4.0 of OP-TEE OS requires more memory

Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>
Signed-off-by: Bence Balogh <bence.balogh@arm.com>
Signed-off-by: Ross Burton <ross.burton@arm.com>

optee-os: corestone1000: udpate to op-tee v4.4

Update OP-TEE version and add a patch to increase TZDRAM size to add
more memory to OP-TEE.

Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Gyorgy Szing
2025-04-02 16:16:48 +02:00
committed by Jon Mason
parent 94596e0fae
commit 2ec60ece8d
10 changed files with 100 additions and 31 deletions
@@ -14,7 +14,8 @@ TFA_BL2_BINARY = "bl2-corstone1000.bin"
TFA_FIP_BINARY = "fip-corstone1000.bin" TFA_FIP_BINARY = "fip-corstone1000.bin"
# optee # optee
PREFERRED_VERSION_optee-os ?= "4.3.%" PREFERRED_VERSION_optee-os ?= "4.4.%"
PREFERRED_VERSION_optee-client ?= "4.4.%"
# Trusted Services # Trusted Services
TS_PLATFORM = "arm/corstone1000" TS_PLATFORM = "arm/corstone1000"
@@ -1,28 +0,0 @@
From 1410d9e9c3e73b1319b98be67ad00c7630c4cb2e Mon Sep 17 00:00:00 2001
From: Emekcan Aras <Emekcan.Aras@arm.com>
Date: Wed, 3 Apr 2024 16:05:07 +0100
Subject: [PATCH] increase tzdram size
Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/commit/258b72d242cd1a8ae56c87f9572a0624084785c7]
Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Harsimran Singh Tungal <harsimransingh.tungal@arm.com>
---
core/arch/arm/plat-corstone1000/conf.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/arch/arm/plat-corstone1000/conf.mk b/core/arch/arm/plat-corstone1000/conf.mk
index 98347b143..c2dd71f05 100644
--- a/core/arch/arm/plat-corstone1000/conf.mk
+++ b/core/arch/arm/plat-corstone1000/conf.mk
@@ -34,7 +34,7 @@ CFG_TEE_CORE_NB_CORE ?= 1
CFG_TZDRAM_START ?= 0x02002000
# TEE_RAM (OPTEE kernel + DATA) + TA_RAM = 3MB
-CFG_TZDRAM_SIZE ?= 0x300000
+CFG_TZDRAM_SIZE ?= 0x340000
CFG_SHMEM_START ?= 0x86000000
CFG_SHMEM_SIZE ?= 0x00200000
--
2.25.1
@@ -0,0 +1,30 @@
From ce58e4d78dc7a4f3c3b08ee425461eb190d70543 Mon Sep 17 00:00:00 2001
From: Bence Balogh <bence.balogh@arm.com>
Date: Fri, 1 Nov 2024 00:45:53 +0100
Subject: [PATCH] plat-corstone1000: increase CFG_TZDRAM_SIZE
TZDRAM is a 4MB SRAM in Corstone-1000. Its start address is `0x0200_0000`
but the first 0x2000 bytes are reserved for future use. `CFG_TZDRAM_SIZE`
can be increased to `0x360000` so OP-TEE has more RAM.
Signed-off-by: Bence Balogh <bence.balogh@arm.com>
Upstream-Status: Pending
---
core/arch/arm/plat-corstone1000/conf.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/arch/arm/plat-corstone1000/conf.mk b/core/arch/arm/plat-corstone1000/conf.mk
index 9fa0729d5..745dc958a 100644
--- a/core/arch/arm/plat-corstone1000/conf.mk
+++ b/core/arch/arm/plat-corstone1000/conf.mk
@@ -34,7 +34,7 @@ CFG_TEE_CORE_NB_CORE ?= 1
CFG_TZDRAM_START ?= 0x02002000
# TEE_RAM (OP-TEE kernel + DATA) + TA_RAM
-CFG_TZDRAM_SIZE ?= 0x340000
+CFG_TZDRAM_SIZE ?= 0x360000
CFG_SHMEM_START ?= 0x86000000
CFG_SHMEM_SIZE ?= 0x00200000
--
2.25.1
@@ -1,7 +1,7 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/files/optee-os/corstone1000:" FILESEXTRAPATHS:prepend := "${THISDIR}/files/optee-os/corstone1000:"
SRC_URI:append = " \ SRC_URI:append = " \
file://0001-Handle-logging-syscall.patch \ file://0001-Handle-logging-syscall.patch \
file://0002-increase-tzdram-size.patch \ file://0002-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch \
" "
COMPATIBLE_MACHINE = "corstone1000" COMPATIBLE_MACHINE = "corstone1000"
@@ -0,0 +1,8 @@
require recipes-security/optee/optee-client.inc
# v4.4.0
SRCREV = "d221676a58b305bddbf97db00395205b3038de8e"
inherit pkgconfig
DEPENDS += "util-linux"
EXTRA_OEMAKE += "PKG_CONFIG=pkg-config"
@@ -0,0 +1,4 @@
require recipes-security/optee/optee-examples.inc
# v4.4.0
SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035"
@@ -0,0 +1,29 @@
require recipes-security/optee/optee-os_${PV}.bb
SUMMARY = "OP-TEE Trusted OS TA devkit"
DESCRIPTION = "OP-TEE TA devkit for build TAs"
HOMEPAGE = "https://www.op-tee.org/"
DEPENDS += "python3-pycryptodome-native"
do_install() {
#install TA devkit
install -d ${D}${includedir}/optee/export-user_ta/
for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
cp -aR $f ${D}${includedir}/optee/export-user_ta/
done
}
do_deploy() {
echo "Do not inherit do_deploy from optee-os."
}
FILES:${PN} = "${includedir}/optee/"
# Build paths are currently embedded
INSANE_SKIP:${PN}-dev += "buildpaths"
# 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)}"
@@ -0,0 +1,11 @@
require recipes-security/optee/optee-os.inc
DEPENDS += "dtc-native"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
# v4.4.0
SRCREV = "8f645256efc0dc66bd5c118778b0b50c44469ae1"
SRC_URI += " \
file://0003-optee-enable-clang-support.patch \
"
@@ -3,7 +3,6 @@ DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite"
HOMEPAGE = "https://www.op-tee.org/" HOMEPAGE = "https://www.op-tee.org/"
LICENSE = "BSD-2-Clause & GPL-2.0-only" LICENSE = "BSD-2-Clause & GPL-2.0-only"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
inherit python3native ptest inherit python3native ptest
inherit deploy inherit deploy
@@ -0,0 +1,15 @@
require recipes-security/optee/optee-test.inc
# v4.4.0
SRCREV = "695231ef8987866663a9ed5afd8f77d1bae3dc08"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560"
# 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)}"