firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface
authorMaximilian Luz <luzmaximilian@gmail.com>
Sun, 27 Aug 2023 21:14:05 +0000 (23:14 +0200)
committerBjorn Andersson <andersson@kernel.org>
Wed, 13 Sep 2023 17:18:42 +0000 (10:18 -0700)
commit00b1248606ba3979ccae30ed11df8cdc1a84245a
tree09f4213968597cb56941745d62bbf525850d5acc
parente4c89f9380017b6b2e63836e2de1af8eb4535384
firmware: qcom_scm: Add support for Qualcomm Secure Execution Environment SCM interface

Add support for SCM calls to Secure OS and the Secure Execution
Environment (SEE) residing in the TrustZone (TZ) via the QSEECOM
interface. This allows communication with Secure/TZ applications, for
example 'uefisecapp' managing access to UEFI variables.

For better separation, make qcom_scm spin up a dedicated child
(platform) device in case QSEECOM support has been detected. The
corresponding driver for this device is then responsible for managing
any QSEECOM clients. Specifically, this driver attempts to automatically
detect known and supported applications, creating a client (auxiliary)
device for each one. The respective client/auxiliary driver is then
responsible for managing and communicating with the application.

While this patch introduces only a very basic interface without the more
advanced features (such as re-entrant and blocking SCM calls and
listeners/callbacks), this is enough to talk to the aforementioned
'uefisecapp'.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230827211408.689076-3-luzmaximilian@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
MAINTAINERS
drivers/firmware/Kconfig
drivers/firmware/Makefile
drivers/firmware/qcom_qseecom.c [new file with mode: 0644]
drivers/firmware/qcom_scm.c
include/linux/firmware/qcom/qcom_qseecom.h [new file with mode: 0644]
include/linux/firmware/qcom/qcom_scm.h