xref: /optee_os/lib/libutee/tee_api_panic.c (revision 94e8a4fcc5a427874ca716569a6b819d18e6f00c)
1*94e8a4fcSJens Wiklander /*
2*94e8a4fcSJens Wiklander  * Copyright (c) 2014, STMicroelectronics International N.V.
3*94e8a4fcSJens Wiklander  * All rights reserved.
4*94e8a4fcSJens Wiklander  *
5*94e8a4fcSJens Wiklander  * Redistribution and use in source and binary forms, with or without
6*94e8a4fcSJens Wiklander  * modification, are permitted provided that the following conditions are met:
7*94e8a4fcSJens Wiklander  *
8*94e8a4fcSJens Wiklander  * 1. Redistributions of source code must retain the above copyright notice,
9*94e8a4fcSJens Wiklander  * this list of conditions and the following disclaimer.
10*94e8a4fcSJens Wiklander  *
11*94e8a4fcSJens Wiklander  * 2. Redistributions in binary form must reproduce the above copyright notice,
12*94e8a4fcSJens Wiklander  * this list of conditions and the following disclaimer in the documentation
13*94e8a4fcSJens Wiklander  * and/or other materials provided with the distribution.
14*94e8a4fcSJens Wiklander  *
15*94e8a4fcSJens Wiklander  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16*94e8a4fcSJens Wiklander  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*94e8a4fcSJens Wiklander  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*94e8a4fcSJens Wiklander  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19*94e8a4fcSJens Wiklander  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20*94e8a4fcSJens Wiklander  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21*94e8a4fcSJens Wiklander  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22*94e8a4fcSJens Wiklander  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23*94e8a4fcSJens Wiklander  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24*94e8a4fcSJens Wiklander  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25*94e8a4fcSJens Wiklander  * POSSIBILITY OF SUCH DAMAGE.
26*94e8a4fcSJens Wiklander  */
27*94e8a4fcSJens Wiklander #include <tee_api.h>
28*94e8a4fcSJens Wiklander #include <utee_syscalls.h>
29*94e8a4fcSJens Wiklander 
30*94e8a4fcSJens Wiklander #undef TEE_Panic
31*94e8a4fcSJens Wiklander 
32*94e8a4fcSJens Wiklander /* System API - Misc */
33*94e8a4fcSJens Wiklander 
34*94e8a4fcSJens Wiklander void __noreturn __TEE_Panic(TEE_Result panicCode)
35*94e8a4fcSJens Wiklander {
36*94e8a4fcSJens Wiklander 	utee_panic(panicCode);
37*94e8a4fcSJens Wiklander }
38*94e8a4fcSJens Wiklander 
39*94e8a4fcSJens Wiklander void __noreturn TEE_Panic(TEE_Result panicCode)
40*94e8a4fcSJens Wiklander {
41*94e8a4fcSJens Wiklander 	__TEE_Panic(panicCode);
42*94e8a4fcSJens Wiklander }
43*94e8a4fcSJens Wiklander 
44