summaryrefslogtreecommitdiff
path: root/boot.backup1/ourmach.defs
blob: 43bec4bab84d19b3fe83bd8a55b41598c150988a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
# 1 "mach.defs"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "mach.defs"
# 1 "/usr/local/include/mach/mach.defs" 1 3
# 37 "/usr/local/include/mach/mach.defs" 3
serverprefix S_;
subsystem






         mach 2000;





# 1 "/usr/local/include/mach/std_types.defs" 1 3
# 33 "/usr/local/include/mach/std_types.defs" 3
type char = MACH_MSG_TYPE_CHAR;
type short = MACH_MSG_TYPE_INTEGER_16;
type int = MACH_MSG_TYPE_INTEGER_32;
type int32 = MACH_MSG_TYPE_INTEGER_32;
type int64 = MACH_MSG_TYPE_INTEGER_64;
type boolean_t = MACH_MSG_TYPE_BOOLEAN;
type unsigned = MACH_MSG_TYPE_INTEGER_32;
type unsigned32 = MACH_MSG_TYPE_INTEGER_32;
type unsigned64 = MACH_MSG_TYPE_INTEGER_64;


# 1 "/usr/local/include/mach/machine/machine_types.defs" 1 3
# 50 "/usr/local/include/mach/machine/machine_types.defs" 3
type natural_t = unsigned32;
# 59 "/usr/local/include/mach/machine/machine_types.defs" 3
type integer_t = int32;
# 45 "/usr/local/include/mach/std_types.defs" 2 3

type kern_return_t = int;

type pointer_t = ^array[] of MACH_MSG_TYPE_BYTE
 ctype: vm_offset_t;


type mach_port_t = MACH_MSG_TYPE_COPY_SEND;
type mach_port_array_t = array[] of mach_port_t;

type mach_port_name_t = MACH_MSG_TYPE_PORT_NAME
 ctype: mach_port_t;
type mach_port_name_array_t = array[] of mach_port_name_t
 ctype: mach_port_array_t;

type mach_port_right_t = natural_t;

type mach_port_type_t = natural_t;
type mach_port_type_array_t = array[] of mach_port_type_t;

type mach_port_urefs_t = natural_t;
type mach_port_delta_t = integer_t;
type mach_port_seqno_t = natural_t;
type mach_port_mscount_t = unsigned;
type mach_port_msgcount_t = unsigned;
type mach_port_rights_t = unsigned;
type mach_msg_id_t = integer_t;
type mach_msg_type_name_t = unsigned;
type mach_msg_type_number_t = natural_t;

type mach_port_move_receive_t = MACH_MSG_TYPE_MOVE_RECEIVE
 ctype: mach_port_t;
type mach_port_copy_send_t = MACH_MSG_TYPE_COPY_SEND
 ctype: mach_port_t;
type mach_port_make_send_t = MACH_MSG_TYPE_MAKE_SEND
 ctype: mach_port_t;
type mach_port_move_send_t = MACH_MSG_TYPE_MOVE_SEND
 ctype: mach_port_t;
type mach_port_make_send_once_t = MACH_MSG_TYPE_MAKE_SEND_ONCE
 ctype: mach_port_t;
type mach_port_move_send_once_t = MACH_MSG_TYPE_MOVE_SEND_ONCE
 ctype: mach_port_t;

type mach_port_receive_t = MACH_MSG_TYPE_PORT_RECEIVE
 ctype: mach_port_t;
type mach_port_send_t = MACH_MSG_TYPE_PORT_SEND
 ctype: mach_port_t;
type mach_port_send_once_t = MACH_MSG_TYPE_PORT_SEND_ONCE
 ctype: mach_port_t;

type mach_port_poly_t = polymorphic
 ctype: mach_port_t;

import <mach/std_types.h>;
# 51 "/usr/local/include/mach/mach.defs" 2 3
# 1 "/usr/local/include/mach/mach_types.defs" 1 3
# 61 "/usr/local/include/mach/mach_types.defs" 3
type mach_port_status_t = struct[9] of integer_t;

type old_mach_port_status_t = struct[8] of integer_t;

type task_t = mach_port_t
  ctype: mach_port_t





  ;
