Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb938966 authored by Jens Wiklander's avatar Jens Wiklander Committed by Victor Chong
Browse files

BACKPORT: tee: generic TEE subsystem



Initial patch for generic TEE subsystem.
This subsystem provides:
* Registration/un-registration of TEE drivers.
* Shared memory between normal world and secure world.
* Ioctl interface for interaction with user space.
* Sysfs implementation_id of TEE driver

A TEE (Trusted Execution Environment) driver is a driver that interfaces
with a trusted OS running in some secure environment, for example,
TrustZone on ARM cpus, or a separate secure co-processor etc.

The TEE subsystem can serve a TEE driver for a Global Platform compliant
TEE, but it's not limited to only Global Platform TEEs.

This patch builds on other similar implementations trying to solve
the same problem:
* "optee_linuxdriver" by among others
  Jean-michel DELORME<jean-michel.delorme@st.com> and
  Emmanuel MICHEL <emmanuel.michel@st.com>
* "Generic TrustZone Driver" by Javier González <javier@javigon.com>

Change-Id: I2336be6189bafb63ca0f49e0a1b16ec75b4514ac
Acked-by: default avatarAndreas Dannenberg <dannenberg@ti.com>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (RCAR H3)
Tested-by: default avatarScott Branden <scott.branden@broadcom.com>
Reviewed-by: default avatarJavier González <javier@javigon.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 967c9cca2cc50569efc65945325c173cecba83bd)
Signed-off-by: default avatarVictor Chong <victor.chong@linaro.org>
parent 56256bbc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -308,6 +308,7 @@ Code Seq#(hex) Include File Comments
0xA3	80-8F	Port ACL		in development:
					<mailto:tlewis@mindspring.com>
0xA3	90-9F	linux/dtlk.h
0xA4	00-1F	uapi/linux/tee.h	Generic TEE subsystem
0xAA	00-3F	linux/uapi/linux/userfaultfd.h
0xAB	00-1F	linux/nbd.h
0xAC	00-1F	linux/raw.h
+7 −0
Original line number Diff line number Diff line
@@ -10655,6 +10655,13 @@ F: drivers/hwtracing/stm/
F:	include/linux/stm.h
F:	include/uapi/linux/stm.h

TEE SUBSYSTEM
M:	Jens Wiklander <jens.wiklander@linaro.org>
S:	Maintained
F:	include/linux/tee_drv.h
F:	include/uapi/linux/tee.h
F:	drivers/tee/

THUNDERBOLT DRIVER
M:	Andreas Noever <andreas.noever@gmail.com>
S:	Maintained
+2 −0
Original line number Diff line number Diff line
@@ -202,4 +202,6 @@ source "drivers/hwtracing/intel_th/Kconfig"

source "drivers/fpga/Kconfig"

source "drivers/tee/Kconfig"

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -174,3 +174,4 @@ obj-$(CONFIG_STM) += hwtracing/stm/
obj-$(CONFIG_ANDROID)		+= android/
obj-$(CONFIG_NVMEM)		+= nvmem/
obj-$(CONFIG_FPGA)		+= fpga/
obj-$(CONFIG_TEE)		+= tee/

drivers/tee/Kconfig

0 → 100644
+8 −0
Original line number Diff line number Diff line
# Generic Trusted Execution Environment Configuration
config TEE
	tristate "Trusted Execution Environment support"
	select DMA_SHARED_BUFFER
	select GENERIC_ALLOCATOR
	help
	  This implements a generic interface towards a Trusted Execution
	  Environment (TEE).
Loading