/trusty/user/base/lib/unittest/ |
D | unittest.c | 53 int ret; in send_msg_wait() local 56 ret = send_msg(handle, msg); in send_msg_wait() 57 if (ret != ERR_NOT_ENOUGH_BUFFER) { in send_msg_wait() 58 return ret; in send_msg_wait() 61 ret = wait(handle, &ev, INFINITE_TIME); in send_msg_wait() 62 if (ret < 0) { in send_msg_wait() 63 return ret; in send_msg_wait() 78 return ret; in send_msg_wait() 99 int ret; in _vtlog() local 104 ret = vfprintf(stderr, fmt, ap); in _vtlog() [all …]
|
/trusty/kernel/lib/unittest/ |
D | unittest.c | 59 int ret; in send_msg_wait() local 64 ret = ipc_send_msg(handle, msg); in send_msg_wait() 65 if (ret != ERR_NOT_ENOUGH_BUFFER) { in send_msg_wait() 66 return ret; in send_msg_wait() 69 ret = handle_wait(handle, &event, INFINITE_TIME); in send_msg_wait() 70 if (ret < 0) { in send_msg_wait() 71 return ret; in send_msg_wait() 86 return ret; in send_msg_wait() 104 int ret; in unittest_printf() local 109 ret = vsnprintf(buf + 1, sizeof(buf) - 1, fmt, ap); in unittest_printf() [all …]
|
/trusty/kernel/app/busytest/ |
D | busytest.c | 39 int ret; in busy_test_connected() local 44 ret = event_signal(&busy_test_event, true); in busy_test_connected() 45 if (ret) { in busy_test_connected() 46 TRACEF("event_signal failed %d\n", ret); in busy_test_connected() 49 ret = handle_wait(chandle, &event, INFINITE_TIME); in busy_test_connected() 50 LTRACEF("got channel event (ret=%d): ev=%x\n", ret, event); in busy_test_connected() 53 ret = event_unsignal(&busy_test_event); in busy_test_connected() 54 if (ret) { in busy_test_connected() 55 TRACEF("event_unsignal failed %d\n", ret); in busy_test_connected() 65 int ret; in busy_test_server() local [all …]
|
/trusty/kernel/app/mmutest/ |
D | mmutest.c | 46 int ret; in mmutest_run_in_thread() local 60 ret = vmm_alloc(aspace, "canary", PAGE_SIZE, (void**)&canary, 0, in mmutest_run_in_thread() 62 if (ret) { in mmutest_run_in_thread() 69 ret = thread_resume(thread); in mmutest_run_in_thread() 70 if (ret) { in mmutest_run_in_thread() 71 return ret; in mmutest_run_in_thread() 74 ret = thread_join(thread, &thread_ret, INFINITE_TIME); in mmutest_run_in_thread() 75 if (ret) { in mmutest_run_in_thread() 76 return ret; in mmutest_run_in_thread() 94 int ret; in mmutest_alloc() local [all …]
|
/trusty/user/app/storage/ |
D | block_device_tipc.c | 111 int ret; in rpmb_check() local 113 ret = rpmb_read(state->rpmb_state, tmp, block, 1); in rpmb_check() 114 SS_DBG_IO("%s: check rpmb_block %d, ret %d\n", __func__, block, ret); in rpmb_check() 115 return ret; in rpmb_check() 120 int ret; in rpmb_search_size() local 126 ret = rpmb_check(state, curr); in rpmb_search_size() 127 switch (ret) { in rpmb_search_size() 137 if (ret || curr != hint) { in rpmb_search_size() 155 int ret; in block_device_tipc_rpmb_start_read() local 163 ret = rpmb_read(dev_rpmb->state->rpmb_state, tmp, in block_device_tipc_rpmb_start_read() [all …]
|
D | rpmb.c | 211 int ret; in rpmb_program_key() local 222 ret = rpmb_send(state->mmc_handle, &cmd, sizeof(cmd), &rescmd, in rpmb_program_key() 224 if (ret < 0) in rpmb_program_key() 225 return ret; in rpmb_program_key() 234 ret = rpmb_check_response("program key", RPMB_RESP_PROGRAM_KEY, &res, 1, in rpmb_program_key() 236 return ret; in rpmb_program_key() 241 int ret; in rpmb_read_counter() local 250 ret = rpmb_send(state->mmc_handle, NULL, 0, &cmd, sizeof(cmd), &res, in rpmb_read_counter() 252 if (ret < 0) in rpmb_read_counter() 253 return ret; in rpmb_read_counter() [all …]
|
/trusty/user/base/lib/system_state/srv/ |
D | system_state_server.c | 27 int ret; in system_state_on_message() local 43 ret = tipc_recv1(chan, sizeof(req.hdr), &req, sizeof(req)); in system_state_on_message() 44 if (ret < 0) { in system_state_on_message() 45 TLOGE("tipc_recv1 failed (%d)\n", ret); in system_state_on_message() 46 return ret; in system_state_on_message() 48 if ((size_t)ret < sizeof(req.hdr)) { in system_state_on_message() 49 TLOGE("request too short (%d)\n", ret); in system_state_on_message() 52 req_payload_size = ret - sizeof(req.hdr); in system_state_on_message() 62 ret = ERR_INVALID_ARGS; in system_state_on_message() 65 ret = system_state_server_get_flag(req.get_flag.flag, in system_state_on_message() [all …]
|
/trusty/user/base/lib/system_state/ |
D | system_state.c | 48 int ret; in system_state_send_req() local 56 ret = tipc_send2(session, req, sizeof(*req), req_buf, req_buf_len); in system_state_send_req() 57 if (ret < 0) { in system_state_send_req() 61 if (((size_t)ret) != sizeof(*req) + req_buf_len) { in system_state_send_req() 62 ret = ERR_IO; in system_state_send_req() 67 ret = wait(session, &uevt, INFINITE_TIME); in system_state_send_req() 68 if (ret != NO_ERROR) { in system_state_send_req() 72 ret = tipc_recv2(session, sizeof(*resp), resp, sizeof(*resp), resp_buf, in system_state_send_req() 74 if (ret < 0) { in system_state_send_req() 78 size_t read_len = (size_t)ret; in system_state_send_req() [all …]
|
/trusty/user/app/storage/rpmb_dev/ |
D | main.c | 39 ssize_t ret = recv(sock, dest, len - bytes_recvd, 0); in recv_until() local 40 if (ret < 0) { in recv_until() 41 return ret; in recv_until() 43 dest += ret; in recv_until() 44 bytes_recvd += ret; in recv_until() 45 if (ret == 0) { in recv_until() 62 int ret; in handle_conn() local 66 ret = recv_until(conn_sock, &s->res_count, sizeof(s->res_count)); in handle_conn() 71 if (ret <= 0) { in handle_conn() 86 ret = recv_until(conn_sock, &s->cmd_count, sizeof(s->cmd_count)); in handle_conn() [all …]
|
/trusty/kernel/lib/trusty/ |
D | ipc_msg.c | 111 int ret; in ipc_msg_queue_create() local 123 ret = ERR_NO_MEMORY; in ipc_msg_queue_create() 142 return ret; in ipc_msg_queue_create() 195 ssize_t ret = NO_ERROR; in kern_msg_write_locked() local 210 ret = kern_iovec_to_membuf(buf, mq->item_sz, in kern_msg_write_locked() 213 if (ret < 0) in kern_msg_write_locked() 214 return ret; in kern_msg_write_locked() 220 ret = ERR_BAD_HANDLE; in kern_msg_write_locked() 225 ret = ERR_NOT_ALLOWED; in kern_msg_write_locked() 235 return ret; in kern_msg_write_locked() [all …]
|
D | syscall.c | 67 status_t ret; in install_sys_fd_handler() local 75 ret = NO_ERROR; in install_sys_fd_handler() 77 ret = ERR_ALREADY_EXISTS; in install_sys_fd_handler() 80 return ret; in install_sys_fd_handler() 137 int ret; in sys_std_writev() local 140 ret = user_iovec_to_membuf_iter(buf, sizeof(buf), iov_uaddr, &iter); in sys_std_writev() 141 if (ret < 0) { in sys_std_writev() 144 total_bytes += ret; in sys_std_writev() 146 ret = io_write(io_handle, (const void*)buf, ret); in sys_std_writev() 147 if (ret < 0) { in sys_std_writev() [all …]
|
D | uctx.c | 209 int ret; in _hset_add_handle() local 226 ret = handle_set_attach(hset, ref); in _hset_add_handle() 227 if (ret == NO_ERROR) { in _hset_add_handle() 234 return ret; in _hset_add_handle() 242 int ret; in rebuild_hset_all() local 251 ret = NO_ERROR; /* Already exists. This is not an error */ in rebuild_hset_all() 261 ret = ERR_NO_MEMORY; in rebuild_hset_all() 270 ret = _hset_add_handle(hset_all, h, ctx->handle_id_base + idx, ~0U, in rebuild_hset_all() 272 if (ret != NO_ERROR) { in rebuild_hset_all() 273 LTRACEF("Failed (%d) to add handle\n", ret); in rebuild_hset_all() [all …]
|
D | ipc.c | 139 int ret = 0; in ipc_port_create() local 162 ret = strlcpy(new_port->path, path, sizeof(new_port->path)); in ipc_port_create() 163 if (ret == 0) { in ipc_port_create() 165 ret = ERR_INVALID_ARGS; in ipc_port_create() 169 if ((uint)ret >= sizeof(new_port->path)) { in ipc_port_create() 170 LTRACEF("path is too long (%d)\n", ret); in ipc_port_create() 171 ret = ERR_TOO_BIG; in ipc_port_create() 193 return ret; in ipc_port_create() 366 int ret = NO_ERROR; in ipc_port_publish() local 378 ret = ERR_ALREADY_EXISTS; in ipc_port_publish() [all …]
|
/trusty/kernel/app/btitest/ |
D | btitest_arm64.S | 40 ret 67 ret 79 ret 128 ret 140 ret 152 ret 164 ret 176 ret 189 ret 202 ret [all …]
|
/trusty/kernel/app/stdcalltest/ |
D | stdcalltest.c | 70 status_t ret; in stdcalltest_sharedmem_rw() local 79 ret = ext_mem_map_obj_id(aspace, "stdcalltest", client_id, mem_obj_id, 0, 0, in stdcalltest_sharedmem_rw() 82 if (ret != NO_ERROR) { in stdcalltest_sharedmem_rw() 101 ret = vmm_free_region(aspace, (vaddr_t)va); in stdcalltest_sharedmem_rw() 102 if (ret) { in stdcalltest_sharedmem_rw() 130 enum clobber_restore_error ret = SVE_NO_ERROR; in stdcalltest_clobber_sve() local 134 return ret; in stdcalltest_clobber_sve() 143 ret = clobber_sve_asm(args->params[0]); in stdcalltest_clobber_sve() 144 if (ret != SVE_NO_ERROR) { in stdcalltest_clobber_sve() 145 panic("Failed to Clobber ARM SVE registers: %lx\n", ret); in stdcalltest_clobber_sve() [all …]
|
/trusty/user/app/sample/manifest-test/ |
D | manifest_test.c | 45 int ret; in compare_memory_map() local 50 ret = prepare_dma((void*)va_base, size, flags, &pmem); in compare_memory_map() 51 ASSERT_EQ(ret, 1); in compare_memory_map() 52 ret = finish_dma((void*)va_base, size, flags); in compare_memory_map() 53 ASSERT_EQ(ret, NO_ERROR); in compare_memory_map() 66 bool ret; in TEST_F() local 71 ret = compare_memory_map(va_base, TEST1_PHY_BASE_ADDR, TEST1_REG_SIZE); in TEST_F() 73 ASSERT_EQ(ret, true) in TEST_F() 83 bool ret; in TEST_F() local 88 ret = compare_memory_map(va_base, TEST2_PHY_BASE_ADDR, TEST2_REG_SIZE); in TEST_F() [all …]
|
/trusty/user/base/app/cfi-test/cfi-crasher/ |
D | cfi-crasher.c | 105 int ret = tipc_send1(global_chan, &msg, sizeof(msg)); in crasher_void() local 106 if (ret < 0 || ret != sizeof(msg)) { in crasher_void() 107 TLOGE("Failed to send message (%d)\n", ret); in crasher_void() 191 int ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_on_message() local 192 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 193 TLOGE("Failed to receive message (%d)\n", ret); in crasher_on_message() 194 return ret; in crasher_on_message() 291 ret = tipc_send1(chan, &msg, sizeof(msg)); in crasher_on_message() 292 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 293 TLOGE("Failed to send message (%d)\n", ret); in crasher_on_message() [all …]
|
/trusty/user/base/lib/keymaster/test/ |
D | keymaster_test.c | 55 int ret = keymaster_get_auth_token_key(_state->km_handle, &key_buf, in TEST_F() local 57 ASSERT_EQ(ret, NO_ERROR); in TEST_F() 69 int ret = in TEST_F() local 71 ASSERT_EQ(ret, NO_ERROR); in TEST_F() 101 int ret = trusty_gettime(0, &secure_time_ns); in TEST_F() local 102 ASSERT_EQ(ret, NO_ERROR); in TEST_F() 115 ret = keymaster_sign_auth_token(_state->km_handle, &token); in TEST_F() 116 ASSERT_EQ(ret, NO_ERROR); in TEST_F() 125 ret = keymaster_validate_auth_token(_state->km_handle, &token); in TEST_F() 126 ASSERT_EQ(ret, NO_ERROR); in TEST_F() [all …]
|
/trusty/user/base/app/crash-test/crasher/ |
D | crasher.c | 53 int ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_on_message() local 54 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 55 TLOGE("Failed to receive message (%d)\n", ret); in crasher_on_message() 56 return ret; in crasher_on_message() 108 ret = tipc_send1(chan, &msg, sizeof(msg)); in crasher_on_message() 109 if (ret < 0 || ret != sizeof(msg)) { in crasher_on_message() 110 TLOGE("Failed to send message (%d)\n", ret); in crasher_on_message() 111 return ret < 0 ? ret : ERR_IO; in crasher_on_message()
|
/trusty/kernel/lib/libc-trusty/ |
D | writev.c | 42 ssize_t ret = 0; in trusty_writev() local 47 ret = ERR_INVALID_ARGS; in trusty_writev() 50 ret = io_write(io_handle, (const void*)iov->iov_base, iov->iov_len); in trusty_writev() 51 if (ret < 0) { in trusty_writev() 54 total_bytes += ret; in trusty_writev() 57 ret = total_bytes; in trusty_writev() 63 return ret; in trusty_writev()
|
/trusty/kernel/lib/sm/ |
D | sm.c | 47 long ret; member 145 long ret; in sm_stdcall_loop() local 157 ret = sm_stdcall_table[SMC_ENTITY(stdcallstate.args.smc_nr)]( in sm_stdcall_loop() 162 stdcallstate.args.params[2], ret, ret); in sm_stdcall_loop() 164 stdcallstate.ret = ret; in sm_stdcall_loop() 173 long ret; in sm_queue_stdcall() local 187 ret = SM_ERR_BUSY; in sm_queue_stdcall() 194 ret = SM_ERR_UNEXPECTED_RESTART; in sm_queue_stdcall() 201 stdcallstate.ret = SM_ERR_INTERNAL_FAILURE; in sm_queue_stdcall() 208 ret = 0; in sm_queue_stdcall() [all …]
|
D | shared_mem.c | 77 int ret; in sm_mem_compat_get_vmm_obj() local 84 ret = sm_decode_ns_memory_attr(&pinf, &ns_paddr, &arch_mmu_flags); in sm_mem_compat_get_vmm_obj() 85 if (ret) { in sm_mem_compat_get_vmm_obj() 86 return ret; in sm_mem_compat_get_vmm_obj() 122 int ret; in sm_mem_obj_destroy() local 128 ret = arm_ffa_mem_relinquish(obj->ext_mem_obj.id); in sm_mem_obj_destroy() 129 if (ret != NO_ERROR) { in sm_mem_obj_destroy() 130 TRACEF("Failed to relinquish the shared memory (%d)\n", ret); in sm_mem_obj_destroy() 188 int ret; in sm_mem_get_vmm_obj() local 203 ret = arm_ffa_mem_retrieve_start((uint16_t)client_id, mem_obj_id, tag, in sm_mem_get_vmm_obj() [all …]
|
/trusty/hardware/nxp/app/hwcrypto/ |
D | caam.c | 117 int ret; in run_job() local 122 ret = prepare_dma(job->dsc, job->dsc_used * sizeof(uint32_t), in run_job() 124 assert(ret == 1); in run_job() 132 ret = prepare_dma(g_rings, sizeof(g_rings), DMA_FLAG_TO_DEVICE, &pmem); in run_job() 133 assert(ret == 1); in run_job() 265 int ret; in caam_decap_blob() local 274 ret = prepare_dma((void*)kmod, kmod_size, DMA_FLAG_TO_DEVICE, &pmem); in caam_decap_blob() 275 if (ret != 1) { in caam_decap_blob() 276 TLOGE("failed (%d) to prepare dma buffer\n", ret); in caam_decap_blob() 281 ret = prepare_dma((void*)blob, size + CAAM_KB_HEADER_LEN, in caam_decap_blob() [all …]
|
/trusty/kernel/lib/mmutest/ |
D | mmutest_x86.S | 39 ret 52 ret 69 ret 107 ret 137 ret 141 ret 145 ret 154 ret 159 ret 163 ret
|
/trusty/user/base/app/cfi-test/ |
D | cfi-test.c | 32 int ret; in crasher_command() local 37 ret = tipc_send1(chan, &msg, sizeof(msg)); in crasher_command() 38 ASSERT_GE(ret, 0); in crasher_command() 39 ASSERT_EQ(ret, sizeof(msg)); in crasher_command() 55 int ret; in crasher_wait() local 57 ret = wait(chan, &evt, INFINITE_TIME); in crasher_wait() 58 if (ret) { /* error while waiting on channel */ in crasher_wait() 59 return ret; in crasher_wait() 75 ret = tipc_recv1(chan, sizeof(msg), &msg, sizeof(msg)); in crasher_wait() 76 if (ret < 0) { in crasher_wait() [all …]
|