blob: 215a0477354c446defa8a52234b4d2b53255d6da [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
Manish V Badarkheddd765a2021-11-02 12:35:37 +00003index 000000000..f6e6bee1e
Fathi Boudra422bf772019-12-02 11:10:16 +02004--- /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
Manish V Badarkheddd765a2021-11-02 12:35:37 +000050index 0d2c31971..3f90c7ef0 100644
Fathi Boudra422bf772019-12-02 11:10:16 +020051--- a/plat/arm/board/fvp/platform.mk
52+++ b/plat/arm/board/fvp/platform.mk
Manish V Badarkheddd765a2021-11-02 12:35:37 +000053@@ -6,6 +6,8 @@
54
55 include common/fdt_wrappers.mk
Fathi Boudra422bf772019-12-02 11:10:16 +020056
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