Core: Enhance the psa_call to process invalid message
When the message is unrecognized by the RoT Service or incorrectly
formatted, return PSA_ERROR_PROGRAMMER_ERROR immediately.
Change-Id: If85dc271ed9ad7e8a22197352ca87065b7f27684
Signed-off-by: Shawn Shan <shawn.shan@arm.com>
diff --git a/secure_fw/spm/spm_api.h b/secure_fw/spm/spm_api.h
index 7451ee0..e61b411 100644
--- a/secure_fw/spm/spm_api.h
+++ b/secure_fw/spm/spm_api.h
@@ -50,6 +50,7 @@
#define TFM_HANDLE_STATUS_IDLE 0
#define TFM_HANDLE_STATUS_ACTIVE 1
+#define TFM_HANDLE_STATUS_CONNECT_ERROR 2
#ifndef TFM_PSA_API
/**
@@ -119,9 +120,11 @@
struct tfm_conn_handle_t {
void *rhandle; /* Reverse handle value */
uint32_t status; /*
- * Status of handle, two valid options:
- * TFM_HANDLE_STATUS_ACTIVE and
- * TFM_HANDLE_STATUS_IDLE
+ * Status of handle, three valid
+ * options:
+ * TFM_HANDLE_STATUS_ACTIVE,
+ * TFM_HANDLE_STATUS_IDLE and
+ * TFM_HANDLE_STATUS_CONNECT_ERROR
*/
int32_t client_id; /*
* Partition ID of the sender of the