Open soloicesky opened 1 year ago
i have the same problem with it, when i allocate DMA memory, it always declared can't create mobj, and i search the source of this problem which is caused by shm->pages == NULL, i don't know why this happen after the optee_shm_register is called. @jenswi-linaro
您好,你的邮件已收到,我会尽快回复你。 best regards zaixing_liu
OPTEE OS: v3.12 linux tee driver: Tag - optee v3.12 Hi, I was trying to enable dynamic shared memory in OP-TEE OS and use the API thread_rpc_alloc_global_payload to allocate shared memory for DMA usage, but I failed. After tracking the code, I found that the pages and page_num in the shared memory object were null, which led to the failure. See the details below:
After reviewing the
tee_shm_alloc
andpool_op_alloc
, and found out that the 'pages' and 'num_pages' haven't been set, see below: tee_shm.cQ1, When will the
shm->pages
be assigned? And, it will be freed in thetee_shm_release
->release_registered_pages
. Q2, Can the memory allocated by this APIthread_rpc_alloc_global_payload
is suitable for DMA usage?