process_one_request()c
| 2024-12-1
本文字數 131閱讀時長 1 分鐘
  • process_one_request()
    • read_request()
      • Issue TEE_IOC_SUPPL_RECV ioctl to receive the TEE supplicant request from OP-TEE.
      • This will be blocked until TEE supplicant request is received.
    • Spawn a new thread to process for the new request: thread_main()
    • The original thread will continue to handle the TEE supplicant request from OP-TEE:
      • If RPC command:
        • OPTEE_MSG_RPC_CMD_LOAD_TA:
          • Call load_ta() to load the TA according to the UUID.
            • load_ta() will call TEECI_LoadSecureModule() to load the TA.
              • TEECI_LoadSecureModule() will call fopen(), ftell() to open TA and get the size of TA.
              • If the buffer size (ta_size) is not enough to hold the TA, return the required size to let the caller increase the buffer size and try again.
              • Otherwise, call fread() to read TA and save it to the buffer.
      • Call write_response() to send the TEE supplicant response to OP-TEE.
Loading...
目錄