SPM: Combine TFM_CORE_ASSERT and TFM_ASSERT
TFM_CORE_ASSERT is same with TFM_ASSERT, so combine them.
- Rename to SPM_ASSERT
- Remove tfm_assert.h
Signed-off-by: Summer Qin <summer.qin@arm.com>
Change-Id: I514a4432b682596523e623516f3af89bc483e6f5
diff --git a/secure_fw/spm/include/utilities.h b/secure_fw/spm/include/utilities.h
index 71180c5..df9eb65 100644
--- a/secure_fw/spm/include/utilities.h
+++ b/secure_fw/spm/include/utilities.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
@@ -17,17 +17,20 @@
*/
void tfm_core_panic(void);
-/* Core assert and spin */
+/* SPM assert */
#ifndef NDEBUG
-#define TFM_CORE_ASSERT(cond) \
- do { \
- if (!(cond)) { \
- while (1) \
- ; \
- } \
+#define SPM_ASSERT(cond) \
+ do { \
+ if (!(cond)) { \
+ SPMLOG_INFMSG("Assert:"); \
+ SPMLOG_INFMSG(__func__); \
+ SPMLOG_INFMSGVAL(",", __LINE__); \
+ while (1) \
+ ; \
+ } \
} while (0)
#else
-#define TFM_CORE_ASSERT(cond)
+#define SPM_ASSERT(cond)
#endif
/* Get container structure start address from member */