⚠️ The code is based on: https://gitlab.com/riseproject/riscv-optee/optee_os/-/tree/dev-optee-mpxy
Commit ID:
75df9ba41a404aec897399ead0ff0aebcbff48ca

-
ree_fs_ta_open()- Call
rpc_load()to request TA from tee-supplicant. - Validate the loaded TA.
- Call
-
rpc_load()- Call
thread_rpc_cmd()withOPTEE_RPC_CMD_LOAD_TARPC command withoutstruct thread_param_memrefparameter to request the size of TA.OPTEE_RPC_CMD_LOAD_TARPC command is saved tostruct optee_msg_arg.cmd.struct optee_msg_argis stored in the shared memory shared with the untrusted domain.
- Call
thread_rpc_alloc_payload() to allocate data for TA.- Call
thread_rpc_alloc()to allocate shared memory for TA.- Call
thread_rpc()withrpc_args(rv[THREAD_RPC_NUM_ARGS]).rpc_args’s first element is set toOPTEE_ABI_RETURN_RPC_CMDfunction. The RPC command is set toOPTEE_RPC_CMD_SHM_ALLOCto allocate the shared memory for TA.
- Call
- Call
- Call
thread_rpc_cmd()withOPTEE_RPC_CMD_LOAD_TARPC command again withstruct thread_param_memref parameterto load TA.
- Call