aboutsummaryrefslogtreecommitdiff
path: root/bl31
diff options
context:
space:
mode:
authordanh-arm <dan.handley@arm.com>2014-06-16 12:45:08 +0100
committerdanh-arm <dan.handley@arm.com>2014-06-16 12:45:08 +0100
commitdbc64b39c9193f0b582d706bcf0d04e0a7bf4944 (patch)
treeef3a982d4a7dab4fe8ae18e20df3d470a25509ef /bl31
parent30e3b312f207fe520f66b6b32ee7da3599546935 (diff)
parent9c22b32300320c40aa36f73f84a51cdc5218780e (diff)
downloadarm-trusted-firmware-dbc64b39c9193f0b582d706bcf0d04e0a7bf4944.tar.gz
Merge pull request #133 from athoelke/at/crash-reporting-opt
Make the BL3-1 crash reporting optional
Diffstat (limited to 'bl31')
-rw-r--r--bl31/aarch64/crash_reporting.S11
-rw-r--r--bl31/bl31.mk8
-rw-r--r--bl31/context_mgmt.c2
3 files changed, 19 insertions, 2 deletions
diff --git a/bl31/aarch64/crash_reporting.S b/bl31/aarch64/crash_reporting.S
index 69b7a1c..21f74a4 100644
--- a/bl31/aarch64/crash_reporting.S
+++ b/bl31/aarch64/crash_reporting.S
@@ -37,6 +37,7 @@
.globl dump_state_and_die
.globl dump_intr_state_and_die
+#if CRASH_REPORTING
/* ------------------------------------------------------
* The below section deals with dumping the system state
* when an unhandled exception is taken in EL3.
@@ -265,9 +266,15 @@ print_state:
print_el3_sys_regs
print_non_el3_sys_0_regs
print_non_el3_sys_1_regs
- b infinite_loop
-func infinite_loop
+#else /* CRASH_REPORING */
+
+func dump_state_and_die
+dump_intr_state_and_die:
+
+#endif /* CRASH_REPORING */
+
+infinite_loop:
b infinite_loop
diff --git a/bl31/bl31.mk b/bl31/bl31.mk
index 8155f3d..99fc357 100644
--- a/bl31/bl31.mk
+++ b/bl31/bl31.mk
@@ -59,3 +59,11 @@ IMF_READ_INTERRUPT_ID := 0
$(eval $(call assert_boolean,IMF_READ_INTERRUPT_ID))
$(eval $(call add_define,IMF_READ_INTERRUPT_ID))
+# Flag used to inidicate if Crash reporting via console should be included
+# in BL3-1. This defaults to being present in DEBUG builds only
+ifndef CRASH_REPORTING
+CRASH_REPORTING := $(DEBUG)
+endif
+
+$(eval $(call assert_boolean,CRASH_REPORTING))
+$(eval $(call add_define,CRASH_REPORTING))
diff --git a/bl31/context_mgmt.c b/bl31/context_mgmt.c
index b602840..122a0d4 100644
--- a/bl31/context_mgmt.c
+++ b/bl31/context_mgmt.c
@@ -308,7 +308,9 @@ void cm_init_pcpu_ptr_cache()
pcpu_ptr_cache = &per_cpu_ptr_cache_space[linear_id];
assert(pcpu_ptr_cache);
+#if CRASH_REPORTING
pcpu_ptr_cache->crash_stack = get_crash_stack(mpidr);
+#endif
cm_set_pcpu_ptr_cache(pcpu_ptr_cache);
}