Root/
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) 1998-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 | #ifndef _IOPMDeprecated_h_␊ |
30 | #define _IOPMDeprecated_h_␊ |
31 | ␊ |
32 | #ifdef __ppc__␊ |
33 | ␊ |
34 | // Power events␊ |
35 | enum {␊ |
36 | kClamshellClosedEventMask = (1<<0), // User closed lid␊ |
37 | kDockingBarEventMask = (1<<1), // OBSOLETE␊ |
38 | kACPlugEventMask = (1<<2), // User plugged or unplugged adapter␊ |
39 | kFrontPanelButtonEventMask = (1<<3), // User hit the front panel button␊ |
40 | kBatteryStatusEventMask = (1<<4) // Battery status has changed␊ |
41 | };␊ |
42 | ␊ |
43 | // PUBLIC power management features␊ |
44 | // NOTE: this is a direct port from classic, some of these bits␊ |
45 | // are obsolete but are included for completeness␊ |
46 | enum {␊ |
47 | kPMHasWakeupTimerMask = (1<<0), // 1=wake timer is supported␊ |
48 | kPMHasSharedModemPortMask = (1<<1), // Not used␊ |
49 | kPMHasProcessorCyclingMask = (1<<2), // 1=processor cycling supported␊ |
50 | kPMMustProcessorCycleMask = (1<<3), // Not used␊ |
51 | kPMHasReducedSpeedMask = (1<<4), // 1=supports reduced processor speed␊ |
52 | kPMDynamicSpeedChangeMask = (1<<5), // 1=supports changing processor speed on the fly␊ |
53 | kPMHasSCSIDiskModeMask = (1<<6), // 1=supports using machine as SCSI drive␊ |
54 | kPMCanGetBatteryTimeMask = (1<<7), // 1=battery time can be calculated␊ |
55 | kPMCanWakeupOnRingMask = (1<<8), // 1=machine can wake on modem ring␊ |
56 | kPMHasDimmingSupportMask = (1<<9), // 1=has monitor dimming support␊ |
57 | kPMHasStartupTimerMask = (1<<10), // 1=can program startup timer␊ |
58 | kPMHasChargeNotificationMask = (1<<11), // 1=client can determine charger status/get notifications␊ |
59 | kPMHasDimSuspendSupportMask = (1<<12), // 1=can dim diplay to DPMS ('off') state␊ |
60 | kPMHasWakeOnNetActivityMask = (1<<13), // 1=supports waking upon receipt of net packet␊ |
61 | kPMHasWakeOnLidMask = (1<<14), // 1=can wake upon lid/case opening␊ |
62 | kPMCanPowerOffPCIBusMask = (1<<15), // 1=can remove power from PCI bus on sleep␊ |
63 | kPMHasDeepSleepMask = (1<<16), // 1=supports deep (hibernation) sleep␊ |
64 | kPMHasSleepMask = (1<<17), // 1=machine support low power sleep (ala powerbooks)␊ |
65 | kPMSupportsServerModeAPIMask = (1<<18), // 1=supports reboot on AC resume for unexpected power loss␊ |
66 | kPMHasUPSIntegrationMask = (1<<19) // 1=supports incorporating UPS devices into power source calcs␊ |
67 | };␊ |
68 | ␊ |
69 | // PRIVATE power management features␊ |
70 | // NOTE: this is a direct port from classic, some of these bits␊ |
71 | // are obsolete but are included for completeness.␊ |
72 | enum {␊ |
73 | kPMHasExtdBattInfoMask = (1<<0), // Not used␊ |
74 | kPMHasBatteryIDMask = (1<<1), // Not used␊ |
75 | kPMCanSwitchPowerMask = (1<<2), // Not used ␊ |
76 | kPMHasCelsiusCyclingMask = (1<<3), // Not used␊ |
77 | kPMHasBatteryPredictionMask = (1<<4), // Not used␊ |
78 | kPMHasPowerLevelsMask = (1<<5), // Not used␊ |
79 | kPMHasSleepCPUSpeedMask = (1<<6), // Not used␊ |
80 | kPMHasBtnIntHandlersMask = (1<<7), // 1=supports individual button interrupt handlers␊ |
81 | kPMHasSCSITermPowerMask = (1<<8), // 1=supports SCSI termination power switch␊ |
82 | kPMHasADBButtonHandlersMask = (1<<9), // 1=supports button handlers via ADB␊ |
83 | kPMHasICTControlMask = (1<<10), // 1=supports ICT control␊ |
84 | kPMHasLegacyDesktopSleepMask = (1<<11), // 1=supports 'doze' style sleep␊ |
85 | kPMHasDeepIdleMask = (1<<12), // 1=supports Idle2 in hardware␊ |
86 | kPMOpenLidPreventsSleepMask = (1<<13), // 1=open case prevent machine from sleeping␊ |
87 | kPMClosedLidCausesSleepMask = (1<<14), // 1=case closed (clamshell closed) causes sleep␊ |
88 | kPMHasFanControlMask = (1<<15), // 1=machine has software-programmable fan/thermostat controls␊ |
89 | kPMHasThermalControlMask = (1<<16), // 1=machine supports thermal monitoring␊ |
90 | kPMHasVStepSpeedChangeMask = (1<<17), // 1=machine supports processor voltage/clock change␊ |
91 | kPMEnvironEventsPolledMask = (1<<18) // 1=machine doesn't generate pmu env ints, we must poll instead ␊ |
92 | };␊ |
93 | ␊ |
94 | // DEFAULT public and private features for machines whose device tree␊ |
95 | // does NOT contain this information (pre-Core99).␊ |
96 | ␊ |
97 | // For Cuda-based Desktops␊ |
98 | ␊ |
99 | #define kStdDesktopPMFeatures kPMHasWakeupTimerMask |\␊ |
100 | kPMHasProcessorCyclingMask |\␊ |
101 | kPMHasDimmingSupportMask |\␊ |
102 | kPMHasStartupTimerMask |\␊ |
103 | kPMSupportsServerModeAPIMask |\␊ |
104 | kPMHasUPSIntegrationMask␊ |
105 | ␊ |
106 | #define kStdDesktopPrivPMFeatures kPMHasExtdBattInfoMask |\␊ |
107 | kPMHasICTControlMask |\␊ |
108 | kPMHasLegacyDesktopSleepMask␊ |
109 | ␊ |
110 | #define kStdDesktopNumBatteries 0␊ |
111 | ␊ |
112 | // For Wallstreet (PowerBook G3 Series 1998)␊ |
113 | ␊ |
114 | #define kWallstreetPMFeatures kPMHasWakeupTimerMask |\␊ |
115 | kPMHasProcessorCyclingMask |\␊ |
116 | kPMHasReducedSpeedMask |\␊ |
117 | kPMDynamicSpeedChangeMask |\␊ |
118 | kPMHasSCSIDiskModeMask |\␊ |
119 | kPMCanGetBatteryTimeMask |\␊ |
120 | kPMHasDimmingSupportMask |\␊ |
121 | kPMHasChargeNotificationMask |\␊ |
122 | kPMHasDimSuspendSupportMask |\␊ |
123 | kPMHasSleepMask␊ |
124 | ␊ |
125 | #define kWallstreetPrivPMFeatures kPMHasExtdBattInfoMask |\␊ |
126 | kPMHasBatteryIDMask |\␊ |
127 | kPMCanSwitchPowerMask |\␊ |
128 | kPMHasADBButtonHandlersMask |\␊ |
129 | kPMHasSCSITermPowerMask |\␊ |
130 | kPMHasICTControlMask |\␊ |
131 | kPMClosedLidCausesSleepMask |\␊ |
132 | kPMEnvironEventsPolledMask␊ |
133 | ␊ |
134 | #define kStdPowerBookPMFeatures kWallstreetPMFeatures␊ |
135 | #define kStdPowerBookPrivPMFeatures kWallstreetPrivPMFeatures␊ |
136 | ␊ |
137 | #define kStdPowerBookNumBatteries 2␊ |
138 | ␊ |
139 | // For 101 (PowerBook G3 Series 1999)␊ |
140 | ␊ |
141 | #define k101PMFeatures kPMHasWakeupTimerMask |\␊ |
142 | kPMHasProcessorCyclingMask |\␊ |
143 | kPMHasReducedSpeedMask |\␊ |
144 | kPMDynamicSpeedChangeMask |\␊ |
145 | kPMHasSCSIDiskModeMask |\␊ |
146 | kPMCanGetBatteryTimeMask |\␊ |
147 | kPMHasDimmingSupportMask |\␊ |
148 | kPMHasChargeNotificationMask |\␊ |
149 | kPMHasDimSuspendSupportMask |\␊ |
150 | kPMHasSleepMask |\␊ |
151 | kPMHasUPSIntegrationMask␊ |
152 | ␊ |
153 | #define k101PrivPMFeatures kPMHasExtdBattInfoMask |\␊ |
154 | kPMHasBatteryIDMask |\␊ |
155 | kPMCanSwitchPowerMask |\␊ |
156 | kPMHasADBButtonHandlersMask |\␊ |
157 | kPMHasSCSITermPowerMask |\␊ |
158 | kPMHasICTControlMask |\␊ |
159 | kPMClosedLidCausesSleepMask |\␊ |
160 | kPMEnvironEventsPolledMask␊ |
161 | ␊ |
162 | ␊ |
163 | // These flags are deprecated. Use the version with the kIOPM prefix in IOPM.h␊ |
164 | enum {␊ |
165 | kACInstalled = (1<<0),␊ |
166 | kBatteryCharging = (1<<1),␊ |
167 | kBatteryInstalled = (1<<2),␊ |
168 | kUPSInstalled = (1<<3),␊ |
169 | kBatteryAtWarn = (1<<4),␊ |
170 | kBatteryDepleted = (1<<5),␊ |
171 | kACnoChargeCapability = (1<<6), // AC adapter cannot charge battery␊ |
172 | kRawLowBattery = (1<<7), // used only by Platform Expert␊ |
173 | kForceLowSpeed = (1<<8) // set by Platfm Expert, chk'd by Pwr Plugin};␊ |
174 | };␊ |
175 | ␊ |
176 | #endif /* __ppc32 */␊ |
177 | #endif /* _IOPMDeprecated_h_ */␊ |
178 |