# 85 "/usr/local/include/mach/mach_types.defs" 3
type thread_t = mach_port_t
  ctype: mach_port_t





  ;

type thread_state_t = array[*:1024] of natural_t;

type task_array_t = ^array[] of task_t;
type thread_array_t = ^array[] of thread_t;

type vm_task_t = mach_port_t
  ctype: mach_port_t




  ;

type ipc_space_t = mach_port_t
  ctype: mach_port_t




  ;

type vm_address_t = natural_t;
type vm_offset_t = natural_t;
type vm_size_t = natural_t;
type vm_prot_t = int;
type vm_inherit_t = int;
type vm_statistics_data_t = struct[13] of integer_t;
type vm_machine_attribute_t = int;
type vm_machine_attribute_val_t = int;

type thread_info_t = array[*:1024] of natural_t;
type thread_basic_info_data_t = struct[11] of integer_t;
type thread_sched_info_data_t = struct[7] of integer_t;

type task_info_t = array[*:1024] of natural_t;
type task_basic_info_data_t = struct[8] of integer_t;
type task_events_info = struct[7] of natural_t;
type task_thread_times_info_data_t = struct[4] of integer_t;


type memory_object_t = mach_port_t
  ctype: mach_port_t



  ;

type memory_object_control_t = mach_port_t
  ctype: mach_port_t



  ;

type memory_object_name_t = mach_port_t
  ctype: mach_port_t




  ;

type memory_object_copy_strategy_t = int;
type memory_object_return_t = int;

type machine_info_data_t = struct[5] of integer_t;
type machine_slot_data_t = struct[8] of integer_t;

type host_t = mach_port_t
  ctype: mach_port_t




  ;

type host_priv_t = mach_port_t
  ctype: mach_port_t



  ;

type host_info_t = array[*:1024] of natural_t;
type host_basic_info_data_t = struct[5] of integer_t;
type host_sched_info_data_t = struct[2] of integer_t;
type host_load_info_data_t = struct[6] of integer_t;


type processor_t = mach_port_t
  ctype: mach_port_t




  ;

type processor_array_t = ^array[] of processor_t;
type processor_info_t = array[*:1024] of natural_t;
type processor_basic_info_data_t = struct[5] of integer_t;


type processor_set_t = mach_port_t
  ctype: mach_port_t





  ;

type processor_set_array_t = ^array[] of processor_set_t;

type processor_set_name_t = mach_port_t
  ctype: mach_port_t





  ;

type processor_set_name_array_t = ^array[] of processor_set_name_t;

type processor_set_info_t = array[*:1024] of natural_t;
type processor_set_basic_info_data_t = struct[5] of integer_t;
type processor_set_sched_info_data_t = struct[2] of integer_t;


type kernel_version_t = (MACH_MSG_TYPE_STRING, 512*8);

type kernel_boot_info_t = (MACH_MSG_TYPE_STRING, 4096*8);

type time_value_t = struct[2] of integer_t;

type emulation_vector_t = ^array[] of vm_offset_t;

type xxx_emulation_vector_t = array[*:1024] of vm_offset_t
     ctype: emulation_vector_t;


type rpc_signature_info_t = array[*:1024] of int;
# 250 "/usr/local/include/mach/mach_types.defs" 3
import <mach/mach_types.h>;
# 52 "/usr/local/include/mach/mach.defs" 2 3

skip;
skip;
skip;
skip;
skip;
skip;
skip;






routine task_create(
  target_task : task_t;
  inherit_memory : boolean_t;
 out child_task : mach_port_send_t);






routine task_terminate(
  target_task : task_t);





routine task_get_emulation_vector(
  task : task_t;
 out vector_start : int;
 out emulation_vector: emulation_vector_t);






routine task_set_emulation_vector(
  task : task_t;
  vector_start : int;
  emulation_vector: emulation_vector_t);





routine task_threads(
  target_task : task_t;
 out thread_list : thread_array_t);




routine task_info(
  target_task : task_t;
  flavor : int;
 out task_info_out : task_info_t, CountInOut);


skip;
skip;
skip;




routine thread_terminate(
  target_thread : thread_t);







routine thread_get_state(
  target_thread : thread_t;
  flavor : int;
 out old_state : thread_state_t, CountInOut);






