Skip to content

Commit 85a2a6a

Browse files
author
Hernan Gatta
committed
tee: optee: implement OCALL support
Enable Trusted Applications (TAs) to invoke functions on their corresponding Client Application (CA). The fundamental mechanism is one whereby upon a function invocation from the CA to the TA, OP-TEE returns prematurely from the invocation with an RPC. This RPC is generated after a TA calls the TEEC_InvokeCommand equivalent function in secure world. The RPC carries information describing the OCALL as well as its parameters. When this happens, the driver saves the state of the current call and returns to user-mode. The TEE Client API will have invoked the TEE_IOC_INVOKE IOCTL with a special parameter that carries OCALL information. When the IOCTL returns prematurely, this parameter includes information about what the CA is expected to do on behalf of the TA along with data to be used to reply to the request. The TEE Client API dispatches the request accordingly to the CA proper. Once that is done, the TEE Client API calls the TEE_IOC_INVOKE IOCTL again with the modified OCALL parameter and associated information (such as the result of the OCALL, and the parameters, as requested by the TA). The driver notices that this invocation is in fact a resumption as opposed to a brand-new invocation, and resumes the secure world thread that sent the RPC in the first place. Signed-off-by: Hernan Gatta <[email protected]>
1 parent c0653ba commit 85a2a6a

File tree

10 files changed

+1160
-101
lines changed

10 files changed

+1160
-101
lines changed

drivers/tee/optee/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ obj-$(CONFIG_OPTEE) += optee.o
33
optee-objs += core.o
44
optee-objs += cq.o
55
optee-objs += call.o
6+
optee-objs += ocall.o
67
optee-objs += rpc.o
78
optee-objs += supp.o
89
optee-objs += shm_pool.o

0 commit comments

Comments
 (0)