Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/i386/include/IOKit/acpi/IOACPIPlatformExpert.h

Source at commit 1129 created 12 years 11 months ago.
By meklort, Change options.o so that it reloads the system config as well. Also change it so that it uses that config for variables (NOTE: if the calue exists in chameleonConfig, it's used instead.
1/*
2 * Copyright (c) 2003-2005 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#ifndef _IOKIT_IOACPIPLATFORMEXPERT_H
24#define _IOKIT_IOACPIPLATFORMEXPERT_H
25
26#include <IOKit/IOPlatformExpert.h> // superclass
27#include <IOKit/acpi/IOACPIPlatformDevice.h> // children
28
29class IOACPIPlatformExpert : public IODTPlatformExpert
30{
31 OSDeclareAbstractStructors( IOACPIPlatformExpert )
32
33 friend class IOACPIPlatformDevice;
34
35protected:
36 /*! @struct ExpansionData
37 @discussion This structure will be used to expand the capablilties
38 of the class in the future.
39 */
40 struct ExpansionData { };
41
42 /*! @var reserved
43 Reserved for future use. (Internal use only)
44 */
45 ExpansionData * reserved;
46
47public:
48 virtual bool start( IOService * provider );
49
50protected:
51 // Map ACPI event to interrupt event source index
52
53 virtual SInt32 installDeviceInterruptForFixedEvent(
54 IOService * device,
55 UInt32 fixedEvent ) = 0;
56
57 virtual SInt32 installDeviceInterruptForGPE(
58 IOService * device,
59 UInt32 gpeNumber,
60 void * gpeBlockDevice,
61 IOOptionBits options ) = 0;
62
63 // ACPI global lock acquisition
64
65 virtual IOReturn acquireGlobalLock( IOService * client,
66 UInt32 * lockToken,
67 const mach_timespec_t * timeout ) = 0;
68
69 virtual void releaseGlobalLock( IOService * client,
70 UInt32 lockToken ) = 0;
71
72 // ACPI method and object evaluation
73
74 virtual IOReturn validateObject( IOACPIPlatformDevice * device,
75 const OSSymbol * objectName ) = 0;
76
77 virtual IOReturn validateObject( IOACPIPlatformDevice * device,
78 const char * objectName );
79
80 virtual IOReturn evaluateObject( IOACPIPlatformDevice * device,
81 const OSSymbol * objectName,
82 OSObject ** result,
83 OSObject * params[],
84 IOItemCount paramCount,
85 IOOptionBits options ) = 0;
86
87 virtual IOReturn evaluateObject( IOACPIPlatformDevice * device,
88 const char * objectName,
89 OSObject ** result,
90 OSObject * params[],
91 IOItemCount paramCount,
92 IOOptionBits options );
93
94 // ACPI table
95
96 virtual const OSData * getACPITableData(
97 const char * tableName,
98 UInt32 tableInstance ) = 0;
99
100 // Address space handler
101
102 virtual IOReturn registerAddressSpaceHandler(
103 IOACPIPlatformDevice * device,
104 IOACPIAddressSpaceID spaceID,
105 IOACPIAddressSpaceHandler handler,
106 void * context,
107 IOOptionBits options ) = 0;
108
109 virtual void unregisterAddressSpaceHandler(
110 IOACPIPlatformDevice * device,
111 IOACPIAddressSpaceID spaceID,
112 IOACPIAddressSpaceHandler handler,
113 IOOptionBits options ) = 0;
114
115 // Address space read/write
116
117 virtual IOReturn readAddressSpace( UInt64 * value,
118 IOACPIAddressSpaceID spaceID,
119 IOACPIAddress address,
120 UInt32 bitWidth,
121 UInt32 bitOffset,
122 IOOptionBits options ) = 0;
123
124 virtual IOReturn writeAddressSpace( UInt64 value,
125 IOACPIAddressSpaceID spaceID,
126 IOACPIAddress address,
127 UInt32 bitWidth,
128 UInt32 bitOffset,
129 IOOptionBits options ) = 0;
130
131 // Device power management
132
133 virtual IOReturn setDevicePowerState( IOACPIPlatformDevice * device,
134 UInt32 powerState ) = 0;
135
136 virtual IOReturn getDevicePowerState( IOACPIPlatformDevice * device,
137 UInt32 * powerState ) = 0;
138
139 virtual IOReturn setDeviceWakeEnable( IOACPIPlatformDevice * device,
140 bool enable ) = 0;
141
142 // vtable padding
143
144 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 0 );
145 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 1 );
146 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 2 );
147 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 3 );
148 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 4 );
149 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 5 );
150 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 6 );
151 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 7 );
152 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 8 );
153 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 9 );
154 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 10 );
155 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 11 );
156 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 12 );
157 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 13 );
158 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 14 );
159 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 15 );
160 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 16 );
161 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 17 );
162 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 18 );
163 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 19 );
164 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 20 );
165 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 21 );
166 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 22 );
167 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 23 );
168 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 24 );
169 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 25 );
170 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 26 );
171 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 27 );
172 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 28 );
173 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 29 );
174 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 30 );
175 OSMetaClassDeclareReservedUnused( IOACPIPlatformExpert, 31 );
176};
177
178#endif /* !_IOKIT_IOACPIPLATFORMEXPERT_H */
179

Archive Download this file

Revision: 1129