Changes in kernel/generic/src/udebug/udebug_ipc.c [b389f95:5a5269d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ipc.c
rb389f95 r5a5269d 53 53 errno_t udebug_request_preprocess(call_t *call, phone_t *phone) 54 54 { 55 switch ( IPC_GET_ARG1(call->data)) {55 switch (ipc_get_arg1(&call->data)) { 56 56 /* future UDEBUG_M_REGS_WRITE, UDEBUG_M_MEM_WRITE: */ 57 57 default: … … 76 76 rc = udebug_begin(call, &active); 77 77 if (rc != EOK) { 78 IPC_SET_RETVAL(call->data, rc);78 ipc_set_retval(&call->data, rc); 79 79 ipc_answer(&TASK->kb.box, call); 80 80 return; … … 86 86 */ 87 87 if (active) { 88 IPC_SET_RETVAL(call->data, EOK);88 ipc_set_retval(&call->data, EOK); 89 89 ipc_answer(&TASK->kb.box, call); 90 90 } … … 102 102 rc = udebug_end(); 103 103 104 IPC_SET_RETVAL(call->data, rc);104 ipc_set_retval(&call->data, rc); 105 105 ipc_answer(&TASK->kb.box, call); 106 106 } … … 116 116 udebug_evmask_t mask; 117 117 118 mask = IPC_GET_ARG2(call->data);118 mask = ipc_get_arg2(&call->data); 119 119 rc = udebug_set_evmask(mask); 120 120 121 IPC_SET_RETVAL(call->data, rc);121 ipc_set_retval(&call->data, rc); 122 122 ipc_answer(&TASK->kb.box, call); 123 123 } … … 133 133 errno_t rc; 134 134 135 t = (thread_t *) IPC_GET_ARG2(call->data);135 t = (thread_t *)ipc_get_arg2(&call->data); 136 136 137 137 rc = udebug_go(t, call); 138 138 if (rc != EOK) { 139 IPC_SET_RETVAL(call->data, rc);139 ipc_set_retval(&call->data, rc); 140 140 ipc_answer(&TASK->kb.box, call); 141 141 return; … … 153 153 errno_t rc; 154 154 155 t = (thread_t *) IPC_GET_ARG2(call->data);155 t = (thread_t *)ipc_get_arg2(&call->data); 156 156 157 157 rc = udebug_stop(t, call); 158 IPC_SET_RETVAL(call->data, rc);158 ipc_set_retval(&call->data, rc); 159 159 ipc_answer(&TASK->kb.box, call); 160 160 } … … 173 173 errno_t rc; 174 174 175 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */176 buf_size = IPC_GET_ARG3(call->data); /* Dest. buffer size */175 uspace_addr = ipc_get_arg2(&call->data); /* Destination address */ 176 buf_size = ipc_get_arg3(&call->data); /* Dest. buffer size */ 177 177 178 178 /* … … 182 182 rc = udebug_thread_read(&buffer, buf_size, &copied, &needed); 183 183 if (rc != EOK) { 184 IPC_SET_RETVAL(call->data, rc);184 ipc_set_retval(&call->data, rc); 185 185 ipc_answer(&TASK->kb.box, call); 186 186 return; … … 191 191 */ 192 192 193 IPC_SET_RETVAL(call->data, 0);194 /* 195 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 196 * same code in process_answer() can be used 197 * (no way to distinguish method in answer) 198 */ 199 IPC_SET_ARG1(call->data, uspace_addr);200 IPC_SET_ARG2(call->data, copied);201 IPC_SET_ARG3(call->data, needed);193 ipc_set_retval(&call->data, 0); 194 /* 195 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 196 * same code in process_answer() can be used 197 * (no way to distinguish method in answer) 198 */ 199 ipc_set_arg1(&call->data, uspace_addr); 200 ipc_set_arg2(&call->data, copied); 201 ipc_set_arg3(&call->data, needed); 202 202 call->buffer = buffer; 203 203 … … 219 219 void *data; 220 220 221 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */222 buf_size = IPC_GET_ARG3(call->data); /* Dest. buffer size */221 uspace_addr = ipc_get_arg2(&call->data); /* Destination address */ 222 buf_size = ipc_get_arg3(&call->data); /* Dest. buffer size */ 223 223 224 224 /* … … 238 238 */ 239 239 240 IPC_SET_RETVAL(call->data, 0);241 /* 242 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 243 * same code in process_answer() can be used 244 * (no way to distinguish method in answer) 245 */ 246 IPC_SET_ARG1(call->data, uspace_addr);247 IPC_SET_ARG2(call->data, to_copy);248 249 IPC_SET_ARG3(call->data, data_size);240 ipc_set_retval(&call->data, 0); 241 /* 242 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 243 * same code in process_answer() can be used 244 * (no way to distinguish method in answer) 245 */ 246 ipc_set_arg1(&call->data, uspace_addr); 247 ipc_set_arg2(&call->data, to_copy); 248 249 ipc_set_arg3(&call->data, data_size); 250 250 call->buffer = data; 251 251 … … 268 268 as_area_info_t *data; 269 269 270 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */271 buf_size = IPC_GET_ARG3(call->data); /* Dest. buffer size */270 uspace_addr = ipc_get_arg2(&call->data); /* Destination address */ 271 buf_size = ipc_get_arg3(&call->data); /* Dest. buffer size */ 272 272 273 273 /* … … 276 276 data = as_get_area_info(AS, &data_size); 277 277 if (!data) { 278 IPC_SET_RETVAL(call->data, ENOMEM);278 ipc_set_retval(&call->data, ENOMEM); 279 279 ipc_answer(&TASK->kb.box, call); 280 280 return; … … 292 292 */ 293 293 294 IPC_SET_RETVAL(call->data, 0);295 /* 296 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 297 * same code in process_answer() can be used 298 * (no way to distinguish method in answer) 299 */ 300 IPC_SET_ARG1(call->data, uspace_addr);301 IPC_SET_ARG2(call->data, to_copy);302 303 IPC_SET_ARG3(call->data, data_size);294 ipc_set_retval(&call->data, 0); 295 /* 296 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 297 * same code in process_answer() can be used 298 * (no way to distinguish method in answer) 299 */ 300 ipc_set_arg1(&call->data, uspace_addr); 301 ipc_set_arg2(&call->data, to_copy); 302 303 ipc_set_arg3(&call->data, data_size); 304 304 call->buffer = (uint8_t *) data; 305 305 … … 319 319 void *buffer; 320 320 321 t = (thread_t *) IPC_GET_ARG2(call->data);321 t = (thread_t *)ipc_get_arg2(&call->data); 322 322 323 323 rc = udebug_args_read(t, &buffer); 324 324 if (rc != EOK) { 325 IPC_SET_RETVAL(call->data, rc);325 ipc_set_retval(&call->data, rc); 326 326 ipc_answer(&TASK->kb.box, call); 327 327 return; … … 332 332 */ 333 333 334 uspace_addr = IPC_GET_ARG3(call->data);335 336 IPC_SET_RETVAL(call->data, 0);337 /* 338 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 339 * same code in process_answer() can be used 340 * (no way to distinguish method in answer) 341 */ 342 IPC_SET_ARG1(call->data, uspace_addr);343 IPC_SET_ARG2(call->data, 6 * sizeof(sysarg_t));334 uspace_addr = ipc_get_arg3(&call->data); 335 336 ipc_set_retval(&call->data, 0); 337 /* 338 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 339 * same code in process_answer() can be used 340 * (no way to distinguish method in answer) 341 */ 342 ipc_set_arg1(&call->data, uspace_addr); 343 ipc_set_arg2(&call->data, 6 * sizeof(sysarg_t)); 344 344 call->buffer = buffer; 345 345 … … 359 359 errno_t rc; 360 360 361 t = (thread_t *) IPC_GET_ARG2(call->data);361 t = (thread_t *) ipc_get_arg2(&call->data); 362 362 363 363 rc = udebug_regs_read(t, &buffer); 364 364 if (rc != EOK) { 365 IPC_SET_RETVAL(call->data, rc);365 ipc_set_retval(&call->data, rc); 366 366 ipc_answer(&TASK->kb.box, call); 367 367 return; … … 374 374 */ 375 375 376 uspace_addr = IPC_GET_ARG3(call->data);376 uspace_addr = ipc_get_arg3(&call->data); 377 377 to_copy = sizeof(istate_t); 378 378 379 IPC_SET_RETVAL(call->data, 0);380 /* 381 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 382 * same code in process_answer() can be used 383 * (no way to distinguish method in answer) 384 */ 385 IPC_SET_ARG1(call->data, uspace_addr);386 IPC_SET_ARG2(call->data, to_copy);379 ipc_set_retval(&call->data, 0); 380 /* 381 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 382 * same code in process_answer() can be used 383 * (no way to distinguish method in answer) 384 */ 385 ipc_set_arg1(&call->data, uspace_addr); 386 ipc_set_arg2(&call->data, to_copy); 387 387 388 388 call->buffer = buffer; … … 398 398 static void udebug_receive_mem_read(call_t *call) 399 399 { 400 sysarg_t uspace_dst;401 sysarg_t uspace_src;400 uspace_addr_t uspace_dst; 401 uspace_addr_t uspace_src; 402 402 unsigned size; 403 403 void *buffer = NULL; 404 404 errno_t rc; 405 405 406 uspace_dst = IPC_GET_ARG2(call->data);407 uspace_src = IPC_GET_ARG3(call->data);408 size = IPC_GET_ARG4(call->data);406 uspace_dst = ipc_get_arg2(&call->data); 407 uspace_src = ipc_get_arg3(&call->data); 408 size = ipc_get_arg4(&call->data); 409 409 410 410 rc = udebug_mem_read(uspace_src, size, &buffer); 411 411 if (rc != EOK) { 412 IPC_SET_RETVAL(call->data, rc);412 ipc_set_retval(&call->data, rc); 413 413 ipc_answer(&TASK->kb.box, call); 414 414 return; … … 417 417 assert(buffer != NULL); 418 418 419 IPC_SET_RETVAL(call->data, 0);420 /* 421 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 422 * same code in process_answer() can be used 423 * (no way to distinguish method in answer) 424 */ 425 IPC_SET_ARG1(call->data, uspace_dst);426 IPC_SET_ARG2(call->data, size);419 ipc_set_retval(&call->data, 0); 420 /* 421 * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 422 * same code in process_answer() can be used 423 * (no way to distinguish method in answer) 424 */ 425 ipc_set_arg1(&call->data, uspace_dst); 426 ipc_set_arg2(&call->data, size); 427 427 call->buffer = buffer; 428 428 … … 439 439 int debug_method; 440 440 441 debug_method = IPC_GET_ARG1(call->data);441 debug_method = ipc_get_arg1(&call->data); 442 442 443 443 if (debug_method != UDEBUG_M_BEGIN) { … … 450 450 */ 451 451 if (TASK->udebug.debugger != call->sender) { 452 IPC_SET_RETVAL(call->data, EINVAL);452 ipc_set_retval(&call->data, EINVAL); 453 453 ipc_answer(&TASK->kb.box, call); 454 454 return;
Note:
See TracChangeset
for help on using the changeset viewer.