~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/driver-api/tee.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GPL-2.0
  2 
  3 ===============================================
  4 TEE (Trusted Execution Environment) driver API
  5 ===============================================
  6 
  7 Kernel provides a TEE bus infrastructure where a Trusted Application is
  8 represented as a device identified via Universally Unique Identifier (UUID) and
  9 client drivers register a table of supported device UUIDs.
 10 
 11 TEE bus infrastructure registers following APIs:
 12 
 13 match():
 14   iterates over the client driver UUID table to find a corresponding
 15   match for device UUID. If a match is found, then this particular device is
 16   probed via corresponding probe API registered by the client driver. This
 17   process happens whenever a device or a client driver is registered with TEE
 18   bus.
 19 
 20 uevent():
 21   notifies user-space (udev) whenever a new device is registered on
 22   TEE bus for auto-loading of modularized client drivers.
 23 
 24 TEE bus device enumeration is specific to underlying TEE implementation, so it
 25 is left open for TEE drivers to provide corresponding implementation.
 26 
 27 Then TEE client driver can talk to a matched Trusted Application using APIs
 28 listed in include/linux/tee_drv.h.
 29 
 30 TEE client driver example
 31 -------------------------
 32 
 33 Suppose a TEE client driver needs to communicate with a Trusted Application
 34 having UUID: ``ac6a4085-0e82-4c33-bf98-8eb8e118b6c2``, so driver registration
 35 snippet would look like::
 36 
 37         static const struct tee_client_device_id client_id_table[] = {
 38                 {UUID_INIT(0xac6a4085, 0x0e82, 0x4c33,
 39                            0xbf, 0x98, 0x8e, 0xb8, 0xe1, 0x18, 0xb6, 0xc2)},
 40                 {}
 41         };
 42 
 43         MODULE_DEVICE_TABLE(tee, client_id_table);
 44 
 45         static struct tee_client_driver client_driver = {
 46                 .id_table       = client_id_table,
 47                 .driver         = {
 48                         .name           = DRIVER_NAME,
 49                         .bus            = &tee_bus_type,
 50                         .probe          = client_probe,
 51                         .remove         = client_remove,
 52                 },
 53         };
 54 
 55         static int __init client_init(void)
 56         {
 57                 return driver_register(&client_driver.driver);
 58         }
 59 
 60         static void __exit client_exit(void)
 61         {
 62                 driver_unregister(&client_driver.driver);
 63         }
 64 
 65         module_init(client_init);
 66         module_exit(client_exit);

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php