1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright (c) 2014, STMicroelectronics International N.V.
4  */
5 
6 #include <assert.h>
7 #include <compiler.h>
8 #include <trace.h>
9 #include <tee_internal_api.h>
10 #include <tee_internal_api_extensions.h>
11 #include <utee_syscalls.h>
12 
_assert_log(const char * expr __maybe_unused,const char * file __maybe_unused,const int line __maybe_unused,const char * func __maybe_unused)13 void _assert_log(const char *expr __maybe_unused,
14 		 const char *file __maybe_unused,
15 		 const int line __maybe_unused,
16 		 const char *func __maybe_unused)
17 {
18 	EMSG_RAW("assertion '%s' failed at %s:%d in %s()",
19 				expr, file, line, func);
20 }
21 
_assert_break(void)22 void __noreturn _assert_break(void)
23 {
24 	_utee_panic(TEE_ERROR_GENERIC);
25 	/* Not reached */
26 	while (1)
27 		;
28 }
29