1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-05 14:30:10 +00:00

arm-bsp/trusted-services: corstone1000: Client Id adjustments after TF-M 2.0

Corstone-1000 uses trusted-firmware-m as secure enclave software
component. Due to the changes in TF-M 2.0, psa services requires
a seperate client_id now. This commit adds smm-gateway-sp client id to
the FMP services since FMP structure accessed by u-boot via
smm-gateway-sp.

Signed-off-by: Ali Can Ozaslan <ali.oezaslan@arm.com>
Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ali Can Ozaslan
2024-03-13 20:13:24 +00:00
committed by Jon Mason
parent a8f47e9504
commit de57703654
2 changed files with 46 additions and 0 deletions
@@ -0,0 +1,45 @@
From 52d962239207bd06827c18d0ed21abdc2002337f Mon Sep 17 00:00:00 2001
From: emeara01 <emekcan.aras@arm.com>
Date: Thu, 7 Mar 2024 10:24:42 +0000
Subject: [PATCH] plat: corstone1000: add client_id for FMP service
Corstone1000 uses trusted-firmware-m as secure enclave software component. Due
to the changes in TF-M 2.0, psa services requires a seperate client_id now.
This commit adds smm-gateway-sp client id to the FMP services since FMP structure
accessed by u-boot via smm-gateway-sp.
Signed-off-by: emeara01 <emekcan.aras@arm.com>
Upstream-Status: Inappropriate [Design is to revisted]
---
.../capsule_update/provider/corstone1000_fmp_service.c | 5 ++++---
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/components/service/capsule_update/provider/corstone1000_fmp_service.c b/components/service/capsule_update/provider/corstone1000_fmp_service.c
index d811af9f..354d025f 100644
--- a/components/service/capsule_update/provider/corstone1000_fmp_service.c
+++ b/components/service/capsule_update/provider/corstone1000_fmp_service.c
@@ -33,6 +33,7 @@
EFI_VARIABLE_APPEND_WRITE)
#define FMP_VARIABLES_COUNT 6
+#define SMM_GW_SP_ID 0x8003
static struct variable_metadata fmp_variables_metadata[FMP_VARIABLES_COUNT] = {
{
@@ -91,7 +92,7 @@ static psa_status_t protected_storage_set(struct rpc_caller *caller,
{ .base = psa_ptr_to_u32(&create_flags), .len = sizeof(create_flags) },
};
- psa_status = psa_call(caller, TFM_PROTECTED_STORAGE_SERVICE_HANDLE, TFM_PS_ITS_SET,
+ psa_status = psa_call_client_id(caller, TFM_PROTECTED_STORAGE_SERVICE_HANDLE, SMM_GW_SP_ID,TFM_PS_ITS_SET,
in_vec, IOVEC_LEN(in_vec), NULL, 0);
if (psa_status < 0)
EMSG("ipc_set: psa_call failed: %d", psa_status);
@@ -114,7 +115,7 @@ static psa_status_t protected_storage_get(struct rpc_caller *caller,
{ .base = psa_ptr_to_u32(p_data), .len = data_size },
};
- psa_status = psa_call(caller, TFM_PROTECTED_STORAGE_SERVICE_HANDLE,
+ psa_status = psa_call_client_id(caller, TFM_PROTECTED_STORAGE_SERVICE_HANDLE, SMM_GW_SP_ID,
TFM_PS_ITS_GET, in_vec, IOVEC_LEN(in_vec),
out_vec, IOVEC_LEN(out_vec));
@@ -10,6 +10,7 @@ SRC_URI:append:corstone1000 = " \
file://0006-plat-corstone1000-Use-the-stateless-platform-service.patch \
file://0007-plat-corstone1000-Initialize-capsule-update-provider.patch \
file://0008-platform-corstone1000-fix-synchronization-issue.patch \
file://0009-plat-corstone1000-fmp-client-id.patch \
"