367
369
case 200: /* host_info */
369
371
mig_reply_error_t *err = (mig_reply_error_t *)hdr;
370
struct host_basic_info *data = (void *)(err+1);
376
uint32_t memory_size;
378
uint32_t cpu_subtype;
379
} *data = (void *)(err+1);
372
381
DPRINTF("maxcpu = 0x%x\n", data->max_cpus);
373
382
DPRINTF("numcpu = 0x%x\n", data->avail_cpus);
445
454
DPRINTF("mach_msg_trap(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n",
446
455
arg1, arg2, arg3, arg4, arg5, arg6, arg7);
448
456
ret = target_mach_msg_trap((mach_msg_header_t *)arg1, arg2, arg3, arg4, arg5, arg6, arg7);
458
/* may need more translation if target arch is different from host */
459
#if (defined(TARGET_I386) && defined(__i386__)) || (defined(TARGET_PPC) && defined(__ppc__))
461
DPRINTF("semaphore_signal_trap(0x%x)\n", arg1);
462
ret = semaphore_signal_trap(arg1);
465
DPRINTF("semaphore_signal_all_trap(0x%x)\n", arg1);
466
ret = semaphore_signal_all_trap(arg1);
469
DPRINTF("semaphore_signal_thread_trap(0x%x)\n", arg1, arg2);
470
ret = semaphore_signal_thread_trap(arg1,arg2);
452
474
DPRINTF("semaphore_wait_trap(0x%x)\n", arg1);
453
475
extern int semaphore_wait_trap(int); // XXX: is there any header for that?
454
476
ret = semaphore_wait_trap(arg1);
478
/* may need more translation if target arch is different from host */
479
#if (defined(TARGET_I386) && defined(__i386__)) || (defined(TARGET_PPC) && defined(__ppc__))
481
DPRINTF("semaphore_wait_signal_trap(0x%x, 0x%x)\n", arg1, arg2);
482
ret = semaphore_wait_signal_trap(arg1,arg2);
457
486
DPRINTF("map_fd(0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n",
458
487
arg1, arg2, arg3, arg4, arg5);
459
488
ret = map_fd(arg1, arg2, (void*)arg3, arg4, arg5);
460
489
tswap32s((uint32_t*)arg3);
491
/* may need more translation if target arch is different from host */
492
#if (defined(TARGET_I386) && defined(__i386__)) || (defined(TARGET_PPC) && defined(__ppc__))
494
DPRINTF("syscall_thread_switch(0x%x, 0x%x, 0x%x)\n",
496
ret = syscall_thread_switch(arg1, arg2, arg3); // just a hint to the scheduler; can drop?
463
500
DPRINTF("mach_timebase_info(0x%x)\n", arg1);
464
501
struct mach_timebase_info info;
1342
1379
if(name) /* Sometimes sysctl is called with no arg1, ignore */
1343
1380
ret = get_errno(sysctl(name, namelen, oldp, oldlenp, newp, newlen));
1382
#if defined(TARGET_I386) ^ defined(__i386__) || defined(TARGET_PPC) ^ defined(__ppc__)
1345
1383
if (!is_error(ret) && bswap_syctl(name, namelen, oldp, *oldlenp) != 0) {
1346
1384
return -ENOTDIR;
1349
1389
//bswap_syctl(name, namelen, newp, newlen);
1350
1390
tswap32s((uint32_t*)oldlenp);