Core: Merge IPC model SP data into library model
Merges the necessary secure partition data for IPC model into library
model. Prepare a common partition data structure for optimization.
Change-Id: I88939faa337588f14f351c284e5a9d625af37fa5
Signed-off-by: Edison Ai <edison.ai@arm.com>
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index 565e708..adc57f2 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -12,6 +12,10 @@
#include "tfm_api.h"
#include "spm_partition_defs.h"
#include "secure_fw/core/tfm_secure_api.h"
+#ifdef TFM_PSA_API
+#include "tfm_list.h"
+#include "tfm_wait.h"
+#endif
#define SPM_INVALID_PARTITION_IDX (~0U)
@@ -40,6 +44,7 @@
#define SPM_PART_FLAG_PSA_ROT 0x02
#define SPM_PART_FLAG_IPC 0x04
+#ifndef TFM_PSA_API
/**
* \brief Holds the iovec parameters that are passed to a service
*
@@ -53,11 +58,17 @@
size_t out_len; /*!< Number psa_outvec objects in out_vec
*/
};
+#endif /* !define(TFM_PSA_API) */
/**
* \brief Runtime context information of a partition
*/
struct spm_partition_runtime_data_t {
+#ifdef TFM_PSA_API
+ struct tfm_event_t signal_evnt; /* Event signal */
+ uint32_t signals; /* Service signals had been triggered*/
+ struct tfm_list_node_t service_list;/* Service list */
+#else /* TFM_PSA_API */
uint32_t partition_state;
uint32_t caller_partition_idx;
int32_t caller_client_id;
@@ -72,15 +83,11 @@
struct iovec_args_t iovec_args;
psa_outvec *orig_outvec;
uint32_t *ctx_stack_ptr;
- /*
- * FIXME: There is a 'signal_mask' defined in the structure
- * 'tfm_spm_ipc_partition_t'. It should be eliminated, and the IPC
- * implementation should use the 'signal_mask' define in this structure.
- * However currently the content of 'spm_partition_runtime_data_t' structure
- * is not maintained by the IPC implementation. This is to be fixed with the
- * effort of restructuring common code among library and IPC model.
- */
- uint32_t signal_mask;
+#endif /* TFM_PSA_API */
+ uint32_t signal_mask; /*
+ * Service signal mask passed by
+ * psa_wait()
+ */
};