| 3276098d | 03-Feb-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: introduce __maybe_unused
When a variable, parameter or function may or may not be referenced depending on some conditional compilation setting, mark it with __maybe_unused instead of __unused.
core: introduce __maybe_unused
When a variable, parameter or function may or may not be referenced depending on some conditional compilation setting, mark it with __maybe_unused instead of __unused. The goal is to improve code legibility.
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 ...
|
| 494df822 | 26-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
cleanup static TA handling
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| a0fdab65 | 05-Jan-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
Assembly files should use FUNC* macros
* All assembly files should use the FUNC* macros for interwork to work properly. * Moves asm.S into libutils to make it available for TA libs
Reviewed-by: J
Assembly files should use FUNC* macros
* All assembly files should use the FUNC* macros for interwork to work properly. * Moves asm.S into libutils to make it available for TA libs
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64 bits) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 93152505 | 07-Jan-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Fix 64-bit build errors when CFG_TEE_TA_LOG_LEVEL == TRACE_FLOW (4)
$ make -j9 PLATFORM=hikey CFG_ARM64_core=y \ CROSS_COMPILE_core=aarch64-linux-gnu- \ CROSS_COMPILE_ta_arm64=aarch64-linux-gnu-
Fix 64-bit build errors when CFG_TEE_TA_LOG_LEVEL == TRACE_FLOW (4)
$ make -j9 PLATFORM=hikey CFG_ARM64_core=y \ CROSS_COMPILE_core=aarch64-linux-gnu- \ CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- \ CFG_TEE_TA_LOG_LEVEL=4 [...] lib/libutee/tee_user_mem.c: In function ‘heap_inc’: lib/libutee/tee_user_mem.c:195:2: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Werror=format=] INMSG("%d", size); ^
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 ...
|
| ea140671 | 03-Dec-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
Fix compile error with 64-bit TA dev kit
$ make PLATFORM=hikey CFG_TEE_TA_LOG_LEVEL=2 CFG_ARM64_core=y \ CROSS_COMPILE=arm-linux-gnueabihf- \ CROSS_COMPILE_core=aarch64-linux-gnu- \ CROSS_COMP
Fix compile error with 64-bit TA dev kit
$ make PLATFORM=hikey CFG_TEE_TA_LOG_LEVEL=2 CFG_ARM64_core=y \ CROSS_COMPILE=arm-linux-gnueabihf- \ CROSS_COMPILE_core=aarch64-linux-gnu- \ CROSS_COMPILE_ta_arm64=aarch64-linux-gnu-
lib/libutee/tee_user_mem.c: In function ‘tee_user_mem_status’: lib/libutee/tee_user_mem.c:508:3: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Werror=format=] IMSG("Size:\t[%d]", global_stats.size); ^
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
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> |
| bc33bbd9 | 11-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Add support to generate multiple TA dev kits
Adds support to generate multiple TA dev kits, one for each word in the variable "ta-targets". ta/ta.mk is included once for each word in "ta-targets" wi
Add support to generate multiple TA dev kits
Adds support to generate multiple TA dev kits, one for each word in the variable "ta-targets". ta/ta.mk is included once for each word in "ta-targets" with the word assigned to "ta-target". This word is the assigned the variable "sm" to allow each "ta-target" to be built as a separate sub-module.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f74a4a2b | 10-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: arm64 syscalls
Adds assembly implementations of arm64 syscalls.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Revie
libutee: arm64 syscalls
Adds assembly implementations of arm64 syscalls.
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 ...
|
| cf48b9ea | 10-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: 64-bit fixes
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> |
| fc4efaf7 | 10-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: limit TEE_MAX_SVC_ARGS
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> |
| 2f04385c | 12-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Unify TA entry functions
Unifies TA entry function into one entry function.
* Updates TA entry * Update ta_head * Fixes style issues in user_ta_entry.c
Note that this change is not backwards compa
Unify TA entry functions
Unifies TA entry function into one entry function.
* Updates TA entry * Update ta_head * Fixes style issues in user_ta_entry.c
Note that this change is not backwards compatible, TAs needs to be recompiled.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| e86f1266 | 05-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
Make TEE Core TA interaction 64-bit compatible
* Updates TA entry * Update ta_head * Updates the syscall interface * Adds functions to make a short pointer (32-bit uref) from a kernel pointer and
Make TEE Core TA interaction 64-bit compatible
* Updates TA entry * Update ta_head * Updates the syscall interface * Adds functions to make a short pointer (32-bit uref) from a kernel pointer and vice versa
Note that this change is not backwards compatible, TAs needs to be recompiled.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 80ddeac7 | 06-Nov-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add ALIGNMENT_IS_OK to libutils/ext/include/util.h, delete unused code
TEE_ALIGNMENT_IS_OK() is renamed ALIGNMENT_IS_OK() and moved to lib/libutils/ext/include/util.h, which avoids duplication (was
Add ALIGNMENT_IS_OK to libutils/ext/include/util.h, delete unused code
TEE_ALIGNMENT_IS_OK() is renamed ALIGNMENT_IS_OK() and moved to lib/libutils/ext/include/util.h, which avoids duplication (was previously in core/include/kernel/tee_common_unpg.h and lib/libutee/include/utee_defines.h). Call sites are adjusted accordingly.
It is assumed that the compiler keyword __alignof__ is available, so CFG_TC_NO_ALIGNOF is of no use. We also remove unused definitions: TEE_ALIGNMENT_*B_IS_OK().
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 ...
|
| b66f219b | 26-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: fix cleanup in TEE_AllocateOperation()
Fixes error handling in TEE_AllocateOperation()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@l
libutee: fix cleanup in TEE_AllocateOperation()
Fixes error handling in TEE_AllocateOperation()
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 94e8a4fc | 26-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: Optionally replace TEE_Panic() with macro
Help debugging by replacing TEE_Panic() with a macro that does an EMSG() and then calls panic function (__TEE_Panic()).
Signed-off-by: Jens Wiklan
libutee: Optionally replace TEE_Panic() with macro
Help debugging by replacing TEE_Panic() with a macro that does an EMSG() and then calls panic function (__TEE_Panic()).
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 ...
|
| a2e9a830 | 16-Sep-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : trusted storage verify (block enc fs)
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@l
GP11 : trusted storage verify (block enc fs)
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 80475d29 | 09-Sep-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: use condvar when serializing TA execution
struct tee_ta_ctx::busy is used to serialize TA execution. Before this patch the operation would fail if busy is true. This patch waits for busy to be
core: use condvar when serializing TA execution
struct tee_ta_ctx::busy is used to serialize TA execution. Before this patch the operation would fail if busy is true. This patch waits for busy to become false if needed with help of wait_queue. Also uses the busy flag for open session to avoid races on multi-session single-instance TAs.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bfc6487b | 10-Sep-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
Flush traces synchronously
Avoids random mixing of secure world traces with ones from the normal world (assuming the normal world also flushes its debug traces synchronously).
The 'sync' parameter
Flush traces synchronously
Avoids random mixing of secure world traces with ones from the normal world (assuming the normal world also flushes its debug traces synchronously).
The 'sync' parameter to the trace_printf() and trace_ext_puts() function is removed because there seems to be no sensible use case mandating sync == false.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bc420748 | 05-May-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
TA as ELF + signature
Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: <Signed header> <ELF header> <Program header> (p
TA as ELF + signature
Changes format of TA to use the ELF format instead. This patch also adds signature checking of the TA. The format of the TA is: <Signed header> <ELF header> <Program header> (part of ELF spec, pointing out segments to load) <Sections>
A struct ta_head is placed in the first section of the first segment to carry flags and other properties of the TA.
elf32.h, elf64.h and elf_common.h are imported from FreeBSD.
In addition to the R_ARM_RELATIVE relocation type, adds support for R_ARM_ABS32 relocations. Since a symbol table is needed to process this relocation type a separate program header is added in the TA ELF containing the sections .dynamic, .dynsym, .dynstr and .hash. These sections are only needed during relocation and could be released once the TA is relocated.
A default signing key has been generated with openssl genrsa -out key.pem and added as keys/default_ta.pem
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) Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
show more ...
|
| 642a1607 | 24-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : operation state handling
Change-Id: I136443ef2f137b2e12902324d724fff7ce7c590e Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jerome Forisssier <jerome.forissier@linaro.o
GP11 : operation state handling
Change-Id: I136443ef2f137b2e12902324d724fff7ce7c590e Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Jerome Forisssier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| 325a2155 | 16-Jun-2015 |
Pascal Brand <pascal.brand@st.com> |
Remove useless src alignment check in TEE_UpdateXXX
Tested-by: Pascal BRAND <pascal.brand@st.com> Reviewed-by: Jean-Michel DELORME <jean-michel.delorme@st.com> Reviewed-by: Etienne CARRIERE <etienne
Remove useless src alignment check in TEE_UpdateXXX
Tested-by: Pascal BRAND <pascal.brand@st.com> Reviewed-by: Jean-Michel DELORME <jean-michel.delorme@st.com> Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Signed-off-by: Pascal Brand <pascal.brand@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| 6d15db08 | 29-Jul-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: reset state after TEE_DigestDoFinal()
As per GlobalPlatform Internal API Specifications v1.0 and v1.1, section 6.3.2 TEE_DigestDoFinal: "Afterwards the Message Digest operation is reset [to
libutee: reset state after TEE_DigestDoFinal()
As per GlobalPlatform Internal API Specifications v1.0 and v1.1, section 6.3.2 TEE_DigestDoFinal: "Afterwards the Message Digest operation is reset [to initial state] and can be reused" (the words in square brackets are in v1.1 only).
Note that other TEE_xxxFinal() functions are not modified because the specifications state that the application shall panic if "the operation has not been started yet with TEE_[xxx]Init() or has already been finalized."
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 05304565 | 06-Jul-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP11 : TEE_GetOperationInfoMultiple
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org
GP11 : TEE_GetOperationInfoMultiple
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM boards) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (ARM Juno board)
show more ...
|
| df6be4e1 | 17-Jul-2015 |
Pascal Brand <pascal.brand@st.com> |
mpa: allocator for temporary variables
Tempory variables, in math, are taken in a pool. Each variable has its size maximized, that is 4096 * 2 in order to make overflowed operations.
However, in mo
mpa: allocator for temporary variables
Tempory variables, in math, are taken in a pool. Each variable has its size maximized, that is 4096 * 2 in order to make overflowed operations.
However, in most of the cases, like ECC, such big variable is not necessary.
This patch introduce an allocator to get temporary variables of given size, which is an enabler to reduce the number of required memory for temporary variables
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| c988227a | 15-Jul-2015 |
Pascal Brand <pascal.brand@st.com> |
ECC: ECDSA at GP level
Reviewed-by: Cedric Chaumont <cedric.chaumont@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Sign
ECC: ECDSA at GP level
Reviewed-by: Cedric Chaumont <cedric.chaumont@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 ...
|