IPC: Tests addition and updates for PSA FF 1.0
- Tests addition and updates for PSA FF 1.0
- Remove unused platform files
- Update READMEs for security implication note
- Minor bug fixes
diff --git a/api-tests/ff/ipc/test_i001/test_i001.c b/api-tests/ff/ipc/test_i001/test_i001.c
index 2e30ff6..be6961d 100644
--- a/api-tests/ff/ipc/test_i001/test_i001.c
+++ b/api-tests/ff/ipc/test_i001/test_i001.c
@@ -56,8 +56,12 @@
val->print(PRINT_TEST, "[Check 2] psa_version\n", 0);
- /*Return PSA_VERSION_NONE when the RoT Service is not implemented, or the caller is not permitted
- to access the service. Return minor version of the implemented and allowed RoT Service */
+ /*
+ * Return PSA_VERSION_NONE when the RoT Service is not implemented,
+ * or the caller is not permitted to access the service.
+ * Return version of the implemented and allowed RoT Service
+ */
+
/* psa_version() check for un-implemented SID */
if (psa->version(INVALID_SID) != PSA_VERSION_NONE)
{
@@ -72,7 +76,7 @@
/* psa_version() check for implemented SID but allows only secure connection */
version = psa->version(SERVER_SECURE_CONNECT_ONLY_SID);
if (((caller == CALLER_NONSECURE) && (version != PSA_VERSION_NONE))
- || ((caller == CALLER_SECURE) && (version != 2)))
+ || ((caller == CALLER_SECURE) && (version != SERVER_SECURE_CONNECT_ONLY_VERSION)))
{
status = VAL_STATUS_VERSION_API_FAILED;
val->print(PRINT_ERROR,
@@ -84,8 +88,8 @@
return status;
}
- /* psa_version() returns minor version of the implemented and allowed RoT Service */
- if (psa->version(SERVER_TEST_DISPATCHER_SID) != 1)
+ /* psa_version() returns version of the implemented and allowed RoT Service */
+ if (psa->version(SERVER_TEST_DISPATCHER_SID) != SERVER_TEST_DISPATCHER_VERSION)
{
status = VAL_STATUS_VERSION_API_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i001/test_i001.h b/api-tests/ff/ipc/test_i001/test_i001.h
index 1defb81..191bb17 100644
--- a/api-tests/ff/ipc/test_i001/test_i001.h
+++ b/api-tests/ff/ipc/test_i001/test_i001.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i001)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i001)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i001/test_supp_i001.c b/api-tests/ff/ipc/test_i001/test_supp_i001.c
index 2a33cfa..45ffd93 100644
--- a/api-tests/ff/ipc/test_i001/test_supp_i001.c
+++ b/api-tests/ff/ipc/test_i001/test_supp_i001.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i002/test_i002.c b/api-tests/ff/ipc/test_i002/test_i002.c
index 8bd4858..8463011 100644
--- a/api-tests/ff/ipc/test_i002/test_i002.c
+++ b/api-tests/ff/ipc/test_i002/test_i002.c
@@ -29,8 +29,9 @@
NULL,
client_test_connection_busy_and_reject,
client_test_accept_and_close_connect,
- client_test_connect_with_allowed_minor_version_policy,
+ client_test_connect_with_allowed_version_policy,
client_test_psa_call_with_allowed_status_code,
+ client_test_psa_call_with_allowed_type_values,
client_test_identity,
client_test_spm_concurrent_connect_limit,
client_test_psa_block_behave,
@@ -45,7 +46,7 @@
val->print(PRINT_TEST, "[Check 1] Test busy and reject connect type\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/*
* The RoT Service can't make connection at this moment. It sends
@@ -58,7 +59,7 @@
return VAL_STATUS_INVALID_HANDLE;
}
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* The RoT Service rejected the client because of an application-specific case
* Expect PSA_ERROR_CONNECTION_REFUSED as return
@@ -79,9 +80,9 @@
val->print(PRINT_TEST, "[Check 2] Accept and close connection\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* RoT service accepts the connection. Expecting positive handle */
- if (handle < 0)
+ if (!PSA_HANDLE_IS_VALID(handle))
{
return VAL_STATUS_INVALID_HANDLE;
}
@@ -94,19 +95,22 @@
return VAL_STATUS_SUCCESS;
}
-int32_t client_test_connect_with_allowed_minor_version_policy(caller_security_t caller)
+int32_t client_test_connect_with_allowed_version_policy(caller_security_t caller)
{
psa_handle_t handle = 0;
uint32_t i = 0;
- uint32_t sid[] = {SERVER_UNSPECIFED_MINOR_V_SID,
- SERVER_STRICT_MINOR_VERSION_SID,
- SERVER_RELAX_MINOR_VERSION_SID,
- SERVER_RELAX_MINOR_VERSION_SID};
- uint32_t minor_v[] = {1, 2, 1, 2};
+ uint32_t sid[] = {SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_STRICT_VERSION_SID,
+ SERVER_RELAX_VERSION_SID,
+ SERVER_RELAX_VERSION_SID};
+ uint32_t version[] = {SERVER_UNSPECIFED_VERSION_VERSION,
+ SERVER_STRICT_VERSION_VERSION,
+ SERVER_RELAX_VERSION_VERSION - 1,
+ SERVER_RELAX_VERSION_VERSION};
- val->print(PRINT_TEST, "[Check 3] Test psa_connect with allowed minor version policy\n", 0);
+ val->print(PRINT_TEST, "[Check 3] Test psa_connect with allowed version policy\n", 0);
- /* Connect RoT service with following minor version numbers and expect positive handle for
+ /* Connect RoT service with following version numbers and expect positive handle for
* each connection:
* Case 1. Version policy is not mentioned and requested version is 1 (default minimum version)
* Case 2. Version policy is STRICT and requested version equals minimum version
@@ -116,11 +120,11 @@
for (i = 0; i < (sizeof(sid)/sizeof(sid[0])); i++)
{
- handle = psa->connect(sid[i], minor_v[i]);
- if (handle < 0)
+ handle = psa->connect(sid[i], version[i]);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR,
- "\tpsa_connect failed for minor_v policy. Iteration No=%d\n", i);
+ "\tpsa_connect failed for version policy. Iteration No=%d\n", i);
return VAL_STATUS_INVALID_HANDLE;
}
@@ -136,13 +140,13 @@
psa_handle_t handle = 0;
psa_status_t status_of_call;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Compare status code returned with expected status code */
if (status_of_call != expected_status)
{
@@ -175,6 +179,35 @@
return status;
}
+int32_t client_test_psa_call_with_allowed_type_values(caller_security_t caller)
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+ psa_handle_t handle = 0;
+ int32_t type[] = {PSA_IPC_CALL, 1, 2, INT32_MAX};
+ uint32_t i = 0;
+
+ val->print(PRINT_TEST, "[Check 5] Test psa_call with different type values\n", 0);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
+ {
+ return VAL_STATUS_INVALID_HANDLE;
+ }
+
+ for (i = 0; i < (sizeof(type)/sizeof(type[0])); i++)
+ {
+ /* Send type = type[i] */
+ if (psa->call(handle, type[i], NULL, 0, NULL, 0) != PSA_SUCCESS)
+ {
+ val->print(PRINT_ERROR, "\tCheck failed for type=%d\n", type[i]);
+ status = VAL_STATUS_CALL_FAILED;
+ break;
+ }
+ }
+
+ psa->close(handle);
+ return status;
+}
+
int32_t client_test_identity(caller_security_t caller)
{
int32_t status = VAL_STATUS_SUCCESS;
@@ -182,10 +215,10 @@
psa_status_t status_of_call;
int id_at_connect = 0, id_at_call = 0;
- val->print(PRINT_TEST, "[Check 5] Test client_id\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ val->print(PRINT_TEST, "[Check 6] Test client_id\n", 0);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
return(VAL_STATUS_INVALID_HANDLE);
}
@@ -193,7 +226,7 @@
psa_outvec resp[2] = {{&id_at_connect, sizeof(id_at_call)},
{&id_at_call, sizeof(id_at_call)}};
- status_of_call = psa->call(handle, NULL, 0, resp, 2);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, resp, 2);
if (status_of_call != PSA_SUCCESS)
@@ -223,14 +256,14 @@
psa_handle_t handle[CONNECT_LIMIT] = {0};
int i= 0, signture = 0;
- val->print(PRINT_TEST, "[Check 6] Test connect limit\n", 0);
+ val->print(PRINT_TEST, "[Check 7] Test connect limit\n", 0);
/* Execute psa_connect in a loop until it returns
* PSA_ERROR_CONNECTION_REFUSED OR PSA_ERROR_CONNECTION_BUSY
*/
while (i < CONNECT_LIMIT)
{
- handle[i] = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle[i] = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Compare handle value */
if ((handle[i] == PSA_ERROR_CONNECTION_REFUSED) || (handle[i] == PSA_ERROR_CONNECTION_BUSY))
{
@@ -266,7 +299,7 @@
for (i = 0; i < CONNECT_NUM; i++)
{
- handle[i] = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle[i] = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
if (handle[i] != PSA_ERROR_CONNECTION_REFUSED)
{
return VAL_STATUS_INVALID_HANDLE;
@@ -278,12 +311,12 @@
int32_t client_test_psa_block_behave(caller_security_t caller)
{
- val->print(PRINT_TEST, "[Check 7] Test PSA_BLOCK\n", 0);
+ val->print(PRINT_TEST, "[Check 8] Test PSA_BLOCK\n", 0);
return (client_test_psa_wait());
}
int32_t client_test_psa_poll_behave(caller_security_t caller)
{
- val->print(PRINT_TEST, "[Check 8] Test PSA_POLL\n", 0);
+ val->print(PRINT_TEST, "[Check 9] Test PSA_POLL\n", 0);
return (client_test_psa_wait());
}
diff --git a/api-tests/ff/ipc/test_i002/test_i002.h b/api-tests/ff/ipc/test_i002/test_i002.h
index bce864c..9f36dca 100644
--- a/api-tests/ff/ipc/test_i002/test_i002.h
+++ b/api-tests/ff/ipc/test_i002/test_i002.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i002)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i002)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
#define CONNECT_LIMIT 50
@@ -38,8 +38,9 @@
int32_t client_test_connection_busy_and_reject(caller_security_t);
int32_t client_test_accept_and_close_connect(caller_security_t);
-int32_t client_test_connect_with_allowed_minor_version_policy(caller_security_t);
+int32_t client_test_connect_with_allowed_version_policy(caller_security_t);
int32_t client_test_psa_call_with_allowed_status_code(caller_security_t);
+int32_t client_test_psa_call_with_allowed_type_values(caller_security_t);
int32_t client_test_identity(caller_security_t);
int32_t client_test_spm_concurrent_connect_limit(caller_security_t);
int32_t client_test_psa_block_behave(caller_security_t);
diff --git a/api-tests/ff/ipc/test_i002/test_supp_i002.c b/api-tests/ff/ipc/test_i002/test_supp_i002.c
index 274452b..716b6b2 100644
--- a/api-tests/ff/ipc/test_i002/test_supp_i002.c
+++ b/api-tests/ff/ipc/test_i002/test_supp_i002.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -27,8 +27,9 @@
int32_t server_test_connection_busy_and_reject(void);
int32_t server_test_accept_and_close_connect(void);
-int32_t server_test_connect_with_allowed_minor_version_policy(void);
+int32_t server_test_connect_with_allowed_version_policy(void);
int32_t server_test_psa_call_with_allowed_status_code(void);
+int32_t server_test_psa_call_with_allowed_type_values(void);
int32_t server_test_identity(void);
int32_t server_test_spm_concurrent_connect_limit(void);
int32_t server_test_psa_block_behave(void);
@@ -38,8 +39,9 @@
NULL,
server_test_connection_busy_and_reject,
server_test_accept_and_close_connect,
- server_test_connect_with_allowed_minor_version_policy,
+ server_test_connect_with_allowed_version_policy,
server_test_psa_call_with_allowed_status_code,
+ server_test_psa_call_with_allowed_type_values,
server_test_identity,
server_test_spm_concurrent_connect_limit,
server_test_psa_block_behave,
@@ -58,16 +60,16 @@
* check delivery of PSA_IPC_CONNECT when psa_connect called.
* And msg.handle must be positive.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
return status;
}
- /* Rejecting connection to check behaviour of PSA_CONNECTION_BUSY */
- psa->reply(msg.handle, PSA_CONNECTION_BUSY);
+ /* Rejecting connection to check behaviour of PSA_ERROR_CONNECTION_BUSY */
+ psa->reply(msg.handle, PSA_ERROR_CONNECTION_BUSY);
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
return status;
@@ -83,7 +85,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
/* Reject the connection if processing of connect request has failed */
@@ -97,7 +99,7 @@
/* Checking delivery of PSA_IPC_DISCONNECT when psa_close called
* msg.handle must be positive
*/
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
return status;
@@ -110,15 +112,15 @@
return status;
}
-int32_t server_test_connect_with_allowed_minor_version_policy(void)
+int32_t server_test_connect_with_allowed_version_policy(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
int i = 0;
- psa_signal_t signal[4] = {SERVER_UNSPECIFED_MINOR_V_SIG,
- SERVER_STRICT_MINOR_VERSION_SIG,
- SERVER_RELAX_MINOR_VERSION_SIG,
- SERVER_RELAX_MINOR_VERSION_SIG};
+ psa_signal_t signal[4] = {SERVER_UNSPECIFED_VERSION_SIGNAL,
+ SERVER_STRICT_VERSION_SIGNAL,
+ SERVER_RELAX_VERSION_SIGNAL,
+ SERVER_RELAX_VERSION_SIGNAL};
for (i = 0; i < 4; i++)
{
@@ -149,7 +151,7 @@
for (i = 0; i < (sizeof(status_code)/sizeof(status_code[0])); i++)
{
- status = ((val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
if (val->err_check_set(TEST_CHECKPOINT_NUM(208), status))
{
@@ -158,7 +160,7 @@
}
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(209), status))
{
/* Send status code other than status_code[] to indicate failure
@@ -172,7 +174,7 @@
psa->reply(msg.handle, status_code[i]);
}
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
val->err_check_set(TEST_CHECKPOINT_NUM(210), status);
@@ -180,15 +182,59 @@
return status;
}
+int32_t server_test_psa_call_with_allowed_type_values(void)
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+ psa_msg_t msg = {0};
+ int32_t type[] = {PSA_IPC_CALL, 1, 2, INT32_MAX};
+ uint32_t i = 0;
+
+ status = ((val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
+ ? VAL_STATUS_ERROR : status);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(211), status))
+ {
+ psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
+ return status;
+ }
+ psa->reply(msg.handle, PSA_SUCCESS);
+
+ for (i = 0; i < (sizeof(type)/sizeof(type[0])); i++)
+ {
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(212), status))
+ {
+ psa->reply(msg.handle, -3);
+ break;
+ }
+ else
+ {
+ /* Check recieve of client provided message type */
+ if (msg.type != type[i])
+ {
+ status = VAL_STATUS_CALL_FAILED;
+ psa->reply(msg.handle, -2);
+ break;
+ }
+ psa->reply(msg.handle, PSA_SUCCESS);
+ }
+ }
+
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
+ ? VAL_STATUS_ERROR : status);
+ psa->reply(msg.handle, PSA_SUCCESS);
+ val->err_check_set(TEST_CHECKPOINT_NUM(213), status);
+ return status;
+}
+
int32_t server_test_identity(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
int id_at_connect = 0, id_at_call = 0;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
- if (val->err_check_set(TEST_CHECKPOINT_NUM(211), status))
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(214), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
@@ -198,8 +244,8 @@
id_at_connect = msg.client_id;
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
- if (val->err_check_set(TEST_CHECKPOINT_NUM(212), status))
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(215), status))
{
psa->reply(msg.handle, -3);
}
@@ -212,8 +258,8 @@
psa->reply(msg.handle, PSA_SUCCESS);
}
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
- val->err_check_set(TEST_CHECKPOINT_NUM(213), status);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ val->err_check_set(TEST_CHECKPOINT_NUM(216), status);
/* Client ID during disconnect. It should be equal to id_at_call */
if (msg.client_id != id_at_call)
{
@@ -246,14 +292,14 @@
while (1)
{
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if ((signals & SERVER_UNSPECIFED_MINOR_V_SIG) == 0)
+ if ((signals & SERVER_UNSPECIFED_VERSION_SIGNAL) == 0)
{
val->print(PRINT_ERROR,
"psa_wait returned with invalid signal value = 0x%x\n", signals);
return VAL_STATUS_ERROR;
}
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
continue;
switch(msg.type)
@@ -289,7 +335,7 @@
*/
/* Debug print */
- val->err_check_set(TEST_CHECKPOINT_NUM(214), VAL_STATUS_SUCCESS);
+ val->err_check_set(TEST_CHECKPOINT_NUM(217), VAL_STATUS_SUCCESS);
for (i = 0; i < CONNECT_NUM; i++)
{
@@ -298,7 +344,7 @@
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
/* When MODE is one(PSA_BLOCK), the psa_wait must return non-zero signal value */
- if ((signals & SERVER_UNSPECIFED_MINOR_V_SIG) == 0)
+ if ((signals & SERVER_UNSPECIFED_VERSION_SIGNAL) == 0)
{
val->print(PRINT_ERROR,
"psa_wait returned with invalid signal value = 0x%x\n", signals);
@@ -306,7 +352,7 @@
}
else
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -316,7 +362,7 @@
}
/* Debug print */
- val->err_check_set(TEST_CHECKPOINT_NUM(215), VAL_STATUS_SUCCESS);
+ val->err_check_set(TEST_CHECKPOINT_NUM(218), VAL_STATUS_SUCCESS);
return VAL_STATUS_SUCCESS;
}
@@ -330,7 +376,7 @@
while (1)
{
/* Debug print */
- val->err_check_set(TEST_CHECKPOINT_NUM(216), VAL_STATUS_SUCCESS);
+ val->err_check_set(TEST_CHECKPOINT_NUM(219), VAL_STATUS_SUCCESS);
/* Loop to receive client request */
while (signals == 0)
@@ -351,7 +397,7 @@
"psa_wait returned with invalid signals_temp = 0x%x\n", signals_temp);
return VAL_STATUS_ERROR;
}
- else if ((signals & SERVER_UNSPECIFED_MINOR_V_SIG) == 0)
+ else if ((signals & SERVER_UNSPECIFED_VERSION_SIGNAL) == 0)
{
val->print(PRINT_ERROR,
"psa_wait returned with invalid signal value = 0x%x\n", signals);
@@ -359,7 +405,7 @@
}
else
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
continue;
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
count++;
diff --git a/api-tests/ff/ipc/test_i003/test_i003.c b/api-tests/ff/ipc/test_i003/test_i003.c
index a8e795d..0c0cb8d 100644
--- a/api-tests/ff/ipc/test_i003/test_i003.c
+++ b/api-tests/ff/ipc/test_i003/test_i003.c
@@ -45,7 +45,9 @@
val->print(PRINT_TEST, "[Check 1] Test zero length invec\n", 0);
- if (val->ipc_connect(SERVER_UNSPECIFED_MINOR_V_SID, 1, &handle))
+ if (val->ipc_connect(SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_UNSPECIFED_VERSION_VERSION,
+ &handle))
{
return VAL_STATUS_CONNECTION_FAILED;
}
@@ -63,7 +65,7 @@
*/
psa_outvec resp[1] = {{&data[2], sizeof(data[2])}};
- status = psa->call(handle, data1, 3, resp, 1);
+ status = psa->call(handle, PSA_IPC_CALL, data1, 3, resp, 1);
if (status < 0)
{
@@ -99,7 +101,9 @@
val->print(PRINT_TEST, "[Check 2] Test zero length outvec\n", 0);
- if (val->ipc_connect(SERVER_UNSPECIFED_MINOR_V_SID, 1, &handle))
+ if (val->ipc_connect(SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_UNSPECIFED_VERSION_VERSION,
+ &handle))
{
return VAL_STATUS_CONNECTION_FAILED;
}
@@ -118,7 +122,7 @@
{NULL, 0},
{&data[2], sizeof(data[2])}};
- status = psa->call(handle, data1, 1, resp, 3);
+ status = psa->call(handle, PSA_IPC_CALL, data1, 1, resp, 3);
if (status < 0)
{
status = VAL_STATUS_CALL_FAILED;
@@ -157,7 +161,9 @@
val->print(PRINT_TEST, "[Check 3] Test psa_write, psa_read and psa_skip\n", 0);
- if (val->ipc_connect(SERVER_UNSPECIFED_MINOR_V_SID, 1, &handle))
+ if (val->ipc_connect(SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_UNSPECIFED_VERSION_VERSION,
+ &handle))
{
return VAL_STATUS_CONNECTION_FAILED;
}
@@ -171,7 +177,7 @@
{&data2, sizeof(data2)},
{&data3, sizeof(data3)}};
- status = psa->call(handle, data, 4, NULL, 0);
+ status = psa->call(handle, PSA_IPC_CALL, data, 4, NULL, 0);
if (status < 0)
{
val->print(PRINT_ERROR, "\tpsa_call failed. status=%x\n",status);
@@ -194,7 +200,9 @@
val->print(PRINT_TEST, "[Check 4] Test psa_call and psa_write\n", 0);
- if (val->ipc_connect(SERVER_UNSPECIFED_MINOR_V_SID, 1, &handle))
+ if (val->ipc_connect(SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_UNSPECIFED_VERSION_VERSION,
+ &handle))
{
return VAL_STATUS_CONNECTION_FAILED;
}
@@ -208,7 +216,7 @@
{&data[2], sizeof(data[2])},
{&data[3], sizeof(data[3])}};
- status = psa->call(handle, NULL, 0, resp, 4);
+ status = psa->call(handle, PSA_IPC_CALL, NULL, 0, resp, 4);
if (status < 0)
{
status = VAL_STATUS_CALL_FAILED;
@@ -250,18 +258,21 @@
val->print(PRINT_TEST, "[Check 5] Test psa_set_rhandle API\n", 0);
- /*rhandle value check when PSA_IPC_CONNECT */
- if (val->ipc_connect(SERVER_UNSPECIFED_MINOR_V_SID, 1, &handle))
+ /* rhandle value check when PSA_IPC_CONNECT */
+ if (val->ipc_connect(SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_UNSPECIFED_VERSION_VERSION,
+ &handle))
{
return VAL_STATUS_CONNECTION_FAILED;
}
for (i = 0; i < 3; i++)
{
- /*i=0: rhandle value check when PSA_IPC_CALL */
- /*i=1: rhandle value check after calling psa_set_rhandle() */
- /*i:2: rhandle value check after resetting rhandle to other value */
- status = psa->call(handle, NULL, 0, NULL, 0);
+ /* i=0: rhandle value check when PSA_IPC_CALL
+ * i=1: rhandle value check after calling psa_set_rhandle()
+ * i:2: rhandle value check after resetting rhandle to other value
+ */
+ status = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
if (status < 0)
{
val->print(PRINT_ERROR, "psa_call failed. status=%x\n", status);
@@ -283,7 +294,9 @@
val->print(PRINT_TEST, "[Check 6] Test overlapping vectors\n", 0);
- if (val->ipc_connect(SERVER_UNSPECIFED_MINOR_V_SID, 1, &handle))
+ if (val->ipc_connect(SERVER_UNSPECIFED_VERSION_SID,
+ SERVER_UNSPECIFED_VERSION_VERSION,
+ &handle))
{
return VAL_STATUS_CONNECTION_FAILED;
}
@@ -304,7 +317,7 @@
psa_outvec outvec[2] = {{&data, sizeof(data)},
{&data, sizeof(data)}};
- status = psa->call(handle, invec, 1, outvec, 2);
+ status = psa->call(handle, PSA_IPC_CALL, invec, 1, outvec, 2);
if (status < 0)
{
diff --git a/api-tests/ff/ipc/test_i003/test_i003.h b/api-tests/ff/ipc/test_i003/test_i003.h
index 09e62cd..1d0971b 100644
--- a/api-tests/ff/ipc/test_i003/test_i003.h
+++ b/api-tests/ff/ipc/test_i003/test_i003.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i003)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i003)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i003/test_supp_i003.c b/api-tests/ff/ipc/test_i003/test_supp_i003.c
index eddefce..1043aa7 100644
--- a/api-tests/ff/ipc/test_i003/test_supp_i003.c
+++ b/api-tests/ff/ipc/test_i003/test_supp_i003.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -56,7 +56,7 @@
*/
psa->reply(msg_handle, status_code);
- if (val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
val->print(PRINT_ERROR, "\tdisconnect failed in exit_graceful func\n", 0);
}
@@ -69,14 +69,14 @@
psa_msg_t msg = {0};
int data[5] = {0}, actual_data = 0x22;
- if (val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return VAL_STATUS_CONNECTION_FAILED;
}
psa->reply(msg.handle, PSA_SUCCESS);
- if (val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
exit_graceful(msg.handle, -2, 0, 0, 0);
return VAL_STATUS_CALL_FAILED;
@@ -116,7 +116,7 @@
psa->write(msg.handle, 0, &data[2], msg.out_size[0]);
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
}
@@ -127,14 +127,14 @@
psa_msg_t msg={0};
int data[5] ={0}, actual_data=0x11;
- if (val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return VAL_STATUS_CONNECTION_FAILED;
}
psa->reply(msg.handle, PSA_SUCCESS);
- if (val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
exit_graceful(msg.handle, -2, 0, 0, 0);
return VAL_STATUS_CALL_FAILED;
@@ -176,7 +176,7 @@
psa->write(msg.handle, 2, &data[0], msg.out_size[0]);
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
}
@@ -189,14 +189,14 @@
actual_data[4] = {0}, i;
psa_msg_t msg = {0};
- if (val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return VAL_STATUS_CONNECTION_FAILED;
}
psa->reply(msg.handle, PSA_SUCCESS);
- if (val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
exit_graceful(msg.handle, -2, 0, 0, 0);
return VAL_STATUS_CALL_FAILED;
@@ -332,7 +332,7 @@
}
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
}
@@ -343,14 +343,14 @@
int data[5] = {0xaa, 0xbb, 0xcc, 0xdd, 0xee}, i;
psa_msg_t msg = {0};
- if (val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return VAL_STATUS_CONNECTION_FAILED;
}
psa->reply(msg.handle, PSA_SUCCESS);
- if (val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ if (val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
{
exit_graceful(msg.handle, -2, 0, 0, 0);
return VAL_STATUS_CALL_FAILED;
@@ -391,7 +391,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
}
@@ -403,7 +403,7 @@
int num;
/*rhandle value check when PSA_IPC_CONNECT */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (msg.rhandle != NULL)
{
status = VAL_STATUS_INVALID_HANDLE;
@@ -417,7 +417,7 @@
/*rhandle value check when PSA_IPC_CALL */
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (msg.rhandle != NULL)
{
status = VAL_STATUS_INVALID_HANDLE;
@@ -433,7 +433,7 @@
psa->set_rhandle(msg.handle, &num);
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (*(int *)(msg.rhandle) != num)
{
status = VAL_STATUS_INVALID_HANDLE;
@@ -452,7 +452,7 @@
psa->set_rhandle(msg.handle, &num);
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (*(int *)(msg.rhandle) != num)
{
status = VAL_STATUS_INVALID_HANDLE;
@@ -465,7 +465,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
/* rhandle should retain the value at PSA_IPC_DISCONNECT too */
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (*(int *)(msg.rhandle) != num)
{
status = VAL_STATUS_INVALID_HANDLE;
@@ -490,7 +490,7 @@
rd_data[] = {0x0, 0x0},
expected_data[] = {0x11, 0x22};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(207), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -498,7 +498,7 @@
}
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(208), status))
{
exit_graceful(msg.handle, -1, 0, 0, 0);
@@ -521,7 +521,7 @@
psa->write(msg.handle, 1, &wr_data[1], 1);
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
val->err_check_set(TEST_CHECKPOINT_NUM(209), status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i004/test_i004.c b/api-tests/ff/ipc/test_i004/test_i004.c
index 49f05f1..4c003d8 100644
--- a/api-tests/ff/ipc/test_i004/test_i004.c
+++ b/api-tests/ff/ipc/test_i004/test_i004.c
@@ -91,7 +91,7 @@
return VAL_STATUS_ERROR;
}
- if (handle > 0)
+ if (PSA_HANDLE_IS_VALID(handle))
{
psa->close(handle);
}
diff --git a/api-tests/ff/ipc/test_i004/test_i004.h b/api-tests/ff/ipc/test_i004/test_i004.h
index 6d3aa1f..4edf8ea 100644
--- a/api-tests/ff/ipc/test_i004/test_i004.h
+++ b/api-tests/ff/ipc/test_i004/test_i004.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i004)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i004)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i004/test_supp_i004.c b/api-tests/ff/ipc/test_i004/test_supp_i004.c
index c0f484a..f769fc9 100644
--- a/api-tests/ff/ipc/test_i004/test_supp_i004.c
+++ b/api-tests/ff/ipc/test_i004/test_supp_i004.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i005/test_entry_i005.c b/api-tests/ff/ipc/test_i005/test_entry_i005.c
index e0e2295..099d590 100644
--- a/api-tests/ff/ipc/test_i005/test_entry_i005.c
+++ b/api-tests/ff/ipc/test_i005/test_entry_i005.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,7 @@
#include "test_i005.h"
#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 5)
-#define TEST_DESC "Testing STRICT policy with higher minor version\n"
+#define TEST_DESC "Testing STRICT policy with higher version\n"
TEST_PUBLISH(TEST_NUM, test_entry);
val_api_t *val = NULL;
psa_api_t *psa = NULL;
diff --git a/api-tests/ff/ipc/test_i005/test_i005.c b/api-tests/ff/ipc/test_i005/test_i005.c
index 3c67a05..db59673 100644
--- a/api-tests/ff/ipc/test_i005/test_i005.c
+++ b/api-tests/ff/ipc/test_i005/test_i005.c
@@ -27,16 +27,16 @@
client_test_t test_i005_client_tests_list[] = {
NULL,
- client_test_strict_policy_higher_minor_version,
+ client_test_strict_policy_higher_version,
NULL,
};
-int32_t client_test_strict_policy_higher_minor_version(caller_security_t caller)
+int32_t client_test_strict_policy_higher_version(caller_security_t caller)
{
psa_handle_t handle = 0;
boot_state_t boot_state;
- val->print(PRINT_TEST, "[Check 1] Test STRICT policy with higher minor version\n", 0);
+ val->print(PRINT_TEST, "[Check 1] Test STRICT policy with higher version\n", 0);
/*
* This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
@@ -71,7 +71,7 @@
/* Test check- Version policy is strict and requested version is bigger than
* the minimum version.
*/
- handle = psa->connect(SERVER_STRICT_MINOR_VERSION_SID, 3);
+ handle = psa->connect(SERVER_STRICT_VERSION_SID, SERVER_STRICT_VERSION_VERSION + 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
@@ -85,7 +85,7 @@
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR,
- "\tSTRICT policy with higher minor version should have failed but succeeded\n", 0);
+ "\tSTRICT policy with higher version should have failed but succeeded\n", 0);
/* Resetting boot.state to catch unwanted reboot */
if (val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED))
diff --git a/api-tests/ff/ipc/test_i005/test_i005.h b/api-tests/ff/ipc/test_i005/test_i005.h
index 2f398d0..2aca795 100644
--- a/api-tests/ff/ipc/test_i005/test_i005.h
+++ b/api-tests/ff/ipc/test_i005/test_i005.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i005)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i005)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
@@ -33,5 +33,5 @@
extern client_test_t test_i005_client_tests_list[];
-int32_t client_test_strict_policy_higher_minor_version(caller_security_t);
+int32_t client_test_strict_policy_higher_version(caller_security_t);
#endif
diff --git a/api-tests/ff/ipc/test_i005/test_supp_i005.c b/api-tests/ff/ipc/test_i005/test_supp_i005.c
index 7e819f8..6c9526c 100644
--- a/api-tests/ff/ipc/test_i005/test_supp_i005.c
+++ b/api-tests/ff/ipc/test_i005/test_supp_i005.c
@@ -18,26 +18,26 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
-int32_t server_test_strict_policy_higher_minor_version(void);
+int32_t server_test_strict_policy_higher_version(void);
server_test_t test_i005_server_tests_list[] = {
NULL,
- server_test_strict_policy_higher_minor_version,
+ server_test_strict_policy_higher_version,
NULL,
};
-int32_t server_test_strict_policy_higher_minor_version(void)
+int32_t server_test_strict_policy_higher_version(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_STRICT_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_STRICT_VERSION_SIGNAL, &msg);
/* Shouldn't have reached here */
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
diff --git a/api-tests/ff/ipc/test_i006/test_entry_i006.c b/api-tests/ff/ipc/test_i006/test_entry_i006.c
index 2c83556..13f0b7d 100644
--- a/api-tests/ff/ipc/test_i006/test_entry_i006.c
+++ b/api-tests/ff/ipc/test_i006/test_entry_i006.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,7 @@
#include "test_i006.h"
#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 6)
-#define TEST_DESC "Testing STRICT policy with lower minor version\n"
+#define TEST_DESC "Testing STRICT policy with lower version\n"
TEST_PUBLISH(TEST_NUM, test_entry);
val_api_t *val = NULL;
psa_api_t *psa = NULL;
diff --git a/api-tests/ff/ipc/test_i006/test_i006.c b/api-tests/ff/ipc/test_i006/test_i006.c
index 452508d..7ee0832 100644
--- a/api-tests/ff/ipc/test_i006/test_i006.c
+++ b/api-tests/ff/ipc/test_i006/test_i006.c
@@ -27,16 +27,16 @@
client_test_t test_i006_client_tests_list[] = {
NULL,
- client_test_strict_policy_lower_minor_version,
+ client_test_strict_policy_lower_version,
NULL,
};
-int32_t client_test_strict_policy_lower_minor_version(caller_security_t caller)
+int32_t client_test_strict_policy_lower_version(caller_security_t caller)
{
psa_handle_t handle = 0;
boot_state_t boot_state;
- val->print(PRINT_TEST, "[Check 1] Test STRICT policy with lower minor version\n", 0);
+ val->print(PRINT_TEST, "[Check 1] Test STRICT policy with lower version\n", 0);
/*
* This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
@@ -69,7 +69,7 @@
}
/* Version policy is strict and requested version is smaller than the minimum version */
- handle = psa->connect(SERVER_STRICT_MINOR_VERSION_SID, 1);
+ handle = psa->connect(SERVER_STRICT_VERSION_SID, SERVER_STRICT_VERSION_VERSION - 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
@@ -83,7 +83,7 @@
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR,
- "\tSTRICT policy with lower minor version should have failed but succeeded\n", 0);
+ "\tSTRICT policy with lower version should have failed but succeeded\n", 0);
/* Resetting boot.state to catch unwanted reboot */
if (val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED))
diff --git a/api-tests/ff/ipc/test_i006/test_i006.h b/api-tests/ff/ipc/test_i006/test_i006.h
index e3cd3d1..c3ba7c7 100644
--- a/api-tests/ff/ipc/test_i006/test_i006.h
+++ b/api-tests/ff/ipc/test_i006/test_i006.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i006)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i006)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
@@ -33,5 +33,5 @@
extern client_test_t test_i006_client_tests_list[];
-int32_t client_test_strict_policy_lower_minor_version(caller_security_t);
+int32_t client_test_strict_policy_lower_version(caller_security_t);
#endif
diff --git a/api-tests/ff/ipc/test_i006/test_supp_i006.c b/api-tests/ff/ipc/test_i006/test_supp_i006.c
index 7831d06..23ced7e 100644
--- a/api-tests/ff/ipc/test_i006/test_supp_i006.c
+++ b/api-tests/ff/ipc/test_i006/test_supp_i006.c
@@ -18,26 +18,26 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
-int32_t server_test_strict_policy_lower_minor_version(void);
+int32_t server_test_strict_policy_lower_version(void);
server_test_t test_i006_server_tests_list[] = {
NULL,
- server_test_strict_policy_lower_minor_version,
+ server_test_strict_policy_lower_version,
NULL,
};
-int32_t server_test_strict_policy_lower_minor_version(void)
+int32_t server_test_strict_policy_lower_version(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_STRICT_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_STRICT_VERSION_SIGNAL, &msg);
/* Shouldn't have reached here */
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
diff --git a/api-tests/ff/ipc/test_i007/test_entry_i007.c b/api-tests/ff/ipc/test_i007/test_entry_i007.c
index ddfe3cd..86ea352 100644
--- a/api-tests/ff/ipc/test_i007/test_entry_i007.c
+++ b/api-tests/ff/ipc/test_i007/test_entry_i007.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,7 @@
#include "test_i007.h"
#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 7)
-#define TEST_DESC "Testing RELAX policy with higher minor version\n"
+#define TEST_DESC "Testing RELAX policy with higher version\n"
TEST_PUBLISH(TEST_NUM, test_entry);
val_api_t *val = NULL;
psa_api_t *psa = NULL;
diff --git a/api-tests/ff/ipc/test_i007/test_i007.c b/api-tests/ff/ipc/test_i007/test_i007.c
index 14a3d64..cbbbee5 100644
--- a/api-tests/ff/ipc/test_i007/test_i007.c
+++ b/api-tests/ff/ipc/test_i007/test_i007.c
@@ -27,16 +27,16 @@
client_test_t test_i007_client_tests_list[] = {
NULL,
- client_test_relax_policy_higher_minor_version,
+ client_test_relax_policy_higher_version,
NULL,
};
-int32_t client_test_relax_policy_higher_minor_version(caller_security_t caller)
+int32_t client_test_relax_policy_higher_version(caller_security_t caller)
{
psa_handle_t handle = 0;
boot_state_t boot_state;
- val->print(PRINT_TEST, "[Check 1] Test RELAX policy with higher minor version\n", 0);
+ val->print(PRINT_TEST, "[Check 1] Test RELAX policy with higher version\n", 0);
/*
* This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
@@ -69,7 +69,7 @@
}
/* Version policy is relaxed and requested version is higher than the minimum version */
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 3);
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION + 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
@@ -83,7 +83,7 @@
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR,
- "\tRELAXED policy with higher minor version should have failed but succeeded\n", 0);
+ "\tRELAXED policy with higher version should have failed but succeeded\n", 0);
/* Resetting boot.state to catch unwanted reboot */
if (val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED))
diff --git a/api-tests/ff/ipc/test_i007/test_i007.h b/api-tests/ff/ipc/test_i007/test_i007.h
index 9392229..7929b3a 100644
--- a/api-tests/ff/ipc/test_i007/test_i007.h
+++ b/api-tests/ff/ipc/test_i007/test_i007.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i007)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i007)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
@@ -33,5 +33,5 @@
extern client_test_t test_i007_client_tests_list[];
-int32_t client_test_relax_policy_higher_minor_version(caller_security_t);
+int32_t client_test_relax_policy_higher_version(caller_security_t);
#endif
diff --git a/api-tests/ff/ipc/test_i007/test_supp_i007.c b/api-tests/ff/ipc/test_i007/test_supp_i007.c
index e20d425..96a200e 100644
--- a/api-tests/ff/ipc/test_i007/test_supp_i007.c
+++ b/api-tests/ff/ipc/test_i007/test_supp_i007.c
@@ -18,26 +18,26 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
-int32_t server_test_relax_policy_higher_minor_version(void);
+int32_t server_test_relax_policy_higher_version(void);
server_test_t test_i007_server_tests_list[] = {
NULL,
- server_test_relax_policy_higher_minor_version,
+ server_test_relax_policy_higher_version,
NULL,
};
-int32_t server_test_relax_policy_higher_minor_version(void)
+int32_t server_test_relax_policy_higher_version(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
/* Shouldn't have reached here */
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
diff --git a/api-tests/ff/ipc/test_i008/test_i008.c b/api-tests/ff/ipc/test_i008/test_i008.c
index 982d1d4..d13a4b3 100644
--- a/api-tests/ff/ipc/test_i008/test_i008.c
+++ b/api-tests/ff/ipc/test_i008/test_i008.c
@@ -75,7 +75,7 @@
* It is PROGRAMMER ERROR to connect to secure only access service from nspe.
* Whereas call should succeed if called from spe.
*/
- handle = psa->connect(SERVER_SECURE_CONNECT_ONLY_SID, 1);
+ handle = psa->connect(SERVER_SECURE_CONNECT_ONLY_SID, SERVER_SECURE_CONNECT_ONLY_VERSION);
if (caller == CALLER_NONSECURE)
{
@@ -101,7 +101,7 @@
}
/* Should return positive handle for SPE connection */
- if (handle > 0)
+ if (PSA_HANDLE_IS_VALID(handle))
{
psa->close(handle);
}
diff --git a/api-tests/ff/ipc/test_i008/test_i008.h b/api-tests/ff/ipc/test_i008/test_i008.h
index 9eaaf02..ee762ed 100644
--- a/api-tests/ff/ipc/test_i008/test_i008.h
+++ b/api-tests/ff/ipc/test_i008/test_i008.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i008)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i008)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i008/test_supp_i008.c b/api-tests/ff/ipc/test_i008/test_supp_i008.c
index 22868d3..df13c4c 100644
--- a/api-tests/ff/ipc/test_i008/test_supp_i008.c
+++ b/api-tests/ff/ipc/test_i008/test_supp_i008.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_SECURE_CONNECT_ONLY_SIG, &msg);
+ status = val->process_connect_request(SERVER_SECURE_CONNECT_ONLY_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -63,7 +63,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
}
- status = val->process_disconnect_request(SERVER_SECURE_CONNECT_ONLY_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_SECURE_CONNECT_ONLY_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
diff --git a/api-tests/ff/ipc/test_i009/test_entry_i009.c b/api-tests/ff/ipc/test_i009/test_entry_i009.c
index 992e9e2..8506ac1 100644
--- a/api-tests/ff/ipc/test_i009/test_entry_i009.c
+++ b/api-tests/ff/ipc/test_i009/test_entry_i009.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,7 @@
#include "test_i009.h"
#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 9)
-#define TEST_DESC "Testing unextern SID connection\n"
+#define TEST_DESC "Testing psa_connect with SID unspecified in dependencies\n"
TEST_PUBLISH(TEST_NUM, test_entry);
val_api_t *val = NULL;
psa_api_t *psa = NULL;
diff --git a/api-tests/ff/ipc/test_i009/test_i009.c b/api-tests/ff/ipc/test_i009/test_i009.c
index 5fd1b62..cd53082 100644
--- a/api-tests/ff/ipc/test_i009/test_i009.c
+++ b/api-tests/ff/ipc/test_i009/test_i009.c
@@ -27,15 +27,15 @@
client_test_t test_i009_client_tests_list[] = {
NULL,
- client_test_unextern_sid_connection,
+ client_test_unspecified_dependent_sid,
NULL,
};
-int32_t client_test_unextern_sid_connection(caller_security_t caller)
+int32_t client_test_unspecified_dependent_sid(caller_security_t caller)
{
psa_handle_t handle = 0;
- val->print(PRINT_TEST, "[Check 1] Test unextern SID connection\n", 0);
+ val->print(PRINT_TEST, "[Check 1] Test psa_connect with SID unspecified in dependencies\n", 0);
/*
* This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
@@ -70,7 +70,7 @@
* If access between a client Secure Partition and an RoT Service is not specified in
* the manifest, then the client is not allowed to connect to the RoT Service.
*/
- handle = psa->connect(SERVER_UNEXTERN_SID, 2);
+ handle = psa->connect(SERVER_UNEXTERN_SID, SERVER_UNEXTERN_VERSION);
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR, "\tunextern SID connection should have failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i009/test_i009.h b/api-tests/ff/ipc/test_i009/test_i009.h
index 661e7ca..35d7e15 100644
--- a/api-tests/ff/ipc/test_i009/test_i009.h
+++ b/api-tests/ff/ipc/test_i009/test_i009.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i009)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i009)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
@@ -33,5 +33,5 @@
extern client_test_t test_i009_client_tests_list[];
-int32_t client_test_unextern_sid_connection(caller_security_t);
+int32_t client_test_unspecified_dependent_sid(caller_security_t);
#endif
diff --git a/api-tests/ff/ipc/test_i009/test_supp_i009.c b/api-tests/ff/ipc/test_i009/test_supp_i009.c
index a0f1cca..c6711bc 100644
--- a/api-tests/ff/ipc/test_i009/test_supp_i009.c
+++ b/api-tests/ff/ipc/test_i009/test_supp_i009.c
@@ -18,26 +18,26 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
-int32_t server_test_unextern_sid_connection(void);
+int32_t server_test_unspecified_dependent_sid(void);
server_test_t test_i009_server_tests_list[] = {
NULL,
- server_test_unextern_sid_connection,
+ server_test_unspecified_dependent_sid,
NULL,
};
-int32_t server_test_unextern_sid_connection(void)
+int32_t server_test_unspecified_dependent_sid(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_UNEXTERN_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNEXTERN_SIGNAL, &msg);
/* Shouldn't have reached here */
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
diff --git a/api-tests/ff/ipc/test_i010/test_entry_i010.c b/api-tests/ff/ipc/test_i010/test_entry_i010.c
index fa42b05..e0e72ef 100644
--- a/api-tests/ff/ipc/test_i010/test_entry_i010.c
+++ b/api-tests/ff/ipc/test_i010/test_entry_i010.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,7 @@
#include "test_i010.h"
#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 10)
-#define TEST_DESC "Testing un-specified minor_policy with higher minor version\n"
+#define TEST_DESC "Testing un-specified version_policy with higher version\n"
TEST_PUBLISH(TEST_NUM, test_entry);
val_api_t *val = NULL;
psa_api_t *psa = NULL;
diff --git a/api-tests/ff/ipc/test_i010/test_i010.c b/api-tests/ff/ipc/test_i010/test_i010.c
index 7a2074b..77233b6 100644
--- a/api-tests/ff/ipc/test_i010/test_i010.c
+++ b/api-tests/ff/ipc/test_i010/test_i010.c
@@ -27,17 +27,17 @@
client_test_t test_i010_client_tests_list[] = {
NULL,
- client_test_unspecified_policy_with_higher_minor_ver,
+ client_test_unspecified_policy_with_higher_version,
NULL,
};
-int32_t client_test_unspecified_policy_with_higher_minor_ver(caller_security_t caller)
+int32_t client_test_unspecified_policy_with_higher_version(caller_security_t caller)
{
psa_handle_t handle = 0;
boot_state_t boot_state;
val->print(PRINT_TEST,
- "[Check 1] Test un-specified minor_policy with higher minor version\n", 0);
+ "[Check 1] Test un-specified version_policy with higher version\n", 0);
/*
* This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
@@ -70,11 +70,11 @@
}
/*
- * The minor_version and minor_policy attributes do not need to be specified.
+ * The SID version and version_policy attributes do not need to be specified.
* If they are not specified in the manifest, the RoT Service will have
- * default attributes of minor_version=1 and minor_policy="STRICT".
+ * default attributes of version=1 and version_policy="STRICT".
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 3);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION + 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
@@ -88,7 +88,7 @@
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR,
- "\tun-specified policy with higher minor version should have failed but succeeded\n", 0);
+ "\tun-specified policy with higher version should have failed but succeeded\n", 0);
/* Resetting boot.state to catch unwanted reboot */
if (val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED))
diff --git a/api-tests/ff/ipc/test_i010/test_i010.h b/api-tests/ff/ipc/test_i010/test_i010.h
index f299f98..e5dc30d 100644
--- a/api-tests/ff/ipc/test_i010/test_i010.h
+++ b/api-tests/ff/ipc/test_i010/test_i010.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i010)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i010)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
@@ -33,5 +33,5 @@
extern client_test_t test_i010_client_tests_list[];
-int32_t client_test_unspecified_policy_with_higher_minor_ver(caller_security_t);
+int32_t client_test_unspecified_policy_with_higher_version(caller_security_t);
#endif
diff --git a/api-tests/ff/ipc/test_i010/test_supp_i010.c b/api-tests/ff/ipc/test_i010/test_supp_i010.c
index 6f8ffb8..0429ea5 100644
--- a/api-tests/ff/ipc/test_i010/test_supp_i010.c
+++ b/api-tests/ff/ipc/test_i010/test_supp_i010.c
@@ -18,26 +18,26 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
-int32_t server_test_unspecified_policy_with_higher_minor_ver(void);
+int32_t server_test_unspecified_policy_with_higher_version(void);
server_test_t test_i010_server_tests_list[] = {
NULL,
- server_test_unspecified_policy_with_higher_minor_ver,
+ server_test_unspecified_policy_with_higher_version,
NULL,
};
-int32_t server_test_unspecified_policy_with_higher_minor_ver(void)
+int32_t server_test_unspecified_policy_with_higher_version(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
/* Shouldn't have reached here */
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
diff --git a/api-tests/ff/ipc/test_i011/test_entry_i011.c b/api-tests/ff/ipc/test_i011/test_entry_i011.c
index ef4b6f5..a1ca9c7 100644
--- a/api-tests/ff/ipc/test_i011/test_entry_i011.c
+++ b/api-tests/ff/ipc/test_i011/test_entry_i011.c
@@ -1,5 +1,5 @@
/** @file
- * Copyright (c) 2018, Arm Limited or its affiliates. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -20,7 +20,7 @@
#include "test_i011.h"
#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 11)
-#define TEST_DESC "Testing un-specified minor_policy with lower minor version\n"
+#define TEST_DESC "Testing un-specified version_policy with lower version\n"
TEST_PUBLISH(TEST_NUM, test_entry);
val_api_t *val = NULL;
psa_api_t *psa = NULL;
diff --git a/api-tests/ff/ipc/test_i011/test_i011.c b/api-tests/ff/ipc/test_i011/test_i011.c
index 536d04c..e0996aa 100644
--- a/api-tests/ff/ipc/test_i011/test_i011.c
+++ b/api-tests/ff/ipc/test_i011/test_i011.c
@@ -27,17 +27,17 @@
client_test_t test_i011_client_tests_list[] = {
NULL,
- client_test_unspecified_policy_with_lower_minor_ver,
+ client_test_unspecified_policy_with_lower_version,
NULL,
};
-int32_t client_test_unspecified_policy_with_lower_minor_ver(caller_security_t caller)
+int32_t client_test_unspecified_policy_with_lower_version(caller_security_t caller)
{
psa_handle_t handle = 0;
boot_state_t boot_state;
val->print(PRINT_TEST,
- "[Check 1] Test un-specified minor_policy with higher minor version\n", 0);
+ "[Check 1] Test un-specified version_policy with higher version\n", 0);
/*
* This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
@@ -70,11 +70,13 @@
}
/*
- * The minor_version and minor_policy attributes do not need to be specified.
+ * 1. The SID version and version_policy attributes do not need to be specified.
* If they are not specified in the manifest, the RoT Service will have
- * default attributes of minor_version=1 and minor_policy="STRICT".
+ * default attributes of version=1 and version_policy="STRICT".
+ *
+ * 2. RoT Service version must be non-zero.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 0);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
@@ -88,7 +90,7 @@
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR,
- "\tun-specified policy with lower minor version should have failed but succeeded\n", 0);
+ "\tun-specified policy with lower version should have failed but succeeded\n", 0);
/* Resetting boot.state to catch unwanted reboot */
if (val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED))
diff --git a/api-tests/ff/ipc/test_i011/test_i011.h b/api-tests/ff/ipc/test_i011/test_i011.h
index 3e0b334..db4436d 100644
--- a/api-tests/ff/ipc/test_i011/test_i011.h
+++ b/api-tests/ff/ipc/test_i011/test_i011.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i011)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i011)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
@@ -33,5 +33,5 @@
extern client_test_t test_i011_client_tests_list[];
-int32_t client_test_unspecified_policy_with_lower_minor_ver(caller_security_t);
+int32_t client_test_unspecified_policy_with_lower_version(caller_security_t);
#endif
diff --git a/api-tests/ff/ipc/test_i011/test_supp_i011.c b/api-tests/ff/ipc/test_i011/test_supp_i011.c
index 87d4a4d..97e05df 100644
--- a/api-tests/ff/ipc/test_i011/test_supp_i011.c
+++ b/api-tests/ff/ipc/test_i011/test_supp_i011.c
@@ -18,26 +18,26 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
-int32_t server_test_unspecified_policy_with_lower_minor_ver(void);
+int32_t server_test_unspecified_policy_with_lower_version(void);
server_test_t test_i011_server_tests_list[] = {
NULL,
- server_test_unspecified_policy_with_lower_minor_ver,
+ server_test_unspecified_policy_with_lower_version,
NULL,
};
-int32_t server_test_unspecified_policy_with_lower_minor_ver(void)
+int32_t server_test_unspecified_policy_with_lower_version(void)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
val->err_check_set(TEST_CHECKPOINT_NUM(201), status);
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
/* Shouldn't have reached here */
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
diff --git a/api-tests/ff/ipc/test_i012/test_i012.h b/api-tests/ff/ipc/test_i012/test_i012.h
index fbdd20e..c8b269f 100644
--- a/api-tests/ff/ipc/test_i012/test_i012.h
+++ b/api-tests/ff/ipc/test_i012/test_i012.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i012)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i012)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i012/test_supp_i012.c b/api-tests/ff/ipc/test_i012/test_supp_i012.c
index f6d39b6..0de30cf 100644
--- a/api-tests/ff/ipc/test_i012/test_supp_i012.c
+++ b/api-tests/ff/ipc/test_i012/test_supp_i012.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i013/test_i013.c b/api-tests/ff/ipc/test_i013/test_i013.c
index 9ac96fd..db11275 100644
--- a/api-tests/ff/ipc/test_i013/test_i013.c
+++ b/api-tests/ff/ipc/test_i013/test_i013.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_get with multiple signals\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i013/test_i013.h b/api-tests/ff/ipc/test_i013/test_i013.h
index 99458c5..efcd988 100644
--- a/api-tests/ff/ipc/test_i013/test_i013.h
+++ b/api-tests/ff/ipc/test_i013/test_i013.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i013)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i013)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i013/test_supp_i013.c b/api-tests/ff/ipc/test_i013/test_supp_i013.c
index fb54c3f..640d71f 100644
--- a/api-tests/ff/ipc/test_i013/test_supp_i013.c
+++ b/api-tests/ff/ipc/test_i013/test_supp_i013.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -57,23 +57,23 @@
* VAL APIs to decide test status.
*/
- if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
/* Setting boot.state before test check */
if (val->set_boot_flag(BOOT_EXPECTED_NS))
{
val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
/* Unblock client */
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
- val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
}
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return VAL_STATUS_ERROR;
}
/* multiple signals check */
- psa->get((SERVER_UNSPECIFED_MINOR_V_SIG | SERVER_RELAX_MINOR_VERSION_SIG), &msg);
+ psa->get((SERVER_UNSPECIFED_VERSION_SIGNAL | SERVER_RELAX_VERSION_SIGNAL), &msg);
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
/* Resetting boot.state to catch unwanted reboot */
diff --git a/api-tests/ff/ipc/test_i014/test_i014.c b/api-tests/ff/ipc/test_i014/test_i014.c
index 3da7d74..b6c260a 100644
--- a/api-tests/ff/ipc/test_i014/test_i014.c
+++ b/api-tests/ff/ipc/test_i014/test_i014.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_get called twice\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i014/test_i014.h b/api-tests/ff/ipc/test_i014/test_i014.h
index e92beb7..0825f26 100644
--- a/api-tests/ff/ipc/test_i014/test_i014.h
+++ b/api-tests/ff/ipc/test_i014/test_i014.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i014)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i014)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i014/test_supp_i014.c b/api-tests/ff/ipc/test_i014/test_supp_i014.c
index fe062f4..ab2e938 100644
--- a/api-tests/ff/ipc/test_i014/test_supp_i014.c
+++ b/api-tests/ff/ipc/test_i014/test_supp_i014.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -59,10 +59,10 @@
*/
wait:
- if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
/* First psa_get call */
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -80,7 +80,7 @@
}
/* Second psa_get call. This should panic */
- psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
/* Resetting boot.state to catch unwanted reboot */
diff --git a/api-tests/ff/ipc/test_i015/test_i015.c b/api-tests/ff/ipc/test_i015/test_i015.c
index f1854f3..a23157c 100644
--- a/api-tests/ff/ipc/test_i015/test_i015.c
+++ b/api-tests/ff/ipc/test_i015/test_i015.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_get with non-RoT signal\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i015/test_i015.h b/api-tests/ff/ipc/test_i015/test_i015.h
index 70b647c..b74f6c3 100644
--- a/api-tests/ff/ipc/test_i015/test_i015.h
+++ b/api-tests/ff/ipc/test_i015/test_i015.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i015)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i015)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i015/test_supp_i015.c b/api-tests/ff/ipc/test_i015/test_supp_i015.c
index a044796..6b24b66 100644
--- a/api-tests/ff/ipc/test_i015/test_supp_i015.c
+++ b/api-tests/ff/ipc/test_i015/test_supp_i015.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,14 +58,14 @@
* VAL APIs to decide test status.
*/
- if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
/* Setting boot.state before test check */
status = val->set_boot_flag(BOOT_EXPECTED_NS);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
- psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
}
diff --git a/api-tests/ff/ipc/test_i016/test_i016.c b/api-tests/ff/ipc/test_i016/test_i016.c
index 781d317..cec06b9 100644
--- a/api-tests/ff/ipc/test_i016/test_i016.c
+++ b/api-tests/ff/ipc/test_i016/test_i016.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_get with unasserted signal\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i016/test_i016.h b/api-tests/ff/ipc/test_i016/test_i016.h
index 104803c..16c265d 100644
--- a/api-tests/ff/ipc/test_i016/test_i016.h
+++ b/api-tests/ff/ipc/test_i016/test_i016.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i016)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i016)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i016/test_supp_i016.c b/api-tests/ff/ipc/test_i016/test_supp_i016.c
index 7b4d5e1..5818ebd 100644
--- a/api-tests/ff/ipc/test_i016/test_supp_i016.c
+++ b/api-tests/ff/ipc/test_i016/test_supp_i016.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,20 +58,20 @@
* VAL APIs to decide test status.
*/
- if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if ((psa->wait(PSA_WAIT_ANY, PSA_BLOCK)) & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
/* Setting boot.state before test check */
status = val->set_boot_flag(BOOT_EXPECTED_NS);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
- psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
}
/* Unasserted signal check, call to psa_get should panic */
- psa->get(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ psa->get(SERVER_RELAX_VERSION_SIGNAL, &msg);
/* shouldn't have reached here */
/* Resetting boot.state to catch unwanted reboot */
diff --git a/api-tests/ff/ipc/test_i017/test_i017.c b/api-tests/ff/ipc/test_i017/test_i017.c
index 00a9dc3..4823c46 100644
--- a/api-tests/ff/ipc/test_i017/test_i017.c
+++ b/api-tests/ff/ipc/test_i017/test_i017.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test partition calling its own RoT service\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i017/test_i017.h b/api-tests/ff/ipc/test_i017/test_i017.h
index e5ac1b9..57697d8 100644
--- a/api-tests/ff/ipc/test_i017/test_i017.h
+++ b/api-tests/ff/ipc/test_i017/test_i017.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i017)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i017)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i017/test_supp_i017.c b/api-tests/ff/ipc/test_i017/test_supp_i017.c
index 6c72977..63057a5 100644
--- a/api-tests/ff/ipc/test_i017/test_supp_i017.c
+++ b/api-tests/ff/ipc/test_i017/test_supp_i017.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_handle_t handle = 0;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -75,7 +75,7 @@
}
/* Calling server partition RoT service using IPC and call should panic */
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
/* shouldn't have reached here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i018/test_i018.c b/api-tests/ff/ipc/test_i018/test_i018.c
index 0825ddf..fa40d5f 100644
--- a/api-tests/ff/ipc/test_i018/test_i018.c
+++ b/api-tests/ff/ipc/test_i018/test_i018.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_set_rhandle with invalid msg handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i018/test_i018.h b/api-tests/ff/ipc/test_i018/test_i018.h
index 14e05bc..9bf6c7f 100644
--- a/api-tests/ff/ipc/test_i018/test_i018.h
+++ b/api-tests/ff/ipc/test_i018/test_i018.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i018)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i018)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i018/test_supp_i018.c b/api-tests/ff/ipc/test_i018/test_supp_i018.c
index 5a67aba..6a7afe4 100644
--- a/api-tests/ff/ipc/test_i018/test_supp_i018.c
+++ b/api-tests/ff/ipc/test_i018/test_supp_i018.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
int32_t status = VAL_STATUS_SUCCESS;
int num;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i019/test_i019.c b/api-tests/ff/ipc/test_i019/test_i019.c
index a123bb2..941a82c 100644
--- a/api-tests/ff/ipc/test_i019/test_i019.c
+++ b/api-tests/ff/ipc/test_i019/test_i019.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_set_rhandle with null msg handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i019/test_i019.h b/api-tests/ff/ipc/test_i019/test_i019.h
index c4bcfdc..9e1f146 100644
--- a/api-tests/ff/ipc/test_i019/test_i019.h
+++ b/api-tests/ff/ipc/test_i019/test_i019.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i019)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i019)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i019/test_supp_i019.c b/api-tests/ff/ipc/test_i019/test_supp_i019.c
index af063a6..5e4362c 100644
--- a/api-tests/ff/ipc/test_i019/test_supp_i019.c
+++ b/api-tests/ff/ipc/test_i019/test_supp_i019.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -59,7 +59,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i020/test_i020.c b/api-tests/ff/ipc/test_i020/test_i020.c
index 21d0ab5..7f3dbb5 100644
--- a/api-tests/ff/ipc/test_i020/test_i020.c
+++ b/api-tests/ff/ipc/test_i020/test_i020.c
@@ -39,7 +39,7 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_reply with invalid status code for PSA_IPC_CONNECT\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i020/test_i020.h b/api-tests/ff/ipc/test_i020/test_i020.h
index ccad95b..5c820fc 100644
--- a/api-tests/ff/ipc/test_i020/test_i020.h
+++ b/api-tests/ff/ipc/test_i020/test_i020.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i020)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i020)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i020/test_supp_i020.c b/api-tests/ff/ipc/test_i020/test_supp_i020.c
index 816fd66..4bbc184 100644
--- a/api-tests/ff/ipc/test_i020/test_supp_i020.c
+++ b/api-tests/ff/ipc/test_i020/test_supp_i020.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_status_t invalid_status_code = PSA_ERROR_CONNECTION_REFUSED + 0x10;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i021/test_i021.c b/api-tests/ff/ipc/test_i021/test_i021.c
index ca7f3ee..cdb2107 100644
--- a/api-tests/ff/ipc/test_i021/test_i021.c
+++ b/api-tests/ff/ipc/test_i021/test_i021.c
@@ -38,7 +38,7 @@
/*
* The interrupt related test check is captured in driver_partition.c as this is the
- * only partition in test suite that holds the interrupt line. The interrupt test check
+ * only partition in test suite that holds the interrupt source. The interrupt test check
* is invoked by client by calling to DRIVER_TEST_SID RoT service of driver partition that
* hold the test check.
*/
@@ -46,8 +46,8 @@
val->print(PRINT_TEST, "[Check 1] Test irq routing\n", 0);
/* Connect to DRIVER_TEST_SID */
- handle = psa->connect(DRIVER_TEST_SID, 1);
- if (handle < 0)
+ handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\t psa_connect failed. handle=0x%x\n", handle);
return VAL_STATUS_SPM_FAILED;
@@ -56,7 +56,7 @@
/* Execute driver function related to TEST_INTR_SERVICE */
psa_invec invec = {&driver_test_fn_id, sizeof(driver_test_fn_id)};
- if (psa->call(handle, &invec, 1, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, &invec, 1, NULL, 0) != PSA_SUCCESS)
{
psa->close(handle);
return VAL_STATUS_SPM_FAILED;
diff --git a/api-tests/ff/ipc/test_i021/test_i021.h b/api-tests/ff/ipc/test_i021/test_i021.h
index f532c7f..d99b1d7 100644
--- a/api-tests/ff/ipc/test_i021/test_i021.h
+++ b/api-tests/ff/ipc/test_i021/test_i021.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i021)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i021)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i021/test_supp_i021.c b/api-tests/ff/ipc/test_i021/test_supp_i021.c
index 672f340..1877450 100644
--- a/api-tests/ff/ipc/test_i021/test_supp_i021.c
+++ b/api-tests/ff/ipc/test_i021/test_supp_i021.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i022/test_i022.c b/api-tests/ff/ipc/test_i022/test_i022.c
index cad50be..366d944 100644
--- a/api-tests/ff/ipc/test_i022/test_i022.c
+++ b/api-tests/ff/ipc/test_i022/test_i022.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Testing psa_reply with invalid handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i022/test_i022.h b/api-tests/ff/ipc/test_i022/test_i022.h
index 8c5b5e1..ad0e570 100644
--- a/api-tests/ff/ipc/test_i022/test_i022.h
+++ b/api-tests/ff/ipc/test_i022/test_i022.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i022)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i022)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i022/test_supp_i022.c b/api-tests/ff/ipc/test_i022/test_supp_i022.c
index e2ba391..f952610 100644
--- a/api-tests/ff/ipc/test_i022/test_supp_i022.c
+++ b/api-tests/ff/ipc/test_i022/test_supp_i022.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i023/test_i023.c b/api-tests/ff/ipc/test_i023/test_i023.c
index d81c284..6e0cff1 100644
--- a/api-tests/ff/ipc/test_i023/test_i023.c
+++ b/api-tests/ff/ipc/test_i023/test_i023.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Testing psa_reply with invalid handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tConnection should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i023/test_i023.h b/api-tests/ff/ipc/test_i023/test_i023.h
index 9029a4b..2bd6660 100644
--- a/api-tests/ff/ipc/test_i023/test_i023.h
+++ b/api-tests/ff/ipc/test_i023/test_i023.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i023)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i023)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i023/test_supp_i023.c b/api-tests/ff/ipc/test_i023/test_supp_i023.c
index 4436e4a..11d871f 100644
--- a/api-tests/ff/ipc/test_i023/test_supp_i023.c
+++ b/api-tests/ff/ipc/test_i023/test_supp_i023.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i024/test_i024.c b/api-tests/ff/ipc/test_i024/test_i024.c
index 70aaf67..40de681 100644
--- a/api-tests/ff/ipc/test_i024/test_i024.c
+++ b/api-tests/ff/ipc/test_i024/test_i024.c
@@ -70,7 +70,7 @@
}
/* Test check- psa_call with INVALID_HANDLE */
- status_of_call = psa->call(INVALID_HANDLE, NULL, 0, NULL, 0);
+ status_of_call = psa->call(INVALID_HANDLE, PSA_IPC_CALL, NULL, 0, NULL, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i024/test_i024.h b/api-tests/ff/ipc/test_i024/test_i024.h
index 701382e..3015932 100644
--- a/api-tests/ff/ipc/test_i024/test_i024.h
+++ b/api-tests/ff/ipc/test_i024/test_i024.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i024)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i024)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i024/test_supp_i024.c b/api-tests/ff/ipc/test_i024/test_supp_i024.c
index 60d9895..67b4fc9 100644
--- a/api-tests/ff/ipc/test_i024/test_supp_i024.c
+++ b/api-tests/ff/ipc/test_i024/test_supp_i024.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i025/test_i025.c b/api-tests/ff/ipc/test_i025/test_i025.c
index 753d920..da20375 100644
--- a/api-tests/ff/ipc/test_i025/test_i025.c
+++ b/api-tests/ff/ipc/test_i025/test_i025.c
@@ -70,7 +70,7 @@
}
/* Test check- psa_call with NULL HANDLE */
- status_of_call = psa->call(PSA_NULL_HANDLE, NULL, 0, NULL, 0);
+ status_of_call = psa->call(PSA_NULL_HANDLE, PSA_IPC_CALL, NULL, 0, NULL, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i025/test_i025.h b/api-tests/ff/ipc/test_i025/test_i025.h
index 570c5f3..eaec5a1 100644
--- a/api-tests/ff/ipc/test_i025/test_i025.h
+++ b/api-tests/ff/ipc/test_i025/test_i025.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i025)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i025)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i025/test_supp_i025.c b/api-tests/ff/ipc/test_i025/test_supp_i025.c
index 20f1557..19d70e8 100644
--- a/api-tests/ff/ipc/test_i025/test_supp_i025.c
+++ b/api-tests/ff/ipc/test_i025/test_supp_i025.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i026/test_i026.c b/api-tests/ff/ipc/test_i026/test_i026.c
index 8ead26d..0b186e9 100644
--- a/api-tests/ff/ipc/test_i026/test_i026.c
+++ b/api-tests/ff/ipc/test_i026/test_i026.c
@@ -70,9 +70,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -87,7 +86,7 @@
}
/* Test check- psa_call with IOVEC > PSA_MAX_IOVEC */
- status_of_call = psa->call(handle, invec, PSA_MAX_IOVEC, outvec, 1);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, invec, PSA_MAX_IOVEC, outvec, 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i026/test_i026.h b/api-tests/ff/ipc/test_i026/test_i026.h
index 7c46712..98eb2fe 100644
--- a/api-tests/ff/ipc/test_i026/test_i026.h
+++ b/api-tests/ff/ipc/test_i026/test_i026.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i026)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i026)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i026/test_supp_i026.c b/api-tests/ff/ipc/test_i026/test_supp_i026.c
index 4b1794b..dc5b829 100644
--- a/api-tests/ff/ipc/test_i026/test_supp_i026.c
+++ b/api-tests/ff/ipc/test_i026/test_supp_i026.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i027/test_i027.c b/api-tests/ff/ipc/test_i027/test_i027.c
index f12f940..b346fa7 100644
--- a/api-tests/ff/ipc/test_i027/test_i027.c
+++ b/api-tests/ff/ipc/test_i027/test_i027.c
@@ -63,8 +63,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_CONNECTION_DROP_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_CONNECTION_DROP_SID, SERVER_CONNECTION_DROP_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -78,7 +78,7 @@
return VAL_STATUS_ERROR;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
@@ -94,14 +94,14 @@
return VAL_STATUS_ERROR;
}
- val->print(PRINT_DEBUG, "\tRecieved PSA_ERROR_PROGRAMMER_ERROR\n", 0);
+ val->print(PRINT_DEBUG, "\tReceived PSA_ERROR_PROGRAMMER_ERROR\n", 0);
/* If this call returns PSA_ERROR_PROGRAMMER_ERROR,
* when a valid connection handle was provided, then
* all subsequent calls to psa_call() with the same connection
* handle will immediately return PSA_ERROR_PROGRAMMER_ERROR.
*/
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
if (status_of_call != PSA_ERROR_PROGRAMMER_ERROR)
{
status = VAL_STATUS_SPM_FAILED;
diff --git a/api-tests/ff/ipc/test_i027/test_i027.h b/api-tests/ff/ipc/test_i027/test_i027.h
index 827196f..9a679ea 100644
--- a/api-tests/ff/ipc/test_i027/test_i027.h
+++ b/api-tests/ff/ipc/test_i027/test_i027.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i027)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i027)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i027/test_supp_i027.c b/api-tests/ff/ipc/test_i027/test_supp_i027.c
index c2eb4d3..fe5374b 100644
--- a/api-tests/ff/ipc/test_i027/test_supp_i027.c
+++ b/api-tests/ff/ipc/test_i027/test_supp_i027.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -36,7 +36,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_CONNECTION_DROP_SIG, &msg);
+ status = val->process_connect_request(SERVER_CONNECTION_DROP_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -45,7 +45,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_CONNECTION_DROP_SIG, &msg);
+ status = val->process_call_request(SERVER_CONNECTION_DROP_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -62,7 +62,7 @@
* directly after receipt of the PSA_ERROR_PROGRAMMER_ERROR completion to allow
* connection resources within the RoT Service to be released
*/
- status = val->process_disconnect_request(SERVER_CONNECTION_DROP_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_CONNECTION_DROP_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
val->print(PRINT_ERROR, "\tDisconnect request failed\n", 0);
diff --git a/api-tests/ff/ipc/test_i028/test_i028.c b/api-tests/ff/ipc/test_i028/test_i028.c
index cc1d8e0..7e2f112 100644
--- a/api-tests/ff/ipc/test_i028/test_i028.c
+++ b/api-tests/ff/ipc/test_i028/test_i028.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_read at PSA_IPC_CONNECT\n", 0);
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
/* Shouldn't have reached here */
val->print(PRINT_ERROR, "\tConnection should have failed but succeeded\n", 0);
diff --git a/api-tests/ff/ipc/test_i028/test_i028.h b/api-tests/ff/ipc/test_i028/test_i028.h
index 41b207a..f958ebb 100644
--- a/api-tests/ff/ipc/test_i028/test_i028.h
+++ b/api-tests/ff/ipc/test_i028/test_i028.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i028)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i028)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i028/test_supp_i028.c b/api-tests/ff/ipc/test_i028/test_supp_i028.c
index 3c571e3..02a0023 100644
--- a/api-tests/ff/ipc/test_i028/test_supp_i028.c
+++ b/api-tests/ff/ipc/test_i028/test_supp_i028.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i029/test_i029.c b/api-tests/ff/ipc/test_i029/test_i029.c
index 7c997e4..d208bc8 100644
--- a/api-tests/ff/ipc/test_i029/test_i029.c
+++ b/api-tests/ff/ipc/test_i029/test_i029.c
@@ -37,8 +37,8 @@
val->print(PRINT_TEST, "[Check 1] Test psa_read at PSA_IPC_DISCONNECT\n", 0);
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
- if (handle > 0)
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
+ if (PSA_HANDLE_IS_VALID(handle))
{
psa->close(handle);
}
diff --git a/api-tests/ff/ipc/test_i029/test_i029.h b/api-tests/ff/ipc/test_i029/test_i029.h
index 48a1b75..bc21184 100644
--- a/api-tests/ff/ipc/test_i029/test_i029.h
+++ b/api-tests/ff/ipc/test_i029/test_i029.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i029)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i029)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i029/test_supp_i029.c b/api-tests/ff/ipc/test_i029/test_supp_i029.c
index 0e7aac6..ff9caf9 100644
--- a/api-tests/ff/ipc/test_i029/test_supp_i029.c
+++ b/api-tests/ff/ipc/test_i029/test_supp_i029.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -69,7 +69,7 @@
}
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_SUCCESS);
diff --git a/api-tests/ff/ipc/test_i030/test_i030.c b/api-tests/ff/ipc/test_i030/test_i030.c
index 9b1351a..922f131 100644
--- a/api-tests/ff/ipc/test_i030/test_i030.c
+++ b/api-tests/ff/ipc/test_i030/test_i030.c
@@ -40,15 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_read with NULL handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i030/test_i030.h b/api-tests/ff/ipc/test_i030/test_i030.h
index 20af72f..c5ec886 100644
--- a/api-tests/ff/ipc/test_i030/test_i030.h
+++ b/api-tests/ff/ipc/test_i030/test_i030.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i030)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i030)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i030/test_supp_i030.c b/api-tests/ff/ipc/test_i030/test_supp_i030.c
index 6c67a00..1f46e69 100644
--- a/api-tests/ff/ipc/test_i030/test_supp_i030.c
+++ b/api-tests/ff/ipc/test_i030/test_supp_i030.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -105,7 +105,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i031/test_i031.c b/api-tests/ff/ipc/test_i031/test_i031.c
index 0751f06..25b6975 100644
--- a/api-tests/ff/ipc/test_i031/test_i031.c
+++ b/api-tests/ff/ipc/test_i031/test_i031.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_read with invalid handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i031/test_i031.h b/api-tests/ff/ipc/test_i031/test_i031.h
index 6283b61..849197f 100644
--- a/api-tests/ff/ipc/test_i031/test_i031.h
+++ b/api-tests/ff/ipc/test_i031/test_i031.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i031)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i031)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i031/test_supp_i031.c b/api-tests/ff/ipc/test_i031/test_supp_i031.c
index 9bac47a..94f7389 100644
--- a/api-tests/ff/ipc/test_i031/test_supp_i031.c
+++ b/api-tests/ff/ipc/test_i031/test_supp_i031.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -105,7 +105,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i032/test_i032.c b/api-tests/ff/ipc/test_i032/test_i032.c
index be3f1f1..b790271 100644
--- a/api-tests/ff/ipc/test_i032/test_i032.c
+++ b/api-tests/ff/ipc/test_i032/test_i032.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_read with invec_idx=PSA_MAX_IOVEC\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i032/test_i032.h b/api-tests/ff/ipc/test_i032/test_i032.h
index 48e4d8a..327be5a 100644
--- a/api-tests/ff/ipc/test_i032/test_i032.h
+++ b/api-tests/ff/ipc/test_i032/test_i032.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i032)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i032)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i032/test_supp_i032.c b/api-tests/ff/ipc/test_i032/test_supp_i032.c
index e45d47b..2077133 100644
--- a/api-tests/ff/ipc/test_i032/test_supp_i032.c
+++ b/api-tests/ff/ipc/test_i032/test_supp_i032.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -105,7 +105,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i033/test_i033.c b/api-tests/ff/ipc/test_i033/test_i033.c
index e8e803a..79cad60 100644
--- a/api-tests/ff/ipc/test_i033/test_i033.c
+++ b/api-tests/ff/ipc/test_i033/test_i033.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_read with invec_idx > PSA_MAX_IOVEC\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i033/test_i033.h b/api-tests/ff/ipc/test_i033/test_i033.h
index b4f74cc..3ee5558 100644
--- a/api-tests/ff/ipc/test_i033/test_i033.h
+++ b/api-tests/ff/ipc/test_i033/test_i033.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i033)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i033)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i033/test_supp_i033.c b/api-tests/ff/ipc/test_i033/test_supp_i033.c
index 425c255..676c1cd 100644
--- a/api-tests/ff/ipc/test_i033/test_supp_i033.c
+++ b/api-tests/ff/ipc/test_i033/test_supp_i033.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -105,7 +105,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i034/test_i034.c b/api-tests/ff/ipc/test_i034/test_i034.c
index f7f14ff..a5a18b8 100644
--- a/api-tests/ff/ipc/test_i034/test_i034.c
+++ b/api-tests/ff/ipc/test_i034/test_i034.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_skip at PSA_IPC_CONNECT\n", 0);
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
/* Shouldn't have reached here */
val->print(PRINT_ERROR, "\tConnection should have failed but succeeded\n", 0);
diff --git a/api-tests/ff/ipc/test_i034/test_i034.h b/api-tests/ff/ipc/test_i034/test_i034.h
index 0f0d5b9..0c0001f 100644
--- a/api-tests/ff/ipc/test_i034/test_i034.h
+++ b/api-tests/ff/ipc/test_i034/test_i034.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i034)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i034)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i034/test_supp_i034.c b/api-tests/ff/ipc/test_i034/test_supp_i034.c
index 2580d99..b455d23 100644
--- a/api-tests/ff/ipc/test_i034/test_supp_i034.c
+++ b/api-tests/ff/ipc/test_i034/test_supp_i034.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i035/test_i035.c b/api-tests/ff/ipc/test_i035/test_i035.c
index 1556e7e..aea9bd9 100644
--- a/api-tests/ff/ipc/test_i035/test_i035.c
+++ b/api-tests/ff/ipc/test_i035/test_i035.c
@@ -37,8 +37,8 @@
val->print(PRINT_TEST, "[Check 1] Test psa_skip at PSA_IPC_DISCONNECT\n", 0);
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
- if (handle > 0)
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
+ if (PSA_HANDLE_IS_VALID(handle))
{
psa->close(handle);
}
diff --git a/api-tests/ff/ipc/test_i035/test_i035.h b/api-tests/ff/ipc/test_i035/test_i035.h
index 1312973..8ebc1c3 100644
--- a/api-tests/ff/ipc/test_i035/test_i035.h
+++ b/api-tests/ff/ipc/test_i035/test_i035.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i035)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i035)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i035/test_supp_i035.c b/api-tests/ff/ipc/test_i035/test_supp_i035.c
index a355148..c9caa9e 100644
--- a/api-tests/ff/ipc/test_i035/test_supp_i035.c
+++ b/api-tests/ff/ipc/test_i035/test_supp_i035.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -66,7 +66,7 @@
}
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_SUCCESS);
diff --git a/api-tests/ff/ipc/test_i036/test_i036.c b/api-tests/ff/ipc/test_i036/test_i036.c
index 87f6f2a..a54ab14 100644
--- a/api-tests/ff/ipc/test_i036/test_i036.c
+++ b/api-tests/ff/ipc/test_i036/test_i036.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_skip with NULL handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i036/test_i036.h b/api-tests/ff/ipc/test_i036/test_i036.h
index 7be6f54..ebce979 100644
--- a/api-tests/ff/ipc/test_i036/test_i036.h
+++ b/api-tests/ff/ipc/test_i036/test_i036.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i036)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i036)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i036/test_supp_i036.c b/api-tests/ff/ipc/test_i036/test_supp_i036.c
index b61bbfe..1a47f3f 100644
--- a/api-tests/ff/ipc/test_i036/test_supp_i036.c
+++ b/api-tests/ff/ipc/test_i036/test_supp_i036.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -67,7 +67,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -102,7 +102,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i037/test_i037.c b/api-tests/ff/ipc/test_i037/test_i037.c
index 306990e..c428c43 100644
--- a/api-tests/ff/ipc/test_i037/test_i037.c
+++ b/api-tests/ff/ipc/test_i037/test_i037.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_skip with invalid handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i037/test_i037.h b/api-tests/ff/ipc/test_i037/test_i037.h
index 051565f..29d6346 100644
--- a/api-tests/ff/ipc/test_i037/test_i037.h
+++ b/api-tests/ff/ipc/test_i037/test_i037.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i037)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i037)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i037/test_supp_i037.c b/api-tests/ff/ipc/test_i037/test_supp_i037.c
index 9ed9963..a4d0f6f 100644
--- a/api-tests/ff/ipc/test_i037/test_supp_i037.c
+++ b/api-tests/ff/ipc/test_i037/test_supp_i037.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -67,7 +67,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -102,7 +102,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i038/test_i038.c b/api-tests/ff/ipc/test_i038/test_i038.c
index 2cb1f9f..b75ed58 100644
--- a/api-tests/ff/ipc/test_i038/test_i038.c
+++ b/api-tests/ff/ipc/test_i038/test_i038.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_skip with invec_idx=PSA_MAX_IOVEC\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i038/test_i038.h b/api-tests/ff/ipc/test_i038/test_i038.h
index 8da20a3..162466f 100644
--- a/api-tests/ff/ipc/test_i038/test_i038.h
+++ b/api-tests/ff/ipc/test_i038/test_i038.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i038)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i038)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i038/test_supp_i038.c b/api-tests/ff/ipc/test_i038/test_supp_i038.c
index 540440d..bcd8dbe 100644
--- a/api-tests/ff/ipc/test_i038/test_supp_i038.c
+++ b/api-tests/ff/ipc/test_i038/test_supp_i038.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -67,7 +67,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -104,7 +104,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i039/test_i039.c b/api-tests/ff/ipc/test_i039/test_i039.c
index 2582094..c6cdd24 100644
--- a/api-tests/ff/ipc/test_i039/test_i039.c
+++ b/api-tests/ff/ipc/test_i039/test_i039.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_skip with invec_idx > PSA_MAX_IOVEC\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i039/test_i039.h b/api-tests/ff/ipc/test_i039/test_i039.h
index e9862df..9d5ae47 100644
--- a/api-tests/ff/ipc/test_i039/test_i039.h
+++ b/api-tests/ff/ipc/test_i039/test_i039.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i039)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i039)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i039/test_supp_i039.c b/api-tests/ff/ipc/test_i039/test_supp_i039.c
index 9b4b3c6..eb788b8 100644
--- a/api-tests/ff/ipc/test_i039/test_supp_i039.c
+++ b/api-tests/ff/ipc/test_i039/test_supp_i039.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -58,7 +58,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -67,7 +67,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -104,7 +104,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i040/test_i040.c b/api-tests/ff/ipc/test_i040/test_i040.c
index 412f0bf..18c95bf 100644
--- a/api-tests/ff/ipc/test_i040/test_i040.c
+++ b/api-tests/ff/ipc/test_i040/test_i040.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_write at PSA_IPC_CONNECT\n", 0);
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
/* Shouldn't have reached here */
val->print(PRINT_ERROR, "\tConnection should have failed but succeeded\n", 0);
diff --git a/api-tests/ff/ipc/test_i040/test_i040.h b/api-tests/ff/ipc/test_i040/test_i040.h
index de982eb..f865a10 100644
--- a/api-tests/ff/ipc/test_i040/test_i040.h
+++ b/api-tests/ff/ipc/test_i040/test_i040.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i040)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i040)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i040/test_supp_i040.c b/api-tests/ff/ipc/test_i040/test_supp_i040.c
index 8ea608b..2ba2015 100644
--- a/api-tests/ff/ipc/test_i040/test_supp_i040.c
+++ b/api-tests/ff/ipc/test_i040/test_supp_i040.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i041/test_i041.c b/api-tests/ff/ipc/test_i041/test_i041.c
index bd5060d..2866b6c 100644
--- a/api-tests/ff/ipc/test_i041/test_i041.c
+++ b/api-tests/ff/ipc/test_i041/test_i041.c
@@ -37,8 +37,8 @@
val->print(PRINT_TEST, "[Check 1] Test psa_write at PSA_IPC_DISCONNECT\n", 0);
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
- if (handle > 0)
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
+ if (PSA_HANDLE_IS_VALID(handle))
{
psa->close(handle);
}
diff --git a/api-tests/ff/ipc/test_i041/test_i041.h b/api-tests/ff/ipc/test_i041/test_i041.h
index 617639b..c43d574 100644
--- a/api-tests/ff/ipc/test_i041/test_i041.h
+++ b/api-tests/ff/ipc/test_i041/test_i041.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i041)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i041)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i041/test_supp_i041.c b/api-tests/ff/ipc/test_i041/test_supp_i041.c
index 8b3d2b3..d7365ac 100644
--- a/api-tests/ff/ipc/test_i041/test_supp_i041.c
+++ b/api-tests/ff/ipc/test_i041/test_supp_i041.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_connect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -69,7 +69,7 @@
}
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_RELAX_MINOR_VERSION_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_RELAX_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_SUCCESS);
diff --git a/api-tests/ff/ipc/test_i042/test_i042.c b/api-tests/ff/ipc/test_i042/test_i042.c
index 522f558..9977cb5 100644
--- a/api-tests/ff/ipc/test_i042/test_i042.c
+++ b/api-tests/ff/ipc/test_i042/test_i042.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_write with NULL handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i042/test_i042.h b/api-tests/ff/ipc/test_i042/test_i042.h
index fd25e4b..42713df 100644
--- a/api-tests/ff/ipc/test_i042/test_i042.h
+++ b/api-tests/ff/ipc/test_i042/test_i042.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i042)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i042)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i042/test_supp_i042.c b/api-tests/ff/ipc/test_i042/test_supp_i042.c
index 1257cdf..0ea1a9a 100644
--- a/api-tests/ff/ipc/test_i042/test_supp_i042.c
+++ b/api-tests/ff/ipc/test_i042/test_supp_i042.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -59,7 +59,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -68,7 +68,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -101,7 +101,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i043/test_i043.c b/api-tests/ff/ipc/test_i043/test_i043.c
index aeeea43..e068910 100644
--- a/api-tests/ff/ipc/test_i043/test_i043.c
+++ b/api-tests/ff/ipc/test_i043/test_i043.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_write with invalid handle\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i043/test_i043.h b/api-tests/ff/ipc/test_i043/test_i043.h
index e618a3d..56250f9 100644
--- a/api-tests/ff/ipc/test_i043/test_i043.h
+++ b/api-tests/ff/ipc/test_i043/test_i043.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i043)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i043)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i043/test_supp_i043.c b/api-tests/ff/ipc/test_i043/test_supp_i043.c
index 5123753..a5dcc9b 100644
--- a/api-tests/ff/ipc/test_i043/test_supp_i043.c
+++ b/api-tests/ff/ipc/test_i043/test_supp_i043.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -106,7 +106,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i044/test_i044.c b/api-tests/ff/ipc/test_i044/test_i044.c
index 339d84d..f67150a 100644
--- a/api-tests/ff/ipc/test_i044/test_i044.c
+++ b/api-tests/ff/ipc/test_i044/test_i044.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_write with invec_idx=PSA_MAX_IOVEC\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i044/test_i044.h b/api-tests/ff/ipc/test_i044/test_i044.h
index 423b923..19e32d3 100644
--- a/api-tests/ff/ipc/test_i044/test_i044.h
+++ b/api-tests/ff/ipc/test_i044/test_i044.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i044)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i044)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i044/test_supp_i044.c b/api-tests/ff/ipc/test_i044/test_supp_i044.c
index b4e4cae..3b50696 100644
--- a/api-tests/ff/ipc/test_i044/test_supp_i044.c
+++ b/api-tests/ff/ipc/test_i044/test_supp_i044.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -106,7 +106,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i045/test_i045.c b/api-tests/ff/ipc/test_i045/test_i045.c
index a046106..1b4c6b4 100644
--- a/api-tests/ff/ipc/test_i045/test_i045.c
+++ b/api-tests/ff/ipc/test_i045/test_i045.c
@@ -40,14 +40,14 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_write with invec_idx > PSA_MAX_IOVEC\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
- status_of_call = psa->call(handle, NULL, 0, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i045/test_i045.h b/api-tests/ff/ipc/test_i045/test_i045.h
index 66221a8..04e11c0 100644
--- a/api-tests/ff/ipc/test_i045/test_i045.h
+++ b/api-tests/ff/ipc/test_i045/test_i045.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i045)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i045)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i045/test_supp_i045.c b/api-tests/ff/ipc/test_i045/test_supp_i045.c
index 260e6ff..caeb823 100644
--- a/api-tests/ff/ipc/test_i045/test_supp_i045.c
+++ b/api-tests/ff/ipc/test_i045/test_supp_i045.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -106,7 +106,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i046/test_i046.c b/api-tests/ff/ipc/test_i046/test_i046.c
index 7281286..f0efdf5 100644
--- a/api-tests/ff/ipc/test_i046/test_i046.c
+++ b/api-tests/ff/ipc/test_i046/test_i046.c
@@ -41,8 +41,8 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_write with size overflow\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -50,7 +50,7 @@
psa_outvec resp = {&data, sizeof(data)};
- status_of_call = psa->call(handle, NULL, 0, &resp, 1);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, &resp, 1);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i046/test_i046.h b/api-tests/ff/ipc/test_i046/test_i046.h
index 340bd12..f2f7a7e 100644
--- a/api-tests/ff/ipc/test_i046/test_i046.h
+++ b/api-tests/ff/ipc/test_i046/test_i046.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i046)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i046)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i046/test_supp_i046.c b/api-tests/ff/ipc/test_i046/test_supp_i046.c
index 8a4513a..450d712 100644
--- a/api-tests/ff/ipc/test_i046/test_supp_i046.c
+++ b/api-tests/ff/ipc/test_i046/test_supp_i046.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -61,7 +61,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -70,7 +70,7 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -106,7 +106,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i047/test_i047.c b/api-tests/ff/ipc/test_i047/test_i047.c
index 3271b93..d08096b 100644
--- a/api-tests/ff/ipc/test_i047/test_i047.c
+++ b/api-tests/ff/ipc/test_i047/test_i047.c
@@ -38,8 +38,8 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_get with invalid msg pointer\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle > 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (PSA_HANDLE_IS_VALID(handle))
{
psa->close(handle);
}
diff --git a/api-tests/ff/ipc/test_i047/test_i047.h b/api-tests/ff/ipc/test_i047/test_i047.h
index db30d76..c8f2d52 100644
--- a/api-tests/ff/ipc/test_i047/test_i047.h
+++ b/api-tests/ff/ipc/test_i047/test_i047.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i047)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i047)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i047/test_supp_i047.c b/api-tests/ff/ipc/test_i047/test_supp_i047.c
index 82e43df..eeef031 100644
--- a/api-tests/ff/ipc/test_i047/test_supp_i047.c
+++ b/api-tests/ff/ipc/test_i047/test_supp_i047.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,6 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_signal_t signals = 0;
psa_msg_t *invalid_msg = NULL;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
/*
@@ -62,8 +61,8 @@
* VAL APIs to decide test status.
*/
- signals = psa->wait(SERVER_UNSPECIFED_MINOR_V_SIG, PSA_BLOCK);
- if ((signals & SERVER_UNSPECIFED_MINOR_V_SIG) == 0)
+ signals = psa->wait(SERVER_UNSPECIFED_VERSION_SIGNAL, PSA_BLOCK);
+ if ((signals & SERVER_UNSPECIFED_VERSION_SIGNAL) == 0)
{
val->print(PRINT_ERROR,
"psa_wait returned with invalid signal value = 0x%x\n", signals);
@@ -79,22 +78,13 @@
* msg_pointer = NULL;
*/
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
- if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
- {
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
{
status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MEMORY,
MEMORY_DRIVER_PARTITION_MMIO, 0),
(uint8_t **)&memory_desc,
(uint32_t *)sizeof(memory_desc_t));
- if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
return status;
}
@@ -110,7 +100,7 @@
}
/* psa_get with invalid msg pointer, call should panic */
- psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, invalid_msg);
+ psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, invalid_msg);
/* shouldn't have reached here */
val->print(PRINT_ERROR,
diff --git a/api-tests/ff/ipc/test_i048/test_i048.c b/api-tests/ff/ipc/test_i048/test_i048.c
index 13f6d79..d55611a 100644
--- a/api-tests/ff/ipc/test_i048/test_i048.c
+++ b/api-tests/ff/ipc/test_i048/test_i048.c
@@ -37,7 +37,6 @@
psa_handle_t handle = 0;
psa_status_t status_of_call;
boot_state_t boot_state;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
psa_invec *invalid_invec = NULL;
@@ -66,9 +65,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -102,18 +100,7 @@
invalid_invec = (psa_invec *) memory_desc->start;
else
{
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
-
- if (val->err_check_set(TEST_CHECKPOINT_NUM(102), status))
- {
- psa->close(handle);
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
invalid_invec = (psa_invec *) memory_desc->start;
}
@@ -126,7 +113,7 @@
}
/* Test check- psa_call with invalid address for in_vec */
- status_of_call = psa->call(handle, invalid_invec, 1, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, invalid_invec, 1, NULL, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i048/test_i048.h b/api-tests/ff/ipc/test_i048/test_i048.h
index 05101e2..b614ac5 100644
--- a/api-tests/ff/ipc/test_i048/test_i048.h
+++ b/api-tests/ff/ipc/test_i048/test_i048.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i048)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i048)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i048/test_supp_i048.c b/api-tests/ff/ipc/test_i048/test_supp_i048.c
index 51b11da..167f2c3 100644
--- a/api-tests/ff/ipc/test_i048/test_supp_i048.c
+++ b/api-tests/ff/ipc/test_i048/test_supp_i048.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i049/test_i049.c b/api-tests/ff/ipc/test_i049/test_i049.c
index db4b1f8..590944d 100644
--- a/api-tests/ff/ipc/test_i049/test_i049.c
+++ b/api-tests/ff/ipc/test_i049/test_i049.c
@@ -37,7 +37,6 @@
psa_handle_t handle = 0;
psa_status_t status_of_call;
boot_state_t boot_state;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
psa_outvec *invalid_outvec = NULL;
@@ -66,9 +65,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -102,18 +100,7 @@
invalid_outvec = (psa_outvec *) memory_desc->start;
else
{
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
-
- if (val->err_check_set(TEST_CHECKPOINT_NUM(102), status))
- {
- psa->close(handle);
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
invalid_outvec = (psa_outvec *) memory_desc->start;
}
@@ -126,7 +113,7 @@
}
/* Test check- psa_call with invalid address for outvec */
- status_of_call = psa->call(handle, NULL, 0, invalid_outvec, 1);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, invalid_outvec, 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i049/test_i049.h b/api-tests/ff/ipc/test_i049/test_i049.h
index 90aa10b..9dcdbaf 100644
--- a/api-tests/ff/ipc/test_i049/test_i049.h
+++ b/api-tests/ff/ipc/test_i049/test_i049.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i049)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i049)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i049/test_supp_i049.c b/api-tests/ff/ipc/test_i049/test_supp_i049.c
index 23b52b8..0d62b78 100644
--- a/api-tests/ff/ipc/test_i049/test_supp_i049.c
+++ b/api-tests/ff/ipc/test_i049/test_supp_i049.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i050/test_i050.c b/api-tests/ff/ipc/test_i050/test_i050.c
index 46f09b5..6418b6e 100644
--- a/api-tests/ff/ipc/test_i050/test_i050.c
+++ b/api-tests/ff/ipc/test_i050/test_i050.c
@@ -37,7 +37,6 @@
psa_handle_t handle = 0;
psa_status_t status_of_call;
boot_state_t boot_state;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
addr_t *invalid_base = NULL;
@@ -66,9 +65,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -102,18 +100,7 @@
invalid_base = (addr_t *) memory_desc->start;
else
{
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
-
- if (val->err_check_set(TEST_CHECKPOINT_NUM(102), status))
- {
- psa->close(handle);
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
invalid_base = (addr_t *) memory_desc->start;
}
@@ -128,7 +115,7 @@
psa_invec invec[1] = {{invalid_base, sizeof(addr_t)}};
/* Test check- psa_call with invalid address for psa_invec.base */
- status_of_call = psa->call(handle, invec, 1, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, invec, 1, NULL, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i050/test_i050.h b/api-tests/ff/ipc/test_i050/test_i050.h
index 0c3e111..c946db9 100644
--- a/api-tests/ff/ipc/test_i050/test_i050.h
+++ b/api-tests/ff/ipc/test_i050/test_i050.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i050)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i050)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i050/test_supp_i050.c b/api-tests/ff/ipc/test_i050/test_supp_i050.c
index 9c09445..cf8fb79 100644
--- a/api-tests/ff/ipc/test_i050/test_supp_i050.c
+++ b/api-tests/ff/ipc/test_i050/test_supp_i050.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i051/test_i051.c b/api-tests/ff/ipc/test_i051/test_i051.c
index 0183fc9..2c44181 100644
--- a/api-tests/ff/ipc/test_i051/test_i051.c
+++ b/api-tests/ff/ipc/test_i051/test_i051.c
@@ -37,7 +37,6 @@
psa_handle_t handle = 0;
psa_status_t status_of_call;
boot_state_t boot_state;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
addr_t *invalid_base = NULL;
@@ -66,9 +65,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -102,18 +100,7 @@
invalid_base = (addr_t *) memory_desc->start;
else
{
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
-
- if (val->err_check_set(TEST_CHECKPOINT_NUM(102), status))
- {
- psa->close(handle);
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
invalid_base = (addr_t *) memory_desc->start;
}
@@ -128,7 +115,7 @@
psa_outvec outvec[1] = {{invalid_base, sizeof(addr_t)}};
/* Test check- psa_call with invalid address for psa_outvec.base */
- status_of_call = psa->call(handle, NULL, 0, outvec, 1);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i051/test_i051.h b/api-tests/ff/ipc/test_i051/test_i051.h
index 4f76c00..ecd1c22 100644
--- a/api-tests/ff/ipc/test_i051/test_i051.h
+++ b/api-tests/ff/ipc/test_i051/test_i051.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i051)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i051)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i051/test_supp_i051.c b/api-tests/ff/ipc/test_i051/test_supp_i051.c
index 0d3be0b..42cda89 100644
--- a/api-tests/ff/ipc/test_i051/test_supp_i051.c
+++ b/api-tests/ff/ipc/test_i051/test_supp_i051.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i052/test_entry_i052.c b/api-tests/ff/ipc/test_i052/test_entry_i052.c
index ddbc149..bf642a4 100644
--- a/api-tests/ff/ipc/test_i052/test_entry_i052.c
+++ b/api-tests/ff/ipc/test_i052/test_entry_i052.c
@@ -28,7 +28,6 @@
void test_entry(val_api_t *val_api, psa_api_t *psa_api)
{
int32_t status = VAL_STATUS_SUCCESS;
- miscellaneous_desc_t *misc_desc;
val = val_api;
psa = psa_api;
@@ -47,16 +46,7 @@
goto test_exit;
}
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
- if (VAL_ERROR(status))
- {
- goto test_exit;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
{
/* Switch to secure side (client_partition.c) and execute list of tests available in
test[num]_client_tests_list from Secure side */
diff --git a/api-tests/ff/ipc/test_i052/test_i052.c b/api-tests/ff/ipc/test_i052/test_i052.c
index f90a48f..724ecd3 100644
--- a/api-tests/ff/ipc/test_i052/test_i052.c
+++ b/api-tests/ff/ipc/test_i052/test_i052.c
@@ -67,9 +67,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -126,7 +125,7 @@
psa_invec invec[1] = {{valid_base, invalid_size}};
/* Test check- psa_call with invalid end_addr for psa_invec */
- status_of_call = psa->call(handle, invec, 1, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, invec, 1, NULL, 0);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i052/test_i052.h b/api-tests/ff/ipc/test_i052/test_i052.h
index 32edabc..4b53371 100644
--- a/api-tests/ff/ipc/test_i052/test_i052.h
+++ b/api-tests/ff/ipc/test_i052/test_i052.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i052)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i052)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i052/test_supp_i052.c b/api-tests/ff/ipc/test_i052/test_supp_i052.c
index 31bc32b..760ec0c 100644
--- a/api-tests/ff/ipc/test_i052/test_supp_i052.c
+++ b/api-tests/ff/ipc/test_i052/test_supp_i052.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i053/test_entry_i053.c b/api-tests/ff/ipc/test_i053/test_entry_i053.c
index 014dfaf..0cfea2b 100644
--- a/api-tests/ff/ipc/test_i053/test_entry_i053.c
+++ b/api-tests/ff/ipc/test_i053/test_entry_i053.c
@@ -28,7 +28,6 @@
void test_entry(val_api_t *val_api, psa_api_t *psa_api)
{
int32_t status = VAL_STATUS_SUCCESS;
- miscellaneous_desc_t *misc_desc;
val = val_api;
psa = psa_api;
@@ -47,16 +46,7 @@
goto test_exit;
}
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
- if (VAL_ERROR(status))
- {
- goto test_exit;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
{
/* Switch to secure side (client_partition.c) and execute list of tests available in
test[num]_client_tests_list from Secure side */
diff --git a/api-tests/ff/ipc/test_i053/test_i053.c b/api-tests/ff/ipc/test_i053/test_i053.c
index 025f5cd..f08febc 100644
--- a/api-tests/ff/ipc/test_i053/test_i053.c
+++ b/api-tests/ff/ipc/test_i053/test_i053.c
@@ -67,9 +67,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
-
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -126,7 +125,7 @@
psa_outvec outvec[1] = {{valid_base, invalid_size}};
/* Test check- psa_call with invalid end_addr for psa_outvec */
- status_of_call = psa->call(handle, NULL, 0, outvec, 1);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1);
/*
* If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
diff --git a/api-tests/ff/ipc/test_i053/test_i053.h b/api-tests/ff/ipc/test_i053/test_i053.h
index d1780df..8efc2ed 100644
--- a/api-tests/ff/ipc/test_i053/test_i053.h
+++ b/api-tests/ff/ipc/test_i053/test_i053.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i053)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i053)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i053/test_supp_i053.c b/api-tests/ff/ipc/test_i053/test_supp_i053.c
index 649e3c2..984ef25 100644
--- a/api-tests/ff/ipc/test_i053/test_supp_i053.c
+++ b/api-tests/ff/ipc/test_i053/test_supp_i053.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i054/test_i054.c b/api-tests/ff/ipc/test_i054/test_i054.c
index 8f6f25f..8c7caee 100644
--- a/api-tests/ff/ipc/test_i054/test_i054.c
+++ b/api-tests/ff/ipc/test_i054/test_i054.c
@@ -61,8 +61,8 @@
* VAL APIs to decide test status.
*/
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -79,7 +79,7 @@
psa_outvec outvec[1] = {{&client_test_psa_call_with_not_writable_outvec_base, sizeof(char)}};
/* Test check- psa_call with not writable psa_outvec.base, call should panic */
- psa->call(handle, NULL, 0, outvec, 1);
+ psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1);
/* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
val->print(PRINT_ERROR, "\tpsa_call should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i054/test_i054.h b/api-tests/ff/ipc/test_i054/test_i054.h
index 74d4f46..4850726 100644
--- a/api-tests/ff/ipc/test_i054/test_i054.h
+++ b/api-tests/ff/ipc/test_i054/test_i054.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i054)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i054)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i054/test_supp_i054.c b/api-tests/ff/ipc/test_i054/test_supp_i054.c
index 7544257..ca8f4cc 100644
--- a/api-tests/ff/ipc/test_i054/test_supp_i054.c
+++ b/api-tests/ff/ipc/test_i054/test_supp_i054.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
psa_signal_t signals;
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -48,9 +48,9 @@
wait:
signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
- if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
{
goto wait;
}
@@ -60,7 +60,7 @@
/* Control shouldn't have come here */
val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
psa->reply(msg.handle, -2);
- val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
psa->reply(msg.handle, PSA_SUCCESS);
}
else if (msg.type == PSA_IPC_DISCONNECT)
diff --git a/api-tests/ff/ipc/test_i055/test_i055.c b/api-tests/ff/ipc/test_i055/test_i055.c
index c5d72a7..16582f5 100644
--- a/api-tests/ff/ipc/test_i055/test_i055.c
+++ b/api-tests/ff/ipc/test_i055/test_i055.c
@@ -41,15 +41,15 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_read with invalid buffer addr\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
psa_invec invec[1] = {{&data, sizeof(data)}};
- status_of_call = psa->call(handle, invec, 1, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, invec, 1, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i055/test_i055.h b/api-tests/ff/ipc/test_i055/test_i055.h
index 0bbd7d4..0f949a0 100644
--- a/api-tests/ff/ipc/test_i055/test_i055.h
+++ b/api-tests/ff/ipc/test_i055/test_i055.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i055)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i055)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i055/test_supp_i055.c b/api-tests/ff/ipc/test_i055/test_supp_i055.c
index 2486795..12439d7 100644
--- a/api-tests/ff/ipc/test_i055/test_supp_i055.c
+++ b/api-tests/ff/ipc/test_i055/test_supp_i055.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -36,7 +36,6 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
void *buffer = NULL;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
/*
@@ -61,14 +60,13 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
}
-
/*
* Selection of invalid buffer addr:
*
@@ -78,23 +76,13 @@
* buffer = NULL;
*/
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
- if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
- {
- psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
{
status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MEMORY,
MEMORY_DRIVER_PARTITION_MMIO, 0),
(uint8_t **)&memory_desc,
(uint32_t *)sizeof(memory_desc_t));
- if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
@@ -107,8 +95,8 @@
psa->reply(msg.handle, PSA_SUCCESS);
/* Serve psa_call */
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
- if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
psa->reply(msg.handle, -2);
}
@@ -116,7 +104,7 @@
{
/* Setting boot.state before test check */
status = val->set_boot_flag(BOOT_EXPECTED_NS);
- if (val->err_check_set(TEST_CHECKPOINT_NUM(205), status))
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
psa->reply(msg.handle, -3);
@@ -141,8 +129,8 @@
}
}
- val->err_check_set(TEST_CHECKPOINT_NUM(206), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ val->err_check_set(TEST_CHECKPOINT_NUM(205), status);
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i056/test_i056.c b/api-tests/ff/ipc/test_i056/test_i056.c
index 2b1bee3..f0697bc 100644
--- a/api-tests/ff/ipc/test_i056/test_i056.c
+++ b/api-tests/ff/ipc/test_i056/test_i056.c
@@ -41,15 +41,15 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_read with invalid buffer addr\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
psa_invec invec[1] = {{&data, sizeof(data)}};
- status_of_call = psa->call(handle, invec, 1, NULL, 0);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, invec, 1, NULL, 0);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i056/test_i056.h b/api-tests/ff/ipc/test_i056/test_i056.h
index f93524e..1c2dcfe 100644
--- a/api-tests/ff/ipc/test_i056/test_i056.h
+++ b/api-tests/ff/ipc/test_i056/test_i056.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i056)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i056)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i056/test_supp_i056.c b/api-tests/ff/ipc/test_i056/test_supp_i056.c
index 3a86310..655d62a 100644
--- a/api-tests/ff/ipc/test_i056/test_supp_i056.c
+++ b/api-tests/ff/ipc/test_i056/test_supp_i056.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -59,7 +59,7 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -73,7 +73,7 @@
buffer = (void *) &server_test_psa_read_with_not_writable_buffer_addr;
/* Serve psa_call */
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
@@ -109,7 +109,7 @@
}
val->err_check_set(TEST_CHECKPOINT_NUM(204), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i057/test_i057.c b/api-tests/ff/ipc/test_i057/test_i057.c
index ca43cb9..2995393 100644
--- a/api-tests/ff/ipc/test_i057/test_i057.c
+++ b/api-tests/ff/ipc/test_i057/test_i057.c
@@ -41,15 +41,15 @@
val->print(PRINT_TEST,
"[Check 1] Test psa_write with invalid buffer addr\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
}
psa_outvec outvec[1] = {{&data, sizeof(data)}};
- status_of_call = psa->call(handle, NULL, 0, outvec, 1);
+ status_of_call = psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1);
/* Expectation is server test should hang and control shouldn't have come here */
val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
diff --git a/api-tests/ff/ipc/test_i057/test_i057.h b/api-tests/ff/ipc/test_i057/test_i057.h
index de59b55..8fa8a1d 100644
--- a/api-tests/ff/ipc/test_i057/test_i057.h
+++ b/api-tests/ff/ipc/test_i057/test_i057.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i057)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i057)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i057/test_supp_i057.c b/api-tests/ff/ipc/test_i057/test_supp_i057.c
index 2b0510e..e6ad366 100644
--- a/api-tests/ff/ipc/test_i057/test_supp_i057.c
+++ b/api-tests/ff/ipc/test_i057/test_supp_i057.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -36,7 +36,6 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
void *buffer = NULL;
- miscellaneous_desc_t *misc_desc;
memory_desc_t *memory_desc;
/*
@@ -61,14 +60,13 @@
* VAL APIs to decide test status.
*/
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
}
-
/*
* Selection of invalid buffer addr:
*
@@ -78,23 +76,13 @@
* buffer = NULL;
*/
- status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MISCELLANEOUS,
- MISCELLANEOUS_DUT, 0),
- (uint8_t **)&misc_desc,
- (uint32_t *)sizeof(miscellaneous_desc_t));
- if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
- {
- psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
- return status;
- }
-
- if (misc_desc->implemented_psa_firmware_isolation_level > LEVEL1)
+ if (PLATFORM_PSA_ISOLATION_LEVEL > LEVEL1)
{
status = val->target_get_config(TARGET_CONFIG_CREATE_ID(GROUP_MEMORY,
MEMORY_DRIVER_PARTITION_MMIO, 0),
(uint8_t **)&memory_desc,
(uint32_t *)sizeof(memory_desc_t));
- if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
return status;
@@ -107,8 +95,8 @@
psa->reply(msg.handle, PSA_SUCCESS);
/* Server psa_call */
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
- if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
psa->reply(msg.handle, -2);
}
@@ -116,7 +104,7 @@
{
/* Setting boot.state before test check */
status = val->set_boot_flag(BOOT_EXPECTED_NS);
- if (val->err_check_set(TEST_CHECKPOINT_NUM(205), status))
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
psa->reply(msg.handle, -3);
@@ -141,8 +129,8 @@
}
}
- val->err_check_set(TEST_CHECKPOINT_NUM(206), status);
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ val->err_check_set(TEST_CHECKPOINT_NUM(205), status);
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
psa->reply(msg.handle, PSA_SUCCESS);
return status;
diff --git a/api-tests/ff/ipc/test_i058/test_i058.c b/api-tests/ff/ipc/test_i058/test_i058.c
index a9a242e..b1fc4fc 100644
--- a/api-tests/ff/ipc/test_i058/test_i058.c
+++ b/api-tests/ff/ipc/test_i058/test_i058.c
@@ -42,8 +42,8 @@
val->print(PRINT_TEST,
"[Check 1] Test PSA_DOORBELL signal\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i058/test_i058.h b/api-tests/ff/ipc/test_i058/test_i058.h
index e08e5ae..180a5cc 100644
--- a/api-tests/ff/ipc/test_i058/test_i058.h
+++ b/api-tests/ff/ipc/test_i058/test_i058.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i058)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i058)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i058/test_supp_i058.c b/api-tests/ff/ipc/test_i058/test_supp_i058.c
index 9a01ef7..72b1bf9 100644
--- a/api-tests/ff/ipc/test_i058/test_supp_i058.c
+++ b/api-tests/ff/ipc/test_i058/test_supp_i058.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -37,7 +37,7 @@
psa_msg_t msg = {0};
/* Serve psa_connect */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -59,7 +59,7 @@
}
/* Serve psa_close */
- status = ((val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg))
+ status = ((val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg))
? VAL_STATUS_ERROR : status);
val->err_check_set(TEST_CHECKPOINT_NUM(202), status);
psa->reply(msg.handle, PSA_SUCCESS);
diff --git a/api-tests/ff/ipc/test_i059/test_i059.h b/api-tests/ff/ipc/test_i059/test_i059.h
index 0fc6fdd..a56dd8b 100644
--- a/api-tests/ff/ipc/test_i059/test_i059.h
+++ b/api-tests/ff/ipc/test_i059/test_i059.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i059)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i059)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i059/test_supp_i059.c b/api-tests/ff/ipc/test_i059/test_supp_i059.c
index ed08784..ef0b67a 100644
--- a/api-tests/ff/ipc/test_i059/test_supp_i059.c
+++ b/api-tests/ff/ipc/test_i059/test_supp_i059.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i060/test_i060.h b/api-tests/ff/ipc/test_i060/test_i060.h
index f9813ed..0cdc2be 100644
--- a/api-tests/ff/ipc/test_i060/test_i060.h
+++ b/api-tests/ff/ipc/test_i060/test_i060.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i060)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i060)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i060/test_supp_i060.c b/api-tests/ff/ipc/test_i060/test_supp_i060.c
index 05b3b7f..79d0a16 100644
--- a/api-tests/ff/ipc/test_i060/test_supp_i060.c
+++ b/api-tests/ff/ipc/test_i060/test_supp_i060.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i061/test_i061.h b/api-tests/ff/ipc/test_i061/test_i061.h
index efd59e5..3c3344c 100644
--- a/api-tests/ff/ipc/test_i061/test_i061.h
+++ b/api-tests/ff/ipc/test_i061/test_i061.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i061)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i061)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i061/test_supp_i061.c b/api-tests/ff/ipc/test_i061/test_supp_i061.c
index 1542114..8e78916 100644
--- a/api-tests/ff/ipc/test_i061/test_supp_i061.c
+++ b/api-tests/ff/ipc/test_i061/test_supp_i061.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i062/test_i062.h b/api-tests/ff/ipc/test_i062/test_i062.h
index 13555c7..ddd3cf3 100644
--- a/api-tests/ff/ipc/test_i062/test_i062.h
+++ b/api-tests/ff/ipc/test_i062/test_i062.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i062)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i062)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i062/test_supp_i062.c b/api-tests/ff/ipc/test_i062/test_supp_i062.c
index 30e2d5d..6cec537 100644
--- a/api-tests/ff/ipc/test_i062/test_supp_i062.c
+++ b/api-tests/ff/ipc/test_i062/test_supp_i062.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i063/test_i063.c b/api-tests/ff/ipc/test_i063/test_i063.c
index 1678877..579d5f6 100644
--- a/api-tests/ff/ipc/test_i063/test_i063.c
+++ b/api-tests/ff/ipc/test_i063/test_i063.c
@@ -37,7 +37,7 @@
val->print(PRINT_TEST, "[Check 1] Test psa_wait signal mask\n", 0);
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
if (handle != PSA_ERROR_CONNECTION_REFUSED)
{
@@ -45,7 +45,7 @@
return VAL_STATUS_INVALID_HANDLE;
}
- handle = psa->connect(SERVER_RELAX_MINOR_VERSION_SID, 1);
+ handle = psa->connect(SERVER_RELAX_VERSION_SID, SERVER_RELAX_VERSION_VERSION);
if (handle != PSA_ERROR_CONNECTION_REFUSED)
{
diff --git a/api-tests/ff/ipc/test_i063/test_i063.h b/api-tests/ff/ipc/test_i063/test_i063.h
index 867f186..c5115a9 100644
--- a/api-tests/ff/ipc/test_i063/test_i063.h
+++ b/api-tests/ff/ipc/test_i063/test_i063.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i063)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i063)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i063/test_supp_i063.c b/api-tests/ff/ipc/test_i063/test_supp_i063.c
index d7555e9..ab7ccf3 100644
--- a/api-tests/ff/ipc/test_i063/test_supp_i063.c
+++ b/api-tests/ff/ipc/test_i063/test_supp_i063.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -36,7 +36,7 @@
psa_signal_t signals = 0;
psa_msg_t msg = {0};
int loop_cnt = 2;
- psa_signal_t signal_mask = (SERVER_UNSPECIFED_MINOR_V_SIG | SERVER_RELAX_MINOR_VERSION_SIG);
+ psa_signal_t signal_mask = (SERVER_UNSPECIFED_VERSION_SIGNAL | SERVER_RELAX_VERSION_SIGNAL);
/* Debug print */
val->err_check_set(TEST_CHECKPOINT_NUM(211), VAL_STATUS_SUCCESS);
@@ -45,8 +45,8 @@
* Notify client partition to make SERVER_SECURE_CONNECT_ONLY_SID connection request.
* This connection request act as irritator to psa->wait(signal_mask) call and it is used
* to cover the rule - Signals that are not in signal_mask should be ignored by psa_wait.
- * This means, during the following while loop, returned signal vaule should not be
- * SERVER_SECURE_CONNECT_ONLY_SIG as this signal is not part of signal_mask.
+ * This means, during the following while loop, returned signal value should not be
+ * SERVER_SECURE_CONNECT_ONLY_SIGNAL as this signal is not part of signal_mask.
*/
psa->notify(CLIENT_PARTITION);
@@ -56,8 +56,8 @@
/*
* Rule - Returned signals value must be subset signals indicated in the signal_mask.
- * This mean signal value should be either SERVER_UNSPECIFED_MINOR_V_SIG
- * or SERVER_RELAX_MINOR_VERSION_SIG.
+ * This mean signal value should be either SERVER_UNSPECIFED_VERSION_SIGNAL
+ * or SERVER_RELAX_VERSION_SIGNAL.
*/
if (((signals & signal_mask) == 0) &&
((signals | signal_mask) != signal_mask))
@@ -66,17 +66,17 @@
"psa_wait-1 returned with invalid signal value = 0x%x\n", signals);
return VAL_STATUS_ERROR;
}
- else if (signals & SERVER_UNSPECIFED_MINOR_V_SIG)
+ else if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
{
- if (psa->get(SERVER_UNSPECIFED_MINOR_V_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
continue;
loop_cnt--;
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
}
- else if (signals & SERVER_RELAX_MINOR_VERSION_SIG)
+ else if (signals & SERVER_RELAX_VERSION_SIGNAL)
{
- if (psa->get(SERVER_RELAX_MINOR_VERSION_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_RELAX_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
continue;
loop_cnt--;
@@ -92,15 +92,15 @@
* At the end, completes the starved connection
* request of SERVER_SECURE_CONNECT_ONLY_SID.
*/
- signals = psa->wait(SERVER_SECURE_CONNECT_ONLY_SIG, PSA_BLOCK);
- if ((signals & SERVER_SECURE_CONNECT_ONLY_SIG) == 0)
+ signals = psa->wait(SERVER_SECURE_CONNECT_ONLY_SIGNAL, PSA_BLOCK);
+ if ((signals & SERVER_SECURE_CONNECT_ONLY_SIGNAL) == 0)
{
val->print(PRINT_ERROR,
"psa_wait-2 returned with invalid signal value = 0x%x\n", signals);
return VAL_STATUS_ERROR;
}
- if (psa->get(SERVER_SECURE_CONNECT_ONLY_SIG, &msg) != PSA_SUCCESS)
+ if (psa->get(SERVER_SECURE_CONNECT_ONLY_SIGNAL, &msg) != PSA_SUCCESS)
goto wait;
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i064/test_i064.c b/api-tests/ff/ipc/test_i064/test_i064.c
index 9f8cbee..05c4f79 100644
--- a/api-tests/ff/ipc/test_i064/test_i064.c
+++ b/api-tests/ff/ipc/test_i064/test_i064.c
@@ -38,7 +38,7 @@
/*
* The interrupt related test check is captured in driver_partition.c as this is the
- * only partition in test suite that holds the interrupt line. The interrupt test check
+ * only partition in test suite that holds the interrupt source. The interrupt test check
* is invoked by client by calling to DRIVER_TEST_SID RoT service of driver partition that
* hold the test check.
*/
@@ -46,8 +46,8 @@
val->print(PRINT_TEST, "[Check 1] Test psa_eoi with non-interrupt signal\n", 0);
/* Connect to DRIVER_TEST_SID */
- handle = psa->connect(DRIVER_TEST_SID, 1);
- if (handle < 0)
+ handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\t psa_connect failed. handle=0x%x\n", handle);
return VAL_STATUS_SPM_FAILED;
@@ -55,7 +55,7 @@
/* Execute driver function related to TEST_PSA_EOI_WITH_NON_INTR_SIGNAL */
psa_invec invec = {&driver_test_fn_id, sizeof(driver_test_fn_id)};
- psa->call(handle, &invec, 1, NULL, 0);
+ psa->call(handle, PSA_IPC_CALL, &invec, 1, NULL, 0);
psa->close(handle);
diff --git a/api-tests/ff/ipc/test_i064/test_i064.h b/api-tests/ff/ipc/test_i064/test_i064.h
index d26010e..d89997b 100644
--- a/api-tests/ff/ipc/test_i064/test_i064.h
+++ b/api-tests/ff/ipc/test_i064/test_i064.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i064)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i064)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i064/test_supp_i064.c b/api-tests/ff/ipc/test_i064/test_supp_i064.c
index 5c486a7..58d9638 100644
--- a/api-tests/ff/ipc/test_i064/test_supp_i064.c
+++ b/api-tests/ff/ipc/test_i064/test_supp_i064.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i065/test_i065.c b/api-tests/ff/ipc/test_i065/test_i065.c
index dbc492d..9fe7e9f 100644
--- a/api-tests/ff/ipc/test_i065/test_i065.c
+++ b/api-tests/ff/ipc/test_i065/test_i065.c
@@ -38,7 +38,7 @@
/*
* The interrupt related test check is captured in driver_partition.c as this is the
- * only partition in test suite that holds the interrupt line. The interrupt test check
+ * only partition in test suite that holds the interrupt source. The interrupt test check
* is invoked by client by calling to DRIVER_TEST_SID RoT service of driver partition that
* hold the test check.
*/
@@ -46,8 +46,8 @@
val->print(PRINT_TEST, "[Check 1] Test psa_eoi with multiple signal\n", 0);
/* Connect to DRIVER_TEST_SID */
- handle = psa->connect(DRIVER_TEST_SID, 1);
- if (handle < 0)
+ handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\t psa_connect failed. handle=0x%x\n", handle);
return VAL_STATUS_SPM_FAILED;
@@ -55,7 +55,7 @@
/* Execute driver function related to TEST_PSA_EOI_WITH_UNASSERTED_SIGNAL */
psa_invec invec = {&driver_test_fn_id, sizeof(driver_test_fn_id)};
- psa->call(handle, &invec, 1, NULL, 0);
+ psa->call(handle, PSA_IPC_CALL, &invec, 1, NULL, 0);
psa->close(handle);
diff --git a/api-tests/ff/ipc/test_i065/test_i065.h b/api-tests/ff/ipc/test_i065/test_i065.h
index 7ea2eb0..c1e1af9 100644
--- a/api-tests/ff/ipc/test_i065/test_i065.h
+++ b/api-tests/ff/ipc/test_i065/test_i065.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i065)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i065)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i065/test_supp_i065.c b/api-tests/ff/ipc/test_i065/test_supp_i065.c
index 5c1d8e0..1ae6f68 100644
--- a/api-tests/ff/ipc/test_i065/test_supp_i065.c
+++ b/api-tests/ff/ipc/test_i065/test_supp_i065.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i066/test_i066.c b/api-tests/ff/ipc/test_i066/test_i066.c
index cb0c1ce..af1797c 100644
--- a/api-tests/ff/ipc/test_i066/test_i066.c
+++ b/api-tests/ff/ipc/test_i066/test_i066.c
@@ -38,7 +38,7 @@
/*
* The interrupt related test check is captured in driver_partition.c as this is the
- * only partition in test suite that holds the interrupt line. The interrupt test check
+ * only partition in test suite that holds the interrupt source. The interrupt test check
* is invoked by client by calling to DRIVER_TEST_SID RoT service of driver partition that
* hold the test check.
*/
@@ -46,8 +46,8 @@
val->print(PRINT_TEST, "[Check 1] Test psa_eoi with multiple signals\n", 0);
/* Connect to DRIVER_TEST_SID */
- handle = psa->connect(DRIVER_TEST_SID, 1);
- if (handle < 0)
+ handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\t psa_connect failed. handle=0x%x\n", handle);
return VAL_STATUS_SPM_FAILED;
@@ -55,7 +55,7 @@
/* Execute driver function related to TEST_PSA_EOI_WITH_MULTIPLE_SIGNALS */
psa_invec invec = {&driver_test_fn_id, sizeof(driver_test_fn_id)};
- psa->call(handle, &invec, 1, NULL, 0);
+ psa->call(handle, PSA_IPC_CALL, &invec, 1, NULL, 0);
psa->close(handle);
diff --git a/api-tests/ff/ipc/test_i066/test_i066.h b/api-tests/ff/ipc/test_i066/test_i066.h
index ce908ae..fe246a0 100644
--- a/api-tests/ff/ipc/test_i066/test_i066.h
+++ b/api-tests/ff/ipc/test_i066/test_i066.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i066)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i066)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i066/test_supp_i066.c b/api-tests/ff/ipc/test_i066/test_supp_i066.c
index 9b64caa..357883b 100644
--- a/api-tests/ff/ipc/test_i066/test_supp_i066.c
+++ b/api-tests/ff/ipc/test_i066/test_supp_i066.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i067/test_i067.h b/api-tests/ff/ipc/test_i067/test_i067.h
index 8e40820..11e0bb6 100644
--- a/api-tests/ff/ipc/test_i067/test_i067.h
+++ b/api-tests/ff/ipc/test_i067/test_i067.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i067)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i067)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i067/test_supp_i067.c b/api-tests/ff/ipc/test_i067/test_supp_i067.c
index aa5a8bf..4202944 100644
--- a/api-tests/ff/ipc/test_i067/test_supp_i067.c
+++ b/api-tests/ff/ipc/test_i067/test_supp_i067.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i068/test_i068.c b/api-tests/ff/ipc/test_i068/test_i068.c
index b5038ce..61a59f8 100644
--- a/api-tests/ff/ipc/test_i068/test_i068.c
+++ b/api-tests/ff/ipc/test_i068/test_i068.c
@@ -61,9 +61,10 @@
/*
* Copy test_i068_dummy_func function code into data memory
- * Assuming function size to be 32 bytes max
+ * Assuming function size to be 16 bytes max.
+ * Remove thumb bit from address if exists.
*/
- copy_mem(&opcode, &test_i068_dummy_func, NO_OF_BYTES);
+ copy_mem(&opcode, (void *) ((uintptr_t)&test_i068_dummy_func & ~(uintptr_t)0x1), NO_OF_BYTES);
/* Point function pointer to data memory */
fptr = (fptr_t) opcode;
diff --git a/api-tests/ff/ipc/test_i068/test_i068.h b/api-tests/ff/ipc/test_i068/test_i068.h
index 4893548..f7ed66b 100644
--- a/api-tests/ff/ipc/test_i068/test_i068.h
+++ b/api-tests/ff/ipc/test_i068/test_i068.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i068)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i068)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i068/test_supp_i068.c b/api-tests/ff/ipc/test_i068/test_supp_i068.c
index 6fa87d3..ec58682 100644
--- a/api-tests/ff/ipc/test_i068/test_supp_i068.c
+++ b/api-tests/ff/ipc/test_i068/test_supp_i068.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i069/test_i069.h b/api-tests/ff/ipc/test_i069/test_i069.h
index 64d06b5..574f4d8 100644
--- a/api-tests/ff/ipc/test_i069/test_i069.h
+++ b/api-tests/ff/ipc/test_i069/test_i069.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i069)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i069)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i069/test_supp_i069.c b/api-tests/ff/ipc/test_i069/test_supp_i069.c
index 29a3ca1..5dd572c 100644
--- a/api-tests/ff/ipc/test_i069/test_supp_i069.c
+++ b/api-tests/ff/ipc/test_i069/test_supp_i069.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i070/test_i070.h b/api-tests/ff/ipc/test_i070/test_i070.h
index 5cc3046..9da1c68 100644
--- a/api-tests/ff/ipc/test_i070/test_i070.h
+++ b/api-tests/ff/ipc/test_i070/test_i070.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i070)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i070)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i070/test_supp_i070.c b/api-tests/ff/ipc/test_i070/test_supp_i070.c
index 51090fa..62f2e17 100644
--- a/api-tests/ff/ipc/test_i070/test_supp_i070.c
+++ b/api-tests/ff/ipc/test_i070/test_supp_i070.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i071/test_i071.h b/api-tests/ff/ipc/test_i071/test_i071.h
index a18001b..cb75dff 100644
--- a/api-tests/ff/ipc/test_i071/test_i071.h
+++ b/api-tests/ff/ipc/test_i071/test_i071.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i071)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i071)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i071/test_supp_i071.c b/api-tests/ff/ipc/test_i071/test_supp_i071.c
index 7ce17d8..b96ac47 100644
--- a/api-tests/ff/ipc/test_i071/test_supp_i071.c
+++ b/api-tests/ff/ipc/test_i071/test_supp_i071.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i072/test_i072.c b/api-tests/ff/ipc/test_i072/test_i072.c
index 41e2b1a..38fd78a 100644
--- a/api-tests/ff/ipc/test_i072/test_i072.c
+++ b/api-tests/ff/ipc/test_i072/test_i072.c
@@ -36,8 +36,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -45,12 +45,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tNSPE: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -116,7 +118,7 @@
*(uint32_t *)app_rot_addr = (uint32_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i072/test_i072.h b/api-tests/ff/ipc/test_i072/test_i072.h
index 565aae7..48eb9b7 100644
--- a/api-tests/ff/ipc/test_i072/test_i072.h
+++ b/api-tests/ff/ipc/test_i072/test_i072.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i072)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i072)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i072/test_supp_i072.c b/api-tests/ff/ipc/test_i072/test_supp_i072.c
index 05cf918..704fb10 100644
--- a/api-tests/ff/ipc/test_i072/test_supp_i072.c
+++ b/api-tests/ff/ipc/test_i072/test_supp_i072.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -40,10 +40,11 @@
static int32_t send_secure_partition_address(void)
{
- int32_t status = VAL_STATUS_SUCCESS;
- psa_msg_t msg = {0};
+ int32_t status = VAL_STATUS_SUCCESS;
+ volatile uint32_t *addr = &g_test_i072;
+ psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -52,18 +53,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
return status;
}
+ val->print(PRINT_DEBUG, "\tAPP-ROT: Passing 0x%x to NSPE\n", (int)&g_test_i072);
+
/* Send Application RoT data address - global variable */
- psa->write(msg.handle, 0, (void *)&g_test_i072, sizeof(g_test_i072));
+ psa->write(msg.handle, 0, (void *)&addr, sizeof(addr));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
@@ -87,7 +90,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i073/test_i073.c b/api-tests/ff/ipc/test_i073/test_i073.c
index 01a0a2a..8b8d8b6 100644
--- a/api-tests/ff/ipc/test_i073/test_i073.c
+++ b/api-tests/ff/ipc/test_i073/test_i073.c
@@ -36,8 +36,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -45,12 +45,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tNSPE: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -116,7 +118,7 @@
*(uint32_t *)app_rot_addr = (uint32_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, 1)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i073/test_i073.h b/api-tests/ff/ipc/test_i073/test_i073.h
index 8cfdbe5..a2a4bb9 100644
--- a/api-tests/ff/ipc/test_i073/test_i073.h
+++ b/api-tests/ff/ipc/test_i073/test_i073.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i073)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i073)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i073/test_supp_i073.c b/api-tests/ff/ipc/test_i073/test_supp_i073.c
index 114b0a2..a18ec3b 100644
--- a/api-tests/ff/ipc/test_i073/test_supp_i073.c
+++ b/api-tests/ff/ipc/test_i073/test_supp_i073.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -40,7 +40,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -49,18 +49,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
return status;
}
+ val->print(PRINT_DEBUG, "\tAPP-ROT: Passing 0x%x to NSPE\n", (int)stack);
+
/* Send Application RoT stack address */
- psa->write(msg.handle, 0, (void *)stack, sizeof(uint32_t));
+ psa->write(msg.handle, 0, (void *)&stack, sizeof(uint32_t));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
@@ -78,7 +80,7 @@
status = send_secure_partition_address(&l_test_i073);
/* Dummy print to avoid compiler optimisation on local variable */
- val->print(PRINT_INFO, "\tData value 0x%x\n", l_test_i073);
+ val->print(PRINT_INFO, "\tStack data 0x%x\n", l_test_i073);
return status;
}
@@ -94,7 +96,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i074/test_i074.c b/api-tests/ff/ipc/test_i074/test_i074.c
index 210ab6a..ce91843 100644
--- a/api-tests/ff/ipc/test_i074/test_i074.c
+++ b/api-tests/ff/ipc/test_i074/test_i074.c
@@ -41,8 +41,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, 1);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -50,12 +50,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, BUFFER_SIZE}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tNSPE: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -121,7 +123,7 @@
*(uint8_t *)app_rot_addr = (uint8_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i074/test_i074.h b/api-tests/ff/ipc/test_i074/test_i074.h
index ad09a7f..2b47742 100644
--- a/api-tests/ff/ipc/test_i074/test_i074.h
+++ b/api-tests/ff/ipc/test_i074/test_i074.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i074)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i074)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i074/test_supp_i074.c b/api-tests/ff/ipc/test_i074/test_supp_i074.c
index ff79d34..3b72f32 100644
--- a/api-tests/ff/ipc/test_i074/test_supp_i074.c
+++ b/api-tests/ff/ipc/test_i074/test_supp_i074.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -47,7 +47,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -56,18 +56,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
return status;
}
+ val->print(PRINT_DEBUG, "\tAPP-ROT: Passing 0x%x to NSPE\n", (int)heap);
+
/* Send Application RoT heap address */
- psa->write(msg.handle, 0, (void *)heap, sizeof(BUFFER_SIZE));
+ psa->write(msg.handle, 0, (void *)&heap, sizeof(BUFFER_SIZE));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
@@ -106,7 +108,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i075/test_i075.c b/api-tests/ff/ipc/test_i075/test_i075.c
index 2aed38a..84c1c23 100644
--- a/api-tests/ff/ipc/test_i075/test_i075.c
+++ b/api-tests/ff/ipc/test_i075/test_i075.c
@@ -38,8 +38,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -47,12 +47,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tNSPE: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -118,7 +120,7 @@
*(uint32_t *)app_rot_addr = (uint32_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i075/test_i075.h b/api-tests/ff/ipc/test_i075/test_i075.h
index 5fcb624..a5a8188 100644
--- a/api-tests/ff/ipc/test_i075/test_i075.h
+++ b/api-tests/ff/ipc/test_i075/test_i075.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i075)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i075)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i075/test_supp_i075.c b/api-tests/ff/ipc/test_i075/test_supp_i075.c
index b98fffb..8c062a6 100644
--- a/api-tests/ff/ipc/test_i075/test_supp_i075.c
+++ b/api-tests/ff/ipc/test_i075/test_supp_i075.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -54,12 +54,12 @@
return VAL_STATUS_SUCCESS;
}
-static int32_t send_secure_partition_address(addr_t *stack)
+static int32_t send_secure_partition_address(addr_t *addr)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -68,18 +68,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
psa->reply(msg.handle, -2);
return status;
}
- /* Send Application RoT stack address */
- psa->write(msg.handle, 0, (void *)stack, sizeof(uint32_t));
+ val->print(PRINT_DEBUG, "\tAPP-ROT: Passing 0x%x to NSPE\n", (int)*addr);
+
+ /* Send Application RoT mmio address */
+ psa->write(msg.handle, 0, (void *)addr, sizeof(uint32_t));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
return status;
@@ -97,6 +99,9 @@
if (VAL_ERROR(status))
return status;
+ /* Initialise mmio address */
+ *(uint32_t *)app_rot_addr = (uint32_t)DATA_VALUE;
+
return send_secure_partition_address(&app_rot_addr);
}
@@ -117,7 +122,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i076/test_i076.c b/api-tests/ff/ipc/test_i076/test_i076.c
index 765e502..94510de 100644
--- a/api-tests/ff/ipc/test_i076/test_i076.c
+++ b/api-tests/ff/ipc/test_i076/test_i076.c
@@ -38,8 +38,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -48,7 +48,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_* */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -59,7 +59,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i076/test_i076.h b/api-tests/ff/ipc/test_i076/test_i076.h
index 2114ac5..6ec51f9 100644
--- a/api-tests/ff/ipc/test_i076/test_i076.h
+++ b/api-tests/ff/ipc/test_i076/test_i076.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i076)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i076)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i076/test_supp_i076.c b/api-tests/ff/ipc/test_i076/test_supp_i076.c
index c32ec2f..eb87a0f 100644
--- a/api-tests/ff/ipc/test_i076/test_supp_i076.c
+++ b/api-tests/ff/ipc/test_i076/test_supp_i076.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i077/test_i077.c b/api-tests/ff/ipc/test_i077/test_i077.c
index 4cbad88..e714e80 100644
--- a/api-tests/ff/ipc/test_i077/test_i077.c
+++ b/api-tests/ff/ipc/test_i077/test_i077.c
@@ -38,8 +38,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -48,7 +48,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_DATA_RD */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -59,7 +59,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i077/test_i077.h b/api-tests/ff/ipc/test_i077/test_i077.h
index 4a4133c..eb88d39 100644
--- a/api-tests/ff/ipc/test_i077/test_i077.h
+++ b/api-tests/ff/ipc/test_i077/test_i077.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i077)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i077)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i077/test_supp_i077.c b/api-tests/ff/ipc/test_i077/test_supp_i077.c
index 03a4217..112d7e4 100644
--- a/api-tests/ff/ipc/test_i077/test_supp_i077.c
+++ b/api-tests/ff/ipc/test_i077/test_supp_i077.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i078/test_i078.c b/api-tests/ff/ipc/test_i078/test_i078.c
index c600a9f..a708eeb 100644
--- a/api-tests/ff/ipc/test_i078/test_i078.c
+++ b/api-tests/ff/ipc/test_i078/test_i078.c
@@ -41,8 +41,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -51,7 +51,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_DATA_RD */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -62,7 +62,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i078/test_i078.h b/api-tests/ff/ipc/test_i078/test_i078.h
index bc44b59..0613f10 100644
--- a/api-tests/ff/ipc/test_i078/test_i078.h
+++ b/api-tests/ff/ipc/test_i078/test_i078.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i078)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i078)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i078/test_supp_i078.c b/api-tests/ff/ipc/test_i078/test_supp_i078.c
index 0b5f67f..59297e3 100644
--- a/api-tests/ff/ipc/test_i078/test_supp_i078.c
+++ b/api-tests/ff/ipc/test_i078/test_supp_i078.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i079/test_i079.c b/api-tests/ff/ipc/test_i079/test_i079.c
index 323a548..9cbbd79 100644
--- a/api-tests/ff/ipc/test_i079/test_i079.c
+++ b/api-tests/ff/ipc/test_i079/test_i079.c
@@ -38,8 +38,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -48,7 +48,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_DATA_RD */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -59,7 +59,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i079/test_i079.h b/api-tests/ff/ipc/test_i079/test_i079.h
index 507d0cb..99e2855 100644
--- a/api-tests/ff/ipc/test_i079/test_i079.h
+++ b/api-tests/ff/ipc/test_i079/test_i079.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i079)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i079)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i079/test_supp_i079.c b/api-tests/ff/ipc/test_i079/test_supp_i079.c
index 24a0f89..57e7057 100644
--- a/api-tests/ff/ipc/test_i079/test_supp_i079.c
+++ b/api-tests/ff/ipc/test_i079/test_supp_i079.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i080/test_i080.c b/api-tests/ff/ipc/test_i080/test_i080.c
index 4d4915c..ccafd64 100644
--- a/api-tests/ff/ipc/test_i080/test_i080.c
+++ b/api-tests/ff/ipc/test_i080/test_i080.c
@@ -38,8 +38,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -48,7 +48,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_* */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -59,7 +59,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i080/test_i080.h b/api-tests/ff/ipc/test_i080/test_i080.h
index d45c93c..a78d6cb 100644
--- a/api-tests/ff/ipc/test_i080/test_i080.h
+++ b/api-tests/ff/ipc/test_i080/test_i080.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i080)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i080)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i080/test_supp_i080.c b/api-tests/ff/ipc/test_i080/test_supp_i080.c
index cd02263..0b00be4 100644
--- a/api-tests/ff/ipc/test_i080/test_supp_i080.c
+++ b/api-tests/ff/ipc/test_i080/test_supp_i080.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i081/test_i081.c b/api-tests/ff/ipc/test_i081/test_i081.c
index 027f9ae..b1e4b9e 100644
--- a/api-tests/ff/ipc/test_i081/test_i081.c
+++ b/api-tests/ff/ipc/test_i081/test_i081.c
@@ -38,8 +38,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -48,7 +48,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_DATA_RD */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -59,7 +59,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i081/test_i081.h b/api-tests/ff/ipc/test_i081/test_i081.h
index 6410d70..cafee8d 100644
--- a/api-tests/ff/ipc/test_i081/test_i081.h
+++ b/api-tests/ff/ipc/test_i081/test_i081.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i081)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i081)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i081/test_supp_i081.c b/api-tests/ff/ipc/test_i081/test_supp_i081.c
index 0f84416..474230a 100644
--- a/api-tests/ff/ipc/test_i081/test_supp_i081.c
+++ b/api-tests/ff/ipc/test_i081/test_supp_i081.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i082/test_i082.c b/api-tests/ff/ipc/test_i082/test_i082.c
index cb8a085..4180f94 100644
--- a/api-tests/ff/ipc/test_i082/test_i082.c
+++ b/api-tests/ff/ipc/test_i082/test_i082.c
@@ -41,8 +41,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -51,7 +51,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_DATA_RD */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -62,7 +62,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i082/test_i082.h b/api-tests/ff/ipc/test_i082/test_i082.h
index 57c13ab..37d1af5 100644
--- a/api-tests/ff/ipc/test_i082/test_i082.h
+++ b/api-tests/ff/ipc/test_i082/test_i082.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i082)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i082)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i082/test_supp_i082.c b/api-tests/ff/ipc/test_i082/test_supp_i082.c
index 20a5b7a..1095b5c 100644
--- a/api-tests/ff/ipc/test_i082/test_supp_i082.c
+++ b/api-tests/ff/ipc/test_i082/test_supp_i082.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i083/test_i083.c b/api-tests/ff/ipc/test_i083/test_i083.c
index dd85cab..3e95c8e 100644
--- a/api-tests/ff/ipc/test_i083/test_i083.c
+++ b/api-tests/ff/ipc/test_i083/test_i083.c
@@ -38,8 +38,8 @@
addr_t *addr,
driver_test_fn_id_t test_fn_id)
{
- *handle = psa->connect(DRIVER_TEST_SID, 1);
- if (*handle < 0)
+ *handle = psa->connect(DRIVER_TEST_SID, DRIVER_TEST_VERSION);
+ if (!PSA_HANDLE_IS_VALID(*handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -48,7 +48,7 @@
/* Execute driver function related to TEST_ISOLATION_PSA_ROT_DATA_RD */
psa_invec invec[1] = {{&test_fn_id, sizeof(test_fn_id)}};
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(*handle, invec, 1, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, invec, 1, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
@@ -59,7 +59,7 @@
static int32_t get_driver_status(psa_handle_t *handle)
{
- if (psa->call(*handle, NULL, 0, NULL, 0) != PSA_SUCCESS)
+ if (psa->call(*handle, PSA_IPC_CALL, NULL, 0, NULL, 0) != PSA_SUCCESS)
{
return VAL_STATUS_CALL_FAILED;
}
diff --git a/api-tests/ff/ipc/test_i083/test_i083.h b/api-tests/ff/ipc/test_i083/test_i083.h
index 8f584f7..fffd86e 100644
--- a/api-tests/ff/ipc/test_i083/test_i083.h
+++ b/api-tests/ff/ipc/test_i083/test_i083.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i083)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i083)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i083/test_supp_i083.c b/api-tests/ff/ipc/test_i083/test_supp_i083.c
index e7bf8f5..893c291 100644
--- a/api-tests/ff/ipc/test_i083/test_supp_i083.c
+++ b/api-tests/ff/ipc/test_i083/test_supp_i083.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/test_i084/test_i084.c b/api-tests/ff/ipc/test_i084/test_i084.c
index e21acd2..639a8ab 100644
--- a/api-tests/ff/ipc/test_i084/test_i084.c
+++ b/api-tests/ff/ipc/test_i084/test_i084.c
@@ -36,8 +36,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -45,12 +45,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tClient SP: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -116,7 +118,7 @@
*(uint32_t *)app_rot_addr = (uint32_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i084/test_i084.h b/api-tests/ff/ipc/test_i084/test_i084.h
index ed1150f..0465a4b 100644
--- a/api-tests/ff/ipc/test_i084/test_i084.h
+++ b/api-tests/ff/ipc/test_i084/test_i084.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i084)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i084)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i084/test_supp_i084.c b/api-tests/ff/ipc/test_i084/test_supp_i084.c
index 3c663d3..87aecf0 100644
--- a/api-tests/ff/ipc/test_i084/test_supp_i084.c
+++ b/api-tests/ff/ipc/test_i084/test_supp_i084.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -40,10 +40,11 @@
static int32_t send_secure_partition_address(void)
{
- int32_t status = VAL_STATUS_SUCCESS;
- psa_msg_t msg = {0};
+ int32_t status = VAL_STATUS_SUCCESS;
+ volatile uint32_t *addr = &g_test_i084;
+ psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -52,18 +53,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
return status;
}
+ val->print(PRINT_DEBUG, "\tServer SP: Passing 0x%x to Client SP\n", (int)&g_test_i084);
+
/* Send Application RoT data address - global variable */
- psa->write(msg.handle, 0, (void *)&g_test_i084, sizeof(g_test_i084));
+ psa->write(msg.handle, 0, (void *)&addr, sizeof(addr));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
@@ -87,7 +90,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i085/test_i085.c b/api-tests/ff/ipc/test_i085/test_i085.c
index f389f00..07eb2ec 100644
--- a/api-tests/ff/ipc/test_i085/test_i085.c
+++ b/api-tests/ff/ipc/test_i085/test_i085.c
@@ -36,8 +36,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -45,12 +45,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tClient SP: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -116,7 +118,7 @@
*(uint32_t *)app_rot_addr = (uint32_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i085/test_i085.h b/api-tests/ff/ipc/test_i085/test_i085.h
index 2679593..03d295b 100644
--- a/api-tests/ff/ipc/test_i085/test_i085.h
+++ b/api-tests/ff/ipc/test_i085/test_i085.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i085)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i085)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i085/test_supp_i085.c b/api-tests/ff/ipc/test_i085/test_supp_i085.c
index 9922716..607a415 100644
--- a/api-tests/ff/ipc/test_i085/test_supp_i085.c
+++ b/api-tests/ff/ipc/test_i085/test_supp_i085.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -40,7 +40,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -49,18 +49,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
return status;
}
+ val->print(PRINT_DEBUG, "\tServer SP: Passing 0x%x to Client SP\n", (int)stack);
+
/* Send Application RoT stack address */
- psa->write(msg.handle, 0, (void *)stack, sizeof(uint32_t));
+ psa->write(msg.handle, 0, (void *)&stack, sizeof(addr_t));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
@@ -94,7 +96,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i086/test_i086.c b/api-tests/ff/ipc/test_i086/test_i086.c
index 605adb1..0be11be 100644
--- a/api-tests/ff/ipc/test_i086/test_i086.c
+++ b/api-tests/ff/ipc/test_i086/test_i086.c
@@ -41,8 +41,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -50,12 +50,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, BUFFER_SIZE}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tClient SP: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -121,7 +123,7 @@
*(uint8_t *)app_rot_addr = (uint8_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i086/test_i086.h b/api-tests/ff/ipc/test_i086/test_i086.h
index 2f729e6..794d5a1 100644
--- a/api-tests/ff/ipc/test_i086/test_i086.h
+++ b/api-tests/ff/ipc/test_i086/test_i086.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i086)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i086)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i086/test_supp_i086.c b/api-tests/ff/ipc/test_i086/test_supp_i086.c
index 946273e..efff3ad 100644
--- a/api-tests/ff/ipc/test_i086/test_supp_i086.c
+++ b/api-tests/ff/ipc/test_i086/test_supp_i086.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -47,7 +47,7 @@
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -56,18 +56,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, -2);
return status;
}
+ val->print(PRINT_DEBUG, "\tServer SP: Passing 0x%x to Client SP\n", (int)heap);
+
/* Send Application RoT heap address */
- psa->write(msg.handle, 0, (void *)heap, sizeof(BUFFER_SIZE));
+ psa->write(msg.handle, 0, (void *)&heap, sizeof(BUFFER_SIZE));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
return status;
@@ -106,7 +108,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i087/test_i087.c b/api-tests/ff/ipc/test_i087/test_i087.c
index 6514fab..f5ce74c 100644
--- a/api-tests/ff/ipc/test_i087/test_i087.c
+++ b/api-tests/ff/ipc/test_i087/test_i087.c
@@ -38,8 +38,8 @@
{
psa_handle_t handle = 0;
- handle = psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1);
- if (handle < 0)
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
{
val->print(PRINT_ERROR, "\tConnection failed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
@@ -47,12 +47,14 @@
/* Get App-RoT address */
psa_outvec outvec[1] = {{addr, sizeof(addr_t)}};
- if (psa->call(handle, NULL, 0, outvec, 1) != PSA_SUCCESS)
+ if (psa->call(handle, PSA_IPC_CALL, NULL, 0, outvec, 1) != PSA_SUCCESS)
{
val->print(PRINT_ERROR, "\tmsg request failed\n", 0);
return VAL_STATUS_CALL_FAILED;
}
+ val->print(PRINT_DEBUG, "\tClient SP: Accessing address 0x%x\n", *addr);
+
psa->close(handle);
return VAL_STATUS_SUCCESS;
}
@@ -118,7 +120,7 @@
*(uint32_t *)app_rot_addr = (uint32_t)data;
/* Handshake with server to decide write status */
- if ((psa->connect(SERVER_UNSPECIFED_MINOR_V_SID, 1)) > 0)
+ if ((psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION)) > 0)
{
val->print(PRINT_ERROR, "\tExpected connection to fail but succeed\n", 0);
return VAL_STATUS_INVALID_HANDLE;
diff --git a/api-tests/ff/ipc/test_i087/test_i087.h b/api-tests/ff/ipc/test_i087/test_i087.h
index 7cf6a82..abfd6db 100644
--- a/api-tests/ff/ipc/test_i087/test_i087.h
+++ b/api-tests/ff/ipc/test_i087/test_i087.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,i087)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, i087)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_i087/test_supp_i087.c b/api-tests/ff/ipc/test_i087/test_supp_i087.c
index b59fb97..b1bee74 100644
--- a/api-tests/ff/ipc/test_i087/test_supp_i087.c
+++ b/api-tests/ff/ipc/test_i087/test_supp_i087.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
@@ -54,12 +54,12 @@
return VAL_STATUS_SUCCESS;
}
-static int32_t send_secure_partition_address(addr_t *stack)
+static int32_t send_secure_partition_address(addr_t *addr)
{
int32_t status = VAL_STATUS_SUCCESS;
psa_msg_t msg = {0};
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
@@ -68,18 +68,20 @@
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_call_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_call_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(203), status))
{
psa->reply(msg.handle, -2);
return status;
}
- /* Send Application RoT stack address */
- psa->write(msg.handle, 0, (void *)stack, sizeof(uint32_t));
+ val->print(PRINT_DEBUG, "\tServer SP: Passing 0x%x to Client SP\n", (int)*addr);
+
+ /* Send Application RoT mmio address */
+ psa->write(msg.handle, 0, (void *)addr, sizeof(addr_t));
psa->reply(msg.handle, PSA_SUCCESS);
- status = val->process_disconnect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
return status;
@@ -117,7 +119,7 @@
return status;
/* Wait for write to get performed by client */
- status = val->process_connect_request(SERVER_UNSPECIFED_MINOR_V_SIG, &msg);
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
if (val->err_check_set(TEST_CHECKPOINT_NUM(204), status))
{
psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
diff --git a/api-tests/ff/ipc/test_i089/test.cmake b/api-tests/ff/ipc/test_i089/test.cmake
new file mode 100644
index 0000000..ef76d06
--- /dev/null
+++ b/api-tests/ff/ipc/test_i089/test.cmake
@@ -0,0 +1,32 @@
+#/** @file
+# * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+list(APPEND CC_SOURCE
+ test_entry_i089.c
+ test_i089.c
+)
+list(APPEND CC_OPTIONS )
+list(APPEND AS_SOURCE )
+list(APPEND AS_OPTIONS )
+
+list(APPEND CC_SOURCE_SPE
+ test_i089.c
+ test_supp_i089.c
+)
+list(APPEND CC_OPTIONS_SPE )
+list(APPEND AS_SOURCE_SPE )
+list(APPEND AS_OPTIONS_SPE )
diff --git a/api-tests/ff/ipc/test_i089/test_entry_i089.c b/api-tests/ff/ipc/test_i089/test_entry_i089.c
new file mode 100644
index 0000000..c50113b
--- /dev/null
+++ b/api-tests/ff/ipc/test_i089/test_entry_i089.c
@@ -0,0 +1,51 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_interfaces.h"
+#include "val_target.h"
+#include "test_i089.h"
+
+#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 89)
+#define TEST_DESC "Testing psa_panic API\n"
+TEST_PUBLISH(TEST_NUM, test_entry);
+val_api_t *val = NULL;
+psa_api_t *psa = NULL;
+
+void test_entry(val_api_t *val_api, psa_api_t *psa_api)
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+
+ val = val_api;
+ psa = psa_api;
+
+ /* test init */
+ val->test_init(TEST_NUM, TEST_DESC, TEST_FIELD(TEST_ISOLATION_L1, WD_LOW_TIMEOUT));
+ if (!IS_TEST_START(val->get_status()))
+ {
+ goto test_exit;
+ }
+
+ /* Execute list of tests available in test[num]_client_tests_list from Non-secure side*/
+ status = val->execute_non_secure_tests(TEST_NUM, test_i089_client_tests_list, TRUE);
+ if (VAL_ERROR(status))
+ {
+ goto test_exit;
+ }
+
+test_exit:
+ val->test_exit();
+}
diff --git a/api-tests/ff/ipc/test_i089/test_i089.c b/api-tests/ff/ipc/test_i089/test_i089.c
new file mode 100644
index 0000000..28987ef
--- /dev/null
+++ b/api-tests/ff/ipc/test_i089/test_i089.c
@@ -0,0 +1,37 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifdef NONSECURE_TEST_BUILD
+#include "val_interfaces.h"
+#include "val_target.h"
+#else
+#include "val_client_defs.h"
+#include "val_service_defs.h"
+#endif
+
+#include "test_i089.h"
+
+client_test_t test_i089_client_tests_list[] = {
+ NULL,
+ client_test_psa_panic,
+ NULL,
+};
+
+int32_t client_test_psa_panic(caller_security_t caller)
+{
+ return VAL_STATUS_SUCCESS;
+}
diff --git a/api-tests/ff/ipc/test_i089/test_i089.h b/api-tests/ff/ipc/test_i089/test_i089.h
new file mode 100644
index 0000000..b0bbec3
--- /dev/null
+++ b/api-tests/ff/ipc/test_i089/test_i089.h
@@ -0,0 +1,37 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_I089_CLIENT_TESTS_H_
+#define _TEST_I089_CLIENT_TESTS_H_
+
+#include "val_client_defs.h"
+
+#ifdef NONSECURE_TEST_BUILD
+#define test_entry CONCAT(test_entry_,i089)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+#else
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
+#endif
+
+extern val_api_t *val;
+extern psa_api_t *psa;
+
+extern client_test_t test_i089_client_tests_list[];
+
+int32_t client_test_psa_panic(caller_security_t);
+#endif
diff --git a/api-tests/ff/ipc/test_i089/test_supp_i089.c b/api-tests/ff/ipc/test_i089/test_supp_i089.c
new file mode 100644
index 0000000..189a736
--- /dev/null
+++ b/api-tests/ff/ipc/test_i089/test_supp_i089.c
@@ -0,0 +1,82 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_client_defs.h"
+#include "val_service_defs.h"
+
+#define val CONCAT(val,_server_sp)
+#define psa CONCAT(psa,_server_sp)
+extern val_api_t *val;
+extern psa_api_t *psa;
+
+int32_t server_test_psa_panic(void);
+
+server_test_t test_i089_server_tests_list[] = {
+ NULL,
+ server_test_psa_panic,
+ NULL,
+};
+
+int32_t server_test_psa_panic(void)
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+
+ val->print(PRINT_TEST, "[Check 1] Test psa_panic API\n", 0);
+ /*
+ * This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
+ * PROGRAMMER ERROR could be either to return appropriate status code or panic the caller.
+ * When a Secure Partition panics, the SPE cannot continue normal execution, as defined
+ * in this specification. The behavior of the SPM following a Secure Partition panic is
+ * IMPLEMENTATION DEFINED- Arm recommends that the SPM causes the system to restart in
+ * this situation. Refer PSA-FF for more information on panic.
+ * For the cases where, SPM cannot capable to reboot the system (just hangs or power down),
+ * a watchdog timer set by val_test_init can reboot the system on timeout event. This will
+ * tests continuity and able to jump to next tests. Therefore, each test who checks for
+ * PROGRAMMER ERROR condition, expects system to get reset either by SPM or watchdog set by
+ * the test harness function.
+ *
+ * If programmed timeout value isn't sufficient for your system, it can be reconfigured using
+ * timeout entries available in target.cfg.
+ *
+ * To decide, a reboot happened as intended by test scenario or it happended
+ * due to other reasons, test is setting a boot signature into non-volatile memory before and
+ * after targeted test check. After a reboot, these boot signatures are being read by the
+ * VAL APIs to decide test status.
+ */
+
+ /* Setting boot.state before test check */
+ status = val->set_boot_flag(BOOT_EXPECTED_NS);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
+ {
+ val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
+ return status;
+ }
+
+ /* Call to psa_panic shouldn't return */
+ psa->panic();
+
+ /* Resetting boot.state to catch unwanted reboot */
+ status = val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(202), status))
+ {
+ val->print(PRINT_ERROR, "\tFailed to set boot flag after check\n", 0);
+ }
+
+ status = VAL_STATUS_SPM_FAILED;
+ val->err_check_set(TEST_CHECKPOINT_NUM(203), status);
+ return status;
+}
diff --git a/api-tests/ff/ipc/test_i090/test.cmake b/api-tests/ff/ipc/test_i090/test.cmake
new file mode 100644
index 0000000..7ea50b6
--- /dev/null
+++ b/api-tests/ff/ipc/test_i090/test.cmake
@@ -0,0 +1,32 @@
+#/** @file
+# * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+# * SPDX-License-Identifier : Apache-2.0
+# *
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+#**/
+
+list(APPEND CC_SOURCE
+ test_entry_i090.c
+ test_i090.c
+)
+list(APPEND CC_OPTIONS )
+list(APPEND AS_SOURCE )
+list(APPEND AS_OPTIONS )
+
+list(APPEND CC_SOURCE_SPE
+ test_i090.c
+ test_supp_i090.c
+)
+list(APPEND CC_OPTIONS_SPE )
+list(APPEND AS_SOURCE_SPE )
+list(APPEND AS_OPTIONS_SPE )
diff --git a/api-tests/ff/ipc/test_i090/test_entry_i090.c b/api-tests/ff/ipc/test_i090/test_entry_i090.c
new file mode 100644
index 0000000..4d45698
--- /dev/null
+++ b/api-tests/ff/ipc/test_i090/test_entry_i090.c
@@ -0,0 +1,59 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_interfaces.h"
+#include "val_target.h"
+#include "test_i090.h"
+
+#define TEST_NUM VAL_CREATE_TEST_ID(VAL_FF_BASE, 90)
+#define TEST_DESC "Testing psa_call with negative type\n"
+TEST_PUBLISH(TEST_NUM, test_entry);
+val_api_t *val = NULL;
+psa_api_t *psa = NULL;
+
+void test_entry(val_api_t *val_api, psa_api_t *psa_api)
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+
+ val = val_api;
+ psa = psa_api;
+
+ /* test init */
+ val->test_init(TEST_NUM, TEST_DESC, TEST_FIELD(TEST_ISOLATION_L1, WD_LOW_TIMEOUT));
+ if (!IS_TEST_START(val->get_status()))
+ {
+ goto test_exit;
+ }
+
+ /* Execute list of tests available in test[num]_client_tests_list from Non-secure side*/
+ status = val->execute_non_secure_tests(TEST_NUM, test_i090_client_tests_list, TRUE);
+ if (VAL_ERROR(status))
+ {
+ goto test_exit;
+ }
+
+ /* Switch to secure side (client_partition.c) and execute list of tests available in
+ test[num]_client_tests_list from Secure side */
+ status = val->switch_to_secure_client(TEST_NUM);
+ if (VAL_ERROR(status))
+ {
+ goto test_exit;
+ }
+
+test_exit:
+ val->test_exit();
+}
diff --git a/api-tests/ff/ipc/test_i090/test_i090.c b/api-tests/ff/ipc/test_i090/test_i090.c
new file mode 100644
index 0000000..8d70be3
--- /dev/null
+++ b/api-tests/ff/ipc/test_i090/test_i090.c
@@ -0,0 +1,108 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#ifdef NONSECURE_TEST_BUILD
+#include "val_interfaces.h"
+#include "val_target.h"
+#else
+#include "val_client_defs.h"
+#include "val_service_defs.h"
+#endif
+
+#include "test_i090.h"
+
+client_test_t test_i090_client_tests_list[] = {
+ NULL,
+ client_test_psa_call_with_neg_type,
+ NULL,
+};
+
+int32_t client_test_psa_call_with_neg_type(caller_security_t caller)
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+ psa_handle_t handle = 0;
+ psa_status_t status_of_call;
+ boot_state_t boot_state;
+
+ val->print(PRINT_TEST,
+ "[Check 1] Test psa_call with negative type\n", 0);
+
+ /*
+ * This test checks for the PROGRAMMER ERROR condition for the PSA API. API's respond to
+ * PROGRAMMER ERROR could be either to return appropriate status code or panic the caller.
+ * When a Secure Partition panics, the SPE cannot continue normal execution, as defined
+ * in this specification. The behavior of the SPM following a Secure Partition panic is
+ * IMPLEMENTATION DEFINED- Arm recommends that the SPM causes the system to restart in
+ * this situation. Refer PSA-FF for more information on panic.
+ * For the cases where, SPM cannot capable to reboot the system (just hangs or power down),
+ * a watchdog timer set by val_test_init can reboot the system on timeout event. This will
+ * tests continuity and able to jump to next tests. Therefore, each test who checks for
+ * PROGRAMMER ERROR condition, expects system to get reset either by SPM or watchdog set by
+ * the test harness function.
+ *
+ * If programmed timeout value isn't sufficient for your system, it can be reconfigured using
+ * timeout entries available in target.cfg.
+ *
+ * To decide, a reboot happened as intended by test scenario or it happended
+ * due to other reasons, test is setting a boot signature into non-volatile memory before and
+ * after targeted test check. After a reboot, these boot signatures are being read by the
+ * VAL APIs to decide test status.
+ */
+
+ handle = psa->connect(SERVER_UNSPECIFED_VERSION_SID, SERVER_UNSPECIFED_VERSION_VERSION);
+ if (!PSA_HANDLE_IS_VALID(handle))
+ {
+ val->print(PRINT_ERROR, "\tConnection failed\n", 0);
+ return VAL_STATUS_INVALID_HANDLE;
+ }
+
+ /* Setting boot.state before test check */
+ boot_state = (caller == CALLER_NONSECURE) ? BOOT_EXPECTED_NS : BOOT_EXPECTED_S;
+ if (val->set_boot_flag(boot_state))
+ {
+ val->print(PRINT_ERROR, "\tFailed to set boot flag before check\n", 0);
+ return VAL_STATUS_ERROR;
+ }
+
+ /* Test check- psa_call with negative type */
+ status_of_call = psa->call(handle, -1, NULL, 0, NULL, 0);
+
+ /*
+ * If the caller is in the NSPE, it is IMPLEMENTATION DEFINED whether
+ * a PROGRAMMER ERROR will panic or return PSA_ERROR_PROGRAMMER_ERROR.
+ * For SPE caller, it must panic.
+ */
+ if (caller == CALLER_NONSECURE && status_of_call == PSA_ERROR_PROGRAMMER_ERROR)
+ {
+ psa->close(handle);
+ return VAL_STATUS_SUCCESS;
+ }
+
+ /* If PROGRAMMER ERROR results into panic then control shouldn't have reached here */
+ val->print(PRINT_ERROR, "\tCall should failed but succeed\n", 0);
+
+ /* Resetting boot.state to catch unwanted reboot */
+ if (val->set_boot_flag(BOOT_EXPECTED_BUT_FAILED))
+ {
+ val->print(PRINT_ERROR, "\tFailed to set boot flag after check\n", 0);
+ return VAL_STATUS_ERROR;
+ }
+
+ status = VAL_STATUS_SPM_FAILED;
+ psa->close(handle);
+ return status;
+}
diff --git a/api-tests/ff/ipc/test_i090/test_i090.h b/api-tests/ff/ipc/test_i090/test_i090.h
new file mode 100644
index 0000000..8ba9147
--- /dev/null
+++ b/api-tests/ff/ipc/test_i090/test_i090.h
@@ -0,0 +1,37 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+#ifndef _TEST_I090_CLIENT_TESTS_H_
+#define _TEST_I090_CLIENT_TESTS_H_
+
+#include "val_client_defs.h"
+
+#ifdef NONSECURE_TEST_BUILD
+#define test_entry CONCAT(test_entry_,i090)
+#define val CONCAT(val,test_entry)
+#define psa CONCAT(psa,test_entry)
+#else
+#define val CONCAT(val,_client_sp)
+#define psa CONCAT(psa,_client_sp)
+#endif
+
+extern val_api_t *val;
+extern psa_api_t *psa;
+
+extern client_test_t test_i090_client_tests_list[];
+
+int32_t client_test_psa_call_with_neg_type(caller_security_t);
+#endif
diff --git a/api-tests/ff/ipc/test_i090/test_supp_i090.c b/api-tests/ff/ipc/test_i090/test_supp_i090.c
new file mode 100644
index 0000000..438bfee
--- /dev/null
+++ b/api-tests/ff/ipc/test_i090/test_supp_i090.c
@@ -0,0 +1,79 @@
+/** @file
+ * Copyright (c) 2019, Arm Limited or its affiliates. All rights reserved.
+ * SPDX-License-Identifier : Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+**/
+
+#include "val_client_defs.h"
+#include "val_service_defs.h"
+
+#define val CONCAT(val,_server_sp)
+#define psa CONCAT(psa,_server_sp)
+extern val_api_t *val;
+extern psa_api_t *psa;
+
+int32_t server_test_psa_call_with_neg_type();
+
+server_test_t test_i090_server_tests_list[] = {
+ NULL,
+ server_test_psa_call_with_neg_type,
+ NULL,
+};
+
+int32_t server_test_psa_call_with_neg_type()
+{
+ int32_t status = VAL_STATUS_SUCCESS;
+ psa_msg_t msg = {0};
+ psa_signal_t signals;
+
+ status = val->process_connect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ if (val->err_check_set(TEST_CHECKPOINT_NUM(201), status))
+ {
+ psa->reply(msg.handle, PSA_ERROR_CONNECTION_REFUSED);
+ return status;
+ }
+
+ psa->reply(msg.handle, PSA_SUCCESS);
+
+wait:
+ signals = psa->wait(PSA_WAIT_ANY, PSA_BLOCK);
+ if (signals & SERVER_UNSPECIFED_VERSION_SIGNAL)
+ {
+ if (psa->get(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg) != PSA_SUCCESS)
+ {
+ goto wait;
+ }
+
+ if (msg.type == PSA_IPC_DISCONNECT)
+ {
+ psa->reply(msg.handle, PSA_SUCCESS);
+ return VAL_STATUS_SUCCESS;
+ }
+ else
+ {
+ /* Control shouldn't have come here */
+ val->print(PRINT_ERROR, "\tControl shouldn't have reached here\n", 0);
+ psa->reply(msg.handle, -2);
+ val->process_disconnect_request(SERVER_UNSPECIFED_VERSION_SIGNAL, &msg);
+ psa->reply(msg.handle, PSA_SUCCESS);
+ }
+ }
+ else
+ {
+ val->print(PRINT_ERROR, "\tpsa_wait returned with invalid signal value = 0x%x\n", signals);
+ return VAL_STATUS_ERROR;
+ }
+
+ return VAL_STATUS_ERROR;
+}
diff --git a/api-tests/ff/ipc/test_l088/test_l088.h b/api-tests/ff/ipc/test_l088/test_l088.h
index 618d613..fe916aa 100644
--- a/api-tests/ff/ipc/test_l088/test_l088.h
+++ b/api-tests/ff/ipc/test_l088/test_l088.h
@@ -20,12 +20,12 @@
#include "val_client_defs.h"
#ifdef NONSECURE_TEST_BUILD
-#define test_entry CONCAT(test_entry_,l088)
-#define val CONCAT(val,test_entry)
-#define psa CONCAT(psa,test_entry)
+#define test_entry CONCAT(test_entry_, l088)
+#define val CONCAT(val, test_entry)
+#define psa CONCAT(psa, test_entry)
#else
-#define val CONCAT(val,_client_sp)
-#define psa CONCAT(psa,_client_sp)
+#define val CONCAT(val, _client_sp)
+#define psa CONCAT(psa, _client_sp)
#endif
extern val_api_t *val;
diff --git a/api-tests/ff/ipc/test_l088/test_supp_l088.c b/api-tests/ff/ipc/test_l088/test_supp_l088.c
index 1ca9fe6..7510003 100644
--- a/api-tests/ff/ipc/test_l088/test_supp_l088.c
+++ b/api-tests/ff/ipc/test_l088/test_supp_l088.c
@@ -18,8 +18,8 @@
#include "val_client_defs.h"
#include "val_service_defs.h"
-#define val CONCAT(val,_server_sp)
-#define psa CONCAT(psa,_server_sp)
+#define val CONCAT(val, _server_sp)
+#define psa CONCAT(psa, _server_sp)
extern val_api_t *val;
extern psa_api_t *psa;
diff --git a/api-tests/ff/ipc/testsuite.db b/api-tests/ff/ipc/testsuite.db
index f8a3013..72216ed 100644
--- a/api-tests/ff/ipc/testsuite.db
+++ b/api-tests/ff/ipc/testsuite.db
@@ -108,5 +108,7 @@
test_i086, panic_test
test_i087, panic_test
test_l088
+test_i089, panic_test
+test_i090, panic_test
(END)