blob: 4f5421587df5f9aa51c1f0361b229aab72238c7c [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001From a496978dcf82494c69e600f65adf061f15e565f4 Mon Sep 17 00:00:00 2001
2From: Satish Kumar <satish.kumar01@arm.com>
3Date: Sun, 12 Dec 2021 10:43:48 +0000
4Subject: [PATCH] Run psa-arch-test
5
6Fixes needed to run psa-arch-test
7
8Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
9
10Upstream-Status: Pending [Not submitted to upstream yet]
11Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
12
13
14---
15 components/service/common/psa_ipc/service_psa_ipc.c | 1 +
16 .../backend/secure_storage_ipc/secure_storage_ipc.c | 8 --------
17 .../service/secure_storage/include/psa/storage_common.h | 4 ++--
18 external/openamp/openamp.cmake | 2 +-
19 4 files changed, 4 insertions(+), 11 deletions(-)
20
21diff --git a/components/service/common/psa_ipc/service_psa_ipc.c b/components/service/common/psa_ipc/service_psa_ipc.c
22index 95a07c13..5e5815db 100644
23--- a/components/service/common/psa_ipc/service_psa_ipc.c
24+++ b/components/service/common/psa_ipc/service_psa_ipc.c
25@@ -185,6 +185,7 @@ psa_status_t psa_call(struct rpc_caller *caller, psa_handle_t psa_handle,
26 resp_msg->params.out_vec);
27
28 for (i = 0; i < resp_msg->params.out_len; i++) {
29+ out_vec[i].len = out_vec_param[i].len;
30 memcpy(out_vec[i].base, rpc_caller_phys_to_virt(caller, out_vec_param[i].base),
31 out_vec[i].len);
32 }
33diff --git a/components/service/secure_storage/backend/secure_storage_ipc/secure_storage_ipc.c b/components/service/secure_storage/backend/secure_storage_ipc/secure_storage_ipc.c
34index 9b55f77d..a1f369db 100644
35--- a/components/service/secure_storage/backend/secure_storage_ipc/secure_storage_ipc.c
36+++ b/components/service/secure_storage/backend/secure_storage_ipc/secure_storage_ipc.c
37@@ -31,10 +31,6 @@ static psa_status_t secure_storage_ipc_set(void *context, uint32_t client_id,
38
39 ipc->client.rpc_status = TS_RPC_CALL_ACCEPTED;
40
41- /* Validating input parameters */
42- if (p_data == NULL)
43- return PSA_ERROR_INVALID_ARGUMENT;
44-
45 psa_status = psa_call(caller, TFM_PROTECTED_STORAGE_SERVICE_HANDLE,
46 TFM_PS_SET, in_vec, IOVEC_LEN(in_vec), NULL, 0);
47 if (psa_status < 0)
48@@ -96,10 +92,6 @@ static psa_status_t secure_storage_ipc_get_info(void *context,
49
50 (void)client_id;
51
52- /* Validating input parameters */
53- if (!p_info)
54- return PSA_ERROR_INVALID_ARGUMENT;
55-
56 psa_status = psa_call(caller, TFM_PROTECTED_STORAGE_SERVICE_HANDLE,
57 TFM_PS_GET_INFO, in_vec,
58 IOVEC_LEN(in_vec), out_vec, IOVEC_LEN(out_vec));
59diff --git a/components/service/secure_storage/include/psa/storage_common.h b/components/service/secure_storage/include/psa/storage_common.h
60index 4f6ba2a7..1fd6b40d 100644
61--- a/components/service/secure_storage/include/psa/storage_common.h
62+++ b/components/service/secure_storage/include/psa/storage_common.h
63@@ -20,8 +20,8 @@ typedef uint64_t psa_storage_uid_t;
64 typedef uint32_t psa_storage_create_flags_t;
65
66 struct psa_storage_info_t {
67- size_t capacity;
68- size_t size;
69+ uint32_t capacity;
70+ uint32_t size;
71 psa_storage_create_flags_t flags;
72 };
73
74diff --git a/external/openamp/openamp.cmake b/external/openamp/openamp.cmake
75index aae13bad..75ab2290 100644
76--- a/external/openamp/openamp.cmake
77+++ b/external/openamp/openamp.cmake
78@@ -61,7 +61,7 @@ execute_process(COMMAND
79 -DCMAKE_SYSTEM_PROCESSOR=arm
80 -DEXTERNAL_INCLUDE_PATHS=${OPENAMP_EXTERNAL_INCLUDE_PATHS}
81 -DMACHINE=template
82- -DRPMSG_BUFFER_SIZE=512
83+ -DRPMSG_BUFFER_SIZE=8192
84 ${openamp_SOURCE_DIR}
85 WORKING_DIRECTORY
86 ${openamp_BINARY_DIR}