Leaked source code of windows server 2003
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.

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