routine thread_set_state(
  target_thread : thread_t;
  flavor : int;
  new_state : thread_state_t);




routine thread_info(
  target_thread : thread_t;
  flavor : int;
 out thread_info_out : thread_info_t, CountInOut);

skip;
# 166 "/usr/local/include/mach/mach.defs" 3
routine vm_allocate(
  target_task : vm_task_t;
 inout address : vm_address_t;
  size : vm_size_t;
  anywhere : boolean_t);


skip;





routine vm_deallocate(
  target_task : vm_task_t;
  address : vm_address_t;
  size : vm_size_t);
# 194 "/usr/local/include/mach/mach.defs" 3
routine vm_protect(
  target_task : vm_task_t;
  address : vm_address_t;
  size : vm_size_t;
  set_maximum : boolean_t;
  new_protection : vm_prot_t);
# 208 "/usr/local/include/mach/mach.defs" 3
routine vm_inherit(
  target_task : vm_task_t;
  address : vm_address_t;
  size : vm_size_t;
  new_inheritance : vm_inherit_t);
# 221 "/usr/local/include/mach/mach.defs" 3
routine vm_read(
  target_task : vm_task_t;
  address : vm_address_t;
  size : vm_size_t;
 out data : pointer_t);
# 234 "/usr/local/include/mach/mach.defs" 3
routine vm_write(
  target_task : vm_task_t;
  address : vm_address_t;
  data : pointer_t);
# 249 "/usr/local/include/mach/mach.defs" 3
routine vm_copy(
  target_task : vm_task_t;
  source_address : vm_address_t;
  size : vm_size_t;
  dest_address : vm_address_t);
# 266 "/usr/local/include/mach/mach.defs" 3
routine vm_region(
  target_task : vm_task_t;
 inout address : vm_address_t;
 out size : vm_size_t;
 out protection : vm_prot_t;
 out max_protection : vm_prot_t;
 out inheritance : vm_inherit_t;
 out is_shared : boolean_t;

 out object_name : memory_object_name_t =
     MACH_MSG_TYPE_MOVE_SEND
     ctype: mach_port_t;
 out offset : vm_offset_t);






routine vm_statistics(
  target_task : vm_task_t;
 out vm_stats : vm_statistics_data_t);

skip;
skip;





routine mach_ports_register(
  target_task : task_t;
  init_port_set : mach_port_array_t =
     ^array[] of mach_port_t);




routine mach_ports_lookup(
  target_task : task_t;
 out init_port_set : mach_port_array_t =
     ^array[] of mach_port_t);

skip;
skip;
skip;
# 325 "/usr/local/include/mach/mach.defs" 3
simpleroutine memory_object_data_provided(
  memory_control : memory_object_control_t;
  offset : vm_offset_t;
  data : pointer_t;
  lock_value : vm_prot_t);
# 339 "/usr/local/include/mach/mach.defs" 3
simpleroutine memory_object_data_unavailable(
  memory_control : memory_object_control_t;
  offset : vm_offset_t;
  size : vm_size_t);





routine memory_object_get_attributes(
  memory_control : memory_object_control_t;
 out object_ready : boolean_t;
 out may_cache : boolean_t;
 out copy_strategy : memory_object_copy_strategy_t);







routine vm_set_default_memory_manager(
  host_priv : host_priv_t;
 inout default_manager : mach_port_copy_send_t);

skip;
# 391 "/usr/local/include/mach/mach.defs" 3
simpleroutine xxx_memory_object_lock_request(
  memory_control : memory_object_control_t;
  offset : vm_offset_t;
  size : vm_size_t;
  should_clean : boolean_t;
  should_flush : boolean_t;
  lock_value : vm_prot_t;
  reply_to : mach_port_t =
   MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);


simpleroutine memory_object_lock_request(
  memory_control : memory_object_control_t;
  offset : vm_offset_t;
  size : vm_size_t;
  should_return : memory_object_return_t;
  should_flush : boolean_t;
  lock_value : vm_prot_t;
  reply_to : mach_port_t =
   MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);


routine xxx_task_get_emulation_vector(
  task : task_t;
 out vector_start : int;
 out emulation_vector: xxx_emulation_vector_t, IsLong);


routine xxx_task_set_emulation_vector(
  task : task_t;
  vector_start : int;
  emulation_vector: xxx_emulation_vector_t, IsLong);






