[PATCH 1/2] tee: define session login identifiers
Etienne Carriere
etienne.carriere at linaro.org
Wed May 12 17:05:36 CEST 2021
TEE header file defines a clnt_login field in struct tee_open_session_arg
but does not define the values expected. This change define identifiers
for the field using a enumerated type. Back end TEE driver is expected to
convert these IDs into IDs meaningful to the TEE.
Signed-off-by: Etienne Carriere <etienne.carriere at linaro.org>
---
include/tee.h | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/include/tee.h b/include/tee.h
index 99367b258e..b8297601b4 100644
--- a/include/tee.h
+++ b/include/tee.h
@@ -31,6 +31,19 @@
#define TEE_PARAM_ATTR_MASK (TEE_PARAM_ATTR_TYPE_MASK | \
TEE_PARAM_ATTR_META)
+/*
+ * Value for tee_open_session_arg::clnt_login
+ */
+enum tee_session_login {
+ TEE_SESSION_LOGIN_PUBLIC = 0,
+ TEE_SESSION_LOGIN_USER,
+ TEE_SESSION_LOGIN_GROUP,
+ TEE_SESSION_LOGIN_APPLICATION,
+ TEE_SESSION_LOGIN_APPLICATION_USER,
+ TEE_SESSION_LOGIN_APPLICATION_GROUP,
+ TEE_SESSION_LOGIN_REE_KERNEL,
+};
+
/*
* Some Global Platform error codes which has a meaning if the
* TEE_GEN_CAP_GP bit is returned by the driver in
@@ -135,8 +148,8 @@ struct tee_param {
/**
* struct tee_open_session_arg - extra arguments for tee_open_session()
* @uuid: [in] UUID of the Trusted Application
- * @clnt_uuid: [in] Normally zeroes
- * @clnt_login: [in] Normally 0
+ * @clnt_uuid: [in] UUID of client, zeroes for PUBLIC/REE_KERNEL
+ * @clnt_login: [in] Class of client TEE_SESSION_LOGIN_*
* @session: [out] Session id
* @ret: [out] return value
* @ret_origin: [out] origin of the return value
@@ -144,7 +157,7 @@ struct tee_param {
struct tee_open_session_arg {
u8 uuid[TEE_UUID_LEN];
u8 clnt_uuid[TEE_UUID_LEN];
- u32 clnt_login;
+ enum tee_session_login clnt_login;
u32 session;
u32 ret;
u32 ret_origin;
--
2.17.1
More information about the U-Boot
mailing list