1 /*
2  * Copyright (c) 2018-2024, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #include <stdio.h>
9 #include "tfm_hal_device_header.h"
10 #include "target_cfg.h"
11 #include "utilities.h"
12 /* "exception_info.h" must be the last include because of the IAR pragma */
13 #include "exception_info.h"
14 
C_SCU_Handler(void)15 void C_SCU_Handler(void)
16 {
17     ERROR_MSG("Platform Exception: secure violation fault!!!");
18 
19     tfm_core_panic();
20 }
21 
SCU_IRQHandler(void)22 __attribute__((naked)) void SCU_IRQHandler(void)
23 {
24     EXCEPTION_INFO();
25 
26     __ASM volatile(
27         "BL        C_SCU_Handler           \n"
28         "B         .                       \n"
29     );
30 }
31 
C_MPC_Handler(void)32 void C_MPC_Handler(void)
33 {
34     /* Print fault message and block execution */
35     ERROR_MSG("Platform Exception: MPC fault!!!");
36 
37     tfm_core_panic();
38 }
39 
MPC_Handler(void)40 __attribute__((naked)) void MPC_Handler(void)
41 {
42     EXCEPTION_INFO();
43 
44     __ASM volatile(
45         "BL        C_MPC_Handler           \n"
46         "B         .                       \n"
47     );
48 }
49 
C_PPC_Handler(void)50 void C_PPC_Handler(void)
51 {
52     /* Print fault message and block execution */
53     ERROR_MSG("Platform Exception: PPC fault!!!");
54 
55     tfm_core_panic();
56 }
57 
PPC_Handler(void)58 __attribute__((naked)) void PPC_Handler(void)
59 {
60     EXCEPTION_INFO();
61 
62     __ASM volatile(
63         "BL        C_PPC_Handler           \n"
64         "B         .                       \n"
65     );
66 }
67