Hi @jenswi-linaro ,
We've faced an issue with tee_shm_alloc kernel API when migrating from optee 3.7 to 3.10.
Our driver was using a shared memory allocated as follow:
shm = tee_shm_alloc(ctx,size,TEE_SHM_MAPPED);
which was used in parameter of tee_client_invoke_func:
param[1].attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;
param[1].u.memref.shm_offs = offset;
param[1].u.memref.size = size;
param[1].u.memref.shm = shm;
but it seems that it is no more possible with optee 3.10 and we have to allocate shared memory with TEE_SHM_DMA_BUF flag.
without doing that set_tmem_param return TEE_ERROR_BAD_PARAMETERS because our buffer is not in the contiguous shared memory (or OPTEE static shared memory).
However tee_shm_alloc will allocate into the dynamic shared memory area without the OPTEE_MSG_ATTR_NONCONTIG attribute.
Could you tell me if it is a restriction or not ?
Best regards,
Olivier
Hi @jenswi-linaro ,
We've faced an issue with
tee_shm_allockernel API when migrating from optee 3.7 to 3.10.Our driver was using a shared memory allocated as follow:
shm = tee_shm_alloc(ctx,size,TEE_SHM_MAPPED);which was used in parameter of
tee_client_invoke_func:param[1].attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT;param[1].u.memref.shm_offs = offset;param[1].u.memref.size = size;param[1].u.memref.shm = shm;but it seems that it is no more possible with optee 3.10 and we have to allocate shared memory with TEE_SHM_DMA_BUF flag.
without doing that
set_tmem_paramreturn TEE_ERROR_BAD_PARAMETERS because our buffer is not in the contiguous shared memory (or OPTEE static shared memory).However
tee_shm_allocwill allocate into the dynamic shared memory area without the OPTEE_MSG_ATTR_NONCONTIG attribute.Could you tell me if it is a restriction or not ?
Best regards,
Olivier