blob: 02c7e18768033b39e5a02798c94fa0e6dc06547f [file] [log] [blame]
Fathi Boudra422bf772019-12-02 11:10:16 +02001diff --git a/plat/arm/board/fvp/aarch64/fvp_fault.S b/plat/arm/board/fvp/aarch64/fvp_fault.S
2new file mode 100644
3index e69de29bb..3a2faca1a 100644
4--- /dev/null
5+++ b/plat/arm/board/fvp/aarch64/fvp_fault.S
6@@ -0,0 +1,42 @@
7+
8+#include <asm_macros.S>
9+
10+ .globl plat_handle_uncontainable_ea
11+
12+str_uncontainable:
13+ .byte 10 /* Log marker */
14+ .asciz "Injected Uncontainable Error\n"
15+
16+str_double_fault:
17+ .byte 10 /* Log marker */
18+ .asciz "Injected Double Fault\n"
19+
20+ /* -----------------------------------------------------
21+ * Platform handler for Uncontainable External Abort.
22+ *
23+ * x0: EA reason
24+ * x1: EA syndrome
25+ * -----------------------------------------------------
26+ */
27+func plat_handle_uncontainable_ea
28+ adr x0, str_uncontainable
29+ bl tf_log
30+1:
31+ wfe
32+ b 1b
33+endfunc plat_handle_uncontainable_ea
34+
35+ /* -----------------------------------------------------
36+ * Platform handler for Double Fault.
37+ *
38+ * x0: EA reason
39+ * x1: EA syndrome
40+ * -----------------------------------------------------
41+ */
42+func plat_handle_double_fault
43+ adr x0, str_double_fault
44+ bl tf_log
45+1:
46+ wfe
47+ b 1b
48+endfunc plat_handle_double_fault
49diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk
50index 2b1e0ac70..461932124 100644
51--- a/plat/arm/board/fvp/platform.mk
52+++ b/plat/arm/board/fvp/platform.mk
53@@ -4,6 +4,8 @@
54 # SPDX-License-Identifier: BSD-3-Clause
55 #
56
57+BL31_SOURCES += plat/arm/board/fvp/aarch64/fvp_fault.S
58+
59 # Use the GICv3 driver on the FVP by default
60 FVP_USE_GIC_DRIVER := FVP_GICV3
61