| 52199c35 | 28-May-2022 |
Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> |
core: dt_driver: Add support for disabled devices
In systems where there are multiple instances of the devices like two TRNGs where one is reserved for REE environment and one is for TEE environment
core: dt_driver: Add support for disabled devices
In systems where there are multiple instances of the devices like two TRNGs where one is reserved for REE environment and one is for TEE environment those can be defined in device tree in following way:
ree-trng { status = "okay"; secure-status = "disabled"; ... }
tee-trng { status = "disabled"; secure-status = "okay"; ... }
If OP-TEE has driver enabled for the device both devices will be probed.
Driver can detect device's 'status' and 'secure-status' settings and return TEE_ERROR_NODE_DISABLED value for one that is not for its use.
This will indicate to device driver probing to continue without an error.
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8ea50d3b | 20-Apr-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: new API to support MSG header communication protocol
in the SCMI PTA. Adds a new capability and a new command to the SCMI PTA API to support SCMI MSG header communication protocol.
core: pta: scmi: new API to support MSG header communication protocol
in the SCMI PTA. Adds a new capability and a new command to the SCMI PTA API to support SCMI MSG header communication protocol. Capability PTA_SCMI_CAPS_MSG_HEADER allows client and service to negotiate the desired transport configuration. Command PTA_SCMI_CMD_PROCESS_MSG_CHANNEL allows client to request processing of a message sent based on that message exchange protocol where input and output SCMI messages are exchange using OP-TEE shared memory references provided by the client.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ede83d72 | 02-May-2022 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutee: fix value of TEE_ECC_CURVE_SM2
The GlobalPlatform TEE Interbal Core API specification v1.3 has the following text:
In TEE Internal Core API v1.2 and v1.2.1, TEE_ECC_CURVE_25519 and TEE_E
libutee: fix value of TEE_ECC_CURVE_SM2
The GlobalPlatform TEE Interbal Core API specification v1.3 has the following text:
In TEE Internal Core API v1.2 and v1.2.1, TEE_ECC_CURVE_25519 and TEE_ECC_CURVE_SM2 were incorrectly assigned the same identifier.
Indeed, both were 0x00000300. In v1.3, TEE_ECC_CURVE_SM2 is now 0x00000400. Update the code accordingly.
This is an API and ABI change, but note that this value is used only in TEE_IsAlgorithmSupported(). Therefore, only TAs that dynamically check for algorithm support at runtime may be impacted. This change was tested on QEMUv8 by running "old" TAs (built without this commit) with a "newer" OP-TEE OS (including this commit), that is: - 'make run' and run 'xtest' - apply this change - 'make arm-tf && make run-only' and run 'xtest' again. No errors.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5cc08985 | 29-Apr-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: arm64: add read_dczid_el0()
Adds read_dczid_el0() to read Data Cache Zero ID register.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wikla
libutee: arm64: add read_dczid_el0()
Adds read_dczid_el0() to read Data Cache Zero ID register.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d783b681 | 19-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: dt_driver: drivers to test probe deferral
Implements driver providers for some emulated resource (clocks and reset controllers), consumer drivers and a embedded test DTSI file to test the DT_D
core: dt_driver: drivers to test probe deferral
Implements driver providers for some emulated resource (clocks and reset controllers), consumer drivers and a embedded test DTSI file to test the DT_DRIVER probe sequence.
The driver consumer run few tests and logs results locally. The result participates in core self test result reported by the PTA test interface.
One can test with vexpress platform flavor qemu_virt and qemu_v8 using, for example, the build instruction below: make PLATFORM=vexpress-qemu_virt \ CFG_DT_DRIVER_EMBEDDED_TEST=y \ CFG_EMBED_DTB_SOURCE_FILE=embedded_dtb_test.dts
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7e05ec25 | 27-Oct-2021 |
Jerome Forissier <jerome@forissier.org> |
core: pta: add remote attestation PTA
Add a PTA to perform remote attestation of user space TAs and TEE core memory. Enabled with CFG_ATTESTATION_PTA=y. Four commands are defined:
- PTA_ATTESTATION
core: pta: add remote attestation PTA
Add a PTA to perform remote attestation of user space TAs and TEE core memory. Enabled with CFG_ATTESTATION_PTA=y. Four commands are defined:
- PTA_ATTESTATION_GET_PUBKEY
Returns the public RSA key used to sign the measurements generated by the other commands. The key pair is generated on first call (any command) and saved to secure storage. It is therefore device-specific.
- PTA_ATTESTATION_GET_TA_SHDR_DIGEST
Returns the digest found in the secure header (struct shdr) of a TA or trusted shared library given its UUID.
- PTA_ATTESTATION_HASH_TA_MEMORY
This command must be called by a user space TA (not a CA). It computes a hash of the memory pages that belong to the caller and contain code or read-only data. This hash is therefore a runtime measurement of the TA execution environment, including shared libraries (if any). It can be used to remotely attest that the device is running untampered TA code.
- PTA_ATTESTATION_HASH_TEE_MEMORY
Returns a hash of the TEE OS core (.text and .rodata sections, less the small part of .text that may be modified at boot). Similar to PTA_ATTESTATION_HASH_TA_MEMORY, the hash is computed each time the command is called, so that the result reflects the actual memory content.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cea1eb0b | 09-Feb-2022 |
Clément Léger <clement.leger@bootlin.com> |
pta: add PTA for RTC
On some systems, when the RTC is secured, there is no way for the normal world to access it. This PTA uses the RTC API to allow a Linux OP-TEE based RTC driver to communicate wi
pta: add PTA for RTC
On some systems, when the RTC is secured, there is no way for the normal world to access it. This PTA uses the RTC API to allow a Linux OP-TEE based RTC driver to communicate with the RTC that is secured.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Clément Léger <clement.leger@bootlin.com>
show more ...
|
| 481a21dd | 02-Nov-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
elf_common: add GNU note types and properties
Add NT_GNU_PROPERTY_TYPE_0 bits and GNU_PROPERTY_AARCH64_FEATURE_1_AND used to tell which CPU features the binary is compatible with.
Signed-off-by: Ru
elf_common: add GNU note types and properties
Add NT_GNU_PROPERTY_TYPE_0 bits and GNU_PROPERTY_AARCH64_FEATURE_1_AND used to tell which CPU features the binary is compatible with.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jerome Forissier <jerome@forissier.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b0e1c5e4 | 13-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: pta: APDU pseudo trusted application
Allow trusted applications and REE clients to send APDU frames to a secure element.
Even though secure elements are usually accessible from serial buses,
core: pta: APDU pseudo trusted application
Allow trusted applications and REE clients to send APDU frames to a secure element.
Even though secure elements are usually accessible from serial buses, when they have been initialized in OP-TEE is possible that the SCP03 secret keys are only available in the Trusted World and therefore APDU requests must be handled in OP-TEE.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ff0c5d42 | 13-Nov-2021 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: crypto: Secure Element cryptographic interface
Extract cryptographic operations specific to Secure Elements from the more generic cryptographic interface.
Also, the Secure Channel Protocol03
core: crypto: Secure Element cryptographic interface
Extract cryptographic operations specific to Secure Elements from the more generic cryptographic interface.
Also, the Secure Channel Protocol03 is a global protocol supported by most SEs and not NXP SE05X specific. Use this commit to reflect this fact.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 492c8e9a | 02-Nov-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
libutee: define error core TEE_ERROR_DEFER_DRIVER_INIT
Define TEE_Result implementation specific error code TEE_ERROR_DEFER_DRIVER_INIT intended to be used when a driver instance fails to initialize
libutee: define error core TEE_ERROR_DEFER_DRIVER_INIT
Define TEE_Result implementation specific error code TEE_ERROR_DEFER_DRIVER_INIT intended to be used when a driver instance fails to initialize because another device driver it depends on is not yet initialized.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b2ac1d0f | 21-May-2021 |
Sergiy Kibrik <Sergiy_Kibrik@epam.com> |
synquacer: rng-pta: move rng_pta_client.h to common path
Header is platform independent and can be used by generic RNG PTA.
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Reviewed-by: Jerome
synquacer: rng-pta: move rng_pta_client.h to common path
Header is platform independent and can be used by generic RNG PTA.
Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fb19e98e | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-E
core: enable FF-A with SPM Core at S-EL2
This enables support for FF-A with SPM Core at S-EL2 in a secure hypervisor while OP-TEE is running at S-EL1 as a SP. This configuration is also know as "S-EL2 SPMC" in the FFA specification.
Compile with CFG_CORE_SEL2_SPMC=y
Note that this is an experimental feature, ABIs etc may have incompatible changes.
This depends on using the FF-A v4 patchset in the Linux kernel.
Reviewed-by: Jelle Sels <jelle.sels@arm.com> Co-developed-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 568fc276 | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
arm64: add read_cntvct()
Adds read_cntvct() to read Counter-timer Virtual Count register.
Note that arm32 already have this function.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-of
arm64: add read_cntvct()
Adds read_cntvct() to read Counter-timer Virtual Count register.
Note that arm32 already have this function.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c6e827c0 | 25-Feb-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
Rename to barrier_read_counter_timer()
Renames barrier_read_cntpct() to barrier_read_counter_timer() to use a neutral name for the counter.
With SPMC at S-EL2 OP-TEE will be virtualized and must us
Rename to barrier_read_counter_timer()
Renames barrier_read_cntpct() to barrier_read_counter_timer() to use a neutral name for the counter.
With SPMC at S-EL2 OP-TEE will be virtualized and must use CNTVCT instead of CNTPCT while the old physical OP-TEE must continue to use CNTPCT.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b0a1c250 | 05-Apr-2021 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: pta: scmi: new interface to REE SCMI agent
Adds a PTA interface to REE SCMI agents to get SCMI message communication channel for processing in OP-TEE SCMI server.
Currently implement supports
core: pta: scmi: new interface to REE SCMI agent
Adds a PTA interface to REE SCMI agents to get SCMI message communication channel for processing in OP-TEE SCMI server.
Currently implement supports for a SCMI server built with CFG_SCMI_MSG_SMT=y. The implementation is made so that an alternate SCMI server implementation can added.
Client gets SCMI channel capabilities with PTA_SCMI_CMD_CAPABILITIES. Client gets a handle for an SCMI channel with command PTA_SCMI_CMD_GET_CHANNEL_HANDLE. Client pushes SCMI messages with command PTA_SCMI_CMD_PROCESS_SMT_CHANNEL or PTA_SCMI_CMD_PROCESS_SMT_CHANNEL_MESSAGE.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c31a368d | 26-Mar-2021 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
libutee: include: fix typo in pta_invoke_tests.h
In PTA "invoke test", the AES performance test command takes as argument key size value as bits instead of bytes. Fix typo in comment.
Signed-off-by
libutee: include: fix typo in pta_invoke_tests.h
In PTA "invoke test", the AES performance test command takes as argument key size value as bits instead of bytes. Fix typo in comment.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| eee637e7 | 10-Feb-2021 |
Alexander Zakharov <uglym8@gmail.com> |
Add 3DES CMAC implementation
CMAC is a Cipher-Based MAC that improves some of the security deficiencies found in CBC-MAC. It is described in NIST SP800-38B as a mode of operation for approved symmet
Add 3DES CMAC implementation
CMAC is a Cipher-Based MAC that improves some of the security deficiencies found in CBC-MAC. It is described in NIST SP800-38B as a mode of operation for approved symmetric block chipers, namely AES and TDEA.
CMAC has similar use cases and security guarantees as HMAC, with the difference that it uses a different primitive (symmetric cipher instead of hash function). CMAC may be appropriate for information systems in which an approved block cipher is more readily available than an approved hash function.
Commonly it is used for symmetric key diversification (ASC X9 TR 31-2018), data integrity assurance (ICV).
CMAC is public domain.
OP-TEE core already supports for AES CMAC, but not TDEA CMAC. This commit adds TDEA CMAC support.
Signed-off-by: Alexander Zakharov <uglym8@gmail.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: wrap commit description at 75 characters] Signed-off-by: Jerome Forissier <jerome@forissier.org>
show more ...
|
| e4ad5ccd | 08-Dec-2020 |
Aleksandr Anisimov <a.anisimov@omprussia.ru> |
libutee: add a new API to interact with plugins from TA
This patch adds a new API to libutee to interact with tee-supplicant plugins from TEE userspace.
Every user TA can use 'tee_invoke_supp_plugi
libutee: add a new API to interact with plugins from TA
This patch adds a new API to libutee to interact with tee-supplicant plugins from TEE userspace.
Every user TA can use 'tee_invoke_supp_plugin()' to send any commands to a plugin. The commands are predefined by the plugin developer.
See the https://github.com/linaro-swg/optee_examples repo for an example of using plugins.
Signed-off-by: Aleksandr Anisimov <a.anisimov@omprussia.ru> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 14d79887 | 08-Jan-2021 |
Igor Opaniuk <igor.opaniuk@gmail.com> |
core: pta: drop SDP PTA
Drop SDP PTA as it is not used anywhere and looks like isn't maintained. When is CFG_SDP_PTA=y the build fails with compile errors:
error: implicit declaration of function ‘
core: pta: drop SDP PTA
Drop SDP PTA as it is not used anywhere and looks like isn't maintained. When is CFG_SDP_PTA=y the build fails with compile errors:
error: implicit declaration of function ‘tee_ta_get_calling_session’; did you mean ‘ts_get_calling_session’? [-Werror=implicit-function-declaration] ... error: ‘struct tee_ta_session’ has no member named ‘ctx’
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 739fd3ab | 15-Dec-2020 |
Jens Wiklander <jens.wiklander@linaro.org> |
libutee: add isb() and barrier_read_cntpct()
Adds isb() and barrier_read_cntpct() to arm_user_sysreg.h, the latter to be used as a helper when reading CNTPCT.
Reviewed-by: Jerome Forissier <jerome@
libutee: add isb() and barrier_read_cntpct()
Adds isb() and barrier_read_cntpct() to arm_user_sysreg.h, the latter to be used as a helper when reading CNTPCT.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| cd0b577e | 07-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee: user_ta_header.h: remove unused struct ta_func_head
struct ta_func_head is unused, remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.
libutee: user_ta_header.h: remove unused struct ta_func_head
struct ta_func_head is unused, remove it.
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 ...
|
| fac28898 | 07-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee: user_ta_header.h: remove unused property strings
user_ta_header.h defines a few macros with property names that are not used anywhere and are not part of any specification. Remove them.
Si
libutee: user_ta_header.h: remove unused property strings
user_ta_header.h defines a few macros with property names that are not used anywhere and are not part of any specification. Remove them.
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 ...
|
| 376db81e | 07-Dec-2020 |
Jerome Forissier <jerome@forissier.org> |
libutee: user_ta_header.h: remove unused enum user_ta_core_service_id
enum user_ta_core_service_id is unused, remove it.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne
libutee: user_ta_header.h: remove unused enum user_ta_core_service_id
enum user_ta_core_service_id is unused, remove it.
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 ...
|
| cb1b1ecd | 25-Aug-2020 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
core: pta: SCP03 pseudo trusted application
Implement GlobalPlatform Secure Channel Protocol 3 control from REE. Secure boot requires that SCP03 is enabled as soon as secure storage is available (ie
core: pta: SCP03 pseudo trusted application
Implement GlobalPlatform Secure Channel Protocol 3 control from REE. Secure boot requires that SCP03 is enabled as soon as secure storage is available (ie RPMB).
Host side example: github.com/foundriesio/optee-scp03
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|