Skip to content

Commit 967c9cc

Browse files
committed
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<[email protected]> and Emmanuel MICHEL <[email protected]> * "Generic TrustZone Driver" by Javier González <[email protected]> Acked-by: Andreas Dannenberg <[email protected]> Tested-by: Jerome Forissier <[email protected]> (HiKey) Tested-by: Volodymyr Babchuk <[email protected]> (RCAR H3) Tested-by: Scott Branden <[email protected]> Reviewed-by: Javier González <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
1 parent c8bfafb commit 967c9cc

File tree

12 files changed

+2182
-0
lines changed

12 files changed

+2182
-0
lines changed

Documentation/ioctl/ioctl-number.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ Code Seq#(hex) Include File Comments
308308
0xA3 80-8F Port ACL in development:
309309
310310
0xA3 90-9F linux/dtlk.h
311+
0xA4 00-1F uapi/linux/tee.h Generic TEE subsystem
311312
0xAA 00-3F linux/uapi/linux/userfaultfd.h
312313
0xAB 00-1F linux/nbd.h
313314
0xAC 00-1F linux/raw.h

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11086,6 +11086,13 @@ F: drivers/hwtracing/stm/
1108611086
F: include/linux/stm.h
1108711087
F: include/uapi/linux/stm.h
1108811088

11089+
TEE SUBSYSTEM
11090+
M: Jens Wiklander <[email protected]>
11091+
S: Maintained
11092+
F: include/linux/tee_drv.h
11093+
F: include/uapi/linux/tee.h
11094+
F: drivers/tee/
11095+
1108911096
THUNDERBOLT DRIVER
1109011097
M: Andreas Noever <[email protected]>
1109111098
S: Maintained

drivers/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,6 @@ source "drivers/fpga/Kconfig"
204204

205205
source "drivers/fsi/Kconfig"
206206

207+
source "drivers/tee/Kconfig"
208+
207209
endmenu

drivers/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,4 @@ obj-$(CONFIG_ANDROID) += android/
177177
obj-$(CONFIG_NVMEM) += nvmem/
178178
obj-$(CONFIG_FPGA) += fpga/
179179
obj-$(CONFIG_FSI) += fsi/
180+
obj-$(CONFIG_TEE) += tee/

drivers/tee/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Generic Trusted Execution Environment Configuration
2+
config TEE
3+
tristate "Trusted Execution Environment support"
4+
select DMA_SHARED_BUFFER
5+
select GENERIC_ALLOCATOR
6+
help
7+
This implements a generic interface towards a Trusted Execution
8+
Environment (TEE).

drivers/tee/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
obj-$(CONFIG_TEE) += tee.o
2+
tee-objs += tee_core.o
3+
tee-objs += tee_shm.o
4+
tee-objs += tee_shm_pool.o

0 commit comments

Comments
 (0)