ReactOS 0.4.15-dev-7958-gcd0bb1a
fxpkgpnp.hpp
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft. All rights reserved.
4
5Module Name:
6
7 FxPkgPnp.hpp
8
9Abstract:
10
11 This module implements the pnp package for the driver frameworks.
12
13Author:
14
15
16
17Environment:
18
19 Both kernel and user mode
20
21Revision History:
22
23--*/
24
25#ifndef _FXPKGPNP_H_
26#define _FXPKGPNP_H_
27
28//
29// These are all magical numbers based on inspection. If the queue overflows,
30// it is OK to increase these numbers without fear of either dependencies or
31// weird side effects.
32//
36
37// @@SMVERIFY_SPLIT_BEGIN
38
39//
40// DEBUGGED_EVENT is a TRUE value rather then a FALSE value (and having the field
41// name be TrapOnEvent) so that the initializer for the entry in the table has
42// to explicitly set this value, otherwise, if left out, the compiler will zero
43// out the field, which would lead to mistakenly saying the event was debugged
44// if DEBUGGED_EVENT is FALSE.
45//
46// Basically, we are catching folks who update the table but forget to specify
47// TRAP_ON_EVENT when they add the new entry.
48//
49#if FX_SUPER_DBG
50 #define DEBUGGED_EVENT , TRUE
51 #define TRAP_ON_EVENT , FALSE
52
53 #define DO_EVENT_TRAP(x) if ((x)->EventDebugged == FALSE) { COVERAGE_TRAP(); }
54
55 #define EVENT_TRAP_FIELD BOOLEAN EventDebugged;
56
57#else // FX_SUPER_DBG
58
59 #define DEBUGGED_EVENT
60 #define TRAP_ON_EVENT
61 #define DO_EVENT_TRAP(x) (0)
62
63 // intentionally blank
64 #define EVENT_TRAP_FIELD
65
66#endif // FX_SUPER_DBG
67
68#if FX_STATE_MACHINE_VERIFY
69enum FxStateMachineDeviceType {
70 FxSmDeviceTypeInvalid = 0,
71 FxSmDeviceTypePnp,
72 FxSmDeviceTypePnpFdo,
73 FxSmDeviceTypePnpPdo,
74};
75#endif // FX_STATE_MACHINE_VERIFY
76
77// @@SMVERIFY_SPLIT_END
78
79#include "fxpnpcallbacks.hpp"
80
81#include "fxeventqueue.hpp"
82
83//
84// Bit-flags for tracking which callback is currently executing.
85//
87 // Prepare hardware callback is running.
89};
90
91typedef
96 );
97
98//
99// workaround overloaded definition (rpc generated headers all define INTERFACE
100// to match the class name).
101//
102#undef INTERFACE
103
105 //
106 // generic interface header
107 //
109
111
113
114//
115// What follows here is a series of structures that define three state
116// machines. The first is the PnP state machine, followed by the
117// Power state machine, followed by the Power Policy state machine.
118// The first two will be instantiated in every driver. The third will
119// be instantiated only in drivers which are the power policy owners
120// for their device stacks, which usually amounts to the being the FDO.
121//
122#include "fxpnpstatemachine.hpp"
125
127
128//
129// Group these here instead of in the individual headers because, for some reason,
130// tracewpp.exe, can't handle such an arrangement.
131//
132// begin_wpp config
133// CUSTOM_TYPE(FxPnpEvent, ItemEnum(FxPnpEvent));
134// CUSTOM_TYPE(FxPowerEvent, ItemEnum(FxPowerEvent));
135// CUSTOM_TYPE(FxPowerPolicyEvent, ItemEnum(FxPowerPolicyEvent));
136// CUSTOM_TYPE(FxPowerIdleFlags, ItemEnum(FxPowerIdleFlags));
137// CUSTOM_TYPE(FxPowerIdleStates, ItemEnum(FxPowerIdleStates));
138// CUSTOM_TYPE(FxPowerIdleEvents, ItemEnum(FxPowerIdleEvents));
139// CUSTOM_TYPE(FxDevicePwrRequirementEvents, ItemEnum(FxDevicePwrRequirementEvents));
140// CUSTOM_TYPE(FxDevicePwrRequirementStates, ItemEnum(FxDevicePwrRequirementStates));
141// CUSTOM_TYPE(FxWakeInterruptEvents, ItemEnum(FxWakeInterruptEvents));
142// CUSTOM_TYPE(FxWakeInterruptStates, ItemEnum(FxWakeInterruptStates));
143
144// CUSTOM_TYPE(FxSelfManagedIoEvents, ItemEnum(FxSelfManagedIoEvents));
145// CUSTOM_TYPE(FxSelfManagedIoStates, ItemEnum(FxSelfManagedIoStates));
146// end_wpp
147
148//
149// These are defined in ntddk.h so its wpp custom type should be
150// added to a common header along with other public enums. Howeever until that
151// is done, define custom type here.
152//
153// begin_wpp config
154// CUSTOM_TYPE(DEVICE_POWER_STATE, ItemEnum(_DEVICE_POWER_STATE));
155// CUSTOM_TYPE(SYSTEM_POWER_STATE, ItemEnum(_SYSTEM_POWER_STATE));
156// CUSTOM_TYPE(BUS_QUERY_ID_TYPE, ItemEnum(BUS_QUERY_ID_TYPE));
157// CUSTOM_TYPE(DEVICE_RELATION_TYPE, ItemEnum(_DEVICE_RELATION_TYPE));
158// CUSTOM_TYPE(pwrmn, ItemListByte(IRP_MN_WAIT_WAKE,IRP_MN_POWER_SEQUENCE,IRP_MN_SET_POWER,IRP_MN_QUERY_POWER));
159// end_wpp
160
161//
162// Information shared between the power and power policy state machines.
163//
165 //
166 // Current wait wake irp in this device object. Access to this field is
167 // determined by m_WaitWakeOwner.
168 //
169 // m_WaitWakeOwner == TRUE, access is guarded by
170 // FxPowerMachine::m_WaitWakeLock
171 //
172 //
173 // m_WaitWakeOwner == FALSE, access is guarded InterlockedExchange operations
174 // and the ability to cancel the request is guarded through
175 // FxPowerPolicyMachine::m_WaitWakeCancelCompletionOwnership
176 //
177 // Any devobj can be both the power policy owner and the wait wake owner,
178 // but usually this dual role would only be for raw PDOs.
179 //
181
182 //
183 // Indication whether this power machine owns wait wake irps (and calls
184 // (dis)arm at bus level callbacks and handles cancellation logic.
185 //
187
188 //
189 // If TRUE the watchdog timer should be extended to a very long period of
190 // time during debugging for a NP power operation.
191 //
192 // NOTE: nowhere in the code do we set this value to TRUE. The debugger
193 // extension !wdfextendwatchdog will set it to TRUE, so the field must
194 // stay. If moved, the extension must obviously be updated as well.
195 //
197};
198
200
204};
205
215};
216
220};
221
222typedef
228 );
229
230//
231// The naming of these values is very important. The following macros rely on
232// it:
233//
234// (state related:)
235// SET_PNP_DEVICE_STATE_BIT
236// SET_TRI_STATE_FROM_STATE_BITS
237// GET_PNP_STATE_BITS_FROM_STRUCT
238//
239// (caps related:)
240// GET_PNP_CAP_BITS_FROM_STRUCT
241// SET_PNP_CAP_IF_TRUE
242// SET_PNP_CAP_IF_FALSE
243// SET_PNP_CAP
244//
245// They using the naming convention to generically map the field name in
246// WDF_DEVICE_PNP_CAPABILITIES and WDF_DEVICE_STATE to the appropriate bit
247// values.
248//
254
259
264
269
274
279
280 FxPnpStateMask = 0x00000FFF,
281
286
291
296
301
306
311
316
321
326
327 FxPnpCapMask = 0x3FFFF000,
328};
329
331 struct {
332 // States
339
340 // Caps
351
352 //
353 // The bottom 3 nibbles (0xFFF) are the pnp state tri state values encoded
354 // down to 2 bits each.
355 //
356 // The remaining portion (0x3FFFF000) are the pnp caps tri state values
357 // encoded down to 2 bits each as well.
358 //
360};
361
362//
363// The naming of these values is very important. The following macros rely on it:
364// GET_POWER_CAP_BITS_FROM_STRUCT
365// SET_POWER_CAP
366//
367// They using the naming convention to generically map the field name in
368// WDF_DEVICE_POWER_CAPABILITIES to the appropriate bit values.
369//
375
380
385
390
395
400};
401
403 //
404 // Encoded with FxPowerCapValues, which encodes the WDF_TRI_STATE values
405 //
407
408 //
409 // Default value PowerDeviceMaximum, PowerSystemMaximum indicates not to
410 // set this value.
411 //
412 BYTE DeviceWake; // DEVICE_POWER_STATE
413 BYTE SystemWake; // SYSTEM_POWER_STATE
414
415 //
416 // Each state is encoded in a nibble in a byte
417 //
419
420 //
421 // Default values of -1 indicate not to set this value
422 //
426};
427
432
433struct FxEnumerationInfo : public FxStump {
434public:
436 __in PFX_DRIVER_GLOBALS FxDriverGlobals
437 ) : m_ChildListList(FxDriverGlobals)
438 {
439 }
440
443 VOID
444 )
445 {
447
449 if (!NT_SUCCESS(status)) {
450 return status;
451 }
452
454 if (!NT_SUCCESS(status)) {
455 return status;
456 }
457
458 return STATUS_SUCCESS;
459 }
460
461 _Acquires_lock_(_Global_critical_region_)
462 VOID
463 AcquireParentPowerStateLock(
464 __in PFX_DRIVER_GLOBALS FxDriverGlobals
465 )
466 {
467 (VOID) m_PowerStateLock.AcquireLock(FxDriverGlobals);
468 }
469
470 _Releases_lock_(_Global_critical_region_)
471 VOID
472 ReleaseParentPowerStateLock(
473 __in PFX_DRIVER_GLOBALS FxDriverGlobals
474 )
475 {
476 m_PowerStateLock.ReleaseLock(FxDriverGlobals);
477 }
478
479public:
481
482 //
483 // List of FxChildList objects which contain enumerated children
484 //
486};
487
488class FxPkgPnp : public FxPackage {
489
495
496protected:
497 FxPkgPnp(
498 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
501 );
502
503 ~FxPkgPnp();
504
505 virtual
506 BOOLEAN
507 Dispose(
508 VOID
509 );
510
512 virtual
514 Dispatch(
516 );
517
518 virtual
521 VOID
522 ) =0;
523
524 virtual
527 VOID
528 ) =0;
529
530 VOID
532 VOID
533 );
534
535 VOID
537 VOID
538 );
539
544 );
545
550 );
551
554 __in PNP_DEVICE_STATE PnpDeviceState
555 );
556
561 );
562
568 );
569
575 );
576
580 VOID
581 );
582
583 VOID
585 VOID
586 );
587
591 VOID
592 );
593
596 PnpPrepareHardware(
597 __out PBOOLEAN ResourcesMatched
598 );
599
603 VOID
604 );
605
609 VOID
610 );
611
615 VOID
616 );
617
619 static
624 );
625
627 static
632 );
633
635 static
640 );
641
643 static
648 );
649
651 static
656 );
657
659 static
664 );
665
667 static
672 );
673
678 );
679
683 );
684
685 virtual
686 VOID
688 BOOLEAN IrpMustBePresent = TRUE
689 ) =0;
690
691 VOID
694 );
695
696 VOID
699 );
700
701 VOID
704 );
705
706 VOID
709 );
710
711 VOID
714 );
715
716 static
717 VOID
721 __in PVOID WorkerContext
722 );
723
724 static
725 VOID
729 __in PVOID WorkerContext
730 );
731
732 static
733 VOID
737 __in PVOID WorkerContext
738 );
739
740 VOID
743 );
744
745 VOID
748 );
749
750 VOID
753 );
754
755 VOID
758 );
759
761 static
766 );
767
772 );
773
774 VOID
775 SaveState(
776 __in BOOLEAN UseCanSaveState
777 );
778
780 static
785 );
786
791 );
792
793
794 LONG
796 VOID
797 );
798
799 LONG
801 VOID
802 );
803
804 static
805 VOID
810 );
811
812 static
817 );
818
819// begin pnp state machine table based callbacks
820 static
824 );
825
826 virtual
827 BOOLEAN
829 VOID
830 ) =0;
831
832 virtual
835 VOID
836 ) = 0;
837
838 static
842 );
843
844 virtual
847 VOID
848 ) = 0;
849
850 static
854 );
855
856 static
860 );
861
862 static
866 );
867
868 static
872 );
873
874 static
878 );
879
880 static
884 );
885
886 static
890 );
891
892 static
896 );
897
898 static
902 );
903
904 static
908 );
909
910 static
914 );
915
916 static
920 );
921
922 static
926 );
927
928 static
932 );
933
934 static
938 );
939
940 static
944 );
945
946 virtual
949 VOID
950 ) =0;
951
952 static
956 );
957
958 static
962 );
963
964 static
968 );
969
970 virtual
973 VOID
974 ) =0;
975
976 virtual
979 VOID
980 ) =0;
981
982 virtual
983 VOID
985 VOID
986 );
987
988 VOID
990 VOID
991 );
992
993 static
997 );
998
999 static
1003 );
1004
1005 static
1009 );
1010
1011 static
1015 );
1016
1017 static
1021 );
1022
1023 static
1027 );
1028
1029 static
1033 );
1034
1035 static
1039 );
1040
1041 static
1045 );
1046
1047 static
1051 );
1052
1053 static
1057 );
1058
1059 static
1063 );
1064
1065 static
1069 );
1070
1071 static
1075 );
1076
1077 static
1081 );
1082
1083 static
1087 );
1088
1089 static
1093 );
1094
1095 static
1099 );
1100
1101 static
1105 );
1106
1107 static
1111 );
1112
1113 static
1117 );
1118
1119 static
1123 );
1124
1125 static
1129 );
1130
1131 static
1135 );
1136
1137 static
1141 );
1142
1143 static
1147 );
1148
1149 static
1153 );
1154
1155 static
1159 );
1160
1161 static
1165 );
1166
1167 static
1171 );
1172
1173 static
1177 );
1178 // end pnp state machine table based callbacks
1179
1180 VOID
1182 VOID
1183 );
1184
1185 VOID
1187 VOID
1188 );
1189
1190 VOID
1192 VOID
1193 );
1194
1195 VOID
1197 VOID
1198 );
1199
1200 VOID
1202 __in BOOLEAN IrpMustBePresent = TRUE
1203 );
1204
1205 VOID
1207 VOID
1208 );
1209
1210 virtual
1211 NTSTATUS
1213 FxIrp* Irp
1214 ) =0;
1215
1216 // begin power state machine table based callbacks
1217 static
1221 );
1222
1223 virtual
1226 VOID
1227 ) =0;
1228
1229 static
1233 );
1234
1235 virtual
1238 VOID
1239 ) =0;
1240
1241 static
1245 );
1246
1247 static
1251 );
1252
1253 static
1257 );
1258
1259 virtual
1260 NTSTATUS
1262 BOOLEAN* ParentOn
1263 ) =0;
1264
1265 static
1269 );
1270
1271 static
1273 PowerDZero(
1275 );
1276
1277 static
1279 PowerD0NP(
1281 );
1282
1283 static
1287 );
1288
1289 static
1293 );
1294
1295 static
1299 );
1300
1301 static
1305 );
1306
1307 static
1311 );
1312
1313 static
1317 );
1318
1319 static
1323 );
1324
1325 static
1329 );
1330
1331 static
1335 );
1336
1337 static
1341 );
1342
1343 static
1347 );
1348
1349 static
1353 );
1354
1355 static
1359 );
1360
1361 static
1365 );
1366
1367 static
1371 );
1372
1373 static
1377 );
1378
1379 static
1383 );
1384
1385 virtual
1386 NTSTATUS
1388 VOID
1389 )
1390 {
1391 return STATUS_SUCCESS;
1392 }
1393
1394 virtual
1395 VOID
1397 VOID
1398 )
1399 {
1400 }
1401
1402 virtual
1403 VOID
1405 VOID
1406 ) =0;
1407
1408 static
1412 );
1413
1414 static
1418 );
1419
1420 static
1424 );
1425
1426 static
1430 );
1431
1432 static
1436 );
1437
1438 static
1442 );
1443
1444 static
1448 );
1449
1450 static
1454 );
1455
1456 static
1460 );
1461
1462 static
1466 );
1467
1468 static
1472 );
1473
1474 static
1478 );
1479
1480 static
1484 );
1485
1486 static
1490 );
1491
1492 static
1496 );
1497
1498 static
1502 );
1503
1504 static
1508 );
1509
1510 static
1514 );
1515
1516 static
1520 );
1521
1522 static
1526 );
1527
1528 static
1532 );
1533
1534 static
1538 );
1539
1540 static
1544 );
1545
1546 static
1550 );
1551
1552 static
1556 );
1557
1558 static
1562 );
1563
1564 static
1568 );
1569
1570 static
1574 );
1575
1576 static
1580 );
1581
1582 static
1586 );
1587
1588 static
1592 );
1593
1594 static
1598 );
1599
1600 static
1604 );
1605
1606 static
1610 );
1611
1612 static
1616 );
1617
1618 static
1622 );
1623
1624 static
1628 );
1629
1630 static
1634 );
1635
1636 static
1640 );
1641
1642 static
1646 );
1647
1648 static
1652 );
1653
1654 static
1658 );
1659
1660 static
1664 );
1665
1666 static
1670 );
1671
1672 static
1676 );
1677
1678 static
1682 );
1683
1684 static
1688 );
1689
1690 static
1694 );
1695
1696 static
1700 );
1701
1702 static
1706 );
1707
1708 static
1712 );
1713
1714 static
1718 );
1719
1720 static
1724 );
1725
1726 static
1730 );
1731
1732 static
1736 );
1737
1738 static
1742 );
1743
1744 static
1748 );
1749
1750 static
1754 );
1755
1756 static
1760 );
1761
1762 static
1766 );
1767
1768 static
1772 );
1773
1774 // end power state machine table based callbacks
1775
1776 // begin power policy state machine table based callbacks
1777 static
1781 );
1782
1783 static
1787 );
1788
1789 static
1793 );
1794
1795 static
1799 );
1800
1801 static
1805 );
1806
1807 static
1811 );
1812
1813 static
1817 );
1818
1819 static
1823 );
1824
1825 static
1829 );
1830
1831 static
1835 );
1836
1837 static
1841 );
1842
1843 static
1847 );
1848
1849 static
1853 );
1854
1855 static
1859 );
1860
1861 static
1865 );
1866
1867 static
1871 );
1872
1873 static
1877 );
1878
1879 static
1883 );
1884
1885 static
1889 );
1890
1891 static
1895 );
1896
1897 static
1901 );
1902
1903 static
1907 );
1908
1909 static
1913 );
1914
1915 static
1919 );
1920
1921 static
1925 );
1926
1927 static
1931 );
1932
1933 static
1937 );
1938
1939 static
1943 );
1944
1945 static
1949 );
1950
1951 static
1955 );
1956
1957 static
1961 );
1962
1963 static
1967 );
1968
1969 static
1973 );
1974
1975 static
1979 );
1980
1981 static
1985 );
1986
1987 static
1991 );
1992
1993 static
1997 );
1998
1999 static
2003 );
2004
2005 static
2009 );
2010
2011 static
2015 );
2016
2017 static
2021 );
2022
2023 static
2027 );
2028
2029 static
2033 );
2034
2035 static
2039 );
2040
2041 static
2045 );
2046
2047 static
2051 );
2052
2053 static
2057 );
2058
2059 static
2063 );
2064
2065 static
2069 );
2070
2071 static
2075 );
2076
2077 static
2081 );
2082
2083 static
2087 );
2088
2089 static
2093 );
2094
2095 static
2099 );
2100
2101 static
2105 );
2106
2107 static
2111 );
2112
2113 static
2117 );
2118
2119 static
2123 );
2124
2125 static
2129 );
2130
2131 static
2135 );
2136
2137 static
2141 );
2142
2143 static
2147 );
2148
2149 static
2153 );
2154
2155 static
2159 );
2160
2161 static
2165 );
2166
2167 static
2171 );
2172
2173 static
2177 );
2178
2179 static
2183 );
2184
2185 static
2189 );
2190
2191 static
2195 );
2196
2197 static
2201 );
2202
2203 static
2207 );
2208
2209 static
2213 );
2214
2215 static
2219 );
2220
2221 static
2225 );
2226
2227 static
2231 );
2232
2233 static
2237 );
2238
2239 static
2243 );
2244
2245 static
2249 );
2250
2251 static
2255 );
2256
2257 static
2261 );
2262
2263 static
2267 );
2268
2269 static
2273 );
2274
2275 static
2279 );
2280
2281 static
2285 );
2286
2287 static
2291 );
2292
2293 static
2297 );
2298
2299 static
2303 );
2304
2305 static
2309 );
2310
2311 static
2315 );
2316
2317 static
2321 );
2322
2323 static
2327 );
2328
2329 static
2333 );
2334
2335 static
2339 );
2340
2341 static
2345 );
2346
2347 static
2351 );
2352
2353 static
2357 );
2358
2359 static
2363 );
2364
2365 static
2369 );
2370
2371 static
2375 );
2376
2377 static
2381 );
2382
2383 static
2387 );
2388
2389 static
2393 );
2394
2395 static
2399 );
2400
2401 static
2405 );
2406
2407 static
2411 );
2412
2413 static
2417 );
2418
2419 static
2423 );
2424
2425 static
2429 );
2430
2431 static
2435 );
2436
2437 static
2441 );
2442
2443 static
2447 );
2448
2449 static
2453 );
2454
2455 static
2459 );
2460
2461 static
2465 );
2466
2467 static
2471 );
2472
2473 static
2477 );
2478
2479 static
2483 );
2484
2485 static
2489 );
2490
2491 static
2495 );
2496
2497 static
2501 );
2502
2503 static
2507 );
2508
2509 static
2513 );
2514
2515 static
2519 );
2520 static
2524 );
2525
2526 static
2530 );
2531
2532 static
2536 );
2537
2538 static
2542 );
2543
2544 static
2548 );
2549
2550 static
2554 );
2555
2556 static
2560 );
2561
2562 static
2566 );
2567
2568 static
2572 );
2573
2574 static
2578 );
2579
2580 static
2584 );
2585
2586 static
2590 );
2591
2592 static
2596 );
2597
2598 static
2602 );
2603
2604 static
2608 );
2609
2610 static
2614 );
2615
2616 static
2620 );
2621
2622 static
2626 );
2627
2628 static
2632 );
2633
2634 // end power policy state machine table based callbacks
2635
2636 VOID
2638 VOID
2639 );
2640
2641 BOOLEAN
2643 VOID
2644 );
2645
2646 BOOLEAN
2648 VOID
2649 );
2650
2651 BOOLEAN
2653 __in BOOLEAN ImplicitPowerUp
2654 );
2655
2656 VOID
2658 VOID
2659 );
2660
2661 VOID
2664 );
2665
2666 BOOLEAN
2669 );
2670
2671 BOOLEAN
2673 VOID
2674 )
2675 {
2676 //
2677 // We don't acquire the spinlock because when we transition to the state
2678 // which will attempt the arming of the device (at bus level), we will
2679 // gracefully handle the absence of the irp.
2680 //
2681 // On the other side if there is no irp and it is set immediately after
2682 // our check, the event posted by the irp's arrival will transition us
2683 // to the state which will attempt the arming.
2684 //
2686 }
2687
2688 VOID
2691 );
2692
2693 VOID
2696 );
2697
2698 VOID
2700 VOID
2701 );
2702
2703 VOID
2706 );
2707
2708 VOID
2710 VOID
2711 );
2712
2713 VOID
2716 );
2717
2719 BOOLEAN
2721 VOID
2722 );
2723
2724 BOOLEAN
2726 VOID
2727 );
2728
2729 VOID
2731 VOID
2732 );
2733
2734 static
2737
2738 VOID
2740 __in FxIrp* Irp
2741 );
2742
2743 static
2744 VOID
2746 __in FxIrp* Irp
2747 );
2748
2749 static
2752
2753 static
2756
2757 static
2760
2762 NTSTATUS
2766 );
2767
2769 NTSTATUS
2771 __in SYSTEM_POWER_STATE SystemState
2772 );
2773
2774 VOID
2776 VOID
2777 );
2778
2779 BOOLEAN
2781 VOID
2782 );
2783
2784 VOID
2786 VOID
2787 );
2788
2789 BOOLEAN
2791 VOID
2792 );
2793
2794 VOID
2796 VOID
2797 );
2798
2799 static
2802
2803 static
2806
2809 VOID
2810 )
2811 {
2813
2814 //
2815 // In a FastS4 situation, Parameters.Power.State.SystemState will be
2816 // PowerSystemHibernate, while TargetSystemState will indicate the
2817 // true Sx state the machine is moving into.
2818 //
2819 return (SYSTEM_POWER_STATE)
2821 TargetSystemState;
2822 }
2823
2825 NTSTATUS
2827 __in SYSTEM_POWER_STATE QueryState
2828 );
2829
2830 BOOLEAN
2832 __in SYSTEM_POWER_STATE SystemState
2833 )
2834 {
2835 return SystemState <= PowerPolicyGetDeviceDeepestSystemWakeState();
2836 }
2837
2840 VOID
2841 )
2842 {
2844 }
2845
2848 __in SYSTEM_POWER_STATE SystemState
2849 );
2850
2851 static
2855 )
2856 {
2858 }
2859
2860 static
2864 )
2865 {
2867 }
2868
2869 static
2873 )
2874 {
2876 }
2877
2878#if FX_STATE_MACHINE_VERIFY
2879 static
2880 CPPNP_STATE_ENTRY_FN_RETURN_STATE_TABLE
2881 GetPnpStateEntryFunctionReturnStatesTableEntry(
2883 )
2884 {
2885 return &m_WdfPnpStateEntryFunctionReturnStates[WdfDevStateNormalize(State) - WdfDevStatePnpObjectCreated];
2886 }
2887
2888 static
2889 CPPOWER_STATE_ENTRY_FN_RETURN_STATE_TABLE
2890 GetPowerStateEntryFunctionReturnStatesTableEntry(
2892 )
2893 {
2894 return &m_WdfPowerStateEntryFunctionReturnStates[WdfDevStateNormalize(State) - WdfDevStatePowerObjectCreated];
2895 }
2896
2897 static
2898 CPPWR_POL_STATE_ENTRY_FN_RETURN_STATE_TABLE
2899 GetPwrPolStateEntryFunctionReturnStatesTableEntry(
2901 )
2902 {
2903 return &m_WdfPwrPolStateEntryFunctionReturnStates[WdfDevStateNormalize(State) - WdfDevStatePwrPolObjectCreated];
2904 }
2905
2906 VOID
2907 ValidatePnpStateEntryFunctionReturnValue(
2909 WDF_DEVICE_PNP_STATE NewState
2910 );
2911
2912 VOID
2913 ValidatePowerStateEntryFunctionReturnValue(
2915 WDF_DEVICE_POWER_STATE NewState
2916 );
2917
2918 VOID
2919 ValidatePwrPolStateEntryFunctionReturnValue(
2922 );
2923#endif //FX_STATE_MACHINE_VERIFY
2924
2926 static
2930 )
2931 {
2932 ULONG i;
2933
2934 for (i = 0;
2936 i++) {
2937 if (m_WdfNotPowerPolicyOwnerStates[i].CurrentTargetState == State) {
2939 }
2940 }
2941
2942 return NULL;
2943 }
2944
2945 static
2946 NTSTATUS
2953 );
2954
2955 static
2956 NTSTATUS
2961 __in PVOID InBuffer
2962 );
2963
2964 static
2965 NTSTATUS
2971 __in PVOID InBuffer
2972 );
2973
2974 static
2975 NTSTATUS
2978 __in FxWmiInstanceInternal* Instaace,
2982 );
2983
2984 static
2985 NTSTATUS
2990 __in PVOID InBuffer
2991 );
2992
2993 static
2994 NTSTATUS
3000 __in PVOID InBuffer
3001 );
3002
3003 BOOLEAN
3005 VOID
3006 )
3007 {
3008 return (m_PendingPnPIrp != NULL) ? TRUE : FALSE;
3009 }
3010
3011 VOID
3013 __inout FxIrp* Irp,
3014 __in BOOLEAN MarkIrpPending = TRUE
3015 );
3016
3017 VOID
3020 )
3021 {
3023
3026 }
3027
3028 MdIrp
3030 VOID
3031 )
3032 {
3033 MdIrp irp;
3034
3037
3038 return irp;
3039 }
3040
3041 MdIrp
3043 VOID
3044 )
3045 {
3046 return m_PendingPnPIrp;
3047 }
3048
3049 VOID
3052 )
3053 {
3055
3056 Irp->MarkIrpPending();
3057 m_PendingDevicePowerIrp = Irp->GetIrp();
3058
3059 if (Irp->GetParameterPowerStateDeviceState() > PowerDeviceD0) {
3060 //
3061 // We are powering down, capture the current power action. We will
3062 // reset it to PowerActionNone once we have powered up.
3063 //
3064 m_SystemPowerAction = (UCHAR) Irp->GetParameterPowerShutdownType();
3065 }
3066 }
3067
3068 MdIrp
3070 VOID
3071 )
3072 {
3073 MdIrp irp;
3074
3077
3078 return irp;
3079 }
3080
3081 VOID
3084 )
3085 {
3087 Irp->MarkIrpPending();
3088 m_PendingSystemPowerIrp = Irp->GetIrp();
3089 }
3090
3091 MdIrp
3093 VOID
3094 )
3095 {
3096 MdIrp irp;
3097
3100
3101 return irp;
3102 }
3103
3104 MdIrp
3106 VOID
3107 )
3108 {
3110 }
3111
3112 BOOLEAN
3114 VOID
3115 )
3116 {
3119
3120 if (irp.GetIrp() == NULL) {
3121 return FALSE;
3122 }
3123
3125
3126 return (state == PowerDeviceD0 ? TRUE : FALSE);
3127 }
3128
3129 BOOLEAN
3132 )
3133 {
3134 return m_SpecialSupport[((ULONG)Usage)-1];
3135 }
3136
3137 VOID
3141 )
3142 {
3144 }
3145
3146 LONG
3149 __in BOOLEAN Add
3150 )
3151 {
3152 if (Add) {
3154 }
3155 else {
3157 }
3158 }
3159
3160 LONG
3162 // __range(WdfSpecialFilePaging, WdfSpecialFileBoot)
3163 __in __range(1, 4) ULONG Usage
3164 )
3165 {
3166 return m_SpecialFileCount[Usage-1];
3167 }
3168
3169 BOOLEAN
3171 VOID
3172 )
3173 {
3178 return FALSE;
3179 }
3180 else {
3181 return TRUE;
3182 }
3183 }
3184
3185 static
3189 )
3190 {
3191 switch (Type) {
3196 default: ASSERT(FALSE);return DeviceUsageTypePaging;
3197 }
3198 }
3199
3200 static
3204 )
3205 {
3206 switch (Type) {
3211 default: ASSERT(FALSE); return WdfSpecialFilePaging;
3212 }
3213 }
3214
3215 ULONG
3218 __in BOOLEAN InPath
3219 );
3220
3221 VOID
3224 __in BOOLEAN InPath,
3226 );
3227
3228 VOID
3232 );
3233
3235 NTSTATUS
3237 VOID
3238 );
3239
3240public:
3241 VOID
3244 __in BOOLEAN ProcessEventOnDifferentThread = FALSE
3245 );
3246
3247 VOID
3250 __in BOOLEAN ProcessEventOnDifferentThread = FALSE
3251 );
3252
3253 VOID
3256 __in BOOLEAN ProcessEventOnDifferentThread = FALSE
3257 );
3258
3259 BOOLEAN
3261 __in KIRQL CurrentIrql,
3262 __in BOOLEAN CallerSpecifiedProcessingOnDifferentThread
3263 );
3264
3265 BOOLEAN
3267 __in KIRQL CurrentIrql,
3268 __in BOOLEAN CallerSpecifiedProcessingOnDifferentThread
3269 );
3270
3271 VOID
3273 __in BOOLEAN ClenaupPnp
3274 );
3275
3276 VOID
3278 __in MxEvent * WaitEvent
3279 );
3280
3282 virtual
3283 NTSTATUS
3284 Initialize(
3286 );
3287
3289 NTSTATUS
3291 VOID
3292 );
3293
3294 virtual
3295 VOID
3298 );
3299
3300 VOID
3304 );
3305
3307 NTSTATUS
3310 );
3311
3312 VOID
3315 );
3316
3317 NTSTATUS
3319 __in const GUID* Guid,
3322 );
3323
3324 NTSTATUS
3327 );
3328
3329 NTSTATUS
3332 );
3333
3334 NTSTATUS
3337 __in BOOLEAN ArmForWakeIfChildrenAreArmedForWake,
3338 __in BOOLEAN IndicateChildWakeOnParentWake
3339 );
3340
3341private:
3342
3343 VOID
3345 VOID
3346 );
3347
3348 NTSTATUS
3351 );
3352
3353 VOID
3357 );
3358
3359 NTSTATUS
3362 );
3363
3364 VOID
3368 );
3369
3370 VOID
3372 __in HANDLE RegKey,
3375 );
3376
3377 NTSTATUS
3381 );
3382
3383 NTSTATUS
3386 _In_ BOOLEAN ForS0Idle
3387 );
3388
3389public:
3390 BOOLEAN
3393 );
3394
3395 BOOLEAN
3397 VOID
3398 );
3399
3400 ULONG
3402 VOID
3403 );
3404
3405 BOOLEAN
3406 __inline
3408 VOID
3409 )
3410 {
3412 }
3413
3414 VOID
3416 VOID
3417 )
3418 {
3419 LONG c;
3420
3421 //
3422 // Called by a child that we are waiting on its removal
3423 //
3425 ASSERT(c >= 0);
3426
3427 if (c == 0) {
3429 }
3430 }
3431
3432 VOID
3435 );
3436
3437 VOID
3440 );
3441
3442 VOID
3445 );
3446
3447 VOID
3448 SetPnpCaps(
3450 );
3451
3452 VOID
3455 );
3456
3457 VOID
3460 );
3461
3462 VOID
3465 );
3466
3467 VOID
3470 )
3471 {
3474 sizeof(PNP_BUS_INFORMATION));
3475 }
3476
3478 NTSTATUS
3481 );
3482
3484 NTSTATUS
3485 __inline
3489 __in_opt LONG Line = 0,
3491 )
3492 {
3494 }
3495
3496 VOID
3497 __inline
3500 __in_opt LONG Line = 0,
3502 )
3503 {
3505 }
3506
3507 BOOLEAN
3509 VOID
3510 )
3511 {
3512 return m_HasPowerThread;
3513 }
3514
3515 VOID
3518 )
3519 {
3522 WorkItem
3523 );
3524 }
3525
3527 NTSTATUS
3530 );
3531
3532 VOID
3535 );
3536
3538 NTSTATUS
3541 );
3542
3543 VOID
3546 );
3547
3548 VOID
3550 VOID
3551 );
3552
3554 NTSTATUS
3556 VOID
3557 );
3558
3559 VOID
3562 );
3563
3564 VOID
3567 );
3568
3569 VOID
3571 __inout PLONG PendingCount
3572 );
3573
3575 NTSTATUS
3577 VOID
3578 );
3579
3580 VOID
3582 __in FxDmaEnabler* Enabler
3583 );
3584
3585 VOID
3587 __in FxDmaEnabler* Enabler
3588 );
3589
3590 VOID
3592 __in FxDmaEnabler* Enabler
3593 );
3594
3595 VOID
3599 );
3600
3601 VOID
3603 VOID
3604 );
3605
3606 VOID
3608 VOID
3609 );
3610
3611 BOOLEAN
3613 VOID
3614 )
3615 {
3617 }
3618
3619 BOOLEAN
3621 VOID
3622 )
3623 {
3624 if (m_WakeInterruptCount > 0) {
3625 return TRUE;
3626 } else {
3627 return FALSE;
3628 }
3629 }
3630
3631 BOOLEAN
3633 VOID
3634 )
3635 {
3636 if (IsPowerPolicyOwner()) {
3638 }
3639 else {
3640 return FALSE;
3641 }
3642 }
3643
3644 BOOLEAN
3646 VOID
3647 )
3648 {
3649 if (IsPowerPolicyOwner()) {
3651 }
3652 else {
3653 return FALSE;
3654 }
3655 }
3656
3657 BOOLEAN
3659 VOID
3660 )
3661 {
3662 if (IsPowerPolicyOwner()) {
3665 }
3666 else {
3667 return FALSE;
3668 }
3669 }
3670
3671 BOOLEAN
3673 VOID
3674 )
3675 {
3676 if (IsPowerPolicyOwner()) {
3678 }
3679 else {
3680 return FALSE;
3681 }
3682 }
3683
3685 NTSTATUS
3687 __out PBOOLEAN PowerUp
3688 )
3689 {
3690 *PowerUp = FALSE;
3691
3692 if (IsPowerPolicyOwner()) {
3694
3695 //
3696 // By referencing the parent (this device) we make sure that if the
3697 // parent is in Dx, we force it back into D0 so that this child can
3698 // be in D0.
3699 //
3701
3702 if (!NT_SUCCESS(status)) {
3703 return status;
3704 }
3705
3706 //
3707 // m_EnumInfo is valid because the child device is calling into the
3708 // parent device and if there is a child, there is a m_EnumInfo.
3709 //
3710 m_EnumInfo->AcquireParentPowerStateLock(GetDriverGlobals());
3711
3712 //
3713 // The caller has added a power reference to this device, so this device
3714 // will remain in D0 until that power reference has been removed. This
3715 // count is separate from the power ref count b/c the power ref count
3716 // only controls when the idle timer will fire. This count handles the
3717 // race that can occur after we decide that the parent is idle and act
3718 // on it and the child powers up before this parent actually powers
3719 // down.
3720 //
3723
3724 m_EnumInfo->ReleaseParentPowerStateLock(GetDriverGlobals());
3725 }
3726 else {
3727 //
3728 // The parent (this device) is not the power policy owner. That
3729 // means we cannot poke the parent to come back to D0 and rely on
3730 // the parent being in D0. Our only recourse is to move into D0 and
3731 // ignore the parent's device power state.
3732 //
3733 // We will only get into this situation if the parent is not the
3734 // power policy owner of the stack. This usually means the parent
3735 // is a filter driver in the parent stack and is creating a virtual
3736 // child. Since the child is assumed virtual, it's D state is not
3737 // tied to real hardware and doesn't really matter.
3738 //
3739 *PowerUp = TRUE;
3740 }
3741
3742 return STATUS_SUCCESS;
3743 }
3744
3745 VOID
3747 VOID
3748 )
3749 {
3750 //
3751 // If this parent is the power policy owner of the child's stack, release
3752 // the requirement this device to be in D0 while the child is in D0.
3753 //
3754 if (IsPowerPolicyOwner()) {
3755 //
3756 // Decrement the number of children who are powered on
3757 //
3758 m_EnumInfo->AcquireParentPowerStateLock(GetDriverGlobals());
3761 m_EnumInfo->ReleaseParentPowerStateLock(GetDriverGlobals());
3762
3764 }
3765 }
3766
3769 VOID
3770 )
3771 {
3773 }
3774
3775 VOID
3777 VOID
3778 );
3779
3780
3781 VOID
3783 VOID
3784 )
3785 {
3787 }
3788
3789 virtual
3790 NTSTATUS
3792 FxIrp* Irp
3793 ) =0;
3794
3795 FxCmResList *
3797 VOID
3798 )
3799 {
3800 return m_Resources;
3801 }
3802
3803 FxCmResList *
3805 VOID
3806 )
3807 {
3808 return m_ResourcesRaw;
3809 }
3810
3811 ULONG
3813 VOID
3814 )
3815 {
3817 }
3818
3819 VOID
3821 __in BOOLEAN ProcessPowerEventOnDifferentThread
3822 );
3823
3824 VOID
3826 __in enum FxWakeInterruptEvents WakeInterruptEvent
3827 );
3828
3829private:
3830 VOID
3832 VOID
3833 );
3834
3835 VOID
3837 VOID
3838 );
3839
3840 VOID
3842 VOID
3843 );
3844
3845 VOID
3847 VOID
3848 );
3849
3851 NTSTATUS
3853 __in ULONG NotifyFlags
3854 );
3855
3856 NTSTATUS
3858 __in ULONG NotifyFlags
3859 );
3860
3861 BOOLEAN
3863 VOID
3864 );
3865
3866 BOOLEAN
3868 _In_ HANDLE RestartKey,
3869 _In_ BOOLEAN CreatedNewKey
3870 );
3871
3872 VOID
3874 __in BOOLEAN GracefulRemove
3875 );
3876
3877 virtual
3878 NTSTATUS
3880 FxIrp* Irp
3881 ) =0;
3882
3883 virtual
3884 VOID
3886 BOOLEAN GracefulRemove
3887 ) =0;
3888
3889 virtual
3890 VOID
3892 VOID
3893 ) =0;
3894
3895 virtual
3896 VOID
3898 VOID
3899 ) =0;
3900
3901 virtual
3902 NTSTATUS
3904 VOID
3905 ) =0;
3906
3908 NTSTATUS
3910 VOID
3911 );
3912
3913 virtual
3914 NTSTATUS
3916 VOID
3917 ) =0;
3918
3919 VOID
3921 VOID
3922 );
3923
3925 NTSTATUS
3927 __inout FxIrp* Irp,
3929 );
3930
3932 NTSTATUS
3934 VOID
3935 );
3936
3937 VOID
3939 VOID
3940 );
3941
3942 static
3943 VOID
3947 )
3948 {
3950
3951 result = ((FxPkgPnp*) Context)->m_PowerThread->QueueWorkItem(WorkItem);
3952#if DBG
3953 ASSERT(result);
3954#else
3956#endif
3957 }
3958
3959 static
3960 VOID
3961 STDCALL
3964 );
3965
3966 static
3967 VOID
3968 STDCALL
3971 );
3972
3973 BOOLEAN
3975 __in DEVICE_POWER_STATE DxState
3976 );
3977
3978 VOID
3980 VOID
3981 );
3982
3983 VOID
3985 VOID
3986 );
3987
3988 VOID
3989 __inline
3991 VOID
3992 );
3993
3995 NTSTATUS
3997 __in DEVICE_POWER_STATE DxState,
3999 )
4000 {
4001 //
4002 // The device is powering down because the system is moving into a lower
4003 // power state.
4004 //
4005 // If we have child devices, setup the guard so that they do not power
4006 // up while the parent is in low power. Note that in this case (an Sx
4007 // transition) we do not look at the count of powered up children
4008 // because the power policy owner for the child's stack should not be
4009 // powering up the device once it has processed the Sx irp for its stack.
4010 //
4012
4014 }
4015
4016 VOID
4018 VOID
4019 )
4020 {
4021 if (m_EnumInfo != NULL) {
4022 m_EnumInfo->AcquireParentPowerStateLock(GetDriverGlobals());
4023 //
4024 // Setup a guard so that no children power up until we return to S0.
4025 //
4027 m_EnumInfo->ReleaseParentPowerStateLock(GetDriverGlobals());
4028 }
4029 }
4030
4032 NTSTATUS
4034 VOID
4035 );
4036
4037public:
4039 NTSTATUS
4043 );
4044
4046 NTSTATUS
4048 __in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResourceRaw,
4051 );
4052
4053 BOOLEAN
4055 VOID
4056 )
4057 {
4058#if FX_IS_KERNEL_MODE
4060#else
4061 return FALSE;
4062#endif
4063 }
4064
4065 BOOLEAN
4067 VOID
4068 )
4069 {
4070 return (m_InterruptObjectCount > 1 ? TRUE : FALSE);
4071 }
4072
4073 VOID
4075 VOID
4076 )
4077 {
4079
4081 }
4082
4083 //
4084 // Start of members
4085 //
4086public:
4087
4089
4092
4094
4096
4097 //
4098 // Track the current device and system power states.
4099 //
4100
4101 // SYSTEM_POWER_STATE
4103
4104 // WDF_POWER_DEVICE_STATE
4106
4107 // WDF_POWER_DEVICE_STATE
4109
4110 //
4111 // List of dependent devices for usage notifications
4112 //
4114
4116
4117 //
4118 // Collection of FxQueryInterface objects
4119 //
4121
4123
4125
4127
4129
4130 //
4131 // Indicate the types of special files which are supported.
4132 //
4134
4135 //
4136 // Track the number of special file notifications
4137 // (ie. paging file, crash dump file, and hibernate file).
4138 //
4140
4141 //
4142 // ULONG and not a BOOLEAN so the driver can match nest calls to
4143 // WdfDeviceSetStaticStopRemove without having to track the count on their
4144 // own.
4145 //
4147
4148 //
4149 // All 3 state machine engines
4150 //
4154
4156
4157 //
4158 // Data shared between the power and power policy machines determining how
4159 // we handle wait wake irps.
4160 //
4162
4163 //
4164 // Interface for managing the difference between D3hot and D3cold.
4165 //
4167
4168protected:
4169 //
4170 // Event that is set when processing a remove device is complete
4171 //
4173
4174 //
4175 // Count of children we need to fully remove when the parent (this package)
4176 // is being removed.
4177 //
4179
4180 //
4181 // DEVICE_WAKE_DEPTH - Indicates the lowest D-state that can successfully
4182 // generate a wake signal from a particular S-state. The array is tightly-
4183 // packed, with index 0 corresponding to PowerSystemWorking.
4184 //
4186
4187 // SYSTEM_POWER_STATE
4189
4190 // WDF_DEVICE_FAILED_ACTION
4192
4193 //
4194 // Set the event which indicates that the pnp state machine is done outside
4195 // of the state machine so that we can drain any remaining state machine
4196 // events in the removing thread before signaling the event.
4197 //
4199
4200 //
4201 // Interface to queue a work item to the devnode's power thread. Any device
4202 // in the stack can export the power thread, but it must be the lowest
4203 // device in the stack capable of doing so. This would always be a WDF
4204 // enumerated PDO, but could theoretically be any PDO. If the PDO does
4205 // support this interface, WDF will try to export the interface in a filter
4206 // or FDO.
4207 //
4208 // This export is not publicly defined because this is an internal WDF
4209 // implementation detail where we want to use as few threads as possible,
4210 // but still guarantee that non power pagable devices can operate a passive
4211 // level and not be blocked by paging I/O (which eliminates using work items).
4212 //
4214
4216
4217 //
4218 // Translated resources
4219 //
4221
4222 //
4223 // Raw resources
4224 //
4226
4228
4229 //
4230 // Bus information for any enumerated children
4231 //
4233
4234 //
4235 // Number of times we have tried to enumerate children but failed
4236 //
4238
4239 //
4240 // The power action corresponding to the system power transition
4241 //
4243
4244 //
4245 // TRUE once the entire stack has been queried for the caps
4246 //
4248
4250
4251 //
4252 // if FALSE, there is no power thread available on the devnode currently
4253 // and a work item should be enqueued. if TRUE, there is a power thread
4254 // and the callback should be enqueued to it.
4255 //
4257
4258 //
4259 // If TRUE, we guarantee that in *all* cases that the ReleaseHardware
4260 // callback for the current device is invoked only after all descendent
4261 // devices have already been removed. We do this by ensuring that
4262 // ReleaseHardware is only ever invoked when there is a PNP IRP such as
4263 // remove, surprise-remove or stop is pending in the device. PNP already
4264 // ensures that it sends us that IRP only after all child devices have
4265 // processed the corresponding IRP in their stacks.
4266 //
4267 // Even if FALSE, in *most* cases, the ReleaseHardware callback of the
4268 // current device should still be invoked only after all descendent devices
4269 // have already been stopped/removed. However, in some failure paths we
4270 // might invoke the ReleaseHardware callback of the current device before
4271 // all descendent devices have been stopped. In these cases, we do not wait
4272 // for the surprise-remove IRP sent as a result of the failure in order to
4273 // invoke ReleaseHardware. Instead, we invoke it proactively.
4274 //
4275 // The default value is FALSE.
4276 //
4278
4279 //
4280 // GUID for querying for a power thread down the stack
4281 //
4283
4284#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
4285 //
4286 // Interrupt APIs for Vista and forward
4287 //
4290 //
4291 // Interrupt APIs for Windows 8 and forward
4292 //
4295#endif
4296
4297private:
4298
4299 //
4300 // For user mode we need to preallocate event since its initialization can
4301 // fail
4302 //
4303#if (FX_CORE_MODE==FX_CORE_USER_MODE)
4306#endif
4307
4309
4311
4312 //
4313 // Number of interrupts that are declared to be capable
4314 // of waking from low power
4315 //
4317
4318 //
4319 // Count that keeps track of the number of wake interrupt
4320 // machines that have acknowledged back an event queued
4321 // in to them by the device level PnP/Power code
4322 //
4324
4325 //
4326 // Keeps track of whether the last system wake was due to
4327 // a wake interrupt, so that we can report this device as
4328 // the source of wake to the power manager
4329 //
4331
4332 //
4333 // If TRUE, do not disconnect wake interrupts even if there is no
4334 // pended IRP_MN_WAIT_WAKE. This works around a race condition between
4335 // the wake interrupt firing (and the wake ISR running) and the device
4336 // powering down. This flag is set when we are in a wake-enabled device
4337 // powering down path and is cleared when the device is powered up again.
4338 //
4340
4341 //
4342 // If TRUE, the PNP State has reached PnpEventStarted at least once.
4343 //
4345
4346 //
4347 // Non NULL when this device is exporting the power thread interface. This
4348 // would be the lowest device in the stack that supports this interface.
4349 //
4351
4353
4355
4356 //
4357 // The current pnp state changing irp in the stack that we have pended to
4358 // process in the pnp state machine
4359 //
4361
4362 //
4363 // The current system power irp in the stack that we have pended to process
4364 // in the power state machine
4365 //
4367
4368 //
4369 // The current device power irp in the stack that we have pended to process
4370 // in the power state machine
4371 //
4373
4375
4377
4379
4384
4407
4423
4492
4510
4511#if FX_STATE_MACHINE_VERIFY
4512 //
4513 // Array of possible states that can be returned by state entry functions
4514 //
4515 static const PNP_STATE_ENTRY_FN_RETURN_STATE_TABLE m_WdfPnpStateEntryFunctionReturnStates[];
4516 static const POWER_STATE_ENTRY_FN_RETURN_STATE_TABLE m_WdfPowerStateEntryFunctionReturnStates[];
4517 static const PWR_POL_STATE_ENTRY_FN_RETURN_STATE_TABLE m_WdfPwrPolStateEntryFunctionReturnStates[];
4518#endif // FX_STATE_MACHINE_VERIFY
4519
4520 //
4521 // Names for registry values in which we will store the beginning of the
4522 // restart time period, the number of restart attempts in that period, and
4523 // if the device successfully started.
4524 //
4528
4529 //
4530 // Time between successive restarts in which we will attempt to restart a
4531 // stack again. Expressed in seconds.
4532 //
4534
4535 //
4536 // Number of times in the restart time period in which we will attempt a
4537 // restart.
4538 //
4540
4541 //
4542 // Shove the function pointers to the end of the structure so that when
4543 // we dump the structure while debugging, the less pertinent info is at the
4544 // bottom.
4545 //
4546public:
4550
4555
4558
4562};
4563
4564__inline
4565VOID
4567 __inout FxPkgPnp* PkgPnp
4568 )
4569{
4570 if (m_SetRemovedEvent) {
4572 PkgPnp->SignalDeviceRemovedEvent();
4573 return;
4574 }
4575
4576 //
4577 // Process any irp that should be sent down the stack/forgotten.
4578 //
4579 if (m_FireAndForgetIrp != NULL) {
4581
4583 (void) PkgPnp->FireAndForgetIrp(&irp);
4584 }
4585
4586 if (m_DeleteObject) {
4587 PkgPnp->ProcessDelayedDeletion();
4588 }
4589
4590 if (m_Event != NULL) {
4591 m_Event->Set();
4592 }
4593}
4594
4595#endif // _FXPKGPNP_H_
#define SaveState(State)
unsigned char BOOLEAN
unsigned int UINT32
Type
Definition: Type.h:7
#define VOID
Definition: acefi.h:82
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
const struct winhelp_callbacks Callbacks
Definition: callback.c:161
Definition: File.h:16
Definition: fxirp.hpp:28
SYSTEM_POWER_STATE_CONTEXT GetParameterPowerSystemPowerStateContext()
Definition: fxirpum.cpp:671
VOID SetStatus(__in NTSTATUS Status)
Definition: fxirpum.cpp:457
MdIrp GetIrp(VOID)
Definition: fxirpum.cpp:15
DEVICE_POWER_STATE GetParameterPowerStateDeviceState()
Definition: fxirpum.cpp:695
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
static WDF_DEVICE_POWER_STATE PowerStartingChild(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpInitOtherStates[]
Definition: fxpkgpnp.hpp:4385
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeCompletePowerUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStopping(__inout FxPkgPnp *This)
MdIrp m_PendingPnPIrp
Definition: fxpkgpnp.hpp:4360
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingD0OtherStates[]
Definition: fxpkgpnp.hpp:4450
static WDF_SPECIAL_FILE_TYPE _UsageToSpecialType(__in DEVICE_USAGE_NOTIFICATION_TYPE Type)
Definition: fxpkgpnp.hpp:3202
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeCompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4471
VOID SetInternalFailure(VOID)
Definition: fxpkgpnp.cpp:4856
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceIdleSleeping(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventRestartReleaseHardware(__inout FxPkgPnp *This)
BOOLEAN IsSxWakeEnabled(VOID)
Definition: fxpkgpnp.hpp:3672
FxCmResList * GetTranslatedResourceList(VOID)
Definition: fxpkgpnp.hpp:3796
static WDF_DEVICE_POWER_STATE PowerDxSurpriseRemovedPowerUp(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpQueriedRemovingOtherStates[]
Definition: fxpkgpnp.hpp:4393
static CPPOWER_POLICY_STATE_TABLE GetPowerPolicyTableEntry(__in WDF_DEVICE_POWER_POLICY_STATE State)
Definition: fxpkgpnp.hpp:2871
static WDF_DEVICE_POWER_STATE PowerReportPowerDownFailed(__inout FxPkgPnp *This)
VOID AddInterruptObject(__in FxInterrupt *Interrupt)
Definition: fxpkgpnp.cpp:5928
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingPoweringDown(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnable(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventHardwareAvailablePowerPolicyFailed(__inout FxPkgPnp *This)
BOOLEAN PowerDmaEnableAndScan(__in BOOLEAN ImplicitPowerUp)
static MdCancelRoutineType _PowerWaitWakeCancelRoutine
Definition: fxpkgpnp.hpp:2736
static WDF_DEVICE_POWER_STATE PowerD0DisarmingWakeAtBusNP(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolCancelingWakeForSystemSleepWakeCanceledOtherStates[]
Definition: fxpkgpnp.hpp:4446
VOID RemoveUsageDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4742
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownNotProcessed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerD0ArmedForWake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerNotifyingD0ExitToWakeInterruptsNP(__inout FxPkgPnp *This)
VOID QueueToPowerThread(__in PWORK_QUEUE_ITEM WorkItem)
Definition: fxpkgpnp.hpp:3516
FxPnpStateCallback * m_PnpStateCallbacks
Definition: fxpkgpnp.hpp:4374
VOID PnpCheckAssumptions(VOID)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemAsleepWakeArmedOtherStates[]
Definition: fxpkgpnp.hpp:4435
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerRemoved(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakePowerDownFailedWakeCanceled(__inout FxPkgPnp *This)
ULONG m_PnpCapsUINumber
Definition: fxpkgpnp.hpp:4091
BOOLEAN IsPresentPendingPnpIrp(VOID)
Definition: fxpkgpnp.hpp:3004
FxCmResList * m_Resources
Definition: fxpkgpnp.hpp:4220
VOID ProcessDelayedDeletion(VOID)
Definition: fxpkgpnp.cpp:1293
VOID PowerPolicyPostParentToD0ToChildren(VOID)
static const POWER_EVENT_TARGET_STATE m_PowerD0BusWakeOwnerNPOtherStates[]
Definition: fxpkgpnp.hpp:4411
_Must_inspect_result_ NTSTATUS AllocateEnumInfo(VOID)
Definition: fxpkgpnp.cpp:4920
FxPnpDeviceUsageNotificationEx m_DeviceUsageNotificationEx
Definition: fxpkgpnp.hpp:4548
static WDF_DEVICE_PNP_STATE PnpEventInitSurpriseRemoved(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemAsleepWakeArmedNPOtherStates[]
Definition: fxpkgpnp.hpp:4436
static _Must_inspect_result_ NTSTATUS _PnpCancelRemoveDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2026
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemAsleepNoWake(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingArmedWakeInterruptFiredOtherStates[]
Definition: fxpkgpnp.hpp:4507
VOID ChildListNotifyRemove(__inout PLONG PendingCount)
Definition: fxpkgpnp.cpp:4999
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoD0States[]
Definition: fxpkgpnp.hpp:4500
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerRemovedStates[]
Definition: fxpkgpnp.hpp:4506
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppingPoweringDownStates[]
Definition: fxpkgpnp.hpp:4505
static WDF_DEVICE_POWER_STATE PowerWakePendingNP(__inout FxPkgPnp *This)
VOID AddQueryInterface(__in FxQueryInterface *QI, __in BOOLEAN Lock)
Definition: fxpkgpnp.cpp:5017
VOID RegisterPowerPolicyCallbacks(__in PWDF_POWER_POLICY_EVENT_CALLBACKS Callbacks)
Definition: fxpkgpnp.cpp:2715
PFN_IO_REPORT_INTERRUPT_INACTIVE m_IoReportInterruptInactive
Definition: fxpkgpnp.hpp:4294
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableWakeCanceled(__inout FxPkgPnp *This)
BOOLEAN HasMultipleInterrupts(VOID)
Definition: fxpkgpnp.hpp:4066
_Must_inspect_result_ NTSTATUS QueryForCapabilities(VOID)
Definition: fxpkgpnp.cpp:1675
static _Must_inspect_result_ NTSTATUS _PnpRemoveDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2275
BOOLEAN PowerGotoDxIoStoppedNP(VOID)
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIoFailed(__inout FxPkgPnp *This)
FxSystemThread * m_PowerThread
Definition: fxpkgpnp.hpp:4350
_Must_inspect_result_ NTSTATUS HandleQueryBusInformation(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:947
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakePowerDownNotProcessed(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventRemovedChildrenRemoved(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledWakeCanceledNPOtherStates[]
Definition: fxpkgpnp.hpp:4467
VOID PowerCompleteWakeRequestFromWithinMachine(__in NTSTATUS Status)
friend FxPowerPolicyMachine
Definition: fxpkgpnp.hpp:492
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStarting(__inout FxPkgPnp *This)
static VOID STDCALL _PowerThreadInterfaceDereference(__inout PVOID Context)
Definition: fxpkgpnp.cpp:5292
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStarted(__inout FxPkgPnp *This)
BOOLEAN IsS0IdleSystemManaged(VOID)
Definition: fxpkgpnp.hpp:3645
virtual VOID ReleaseReenumerationInterface(VOID)=0
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeRevertArmWakeNP(__inout FxPkgPnp *This)
VOID __inline PowerPolicyDisarmWakeFromSx(VOID)
ULONG m_InterruptObjectCount
Definition: fxpkgpnp.hpp:4308
static const PNP_EVENT_TARGET_STATE m_PnpStartedStoppingOtherStates[]
Definition: fxpkgpnp.hpp:4397
static const PNP_EVENT_TARGET_STATE m_PnpStoppedOtherStates[]
Definition: fxpkgpnp.hpp:4395
_Must_inspect_result_ NTSTATUS CreatePowerThread(VOID)
Definition: fxpkgpnp.cpp:5125
static WDF_DEVICE_PNP_STATE PnpEventQueryCanceled(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventQueryStopStaticCheck(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingNoWakeDxRequestFailed(__inout FxPkgPnp *This)
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNPOverload(VOID)=0
UCHAR m_BusEnumRetries
Definition: fxpkgpnp.hpp:4237
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoDxStates[]
Definition: fxpkgpnp.hpp:4497
SINGLE_LIST_ENTRY m_DeviceInterfaceHead
Definition: fxpkgpnp.hpp:4126
FxWaitLockInternal m_QueryInterfaceLock
Definition: fxpkgpnp.hpp:4120
virtual WDF_DEVICE_PNP_STATE PnpEventFdoRemovedOverload(VOID)=0
FxSelfManagedIoMachine * m_SelfManagedIoMachine
Definition: fxpkgpnp.hpp:4155
static WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNP(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PnpPowerReferenceDuringQueryPnp(VOID)
Definition: fxpkgpnp.cpp:5351
VOID PowerSendPowerDownFailureEvent(__in FxPowerDownType Type)
VOID SetPendingDevicePowerIrp(__inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:3050
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerObjectCreatedStates[]
Definition: fxpkgpnp.hpp:4493
LONG m_SpecialFileCount[WdfSpecialFileMax-1]
Definition: fxpkgpnp.hpp:4139
_Must_inspect_result_ NTSTATUS PnpDeviceUsageNotification(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:3867
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStartedCancelStop(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolS0WakeCompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4455
FxCmResList * m_ResourcesRaw
Definition: fxpkgpnp.hpp:4225
static const PNP_EVENT_TARGET_STATE m_PnpRemovedPdoWaitOtherStates[]
Definition: fxpkgpnp.hpp:4389
PNP_BUS_INFORMATION m_BusInformation
Definition: fxpkgpnp.hpp:4232
BOOLEAN PowerIsWakeRequestPresent(VOID)
Definition: fxpkgpnp.hpp:2672
_Must_inspect_result_ NTSTATUS PnpEnableInterfacesAndRegisterWmi(VOID)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWakeCapableDeviceIdleOtherStates[]
Definition: fxpkgpnp.hpp:4440
FxRelatedDeviceList * m_UsageDependentDeviceList
Definition: fxpkgpnp.hpp:4113
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapablePowerDownFailedWakeInterruptArrivedOtherStates[]
Definition: fxpkgpnp.hpp:4490
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepNeedWakeCompletePowerUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingPoweringUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeQueryIdle(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakePoweredDownDisableIdleTimer(__inout FxPkgPnp *This)
VOID DisconnectInterruptNP(VOID)
PFN_IO_DISCONNECT_INTERRUPT_EX m_IoDisconnectInterruptEx
Definition: fxpkgpnp.hpp:4289
static WDF_DEVICE_POWER_STATE PowerD0DisarmingWakeAtBus(__inout FxPkgPnp *This)
static NTSTATUS _SxWakeSetItem(__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG DataItemId, __in ULONG InBufferSize, __in PVOID InBuffer)
Definition: fxpkgpnp.cpp:3556
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStopping(__inout FxPkgPnp *This)
VOID PnpPowerPolicySurpriseRemove(VOID)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingDecideS0Wake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerD0NP(__inout FxPkgPnp *This)
FxPowerStateCallback * m_PowerStateCallbacks
Definition: fxpkgpnp.hpp:4376
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedCancelTimer(__inout FxPkgPnp *This)
BOOLEAN m_ReleaseHardwareAfterDescendantsOnFailure
Definition: fxpkgpnp.hpp:4277
static VOID STDCALL _PowerThreadInterfaceReference(__inout PVOID Context)
Definition: fxpkgpnp.cpp:5262
BOOLEAN PowerPolicyCancelWaitWake(VOID)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeSucceededOtherStates[]
Definition: fxpkgpnp.hpp:4456
static WDF_DEVICE_POWER_STATE PowerSurpriseRemoved(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpStartedStoppingFailedOtherStates[]
Definition: fxpkgpnp.hpp:4398
static WDF_DEVICE_PNP_STATE PnpEventQueriedRemoving(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableWakeArrived(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventQueriedSurpriseRemove(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerReportPowerUpFailedDerefParent(__inout FxPkgPnp *This)
VOID ChildRemoved(VOID)
Definition: fxpkgpnp.hpp:3415
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0WakeDisarm(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingSendStatus(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStartedRemoving(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolObjectCreatedOtherStates[]
Definition: fxpkgpnp.hpp:4424
static WDF_DEVICE_POWER_STATE PowerD0SurpriseRemoved(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapablePowerDownFailedCancelWakeOtherStates[]
Definition: fxpkgpnp.hpp:4458
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeTriggeredS0(__inout FxPkgPnp *This)
LONG m_PendingChildCount
Definition: fxpkgpnp.hpp:4178
FxPowerMachine m_PowerMachine
Definition: fxpkgpnp.hpp:4152
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedPowerDown(__inout FxPkgPnp *This)
LONG m_PowerThreadInterfaceReferenceCount
Definition: fxpkgpnp.hpp:4352
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelingUsbSSForSystemSleep(__inout FxPkgPnp *This)
virtual VOID PowerParentPowerDereference(VOID)=0
BOOLEAN ShouldProcessPowerPolicyEventOnDifferentThread(__in KIRQL CurrentIrql, __in BOOLEAN CallerSpecifiedProcessingOnDifferentThread)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableCancelWakeOtherStates[]
Definition: fxpkgpnp.hpp:4461
static const PWCHAR m_RestartStartAchievedName
Definition: fxpkgpnp.hpp:4525
FxPnpDeviceD0Exit m_DeviceD0Exit
Definition: fxpkgpnp.hpp:4554
UCHAR m_SystemPowerAction
Definition: fxpkgpnp.hpp:4242
static WDF_DEVICE_PNP_STATE PnpEventFailedSurpriseRemoved(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolIdleCapableDeviceIdleOtherStates[]
Definition: fxpkgpnp.hpp:4427
_Must_inspect_result_ NTSTATUS __inline PowerReference(__in BOOLEAN WaitForD0, __in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
Definition: fxpkgpnp.hpp:3486
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoDxInDx(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerDNotZeroNPOtherStates[]
Definition: fxpkgpnp.hpp:4415
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelUsbSS(__inout FxPkgPnp *This)
virtual NTSTATUS ProcessRemoveDeviceOverload(FxIrp *Irp)=0
static const PNP_EVENT_TARGET_STATE m_PnpRestartHardwareAvailableOtherStates[]
Definition: fxpkgpnp.hpp:4406
static WDF_DEVICE_PNP_STATE PnpEventFailedIoStarting(__inout FxPkgPnp *This)
VOID PowerProcessEvent(__in FxPowerEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedWakeCapableOtherStates[]
Definition: fxpkgpnp.hpp:4439
SYSTEM_POWER_STATE PowerPolicyGetPendingSystemState(VOID)
Definition: fxpkgpnp.hpp:2808
FxWaitLockInternal m_DeviceInterfaceLock
Definition: fxpkgpnp.hpp:4124
MdIrp GetPendingPnpIrp(VOID)
Definition: fxpkgpnp.hpp:3042
static const PNP_EVENT_TARGET_STATE m_PnpHardwareAvailableOtherStates[]
Definition: fxpkgpnp.hpp:4387
static WDF_DEVICE_PNP_STATE PnpEventFailedInit(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PowerPolicySendDevicePowerRequest(__in DEVICE_POWER_STATE DeviceState, __in SendDeviceRequestAction Action)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedHardwareStarted(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppedOtherStates[]
Definition: fxpkgpnp.hpp:4482
static const PNP_EVENT_TARGET_STATE m_PnpStartedRemovingOtherStates[]
Definition: fxpkgpnp.hpp:4400
static const POWER_EVENT_TARGET_STATE m_DxSurpriseRemovedOtherStates[]
Definition: fxpkgpnp.hpp:4420
static WDF_DEVICE_POWER_STATE PowerGotoDxIoStoppedArmedForWake(__inout FxPkgPnp *This)
FxPnpDeviceQueryRemove m_DeviceQueryRemove
Definition: fxpkgpnp.hpp:4560
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWakeCapableUsbSSCompleted(__inout FxPkgPnp *This)
ULONG GetInterruptObjectCount(VOID)
Definition: fxpkgpnp.hpp:3812
BOOLEAN IsPowerPolicyOwner(VOID)
Definition: fxpkgpnp.hpp:3612
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceIdleStopping(__inout FxPkgPnp *This)
ULONG SetUsageNotificationFlags(__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in BOOLEAN InPath)
Definition: fxpkgpnp.cpp:4497
VOID SignalDeviceRemovedEvent(VOID)
Definition: fxpkgpnp.hpp:3782
BYTE m_SetDeviceRemoveProcessed
Definition: fxpkgpnp.hpp:4198
VOID PowerSendPowerUpFailureEvent(VOID)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolCancelingWakeForSystemSleepOtherStates[]
Definition: fxpkgpnp.hpp:4459
VOID PnpEnterNewState(__in WDF_DEVICE_PNP_STATE State)
BYTE m_FailedAction
Definition: fxpkgpnp.hpp:4191
static _Must_inspect_result_ NTSTATUS _PnpQueryRemoveDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1981
static const PNP_EVENT_TARGET_STATE m_PnpQueryStopPendingOtherStates[]
Definition: fxpkgpnp.hpp:4388
FxEnumerationInfo * m_EnumInfo
Definition: fxpkgpnp.hpp:4215
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingSendWake(__inout FxPkgPnp *This)
VOID ReleasePowerThread(VOID)
Definition: fxpkgpnp.cpp:5180
ULONG PowerPolicyGetCurrentWakeReason(VOID)
Definition: fxpkgpnp.cpp:5782
VOID PowerPolicyCompleteSystemPowerIrp(VOID)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledNPOtherStates[]
Definition: fxpkgpnp.hpp:4465
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleeping(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableWakeInterruptArrived(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoD0InD0States[]
Definition: fxpkgpnp.hpp:4501
_Must_inspect_result_ NTSTATUS AddUsageDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4685
static MdRequestPowerCompleteType _PowerPolDeviceWaitWakeComplete
Definition: fxpkgpnp.hpp:2751
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStartingSucceededStates[]
Definition: fxpkgpnp.hpp:4495
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppedRemoving(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeDisarm(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnableNP(__inout FxPkgPnp *This)
VOID PowerPolicyChildPoweredDown(VOID)
Definition: fxpkgpnp.hpp:3746
_Must_inspect_result_ NTSTATUS HandleQueryInterfaceForPowerThread(__inout FxIrp *Irp, __out PBOOLEAN CompleteRequest)
Definition: fxpkgpnp.cpp:1437
VOID SetPowerCaps(__in PWDF_DEVICE_POWER_CAPABILITIES PowerCapabilities)
Definition: fxpkgpnp.cpp:5683
BOOLEAN m_InternalFailure
Definition: fxpkgpnp.hpp:4249
VOID PnpPowerPolicyStart(VOID)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWokeDisarm(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerD0NPOtherStates[]
Definition: fxpkgpnp.hpp:4409
static WDF_DEVICE_POWER_STATE PowerCheckParentStateArmedForWake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerDxStoppedArmForWake(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PowerPolicyPowerDownForSx(__in DEVICE_POWER_STATE DxState, __in SendDeviceRequestAction Action)
Definition: fxpkgpnp.hpp:3996
static VOID _SetPowerCapState(__in ULONG Index, __in DEVICE_POWER_STATE State, __out PULONG Result)
Definition: fxpkgpnp.cpp:5616
static VOID _PowerProcessEventInner(__in FxPkgPnp *This, __in FxPostProcessInfo *Info, __in PVOID WorkerContext)
_Must_inspect_result_ NTSTATUS PowerPolicySendWaitWakeRequest(__in SYSTEM_POWER_STATE SystemState)
VOID SetUsageSupport(__in DEVICE_USAGE_NOTIFICATION_TYPE Usage, __in BOOLEAN Supported)
Definition: fxpkgpnp.hpp:3138
static WDF_DEVICE_PNP_STATE PnpEventRemoved(__inout FxPkgPnp *This)
BOOLEAN ShouldProcessPnpEventOnDifferentThread(__in KIRQL CurrentIrql, __in BOOLEAN CallerSpecifiedProcessingOnDifferentThread)
__drv_when(!NT_SUCCESS(return), __drv_arg(ResourcesMatched, _Must_inspect_result_)) NTSTATUS PnpPrepareHardware(__out PBOOLEAN ResourcesMatched)
BOOLEAN IsDevicePowerUpIrpPending(VOID)
Definition: fxpkgpnp.hpp:3113
BOOLEAN m_Failed
Definition: fxpkgpnp.hpp:4095
MxEvent * m_DeviceRemoveProcessed
Definition: fxpkgpnp.hpp:4172
static const PNP_EVENT_TARGET_STATE m_PnpStoppedWaitForStartCompletionOtherStates[]
Definition: fxpkgpnp.hpp:4396
BOOLEAN IsDefaultReleaseHardwareOrder(VOID)
Definition: fxpkgpnp.hpp:4054
VOID PnpDisableInterfaces(VOID)
virtual const PFN_PNP_POWER_CALLBACK * GetDispatchPower(VOID)=0
static WDF_DEVICE_PNP_STATE PnpEventInitQueryRemove(__inout FxPkgPnp *This)
static NTSTATUS _S0IdleQueryInstance(__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG OutBufferSize, __out PVOID OutBuffer, __out PULONG BufferUsed)
Definition: fxpkgpnp.cpp:3455
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceToD0OtherStates[]
Definition: fxpkgpnp.hpp:4437
_Must_inspect_result_ NTSTATUS HandleQueryDeviceRelations(__inout FxIrp *Irp, __inout FxRelatedDeviceList *List)
Definition: fxpkgpnp.cpp:996
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingSendWakeOtherStates[]
Definition: fxpkgpnp.hpp:4475
static WDF_DEVICE_POWER_STATE PowerInitialConnectInterruptFailed(__inout FxPkgPnp *This)
static MdRequestPowerCompleteType _PowerPolDevicePowerDownComplete
Definition: fxpkgpnp.hpp:2755
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCompletedPowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4462
_Must_inspect_result_ NTSTATUS PnpMatchResources(VOID)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakeCompletePowerDown(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerD0BusWakeOwner(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppingWaitForImplicitPowerDownStates[]
Definition: fxpkgpnp.hpp:4503
BOOLEAN PowerPolicyCanWakeFromSystemState(__in SYSTEM_POWER_STATE SystemState)
Definition: fxpkgpnp.hpp:2831
static WDF_DEVICE_POWER_STATE PowerD0Starting(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerInitialSelfManagedIoFailed(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedIdleCapableOtherStates[]
Definition: fxpkgpnp.hpp:4426
virtual BOOLEAN PnpSendStartDeviceDownTheStackOverload(VOID)=0
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoDx(__inout FxPkgPnp *This)
virtual const PFN_PNP_POWER_CALLBACK * GetDispatchPnp(VOID)=0
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableSendWake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingFailed(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerDxStoppedOtherStates[]
Definition: fxpkgpnp.hpp:4422
BOOLEAN IsUsageSupported(__in DEVICE_USAGE_NOTIFICATION_TYPE Usage)
Definition: fxpkgpnp.hpp:3130
VOID PowerPolicyProcessEventInner(__inout FxPostProcessInfo *Info)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingResetDevice(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredNoWakeCompletePowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4429
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDevicePowerRequestFailed(__inout FxPkgPnp *This)
NTSTATUS NotifyResourceObjectsDx(__in ULONG NotifyFlags)
Definition: fxpkgpnp.cpp:6104
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStartingFailed(__inout FxPkgPnp *This)
POWER_THREAD_INTERFACE m_PowerThreadInterface
Definition: fxpkgpnp.hpp:4213
static WDF_DEVICE_POWER_STATE PowerD0ArmedForWakeNP(__inout FxPkgPnp *This)
VOID RevokeDmaEnablerResources(__in FxDmaEnabler *Enabler)
Definition: fxpkgpnpkm.cpp:529
BYTE m_DevicePowerStateOld
Definition: fxpkgpnp.hpp:4108
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterruptFailed(__inout FxPkgPnp *This)
LONG AdjustUsageCount(__in DEVICE_USAGE_NOTIFICATION_TYPE Usage, __in BOOLEAN Add)
Definition: fxpkgpnp.hpp:3147
static WDF_DEVICE_POWER_STATE PowerGotoDxIoStoppedArmedForWakeNP(__inout FxPkgPnp *This)
PFN_IO_REPORT_INTERRUPT_ACTIVE m_IoReportInterruptActive
Definition: fxpkgpnp.hpp:4293
static NTSTATUS _SxWakeQueryInstance(__in CfxDevice *Device, __in FxWmiInstanceInternal *Instaace, __in ULONG OutBufferSize, __out PVOID OutBuffer, __out PULONG BufferUsed)
Definition: fxpkgpnp.cpp:3519
FxCREvent * m_PowerThreadEvent
Definition: fxpkgpnp.hpp:4354
static WDF_DEVICE_PNP_STATE PnpEventFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerInitialPowerUpFailedDerefParent(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWokeFromS0NotifyDriver(__inout FxPkgPnp *This)
FxPowerPolicyStateCallback * m_PowerPolicyStateCallbacks
Definition: fxpkgpnp.hpp:4378
VOID PowerPolicyChildrenCanPowerUp(VOID)
NTSTATUS UpdateWmiInstance(_In_ FxWmiInstanceAction Action, _In_ BOOLEAN ForS0Idle)
Definition: fxpkgpnpum.cpp:56
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolIoPresentArmedOtherStates[]
Definition: fxpkgpnp.hpp:4453
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterruptFailedNP(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventQueryStopPending(__inout FxPkgPnp *This)
VOID SetPendingPnpIrpStatus(__in NTSTATUS Status)
Definition: fxpkgpnp.hpp:3018
virtual WDF_DEVICE_PNP_STATE PnpGetPostRemoveState(VOID)=0
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize(VOID)
Definition: fxpkgpnp.cpp:1187
static WDF_DEVICE_POWER_STATE PowerGotoDxStopped(__inout FxPkgPnp *This)
virtual NTSTATUS QueryForPowerThread(VOID)=0
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredDecideUsbSS(__inout FxPkgPnp *This)
FxPnpMachine m_PnpMachine
Definition: fxpkgpnp.hpp:4151
static WDF_DEVICE_POWER_STATE PowerStartingCheckDeviceType(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceIdleReturnToActive(__inout FxPkgPnp *This)
VOID PowerConnectInterruptFailed(VOID)
SINGLE_LIST_ENTRY m_QueryInterfaceHead
Definition: fxpkgpnp.hpp:4122
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemAsleepWakeArmedNP(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStartedStopping(__inout FxPkgPnp *This)
static _Must_inspect_result_ NTSTATUS _PnpCancelStopDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1901
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingPoweredUp(__inout FxPkgPnp *This)
static DEVICE_USAGE_NOTIFICATION_TYPE _SpecialTypeToUsage(__in WDF_SPECIAL_FILE_TYPE Type)
Definition: fxpkgpnp.hpp:3187
MdIrp ClearPendingDevicePowerIrp(VOID)
Definition: fxpkgpnp.hpp:3069
static WDF_DEVICE_PNP_STATE PnpEventRestart(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpFailedIoStartingOtherStates[]
Definition: fxpkgpnp.hpp:4402
static WDF_DEVICE_POWER_STATE PowerGotoStopped(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PowerPolicyHandleSystemQueryPower(__in SYSTEM_POWER_STATE QueryState)
Definition: fxpkgpnp.cpp:3582
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingD0Failed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolRestartingFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerCheckParentStateNP(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppedStates[]
Definition: fxpkgpnp.hpp:4502
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedWakeSucceededCancelUsbSS(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownFailedUsbSS(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerStoppedCompleteDx(__inout FxPkgPnp *This)
static const PWCHAR m_RestartCountName
Definition: fxpkgpnp.hpp:4527
static WDF_DEVICE_POWER_STATE PowerD0StartingConnectInterrupt(__inout FxPkgPnp *This)
BOOLEAN PowerPolicyCancelUsbSSIfCapable(VOID)
static WDF_DEVICE_PNP_STATE PnpEventFailedStarted(__inout FxPkgPnp *This)
VOID PowerPolicyUpdateSystemWakeSource(__in FxIrp *Irp)
_Must_inspect_result_ NTSTATUS PowerPolicyCanChildPowerUp(__out PBOOLEAN PowerUp)
Definition: fxpkgpnp.hpp:3686
VOID ReadRegistrySxWake(__in PCUNICODE_STRING ValueName, __out BOOLEAN *Enabled)
Definition: fxpkgpnpkm.cpp:469
static WDF_DEVICE_POWER_STATE PowerDxStoppedDecideDxState(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceToD0(__inout FxPkgPnp *This)
FxPnpDeviceD0Entry m_DeviceD0Entry
Definition: fxpkgpnp.hpp:4551
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerDxStates[]
Definition: fxpkgpnp.hpp:4499
static WDF_DEVICE_POWER_STATE PowerCheckDeviceType(__inout FxPkgPnp *This)
FxSpinLockTransactionedList * m_DmaEnablerList
Definition: fxpkgpnp.hpp:4227
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedWakeInterruptFired(__inout FxPkgPnp *This)
VOID PnpCleanupForRemove(__in BOOLEAN GracefulRemove)
DEVICE_POWER_STATE PowerPolicyGetDeviceDeepestDeviceWakeState(__in SYSTEM_POWER_STATE SystemState)
Definition: fxpkgpnp.cpp:6440
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWokeFromS0UsbSS(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpRestartOtherStates[]
Definition: fxpkgpnp.hpp:4404
static WDF_DEVICE_PNP_STATE PnpEventEnableInterfaces(__inout FxPkgPnp *This)
virtual VOID DeleteSymbolicLinkOverload(BOOLEAN GracefulRemove)=0
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedOtherStates[]
Definition: fxpkgpnp.hpp:4478
static WDF_DEVICE_POWER_STATE PowerGotoDNotZero(__inout FxPkgPnp *This)
NTSTATUS FilterResourceRequirements(__in IO_RESOURCE_REQUIREMENTS_LIST **IoList)
Definition: fxpkgpnpkm.cpp:16
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownFailedCancelWake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemAsleepWakeArmed(__inout FxPkgPnp *This)
MxEvent m_RemoveEventUm
Definition: fxpkgpnp.hpp:4305
VOID PowerPolicySubmitUsbIdleNotification(VOID)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabledWakeCanceled(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolS0NoWakePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4431
static WDF_DEVICE_POWER_POLICY_STATE PowerPolPowerUpForSystemSleepNotSeen(__inout FxPkgPnp *This)
BOOLEAN m_AchievedStart
Definition: fxpkgpnp.hpp:4344
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeDisabled(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpInitQueryRemoveOtherStates[]
Definition: fxpkgpnp.hpp:4394
VOID PowerSendPowerDownEvents(__in FxPowerDownType Type)
friend FxPnpMachine
Definition: fxpkgpnp.hpp:490
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepNeedWake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerDxDisablingWakeAtBusNP(__inout FxPkgPnp *This)
MdIrp ClearPendingPnpIrp(VOID)
Definition: fxpkgpnp.hpp:3029
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingUnarmedOtherStates[]
Definition: fxpkgpnp.hpp:4430
static WDF_DEVICE_POWER_STATE PowerDxStoppedArmForWakeNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoD0(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_DxArmedForWakeNPOtherStates[]
Definition: fxpkgpnp.hpp:4417
VOID NotifyResourceobjectsToReleaseResources(VOID)
Definition: fxpkgpnp.cpp:5990
static const NOT_POWER_POLICY_OWNER_STATE_TABLE m_WdfNotPowerPolicyOwnerStates[]
Definition: fxpkgpnp.hpp:4383
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppingPoweringUpStates[]
Definition: fxpkgpnp.hpp:4504
static WDF_DEVICE_PNP_STATE PnpEventFailedPowerPolicyRemoved(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWakeCapableDeviceIdle(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventQueryRemoveStaticCheck(__inout FxPkgPnp *This)
VOID SetPnpCaps(__in PWDF_DEVICE_PNP_CAPABILITIES PnpCapabilities)
Definition: fxpkgpnp.cpp:5496
static WDF_DEVICE_PNP_STATE PnpEventQueryRemoveEnsureDeviceAwake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakeReturnToActive(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerUpFailed(__inout FxPkgPnp *This)
VOID CommitUsageNotification(__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in ULONG OldFlags)
Definition: fxpkgpnp.cpp:4614
static const PNP_EVENT_TARGET_STATE m_PnpFailedWaitForRemoveOtherStates[]
Definition: fxpkgpnp.hpp:4403
static WDF_DEVICE_POWER_STATE PowerWakingNP(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventFailedPowerDown(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventHardwareAvailable(__inout FxPkgPnp *This)
static const ULONG m_RestartTimePeriodMaximum
Definition: fxpkgpnp.hpp:4533
virtual NTSTATUS AskParentToRemoveAndReenumerate(VOID)=0
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedIdleCapable(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterruptNP(__inout FxPkgPnp *This)
VOID AddChildList(__in FxChildList *List)
Definition: fxpkgpnp.cpp:4970
static WDF_DEVICE_POWER_STATE PowerD0StartingDmaEnable(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeInterruptFiredOtherStates[]
Definition: fxpkgpnp.hpp:4508
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeArrivedOtherStates[]
Definition: fxpkgpnp.hpp:4460
MdIrp m_PendingSystemPowerIrp
Definition: fxpkgpnp.hpp:4366
BOOLEAN IsS0IdleUsbSSEnabled(VOID)
Definition: fxpkgpnp.hpp:3658
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolRestartingOtherStates[]
Definition: fxpkgpnp.hpp:4483
static WDF_DEVICE_PNP_STATE PnpEventInitQueryRemoveCanceled(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerD0BusWakeOwnerOtherStates[]
Definition: fxpkgpnp.hpp:4410
VOID WakeInterruptCreated(VOID)
Definition: fxpkgpnp.hpp:4074
static const POWER_EVENT_TARGET_STATE m_PowerD0OtherStates[]
Definition: fxpkgpnp.hpp:4408
virtual VOID PnpEventSurpriseRemovePendingOverload(VOID)
LONG GetPnpCapsInternal(VOID)
Definition: fxpkgpnp.cpp:5466
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingPowerDownNotProcessed(__inout FxPkgPnp *This)
static _Must_inspect_result_ NTSTATUS _PnpStopDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1945
BOOLEAN m_SpecialSupport[WdfSpecialFileMax-1]
Definition: fxpkgpnp.hpp:4133
BOOLEAN PowerPolicyIsWakeEnabled(VOID)
Definition: fxpkgpnp.cpp:5769
BOOLEAN __inline PowerPolicyShouldPropagateWakeStatusToChildren(VOID)
Definition: fxpkgpnp.hpp:3407
SYSTEM_POWER_STATE PowerPolicyGetDeviceDeepestSystemWakeState(VOID)
Definition: fxpkgpnp.hpp:2839
static WDF_DEVICE_POWER_STATE PowerGotoDxStoppedDisableInterruptNP(__inout FxPkgPnp *This)
VOID RemoveInterruptObject(__in FxInterrupt *Interrupt)
Definition: fxpkgpnp.cpp:5965
static WDF_DEVICE_POWER_STATE PowerCheckParentState(__inout FxPkgPnp *This)
static VOID _PowerSetSystemWakeSource(__in FxIrp *Irp)
static WDF_DEVICE_PNP_STATE PnpEventStartedCancelRemove(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStopped(__inout FxPkgPnp *This)
static _Must_inspect_result_ NTSTATUS _PnpQueryStopDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1850
static WDF_DEVICE_POWER_STATE PowerNotifyingD0ExitToWakeInterrupts(__inout FxPkgPnp *This)
BOOLEAN m_CapsQueried
Definition: fxpkgpnp.hpp:4247
BYTE m_DevicePowerState
Definition: fxpkgpnp.hpp:4105
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingNoWakeCompletePowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4473
MdIrp GetPendingSystemPowerIrp(VOID)
Definition: fxpkgpnp.hpp:3105
static WDF_DEVICE_POWER_STATE PowerGotoImplicitD3DisarmWakeAtBus(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresence(__inout FxPkgPnp *This)
VOID NotPowerPolicyOwnerEnterNewState(__in WDF_DEVICE_POWER_POLICY_STATE NewState)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolRemoved(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerInitialPowerUpFailed(__inout FxPkgPnp *This)
LONG GetPnpStateInternal(VOID)
Definition: fxpkgpnp.cpp:5433
VOID PnpPowerPolicyRemove(VOID)
static WDF_DEVICE_PNP_STATE PnpEventQueryStopEnsureDeviceAwake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedWakeCapableCancelTimerForSleep(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakePowerDownFailed(__inout FxPkgPnp *This)
VOID PowerPolicyBlockChildrenPowerUp(VOID)
Definition: fxpkgpnp.hpp:4017
VOID RemoveDmaEnabler(__in FxDmaEnabler *Enabler)
Definition: fxpkgpnpkm.cpp:289
static WDF_DEVICE_POWER_STATE PowerFinalPowerDownFailed(__inout FxPkgPnp *This)
VOID CleanupStateMachines(__in BOOLEAN ClenaupPnp)
Definition: fxpkgpnp.cpp:2066
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingCancelWake(__inout FxPkgPnp *This)
FxPowerCaps m_PowerCaps
Definition: fxpkgpnp.hpp:4093
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingSucceeded(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemSleepNeedWakeCompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4434
VOID __inline PowerDereference(__in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
Definition: fxpkgpnp.hpp:3498
VOID SetSpecialFileSupport(__in WDF_SPECIAL_FILE_TYPE FileType, __in BOOLEAN Supported)
Definition: fxpkgpnp.cpp:1307
VOID GetPnpState(__out PWDF_DEVICE_STATE State)
Definition: fxpkgpnp.cpp:5549
virtual WDF_DEVICE_PNP_STATE PnpEventEjectHardwareOverload(VOID)=0
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnableFailedNP(__inout FxPkgPnp *This)
VOID PnpPowerDereferenceSelf(VOID)
Definition: fxpkgpnp.cpp:5382
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableUsbSSOtherStates[]
Definition: fxpkgpnp.hpp:4443
static WDF_DEVICE_POWER_STATE PowerUpFailedDerefParentNP(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpRestartingOtherStates[]
Definition: fxpkgpnp.hpp:4390
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStartingFailedStates[]
Definition: fxpkgpnp.hpp:4496
_Must_inspect_result_ NTSTATUS AddRemovalDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4753
static NTSTATUS _S0IdleSetItem(__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG DataItemId, __in ULONG InBufferSize, __in PVOID InBuffer)
Definition: fxpkgpnp.cpp:3494
_Must_inspect_result_ NTSTATUS HandleQueryBusRelations(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:758
BOOLEAN PowerDmaPowerDown(VOID)
static const POWER_EVENT_TARGET_STATE m_PowerD0ArmedForWakeNPOtherStates[]
Definition: fxpkgpnp.hpp:4413
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedPowerUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDxArmedForWakeNP(__inout FxPkgPnp *This)
VOID PowerPolicyCancelUsbSS(VOID)
static WDF_DEVICE_PNP_STATE PnpEventQueryRemoveAskDriver(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterrupt(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedQueryIdle(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWaking(__inout FxPkgPnp *This)
ULONG m_PnpCapsAddress
Definition: fxpkgpnp.hpp:4090
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolS0NoWakeCompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4432
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeWakeArrivedNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableUndoPowerDown(__inout FxPkgPnp *This)
static const PNP_STATE_TABLE m_WdfPnpStates[]
Definition: fxpkgpnp.hpp:4380
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeDisarmNP(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWokeFromS0OtherStates[]
Definition: fxpkgpnp.hpp:4447
LONG GetUsageCount(__in __range(1, 4) ULONG Usage)
Definition: fxpkgpnp.hpp:3161
BOOLEAN PowerIndicateWaitWakeStatus(__in NTSTATUS WaitWakeStatus)
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIoNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDxFailed(__inout FxPkgPnp *This)
VOID DeleteDevice(VOID)
Definition: fxpkgpnp.cpp:2249
FxPnpDeviceQueryStop m_DeviceQueryStop
Definition: fxpkgpnp.hpp:4559
VOID PowerEnterNewState(__in WDF_DEVICE_POWER_STATE State)
static WDF_DEVICE_POWER_STATE PowerGotoDxNPFailed(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeRevertArmWakeNPOtherStates[]
Definition: fxpkgpnp.hpp:4487
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCheckPowerPageable(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingResetDeviceFailed(__inout FxPkgPnp *This)
POWER_ACTION GetSystemPowerAction(VOID)
Definition: fxpkgpnp.hpp:3768
static WDF_DEVICE_PNP_STATE PnpEventSurpriseRemoved(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeTriggeredS0OtherStates[]
Definition: fxpkgpnp.hpp:4469
VOID RemoveChildList(__in FxChildList *List)
Definition: fxpkgpnp.cpp:4983
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingResetDeviceOtherStates[]
Definition: fxpkgpnp.hpp:4448
static VOID _PnpProcessEventInner(__inout FxPkgPnp *This, __inout FxPostProcessInfo *Info, __in PVOID WorkerContext)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceD0PowerRequestFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerPowerFailedPowerDown(__inout FxPkgPnp *This)
static VOID _PowerThreadEnqueue(__in PVOID Context, __in PWORK_QUEUE_ITEM WorkItem)
Definition: fxpkgpnp.hpp:3944
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabled(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedUsbSS(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeWakeArrived(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerUpFailedNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeSucceeded(__inout FxPkgPnp *This)
_Must_inspect_result_ BOOLEAN PowerDmaPowerUp(VOID)
static WDF_DEVICE_POWER_STATE PowerWakePending(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDNotZeroIoStopped(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingResetDeviceCompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4449
static WDF_DEVICE_POWER_STATE PowerGotoD3Stopped(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS ValidateInterruptResourceCm(__in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResourceRaw, __in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResource, __in PWDF_INTERRUPT_CONFIG Configuration)
BOOLEAN m_WakeInterruptsKeepConnected
Definition: fxpkgpnp.hpp:4339
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoDxInDxStates[]
Definition: fxpkgpnp.hpp:4498
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakePowerDown(__inout FxPkgPnp *This)
static const PNP_EVENT_TARGET_STATE m_PnpEjectFailedOtherStates[]
Definition: fxpkgpnp.hpp:4399
VOID PnpAssignInterruptsSyncIrql(VOID)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakeUndoPowerDown(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStartingFromStopped(__inout FxPkgPnp *This)
static NTSTATUS _S0IdleSetInstance(__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG InBufferSize, __in PVOID InBuffer)
Definition: fxpkgpnp.cpp:3471
VOID PowerPolicySetSxWakeState(__in BOOLEAN State)
Definition: fxpkgpnp.cpp:3720
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceToD0CompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4438
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeWakeArrivedNPOtherStates[]
Definition: fxpkgpnp.hpp:4476
static WDF_DEVICE_POWER_POLICY_STATE PowerPolIoPresentArmedWakeCanceled(__inout FxPkgPnp *This)
BOOLEAN PnpCheckAndIncrementRestartCount(VOID)
NTSTATUS PowerPolicySetS0IdleSettings(__in PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings)
Definition: fxpkgpnp.cpp:2778
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedStoppingCancelUsbSS(__inout FxPkgPnp *This)
static NTSTATUS _SxWakeSetInstance(__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG InBufferSize, __in PVOID InBuffer)
Definition: fxpkgpnp.cpp:3535
virtual WDF_DEVICE_PNP_STATE PnpEventPdoRemovedOverload(VOID)=0
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolIoPresentArmedWakeCanceledOtherStates[]
Definition: fxpkgpnp.hpp:4454
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledOtherStates[]
Definition: fxpkgpnp.hpp:4464
static WDF_DEVICE_POWER_STATE PowerCheckParentStateArmedForWakeNP(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledWakeCanceledOtherStates[]
Definition: fxpkgpnp.hpp:4466
FxCmResList * GetRawResourceList(VOID)
Definition: fxpkgpnp.hpp:3804
VOID AckPendingWakeInterruptOperation(__in BOOLEAN ProcessPowerEventOnDifferentThread)
Definition: fxpkgpnp.cpp:6211
static CPPNP_STATE_TABLE GetPnpTableEntry(__in WDF_DEVICE_PNP_STATE State)
Definition: fxpkgpnp.hpp:2853
static CPPOWER_STATE_TABLE GetPowerTableEntry(__in WDF_DEVICE_POWER_STATE State)
Definition: fxpkgpnp.hpp:2862
static WDF_DEVICE_POWER_STATE PowerDNotZeroNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDxArmedForWake(__inout FxPkgPnp *This)
static const GUID GUID_POWER_THREAD_INTERFACE
Definition: fxpkgpnp.hpp:4282
FxPnpDeviceReleaseHardware m_DeviceReleaseHardware
Definition: fxpkgpnp.hpp:4557
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIo(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS CreatePowerThreadIfNeeded(VOID)
SharedPowerData m_SharedPower
Definition: fxpkgpnp.hpp:4161
static MdCompletionRoutineType _PowerPolicyUsbSelectiveSuspendCompletionRoutine
Definition: fxpkgpnp.hpp:2805
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingDisarmWakeWakeCanceled(__inout FxPkgPnp *This)
VOID RemoveRemovalDevice(__in MdDeviceObject DependentDevice)
Definition: fxpkgpnp.cpp:4816
virtual NTSTATUS PowerCheckParentOverload(BOOLEAN *ParentOn)=0
FxPnpDeviceUsageNotification m_DeviceUsageNotification
Definition: fxpkgpnp.hpp:4547
NTSTATUS ReadStateFromRegistry(_In_ PCUNICODE_STRING ValueName, _Out_ PULONG Value)
Definition: fxpkgpnpum.cpp:105
BOOLEAN SupportsWakeInterrupt(VOID)
Definition: fxpkgpnp.hpp:3620
static WDF_DEVICE_POWER_STATE PowerEnablingWakeAtBusNP(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerStoppedOtherStates[]
Definition: fxpkgpnp.hpp:4421
static const POWER_STATE_TABLE m_WdfPowerStates[]
Definition: fxpkgpnp.hpp:4381
_Must_inspect_result_ NTSTATUS NotifyResourceObjectsD0(__in ULONG NotifyFlags)
Definition: fxpkgpnp.cpp:6055
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedDisarm(__inout FxPkgPnp *This)
NTSTATUS RegisterPowerPolicyWmiInstance(__in const GUID *Guid, __in FxWmiInstanceInternalCallbacks *Callbacks, __out FxWmiInstanceInternal **Instance)
Definition: fxpkgpnp.cpp:2738
VOID SetPnpState(__in PWDF_DEVICE_STATE State)
Definition: fxpkgpnp.cpp:5579
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepPowerRequestFailed(__inout FxPkgPnp *This)
MdIrp ClearPendingSystemPowerIrp(VOID)
Definition: fxpkgpnp.hpp:3092
static WDF_DEVICE_POWER_STATE PowerInitialDmaEnableFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventRemovedPdoSurpriseRemoved(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingCancelWakeOtherStates[]
Definition: fxpkgpnp.hpp:4484
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingResetDeviceCompletePowerUp(__inout FxPkgPnp *This)
static const POWER_POLICY_STATE_TABLE m_WdfPowerPolicyStates[]
Definition: fxpkgpnp.hpp:4382
static const PNP_EVENT_TARGET_STATE m_PnpQueryRemovePendingOtherStates[]
Definition: fxpkgpnp.hpp:4392
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStarted(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartingOtherStates[]
Definition: fxpkgpnp.hpp:4425
static WDF_DEVICE_POWER_STATE PowerD0StartingStartSelfManagedIo(__inout FxPkgPnp *This)
FxPnpDevicePrepareHardware m_DevicePrepareHardware
Definition: fxpkgpnp.hpp:4556
ULONG m_WakeInterruptCount
Definition: fxpkgpnp.hpp:4316
static MdRequestPowerCompleteType _PowerPolDevicePowerUpComplete
Definition: fxpkgpnp.hpp:2759
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWokeDisarmNP(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS DispatchWaitWake(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2431
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolRemovedOtherStates[]
Definition: fxpkgpnp.hpp:4488
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepFromDeviceWaitingUnarmed(__inout FxPkgPnp *This)
virtual BOOLEAN Dispose(VOID)
Definition: fxpkgpnp.cpp:284
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStartingStates[]
Definition: fxpkgpnp.hpp:4494
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingArmedWakeInterruptFiredDuringPowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4491
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableCancelWake(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingDisarmWakeOtherStates[]
Definition: fxpkgpnp.hpp:4451
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedWaitForIdleTimeoutOtherStates[]
Definition: fxpkgpnp.hpp:4479
VOID ReadRegistryS0Idle(__in PCUNICODE_STRING ValueName, __out BOOLEAN *Enabled)
Definition: fxpkgpnpkm.cpp:376
VOID PnpEventRemovedCommonCode(VOID)
static const PNP_EVENT_TARGET_STATE m_PnpStartedOtherStates[]
Definition: fxpkgpnp.hpp:4391
_Must_inspect_result_ NTSTATUS AllocateDmaEnablerList(VOID)
Definition: fxpkgpnpkm.cpp:241
VOID PnpProcessEvent(__in FxPnpEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
BYTE m_SystemPowerState
Definition: fxpkgpnp.hpp:4102
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingD0(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDNotZeroIoStoppedNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoD0InD0(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStoppedWaitForStartCompletion(__inout FxPkgPnp *This)
LIST_ENTRY m_InterruptListHead
Definition: fxpkgpnp.hpp:4310
VOID PnpFinishProcessingIrp(__in BOOLEAN IrpMustBePresent=TRUE)
_Must_inspect_result_ NTSTATUS ValidateCmResource(__inout PCM_PARTIAL_RESOURCE_DESCRIPTOR *CmResourceRaw, __inout PCM_PARTIAL_RESOURCE_DESCRIPTOR *CmResource)
FxPnpDeviceD0ExitPreInterruptsDisabled m_DeviceD0ExitPreInterruptsDisabled
Definition: fxpkgpnp.hpp:4553
static const PWCHAR m_RestartStartTimeName
Definition: fxpkgpnp.hpp:4526
_Must_inspect_result_ NTSTATUS PnpPowerReferenceSelf(VOID)
Definition: fxpkgpnp.cpp:5322
ULONG m_DeviceStopCount
Definition: fxpkgpnp.hpp:4146
static WDF_DEVICE_POWER_POLICY_STATE PowerPolPowerUpForSystemSleepFailed(__inout FxPkgPnp *This)
FxPnpDeviceSurpriseRemoval m_DeviceSurpriseRemoval
Definition: fxpkgpnp.hpp:4561
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDown(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingD0CancelUsbSS(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingNoWakePowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4472
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeFailedOtherStates[]
Definition: fxpkgpnp.hpp:4457
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStarting(__inout FxPkgPnp *This)
static VOID _PowerPolicyProcessEventInner(__inout FxPkgPnp *This, __inout FxPostProcessInfo *Info, __in PVOID WorkerContext)
BOOLEAN HasPowerThread(VOID)
Definition: fxpkgpnp.hpp:3508
NTSTATUS UpdateWmiInstanceForSxWake(__in FxWmiInstanceAction Action)
Definition: fxpkgpnpum.cpp:281
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableSendWakeOtherStates[]
Definition: fxpkgpnp.hpp:4442
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeInterruptFiredNPOtherStates[]
Definition: fxpkgpnp.hpp:4509
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelingWakeForSystemSleep(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnableFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingDisarmWake(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDxStoppedDisableInterrupt(__inout FxPkgPnp *This)
VOID PowerGotoDx(VOID)
VOID CleanupDeviceFromFailedCreate(__in MxEvent *WaitEvent)
Definition: fxpkgpnp.cpp:2190
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabledNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolIdleCapableDeviceIdle(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerGotoDNotZeroNP(__inout FxPkgPnp *This)
virtual VOID PowerReleasePendingDeviceIrp(BOOLEAN IrpMustBePresent=TRUE)=0
VOID SetPendingSystemPowerIrp(__inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:3082
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakePowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4474
static const POWER_EVENT_TARGET_STATE m_WakePendingNPOtherStates[]
Definition: fxpkgpnp.hpp:4419
BOOLEAN IsS0IdleWakeFromS0Enabled(VOID)
Definition: fxpkgpnp.hpp:3632
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingDisarmWakeCancelWakeOtherStates[]
Definition: fxpkgpnp.hpp:4452
static const POWER_EVENT_TARGET_STATE m_DxArmedForWakeOtherStates[]
Definition: fxpkgpnp.hpp:4416
static WDF_DEVICE_POWER_STATE PowerDZero(__inout FxPkgPnp *This)
FxPnpStateAndCaps m_PnpStateAndCaps
Definition: fxpkgpnp.hpp:4088
NTSTATUS AssignPowerFrameworkSettings(__in PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings)
Definition: fxpkgpnp.cpp:6243
NTSTATUS CompletePowerRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5404
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabledWakeCanceledNP(__inout FxPkgPnp *This)
virtual NTSTATUS PowerEnableWakeAtBusOverload(VOID)
Definition: fxpkgpnp.hpp:1387
VOID PowerSetDevicePowerState(__in WDF_POWER_DEVICE_STATE State)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0NoWakePowerUp(__inout FxPkgPnp *This)
VOID RevertUsageNotificationFlags(__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in BOOLEAN InPath, __in ULONG OldFlags)
Definition: fxpkgpnp.cpp:4578
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedWakeFailedCancelUsbSS(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableCleanup(__inout FxPkgPnp *This)
friend FxPowerPolicyOwnerSettings
Definition: fxpkgpnp.hpp:493
BOOLEAN PowerPolicyCanIdlePowerDown(__in DEVICE_POWER_STATE DxState)
FxRelatedDeviceList * m_RemovalDeviceList
Definition: fxpkgpnp.hpp:4115
VOID PowerCompletePendedWakeIrp(VOID)
BOOLEAN PowerGotoDxIoStopped(VOID)
VOID SetPendingPnpIrp(__inout FxIrp *Irp, __in BOOLEAN MarkIrpPending=TRUE)
Definition: fxpkgpnp.cpp:4883
static WDF_DEVICE_PNP_STATE PnpEventQueryStopAskDriver(__inout FxPkgPnp *This)
friend FxInterrupt
Definition: fxpkgpnp.hpp:494
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeInterruptArrivedOtherStates[]
Definition: fxpkgpnp.hpp:4489
static const PNP_EVENT_TARGET_STATE m_PnpInitStartingOtherStates[]
Definition: fxpkgpnp.hpp:4386
BOOLEAN m_DeviceInterfacesCanBeEnabled
Definition: fxpkgpnp.hpp:4128
VOID PowerSendIdlePowerEvent(__in FxPowerIdleEvents Event)
virtual WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresenceOverload(VOID)=0
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingUnarmedQueryIdle(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCompletedPowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4463
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeWakeArrivedOtherStates[]
Definition: fxpkgpnp.hpp:4468
static WDF_DEVICE_POWER_STATE PowerNotifyingD0EntryToWakeInterrupts(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolDevicePowerRequestFailedOtherStates[]
Definition: fxpkgpnp.hpp:4480
virtual VOID QueryForReenumerationInterface(VOID)=0
static _Must_inspect_result_ NTSTATUS _PnpStartDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1823
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolDisarmingWakeForSystemSleepCompletePowerUpOtherStates[]
Definition: fxpkgpnp.hpp:4445
NTSTATUS UpdateWmiInstanceForS0Idle(__in FxWmiInstanceAction Action)
Definition: fxpkgpnpum.cpp:243
BOOLEAN PowerMakeWakeRequestNonCancelable(__in NTSTATUS Status)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakePowerDownFailedOtherStates[]
Definition: fxpkgpnp.hpp:4477
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingPoweredUpFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingDisarmWakeCancelWake(__inout FxPkgPnp *This)
VOID QueryForD3ColdInterface(VOID)
Definition: fxpkgpnpkm.cpp:538
BYTE m_SystemWake
Definition: fxpkgpnp.hpp:4188
static WDF_DEVICE_PNP_STATE PnpEventInitStarting(__inout FxPkgPnp *This)
virtual VOID PowerDisableWakeAtBusOverload(VOID)
Definition: fxpkgpnp.hpp:1396
static const POWER_EVENT_TARGET_STATE m_WakePendingOtherStates[]
Definition: fxpkgpnp.hpp:4418
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownFailedWakeCanceled(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWokeFromS0(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolCancelUsbSSOtherStates[]
Definition: fxpkgpnp.hpp:4485
static WDF_DEVICE_PNP_STATE PnpEventQueryRemovePending(__inout FxPkgPnp *This)
FxPowerPolicyMachine m_PowerPolicyMachine
Definition: fxpkgpnp.hpp:4153
BOOLEAN IsInSpecialUse(VOID)
Definition: fxpkgpnp.hpp:3170
static WDF_DEVICE_PNP_STATE PnpEventRestarting(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventPdoInitFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableDxAllocFailed(__inout FxPkgPnp *This)
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeTriggeredS0NP(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PnpReleaseHardware(VOID)
static const PNP_EVENT_TARGET_STATE m_PnpFailedPowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4401
static _Must_inspect_result_ CPNOT_POWER_POLICY_OWNER_STATE_TABLE GetNotPowerPolicyOwnerTableEntry(__in WDF_DEVICE_POWER_POLICY_STATE State)
Definition: fxpkgpnp.hpp:2928
friend FxPowerMachine
Definition: fxpkgpnp.hpp:491
BYTE m_DeviceWake[DeviceWakeStates]
Definition: fxpkgpnp.hpp:4185
static WDF_DEVICE_POWER_STATE PowerDxStoppedDisarmWakeNP(__inout FxPkgPnp *This)
VOID SetDeviceFailed(__in WDF_DEVICE_FAILED_ACTION FailedAction)
Definition: fxpkgpnp.cpp:3775
static WDF_DEVICE_PNP_STATE PnpEventPdoRestart(__inout FxPkgPnp *This)
static DEVICE_POWER_STATE _GetPowerCapState(__in ULONG Index, __in ULONG State)
Definition: fxpkgpnp.cpp:5657
VOID PowerPolicySetS0IdleState(__in BOOLEAN State)
Definition: fxpkgpnp.cpp:3710
static WDF_DEVICE_PNP_STATE PnpEventPdoRemoved(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventEjectHardware(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWakeFailedUsbSS(__inout FxPkgPnp *This)
FxPnpDeviceD0EntryPostInterruptsEnabled m_DeviceD0EntryPostInterruptsEnabled
Definition: fxpkgpnp.hpp:4552
static WDF_DEVICE_POWER_STATE PowerUpFailedDerefParent(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerD0BusWakeOwnerNP(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventStarted(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PnpPrepareHardwareInternal(VOID)
VOID SendEventToAllWakeInterrupts(__in enum FxWakeInterruptEvents WakeInterruptEvent)
Definition: fxpkgpnp.cpp:6164
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeInterruptFired(__inout FxPkgPnp *This)
VOID PowerPolicyEnterNewState(__in WDF_DEVICE_POWER_POLICY_STATE State)
static WDF_DEVICE_PNP_STATE PnpEventFailedOwnHardware(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceToD0CompletePowerUp(__inout FxPkgPnp *This)
virtual VOID FinishInitialize(__inout PWDFDEVICE_INIT DeviceInit)
Definition: fxpkgpnp.cpp:1240
ULONG m_WakeInterruptPendingAckCount
Definition: fxpkgpnp.hpp:4323
static WDF_DEVICE_PNP_STATE PnpEventFinal(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerNotifyingD0EntryToWakeInterruptsNP(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredNoWakeOtherStates[]
Definition: fxpkgpnp.hpp:4428
virtual NTSTATUS SendIrpSynchronously(FxIrp *Irp)=0
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingOtherStates[]
Definition: fxpkgpnp.hpp:4481
FxCREvent m_CleanupEventUm
Definition: fxpkgpnp.hpp:4304
static WDF_DEVICE_POWER_STATE PowerDxStoppedDisarmWake(__inout FxPkgPnp *This)
BOOLEAN m_HasPowerThread
Definition: fxpkgpnp.hpp:4256
static WDF_DEVICE_PNP_STATE PnpEventRemovingDisableInterfaces(__inout FxPkgPnp *This)
NTSTATUS PowerPolicySetSxWakeSettings(__in PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS Settings, __in BOOLEAN ArmForWakeIfChildrenAreArmedForWake, __in BOOLEAN IndicateChildWakeOnParentWake)
Definition: fxpkgpnp.cpp:3245
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingNoWakePowerDown(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeTriggeredS0NPOtherStates[]
Definition: fxpkgpnp.hpp:4470
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedWakeCapableSleepingUsbSS(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemSleepNeedWakeOtherStates[]
Definition: fxpkgpnp.hpp:4433
PNP_DEVICE_STATE HandleQueryPnpDeviceState(__in PNP_DEVICE_STATE PnpDeviceState)
Definition: fxpkgpnp.cpp:662
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedIdleCapableCancelTimerForSleep(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerDNotZeroOtherStates[]
Definition: fxpkgpnp.hpp:4414
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingArmedOtherStates[]
Definition: fxpkgpnp.hpp:4444
VOID PnpProcessEventInner(__inout FxPostProcessInfo *Info)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelingWakeForSystemSleepWakeCanceled(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolIoPresentArmed(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS HandleQueryInterface(__inout FxIrp *Irp, __out PBOOLEAN CompleteRequest)
Definition: fxpkgpnp.cpp:1493
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0WakeCompletePowerUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingCancelUsbSS(__inout FxPkgPnp *This)
static const POWER_EVENT_TARGET_STATE m_PowerD0ArmedForWakeOtherStates[]
Definition: fxpkgpnp.hpp:4412
static _Must_inspect_result_ NTSTATUS _DispatchWaitWake(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2400
VOID AddDmaEnabler(__in FxDmaEnabler *Enabler)
Definition: fxpkgpnpkm.cpp:277
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingCancelTimer(__inout FxPkgPnp *This)
static _Must_inspect_result_ NTSTATUS _PnpDeviceUsageNotification(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:3857
static WDF_DEVICE_POWER_STATE PowerReportPowerUpFailed(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventFdoRemoved(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDisarmingWakeForSystemSleepCompletePowerUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedIoPresentCancelUsbSS(__inout FxPkgPnp *This)
static const ULONG m_RestartCountMaximum
Definition: fxpkgpnp.hpp:4539
PFN_IO_CONNECT_INTERRUPT_EX m_IoConnectInterruptEx
Definition: fxpkgpnp.hpp:4288
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0NoWakeCompletePowerUp(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableUsbSS(__inout FxPkgPnp *This)
MdIrp m_PendingDevicePowerIrp
Definition: fxpkgpnp.hpp:4372
static WDF_DEVICE_POWER_STATE PowerEnablingWakeAtBus(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerDxDisablingWakeAtBus(__inout FxPkgPnp *This)
static WDF_DEVICE_PNP_STATE PnpEventSurpriseRemoveIoStarted(__inout FxPkgPnp *This)
virtual NTSTATUS FireAndForgetIrp(FxIrp *Irp)=0
BOOLEAN PnpIncrementRestartCountLogic(_In_ HANDLE RestartKey, _In_ BOOLEAN CreatedNewKey)
VOID PowerPolicyCheckAssumptions(VOID)
VOID PowerProcessEventInner(__inout FxPostProcessInfo *Info)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeRevertArmWake(__inout FxPkgPnp *This)
VOID PowerSendPowerUpEvents(VOID)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingNoWakeCompletePowerDown(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS PnpSurpriseRemoval(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2366
VOID SetChildBusInformation(__in PPNP_BUS_INFORMATION BusInformation)
Definition: fxpkgpnp.hpp:3468
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeOverload(VOID)=0
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIoFailedNP(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedWakeCapable(__inout FxPkgPnp *This)
_Must_inspect_result_ NTSTATUS RegisterCallbacks(__in PWDF_PNPPOWER_EVENT_CALLBACKS DispatchTable)
Definition: fxpkgpnp.cpp:2667
static WDF_DEVICE_PNP_STATE PnpEventRestartHardwareAvailable(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolRestarting(__inout FxPkgPnp *This)
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeRevertArmWakeOtherStates[]
Definition: fxpkgpnp.hpp:4486
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapablePowerDownOtherStates[]
Definition: fxpkgpnp.hpp:4441
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingSendStatus(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWake(__inout FxPkgPnp *This)
D3COLD_SUPPORT_INTERFACE m_D3ColdInterface
Definition: fxpkgpnp.hpp:4166
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingSucceeded(__inout FxPkgPnp *This)
VOID WriteStateToRegistry(__in HANDLE RegKey, __in PUNICODE_STRING ValueName, __in ULONG Value)
Definition: fxpkgpnpkm.cpp:301
static const PNP_EVENT_TARGET_STATE m_PnpRestartReleaseHardware[]
Definition: fxpkgpnp.hpp:4405
VOID DropD3ColdInterface(VOID)
Definition: fxpkgpnpkm.cpp:615
FxPnpDeviceRelationsQuery m_DeviceRelationsQuery
Definition: fxpkgpnp.hpp:4549
static WDF_DEVICE_PNP_STATE PnpEventRemovedPdoWait(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerDxSurpriseRemovedPowerDown(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_STATE PowerDecideD0State(__inout FxPkgPnp *This)
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeInterruptFiredNP(__inout FxPkgPnp *This)
static MdCompletionRoutineType _PowerPolicyWaitWakeCompletionRoutine
Definition: fxpkgpnp.hpp:2801
VOID PowerCheckAssumptions(VOID)
BOOLEAN m_SystemWokenByWakeInterrupt
Definition: fxpkgpnp.hpp:4330
VOID PnpPowerPolicyStop(VOID)
VOID PowerPolicyProcessEvent(__in FxPowerPolicyEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
_Must_inspect_result_ NTSTATUS PowerReference(__in BOOLEAN WaitForD0, __in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
VOID IoDecrement(__in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
CHECK_RETURN_IF_USER_MODE NTSTATUS Initialize()
Definition: fxwaitlock.hpp:235
__inline NTSTATUS Initialize(VOID)
__inline VOID Set()
Definition: mxeventkm.h:91
@ Supported
Definition: classpnp.h:733
_In_ PIRP Irp
Definition: csq.h:116
#define __in
Definition: dbghelp.h:35
#define __inout
Definition: dbghelp.h:50
#define __in_opt
Definition: dbghelp.h:38
#define __out
Definition: dbghelp.h:62
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define NTSTATUS
Definition: precomp.h:21
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
#define __drv_arg(expr, annotes)
Definition: driverspecs.h:258
UCHAR KIRQL
Definition: env_spec_w32.h:591
pDevice m_PkgPnp ClearRemovalDevicesList()
NTSTATUS(STDCALL * PFN_IO_DISCONNECT_INTERRUPT_EX)(__in PIO_DISCONNECT_INTERRUPT_PARAMETERS Parameters)
Definition: fxglobalskm.h:104
VOID(STDCALL * PFN_IO_REPORT_INTERRUPT_ACTIVE)(_In_ PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS Parameters)
Definition: fxglobalskm.h:303
VOID(STDCALL * PFN_IO_REPORT_INTERRUPT_INACTIVE)(_In_ PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS Parameters)
Definition: fxglobalskm.h:309
NTSTATUS(STDCALL * PFN_IO_CONNECT_INTERRUPT_EX)(__inout PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
Definition: fxglobalskm.h:98
SHORT OldFlags
Definition: fxioqueue.cpp:1325
NotifyResourcesFlags
Definition: fxpkgpnp.hpp:206
@ NotifyResourcesExplicitPowerup
Definition: fxpkgpnp.hpp:211
@ NotifyResourcesNoFlags
Definition: fxpkgpnp.hpp:207
@ NotifyResourcesForceDisconnect
Definition: fxpkgpnp.hpp:210
@ NotifyResourcesNP
Definition: fxpkgpnp.hpp:208
@ NotifyResourcesExplicitPowerDown
Definition: fxpkgpnp.hpp:212
@ NotifyResourcesSurpriseRemoved
Definition: fxpkgpnp.hpp:209
@ NotifyResourcesDisconnectInactive
Definition: fxpkgpnp.hpp:213
@ NotifyResourcesArmedForWake
Definition: fxpkgpnp.hpp:214
SendDeviceRequestAction
Definition: fxpkgpnp.hpp:201
@ NoRetry
Definition: fxpkgpnp.hpp:202
@ Retry
Definition: fxpkgpnp.hpp:203
struct _POWER_THREAD_INTERFACE POWER_THREAD_INTERFACE
const UCHAR DeviceWakeStates
Definition: fxpkgpnp.hpp:199
struct _POWER_THREAD_INTERFACE * PPOWER_THREAD_INTERFACE
VOID(* PFN_POWER_THREAD_ENQUEUE)(__in PVOID Context, __in PWORK_QUEUE_ITEM WorkItem)
Definition: fxpkgpnp.hpp:93
_Must_inspect_result_ NTSTATUS(* PFN_PNP_POWER_CALLBACK)(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:225
FxDeviceCallbackFlags
Definition: fxpkgpnp.hpp:86
@ FXDEVICE_CALLBACK_IN_PREPARE_HARDWARE
Definition: fxpkgpnp.hpp:88
FxWmiInstanceAction
Definition: fxpkgpnp.hpp:428
@ RemoveInstance
Definition: fxpkgpnp.hpp:430
@ AddInstance
Definition: fxpkgpnp.hpp:429
const UCHAR FxPowerPolicyEventQueueDepth
Definition: fxpkgpnp.hpp:35
FxPowerDownType
Definition: fxpkgpnp.hpp:217
@ FxPowerDownTypeExplicit
Definition: fxpkgpnp.hpp:218
@ FxPowerDownTypeImplicit
Definition: fxpkgpnp.hpp:219
const UCHAR PnpEventQueueDepth
Definition: fxpkgpnp.hpp:33
FxPnpStateAndCapValues
Definition: fxpkgpnp.hpp:249
@ FxPnpCapUniqueIDTrue
Definition: fxpkgpnp.hpp:303
@ FxPnpStateResourcesChangedFalse
Definition: fxpkgpnp.hpp:275
@ FxPnpCapSilentInstallFalse
Definition: fxpkgpnp.hpp:307
@ FxPnpCapSilentInstallUseDefault
Definition: fxpkgpnp.hpp:309
@ FxPnpCapRemovableFalse
Definition: fxpkgpnp.hpp:292
@ FxPnpStateDisabledMask
Definition: fxpkgpnp.hpp:253
@ FxPnpCapDockDeviceTrue
Definition: fxpkgpnp.hpp:298
@ FxPnpStateResourcesChangedUseDefault
Definition: fxpkgpnp.hpp:277
@ FxPnpStateNotDisableableTrue
Definition: fxpkgpnp.hpp:266
@ FxPnpStateMask
Definition: fxpkgpnp.hpp:280
@ FxPnpCapHardwareDisabledTrue
Definition: fxpkgpnp.hpp:318
@ FxPnpStateRemovedMask
Definition: fxpkgpnp.hpp:273
@ FxPnpCapSurpriseRemovalOKFalse
Definition: fxpkgpnp.hpp:312
@ FxPnpStateDisabledUseDefault
Definition: fxpkgpnp.hpp:252
@ FxPnpStateDisabledTrue
Definition: fxpkgpnp.hpp:251
@ FxPnpCapSilentInstallTrue
Definition: fxpkgpnp.hpp:308
@ FxPnpCapLockSupportedMask
Definition: fxpkgpnp.hpp:285
@ FxPnpCapSurpriseRemovalOKTrue
Definition: fxpkgpnp.hpp:313
@ FxPnpCapHardwareDisabledUseDefault
Definition: fxpkgpnp.hpp:319
@ FxPnpCapUniqueIDFalse
Definition: fxpkgpnp.hpp:302
@ FxPnpCapRemovableMask
Definition: fxpkgpnp.hpp:295
@ FxPnpStateRemovedFalse
Definition: fxpkgpnp.hpp:270
@ FxPnpCapSurpriseRemovalOKUseDefault
Definition: fxpkgpnp.hpp:314
@ FxPnpCapUniqueIDUseDefault
Definition: fxpkgpnp.hpp:304
@ FxPnpCapEjectSupportedUseDefault
Definition: fxpkgpnp.hpp:289
@ FxPnpStateNotDisableableUseDefault
Definition: fxpkgpnp.hpp:267
@ FxPnpStateFailedMask
Definition: fxpkgpnp.hpp:263
@ FxPnpStateDontDisplayInUITrue
Definition: fxpkgpnp.hpp:256
@ FxPnpStateNotDisableableMask
Definition: fxpkgpnp.hpp:268
@ FxPnpStateDontDisplayInUIMask
Definition: fxpkgpnp.hpp:258
@ FxPnpCapHardwareDisabledFalse
Definition: fxpkgpnp.hpp:317
@ FxPnpCapLockSupportedUseDefault
Definition: fxpkgpnp.hpp:284
@ FxPnpCapHardwareDisabledMask
Definition: fxpkgpnp.hpp:320
@ FxPnpStateRemovedUseDefault
Definition: fxpkgpnp.hpp:272
@ FxPnpCapNoDisplayInUIMask
Definition: fxpkgpnp.hpp:325
@ FxPnpCapNoDisplayInUITrue
Definition: fxpkgpnp.hpp:323
@ FxPnpStateResourcesChangedTrue
Definition: fxpkgpnp.hpp:276
@ FxPnpCapUniqueIDMask
Definition: fxpkgpnp.hpp:305
@ FxPnpStateDontDisplayInUIUseDefault
Definition: fxpkgpnp.hpp:257
@ FxPnpStateFailedUseDefault
Definition: fxpkgpnp.hpp:262
@ FxPnpCapSurpriseRemovalOKMask
Definition: fxpkgpnp.hpp:315
@ FxPnpStateDisabledFalse
Definition: fxpkgpnp.hpp:250
@ FxPnpCapMask
Definition: fxpkgpnp.hpp:327
@ FxPnpCapEjectSupportedMask
Definition: fxpkgpnp.hpp:290
@ FxPnpCapDockDeviceMask
Definition: fxpkgpnp.hpp:300
@ FxPnpStateDontDisplayInUIFalse
Definition: fxpkgpnp.hpp:255
@ FxPnpCapLockSupportedFalse
Definition: fxpkgpnp.hpp:282
@ FxPnpStateResourcesChangedMask
Definition: fxpkgpnp.hpp:278
@ FxPnpCapDockDeviceUseDefault
Definition: fxpkgpnp.hpp:299
@ FxPnpCapDockDeviceFalse
Definition: fxpkgpnp.hpp:297
@ FxPnpStateFailedFalse
Definition: fxpkgpnp.hpp:260
@ FxPnpStateFailedTrue
Definition: fxpkgpnp.hpp:261
@ FxPnpCapEjectSupportedFalse
Definition: fxpkgpnp.hpp:287
@ FxPnpCapRemovableUseDefault
Definition: fxpkgpnp.hpp:294
@ FxPnpCapLockSupportedTrue
Definition: fxpkgpnp.hpp:283
@ FxPnpCapSilentInstallMask
Definition: fxpkgpnp.hpp:310
@ FxPnpCapNoDisplayInUIFalse
Definition: fxpkgpnp.hpp:322
@ FxPnpStateNotDisableableFalse
Definition: fxpkgpnp.hpp:265
@ FxPnpCapNoDisplayInUIUseDefault
Definition: fxpkgpnp.hpp:324
@ FxPnpCapRemovableTrue
Definition: fxpkgpnp.hpp:293
@ FxPnpCapEjectSupportedTrue
Definition: fxpkgpnp.hpp:288
@ FxPnpStateRemovedTrue
Definition: fxpkgpnp.hpp:271
const UCHAR PowerEventQueueDepth
Definition: fxpkgpnp.hpp:34
FxPowerCapValues
Definition: fxpkgpnp.hpp:370
@ FxPowerCapDeviceD1True
Definition: fxpkgpnp.hpp:372
@ FxPowerCapWakeFromD0True
Definition: fxpkgpnp.hpp:382
@ FxPowerCapWakeFromD3True
Definition: fxpkgpnp.hpp:397
@ FxPowerCapWakeFromD0Mask
Definition: fxpkgpnp.hpp:384
@ FxPowerCapWakeFromD0UseDefault
Definition: fxpkgpnp.hpp:383
@ FxPowerCapWakeFromD3Mask
Definition: fxpkgpnp.hpp:399
@ FxPowerCapWakeFromD0False
Definition: fxpkgpnp.hpp:381
@ FxPowerCapWakeFromD1True
Definition: fxpkgpnp.hpp:387
@ FxPowerCapWakeFromD1False
Definition: fxpkgpnp.hpp:386
@ FxPowerCapDeviceD2False
Definition: fxpkgpnp.hpp:376
@ FxPowerCapWakeFromD2True
Definition: fxpkgpnp.hpp:392
@ FxPowerCapDeviceD2UseDefault
Definition: fxpkgpnp.hpp:378
@ FxPowerCapWakeFromD3False
Definition: fxpkgpnp.hpp:396
@ FxPowerCapDeviceD2True
Definition: fxpkgpnp.hpp:377
@ FxPowerCapWakeFromD2Mask
Definition: fxpkgpnp.hpp:394
@ FxPowerCapWakeFromD2UseDefault
Definition: fxpkgpnp.hpp:393
@ FxPowerCapDeviceD1UseDefault
Definition: fxpkgpnp.hpp:373
@ FxPowerCapWakeFromD2False
Definition: fxpkgpnp.hpp:391
@ FxPowerCapWakeFromD1UseDefault
Definition: fxpkgpnp.hpp:388
@ FxPowerCapDeviceD1Mask
Definition: fxpkgpnp.hpp:374
@ FxPowerCapWakeFromD3UseDefault
Definition: fxpkgpnp.hpp:398
@ FxPowerCapDeviceD2Mask
Definition: fxpkgpnp.hpp:379
@ FxPowerCapWakeFromD1Mask
Definition: fxpkgpnp.hpp:389
@ FxPowerCapDeviceD1False
Definition: fxpkgpnp.hpp:371
@ PnpEventChildrenRemovalComplete
FxIrp * irp
USHORT WDFTYPE
Definition: fxtypes.h:29
Status
Definition: gdiplustypes.h:25
const GLubyte * c
Definition: glext.h:8905
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
#define c
Definition: ke_i.h:80
#define ASSERT(a)
Definition: mode.c:44
@ Enabled
Definition: mountmgr.h:159
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
IWudfIrp * MdIrp
Definition: mxum.h:103
REQUEST_POWER_COMPLETE MdRequestPowerCompleteType
Definition: mxum.h:162
WUDF_IO_COMPLETION_ROUTINE MdCompletionRoutineType
Definition: mxum.h:142
WUDF_DRIVER_CANCEL MdCancelRoutineType
Definition: mxum.h:143
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
@ PowerSystemWorking
Definition: ntpoapi.h:36
@ PowerSystemHibernate
Definition: ntpoapi.h:40
POWER_ACTION
Definition: ntpoapi.h:122
@ PowerDeviceD0
Definition: ntpoapi.h:49
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define QI(I)
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
#define STATUS_SUCCESS
Definition: shellext.h:65
#define __range(lb, ub)
Definition: specstrings.h:331
VOID Set(VOID)
Definition: fxwaitlock.hpp:144
NTSTATUS Initialize(VOID)
Definition: fxpkgpnp.hpp:442
_Releases_lock_(_Global_critical_region_) VOID ReleaseParentPowerStateLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxpkgpnp.hpp:470
FxWaitLockTransactionedList m_ChildListList
Definition: fxpkgpnp.hpp:485
FxWaitLockInternal m_PowerStateLock
Definition: fxpkgpnp.hpp:480
FxEnumerationInfo(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxpkgpnp.hpp:435
_Acquires_lock_(_Global_critical_region_) VOID AcquireParentPowerStateLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxpkgpnp.hpp:461
BOOLEAN m_SetRemovedEvent
VOID Evaluate(__inout FxPkgPnp *PkgPnp)
Definition: fxpkgpnp.hpp:4566
FxCREvent * m_Event
ULONG D3Latency
Definition: fxpkgpnp.hpp:425
BYTE SystemWake
Definition: fxpkgpnp.hpp:413
ULONG D2Latency
Definition: fxpkgpnp.hpp:424
ULONG D1Latency
Definition: fxpkgpnp.hpp:423
USHORT Caps
Definition: fxpkgpnp.hpp:406
BYTE DeviceWake
Definition: fxpkgpnp.hpp:412
ULONG States
Definition: fxpkgpnp.hpp:418
FxPowerPolicyOwnerSettings * m_Owner
IdleTimeoutManagement m_TimeoutMgmt
Definition: ncftp.h:79
WDF_DEVICE_POWER_POLICY_STATE CurrentTargetState
BOOLEAN m_ExtendWatchDogTimer
Definition: fxpkgpnp.hpp:196
BOOLEAN m_WaitWakeOwner
Definition: fxpkgpnp.hpp:186
MdIrp m_WaitWakeIrp
Definition: fxpkgpnp.hpp:180
PVOID Context
Definition: miniport.h:123
Definition: typedefs.h:120
PFN_POWER_THREAD_ENQUEUE PowerThreadEnqueue
Definition: fxpkgpnp.hpp:110
Definition: ntbasedef.h:628
Definition: ps.c:97
uint32_t * PULONG
Definition: typedefs.h:59
char * PSTR
Definition: typedefs.h:51
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
int32_t * PLONG
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
WDF_TRI_STATE Removable
Definition: fxpkgpnp.hpp:343
struct FxPnpStateAndCaps::@4774 ByEnum
WDF_TRI_STATE Disabled
Definition: fxpkgpnp.hpp:333
WDF_TRI_STATE ResourcesChanged
Definition: fxpkgpnp.hpp:338
WDF_TRI_STATE SilentInstall
Definition: fxpkgpnp.hpp:346
WDF_TRI_STATE HardwareDisabled
Definition: fxpkgpnp.hpp:348
WDF_TRI_STATE NotDisableable
Definition: fxpkgpnp.hpp:336
WDF_TRI_STATE UniqueID
Definition: fxpkgpnp.hpp:345
WDF_TRI_STATE Failed
Definition: fxpkgpnp.hpp:335
WDF_TRI_STATE LockSupported
Definition: fxpkgpnp.hpp:341
WDF_TRI_STATE EjectSupported
Definition: fxpkgpnp.hpp:342
WDF_TRI_STATE NoDisplayInUI
Definition: fxpkgpnp.hpp:349
WDF_TRI_STATE DontDisplayInUI
Definition: fxpkgpnp.hpp:334
WDF_TRI_STATE DockDevice
Definition: fxpkgpnp.hpp:344
WDF_TRI_STATE SurpriseRemovalOK
Definition: fxpkgpnp.hpp:347
WDF_TRI_STATE Removed
Definition: fxpkgpnp.hpp:337
#define STDCALL
Definition: wdf.h:45
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
@ WdfDevStatePnpObjectCreated
Definition: wdfdevice.h:64
_In_ PWDFDEVICE_INIT _In_ BOOLEAN IsPowerPolicyOwner
Definition: wdfdevice.h:2966
_In_ WDFDEVICE _Out_ PWDF_DEVICE_STATE DeviceState
Definition: wdfdevice.h:1999
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
enum _WDF_SPECIAL_FILE_TYPE WDF_SPECIAL_FILE_TYPE
FORCEINLINE ULONG WdfDevStateNormalize(_In_ ULONG State)
Definition: wdfdevice.h:1225
@ WdfReleaseHardwareOrderOnFailureEarly
Definition: wdfdevice.h:475
enum _WDF_POWER_DEVICE_STATE WDF_POWER_DEVICE_STATE
enum _WDF_DEVICE_POWER_STATE WDF_DEVICE_POWER_STATE
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings
Definition: wdfdevice.h:2595
@ WdfSpecialFileBoot
Definition: wdfdevice.h:445
@ WdfSpecialFileMax
Definition: wdfdevice.h:446
@ WdfSpecialFileHibernation
Definition: wdfdevice.h:443
@ WdfSpecialFileDump
Definition: wdfdevice.h:444
@ WdfSpecialFilePaging
Definition: wdfdevice.h:442
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN WaitForD0
Definition: wdfdevice.h:4006
_In_ WDFDEVICE _In_ WDF_SPECIAL_FILE_TYPE FileType
Definition: wdfdevice.h:2741
_In_ WDFDEVICE _In_ WDF_DEVICE_FAILED_ACTION FailedAction
Definition: wdfdevice.h:3975
enum _WDF_DEVICE_POWER_POLICY_STATE WDF_DEVICE_POWER_POLICY_STATE
_Must_inspect_result_ _In_ WDFDEVICE _In_ NTSTATUS WaitWakeStatus
Definition: wdfdevice.h:3945
_Must_inspect_result_ _In_ WDFDEVICE _In_ PDEVICE_OBJECT DependentDevice
Definition: wdfdevice.h:2263
_In_ WDFDEVICE _In_ PWDF_DEVICE_PNP_CAPABILITIES PnpCapabilities
Definition: wdfdevice.h:3857
enum _WDF_DEVICE_PNP_STATE WDF_DEVICE_PNP_STATE
_In_ WDFDEVICE _In_ PWDF_DEVICE_POWER_CAPABILITIES PowerCapabilities
Definition: wdfdevice.h:3886
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
Definition: wdfdevice.h:3915
enum _WDF_DEVICE_FAILED_ACTION WDF_DEVICE_FAILED_ACTION
@ WdfDevStatePwrPolNull
Definition: wdfdevice.h:385
@ WdfDevStatePwrPolObjectCreated
Definition: wdfdevice.h:232
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings
Definition: wdfdevice.h:4335
@ WdfDevStatePowerObjectCreated
Definition: wdfdevice.h:130
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG Configuration
Definition: wdfinterrupt.h:374
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:379
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
Definition: wdfpdo.h:248
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
enum _WDF_TRI_STATE WDF_TRI_STATE
_In_ ULONG OutBufferSize
Definition: wdfwmi.h:87
_In_ ULONG _Out_ PULONG BufferUsed
Definition: wdfwmi.h:92
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
_In_ ULONG InBufferSize
Definition: wdfwmi.h:106
_In_ ULONG DataItemId
Definition: wdfwmi.h:123
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:115
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH * Dispatch
Definition: wsk.h:188
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
ULONG PNP_DEVICE_STATE
Definition: iotypes.h:997
enum _DEVICE_USAGE_NOTIFICATION_TYPE DEVICE_USAGE_NOTIFICATION_TYPE
@ DeviceUsageTypeHibernation
Definition: iotypes.h:1171
@ DeviceUsageTypeBoot
Definition: iotypes.h:1173
@ DeviceUsageTypeDumpFile
Definition: iotypes.h:1172
@ DeviceUsageTypePaging
Definition: iotypes.h:1170
static void Initialize()
Definition: xlate.c:212
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned char BYTE
Definition: xxhash.c:193
_Out_opt_ PBOOLEAN CurrentState
Definition: zwfuncs.h:393