drivers: tee: optee: Introducing OP-TEE driver implementation

This includes the TEE driver api implementation for OP-TEE.
It provides an interface to the OP-TEE TrustZone from the Normal space
to start sessions and request functions of the TA.

- targets ARM and ARM64;
- use SMC to connect to OP-TEE;
- accepts requests on privileged and unprivileged device.

Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
This commit is contained in:
Oleksii Moisieiev 2023-06-09 10:27:15 +03:00 committed by Anas Nashif
parent e1a66760b2
commit eb0b341ba6
5 changed files with 1298 additions and 0 deletions

View file

@ -1,5 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
add_subdirectory_ifdef(CONFIG_OPTEE optee)
if (CONFIG_TEE)
zephyr_library()
zephyr_library_sources(tee.c)

View file

@ -13,4 +13,6 @@ module-str = tee
comment "Device Drivers"
source "drivers/tee/optee/Kconfig"
endif # TEE

View file

@ -0,0 +1,6 @@
# Copyright (c) 2023 EPAM Systems
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(optee.c)

21
drivers/tee/optee/Kconfig Normal file
View file

@ -0,0 +1,21 @@
# Copyright (c) 2023 EPAM Systems
# SPDX-License-Identifier: Apache-2.0
config OPTEE
bool "OP-TEE driver"
depends on (ARM64 && ARMV8_A_NS && HAS_ARM_SMCCC) || ZTEST
help
This implements support of the OP-TEE firmware which is loaded
as BL32 image. OP-TEE is a Trust Zone OS which implements mechanisms
of the hardware isolation and rely to ARM TrustZone technology.
Driver requests functions from the OP-TEE and implements RPC mechanism
needed by OP-TEE to run services. See https://www.op-tee.org for more
information.
config OPTEE_MAX_NOTIF
int "Max number of OP-TEE notifications"
depends on OPTEE
default 255
help
Sets the maximum notifications from OP-TEE to the Normal World. OP-TEE using
this mechanism for the synchronization.

1267
drivers/tee/optee/optee.c Normal file

File diff suppressed because it is too large Load diff