nuttx/drivers/misc
Theodore Karatapanis 707cdaf42e drivers/misc/optee: Expanded RPC support.
This commit expands RPC support for the OP-TEE driver using 2 files:
1) drivers/misc/optee_rpc.c
   * Add support for RPCs that can be handled directly by the kernel.
   * Can delegate RPC handling to optee_supplicant.c for RPCs that
     need userspace interaction.
2) drivers/misc/optee_supplicant.c
   * Enable communication between the userspace TEE supplicant and the
     kernel driver.

Additional changes were needed to the following files:
1) drivers/misc/optee.c
   * Add ioctls used SOLELY by the userspace TEE supplicant.
   * Register /dev/teepriv0 if the supplicant is enabled in Kconfig
   * Add OPTEE_ROLE_CA and OPTEE_ROLE_SUPPLICANT conditionals to
     differentiate paths, between a normal Client Application (CA)
     and the TEE supplicant.
   * Change some functions from static to "public" to reuse them
     in other C files.
   * Adjust optee_to/from_msg_param() to work with RPCs.

2) drivers/misc/optee_smc.c
   * Call the RPC handler from optee_rpc.c

3) drivers/misc/optee_msg.h
   * Add definition needed for RPCs

4) drivers/misc/tee.h
   * Add ioctl definitions
   * Add TEE_SHM_SUPP flag, checked when unregistering supplicant
     memory.

5) Documentation/guides/optee.rs
   * Add documentation for RPCs and the supplicant.

6) drivers/misc/{CMakeLists.txt, Make.defs}
   * Account for the new files.

7) drivers/misc/Kconfig
   * Add DEV_OPTEE_SUPPLICANT option to enable/disable the supplicant
     driver.

Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
2025-08-06 02:29:33 +08:00
..
addrenv.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
CMakeLists.txt drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
dev_ascii.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_mem.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
dev_null.c drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
dev_zero.c drivers/iovec: revert vector io implement from loop/null/zero driver 2025-01-22 11:29:39 +08:00
goldfish_pipe.c fs/drivers: Avoid causing a busy loop in the program due to context switching induced by sem_post. 2025-03-17 10:44:26 +01:00
Kconfig drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
lwl_console.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
Make.defs drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
mkrd.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
optee.c drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee.h drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee_msg.h drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee_rpc.c drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee_rpc.h drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee_smc.c drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee_smc.h drivers/misc/optee: Add SMC backend for arm archs 2025-05-09 10:29:26 +08:00
optee_socket.c drivers/misc/optee.c: Add shm registration support 2025-05-09 10:29:26 +08:00
optee_supplicant.c drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
optee_supplicant.h drivers/misc/optee: Expanded RPC support. 2025-08-06 02:29:33 +08:00
ramdisk.c drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgblk.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rpmsgblk.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgblk_server.c drivers/rpmsgblk_server: fix the syslog format warning 2025-03-03 07:37:13 +08:00
rpmsgdev.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
rpmsgdev.h drivers: migrate to SPDX identifier 2024-11-06 18:02:25 +08:00
rpmsgdev_server.c drivers/misc: fix rpmsg dev poll assert crash 2024-11-12 14:58:53 +08:00
rwbuffer.c bch: add BIOC_DISCARD ioctl that discards cached sector 2025-01-23 02:35:46 +08:00