Core: Add lifecycle API
Add the lifecycle related macros and APIs and only return
PSA_LIFECYCLE_UNKNOWN to the caller. It will be implemented in the
future.
Change-Id: Ia3e327f88c559ac6611ddabf2fb9e8c5150619eb
Signed-off-by: Shawn Shan <shawn.shan@arm.com>
diff --git a/secure_fw/spm/spm_api.c b/secure_fw/spm/spm_api.c
index f162890..044e336 100644
--- a/secure_fw/spm/spm_api.c
+++ b/secure_fw/spm/spm_api.c
@@ -19,6 +19,7 @@
#include "tfm_core.h"
#include "tfm_peripherals_def.h"
#include "spm_partition_defs.h"
+#include "psa/lifecycle.h"
#define NON_SECURE_INTERNAL_PARTITION_DB_IDX 0
#define TFM_CORE_INTERNAL_PARTITION_DB_IDX 1
@@ -106,6 +107,15 @@
TFM_PARTITION_PRIVILEGED_MODE;
}
+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;
+}
+
__attribute__((section("SFN")))
void tfm_spm_partition_change_privilege(uint32_t privileged)
{