|
|
1.1 root 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) 1998 Apple Computer, Inc. All rights reserved.
24: *
25: * HISTORY
26: *
27: */
28:
29: #ifndef _IOKIT_IODEVICETREE_H
30: #define _IOKIT_IODEVICETREE_H
31:
32: #include <IOKit/IORegistryEntry.h>
33: #include <libkern/c++/OSData.h>
34:
35: class IODeviceMemory;
36: class IOService;
37:
38: extern const IORegistryPlane * gIODTPlane;
39:
40: extern const OSSymbol * gIODTCompatibleKey;
41: extern const OSSymbol * gIODTTypeKey;
42: extern const OSSymbol * gIODTModelKey;
43:
44: extern const OSSymbol * gIODTAAPLInterruptsKey;
45: extern const OSSymbol * gIODTDefaultInterruptController;
46: extern const OSSymbol * gIODTNWInterruptMappingKey;
47:
48: IORegistryEntry * IODeviceTreeAlloc( void * dtTop );
49:
50:
51: bool IODTMatchNubWithKeys( IORegistryEntry * nub,
52: const char * keys );
53:
54: bool IODTCompareNubName( const IORegistryEntry * regEntry,
55: OSString * name, OSString ** matchingName );
56:
57: enum {
58: kIODTRecursive = 0x00000001,
59: kIODTExclusive = 0x00000002,
60: };
61:
62: OSCollectionIterator * IODTFindMatchingEntries( IORegistryEntry * from,
63: IOOptionBits options, const char * keys );
64:
65: typedef SInt32 (*IODTCompareAddressCellFunc)
66: (UInt32 cellCount, UInt32 left[], UInt32 right[]);
67: typedef void (*IODTNVLocationFunc)
68: (IORegistryEntry * entry,
69: UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum );
70:
71: void IODTSetResolving( IORegistryEntry * regEntry,
72: IODTCompareAddressCellFunc compareFunc,
73: IODTNVLocationFunc locationFunc );
74:
75: bool IODTResolveAddressCell( IORegistryEntry * regEntry,
76: UInt32 cellsIn[],
77: IOPhysicalAddress * phys, IOPhysicalLength * len );
78:
79: OSArray * IODTResolveAddressing( IORegistryEntry * regEntry,
80: const char * addressPropertyName,
81: IODeviceMemory * parent );
82:
83: #pragma options align=mac68k
84:
85: struct IONVRAMDescriptor {
86: unsigned int format:4;
87: unsigned int marker:1;
88: unsigned int bridgeCount:3;
89: unsigned int busNum:2;
90: unsigned int bridgeDevices:6 * 5;
91: unsigned int functionNum:3;
92: unsigned int deviceNum:5;
93: };
94:
95: #pragma options align=reset
96:
97: IOReturn IODTMakeNVDescriptor( IORegistryEntry * regEntry,
98: IONVRAMDescriptor * hdr );
99:
100: OSData * IODTFindSlotName( IORegistryEntry * regEntry, UInt32 deviceNumber );
101:
102: const OSSymbol * IODTInterruptControllerName(
103: IORegistryEntry * regEntry );
104:
105: bool IODTMapInterrupts( IORegistryEntry * regEntry );
106:
107: #ifdef __cplusplus
108: extern "C" {
109: #endif
110:
111: IOReturn IONDRVLibrariesInitialize( IOService * provider );
112:
113: #ifdef __cplusplus
114: }
115: #endif
116:
117: #endif /* _IOKIT_IODEVICETREE_H */
118:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.