Linux Kernel: OP-TEE Supplicant
2024-11-8
| 2025-1-12
本文字數 165閱讀時長 1 分鐘
type
status
date
slug
summary
tags
category
icon
password
⚠️
The code is based on: https://gitlab.com/riseproject/riscv-optee/linux/-/tree/dev-optee-mpxy Commit ID: df5dc01764820f113312f7a39f221b49985bbd7a
  • TEE supplicant
    • /etc/init.d/S30-tee-supplicant
    • /dev/teepriv0

  • 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.
  • Linux Kernel
  • OP-TEE
  • Linux Kernel: SBI MPXYLinux Kernel: OP-TEE
    Loading...
    目錄