| 4d9c8fe8 | 26-Oct-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: remove unused TEE_ERROR_FILE_NOT_FOUND
Removes unused proprietary TEE_Result code TEE_ERROR_FILE_NOT_FOUND.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens
libutee: remove unused TEE_ERROR_FILE_NOT_FOUND
Removes unused proprietary TEE_Result code TEE_ERROR_FILE_NOT_FOUND.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2ffdd194 | 26-Oct-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
Remove legacy tee_common_unpg.h
Removes legacy file core/include/kernel/tee_common_unpg.h and updates with new types etc as needed.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Teste
Remove legacy tee_common_unpg.h
Removes legacy file core/include/kernel/tee_common_unpg.h and updates with new types etc as needed.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9102ce21 | 19-Sep-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
syscall storage_obj_seek: fix sign extension
Fixes problem with sign extension (or lack thereof) for the syscall storage_obj_seek. Updates the general rules of arguments for syscalls to use signed 3
syscall storage_obj_seek: fix sign extension
Fixes problem with sign extension (or lack thereof) for the syscall storage_obj_seek. Updates the general rules of arguments for syscalls to use signed 32-bit parameters when a signed parameter is needed.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Suggested-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU and FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 52f8b816 | 01-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: add heap allocation failure statistics
Adds the following statistics to the heap allocator and export then via the static TA `core/arch/arm/sta/stats.c` (all of them can be reset):
- num_all
core: add heap allocation failure statistics
Adds the following statistics to the heap allocator and export then via the static TA `core/arch/arm/sta/stats.c` (all of them can be reset):
- num_alloc_fail: number of calls to malloc()/calloc()/realloc() that returned NULL - biggest_alloc_fail: the size in bytes of the largest allocation request that resulted in a failure - biggest_alloc_fail_used: the number of bytes that were allocated at that time
Depends on CFG_WITH_STATS=y.
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> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1d171f95 | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for kernel address sanitizer
Adds support for kernel address sanitizer. Currently only for plat-vexpress-qemu_virt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tes
core: add support for kernel address sanitizer
Adds support for kernel address sanitizer. Currently only for plat-vexpress-qemu_virt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v7) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b18dfc62 | 30-Aug-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add .early_bss section
Adds .early_bss to be used for variables that would normally land in .bss, but must not since they are updated before .bss is cleared. This section replaces earlier work
core: add .early_bss section
Adds .early_bss to be used for variables that would normally land in .bss, but must not since they are updated before .bss is cleared. This section replaces earlier workarounds using __data for such variables.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a681faba | 02-Sep-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
trace.h: add macros to unwind and print the call stack (kernel only)
Adds [EIDF]PRINT_STACK() for debugging purposes. Depends on CFG_CORE_UNWIND=y. As a side-effect, also adds a few things that may
trace.h: add macros to unwind and print the call stack (kernel only)
Adds [EIDF]PRINT_STACK() for debugging purposes. Depends on CFG_CORE_UNWIND=y. As a side-effect, also adds a few things that may be useful on their own: __always_inline, read_pc(), read_fp(), read_lr().
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 086a6557 | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutils: promote mdbg_check() messages to TRACE_INFO from TRACE_DEBUG
The memory tracing feature enabled by CFG_TEE_CORE_MALLOC_DEBUG=y or CFG_TEE_TA_MALLOC_DEBUG=y is quite convenient to track mem
libutils: promote mdbg_check() messages to TRACE_INFO from TRACE_DEBUG
The memory tracing feature enabled by CFG_TEE_CORE_MALLOC_DEBUG=y or CFG_TEE_TA_MALLOC_DEBUG=y is quite convenient to track memory leaks or other shortages. Unfortunately, the allocation summary is dumped with the TRACE_DEBUG severity so it is easily burried in lots of debug output. In addition, tracking memory leaks frequently involves running code in a loop, so that the leak better stands out from other allocations. Doing so with debug logs enabled tends to slow things down more than necessary.
Therefore this commit promotes the mdbg_check() message to TRACE_INFO.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 351ecd11 | 30-Aug-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: fix compile error when CFG_TEE_CORE_MALLOC_DEBUG=y
When CFG_TEE_CORE_MALLOC_DEBUG is enabled, but CFG_TEE_CORE_DEBUG is not, the compiler complains about unused parameters/functions. Fix them
core: fix compile error when CFG_TEE_CORE_MALLOC_DEBUG=y
When CFG_TEE_CORE_MALLOC_DEBUG is enabled, but CFG_TEE_CORE_DEBUG is not, the compiler complains about unused parameters/functions. Fix them by adding __maybe_unused qualifiers.
lib/libutils/isoc/bget_malloc.c: In function ‘assert_header’: lib/libutils/isoc/bget_malloc.c:688:44: error: unused parameter ‘hdr’ [-Werror=unused-parameter] static void assert_header(struct mdbg_hdr *hdr) ^ lib/libutils/isoc/bget_malloc.c: At top level: lib/libutils/isoc/bget_malloc.c:595:16: error: ‘bget_buf_size’ defined but not used [-Werror=unused-function] static bufsize bget_buf_size(void *buf) ^ cc1: all warnings being treated as errors
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2ef14de1 | 11-May-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
secure storage: add SQL filesystem
This commit adds a new container type for trusted storage: SQL FS. Data are stored in the non-secure world, just like the REE FS (CFG_REE_FS). But, unlike REE FS w
secure storage: add SQL filesystem
This commit adds a new container type for trusted storage: SQL FS. Data are stored in the non-secure world, just like the REE FS (CFG_REE_FS). But, unlike REE FS which manipulates several files for each secure object, this implementation needs only one container in a SQLite database per secure object. We rely on the transaction-based nature of the database to provide atomicity.
A storage identifier is added to the TA API: TEE_STORAGE_PRIVATE_SQL. Trusted applications can use it to select this filesystem. The value TEE_STORAGE_PRIVATE defined by GlobalPlatform will also select the SQL FS if all other implementations are disabled.
This feature is enabled with CFG_SQL_FS=y. It depends on SQL support in tee-supplicant [1].
[1] https://github.com/OP-TEE/optee_client/pull/50
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: David Brown <david.brown@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8c9d9445 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __asse
core: review assert and panic traces
Replace few "{ EMSG(...); panic(); }" with "panic(...);".
Disable file/line/func debug traces in panic() logs when CFG_TEE_CORE_DEBUG is disable.
Change __assert_log() uses EMSG_RAW() to no pollute trace with __assert_log() internals (duplicated file/line/func traces).
Change assert() to use a low/high verbosity mode upon CFG_TEE_CORE_DEBUG as panic() does.
Change assert() to also trace the C function where assertion failed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| a8f34e0c | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
assert: honor NDEBUG
Macro assert() expands to a no-op when NDEBUG is defined.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> R
assert: honor NDEBUG
Macro assert() expands to a no-op when NDEBUG is defined.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| 8ddf5a4e | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
assert/panic: fix misuse of assert/panic
Currently implementation of macro assert() does not expand to a no-op when NDEBUG is defined. This will be done in a later change. Before that, fix misuses o
assert/panic: fix misuse of assert/panic
Currently implementation of macro assert() does not expand to a no-op when NDEBUG is defined. This will be done in a later change. Before that, fix misuses of assert() and TEE_ASSERT(): - Correct misplaced assert() that should panic() whatever NDEBUG. - Correct misplaced TEE_ASSERT() that should simply assert().
Also cleanup many inclusions of "assert.h" and few calls of assert().
Signed-off-by: Jens Wiklander <jen.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| d10c4c4b | 25-Jul-2016 |
Pengguang Zhu <zpghao@163.com> |
libutee: remove storageID check, let TEE kernel validate instead
Signed-off-by: Pengguang Zhu <zpghao@163.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier
libutee: remove storageID check, let TEE kernel validate instead
Signed-off-by: Pengguang Zhu <zpghao@163.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Reviewed-by: David Brown <david.brown@linaro.org> Tested-by: David Brown <david.brown@linaro.org>
show more ...
|
| 5e7638a8 | 29-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: malloc: skip adding too small pools
Malloc skips adding pools that are too small to initialize with.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wikl
libutils: malloc: skip adding too small pools
Malloc skips adding pools that are too small to initialize with.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 51932e38 | 26-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils/newlib: clean sub.mk
As most newlib source files needs more or less the same flags to compile, apply the flags with cflags-y and clags-remove-y instead of individual flags for each file.
R
libutils/newlib: clean sub.mk
As most newlib source files needs more or less the same flags to compile, apply the flags with cflags-y and clags-remove-y instead of individual flags for each file.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f46a4a4a | 25-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: add strchr()
Imports strchr() from newlib.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 53b28344 | 13-Jun-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
tui: Add __maybe_unused
Parameter 'msg' is not used when CFG_TEE_TA_LOG_LEVEL=0, so add __maybe_unused.
Fixes https://github.com/OP-TEE/optee_os/issues/848.
Signed-off-by: Jerome Forissier <jerome
tui: Add __maybe_unused
Parameter 'msg' is not used when CFG_TEE_TA_LOG_LEVEL=0, so add __maybe_unused.
Fixes https://github.com/OP-TEE/optee_os/issues/848.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU, HiKey 32/64) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a43532cf | 02-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: move tui related files to tui directory
Moves all trusted UI related file to a separate tui subdirectory.
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Joakim B
libutee: move tui related files to tui directory
Moves all trusted UI related file to a separate tui subdirectory.
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f789aa08 | 14-Apr-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add text rendering routines
* Adds routines to render text from raw bitmap fonts * Adds script to render raw bitmap fonts from True Type Fonts * Adds rendered raw bitmaps of the Amble TTF
libutee: add text rendering routines
* Adds routines to render text from raw bitmap fonts * Adds script to render raw bitmap fonts from True Type Fonts * Adds rendered raw bitmaps of the Amble TTF
Needed by Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| dd539a4d | 28-Mar-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add amble font
Imports Amble font from https://www.fontsquirrel.com/fonts/download/amble
To be used to render text in Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewe
libutee: add amble font
Imports Amble font from https://www.fontsquirrel.com/fonts/download/amble
To be used to render text in Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a123a602 | 14-Apr-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add raw image routines
Adds routines to manipulate raw bitmap images needed by Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier
libutee: add raw image routines
Adds routines to manipulate raw bitmap images needed by Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 91cf43ac | 14-Apr-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add utf-8 decoder
Adds a simple UTF-8 decoder, advanced enough to support Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@lina
libutee: add utf-8 decoder
Adds a simple UTF-8 decoder, advanced enough to support Trusted UI.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 19be7894 | 15-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libmpa: fixes undefined behavior
Fixes undefined behavior detected with CFG_CORE_SANITIZE_UNDEFINED=y
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander
libmpa: fixes undefined behavior
Fixes undefined behavior detected with CFG_CORE_SANITIZE_UNDEFINED=y
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 385e3901 | 16-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutils: add BIT and SHIFT macros
* Adds BIT32(nr) and BIT64(nr) macros to set a bit in a 32-bit or 64-bit unsigned integer. * Adds SHIFT_U32(v, shift) and SHIFT_U64(v, shift) macros to shift a v
libutils: add BIT and SHIFT macros
* Adds BIT32(nr) and BIT64(nr) macros to set a bit in a 32-bit or 64-bit unsigned integer. * Adds SHIFT_U32(v, shift) and SHIFT_U64(v, shift) macros to shift a value resulting in a 32-bit or 64-bit unsigned integer.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|