diff options
author | Jerome Forissier <jerome.forissier@linaro.org> | 2014-09-15 12:20:15 -0700 |
---|---|---|
committer | Jerome Forissier <jerome.forissier@linaro.org> | 2014-09-16 19:16:14 -0700 |
commit | b8976a602e75d1f1fbdff47f9de2c6cd774c7c12 (patch) | |
tree | 8cc3a8680c8cd0093b8a2659c09f002270e70716 /core/arch/arm32/tee | |
parent | 9c3040ee9d518a35a3b95e2e92a7939c5c98b547 (diff) |
plat-vexpress: fix non-debug build
Fixes a number of build errors when 'PLATFORM=vexpress' and 'DEBUG=':
- '<var> may be used uninitialized'
- 'dereferencing type-punned pointer will break strict-aliasing rules'
This one is addressed by adding -fno-strict-aliasing to the cflags for the
problematic files, which is a temporary solution.
- 'inlining failed'
Also, make sure tee_svc_syscall_table is aligned on a 32-bit boundary.
Otherwise, an alignment fault might occur:
ERR [0x0] TEE-CORE:tee_pager_print_error_abort:101: data-abort at 0x602f16b
FSR 0x1 PC 0x6007bd4 TTBR0 0x603804A CONTEXIDR 0x1
CPUID 0x80000001 DBGPCSR 0x0 CPSR 0x80000013 (read from SPSR)
ERR [0x0] TEE-CORE:tee_pager_handle_abort:164: [TEE_PAGER] alignement fault! (trap CPU)
Note: on Foundation_v8, I measured a ~3x speedup between debug and non-debug
builds for asymmetric crypto tests.
Diffstat (limited to 'core/arch/arm32/tee')
-rw-r--r-- | core/arch/arm32/tee/sub.mk | 2 | ||||
-rw-r--r-- | core/arch/arm32/tee/tee_svc_asm.S | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/core/arch/arm32/tee/sub.mk b/core/arch/arm32/tee/sub.mk index 0a62062..9bd9f49 100644 --- a/core/arch/arm32/tee/sub.mk +++ b/core/arch/arm32/tee/sub.mk @@ -1,6 +1,8 @@ srcs-y += arch_tee_fs.c +cflags-arch_tee_fs.c-y += -fno-strict-aliasing srcs-y += tee_rpmb.c cflags-tee_rpmb.c-y += -Wno-unused-parameter +cflags-tee_rpmb.c-y += -fno-strict-aliasing srcs-y += tee_svc_asm.S srcs-y += entry.c srcs-y += init.c diff --git a/core/arch/arm32/tee/tee_svc_asm.S b/core/arch/arm32/tee/tee_svc_asm.S index a4156d4..75a1954 100644 --- a/core/arch/arm32/tee/tee_svc_asm.S +++ b/core/arch/arm32/tee/tee_svc_asm.S @@ -198,6 +198,7 @@ tee_svc_user_ta_panic_from_pager: .section .rodata +.balign 4 tee_svc_syscall_table: .word tee_svc_sys_return .word tee_svc_sys_log |