libc: Adapt to TFTF
Add support for functions used in TFTF but not in TF-A.
Replaced calls to plat_panic_handler with calls to panic, since there is no
implementation of the former in TFTF.
Change-Id: Ic10de2c6e749db97b932cd7ffbb6067b5befe914
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
diff --git a/include/lib/libc/assert.h b/include/lib/libc/assert.h
index d04f9dc..ce631e3 100644
--- a/include/lib/libc/assert.h
+++ b/include/lib/libc/assert.h
@@ -9,33 +9,15 @@
#include <cdefs.h>
-#include <platform_def.h>
-
#include <common/debug.h>
-#ifndef PLAT_LOG_LEVEL_ASSERT
-#define PLAT_LOG_LEVEL_ASSERT LOG_LEVEL
-#endif
-
#if ENABLE_ASSERTIONS
-# if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
-# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
-# elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
-# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__))
-# else
-# define assert(e) ((e) ? (void)0 : __assert())
-# endif
+#define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, #e))
#else
#define assert(e) ((void)0)
#endif /* ENABLE_ASSERTIONS */
-#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
__dead2 void __assert(const char *file, unsigned int line,
const char *assertion);
-#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
-__dead2 void __assert(const char *file, unsigned int line);
-#else
-__dead2 void __assert(void);
-#endif
#endif /* ASSERT_H */