BACKPORT: tee: optee: add page list manipulation functions

These functions will be used to pass information about shared
buffers to OP-TEE. ABI between Linux and OP-TEE is defined
in optee_msg.h and optee_smc.h.

optee_msg.h defines OPTEE_MSG_ATTR_NONCONTIG attribute
for shared memory references and describes how such references
should be passed. Note that it uses 64-bit page addresses even
on 32 bit systems. This is done to support LPAE and to unify
interface.

Change-Id: I9285315d48979e75c54021163f3e8c7a2772db55
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
[jw: replacing uint64_t with u64 in optee_fill_pages_list()]
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 3bb48ba5cd60f9685aa8f1ccd9b14a72e237c13f)
Signed-off-by: Victor Chong <victor.chong@linaro.org>
2 files changed