diff options
author | Soby Mathew <soby.mathew@arm.com> | 2014-06-25 10:07:40 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2014-07-28 11:03:20 +0100 |
commit | 626ed510f179c905a699f4663ee933c10892b4c3 (patch) | |
tree | a9328fb3d8a00b2f065be0e91ba225e46968247a /bl31/aarch64/bl31_entrypoint.S | |
parent | bc9201289c9ae4ccfc6b11048431d47eba547a44 (diff) |
Rework the crash reporting in BL3-1 to use less stack
This patch reworks the crash reporting mechanism to further
optimise the stack and code size. The reporting makes use
of assembly console functions to avoid calling C Runtime
to report the CPU state. The crash buffer requirement is
reduced to 64 bytes with this implementation. The crash
buffer is now part of per-cpu data which makes retrieving
the crash buffer trivial.
Also now panic() will use crash reporting if
invoked from BL3-1.
Fixes ARM-software/tf-issues#199
Change-Id: I79d27a4524583d723483165dc40801f45e627da5
Diffstat (limited to 'bl31/aarch64/bl31_entrypoint.S')
-rw-r--r-- | bl31/aarch64/bl31_entrypoint.S | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bl31/aarch64/bl31_entrypoint.S b/bl31/aarch64/bl31_entrypoint.S index 6e48e31..e2141f7 100644 --- a/bl31/aarch64/bl31_entrypoint.S +++ b/bl31/aarch64/bl31_entrypoint.S @@ -72,13 +72,22 @@ func bl31_entrypoint isb /* --------------------------------------------- - * Set the exception vector and zero tpidr_el3 - * until the crash reporting is set up + * Initialise cpu_data early to enable crash + * reporting to have access to crash stack. + * Since crash reporting depends on cpu_data to + * report the unhandled exception, not + * doing so can lead to recursive exceptions due + * to a NULL TPIDR_EL3 + * --------------------------------------------- + */ + bl init_cpu_data_ptr + + /* --------------------------------------------- + * Set the exception vector. * --------------------------------------------- */ adr x1, runtime_exceptions msr vbar_el3, x1 - msr tpidr_el3, xzr /* --------------------------------------------------------------------- * The initial state of the Architectural feature trap register @@ -137,15 +146,6 @@ func bl31_entrypoint bl zeromem16 /* --------------------------------------------- - * Initialise cpu_data and crash reporting - * --------------------------------------------- - */ -#if CRASH_REPORTING - bl init_crash_reporting -#endif - bl init_cpu_data_ptr - - /* --------------------------------------------- * Use SP_EL0 for the C runtime stack. * --------------------------------------------- */ |