Home
last modified time | relevance | path

Searched refs:resp (Results 1 – 25 of 33) sorted by relevance

12

/trusty/user/base/lib/hwbcc/srv/
Dsrv.c141 struct hwbcc_resp resp = {0}; in handle_sign_data() local
148 args->aad_size, resp.payload, sizeof(resp.payload), in handle_sign_data()
154 resp.hdr.cmd = HWBCC_CMD_SIGN_DATA | HWBCC_CMD_RESP_BIT; in handle_sign_data()
155 resp.hdr.status = rc; in handle_sign_data()
156 resp.hdr.payload_size = payload_size; in handle_sign_data()
157 rc = tipc_send1(chan, &resp, sizeof(resp.hdr) + payload_size); in handle_sign_data()
162 if ((size_t)rc != sizeof(resp.hdr) + payload_size) { in handle_sign_data()
173 struct hwbcc_resp resp = {0}; in handle_get_bcc() local
178 rc = hwbcc_ops->get_bcc(s, test_mode, resp.payload, sizeof(resp.payload), in handle_get_bcc()
184 resp.hdr.cmd = HWBCC_CMD_GET_BCC | HWBCC_CMD_RESP_BIT; in handle_get_bcc()
[all …]
/trusty/user/base/app/line-coverage/
Dclient.c49 struct line_coverage_client_resp resp; in handle_send_list() local
51 memset(&resp, 0, sizeof(struct line_coverage_client_resp)); in handle_send_list()
56 resp.hdr.cmd = LINE_COVERAGE_CLIENT_CMD_SEND_LIST | LINE_COVERAGE_CLIENT_CMD_RESP_BIT; in handle_send_list()
58 resp.send_list_args.uuid = cur_record->uuid; in handle_send_list()
60 rc = coverage_send(chan, &resp, sizeof(resp), NULL); in handle_send_list()
76 resp.hdr.cmd = LINE_COVERAGE_CLIENT_CMD_SEND_LIST | LINE_COVERAGE_CLIENT_CMD_RESP_BIT; in handle_send_list()
77 resp.send_list_args.uuid = zero_uuid; in handle_send_list()
78 rc = coverage_send(chan, &resp, sizeof(resp), NULL); in handle_send_list()
91 struct line_coverage_client_resp resp; in handle_open() local
103 memset(&resp, 0, sizeof(struct line_coverage_client_resp)); in handle_open()
[all …]
Daggregator.c36 struct line_coverage_aggregator_resp resp; in handle_register() local
37 memset(&resp, 0, sizeof(struct line_coverage_aggregator_resp)); in handle_register()
39 resp.hdr.cmd = req->hdr.cmd | LINE_COVERAGE_AGGREGATOR_CMD_RESP_BIT; in handle_register()
40 resp.register_args.idx = record->ta_idx; in handle_register()
41 resp.register_args.mailbox_len = mailbox->len; in handle_register()
43 rc = coverage_send(chan, &resp, sizeof(resp), &mailbox->memref); in handle_register()
57 struct line_coverage_aggregator_resp resp; in handle_get_record() local
58 memset(&resp, 0, sizeof(struct line_coverage_aggregator_resp)); in handle_get_record()
64 resp.hdr.cmd = req->hdr.cmd | LINE_COVERAGE_AGGREGATOR_CMD_RESP_BIT; in handle_get_record()
65 resp.get_record_args.shm_len = record->data.len; in handle_get_record()
[all …]
/trusty/user/base/lib/system_state/
Dsystem_state.c45 struct system_state_resp* resp, in system_state_send_req() argument
72 ret = tipc_recv2(session, sizeof(*resp), resp, sizeof(*resp), resp_buf, in system_state_send_req()
79 if (read_len < sizeof(*resp)) { in system_state_send_req()
85 if (resp->cmd != (req->cmd | SYSTEM_STATE_CMD_RESP_BIT)) { in system_state_send_req()
87 resp->cmd, req->cmd); in system_state_send_req()
94 *resp_buf_len = read_len - sizeof(*resp); in system_state_send_req()
95 return resp->result; in system_state_send_req()
111 struct system_state_resp resp; in system_state_get_flag() local
116 &resp, &get_flag_resp, &get_flag_resp_size); in system_state_get_flag()
/trusty/user/base/lib/hwbcc/client/
Dhwbcc.c34 struct hwbcc_resp_hdr resp; in recv_resp() local
45 rc = tipc_recv2(chan, sizeof(resp), &resp, sizeof(resp), buf, buf_size); in recv_resp()
51 if (resp.cmd != (hdr->cmd | HWBCC_CMD_RESP_BIT)) { in recv_resp()
52 TLOGE("Unknown response cmd: %x\n", resp.cmd); in recv_resp()
56 if (resp.status != NO_ERROR) { in recv_resp()
57 TLOGE("Status is not SUCCESS. Actual: %d\n", resp.status); in recv_resp()
58 rc = resp.status; in recv_resp()
62 if (resp.payload_size != (size_t)rc - sizeof(resp)) { in recv_resp()
66 if (resp.payload_size > HWBCC_MAX_RESP_PAYLOAD_SIZE || in recv_resp()
67 resp.payload_size > buf_size) { in recv_resp()
[all …]
/trusty/user/base/lib/system_state/srv/
Dsystem_state_server.c40 } resp = {}; in system_state_on_message() local
66 &resp.get_flag.value); in system_state_on_message()
68 resp.get_flag.flag = req.get_flag.flag; in system_state_on_message()
69 resp_payload_size = sizeof(resp.get_flag); in system_state_on_message()
75 resp.hdr.cmd = req.hdr.cmd | SYSTEM_STATE_CMD_RESP_BIT; in system_state_on_message()
76 resp.hdr.result = ret; in system_state_on_message()
77 ret = tipc_send1(chan, &resp, sizeof(resp.hdr) + resp_payload_size); in system_state_on_message()
82 if ((size_t)ret != sizeof(resp.hdr) + resp_payload_size) { in system_state_on_message()
/trusty/user/base/lib/coverage/common/
Dipc.c89 void* resp, in coverage_rpc() argument
107 rc = coverage_recv(chan, resp, resp_len, resp_h); in coverage_rpc()
119 struct coverage_aggregator_resp* resp, in coverage_aggregator_rpc() argument
121 int rc = coverage_rpc(chan, req, sizeof(*req), req_h, resp, sizeof(*resp), in coverage_aggregator_rpc()
127 if (resp->hdr.cmd != (req->hdr.cmd | COVERAGE_AGGREGATOR_CMD_RESP_BIT)) { in coverage_aggregator_rpc()
128 TLOGE("cmd 0x%x: unknown command\n", resp->hdr.cmd); in coverage_aggregator_rpc()
138 struct coverage_client_resp* resp, in coverage_client_rpc() argument
140 int rc = coverage_rpc(chan, req, sizeof(*req), req_h, resp, sizeof(*resp), in coverage_client_rpc()
146 if (resp->hdr.cmd != (req->hdr.cmd | COVERAGE_CLIENT_CMD_RESP_BIT)) { in coverage_client_rpc()
147 TLOGE("cmd 0x%x: unknown command\n", resp->hdr.cmd); in coverage_client_rpc()
/trusty/user/base/app/coverage/
Daggregator.c36 struct coverage_aggregator_resp resp; in handle_register() local
38 resp.hdr.cmd = req->hdr.cmd | COVERAGE_AGGREGATOR_CMD_RESP_BIT; in handle_register()
39 resp.register_args.idx = record->idx; in handle_register()
40 resp.register_args.mailbox_len = mailbox->len; in handle_register()
42 rc = coverage_send(chan, &resp, sizeof(resp), &mailbox->memref); in handle_register()
56 struct coverage_aggregator_resp resp; in handle_get_record() local
62 resp.hdr.cmd = req->hdr.cmd | COVERAGE_AGGREGATOR_CMD_RESP_BIT; in handle_get_record()
63 resp.get_record_args.shm_len = record->data.len; in handle_get_record()
65 rc = coverage_send(chan, &resp, sizeof(resp), &record->data.memref); in handle_get_record()
Dclient.c45 struct coverage_client_resp resp; in handle_open() local
56 resp.hdr.cmd = req->hdr.cmd | COVERAGE_CLIENT_CMD_RESP_BIT; in handle_open()
57 resp.open_args.record_len = record->record_len; in handle_open()
58 rc = coverage_send(chan, &resp, sizeof(resp), NULL); in handle_open()
74 struct coverage_client_resp resp; in handle_share_record() local
81 resp.hdr.cmd = req->hdr.cmd | COVERAGE_CLIENT_CMD_RESP_BIT; in handle_share_record()
82 rc = coverage_send(chan, &resp, sizeof(resp), NULL); in handle_share_record()
/trusty/user/base/app/apploader/
Dapploader.c56 struct apploader_resp resp; member
97 struct apploader_resp resp = { in apploader_send_response() local
104 int rc = tipc_send1(chan, &resp, sizeof(resp)); in apploader_send_response()
109 if ((size_t)rc != sizeof(resp)) { in apploader_send_response()
111 sizeof(resp)); in apploader_send_response()
194 struct apploader_secure_resp resp; in apploader_send_secure_get_memory_command() local
195 rc = apploader_read(secure_chan, sizeof(resp), &resp, sizeof(resp), in apploader_send_secure_get_memory_command()
202 if (resp.hdr.cmd != in apploader_send_secure_get_memory_command()
204 TLOGE("Invalid command in response (%u)\n", resp.hdr.cmd); in apploader_send_secure_get_memory_command()
208 if (resp.error != APPLOADER_NO_ERROR) { in apploader_send_secure_get_memory_command()
[all …]
/trusty/user/app/storage/
Dtipc_ns.c145 struct storage_file_open_resp resp; in ns_open_file() local
161 {.iov_base = &resp, .iov_len = sizeof(resp)}}; in ns_open_file()
177 if (bytes_read != sizeof(msg) + sizeof(resp)) { in ns_open_file()
179 __func__, bytes_read, sizeof(resp)); in ns_open_file()
183 *handlep = resp.handle; in ns_open_file()
226 struct storage_file_get_max_size_resp resp = {0}; in ns_get_max_size() local
239 {.iov_base = &resp, .iov_len = sizeof(resp)}}; in ns_get_max_size()
255 if (bytes_read != sizeof(msg) + sizeof(resp)) { in ns_get_max_size()
257 __func__, bytes_read, sizeof(msg) + sizeof(resp)); in ns_get_max_size()
261 *size = resp.max_size; in ns_get_max_size()
Dclient_tipc.c161 struct storage_file_open_resp resp; in storage_tipc_file_open() local
165 extract_storage_op_flags(msg->flags), &resp.handle); in storage_tipc_file_open()
169 return send_response(tipc_session, result, msg, &resp, sizeof(resp)); in storage_tipc_file_open()
214 uint8_t* resp = (uint8_t*)(msg + 1); in storage_tipc_file_read() local
219 extract_storage_op_flags(msg->flags), resp, &resp_len); in storage_tipc_file_read()
223 return send_response(tipc_session, result, msg, resp, resp_len); in storage_tipc_file_read()
243 struct storage_file_list_resp* resp = in write_to_buf() local
246 resp->flags = flags; in write_to_buf()
250 strncpy(resp->name, path, path_len); in write_to_buf()
251 resp->name[path_len] = '\0'; in write_to_buf()
[all …]
/trusty/user/base/app/metrics/
Dconsumer.c89 struct metrics_resp resp = { in on_message() local
93 rc = tipc_send1(chan, &resp, sizeof(resp)); in on_message()
99 if ((size_t)rc != sizeof(resp)) { in on_message()
/trusty/user/base/lib/coverage/common/include/lib/coverage/common/
Dipc.h62 struct coverage_aggregator_resp* resp,
78 struct coverage_client_resp* resp,
/trusty/user/base/lib/sancov/
Dsancov.c101 struct coverage_aggregator_resp resp; in init() local
112 rc = coverage_aggregator_rpc(chan, &req, NULL, &resp, &memref); in init()
118 rc = cov_shm_mmap(&ctx->mailbox, memref, resp.register_args.mailbox_len); in init()
127 ctx->idx = resp.register_args.idx; in init()
143 struct coverage_aggregator_resp resp; in get_record() local
154 rc = coverage_aggregator_rpc(ctx->coverage_srv, &req, NULL, &resp, &memref); in get_record()
159 shm_len = resp.get_record_args.shm_len; in get_record()
168 rc = cov_shm_mmap(&ctx->data, memref, resp.get_record_args.shm_len); in get_record()
/trusty/user/base/lib/spi/client/
Dclient.c73 struct spi_msg_resp resp; in handle_shm_resp() local
81 rc = tipc_recv1(chan, sizeof(resp), &resp, sizeof(resp)); in handle_shm_resp()
82 if (rc < 0 || (size_t)rc != sizeof(resp)) { in handle_shm_resp()
90 return translate_srv_err(resp.status); in handle_shm_resp()
301 struct spi_msg_resp resp; in handle_batch_resp() local
310 rc = tipc_recv2(dev->h, sizeof(resp) + sizeof(batch_resp), &resp, in handle_batch_resp()
311 sizeof(resp), &batch_resp, sizeof(batch_resp)); in handle_batch_resp()
312 if (rc < 0 || (size_t)rc != sizeof(resp) + sizeof(batch_resp)) { in handle_batch_resp()
320 rc = translate_srv_err(resp.status); in handle_batch_resp()
/trusty/user/base/lib/spi/srv/tipc/
Dtipc.c133 struct spi_msg_resp resp = { in handle_msg_shm_map_req() local
137 rc = tipc_send1(chan, &resp, sizeof(resp)); in handle_msg_shm_map_req()
138 if (rc < 0 || (size_t)rc != sizeof(resp)) { in handle_msg_shm_map_req()
174 struct spi_msg_resp resp = { in handle_msg_batch_req() local
184 rc = tipc_send2(chan, &resp, sizeof(resp), &batch_resp, sizeof(batch_resp)); in handle_msg_batch_req()
185 if (rc < 0 || (size_t)rc != sizeof(resp) + sizeof(batch_resp)) { in handle_msg_batch_req()
/trusty/user/base/lib/secure_dpu/
Dsecure_dpu.c62 struct secure_dpu_allocate_buffer_resp resp; in handle_allocate_buffer_resp() local
71 .iov_base = &resp, in handle_allocate_buffer_resp()
72 .iov_len = sizeof(resp), in handle_allocate_buffer_resp()
102 if (rc != (int)(sizeof(hdr) + sizeof(resp))) { in handle_allocate_buffer_resp()
119 if ((size_t)resp.buffer_len < buffer_len) { in handle_allocate_buffer_resp()
122 (size_t)resp.buffer_len); in handle_allocate_buffer_resp()
128 buf_info->len = (size_t)resp.buffer_len; in handle_allocate_buffer_resp()
/trusty/kernel/lib/metrics/
Dmetrics.c95 struct metrics_resp resp; in recv_resp() local
104 .iov_base = &resp, in recv_resp()
105 .iov_len = sizeof(resp), in recv_resp()
121 if (rc != sizeof(resp)) { in recv_resp()
126 if (resp.cmd != (cmd | METRICS_CMD_RESP_BIT)) { in recv_resp()
127 TRACEF("unknown command received: %u %u.\n", resp.cmd, cmd); in recv_resp()
131 if (resp.status != METRICS_NO_ERROR) { in recv_resp()
132 TRACEF("event report failure: %d.\n", resp.status); in recv_resp()
/trusty/user/base/lib/line-coverage/
Dshm.c131 struct coverage_aggregator_resp resp; in setup_mailbox() local
156 rc = coverage_aggregator_rpc(chan, &req, NULL, &resp, &memref); in setup_mailbox()
163 rc = cov_shm_mmap(&(ctx.mailbox), memref, resp.register_args.mailbox_len); in setup_mailbox()
173 ctx.idx = resp.register_args.idx; in setup_mailbox()
/trusty/user/app/sample/memref-test/rust/
Dmemref_test.rs70 let resp = lender.recv::<MemrefResponse>(recv_buf).unwrap(); in request_remote_buf() localVariable
72 resp.handle in request_remote_buf()
97 let resp = lender.recv::<ReadResponse>(recv_buf).unwrap(); in test_read_write() localVariable
100 assert_eq!(7, resp.value); in test_read_write()
/trusty/user/base/lib/hwaes/
Dhwaes.c368 struct hwaes_resp resp = {0}; in hwaes_crypt() local
417 hwaes_set_iov_helper(&resp, sizeof(resp), &resp_iov); in hwaes_crypt()
439 if (resp.cmd != (req.cmd | HWAES_RESP_BIT)) { in hwaes_crypt()
440 TLOGE("invalid response cmd (0x%x) for request cmd (0x%x)\n", resp.cmd, in hwaes_crypt()
445 if (resp.result == HWAES_NO_ERROR && resp_msg_size != resp_iov.total_len) { in hwaes_crypt()
450 return hwaes_err_to_tipc_err(resp.result); in hwaes_crypt()
/trusty/user/base/lib/hwbcc/rust/src/
Dlib.rs65 fn validate_response(self, resp: u32) -> Result<(), HwBccError> { in validate_response()
66 if resp != self as u32 | BccCmd::RespBit as u32 { in validate_response()
67 log::error!("unknown response cmd: {:?}", resp); in validate_response()
232 fn read_payload(resp: HwBccResponse, buf: &mut [u8]) -> Result<&[u8], HwBccError> { in read_payload()
233 let payload_size = resp.payload.len(); in read_payload()
239 buf[..payload_size].copy_from_slice(&resp.payload); in read_payload()
/trusty/kernel/services/apploader/
Dapploader_service.c86 struct apploader_secure_resp resp; member
106 struct apploader_secure_resp resp = { in apploader_service_send_response() local
115 ktipc_send_handles(chan, handles, num_handles, &resp, sizeof(resp)); in apploader_service_send_response()
116 if (rc != (int)sizeof(resp)) { in apploader_service_send_response()
/trusty/user/app/storage/rpmb_dev/
Drpmb_dev.c254 uint16_t resp; member
269 .resp = RPMB_RESP_PROGRAM_KEY,
276 .resp = RPMB_RESP_GET_COUNTER,
283 .resp = RPMB_RESP_DATA_WRITE,
294 .resp = RPMB_RESP_DATA_READ,
430 s->res[i].req_resp = rpmb_u16(cmd->resp); in rpmb_dev_process_cmd()

12