SPM: Replace SVC "ctx" with actual args
Replace the "ctx" in SVC handler with the actual arguments
for calling PSA API bodies. Thus SVC handler for PSA APIs
can be removed.
The unused arg "lr" of "tfm_spm_client_psa_call()" is also removed.
Change-Id: I2fe96769aa3b6aee4616b627029a4a0590a06f40
Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
diff --git a/secure_fw/spm/CMakeLists.txt b/secure_fw/spm/CMakeLists.txt
index 0881199..d2028d4 100755
--- a/secure_fw/spm/CMakeLists.txt
+++ b/secure_fw/spm/CMakeLists.txt
@@ -47,7 +47,6 @@
$<$<BOOL:${TFM_PSA_API}>:cmsis_psa/spm_ipc.c>
$<$<BOOL:${TFM_PSA_API}>:cmsis_psa/static_load.c>
$<$<BOOL:${TFM_PSA_API}>:ffm/psa_api.c>
- $<$<BOOL:${TFM_PSA_API}>:ffm/psa_api_svc.c>
$<$<BOOL:${TFM_PSA_API}>:cmsis_psa/tfm_core_svcalls_ipc.c>
$<$<AND:$<BOOL:${TFM_PSA_API}>,$<NOT:$<BOOL:${TFM_MULTI_CORE_TOPOLOGY}>>>:cmsis_psa/tfm_nspm_ipc.c>
$<$<BOOL:${TFM_PSA_API}>:cmsis_psa/tfm_pools.c>
diff --git a/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c b/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
index aa29c07..7e41f84 100644
--- a/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
+++ b/secure_fw/spm/cmsis_psa/tfm_core_svcalls_ipc.c
@@ -6,19 +6,20 @@
*/
#include <string.h>
-#include "load/partition_defs.h"
#include "region.h"
#include "spm_ipc.h"
+#include "svc_num.h"
#include "tfm_api.h"
#include "tfm_arch.h"
#include "tfm_core_trustzone.h"
#include "tfm_core_utils.h"
#include "tfm_svcalls.h"
#include "utilities.h"
-#include "svc_num.h"
#include "ffm/tfm_boot_data.h"
-#include "ffm/psa_api_svc.h"
+#include "ffm/psa_api.h"
#include "tfm_hal_spm_logdev.h"
+#include "load/partition_defs.h"
+#include "psa/client.h"
/* MSP bottom (higher address) */
REGION_DECLARE(Image$$, ARM_LIB_STACK_MSP, $$ZI$$Limit);
@@ -42,44 +43,50 @@
switch (svc_num) {
case TFM_SVC_PSA_FRAMEWORK_VERSION:
- return tfm_spm_psa_framework_version();
+ return tfm_spm_client_psa_framework_version();
case TFM_SVC_PSA_VERSION:
- return tfm_spm_psa_version(ctx);
+ return tfm_spm_client_psa_version(ctx[0]);
case TFM_SVC_PSA_CONNECT:
- return tfm_spm_psa_connect(ctx);
+ return tfm_spm_client_psa_connect(ctx[0], ctx[1]);
case TFM_SVC_PSA_CALL:
- return tfm_spm_psa_call(ctx, lr);
+ return tfm_spm_client_psa_call((psa_handle_t)ctx[0], ctx[1],
+ (const psa_invec *)ctx[2],
+ (psa_outvec *)ctx[3]);
case TFM_SVC_PSA_CLOSE:
- tfm_spm_psa_close(ctx);
+ tfm_spm_client_psa_close((psa_handle_t)ctx[0]);
break;
case TFM_SVC_PSA_WAIT:
- return tfm_spm_psa_wait(ctx);
+ return tfm_spm_partition_psa_wait((psa_signal_t)ctx[0], ctx[1]);
case TFM_SVC_PSA_GET:
- return tfm_spm_psa_get(ctx);
+ return tfm_spm_partition_psa_get((psa_signal_t)ctx[0],
+ (psa_msg_t *)ctx[1]);
case TFM_SVC_PSA_SET_RHANDLE:
- tfm_spm_psa_set_rhandle(ctx);
+ tfm_spm_partition_psa_set_rhandle((psa_handle_t)ctx[0], (void *)ctx[1]);
break;
case TFM_SVC_PSA_READ:
- return tfm_spm_psa_read(ctx);
+ return tfm_spm_partition_psa_read((psa_handle_t)ctx[0], ctx[1],
+ (void *)ctx[2], (size_t)ctx[3]);
case TFM_SVC_PSA_SKIP:
- return tfm_spm_psa_skip(ctx);
+ return tfm_spm_partition_psa_skip((psa_handle_t)ctx[0], ctx[1],
+ (size_t)ctx[2]);
case TFM_SVC_PSA_WRITE:
- tfm_spm_psa_write(ctx);
+ tfm_spm_partition_psa_write((psa_handle_t)ctx[0], ctx[1],
+ (void *)ctx[2], (size_t)ctx[3]);
break;
case TFM_SVC_PSA_REPLY:
- tfm_spm_psa_reply(ctx);
+ tfm_spm_partition_psa_reply((psa_handle_t)ctx[0], (psa_status_t)ctx[1]);
break;
case TFM_SVC_PSA_NOTIFY:
- tfm_spm_psa_notify(ctx);
+ tfm_spm_partition_psa_notify((int32_t)ctx[0]);
break;
case TFM_SVC_PSA_CLEAR:
- tfm_spm_psa_clear();
+ tfm_spm_partition_psa_clear();
break;
case TFM_SVC_PSA_EOI:
- tfm_spm_psa_eoi(ctx);
+ tfm_spm_partition_psa_eoi((psa_signal_t)ctx[0]);
break;
case TFM_SVC_PSA_PANIC:
- tfm_spm_psa_panic();
+ tfm_spm_partition_psa_panic();
break;
case TFM_SVC_SPM_REQUEST:
tfm_spm_request_handler((const struct tfm_state_context_t *)ctx);
@@ -91,12 +98,12 @@
return tfm_hal_output_spm_log((const char *)ctx[0], ctx[1]);
#endif
case TFM_SVC_PSA_IRQ_ENABLE:
- tfm_spm_irq_enable(ctx);
+ tfm_spm_partition_irq_enable((psa_signal_t)ctx[0]);
break;
case TFM_SVC_PSA_IRQ_DISABLE:
- return tfm_spm_irq_disable(ctx);
+ return tfm_spm_partition_irq_disable((psa_signal_t)ctx[0]);
case TFM_SVC_PSA_RESET_SIGNAL:
- tfm_spm_psa_reset_signal(ctx);
+ tfm_spm_partition_psa_reset_signal((psa_signal_t)ctx[0]);
break;
default:
#ifdef PLATFORM_SVC_HANDLERS
diff --git a/secure_fw/spm/cmsis_psa/tfm_rpc.c b/secure_fw/spm/cmsis_psa/tfm_rpc.c
index 7b366ce..9fc1ced 100644
--- a/secure_fw/spm/cmsis_psa/tfm_rpc.c
+++ b/secure_fw/spm/cmsis_psa/tfm_rpc.c
@@ -10,6 +10,7 @@
#include "tfm_rpc.h"
#include "utilities.h"
#include "load/partition_defs.h"
+#include "tfm_psa_call_param.h"
static void default_handle_req(void)
{
@@ -57,9 +58,11 @@
{
TFM_CORE_ASSERT(params != NULL);
- return tfm_spm_client_psa_call(params->handle, params->type,
- params->in_vec, params->in_len,
- params->out_vec, params->out_len);
+ return tfm_spm_client_psa_call(params->handle,
+ PARAM_PACK(params->type,
+ params->in_len,
+ params->out_len),
+ params->in_vec, params->out_vec);
}
void tfm_rpc_psa_close(const struct client_call_params_t *params)
diff --git a/secure_fw/spm/ffm/psa_api.c b/secure_fw/spm/ffm/psa_api.c
index a65bdec..6d5b746 100644
--- a/secure_fw/spm/ffm/psa_api.c
+++ b/secure_fw/spm/ffm/psa_api.c
@@ -5,7 +5,9 @@
*
*/
+#include <stdint.h>
#include "bitops.h"
+#include "psa/lifecycle.h"
#include "psa/service.h"
#include "spm_ipc.h"
#include "tfm_arch.h"
@@ -21,10 +23,23 @@
#include "tfm_rpc.h"
#include "tfm_spm_hal.h"
#include "tfm_hal_platform.h"
+#include "tfm_psa_call_param.h"
#define GET_STATELESS_SERVICE(index) (stateless_services_ref_tbl[index])
extern struct service_t *stateless_services_ref_tbl[];
+
+uint32_t tfm_spm_get_lifecycle_state(void)
+{
+ /*
+ * FixMe: return PSA_LIFECYCLE_UNKNOWN to the caller directly. It will be
+ * implemented in the future.
+ */
+ return PSA_LIFECYCLE_UNKNOWN;
+}
+
+/* PSA Client API function body */
+
uint32_t tfm_spm_client_psa_framework_version(void)
{
return PSA_FRAMEWORK_VERSION;
@@ -129,9 +144,10 @@
return PSA_SUCCESS;
}
-psa_status_t tfm_spm_client_psa_call(psa_handle_t handle, int32_t type,
- const psa_invec *inptr, size_t in_num,
- psa_outvec *outptr, size_t out_num)
+psa_status_t tfm_spm_client_psa_call(psa_handle_t handle,
+ uint32_t ctrl_param,
+ const psa_invec *inptr,
+ psa_outvec *outptr)
{
psa_invec invecs[PSA_MAX_IOVEC];
psa_outvec outvecs[PSA_MAX_IOVEC];
@@ -143,6 +159,9 @@
uint32_t sid, version, index;
uint32_t privileged;
bool ns_caller = tfm_spm_is_ns_caller();
+ int32_t type = (int32_t)(int16_t)((ctrl_param & TYPE_MASK) >> TYPE_OFFSET);
+ size_t in_num = (size_t)((ctrl_param & IN_LEN_MASK) >> IN_LEN_OFFSET);
+ size_t out_num = (size_t)((ctrl_param & OUT_LEN_MASK) >> OUT_LEN_OFFSET);
/* The request type must be zero or positive. */
if (type < 0) {
@@ -386,6 +405,8 @@
tfm_spm_send_event(service, msg);
}
+/* PSA Partition API function body */
+
psa_signal_t tfm_spm_partition_psa_wait(psa_signal_t signal_mask,
uint32_t timeout)
{
diff --git a/secure_fw/spm/ffm/psa_api.h b/secure_fw/spm/ffm/psa_api.h
index 1c67079..9ed6d0f 100644
--- a/secure_fw/spm/ffm/psa_api.h
+++ b/secure_fw/spm/ffm/psa_api.h
@@ -23,6 +23,17 @@
} \
} while (0)
+/**
+ * \brief This function get the current PSA RoT lifecycle state.
+ *
+ * \return state The current security lifecycle state of the PSA
+ * RoT. The PSA state and implementation state are
+ * encoded as follows:
+ * \arg state[15:8] – PSA lifecycle state
+ * \arg state[7:0] – IMPLEMENTATION DEFINED state
+ */
+uint32_t tfm_spm_get_lifecycle_state(void);
+
/* PSA Client API function body, for privileged use only. */
/**
@@ -66,16 +77,12 @@
*
* \param[in] handle Service handle to the established connection,
* \ref psa_handle_t
- * \param[in] type The request type.
- * Must be zero( \ref PSA_IPC_CALL) or positive.
+ * \param[in] ctrl_param Parameters combined in uint32_t,
+ * includes request type, in_num and out_num.
* \param[in] inptr Array of input psa_invec structures.
* \ref psa_invec
- * \param[in] in_num Number of input psa_invec structures.
- * \ref psa_invec
* \param[in] outptr Array of output psa_outvec structures.
* \ref psa_outvec
- * \param[in] out_num Number of outut psa_outvec structures.
- * \ref psa_outvec
*
* \retval PSA_SUCCESS Success.
* \retval "Does not return" The call is invalid, one or more of the
@@ -87,9 +94,10 @@
* \arg The message is unrecognized by the RoT
* Service or incorrectly formatted.
*/
-psa_status_t tfm_spm_client_psa_call(psa_handle_t handle, int32_t type,
- const psa_invec *inptr, size_t in_num,
- psa_outvec *outptr, size_t out_num);
+psa_status_t tfm_spm_client_psa_call(psa_handle_t handle,
+ uint32_t ctrl_param,
+ const psa_invec *inptr,
+ psa_outvec *outptr);
/**
* \brief handler for \ref psa_close.
diff --git a/secure_fw/spm/ffm/psa_api_svc.c b/secure_fw/spm/ffm/psa_api_svc.c
deleted file mode 100644
index 5ddfd89..0000000
--- a/secure_fw/spm/ffm/psa_api_svc.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#include <stdint.h>
-#include "psa_api.h"
-#include "psa/lifecycle.h"
-#include "spm_ipc.h"
-#include "tfm_core_utils.h"
-#include "tfm_hal_defs.h"
-#include "tfm_hal_platform.h"
-#include "ffm/spm_error_base.h"
-#include "tfm_rpc.h"
-#include "tfm_spm_hal.h"
-#include "tfm_psa_call_param.h"
-#include "load/irq_defs.h"
-#include "load/partition_defs.h"
-#include "load/service_defs.h"
-
-/****** SVC-use only. SVC args unstacking for PSA Client APIs ******/
-
-uint32_t tfm_spm_get_lifecycle_state(void)
-{
- /*
- * FixMe: return PSA_LIFECYCLE_UNKNOWN to the caller directly. It will be
- * implemented in the future.
- */
- return PSA_LIFECYCLE_UNKNOWN;
-}
-
-uint32_t tfm_spm_psa_framework_version(void)
-{
- return tfm_spm_client_psa_framework_version();
-}
-
-uint32_t tfm_spm_psa_version(uint32_t *args)
-{
- uint32_t sid;
-
- TFM_CORE_ASSERT(args != NULL);
- sid = (uint32_t)args[0];
-
- return tfm_spm_client_psa_version(sid);
-}
-
-psa_status_t tfm_spm_psa_connect(uint32_t *args)
-{
- uint32_t sid;
- uint32_t version;
-
- TFM_CORE_ASSERT(args != NULL);
- sid = (uint32_t)args[0];
- version = (uint32_t)args[1];
-
- return tfm_spm_client_psa_connect(sid, version);
-}
-
-psa_status_t tfm_spm_psa_call(uint32_t *args, uint32_t lr)
-{
- psa_handle_t handle;
- psa_invec *inptr;
- psa_outvec *outptr;
- size_t in_num, out_num;
- int32_t type;
-
- TFM_CORE_ASSERT(args != NULL);
- handle = (psa_handle_t)args[0];
- type = (int32_t)(int16_t)((args[1] & TYPE_MASK) >> TYPE_OFFSET);
- in_num = (size_t)((args[1] & IN_LEN_MASK) >> IN_LEN_OFFSET);
- out_num = (size_t)((args[1] & OUT_LEN_MASK) >> OUT_LEN_OFFSET);
- inptr = (psa_invec *)args[2];
- outptr = (psa_outvec *)args[3];
-
- return tfm_spm_client_psa_call(handle, type, inptr, in_num, outptr,
- out_num);
-}
-
-void tfm_spm_psa_close(uint32_t *args)
-{
- psa_handle_t handle;
-
- TFM_CORE_ASSERT(args != NULL);
- handle = args[0];
-
- tfm_spm_client_psa_close(handle);
-}
-
-/****** SVC-use only. SVC args unstacking for PSA Partition APIs ******/
-
-psa_signal_t tfm_spm_psa_wait(uint32_t *args)
-{
- psa_signal_t signal_mask;
- uint32_t timeout;
-
- TFM_CORE_ASSERT(args != NULL);
- signal_mask = (psa_signal_t)args[0];
- timeout = args[1];
-
- return tfm_spm_partition_psa_wait(signal_mask, timeout);
-}
-
-psa_status_t tfm_spm_psa_get(uint32_t *args)
-{
- psa_signal_t signal;
- psa_msg_t *msg = NULL;
-
- TFM_CORE_ASSERT(args != NULL);
- signal = (psa_signal_t)args[0];
- msg = (psa_msg_t *)args[1];
-
- return tfm_spm_partition_psa_get(signal, msg);
-}
-
-void tfm_spm_psa_set_rhandle(uint32_t *args)
-{
- psa_handle_t msg_handle;
- void *rhandle = NULL;
-
- TFM_CORE_ASSERT(args != NULL);
- msg_handle = (psa_handle_t)args[0];
- rhandle = (void *)args[1];
-
- tfm_spm_partition_psa_set_rhandle(msg_handle, rhandle);
-}
-
-size_t tfm_spm_psa_read(uint32_t *args)
-{
- psa_handle_t msg_handle;
- uint32_t invec_idx;
- void *buffer = NULL;
- size_t num_bytes;
-
- TFM_CORE_ASSERT(args != NULL);
- msg_handle = (psa_handle_t)args[0];
- invec_idx = args[1];
- buffer = (void *)args[2];
- num_bytes = (size_t)args[3];
-
- return tfm_spm_partition_psa_read(msg_handle, invec_idx, buffer, num_bytes);
-}
-
-size_t tfm_spm_psa_skip(uint32_t *args)
-{
- psa_handle_t msg_handle;
- uint32_t invec_idx;
- size_t num_bytes;
-
- TFM_CORE_ASSERT(args != NULL);
- msg_handle = (psa_handle_t)args[0];
- invec_idx = args[1];
- num_bytes = (size_t)args[2];
-
- return tfm_spm_partition_psa_skip(msg_handle, invec_idx, num_bytes);
-}
-
-void tfm_spm_psa_write(uint32_t *args)
-{
- psa_handle_t msg_handle;
- uint32_t outvec_idx;
- void *buffer = NULL;
- size_t num_bytes;
-
- TFM_CORE_ASSERT(args != NULL);
- msg_handle = (psa_handle_t)args[0];
- outvec_idx = args[1];
- buffer = (void *)args[2];
- num_bytes = (size_t)args[3];
-
- tfm_spm_partition_psa_write(msg_handle, outvec_idx, buffer, num_bytes);
-}
-
-void tfm_spm_psa_reply(uint32_t *args)
-{
- psa_handle_t msg_handle;
- psa_status_t status;
-
- TFM_CORE_ASSERT(args != NULL);
- msg_handle = (psa_handle_t)args[0];
- status = (psa_status_t)args[1];
-
- tfm_spm_partition_psa_reply(msg_handle, status);
-}
-
-void tfm_spm_psa_notify(uint32_t *args)
-{
- int32_t partition_id;
-
- TFM_CORE_ASSERT(args != NULL);
- partition_id = (int32_t)args[0];
-
- tfm_spm_partition_psa_notify(partition_id);
-}
-
-void tfm_spm_psa_clear(void)
-{
- tfm_spm_partition_psa_clear();
-}
-
-void tfm_spm_psa_eoi(uint32_t *args)
-{
- psa_signal_t irq_signal;
-
- TFM_CORE_ASSERT(args != NULL);
- irq_signal = (psa_signal_t)args[0];
-
- tfm_spm_partition_psa_eoi(irq_signal);
-}
-
-void tfm_spm_psa_panic(void)
-{
- tfm_spm_partition_psa_panic();
-}
-
-void tfm_spm_irq_enable(uint32_t *args)
-{
- psa_signal_t irq_signal;
-
- TFM_CORE_ASSERT(args != NULL);
- irq_signal = (psa_signal_t)args[0];
-
- tfm_spm_partition_irq_enable(irq_signal);
-}
-
-psa_irq_status_t tfm_spm_irq_disable(uint32_t *args)
-{
- psa_signal_t irq_signal;
-
- TFM_CORE_ASSERT(args != NULL);
- irq_signal = (psa_signal_t)args[0];
-
- return tfm_spm_partition_irq_disable(irq_signal);
-}
-
-void tfm_spm_psa_reset_signal(uint32_t *args)
-{
- psa_signal_t irq_signal;
-
- if (!args) {
- tfm_core_panic();
- }
-
- irq_signal = (psa_signal_t)args[0];
-
- tfm_spm_partition_psa_reset_signal(irq_signal);
-}
diff --git a/secure_fw/spm/ffm/psa_api_svc.h b/secure_fw/spm/ffm/psa_api_svc.h
deleted file mode 100644
index fea1238..0000000
--- a/secure_fw/spm/ffm/psa_api_svc.h
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- *
- */
-
-#ifndef __PSA_API_SVC_H__
-#define __PSA_API_SVC_H__
-
-/* Svcall for PSA Client APIs */
-
-/*
- * \brief This function get the current PSA RoT lifecycle state.
- *
- * \return state The current security lifecycle state of the PSA
- * RoT. The PSA state and implementation state are
- * encoded as follows:
- * \arg state[15:8] – PSA lifecycle state
- * \arg state[7:0] – IMPLEMENTATION DEFINED state
- */
-uint32_t tfm_spm_get_lifecycle_state(void);
-
-/**
- * \brief SVC handler for \ref psa_framework_version.
- *
- * \return version The version of the PSA Framework implementation
- * that is providing the runtime services to the
- * caller.
- */
-uint32_t tfm_spm_psa_framework_version(void);
-
-/**
- * \brief SVC handler for \ref psa_version.
- *
- * \param[in] args Include all input arguments: sid.
- *
- * \retval PSA_VERSION_NONE The RoT Service is not implemented, or the
- * caller is not permitted to access the service.
- * \retval > 0 The version of the implemented RoT Service.
- */
-uint32_t tfm_spm_psa_version(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_connect.
- *
- * \param[in] args Include all input arguments:
- * sid, version.
- *
- * \retval PSA_SUCCESS Success.
- * \retval PSA_ERROR_CONNECTION_REFUSED The SPM or RoT Service has refused the
- * connection.
- * \retval PSA_ERROR_CONNECTION_BUSY The SPM or RoT Service cannot make the
- * connection at the moment.
- * \retval "Does not return" The RoT Service ID and version are not
- * supported, or the caller is not permitted to
- * access the service.
- */
-psa_status_t tfm_spm_psa_connect(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_call.
- *
- * \param[in] args Include all input arguments:
- * handle, in_vec, in_len, out_vec, out_len.
- * \param[in] lr EXC_RETURN value of the SVC.
- *
- * \retval >=0 RoT Service-specific status value.
- * \retval <0 RoT Service-specific error code.
- * \retval PSA_ERROR_PROGRAMMER_ERROR The connection has been terminated by the
- * RoT Service. The call is a PROGRAMMER ERROR if
- * one or more of the following are true:
- * \arg An invalid handle was passed.
- * \arg The connection is already handling a request.
- * \arg type < 0.
- * \arg An invalid memory reference was provided.
- * \arg in_len + out_len > PSA_MAX_IOVEC.
- * \arg The message is unrecognized by the RoT
- * Service or incorrectly formatted.
- */
-psa_status_t tfm_spm_psa_call(uint32_t *args, uint32_t lr);
-
-/**
- * \brief SVC handler for \ref psa_close.
- *
- * \param[in] args Include all input arguments: handle.
- *
- * \retval void Success.
- * \retval "Does not return" The call is invalid, one or more of the
- * following are true:
- * \arg An invalid handle was provided that is not
- * the null handle.
- * \arg The connection is handling a request.
- */
-void tfm_spm_psa_close(uint32_t *args);
-
-/* Svcall for PSA Partition APIs */
-
-/**
- * \brief SVC handler for \ref psa_wait.
- *
- * \param[in] args Include all input arguments:
- * signal_mask, timeout.
- *
- * \retval >0 At least one signal is asserted.
- * \retval 0 No signals are asserted. This is only seen when
- * a polling timeout is used.
- */
-psa_signal_t tfm_spm_psa_wait(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_get.
- *
- * \param[in] args Include all input arguments: signal, msg.
- *
- * \retval PSA_SUCCESS Success, *msg will contain the delivered
- * message.
- * \retval PSA_ERROR_DOES_NOT_EXIST Message could not be delivered.
- * \retval "Does not return" The call is invalid because one or more of the
- * following are true:
- * \arg signal has more than a single bit set.
- * \arg signal does not correspond to an RoT Service.
- * \arg The RoT Service signal is not currently
- * asserted.
- * \arg The msg pointer provided is not a valid memory
- * reference.
- */
-psa_status_t tfm_spm_psa_get(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_set_rhandle.
- *
- * \param[in] args Include all input arguments:
- * msg_handle, rhandle.
- *
- * \retval void Success, rhandle will be provided with all
- * subsequent messages delivered on this
- * connection.
- * \retval "Does not return" msg_handle is invalid.
- */
-void tfm_spm_psa_set_rhandle(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_read.
- *
- * \param[in] args Include all input arguments:
- * msg_handle, invec_idx, buffer, num_bytes.
- *
- * \retval >0 Number of bytes copied.
- * \retval 0 There was no remaining data in this input
- * vector.
- * \retval "Does not return" The call is invalid, one or more of the
- * following are true:
- * \arg msg_handle is invalid.
- * \arg msg_handle does not refer to a request
- * message.
- * \arg invec_idx is equal to or greater than
- * \ref PSA_MAX_IOVEC.
- * \arg the memory reference for buffer is invalid or
- * not writable.
- */
-size_t tfm_spm_psa_read(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_skip.
- *
- * \param[in] args Include all input arguments:
- * msg_handle, invec_idx, num_bytes.
- *
- * \retval >0 Number of bytes skipped.
- * \retval 0 There was no remaining data in this input
- * vector.
- * \retval "Does not return" The call is invalid, one or more of the
- * following are true:
- * \arg msg_handle is invalid.
- * \arg msg_handle does not refer to a request
- * message.
- * \arg invec_idx is equal to or greater than
- * \ref PSA_MAX_IOVEC.
- */
-size_t tfm_spm_psa_skip(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_write.
- *
- * \param[in] args Include all input arguments:
- * msg_handle, outvec_idx, buffer, num_bytes.
- *
- * \retval void Success
- * \retval "Does not return" The call is invalid, one or more of the
- * following are true:
- * \arg msg_handle is invalid.
- * \arg msg_handle does not refer to a request
- * message.
- * \arg outvec_idx is equal to or greater than
- * \ref PSA_MAX_IOVEC.
- * \arg The memory reference for buffer is invalid.
- * \arg The call attempts to write data past the end
- * of the client output vector.
- */
-void tfm_spm_psa_write(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_reply.
- *
- * \param[in] args Include all input arguments:
- * msg_handle, status.
- *
- * \retval void Success.
- * \retval "Does not return" The call is invalid, one or more of the
- * following are true:
- * \arg msg_handle is invalid.
- * \arg An invalid status code is specified for the
- * type of message.
- */
-void tfm_spm_psa_reply(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_notify.
- *
- * \param[in] args Include all input arguments: partition_id.
- *
- * \retval void Success.
- * \retval "Does not return" partition_id does not correspond to a Secure
- * Partition.
- */
-void tfm_spm_psa_notify(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_clear.
- *
- * \retval void Success.
- * \retval "Does not return" The Secure Partition's doorbell signal is not
- * currently asserted.
- */
-void tfm_spm_psa_clear(void);
-
-/**
- * \brief SVC handler for \ref psa_eoi.
- *
- * \param[in] args Include all input arguments: irq_signal.
- *
- * \retval void Success.
- * \retval "Does not return" The call is invalid, one or more of the
- * following are true:
- * \arg irq_signal is not an interrupt signal.
- * \arg irq_signal indicates more than one signal.
- * \arg irq_signal is not currently asserted.
- */
-void tfm_spm_psa_eoi(uint32_t *args);
-
-/**
- * \brief Terminate execution within the calling Secure Partition and will not
- * return.
- *
- * \retval "Does not return"
- */
-void tfm_spm_psa_panic(void);
-
-/**
- * \brief SVC handler for \ref psa_irq_enable.
- *
- * \param[in] args Include all input arguments: irq_signal.
- *
- * \retval void
- * \retval "Does not return" The call is invalid, if one or more of the
- * following are true:
- * \arg irq_signal does not belong to the calling
- * partition.
- * \arg irq_signal indicates more than one signal.
- */
-void tfm_spm_irq_enable(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_irq_disable.
- *
- * \param[in] args Include all input arguments: irq_signal.
- *
- * \retval 0 The interrupt was disabled prior to this call
- * 1 The interrupt was enabled prior to this call
- * \retval "Does not return" The call is invalid, if one or more of the
- * following are true:
- * \arg irq_signal does not belong to the calling
- * partition.
- * \arg irq_signal indicates more than one signal.
- */
-psa_irq_status_t tfm_spm_irq_disable(uint32_t *args);
-
-/**
- * \brief SVC handler for \ref psa_reset_signal.
- *
- * \param[in] args Include all input arguments: irq_signal.
- *
- * \retval void
- * \retval "Does not return" if one or more of the following are true:
- * \arg irq_signal is not a signal for an interrupt
- * that is specified with FLIH handling in the Secure
- * Partition manifest.
- * \arg irq_signal indicates more than one signal.
- * \arg irq_signal is not currently asserted.
- */
-void tfm_spm_psa_reset_signal(uint32_t *args);
-
-#endif /* __PSA_API_SVC_H__ */