| 9bee8f2a | 21-Jul-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add generic rpc shared memory buffer caching
Replaces tee_fs_rpc_cache_alloc() with thread_rpc_shm_alloc() which also takes a shared memory type as argument. This allows allocating an kernel p
core: add generic rpc shared memory buffer caching
Replaces tee_fs_rpc_cache_alloc() with thread_rpc_shm_alloc() which also takes a shared memory type as argument. This allows allocating an kernel private RPC buffer when needed.
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a9d0e06f | 21-Jul-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: ff-a: add dummy thread_rpc_{alloc,free}_global_payload()
OP-TEE doesn't support "global" shm allocations with FF-A yet. Provide dummy implementations of the functions to simplify configur
core: arm: ff-a: add dummy thread_rpc_{alloc,free}_global_payload()
OP-TEE doesn't support "global" shm allocations with FF-A yet. Provide dummy implementations of the functions to simplify configuration.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ddfb578c | 15-Jun-2020 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: arm: allocate kernel payload
Request shared memory allocation of TYPE_KERNEL memory
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io
core: arm: allocate kernel payload
Request shared memory allocation of TYPE_KERNEL memory
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> [jw: add spmc counter part] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1b302ac0 | 02-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: enable FF-A with SPM Core at S-EL1
Adds support for using FF-A as transport instead of using the proprietary SMCs defined in optee_smc.h.
The configuration support the case where SPM Core is
core: enable FF-A with SPM Core at S-EL1
Adds support for using FF-A as transport instead of using the proprietary SMCs defined in optee_smc.h.
The configuration support the case where SPM Core is implementation at S-EL1, that is, inside OP-TEE. This configuration is also know as "S-EL1 SPMC" in the FF-A 1.0 specification [1].
Compile with CFG_CORE_SEL1_SPMC=y
Note that this is an experimental feature, ABIs etc may have incompatible changes
Link: [1] https://static.docs.arm.com/den0077/a/DEN0077A_PSA_Firmware_Framework_Arm_v8-A_1.0_EAC.pdf
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b0490ed1 | 02-Jun-2020 |
Achin Gupta <achin.gupta@arm.com> |
plat-vexpress: spci: add support to register secondary CPU entrypoints using PSCI_CPU_ON
This patch adds support to use the PSCI_CPU_ON function to register the entry point for each OP-TEE context o
plat-vexpress: spci: add support to register secondary CPU entrypoints using PSCI_CPU_ON
This patch adds support to use the PSCI_CPU_ON function to register the entry point for each OP-TEE context on a secondary CPU. This function is invoked on the boot CPU during initialisation. When the physical CPU is turned on by the Normal world, the SPMD in EL3 arranges for the entry point to be invoked to perform OP-TEE initialisation.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Achin Gupta <achin.gupta@arm.com> [jw: small edits + AAarch32 support] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 73e1d3f3 | 02-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add mobj_ffa
Adds a new mobj, mobj_ffa, tailored to handle shared memory registrations over FF-A.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.
core: add mobj_ffa
Adds a new mobj, mobj_ffa, tailored to handle shared memory registrations over FF-A.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c13d4bd7 | 02-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add optee_ffa.h defining the OP-TEE ABI for FF-A
Adds optee_ffa.h which defines the OP-TEE ABI when Arm Platform Security Architecture Firmware Framework for Arm V8-A [1] is used as transport
core: add optee_ffa.h defining the OP-TEE ABI for FF-A
Adds optee_ffa.h which defines the OP-TEE ABI when Arm Platform Security Architecture Firmware Framework for Arm V8-A [1] is used as transport instead of raw proprietary SMCs. This ABI where OP-TEE specific implementation is used to fill the implementation specific gaps in the specification is called OP-TEE FF-A, or sometimes just FF-A.
A new memref type, struct optee_msg_param_fmem, is added to carry information needed to create new shared memory mobjs.
Link: [1] https://static.docs.arm.com/den0077/a/DEN0077A_PSA_Firmware_Framework_Arm_v8-A_1.0_EAC.pdf Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e0e3828a | 02-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add FF-A 1.0 definitions
This patch adds FF-A 1.0 definitions based on [1] and an earlier version of this .h file [2] from TF-A.
Link: [1] https://static.docs.arm.com/den0077/a/DEN0077A_PSA_F
core: add FF-A 1.0 definitions
This patch adds FF-A 1.0 definitions based on [1] and an earlier version of this .h file [2] from TF-A.
Link: [1] https://static.docs.arm.com/den0077/a/DEN0077A_PSA_Firmware_Framework_Arm_v8-A_1.0_EAC.pdf Link: [2] https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/plain/include/services/spci_beta0.h?h=topics/spci_beta0_spmd&id=c5afe561f653449f4fd9df1d50cf70c60fc0d343
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Co-developed-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Achin Gupta <achin.gupta@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fc59f7e5 | 02-Jun-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: psci.h: add PSCI_CPU_ON_SMC64
Adds PSCI_CPU_ON_SMC64 which is using the 64-bit calling convention as a complement to define PSCI_CPU_ON using the 32-bit calling convention.
Acked-by: Etienne
core: psci.h: add PSCI_CPU_ON_SMC64
Adds PSCI_CPU_ON_SMC64 which is using the 64-bit calling convention as a complement to define PSCI_CPU_ON using the 32-bit calling convention.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1d205e25 | 17-Jul-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32_etzpc: rename internal function init_device_from_hw_config()
Fix typo in function label: init_devive_from_hw_config() is renamed init_device_from_hw_config().
Fix also a typo in source file i
stm32_etzpc: rename internal function init_device_from_hw_config()
Fix typo in function label: init_devive_from_hw_config() is renamed init_device_from_hw_config().
Fix also a typo in source file inline comment.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 098883e8 | 17-Jul-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
subdir.mk: clear aflags-remove-y after processing
After processing a sub.mk by subdir.mk also clear aflags-remove-y together with the rest of the variables to clear.
Reviewed-by: Jerome Forissier <
subdir.mk: clear aflags-remove-y after processing
After processing a sub.mk by subdir.mk also clear aflags-remove-y together with the rest of the variables to clear.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 93aade0f | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
core: mempool: use recursive mutex
The mempool code can be simplified by using a recursive mutex.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carri
core: mempool: use recursive mutex
The mempool code can be simplified by using a recursive mutex.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 42fb53ca | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
core: introduce recursive mutexes
Adds support for recursive mutex objects. A recursive mutex may be locked several times by the same thread without causing a deadlock. The implementation is copied
core: introduce recursive mutexes
Adds support for recursive mutex objects. A recursive mutex may be locked several times by the same thread without causing a deadlock. The implementation is copied from the get_pool()/put_pool() functions in lib/libutils/ext/mempool.c, which will be updated to use the new mutex type in a later commit.
In order to avoid the overhead associated with recursive mutexes when not needed, a new struct recursive_mutex is introduced as well as specific functions: mutex_init_recursive(), mutex_destroy_recursive(), mutex_lock_recursive() and mutex_unlock_recursive(). A static initializer is also available (RECURSIVE_MUTEX_INITIALIZER). mutex_get_recursive_lock_depth() returns the current lock depth (only valid to call from the thread holding the lock).
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 64fd5a92 | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
libutils: atomic.h: add atomic_{load,store}_short()
Adds atomic functions operating on the 'short int' type.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <et
libutils: atomic.h: add atomic_{load,store}_short()
Adds atomic functions operating on the 'short int' type.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3f7a0ba3 | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
core: mutex: replace -1 with THREAD_ID_INVALID
Code cleanup: use THREAD_ID_INVALID rather that its value (-1).
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <
core: mutex: replace -1 with THREAD_ID_INVALID
Code cleanup: use THREAD_ID_INVALID rather that its value (-1).
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f86aa9e1 | 09-Jul-2020 |
Jerome Forissier <jerome@forissier.org> |
core: make thread ID a short int
Changes thread_get_id() and thread_get_id_may_fail() to return 'short int' instead of 'int'. That is, 16 bits instead of 32 on all supported architectures which is m
core: make thread ID a short int
Changes thread_get_id() and thread_get_id_may_fail() to return 'short int' instead of 'int'. That is, 16 bits instead of 32 on all supported architectures which is more than enough since the largest thread ID value is (CFG_NUM_THREADS - 1). Note, struct wait_queue_elem::handle is already a short int.
trace_ext_get_thread_id() is not changed (still returns an int) because it is part of the TA API and modifying it would needlessly introduce incompatibilities.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 334316fe | 04-May-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: pkcs11: persistent object support
A persistent object (token object in PKCS#11 spec) is stored as a binary blob of attribute list identified by a UUID.
The persistent database stores the UUIDs
ta: pkcs11: persistent object support
A persistent object (token object in PKCS#11 spec) is stored as a binary blob of attribute list identified by a UUID.
The persistent database stores the UUIDs of the persistent objects of the token.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b56b3d07 | 04-May-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: pkcs11: support command to import and destroy object
Implement commands PKCS11_CMD_CREATE_OBJECT and PKCS11_CMD_DESTROY_OBJECT.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-
ta: pkcs11: support command to import and destroy object
Implement commands PKCS11_CMD_CREATE_OBJECT and PKCS11_CMD_DESTROY_OBJECT.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 63f89caa | 04-May-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: pkcs11: attribute helper functions
* Helper functions for object attributes management. * Helper functions to safely parse client attributes template to create a list of attributes for a objec
ta: pkcs11: attribute helper functions
* Helper functions for object attributes management. * Helper functions to safely parse client attributes template to create a list of attributes for a object in the PKCS11 ta. * Helper functions for assigning or checking object attributes according to PKCS#11 specification. * Add id-to-string conversion for attribute/class/key types. * Helper functions to analyze object attributes.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 55dcd3cc | 30-Apr-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
ta: pkcs11: helper for serial arguments with allocation
Helper functions for serial arguments that expect memory allocation.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Eti
ta: pkcs11: helper for serial arguments with allocation
Helper functions for serial arguments that expect memory allocation.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Co-developed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| bd62f6a3 | 21-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: helper function to serialize object attribute
Helper function to add attributes in serial list of object attributes in PKCS11 TA.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Rev
ta: pkcs11: helper function to serialize object attribute
Helper function to add attributes in serial list of object attributes in PKCS11 TA.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> [jw: change return types to enum pkcs11_rc] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ddf63ac3 | 21-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: add id-to-string conversion for new TA commands
Add missing user authentication commands id-to-string conversion. Add new import/destroy commands id-to-string conversion.
Reviewed-by: R
ta: pkcs11: add id-to-string conversion for new TA commands
Add missing user authentication commands id-to-string conversion. Add new import/destroy commands id-to-string conversion.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| c4524bfd | 21-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: define TA commands for object creation/destruction
Add commands PKCS11_CMD_IMPORT_OBJECT and PKCS11_CMD_DESTROY_OBJECT in enum pkcs11_ta_cmd.
Reviewed-by: Ricardo Salveti <ricardo@found
ta: pkcs11: define TA commands for object creation/destruction
Add commands PKCS11_CMD_IMPORT_OBJECT and PKCS11_CMD_DESTROY_OBJECT in enum pkcs11_ta_cmd.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 30137c73 | 21-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: add vendor mechanism used for object import
Add PKCS11_PROCESSING_IMPORT and PKCS11_CKM_UNDEFINED_ID in enum pkcs11_mechanism_id.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Rev
ta: pkcs11: add vendor mechanism used for object import
Add PKCS11_PROCESSING_IMPORT and PKCS11_CKM_UNDEFINED_ID in enum pkcs11_mechanism_id.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 91e3f627 | 21-Apr-2020 |
Etienne Carriere <etienne.carriere@linaro.org> |
ta: pkcs11: add attributes/class/key type IDs in TA API
Add attributes/class/key type IDs in TA API.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Rouven Czerwinski <r.czerwinski
ta: pkcs11: add attributes/class/key type IDs in TA API
Add attributes/class/key type IDs in TA API.
Reviewed-by: Ricardo Salveti <ricardo@foundries.io> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|