162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci# OP-TEE Trusted Execution Environment Configuration
362306a36Sopenharmony_ciconfig OPTEE
462306a36Sopenharmony_ci	tristate "OP-TEE"
562306a36Sopenharmony_ci	depends on HAVE_ARM_SMCCC
662306a36Sopenharmony_ci	depends on MMU
762306a36Sopenharmony_ci	help
862306a36Sopenharmony_ci	  This implements the OP-TEE Trusted Execution Environment (TEE)
962306a36Sopenharmony_ci	  driver.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciconfig OPTEE_INSECURE_LOAD_IMAGE
1262306a36Sopenharmony_ci	bool "Load OP-TEE image as firmware"
1362306a36Sopenharmony_ci	default n
1462306a36Sopenharmony_ci	depends on OPTEE && ARM64
1562306a36Sopenharmony_ci	help
1662306a36Sopenharmony_ci	  This loads the BL32 image for OP-TEE as firmware when the driver is
1762306a36Sopenharmony_ci	  probed. This returns -EPROBE_DEFER until the firmware is loadable from
1862306a36Sopenharmony_ci	  the filesystem which is determined by checking the system_state until
1962306a36Sopenharmony_ci	  it is in SYSTEM_RUNNING. This also requires enabling the corresponding
2062306a36Sopenharmony_ci	  option in Trusted Firmware for Arm. The documentation there explains
2162306a36Sopenharmony_ci	  the security threat associated with enabling this as well as
2262306a36Sopenharmony_ci	  mitigations at the firmware and platform level.
2362306a36Sopenharmony_ci	  https://trustedfirmware-a.readthedocs.io/en/latest/threat_model/threat_model.html
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci	  Additional documentation on kernel security risks are at
2662306a36Sopenharmony_ci	  Documentation/staging/tee.rst.
27