OSDN Git Service

tee: optee: enable dynamic SHM support
authorVolodymyr Babchuk <vlad.babchuk@gmail.com>
Wed, 29 Nov 2017 12:48:36 +0000 (14:48 +0200)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 15 Dec 2017 12:36:17 +0000 (13:36 +0100)
commitf58e236c9d665ad0af99c908de4a9b6f07e74dda
tree582adc8b1612ca8f18a3260155883ad7c78e8ac8
parentabd135ba215c05ca84f9809e6047db25fc28b835
tee: optee: enable dynamic SHM support

Previous patches added various features that are needed for dynamic SHM.
Dynamic SHM allows Normal World to share any buffers with OP-TEE.
While original design suggested to use pre-allocated region (usually of
1M to 2M of size), this new approach allows to use all non-secure RAM for
command buffers, RPC allocations and TA parameters.

This patch checks capability OPTEE_SMC_SEC_CAP_DYNAMIC_SHM. If it was set
by OP-TEE, then kernel part of OP-TEE will use kernel page allocator
to allocate command buffers. Also it will set TEE_GEN_CAP_REG_MEM
capability to tell userspace that it supports shared memory registration.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/optee/core.c