| 1c832d7c | 17-Dec-2019 |
davidwang <davidwang@realtek.com> |
core: support shared irq
With some platforms would have multiplexed interrupts and software implement difference interrupt handler. Currently the interrupt mechanism only handle the first matched ha
core: support shared irq
With some platforms would have multiplexed interrupts and software implement difference interrupt handler. Currently the interrupt mechanism only handle the first matched handler, and can not support shared irq.
New change to keep find another matched handler if the previous handler return none.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: davidwang <davidwang@realtek.com>
show more ...
|
| 15ba8c1f | 15-Nov-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move VFP state into struct user_ta_ctx
Moves the VFP state from struct user_ta_ctx to struct user_mode_ctx to make user mode handling a bit more generic.
Acked-by: Pipat Methavanitpong <pipat
core: move VFP state into struct user_ta_ctx
Moves the VFP state from struct user_ta_ctx to struct user_mode_ctx to make user mode handling a bit more generic.
Acked-by: Pipat Methavanitpong <pipat.methavanitpong@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7c732ee4 | 07-Oct-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: get svc handler from the context of current session
Instead of a single global syscalls definition, get the syscall handler function from the context of current active session.
An extra optio
core: get svc handler from the context of current session
Instead of a single global syscalls definition, get the syscall handler function from the context of current active session.
An extra optional (mandatory for user mode TAs) function pointer is added to struct tee_ta_ops, handle_svc, which handles the syscall.
tee_svc_handler() is split into a generic thread_svc_handler() which is put in kernel/thread.c. The user TA specific part is put in user_ta_handle_svc() which is kept in tee/arch_svc.c but made available via the new .handle_svc function pointer of struct tee_ta_ops.
Acked-by: Pipat Methavanitpong <pipat.methavanitpong@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5343f09f | 07-Oct-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add common user_mode_ctx_print_mappings()
Adds a common user_mode_ctx_print_mappings() which prints the current user mode mappings.
Acked-by: Pipat Methavanitpong <pipat.methavanitpong@linaro
core: add common user_mode_ctx_print_mappings()
Adds a common user_mode_ctx_print_mappings() which prints the current user mode mappings.
Acked-by: Pipat Methavanitpong <pipat.methavanitpong@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1936dfc7 | 07-Oct-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add struct user_mode_ctx
Adds struct user_mode_ctx which replaces user mode specific fields used for memory mapping.
Acked-by: Pipat Methavanitpong <pipat.methavanitpong@linaro.org> Acked-by:
core: add struct user_mode_ctx
Adds struct user_mode_ctx which replaces user mode specific fields used for memory mapping.
Acked-by: Pipat Methavanitpong <pipat.methavanitpong@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e1afc439 | 18-Nov-2019 |
Sumit Garg <sumit.garg@linaro.org> |
core: add framework to load REE-FS encrypted TAs
Add framework to support loading of encrypted TAs from REE-FS using symmetric authenticated encryption scheme supported by OP-TEE.
The default encry
core: add framework to load REE-FS encrypted TAs
Add framework to support loading of encrypted TAs from REE-FS using symmetric authenticated encryption scheme supported by OP-TEE.
The default encryption key is derived from hardware unique key which can be overridden via platform specific encryption key.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 099918f6 | 05-Sep-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: Add support for syscall function tracer
This patch adds support for syscall tracing in TEE core. It complements existing ftrace support for user TAs via adding trace for syscalls that are in
ftrace: Add support for syscall function tracer
This patch adds support for syscall tracing in TEE core. It complements existing ftrace support for user TAs via adding trace for syscalls that are invoked by user TAs into the TEE core.
And after this patch ftrace will cover both TA and TEE core code. So lets rename config option from CFG_TA_FTRACE_SUPPORT to CFG_FTRACE_SUPPORT.
It is optional to enable syscall trace via CFG_SYSCALL_FTRACE=y config option in addition to CFG_FTRACE_SUPPORT=y config option.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 1e866588 | 10-Sep-2019 |
Jerome Forissier <jerome@forissier.org> |
core: dt: add __noreturn to _fdt_fill_device_info() stub
When CFG_DT != y, the stub function _fdt_fill_device_info() just panics. Therefore it deserves the __noreturn attribute. Adding it makes a Cl
core: dt: add __noreturn to _fdt_fill_device_info() stub
When CFG_DT != y, the stub function _fdt_fill_device_info() just panics. Therefore it deserves the __noreturn attribute. Adding it makes a Clang warning go away.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1df107b6 | 03-Sep-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: exclude only foreign interrupt time
Current TA function execution time feature only reports user mode execution time and exclude any non-user mode execution time. But in case of syscalls whi
ftrace: exclude only foreign interrupt time
Current TA function execution time feature only reports user mode execution time and exclude any non-user mode execution time. But in case of syscalls which are essentially function invocations from TA into the kernel, we shouldn't exclude syscall execution time in order to account for actual function execution time. That means we only exclude time that is spent serving foreign interrupts.
So changes in this patch allows to incorporate syscall execution time in the function graph output.
Fixes: f5df167c2ffb ("ftrace: Add function execution time support") Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 95cdc5e0 | 05-Jul-2019 |
Cedric Neveux <cedric.neveux@nxp.com> |
core: add DT function to read/modify DT
Add DT functions: dt_get_irq() get the interrupt number of a node
dt_disable_status() disable the 'status' field of node's prop
dt_enable_secure_status(
core: add DT function to read/modify DT
Add DT functions: dt_get_irq() get the interrupt number of a node
dt_disable_status() disable the 'status' field of node's prop
dt_enable_secure_status() set 'secure-status' field of node's prop and disable the 'status' field in the same time
Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e9f46c74 | 13-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace thread_nintr_handler_ptr with weak function
Removes registration of platform specific secure interrupt handler in thread_nintr_handler_ptr. Instead a __weak overridable itr_core_handle
core: replace thread_nintr_handler_ptr with weak function
Removes registration of platform specific secure interrupt handler in thread_nintr_handler_ptr. Instead a __weak overridable itr_core_handler() is provided. Platforms which expects to receive secure interrupts must override the default function. The default function calls panic() if called.
With this also nintr is removed from struct thread_handlers and consequently all platforms are updated to stop using that field.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 757331fc | 21-Aug-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace ASM with compiler-builtin __ASSEMBLER__
The C preprocessor predefines __ASSEMBLER__ with value 1 when when preprocessing assembly language, see [1]. Instead of using a special defines, let's
Replace ASM with compiler-builtin __ASSEMBLER__
The C preprocessor predefines __ASSEMBLER__ with value 1 when when preprocessing assembly language, see [1]. Instead of using a special defines, let's use the define already provided.
Link: [1] https://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f5df167c | 09-Aug-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: Add function execution time support
Add support to dump function execution time at corresponding function exit points in output ftrace buffer.
To achieve proper function execution time we n
ftrace: Add function execution time support
Add support to dump function execution time at corresponding function exit points in output ftrace buffer.
To achieve proper function execution time we need to exclude TA suspend time from timestamps, so add corresponding support in TEE core.
Also user mapping must be active to access ftrace buffer, so do that during TA resume.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 153479ac | 18-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: dump ftrace data with ldelf
Uses ldelf to dump ftrace data from a TA.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerom
core: dump ftrace data with ldelf
Uses ldelf to dump ftrace data from a TA.
Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d1911a85 | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: load TAs using ldelf
Uses ldelf to load and relocate TAs instead of parsing and loading the ELFs in TEE Core. TA abort dumps, ASLR and ftrace are temporarily removed or disabled to be re-enabl
core: load TAs using ldelf
Uses ldelf to load and relocate TAs instead of parsing and loading the ELFs in TEE Core. TA abort dumps, ASLR and ftrace are temporarily removed or disabled to be re-enabled in following commits.
Loading dynamically linked TAs are from now on always supported and cannot be disabled via configuration flags. CFG_TA_DYNLINK is also removed as a configuration option.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8e64b181 | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove tee_ta_dump_current()
tee_ta_dump_current() is only called from abort_print_current_ta(), move the trivial implementation into abort_print_current_ta() and remove tee_ta_dump_current().
core: remove tee_ta_dump_current()
tee_ta_dump_current() is only called from abort_print_current_ta(), move the trivial implementation into abort_print_current_ta() and remove tee_ta_dump_current().
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 02fbb41a | 27-Jun-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: lockdep: support non-blocking acquire
Adds support for non-blocking lock semantics such as mutex_trylock(). A new function is introduced to instrument this operation: lockdep_tryacquire(). It
core: lockdep: support non-blocking acquire
Adds support for non-blocking lock semantics such as mutex_trylock(). A new function is introduced to instrument this operation: lockdep_tryacquire(). It should be called when it is known that ownership of the underlying object has been granted to the caller. It behaves similarly to lockdep_acquire() in that it does record the call stack and records that the lock is owned. But it does not create any dependencies to the locks that are currently owned by the caller. See "Dynamic Lock Dependency Analysis of Concurrent Systems" [1] section 5.3.
Link: [1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.132&rep=rep1&type=pdf Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ccbc05e1 | 03-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: lockdep: support lock destroy
With lockdep enabled (CFG_LOCKDEP=y), additional cleanup is needed when a mutex is destroyed. This patch adds mutex_destroy_check() which is called when a mutex i
core: lockdep: support lock destroy
With lockdep enabled (CFG_LOCKDEP=y), additional cleanup is needed when a mutex is destroyed. This patch adds mutex_destroy_check() which is called when a mutex is destroyed with mutex_destroy(). From mutex_destroy_check() the corresponding lockdep node and all edges referring to it are removed.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6b71c85c | 29-May-2019 |
Joakim Bech <joakim.bech@linaro.org> |
HUK: Add enum for TA unique key derivation
Add an additional enum that will be used when deriving device and TA unique keys.
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wi
HUK: Add enum for TA unique key derivation
Add an additional enum that will be used when deriving device and TA unique keys.
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bdeb310a | 10-Jun-2019 |
Sumit Garg <sumit.garg@linaro.org> |
core: enable ftrace for TAs built using shared libraries
To enable ftrace for TAs built with shared libraries, we need to dump the TA state (include regions dump along with mapping to <uuid>.elf) in
core: enable ftrace for TAs built using shared libraries
To enable ftrace for TAs built with shared libraries, we need to dump the TA state (include regions dump along with mapping to <uuid>.elf) in corresponding ftrace buffer for symbolize.py script to map symbols to particular shared libraries.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960)
show more ...
|
| d35a00c7 | 16-May-2019 |
Sumit Garg <sumit.garg@linaro.org> |
core: prepare support for TA function tracing
To support TA function tracing OP-TEE core role being: - To initialize and register ftrace buffer per TA session. - To dump TA ftrace buffer to normal w
core: prepare support for TA function tracing
To support TA function tracing OP-TEE core role being: - To initialize and register ftrace buffer per TA session. - To dump TA ftrace buffer to normal world via RPC call in case TA session closes or in case of TA abort.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey960)
show more ...
|
| 2a7088cc | 27-May-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: correct _fdt_get_status() description
Correct _fdt_get_status() function description since it returns a positive or null value on success and -1 on error.
Signed-off-by: Etienne Carriere <eti
core: correct _fdt_get_status() description
Correct _fdt_get_status() function description since it returns a positive or null value on success and -1 on error.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| b99a33dd | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: provide struct user_ta_store_ops in public .h file
Moves struct user_ta_store_ops definition into the new <kernel/user_ta_store.h> file.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro
core: provide struct user_ta_store_ops in public .h file
Moves struct user_ta_store_ops definition into the new <kernel/user_ta_store.h> file.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 52ae1039 | 23-May-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: handle_db: add ptr_destructor argument
Adds ptr_destructor argument to handle_db_destroy() which is called for each registered pointer.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.
core: handle_db: add ptr_destructor argument
Adds ptr_destructor argument to handle_db_destroy() which is called for each registered pointer.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5d47b773 | 18-Dec-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pm: helper register_pm_core_service_cb()
Introduce inline helper function register_pm_core_service_cb() to simplifies registration of core service PM callbacks:
help: register_pm_core_servi
core: pm: helper register_pm_core_service_cb()
Introduce inline helper function register_pm_core_service_cb() to simplifies registration of core service PM callbacks:
help: register_pm_core_service_cb(my_callback, my_handle); instead of generic: register_pm_cb(&PM_CALLBACK_HANDLE_INITIALIZER( my_callback, my_handle, PM_CB_ORDER_CORE_SERVICE));
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|