blob: fd5bc7924d7b5ecde85adbffe2881e9a095a308a [file] [log] [blame]
Patrick Williams2194f502022-10-16 14:26:09 -05001From 04f76b1e265b37ab8a3acf4bbf64d1efd69a6c73 Mon Sep 17 00:00:00 2001
Brad Bishopbec4ebc2022-08-03 09:55:16 -04002From: Jens Wiklander <jens.wiklander@linaro.org>
3Date: Thu, 25 Mar 2021 15:08:44 +0100
Patrick Williams2194f502022-10-16 14:26:09 -05004Subject: [PATCH 08/40] tee: add sec_world_id to struct tee_shm
Brad Bishopbec4ebc2022-08-03 09:55:16 -04005
6Adds sec_world_id to struct tee_shm which describes a shared memory
7object. sec_world_id can be used by a driver to store an id assigned by
8secure world.
9
Patrick Williams2194f502022-10-16 14:26:09 -050010Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Brad Bishopbec4ebc2022-08-03 09:55:16 -040011Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Brad Bishopbec4ebc2022-08-03 09:55:16 -040012Upstream-Status: Pending [Not submitted to upstream yet]
Patrick Williams2194f502022-10-16 14:26:09 -050013Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Brad Bishopbec4ebc2022-08-03 09:55:16 -040014---
15 include/linux/tee_drv.h | 7 ++++++-
16 1 file changed, 6 insertions(+), 1 deletion(-)
17
18diff --git a/include/linux/tee_drv.h b/include/linux/tee_drv.h
Patrick Williams2194f502022-10-16 14:26:09 -050019index 38b701b7af4c..5e1533ee3785 100644
Brad Bishopbec4ebc2022-08-03 09:55:16 -040020--- a/include/linux/tee_drv.h
21+++ b/include/linux/tee_drv.h
Patrick Williams2194f502022-10-16 14:26:09 -050022@@ -197,7 +197,11 @@ int tee_session_calc_client_uuid(uuid_t *uuid, u32 connection_method,
Brad Bishopbec4ebc2022-08-03 09:55:16 -040023 * @num_pages: number of locked pages
Patrick Williams2194f502022-10-16 14:26:09 -050024 * @refcount: reference counter
Brad Bishopbec4ebc2022-08-03 09:55:16 -040025 * @flags: defined by TEE_SHM_* in tee_drv.h
26- * @id: unique id of a shared memory object on this device
27+ * @id: unique id of a shared memory object on this device, shared
28+ * with user space
29+ * @sec_world_id:
30+ * secure world assigned id of this shared memory object, not
31+ * used by all drivers
32 *
33 * This pool is only supposed to be accessed directly from the TEE
34 * subsystem and from drivers that implements their own shm pool manager.
Patrick Williams2194f502022-10-16 14:26:09 -050035@@ -213,6 +217,7 @@ struct tee_shm {
36 refcount_t refcount;
Brad Bishopbec4ebc2022-08-03 09:55:16 -040037 u32 flags;
38 int id;
39+ u64 sec_world_id;
40 };
41
42 /**
43--
Patrick Williams2194f502022-10-16 14:26:09 -0500442.34.1
Brad Bishopbec4ebc2022-08-03 09:55:16 -040045