Chameleon

Chameleon Svn Source Tree

Root/tags/2.0/i386/include/IOKit/IODeviceTreeSupport.h

Source at commit 1808 created 12 years 4 months ago.
By blackosx, Revise layout of package installer 'Welcome' file so it looks cleaner. Change the copyright notice to begin from 2009 as seen in the Chameleon 2.0 r431 installer. Should this date be set earlier?
1/*
2 * Copyright (c) 1998-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 * Copyright (c) 1998 Apple Computer, Inc. All rights reserved.
30 *
31 * HISTORY
32 *
33 */
34
35#ifndef _IOKIT_IODEVICETREE_H
36#define _IOKIT_IODEVICETREE_H
37
38#include <IOKit/IORegistryEntry.h>
39#include <libkern/c++/OSData.h>
40
41class IODeviceMemory;
42class IOService;
43
44extern const IORegistryPlane *gIODTPlane;
45
46extern const OSSymbol *gIODTPHandleKey;
47
48extern const OSSymbol *gIODTCompatibleKey;
49extern const OSSymbol * gIODTTypeKey;
50extern const OSSymbol * gIODTModelKey;
51
52extern const OSSymbol *gIODTAAPLInterruptsKey;
53extern const OSSymbol *gIODTDefaultInterruptController;
54extern const OSSymbol *gIODTNWInterruptMappingKey;
55
56IORegistryEntry * IODeviceTreeAlloc( void * dtTop );
57
58
59bool IODTMatchNubWithKeys( IORegistryEntry * nub,
60 const char * keys );
61
62bool IODTCompareNubName( const IORegistryEntry * regEntry,
63 OSString * name, OSString ** matchingName );
64
65enum {
66 kIODTRecursive= 0x00000001,
67 kIODTExclusive= 0x00000002
68};
69
70OSCollectionIterator * IODTFindMatchingEntries( IORegistryEntry * from,
71IOOptionBits options, const char * keys );
72
73typedef SInt32 (*IODTCompareAddressCellFunc)
74(UInt32 cellCount, UInt32 left[], UInt32 right[]);
75typedef void (*IODTNVLocationFunc)
76(IORegistryEntry * entry,
77UInt8 * busNum, UInt8 * deviceNum, UInt8 * functionNum );
78
79void IODTSetResolving( IORegistryEntry * regEntry,
80IODTCompareAddressCellFunccompareFunc,
81IODTNVLocationFunclocationFunc );
82
83bool IODTResolveAddressCell( IORegistryEntry * regEntry,
84 UInt32 cellsIn[],
85 IOPhysicalAddress * phys, IOPhysicalLength * len );
86
87OSArray * IODTResolveAddressing( IORegistryEntry * regEntry,
88const char * addressPropertyName,
89IODeviceMemory * parent );
90
91struct IONVRAMDescriptor {
92 unsigned int format:4;
93 unsigned int marker:1;
94 unsigned int bridgeCount:3;
95 unsigned int busNum:2;
96 unsigned int bridgeDevices:6 * 5;
97 unsigned int functionNum:3;
98 unsigned int deviceNum:5;
99} __attribute__((aligned(2), packed));
100
101IOReturn IODTMakeNVDescriptor( IORegistryEntry * regEntry,
102IONVRAMDescriptor * hdr );
103
104OSData * IODTFindSlotName( IORegistryEntry * regEntry, UInt32 deviceNumber );
105
106const OSSymbol * IODTInterruptControllerName(
107IORegistryEntry * regEntry );
108
109bool IODTMapInterrupts( IORegistryEntry * regEntry );
110
111enum {
112 kIODTInterruptShared = 0x00000001
113};
114IOReturn IODTGetInterruptOptions( IORegistryEntry * regEntry, int source, IOOptionBits * options );
115
116#ifdef __cplusplus
117extern "C" {
118#endif
119
120IOReturn IONDRVLibrariesInitialize( IOService * provider );
121
122#ifdef __cplusplus
123}
124#endif
125
126#endif /* _IOKIT_IODEVICETREE_H */
127
128

Archive Download this file

Revision: 1808