tee: optee: add registered buffers handling into RPC calls
authorVolodymyr Babchuk <vlad.babchuk@gmail.com>
Wed, 29 Nov 2017 12:48:33 +0000 (14:48 +0200)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 15 Dec 2017 12:35:37 +0000 (13:35 +0100)
commit53a107c812de3dd74707458aa751eb457718ff9e
tree82eadb0852fe73f3583854aba6e220d7a68f7298
parent64cf9d8a672e770fed85a65b5c6767fc0aa1473b
tee: optee: add registered buffers handling into RPC calls

With latest changes to OP-TEE we can use any buffers as a shared memory.
Thus, it is possible for supplicant to provide part of own memory
when OP-TEE asks to allocate a shared buffer.

This patch adds support for such feature into RPC handling code.
Now when OP-TEE asks supplicant to allocate shared buffer, supplicant
can use TEE_IOC_SHM_REGISTER to provide such buffer. RPC handler is
aware of this, so it will pass list of allocated pages to OP-TEE.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
[jw: fix parenthesis alignment in free_pages_list()]
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/call.c
drivers/tee/optee/core.c
drivers/tee/optee/optee_private.h
drivers/tee/optee/rpc.c