Lines Matching refs:shms

99                          struct shm* shms) {  in hwaes_map_shm()  argument
129 shms[i].base = mmap(0, shm_descs[i].size, mmap_prot, 0, handles[i], 0); in hwaes_map_shm()
130 if (shms[i].base == MAP_FAILED) { in hwaes_map_shm()
134 shms[i].size = shm_descs[i].size; in hwaes_map_shm()
135 shms[i].mmap_prot = mmap_prot; in hwaes_map_shm()
146 static void hwaes_unmap_shm(size_t num, struct shm* shms) { in hwaes_unmap_shm() argument
148 if (shms[i].size) { in hwaes_unmap_shm()
149 munmap(shms[i].base, shms[i].size); in hwaes_unmap_shm()
169 struct shm* shms, in hwaes_set_arg_out() argument
193 int shm_mmap_prot = shms[data_desc_ptr->shm_idx].mmap_prot; in hwaes_set_arg_out()
204 if (shms[data_desc_ptr->shm_idx].size < end_offset) { in hwaes_set_arg_out()
209 shms[data_desc_ptr->shm_idx].base + data_desc_ptr->offset; in hwaes_set_arg_out()
245 struct shm* shms, in hwaes_set_arg_in() argument
253 rc = hwaes_set_arg_out(data_desc_ptr, mmap_prot, shms, num_shms, buf_start, in hwaes_set_arg_in()
281 struct shm shms[HWAES_MAX_NUM_HANDLES] = {0}; in hwaes_handle_aes_cmd() local
317 rc = hwaes_map_shm(num_handles, shm_handles, shm_descs, shms); in hwaes_handle_aes_cmd()
334 rc = hwaes_set_arg_in(&cmd_header->key, PROT_READ, shms, num_handles, in hwaes_handle_aes_cmd()
342 rc = hwaes_set_arg_in(&cmd_header->iv, PROT_READ, shms, num_handles, in hwaes_handle_aes_cmd()
350 rc = hwaes_set_arg_in(&cmd_header->aad, PROT_READ, shms, num_handles, in hwaes_handle_aes_cmd()
358 rc = hwaes_set_arg_in(&cmd_header->text_in, PROT_READ, shms, num_handles, in hwaes_handle_aes_cmd()
367 rc = hwaes_set_arg_in(&cmd_header->tag_in, PROT_READ, shms, num_handles, in hwaes_handle_aes_cmd()
375 rc = hwaes_set_arg_out(&cmd_header->text_out, PROT_READ | PROT_WRITE, shms, in hwaes_handle_aes_cmd()
384 rc = hwaes_set_arg_out(&cmd_header->tag_out, PROT_READ | PROT_WRITE, shms, in hwaes_handle_aes_cmd()
400 hwaes_unmap_shm(cmd_header->num_handles, shms); in hwaes_handle_aes_cmd()