Add plat-vexpress#15
Conversation
|
1/ assert() usage: just want to stress that assert() is aimed to disappear when we’re not in debug mode. We have it in core_mmu.c for example (also in old code - not specific to this patch). This looks dangerous to me. I would prefer to use TEE_ASSERT() instead which always blocks. This can be part of another patch (may be we can create an issue to deal with all the asserts) 2/ WITH_PLAT_H (in core/arch/arm32/kernel/thread.c) It does not prevent us to have a plat.h to get the other platform-dependent values, such as the GIC 3/ thread_asm.S 4/ Same in sm_asm.S with the source code |
|
+1 |
|
Please squash on top of master |
|
Squashed on top of master |
* Initial support for Versatile Express of FVP with ARM Trusted Firmware (ATF below) * Use entry vector for entering TEE Align interface between TEE and secure monitor with the interface between OPTEED in ATF and TEE. Uses an ATF compatible entry vector for entering TEE from internal secure monitor. Internal secure monitor saves entry reason to be able to tell when switching back to nonsecure world if r0-r3 should be preserved (FIQ case) or returned as is (normal call case). * Many small fixes of generic problems that could affect other platforms too. * Disable unaligned data accesses by adding compiler flag -mno-unaligned-access * Adds support for Versatile Express of QEMU with 8 MiB of secure DRAM
Tracing the log syscall is of very little value since it will generate some output to the console anyways. Worse, it pollutes the TA output in case of a panic or an abort. For example: o regression_4005.1 AE case 0 algo 0x40000710 line 2819 F/TC:?? 0 trace_syscall:132 syscall #27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall #15 (syscall_cryp_state_alloc) F/TC:?? 0 trace_syscall:132 syscall #27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #30 (syscall_cryp_obj_populate) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #29 (syscall_cryp_obj_reset) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #31 (syscall_cryp_obj_copy) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #28 (syscall_cryp_obj_close) F/TC:?? 0 trace_syscall:132 syscall #34 (syscall_authenc_init) F/TC:?? 0 trace_syscall:132 syscall #2 (syscall_panic) E/TC:?? 0 E/TC:?? 0 TA panicked with code 0xffff0006 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: Status of TA cb3e5ba0-adf1-11e0-998b-0002a5d5c51b F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: arch: aarch64 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: region 0: va 0x40004000 pa 0x100062d000 size 0x002000 flags rw-s (ldelf) F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: region 1: va 0x40006000 pa 0x100062f000 size 0x00d000 flags r-xs (ldelf) ... Therefore, skip the trace if the syscall number it TEE_SCN_LOG. Signed-off-by: Jerome Forissier <[email protected]>
Tracing the log syscall is of very little value since it will generate some output to the console anyways. Worse, it pollutes the TA output in case of a panic or an abort. For example: o regression_4005.1 AE case 0 algo 0x40000710 line 2819 F/TC:?? 0 trace_syscall:132 syscall #27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall #15 (syscall_cryp_state_alloc) F/TC:?? 0 trace_syscall:132 syscall #27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #30 (syscall_cryp_obj_populate) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #29 (syscall_cryp_obj_reset) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #31 (syscall_cryp_obj_copy) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #28 (syscall_cryp_obj_close) F/TC:?? 0 trace_syscall:132 syscall #34 (syscall_authenc_init) F/TC:?? 0 trace_syscall:132 syscall #2 (syscall_panic) E/TC:?? 0 E/TC:?? 0 TA panicked with code 0xffff0006 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: Status of TA cb3e5ba0-adf1-11e0-998b-0002a5d5c51b F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: arch: aarch64 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: region 0: va 0x40004000 pa 0x100062d000 size 0x002000 flags rw-s (ldelf) F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: region 1: va 0x40006000 pa 0x100062f000 size 0x00d000 flags r-xs (ldelf) ... Therefore, skip the trace if the syscall number it TEE_SCN_LOG. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Jens Wiklander <[email protected]>
Tracing the log syscall is of very little value since it will generate some output to the console anyways. Worse, it pollutes the TA output in case of a panic or an abort. For example: o regression_4005.1 AE case 0 algo 0x40000710 line 2819 F/TC:?? 0 trace_syscall:132 syscall #27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall #15 (syscall_cryp_state_alloc) F/TC:?? 0 trace_syscall:132 syscall #27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #30 (syscall_cryp_obj_populate) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #29 (syscall_cryp_obj_reset) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #31 (syscall_cryp_obj_copy) F/TC:?? 0 trace_syscall:132 syscall #24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall #28 (syscall_cryp_obj_close) F/TC:?? 0 trace_syscall:132 syscall #34 (syscall_authenc_init) F/TC:?? 0 trace_syscall:132 syscall #2 (syscall_panic) E/TC:?? 0 E/TC:?? 0 TA panicked with code 0xffff0006 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: Status of TA cb3e5ba0-adf1-11e0-998b-0002a5d5c51b F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: arch: aarch64 F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: region 0: va 0x40004000 pa 0x100062d000 size 0x002000 flags rw-s (ldelf) F/TC:?? 0 trace_syscall:132 syscall #1 (syscall_log) E/LD: region 1: va 0x40006000 pa 0x100062f000 size 0x00d000 flags r-xs (ldelf) ... Therefore, skip the trace if the syscall number it TEE_SCN_LOG. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Jens Wiklander <[email protected]>
Tracing the log syscall is of very little value since it will generate some output to the console anyways. Worse, it pollutes the TA output in case of a panic or an abort. For example: o regression_4005.1 AE case 0 algo 0x40000710 line 2819 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#15 (syscall_cryp_state_alloc) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#27 (syscall_cryp_obj_alloc) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#30 (syscall_cryp_obj_populate) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#29 (syscall_cryp_obj_reset) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#31 (syscall_cryp_obj_copy) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#24 (syscall_cryp_obj_get_info) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#28 (syscall_cryp_obj_close) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#34 (syscall_authenc_init) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#2 (syscall_panic) E/TC:?? 0 E/TC:?? 0 TA panicked with code 0xffff0006 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#1 (syscall_log) E/LD: Status of TA cb3e5ba0-adf1-11e0-998b-0002a5d5c51b F/TC:?? 0 trace_syscall:132 syscall OP-TEE#1 (syscall_log) E/LD: arch: aarch64 F/TC:?? 0 trace_syscall:132 syscall OP-TEE#1 (syscall_log) E/LD: region 0: va 0x40004000 pa 0x100062d000 size 0x002000 flags rw-s (ldelf) F/TC:?? 0 trace_syscall:132 syscall OP-TEE#1 (syscall_log) E/LD: region 1: va 0x40006000 pa 0x100062f000 size 0x00d000 flags r-xs (ldelf) ... Therefore, skip the trace if the syscall number it TEE_SCN_LOG. Signed-off-by: Jerome Forissier <[email protected]> Reviewed-by: Jens Wiklander <[email protected]>
Initial support for Versatile Express of FVP with ARM Trusted
Firmware (ATF below)
Use entry vector for entering TEE
Align interface between TEE and secure monitor with the interface
between OPTEED in ATF and TEE.
Uses an ATF compatible entry vector for entering TEE from internal
secure monitor.
Internal secure monitor saves entry reason to be able to tell when
switching back to nonsecure world if r0-r3 should be preserved (FIQ case)
or returned as is (normal call case).
Many small fixes of generic problems that could affect other platforms
too.
Disable unaligned data accesses by adding compiler flag
-mno-unaligned-access
Adds support for Versatile Express of QEMU with 8 MiB of secure DRAM