| f6d80bd6 | 30-Mar-2015 |
Pascal Brand <pascal.brand.com> |
Stats on allocation
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Tested-by: Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by:
Stats on allocation
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Tested-by: Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by: Pascal BRAND <pascal.brand@st.com> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| fce4cfa1 | 10-Dec-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: provide aeabi functions using softfloat
Configures Softfloat to be used with aeabi function to provide floating point support for user TAs. CFG_TA_FLOAT_SUPPORT is set to y for arm32 platf
libutils: provide aeabi functions using softfloat
Configures Softfloat to be used with aeabi function to provide floating point support for user TAs. CFG_TA_FLOAT_SUPPORT is set to y for arm32 platforms to indicate that floating support is enabled.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9403c583 | 10-Dec-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Import Softfloat 3a
Imports Softfloat 3a by unzipping it into lib/libutils/isoc/arch/arm/softfloat and converts all dos line endings without any further changes.
Reviewed-by: Pascal Brand <pascal.b
Import Softfloat 3a
Imports Softfloat 3a by unzipping it into lib/libutils/isoc/arch/arm/softfloat and converts all dos line endings without any further changes.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b5fed1a5 | 10-Dec-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: add aeabi functions for 64-bit shifting
Adds __aeabi_llsl and __aeabi_llsr to support 64-bit shifting.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <j
libutils: add aeabi functions for 64-bit shifting
Adds __aeabi_llsl and __aeabi_llsr to support 64-bit shifting.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4c1908d3 | 02-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
stdint.h: add missing least and fast types
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 156fe685 | 03-Dec-2015 |
Pascal Brand <pascal.brand@st.com> |
build: fix definition of MDBG_ENABLE
Note that because of this bug, MDBG_ENABLE was always defined. Now, MDBG_ENABLE is not defined by default.
Reviewed-by: Jerome Forissier <jerome.forissier@linar
build: fix definition of MDBG_ENABLE
Note that because of this bug, MDBG_ENABLE was always defined. Now, MDBG_ENABLE is not defined by default.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 945694b9 | 02-Dec-2015 |
Pascal Brand <pascal.brand@st.com> |
alloc: fix mutex usage
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| d4ce92c3 | 02-Dec-2015 |
Pascal Brand <pascal.brand@st.com> |
alloc: Remove mdbg_mode
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| fe3ccf24 | 30-Nov-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutils: add %pUl format for UUIDs
The debug traces in tee_ta_manager.c do not show the last 8 bytes of the TA UUIDs, which makes the output confusing sometimes. This commit adds support for a new
libutils: add %pUl format for UUIDs
The debug traces in tee_ta_manager.c do not show the last 8 bytes of the TA UUIDs, which makes the output confusing sometimes. This commit adds support for a new printf format for little-endian encoded UUIDs: %pUl, and uses it in tee_ta_manager.c. For example:
TEE_UUID uuid; DMSG("UUID: %pUl", (void *)&uuid);
...will print something like:
[...] UUID: cb3e5ba0-adf1-11e0-998b0002a5d5c51b
The new format is available when using the trace macros or the new functions: snprintk(), vsnprintk() declared in <printk.h>. But, snprintf() and vsnprintf() are not modified in order not to break standard compliance.
This format is taken from the Linux kernel [1].
[1] https://www.kernel.org/doc/Documentation/printk-formats.txt
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 0fcbddd4 | 11-Nov-2015 |
SY Chiu <sy.chiu@linaro.org> |
debug: enable bget memory leak detection
This patch enables memory leak detection in bget_malloc.c. This is very helpful to find memory leakage issue in teecore or user TA. To enable it in teecore,
debug: enable bget memory leak detection
This patch enables memory leak detection in bget_malloc.c. This is very helpful to find memory leakage issue in teecore or user TA. To enable it in teecore, build optee_os with `CFG_TEE_CORE_MALLOC_DEBUG=y`. For user TA, build optee_os with `CFG_TEE_TA_MALLOC_DEBUG=y`.
Then, add the following statement at some point of your code that might frequently been triggered:
mdbg_check(1);
It will dump allocated memory blocks and the holders of them. If you find a memory block appears multiple times after the system runs a period of time, it is very likely the source of memory leakage.
Here is an example output:
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 0 bytes core/tee/tee_svc_storage.c:260 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 104 bytes core/tee/tee_svc_storage.c:444 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 18 bytes core/tee/tee_pobj.c:119 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 56 bytes core/tee/tee_pobj.c:110 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 192 bytes core/arch/arm/mm/tee_mmu.c:93 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 32 bytes core/arch/arm/mm/tee_mmu.c:241 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:75 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:75 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 224 bytes core/arch/arm/kernel/tee_ta_manager.c:573 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 72 bytes core/arch/arm/kernel/tee_ta_manager.c:1202 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 32 bytes core/kernel/handle.c:70 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:48 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:48 ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:48 ERR TEE-CORE:mdbg_check:720: Ignore buffer: 16 bytes lib/libutils/isoc/bget_malloc.c:794
You can see the buffer hold by strdup.c:34 appears 4 times, so it's very likely to be the source of memory leakage.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: SY Chiu <sy.chiu@linaro.org> (MT8173 EVB)
show more ...
|
| 45082335 | 30-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: make malloc thread-safe
Makes malloc family of functions thread-safe by using an internal mutex when compiled to be used in TEE Core.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.
libutils: make malloc thread-safe
Makes malloc family of functions thread-safe by using an internal mutex when compiled to be used in TEE Core.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| f4c0a293 | 23-Jun-2015 |
SY Chiu <sy.chiu@linaro.org> |
Secure Storage: Implemented atomic operations
The following operations should be atomic:
- Write - Rename - Create/Delete - Truncate
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu
Secure Storage: Implemented atomic operations
The following operations should be atomic:
- Write - Rename - Create/Delete - Truncate
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU) Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 4a9bd0a7 | 09-Jul-2015 |
Paul Swan <Paul.Swan@microsoft.com> |
Remove the duplicate definition of ssize_t to instead use a single definition. Building OpenSSL as part of a TA resulted in both being included causing a build break.
Signed-off-by: Paul Swan <paswa
Remove the duplicate definition of ssize_t to instead use a single definition. Building OpenSSL as part of a TA resulted in both being included causing a build break.
Signed-off-by: Paul Swan <paswan@microsoft.com> Reviewed-by: Youssef Esmat <Youssef.Esmat@microsoft.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 31908aea | 28-Apr-2015 |
Pascal Brand <pascal.brand@st.com> |
s/CFG_TEE_FW_DEBUG/CFG_TEE_CORE_DEBUG
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com> |
| abe38974 | 09-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename arm32 architecture to arm
Renames arm32 directories to arm.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by
Rename arm32 architecture to arm
Renames arm32 directories to arm.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform)
show more ...
|
| 6c209a3c | 19-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: make bget 64bit ready
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@li
libutils: make bget 64bit ready
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 1f60363a | 19-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
select base types based on ILP32 and LP64 defines
* Selects base types base on the __ILP32__ and __LP64__ defines * Fixes warnings from change of base types
Signed-off-by: Jens Wiklander <jens.wikl
select base types based on ILP32 and LP64 defines
* Selects base types base on the __ILP32__ and __LP64__ defines * Fixes warnings from change of base types
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| cf458f13 | 19-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: rename aeabi files
Renames aeabi files to reflect the processor mode (ARM32) and instruction set used in assembly files (A32).
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Te
libutils: rename aeabi files
Renames aeabi files to reflect the processor mode (ARM32) and instruction set used in assembly files (A32).
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| d8516202 | 02-Jan-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
snprintf: add 64bit support
* Adds AEABI support for 64-bit division * Updates snprintf.c from a more resent version of subr_prf.c from NetBSD
Signed-off-by: Jens Wiklander <jens.wiklander@linaro
snprintf: add 64bit support
* Adds AEABI support for 64-bit division * Updates snprintf.c from a more resent version of subr_prf.c from NetBSD
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 074ba9b2 | 09-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Move bget to libutils replacing dlmalloc
* Moves bget to libutils replacing dlmalloc as kernel memory allocator * Restores the code formatting of bget.{c,h} to the original state as parts of the c
Move bget to libutils replacing dlmalloc
* Moves bget to libutils replacing dlmalloc as kernel memory allocator * Restores the code formatting of bget.{c,h} to the original state as parts of the current code was unreadable * Adds malloc_add_pool() to make use of previously unused memory * Moves call to malloc_init() into platform specific code * Restores MDBG into working condition * Adds memalign function to bget.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (FVP) Reviewed-by: Etienne Carriere <etienne.carriere@st.com> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 4de4bebc | 20-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Merge tee_{core,uta}_trace.h into libutil
Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h in libutil. Since the trace functions now resides libutil they have to rely on core and li
Merge tee_{core,uta}_trace.h into libutil
Merges tee_core_trace.h and tee_uta_trace.h into a common trace.h in libutil. Since the trace functions now resides libutil they have to rely on core and libutee to provide functions to print to the log device.
* Keeps compatible interface from tee_kta_trace.h * Adds TAMSG() and TAMSG_RAW() to log TA related events * Removes the TRACE_ALWAYS level
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt platform) Reviewed-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 4e77495e | 03-Oct-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename and move TEE_COMPILE_TIME_ASSERT
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wik
Rename and move TEE_COMPILE_TIME_ASSERT
Renames TEE_COMPILE_TIME_ASSERT to COMPILE_TIME_ASSERT, the macro is also moved to assert.h to be available anywhere.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| cebdec51 | 18-Sep-2014 |
Jens Wiklander <jens.wiklander@linaro.org> |
Reenable warnings for all non-3rd party code
* Reenables warnings for all non-3rd party code * Renames dprintf macro to dprintf_level |
| fb4a92f1 | 08-Oct-2014 |
Pascal Brand <pascal.brand@st.com> |
Minor updates and cleanup |
| b8976a60 | 15-Sep-2014 |
Jerome Forissier <jerome.forissier@linaro.org> |
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-al
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.
show more ...
|