From 923c1f343db556196600a1788c437715083264f8 Mon Sep 17 00:00:00 2001 From: Jens Wiklander Date: Sun, 6 Dec 2015 11:01:54 +0100 Subject: 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 Tested-by: Jerome Forissier (HiKey 32/64) Reviewed-by: Pascal Brand Tested-by: Jens Wiklander (QEMU, FVP) Signed-off-by: Jens Wiklander --- mk/config.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mk/config.mk') diff --git a/mk/config.mk b/mk/config.mk index aa278fea..546d6483 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -116,3 +116,9 @@ CFG_LIBUTILS_WITH_ISOC ?= y # nothing with ` -mgeneral-regs-only`) # With CFG_TA_FLOAT_SUPPORT enabled TA code is free use floating point types CFG_TA_FLOAT_SUPPORT ?= y + +# Enable stack unwinding for aborts from kernel mode if CFG_TEE_CORE_DEBUG +# is enabled +ifeq ($(CFG_TEE_CORE_DEBUG),1) +CFG_CORE_UNWIND ?= y +endif -- cgit v1.2.3