| 8c8e1441 | 21-Feb-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
ta_dev_kit.mk: define ENABLE_MDBG when CFG_TEE_TA_MALLOC_DEBUG is set
In order to use the memory leak detection code, a user-mode TA needs two things: - A version of libutils.a that was built with m
ta_dev_kit.mk: define ENABLE_MDBG when CFG_TEE_TA_MALLOC_DEBUG is set
In order to use the memory leak detection code, a user-mode TA needs two things: - A version of libutils.a that was built with malloc debug code. This is taken care of by ta/ta.mk which sets ENABLE_MDBG=1 when CFG_TEE_TA_MALLOC_DEBUG is 'y'. - The proper declarations for mdbg_malloc(), mdbg_free(), mdbg_check() etc. as well as the macro redefinitions for malloc(), free() etc. in the header files when the TA is built. This patch adds the missing definition of ENABLE_MDBG in ta/mk/ta_dev_kit.mk when CFG_TEE_TA_MALLOC_DEBUG is 'y'.
In addition, the usage of CFG_TEE_TA_MALLOC_DEBUG and CFG_TEE_CORE_MALLOC_DEBUG is better documented in mk/conf.mk.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
show more ...
|
| 1d22cfed | 09-Feb-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Remove unused guard string in check-conf-cmake
There is no need to compute a guard string when generating the CMake configuration file. Obviously the line was mistakenly copied from check-conf-h, so
Remove unused guard string in check-conf-cmake
There is no need to compute a guard string when generating the CMake configuration file. Obviously the line was mistakenly copied from check-conf-h, so remove it.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 21c9a576 | 09-Feb-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
make config: allow '+' character in file paths
Some build environment (i.e yocto) may use build directory path that include a '+' character. This change allows such '+' character(s) to be replaced w
make config: allow '+' character in file paths
Some build environment (i.e yocto) may use build directory path that include a '+' character. This change allows such '+' character(s) to be replaced with a '_' character in the conf.h macro.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 30668b28 | 28-Nov-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add management pseudo TA for secstor TAs
Adds a pseudo TA for management of Trusted Applications and Security Domains. The pseudo TA only provides a minimal interface, a more advanced interfac
core: add management pseudo TA for secstor TAs
Adds a pseudo TA for management of Trusted Applications and Security Domains. The pseudo TA only provides a minimal interface, a more advanced interface is supposed to be provided by a user TA using this pseudo TA. Such a TA could for instance implement Global Platforms TEE Management Framework or OTrP.
The management TA currently only supports installing bootstrap packaged TAs in secure storage.
Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3957863b | 08-Nov-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: simplify mv-if-changed
In mv-if-changed(file1, file2), there is no need to check if file2 exists before trying to compare both files. Indeed, if file2 does not exist, cmp -s will return non-z
build: simplify mv-if-changed
In mv-if-changed(file1, file2), there is no need to check if file2 exists before trying to compare both files. Indeed, if file2 does not exist, cmp -s will return non-zero and the second branch of the conditional will be taken anyway.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| bc0d2712 | 25-Oct-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
make clean: split file list into manageable chunks
"make clean" might fail with the following error:
make[2]: execvp: /bin/bash: Argument list too long
This error was observed on a platform that
make clean: split file list into manageable chunks
"make clean" might fail with the following error:
make[2]: execvp: /bin/bash: Argument list too long
This error was observed on a platform that has lots of additional source files compared to upstream (drivers, etc.), and that sets a long output path on the command line (make ... O=/some/long/path).
Fix the error by splitting the file list into more manageable chunks. Note that removing one file at a time is not reasonable, because spawning too may shells takes quite a long time (up to 7-10 seconds to "make clean").
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reported-by: Lijianhui <airbak.li@hisilicon.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 509a9802 | 01-Aug-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add support for compressed early TAs
Add decompression code to the early TA loader and update the Python script accordingly. The compression algorithm is "deflate", which is used by zlib and gzip in
Add support for compressed early TAs
Add decompression code to the early TA loader and update the Python script accordingly. The compression algorithm is "deflate", which is used by zlib and gzip in particular. It allows for compression ratios comprised between 3 (for bigger TAs) and 4.7 (for smaller ones). Those numbers were observed with 32-bit TAs (QEMU).
On QEMU (armv7), the code size overhead when CFG_EARLY_TA=y, including the decompressor, is 12K when DEBUG=0 or 20K when DEBUG=1. The decompressor allocates about 39K of heap.
Another library compatible with zlib was tried for comparison [1]. The code size overhead with miniz was 8K (DEBUG=0) or 16K (DEBUG=1). On the other hand, the dynamic allocation was about 43K, so the total memory required was about same. Speed was not compared. In the end, zlib was preferred for licensing reasons and because it is widely used.
Link: [1] https://github.com/richgel999/miniz 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> (QEMUv8, pager) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 32/64 bits) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 32/64 bits, pager) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 6d1a620a | 19-Jul-2017 |
Yongqin Liu <yongqin.liu@linaro.org> |
mk/gcc.mk: define LD to bfd version by default
In some cases, ld is linked to gold version, and it will cause compiling error for 32bit like following:
prebuilts/gcc/linux-x86/arm/arm-linux-android
mk/gcc.mk: define LD to bfd version by default
In some cases, ld is linked to gold version, and it will cause compiling error for 32bit like following:
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld: fatal error: --sort-section=alignment: must take one of the following arguments: none, name
with the bfd version ld, there will be no such error reported.
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2bfab756 | 13-Jun-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
trace.c: show file/line info for flow, debug and error messages
Since commit f4aa5b11f9a3 ("Update trace format to be less verbose in INFO and ERROR levels"), INFO and ERROR messages don't show sour
trace.c: show file/line info for flow, debug and error messages
Since commit f4aa5b11f9a3 ("Update trace format to be less verbose in INFO and ERROR levels"), INFO and ERROR messages don't show source file and line information by default, while message with lower severity (DEBUG and FLOW) do contain such information. While it is OK for INFO, it turns out to be inconvenient for ERRORs during development, because one typically wants to be able to quickly locate the source of errors. This patch fixes the problem by introducing a mask rather than a level to control the long output format. This allows individual selection of which level should use a long vs. short format. The compile-time setting CFG_MSG_LONG_PREFIX_THRESHOLD is replaced by CFG_MSG_LONG_PREFIX_MASK with default value 0x1a (= BIT(TRACE_ERROR) | BIT(TRACE_DEBUG) | BIT(TRACE_FLOW)).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|