Root/
Source at commit 1275 created 12 years 11 months ago. By meklort, Remove unused file. Fixup makefiles some more - boot2 compiles again. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 1998-2000 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 | /*␊ |
23 | * Copyright (c) 1997 Apple Computer, Inc.␊ |
24 | *␊ |
25 | *␊ |
26 | * HISTORY␊ |
27 | *␊ |
28 | * sdouglas 22 Oct 97 - first checked in.␊ |
29 | * sdouglas 21 July 98 - start IOKit␊ |
30 | */␊ |
31 | ␊ |
32 | /*␊ |
33 | File: Types.h␊ |
34 | ␊ |
35 | Contains: Basic Macintosh data types.␊ |
36 | ␊ |
37 | Version: Technology: PowerSurge 1.0.2.␊ |
38 | Package: Universal Interfaces 2.1.2 on ETO #20␊ |
39 | ␊ |
40 | Copyright: � 1984-1995 by Apple Computer, Inc.␊ |
41 | All rights reserved.␊ |
42 | ␊ |
43 | Bugs?: If you find a problem with this file, use the Apple Bug Reporter␊ |
44 | stack. Include the file and version information (from above)␊ |
45 | in the problem description and send to:␊ |
46 | Internet: apple.bugs@applelink.apple.com␊ |
47 | AppleLink: APPLE.BUGS␊ |
48 | ␊ |
49 | */␊ |
50 | ␊ |
51 | #ifndef _IOKIT_IOMACOSTYPES_H␊ |
52 | #define _IOKIT_IOMACOSTYPES_H␊ |
53 | #ifndef __MACTYPES__␊ |
54 | ␊ |
55 | #include <IOKit/IOTypes.h>␊ |
56 | ␊ |
57 | #ifdef __cplusplus␊ |
58 | extern "C" {␊ |
59 | #endif␊ |
60 | ␊ |
61 | #ifndef __LP64__␊ |
62 | #pragma options align=mac68k␊ |
63 | #endif␊ |
64 | ␊ |
65 | #ifndef NULL␊ |
66 | #if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))␊ |
67 | #define NULL ((void *) 0)␊ |
68 | #else␊ |
69 | #define NULL 0␊ |
70 | #endif␊ |
71 | #endif␊ |
72 | ␊ |
73 | enum {␊ |
74 | noErr = 0␊ |
75 | };␊ |
76 | ␊ |
77 | typedef uintptr_t KernelProcessID;␊ |
78 | typedef uintptr_t AddressSpaceID;␊ |
79 | ␊ |
80 | #if 0␊ |
81 | #ifndef __cplusplus␊ |
82 | enum { false, true };␊ |
83 | #endif␊ |
84 | #endif␊ |
85 | ␊ |
86 | typedef unsigned char Byte;␊ |
87 | ␊ |
88 | typedef signed char SignedByte;␊ |
89 | ␊ |
90 | typedef UInt16 UniChar;␊ |
91 | ␊ |
92 | typedef char *Ptr;␊ |
93 | ␊ |
94 | typedef Ptr *Handle;␊ |
95 | ␊ |
96 | typedef UInt32 Fixed;␊ |
97 | ␊ |
98 | typedef Fixed *FixedPtr;␊ |
99 | ␊ |
100 | typedef UInt32 Fract;␊ |
101 | ␊ |
102 | typedef Fract *FractPtr;␊ |
103 | ␊ |
104 | struct _extended80 {␊ |
105 | short exp;␊ |
106 | short man[4];␊ |
107 | };␊ |
108 | struct _extended96 {␊ |
109 | short exp[2];␊ |
110 | short man[4];␊ |
111 | };␊ |
112 | typedef struct wide *WidePtr;␊ |
113 | ␊ |
114 | typedef struct UnsignedWide *UnsignedWidePtr;␊ |
115 | ␊ |
116 | ␊ |
117 | /*␊ |
118 | enum {␊ |
119 | false,␊ |
120 | true␊ |
121 | };␊ |
122 | #if !__option(bool)␊ |
123 | #ifndef true␊ |
124 | #define true 1␊ |
125 | #endif␊ |
126 | #ifndef false␊ |
127 | #define false 0␊ |
128 | #endif␊ |
129 | #endif␊ |
130 | ␊ |
131 | typedef unsigned char Boolean;␊ |
132 | */␊ |
133 | ␊ |
134 | ␊ |
135 | typedef short OSErr;␊ |
136 | ␊ |
137 | typedef unsigned int FourCharCode;␊ |
138 | ␊ |
139 | typedef FourCharCode OSType;␊ |
140 | ␊ |
141 | typedef FourCharCode ResType;␊ |
142 | ␊ |
143 | typedef OSType *OSTypePtr;␊ |
144 | ␊ |
145 | typedef ResType *ResTypePtr;␊ |
146 | ␊ |
147 | struct Rect {␊ |
148 | short top;␊ |
149 | short left;␊ |
150 | short bottom;␊ |
151 | short right;␊ |
152 | };␊ |
153 | typedef struct Rect Rect;␊ |
154 | ␊ |
155 | typedef Rect *RectPtr;␊ |
156 | ␊ |
157 | // Quickdraw.i␊ |
158 | ␊ |
159 | /*␊ |
160 | kVariableLengthArray is used in array bounds to specify a variable length array.␊ |
161 | It is ususally used in variable length structs when the last field is an array␊ |
162 | of any size. Before ANSI C, we used zero as the bounds of variable length ␊ |
163 | array, but that is illegal in ANSI C. Example:␊ |
164 | ␊ |
165 | struct FooList ␊ |
166 | {␊ |
167 | short listLength;␊ |
168 | Foo elements[kVariableLengthArray];␊ |
169 | };␊ |
170 | */␊ |
171 | ␊ |
172 | enum {␊ |
173 | kVariableLengthArray = 1␊ |
174 | };␊ |
175 | ␊ |
176 | /* Numeric version part of 'vers' resource */␊ |
177 | struct NumVersion {␊ |
178 | UInt8 majorRev; /*1st part of version number in BCD*/␊ |
179 | UInt8 minorAndBugRev; /*2nd & 3rd part of version number share a byte*/␊ |
180 | UInt8 stage; /*stage code: dev, alpha, beta, final*/␊ |
181 | UInt8 nonRelRev; /*revision level of non-released version*/␊ |
182 | };␊ |
183 | typedef struct NumVersion NumVersion;␊ |
184 | ␊ |
185 | typedef struct OpaqueRef *KernelID;␊ |
186 | ␊ |
187 | typedef UInt8 *BytePtr;␊ |
188 | ␊ |
189 | typedef IOByteCount ByteCount;␊ |
190 | ␊ |
191 | typedef IOItemCount ItemCount;␊ |
192 | ␊ |
193 | typedef void *LogicalAddress;␊ |
194 | ␊ |
195 | #if !defined(__LP64__)␊ |
196 | typedef void *PhysicalAddress;␊ |
197 | #endif␊ |
198 | ␊ |
199 | typedef UInt32 PBVersion;␊ |
200 | ␊ |
201 | typedef SInt32 Duration;␊ |
202 | ␊ |
203 | #define kInvalidID 0␊ |
204 | ␊ |
205 | enum {␊ |
206 | kNilOptions = 0␊ |
207 | };␊ |
208 | ␊ |
209 | ␊ |
210 | typedef unsigned char Str31[32];␊ |
211 | ␊ |
212 | ␊ |
213 | /*␊ |
214 | From:␊ |
215 | File: DriverFamilyMatching.i <18>␊ |
216 | Copyright: � 1995-1996 by Apple Computer, Inc., all rights reserved.␊ |
217 | */␊ |
218 | ␊ |
219 | //##############################################␊ |
220 | // Well known properties in the Name Registry␊ |
221 | //##############################################␊ |
222 | ␊ |
223 | #define kPropertyName "name"␊ |
224 | #define kPropertyCompatible "compatible"␊ |
225 | #define kPropertyDriverPtr "driver-ptr"␊ |
226 | #define kPropertyDriverDesc "driver-description"␊ |
227 | #define kPropertyReg "reg"␊ |
228 | #define kPropertyAAPLAddress "AAPL,address"␊ |
229 | #define kPropertyMatching "matching"␊ |
230 | ␊ |
231 | ␊ |
232 | //#########################################################␊ |
233 | // Descriptor for Drivers and NDRVs␊ |
234 | //#########################################################␊ |
235 | /* Driver Typing Information Used to Match Drivers With Devices */␊ |
236 | struct DriverType {␊ |
237 | Str31 nameInfoStr; /* Driver Name/Info String*/␊ |
238 | NumVersion version; /* Driver Version Number*/␊ |
239 | };␊ |
240 | typedef struct DriverType DriverType;␊ |
241 | typedef DriverType * DriverTypePtr;␊ |
242 | ␊ |
243 | /* OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment */␊ |
244 | typedef OptionBits RuntimeOptions;␊ |
245 | ␊ |
246 | ␊ |
247 | enum {␊ |
248 | kDriverIsLoadedUponDiscovery = 0x00000001, /* auto-load driver when discovered*/␊ |
249 | kDriverIsOpenedUponLoad = 0x00000002, /* auto-open driver when loaded*/␊ |
250 | kDriverIsUnderExpertControl = 0x00000004, /* I/O expert handles loads/opens*/␊ |
251 | kDriverIsConcurrent = 0x00000008, /* supports concurrent requests*/␊ |
252 | kDriverQueuesIOPB = 0x00000010, /* device manager doesn't queue IOPB*/␊ |
253 | kDriverIsLoadedAtBoot = 0x00000020, /* Driver is loaded at the boot time */␊ |
254 | kDriverIsForVirtualDevice = 0x00000040, /* Driver is for a virtual Device */ ␊ |
255 | kDriverSupportDMSuspendAndResume = 0x00000080 /* Driver supports Device Manager Suspend and Resume command */␊ |
256 | };␊ |
257 | ␊ |
258 | struct DriverOSRuntime {␊ |
259 | RuntimeOptions driverRuntime; /* Options for OS Runtime*/␊ |
260 | Str31 driverName; /* Driver's name to the OS*/␊ |
261 | UInt32 driverDescReserved[8]; /* Reserved area*/␊ |
262 | };␊ |
263 | typedef struct DriverOSRuntime DriverOSRuntime;␊ |
264 | typedef DriverOSRuntime * DriverOSRuntimePtr;␊ |
265 | ␊ |
266 | /* OS Service Information Used To Declare What APIs a Driver Supports */␊ |
267 | typedef UInt32 ServiceCount;␊ |
268 | ␊ |
269 | struct DriverServiceInfo {␊ |
270 | OSType serviceCategory; /* Service Category Name*/␊ |
271 | OSType serviceType; /* Type within Category*/␊ |
272 | NumVersion serviceVersion; /* Version of service*/␊ |
273 | };␊ |
274 | typedef struct DriverServiceInfo DriverServiceInfo;␊ |
275 | typedef DriverServiceInfo * DriverServiceInfoPtr;␊ |
276 | ␊ |
277 | struct DriverOSService {␊ |
278 | ServiceCount nServices; /* Number of Services Supported*/␊ |
279 | DriverServiceInfo service[1]; /* The List of Services (at least one)*/␊ |
280 | };␊ |
281 | typedef struct DriverOSService DriverOSService;␊ |
282 | typedef DriverOSService * DriverOSServicePtr;␊ |
283 | ␊ |
284 | /* Categories */␊ |
285 | ␊ |
286 | enum {␊ |
287 | kServiceCategoryDisplay = 'disp', /* Display Manager*/␊ |
288 | kServiceCategoryOpenTransport = 'otan', /* Open Transport*/␊ |
289 | kServiceCategoryBlockStorage = 'blok', /* Block Storage*/␊ |
290 | kServiceCategoryNdrvDriver = 'ndrv', /* Generic Native Driver*/␊ |
291 | kServiceCategoryScsiSIM = 'scsi', /* SCSI */␊ |
292 | kServiceCategoryFileManager = 'file', /* File Manager */␊ |
293 | kServiceCategoryIDE = 'ide-', /* ide */␊ |
294 | kServiceCategoryADB = 'adb-', /* adb */␊ |
295 | kServiceCategoryPCI = 'pci-', /* pci bus */␊ |
296 | /* Nu Bus */␊ |
297 | kServiceCategoryDFM = 'dfm-', /* DFM */␊ |
298 | kServiceCategoryMotherBoard = 'mrbd', /* mother Board */␊ |
299 | kServiceCategoryKeyboard = 'kybd', /* Keyboard */␊ |
300 | kServiceCategoryPointing = 'poit', /* Pointing */␊ |
301 | kServiceCategoryRTC = 'rtc-', /* RTC */␊ |
302 | kServiceCategoryNVRAM = 'nram', /* NVRAM */␊ |
303 | kServiceCategorySound = 'sond', /* Sound (1/3/96 MCS) */␊ |
304 | kServiceCategoryPowerMgt = 'pgmt', /* Power Management */␊ |
305 | kServiceCategoryGeneric = 'genr' /* Generic Service Category to receive general Events */␊ |
306 | };␊ |
307 | ␊ |
308 | /* Ndrv ServiceCategory Types */␊ |
309 | enum {␊ |
310 | kNdrvTypeIsGeneric = 'genr', /* generic*/␊ |
311 | kNdrvTypeIsVideo = 'vido', /* video*/␊ |
312 | kNdrvTypeIsBlockStorage = 'blok', /* block storage*/␊ |
313 | kNdrvTypeIsNetworking = 'netw', /* networking*/␊ |
314 | kNdrvTypeIsSerial = 'serl', /* serial*/␊ |
315 | kNdrvTypeIsParallel = 'parl', /* parallel */␊ |
316 | kNdrvTypeIsSound = 'sond', /* sound*/␊ |
317 | kNdrvTypeIsBusBridge = 'brdg'␊ |
318 | };␊ |
319 | ␊ |
320 | typedef UInt32 DriverDescVersion;␊ |
321 | ␊ |
322 | /* The Driver Description */␊ |
323 | enum {␊ |
324 | kInitialDriverDescriptor = 0,␊ |
325 | kVersionOneDriverDescriptor = 1␊ |
326 | };␊ |
327 | ␊ |
328 | enum {␊ |
329 | kTheDescriptionSignature = 'mtej',␊ |
330 | kDriverDescriptionSignature = 'pdes' ␊ |
331 | };␊ |
332 | ␊ |
333 | ␊ |
334 | struct DriverDescription {␊ |
335 | OSType driverDescSignature; /* Signature field of this structure*/␊ |
336 | DriverDescVersion driverDescVersion; /* Version of this data structure*/␊ |
337 | DriverType driverType; /* Type of Driver*/␊ |
338 | DriverOSRuntime driverOSRuntimeInfo; /* OS Runtime Requirements of Driver*/␊ |
339 | DriverOSService driverServices; /* Apple Service API Membership*/␊ |
340 | };␊ |
341 | typedef struct DriverDescription DriverDescription;␊ |
342 | typedef DriverDescription * DriverDescriptionPtr;␊ |
343 | ␊ |
344 | ␊ |
345 | #ifndef __LP64__␊ |
346 | #pragma options align=reset␊ |
347 | #endif␊ |
348 | ␊ |
349 | #ifdef __cplusplus␊ |
350 | }␊ |
351 | #endif␊ |
352 | ␊ |
353 | #endif /* __MACTYPES__ */␊ |
354 | ␊ |
355 | #ifndef __QUICKDRAW__␊ |
356 | ␊ |
357 | #ifdef __cplusplus␊ |
358 | extern "C" {␊ |
359 | #endif␊ |
360 | ␊ |
361 | #ifndef __LP64__␊ |
362 | #pragma options align=mac68k␊ |
363 | #endif␊ |
364 | ␊ |
365 | struct RGBColor {␊ |
366 | unsigned short red; /*magnitude of red component*/␊ |
367 | unsigned short green; /*magnitude of green component*/␊ |
368 | unsigned short blue; /*magnitude of blue component*/␊ |
369 | };␊ |
370 | typedef struct RGBColor RGBColor;␊ |
371 | typedef RGBColor *RGBColorPtr;␊ |
372 | typedef RGBColorPtr *RGBColorHdl;␊ |
373 | ␊ |
374 | struct ColorSpec {␊ |
375 | short value; /*index or other value*/␊ |
376 | RGBColor rgb; /*true color*/␊ |
377 | };␊ |
378 | ␊ |
379 | typedef struct ColorSpec ColorSpec;␊ |
380 | typedef ColorSpec *ColorSpecPtr;␊ |
381 | ␊ |
382 | struct GammaTbl {␊ |
383 | short gVersion; /*gamma version number*/␊ |
384 | short gType; /*gamma data type*/␊ |
385 | short gFormulaSize; /*Formula data size*/␊ |
386 | short gChanCnt; /*number of channels of data*/␊ |
387 | short gDataCnt; /*number of values/channel*/␊ |
388 | short gDataWidth; /*bits/corrected value (data packed to next larger byte size)*/␊ |
389 | short gFormulaData[1]; /*data for formulas followed by gamma values*/␊ |
390 | };␊ |
391 | typedef struct GammaTbl GammaTbl;␊ |
392 | typedef GammaTbl *GammaTblPtr;␊ |
393 | ␊ |
394 | struct RegEntryID␊ |
395 | {␊ |
396 | void * opaque[4];␊ |
397 | };␊ |
398 | typedef struct RegEntryID RegEntryID;␊ |
399 | typedef RegEntryID * RegEntryIDPtr;␊ |
400 | ␊ |
401 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */␊ |
402 | ␊ |
403 | struct IONDRVControlParameters {␊ |
404 | UInt8 __reservedA[0x1a];␊ |
405 | UInt16 code;␊ |
406 | void * params;␊ |
407 | UInt8 __reservedB[0x12];␊ |
408 | };␊ |
409 | ␊ |
410 | enum {␊ |
411 | kIONDRVOpenCommand = 128 + 0,␊ |
412 | kIONDRVCloseCommand = 128 + 1,␊ |
413 | kIONDRVReadCommand = 128 + 2,␊ |
414 | kIONDRVWriteCommand = 128 + 3,␊ |
415 | kIONDRVControlCommand = 128 + 4,␊ |
416 | kIONDRVStatusCommand = 128 + 5,␊ |
417 | kIONDRVKillIOCommand = 128 + 6,␊ |
418 | kIONDRVInitializeCommand = 128 + 7, /* init driver and device*/␊ |
419 | kIONDRVFinalizeCommand = 128 + 8, /* shutdown driver and device*/␊ |
420 | kIONDRVReplaceCommand = 128 + 9, /* replace an old driver*/␊ |
421 | kIONDRVSupersededCommand = 128 + 10 /* prepare to be replaced by a new driver*/␊ |
422 | };␊ |
423 | enum {␊ |
424 | kIONDRVSynchronousIOCommandKind = 0x00000001,␊ |
425 | kIONDRVAsynchronousIOCommandKind = 0x00000002,␊ |
426 | kIONDRVImmediateIOCommandKind = 0x00000004␊ |
427 | };␊ |
428 | ␊ |
429 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */␊ |
430 | ␊ |
431 | #ifndef __LP64__␊ |
432 | #pragma options align=reset␊ |
433 | #endif␊ |
434 | ␊ |
435 | #ifdef __cplusplus␊ |
436 | }␊ |
437 | #endif␊ |
438 | ␊ |
439 | #endif /* __QUICKDRAW__ */␊ |
440 | ␊ |
441 | #endif /* _IOKIT_IOMACOSTYPES_H */␊ |
442 |