Linux Kernel: TEE
2024-10-12
| 2025-1-12
本文字數 847閱讀時長 3 分鐘
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
  • Kernel provides a TEE bus infrastructure where a Trusted Application is represented as a device identified via Universally Unique Identifier (UUID) and client drivers register a table of supported device UUIDs.




  • tee_init()
    • Call class_register() to register tee_class.
      • Call alloc_chrdev_region() to register a range of char device numbers for TEE devices.
        • 0 ~ TEE_NUM_DEVICES.
      • Call bus_register() to register tee_bus_type.
      • tee_device_register()
        • Call cdev_device_add() to add the TEE character device to the system.
      • tee_open()
        • teedev_open()
        • Assign filp->private_data to the allocated struct tee_context.
      • teedev_open()
        • Allocate struct tee_context for the TEE device.
        • Assign tee_context->teedev to TEE device.
        • Call teedev->desc->ops->open().
      • tee_client_open_context()
        • Call class_find_device() to look up the TEE devices that match with passed in match() (e.g. optee_ctx_match()) under TEE class (tee_class), then call teedev_open() to open the TEE devices.

    • Linux Kernel
    • OP-TEE
    • TEE
    • Linux Kernel: OP-TEEOpenSBI: OP-TEE
      Loading...
      目錄