diff options
author | Volodymyr Babchuk <vlad.babchuk@gmail.com> | 2017-11-29 14:48:33 +0200 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2017-12-15 13:35:37 +0100 |
commit | 53a107c812de3dd74707458aa751eb457718ff9e (patch) | |
tree | 82eadb0852fe73f3583854aba6e220d7a68f7298 /drivers/tee/optee/core.c | |
parent | 64cf9d8a672e770fed85a65b5c6767fc0aa1473b (diff) | |
download | linux-53a107c812de3dd74707458aa751eb457718ff9e.tar.bz2 |
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>
Diffstat (limited to 'drivers/tee/optee/core.c')
-rw-r--r-- | drivers/tee/optee/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 494ad0a23403..ef8e35e4ad88 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -331,6 +331,8 @@ static const struct tee_driver_ops optee_supp_ops = { .release = optee_release, .supp_recv = optee_supp_recv, .supp_send = optee_supp_send, + .shm_register = optee_shm_register_supp, + .shm_unregister = optee_shm_unregister_supp, }; static const struct tee_desc optee_supp_desc = { |