this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Small changes for PPC support, but this will be very tricky because of https://reviews.llvm.org/D50988

+6571 -1
+392
platform-include/mach/ppc/_structs.h
··· 1 + /* 2 + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + #ifndef _MACH_PPC__STRUCTS_H_ 33 + #define _MACH_PPC__STRUCTS_H_ 34 + 35 + #include <sys/cdefs.h> 36 + 37 + /* 38 + * ppc_thread_state is the structure that is exported to user threads for 39 + * use in status/mutate calls. This structure should never change. 40 + * 41 + */ 42 + 43 + #if __DARWIN_UNIX03 44 + #define _STRUCT_PPC_THREAD_STATE struct __darwin_ppc_thread_state 45 + _STRUCT_PPC_THREAD_STATE 46 + { 47 + unsigned int __srr0; /* Instruction address register (PC) */ 48 + unsigned int __srr1; /* Machine state register (supervisor) */ 49 + unsigned int __r0; 50 + unsigned int __r1; 51 + unsigned int __r2; 52 + unsigned int __r3; 53 + unsigned int __r4; 54 + unsigned int __r5; 55 + unsigned int __r6; 56 + unsigned int __r7; 57 + unsigned int __r8; 58 + unsigned int __r9; 59 + unsigned int __r10; 60 + unsigned int __r11; 61 + unsigned int __r12; 62 + unsigned int __r13; 63 + unsigned int __r14; 64 + unsigned int __r15; 65 + unsigned int __r16; 66 + unsigned int __r17; 67 + unsigned int __r18; 68 + unsigned int __r19; 69 + unsigned int __r20; 70 + unsigned int __r21; 71 + unsigned int __r22; 72 + unsigned int __r23; 73 + unsigned int __r24; 74 + unsigned int __r25; 75 + unsigned int __r26; 76 + unsigned int __r27; 77 + unsigned int __r28; 78 + unsigned int __r29; 79 + unsigned int __r30; 80 + unsigned int __r31; 81 + 82 + unsigned int __cr; /* Condition register */ 83 + unsigned int __xer; /* User's integer exception register */ 84 + unsigned int __lr; /* Link register */ 85 + unsigned int __ctr; /* Count register */ 86 + unsigned int __mq; /* MQ register (601 only) */ 87 + 88 + unsigned int __vrsave; /* Vector Save Register */ 89 + }; 90 + #else /* !__DARWIN_UNIX03 */ 91 + #define _STRUCT_PPC_THREAD_STATE struct ppc_thread_state 92 + _STRUCT_PPC_THREAD_STATE 93 + { 94 + unsigned int srr0; /* Instruction address register (PC) */ 95 + unsigned int srr1; /* Machine state register (supervisor) */ 96 + unsigned int r0; 97 + unsigned int r1; 98 + unsigned int r2; 99 + unsigned int r3; 100 + unsigned int r4; 101 + unsigned int r5; 102 + unsigned int r6; 103 + unsigned int r7; 104 + unsigned int r8; 105 + unsigned int r9; 106 + unsigned int r10; 107 + unsigned int r11; 108 + unsigned int r12; 109 + unsigned int r13; 110 + unsigned int r14; 111 + unsigned int r15; 112 + unsigned int r16; 113 + unsigned int r17; 114 + unsigned int r18; 115 + unsigned int r19; 116 + unsigned int r20; 117 + unsigned int r21; 118 + unsigned int r22; 119 + unsigned int r23; 120 + unsigned int r24; 121 + unsigned int r25; 122 + unsigned int r26; 123 + unsigned int r27; 124 + unsigned int r28; 125 + unsigned int r29; 126 + unsigned int r30; 127 + unsigned int r31; 128 + 129 + unsigned int cr; /* Condition register */ 130 + unsigned int xer; /* User's integer exception register */ 131 + unsigned int lr; /* Link register */ 132 + unsigned int ctr; /* Count register */ 133 + unsigned int mq; /* MQ register (601 only) */ 134 + 135 + unsigned int vrsave; /* Vector Save Register */ 136 + }; 137 + #endif /* __DARWIN_UNIX03 */ 138 + 139 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 140 + 141 + #pragma pack(4) /* Make sure the structure stays as we defined it */ 142 + 143 + #if __DARWIN_UNIX03 144 + #define _STRUCT_PPC_THREAD_STATE64 struct __darwin_ppc_thread_state64 145 + _STRUCT_PPC_THREAD_STATE64 146 + { 147 + unsigned long long __srr0; /* Instruction address register (PC) */ 148 + unsigned long long __srr1; /* Machine state register (supervisor) */ 149 + unsigned long long __r0; 150 + unsigned long long __r1; 151 + unsigned long long __r2; 152 + unsigned long long __r3; 153 + unsigned long long __r4; 154 + unsigned long long __r5; 155 + unsigned long long __r6; 156 + unsigned long long __r7; 157 + unsigned long long __r8; 158 + unsigned long long __r9; 159 + unsigned long long __r10; 160 + unsigned long long __r11; 161 + unsigned long long __r12; 162 + unsigned long long __r13; 163 + unsigned long long __r14; 164 + unsigned long long __r15; 165 + unsigned long long __r16; 166 + unsigned long long __r17; 167 + unsigned long long __r18; 168 + unsigned long long __r19; 169 + unsigned long long __r20; 170 + unsigned long long __r21; 171 + unsigned long long __r22; 172 + unsigned long long __r23; 173 + unsigned long long __r24; 174 + unsigned long long __r25; 175 + unsigned long long __r26; 176 + unsigned long long __r27; 177 + unsigned long long __r28; 178 + unsigned long long __r29; 179 + unsigned long long __r30; 180 + unsigned long long __r31; 181 + 182 + unsigned int __cr; /* Condition register */ 183 + unsigned long long __xer; /* User's integer exception register */ 184 + unsigned long long __lr; /* Link register */ 185 + unsigned long long __ctr; /* Count register */ 186 + 187 + unsigned int __vrsave; /* Vector Save Register */ 188 + }; 189 + #else /* !__DARWIN_UNIX03 */ 190 + #define _STRUCT_PPC_THREAD_STATE64 struct ppc_thread_state64 191 + _STRUCT_PPC_THREAD_STATE64 192 + { 193 + unsigned long long srr0; /* Instruction address register (PC) */ 194 + unsigned long long srr1; /* Machine state register (supervisor) */ 195 + unsigned long long r0; 196 + unsigned long long r1; 197 + unsigned long long r2; 198 + unsigned long long r3; 199 + unsigned long long r4; 200 + unsigned long long r5; 201 + unsigned long long r6; 202 + unsigned long long r7; 203 + unsigned long long r8; 204 + unsigned long long r9; 205 + unsigned long long r10; 206 + unsigned long long r11; 207 + unsigned long long r12; 208 + unsigned long long r13; 209 + unsigned long long r14; 210 + unsigned long long r15; 211 + unsigned long long r16; 212 + unsigned long long r17; 213 + unsigned long long r18; 214 + unsigned long long r19; 215 + unsigned long long r20; 216 + unsigned long long r21; 217 + unsigned long long r22; 218 + unsigned long long r23; 219 + unsigned long long r24; 220 + unsigned long long r25; 221 + unsigned long long r26; 222 + unsigned long long r27; 223 + unsigned long long r28; 224 + unsigned long long r29; 225 + unsigned long long r30; 226 + unsigned long long r31; 227 + 228 + unsigned int cr; /* Condition register */ 229 + unsigned long long xer; /* User's integer exception register */ 230 + unsigned long long lr; /* Link register */ 231 + unsigned long long ctr; /* Count register */ 232 + 233 + unsigned int vrsave; /* Vector Save Register */ 234 + }; 235 + #endif /* __DARWIN_UNIX03 */ 236 + 237 + #pragma pack() 238 + 239 + #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 240 + 241 + /* This structure should be double-word aligned for performance */ 242 + 243 + #if __DARWIN_UNIX03 244 + #define _STRUCT_PPC_FLOAT_STATE struct __darwin_ppc_float_state 245 + _STRUCT_PPC_FLOAT_STATE 246 + { 247 + double __fpregs[32]; 248 + 249 + unsigned int __fpscr_pad; /* fpscr is 64 bits, 32 bits of rubbish */ 250 + unsigned int __fpscr; /* floating point status register */ 251 + }; 252 + #else /* !__DARWIN_UNIX03 */ 253 + #define _STRUCT_PPC_FLOAT_STATE struct ppc_float_state 254 + _STRUCT_PPC_FLOAT_STATE 255 + { 256 + double fpregs[32]; 257 + 258 + unsigned int fpscr_pad; /* fpscr is 64 bits, 32 bits of rubbish */ 259 + unsigned int fpscr; /* floating point status register */ 260 + }; 261 + #endif /* __DARWIN_UNIX03 */ 262 + 263 + #pragma pack(4) /* Make sure the structure stays as we defined it */ 264 + 265 + #if __DARWIN_UNIX03 266 + #define _STRUCT_PPC_VECTOR_STATE struct __darwin_ppc_vector_state 267 + _STRUCT_PPC_VECTOR_STATE 268 + { 269 + #if defined(__LP64__) 270 + unsigned int __save_vr[32][4]; 271 + unsigned int __save_vscr[4]; 272 + #else 273 + unsigned long __save_vr[32][4]; 274 + unsigned long __save_vscr[4]; 275 + #endif 276 + unsigned int __save_pad5[4]; 277 + unsigned int __save_vrvalid; /* VRs that have been saved */ 278 + unsigned int __save_pad6[7]; 279 + }; 280 + #else /* !__DARWIN_UNIX03 */ 281 + #define _STRUCT_PPC_VECTOR_STATE struct ppc_vector_state 282 + _STRUCT_PPC_VECTOR_STATE 283 + { 284 + #if defined(__LP64__) 285 + unsigned int save_vr[32][4]; 286 + unsigned int save_vscr[4]; 287 + #else 288 + unsigned long save_vr[32][4]; 289 + unsigned long save_vscr[4]; 290 + #endif 291 + unsigned int save_pad5[4]; 292 + unsigned int save_vrvalid; /* VRs that have been saved */ 293 + unsigned int save_pad6[7]; 294 + }; 295 + #endif /* __DARWIN_UNIX03 */ 296 + 297 + #pragma pack() 298 + 299 + /* 300 + * ppc_exception_state 301 + * 302 + * This structure corresponds to some additional state of the user 303 + * registers as saved in the PCB upon kernel entry. They are only 304 + * available if an exception is passed out of the kernel, and even 305 + * then not all are guaranteed to be updated. 306 + * 307 + * Some padding is included in this structure which allows space for 308 + * servers to store temporary values if need be, to maintain binary 309 + * compatiblity. 310 + */ 311 + 312 + /* Exception state for 32-bit thread (on 32-bit processor) */ 313 + /* Still available on 64-bit processors, but may fall short */ 314 + /* of covering the full potential state (hi half available). */ 315 + 316 + #pragma pack(4) /* Make sure the structure stays as we defined it */ 317 + 318 + #if __DARWIN_UNIX03 319 + #define _STRUCT_PPC_EXCEPTION_STATE struct __darwin_ppc_exception_state 320 + _STRUCT_PPC_EXCEPTION_STATE 321 + { 322 + #if defined(__LP64__) 323 + unsigned int __dar; /* Fault registers for coredump */ 324 + unsigned int __dsisr; 325 + unsigned int __exception; /* number of powerpc exception taken */ 326 + unsigned int __pad0; /* align to 16 bytes */ 327 + unsigned int __pad1[4]; /* space in PCB "just in case" */ 328 + #else 329 + unsigned long __dar; /* Fault registers for coredump */ 330 + unsigned long __dsisr; 331 + unsigned long __exception; /* number of powerpc exception taken */ 332 + unsigned long __pad0; /* align to 16 bytes */ 333 + unsigned long __pad1[4]; /* space in PCB "just in case" */ 334 + #endif 335 + }; 336 + #else /* !__DARWIN_UNIX03 */ 337 + #define _STRUCT_PPC_EXCEPTION_STATE struct ppc_exception_state 338 + _STRUCT_PPC_EXCEPTION_STATE 339 + { 340 + #if defined(__LP64__) 341 + unsigned int dar; /* Fault registers for coredump */ 342 + unsigned int dsisr; 343 + unsigned int exception; /* number of powerpc exception taken */ 344 + unsigned int pad0; /* align to 16 bytes */ 345 + unsigned int pad1[4]; /* space in PCB "just in case" */ 346 + #else 347 + unsigned long dar; /* Fault registers for coredump */ 348 + unsigned long dsisr; 349 + unsigned long exception; /* number of powerpc exception taken */ 350 + unsigned long pad0; /* align to 16 bytes */ 351 + unsigned long pad1[4]; /* space in PCB "just in case" */ 352 + #endif 353 + }; 354 + #endif /* __DARWIN_UNIX03 */ 355 + 356 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 357 + #if __DARWIN_UNIX03 358 + #define _STRUCT_PPC_EXCEPTION_STATE64 struct __darwin_ppc_exception_state64 359 + _STRUCT_PPC_EXCEPTION_STATE64 360 + { 361 + unsigned long long __dar; /* Fault registers for coredump */ 362 + #if defined(__LP64__) 363 + unsigned int __dsisr; 364 + unsigned int __exception; /* number of powerpc exception taken */ 365 + unsigned int __pad1[4]; /* space in PCB "just in case" */ 366 + #else 367 + unsigned long __dsisr; 368 + unsigned long __exception; /* number of powerpc exception taken */ 369 + unsigned long __pad1[4]; /* space in PCB "just in case" */ 370 + #endif 371 + }; 372 + #else /* !__DARWIN_UNIX03 */ 373 + #define _STRUCT_PPC_EXCEPTION_STATE64 struct ppc_exception_state64 374 + _STRUCT_PPC_EXCEPTION_STATE64 375 + { 376 + unsigned long long dar; /* Fault registers for coredump */ 377 + #if defined(__LP64__) 378 + unsigned int dsisr; 379 + unsigned int exception; /* number of powerpc exception taken */ 380 + unsigned int pad1[4]; /* space in PCB "just in case" */ 381 + #else 382 + unsigned long dsisr; 383 + unsigned long exception; /* number of powerpc exception taken */ 384 + unsigned long pad1[4]; /* space in PCB "just in case" */ 385 + #endif 386 + }; 387 + #endif /* __DARWIN_UNIX03 */ 388 + #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 389 + 390 + #pragma pack() 391 + 392 + #endif /* _MACH_PPC__STRUCTS_H_ */
+781
platform-include/mach/ppc/asm.h
··· 1 + /* 2 + * Copyright (c) 2000-2007 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + #ifndef _PPC_ASM_H_ 32 + #define _PPC_ASM_H_ 33 + 34 + #define __ASMNL__ @ 35 + #define STRINGD .ascii 36 + 37 + #ifdef ASSEMBLER 38 + 39 + 40 + #define br0 0 41 + 42 + #define ARG0 r3 43 + #define ARG1 r4 44 + #define ARG2 r5 45 + #define ARG3 r6 46 + #define ARG4 r7 47 + #define ARG5 r8 48 + #define ARG6 r9 49 + #define ARG7 r10 50 + 51 + #define tmp0 r0 /* Temporary GPR remapping (603e specific) */ 52 + #define tmp1 r1 53 + #define tmp2 r2 54 + #define tmp3 r3 55 + 56 + /* SPR registers */ 57 + 58 + #define mq 0 /* MQ register for 601 emulation */ 59 + #define rtcu 4 /* RTCU - upper word of RTC for 601 emulation */ 60 + #define rtcl 5 /* RTCL - lower word of RTC for 601 emulation */ 61 + #define dsisr 18 62 + #define ppcDAR 19 63 + #define ppcdar 19 64 + #define dar 19 65 + #define SDR1 25 66 + #define sdr1 25 67 + #define srr0 26 68 + #define srr1 27 69 + #define vrsave 256 /* Vector Register save */ 70 + #define sprg0 272 71 + #define sprg1 273 72 + #define sprg2 274 73 + #define sprg3 275 74 + #define scomc 276 75 + #define scomd 277 76 + #define pvr 287 77 + 78 + #define IBAT0U 528 79 + #define IBAT0L 529 80 + #define IBAT1U 530 81 + #define IBAT1L 531 82 + #define IBAT2U 532 83 + #define IBAT2L 533 84 + #define IBAT3U 534 85 + #define IBAT3L 535 86 + #define ibat0u 528 87 + #define ibat0l 529 88 + #define ibat1u 530 89 + #define ibat1l 531 90 + #define ibat2u 532 91 + #define ibat2l 533 92 + #define ibat3u 534 93 + #define ibat3l 535 94 + 95 + #define DBAT0U 536 96 + #define DBAT0L 537 97 + #define DBAT1U 538 98 + #define DBAT1L 539 99 + #define DBAT2U 540 100 + #define DBAT2L 541 101 + #define DBAT3U 542 102 + #define DBAT3L 543 103 + #define dbat0u 536 104 + #define dbat0l 537 105 + #define dbat1u 538 106 + #define dbat1l 539 107 + #define dbat2u 540 108 + #define dbat2l 541 109 + #define dbat3u 542 110 + #define dbat3l 543 111 + 112 + #define ummcr2 928 /* Performance monitor control */ 113 + #define upmc5 929 /* Performance monitor counter */ 114 + #define upmc6 930 /* Performance monitor counter */ 115 + #define ubamr 935 /* Performance monitor mask */ 116 + #define ummcr0 936 /* Performance monitor control */ 117 + #define upmc1 937 /* Performance monitor counter */ 118 + #define upmc2 938 /* Performance monitor counter */ 119 + #define usia 939 /* User sampled instruction address */ 120 + #define ummcr1 940 /* Performance monitor control */ 121 + #define upmc3 941 /* Performance monitor counter */ 122 + #define upmc4 942 /* Performance monitor counter */ 123 + #define usda 943 /* User sampled data address */ 124 + #define mmcr2 944 /* Performance monitor control */ 125 + #define pmc5 945 /* Performance monitor counter */ 126 + #define pmc6 946 /* Performance monitor counter */ 127 + #define bamr 951 /* Performance monitor mask */ 128 + #define mmcr0 952 129 + #define pmc1 953 130 + #define pmc2 954 131 + #define sia 955 132 + #define mmcr1 956 133 + #define pmc3 957 134 + #define pmc4 958 135 + #define sda 959 /* Sampled data address */ 136 + #define dmiss 976 /* ea that missed */ 137 + #define trig0 976 138 + #define dcmp 977 /* compare value for the va that missed */ 139 + #define trig1 977 140 + #define hash1 978 /* pointer to first hash pteg */ 141 + #define trig2 978 142 + #define hash2 979 /* pointer to second hash pteg */ 143 + #define imiss 980 /* ea that missed */ 144 + #define tlbmiss 980 /* ea that missed */ 145 + #define icmp 981 /* compare value for the va that missed */ 146 + #define ptehi 981 /* compare value for the va that missed */ 147 + #define rpa 982 /* required physical address register */ 148 + #define ptelo 982 /* required physical address register */ 149 + #define l3pdet 984 /* l3pdet */ 150 + 151 + #define HID0 1008 /* Checkstop and misc enables */ 152 + #define hid0 1008 /* Checkstop and misc enables */ 153 + #define HID1 1009 /* Clock configuration */ 154 + #define hid1 1009 /* Clock configuration */ 155 + #define HID2 1016 /* Other processor controls */ 156 + #define hid2 1016 /* Other processor controls */ 157 + #define iabr 1010 /* Instruction address breakpoint register */ 158 + #define ictrl 1011 /* Instruction Cache Control */ 159 + #define ldstdb 1012 /* Load/Store Debug */ 160 + #define hid4 1012 /* Misc stuff */ 161 + #define dabr 1013 /* Data address breakpoint register */ 162 + #define msscr0 1014 /* Memory subsystem control */ 163 + #define hid5 1014 /* Misc stuff */ 164 + #define msscr1 1015 /* Memory subsystem debug */ 165 + #define msssr0 1015 /* Memory Subsystem Status */ 166 + #define ldstcr 1016 /* Load/Store Status/Control */ 167 + #define l2cr2 1016 /* L2 Cache control 2 */ 168 + #define l2cr 1017 /* L2 Cache control */ 169 + #define l3cr 1018 /* L3 Cache control */ 170 + #define ictc 1019 /* I-cache throttling control */ 171 + #define thrm1 1020 /* Thermal management 1 */ 172 + #define thrm2 1021 /* Thermal management 2 */ 173 + #define thrm3 1022 /* Thermal management 3 */ 174 + #define pir 1023 /* Processor ID Register */ 175 + 176 + 177 + /* SPR registers (64-bit, PPC970 specific) */ 178 + 179 + #define scomc_gp 276 180 + #define scomd_gp 277 181 + 182 + #define hsprg0 304 183 + #define hsprg1 305 184 + #define hdec 310 185 + #define hior 311 186 + #define rmor 312 187 + #define hrmor 313 188 + #define hsrr0 314 189 + #define hsrr1 315 190 + #define lpcr 318 191 + #define lpidr 319 192 + 193 + #define ummcra_gp 770 194 + #define upmc1_gp 771 195 + #define upmc2_gp 772 196 + #define upmc3_gp 773 197 + #define upmc4_gp 774 198 + #define upmc5_gp 775 199 + #define upmc6_gp 776 200 + #define upmc7_gp 777 201 + #define upmc8_gp 778 202 + #define ummcr0_gp 779 203 + #define usiar_gp 780 204 + #define usdar_gp 781 205 + #define ummcr1_gp 782 206 + #define uimc_gp 783 207 + 208 + #define mmcra_gp 786 209 + #define pmc1_gp 787 210 + #define pmc2_gp 788 211 + #define pmc3_gp 789 212 + #define pmc4_gp 790 213 + #define pmc5_gp 791 214 + #define pmc6_gp 792 215 + #define pmc7_gp 793 216 + #define pmc8_gp 794 217 + #define mmcr0_gp 795 218 + #define siar_gp 796 219 + #define sdar_gp 797 220 + #define mmcr1_gp 798 221 + #define imc_gp 799 222 + 223 + #define trig0_gp 976 224 + #define trig1_gp 977 225 + #define trig2_gp 978 226 + 227 + #define dabrx 1015 228 + 229 + ; hid0 bits 230 + #define emcp 0 231 + #define emcpm 0x80000000 232 + #define dbp 1 233 + #define dbpm 0x40000000 234 + #define eba 2 235 + #define ebam 0x20000000 236 + #define ebd 3 237 + #define ebdm 0x10000000 238 + #define sbclk 4 239 + #define sbclkm 0x08000000 240 + #define eclk 6 241 + #define eclkm 0x02000000 242 + #define par 7 243 + #define parm 0x01000000 244 + #define sten 7 245 + #define stenm 0x01000000 246 + #define dnap 7 247 + #define dnapm 0x01000000 248 + #define doze 8 249 + #define dozem 0x00800000 250 + #define nap 9 251 + #define napm 0x00400000 252 + #define sleep 10 253 + #define sleepm 0x00200000 254 + #define dpm 11 255 + #define dpmm 0x00100000 256 + #define riseg 12 257 + #define risegm 0x00080000 258 + #define eiec 13 259 + #define eiecm 0x00040000 260 + #define mum 14 261 + #define mumm 0x00020000 262 + #define nhr 15 263 + #define nhrm 0x00010000 264 + #define ice 16 265 + #define icem 0x00008000 266 + #define dce 17 267 + #define dcem 0x00004000 268 + #define ilock 18 269 + #define ilockm 0x00002000 270 + #define dlock 19 271 + #define dlockm 0x00001000 272 + #define exttben 19 273 + #define icfi 20 274 + #define icfim 0x00000800 275 + #define dcfi 21 276 + #define dcfim 0x00000400 277 + #define spd 22 278 + #define spdm 0x00000200 279 + #define hdice 23 280 + #define hdicem 0x00000100 281 + #define sge 24 282 + #define sgem 0x00000080 283 + #define dcfa 25 284 + #define dcfam 0x00000040 285 + #define btic 26 286 + #define bticm 0x00000020 287 + #define lrstk 27 288 + #define lrstkm 0x00000010 289 + #define abe 28 290 + #define abem 0x00000008 291 + #define fold 28 292 + #define foldm 0x00000008 293 + #define bht 29 294 + #define bhtm 0x00000004 295 + #define nopdst 30 296 + #define nopdstm 0x00000002 297 + #define nopti 31 298 + #define noptim 0x00000001 299 + 300 + ; hid1 bits 301 + #define hid1pcem 0xF8000000 302 + #define hid1prem 0x06000000 303 + #define hid1dfs0 8 304 + #define hid1dfs0m 0x00800000 305 + #define hid1dfs1 9 306 + #define hid1dfs1m 0x00400000 307 + #define hid1pi0 14 308 + #define hid1pi0m 0x00020000 309 + #define hid1FCPErr 14 310 + #define hid1ps 15 311 + #define hid1FCD0PErr 15 312 + #define hid1psm 0x00010000 313 + #define hid1pc0 0x0000F800 314 + #define hid1pr0 0x00000600 315 + #define hid1pc1 0x000000F8 316 + #define hid1pc0 0x0000F800 317 + #define hid1pr1 0x00000006 318 + #define hid1FCD1PErr 16 319 + #define hid1FIERATErr 17 320 + 321 + ; hid2 bits 322 + #define hid2vmin 18 323 + #define hid2vminm 0x00002000 324 + 325 + ; msscr0 bits 326 + #define shden 0 327 + #define shdenm 0x80000000 328 + #define shden3 1 329 + #define shdenm3 0x40000000 330 + #define l1intvs 2 331 + #define l1intve 4 332 + #define l1intvb 0x38000000 333 + #define l2intvs 5 334 + #define l2intve 7 335 + #define l2intvb 0x07000000 336 + #define dl1hwf 8 337 + #define dl1hwfm 0x00800000 338 + #define dbsiz 9 339 + #define dbsizm 0x00400000 340 + #define emode 10 341 + #define emodem 0x00200000 342 + #define abgd 11 343 + #define abgdm 0x00100000 344 + #define tfsts 24 345 + #define tfste 25 346 + #define tfstm 0x000000C0 347 + #define l2pfes 30 348 + #define l2pfee 31 349 + #define l2pfem 0x00000003 350 + 351 + ; msscr1 bits 352 + #define cqd 15 353 + #define cqdm 0x00010000 354 + #define csqs 1 355 + #define csqe 2 356 + #define csqm 0x60000000 357 + 358 + ; msssr1 bits - 7450 359 + #define vgL2PARA 0 360 + #define vgL3PARA 1 361 + #define vgL2COQEL 2 362 + #define vgL3COQEL 3 363 + #define vgL2CTR 4 364 + #define vgL3CTR 5 365 + #define vgL2COQR 6 366 + #define vgL3COQR 7 367 + #define vgLMQ 8 368 + #define vgSMC 9 369 + #define vgSNP 10 370 + #define vgBIU 11 371 + #define vgSMCE 12 372 + #define vgL2TAG 13 373 + #define vgL2DAT 14 374 + #define vgL3TAG 15 375 + #define vgL3DAT 16 376 + #define vgAPE 17 377 + #define vgDPE 18 378 + #define vgTEA 19 379 + 380 + ; srr1 bits 381 + #define icmck 1 382 + #define icmckm 0x40000000 383 + #define dcmck 2 384 + #define dcmckm 0x20000000 385 + #define l2mck 3 386 + #define l2mckm 0x10000000 387 + #define tlbmck 4 388 + #define tlbmckm 0x08000000 389 + #define brmck 5 390 + #define brmckm 0x04000000 391 + #define othmck 10 392 + #define othmckm 0x00200000 393 + #define l2dpmck 11 394 + #define l2dpmckm 0x00100000 395 + #define mcpmck 12 396 + #define mcpmckm 0x00080000 397 + #define teamck 13 398 + #define teamckm 0x00040000 399 + #define dpmck 14 400 + #define dpmckm 0x00020000 401 + #define apmck 15 402 + #define apmckm 0x00010000 403 + 404 + #define mckIFUE 42 405 + #define mckLDST 43 406 + #define mckXCs 44 407 + #define mckXCe 45 408 + #define mckNoErr 0 409 + #define mckIFSLBPE 1 410 + #define mckIFTLBPE 2 411 + #define mckIFTLBUE 3 412 + 413 + ; dsisr bits 414 + #define mckUEdfr 16 415 + #define mckUETwDfr 17 416 + #define mckL1DCPE 18 417 + #define mckL1DTPE 19 418 + #define mckDEPE 20 419 + #define mckTLBPE 21 420 + #define mckSLBPE 23 421 + 422 + ; Async MCK source 423 + #define AsyMCKSrc 0x0226 424 + #define AsyMCKRSrc 0x0227 425 + #define AsyMCKext 0 426 + #define AsyMCKfir 1 427 + #define AsyMCKhri 2 428 + #define AsyMCKdbg 3 429 + #define AsyMCKncstp 4 430 + 431 + ; Core FIR 432 + #define cFIR 0x0300 433 + #define cFIRrst 0x0310 434 + #define cFIRICachePE 0 435 + #define cFIRITagPE0 1 436 + #define cFIRITagPE1 2 437 + #define cFIRIEratPE 3 438 + #define cFIRIFUL2UE 4 439 + #define cFIRIFUCS 5 440 + #define cFIRDCachePE 6 441 + #define cFIRDTagPE 7 442 + #define cFIRDEratPE 8 443 + #define cFIRTLBPE 9 444 + #define cFIRSLBPE 10 445 + #define cFIRSL2UE 11 446 + 447 + ; Core Error Inject 448 + #define CoreErrI 0x0350 449 + #define CoreIFU 0 450 + #define CoreLSU 1 451 + #define CoreRate0 2 452 + #define CoreRate1 3 453 + #define CoreOnce 0 454 + #define CoreSolid 2 455 + #define CorePulse 3 456 + 457 + ; L2 FIR 458 + #define l2FIR 0x0400 459 + #define l2FIRrst 0x0410 460 + 461 + ; Bus FIR 462 + #define busFIR 0x0A00 463 + #define busFIRrst 0x0A10 464 + 465 + ; HID4 466 + #define hid4RMCI 23 467 + #define hid4FAlgn 24 468 + #define hid4DisPF 25 469 + #define hid4ResPF 26 470 + #define hid4EnSPTW 27 471 + #define hid4L1DCFI 28 472 + #define hid4DisDERpg 31 473 + #define hid4DisDCTpg 36 474 + #define hid4DisDCpg 41 475 + #define hid4DisTLBpg 48 476 + #define hid4DisSLBpg 54 477 + #define hid4MckEIEna 55 478 + 479 + ; L2 cache control 480 + #define l2e 0 481 + #define l2em 0x80000000 482 + #define l2pe 1 483 + #define l2pem 0x40000000 484 + #define l2siz 2 485 + #define l2sizf 3 486 + #define l2sizm 0x30000000 487 + #define l2clk 4 488 + #define l2clkf 6 489 + #define l2clkm 0x0E000000 490 + #define l2ram 7 491 + #define l2ramf 8 492 + #define l2ramm 0x01800000 493 + #define l2do 9 494 + #define l2dom 0x00400000 495 + #define l2i 10 496 + #define l2im 0x00200000 497 + #define l2ctl 11 498 + #define l2ctlm 0x00100000 499 + #define l2ionly 11 500 + #define l2ionlym 0x00100000 501 + #define l2wt 12 502 + #define l2wtm 0x00080000 503 + #define l2ts 13 504 + #define l2tsm 0x00040000 505 + #define l2oh 14 506 + #define l2ohf 15 507 + #define l2ohm 0x00030000 508 + #define l2donly 15 509 + #define l2donlym 0x00010000 510 + #define l2sl 16 511 + #define l2slm 0x00008000 512 + #define l2df 17 513 + #define l2dfm 0x00004000 514 + #define l2byp 18 515 + #define l2bypm 0x00002000 516 + #define l2fa 19 517 + #define l2fam 0x00001000 518 + #define l2hwf 20 519 + #define l2hwfm 0x00000800 520 + #define l2io 21 521 + #define l2iom 0x00000400 522 + #define l2clkstp 22 523 + #define l2clkstpm 0x00000200 524 + #define l2dro 23 525 + #define l2drom 0x00000100 526 + #define l2ctr 24 527 + #define l2ctrf 30 528 + #define l2ctrm 0x000000FE 529 + #define l2ip 31 530 + #define l2ipm 0x00000001 531 + 532 + ; L3 cache control 533 + #define l3e 0 534 + #define l3em 0x80000000 535 + #define l3pe 1 536 + #define l3pem 0x40000000 537 + #define l3siz 3 538 + #define l3sizm 0x10000000 539 + #define l3clken 4 540 + #define l3clkenm 0x08000000 541 + #define l3dx 5 542 + #define l3dxm 0x04000000 543 + #define l3clk 6 544 + #define l3clkf 8 545 + #define l3clkm 0x03800000 546 + #define l3io 9 547 + #define l3iom 0x00400000 548 + #define l3spo 13 549 + #define l3spom 0x00040000 550 + #define l3cksp 14 551 + #define l3ckspf 15 552 + #define l3ckspm 0x00030000 553 + #define l3psp 16 554 + #define l3pspf 18 555 + #define l3pspm 0x0000E000 556 + #define l3rep 19 557 + #define l3repm 0x00001000 558 + #define l3hwf 20 559 + #define l3hwfm 0x00000800 560 + #define l3i 21 561 + #define l3im 0x00000400 562 + #define l3rt 22 563 + #define l3rtf 23 564 + #define l3rtm 0x00000300 565 + #define l3dro 23 566 + #define l3drom 0x00000100 567 + #define l3cya 24 568 + #define l3cyam 0x00000080 569 + #define l3donly 25 570 + #define l3donlym 0x00000040 571 + #define l3dmem 29 572 + #define l3dmemm 0x00000004 573 + #define l3dmsiz 31 574 + #define l3dmsizm 0x00000001 575 + 576 + #define thrmtin 0 577 + #define thrmtinm 0x80000000 578 + #define thrmtiv 1 579 + #define thrmtivm 0x40000000 580 + #define thrmthrs 2 581 + #define thrmthre 8 582 + #define thrmthrm 0x3F800000 583 + #define thrmtid 29 584 + #define thrmtidm 0x00000004 585 + #define thrmtie 30 586 + #define thrmtiem 0x00000002 587 + #define thrmv 31 588 + #define thrmvm 0x00000001 589 + 590 + #define thrmsitvs 15 591 + #define thrmsitve 30 592 + #define thrmsitvm 0x0001FFFE 593 + #define thrme 31 594 + #define thrmem 0x00000001 595 + 596 + #define ictcfib 23 597 + #define ictcfie 30 598 + #define ictcfim 0x000001FE 599 + #define ictce 31 600 + #define ictcem 0x00000001 601 + 602 + #define slbESID 36 603 + #define slbKey 52 604 + #define slbIndex 52 605 + #define slbV 36 606 + #define slbVm 0x08000000 607 + #define slbCnt 64 608 + 609 + /* 610 + * Macros to access high and low word values of an address 611 + */ 612 + 613 + #define HIGH_CADDR(x) ha16(x) 614 + #define HIGH_ADDR(x) hi16(x) 615 + #define LOW_ADDR(x) lo16(x) 616 + 617 + #endif /* ASSEMBLER */ 618 + 619 + #define cr0_lt 0 620 + #define cr0_gt 1 621 + #define cr0_eq 2 622 + #define cr0_so 3 623 + #define cr0_un 3 624 + #define cr1_lt 4 625 + #define cr1_gt 5 626 + #define cr1_eq 6 627 + #define cr1_so 7 628 + #define cr1_un 7 629 + #define cr2_lt 8 630 + #define cr2_gt 9 631 + #define cr2_eq 10 632 + #define cr2_so 11 633 + #define cr2_un 11 634 + #define cr3_lt 12 635 + #define cr3_gt 13 636 + #define cr3_eq 14 637 + #define cr3_so 15 638 + #define cr3_un 15 639 + #define cr4_lt 16 640 + #define cr4_gt 17 641 + #define cr4_eq 18 642 + #define cr4_so 19 643 + #define cr4_un 19 644 + #define cr5_lt 20 645 + #define cr5_gt 21 646 + #define cr5_eq 22 647 + #define cr5_so 23 648 + #define cr5_un 23 649 + #define cr6_lt 24 650 + #define cr6_gt 25 651 + #define cr6_eq 26 652 + #define cr6_so 27 653 + #define cr6_un 27 654 + #define cr7_lt 28 655 + #define cr7_gt 29 656 + #define cr7_eq 30 657 + #define cr7_so 31 658 + #define cr7_un 31 659 + 660 + /* GUS Mode Register */ 661 + #define GUSModeReg 0x0430 662 + #define GUSMdmapen 0x00008000 663 + #define GUSMstgtdis 0x00000080 664 + #define GUSMstgttim 0x00000038 665 + #define GUSMstgttoff 0x00000004 666 + 667 + /* PowerTune */ 668 + #define PowerTuneControlReg 0x0AA001 669 + #define PowerTuneStatusReg 0x408001 670 + 671 + /* Code inject */ 672 + // The following bits are always on in the MSR when injected code is executing 673 + #define ijemon 0x00000010 674 + // The following bits are always off in the MSR when injected code it executing 675 + #define ijemoff 0x0000C620 676 + #define ijemtrap ijemon|1 677 + // The following is the inject exit trap 678 + #define ijtrap 0x0FFFC9C9 679 + 680 + /* Misc */ 681 + #define srr1clr 0x783F0000 682 + 683 + /* Tags are placed before Immediately Following Code (IFC) for the debugger 684 + * to be able to deduce where to find various registers when backtracing 685 + * 686 + * We only define the values as we use them, see SVR4 ABI PowerPc Supplement 687 + * for more details (defined in ELF spec). 688 + */ 689 + 690 + #define TAG_NO_FRAME_USED 0x00000000 691 + 692 + /* (should use genassym to get these offsets) */ 693 + 694 + #define FM_BACKPTR 0 695 + #define FM_CR_SAVE 4 696 + #define FM_LR_SAVE 8 /* MacOSX is NOT following the ABI at the moment.. */ 697 + #define FM_SIZE 64 /* minimum frame contents, backptr and LR save. Make sure it is quadaligned */ 698 + #define FM_ARG0 56 699 + #define FM_ALIGN(l) ((l+15)&-16) 700 + #define PK_SYSCALL_BEGIN 0x7000 701 + 702 + 703 + /* redzone is the area under the stack pointer which must be preserved 704 + * when taking a trap, interrupt etc. 705 + */ 706 + #define FM_REDZONE 224 /* is ((32-14+1)*4) */ 707 + 708 + #define COPYIN_ARG0_OFFSET FM_ARG0 709 + 710 + #ifdef MACH_KERNEL 711 + #include <mach_kdb.h> 712 + #else /* MACH_KERNEL */ 713 + #define MACH_KDB 0 714 + #endif /* MACH_KERNEL */ 715 + 716 + #define BREAKPOINT_TRAP tw 4,r4,r4 717 + 718 + /* There is another definition of ALIGN for .c sources */ 719 + #ifndef __LANGUAGE_ASSEMBLY 720 + #define ALIGN 4 721 + #endif /* __LANGUAGE_ASSEMBLY */ 722 + 723 + #ifndef FALIGN 724 + #define FALIGN 4 /* Align functions on words for now. Cachelines is better */ 725 + #endif 726 + 727 + #define LB(x,n) n 728 + #if __STDC__ 729 + #define LCL(x) L ## x 730 + #define EXT(x) _ ## x 731 + #define LEXT(x) _ ## x ## : 732 + #define LBc(x,n) n ## : 733 + #define LBb(x,n) n ## b 734 + #define LBf(x,n) n ## f 735 + #else /* __STDC__ */ 736 + #define LCL(x) L/**/x 737 + #define EXT(x) _/**/x 738 + #define LEXT(x) _/**/x/**/: 739 + #define LBc(x,n) n/**/: 740 + #define LBb(x,n) n/**/b 741 + #define LBf(x,n) n/**/f 742 + #endif /* __STDC__ */ 743 + 744 + #define String .asciz 745 + #define Value .word 746 + #define Times(a,b) (a*b) 747 + #define Divide(a,b) (a/b) 748 + 749 + #define data16 .byte 0x66 750 + #define addr16 .byte 0x67 751 + 752 + #define MCOUNT 753 + 754 + #define ELF_FUNC(x) 755 + #define ELF_DATA(x) 756 + #define ELF_SIZE(x,s) 757 + 758 + #define Entry(x,tag) .text@.align FALIGN@ .globl EXT(x)@ LEXT(x) 759 + #define ENTRY(x,tag) Entry(x,tag)@MCOUNT 760 + #define ENTRY2(x,y,tag) .text@ .align FALIGN@ .globl EXT(x)@ .globl EXT(y)@ \ 761 + LEXT(x)@ LEXT(y) @\ 762 + MCOUNT 763 + #if __STDC__ 764 + #define ASENTRY(x) .globl x @ .align FALIGN; x ## @ MCOUNT 765 + #else 766 + #define ASENTRY(x) .globl x @ .align FALIGN; x @ MCOUNT 767 + #endif /* __STDC__ */ 768 + #define DATA(x) .globl EXT(x) @ .align ALIGN @ LEXT(x) 769 + 770 + 771 + #define End(x) ELF_SIZE(x,.-x) 772 + #define END(x) End(EXT(x)) 773 + #define ENDDATA(x) END(x) 774 + #define Enddata(x) End(x) 775 + 776 + /* These defines are here for .c files that wish to reference global symbols 777 + * within __asm__ statements. 778 + */ 779 + #define CC_SYM_PREFIX "_" 780 + 781 + #endif /* _PPC_ASM_H_ */
+74
platform-include/mach/ppc/boolean.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + /* 32 + * Mach Operating System 33 + * Copyright (c) 1991,1990,1989 Carnegie Mellon University 34 + * All Rights Reserved. 35 + * 36 + * Permission to use, copy, modify and distribute this software and its 37 + * documentation is hereby granted, provided that both the copyright 38 + * notice and this permission notice appear in all copies of the 39 + * software, derivative works or modified versions, and any portions 40 + * thereof, and that both notices appear in supporting documentation. 41 + * 42 + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 43 + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 44 + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 45 + * 46 + * Carnegie Mellon requests users of this software to return to 47 + * 48 + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 49 + * School of Computer Science 50 + * Carnegie Mellon University 51 + * Pittsburgh PA 15213-3890 52 + * 53 + * any improvements or extensions that they make and grant Carnegie Mellon 54 + * the rights to redistribute these changes. 55 + */ 56 + /* 57 + */ 58 + 59 + /* 60 + * File: boolean.h 61 + * 62 + * Boolean type, for ppc. 63 + */ 64 + 65 + #ifndef _MACH_PPC_BOOLEAN_H_ 66 + #define _MACH_PPC_BOOLEAN_H_ 67 + 68 + #if defined(__ppc64__) 69 + typedef unsigned int boolean_t; 70 + #else 71 + typedef int boolean_t; 72 + #endif 73 + 74 + #endif /* _MACH_PPC_BOOLEAN_H_ */
+119
platform-include/mach/ppc/exception.h
··· 1 + /* 2 + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + /* 32 + * Copyright (c) 1990, 1991, 1992, The University of Utah and 33 + * the Center for Software Science at the University of Utah (CSS). 34 + * All rights reserved. 35 + * 36 + * Permission to use, copy, modify and distribute this software is hereby 37 + * granted provided that (1) source code retains these copyright, permission, 38 + * and disclaimer notices, and (2) redistributions including binaries 39 + * reproduce the notices in supporting documentation, and (3) all advertising 40 + * materials mentioning features or use of this software display the following 41 + * acknowledgement: ``This product includes software developed by the Center 42 + * for Software Science at the University of Utah.'' 43 + * 44 + * THE UNIVERSITY OF UTAH AND CSS ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 45 + * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSS DISCLAIM ANY LIABILITY OF 46 + * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 47 + * 48 + * CSS requests users of this software to return to css-dist@cs.utah.edu any 49 + * improvements that they make and grant CSS redistribution rights. 50 + * 51 + * Utah $Hdr: $ 52 + */ 53 + 54 + #ifndef _MACH_PPC_EXCEPTION_H_ 55 + #define _MACH_PPC_EXCEPTION_H_ 56 + 57 + #define EXC_TYPES_COUNT 11 /* incl. illegal exception 0 */ 58 + 59 + #define EXCEPTION_CODE_MAX 2 /* elements in vector (code+subcode) */ 60 + /* 61 + * EXC_BAD_INSTRUCTION 62 + */ 63 + 64 + #define EXC_PPC_INVALID_SYSCALL 1 /* invalid syscall number */ 65 + #define EXC_PPC_UNIPL_INST 2 /* unimplemented instruction */ 66 + #define EXC_PPC_PRIVINST 3 /* priviledged instruction */ 67 + #define EXC_PPC_PRIVREG 4 /* priviledged register */ 68 + #define EXC_PPC_TRACE 5 /* trace/single-step */ 69 + #define EXC_PPC_PERFMON 6 /* performance monitor */ 70 + 71 + /* 72 + * EXC_BAD_ACCESS 73 + * Note: do not conflict with kern_return_t values returned by vm_fault 74 + */ 75 + 76 + #define EXC_PPC_VM_PROT_READ 0x101 /* error reading syscall args */ 77 + #define EXC_PPC_BADSPACE 0x102 /* bad space referenced */ 78 + #define EXC_PPC_UNALIGNED 0x103 /* unaligned data reference */ 79 + 80 + /* 81 + * EXC_ARITHMETIC 82 + */ 83 + 84 + #define EXC_PPC_OVERFLOW 1 /* integer overflow */ 85 + #define EXC_PPC_ZERO_DIVIDE 2 /* integer divide by zero */ 86 + #define EXC_PPC_FLT_INEXACT 3 /* IEEE inexact exception */ 87 + #define EXC_PPC_FLT_ZERO_DIVIDE 4 /* IEEE zero divide */ 88 + #define EXC_PPC_FLT_UNDERFLOW 5 /* IEEE floating underflow */ 89 + #define EXC_PPC_FLT_OVERFLOW 6 /* IEEE floating overflow */ 90 + #define EXC_PPC_FLT_NOT_A_NUMBER 7 /* IEEE not a number */ 91 + 92 + /* 93 + * EXC_PPC_NOEMULATION should go away when we add software emulation 94 + * for floating point. Right now we don't support this. 95 + */ 96 + 97 + #define EXC_PPC_NOEMULATION 8 /* no floating point emulation */ 98 + #define EXC_PPC_ALTIVECASSIST 9 /* Altivec Denorm Assist */ 99 + 100 + /* 101 + * EXC_SOFTWARE 102 + * Note: 0x10000-0x10003 in use for unix signal 103 + */ 104 + #define EXC_PPC_TRAP 1 /* Program trap */ 105 + #define EXC_PPC_MIGRATE 0x10100 /* Time to bolt */ 106 + 107 + 108 + /* 109 + * EXC_BREAKPOINT 110 + */ 111 + 112 + #define EXC_PPC_BREAKPOINT EXC_PPC_TRAP /* breakpoint trap */ 113 + 114 + /* 115 + * machine dependent exception masks 116 + */ 117 + #define EXC_MASK_MACHINE 0 118 + 119 + #endif /* _MACH_PPC_EXCEPTION_H_ */
+74
platform-include/mach/ppc/kern_return.h
··· 1 + /* 2 + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + /* 32 + * Mach Operating System 33 + * Copyright (c) 1991,1990,1989 Carnegie Mellon University 34 + * All Rights Reserved. 35 + * 36 + * Permission to use, copy, modify and distribute this software and its 37 + * documentation is hereby granted, provided that both the copyright 38 + * notice and this permission notice appear in all copies of the 39 + * software, derivative works or modified versions, and any portions 40 + * thereof, and that both notices appear in supporting documentation. 41 + * 42 + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 43 + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 44 + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 45 + * 46 + * Carnegie Mellon requests users of this software to return to 47 + * 48 + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 49 + * School of Computer Science 50 + * Carnegie Mellon University 51 + * Pittsburgh PA 15213-3890 52 + * 53 + * any improvements or extensions that they make and grant Carnegie Mellon 54 + * the rights to redistribute these changes. 55 + */ 56 + /* 57 + */ 58 + 59 + /* 60 + * File: kern_return.h 61 + * Author: Avadis Tevanian, Jr., Michael Wayne Young 62 + * Date: 1985 63 + * 64 + * Machine-dependent kernel return definitions. 65 + */ 66 + 67 + #ifndef _MACH_PPC_KERN_RETURN_H_ 68 + #define _MACH_PPC_KERN_RETURN_H_ 69 + 70 + #ifndef ASSEMBLER 71 + typedef int kern_return_t; 72 + #endif /* ASSEMBLER */ 73 + 74 + #endif /* _MACH_PPC_KERN_RETURN_H_ */
+126
platform-include/mach/ppc/machine_types.defs
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + /* 33 + * Header file for basic, machine-dependent data types. 34 + */ 35 + 36 + #ifndef _PPC_VM_TYPES_DEFS_ 37 + #define _PPC_VM_TYPES_DEFS_ 38 + 39 + type short = int16_t; 40 + type int = int32_t; 41 + type unsigned = uint32_t; 42 + 43 + type float = MACH_MSG_TYPE_REAL_32; 44 + type double = MACH_MSG_TYPE_REAL_64; 45 + 46 + /* from ISO/IEC 988:1999 spec */ 47 + /* 7.18.1.4 Integer types capable of holding object pointers */ 48 + /* 49 + * The [u]intptr_t types for the native 50 + * integer type, e.g. 32 or 64 or.. whatever 51 + * register size the machine has. They are 52 + * used for entities that might be either 53 + * [unsigned] integers or pointers, and for 54 + * type-casting between the two. 55 + * 56 + * For instance, the IPC system represents 57 + * a port in user space as an integer and 58 + * in kernel space as a pointer. 59 + */ 60 + #if defined(__ppc64__) 61 + type uintptr_t = uint64_t; 62 + type intptr_t = int64_t; 63 + #else 64 + type uintptr_t = uint32_t; 65 + type intptr_t = int32_t; 66 + #endif 67 + 68 + /* 69 + * These are the legacy Mach types that are 70 + * the [rough] equivalents of the standards above. 71 + * They were defined in terms of int, not 72 + * long int, so they remain separate. 73 + */ 74 + #if defined(__ppc64__) 75 + type register_t = int64_t; 76 + #else 77 + type register_t = int32_t; 78 + #endif 79 + type integer_t = int32_t; 80 + type natural_t = uint32_t; 81 + 82 + /* 83 + * These are the VM types that scale with the address 84 + * space size of a given process. 85 + */ 86 + 87 + #if defined(__ppc64__) 88 + type vm_address_t = uint64_t; 89 + type vm_offset_t = uint64_t; 90 + type vm_size_t = uint64_t; 91 + #else 92 + type vm_address_t = natural_t; 93 + type vm_offset_t = natural_t; 94 + type vm_size_t = natural_t; 95 + #endif 96 + 97 + /* 98 + * The mach_vm_xxx_t types are sized to hold the 99 + * maximum pointer, offset, etc... supported on the 100 + * platform. 101 + */ 102 + type mach_vm_address_t = uint64_t; 103 + type mach_vm_offset_t = uint64_t; 104 + type mach_vm_size_t = uint64_t; 105 + 106 + #if MACH_IPC_COMPAT 107 + /* 108 + * For the old IPC interface 109 + */ 110 + #define MSG_TYPE_PORT_NAME uint32_t 111 + 112 + #endif /* MACH_IPC_COMPAT */ 113 + 114 + /* 115 + * These are types used internal to Mach to implement the 116 + * legacy 32-bit VM APIs published by the kernel. 117 + */ 118 + #define VM32_SUPPORT 1 119 + 120 + type vm32_address_t = uint32_t; 121 + type vm32_offset_t = uint32_t; 122 + type vm32_size_t = uint32_t; 123 + 124 + #endif /* _PPC_VM_TYPES_DEFS_ */ 125 + 126 + /* vim: set ft=c : */
+43
platform-include/mach/ppc/ndr_def.h
··· 1 + /* 2 + * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + #include <mach/ndr.h> 33 + 34 + NDR_record_t NDR_record = { 35 + 0, /* mig_reserved */ 36 + 0, /* mig_reserved */ 37 + 0, /* mig_reserved */ 38 + NDR_PROTOCOL_2_0, 39 + NDR_INT_BIG_ENDIAN, 40 + NDR_CHAR_ASCII, 41 + NDR_FLOAT_IEEE, 42 + 0, 43 + };
+42
platform-include/mach/ppc/processor_info.h
··· 1 + /* 2 + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + 29 + /* 30 + * File: mach/ppc/processor_info.h 31 + * 32 + * Data structure definitions for ppc specific processor control 33 + */ 34 + 35 + #ifndef _MACH_PPC_PROCESSOR_INFO_H_ 36 + #define _MACH_PPC_PROCESSOR_INFO_H_ 37 + 38 + #include <mach/machine.h> 39 + #include <mach/message.h> 40 + 41 + 42 + #endif /* _MACH_PPC_PROCESSOR_INFO_H_ */
+35
platform-include/mach/ppc/rpc.h
··· 1 + /* 2 + * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + #ifndef _MACH_PPC_RPC_H_ 33 + #define _MACH_PPC_RPC_H_ 34 + 35 + #endif /* _MACH_PPC_RPC_H_ */
+413
platform-include/mach/ppc/sdt_isa.h
··· 1 + /* 2 + * CDDL HEADER START 3 + * 4 + * The contents of this file are subject to the terms of the 5 + * Common Development and Distribution License, Version 1.0 only 6 + * (the "License"). You may not use this file except in compliance 7 + * with the License. 8 + * 9 + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 + * or http://www.opensolaris.org/os/licensing. 11 + * See the License for the specific language governing permissions 12 + * and limitations under the License. 13 + * 14 + * When distributing Covered Code, include this CDDL HEADER in each 15 + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 + * If applicable, add the following below this CDDL HEADER, with the 17 + * fields enclosed by brackets "[]" replaced with your own identifying 18 + * information: Portions Copyright [yyyy] [name of copyright owner] 19 + * 20 + * CDDL HEADER END 21 + */ 22 + /* 23 + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24 + * Use is subject to license terms. 25 + */ 26 + 27 + #ifndef _MACH_PPC_SDT_ISA_H 28 + #define _MACH_PPC_SDT_ISA_H 29 + 30 + /* #pragma ident "@(#)sdt.h 1.7 05/06/08 SMI" */ 31 + 32 + /* 33 + * Only define when testing. This makes the calls into actual calls to 34 + * test functions. 35 + */ 36 + /* #define DTRACE_CALL_TEST */ 37 + 38 + #define DTRACE_STRINGIFY(s) #s 39 + #define DTRACE_TOSTRING(s) DTRACE_STRINGIFY(s) 40 + 41 + #define DTRACE_LABEL(p, n) \ 42 + "__dtrace_probe$" DTRACE_TOSTRING(__LINE__) DTRACE_STRINGIFY(_##p##___##n) ":" "\n\t" 43 + 44 + #ifdef DTRACE_CALL_TEST 45 + 46 + #define DTRACE_CALL(p,n) \ 47 + DTRACE_LABEL(p,n) \ 48 + DTRACE_CALL_INSN(p,n) 49 + 50 + #else /* !DTRACE_CALL_TEST */ 51 + 52 + #define DTRACE_CALL(p,n) \ 53 + DTRACE_LABEL(p,n) \ 54 + DTRACE_NOPS 55 + 56 + #endif /* !DTRACE_CALL_TEST */ 57 + 58 + #ifdef __ppc__ 59 + 60 + #define DTRACE_NOPS \ 61 + "nop" "\n\t" 62 + 63 + #define DTRACE_CALL_INSN(p,n) \ 64 + "bl _dtracetest" DTRACE_STRINGIFY(_##p##_##n) "\n\t" 65 + 66 + #define ARG1_EXTENT 1 67 + #define ARGS2_EXTENT 2 68 + #define ARGS3_EXTENT 3 69 + #define ARGS4_EXTENT 4 70 + #define ARGS5_EXTENT 5 71 + #define ARGS6_EXTENT 6 72 + #define ARGS7_EXTENT 7 73 + #define ARGS8_EXTENT 8 74 + #define ARGS9_EXTENT 9 75 + #define ARGS10_EXTENT 10 76 + 77 + #define DTRACE_CALL0ARGS(provider, name) \ 78 + asm volatile ( \ 79 + DTRACE_CALL(provider, name) \ 80 + "# eat trailing nl+tab from DTRACE_CALL" \ 81 + : \ 82 + : \ 83 + ); 84 + 85 + #define DTRACE_CALL1ARG(provider, name) \ 86 + asm volatile ("subi r1,r1,0x20" "\n\t" \ 87 + "lwz r3,0x0(%0)" "\n\t" \ 88 + DTRACE_CALL(provider, name) \ 89 + "addi r1,r1,0x20" \ 90 + : \ 91 + : "b" (__dtrace_args) \ 92 + : "memory", "r3" \ 93 + ); 94 + 95 + #define DTRACE_CALL2ARGS(provider, name) \ 96 + asm volatile ("subi r1,r1,0x20" "\n\t" \ 97 + "lwz r3,0x0(%0)" "\n\t" \ 98 + "lwz r4,0x4(%0)" "\n\t" \ 99 + DTRACE_CALL(provider, name) \ 100 + "addi r1,r1,0x20" \ 101 + : \ 102 + : "b" (__dtrace_args) \ 103 + : "memory", "r3", "r4" \ 104 + ); 105 + 106 + #define DTRACE_CALL3ARGS(provider, name) \ 107 + asm volatile ("subi r1,r1,0x30" "\n\t" \ 108 + "lwz r3,0x0(%0)" "\n\t" \ 109 + "lwz r4,0x4(%0)" "\n\t" \ 110 + "lwz r5,0x8(%0)" "\n\t" \ 111 + DTRACE_CALL(provider, name) \ 112 + "addi r1,r1,0x30" \ 113 + : \ 114 + : "b" (__dtrace_args) \ 115 + : "memory", "r3", "r4", "r5" \ 116 + ); 117 + 118 + #define DTRACE_CALL4ARGS(provider, name) \ 119 + asm volatile ("subi r1,r1,0x30" "\n\t" \ 120 + "lwz r3,0x0(%0)" "\n\t" \ 121 + "lwz r4,0x4(%0)" "\n\t" \ 122 + "lwz r5,0x8(%0)" "\n\t" \ 123 + "lwz r6,0xc(%0)" "\n\t" \ 124 + DTRACE_CALL(provider, name) \ 125 + "addi r1,r1,0x30" \ 126 + : \ 127 + : "b" (__dtrace_args) \ 128 + : "memory", "r3", "r4", "r5", "r6" \ 129 + ); 130 + 131 + #define DTRACE_CALL5ARGS(provider, name) \ 132 + asm volatile ("subi r1,r1,0x30" "\n\t" \ 133 + "lwz r3,0x0(%0)" "\n\t" \ 134 + "lwz r4,0x4(%0)" "\n\t" \ 135 + "lwz r5,0x8(%0)" "\n\t" \ 136 + "lwz r6,0xc(%0)" "\n\t" \ 137 + "lwz r7,0x10(%0)" "\n\t" \ 138 + DTRACE_CALL(provider, name) \ 139 + "addi r1,r1,0x30" \ 140 + : \ 141 + : "b" (__dtrace_args) \ 142 + : "memory", "r3", "r4", "r5", "r6", "r7" \ 143 + ); 144 + 145 + #define DTRACE_CALL6ARGS(provider, name) \ 146 + asm volatile ("subi r1,r1,0x30" "\n\t" \ 147 + "lwz r3,0x0(%0)" "\n\t" \ 148 + "lwz r4,0x4(%0)" "\n\t" \ 149 + "lwz r5,0x8(%0)" "\n\t" \ 150 + "lwz r6,0xc(%0)" "\n\t" \ 151 + "lwz r7,0x10(%0)" "\n\t" \ 152 + "lwz r8,0x14(%0)" "\n\t" \ 153 + DTRACE_CALL(provider, name) \ 154 + "addi r1,r1,0x30" \ 155 + : \ 156 + : "b" (__dtrace_args) \ 157 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8" \ 158 + ); 159 + 160 + #define DTRACE_CALL7ARGS(provider, name) \ 161 + asm volatile ("subi r1,r1,0x40" "\n\t" \ 162 + "lwz r3,0x0(%0)" "\n\t" \ 163 + "lwz r4,0x4(%0)" "\n\t" \ 164 + "lwz r5,0x8(%0)" "\n\t" \ 165 + "lwz r6,0xc(%0)" "\n\t" \ 166 + "lwz r7,0x10(%0)" "\n\t" \ 167 + "lwz r8,0x14(%0)" "\n\t" \ 168 + "lwz r9,0x18(%0)" "\n\t" \ 169 + DTRACE_CALL(provider, name) \ 170 + "addi r1,r1,0x40" \ 171 + : \ 172 + : "b" (__dtrace_args) \ 173 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ 174 + ); 175 + 176 + #define DTRACE_CALL8ARGS(provider, name) \ 177 + asm volatile ("subi r1,r1,0x40" "\n\t" \ 178 + "lwz r3,0x0(%0)" "\n\t" \ 179 + "lwz r4,0x4(%0)" "\n\t" \ 180 + "lwz r5,0x8(%0)" "\n\t" \ 181 + "lwz r6,0xc(%0)" "\n\t" \ 182 + "lwz r7,0x10(%0)" "\n\t" \ 183 + "lwz r8,0x14(%0)" "\n\t" \ 184 + "lwz r9,0x18(%0)" "\n\t" \ 185 + "lwz r10,0x1c(%0)" "\n\t" \ 186 + DTRACE_CALL(provider, name) \ 187 + "addi r1,r1,0x40" \ 188 + : \ 189 + : "b" (__dtrace_args) \ 190 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" \ 191 + ); 192 + 193 + #define DTRACE_CALL9ARGS(provider, name) \ 194 + asm volatile ("subi r1,r1,0x40" "\n\t" \ 195 + "lwz r3,0x0(%0)" "\n\t" \ 196 + "lwz r4,0x4(%0)" "\n\t" \ 197 + "lwz r5,0x8(%0)" "\n\t" \ 198 + "lwz r6,0xc(%0)" "\n\t" \ 199 + "lwz r7,0x10(%0)" "\n\t" \ 200 + "lwz r8,0x14(%0)" "\n\t" \ 201 + "lwz r9,0x18(%0)" "\n\t" \ 202 + "lwz r10,0x1c(%0)" "\n\t" \ 203 + "lwz r11,0x20(%0)" "\n\t" \ 204 + "stw r11,0x38(r1)" "\n\t" \ 205 + DTRACE_CALL(provider, name) \ 206 + "addi r1,r1,0x40" \ 207 + : \ 208 + : "b" (__dtrace_args) \ 209 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" \ 210 + ); 211 + 212 + #define DTRACE_CALL10ARGS(provider, name) \ 213 + asm volatile ("subi r1,r1,0x40" "\n\t" \ 214 + "lwz r3,0x0(%0)" "\n\t" \ 215 + "lwz r4,0x4(%0)" "\n\t" \ 216 + "lwz r5,0x8(%0)" "\n\t" \ 217 + "lwz r6,0xc(%0)" "\n\t" \ 218 + "lwz r7,0x10(%0)" "\n\t" \ 219 + "lwz r8,0x14(%0)" "\n\t" \ 220 + "lwz r9,0x18(%0)" "\n\t" \ 221 + "lwz r10,0x1c(%0)" "\n\t" \ 222 + "lwz r11,0x20(%0)" "\n\t" \ 223 + "lwz r12,0x24(%0)" "\n\t" \ 224 + "stw r11,0x38(r1)" "\n\t" \ 225 + "stw r12,0x3c(r1)" "\n\t" \ 226 + DTRACE_CALL(provider, name) \ 227 + "addi r1,r1,0x40" \ 228 + : \ 229 + : "b" (__dtrace_args) \ 230 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" \ 231 + ); 232 + 233 + #endif // __ppc__ 234 + 235 + #ifdef __ppc64__ 236 + 237 + #define DTRACE_NOPS \ 238 + "nop" "\n\t" 239 + 240 + #define DTRACE_CALL_INSN(p,n) \ 241 + "bl _dtracetest" DTRACE_STRINGIFY(_##p##_##n) "\n\t" 242 + 243 + #define ARG1_EXTENT 1 244 + #define ARGS2_EXTENT 2 245 + #define ARGS3_EXTENT 3 246 + #define ARGS4_EXTENT 4 247 + #define ARGS5_EXTENT 5 248 + #define ARGS6_EXTENT 6 249 + #define ARGS7_EXTENT 7 250 + #define ARGS8_EXTENT 8 251 + #define ARGS9_EXTENT 9 252 + #define ARGS10_EXTENT 10 253 + 254 + #define DTRACE_CALL0ARGS(provider, name) \ 255 + asm volatile ("subi r1,r1,0x30" "\n\t" \ 256 + DTRACE_CALL(provider, name) \ 257 + "addi r1,r1,0x30" \ 258 + : \ 259 + : \ 260 + : \ 261 + ); 262 + 263 + #define DTRACE_CALL1ARG(provider, name) \ 264 + asm volatile ("ld r3,0x0(%0)" "\n\t" \ 265 + "subi r1,r1,0x38" "\n\t" \ 266 + DTRACE_CALL(provider, name) \ 267 + "addi r1,r1,0x38" \ 268 + : \ 269 + : "b" (__dtrace_args) \ 270 + : "memory", "r3" \ 271 + ); 272 + 273 + #define DTRACE_CALL2ARGS(provider, name) \ 274 + asm volatile ("subi r1,r1,0x40" "\n\t" \ 275 + "ld r3,0x0(%0)" "\n\t" \ 276 + "ld r4,0x8(%0)" "\n\t" \ 277 + DTRACE_CALL(provider, name) \ 278 + "addi r1,r1,0x40" \ 279 + : \ 280 + : "b" (__dtrace_args) \ 281 + : "memory", "r3", "r4" \ 282 + ); 283 + 284 + #define DTRACE_CALL3ARGS(provider, name) \ 285 + asm volatile ("subi r1,r1,0x48" "\n\t" \ 286 + "ld r3,0x0(%0)" "\n\t" \ 287 + "ld r4,0x8(%0)" "\n\t" \ 288 + "ld r5,0x10(%0)" "\n\t" \ 289 + DTRACE_CALL(provider, name) \ 290 + "addi r1,r1,0x48" \ 291 + : \ 292 + : "b" (__dtrace_args) \ 293 + : "memory", "r3", "r4", "r5" \ 294 + ); 295 + 296 + #define DTRACE_CALL4ARGS(provider, name) \ 297 + asm volatile ("subi r1,r1,0x50" "\n\t" \ 298 + "ld r3,0x0(%0)" "\n\t" \ 299 + "ld r4,0x8(%0)" "\n\t" \ 300 + "ld r5,0x10(%0)" "\n\t" \ 301 + "ld r6,0x18(%0)" "\n\t" \ 302 + DTRACE_CALL(provider, name) \ 303 + "addi r1,r1,0x50" \ 304 + : \ 305 + : "b" (__dtrace_args) \ 306 + : "memory", "r3", "r4", "r5", "r6" \ 307 + ); 308 + 309 + #define DTRACE_CALL5ARGS(provider, name) \ 310 + asm volatile ("subi r1,r1,0x58" "\n\t" \ 311 + "ld r3,0x0(%0)" "\n\t" \ 312 + "ld r4,0x8(%0)" "\n\t" \ 313 + "ld r5,0x10(%0)" "\n\t" \ 314 + "ld r6,0x18(%0)" "\n\t" \ 315 + "ld r7,0x20(%0)" "\n\t" \ 316 + DTRACE_CALL(provider, name) \ 317 + "addi r1,r1,0x58" \ 318 + : \ 319 + : "b" (__dtrace_args) \ 320 + : "memory", "r3", "r4", "r5", "r6", "r7" \ 321 + ); 322 + 323 + #define DTRACE_CALL6ARGS(provider, name) \ 324 + asm volatile ("subi r1,r1,0x60" "\n\t" \ 325 + "ld r3,0x0(%0)" "\n\t" \ 326 + "ld r4,0x8(%0)" "\n\t" \ 327 + "ld r5,0x10(%0)" "\n\t" \ 328 + "ld r6,0x18(%0)" "\n\t" \ 329 + "ld r7,0x20(%0)" "\n\t" \ 330 + "ld r8,0x28(%0)" "\n\t" \ 331 + DTRACE_CALL(provider, name) \ 332 + "addi r1,r1,0x60" \ 333 + : \ 334 + : "b" (__dtrace_args) \ 335 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8" \ 336 + ); 337 + 338 + #define DTRACE_CALL7ARGS(provider, name) \ 339 + asm volatile ("subi r1,r1,0x68" "\n\t" \ 340 + "ld r3,0x0(%0)" "\n\t" \ 341 + "ld r4,0x8(%0)" "\n\t" \ 342 + "ld r5,0x10(%0)" "\n\t" \ 343 + "ld r6,0x18(%0)" "\n\t" \ 344 + "ld r7,0x20(%0)" "\n\t" \ 345 + "ld r8,0x28(%0)" "\n\t" \ 346 + "ld r9,0x30(%0)" "\n\t" \ 347 + DTRACE_CALL(provider, name) \ 348 + "addi r1,r1,0x68" \ 349 + : \ 350 + : "b" (__dtrace_args) \ 351 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9" \ 352 + ); 353 + 354 + #define DTRACE_CALL8ARGS(provider, name) \ 355 + asm volatile ("subi r1,r1,0x70" "\n\t" \ 356 + "ld r3,0x0(%0)" "\n\t" \ 357 + "ld r4,0x8(%0)" "\n\t" \ 358 + "ld r5,0x10(%0)" "\n\t" \ 359 + "ld r6,0x18(%0)" "\n\t" \ 360 + "ld r7,0x20(%0)" "\n\t" \ 361 + "ld r8,0x28(%0)" "\n\t" \ 362 + "ld r9,0x30(%0)" "\n\t" \ 363 + "ld r10,0x38(%0)" "\n\t" \ 364 + DTRACE_CALL(provider, name) \ 365 + "addi r1,r1,0x70" \ 366 + : \ 367 + : "b" (__dtrace_args) \ 368 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10" \ 369 + ); 370 + 371 + #define DTRACE_CALL9ARGS(provider, name) \ 372 + asm volatile ("subi r1,r1,0x78" "\n\t" \ 373 + "ld r3,0x0(%0)" "\n\t" \ 374 + "ld r4,0x8(%0)" "\n\t" \ 375 + "ld r5,0x10(%0)" "\n\t" \ 376 + "ld r6,0x18(%0)" "\n\t" \ 377 + "ld r7,0x20(%0)" "\n\t" \ 378 + "ld r8,0x28(%0)" "\n\t" \ 379 + "ld r9,0x30(%0)" "\n\t" \ 380 + "ld r10,0x38(%0)" "\n\t" \ 381 + "ld r11,0x40(%0)" "\n\t" \ 382 + "std r11,0x70(r1)" "\n\t" \ 383 + DTRACE_CALL(provider, name) \ 384 + "addi r1,r1,0x78" \ 385 + : \ 386 + : "b" (__dtrace_args) \ 387 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11" \ 388 + ); 389 + 390 + #define DTRACE_CALL10ARGS(provider, name) \ 391 + asm volatile ("subi r1,r1,0x80" "\n\t" \ 392 + "ld r3,0x0(%0)" "\n\t" \ 393 + "ld r4,0x8(%0)" "\n\t" \ 394 + "ld r5,0x10(%0)" "\n\t" \ 395 + "ld r6,0x18(%0)" "\n\t" \ 396 + "ld r7,0x20(%0)" "\n\t" \ 397 + "ld r8,0x28(%0)" "\n\t" \ 398 + "ld r9,0x30(%0)" "\n\t" \ 399 + "ld r10,0x38(%0)" "\n\t" \ 400 + "ld r11,0x40(%0)" "\n\t" \ 401 + "ld r12,0x48(%0)" "\n\t" \ 402 + "std r11,0x70(r1)" "\n\t" \ 403 + "std r12,0x78(r1)" "\n\t" \ 404 + DTRACE_CALL(provider, name) \ 405 + "addi r1,r1,0x80" \ 406 + : \ 407 + : "b" (__dtrace_args) \ 408 + : "memory", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12" \ 409 + ); 410 + 411 + #endif // __ppc64__ 412 + 413 + #endif /* _MACH_PPC_SDT_ISA_H */
+1578
platform-include/mach/ppc/task.h
··· 1 + #ifndef _task_user_ 2 + #define _task_user_ 3 + 4 + /* Module task */ 5 + 6 + #include <string.h> 7 + #include <mach/ndr.h> 8 + #include <mach/boolean.h> 9 + #include <mach/kern_return.h> 10 + #include <mach/notify.h> 11 + #include <mach/mach_types.h> 12 + #include <mach/message.h> 13 + #include <mach/mig_errors.h> 14 + #include <mach/port.h> 15 + 16 + #ifdef AUTOTEST 17 + #ifndef FUNCTION_PTR_T 18 + #define FUNCTION_PTR_T 19 + typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); 20 + typedef struct { 21 + char *name; 22 + function_ptr_t function; 23 + } function_table_entry; 24 + typedef function_table_entry *function_table_t; 25 + #endif /* FUNCTION_PTR_T */ 26 + #endif /* AUTOTEST */ 27 + 28 + #ifndef task_MSG_COUNT 29 + #define task_MSG_COUNT 35 30 + #endif /* task_MSG_COUNT */ 31 + 32 + #include <mach/std_types.h> 33 + #include <mach/mig.h> 34 + #include <mach/mig.h> 35 + #include <mach/mach_types.h> 36 + 37 + #ifdef __BeforeMigUserHeader 38 + __BeforeMigUserHeader 39 + #endif /* __BeforeMigUserHeader */ 40 + 41 + #include <sys/cdefs.h> 42 + __BEGIN_DECLS 43 + 44 + 45 + /* Routine task_create */ 46 + #ifdef mig_external 47 + mig_external 48 + #else 49 + extern 50 + #endif /* mig_external */ 51 + kern_return_t task_create 52 + ( 53 + task_t target_task, 54 + ledger_array_t ledgers, 55 + mach_msg_type_number_t ledgersCnt, 56 + boolean_t inherit_memory, 57 + task_t *child_task 58 + ); 59 + 60 + /* Routine task_terminate */ 61 + #ifdef mig_external 62 + mig_external 63 + #else 64 + extern 65 + #endif /* mig_external */ 66 + kern_return_t task_terminate 67 + ( 68 + task_t target_task 69 + ); 70 + 71 + /* Routine task_threads */ 72 + #ifdef mig_external 73 + mig_external 74 + #else 75 + extern 76 + #endif /* mig_external */ 77 + kern_return_t task_threads 78 + ( 79 + task_t target_task, 80 + thread_act_array_t *act_list, 81 + mach_msg_type_number_t *act_listCnt 82 + ); 83 + 84 + /* Routine mach_ports_register */ 85 + #ifdef mig_external 86 + mig_external 87 + #else 88 + extern 89 + #endif /* mig_external */ 90 + kern_return_t mach_ports_register 91 + ( 92 + task_t target_task, 93 + mach_port_array_t init_port_set, 94 + mach_msg_type_number_t init_port_setCnt 95 + ); 96 + 97 + /* Routine mach_ports_lookup */ 98 + #ifdef mig_external 99 + mig_external 100 + #else 101 + extern 102 + #endif /* mig_external */ 103 + kern_return_t mach_ports_lookup 104 + ( 105 + task_t target_task, 106 + mach_port_array_t *init_port_set, 107 + mach_msg_type_number_t *init_port_setCnt 108 + ); 109 + 110 + /* Routine task_info */ 111 + #ifdef mig_external 112 + mig_external 113 + #else 114 + extern 115 + #endif /* mig_external */ 116 + kern_return_t task_info 117 + ( 118 + task_name_t target_task, 119 + task_flavor_t flavor, 120 + task_info_t task_info_out, 121 + mach_msg_type_number_t *task_info_outCnt 122 + ); 123 + 124 + /* Routine task_set_info */ 125 + #ifdef mig_external 126 + mig_external 127 + #else 128 + extern 129 + #endif /* mig_external */ 130 + kern_return_t task_set_info 131 + ( 132 + task_t target_task, 133 + task_flavor_t flavor, 134 + task_info_t task_info_in, 135 + mach_msg_type_number_t task_info_inCnt 136 + ); 137 + 138 + /* Routine task_suspend */ 139 + #ifdef mig_external 140 + mig_external 141 + #else 142 + extern 143 + #endif /* mig_external */ 144 + kern_return_t task_suspend 145 + ( 146 + task_t target_task 147 + ); 148 + 149 + /* Routine task_resume */ 150 + #ifdef mig_external 151 + mig_external 152 + #else 153 + extern 154 + #endif /* mig_external */ 155 + kern_return_t task_resume 156 + ( 157 + task_t target_task 158 + ); 159 + 160 + /* Routine task_get_special_port */ 161 + #ifdef mig_external 162 + mig_external 163 + #else 164 + extern 165 + #endif /* mig_external */ 166 + kern_return_t task_get_special_port 167 + ( 168 + task_t task, 169 + int which_port, 170 + mach_port_t *special_port 171 + ); 172 + 173 + /* Routine task_set_special_port */ 174 + #ifdef mig_external 175 + mig_external 176 + #else 177 + extern 178 + #endif /* mig_external */ 179 + kern_return_t task_set_special_port 180 + ( 181 + task_t task, 182 + int which_port, 183 + mach_port_t special_port 184 + ); 185 + 186 + /* Routine thread_create */ 187 + #ifdef mig_external 188 + mig_external 189 + #else 190 + extern 191 + #endif /* mig_external */ 192 + kern_return_t thread_create 193 + ( 194 + task_t parent_task, 195 + thread_act_t *child_act 196 + ); 197 + 198 + /* Routine thread_create_running */ 199 + #ifdef mig_external 200 + mig_external 201 + #else 202 + extern 203 + #endif /* mig_external */ 204 + kern_return_t thread_create_running 205 + ( 206 + task_t parent_task, 207 + thread_state_flavor_t flavor, 208 + thread_state_t new_state, 209 + mach_msg_type_number_t new_stateCnt, 210 + thread_act_t *child_act 211 + ); 212 + 213 + /* Routine task_set_exception_ports */ 214 + #ifdef mig_external 215 + mig_external 216 + #else 217 + extern 218 + #endif /* mig_external */ 219 + kern_return_t task_set_exception_ports 220 + ( 221 + task_t task, 222 + exception_mask_t exception_mask, 223 + mach_port_t new_port, 224 + exception_behavior_t behavior, 225 + thread_state_flavor_t new_flavor 226 + ); 227 + 228 + /* Routine task_get_exception_ports */ 229 + #ifdef mig_external 230 + mig_external 231 + #else 232 + extern 233 + #endif /* mig_external */ 234 + kern_return_t task_get_exception_ports 235 + ( 236 + task_t task, 237 + exception_mask_t exception_mask, 238 + exception_mask_array_t masks, 239 + mach_msg_type_number_t *masksCnt, 240 + exception_handler_array_t old_handlers, 241 + exception_behavior_array_t old_behaviors, 242 + exception_flavor_array_t old_flavors 243 + ); 244 + 245 + /* Routine task_swap_exception_ports */ 246 + #ifdef mig_external 247 + mig_external 248 + #else 249 + extern 250 + #endif /* mig_external */ 251 + kern_return_t task_swap_exception_ports 252 + ( 253 + task_t task, 254 + exception_mask_t exception_mask, 255 + mach_port_t new_port, 256 + exception_behavior_t behavior, 257 + thread_state_flavor_t new_flavor, 258 + exception_mask_array_t masks, 259 + mach_msg_type_number_t *masksCnt, 260 + exception_handler_array_t old_handlerss, 261 + exception_behavior_array_t old_behaviors, 262 + exception_flavor_array_t old_flavors 263 + ); 264 + 265 + /* Routine lock_set_create */ 266 + #ifdef mig_external 267 + mig_external 268 + #else 269 + extern 270 + #endif /* mig_external */ 271 + kern_return_t lock_set_create 272 + ( 273 + task_t task, 274 + lock_set_t *new_lock_set, 275 + int n_ulocks, 276 + int policy 277 + ); 278 + 279 + /* Routine lock_set_destroy */ 280 + #ifdef mig_external 281 + mig_external 282 + #else 283 + extern 284 + #endif /* mig_external */ 285 + kern_return_t lock_set_destroy 286 + ( 287 + task_t task, 288 + lock_set_t lock_set 289 + ); 290 + 291 + /* Routine semaphore_create */ 292 + #ifdef mig_external 293 + mig_external 294 + #else 295 + extern 296 + #endif /* mig_external */ 297 + kern_return_t semaphore_create 298 + ( 299 + task_t task, 300 + semaphore_t *semaphore, 301 + int policy, 302 + int value 303 + ); 304 + 305 + /* Routine semaphore_destroy */ 306 + #ifdef mig_external 307 + mig_external 308 + #else 309 + extern 310 + #endif /* mig_external */ 311 + kern_return_t semaphore_destroy 312 + ( 313 + task_t task, 314 + semaphore_t semaphore 315 + ); 316 + 317 + /* Routine task_policy_set */ 318 + #ifdef mig_external 319 + mig_external 320 + #else 321 + extern 322 + #endif /* mig_external */ 323 + kern_return_t task_policy_set 324 + ( 325 + task_t task, 326 + task_policy_flavor_t flavor, 327 + task_policy_t policy_info, 328 + mach_msg_type_number_t policy_infoCnt 329 + ); 330 + 331 + /* Routine task_policy_get */ 332 + #ifdef mig_external 333 + mig_external 334 + #else 335 + extern 336 + #endif /* mig_external */ 337 + kern_return_t task_policy_get 338 + ( 339 + task_t task, 340 + task_policy_flavor_t flavor, 341 + task_policy_t policy_info, 342 + mach_msg_type_number_t *policy_infoCnt, 343 + boolean_t *get_default 344 + ); 345 + 346 + /* Routine task_sample */ 347 + #ifdef mig_external 348 + mig_external 349 + #else 350 + extern 351 + #endif /* mig_external */ 352 + kern_return_t task_sample 353 + ( 354 + task_t task, 355 + mach_port_t reply 356 + ); 357 + 358 + /* Routine task_policy */ 359 + #ifdef mig_external 360 + mig_external 361 + #else 362 + extern 363 + #endif /* mig_external */ 364 + kern_return_t task_policy 365 + ( 366 + task_t task, 367 + policy_t policy, 368 + policy_base_t base, 369 + mach_msg_type_number_t baseCnt, 370 + boolean_t set_limit, 371 + boolean_t change 372 + ); 373 + 374 + /* Routine task_set_emulation */ 375 + #ifdef mig_external 376 + mig_external 377 + #else 378 + extern 379 + #endif /* mig_external */ 380 + kern_return_t task_set_emulation 381 + ( 382 + task_t target_port, 383 + vm_address_t routine_entry_pt, 384 + int routine_number 385 + ); 386 + 387 + /* Routine task_get_emulation_vector */ 388 + #ifdef mig_external 389 + mig_external 390 + #else 391 + extern 392 + #endif /* mig_external */ 393 + kern_return_t task_get_emulation_vector 394 + ( 395 + task_t task, 396 + int *vector_start, 397 + emulation_vector_t *emulation_vector, 398 + mach_msg_type_number_t *emulation_vectorCnt 399 + ); 400 + 401 + /* Routine task_set_emulation_vector */ 402 + #ifdef mig_external 403 + mig_external 404 + #else 405 + extern 406 + #endif /* mig_external */ 407 + kern_return_t task_set_emulation_vector 408 + ( 409 + task_t task, 410 + int vector_start, 411 + emulation_vector_t emulation_vector, 412 + mach_msg_type_number_t emulation_vectorCnt 413 + ); 414 + 415 + /* Routine task_set_ras_pc */ 416 + #ifdef mig_external 417 + mig_external 418 + #else 419 + extern 420 + #endif /* mig_external */ 421 + kern_return_t task_set_ras_pc 422 + ( 423 + task_t target_task, 424 + vm_address_t basepc, 425 + vm_address_t boundspc 426 + ); 427 + 428 + /* Routine task_assign */ 429 + #ifdef mig_external 430 + mig_external 431 + #else 432 + extern 433 + #endif /* mig_external */ 434 + kern_return_t task_assign 435 + ( 436 + task_t task, 437 + processor_set_t new_set, 438 + boolean_t assign_threads 439 + ); 440 + 441 + /* Routine task_assign_default */ 442 + #ifdef mig_external 443 + mig_external 444 + #else 445 + extern 446 + #endif /* mig_external */ 447 + kern_return_t task_assign_default 448 + ( 449 + task_t task, 450 + boolean_t assign_threads 451 + ); 452 + 453 + /* Routine task_get_assignment */ 454 + #ifdef mig_external 455 + mig_external 456 + #else 457 + extern 458 + #endif /* mig_external */ 459 + kern_return_t task_get_assignment 460 + ( 461 + task_t task, 462 + processor_set_name_t *assigned_set 463 + ); 464 + 465 + /* Routine task_set_policy */ 466 + #ifdef mig_external 467 + mig_external 468 + #else 469 + extern 470 + #endif /* mig_external */ 471 + kern_return_t task_set_policy 472 + ( 473 + task_t task, 474 + processor_set_t pset, 475 + policy_t policy, 476 + policy_base_t base, 477 + mach_msg_type_number_t baseCnt, 478 + policy_limit_t limit, 479 + mach_msg_type_number_t limitCnt, 480 + boolean_t change 481 + ); 482 + 483 + /* Routine task_get_state */ 484 + #ifdef mig_external 485 + mig_external 486 + #else 487 + extern 488 + #endif /* mig_external */ 489 + kern_return_t task_get_state 490 + ( 491 + task_t task, 492 + thread_state_flavor_t flavor, 493 + thread_state_t old_state, 494 + mach_msg_type_number_t *old_stateCnt 495 + ); 496 + 497 + /* Routine task_set_state */ 498 + #ifdef mig_external 499 + mig_external 500 + #else 501 + extern 502 + #endif /* mig_external */ 503 + kern_return_t task_set_state 504 + ( 505 + task_t task, 506 + thread_state_flavor_t flavor, 507 + thread_state_t new_state, 508 + mach_msg_type_number_t new_stateCnt 509 + ); 510 + 511 + __END_DECLS 512 + 513 + /********************** Caution **************************/ 514 + /* The following data types should be used to calculate */ 515 + /* maximum message sizes only. The actual message may be */ 516 + /* smaller, and the position of the arguments within the */ 517 + /* message layout may vary from what is presented here. */ 518 + /* For example, if any of the arguments are variable- */ 519 + /* sized, and less than the maximum is sent, the data */ 520 + /* will be packed tight in the actual message to reduce */ 521 + /* the presence of holes. */ 522 + /********************** Caution **************************/ 523 + 524 + /* typedefs for all requests */ 525 + 526 + #ifndef __Request__task_subsystem__defined 527 + #define __Request__task_subsystem__defined 528 + 529 + #ifdef __MigPackStructs 530 + #pragma pack(4) 531 + #endif 532 + typedef struct { 533 + mach_msg_header_t Head; 534 + /* start of the kernel processed data */ 535 + mach_msg_body_t msgh_body; 536 + mach_msg_ool_ports_descriptor_t ledgers; 537 + /* end of the kernel processed data */ 538 + NDR_record_t NDR; 539 + mach_msg_type_number_t ledgersCnt; 540 + boolean_t inherit_memory; 541 + } __Request__task_create_t; 542 + #ifdef __MigPackStructs 543 + #pragma pack() 544 + #endif 545 + 546 + #ifdef __MigPackStructs 547 + #pragma pack(4) 548 + #endif 549 + typedef struct { 550 + mach_msg_header_t Head; 551 + } __Request__task_terminate_t; 552 + #ifdef __MigPackStructs 553 + #pragma pack() 554 + #endif 555 + 556 + #ifdef __MigPackStructs 557 + #pragma pack(4) 558 + #endif 559 + typedef struct { 560 + mach_msg_header_t Head; 561 + } __Request__task_threads_t; 562 + #ifdef __MigPackStructs 563 + #pragma pack() 564 + #endif 565 + 566 + #ifdef __MigPackStructs 567 + #pragma pack(4) 568 + #endif 569 + typedef struct { 570 + mach_msg_header_t Head; 571 + /* start of the kernel processed data */ 572 + mach_msg_body_t msgh_body; 573 + mach_msg_ool_ports_descriptor_t init_port_set; 574 + /* end of the kernel processed data */ 575 + NDR_record_t NDR; 576 + mach_msg_type_number_t init_port_setCnt; 577 + } __Request__mach_ports_register_t; 578 + #ifdef __MigPackStructs 579 + #pragma pack() 580 + #endif 581 + 582 + #ifdef __MigPackStructs 583 + #pragma pack(4) 584 + #endif 585 + typedef struct { 586 + mach_msg_header_t Head; 587 + } __Request__mach_ports_lookup_t; 588 + #ifdef __MigPackStructs 589 + #pragma pack() 590 + #endif 591 + 592 + #ifdef __MigPackStructs 593 + #pragma pack(4) 594 + #endif 595 + typedef struct { 596 + mach_msg_header_t Head; 597 + NDR_record_t NDR; 598 + task_flavor_t flavor; 599 + mach_msg_type_number_t task_info_outCnt; 600 + } __Request__task_info_t; 601 + #ifdef __MigPackStructs 602 + #pragma pack() 603 + #endif 604 + 605 + #ifdef __MigPackStructs 606 + #pragma pack(4) 607 + #endif 608 + typedef struct { 609 + mach_msg_header_t Head; 610 + NDR_record_t NDR; 611 + task_flavor_t flavor; 612 + mach_msg_type_number_t task_info_inCnt; 613 + integer_t task_info_in[10]; 614 + } __Request__task_set_info_t; 615 + #ifdef __MigPackStructs 616 + #pragma pack() 617 + #endif 618 + 619 + #ifdef __MigPackStructs 620 + #pragma pack(4) 621 + #endif 622 + typedef struct { 623 + mach_msg_header_t Head; 624 + } __Request__task_suspend_t; 625 + #ifdef __MigPackStructs 626 + #pragma pack() 627 + #endif 628 + 629 + #ifdef __MigPackStructs 630 + #pragma pack(4) 631 + #endif 632 + typedef struct { 633 + mach_msg_header_t Head; 634 + } __Request__task_resume_t; 635 + #ifdef __MigPackStructs 636 + #pragma pack() 637 + #endif 638 + 639 + #ifdef __MigPackStructs 640 + #pragma pack(4) 641 + #endif 642 + typedef struct { 643 + mach_msg_header_t Head; 644 + NDR_record_t NDR; 645 + int which_port; 646 + } __Request__task_get_special_port_t; 647 + #ifdef __MigPackStructs 648 + #pragma pack() 649 + #endif 650 + 651 + #ifdef __MigPackStructs 652 + #pragma pack(4) 653 + #endif 654 + typedef struct { 655 + mach_msg_header_t Head; 656 + /* start of the kernel processed data */ 657 + mach_msg_body_t msgh_body; 658 + mach_msg_port_descriptor_t special_port; 659 + /* end of the kernel processed data */ 660 + NDR_record_t NDR; 661 + int which_port; 662 + } __Request__task_set_special_port_t; 663 + #ifdef __MigPackStructs 664 + #pragma pack() 665 + #endif 666 + 667 + #ifdef __MigPackStructs 668 + #pragma pack(4) 669 + #endif 670 + typedef struct { 671 + mach_msg_header_t Head; 672 + } __Request__thread_create_t; 673 + #ifdef __MigPackStructs 674 + #pragma pack() 675 + #endif 676 + 677 + #ifdef __MigPackStructs 678 + #pragma pack(4) 679 + #endif 680 + typedef struct { 681 + mach_msg_header_t Head; 682 + NDR_record_t NDR; 683 + thread_state_flavor_t flavor; 684 + mach_msg_type_number_t new_stateCnt; 685 + natural_t new_state[144]; 686 + } __Request__thread_create_running_t; 687 + #ifdef __MigPackStructs 688 + #pragma pack() 689 + #endif 690 + 691 + #ifdef __MigPackStructs 692 + #pragma pack(4) 693 + #endif 694 + typedef struct { 695 + mach_msg_header_t Head; 696 + /* start of the kernel processed data */ 697 + mach_msg_body_t msgh_body; 698 + mach_msg_port_descriptor_t new_port; 699 + /* end of the kernel processed data */ 700 + NDR_record_t NDR; 701 + exception_mask_t exception_mask; 702 + exception_behavior_t behavior; 703 + thread_state_flavor_t new_flavor; 704 + } __Request__task_set_exception_ports_t; 705 + #ifdef __MigPackStructs 706 + #pragma pack() 707 + #endif 708 + 709 + #ifdef __MigPackStructs 710 + #pragma pack(4) 711 + #endif 712 + typedef struct { 713 + mach_msg_header_t Head; 714 + NDR_record_t NDR; 715 + exception_mask_t exception_mask; 716 + } __Request__task_get_exception_ports_t; 717 + #ifdef __MigPackStructs 718 + #pragma pack() 719 + #endif 720 + 721 + #ifdef __MigPackStructs 722 + #pragma pack(4) 723 + #endif 724 + typedef struct { 725 + mach_msg_header_t Head; 726 + /* start of the kernel processed data */ 727 + mach_msg_body_t msgh_body; 728 + mach_msg_port_descriptor_t new_port; 729 + /* end of the kernel processed data */ 730 + NDR_record_t NDR; 731 + exception_mask_t exception_mask; 732 + exception_behavior_t behavior; 733 + thread_state_flavor_t new_flavor; 734 + } __Request__task_swap_exception_ports_t; 735 + #ifdef __MigPackStructs 736 + #pragma pack() 737 + #endif 738 + 739 + #ifdef __MigPackStructs 740 + #pragma pack(4) 741 + #endif 742 + typedef struct { 743 + mach_msg_header_t Head; 744 + NDR_record_t NDR; 745 + int n_ulocks; 746 + int policy; 747 + } __Request__lock_set_create_t; 748 + #ifdef __MigPackStructs 749 + #pragma pack() 750 + #endif 751 + 752 + #ifdef __MigPackStructs 753 + #pragma pack(4) 754 + #endif 755 + typedef struct { 756 + mach_msg_header_t Head; 757 + /* start of the kernel processed data */ 758 + mach_msg_body_t msgh_body; 759 + mach_msg_port_descriptor_t lock_set; 760 + /* end of the kernel processed data */ 761 + } __Request__lock_set_destroy_t; 762 + #ifdef __MigPackStructs 763 + #pragma pack() 764 + #endif 765 + 766 + #ifdef __MigPackStructs 767 + #pragma pack(4) 768 + #endif 769 + typedef struct { 770 + mach_msg_header_t Head; 771 + NDR_record_t NDR; 772 + int policy; 773 + int value; 774 + } __Request__semaphore_create_t; 775 + #ifdef __MigPackStructs 776 + #pragma pack() 777 + #endif 778 + 779 + #ifdef __MigPackStructs 780 + #pragma pack(4) 781 + #endif 782 + typedef struct { 783 + mach_msg_header_t Head; 784 + /* start of the kernel processed data */ 785 + mach_msg_body_t msgh_body; 786 + mach_msg_port_descriptor_t semaphore; 787 + /* end of the kernel processed data */ 788 + } __Request__semaphore_destroy_t; 789 + #ifdef __MigPackStructs 790 + #pragma pack() 791 + #endif 792 + 793 + #ifdef __MigPackStructs 794 + #pragma pack(4) 795 + #endif 796 + typedef struct { 797 + mach_msg_header_t Head; 798 + NDR_record_t NDR; 799 + task_policy_flavor_t flavor; 800 + mach_msg_type_number_t policy_infoCnt; 801 + integer_t policy_info[16]; 802 + } __Request__task_policy_set_t; 803 + #ifdef __MigPackStructs 804 + #pragma pack() 805 + #endif 806 + 807 + #ifdef __MigPackStructs 808 + #pragma pack(4) 809 + #endif 810 + typedef struct { 811 + mach_msg_header_t Head; 812 + NDR_record_t NDR; 813 + task_policy_flavor_t flavor; 814 + mach_msg_type_number_t policy_infoCnt; 815 + boolean_t get_default; 816 + } __Request__task_policy_get_t; 817 + #ifdef __MigPackStructs 818 + #pragma pack() 819 + #endif 820 + 821 + #ifdef __MigPackStructs 822 + #pragma pack(4) 823 + #endif 824 + typedef struct { 825 + mach_msg_header_t Head; 826 + /* start of the kernel processed data */ 827 + mach_msg_body_t msgh_body; 828 + mach_msg_port_descriptor_t reply; 829 + /* end of the kernel processed data */ 830 + } __Request__task_sample_t; 831 + #ifdef __MigPackStructs 832 + #pragma pack() 833 + #endif 834 + 835 + #ifdef __MigPackStructs 836 + #pragma pack(4) 837 + #endif 838 + typedef struct { 839 + mach_msg_header_t Head; 840 + NDR_record_t NDR; 841 + policy_t policy; 842 + mach_msg_type_number_t baseCnt; 843 + integer_t base[5]; 844 + boolean_t set_limit; 845 + boolean_t change; 846 + } __Request__task_policy_t; 847 + #ifdef __MigPackStructs 848 + #pragma pack() 849 + #endif 850 + 851 + #ifdef __MigPackStructs 852 + #pragma pack(4) 853 + #endif 854 + typedef struct { 855 + mach_msg_header_t Head; 856 + NDR_record_t NDR; 857 + vm_address_t routine_entry_pt; 858 + int routine_number; 859 + } __Request__task_set_emulation_t; 860 + #ifdef __MigPackStructs 861 + #pragma pack() 862 + #endif 863 + 864 + #ifdef __MigPackStructs 865 + #pragma pack(4) 866 + #endif 867 + typedef struct { 868 + mach_msg_header_t Head; 869 + } __Request__task_get_emulation_vector_t; 870 + #ifdef __MigPackStructs 871 + #pragma pack() 872 + #endif 873 + 874 + #ifdef __MigPackStructs 875 + #pragma pack(4) 876 + #endif 877 + typedef struct { 878 + mach_msg_header_t Head; 879 + /* start of the kernel processed data */ 880 + mach_msg_body_t msgh_body; 881 + mach_msg_ool_descriptor_t emulation_vector; 882 + /* end of the kernel processed data */ 883 + NDR_record_t NDR; 884 + int vector_start; 885 + mach_msg_type_number_t emulation_vectorCnt; 886 + } __Request__task_set_emulation_vector_t; 887 + #ifdef __MigPackStructs 888 + #pragma pack() 889 + #endif 890 + 891 + #ifdef __MigPackStructs 892 + #pragma pack(4) 893 + #endif 894 + typedef struct { 895 + mach_msg_header_t Head; 896 + NDR_record_t NDR; 897 + vm_address_t basepc; 898 + vm_address_t boundspc; 899 + } __Request__task_set_ras_pc_t; 900 + #ifdef __MigPackStructs 901 + #pragma pack() 902 + #endif 903 + 904 + #ifdef __MigPackStructs 905 + #pragma pack(4) 906 + #endif 907 + typedef struct { 908 + mach_msg_header_t Head; 909 + /* start of the kernel processed data */ 910 + mach_msg_body_t msgh_body; 911 + mach_msg_port_descriptor_t new_set; 912 + /* end of the kernel processed data */ 913 + NDR_record_t NDR; 914 + boolean_t assign_threads; 915 + } __Request__task_assign_t; 916 + #ifdef __MigPackStructs 917 + #pragma pack() 918 + #endif 919 + 920 + #ifdef __MigPackStructs 921 + #pragma pack(4) 922 + #endif 923 + typedef struct { 924 + mach_msg_header_t Head; 925 + NDR_record_t NDR; 926 + boolean_t assign_threads; 927 + } __Request__task_assign_default_t; 928 + #ifdef __MigPackStructs 929 + #pragma pack() 930 + #endif 931 + 932 + #ifdef __MigPackStructs 933 + #pragma pack(4) 934 + #endif 935 + typedef struct { 936 + mach_msg_header_t Head; 937 + } __Request__task_get_assignment_t; 938 + #ifdef __MigPackStructs 939 + #pragma pack() 940 + #endif 941 + 942 + #ifdef __MigPackStructs 943 + #pragma pack(4) 944 + #endif 945 + typedef struct { 946 + mach_msg_header_t Head; 947 + /* start of the kernel processed data */ 948 + mach_msg_body_t msgh_body; 949 + mach_msg_port_descriptor_t pset; 950 + /* end of the kernel processed data */ 951 + NDR_record_t NDR; 952 + policy_t policy; 953 + mach_msg_type_number_t baseCnt; 954 + integer_t base[5]; 955 + mach_msg_type_number_t limitCnt; 956 + integer_t limit[1]; 957 + boolean_t change; 958 + } __Request__task_set_policy_t; 959 + #ifdef __MigPackStructs 960 + #pragma pack() 961 + #endif 962 + 963 + #ifdef __MigPackStructs 964 + #pragma pack(4) 965 + #endif 966 + typedef struct { 967 + mach_msg_header_t Head; 968 + NDR_record_t NDR; 969 + thread_state_flavor_t flavor; 970 + mach_msg_type_number_t old_stateCnt; 971 + } __Request__task_get_state_t; 972 + #ifdef __MigPackStructs 973 + #pragma pack() 974 + #endif 975 + 976 + #ifdef __MigPackStructs 977 + #pragma pack(4) 978 + #endif 979 + typedef struct { 980 + mach_msg_header_t Head; 981 + NDR_record_t NDR; 982 + thread_state_flavor_t flavor; 983 + mach_msg_type_number_t new_stateCnt; 984 + natural_t new_state[144]; 985 + } __Request__task_set_state_t; 986 + #ifdef __MigPackStructs 987 + #pragma pack() 988 + #endif 989 + #endif /* !__Request__task_subsystem__defined */ 990 + 991 + /* union of all requests */ 992 + 993 + #ifndef __RequestUnion__task_subsystem__defined 994 + #define __RequestUnion__task_subsystem__defined 995 + union __RequestUnion__task_subsystem { 996 + __Request__task_create_t Request_task_create; 997 + __Request__task_terminate_t Request_task_terminate; 998 + __Request__task_threads_t Request_task_threads; 999 + __Request__mach_ports_register_t Request_mach_ports_register; 1000 + __Request__mach_ports_lookup_t Request_mach_ports_lookup; 1001 + __Request__task_info_t Request_task_info; 1002 + __Request__task_set_info_t Request_task_set_info; 1003 + __Request__task_suspend_t Request_task_suspend; 1004 + __Request__task_resume_t Request_task_resume; 1005 + __Request__task_get_special_port_t Request_task_get_special_port; 1006 + __Request__task_set_special_port_t Request_task_set_special_port; 1007 + __Request__thread_create_t Request_thread_create; 1008 + __Request__thread_create_running_t Request_thread_create_running; 1009 + __Request__task_set_exception_ports_t Request_task_set_exception_ports; 1010 + __Request__task_get_exception_ports_t Request_task_get_exception_ports; 1011 + __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; 1012 + __Request__lock_set_create_t Request_lock_set_create; 1013 + __Request__lock_set_destroy_t Request_lock_set_destroy; 1014 + __Request__semaphore_create_t Request_semaphore_create; 1015 + __Request__semaphore_destroy_t Request_semaphore_destroy; 1016 + __Request__task_policy_set_t Request_task_policy_set; 1017 + __Request__task_policy_get_t Request_task_policy_get; 1018 + __Request__task_sample_t Request_task_sample; 1019 + __Request__task_policy_t Request_task_policy; 1020 + __Request__task_set_emulation_t Request_task_set_emulation; 1021 + __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; 1022 + __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; 1023 + __Request__task_set_ras_pc_t Request_task_set_ras_pc; 1024 + __Request__task_assign_t Request_task_assign; 1025 + __Request__task_assign_default_t Request_task_assign_default; 1026 + __Request__task_get_assignment_t Request_task_get_assignment; 1027 + __Request__task_set_policy_t Request_task_set_policy; 1028 + __Request__task_get_state_t Request_task_get_state; 1029 + __Request__task_set_state_t Request_task_set_state; 1030 + }; 1031 + #endif /* !__RequestUnion__task_subsystem__defined */ 1032 + /* typedefs for all replies */ 1033 + 1034 + #ifndef __Reply__task_subsystem__defined 1035 + #define __Reply__task_subsystem__defined 1036 + 1037 + #ifdef __MigPackStructs 1038 + #pragma pack(4) 1039 + #endif 1040 + typedef struct { 1041 + mach_msg_header_t Head; 1042 + /* start of the kernel processed data */ 1043 + mach_msg_body_t msgh_body; 1044 + mach_msg_port_descriptor_t child_task; 1045 + /* end of the kernel processed data */ 1046 + } __Reply__task_create_t; 1047 + #ifdef __MigPackStructs 1048 + #pragma pack() 1049 + #endif 1050 + 1051 + #ifdef __MigPackStructs 1052 + #pragma pack(4) 1053 + #endif 1054 + typedef struct { 1055 + mach_msg_header_t Head; 1056 + NDR_record_t NDR; 1057 + kern_return_t RetCode; 1058 + } __Reply__task_terminate_t; 1059 + #ifdef __MigPackStructs 1060 + #pragma pack() 1061 + #endif 1062 + 1063 + #ifdef __MigPackStructs 1064 + #pragma pack(4) 1065 + #endif 1066 + typedef struct { 1067 + mach_msg_header_t Head; 1068 + /* start of the kernel processed data */ 1069 + mach_msg_body_t msgh_body; 1070 + mach_msg_ool_ports_descriptor_t act_list; 1071 + /* end of the kernel processed data */ 1072 + NDR_record_t NDR; 1073 + mach_msg_type_number_t act_listCnt; 1074 + } __Reply__task_threads_t; 1075 + #ifdef __MigPackStructs 1076 + #pragma pack() 1077 + #endif 1078 + 1079 + #ifdef __MigPackStructs 1080 + #pragma pack(4) 1081 + #endif 1082 + typedef struct { 1083 + mach_msg_header_t Head; 1084 + NDR_record_t NDR; 1085 + kern_return_t RetCode; 1086 + } __Reply__mach_ports_register_t; 1087 + #ifdef __MigPackStructs 1088 + #pragma pack() 1089 + #endif 1090 + 1091 + #ifdef __MigPackStructs 1092 + #pragma pack(4) 1093 + #endif 1094 + typedef struct { 1095 + mach_msg_header_t Head; 1096 + /* start of the kernel processed data */ 1097 + mach_msg_body_t msgh_body; 1098 + mach_msg_ool_ports_descriptor_t init_port_set; 1099 + /* end of the kernel processed data */ 1100 + NDR_record_t NDR; 1101 + mach_msg_type_number_t init_port_setCnt; 1102 + } __Reply__mach_ports_lookup_t; 1103 + #ifdef __MigPackStructs 1104 + #pragma pack() 1105 + #endif 1106 + 1107 + #ifdef __MigPackStructs 1108 + #pragma pack(4) 1109 + #endif 1110 + typedef struct { 1111 + mach_msg_header_t Head; 1112 + NDR_record_t NDR; 1113 + kern_return_t RetCode; 1114 + mach_msg_type_number_t task_info_outCnt; 1115 + integer_t task_info_out[10]; 1116 + } __Reply__task_info_t; 1117 + #ifdef __MigPackStructs 1118 + #pragma pack() 1119 + #endif 1120 + 1121 + #ifdef __MigPackStructs 1122 + #pragma pack(4) 1123 + #endif 1124 + typedef struct { 1125 + mach_msg_header_t Head; 1126 + NDR_record_t NDR; 1127 + kern_return_t RetCode; 1128 + } __Reply__task_set_info_t; 1129 + #ifdef __MigPackStructs 1130 + #pragma pack() 1131 + #endif 1132 + 1133 + #ifdef __MigPackStructs 1134 + #pragma pack(4) 1135 + #endif 1136 + typedef struct { 1137 + mach_msg_header_t Head; 1138 + NDR_record_t NDR; 1139 + kern_return_t RetCode; 1140 + } __Reply__task_suspend_t; 1141 + #ifdef __MigPackStructs 1142 + #pragma pack() 1143 + #endif 1144 + 1145 + #ifdef __MigPackStructs 1146 + #pragma pack(4) 1147 + #endif 1148 + typedef struct { 1149 + mach_msg_header_t Head; 1150 + NDR_record_t NDR; 1151 + kern_return_t RetCode; 1152 + } __Reply__task_resume_t; 1153 + #ifdef __MigPackStructs 1154 + #pragma pack() 1155 + #endif 1156 + 1157 + #ifdef __MigPackStructs 1158 + #pragma pack(4) 1159 + #endif 1160 + typedef struct { 1161 + mach_msg_header_t Head; 1162 + /* start of the kernel processed data */ 1163 + mach_msg_body_t msgh_body; 1164 + mach_msg_port_descriptor_t special_port; 1165 + /* end of the kernel processed data */ 1166 + } __Reply__task_get_special_port_t; 1167 + #ifdef __MigPackStructs 1168 + #pragma pack() 1169 + #endif 1170 + 1171 + #ifdef __MigPackStructs 1172 + #pragma pack(4) 1173 + #endif 1174 + typedef struct { 1175 + mach_msg_header_t Head; 1176 + NDR_record_t NDR; 1177 + kern_return_t RetCode; 1178 + } __Reply__task_set_special_port_t; 1179 + #ifdef __MigPackStructs 1180 + #pragma pack() 1181 + #endif 1182 + 1183 + #ifdef __MigPackStructs 1184 + #pragma pack(4) 1185 + #endif 1186 + typedef struct { 1187 + mach_msg_header_t Head; 1188 + /* start of the kernel processed data */ 1189 + mach_msg_body_t msgh_body; 1190 + mach_msg_port_descriptor_t child_act; 1191 + /* end of the kernel processed data */ 1192 + } __Reply__thread_create_t; 1193 + #ifdef __MigPackStructs 1194 + #pragma pack() 1195 + #endif 1196 + 1197 + #ifdef __MigPackStructs 1198 + #pragma pack(4) 1199 + #endif 1200 + typedef struct { 1201 + mach_msg_header_t Head; 1202 + /* start of the kernel processed data */ 1203 + mach_msg_body_t msgh_body; 1204 + mach_msg_port_descriptor_t child_act; 1205 + /* end of the kernel processed data */ 1206 + } __Reply__thread_create_running_t; 1207 + #ifdef __MigPackStructs 1208 + #pragma pack() 1209 + #endif 1210 + 1211 + #ifdef __MigPackStructs 1212 + #pragma pack(4) 1213 + #endif 1214 + typedef struct { 1215 + mach_msg_header_t Head; 1216 + NDR_record_t NDR; 1217 + kern_return_t RetCode; 1218 + } __Reply__task_set_exception_ports_t; 1219 + #ifdef __MigPackStructs 1220 + #pragma pack() 1221 + #endif 1222 + 1223 + #ifdef __MigPackStructs 1224 + #pragma pack(4) 1225 + #endif 1226 + typedef struct { 1227 + mach_msg_header_t Head; 1228 + /* start of the kernel processed data */ 1229 + mach_msg_body_t msgh_body; 1230 + mach_msg_port_descriptor_t old_handlers[32]; 1231 + /* end of the kernel processed data */ 1232 + NDR_record_t NDR; 1233 + mach_msg_type_number_t masksCnt; 1234 + exception_mask_t masks[32]; 1235 + exception_behavior_t old_behaviors[32]; 1236 + thread_state_flavor_t old_flavors[32]; 1237 + } __Reply__task_get_exception_ports_t; 1238 + #ifdef __MigPackStructs 1239 + #pragma pack() 1240 + #endif 1241 + 1242 + #ifdef __MigPackStructs 1243 + #pragma pack(4) 1244 + #endif 1245 + typedef struct { 1246 + mach_msg_header_t Head; 1247 + /* start of the kernel processed data */ 1248 + mach_msg_body_t msgh_body; 1249 + mach_msg_port_descriptor_t old_handlerss[32]; 1250 + /* end of the kernel processed data */ 1251 + NDR_record_t NDR; 1252 + mach_msg_type_number_t masksCnt; 1253 + exception_mask_t masks[32]; 1254 + exception_behavior_t old_behaviors[32]; 1255 + thread_state_flavor_t old_flavors[32]; 1256 + } __Reply__task_swap_exception_ports_t; 1257 + #ifdef __MigPackStructs 1258 + #pragma pack() 1259 + #endif 1260 + 1261 + #ifdef __MigPackStructs 1262 + #pragma pack(4) 1263 + #endif 1264 + typedef struct { 1265 + mach_msg_header_t Head; 1266 + /* start of the kernel processed data */ 1267 + mach_msg_body_t msgh_body; 1268 + mach_msg_port_descriptor_t new_lock_set; 1269 + /* end of the kernel processed data */ 1270 + } __Reply__lock_set_create_t; 1271 + #ifdef __MigPackStructs 1272 + #pragma pack() 1273 + #endif 1274 + 1275 + #ifdef __MigPackStructs 1276 + #pragma pack(4) 1277 + #endif 1278 + typedef struct { 1279 + mach_msg_header_t Head; 1280 + NDR_record_t NDR; 1281 + kern_return_t RetCode; 1282 + } __Reply__lock_set_destroy_t; 1283 + #ifdef __MigPackStructs 1284 + #pragma pack() 1285 + #endif 1286 + 1287 + #ifdef __MigPackStructs 1288 + #pragma pack(4) 1289 + #endif 1290 + typedef struct { 1291 + mach_msg_header_t Head; 1292 + /* start of the kernel processed data */ 1293 + mach_msg_body_t msgh_body; 1294 + mach_msg_port_descriptor_t semaphore; 1295 + /* end of the kernel processed data */ 1296 + } __Reply__semaphore_create_t; 1297 + #ifdef __MigPackStructs 1298 + #pragma pack() 1299 + #endif 1300 + 1301 + #ifdef __MigPackStructs 1302 + #pragma pack(4) 1303 + #endif 1304 + typedef struct { 1305 + mach_msg_header_t Head; 1306 + NDR_record_t NDR; 1307 + kern_return_t RetCode; 1308 + } __Reply__semaphore_destroy_t; 1309 + #ifdef __MigPackStructs 1310 + #pragma pack() 1311 + #endif 1312 + 1313 + #ifdef __MigPackStructs 1314 + #pragma pack(4) 1315 + #endif 1316 + typedef struct { 1317 + mach_msg_header_t Head; 1318 + NDR_record_t NDR; 1319 + kern_return_t RetCode; 1320 + } __Reply__task_policy_set_t; 1321 + #ifdef __MigPackStructs 1322 + #pragma pack() 1323 + #endif 1324 + 1325 + #ifdef __MigPackStructs 1326 + #pragma pack(4) 1327 + #endif 1328 + typedef struct { 1329 + mach_msg_header_t Head; 1330 + NDR_record_t NDR; 1331 + kern_return_t RetCode; 1332 + mach_msg_type_number_t policy_infoCnt; 1333 + integer_t policy_info[16]; 1334 + boolean_t get_default; 1335 + } __Reply__task_policy_get_t; 1336 + #ifdef __MigPackStructs 1337 + #pragma pack() 1338 + #endif 1339 + 1340 + #ifdef __MigPackStructs 1341 + #pragma pack(4) 1342 + #endif 1343 + typedef struct { 1344 + mach_msg_header_t Head; 1345 + NDR_record_t NDR; 1346 + kern_return_t RetCode; 1347 + } __Reply__task_sample_t; 1348 + #ifdef __MigPackStructs 1349 + #pragma pack() 1350 + #endif 1351 + 1352 + #ifdef __MigPackStructs 1353 + #pragma pack(4) 1354 + #endif 1355 + typedef struct { 1356 + mach_msg_header_t Head; 1357 + NDR_record_t NDR; 1358 + kern_return_t RetCode; 1359 + } __Reply__task_policy_t; 1360 + #ifdef __MigPackStructs 1361 + #pragma pack() 1362 + #endif 1363 + 1364 + #ifdef __MigPackStructs 1365 + #pragma pack(4) 1366 + #endif 1367 + typedef struct { 1368 + mach_msg_header_t Head; 1369 + NDR_record_t NDR; 1370 + kern_return_t RetCode; 1371 + } __Reply__task_set_emulation_t; 1372 + #ifdef __MigPackStructs 1373 + #pragma pack() 1374 + #endif 1375 + 1376 + #ifdef __MigPackStructs 1377 + #pragma pack(4) 1378 + #endif 1379 + typedef struct { 1380 + mach_msg_header_t Head; 1381 + /* start of the kernel processed data */ 1382 + mach_msg_body_t msgh_body; 1383 + mach_msg_ool_descriptor_t emulation_vector; 1384 + /* end of the kernel processed data */ 1385 + NDR_record_t NDR; 1386 + int vector_start; 1387 + mach_msg_type_number_t emulation_vectorCnt; 1388 + } __Reply__task_get_emulation_vector_t; 1389 + #ifdef __MigPackStructs 1390 + #pragma pack() 1391 + #endif 1392 + 1393 + #ifdef __MigPackStructs 1394 + #pragma pack(4) 1395 + #endif 1396 + typedef struct { 1397 + mach_msg_header_t Head; 1398 + NDR_record_t NDR; 1399 + kern_return_t RetCode; 1400 + } __Reply__task_set_emulation_vector_t; 1401 + #ifdef __MigPackStructs 1402 + #pragma pack() 1403 + #endif 1404 + 1405 + #ifdef __MigPackStructs 1406 + #pragma pack(4) 1407 + #endif 1408 + typedef struct { 1409 + mach_msg_header_t Head; 1410 + NDR_record_t NDR; 1411 + kern_return_t RetCode; 1412 + } __Reply__task_set_ras_pc_t; 1413 + #ifdef __MigPackStructs 1414 + #pragma pack() 1415 + #endif 1416 + 1417 + #ifdef __MigPackStructs 1418 + #pragma pack(4) 1419 + #endif 1420 + typedef struct { 1421 + mach_msg_header_t Head; 1422 + NDR_record_t NDR; 1423 + kern_return_t RetCode; 1424 + } __Reply__task_assign_t; 1425 + #ifdef __MigPackStructs 1426 + #pragma pack() 1427 + #endif 1428 + 1429 + #ifdef __MigPackStructs 1430 + #pragma pack(4) 1431 + #endif 1432 + typedef struct { 1433 + mach_msg_header_t Head; 1434 + NDR_record_t NDR; 1435 + kern_return_t RetCode; 1436 + } __Reply__task_assign_default_t; 1437 + #ifdef __MigPackStructs 1438 + #pragma pack() 1439 + #endif 1440 + 1441 + #ifdef __MigPackStructs 1442 + #pragma pack(4) 1443 + #endif 1444 + typedef struct { 1445 + mach_msg_header_t Head; 1446 + /* start of the kernel processed data */ 1447 + mach_msg_body_t msgh_body; 1448 + mach_msg_port_descriptor_t assigned_set; 1449 + /* end of the kernel processed data */ 1450 + } __Reply__task_get_assignment_t; 1451 + #ifdef __MigPackStructs 1452 + #pragma pack() 1453 + #endif 1454 + 1455 + #ifdef __MigPackStructs 1456 + #pragma pack(4) 1457 + #endif 1458 + typedef struct { 1459 + mach_msg_header_t Head; 1460 + NDR_record_t NDR; 1461 + kern_return_t RetCode; 1462 + } __Reply__task_set_policy_t; 1463 + #ifdef __MigPackStructs 1464 + #pragma pack() 1465 + #endif 1466 + 1467 + #ifdef __MigPackStructs 1468 + #pragma pack(4) 1469 + #endif 1470 + typedef struct { 1471 + mach_msg_header_t Head; 1472 + NDR_record_t NDR; 1473 + kern_return_t RetCode; 1474 + mach_msg_type_number_t old_stateCnt; 1475 + natural_t old_state[144]; 1476 + } __Reply__task_get_state_t; 1477 + #ifdef __MigPackStructs 1478 + #pragma pack() 1479 + #endif 1480 + 1481 + #ifdef __MigPackStructs 1482 + #pragma pack(4) 1483 + #endif 1484 + typedef struct { 1485 + mach_msg_header_t Head; 1486 + NDR_record_t NDR; 1487 + kern_return_t RetCode; 1488 + } __Reply__task_set_state_t; 1489 + #ifdef __MigPackStructs 1490 + #pragma pack() 1491 + #endif 1492 + #endif /* !__Reply__task_subsystem__defined */ 1493 + 1494 + /* union of all replies */ 1495 + 1496 + #ifndef __ReplyUnion__task_subsystem__defined 1497 + #define __ReplyUnion__task_subsystem__defined 1498 + union __ReplyUnion__task_subsystem { 1499 + __Reply__task_create_t Reply_task_create; 1500 + __Reply__task_terminate_t Reply_task_terminate; 1501 + __Reply__task_threads_t Reply_task_threads; 1502 + __Reply__mach_ports_register_t Reply_mach_ports_register; 1503 + __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; 1504 + __Reply__task_info_t Reply_task_info; 1505 + __Reply__task_set_info_t Reply_task_set_info; 1506 + __Reply__task_suspend_t Reply_task_suspend; 1507 + __Reply__task_resume_t Reply_task_resume; 1508 + __Reply__task_get_special_port_t Reply_task_get_special_port; 1509 + __Reply__task_set_special_port_t Reply_task_set_special_port; 1510 + __Reply__thread_create_t Reply_thread_create; 1511 + __Reply__thread_create_running_t Reply_thread_create_running; 1512 + __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; 1513 + __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; 1514 + __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; 1515 + __Reply__lock_set_create_t Reply_lock_set_create; 1516 + __Reply__lock_set_destroy_t Reply_lock_set_destroy; 1517 + __Reply__semaphore_create_t Reply_semaphore_create; 1518 + __Reply__semaphore_destroy_t Reply_semaphore_destroy; 1519 + __Reply__task_policy_set_t Reply_task_policy_set; 1520 + __Reply__task_policy_get_t Reply_task_policy_get; 1521 + __Reply__task_sample_t Reply_task_sample; 1522 + __Reply__task_policy_t Reply_task_policy; 1523 + __Reply__task_set_emulation_t Reply_task_set_emulation; 1524 + __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; 1525 + __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; 1526 + __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; 1527 + __Reply__task_assign_t Reply_task_assign; 1528 + __Reply__task_assign_default_t Reply_task_assign_default; 1529 + __Reply__task_get_assignment_t Reply_task_get_assignment; 1530 + __Reply__task_set_policy_t Reply_task_set_policy; 1531 + __Reply__task_get_state_t Reply_task_get_state; 1532 + __Reply__task_set_state_t Reply_task_set_state; 1533 + }; 1534 + #endif /* !__RequestUnion__task_subsystem__defined */ 1535 + 1536 + #ifndef subsystem_to_name_map_task 1537 + #define subsystem_to_name_map_task \ 1538 + { "task_create", 3400 },\ 1539 + { "task_terminate", 3401 },\ 1540 + { "task_threads", 3402 },\ 1541 + { "mach_ports_register", 3403 },\ 1542 + { "mach_ports_lookup", 3404 },\ 1543 + { "task_info", 3405 },\ 1544 + { "task_set_info", 3406 },\ 1545 + { "task_suspend", 3407 },\ 1546 + { "task_resume", 3408 },\ 1547 + { "task_get_special_port", 3409 },\ 1548 + { "task_set_special_port", 3410 },\ 1549 + { "thread_create", 3411 },\ 1550 + { "thread_create_running", 3412 },\ 1551 + { "task_set_exception_ports", 3413 },\ 1552 + { "task_get_exception_ports", 3414 },\ 1553 + { "task_swap_exception_ports", 3415 },\ 1554 + { "lock_set_create", 3416 },\ 1555 + { "lock_set_destroy", 3417 },\ 1556 + { "semaphore_create", 3418 },\ 1557 + { "semaphore_destroy", 3419 },\ 1558 + { "task_policy_set", 3420 },\ 1559 + { "task_policy_get", 3421 },\ 1560 + { "task_sample", 3422 },\ 1561 + { "task_policy", 3423 },\ 1562 + { "task_set_emulation", 3424 },\ 1563 + { "task_get_emulation_vector", 3425 },\ 1564 + { "task_set_emulation_vector", 3426 },\ 1565 + { "task_set_ras_pc", 3427 },\ 1566 + { "task_assign", 3429 },\ 1567 + { "task_assign_default", 3430 },\ 1568 + { "task_get_assignment", 3431 },\ 1569 + { "task_set_policy", 3432 },\ 1570 + { "task_get_state", 3433 },\ 1571 + { "task_set_state", 3434 } 1572 + #endif 1573 + 1574 + #ifdef __AfterMigUserHeader 1575 + __AfterMigUserHeader 1576 + #endif /* __AfterMigUserHeader */ 1577 + 1578 + #endif /* _task_user_ */
+1155
platform-include/mach/ppc/thread_act.h
··· 1 + #ifndef _thread_act_user_ 2 + #define _thread_act_user_ 3 + 4 + /* Module thread_act */ 5 + 6 + #include <string.h> 7 + #include <mach/ndr.h> 8 + #include <mach/boolean.h> 9 + #include <mach/kern_return.h> 10 + #include <mach/notify.h> 11 + #include <mach/mach_types.h> 12 + #include <mach/message.h> 13 + #include <mach/mig_errors.h> 14 + #include <mach/port.h> 15 + 16 + #ifdef AUTOTEST 17 + #ifndef FUNCTION_PTR_T 18 + #define FUNCTION_PTR_T 19 + typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); 20 + typedef struct { 21 + char *name; 22 + function_ptr_t function; 23 + } function_table_entry; 24 + typedef function_table_entry *function_table_t; 25 + #endif /* FUNCTION_PTR_T */ 26 + #endif /* AUTOTEST */ 27 + 28 + #ifndef thread_act_MSG_COUNT 29 + #define thread_act_MSG_COUNT 25 30 + #endif /* thread_act_MSG_COUNT */ 31 + 32 + #include <mach/std_types.h> 33 + #include <mach/mig.h> 34 + #include <mach/mig.h> 35 + #include <mach/mach_types.h> 36 + 37 + #ifdef __BeforeMigUserHeader 38 + __BeforeMigUserHeader 39 + #endif /* __BeforeMigUserHeader */ 40 + 41 + #include <sys/cdefs.h> 42 + __BEGIN_DECLS 43 + 44 + 45 + /* Routine thread_terminate */ 46 + #ifdef mig_external 47 + mig_external 48 + #else 49 + extern 50 + #endif /* mig_external */ 51 + kern_return_t thread_terminate 52 + ( 53 + thread_act_t target_act 54 + ); 55 + 56 + /* Routine act_get_state */ 57 + #ifdef mig_external 58 + mig_external 59 + #else 60 + extern 61 + #endif /* mig_external */ 62 + kern_return_t act_get_state 63 + ( 64 + thread_act_t target_act, 65 + int flavor, 66 + thread_state_t old_state, 67 + mach_msg_type_number_t *old_stateCnt 68 + ); 69 + 70 + /* Routine act_set_state */ 71 + #ifdef mig_external 72 + mig_external 73 + #else 74 + extern 75 + #endif /* mig_external */ 76 + kern_return_t act_set_state 77 + ( 78 + thread_act_t target_act, 79 + int flavor, 80 + thread_state_t new_state, 81 + mach_msg_type_number_t new_stateCnt 82 + ); 83 + 84 + /* Routine thread_get_state */ 85 + #ifdef mig_external 86 + mig_external 87 + #else 88 + extern 89 + #endif /* mig_external */ 90 + kern_return_t thread_get_state 91 + ( 92 + thread_act_t target_act, 93 + thread_state_flavor_t flavor, 94 + thread_state_t old_state, 95 + mach_msg_type_number_t *old_stateCnt 96 + ); 97 + 98 + /* Routine thread_set_state */ 99 + #ifdef mig_external 100 + mig_external 101 + #else 102 + extern 103 + #endif /* mig_external */ 104 + kern_return_t thread_set_state 105 + ( 106 + thread_act_t target_act, 107 + thread_state_flavor_t flavor, 108 + thread_state_t new_state, 109 + mach_msg_type_number_t new_stateCnt 110 + ); 111 + 112 + /* Routine thread_suspend */ 113 + #ifdef mig_external 114 + mig_external 115 + #else 116 + extern 117 + #endif /* mig_external */ 118 + kern_return_t thread_suspend 119 + ( 120 + thread_act_t target_act 121 + ); 122 + 123 + /* Routine thread_resume */ 124 + #ifdef mig_external 125 + mig_external 126 + #else 127 + extern 128 + #endif /* mig_external */ 129 + kern_return_t thread_resume 130 + ( 131 + thread_act_t target_act 132 + ); 133 + 134 + /* Routine thread_abort */ 135 + #ifdef mig_external 136 + mig_external 137 + #else 138 + extern 139 + #endif /* mig_external */ 140 + kern_return_t thread_abort 141 + ( 142 + thread_act_t target_act 143 + ); 144 + 145 + /* Routine thread_abort_safely */ 146 + #ifdef mig_external 147 + mig_external 148 + #else 149 + extern 150 + #endif /* mig_external */ 151 + kern_return_t thread_abort_safely 152 + ( 153 + thread_act_t target_act 154 + ); 155 + 156 + /* Routine thread_depress_abort */ 157 + #ifdef mig_external 158 + mig_external 159 + #else 160 + extern 161 + #endif /* mig_external */ 162 + kern_return_t thread_depress_abort 163 + ( 164 + thread_act_t thread 165 + ); 166 + 167 + /* Routine thread_get_special_port */ 168 + #ifdef mig_external 169 + mig_external 170 + #else 171 + extern 172 + #endif /* mig_external */ 173 + kern_return_t thread_get_special_port 174 + ( 175 + thread_act_t thr_act, 176 + int which_port, 177 + mach_port_t *special_port 178 + ); 179 + 180 + /* Routine thread_set_special_port */ 181 + #ifdef mig_external 182 + mig_external 183 + #else 184 + extern 185 + #endif /* mig_external */ 186 + kern_return_t thread_set_special_port 187 + ( 188 + thread_act_t thr_act, 189 + int which_port, 190 + mach_port_t special_port 191 + ); 192 + 193 + /* Routine thread_info */ 194 + #ifdef mig_external 195 + mig_external 196 + #else 197 + extern 198 + #endif /* mig_external */ 199 + kern_return_t thread_info 200 + ( 201 + thread_act_t target_act, 202 + thread_flavor_t flavor, 203 + thread_info_t thread_info_out, 204 + mach_msg_type_number_t *thread_info_outCnt 205 + ); 206 + 207 + /* Routine thread_set_exception_ports */ 208 + #ifdef mig_external 209 + mig_external 210 + #else 211 + extern 212 + #endif /* mig_external */ 213 + kern_return_t thread_set_exception_ports 214 + ( 215 + thread_act_t thread, 216 + exception_mask_t exception_mask, 217 + mach_port_t new_port, 218 + exception_behavior_t behavior, 219 + thread_state_flavor_t new_flavor 220 + ); 221 + 222 + /* Routine thread_get_exception_ports */ 223 + #ifdef mig_external 224 + mig_external 225 + #else 226 + extern 227 + #endif /* mig_external */ 228 + kern_return_t thread_get_exception_ports 229 + ( 230 + thread_act_t thread, 231 + exception_mask_t exception_mask, 232 + exception_mask_array_t masks, 233 + mach_msg_type_number_t *masksCnt, 234 + exception_handler_array_t old_handlers, 235 + exception_behavior_array_t old_behaviors, 236 + exception_flavor_array_t old_flavors 237 + ); 238 + 239 + /* Routine thread_swap_exception_ports */ 240 + #ifdef mig_external 241 + mig_external 242 + #else 243 + extern 244 + #endif /* mig_external */ 245 + kern_return_t thread_swap_exception_ports 246 + ( 247 + thread_act_t thread, 248 + exception_mask_t exception_mask, 249 + mach_port_t new_port, 250 + exception_behavior_t behavior, 251 + thread_state_flavor_t new_flavor, 252 + exception_mask_array_t masks, 253 + mach_msg_type_number_t *masksCnt, 254 + exception_handler_array_t old_handlers, 255 + exception_behavior_array_t old_behaviors, 256 + exception_flavor_array_t old_flavors 257 + ); 258 + 259 + /* Routine thread_policy */ 260 + #ifdef mig_external 261 + mig_external 262 + #else 263 + extern 264 + #endif /* mig_external */ 265 + kern_return_t thread_policy 266 + ( 267 + thread_act_t thr_act, 268 + policy_t policy, 269 + policy_base_t base, 270 + mach_msg_type_number_t baseCnt, 271 + boolean_t set_limit 272 + ); 273 + 274 + /* Routine thread_policy_set */ 275 + #ifdef mig_external 276 + mig_external 277 + #else 278 + extern 279 + #endif /* mig_external */ 280 + kern_return_t thread_policy_set 281 + ( 282 + thread_act_t thread, 283 + thread_policy_flavor_t flavor, 284 + thread_policy_t policy_info, 285 + mach_msg_type_number_t policy_infoCnt 286 + ); 287 + 288 + /* Routine thread_policy_get */ 289 + #ifdef mig_external 290 + mig_external 291 + #else 292 + extern 293 + #endif /* mig_external */ 294 + kern_return_t thread_policy_get 295 + ( 296 + thread_act_t thread, 297 + thread_policy_flavor_t flavor, 298 + thread_policy_t policy_info, 299 + mach_msg_type_number_t *policy_infoCnt, 300 + boolean_t *get_default 301 + ); 302 + 303 + /* Routine thread_sample */ 304 + #ifdef mig_external 305 + mig_external 306 + #else 307 + extern 308 + #endif /* mig_external */ 309 + kern_return_t thread_sample 310 + ( 311 + thread_act_t thread, 312 + mach_port_t reply 313 + ); 314 + 315 + /* Routine etap_trace_thread */ 316 + #ifdef mig_external 317 + mig_external 318 + #else 319 + extern 320 + #endif /* mig_external */ 321 + kern_return_t etap_trace_thread 322 + ( 323 + thread_act_t target_act, 324 + boolean_t trace_status 325 + ); 326 + 327 + /* Routine thread_assign */ 328 + #ifdef mig_external 329 + mig_external 330 + #else 331 + extern 332 + #endif /* mig_external */ 333 + kern_return_t thread_assign 334 + ( 335 + thread_act_t thread, 336 + processor_set_t new_set 337 + ); 338 + 339 + /* Routine thread_assign_default */ 340 + #ifdef mig_external 341 + mig_external 342 + #else 343 + extern 344 + #endif /* mig_external */ 345 + kern_return_t thread_assign_default 346 + ( 347 + thread_act_t thread 348 + ); 349 + 350 + /* Routine thread_get_assignment */ 351 + #ifdef mig_external 352 + mig_external 353 + #else 354 + extern 355 + #endif /* mig_external */ 356 + kern_return_t thread_get_assignment 357 + ( 358 + thread_act_t thread, 359 + processor_set_name_t *assigned_set 360 + ); 361 + 362 + /* Routine thread_set_policy */ 363 + #ifdef mig_external 364 + mig_external 365 + #else 366 + extern 367 + #endif /* mig_external */ 368 + kern_return_t thread_set_policy 369 + ( 370 + thread_act_t thr_act, 371 + processor_set_t pset, 372 + policy_t policy, 373 + policy_base_t base, 374 + mach_msg_type_number_t baseCnt, 375 + policy_limit_t limit, 376 + mach_msg_type_number_t limitCnt 377 + ); 378 + 379 + __END_DECLS 380 + 381 + /********************** Caution **************************/ 382 + /* The following data types should be used to calculate */ 383 + /* maximum message sizes only. The actual message may be */ 384 + /* smaller, and the position of the arguments within the */ 385 + /* message layout may vary from what is presented here. */ 386 + /* For example, if any of the arguments are variable- */ 387 + /* sized, and less than the maximum is sent, the data */ 388 + /* will be packed tight in the actual message to reduce */ 389 + /* the presence of holes. */ 390 + /********************** Caution **************************/ 391 + 392 + /* typedefs for all requests */ 393 + 394 + #ifndef __Request__thread_act_subsystem__defined 395 + #define __Request__thread_act_subsystem__defined 396 + 397 + #ifdef __MigPackStructs 398 + #pragma pack(4) 399 + #endif 400 + typedef struct { 401 + mach_msg_header_t Head; 402 + } __Request__thread_terminate_t; 403 + #ifdef __MigPackStructs 404 + #pragma pack() 405 + #endif 406 + 407 + #ifdef __MigPackStructs 408 + #pragma pack(4) 409 + #endif 410 + typedef struct { 411 + mach_msg_header_t Head; 412 + NDR_record_t NDR; 413 + int flavor; 414 + mach_msg_type_number_t old_stateCnt; 415 + } __Request__act_get_state_t; 416 + #ifdef __MigPackStructs 417 + #pragma pack() 418 + #endif 419 + 420 + #ifdef __MigPackStructs 421 + #pragma pack(4) 422 + #endif 423 + typedef struct { 424 + mach_msg_header_t Head; 425 + NDR_record_t NDR; 426 + int flavor; 427 + mach_msg_type_number_t new_stateCnt; 428 + natural_t new_state[144]; 429 + } __Request__act_set_state_t; 430 + #ifdef __MigPackStructs 431 + #pragma pack() 432 + #endif 433 + 434 + #ifdef __MigPackStructs 435 + #pragma pack(4) 436 + #endif 437 + typedef struct { 438 + mach_msg_header_t Head; 439 + NDR_record_t NDR; 440 + thread_state_flavor_t flavor; 441 + mach_msg_type_number_t old_stateCnt; 442 + } __Request__thread_get_state_t; 443 + #ifdef __MigPackStructs 444 + #pragma pack() 445 + #endif 446 + 447 + #ifdef __MigPackStructs 448 + #pragma pack(4) 449 + #endif 450 + typedef struct { 451 + mach_msg_header_t Head; 452 + NDR_record_t NDR; 453 + thread_state_flavor_t flavor; 454 + mach_msg_type_number_t new_stateCnt; 455 + natural_t new_state[144]; 456 + } __Request__thread_set_state_t; 457 + #ifdef __MigPackStructs 458 + #pragma pack() 459 + #endif 460 + 461 + #ifdef __MigPackStructs 462 + #pragma pack(4) 463 + #endif 464 + typedef struct { 465 + mach_msg_header_t Head; 466 + } __Request__thread_suspend_t; 467 + #ifdef __MigPackStructs 468 + #pragma pack() 469 + #endif 470 + 471 + #ifdef __MigPackStructs 472 + #pragma pack(4) 473 + #endif 474 + typedef struct { 475 + mach_msg_header_t Head; 476 + } __Request__thread_resume_t; 477 + #ifdef __MigPackStructs 478 + #pragma pack() 479 + #endif 480 + 481 + #ifdef __MigPackStructs 482 + #pragma pack(4) 483 + #endif 484 + typedef struct { 485 + mach_msg_header_t Head; 486 + } __Request__thread_abort_t; 487 + #ifdef __MigPackStructs 488 + #pragma pack() 489 + #endif 490 + 491 + #ifdef __MigPackStructs 492 + #pragma pack(4) 493 + #endif 494 + typedef struct { 495 + mach_msg_header_t Head; 496 + } __Request__thread_abort_safely_t; 497 + #ifdef __MigPackStructs 498 + #pragma pack() 499 + #endif 500 + 501 + #ifdef __MigPackStructs 502 + #pragma pack(4) 503 + #endif 504 + typedef struct { 505 + mach_msg_header_t Head; 506 + } __Request__thread_depress_abort_t; 507 + #ifdef __MigPackStructs 508 + #pragma pack() 509 + #endif 510 + 511 + #ifdef __MigPackStructs 512 + #pragma pack(4) 513 + #endif 514 + typedef struct { 515 + mach_msg_header_t Head; 516 + NDR_record_t NDR; 517 + int which_port; 518 + } __Request__thread_get_special_port_t; 519 + #ifdef __MigPackStructs 520 + #pragma pack() 521 + #endif 522 + 523 + #ifdef __MigPackStructs 524 + #pragma pack(4) 525 + #endif 526 + typedef struct { 527 + mach_msg_header_t Head; 528 + /* start of the kernel processed data */ 529 + mach_msg_body_t msgh_body; 530 + mach_msg_port_descriptor_t special_port; 531 + /* end of the kernel processed data */ 532 + NDR_record_t NDR; 533 + int which_port; 534 + } __Request__thread_set_special_port_t; 535 + #ifdef __MigPackStructs 536 + #pragma pack() 537 + #endif 538 + 539 + #ifdef __MigPackStructs 540 + #pragma pack(4) 541 + #endif 542 + typedef struct { 543 + mach_msg_header_t Head; 544 + NDR_record_t NDR; 545 + thread_flavor_t flavor; 546 + mach_msg_type_number_t thread_info_outCnt; 547 + } __Request__thread_info_t; 548 + #ifdef __MigPackStructs 549 + #pragma pack() 550 + #endif 551 + 552 + #ifdef __MigPackStructs 553 + #pragma pack(4) 554 + #endif 555 + typedef struct { 556 + mach_msg_header_t Head; 557 + /* start of the kernel processed data */ 558 + mach_msg_body_t msgh_body; 559 + mach_msg_port_descriptor_t new_port; 560 + /* end of the kernel processed data */ 561 + NDR_record_t NDR; 562 + exception_mask_t exception_mask; 563 + exception_behavior_t behavior; 564 + thread_state_flavor_t new_flavor; 565 + } __Request__thread_set_exception_ports_t; 566 + #ifdef __MigPackStructs 567 + #pragma pack() 568 + #endif 569 + 570 + #ifdef __MigPackStructs 571 + #pragma pack(4) 572 + #endif 573 + typedef struct { 574 + mach_msg_header_t Head; 575 + NDR_record_t NDR; 576 + exception_mask_t exception_mask; 577 + } __Request__thread_get_exception_ports_t; 578 + #ifdef __MigPackStructs 579 + #pragma pack() 580 + #endif 581 + 582 + #ifdef __MigPackStructs 583 + #pragma pack(4) 584 + #endif 585 + typedef struct { 586 + mach_msg_header_t Head; 587 + /* start of the kernel processed data */ 588 + mach_msg_body_t msgh_body; 589 + mach_msg_port_descriptor_t new_port; 590 + /* end of the kernel processed data */ 591 + NDR_record_t NDR; 592 + exception_mask_t exception_mask; 593 + exception_behavior_t behavior; 594 + thread_state_flavor_t new_flavor; 595 + } __Request__thread_swap_exception_ports_t; 596 + #ifdef __MigPackStructs 597 + #pragma pack() 598 + #endif 599 + 600 + #ifdef __MigPackStructs 601 + #pragma pack(4) 602 + #endif 603 + typedef struct { 604 + mach_msg_header_t Head; 605 + NDR_record_t NDR; 606 + policy_t policy; 607 + mach_msg_type_number_t baseCnt; 608 + integer_t base[5]; 609 + boolean_t set_limit; 610 + } __Request__thread_policy_t; 611 + #ifdef __MigPackStructs 612 + #pragma pack() 613 + #endif 614 + 615 + #ifdef __MigPackStructs 616 + #pragma pack(4) 617 + #endif 618 + typedef struct { 619 + mach_msg_header_t Head; 620 + NDR_record_t NDR; 621 + thread_policy_flavor_t flavor; 622 + mach_msg_type_number_t policy_infoCnt; 623 + integer_t policy_info[16]; 624 + } __Request__thread_policy_set_t; 625 + #ifdef __MigPackStructs 626 + #pragma pack() 627 + #endif 628 + 629 + #ifdef __MigPackStructs 630 + #pragma pack(4) 631 + #endif 632 + typedef struct { 633 + mach_msg_header_t Head; 634 + NDR_record_t NDR; 635 + thread_policy_flavor_t flavor; 636 + mach_msg_type_number_t policy_infoCnt; 637 + boolean_t get_default; 638 + } __Request__thread_policy_get_t; 639 + #ifdef __MigPackStructs 640 + #pragma pack() 641 + #endif 642 + 643 + #ifdef __MigPackStructs 644 + #pragma pack(4) 645 + #endif 646 + typedef struct { 647 + mach_msg_header_t Head; 648 + /* start of the kernel processed data */ 649 + mach_msg_body_t msgh_body; 650 + mach_msg_port_descriptor_t reply; 651 + /* end of the kernel processed data */ 652 + } __Request__thread_sample_t; 653 + #ifdef __MigPackStructs 654 + #pragma pack() 655 + #endif 656 + 657 + #ifdef __MigPackStructs 658 + #pragma pack(4) 659 + #endif 660 + typedef struct { 661 + mach_msg_header_t Head; 662 + NDR_record_t NDR; 663 + boolean_t trace_status; 664 + } __Request__etap_trace_thread_t; 665 + #ifdef __MigPackStructs 666 + #pragma pack() 667 + #endif 668 + 669 + #ifdef __MigPackStructs 670 + #pragma pack(4) 671 + #endif 672 + typedef struct { 673 + mach_msg_header_t Head; 674 + /* start of the kernel processed data */ 675 + mach_msg_body_t msgh_body; 676 + mach_msg_port_descriptor_t new_set; 677 + /* end of the kernel processed data */ 678 + } __Request__thread_assign_t; 679 + #ifdef __MigPackStructs 680 + #pragma pack() 681 + #endif 682 + 683 + #ifdef __MigPackStructs 684 + #pragma pack(4) 685 + #endif 686 + typedef struct { 687 + mach_msg_header_t Head; 688 + } __Request__thread_assign_default_t; 689 + #ifdef __MigPackStructs 690 + #pragma pack() 691 + #endif 692 + 693 + #ifdef __MigPackStructs 694 + #pragma pack(4) 695 + #endif 696 + typedef struct { 697 + mach_msg_header_t Head; 698 + } __Request__thread_get_assignment_t; 699 + #ifdef __MigPackStructs 700 + #pragma pack() 701 + #endif 702 + 703 + #ifdef __MigPackStructs 704 + #pragma pack(4) 705 + #endif 706 + typedef struct { 707 + mach_msg_header_t Head; 708 + /* start of the kernel processed data */ 709 + mach_msg_body_t msgh_body; 710 + mach_msg_port_descriptor_t pset; 711 + /* end of the kernel processed data */ 712 + NDR_record_t NDR; 713 + policy_t policy; 714 + mach_msg_type_number_t baseCnt; 715 + integer_t base[5]; 716 + mach_msg_type_number_t limitCnt; 717 + integer_t limit[1]; 718 + } __Request__thread_set_policy_t; 719 + #ifdef __MigPackStructs 720 + #pragma pack() 721 + #endif 722 + #endif /* !__Request__thread_act_subsystem__defined */ 723 + 724 + /* union of all requests */ 725 + 726 + #ifndef __RequestUnion__thread_act_subsystem__defined 727 + #define __RequestUnion__thread_act_subsystem__defined 728 + union __RequestUnion__thread_act_subsystem { 729 + __Request__thread_terminate_t Request_thread_terminate; 730 + __Request__act_get_state_t Request_act_get_state; 731 + __Request__act_set_state_t Request_act_set_state; 732 + __Request__thread_get_state_t Request_thread_get_state; 733 + __Request__thread_set_state_t Request_thread_set_state; 734 + __Request__thread_suspend_t Request_thread_suspend; 735 + __Request__thread_resume_t Request_thread_resume; 736 + __Request__thread_abort_t Request_thread_abort; 737 + __Request__thread_abort_safely_t Request_thread_abort_safely; 738 + __Request__thread_depress_abort_t Request_thread_depress_abort; 739 + __Request__thread_get_special_port_t Request_thread_get_special_port; 740 + __Request__thread_set_special_port_t Request_thread_set_special_port; 741 + __Request__thread_info_t Request_thread_info; 742 + __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; 743 + __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; 744 + __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; 745 + __Request__thread_policy_t Request_thread_policy; 746 + __Request__thread_policy_set_t Request_thread_policy_set; 747 + __Request__thread_policy_get_t Request_thread_policy_get; 748 + __Request__thread_sample_t Request_thread_sample; 749 + __Request__etap_trace_thread_t Request_etap_trace_thread; 750 + __Request__thread_assign_t Request_thread_assign; 751 + __Request__thread_assign_default_t Request_thread_assign_default; 752 + __Request__thread_get_assignment_t Request_thread_get_assignment; 753 + __Request__thread_set_policy_t Request_thread_set_policy; 754 + }; 755 + #endif /* !__RequestUnion__thread_act_subsystem__defined */ 756 + /* typedefs for all replies */ 757 + 758 + #ifndef __Reply__thread_act_subsystem__defined 759 + #define __Reply__thread_act_subsystem__defined 760 + 761 + #ifdef __MigPackStructs 762 + #pragma pack(4) 763 + #endif 764 + typedef struct { 765 + mach_msg_header_t Head; 766 + NDR_record_t NDR; 767 + kern_return_t RetCode; 768 + } __Reply__thread_terminate_t; 769 + #ifdef __MigPackStructs 770 + #pragma pack() 771 + #endif 772 + 773 + #ifdef __MigPackStructs 774 + #pragma pack(4) 775 + #endif 776 + typedef struct { 777 + mach_msg_header_t Head; 778 + NDR_record_t NDR; 779 + kern_return_t RetCode; 780 + mach_msg_type_number_t old_stateCnt; 781 + natural_t old_state[144]; 782 + } __Reply__act_get_state_t; 783 + #ifdef __MigPackStructs 784 + #pragma pack() 785 + #endif 786 + 787 + #ifdef __MigPackStructs 788 + #pragma pack(4) 789 + #endif 790 + typedef struct { 791 + mach_msg_header_t Head; 792 + NDR_record_t NDR; 793 + kern_return_t RetCode; 794 + } __Reply__act_set_state_t; 795 + #ifdef __MigPackStructs 796 + #pragma pack() 797 + #endif 798 + 799 + #ifdef __MigPackStructs 800 + #pragma pack(4) 801 + #endif 802 + typedef struct { 803 + mach_msg_header_t Head; 804 + NDR_record_t NDR; 805 + kern_return_t RetCode; 806 + mach_msg_type_number_t old_stateCnt; 807 + natural_t old_state[144]; 808 + } __Reply__thread_get_state_t; 809 + #ifdef __MigPackStructs 810 + #pragma pack() 811 + #endif 812 + 813 + #ifdef __MigPackStructs 814 + #pragma pack(4) 815 + #endif 816 + typedef struct { 817 + mach_msg_header_t Head; 818 + NDR_record_t NDR; 819 + kern_return_t RetCode; 820 + } __Reply__thread_set_state_t; 821 + #ifdef __MigPackStructs 822 + #pragma pack() 823 + #endif 824 + 825 + #ifdef __MigPackStructs 826 + #pragma pack(4) 827 + #endif 828 + typedef struct { 829 + mach_msg_header_t Head; 830 + NDR_record_t NDR; 831 + kern_return_t RetCode; 832 + } __Reply__thread_suspend_t; 833 + #ifdef __MigPackStructs 834 + #pragma pack() 835 + #endif 836 + 837 + #ifdef __MigPackStructs 838 + #pragma pack(4) 839 + #endif 840 + typedef struct { 841 + mach_msg_header_t Head; 842 + NDR_record_t NDR; 843 + kern_return_t RetCode; 844 + } __Reply__thread_resume_t; 845 + #ifdef __MigPackStructs 846 + #pragma pack() 847 + #endif 848 + 849 + #ifdef __MigPackStructs 850 + #pragma pack(4) 851 + #endif 852 + typedef struct { 853 + mach_msg_header_t Head; 854 + NDR_record_t NDR; 855 + kern_return_t RetCode; 856 + } __Reply__thread_abort_t; 857 + #ifdef __MigPackStructs 858 + #pragma pack() 859 + #endif 860 + 861 + #ifdef __MigPackStructs 862 + #pragma pack(4) 863 + #endif 864 + typedef struct { 865 + mach_msg_header_t Head; 866 + NDR_record_t NDR; 867 + kern_return_t RetCode; 868 + } __Reply__thread_abort_safely_t; 869 + #ifdef __MigPackStructs 870 + #pragma pack() 871 + #endif 872 + 873 + #ifdef __MigPackStructs 874 + #pragma pack(4) 875 + #endif 876 + typedef struct { 877 + mach_msg_header_t Head; 878 + NDR_record_t NDR; 879 + kern_return_t RetCode; 880 + } __Reply__thread_depress_abort_t; 881 + #ifdef __MigPackStructs 882 + #pragma pack() 883 + #endif 884 + 885 + #ifdef __MigPackStructs 886 + #pragma pack(4) 887 + #endif 888 + typedef struct { 889 + mach_msg_header_t Head; 890 + /* start of the kernel processed data */ 891 + mach_msg_body_t msgh_body; 892 + mach_msg_port_descriptor_t special_port; 893 + /* end of the kernel processed data */ 894 + } __Reply__thread_get_special_port_t; 895 + #ifdef __MigPackStructs 896 + #pragma pack() 897 + #endif 898 + 899 + #ifdef __MigPackStructs 900 + #pragma pack(4) 901 + #endif 902 + typedef struct { 903 + mach_msg_header_t Head; 904 + NDR_record_t NDR; 905 + kern_return_t RetCode; 906 + } __Reply__thread_set_special_port_t; 907 + #ifdef __MigPackStructs 908 + #pragma pack() 909 + #endif 910 + 911 + #ifdef __MigPackStructs 912 + #pragma pack(4) 913 + #endif 914 + typedef struct { 915 + mach_msg_header_t Head; 916 + NDR_record_t NDR; 917 + kern_return_t RetCode; 918 + mach_msg_type_number_t thread_info_outCnt; 919 + integer_t thread_info_out[12]; 920 + } __Reply__thread_info_t; 921 + #ifdef __MigPackStructs 922 + #pragma pack() 923 + #endif 924 + 925 + #ifdef __MigPackStructs 926 + #pragma pack(4) 927 + #endif 928 + typedef struct { 929 + mach_msg_header_t Head; 930 + NDR_record_t NDR; 931 + kern_return_t RetCode; 932 + } __Reply__thread_set_exception_ports_t; 933 + #ifdef __MigPackStructs 934 + #pragma pack() 935 + #endif 936 + 937 + #ifdef __MigPackStructs 938 + #pragma pack(4) 939 + #endif 940 + typedef struct { 941 + mach_msg_header_t Head; 942 + /* start of the kernel processed data */ 943 + mach_msg_body_t msgh_body; 944 + mach_msg_port_descriptor_t old_handlers[32]; 945 + /* end of the kernel processed data */ 946 + NDR_record_t NDR; 947 + mach_msg_type_number_t masksCnt; 948 + exception_mask_t masks[32]; 949 + exception_behavior_t old_behaviors[32]; 950 + thread_state_flavor_t old_flavors[32]; 951 + } __Reply__thread_get_exception_ports_t; 952 + #ifdef __MigPackStructs 953 + #pragma pack() 954 + #endif 955 + 956 + #ifdef __MigPackStructs 957 + #pragma pack(4) 958 + #endif 959 + typedef struct { 960 + mach_msg_header_t Head; 961 + /* start of the kernel processed data */ 962 + mach_msg_body_t msgh_body; 963 + mach_msg_port_descriptor_t old_handlers[32]; 964 + /* end of the kernel processed data */ 965 + NDR_record_t NDR; 966 + mach_msg_type_number_t masksCnt; 967 + exception_mask_t masks[32]; 968 + exception_behavior_t old_behaviors[32]; 969 + thread_state_flavor_t old_flavors[32]; 970 + } __Reply__thread_swap_exception_ports_t; 971 + #ifdef __MigPackStructs 972 + #pragma pack() 973 + #endif 974 + 975 + #ifdef __MigPackStructs 976 + #pragma pack(4) 977 + #endif 978 + typedef struct { 979 + mach_msg_header_t Head; 980 + NDR_record_t NDR; 981 + kern_return_t RetCode; 982 + } __Reply__thread_policy_t; 983 + #ifdef __MigPackStructs 984 + #pragma pack() 985 + #endif 986 + 987 + #ifdef __MigPackStructs 988 + #pragma pack(4) 989 + #endif 990 + typedef struct { 991 + mach_msg_header_t Head; 992 + NDR_record_t NDR; 993 + kern_return_t RetCode; 994 + } __Reply__thread_policy_set_t; 995 + #ifdef __MigPackStructs 996 + #pragma pack() 997 + #endif 998 + 999 + #ifdef __MigPackStructs 1000 + #pragma pack(4) 1001 + #endif 1002 + typedef struct { 1003 + mach_msg_header_t Head; 1004 + NDR_record_t NDR; 1005 + kern_return_t RetCode; 1006 + mach_msg_type_number_t policy_infoCnt; 1007 + integer_t policy_info[16]; 1008 + boolean_t get_default; 1009 + } __Reply__thread_policy_get_t; 1010 + #ifdef __MigPackStructs 1011 + #pragma pack() 1012 + #endif 1013 + 1014 + #ifdef __MigPackStructs 1015 + #pragma pack(4) 1016 + #endif 1017 + typedef struct { 1018 + mach_msg_header_t Head; 1019 + NDR_record_t NDR; 1020 + kern_return_t RetCode; 1021 + } __Reply__thread_sample_t; 1022 + #ifdef __MigPackStructs 1023 + #pragma pack() 1024 + #endif 1025 + 1026 + #ifdef __MigPackStructs 1027 + #pragma pack(4) 1028 + #endif 1029 + typedef struct { 1030 + mach_msg_header_t Head; 1031 + NDR_record_t NDR; 1032 + kern_return_t RetCode; 1033 + } __Reply__etap_trace_thread_t; 1034 + #ifdef __MigPackStructs 1035 + #pragma pack() 1036 + #endif 1037 + 1038 + #ifdef __MigPackStructs 1039 + #pragma pack(4) 1040 + #endif 1041 + typedef struct { 1042 + mach_msg_header_t Head; 1043 + NDR_record_t NDR; 1044 + kern_return_t RetCode; 1045 + } __Reply__thread_assign_t; 1046 + #ifdef __MigPackStructs 1047 + #pragma pack() 1048 + #endif 1049 + 1050 + #ifdef __MigPackStructs 1051 + #pragma pack(4) 1052 + #endif 1053 + typedef struct { 1054 + mach_msg_header_t Head; 1055 + NDR_record_t NDR; 1056 + kern_return_t RetCode; 1057 + } __Reply__thread_assign_default_t; 1058 + #ifdef __MigPackStructs 1059 + #pragma pack() 1060 + #endif 1061 + 1062 + #ifdef __MigPackStructs 1063 + #pragma pack(4) 1064 + #endif 1065 + typedef struct { 1066 + mach_msg_header_t Head; 1067 + /* start of the kernel processed data */ 1068 + mach_msg_body_t msgh_body; 1069 + mach_msg_port_descriptor_t assigned_set; 1070 + /* end of the kernel processed data */ 1071 + } __Reply__thread_get_assignment_t; 1072 + #ifdef __MigPackStructs 1073 + #pragma pack() 1074 + #endif 1075 + 1076 + #ifdef __MigPackStructs 1077 + #pragma pack(4) 1078 + #endif 1079 + typedef struct { 1080 + mach_msg_header_t Head; 1081 + NDR_record_t NDR; 1082 + kern_return_t RetCode; 1083 + } __Reply__thread_set_policy_t; 1084 + #ifdef __MigPackStructs 1085 + #pragma pack() 1086 + #endif 1087 + #endif /* !__Reply__thread_act_subsystem__defined */ 1088 + 1089 + /* union of all replies */ 1090 + 1091 + #ifndef __ReplyUnion__thread_act_subsystem__defined 1092 + #define __ReplyUnion__thread_act_subsystem__defined 1093 + union __ReplyUnion__thread_act_subsystem { 1094 + __Reply__thread_terminate_t Reply_thread_terminate; 1095 + __Reply__act_get_state_t Reply_act_get_state; 1096 + __Reply__act_set_state_t Reply_act_set_state; 1097 + __Reply__thread_get_state_t Reply_thread_get_state; 1098 + __Reply__thread_set_state_t Reply_thread_set_state; 1099 + __Reply__thread_suspend_t Reply_thread_suspend; 1100 + __Reply__thread_resume_t Reply_thread_resume; 1101 + __Reply__thread_abort_t Reply_thread_abort; 1102 + __Reply__thread_abort_safely_t Reply_thread_abort_safely; 1103 + __Reply__thread_depress_abort_t Reply_thread_depress_abort; 1104 + __Reply__thread_get_special_port_t Reply_thread_get_special_port; 1105 + __Reply__thread_set_special_port_t Reply_thread_set_special_port; 1106 + __Reply__thread_info_t Reply_thread_info; 1107 + __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; 1108 + __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; 1109 + __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; 1110 + __Reply__thread_policy_t Reply_thread_policy; 1111 + __Reply__thread_policy_set_t Reply_thread_policy_set; 1112 + __Reply__thread_policy_get_t Reply_thread_policy_get; 1113 + __Reply__thread_sample_t Reply_thread_sample; 1114 + __Reply__etap_trace_thread_t Reply_etap_trace_thread; 1115 + __Reply__thread_assign_t Reply_thread_assign; 1116 + __Reply__thread_assign_default_t Reply_thread_assign_default; 1117 + __Reply__thread_get_assignment_t Reply_thread_get_assignment; 1118 + __Reply__thread_set_policy_t Reply_thread_set_policy; 1119 + }; 1120 + #endif /* !__RequestUnion__thread_act_subsystem__defined */ 1121 + 1122 + #ifndef subsystem_to_name_map_thread_act 1123 + #define subsystem_to_name_map_thread_act \ 1124 + { "thread_terminate", 3600 },\ 1125 + { "act_get_state", 3601 },\ 1126 + { "act_set_state", 3602 },\ 1127 + { "thread_get_state", 3603 },\ 1128 + { "thread_set_state", 3604 },\ 1129 + { "thread_suspend", 3605 },\ 1130 + { "thread_resume", 3606 },\ 1131 + { "thread_abort", 3607 },\ 1132 + { "thread_abort_safely", 3608 },\ 1133 + { "thread_depress_abort", 3609 },\ 1134 + { "thread_get_special_port", 3610 },\ 1135 + { "thread_set_special_port", 3611 },\ 1136 + { "thread_info", 3612 },\ 1137 + { "thread_set_exception_ports", 3613 },\ 1138 + { "thread_get_exception_ports", 3614 },\ 1139 + { "thread_swap_exception_ports", 3615 },\ 1140 + { "thread_policy", 3616 },\ 1141 + { "thread_policy_set", 3617 },\ 1142 + { "thread_policy_get", 3618 },\ 1143 + { "thread_sample", 3619 },\ 1144 + { "etap_trace_thread", 3620 },\ 1145 + { "thread_assign", 3621 },\ 1146 + { "thread_assign_default", 3622 },\ 1147 + { "thread_get_assignment", 3623 },\ 1148 + { "thread_set_policy", 3624 } 1149 + #endif 1150 + 1151 + #ifdef __AfterMigUserHeader 1152 + __AfterMigUserHeader 1153 + #endif /* __AfterMigUserHeader */ 1154 + 1155 + #endif /* _thread_act_user_ */
+42
platform-include/mach/ppc/thread_state.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + #ifndef _MACH_PPC_THREAD_STATE_H_ 33 + #define _MACH_PPC_THREAD_STATE_H_ 34 + 35 + /* Size of maximum exported thread state in words */ 36 + #define PPC_THREAD_STATE_MAX (144) /* Size of biggest state possible */ 37 + 38 + #if defined (__ppc__) || defined (__ppc64__) 39 + #define THREAD_STATE_MAX PPC_THREAD_STATE_MAX 40 + #endif 41 + 42 + #endif /* _MACH_PPC_THREAD_STATE_H_ */
+150
platform-include/mach/ppc/thread_status.h
··· 1 + /* 2 + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + #ifndef _MACH_PPC_THREAD_STATUS_H_ 33 + #define _MACH_PPC_THREAD_STATUS_H_ 34 + 35 + #include <mach/ppc/_structs.h> 36 + #include <mach/message.h> 37 + 38 + /* 39 + * ppc_thread_state is the structure that is exported to user threads for 40 + * use in status/mutate calls. This structure should never change. 41 + * 42 + */ 43 + 44 + #define PPC_THREAD_STATE 1 45 + #define PPC_FLOAT_STATE 2 46 + #define PPC_EXCEPTION_STATE 3 47 + #define PPC_VECTOR_STATE 4 48 + #define PPC_THREAD_STATE64 5 49 + #define PPC_EXCEPTION_STATE64 6 50 + #define THREAD_STATE_NONE 7 51 + 52 + /* 53 + * VALID_THREAD_STATE_FLAVOR is a platform specific macro that when passed 54 + * an exception flavor will return whether that is a defined flavor for 55 + * that platform. 56 + * The macro must be manually updated to include all of the valid exception 57 + * flavors as defined above. 58 + */ 59 + #define VALID_THREAD_STATE_FLAVOR(x) \ 60 + ((x == PPC_THREAD_STATE) || \ 61 + (x == PPC_FLOAT_STATE) || \ 62 + (x == PPC_EXCEPTION_STATE) || \ 63 + (x == PPC_VECTOR_STATE) || \ 64 + (x == PPC_THREAD_STATE64) || \ 65 + (x == PPC_EXCEPTION_STATE64) || \ 66 + (x == THREAD_STATE_NONE)) 67 + 68 + typedef _STRUCT_PPC_THREAD_STATE ppc_thread_state_t; 69 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 70 + typedef _STRUCT_PPC_THREAD_STATE64 ppc_thread_state64_t; 71 + #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 72 + typedef _STRUCT_PPC_FLOAT_STATE ppc_float_state_t; 73 + typedef _STRUCT_PPC_VECTOR_STATE ppc_vector_state_t; 74 + 75 + /* 76 + * saved state structure 77 + * 78 + * This structure corresponds to the saved state. 79 + * 80 + */ 81 + 82 + #ifdef MACH__POSIX_C_SOURCE_PRIVATE 83 + 84 + #include <ppc/savearea.h> 85 + 86 + typedef struct savearea ppc_saved_state_t; 87 + 88 + #else /* MACH__POSIX_C_SOURCE_PRIVATE */ 89 + 90 + typedef struct ppc_thread_state ppc_saved_state_t; 91 + 92 + #endif /* MACH__POSIX_C_SOURCE_PRIVATE */ 93 + 94 + /* 95 + * ppc_exception_state 96 + * 97 + * This structure corresponds to some additional state of the user 98 + * registers as saved in the PCB upon kernel entry. They are only 99 + * available if an exception is passed out of the kernel, and even 100 + * then not all are guaranteed to be updated. 101 + * 102 + * Some padding is included in this structure which allows space for 103 + * servers to store temporary values if need be, to maintain binary 104 + * compatiblity. 105 + */ 106 + 107 + /* Exception state for 32-bit thread (on 32-bit processor) */ 108 + /* Still available on 64-bit processors, but may fall short */ 109 + /* of covering the full potential state (hi half available). */ 110 + 111 + typedef _STRUCT_PPC_EXCEPTION_STATE ppc_exception_state_t; 112 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 113 + typedef _STRUCT_PPC_EXCEPTION_STATE64 ppc_exception_state64_t; 114 + #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 115 + 116 + /* 117 + * Save State Flags 118 + */ 119 + 120 + #define PPC_THREAD_STATE_COUNT ((mach_msg_type_number_t) \ 121 + (sizeof(ppc_thread_state_t) / sizeof(int))) 122 + 123 + #define PPC_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ 124 + (sizeof(ppc_thread_state64_t) / sizeof(int))) 125 + 126 + #define PPC_EXCEPTION_STATE_COUNT ((mach_msg_type_number_t) \ 127 + (sizeof(ppc_exception_state_t) / sizeof(int))) 128 + 129 + #define PPC_EXCEPTION_STATE64_COUNT ((mach_msg_type_number_t) \ 130 + (sizeof(ppc_exception_state64_t) / sizeof(int))) 131 + 132 + #define PPC_FLOAT_STATE_COUNT ((mach_msg_type_number_t) \ 133 + (sizeof(ppc_float_state_t) / sizeof(int))) 134 + 135 + #define PPC_VECTOR_STATE_COUNT ((mach_msg_type_number_t) \ 136 + (sizeof(ppc_vector_state_t) / sizeof(int))) 137 + 138 + /* 139 + * Machine-independent way for servers and Mach's exception mechanism to 140 + * choose the most efficient state flavor for exception RPC's: 141 + */ 142 + #define MACHINE_THREAD_STATE PPC_THREAD_STATE 143 + #define MACHINE_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT 144 + 145 + /* 146 + * Largest state on this machine: 147 + */ 148 + #define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX 149 + 150 + #endif /* _MACH_PPC_THREAD_STATUS_H_ */
+78
platform-include/mach/ppc/vm_param.h
··· 1 + /* 2 + * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + 32 + #ifndef _MACH_PPC_VM_PARAM_H_ 33 + #define _MACH_PPC_VM_PARAM_H_ 34 + 35 + /* 36 + * These are the global definitions 37 + */ 38 + 39 + #define BYTE_SIZE 8 /* byte size in bits */ 40 + 41 + #define PPC_PGBYTES 4096 /* bytes per ppc page */ 42 + #define PPC_PGSHIFT 12 /* number of bits to shift for pages */ 43 + 44 + #define PAGE_SIZE PPC_PGBYTES 45 + #define PAGE_SHIFT PPC_PGSHIFT 46 + #define PAGE_MASK (PAGE_SIZE - 1) 47 + 48 + #if 0 49 + #define VM_MAX_PAGE_ADDRESS 0xFFFFFFFFFFFFF000ULL 50 + #else 51 + /* 52 + * LP64todo - For now, we are limited to 51-bits of user addressing 53 + */ 54 + #define VM_MAX_PAGE_ADDRESS 0x0007FFFFFFFFF000ULL 55 + #endif 56 + 57 + #define MACH_VM_MIN_ADDRESS ((mach_vm_offset_t) 0) 58 + #define MACH_VM_MAX_ADDRESS ((mach_vm_offset_t) VM_MAX_PAGE_ADDRESS) 59 + 60 + /* 61 + * These are the values relative to the local process. 62 + */ 63 + #if defined (__ppc64__) 64 + /* 65 + * LP64todo - We don't have the 64-bit address space layout yet. 66 + * Use the 32-bit stack layout for now. 67 + */ 68 + #define VM_MIN_ADDRESS ((vm_offset_t) MACH_VM_MIN_ADDRESS) 69 + #define VM_MAX_ADDRESS ((vm_offset_t) MACH_VM_MAX_ADDRESS) 70 + #define USER_STACK_END ((vm_offset_t) 0x00000000ffff0000ULL) 71 + #else 72 + #define VM_MIN_ADDRESS ((vm_offset_t) 0) 73 + #define VM_MAX_ADDRESS ((vm_offset_t) (VM_MAX_PAGE_ADDRESS & 0xFFFFFFFF)) 74 + #define USER_STACK_END ((vm_offset_t) 0xffff0000U) 75 + #endif /* defined(__ppc64__) */ 76 + 77 + 78 + #endif /* _MACH_PPC_VM_PARAM_H_ */
+142
platform-include/mach/ppc/vm_types.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * @OSF_COPYRIGHT@ 30 + */ 31 + /* 32 + * Mach Operating System 33 + * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University 34 + * All Rights Reserved. 35 + * 36 + * Permission to use, copy, modify and distribute this software and its 37 + * documentation is hereby granted, provided that both the copyright 38 + * notice and this permission notice appear in all copies of the 39 + * software, derivative works or modified versions, and any portions 40 + * thereof, and that both notices appear in supporting documentation. 41 + * 42 + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 43 + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR 44 + * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 45 + * 46 + * Carnegie Mellon requests users of this software to return to 47 + * 48 + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 49 + * School of Computer Science 50 + * Carnegie Mellon University 51 + * Pittsburgh PA 15213-3890 52 + * 53 + * any improvements or extensions that they make and grant Carnegie Mellon 54 + * the rights to redistribute these changes. 55 + */ 56 + /* 57 + */ 58 + 59 + /* 60 + * File: vm_types.h 61 + * Author: Avadis Tevanian, Jr. 62 + * Date: 1985 63 + * 64 + * Header file for VM data types. PPC version. 65 + */ 66 + 67 + #ifndef _MACH_PPC_VM_TYPES_H_ 68 + #define _MACH_PPC_VM_TYPES_H_ 69 + 70 + #ifndef ASSEMBLER 71 + 72 + #include <ppc/_types.h> 73 + #include <mach/ppc/vm_param.h> 74 + #include <stdint.h> 75 + 76 + /* 77 + * natural_t and integer_t are Mach's legacy types for machine- 78 + * independent integer types (unsigned, and signed, respectively). 79 + * Their original purpose was to define other types in a machine/ 80 + * compiler independent way. 81 + * 82 + * They also had an implicit "same size as pointer" characteristic 83 + * to them (i.e. Mach's traditional types are very ILP32 or ILP64 84 + * centric). We support PowerPC ABIs that do not follow either of 85 + * these models (specifically LP64). Therefore, we had to make a 86 + * choice between making these types scale with pointers or stay 87 + * tied to integers. Because their use is predominantly tied to 88 + * to the size of an integer, we are keeping that association and 89 + * breaking free from pointer size guarantees. 90 + * 91 + * New use of these types is discouraged. 92 + */ 93 + typedef __darwin_natural_t natural_t; 94 + typedef int integer_t; 95 + 96 + #if defined(__ppc__) 97 + 98 + /* 99 + * For 32-bit PowerPC ABIs, the scalable types were 100 + * always based upon natural_t (unsigned int). 101 + * Because of potential legacy issues with name mangling, 102 + * we cannot use the stdint uintptr_t type. 103 + */ 104 + typedef natural_t vm_offset_t; 105 + typedef natural_t vm_size_t; 106 + 107 + #else /* __ppc64__ */ 108 + 109 + /* 110 + * For 64-bit PowerPC ABIs, we have no legacy name mangling 111 + * issues, so we use the stdint types for scaling these 112 + * types to the same size as a pointer. 113 + */ 114 + typedef uintptr_t vm_offset_t; 115 + typedef uintptr_t vm_size_t; 116 + 117 + #endif 118 + 119 + /* 120 + * This new type is independent of a particular vm map's 121 + * implementation size - and represents appropriate types 122 + * for all possible maps. This is used for interfaces 123 + * where the size of the map is not known - or we don't 124 + * want to have to distinguish. 125 + */ 126 + typedef uint64_t mach_vm_address_t; 127 + typedef uint64_t mach_vm_offset_t; 128 + typedef uint64_t mach_vm_size_t; 129 + 130 + typedef uint64_t vm_map_offset_t; 131 + typedef uint64_t vm_map_address_t; 132 + typedef uint64_t vm_map_size_t; 133 + 134 + 135 + #endif /* ASSEMBLER */ 136 + 137 + /* 138 + * If composing messages by hand (please do not) 139 + */ 140 + #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 141 + 142 + #endif /* _MACH_PPC_VM_TYPES_H_ */
+2
platform-include/machine/_mcontext.h
··· 27 27 */ 28 28 #if defined (__i386__) || defined (__x86_64__) 29 29 #include "i386/_mcontext.h" 30 + #elif defined(__ppc__) 31 + #include "ppc/_mcontext.h" 30 32 #else 31 33 #error architecture not supported 32 34 #endif
+2
platform-include/machine/_param.h
··· 27 27 */ 28 28 #if defined (__i386__) || defined (__x86_64__) 29 29 #include "i386/_param.h" 30 + #elif defined(__ppc__) 31 + #include "ppc/param.h" 30 32 #else 31 33 #error architecture not supported 32 34 #endif
+2
platform-include/machine/_types.h
··· 30 30 31 31 #if defined (__i386__) || defined(__x86_64__) 32 32 #include "i386/_types.h" 33 + #elif defined(__ppc__) 34 + #include "ppc/types.h" 33 35 #else 34 36 #error architecture not supported 35 37 #endif
+2
platform-include/machine/endian.h
··· 33 33 34 34 #if defined (__i386__) || defined(__x86_64__) 35 35 #include "i386/endian.h" 36 + #elif defined(__ppc__) 37 + #include "ppc/endian.h" 36 38 #else 37 39 #error architecture not supported 38 40 #endif
+2
platform-include/machine/limits.h
··· 4 4 This file is public domain. */ 5 5 #if defined (__i386__) || defined(__x86_64__) 6 6 #include <i386/limits.h> 7 + #elif defined (__ppc__) 8 + #include <ppc/limits.h> 7 9 #else 8 10 #error architecture not supported 9 11 #endif
+2
platform-include/machine/signal.h
··· 30 30 31 31 #if defined (__i386__) || defined(__x86_64__) 32 32 #include "i386/signal.h" 33 + #elif defined(__ppc__) 34 + #include "ppc/signal.h" 33 35 #else 34 36 #error architecture not supported 35 37 #endif
+2
platform-include/machine/types.h
··· 33 33 34 34 #if defined (__i386__) || defined(__x86_64__) 35 35 #include "i386/types.h" 36 + #elif defined(__ppc__) 37 + #include "ppc/types.h" 36 38 #else 37 39 #error architecture not supported 38 40 #endif
+27
platform-include/ppc/_limits.h
··· 1 + /* 2 + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_LICENSE_HEADER_START@ 5 + * 6 + * The contents of this file constitute Original Code as defined in and 7 + * are subject to the Apple Public Source License Version 1.1 (the 8 + * "License"). You may not use this file except in compliance with the 9 + * License. Please obtain a copy of the License at 10 + * http://www.apple.com/publicsource and read it before using this file. 11 + * 12 + * This Original Code and all software distributed under the License are 13 + * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 + * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the 17 + * License for the specific language governing rights and limitations 18 + * under the License. 19 + * 20 + * @APPLE_LICENSE_HEADER_END@ 21 + */ 22 + #ifndef _PPC__LIMITS_H_ 23 + #define _PPC__LIMITS_H_ 24 + 25 + #define __DARWIN_CLK_TCK 100 /* ticks per second */ 26 + 27 + #endif /* _PPC__LIMITS_H_ */
+3
platform-include/ppc/_mcontext.h
··· 1 + #define __need_mcontext_t 2 + #include <ppc/_structs.h> 3 +
+46
platform-include/ppc/_param.h
··· 1 + /* 2 + * Copyright (c) 2008 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + 29 + #ifndef _PPC__PARAM_H_ 30 + #define _PPC__PARAM_H_ 31 + 32 + #include <ppc/_types.h> 33 + 34 + /* 35 + * Round p (pointer or byte index) up to a correctly-aligned value for all 36 + * data types (int, long, ...). The result is unsigned int and must be 37 + * cast to any desired pointer type. 38 + */ 39 + #define __DARWIN_ALIGNBYTES (sizeof(__darwin_size_t) - 1) 40 + #define __DARWIN_ALIGN(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES) &~ __DARWIN_ALIGNBYTES) 41 + 42 + #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) 43 + #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((char *)(__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) 44 + 45 + 46 + #endif /* _PPC__PARAM_H_ */
+217
platform-include/ppc/_structs.h
··· 1 + /* 2 + * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + 29 + #include <sys/cdefs.h> 30 + 31 + #ifdef __need_mcontext_t 32 + #ifndef __need_struct_mcontext 33 + #define __need_struct_mcontext 34 + #endif /* __need_struct_mcontext */ 35 + #endif /* __need_mcontext_t */ 36 + 37 + #ifdef __need_mcontext64_t 38 + #ifndef __need_struct_mcontext64 39 + #define __need_struct_mcontext64 40 + #endif /* __need_struct_mcontext64 */ 41 + #endif /* __need_mcontext64_t */ 42 + 43 + #if defined(__need_struct_mcontext) || defined(__need_struct_mcontext64) 44 + #include <mach/ppc/_structs.h> 45 + #endif /* __need_struct_mcontext || __need_struct_mcontext64 */ 46 + 47 + #ifdef __need_struct_mcontext 48 + #undef __need_struct_mcontext 49 + #ifndef _STRUCT_MCONTEXT 50 + #if __DARWIN_UNIX03 51 + #define _STRUCT_MCONTEXT struct __darwin_mcontext 52 + _STRUCT_MCONTEXT 53 + { 54 + _STRUCT_PPC_EXCEPTION_STATE __es; 55 + _STRUCT_PPC_THREAD_STATE __ss; 56 + _STRUCT_PPC_FLOAT_STATE __fs; 57 + _STRUCT_PPC_VECTOR_STATE __vs; 58 + }; 59 + #else /* !__DARWIN_UNIX03 */ 60 + #define _STRUCT_MCONTEXT struct mcontext 61 + _STRUCT_MCONTEXT 62 + { 63 + _STRUCT_PPC_EXCEPTION_STATE es; 64 + _STRUCT_PPC_THREAD_STATE ss; 65 + _STRUCT_PPC_FLOAT_STATE fs; 66 + _STRUCT_PPC_VECTOR_STATE vs; 67 + }; 68 + #endif /* __DARWIN_UNIX03 */ 69 + #endif /* _STRUCT_MCONTEXT */ 70 + #endif /* __need_struct_mcontext */ 71 + 72 + #ifdef __need_struct_mcontext64 73 + #undef __need_struct_mcontext64 74 + #ifndef _STRUCT_MCONTEXT64 75 + #if __DARWIN_UNIX03 76 + #define _STRUCT_MCONTEXT64 struct __darwin_mcontext64 77 + _STRUCT_MCONTEXT64 78 + { 79 + _STRUCT_PPC_EXCEPTION_STATE64 __es; 80 + _STRUCT_PPC_THREAD_STATE64 __ss; 81 + _STRUCT_PPC_FLOAT_STATE __fs; 82 + _STRUCT_PPC_VECTOR_STATE __vs; 83 + }; 84 + #else /* !__DARWIN_UNIX03 */ 85 + #define _STRUCT_MCONTEXT64 struct mcontext64 86 + _STRUCT_MCONTEXT64 87 + { 88 + _STRUCT_PPC_EXCEPTION_STATE64 es; 89 + _STRUCT_PPC_THREAD_STATE64 ss; 90 + _STRUCT_PPC_FLOAT_STATE fs; 91 + _STRUCT_PPC_VECTOR_STATE vs; 92 + }; 93 + #endif /* __DARWIN_UNIX03 */ 94 + #endif /* _STRUCT_MCONTEXT64 */ 95 + #endif /* __need_struct_mcontext64 */ 96 + 97 + #ifdef __need_mcontext_t 98 + #undef __need_mcontext_t 99 + #ifndef _MCONTEXT_T 100 + #define _MCONTEXT_T 101 + typedef _STRUCT_MCONTEXT *mcontext_t; 102 + #endif /* _MCONTEXT_T */ 103 + #endif /* __need_mcontext_t */ 104 + 105 + #ifdef __need_mcontext64_t 106 + #undef __need_mcontext64_t 107 + #ifndef _MCONTEXT64_T 108 + #define _MCONTEXT64_T 109 + typedef _STRUCT_MCONTEXT64 *mcontext64_t; 110 + #endif /* _MCONTEXT64_T */ 111 + #endif /* __need_mcontext64_t */ 112 + 113 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 114 + #ifndef PPC_MCONTEXT_SIZE 115 + #define PPC_MCONTEXT_SIZE (PPC_THREAD_STATE_COUNT + PPC_FLOAT_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int) 116 + #endif /* PPC_MCONTEXT_SIZE */ 117 + #ifndef PPC_MCONTEXT64_SIZE 118 + #define PPC_MCONTEXT64_SIZE (PPC_THREAD_STATE64_COUNT + PPC_FLOAT_STATE_COUNT + PPC_EXCEPTION_STATE_COUNT + PPC_VECTOR_STATE_COUNT) * sizeof(int) 119 + #endif /* PPC_MCONTEXT64_SIZE */ 120 + #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 121 + 122 + /* 123 + * For now, just duplicate the 32-bit context as the generic one. 124 + */ 125 + #ifdef __need_struct_sigcontext 126 + #undef __need_struct_sigcontext 127 + #ifndef _STRUCT_SIGCONTEXT 128 + #if __DARWIN_UNIX03 /* signal.h needs struct sigcontext visible */ 129 + #define _STRUCT_SIGCONTEXT struct __darwin_sigcontext 130 + _STRUCT_SIGCONTEXT 131 + { 132 + int __sc_onstack; /* sigstack state to restore */ 133 + int __sc_mask; /* signal mask to restore */ 134 + int __sc_ir; /* pc */ 135 + int __sc_psw; /* processor status word */ 136 + int __sc_sp; /* stack pointer if sc_regs == NULL */ 137 + void *__sc_regs; /* (kernel private) saved state */ 138 + }; 139 + #else /* !__DARWIN_UNIX03 */ 140 + #define _STRUCT_SIGCONTEXT struct sigcontext 141 + _STRUCT_SIGCONTEXT 142 + { 143 + int sc_onstack; /* sigstack state to restore */ 144 + int sc_mask; /* signal mask to restore */ 145 + int sc_ir; /* pc */ 146 + int sc_psw; /* processor status word */ 147 + int sc_sp; /* stack pointer if sc_regs == NULL */ 148 + void *sc_regs; /* (kernel private) saved state */ 149 + }; 150 + #endif /* __DARWIN_UNIX03 */ 151 + #endif /* _STRUCT_SIGCONTEXT */ 152 + #endif /* __need_struct_sigcontext */ 153 + 154 + /* 155 + * Information pushed on stack when a signal is delivered. 156 + * This is used by the kernel to restore state following 157 + * execution of the signal handler. It is also made available 158 + * to the handler to allow it to properly restore state if 159 + * a non-standard exit is performed. 160 + */ 161 + #ifdef __need_struct_sigcontext32 162 + #undef __need_struct_sigcontext32 163 + #ifndef _STRUCT_SIGCONTEXT32 164 + #if __DARWIN_UNIX03 165 + #define _STRUCT_SIGCONTEXT32 struct __darwin_sigcontext32 166 + _STRUCT_SIGCONTEXT32 167 + { 168 + int __sc_onstack; /* sigstack state to restore */ 169 + int __sc_mask; /* signal mask to restore */ 170 + int __sc_ir; /* pc */ 171 + int __sc_psw; /* processor status word */ 172 + int __sc_sp; /* stack pointer if sc_regs == NULL */ 173 + void *__sc_regs; /* (kernel private) saved state */ 174 + }; 175 + #else /* !__DARWIN_UNIX03 */ 176 + #define _STRUCT_SIGCONTEXT32 struct sigcontext32 177 + _STRUCT_SIGCONTEXT32 178 + { 179 + int sc_onstack; /* sigstack state to restore */ 180 + int sc_mask; /* signal mask to restore */ 181 + int sc_ir; /* pc */ 182 + int sc_psw; /* processor status word */ 183 + int sc_sp; /* stack pointer if sc_regs == NULL */ 184 + void *sc_regs; /* (kernel private) saved state */ 185 + }; 186 + #endif /* __DARWIN_UNIX03 */ 187 + #endif /* _STRUCT_SIGCONTEXT32 */ 188 + #endif /* __need_struct_sigcontext32 */ 189 + 190 + #ifdef __need_struct_sigcontext64 191 + #undef __need_struct_sigcontext64 192 + #ifndef _STRUCT_SIGCONTEXT64 193 + #if __DARWIN_UNIX03 194 + #define _STRUCT_SIGCONTEXT64 struct __darwin_sigcontext64 195 + _STRUCT_SIGCONTEXT64 196 + { 197 + int __sc_onstack; /* sigstack state to restore */ 198 + int __sc_mask; /* signal mask to restore */ 199 + long long __sc_ir; /* pc */ 200 + long long __sc_psw; /* processor status word */ 201 + long long __sc_sp; /* stack pointer if sc_regs == NULL */ 202 + void *__sc_regs; /* (kernel private) saved state */ 203 + }; 204 + #else /* !__DARWIN_UNIX03 */ 205 + #define _STRUCT_SIGCONTEXT64 struct sigcontext64 206 + _STRUCT_SIGCONTEXT64 207 + { 208 + int sc_onstack; /* sigstack state to restore */ 209 + int sc_mask; /* signal mask to restore */ 210 + long long sc_ir; /* pc */ 211 + long long sc_psw; /* processor status word */ 212 + long long sc_sp; /* stack pointer if sc_regs == NULL */ 213 + void *sc_regs; /* (kernel private) saved state */ 214 + }; 215 + #endif /* __DARWIN_UNIX03 */ 216 + #endif /* _STRUCT_SIGCONTEXT64 */ 217 + #endif /* __need_struct_sigcontext64 */
+120
platform-include/ppc/_types.h
··· 1 + /* 2 + * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + #ifndef _BSD_PPC__TYPES_H_ 29 + #define _BSD_PPC__TYPES_H_ 30 + 31 + /* 32 + * This header file contains integer types. It's intended to also contain 33 + * flotaing point and other arithmetic types, as needed, later. 34 + */ 35 + 36 + #ifdef __GNUC__ 37 + typedef __signed char __int8_t; 38 + #else /* !__GNUC__ */ 39 + typedef char __int8_t; 40 + #endif /* !__GNUC__ */ 41 + typedef unsigned char __uint8_t; 42 + typedef short __int16_t; 43 + typedef unsigned short __uint16_t; 44 + typedef int __int32_t; 45 + typedef unsigned int __uint32_t; 46 + typedef long long __int64_t; 47 + typedef unsigned long long __uint64_t; 48 + 49 + typedef long __darwin_intptr_t; 50 + typedef unsigned int __darwin_natural_t; 51 + 52 + /* 53 + * The rune type below is declared to be an ``int'' instead of the more natural 54 + * ``unsigned long'' or ``long''. Two things are happening here. It is not 55 + * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, 56 + * it looks like 10646 will be a 31 bit standard. This means that if your 57 + * ints cannot hold 32 bits, you will be in trouble. The reason an int was 58 + * chosen over a long is that the is*() and to*() routines take ints (says 59 + * ANSI C), but they use __darwin_ct_rune_t instead of int. By changing it 60 + * here, you lose a bit of ANSI conformance, but your programs will still 61 + * work. 62 + * 63 + * NOTE: rune_t is not covered by ANSI nor other standards, and should not 64 + * be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and 65 + * rune_t must be the same type. Also wint_t must be no narrower than 66 + * wchar_t, and should also be able to hold all members of the largest 67 + * character set plus one extra value (WEOF). wint_t must be at least 16 bits. 68 + */ 69 + 70 + typedef int __darwin_ct_rune_t; /* ct_rune_t */ 71 + 72 + /* 73 + * mbstate_t is an opaque object to keep conversion state, during multibyte 74 + * stream conversions. The content must not be referenced by user programs. 75 + */ 76 + typedef union { 77 + char __mbstate8[128]; 78 + long long _mbstateL; /* for alignment */ 79 + } __mbstate_t; 80 + 81 + typedef __mbstate_t __darwin_mbstate_t; /* mbstate_t */ 82 + 83 + #if defined(__GNUC__) && defined(__PTRDIFF_TYPE__) 84 + typedef __PTRDIFF_TYPE__ __darwin_ptrdiff_t; /* ptr1 - ptr2 */ 85 + #else 86 + typedef int __darwin_ptrdiff_t; /* ptr1 - ptr2 */ 87 + #endif /* __GNUC__ */ 88 + 89 + #if defined(__GNUC__) && defined(__SIZE_TYPE__) 90 + typedef __SIZE_TYPE__ __darwin_size_t; /* sizeof() */ 91 + #else 92 + typedef unsigned long __darwin_size_t; /* sizeof() */ 93 + #endif 94 + 95 + #if (__GNUC__ > 2) 96 + typedef __builtin_va_list __darwin_va_list; /* va_list */ 97 + #else 98 + typedef char * __darwin_va_list; /* va_list */ 99 + #endif 100 + 101 + #if defined(__GNUC__) && defined(__WCHAR_TYPE__) 102 + typedef __WCHAR_TYPE__ __darwin_wchar_t; /* wchar_t */ 103 + #else 104 + typedef __darwin_ct_rune_t __darwin_wchar_t; /* wchar_t */ 105 + #endif 106 + 107 + typedef __darwin_wchar_t __darwin_rune_t; /* rune_t */ 108 + 109 + #if defined(__GNUC__) && defined(__WINT_TYPE__) 110 + typedef __WINT_TYPE__ __darwin_wint_t; /* wint_t */ 111 + #else 112 + typedef __darwin_ct_rune_t __darwin_wint_t; /* wint_t */ 113 + #endif 114 + 115 + typedef unsigned long __darwin_clock_t; /* clock() */ 116 + typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ 117 + typedef long __darwin_ssize_t; /* byte count or error */ 118 + typedef long __darwin_time_t; /* time() */ 119 + 120 + #endif /* _BSD_PPC__TYPES_H_ */
+124
platform-include/ppc/endian.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + 29 + /* 30 + * Copyright (c) 1995 NeXT Computer, Inc. All rights reserved. 31 + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. 32 + * 33 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 34 + * 35 + * This file contains Original Code and/or Modifications of Original Code 36 + * as defined in and that are subject to the Apple Public Source License 37 + * Version 2.0 (the 'License'). You may not use this file except in 38 + * compliance with the License. The rights granted to you under the License 39 + * may not be used to create, or enable the creation or redistribution of, 40 + * unlawful or unlicensed copies of an Apple operating system, or to 41 + * circumvent, violate, or enable the circumvention or violation of, any 42 + * terms of an Apple operating system software license agreement. 43 + * 44 + * Please obtain a copy of the License at 45 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 46 + * 47 + * The Original Code and all software distributed under the License are 48 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 49 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 50 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 51 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 52 + * Please see the License for the specific language governing rights and 53 + * limitations under the License. 54 + * 55 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 56 + */ 57 + /* 58 + * Copyright (c) 1987, 1991, 1993 59 + * The Regents of the University of California. All rights reserved. 60 + * 61 + * Redistribution and use in source and binary forms, with or without 62 + * modification, are permitted provided that the following conditions 63 + * are met: 64 + * 1. Redistributions of source code must retain the above copyright 65 + * notice, this list of conditions and the following disclaimer. 66 + * 2. Redistributions in binary form must reproduce the above copyright 67 + * notice, this list of conditions and the following disclaimer in the 68 + * documentation and/or other materials provided with the distribution. 69 + * 3. All advertising materials mentioning features or use of this software 70 + * must display the following acknowledgement: 71 + * This product includes software developed by the University of 72 + * California, Berkeley and its contributors. 73 + * 4. Neither the name of the University nor the names of its contributors 74 + * may be used to endorse or promote products derived from this software 75 + * without specific prior written permission. 76 + * 77 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 78 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 79 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 80 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 81 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 82 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 83 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 84 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 85 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 86 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 87 + * SUCH DAMAGE. 88 + * 89 + * @(#)endian.h 8.1 (Berkeley) 6/10/93 90 + */ 91 + 92 + #ifndef _PPC_ENDIAN_H_ 93 + #define _PPC_ENDIAN_H_ 94 + 95 + #include <sys/cdefs.h> 96 + 97 + /* 98 + * Define the order of 32-bit words in 64-bit words. 99 + */ 100 + #define _QUAD_HIGHWORD 0 101 + #define _QUAD_LOWWORD 1 102 + 103 + /* 104 + * Definitions for byte order, according to byte significance from low 105 + * address to high. 106 + */ 107 + #define __DARWIN_LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ 108 + #define __DARWIN_BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net, ppc */ 109 + #define __DARWIN_PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ 110 + 111 + #define __DARWIN_BYTE_ORDER __DARWIN_BIG_ENDIAN 112 + 113 + #if defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) 114 + 115 + #define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN 116 + #define BIG_ENDIAN __DARWIN_BIG_ENDIAN 117 + #define PDP_ENDIAN __DARWIN_PDP_ENDIAN 118 + 119 + #define BYTE_ORDER __DARWIN_BYTE_ORDER 120 + 121 + #include <sys/_endian.h> 122 + 123 + #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ 124 + #endif /* !_PPC_ENDIAN_H_ */
+106
platform-include/ppc/fasttrap_isa.h
··· 1 + /* 2 + * Copyright (c) 2007 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + 29 + /* 30 + * CDDL HEADER START 31 + * 32 + * The contents of this file are subject to the terms of the 33 + * Common Development and Distribution License, Version 1.0 only 34 + * (the "License"). You may not use this file except in compliance 35 + * with the License. 36 + * 37 + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 38 + * or http://www.opensolaris.org/os/licensing. 39 + * See the License for the specific language governing permissions 40 + * and limitations under the License. 41 + * 42 + * When distributing Covered Code, include this CDDL HEADER in each 43 + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 44 + * If applicable, add the following below this CDDL HEADER, with the 45 + * fields enclosed by brackets "[]" replaced with your own identifying 46 + * information: Portions Copyright [yyyy] [name of copyright owner] 47 + * 48 + * CDDL HEADER END 49 + */ 50 + /* 51 + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 52 + * Use is subject to license terms. 53 + */ 54 + 55 + #ifndef _FASTTRAP_ISA_H 56 + #define _FASTTRAP_ISA_H 57 + 58 + /* #pragma ident "@(#)fasttrap_isa.h 1.4 05/06/08 SMI" */ 59 + 60 + #include <sys/types.h> 61 + #if defined(__APPLE__) 62 + #include <stdint.h> 63 + #endif 64 + 65 + #ifdef __cplusplus 66 + extern "C" { 67 + #endif 68 + 69 + typedef uint32_t fasttrap_instr_t; 70 + 71 + typedef struct fasttrap_machtp { 72 + fasttrap_instr_t ftmt_instr; /* Original instruction */ 73 + int32_t ftmt_trgt; /* Offset or absolute address */ 74 + uint8_t ftmt_type; /* Emulation function type */ 75 + #define ftmtNOP 0 76 + #define ftmtCommon 1 77 + #define ftmtB 2 78 + #define ftmtBC 3 79 + #define ftmtBLR 4 80 + #define ftmtBCTR 5 81 + uint8_t ftmt_bo; /* Branch options */ 82 + uint8_t ftmt_bi; /* Condition bit */ 83 + uint8_t ftmt_flgs; /* Flags */ 84 + #define ftmtAbs 2 85 + #define ftmtLink 1 86 + } fasttrap_machtp_t; 87 + 88 + #define ftt_instr ftt_mtp.ftmt_instr 89 + #define ftt_trgt ftt_mtp.ftmt_trgt 90 + #define ftt_type ftt_mtp.ftmt_type 91 + #define ftt_bo ftt_mtp.ftmt_bo 92 + #define ftt_bi ftt_mtp.ftmt_bi 93 + #define ftt_flgs ftt_mtp.ftmt_flgs 94 + 95 + #define FASTTRAP_INSTR 0x0FFFDDDD 96 + #define T_DTRACE_RET (0x2E * 4) 97 + 98 + #define FASTTRAP_RETURN_AFRAMES 7 99 + #define FASTTRAP_ENTRY_AFRAMES 7 100 + #define FASTTRAP_OFFSET_AFRAMES 6 101 + 102 + #ifdef __cplusplus 103 + } 104 + #endif 105 + 106 + #endif /* _FASTTRAP_ISA_H */
+107
platform-include/ppc/limits.h
··· 1 + /* 2 + * Copyright (c) 1988, 1993 3 + * The Regents of the University of California. All rights reserved. 4 + * 5 + * Redistribution and use in source and binary forms, with or without 6 + * modification, are permitted provided that the following conditions 7 + * are met: 8 + * 1. Redistributions of source code must retain the above copyright 9 + * notice, this list of conditions and the following disclaimer. 10 + * 2. Redistributions in binary form must reproduce the above copyright 11 + * notice, this list of conditions and the following disclaimer in the 12 + * documentation and/or other materials provided with the distribution. 13 + * 3. All advertising materials mentioning features or use of this software 14 + * must display the following acknowledgement: 15 + * This product includes software developed by the University of 16 + * California, Berkeley and its contributors. 17 + * 4. Neither the name of the University nor the names of its contributors 18 + * may be used to endorse or promote products derived from this software 19 + * without specific prior written permission. 20 + * 21 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 + * SUCH DAMAGE. 32 + * 33 + * @(#)limits.h 8.3 (Berkeley) 1/4/94 34 + */ 35 + 36 + #ifndef _PPC_LIMITS_H_ 37 + #define _PPC_LIMITS_H_ 38 + 39 + #include <sys/cdefs.h> 40 + #include <ppc/_limits.h> 41 + 42 + #define CHAR_BIT 8 /* number of bits in a char */ 43 + #define MB_LEN_MAX 6 /* Allow 31 bit UTF2 */ 44 + 45 + #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) 46 + #define CLK_TCK __DARWIN_CLK_TCK /* ticks per second */ 47 + #endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ 48 + 49 + /* 50 + * According to ANSI (section 2.2.4.2), the values below must be usable by 51 + * #if preprocessing directives. Additionally, the expression must have the 52 + * same type as would an expression that is an object of the corresponding 53 + * type converted according to the integral promotions. The subtraction for 54 + * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an 55 + * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). 56 + * These numbers work for pcc as well. The UINT_MAX and ULONG_MAX values 57 + * are written as hex so that GCC will be quiet about large integer constants. 58 + */ 59 + #define SCHAR_MAX 127 /* min value for a signed char */ 60 + #define SCHAR_MIN (-128) /* max value for a signed char */ 61 + 62 + #define UCHAR_MAX 255 /* max value for an unsigned char */ 63 + #define CHAR_MAX 127 /* max value for a char */ 64 + #define CHAR_MIN (-128) /* min value for a char */ 65 + 66 + #define USHRT_MAX 65535 /* max value for an unsigned short */ 67 + #define SHRT_MAX 32767 /* max value for a short */ 68 + #define SHRT_MIN (-32768) /* min value for a short */ 69 + 70 + #define UINT_MAX 0xffffffff /* max value for an unsigned int */ 71 + #define INT_MAX 2147483647 /* max value for an int */ 72 + #define INT_MIN (-2147483647-1) /* min value for an int */ 73 + 74 + #ifdef __LP64__ 75 + #define ULONG_MAX 0xffffffffffffffffUL /* max unsigned long */ 76 + #define LONG_MAX 0x7fffffffffffffffL /* max signed long */ 77 + #define LONG_MIN (-0x7fffffffffffffffL-1) /* min signed long */ 78 + #else /* !__LP64__ */ 79 + #define ULONG_MAX 0xffffffffUL /* max unsigned long */ 80 + #define LONG_MAX 2147483647L /* max signed long */ 81 + #define LONG_MIN (-2147483647L-1) /* min signed long */ 82 + #endif /* __LP64__ */ 83 + 84 + #define ULLONG_MAX 0xffffffffffffffffULL /* max unsigned long long */ 85 + #define LLONG_MAX 0x7fffffffffffffffLL /* max signed long long */ 86 + #define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min signed long long */ 87 + 88 + #if !defined(_ANSI_SOURCE) 89 + #ifdef __LP64__ 90 + #define LONG_BIT 64 91 + #else /* !__LP64__ */ 92 + #define LONG_BIT 32 93 + #endif /* __LP64__ */ 94 + #define SSIZE_MAX LONG_MAX /* max value for a ssize_t */ 95 + #define WORD_BIT 32 96 + 97 + #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) 98 + #define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ 99 + 100 + #define UQUAD_MAX ULLONG_MAX 101 + #define QUAD_MAX LLONG_MAX 102 + #define QUAD_MIN LLONG_MIN 103 + 104 + #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ 105 + #endif /* !_ANSI_SOURCE */ 106 + 107 + #endif /* _PPC_LIMITS_H_ */
+141
platform-include/ppc/param.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* Copyright (c) 1993,1995 NeXT Computer, Inc. All Rights Reserved */ 29 + 30 + #ifndef _PPC_PARAM_H_ 31 + #define _PPC_PARAM_H_ 32 + 33 + #include <ppc/_param.h> 34 + 35 + /* 36 + * Round p (pointer or byte index) up to a correctly-aligned value for all 37 + * data types (int, long, ...). The result is unsigned int and must be 38 + * cast to any desired pointer type. 39 + */ 40 + #define ALIGNBYTES __DARWIN_ALIGNBYTES 41 + #define ALIGN(p) __DARWIN_ALIGN(p) 42 + 43 + #define NBPG 4096 /* bytes/page */ 44 + #define PGOFSET (NBPG-1) /* byte offset into page */ 45 + #define PGSHIFT 12 /* LOG2(NBPG) */ 46 + 47 + #define NBSEG 0x40000000 /* bytes/segment (quadrant) */ 48 + #define SEGOFSET (NBSEG-1) /* byte offset into segment */ 49 + #define SEGSHIFT 30 /* LOG2(NBSEG) */ 50 + 51 + #define DEV_BSIZE 512 52 + #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 53 + #define BLKDEV_IOSIZE 2048 54 + #define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ 55 + 56 + #define STACK_GROWTH_UP 0 /* stack grows to lower addresses */ 57 + 58 + #define CLSIZE 1 59 + #define CLSIZELOG2 0 60 + 61 + #define STACKSIZE 4 /* pages in kernel stack */ 62 + #define UPAGES 0 /* total pages in u-area */ 63 + /* red zone is beyond this */ 64 + 65 + /* 66 + * Constants related to network buffer management. 67 + * MCLBYTES must be no larger than CLBYTES (the software page size), and, 68 + * on machines that exchange pages of input or output buffers with mbuf 69 + * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple 70 + * of the hardware page size. 71 + */ 72 + #define MSIZE 256 /* size of an mbuf */ 73 + #define MCLBYTES 2048 /* large enough for ether MTU */ 74 + #define MCLSHIFT 11 75 + #define MCLOFSET (MCLBYTES - 1) 76 + #ifndef NMBCLUSTERS 77 + #if GATEWAY 78 + #define NMBCLUSTERS ((1024 * 1024) / MCLBYTES) /* cl map size: 1MB */ 79 + #else 80 + #define NMBCLUSTERS ((1024 * 1024) / MCLBYTES) 81 + /* cl map size was 0.5MB when MSIZE was 128, now it's 1MB*/ 82 + #endif 83 + #endif 84 + 85 + /* pages ("clicks") (NBPG bytes) to disk blocks */ 86 + #define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT)) 87 + #define dtoc(x) ((x)>>(PGSHIFT-DEV_BSHIFT)) 88 + #define dtob(x) ((x)<<DEV_BSHIFT) 89 + 90 + /* pages to bytes */ 91 + #define ctob(x) ((x)<<PGSHIFT) 92 + 93 + /* bytes to pages */ 94 + #define btoc(x) (((unsigned)(x)+(PGOFSET))>>PGSHIFT) 95 + #ifdef __APPLE__ 96 + #define btodb(bytes, devBlockSize) \ 97 + ((unsigned)(bytes) / devBlockSize) 98 + #define dbtob(db, devBlockSize) \ 99 + ((unsigned)(db) * devBlockSize) 100 + #else 101 + #define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \ 102 + ((unsigned)(bytes) >> DEV_BSHIFT) 103 + #define dbtob(db) /* calculates (db * DEV_BSIZE) */ \ 104 + ((unsigned)(db) << DEV_BSHIFT) 105 + #endif 106 + 107 + /* 108 + * Map a ``block device block'' to a file system block. 109 + * This should be device dependent, and should use the bsize 110 + * field from the disk label. 111 + * For now though just use DEV_BSIZE. 112 + */ 113 + #define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) 114 + 115 + /* from machdep/ppc/proc_reg.h */ 116 + #ifdef __BIG_ENDIAN__ 117 + #define ENDIAN_MASK(val,size) (1 << (size-1 - val)) 118 + #else 119 + #error code not ported to little endian targets yet 120 + #endif /* __BIG_ENDIAN__ */ 121 + 122 + #ifndef MASK 123 + #define MASK(PART) ENDIAN_MASK(PART ## _BIT, 32) 124 + #endif 125 + 126 + #define MSR_EE_BIT 16 127 + #define MSR_PR_BIT 17 128 + #define USERMODE(msr) (msr & MASK(MSR_PR) ? TRUE : FALSE) 129 + #define BASEPRI(msr) (msr & MASK(MSR_EE) ? TRUE : FALSE) 130 + /* end of from proc_reg.h */ 131 + 132 + #if defined(KERNEL) || defined(STANDALONE) 133 + #define DELAY(n) delay(n) 134 + #else 135 + #define DELAY(n) { register int N = (n); while (--N > 0); } 136 + #endif /* defined(KERNEL) || defined(STANDALONE) */ 137 + 138 + #define NPIDS 16 /* maximum number of PIDs per process */ 139 + #define NIOPIDS 8 /* maximum number of IO space PIDs */ 140 + 141 + #endif /* _PPC_PARAM_H_ */
+39
platform-include/ppc/profile.h
··· 1 + /* 2 + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * Copyright (c) 1997, Apple Computer, Inc. All rights reserved. 30 + * 31 + */ 32 + 33 + #ifndef _BSD_PPC_PROFILE_H_ 34 + #define _BSD_PPC_PROFILE_H_ 35 + 36 + #include <sys/appleapiopts.h> 37 + 38 + 39 + #endif /* _BSD_PPC_PROFILE_H_ */
+97
platform-include/ppc/setjmp.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* Copyright (c) 1998 Apple Computer, Inc. All rights reserved. 29 + * 30 + * File: ppc/setjmp.h 31 + * 32 + * Declaration of setjmp routines and data structures. 33 + */ 34 + #ifndef _BSD_PPC_SETJMP_H_ 35 + #define _BSD_PPC_SETJMP_H_ 36 + 37 + #include <sys/cdefs.h> 38 + 39 + #define __need_struct_sigcontext 40 + #include <ppc/_structs.h> 41 + 42 + struct _jmp_buf { 43 + #if __DARWIN_UNIX03 44 + _STRUCT_SIGCONTEXT __sigcontext; /* kernel state preserved by set/longjmp */ 45 + unsigned int __vmask __attribute__((aligned(8))); /* vector mask register */ 46 + unsigned int __vreg[32 * 4] __attribute__((aligned(16))); 47 + /* 32 128-bit vector registers */ 48 + #else /* !__DARWIN_UNIX03 */ 49 + _STRUCT_SIGCONTEXT sigcontext; /* kernel state preserved by set/longjmp */ 50 + unsigned int vmask __attribute__((aligned(8))); /* vector mask register */ 51 + unsigned int vreg[32 * 4] __attribute__((aligned(16))); 52 + /* 32 128-bit vector registers */ 53 + #endif /* __DARWIN_UNIX03 */ 54 + }; 55 + 56 + /* 57 + * _JBLEN is number of ints required to save the following: 58 + * r1, r2, r13-r31, lr, cr, ctr, xer, sig == 26 register_t sized 59 + * fr14 - fr31 = 18 doubles 60 + * vmask, 32 vector registers = 129 ints 61 + * 2 ints to get all the elements aligned 62 + * 63 + * register_t is 2 ints for ppc64 threads 64 + */ 65 + #define _JBLEN64 (26*2 + 18*2 + 129 + 1) 66 + #define _JBLEN32 (26 + 18*2 + 129 + 1) 67 + #define _JBLEN_MAX _JBLEN64 68 + 69 + /* 70 + * Locally scoped sizes 71 + */ 72 + #if defined(__ppc64__) 73 + #define _JBLEN _JBLEN64 74 + #else 75 + #define _JBLEN _JBLEN32 76 + #endif 77 + 78 + typedef int jmp_buf[_JBLEN]; 79 + typedef int sigjmp_buf[_JBLEN + 1]; 80 + 81 + __BEGIN_DECLS 82 + int setjmp(jmp_buf); 83 + void longjmp(jmp_buf, int); 84 + 85 + #ifndef _ANSI_SOURCE 86 + int _setjmp(jmp_buf); 87 + void _longjmp(jmp_buf, int); 88 + int sigsetjmp(sigjmp_buf, int); 89 + void siglongjmp(sigjmp_buf, int); 90 + #endif /* _ANSI_SOURCE */ 91 + 92 + #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) 93 + void longjmperror(void); 94 + #endif /* neither ANSI nor POSIX */ 95 + __END_DECLS 96 + 97 + #endif /* !_BSD_PPC_SETJMP_H_ */
+83
platform-include/ppc/signal.h
··· 1 + /* 2 + * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * Copyright (c) 1992, 1993 NeXT Computer, Inc. 30 + */ 31 + 32 + #ifndef _PPC_SIGNAL_H_ 33 + #define _PPC_SIGNAL_H_ 1 34 + 35 + #include <sys/cdefs.h> 36 + 37 + #ifndef _ANSI_SOURCE 38 + 39 + typedef int sig_atomic_t; 40 + 41 + #include <sys/appleapiopts.h> 42 + 43 + #ifdef __APPLE_API_OBSOLETE 44 + 45 + #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) 46 + 47 + #define __need_struct_sigcontext 48 + #define __need_struct_sigcontext32 49 + #define __need_struct_sigcontext64 50 + #include <ppc/_structs.h> 51 + 52 + /* 53 + * Machine-dependant flags used in sigvec call. 54 + */ 55 + #define SV_SAVE_REGS 0x1000 /* Save all regs in sigcontext */ 56 + 57 + /* 58 + * regs_saved_t -- Describes which registers beyond what the kernel cares 59 + * about are saved to and restored from this sigcontext. 60 + * 61 + * The default is REGS_SAVED_CALLER, only the caller saved registers 62 + * are saved. If the SV_SAVE_REGS flag was set when the signal 63 + * handler was registered with sigvec() then all the registers will be 64 + * saved in the sigcontext, and REGS_SAVED_ALL will be set. The C 65 + * library uses REGS_SAVED_NONE in order to quickly restore kernel 66 + * state during a longjmp(). 67 + */ 68 + typedef enum { 69 + REGS_SAVED_NONE, /* Only kernel managed regs restored */ 70 + REGS_SAVED_CALLER, /* "Caller saved" regs: rpc, a0-a7, 71 + t0-t4, at, lk0-lk1, xt1-xt20, 72 + xr0-xr1 */ 73 + REGS_SAVED_ALL /* All registers */ 74 + } regs_saved_t; 75 + 76 + #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ 77 + 78 + #endif /* __APPLE_API_OBSOLETE */ 79 + 80 + #endif /* _ANSI_SOURCE */ 81 + 82 + #endif /* _PPC_SIGNAL_H_ */ 83 +
+135
platform-include/ppc/types.h
··· 1 + /* 2 + * Copyright (c) 2000-2008 Apple Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + /* 29 + * Copyright 1995 NeXT Computer, Inc. All rights reserved. 30 + */ 31 + /* 32 + * Copyright (c) 1990, 1993 33 + * The Regents of the University of California. All rights reserved. 34 + * 35 + * Redistribution and use in source and binary forms, with or without 36 + * modification, are permitted provided that the following conditions 37 + * are met: 38 + * 1. Redistributions of source code must retain the above copyright 39 + * notice, this list of conditions and the following disclaimer. 40 + * 2. Redistributions in binary form must reproduce the above copyright 41 + * notice, this list of conditions and the following disclaimer in the 42 + * documentation and/or other materials provided with the distribution. 43 + * 3. All advertising materials mentioning features or use of this software 44 + * must display the following acknowledgement: 45 + * This product includes software developed by the University of 46 + * California, Berkeley and its contributors. 47 + * 4. Neither the name of the University nor the names of its contributors 48 + * may be used to endorse or promote products derived from this software 49 + * without specific prior written permission. 50 + * 51 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 52 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 53 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 54 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 55 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 56 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 57 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 58 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 59 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 60 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 61 + * SUCH DAMAGE. 62 + * 63 + * @(#)types.h 8.3 (Berkeley) 1/5/94 64 + */ 65 + 66 + #ifndef _MACHTYPES_H_ 67 + #define _MACHTYPES_H_ 68 + 69 + #ifndef __ASSEMBLER__ 70 + #include <ppc/_types.h> 71 + #include <sys/cdefs.h> 72 + /* 73 + * Basic integral types. Omit the typedef if 74 + * not possible for a machine/compiler combination. 75 + */ 76 + #ifndef _INT8_T 77 + #define _INT8_T 78 + typedef __signed char int8_t; 79 + #endif 80 + typedef unsigned char u_int8_t; 81 + #ifndef _INT16_T 82 + #define _INT16_T 83 + typedef short int16_t; 84 + #endif 85 + typedef unsigned short u_int16_t; 86 + #ifndef _INT32_T 87 + #define _INT32_T 88 + typedef int int32_t; 89 + #endif 90 + typedef unsigned int u_int32_t; 91 + #ifndef _INT64_T 92 + #define _INT64_T 93 + typedef long long int64_t; 94 + #endif 95 + typedef unsigned long long u_int64_t; 96 + 97 + #if __LP64__ 98 + typedef int64_t register_t; 99 + #else 100 + typedef int32_t register_t; 101 + #endif 102 + 103 + #ifndef _INTPTR_T 104 + #define _INTPTR_T 105 + typedef __darwin_intptr_t intptr_t; 106 + #endif 107 + #ifndef _UINTPTR_T 108 + #define _UINTPTR_T 109 + typedef unsigned long uintptr_t; 110 + #endif 111 + 112 + #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) 113 + /* These types are used for reserving the largest possible size. */ 114 + typedef u_int64_t user_addr_t; 115 + typedef u_int64_t user_size_t; 116 + typedef int64_t user_ssize_t; 117 + typedef int64_t user_long_t; 118 + typedef u_int64_t user_ulong_t; 119 + typedef int64_t user_time_t; 120 + typedef int64_t user_off_t; 121 + #define USER_ADDR_NULL ((user_addr_t) 0) 122 + #define CAST_USER_ADDR_T(a_ptr) ((user_addr_t)((uintptr_t)(a_ptr))) 123 + 124 + 125 + #endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ 126 + 127 + /* This defines the size of syscall arguments after copying into the kernel: */ 128 + typedef u_int64_t syscall_arg_t; 129 + 130 + //#ifndef __offsetof 131 + //#define __offsetof(type, field) ((size_t)(&((type *)0)->field)) 132 + //#endif 133 + 134 + #endif /* __ASSEMBLER__ */ 135 + #endif /* _MACHTYPES_H_ */
+66
platform-include/ppc/vmparam.h
··· 1 + /* 2 + * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. 3 + * 4 + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ 5 + * 6 + * This file contains Original Code and/or Modifications of Original Code 7 + * as defined in and that are subject to the Apple Public Source License 8 + * Version 2.0 (the 'License'). You may not use this file except in 9 + * compliance with the License. The rights granted to you under the License 10 + * may not be used to create, or enable the creation or redistribution of, 11 + * unlawful or unlicensed copies of an Apple operating system, or to 12 + * circumvent, violate, or enable the circumvention or violation of, any 13 + * terms of an Apple operating system software license agreement. 14 + * 15 + * Please obtain a copy of the License at 16 + * http://www.opensource.apple.com/apsl/ and read it before using this file. 17 + * 18 + * The Original Code and all software distributed under the License are 19 + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 20 + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 21 + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 22 + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 23 + * Please see the License for the specific language governing rights and 24 + * limitations under the License. 25 + * 26 + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ 27 + */ 28 + 29 + #ifndef _BSD_PPC_VMPARAM_H_ 30 + #define _BSD_PPC_VMPARAM_H_ 1 31 + 32 + #include <sys/resource.h> 33 + 34 + #define USRSTACK (0xc0000000) 35 + 36 + /* 37 + * put the default 64-bit stack at the max address 38 + * (minus one 32-bit address space for other incidentals) 39 + */ 40 + #define USRSTACK64 (0x00007FFF5FC00000ULL) 41 + 42 + /* 43 + * Virtual memory related constants, all in bytes 44 + */ 45 + #ifndef DFLDSIZ 46 + #define DFLDSIZ (RLIM_INFINITY) /* initial data size limit */ 47 + // XXX Not enforced 48 + //#define DFLDSIZ (6*1024*1024) /* initial data size limit */ 49 + #endif 50 + #ifndef MAXDSIZ 51 + #define MAXDSIZ (RLIM_INFINITY) /* max data size */ 52 + #endif 53 + #ifndef DFLSSIZ 54 + #define DFLSSIZ (8*1024*1024) /* initial stack size limit */ 55 + #endif 56 + #ifndef MAXSSIZ 57 + #define MAXSSIZ (64*1024*1024) /* max stack size */ 58 + #endif 59 + #ifndef DFLCSIZ 60 + #define DFLCSIZ (0) /* initial core size limit */ 61 + #endif 62 + #ifndef MAXCSIZ 63 + #define MAXCSIZ (RLIM_INFINITY) /* max core size */ 64 + #endif 65 + 66 + #endif /* _BSD_PPC_VMPARAM_H_ */
+1
platform-include/sys/cdefs.h
··· 757 757 */ 758 758 #if !defined(__sys_cdefs_arch_unknown__) && defined(__i386__) 759 759 #elif !defined(__sys_cdefs_arch_unknown__) && defined(__x86_64__) 760 + #elif !defined(__sys_cdefs_arch_unknown__) && defined(__ppc__) 760 761 #else 761 762 #error Unsupported architecture 762 763 #endif
+1 -1
src/libc/include/sys/cdefs.h
··· 34 34 */ 35 35 #include_next <sys/cdefs.h> 36 36 #ifndef _LIBC_NO_FEATURE_VERIFICATION 37 - #if defined(__arm__) || defined(__i386__) || defined(__x86_64__) 37 + #if defined(__arm__) || defined(__i386__) || defined(__x86_64__) || defined(__ppc__) 38 38 # include "libc-features.h" 39 39 #else 40 40 # error "Unknown architecture."