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

tee: shm: add accessors for buffer size and page offset

These two function will be needed for shared memory registration in OP-TEE
Signed-off-by: NVolodymyr Babchuk <vlad.babchuk@gmail.com>
Signed-off-by: NJens Wiklander <jens.wiklander@linaro.org>
上级 033ddf12
......@@ -393,6 +393,26 @@ void *tee_shm_get_va(struct tee_shm *shm, size_t offs);
*/
int tee_shm_get_pa(struct tee_shm *shm, size_t offs, phys_addr_t *pa);
/**
* tee_shm_get_size() - Get size of shared memory buffer
* @shm: Shared memory handle
* @returns size of shared memory
*/
static inline size_t tee_shm_get_size(struct tee_shm *shm)
{
return shm->size;
}
/**
* tee_shm_get_page_offset() - Get shared buffer offset from page start
* @shm: Shared memory handle
* @returns page offset of shared buffer
*/
static inline size_t tee_shm_get_page_offset(struct tee_shm *shm)
{
return shm->offset;
}
/**
* tee_shm_get_id() - Get id of a shared memory object
* @shm: Shared memory handle
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册