提交 e0c69ae8 编写于 作者: V Volodymyr Babchuk 提交者: Jens Wiklander

tee: shm: add page accessor functions

In order to register a shared buffer in TEE, we need accessor
function that return list of pages for that buffer.
Signed-off-by: NVolodymyr Babchuk <vlad.babchuk@gmail.com>
Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
上级 b25946ad
...@@ -403,6 +403,19 @@ static inline size_t tee_shm_get_size(struct tee_shm *shm) ...@@ -403,6 +403,19 @@ static inline size_t tee_shm_get_size(struct tee_shm *shm)
return shm->size; return shm->size;
} }
/**
* tee_shm_get_pages() - Get list of pages that hold shared buffer
* @shm: Shared memory handle
* @num_pages: Number of pages will be stored there
* @returns pointer to pages array
*/
static inline struct page **tee_shm_get_pages(struct tee_shm *shm,
size_t *num_pages)
{
*num_pages = shm->num_pages;
return shm->pages;
}
/** /**
* tee_shm_get_page_offset() - Get shared buffer offset from page start * tee_shm_get_page_offset() - Get shared buffer offset from page start
* @shm: Shared memory handle * @shm: Shared memory handle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册