| 2f773f5d | 16-Oct-2018 |
Yongqin Liu <yongqin.liu@linaro.org> |
mk/aosp_optee.mk: workaround for PHONY target limitation with AOSP master
There are some limitations on PHONY target introduced into the AOSP master [1], and the change here is to remove the use of
mk/aosp_optee.mk: workaround for PHONY target limitation with AOSP master
There are some limitations on PHONY target introduced into the AOSP master [1], and the change here is to remove the use of PHONY target for BUILD_OPTEE_OS definition, and to define OPTEE_BIN with relative path in aosp workspace instead of absolute path.
Link [1]: https://android.googlesource.com/platform/build/+/HEAD/Changes.md#phony_targets
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
show more ...
|
| ab0df69e | 15-Oct-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: instrument mutexes with lockdep
Implements lockdep hooks for mutexes. CFG_LOCKDEP is disabled by default, because it causes a noticeable slowdown (plain xtest runs 2-4x slower).
Tested-by: Je
core: instrument mutexes with lockdep
Implements lockdep hooks for mutexes. CFG_LOCKDEP is disabled by default, because it causes a noticeable slowdown (plain xtest runs 2-4x slower).
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU, HiKey960) Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bde8a250 | 02-Oct-2018 |
Joakim Bech <joakim.bech@linaro.org> |
pager: enable BestFit allocation when using the pager
When running xtest 6018 we have got panics because of TEE_ERROR_OUT_OF_MEMORY errors when trying to allocate memory (using malloc and calloc). T
pager: enable BestFit allocation when using the pager
When running xtest 6018 we have got panics because of TEE_ERROR_OUT_OF_MEMORY errors when trying to allocate memory (using malloc and calloc). The reason for this seems to be a fragmented heap when running with the pager enabled. By enabling the BestFit algorithm in bget we have seen a much improved use of the heap with a lot less fragmentation. We have been running xtest on QEMU v8 and HiKey 6220 and the performance difference seems to be negligible.
Fixes: https://github.com/OP-TEE/optee_os/issues/2580
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (HiKey 6220, QEMU v8) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 62305667 | 25-Sep-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Update revision to 3.3
The commit [1] that changed the revision macros from 3.2 to 3.3 was not pushed to the master branch when I created the 3.3.0-rc1 tag. Pick this commit now.
[1] Commit b5aecc0
Update revision to 3.3
The commit [1] that changed the revision macros from 3.2 to 3.3 was not pushed to the master branch when I created the 3.3.0-rc1 tag. Pick this commit now.
[1] Commit b5aecc05ca32 ("Update revision for release tag 3.3.0-rc1") (tag 3.3.0-rc1)
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 439203cb | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Allow mixed declaration and code
Removes the -Wdeclaration-after-statement compiler flag to allow mixed declaration and code
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by:
Allow mixed declaration and code
Removes the -Wdeclaration-after-statement compiler flag to allow mixed declaration and code
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 04fbc2e2 | 12-Sep-2018 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
mk: cleanvars.mk: clean spec-srcs var
Clean $(spec-srcs) variable, as the value can be accumulated in ta/mk/build-user-ta.mk
Fixes linking issues when multiple TAs are compiled as Early TAs (using
mk: cleanvars.mk: clean spec-srcs var
Clean $(spec-srcs) variable, as the value can be accumulated in ta/mk/build-user-ta.mk
Fixes linking issues when multiple TAs are compiled as Early TAs (using CFG_IN_TREE_EARLY_TAS)
$ make V=1 ... out/arm/ta/avb/user_ta_header.o:(.data+0x0): multiple definition of `trace_level' out/arm/ta/avb/user_ta_header.o:(.data+0x0): first defined here out/arm/ta/avb/user_ta_header.o: In function `tahead_get_trace_level': optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: multiple definition of `trace_ext_prefix' out/arm/ta/avb/user_ta_header.o:optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: first defined here out/arm/ta/avb/user_ta_header.o: In function `tahead_get_trace_level': optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: multiple definition of `ta_head' out/arm/ta/avb/user_ta_header.o:optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: first defined here out/arm/ta/avb/user_ta_header.o: In function `tahead_get_trace_level': optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: multiple definition of `ta_heap' out/arm/ta/avb/user_ta_header.o:optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: first defined here out/arm/ta/avb/user_ta_header.o: In function `tahead_get_trace_level': optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: multiple definition of `ta_heap_size' out/arm/ta/avb/user_ta_header.o:optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: first defined here out/arm/ta/avb/user_ta_header.o: In function `tahead_get_trace_level': optee_os/out/arm/export-ta_arm32/src/user_ta_header.c:102: multiple definition of `ta_props'
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| c8645107 | 29-Jul-2018 |
Jassi Brar <jaswinder.singh@linaro.org> |
aosp_optee.mk: Fix compilation for build outside of source
Trying to specify Android build location outside of souce directory's default 'out' using OUT_DIR_COMMON_BASE env variable, results in erro
aosp_optee.mk: Fix compilation for build outside of source
Trying to specify Android build location outside of souce directory's default 'out' using OUT_DIR_COMMON_BASE env variable, results in errors like "... <built-in>:1:10: fatal error: 'conf.h' file not found "
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Tested-by: Victor Chong <victor.chong@linaro.org> (hikey620) Acked-by: Victor Chong <victor.chong@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> [jf: wrap commit text] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| cf903a62 | 10-Aug-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add dependency on ta-dev-kit when building in-tree TA
Fixes the following errors which may reportedly be triggered by plain "make" too [1]:
$ make -s clean && make -s out/arm-plat-vexpress/ta/avb/
Add dependency on ta-dev-kit when building in-tree TA
Fixes the following errors which may reportedly be triggered by plain "make" too [1]:
$ make -s clean && make -s out/arm-plat-vexpress/ta/avb/entry.o cc1: warning: out/arm-plat-vexpress/export-ta_arm32/include: No such file or directory [-Wmissing-include-dirs] ta/avb/entry.c:5:30: fatal error: tee_internal_api.h: No such file or directory compilation terminated. mk/compile.mk:146: recipe for target 'out/arm-plat-vexpress/ta/avb/entry.o' failed make: *** [out/arm-plat-vexpress/ta/avb/entry.o] Error 1
$ make -s clean && make -s out/arm-plat-vexpress/ta/avb/user_ta_header.o cc1: warning: out/arm-plat-vexpress/export-ta_arm32/include: No such file or directory [-Wmissing-include-dirs] out/arm-plat-vexpress/export-ta_arm32/src/user_ta_header.c:5:22: fatal error: compiler.h: No such file or directory compilation terminated. mk/compile.mk:154: recipe for target 'out/arm-plat-vexpress/ta/avb/user_ta_header.o' failed make: *** [out/arm-plat-vexpress/ta/avb/user_ta_header.o] Error 1
Link: [1] https://github.com/OP-TEE/build/issues/285 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7247a01e | 21-Jun-2018 |
Yongqin Liu <yongqin.liu@linaro.org> |
mk/aosp_optee.mk: move ta files to vendor partition
to make it work with Treble enabled builds
Acked-by: Victor Chong <victor.chong@linaro.org> Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> |
| 64fad262 | 23-May-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
trace: print core id if in atomic context
If (D|E|I|F)MSG is called with foreign interrupts masked we can report core ID. "?" will be printed instead, if foreign interrupts aren't masked.
With this
trace: print core id if in atomic context
If (D|E|I|F)MSG is called with foreign interrupts masked we can report core ID. "?" will be printed instead, if foreign interrupts aren't masked.
With this patch log looks like this:
D/TC:2 0 core_mmu_set_user_map:940 0xe181b88 0xeee8003 D/TC:? 0 __wq_rpc:40 wake thread 1 0xe16f028 -3 D/TC:1 thread_handle_std_smc:612 a7: 2 D/TC:3 0 core_mmu_set_user_map:940 0x0 0x0
Where first digit shows core id and second - thread id.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 3638ea32 | 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add CFG_IN_TREE_EARLY_TAS
Adds CFG_IN_TREE_EARLY_TAS which is used to embed in-tree TAs as early TAs in the OP-TEE binary.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by:
Add CFG_IN_TREE_EARLY_TAS
Adds CFG_IN_TREE_EARLY_TAS which is used to embed in-tree TAs as early TAs in the OP-TEE binary.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cfa34d9a | 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add support for compiling in-tree TAs
Adds support for compiling in-tree TAs. Unless specified via CFG_USER_TA_TARGET_<ta-name> the TA will be built with the first TA target (aka TA dev kit, when de
Add support for compiling in-tree TAs
Adds support for compiling in-tree TAs. Unless specified via CFG_USER_TA_TARGET_<ta-name> the TA will be built with the first TA target (aka TA dev kit, when delivered) specified in the variable ta-targets which is initialized in core/arch/arm/plat-*/conf.mk.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 94cd76ca | 17-Jul-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Use per $(sm) unique FORCE-GENSRC
Uses per $(sm) unique FORCE-GENSRC to allow one submodule (sm) depend on files produced by another submodule.
CFG_IN_TREE_EARLY_TAS needs this for the core submodu
Use per $(sm) unique FORCE-GENSRC
Uses per $(sm) unique FORCE-GENSRC to allow one submodule (sm) depend on files produced by another submodule.
CFG_IN_TREE_EARLY_TAS needs this for the core submodule to depend on a submodule representing an in-tree TA.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0111b5f0 | 05-Jul-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
mk/config.mk: remove obsolete comment
NOWERROR=1 has been made obsolete by commit beb065df6ee5 ("Do not set -Werror by default"). Remove it.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro
mk/config.mk: remove obsolete comment
NOWERROR=1 has been made obsolete by commit beb065df6ee5 ("Do not set -Werror by default"). Remove it.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| beb065df | 26-Jun-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Do not set -Werror by default
Having -Werror turned on by default can be annoying, because not everyone uses the same compiler, and different compiler versions have different warnings.
Therefore, p
Do not set -Werror by default
Having -Werror turned on by default can be annoying, because not everyone uses the same compiler, and different compiler versions have different warnings.
Therefore, provide CFG_WERROR to turn it on instead. Enable CFG_WERROR in the CI scripts because we still don't want warnings with the officially supported compilers.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 52983c6c | 20-Jun-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Update revision for release tag 3.2.0-rc1
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> |
| 4c4e0dd0 | 07-Jun-2018 |
Victor Chong <victor.chong@linaro.org> |
aosp_optee.mk: allow dependency builds for TAs
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissi
aosp_optee.mk: allow dependency builds for TAs
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 4bca302a | 22-May-2018 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
pta: add system pTA
Add system pTA, which provides misc. auxiliary services, extending existing GlobalPlatform Core API. Add a call for seeding entropy to the default RNG pool.
Reviewed-by: Jens Wi
pta: add system pTA
Add system pTA, which provides misc. auxiliary services, extending existing GlobalPlatform Core API. Add a call for seeding entropy to the default RNG pool.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| a97bc4a0 | 18-May-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
libmbedtls: configure and compile mbedtls
Configures mbedtls with a minimal user mode TA configuration and makes it compile.
Adds dummy include/mbedtls_config_kernel.h to give a good error message
libmbedtls: configure and compile mbedtls
Configures mbedtls with a minimal user mode TA configuration and makes it compile.
Adds dummy include/mbedtls_config_kernel.h to give a good error message in case mbedTLS is compiled in for kernel mode.
mbedTLS is enabled for TAs with CFG_TA_MBEDTLS = y Builtin self tests are enabled with CFG_TA_MBEDTLS_SELF_TEST = y
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c27907e1 | 18-Apr-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm32: add support for dynamically linked TAs
This commit adds support for 32-bit dynamically linked Trusted Applications. The config flag for this feature is CFG_TA_DYNLINK, default enabled.
core: arm32: add support for dynamically linked TAs
This commit adds support for 32-bit dynamically linked Trusted Applications. The config flag for this feature is CFG_TA_DYNLINK, default enabled.
Why do this? Several reasons:
1. Save space in the TA storage area. The OP-TEE core libraries (libutee, libutils, libmpa) could very well be provided as shared objects (.so) rather than archive files (.a). They would be installed only once in the TA storage, instead of being duplicated inside each TA. 2. Allow upgrade of some libraries without re-linking the TAs. 3. Pave the way to sharing code pages between TAs, thus potentially reducing the memory footprint of the TEE.
The ELF loader is updated as follows:
- Locate the dynamic section in the program headers (PT_DYNAMIC entry). - Find the required external libraries by looking for DT_NEEDED entries in the dynamic section. Libraries are .so files signed like TAs and identified by a UUID so that the TA stores can be re-used. Using a UUID is also more flexible, because a new versions of a library may keep the same UUID or use another one. - Load all the libraries. - Process the dynamic relocations of type R_ARM_GLOB_DAT and R_ARM_JUMP_SLOT by resolving symbols by name, in breadth first order. - Map the library code and data into the user VA space.
The stack unwinding code will be updated in a later commit. As a result only the main executable may be unwound ; stack dumps will stop if the call stack goes inside a shared library.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960 32/64) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 96c1d8c5 | 24-Apr-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: TEE_Malloc() and friend: skips layers
Prior to this patch TEE_Malloc(), TEE_Realloc() and TEE_Free() were using two extra layers implemented on top of the well known malloc(), realloc(), calloc(
ta: TEE_Malloc() and friend: skips layers
Prior to this patch TEE_Malloc(), TEE_Realloc() and TEE_Free() were using two extra layers implemented on top of the well known malloc(), realloc(), calloc() and free() functions. With this patch the extra layers are skipped.
When compiled for user TAs realloc() clears all memory that otherwise would be uninitialized memory since it's required by the spec [1] if TEE_Malloc() is called with the hint TEE_MALLOC_FILL_ZERO. Since that's the only recognized hint in the spec realloc() assumes that it's always needed.
[1] GP TEE Internal Core API Specification v1.1
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2a4f2cd1 | 05-Apr-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Update revision for release tag 3.1.0-rc1
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 35964dc9 | 05-Apr-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: minor cleanup related to pseudo TAs
tee_kta_trace.h is unused and useless. Reword "static TA" into "pseudo TA" in comments.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Revie
core: minor cleanup related to pseudo TAs
tee_kta_trace.h is unused and useless. Reword "static TA" into "pseudo TA" in comments.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 409d2ff0 | 26-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: crypto: ltc: introduce CFG_CORE_BIGNUM_MAX_BITS
Make the size of big numbers in the TEE core configurable. The default (4096 bits) may be reduced if such a large key size is not needed, to sav
core: crypto: ltc: introduce CFG_CORE_BIGNUM_MAX_BITS
Make the size of big numbers in the TEE core configurable. The default (4096 bits) may be reduced if such a large key size is not needed, to save core memory.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e3458e03 | 26-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: introduce CFG_TA_BIGNUM_MAX_BITS
Make the size of big numbers in libutee configurable. This controls the size of the big numbers that can be manipulated through the TEE Internal Core API (A
libutee: introduce CFG_TA_BIGNUM_MAX_BITS
Make the size of big numbers in libutee configurable. This controls the size of the big numbers that can be manipulated through the TEE Internal Core API (Arithmetical functions).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|