routine xxx_host_info(
  target_task : mach_port_t;
 out info : machine_info_data_t);





routine xxx_slot_info(
  target_task : task_t;
  slot : int;
 out info : machine_slot_data_t);






routine xxx_cpu_control(
  target_task : task_t;
  cpu : int;
  running : boolean_t);

skip;
skip;
skip;
skip;
skip;
skip;






routine task_suspend(
  target_task : task_t);







routine task_resume(
  target_task : task_t);





routine task_get_special_port(
  task : task_t;
  which_port : int;
 out special_port : mach_port_send_t);





routine task_set_special_port(
  task : task_t;
  which_port : int;
  special_port : mach_port_t);


routine xxx_task_info(
  target_task : task_t;
  flavor : int;
 out task_info_out : task_info_t, IsLong);







routine thread_create(
  parent_task : task_t;
 out child_thread : mach_port_send_t);
# 518 "/usr/local/include/mach/mach.defs" 3
routine thread_suspend(
  target_thread : thread_t);





routine thread_resume(
  target_thread : thread_t);
# 537 "/usr/local/include/mach/mach.defs" 3
routine thread_abort(
  target_thread : thread_t);


routine xxx_thread_get_state(
  target_thread : thread_t;
  flavor : int;
 out old_state : thread_state_t, IsLong);


routine xxx_thread_set_state(
  target_thread : thread_t;
  flavor : int;
  new_state : thread_state_t, IsLong);





routine thread_get_special_port(
  thread : thread_t;
  which_port : int;
 out special_port : mach_port_send_t);





routine thread_set_special_port(
  thread : thread_t;
  which_port : int;
  special_port : mach_port_t);


routine xxx_thread_info(
  target_thread : thread_t;
  flavor : int;
 out thread_info_out : thread_info_t, IsLong);





routine task_set_emulation(
  target_port : task_t;
  routine_entry_pt: vm_address_t;
  routine_number : int);







routine task_ras_control(
  target_task : task_t;
  basepc : vm_address_t;
  boundspc : vm_address_t;
  flavor : int);



skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
skip;
# 662 "/usr/local/include/mach/mach.defs" 3
routine vm_map(
  target_task : vm_task_t;
 inout address : vm_address_t;
  size : vm_size_t;
  mask : vm_address_t;
  anywhere : boolean_t;
  memory_object : memory_object_t;
  offset : vm_offset_t;
  copy : boolean_t;
  cur_protection : vm_prot_t;
  max_protection : vm_prot_t;
  inheritance : vm_inherit_t);
# 682 "/usr/local/include/mach/mach.defs" 3
simpleroutine memory_object_data_error(
  memory_control : memory_object_control_t;
  offset : vm_offset_t;
  size : vm_size_t;
  error_value : kern_return_t);





simpleroutine memory_object_set_attributes(
  memory_control : memory_object_control_t;
  object_ready : boolean_t;
  may_cache : boolean_t;
  copy_strategy : memory_object_copy_strategy_t);



simpleroutine memory_object_destroy(
  memory_control : memory_object_control_t;
  reason : kern_return_t);
# 726 "/usr/local/include/mach/mach.defs" 3
simpleroutine memory_object_data_supply(
  memory_control : memory_object_control_t;
  offset : vm_offset_t;
  data : pointer_t, Dealloc[];
  lock_value : vm_prot_t;
  precious : boolean_t;
  reply_to : mach_port_t =
   MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);

simpleroutine memory_object_ready(
  memory_control : memory_object_control_t;
  may_cache : boolean_t;
  copy_strategy : memory_object_copy_strategy_t);

simpleroutine memory_object_change_attributes(
  memory_control : memory_object_control_t;
  may_cache : boolean_t;
  copy_strategy : memory_object_copy_strategy_t;
  reply_to : mach_port_t =
   MACH_MSG_TYPE_MAKE_SEND_ONCE|polymorphic);

skip;
skip;
skip;






routine vm_machine_attribute(
  target_task : vm_task_t;
  address : vm_address_t;
  size : vm_size_t;
  attribute : vm_machine_attribute_t;
 inout value : vm_machine_attribute_val_t);

skip;
# 1 "mach.defs" 2