summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-12-22 10:42:19 +0000
committerArnd Bergmann <arnd@arndb.de>2023-12-22 10:42:19 +0000
commit9d0e3c5a3d89bbd77c671a84301c38e0a71bfa14 (patch)
tree73109355b77f7737c971b1972dc25bbfed678645 /include/linux
parent60cc77704eb23558c46a4428792515e48273dde0 (diff)
parent4b391c9c37646f25118355f414b9e6d9fefe782f (diff)
downloadlinux-stable-9d0e3c5a3d89bbd77c671a84301c38e0a71bfa14.tar.gz
linux-stable-9d0e3c5a3d89bbd77c671a84301c38e0a71bfa14.tar.bz2
linux-stable-9d0e3c5a3d89bbd77c671a84301c38e0a71bfa14.zip
Merge tag 'system-thread-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers
OP-TEE add reserved system thread Add support for a reserved system thread in the SMC-ABI of the OP-TEE driver. SCMI with OP-TEE transport uses this to guarantee that it will always have a thread available in the secure world. * tag 'system-thread-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: firmware: arm_scmi: optee: use optee system invocation tee: optee: support tracking system threads tee: system session tee: optee: system thread call property Link: https://lore.kernel.org/r/20231211102600.GA571787@rayden Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tee_drv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
index 17eb1c5205d3..911ddf92dcee 100644
--- a/include/linux/tee_drv.h
+++ b/include/linux/tee_drv.h
@@ -84,6 +84,7 @@ struct tee_param {
* @release: release this open file
* @open_session: open a new session
* @close_session: close a session
+ * @system_session: declare session as a system session
* @invoke_func: invoke a trusted function
* @cancel_req: request cancel of an ongoing invoke or open
* @supp_recv: called for supplicant to get a command
@@ -100,6 +101,7 @@ struct tee_driver_ops {
struct tee_ioctl_open_session_arg *arg,
struct tee_param *param);
int (*close_session)(struct tee_context *ctx, u32 session);
+ int (*system_session)(struct tee_context *ctx, u32 session);
int (*invoke_func)(struct tee_context *ctx,
struct tee_ioctl_invoke_arg *arg,
struct tee_param *param);
@@ -430,6 +432,20 @@ int tee_client_open_session(struct tee_context *ctx,
int tee_client_close_session(struct tee_context *ctx, u32 session);
/**
+ * tee_client_system_session() - Declare session as a system session
+ * @ctx: TEE Context
+ * @session: Session id
+ *
+ * This function requests TEE to provision an entry context ready to use for
+ * that session only. The provisioned entry context is used for command
+ * invocation and session closure, not for command cancelling requests.
+ * TEE releases the provisioned context upon session closure.
+ *
+ * Return < 0 on error else 0 if an entry context has been provisioned.
+ */
+int tee_client_system_session(struct tee_context *ctx, u32 session);
+
+/**
* tee_client_invoke_func() - Invoke a function in a Trusted Application
* @ctx: TEE Context
* @arg: Invoke arguments, see description of