aboutsummaryrefslogtreecommitdiff
path: root/core/arch/arm/plat-ls
diff options
context:
space:
mode:
authorJens Wiklander <jens.wiklander@linaro.org>2015-12-06 11:01:54 +0100
committerPascal Brand <pascal.brand@st.com>2016-02-10 06:38:36 +0100
commit923c1f343db556196600a1788c437715083264f8 (patch)
treea6573f73668c47c70bc94e6edf83e55b178772b7 /core/arch/arm/plat-ls
parenta1989c09670c506604b60b16d54281a633c5eb41 (diff)
core: stack unwinding
Adds support for stack unwinding, currently only done for fatal aborts from kernel mode if CFG_CORE_UNWIND = y The ARMv7/Aarch32 implementation uses -funwind-tables to generate frame unwinding information which is quite large. Enabling stack unwinding currently consumes ~8 KiB. The code to parse the frame unwind information is imported from FreeBSD. The Aarch64 implementation takes advantage of the frame pointer and has minimal overhead. The core code to unwind the stack is imported from FreeBSD. Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/arch/arm/plat-ls')
-rw-r--r--core/arch/arm/plat-ls/ls_core_pos.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/arch/arm/plat-ls/ls_core_pos.S b/core/arch/arm/plat-ls/ls_core_pos.S
index ae7fc4cc..21cfb4b2 100644
--- a/core/arch/arm/plat-ls/ls_core_pos.S
+++ b/core/arch/arm/plat-ls/ls_core_pos.S
@@ -28,11 +28,14 @@
#include <asm.S>
#include <arm.h>
#include <arm32_macros.S>
+#include <kernel/unwind.h>
/* Layerscape platform specific function to calculate core position. */
FUNC get_core_pos , :
+UNWIND( .fnstart)
read_mpidr r0
/* Calculate CorePos = CoreId */
and r0, r0, #MPIDR_CPU_MASK
bx lr
+UNWIND( .fnend)
END_FUNC get_core_pos