brintos

brintos / linux-shallow public Read only

0
0
Text · 1.6 KiB · e2368db Raw
40 lines · plain
1.. SPDX-License-Identifier: GPL-2.02.. tee:3 4==================================================5TEE (Trusted Execution Environment) Userspace API6==================================================7 8include/uapi/linux/tee.h defines the generic interface to a TEE.9 10User space (the client) connects to the driver by opening /dev/tee[0-9]* or11/dev/teepriv[0-9]*.12 13- TEE_IOC_SHM_ALLOC allocates shared memory and returns a file descriptor14  which user space can mmap. When user space doesn't need the file15  descriptor any more, it should be closed. When shared memory isn't needed16  any longer it should be unmapped with munmap() to allow the reuse of17  memory.18 19- TEE_IOC_VERSION lets user space know which TEE this driver handles and20  its capabilities.21 22- TEE_IOC_OPEN_SESSION opens a new session to a Trusted Application.23 24- TEE_IOC_INVOKE invokes a function in a Trusted Application.25 26- TEE_IOC_CANCEL may cancel an ongoing TEE_IOC_OPEN_SESSION or TEE_IOC_INVOKE.27 28- TEE_IOC_CLOSE_SESSION closes a session to a Trusted Application.29 30There are two classes of clients, normal clients and supplicants. The latter is31a helper process for the TEE to access resources in Linux, for example file32system access. A normal client opens /dev/tee[0-9]* and a supplicant opens33/dev/teepriv[0-9].34 35Much of the communication between clients and the TEE is opaque to the36driver. The main job for the driver is to receive requests from the37clients, forward them to the TEE and send back the results. In the case of38supplicants the communication goes in the other direction, the TEE sends39requests to the supplicant which then sends back the result.40