SPM: Change to new SPM log APIs
Change the LOG_MSG to new log APIs in SPM part.
Change-Id: Ief970fdcff6dfa80b272d29234014ead1ffb18ff
Signed-off-by: Shawn Shan <Shawn.Shan@arm.com>
diff --git a/secure_fw/spm/include/tfm_assert.h b/secure_fw/spm/include/tfm_assert.h
new file mode 100644
index 0000000..803a70d
--- /dev/null
+++ b/secure_fw/spm/include/tfm_assert.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#ifndef __TFM_ASSERT_H__
+#define __TFM_ASSERT_H__
+
+#include "tfm_spm_log.h"
+
+/* Functions and macros in this file is for 'thread mode' usage. */
+
+#define TFM_ASSERT(cond) \
+ do { \
+ if (!(cond)) { \
+ SPMLOG_INFMSG("Assert:"); \
+ SPMLOG_INFMSG(__FUNCTION__); \
+ SPMLOG_INFMSGVAL(",", __LINE__); \
+ while (1) \
+ ; \
+ } \
+ } while (0)
+
+#endif /* __TFM_ASSERT_H__ */