[lkml]   [2015]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC PATCH 0/2] generic TEE subsystem

This patch set introduces a generic TEE subsystem. The TEE subssytem will be
able contain drivers for various TEE implementations. A TEE (Trusted
Execution Environment) is a trusted OS running in some secure environment,
for example, TrustZone on ARM cpus, or a separate secure co-processor etc.

Regarding use cases, TrustZone has traditionally been used for
offloading secure tasks to the secure world. Examples include banking
applications, Digital Rights Management (DRM), or specific secure

This TEE subsystem can serve a TEE driver for a Global Platform compliant
TEE, but it's not limited to only Global Platform TEEs. One reason why I'm
doing this to be able to get an OP-TEE (
driver upstream.

The first patch brings in the generic TEE subsystem which helps when
writing a driver for a specific TEE, for example, OP-TEE.

The second patch is a mostly stubbed OP-TEE driver which shows briefly how
a specific TEE driver uses the subsystem to register etc.

I've tested this with a more complete OP-TEE driver, but I don't want to
post that yet in the current shape. I will submit a complete OP-TEE driver
when it's ready. Javier is also working on a driver for another TEE so we
will soon have at least two TEE drivers under the TEE subsystem.

* Where should we put this in the tree? I'm proposing drivers/tee and
include/linux/tee here. Another place could be drivers/firmware/tee. I
don't have a strong opinion on either place.

* What should we have in the .compatible field in FDT for the OP-TEE driver?
I'm proposing "optee,optee-tz" as OP-TEE doesn't really have a vendor.
OP-TEE isn't limited to TrustZone, it can run in other environments too so
"optee-tz" could be a way of keeping different options apart. I need
advice here.

* Who will maintain this? I'm willing to do it together with Javier.

This patch set has been prepared in cooperation with Javier González who
proposed "Generic TrustZone Driver in Linux Kernel" patches 28 Nov 2014, . We've since then changed the scope to
TEE instead of TrustZone.

We have discussed the design on (archive at with people from other
companies, including Valentin Manea <>,
Emmanuel MICHEL <>,
Jean-michel DELORME <>,
and Joakim Bech <>. Our main concern has been to
agree on something that is generic enough to support many different
TEEs while still keeping the interface together.


Jens Wiklander (2):
tee: generic TEE subsystem
tee: add OP-TEE driver

Documentation/ioctl/ioctl-number.txt | 1 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/tee/Kconfig | 18 ++
drivers/tee/Makefile | 4 +
drivers/tee/optee/Kconfig | 7 +
drivers/tee/optee/Makefile | 2 +
drivers/tee/optee/core.c | 192 ++++++++++++++++++++
drivers/tee/tee.c | 253 +++++++++++++++++++++++++++
drivers/tee/tee_private.h | 64 +++++++
drivers/tee/tee_shm.c | 330 +++++++++++++++++++++++++++++++++++
drivers/tee/tee_shm_pool.c | 246 ++++++++++++++++++++++++++
include/linux/tee/tee.h | 180 +++++++++++++++++++
include/linux/tee/tee_drv.h | 271 ++++++++++++++++++++++++++++
14 files changed, 1571 insertions(+)
create mode 100644 drivers/tee/Kconfig
create mode 100644 drivers/tee/Makefile
create mode 100644 drivers/tee/optee/Kconfig
create mode 100644 drivers/tee/optee/Makefile
create mode 100644 drivers/tee/optee/core.c
create mode 100644 drivers/tee/tee.c
create mode 100644 drivers/tee/tee_private.h
create mode 100644 drivers/tee/tee_shm.c
create mode 100644 drivers/tee/tee_shm_pool.c
create mode 100644 include/linux/tee/tee.h
create mode 100644 include/linux/tee/tee_drv.h


 \ /
  Last update: 2015-04-17 10:21    [W:0.148 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site