⚠️ The code is based on: https://gitlab.com/riseproject/riscv-optee/optee_os/-/tree/dev-optee-mpxy
Commit ID:
75df9ba41a404aec897399ead0ff0aebcbff48ca
TEEC_InitializeContext()teec_open_dev()- Open
/dev/teeXdevice.
- Open
TEEC_OpenSession()- Call
ioctl()withTEE_IOC_OPEN_SESSIONcommand.- This will eventually trap to Linux Kernel’s
tee_ioctl().
- This will eventually trap to Linux Kernel’s
- Call
TEEC_InvokeCommand()- Call
ioctl()withTEE_IOC_INVOKEcommand. The command ID for TA is passed througharg->func.
- Call
TEEC_CloseSession()- Call
ioctl()withTEE_IOC_CLOSE_SESSIONcommand.
- Call
TEEC_FinalizeContext()- Close
/dev/teeXdevice.
- Close