Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: staging/tee.rst: add a section on OP-TEE notifications

Adds a section on notifications used by OP-TEE, synchronous and
asynchronous.

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

+30
+30
Documentation/staging/tee.rst
··· 184 184 application to retrieve a list of Trusted Applications which can be registered 185 185 as devices on the TEE bus. 186 186 187 + OP-TEE notifications 188 + -------------------- 189 + 190 + There are two kinds of notifications that secure world can use to make 191 + normal world aware of some event. 192 + 193 + 1. Synchronous notifications delivered with ``OPTEE_RPC_CMD_NOTIFICATION`` 194 + using the ``OPTEE_RPC_NOTIFICATION_SEND`` parameter. 195 + 2. Asynchronous notifications delivered with a combination of a non-secure 196 + edge-triggered interrupt and a fast call from the non-secure interrupt 197 + handler. 198 + 199 + Synchronous notifications are limited by depending on RPC for delivery, 200 + this is only usable when secure world is entered with a yielding call via 201 + ``OPTEE_SMC_CALL_WITH_ARG``. This excludes such notifications from secure 202 + world interrupt handlers. 203 + 204 + An asynchronous notification is delivered via a non-secure edge-triggered 205 + interrupt to an interrupt handler registered in the OP-TEE driver. The 206 + actual notification value are retrieved with the fast call 207 + ``OPTEE_SMC_GET_ASYNC_NOTIF_VALUE``. Note that one interrupt can represent 208 + multiple notifications. 209 + 210 + One notification value ``OPTEE_SMC_ASYNC_NOTIF_VALUE_DO_BOTTOM_HALF`` has a 211 + special meaning. When this value is received it means that normal world is 212 + supposed to make a yielding call ``OPTEE_MSG_CMD_DO_BOTTOM_HALF``. This 213 + call is done from the thread assisting the interrupt handler. This is a 214 + building block for OP-TEE OS in secure world to implement the top half and 215 + bottom half style of device drivers. 216 + 187 217 AMD-TEE driver 188 218 ============== 189 219