| 67729d8d | 09-Apr-2021 |
Ludovic Barre <ludovic.barre@foss.st.com> |
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated t
core: dt: split dt_get_irq() between interrupt framework and drivers
To welcome other interrupt drivers (coming from other platform for example), we need to rework dt_get_irq() which was dedicated to ARM platform more specifically GIC driver. This change moves dt_get_irq() in interrupt framework, this manages the generic part of interrupt bindings (specified by devicetree.org [1]) and then call a driver callback to translate specific properties. This callback is registered by drivers while its init step.
Update CAAM crypto driver accordingly.
Link: [1] https://www.devicetree.org/specifications/ Signed-off-by: Ludovic Barre <ludovic.barre@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| 5418501a | 02-Apr-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move embedded_ts.c to core/kernel
The embedded_ts.c code is not architecture-specific, therefore, move it to core/kernel and move embedded_ts.h to core/include/kernel.
Signed-off-by:
core: kernel: move embedded_ts.c to core/kernel
The embedded_ts.c code is not architecture-specific, therefore, move it to core/kernel and move embedded_ts.h to core/include/kernel.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d26b922f | 02-Apr-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: early_ta.c: remove unused zlib.h
The early_ta.c source includes zlib.h without using any code from it. Moreover it may causes compilation errors due to the dependency to CFG_EMBEDDED_T
core: kernel: early_ta.c: remove unused zlib.h
The early_ta.c source includes zlib.h without using any code from it. Moreover it may causes compilation errors due to the dependency to CFG_EMBEDDED_TS flag.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c571b3fd | 28-Mar-2021 |
RueiAnHu <Rayan.Hu@mediatek.com> |
core: fix wrong conditional expression in tee_ta_clear_busy()
When a ctx of a single instance user TA is first created, lock_single_instance() is called in tee_ta_try_set_busy(). However, unlock_sin
core: fix wrong conditional expression in tee_ta_clear_busy()
When a ctx of a single instance user TA is first created, lock_single_instance() is called in tee_ta_try_set_busy(). However, unlock_single_instance() is not called in tee_ta_clear_busy() since ctx->initializing is still false. It results that tee_ta_single_instance_thread is not reset when CFG_CONCURRENT_SINGLE_INSTANCE_TA is not enabled. So remove the wrong conditional expression and remove "initializing" from tee_ta_ctx since it's no longer used.
Signed-off-by: RueiAnHu <Rayan.Hu@mediatek.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| eea7974a | 29-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move secstor_ta.c to core/tee
secstor_ta.c is not architecture-specific code, therefore move it to core/tee.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by:
core: kernel: move secstor_ta.c to core/tee
secstor_ta.c is not architecture-specific code, therefore move it to core/tee.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c34c183a | 29-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move ree_fs_ta.c to core/tee
ree_fs_ta.c is not architecture-specific code, therefore move it to core/tee.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Je
core: kernel: move ree_fs_ta.c to core/tee
ree_fs_ta.c is not architecture-specific code, therefore move it to core/tee.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1bfc1082 | 29-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move early_ta.c to core/tee
early_ta.c is not architecture-specific code, therefore move it to core/tee. Moves early_ta.h to core/include/kernel as well.
Signed-off-by: Marouene Bouba
core: kernel: move early_ta.c to core/tee
early_ta.c is not architecture-specific code, therefore move it to core/tee. Moves early_ta.h to core/include/kernel as well.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a54f2bb7 | 29-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move pseudo_ta.c to core/tee
pseudo_ta.c is not architecture-specific code, therefore move it to core/tee. pseudo_ta.h is already located under core/include/kernel
Signed-off-by: Maro
core: kernel: move pseudo_ta.c to core/tee
pseudo_ta.c is not architecture-specific code, therefore move it to core/tee. pseudo_ta.h is already located under core/include/kernel
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d3977ed1 | 29-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move user_ta.c to core/tee
user_ta.c is not architecture-specific code, therefore move it to core/tee. user_ta.h is already located under core/include/kernel.
Signed-off-by: Marouene
core: kernel: move user_ta.c to core/tee
user_ta.c is not architecture-specific code, therefore move it to core/tee. user_ta.h is already located under core/include/kernel.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ffc1ebb2 | 02-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: pm.c: add missing header stdlib.h
This commit explicitly includes stdlib.h to use realloc() function.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome
core: kernel: pm.c: add missing header stdlib.h
This commit explicitly includes stdlib.h to use realloc() function.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| c185655e | 19-Jan-2021 |
Jelle Sels <jelle.sels@arm.com> |
core: Initiate and load Secure Partitions
Secure Partitions (SP) are S-El0 execution service defined in the Arm FF-A specification. The Secure Partitions are loaded as the last part of the boot proc
core: Initiate and load Secure Partitions
Secure Partitions (SP) are S-El0 execution service defined in the Arm FF-A specification. The Secure Partitions are loaded as the last part of the boot process. A Secure Partitions can be added to image using the SP_PATHS build option. The SPs are loaded using ldelf.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 22ac5767 | 03-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: sub.mk: don't build user_access.c when CFG_WITH_USER_TA=n
The user_access.c functions are used by tee_svc* which are not built when CFG_WITH_USER_TA=n, therefore, make it depend on CFG
core: kernel: sub.mk: don't build user_access.c when CFG_WITH_USER_TA=n
The user_access.c functions are used by tee_svc* which are not built when CFG_WITH_USER_TA=n, therefore, make it depend on CFG_WITH_USER_TA flag.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
show more ...
|
| 51f49692 | 01-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: mutex: mutex is abstract pull it from arch folder
This commit moves mutex* and wait_queue* from arch folder to core/kernel to make it architecture-independent.
Signed-off-by: Marouene Boubakr
core: mutex: mutex is abstract pull it from arch folder
This commit moves mutex* and wait_queue* from arch folder to core/kernel to make it architecture-independent.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2a7b4219 | 11-Jan-2021 |
Jerome Forissier <jerome@forissier.org> |
ftrace: fix regression causing panic in ftrace_update_times()
Commit 00b3b9a25e76 ("core: add generic struct ts_session") has introduced a regression in the ftrace code by introducing a call to ts_g
ftrace: fix regression causing panic in ftrace_update_times()
Commit 00b3b9a25e76 ("core: add generic struct ts_session") has introduced a regression in the ftrace code by introducing a call to ts_get_current_session() in ftrace_update_times() in replacement of tee_ta_get_current_session(). At this point it can happen that no current session exists, in which case the function should simply return. Unfortunately ts_get_current_session() will call panic() is such a situation. The proper function is ts_get_current_session_may_fail().
Fixes: 00b3b9a25e76 ("core: add generic struct ts_session") Fixes: https://github.com/OP-TEE/optee_os/issues/4313 Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
show more ...
|
| baa5161d | 11-Dec-2020 |
Balint Dobszay <balint.dobszay@arm.com> |
core: ldelf: implement separate syscalls for ldelf
Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as
core: ldelf: implement separate syscalls for ldelf
Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| 988ea29c | 23-Dec-2020 |
Balint Dobszay <balint.dobszay@arm.com> |
core: add handle_db_is_empty() function
Implements a function that checks if a handle database is empty, i.e. all pointers stored in the database are NULL.
Acked-by: Etienne Carriere <etienne.carri
core: add handle_db_is_empty() function
Implements a function that checks if a handle database is empty, i.e. all pointers stored in the database are NULL.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| 0a971fdb | 11-Dec-2020 |
Balint Dobszay <balint.dobszay@arm.com> |
core: invoke SVC handler through struct ts_session
Store the current SVC handler function pointer in struct ts_session, and invoke the handler through this. Enables changing the SVC handler for a se
core: invoke SVC handler through struct ts_session
Store the current SVC handler function pointer in struct ts_session, and invoke the handler through this. Enables changing the SVC handler for a session without modifying the ts_ops defined in the session context.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| cbe7e1b8 | 11-Dec-2020 |
Balint Dobszay <balint.dobszay@arm.com> |
core: extract ldelf related code from system PTA
Various functions in the system PTA are only used in conjunction with ldelf. They either implement a system service needed only by ldelf (system_open
core: extract ldelf related code from system PTA
Various functions in the system PTA are only used in conjunction with ldelf. They either implement a system service needed only by ldelf (system_open_ta_binary(), etc.) or they provide an interface for TAs to invoke services implemented in user space by ldelf (call_ldelf_dlopen(), call_ldelf_dlsym()). Extract these to a separate file as a first step towards converting the PTA system_*() calls into proper ldelf-specific syscalls.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| 145ae446 | 02-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
Use barrier_read_cntpct() to read CNTPCT
Arm ARM quite clearly mentions [1] [2] that such reads must be preceded by an ISB to forbid re-ordering.
[1] https://developer.arm.com/documentation/ddi0487
Use barrier_read_cntpct() to read CNTPCT
Arm ARM quite clearly mentions [1] [2] that such reads must be preceded by an ISB to forbid re-ordering.
[1] https://developer.arm.com/documentation/ddi0487/fc/ page D13-2863 "Synchronization requirements for AArch64 System registers" and page G8-6146 "Ordering of reads of System registers". [2] https://developer.arm.com/documentation/ddi0406/cd/ page B3-1441 "Ordering of reads of system control registers"
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reported-by: Olivier Deprez <Olivier.Deprez@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 521aacf1 | 10-Nov-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: fix secure partition TA context
Fix secure partition invocation in tee_ta_manager.c. The TA context instance is found in the secure partition context (as here *_stmm_ctx()), instead of the tru
core: fix secure partition TA context
Fix secure partition invocation in tee_ta_manager.c. The TA context instance is found in the secure partition context (as here *_stmm_ctx()), instead of the trusted service context as for regular TAs and PTAs.
This change moves to_ta_session() from header file to source file so that is_stmm_ctx() is visible and can be asserted.
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e3603bde | 27-Oct-2020 |
Balint Dobszay <balint.dobszay@arm.com> |
core: move non TA specific fields from user_ta_ctx
Moves fields from user_ta_ctx to user_mode_ctx, which are not specific to user TAs. This is needed to prepare for handling Secure Partitions, user_
core: move non TA specific fields from user_ta_ctx
Moves fields from user_ta_ctx to user_mode_ctx, which are not specific to user TAs. This is needed to prepare for handling Secure Partitions, user_mode_ctx will be the common ground for the fields used by both TAs and SPs.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| f9cd31c5 | 05-Oct-2020 |
Jelle Sels <jelle.sels@arm.com> |
core: rename secure_partition to stmm_sp
The current secure partition code is used for the stmm SP. Rename it so we can start integrating the FF-A secure partitions.
Backwards compatibility is main
core: rename secure_partition to stmm_sp
The current secure partition code is used for the stmm SP. Rename it so we can start integrating the FF-A secure partitions.
Backwards compatibility is maintained when CFG_STMM_PATH is used to enable support for STMM. The internal configuration flag CFG_WITH_SECURE_PARTITION is renamed to CFG_WITH_STMM_SP.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
show more ...
|
| 89c9728d | 19-Oct-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace tee_mmu prefix with vm
Replaces the tee_mmu prefix with vm. tee_mmu.h is renamed to vm.h and core/arch/arm/mm/tee_mmu.c is moved to core/mm/vm.c. Public functions belonging to these fi
core: replace tee_mmu prefix with vm
Replaces the tee_mmu prefix with vm. tee_mmu.h is renamed to vm.h and core/arch/arm/mm/tee_mmu.c is moved to core/mm/vm.c. Public functions belonging to these files are renamed with a vm prefix.
Introduces: vm_map_param(), vm_clean_param(), vm_buf_is_inside_private(), vm_buf_intersects_private(), vm_buf_to_mboj_offs(), vm_buf_is_inside_um_private(), vm_buf_intersects_um_private(), vm_add_rwmem(), vm_rem_rwmem(), vm_va2pa(), vm_pa2va(), vm_check_access_rights(), vm_set_ctx() replacing their tee_mmu_*() counterpart.
Acked-by: Joakim Bech <joakim.bech@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 82061b8d | 01-Sep-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: store TA params in session struct
Stores TA params and error origin in struct tee_ta_session instead of passing them as parameters to enter_open_session() and enter_invoke_cmd() in struct ts_o
core: store TA params in session struct
Stores TA params and error origin in struct tee_ta_session instead of passing them as parameters to enter_open_session() and enter_invoke_cmd() in struct ts_ops. This makes struct ts_ops less TA specific.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ce332a51 | 01-Sep-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add is_ta_ctx()
Adds is_ta_ctx() and calls it in to_ta_session() and to_ta_ctx() to help debugging.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <
core: add is_ta_ctx()
Adds is_ta_ctx() and calls it in to_ta_session() and to_ta_ctx() to help debugging.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|