Patrick Williams | 6ad2fb6 | 2023-06-15 12:50:14 -0500 | [diff] [blame^] | 1 | From d1377a5ed909e3a1d9caca56aeda262a80322a4b Mon Sep 17 00:00:00 2001 |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 2 | From: Vishnu Banavath <vishnu.banavath@arm.com> |
| 3 | Date: Fri, 3 Dec 2021 19:25:34 +0000 |
Patrick Williams | 6ad2fb6 | 2023-06-15 12:50:14 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 07/20] Use secure storage ipc and openamp for se_proxy |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 5 | |
| 6 | Remove mock up backend for secure storage in se proxy |
| 7 | deployment and use instead the secure storage ipc backend with |
| 8 | openamp as rpc to secure enclave side. |
| 9 | |
| 10 | Upstream-Status: Pending |
| 11 | Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com> |
| 12 | Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org> |
| 13 | --- |
| 14 | .../se-proxy/common/service_proxy_factory.c | 16 +++++++++++++--- |
| 15 | 1 file changed, 13 insertions(+), 3 deletions(-) |
| 16 | |
| 17 | diff --git a/deployments/se-proxy/common/service_proxy_factory.c b/deployments/se-proxy/common/service_proxy_factory.c |
| 18 | index acfb6e8873fa..57290056d614 100644 |
| 19 | --- a/deployments/se-proxy/common/service_proxy_factory.c |
| 20 | +++ b/deployments/se-proxy/common/service_proxy_factory.c |
| 21 | @@ -6,15 +6,20 @@ |
| 22 | |
| 23 | #include <stddef.h> |
| 24 | #include <rpc/common/endpoint/rpc_interface.h> |
| 25 | +#include <rpc/openamp/caller/sp/openamp_caller.h> |
| 26 | #include <service/attestation/provider/attest_provider.h> |
| 27 | #include <service/attestation/provider/serializer/packed-c/packedc_attest_provider_serializer.h> |
| 28 | #include <service/crypto/factory/crypto_provider_factory.h> |
| 29 | #include <service/secure_storage/frontend/secure_storage_provider/secure_storage_provider.h> |
| 30 | +#include <trace.h> |
| 31 | |
| 32 | /* Stub backends */ |
| 33 | #include <service/crypto/backend/stub/stub_crypto_backend.h> |
| 34 | +#include <service/secure_storage/backend/secure_storage_ipc/secure_storage_ipc.h> |
| 35 | #include <service/secure_storage/backend/mock_store/mock_store.h> |
| 36 | |
| 37 | +struct openamp_caller openamp; |
| 38 | + |
| 39 | struct rpc_interface *attest_proxy_create(void) |
| 40 | { |
| 41 | struct rpc_interface *attest_iface; |
| 42 | @@ -47,10 +52,15 @@ struct rpc_interface *crypto_proxy_create(void) |
| 43 | |
| 44 | struct rpc_interface *ps_proxy_create(void) |
| 45 | { |
| 46 | - static struct mock_store ps_backend; |
| 47 | static struct secure_storage_provider ps_provider; |
| 48 | - |
| 49 | - struct storage_backend *backend = mock_store_init(&ps_backend); |
| 50 | + static struct secure_storage_ipc ps_backend; |
| 51 | + static struct rpc_caller *storage_caller; |
| 52 | + struct storage_backend *backend; |
| 53 | + |
| 54 | + storage_caller = openamp_caller_init(&openamp); |
| 55 | + if (!storage_caller) |
| 56 | + return NULL; |
| 57 | + backend = secure_storage_ipc_init(&ps_backend, &openamp.rpc_caller); |
| 58 | |
| 59 | return secure_storage_provider_init(&ps_provider, backend); |
| 60 | } |
| 61 | -- |
Patrick Williams | 6ad2fb6 | 2023-06-15 12:50:14 -0500 | [diff] [blame^] | 62 | 2.38.1 |
Patrick Williams | 975a06f | 2022-10-21 14:42:47 -0500 | [diff] [blame] | 63 | |