diff --git a/.dictionary b/.dictionary index 8cb533b2afb9fa27f43ac569882a15600293e0c1..94cd492b0136571f34447ab7676b8d204b5f5723 100644 --- a/.dictionary +++ b/.dictionary @@ -83,6 +83,7 @@ packagegroup picocom PMIC posix +protobuf ptable qa QSPI @@ -95,7 +96,9 @@ SAST scarthgap sdcard SDHC +se sourceparams +sp srcurifile suggestedvar tarbz2 diff --git a/meta-arm/meta-arm-bsp/recipes-security/trusted-services/corstone1000/0019-se-proxy-protobuf-change.patch b/meta-arm/meta-arm-bsp/recipes-security/trusted-services/corstone1000/0019-se-proxy-protobuf-change.patch new file mode 100644 index 0000000000000000000000000000000000000000..e4d0b9759fa012c0e450cdac92dbfd6d8ffaef32 --- /dev/null +++ b/meta-arm/meta-arm-bsp/recipes-security/trusted-services/corstone1000/0019-se-proxy-protobuf-change.patch @@ -0,0 +1,65 @@ +From e5a4487e2b757d0063148691c7d06ae1c7e15b9a Mon Sep 17 00:00:00 2001 +From: Emekcan Aras +Date: Tue, 18 Jun 2024 11:52:43 +0100 +Subject: [PATCH] protobuf fix + +Upstream-Status: Pending (not yet submitted to upstream) +Signed-off-by: Emekcan Aras +--- + .../se-proxy/env/commonsp/se_proxy_sp.c | 25 ++++++++++++++++++- + 1 file changed, 24 insertions(+), 1 deletion(-) + +diff --git a/deployments/se-proxy/env/commonsp/se_proxy_sp.c b/deployments/se-proxy/env/commonsp/se_proxy_sp.c +index a0eb03b6f..e2774c135 100644 +--- a/deployments/se-proxy/env/commonsp/se_proxy_sp.c ++++ b/deployments/se-proxy/env/commonsp/se_proxy_sp.c +@@ -13,6 +13,7 @@ + #include "trace.h" + #include "deployments/se-proxy/infra/service_proxy_factory.h" + #include "deployments/se-proxy/se_proxy_interfaces.h" ++#include + + static bool sp_init(uint16_t *own_sp_id); + +@@ -39,7 +40,7 @@ void __noreturn sp_main(union ffa_boot_info *boot_info) + goto fatal_error; + } + +- rpc_status = ts_rpc_endpoint_sp_init(&rpc_endpoint, 5, 16); ++ rpc_status = ts_rpc_endpoint_sp_init(&rpc_endpoint, 6, 16); + if (rpc_status != RPC_SUCCESS) { + EMSG("Failed to initialize RPC endpoint: %d", rpc_status); + goto fatal_error; +@@ -82,6 +83,28 @@ void __noreturn sp_main(union ffa_boot_info *boot_info) + goto fatal_error; + } + ++ struct rpc_service_interface *crypto_iface_protobuf = NULL; ++ struct crypto_provider *crypto_protobuf_provider = NULL; ++ ++ crypto_protobuf_provider = crypto_protobuf_provider_factory_create(); ++ if (!crypto_protobuf_provider) { ++ EMSG("Failed to create crypto protobuf provider factory"); ++ goto fatal_error; ++ } ++ ++ crypto_iface_protobuf = service_provider_get_rpc_interface( ++ &crypto_protobuf_provider->base_provider); ++ if (!crypto_iface_protobuf) { ++ EMSG("Failed to create service provider RPC interface"); ++ goto fatal_error; ++ } ++ ++ rpc_status = ts_rpc_endpoint_sp_add_service(&rpc_endpoint, crypto_iface_protobuf); ++ if (rpc_status != RPC_SUCCESS) { ++ EMSG("Failed to add service to RPC endpoint: %d", rpc_status); ++ goto fatal_error; ++ } ++ + rpc_iface = attest_proxy_create(); + if (!rpc_iface) { + EMSG("Failed to create Attestation proxy"); +-- +2.25.1 + + diff --git a/meta-arm/meta-arm-bsp/recipes-security/trusted-services/ts-sp-se-proxy_%.bbappend b/meta-arm/meta-arm-bsp/recipes-security/trusted-services/ts-sp-se-proxy_%.bbappend new file mode 100644 index 0000000000000000000000000000000000000000..13d0fc66c6332f4032cbbe06f9b52d2465ece676 --- /dev/null +++ b/meta-arm/meta-arm-bsp/recipes-security/trusted-services/ts-sp-se-proxy_%.bbappend @@ -0,0 +1,11 @@ +# SPDX-FileCopyrightText: Copyright 2024 Arm Limited and/or its +# affiliates +# +# SPDX-License-Identifier: MIT + +FILESEXTRAPATHS:prepend:corstone1000 := "${THISDIR}/corstone1000:" + +COMPATIBLE_MACHINE:corstone1000 = "corstone1000" +SRC_URI:append:corstone1000 = " \ + file://0019-se-proxy-protobuf-change.patch \ + "