Lines Matching refs:shadow_buffer
237 if (shm->shadow_buffer) in teec_pre_process_tmpref()
238 memcpy(shm->shadow_buffer, tmpref->buffer, in teec_pre_process_tmpref()
272 if (shm->shadow_buffer && (flags & TEEC_MEM_INPUT)) in teec_pre_process_whole()
273 memcpy(shm->shadow_buffer, shm->buffer, shm->size); in teec_pre_process_whole()
319 if (shm->shadow_buffer && param_type != TEEC_MEMREF_PARTIAL_OUTPUT) in teec_pre_process_partial()
320 memcpy((char *)shm->shadow_buffer + memref->offset, in teec_pre_process_partial()
403 if (tmpref->buffer && shm->shadow_buffer) in teec_post_process_tmpref()
404 memcpy(tmpref->buffer, shm->shadow_buffer, in teec_post_process_tmpref()
423 if (shm->shadow_buffer && MEMREF_SIZE(param) <= shm->size) in teec_post_process_whole()
424 memcpy(shm->buffer, shm->shadow_buffer, in teec_post_process_whole()
443 if (shm->shadow_buffer && MEMREF_SIZE(param) <= memref->size) in teec_post_process_partial()
445 (char *)shm->shadow_buffer + memref->offset, in teec_post_process_partial()
798 shm->shadow_buffer = NULL; in TEEC_RegisterSharedMemory()
812 shm->shadow_buffer = teec_paged_aligned_alloc(s); in TEEC_RegisterSharedMemory()
813 if (!shm->shadow_buffer) in TEEC_RegisterSharedMemory()
815 fd = teec_shm_register(ctx->fd, shm->shadow_buffer, s, in TEEC_RegisterSharedMemory()
827 free(shm->shadow_buffer); in TEEC_RegisterSharedMemory()
828 shm->shadow_buffer = NULL; in TEEC_RegisterSharedMemory()
835 shm->shadow_buffer = mmap(NULL, s, PROT_READ | PROT_WRITE, in TEEC_RegisterSharedMemory()
838 if (shm->shadow_buffer == (void *)MAP_FAILED) { in TEEC_RegisterSharedMemory()
872 shm->shadow_buffer = NULL; in TEEC_RegisterSharedMemoryFileDescriptor()
921 shm->shadow_buffer = NULL; in TEEC_AllocateSharedMemory()
932 if (shm->shadow_buffer) { in TEEC_ReleaseSharedMemory()
936 free(shm->shadow_buffer); in TEEC_ReleaseSharedMemory()
939 munmap(shm->shadow_buffer, shm->alloced_size); in TEEC_ReleaseSharedMemory()
954 shm->shadow_buffer = NULL; in TEEC_ReleaseSharedMemory()