Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

635 lines
19 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. podata.c
  5. Abstract:
  6. This module contains the global read/write data for the I/O system.
  7. Author:
  8. N. Yoshiyama [IBM Corp] 07-April-1994 ( Depends on Microsoft's design )
  9. Revision History:
  10. --*/
  11. #include "pop.h"
  12. #ifdef ALLOC_DATA_PRAGMA
  13. #pragma const_seg("PAGECONST")
  14. #endif // ALLOC_DATA_PRAGMA
  15. #include "initguid.h" // define PO guids
  16. #include "poclass.h"
  17. #ifdef ALLOC_DATA_PRAGMA
  18. #pragma const_seg()
  19. #endif // ALLOC_DATA_PRAGMA
  20. //
  21. // Define the global data for the Power Management.
  22. //
  23. //
  24. // Power Locks
  25. //
  26. //
  27. // Protects the IRP serial list.
  28. //
  29. KSPIN_LOCK PopIrpSerialLock;
  30. //
  31. // Protects all Dope structures and dependents,
  32. // including all Notify and Idle operations.
  33. //
  34. KSPIN_LOCK PopDopeGlobalLock;
  35. //
  36. // Must be held during creation or
  37. // destruction of power notify channel
  38. // structures.
  39. ERESOURCE PopNotifyLock;
  40. //
  41. // PoPowerSequence - The current power sequence value. Forever counts
  42. // up each time the machine is resumed from a suspend or hibernate
  43. //
  44. ULONG PoPowerSequence;
  45. //
  46. // PopInvalidNotifyBlockCount is the number of power notify blocks which
  47. // have been invalidated but not fully closed up and freed. Should be 0
  48. // most of the time. Non-0 indicates callers have failed to clean up
  49. // in response to an Invalidate notify.
  50. //
  51. ULONG PopInvalidNotifyBlockCount;
  52. //
  53. // Irp serializtion and Inrush serialization - pocall.c and related
  54. //
  55. LIST_ENTRY PopIrpSerialList;
  56. ULONG PopIrpSerialListLength;
  57. BOOLEAN PopInrushPending;
  58. PIRP PopInrushIrpPointer;
  59. LONG PopInrushIrpReferenceCount;
  60. //
  61. // PopSystemIrpDisptachWorker control, etc
  62. //
  63. KSPIN_LOCK PopWorkerLock;
  64. ULONG PopCallSystemState;
  65. //
  66. // For debugging, a list of all the outstanding PoRequestPowerIrps
  67. //
  68. LIST_ENTRY PopRequestedIrps;
  69. //
  70. // Idle detection service - see idle.c
  71. //
  72. // When adding to, removing from, or scanning the IdleDetectList, code
  73. // must be at DPC_LEVEL and must hold the PopGlobalDopeLock
  74. //
  75. LIST_ENTRY PopIdleDetectList;
  76. //
  77. // A timer & defered procedure call to process idle scans
  78. //
  79. KTIMER PopIdleScanTimer;
  80. KDPC PopIdleScanDpc;
  81. LARGE_INTEGER PopIdleScanTime;
  82. //
  83. // Two scan modes, performance, conservation...
  84. //
  85. BOOLEAN PopIdleDetectionMode = PO_IDLE_PERFORMANCE;
  86. //
  87. // This value holds all Power Management Simulation Flags
  88. //
  89. ULONG PopSimulate = POP_ENABLE_HIBER_PERF;
  90. //
  91. // These defines are only used to initialize these global variables,
  92. // so it makes sense to pair them all up. The global variables are
  93. // all used for idle state transition calculations
  94. //
  95. //
  96. // When throttling down an idle processor, keep it at least 30% active
  97. //
  98. #define IDLE_DEFAULT_MIN_THROTTLE 30
  99. ULONG PopIdleDefaultMinThrottle = IDLE_DEFAULT_MIN_THROTTLE;
  100. //
  101. // When a processor is throttled down, queue a timer to verify that a
  102. // processor does not go significantly "busy" and never returns to
  103. // the idle loop for a throttle adjustment
  104. // N.B idle values are in microseconds
  105. //
  106. #define IDLE_THROTTLE_CHECK_RATE 30000 // 30ms
  107. ULONG PopIdleThrottleCheckRate = IDLE_THROTTLE_CHECK_RATE;
  108. //
  109. // If the throttle check timer noticies a processor has not returned
  110. // to the idle loop for at least 100ms, then abort it's throttle
  111. //
  112. #define IDLE_THROTTLE_CHECK_TIMEOUT 100000 // 100ms
  113. ULONG PopIdleThrottleCheckTimeout = IDLE_THROTTLE_CHECK_TIMEOUT;
  114. //
  115. // To promote from Idle 0 the processor must be more then 90% idle over
  116. // the last 10 seconds
  117. //
  118. #define IDLE_FROM_0_DELAY 10000000 // 10 seconds
  119. #define IDLE_FROM_0_IDLE_PERCENT 90 // > 90% to promote from idle 0
  120. ULONG PopIdleFrom0Delay = IDLE_FROM_0_DELAY;
  121. ULONG PopIdleFrom0IdlePercent = IDLE_FROM_0_IDLE_PERCENT;
  122. //
  123. // First idle handler checks no more then every 100ms
  124. // idle below 20%
  125. //
  126. #define IDLE_0_TIME_CHECK 500000 // 500ms
  127. ULONG PopIdle0TimeCheck = IDLE_0_TIME_CHECK;
  128. //
  129. // When in other idle state check every 100ms
  130. //
  131. #define IDLE_TIME_CHECK 100000 // 100ms
  132. ULONG PopIdleTimeCheck = IDLE_TIME_CHECK;
  133. //
  134. // To demote to Idle 0 the processor must be less then 80% idle in a 100ms window
  135. //
  136. #define IDLE_TO_0_PERCENT 80
  137. ULONG PopIdleTo0Percent = IDLE_TO_0_PERCENT;
  138. //
  139. // The default demotion occurs at less then 50% idle for 100ms
  140. // N.B. The implementation assumes that IDLE_DEFAULT_DEMOTE_TIME divides
  141. // into IDLE_DEFAULT_PROMOTE_TIME evenly
  142. //
  143. #define IDLE_DEFAULT_DEMOTE_PERCENT 50
  144. #define IDLE_DEFAULT_DEMOTE_TIME 100000
  145. ULONG PopIdleDefaultDemotePercent = IDLE_DEFAULT_DEMOTE_PERCENT;
  146. ULONG PopIdleDefaultDemoteTime = IDLE_DEFAULT_DEMOTE_TIME;
  147. //
  148. // The default promotion occurs at more then 70% idle for 500ms
  149. //
  150. #define IDLE_DEFAULT_PROMOTE_TIME 500000 // 500ms
  151. #define IDLE_DEFAULT_PROMOTE_PERCENT 70
  152. ULONG PopIdleDefaultPromotePercent = IDLE_DEFAULT_PROMOTE_PERCENT;
  153. ULONG PopIdleDefaultPromoteTime = IDLE_DEFAULT_PROMOTE_TIME;
  154. //
  155. // We define special extra global variables to handle promotion to/from
  156. // C1. The reason that we do this is so that we can more finely tune these
  157. // values.
  158. //
  159. ULONG PopIdleDefaultDemoteToC1Percent = IDLE_DEFAULT_DEMOTE_PERCENT;
  160. ULONG PopIdleDefaultDemoteToC1Time = IDLE_DEFAULT_DEMOTE_TIME;
  161. ULONG PopIdleDefaultPromoteFromC1Percent = IDLE_DEFAULT_PROMOTE_PERCENT;
  162. ULONG PopIdleDefaultPromoteFromC1Time = IDLE_DEFAULT_PROMOTE_TIME;
  163. //
  164. // We convert PopIdleFrom0Delay (which is in ms) over to KeTimeIncrement
  165. // intervals. This is the number of ticks needed for processor to be idle before
  166. // we consider a promotion out of the Idle0 state
  167. //
  168. ULONG PopIdle0PromoteTicks;
  169. //
  170. // We convert PopIdleFrom0Delay and PopIdleFrom0IdlePercent percent into
  171. // KeTimeIncrement inverals. This is the number of ticks allowed to acculate the
  172. // the PromoteTicks time
  173. //
  174. ULONG PopIdle0PromoteLimit;
  175. //
  176. // These global variables and definitions all relate to CPU throttle management
  177. //
  178. //
  179. // A value that defines the period of time, in microseconds (us) between
  180. // intervals to check the processor busyness for the purposes of processor
  181. // throttling by the idle thread. Note that we need to convert this value
  182. // to KeTimeIncrement intervals. We store the converted number in
  183. // PopPerfTimeTicks
  184. //
  185. #define PROC_PERF_TIME_DELTA 50000 // 50ms
  186. ULONG PopPerfTimeDelta = PROC_PERF_TIME_DELTA;
  187. ULONG PopPerfTimeTicks = 0;
  188. //
  189. // A value that defines the period of time, in microseconds (us) between
  190. // intervals to check the processor busyness for the purposes of processor
  191. // throttling by a DPC routine. Note that we need to convert this value
  192. // to KeTimeIncrement intervals. We store the converted number in
  193. // PopPerfCriticalTimeTicks.
  194. //
  195. #define PROC_PERF_CRITICAL_TIME_DELTA 300000 // 300ms
  196. ULONG PopPerfCriticalTimeDelta = PROC_PERF_CRITICAL_TIME_DELTA;
  197. ULONG PopPerfCriticalTimeTicks = 0;
  198. //
  199. // A percentage value that is added to the current CPU busyness percentage
  200. // to determine if the processor is too busy for the current performance
  201. // state and must be promoted. The closer the value is to zero, the harder it
  202. // is for the processor to promote itself during times of extreme workloads
  203. //
  204. #define PROC_PERF_CRITICAL_FREQUENCY_DELTA 0 // 0%
  205. ULONG PopPerfCriticalFrequencyDelta = PROC_PERF_CRITICAL_FREQUENCY_DELTA;
  206. //
  207. // A percentage value where lower means that the overall IncreaseLevel will
  208. // actually be higher (and thus promotions won't occur as frequently) that
  209. // indicates what percentage of the delta betwene the current state and the
  210. // state to promote to should be used to set the promote level. A suggested
  211. // value would be 20%
  212. //
  213. #define PROC_PERF_INCREASE_PERC_MOD 20 // 20%
  214. ULONG PopPerfIncreasePercentModifier = PROC_PERF_INCREASE_PERC_MOD;
  215. //
  216. // A percentage value where lower means that the overall IncreaseLevel will
  217. // actually be higher (and thus promotions won't occur as frequently) that
  218. // indicates how many extra percentage points to remove from the promote level.
  219. // It should be noted that if this value is particularly high, confusion migh
  220. // result due to overlapping windows. A suggested value would be 1%
  221. //
  222. #define PROC_PERF_INCREASE_ABS_MOD 1 // 1%
  223. ULONG PopPerfIncreaseAbsoluteModifier = PROC_PERF_INCREASE_ABS_MOD;
  224. //
  225. // A percentage value where higher means that the overall DecreaseLevel will
  226. // actually be lower (and thus demotions won't occur as frequently) that
  227. // indicates what percentage of the delta between the current state and the
  228. // state to demote to should be used to set the demote level. A suggested
  229. // value is 30%
  230. //
  231. #define PROC_PERF_DECREASE_PERC_MOD 30 // 50%
  232. ULONG PopPerfDecreasePercentModifier = PROC_PERF_DECREASE_PERC_MOD;
  233. //
  234. // A percentage value where higher means that the overall DecreaseLevel will
  235. // actually be lower (and thus demotions won't occur as frequently) that
  236. // indicates how many extra percentage points to subtract from the demote
  237. // level. It should be noted that if the value is particularly high, then it
  238. // might not be possible to demote from this state. A suggested value would be
  239. // 1%
  240. //
  241. #define PROC_PERF_DECREASE_ABS_MOD 1 // 1%
  242. ULONG PopPerfDecreaseAbsoluteModifier = PROC_PERF_DECREASE_ABS_MOD;
  243. //
  244. // A value that defines the period of time, in microseconds (us) that must
  245. // have occured before a throttle increase can be considered. This value is
  246. // used as the basis for calculating the promotion time for each throttle
  247. // step
  248. //
  249. #define PROC_PERF_INCREASE_TIME 10000 // 10 ms
  250. #define PROC_PERF_INCREASE_MINIMUM_TIME 150000 // 150 ms
  251. ULONG PopPerfIncreaseTimeValue = PROC_PERF_INCREASE_TIME;
  252. ULONG PopPerfIncreaseMinimumTime = PROC_PERF_INCREASE_MINIMUM_TIME;
  253. //
  254. // A value that defines the period of time, in microseconds (us) that must
  255. // have occured before a throttle decrease can be considered. This value is
  256. // used as the basis for calculating the demotion time for each throttle
  257. // step
  258. //
  259. #define PROC_PERF_DECREASE_TIME 10000 // 10 ms
  260. #define PROC_PERF_DECREASE_MINIMUM_TIME 500000 // 500 ms
  261. ULONG PopPerfDecreaseTimeValue = PROC_PERF_DECREASE_TIME;
  262. ULONG PopPerfDecreaseMinimumTime = PROC_PERF_DECREASE_MINIMUM_TIME;
  263. //
  264. // A percentage value that represents at what point of battery capacity we
  265. // will start forcing down the throttle when we are in Degraded Throttling
  266. // mode. For example, a value of 50% means that we will start throttling
  267. // down the CPU when the battery reaches 50%
  268. //
  269. #define PROC_PERF_DEGRADE_MIN_CAP 50 // 50%
  270. ULONG PopPerfDegradeThrottleMinCapacity = PROC_PERF_DEGRADE_MIN_CAP;
  271. //
  272. // A percentage value that represents the lowest frequency we can force the
  273. // throttle down to when we are in the Degraded Throttling mode. For example,
  274. // a value of 30% means that we will never force the CPU below 30%
  275. //
  276. #define PROC_PERF_DEGRADE_MIN_FREQ 30 // 30%
  277. ULONG PopPerfDegradeThrottleMinFrequency = PROC_PERF_DEGRADE_MIN_FREQ;
  278. //
  279. // A percentage value that represents the maximum amount of time that was
  280. // spent in C3 for the last quanta before the idle loop will deside that
  281. // it should optimize power for C3 usage. A sample value would be 50%
  282. //
  283. #define PROC_PERF_MAX_C3_FREQUENCY 50 // 50%
  284. ULONG PopPerfMaxC3Frequency = PROC_PERF_MAX_C3_FREQUENCY;
  285. #if DBG
  286. //
  287. // PoDebug - Debug level
  288. //
  289. ULONG PoDebug = PO_ERROR;
  290. #endif
  291. //
  292. // PopPolicyLock - Protects policy data structures
  293. //
  294. ERESOURCE PopPolicyLock;
  295. //
  296. // PopWorkerSpinLock - Protects worker dispatch data
  297. // PopWorkerPending - A set bit for each worker cataogry which is pending
  298. // PopWorkerStatus - A clear bit for each worker catagory being serived
  299. //
  300. KSPIN_LOCK PopWorkerSpinLock;
  301. ULONG PopWorkerPending;
  302. ULONG PopWorkerStatus;
  303. //
  304. // PopNotifyEvents - PO_NOTIFY_xxx events which have fired.
  305. //
  306. ULONG PopNotifyEvents;
  307. //
  308. // PopVolumeLock - protects PopVolumeDevices from insertion. (removal is
  309. // protected by the policy lock
  310. //
  311. FAST_MUTEX PopVolumeLock;
  312. FAST_MUTEX PopRequestWakeLock;
  313. //
  314. // PopVolumeDevices - a list of off device objects which have had a VPBs attached
  315. //
  316. LIST_ENTRY PopVolumeDevices = {0};
  317. //
  318. // PopRequestWakeLock - synchronizes NtRequest/CancelDeviceWakeup
  319. //
  320. //
  321. // PopPolicyWorker - Work queue item to get another worker thread
  322. //
  323. WORK_QUEUE_ITEM PopPolicyWorker;
  324. //
  325. // PopIdle - Pointer to Array of idle handlers.
  326. //
  327. PPOP_IDLE_HANDLER PopIdle;
  328. //
  329. // PopIdleHandlerLookAsideList - List to allocate storage from for idle
  330. // handlers.
  331. //
  332. NPAGED_LOOKASIDE_LIST PopIdleHandlerLookAsideList;
  333. //
  334. // PopAttribute - Book keeping
  335. //
  336. POP_STATE_ATTRIBUTE PopAttributes[POP_NUMBER_ATTRIBUTES] = {
  337. 0, PopSystemRequiredSet, FALSE, 0,
  338. 0, PopDisplayRequired, TRUE, 0, // 0, PopSetNotificationWork, TRUE, PO_NOTIFY_DISPLAY_REQUIRED,
  339. 0, PopUserPresentSet, FALSE, 0,
  340. 0, PopAttribNop, FALSE, 0,
  341. 0, PopSetNotificationWork, TRUE, PO_NOTIFY_CAPABILITIES
  342. };
  343. //
  344. // PopFullWake - Flag to indicate the system has transistioned from
  345. // a quite wake to a full wake
  346. //
  347. ULONG PopFullWake;
  348. //
  349. // PoHiberInProgress - True when in the critical hibernation section
  350. //
  351. BOOLEAN PoHiberInProgress;
  352. //
  353. // PopShutdownCleanly - Controls whether clean shutdown sequence should
  354. // be used.
  355. //
  356. ULONG PopShutdownCleanly = 0;
  357. //
  358. // PopDispatchPolicyIrps - Used to prevent policy irps from dispatching
  359. // until the base drivers are loaded
  360. //
  361. BOOLEAN PopDispatchPolicyIrps;
  362. //
  363. // PopSystemIdleTimer - Timer used to get idle system detection worker
  364. //
  365. KTIMER PoSystemIdleTimer;
  366. //
  367. // PopSIdle - tracks the idle state of the system
  368. //
  369. POP_SYSTEM_IDLE PopSIdle;
  370. //
  371. // PopPolicyLockThread - Conains the current owning thread of the
  372. // policy mutex.
  373. //
  374. PKTHREAD PopPolicyLockThread = NULL;
  375. //
  376. // PopAcPolicy - current power policy being implemented while on AC
  377. // PopDcPolicy - current power policy being implemented while not on AC
  378. // PopPolicy - current active policy
  379. //
  380. SYSTEM_POWER_POLICY PopAcPolicy = {0};
  381. SYSTEM_POWER_POLICY PopDcPolicy = {0};
  382. PSYSTEM_POWER_POLICY PopPolicy = NULL;
  383. //
  384. // PopAcProcessorPolicy - current processor power policy being implemented on AC
  385. // PopDcProcessorPolicy - current processor power policy being implemented on DC
  386. // PopProcessorPolicy - current active policy
  387. //
  388. PROCESSOR_POWER_POLICY PopAcProcessorPolicy = {0};
  389. PROCESSOR_POWER_POLICY PopDcProcessorPolicy = {0};
  390. PPROCESSOR_POWER_POLICY PopProcessorPolicy = NULL;
  391. //
  392. // PopAction - Current power action being taken
  393. //
  394. POP_POWER_ACTION PopAction = {0};
  395. //
  396. // Spinlock that protects the thermal zones
  397. //
  398. KSPIN_LOCK PopThermalLock;
  399. //
  400. // PopSwitches - list of button and lid devices currently opened
  401. //
  402. LIST_ENTRY PopSwitches = {0};
  403. //
  404. // User-present work item
  405. //
  406. WORK_QUEUE_ITEM PopUserPresentWorkItem = {0};
  407. //
  408. // Performance counter frequency used by throttle.c
  409. //
  410. LARGE_INTEGER PopPerfCounterFrequency;
  411. #ifdef ALLOC_DATA_PRAGMA
  412. #pragma data_seg("PAGEDATA")
  413. #pragma const_seg("PAGECONST")
  414. #endif
  415. //
  416. // Notify worker dispatch
  417. //
  418. const POP_NOTIFY_WORK PopNotifyWork[PO_NUMBER_NOTIFY] = {
  419. PopDispatchCallback, PO_CB_BUTTON_COLLISION,
  420. PopDispatchFullWake, 0,
  421. PopDispatchCallback, PO_CB_SYSTEM_POWER_POLICY,
  422. PopDispatchAcDcCallback, 0,
  423. PopDispatchPolicyCallout, 0,
  424. PopDispatchDisplayRequired, 0,
  425. PopDispatchCallout, PsW32SystemPowerState,
  426. PopDispatchEventCodes, 0,
  427. PopDispatchCallout, PsW32CapabilitiesChanged,
  428. PopDispatchSetStateFailure, 0,
  429. PopDispatchCallback, PO_CB_PROCESSOR_POWER_POLICY,
  430. PopDispatchProcessorPolicyCallout, 0
  431. };
  432. //
  433. // PopAcRegName
  434. // PopDcRegName - registry location under current control set to store
  435. // and retrieve current policy settings from
  436. //
  437. const WCHAR PopRegKey[] = L"Control\\Session Manager\\Power";
  438. const WCHAR PopAcRegName[] = L"AcPolicy";
  439. const WCHAR PopDcRegName[] = L"DcPolicy";
  440. const WCHAR PopUndockPolicyRegName[] = L"UndockPowerPolicy";
  441. const WCHAR PopAdminRegName[] = L"PolicyOverrides";
  442. const WCHAR PopHeuristicsRegName[] = L"Heuristics";
  443. const WCHAR PopCompositeBatteryName[] = L"\\Device\\CompositeBattery";
  444. const WCHAR PopSimulateRegKey[] = L"Control\\Session Manager";
  445. const WCHAR PopSimulateRegName[] = L"PowerPolicySimulate";
  446. const WCHAR PopHiberFileName[] = L"\\hiberfil.sys";
  447. const WCHAR PopDebugHiberFileName[] = L"\\hiberfil.dbg";
  448. const WCHAR PopDumpStackPrefix[] = L"hiber_";
  449. const WCHAR PopApmActiveFlag[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\ApmActive";
  450. const WCHAR PopApmFlag[] = L"Active";
  451. const WCHAR PopAcProcessorRegName[] = L"AcProcessorPolicy";
  452. const WCHAR PopDcProcessorRegName[] = L"DcProcessorPolicy";
  453. //
  454. // PopAdminPolcy - Administrator overrides to apply to the current policy
  455. //
  456. ADMINISTRATOR_POWER_POLICY PopAdminPolicy = {0};
  457. //
  458. // PopCapabilities - Misc information on how the systems actual functions
  459. //
  460. SYSTEM_POWER_CAPABILITIES PopCapabilities; // nonpaged
  461. //
  462. // PopEventCallout - callout to USER for power events
  463. //
  464. PKWIN32_POWEREVENT_CALLOUT PopEventCallout; // nonpaged
  465. //
  466. // PopStateCallout - callout to USER for power state changes
  467. //
  468. PKWIN32_POWERSTATE_CALLOUT PopStateCallout = NULL;
  469. //
  470. // PopThermal - list of thermal zones currently opened
  471. //
  472. LIST_ENTRY PopThermal; // nonpaged
  473. //
  474. // PopCoolingMode - system is in active or passive cooling mode
  475. //
  476. ULONG PopCoolingMode = 0;
  477. //
  478. // PopCB - composite battery
  479. //
  480. POP_COMPOSITE_BATTERY PopCB; // nonpaged
  481. //
  482. // PopPolicyIrpQueue - Policy irps which have completed are put onto
  483. // this queue for processingby the worker thread
  484. //
  485. LIST_ENTRY PopPolicyIrpQueue; // nonpaged
  486. //
  487. // PopEventCode - Queued event codes
  488. //
  489. ULONG PopEventCode[POP_MAX_EVENT_CODES] = {0};
  490. //
  491. // PopWorkerTypes - Worker functions for each policy worker type
  492. //
  493. const POP_WORKER_TYPES PopWorkerTypes[] = {
  494. PopPolicyWorkerMain,
  495. PopPolicyWorkerActionPromote,
  496. PopPolicyWorkerAction,
  497. PopPolicyWorkerNotify,
  498. PopPolicySystemIdle,
  499. PopPolicyTimeChange
  500. };
  501. //
  502. // PopActionWaiters - Queue of synchronous action requests
  503. //
  504. LIST_ENTRY PopActionWaiters = {0};
  505. //
  506. // PopHeuristics - Presistant settings are heuristics which are not part
  507. // of the saved policy structures
  508. //
  509. POP_HEURISTICS PopHeuristics = {0};
  510. #ifdef ALLOC_DATA_PRAGMA
  511. #pragma const_seg()
  512. #pragma data_seg()
  513. #endif
  514. //
  515. // PopPowerStateHandler - Handlers for the various supported power states
  516. //
  517. POWER_STATE_HANDLER PopPowerStateHandlers[PowerStateMaximum] = {0};
  518. //
  519. // PopPowerStateNotifyHandler - Handler to be notify before and after invoking
  520. // PopPowerStateHandlers
  521. //
  522. POWER_STATE_NOTIFY_HANDLER PopPowerStateNotifyHandler = {0};
  523. //
  524. // PopHiberFile - information on the hibernation file
  525. // PopHiberFileDebug - a second hibernation file for debugging
  526. //
  527. POP_HIBER_FILE PopHiberFile = { NULL };
  528. POP_HIBER_FILE PopHiberFileDebug = { NULL };