Core: Detect the concurrent handling handle in psa_call
According to PSA FF 1.0.0, it is a PROGRAMMER ERROR when the connection
is already handling a request.
Change-Id: I2f445a948e094adf0f177c57b6924113bc130ca9
Signed-off-by: Shawn Shan <shawn.shan@arm.com>
diff --git a/secure_fw/core/ipc/tfm_psa_client_call.c b/secure_fw/core/ipc/tfm_psa_client_call.c
index dfb6ef3..5f40ad4d 100644
--- a/secure_fw/core/ipc/tfm_psa_client_call.c
+++ b/secure_fw/core/ipc/tfm_psa_client_call.c
@@ -144,6 +144,12 @@
tfm_core_panic();
}
+ /* It is a fatal error if the connection is currently handling a request. */
+ if (((struct tfm_conn_handle_t *)handle)->status ==
+ TFM_HANDLE_STATUS_ACTIVE) {
+ tfm_core_panic();
+ }
+
/*
* Read client invecs from the wrap input vector. It is a fatal error
* if the memory reference for the wrap input vector is invalid or not