ReactOS 0.4.15-dev-7958-gcd0bb1a
fxglobals.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5Module Name:
6
7 FxGlobals.h
8
9Abstract:
10
11 This module contains globals definitions for the frameworks.
12
13Author:
14
15
16
17
18Environment:
19
20 Both kernel and user mode
21
22Revision History:
23
24 Made it mode agnostic
25 Moved km specific portions to FxGlobalsKm.h
26
27
28
29
30
31
32
33
34
35 New failure paths:
36 AllocatedTagTrackersLock initialization -
37 If this fails we free debug extensions structure and not use it
38 ThreadTableLock initialization -
39 If this fails we turn off lock verification
40 FxDriverGlobalsListLock initialization -
41 If this fails we fail FxLibraryGlobalsCommission
42
43--*/
44
45#ifndef _FXGLOBALS_H
46#define _FXGLOBALS_H
47
48#include "wdfglobals.h"
49#include <debug.h>
50
51// REACTOS
52#define ROSWDFNOTIMPLEMENTED (DbgPrint("(%s:%d) ReactOS KMDF: %s not implemented\n", __RELFILE__, __LINE__, __FUNCTION__))
53// REACTOS
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
60
61class CWudfDriverGlobals; //UMDF driver globals
62
63//
64// NOTE: any time you add a value to this enum, you must add a field to the
65// union in FxObjectDebugInfo.
66//
69};
70
71typedef enum FxTrackPowerOption : UCHAR {
77
82
83typedef enum WaitSignalFlags {
88
89
91 //
92 // FX_OBJECT_TYPES enum value
93 //
95
96 union {
97 //
98 // Combo of values from FxObjectDebugInfoFlags
99 //
101
102 //
103 // Break out of DebugFlags as individual fields. This is used by the
104 // debugger extension to reference the values w/out knowing the actual
105 // enum values.
106 //
107 struct {
110 } u;
111};
112
114 //
115 // Debug information per object. List is sorted by
116 // FxObjectDebugInfo::ObjectType, length is the same as FxObjectsInfo.
117 //
119
120 //
121 // Track allocated Mdls only in kernel mode version
122 //
123#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
125
127#endif
128
129 //
130 // List of all allocated tag trackers for this driver. This is used to keep
131 // track of orphaned objects due to leaked reference counts in the debugger
132 // extension.
133 //
135
136 //
137 // Synchronizes access to AllocatedTagTrackersListHead
138 //
140
141 //
142 // Whether we track power references for WDFDEVICE objects
143 // and optionally capture stack frames.
144 //
146};
147
148//
149// A telemetry context that is allocated if the telemetry provider is enabled.
150//
152 //
153 // A GUID representing the driver session
154 //
156
157 //
158 // A general purpose bitmap that can be used
159 // by various telemetry events that may want to
160 // fire once per driver session.
161 //
164
165typedef struct _FX_DRIVER_GLOBALS {
166public:
167 ULONG
168 __inline
171 __in LONG Line = 0,
173 )
174 {
175 ULONG c;
176
180
182
183 //
184 // Catch the transition from 0 to 1. Since the RefCount starts off at 1,
185 // we should never have to increment to get to this value.
186 //
187 ASSERT(c > 1);
188 return c;
189 }
190
191 ULONG
192 __inline
195 __in LONG Line = 0,
197 )
198 {
199 ULONG c;
200
204
206 ASSERT((LONG)c >= 0);
207 if (c == 0) {
209 }
210
211 return c;
212 }
213
214 BOOLEAN
216 VOID
217 )
218 {
219 return (FxPoolTrackingOn) ? TRUE : FALSE;
220 }
221
222 BOOLEAN
224 VOID
225 )
226 {
227 if (FxVerifierHandle) {
228 return TRUE;
229 }
230 else {
231 return FALSE;
232 }
233 }
234
235 VOID
238 )
239 {
240 //
241 // Master switch
242 //
244
249
250 //
251 // Following two can be overridden by the registry settings
252 // WDFVERIFY matches the state of the verifier.
253 //
257
258 //
259 // Set the public flags for consumption by client drivers.
260 //
261 if (State) {
262 Public.DriverFlags |= (WdfVerifyOn | WdfVerifierOn);
263 }
264 }
265
267 BOOLEAN
269 __in ULONG Major,
271 );
272
274 BOOLEAN
276 _In_ PCUNICODE_STRING ServiceKeyName
277 );
278
279 VOID
281 _In_ PCUNICODE_STRING ServiceKeyName
282 );
283
285 BOOLEAN
287 __in ULONG Major,
290 )
291 {
292 //
293 // those verifier checks that are restricted to specific version can be
294 // applied to previous version drivers if driver opts-in by setting a
295 // reg key (whose value is stored in FxVerifyDownlevel)
296 //
297 if (FxVerifierOn &&
299 (DownLevel ? FxVerifyDownlevel : FALSE))) {
300 return TRUE;
301 }
302 else {
303 return FALSE;
304 }
305 }
306
307 //
308 // To be used in code path where it is already determined that the driver
309 // is down-level, otherwise use IsVerificationEnabled.
310 //
311 __inline
313 BOOLEAN
315 )
316 {
317 return FxVerifyDownlevel;
318 }
319
320 VOID
323 __in PCSTR ReasonForWaiting,
325 __in ULONG WarningTimeoutInSec,
327 );
328
330 BOOLEAN
332 VOID
333 );
334
335public:
336 //
337 // Link list of driver FxDriverGlobals on this WDF Version.
338 //
340
341 //
342 // Reference count is operated on with interlocked operations
343 //
345
346 //
347 // This event is signaled when globals can be freed. Unload thread waits
348 // on this event to make sure driver's threads are done and driver unload
349 // can proceed.
350 //
352
353 //
354 // Mask to XOR all outgoing handles against
355 //
357
358 //
359 // If verifier is on, this is the count of allocations
360 // to fail at
361 //
363
364 //
365 // Tag to be used for allocations on behalf of the driver writer. This is
366 // based off of the service name (which might be different than the binary
367 // name).
368 //
370
371 //
372 // Backpointer to Fx driver object
373 //
375
377
379
380 //
381 // WDF internal In-Flight Recorder (IFR) log
382 //
384
385 //
386 // The driver's memory pool header
387 //
389
390 //
391 // Framworks Pool Tracking
392 //
394
395 //
396 // FxVerifierLock per driver state
397 //
399
401
402 //
403 // Embedded pointer to driver's WDF_BIND_INFO structure (in stub)
404 //
406
407 //
408 // The base address of the image.
409 //
411
412 //
413 // The size of the image.
414 //
416
417 //
418 // Top level verifier flag.
419 //
421
422 //
423 // Apply latest-version-restricted verifier checks to downlevel drivers.
424 // Drivers set this value in registry.
425 //
427
428 //
429 // Breakpoint on errors.
430 //
432
433 //
434 // Breakpoint on device state errors.
435 //
437
438 //
439 // Handle verifier.
440 //
442
443 //
444 // I/O verifier.
445 //
447
448 //
449 // Lock verifier.
450 //
452
453 //
454 // Not a verifier option. Rather, controls whether WDFVERIFY macros are
455 // live.
456 //
458
459 //
460 // Capture IFR Verbose messages.
461 //
463
464 //
465 // Parent queue presented requests (to device).
466 //
468
469 //
470 // Enable/Disable support for device simulation framework (DSF).
471 //
473
474 //
475 // Force copy of IFR data to mini-dump when a bugcheck happens.
476 //
478
479 //
480 // TRUE to enable run-time driver tracking. The dump callback logic
481 // uses this info for finding the right log to write in the minidump.
482 //
484
485 //
486 // TRUE if compiled for user-mode
487 //
489
490 //
491 // Remove lock options, these are also specified through
492 // WdfDeviceInitSetRemoveLockOptions.
493 //
495
496 //
497 // Bug check callback data for kernel mode only
498
499
500
501 //
502#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
503 //
504 // 0-based index into the BugCheckDriverInfo holding this driver info.
505 //
507
508 //
509 // Bug check callback record for processing bugchecks.
510 //
512
513#endif
514
515 //
516 // Enhanced Verifier Options.
517 //
519
520 //
521 // If FxVerifierDbgBreakOnError is true, WaitForSignal interrupts the
522 // execution of the system after waiting for the specified number
523 // of seconds. Developer will have an opportunity to validate the state
524 // of the driver when breakpoint is hit. Developer can continue to wait
525 // by entering 'g' in the debugger.
526 //
528
529 //
530 // Timeout used by the wake interrupt ISR in WaitForSignal to catch
531 // scenarios where the interrupt ISR is blocked because the device stack
532 // is taking too long to power up
533 //
535
536#if (FX_CORE_MODE==FX_CORE_USER_MODE)
537 CWudfDriverGlobals * UfxDriverGlobals;
538#endif
539
541
542 //
543 // The public version of WDF_DRIVER_GLOBALS
544 //
546
548
550PVOID
552FxPoolAllocate(
555 __in size_t Size
556 )
557{
558 //
559 // Always pass in the return address, regardless of the value of
560 // Globals->WdfPoolTrackingOn.
561 //
562 return FxPoolAllocator(
563 Globals,
564 &Globals->FxPoolFrameworks,
565 Type,
566 Size,
567 Globals->Tag,
569 );
570}
571
573PVOID
575FxPoolAllocateWithTag(
578 __in size_t Size,
580 )
581{
582 return FxPoolAllocator(
583 Globals,
584 &Globals->FxPoolFrameworks,
585 Type,
586 Size,
587 Tag,
588 Globals->FxPoolTrackingOn ? _ReturnAddress() : NULL
589 );
590}
591
592//
593// Get FxDriverGlobals from api's DriverGlobals
594//
595__inline
599 )
600{
602}
603
605
606#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
607VOID
609 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals,
611 );
612
613VOID
615 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals
616 );
617#endif
618
622 );
623
627 __inout PFX_DRIVER_GLOBALS FxDriverGlobals,
630 __in_opt PWDF_DRIVER_CONFIG DriverConfig //optional in user mode
631 );
632
633VOID
635 __in PFX_DRIVER_GLOBALS FxDriverGlobals
636 );
637
641 VOID
642 );
643
644VOID
646 VOID
647 );
648
649VOID
651 VOID
652 );
653
654void
656 __in PFX_DRIVER_GLOBALS FxDriverGlobals
657 );
658
659void
661 __in PFX_DRIVER_GLOBALS FxDriverGlobals
662 );
663
667 __in FxObjectDebugInfo* DebugInfo,
669 );
670
671PCSTR
674 );
675
676typedef
679 __in TRACE_INFORMATION_CLASS TraceInformationClass,
680 __out PVOID TraceInformation,
684 );
685
686typedef
689 __in TRACEHANDLE LoggerHandle,
690 __in ULONG MessageFlags,
691 __in LPGUID MessageGuid,
693 __in va_list MessageArgList
694 );
695
701};
702
703//
704// Private Globals for the entire DLL
705
706//
708
709#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
710
711 //
712 // The driver object for the library.
713
714
715
716
717
718 //
720
721 //
722 // As long as this device object is around, the library cannot be unloaded.
723 // This prevents the following scenario from unloading the service
724 // 1 wdfldr.sys loads the library
725 // 2 user tries to run "net stop <service>" while there are outstanding clients
726 // through wdfldr
727 //
729
731
733
735
737
739
741
743
745
747
749
751
753
755
757
759
761
763
765
767
768#endif
769
771
773
775
776#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
777 //
778 // Index to first free entry in BugCheckDriverInfo array.
779 //
781
782 //
783 // # of entries in BugCheckDriverInfo array.
784 //
786
787 //
788 // Array of info about loaded driver. The library bugcheck callback
789 // writes this data into the minidump.
790 //
792
793 //
794 // Library bug-check callback record for processing bugchecks.
795 //
797
799
800#endif
801 //
802 // WPP tracing.
803 //
805
806#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
807 //
808 // The following field is used by the debug dump callback routine for
809 // finding which driver's dump log file to write in the minidump if an
810 // exact match is not found.
811 //
813
814 //
815 // Best driver match for the mini-dump log.
816 //
818#endif
819
821
822 //
823 // TRUE if compiled for user-mode
824 //
826
827 //
828
829
830
831
832
833
834 //
835
837
838#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
839 //
840 // used for locking/unlocking Enhanced-verifier image section
841 //
843
844 //
845 // This keeps track of the # of times we pinned the paged memory down.
846 // This is only used to aid debugging.
847 //
849
850 //
851 // Routines provided by the kernel SystemTraceProvider for perf
852 // tracing of WDF operations. The size member of this structure
853 // allows versioning across multiple OS versions.
854 //
855 //PWMI_WDF_NOTIFY_ROUTINES PerfTraceRoutines; __REACTOS__
857
858 //
859 // PerfTraceRoutines points here if the SystemTraceProvider failed
860 // to provide trace routines.
861 //
862 //WMI_WDF_NOTIFY_ROUTINES DummyPerfTraceRoutines; __REACTOS__
864
865#endif
866
867 //
868 // Registry setting to disable IFR on low-memory systems.
869 //
871};
872
874
875
876typedef struct _FX_OBJECT_INFO {
877 //
878 // The name of the object, ie "FxObject"
879 //
880 const CHAR* Name;
881
882 //
883 // The name of the external WDF handle that represents the object, ie
884 // WDFDEVICE. If the object does not have an external handle, this field
885 // may be NULL.
886 //
888
889 //
890 // The minimum size of the object, ie sizeof(FxObject). There are objects
891 // which allocate more than their sizeof() length.
892 //
894
895 //
896 // FX_OBJECT_TYPES value
897 //
899
901
902//
903// Define to declare an internal entry. An internal entry has no external WDF
904// handle.
905//
906#define FX_INTERNAL_OBJECT_INFO_ENTRY(_obj, _type) \
907 { #_obj, NULL, sizeof(_obj), _type, }
908
909//
910// Define to declare an external entry. An external entry has an external WDF
911// handle.
912//
913// By casting #_handletype to a (_handletype), we make sure that _handletype is
914// actually a valid WDF handle name. The cast forces the parameter to be
915// evaluated as true handle type vs a string (ie the # preprocesor operator).
916// For instance, this would catch the following error:
917//
918// FX_EXTERNAL_OBJECT_INFO_ENTRY(FxDevice, FX_TYPE_DEVICE, WDFDEVICES),
919//
920// because the statement would evaluate to (const CHAR*) (WDFDEVICES) "WDFDEVICES"
921// and WDFDEVICES is not a valid type (WDFDEVICE is though).
922//
923#define FX_EXTERNAL_OBJECT_INFO_ENTRY(_obj, _type, _handletype) \
924 { #_obj, \
925 (const CHAR*) (_handletype) #_handletype, \
926 sizeof(_obj), \
927 _type, \
928 }
929
934 );
935
936VOID
938 VOID
939 );
940
941VOID
943 __in FxDriverGlobalsDebugExtension* DebugExtension
944 );
945
946//
947
948
949
950
951
952
953
954
955
956
957
958
959
960//
961
963__inline
966 __in PFX_DRIVER_GLOBALS FxDriverGlobals,
967 __in PFX_DRIVER_GLOBALS ExtDriverGlobals
968 )
969{
970 return (FxDriverGlobals == ExtDriverGlobals) ? FALSE : TRUE;
971}
972
973
976__inline
978 __in CONST GUID* Lhs,
979 __in CONST GUID* Rhs
980 )
981{
982 return RtlCompareMemory(Lhs, Rhs, sizeof(GUID)) == sizeof(GUID);
983}
984
985__inline
986size_t
988 __in size_t A,
989 __in size_t B
990 )
991{
992 return A > B ? A : B;
993}
994
995__inline
996size_t
998 __in size_t A,
999 __in size_t B
1000 )
1001{
1002 return A < B ? A : B;
1003}
1004
1005__inline
1006LONG
1008 __inout LONG volatile *Target,
1009 __in LONG Floor
1010 )
1011{
1012 LONG startVal;
1013 LONG currentVal;
1014
1015 currentVal = *Target;
1016
1017 do {
1018 if (currentVal <= Floor) {
1019 return currentVal;
1020 }
1021
1022 startVal = currentVal;
1023
1024 //
1025 // currentVal will be the value that used to be Target if the exchange was made
1026 // or its current value if the exchange was not made.
1027 //
1028 currentVal = InterlockedCompareExchange(Target, startVal+1, startVal);
1029
1030 //
1031 // If startVal == currentVal, then no one updated Target in between the deref at the top
1032 // and the InterlockedCompareExchange afterward.
1033 //
1034 } while (startVal != currentVal);
1035
1036 //
1037 // startVal is the old value of Target. Since InterlockedIncrement returns the new
1038 // incremented value of Target, we should do the same here.
1039 //
1040 return startVal+1;
1041}
1042
1043__inline
1044LONG
1046 __inout LONG volatile *Target
1047 )
1048{
1050}
1051
1052__inline
1053ULONG
1055 __inout PULONG RandomSeed
1056 )
1057/*++
1058
1059Routine Description:
1060
1061 Simple threadsafe random number generator to use at DISPATCH_LEVEL
1062 (in kernel mode) because the system provided function RtlRandomEx
1063 can be called at only passive-level.
1064
1065 This function requires the user to provide a variable used to seed
1066 the generator, and it must be valid and initialized to some number.
1067
1068Return Value:
1069
1070 ULONG
1071
1072--*/
1073{
1074 *RandomSeed = *RandomSeed * 1103515245 + 12345;
1075 return (ULONG)(*RandomSeed / 65536) % 32768;
1076}
1077
1079__inline
1080BOOLEAN
1082 VOID
1083 )
1084{
1085 //
1086 // Passive-level interrupt handling is supported in Win 8 and forward.
1087 //
1089}
1090
1091__inline
1093BOOLEAN
1095 __in ULONG Major,
1097 )
1098{
1099 return ((FxLibraryGlobals.OsVersionInfo.dwMajorVersion > Major) ||
1102}
1103
1104#ifdef __cplusplus
1105}
1106#endif
1107#endif // _FXGLOBALS_H
1108
unsigned char BOOLEAN
Type
Definition: Type.h:7
char * va_list
Definition: acmsvcex.h:78
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
Definition: ehthrow.cxx:93
Definition: ehthrow.cxx:54
Definition: bufpool.h:45
Definition: File.h:16
__inline VOID Set()
Definition: mxeventkm.h:91
Definition: mxlock.h:102
CLIPBOARD_GLOBALS Globals
Definition: clipbrd.c:13
#define __out_opt
Definition: dbghelp.h:65
#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 A(row, col)
#define B(row, col)
#define NTSTATUS
Definition: precomp.h:21
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
ULONG64 TRACEHANDLE
Definition: evntrace.h:40
DriverGlobals
enum FxVerifierDownlevelOption FxVerifierDownLevelOption
FxMachineSleepStates
Definition: fxglobals.h:696
@ FxMachineSleepStatesMax
Definition: fxglobals.h:700
@ FxMachineS3Index
Definition: fxglobals.h:699
@ FxMachineS1Index
Definition: fxglobals.h:697
@ FxMachineS2Index
Definition: fxglobals.h:698
void FxVerifierLockDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
FxVerifierDownlevelOption
Definition: fxglobals.h:78
@ OkForDownLevel
Definition: fxglobals.h:80
@ NotOkForDownLevel
Definition: fxglobals.h:79
struct _FX_DRIVER_GLOBALS FX_DRIVER_GLOBALS
BOOLEAN IsWindowsVerifierOn(_In_ MdDriverObject DriverObject)
Definition: globals.cpp:953
_Must_inspect_result_ NTSTATUS FxInitialize(__inout PFX_DRIVER_GLOBALS FxDriverGlobals, __in MdDriverObject DriverObject, __in PCUNICODE_STRING RegistryPath, __in_opt PWDF_DRIVER_CONFIG DriverConfig)
Definition: globals.cpp:848
VOID FxLibraryGlobalsDecommission(VOID)
Definition: globals.cpp:742
_Must_inspect_result_ __inline BOOLEAN FxIsClassExtension(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PFX_DRIVER_GLOBALS ExtDriverGlobals)
Definition: fxglobals.h:965
_Must_inspect_result_ NTSTATUS FxLibraryGlobalsCommission(VOID)
Definition: globals.cpp:494
VOID FxFreeAllocatedMdlsDebugInfo(__in FxDriverGlobalsDebugExtension *DebugExtension)
Definition: globalskm.cpp:20
_Must_inspect_result_ BOOLEAN FxVerifyObjectTypeInTable(__in USHORT ObjectType)
Definition: globals.cpp:117
VOID FxFlushQueuedDpcs(VOID)
__inline _Must_inspect_result_ BOOLEAN IsOsVersionGreaterThanOrEqualTo(__in ULONG Major, __in ULONG Minor)
Definition: fxglobals.h:1094
__inline ULONG FxRandom(__inout PULONG RandomSeed)
Definition: fxglobals.h:1054
_Must_inspect_result_ __inline BOOLEAN FxIsPassiveLevelInterruptSupported(VOID)
Definition: fxglobals.h:1081
NTSTATUS(* PFN_WMI_QUERY_TRACE_INFORMATION)(__in TRACE_INFORMATION_CLASS TraceInformationClass, __out PVOID TraceInformation, __in ULONG TraceInformationLength, __out_opt PULONG RequiredLength, __in_opt PVOID Buffer)
Definition: fxglobals.h:678
VOID LockVerifierSection(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ PCUNICODE_STRING RegistryPath)
Definition: globals.cpp:783
VOID UnlockVerifierSection(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: globals.cpp:827
struct _FX_DRIVER_GLOBALS * PFX_DRIVER_GLOBALS
void FxVerifierLockInitialize(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
struct _FX_TELEMETRY_CONTEXT * PFX_TELEMETRY_CONTEXT
__inline size_t FxSizeTMax(__in size_t A, __in size_t B)
Definition: fxglobals.h:987
NTSTATUS(* PFN_WMI_TRACE_MESSAGE_VA)(__in TRACEHANDLE LoggerHandle, __in ULONG MessageFlags, __in LPGUID MessageGuid, __in USHORT MessageNumber, __in va_list MessageArgList)
Definition: fxglobals.h:688
_Must_inspect_result_ BOOLEAN FxVerifierGetTrackReferences(__in FxObjectDebugInfo *DebugInfo, __in WDFTYPE ObjectType)
Definition: globals.cpp:338
struct _FX_OBJECT_INFO FX_OBJECT_INFO
struct _FX_OBJECT_INFO * PFX_OBJECT_INFO
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
FxTrackPowerOption
Definition: fxglobals.h:71
@ FxTrackPowerRefs
Definition: fxglobals.h:73
@ FxTrackPowerNone
Definition: fxglobals.h:72
@ FxTrackPowerMaxValue
Definition: fxglobals.h:75
@ FxTrackPowerRefsAndStack
Definition: fxglobals.h:74
PCSTR FxObjectTypeToHandleName(__in WDFTYPE ObjectType)
Definition: globals.cpp:316
VOID FxCheckAssumptions(VOID)
__inline LONG FxInterlockedIncrementFloor(__inout LONG volatile *Target, __in LONG Floor)
Definition: fxglobals.h:1007
WaitSignalFlags
Definition: fxglobals.h:83
@ WaitSignalBreakUnderDebugger
Definition: fxglobals.h:85
@ WaitSignalAlwaysBreak
Definition: fxglobals.h:86
@ WaitSignalBreakUnderVerifier
Definition: fxglobals.h:84
struct _FX_TELEMETRY_CONTEXT FX_TELEMETRY_CONTEXT
VOID FxDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: globals.cpp:981
_Must_inspect_result_ BOOLEAN __inline FxIsEqualGuid(__in CONST GUID *Lhs, __in CONST GUID *Rhs)
Definition: fxglobals.h:977
FxLibraryGlobalsType FxLibraryGlobals
Definition: globals.cpp:95
struct _WDF_DRIVER_CONFIG * PWDF_DRIVER_CONFIG
Definition: fxglobals.h:604
__inline LONG FxInterlockedIncrementGTZero(__inout LONG volatile *Target)
Definition: fxglobals.h:1045
FxObjectDebugInfoFlags
Definition: fxglobals.h:67
@ FxObjectDebugTrackReferences
Definition: fxglobals.h:68
__inline size_t FxSizeTMin(__in size_t A, __in size_t B)
Definition: fxglobals.h:997
VOID(STDCALL * PFN_POX_ACTIVATE_COMPONENT)(__in POHANDLE Handle, __in ULONG Component, __in ULONG Flags)
Definition: fxglobalskm.h:254
VOID(STDCALL * PFN_POX_COMPLETE_IDLE_CONDITION)(__in POHANDLE Handle, __in ULONG Component)
Definition: fxglobalskm.h:283
VOID(STDCALL * PFN_VF_CHECK_NX_POOL_TYPE)(_In_ POOL_TYPE PoolType, _In_ PVOID CallingAddress, _In_ ULONG PoolTag)
Definition: fxglobalskm.h:315
NTSTATUS(STDCALL * PFN_IO_DISCONNECT_INTERRUPT_EX)(__in PIO_DISCONNECT_INTERRUPT_PARAMETERS Parameters)
Definition: fxglobalskm.h:104
VOID(STDCALL * PFN_POX_IDLE_COMPONENT)(__in POHANDLE Handle, __in ULONG Component, __in ULONG Flags)
Definition: fxglobalskm.h:262
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
VOID(STDCALL * PFN_POX_UNREGISTER_DEVICE)(__in POHANDLE Handle)
Definition: fxglobalskm.h:248
VOID(STDCALL * PFN_POX_COMPLETE_IDLE_STATE)(__in POHANDLE Handle, __in ULONG Component)
Definition: fxglobalskm.h:276
NTSTATUS(STDCALL * PFN_IO_UNREGISTER_PLUGPLAY_NOTIFICATION_EX)(__in PVOID NotificationEntry)
Definition: fxglobalskm.h:228
VOID(STDCALL * PFN_KE_SET_TARGET_PROCESSOR_DPC)(__in PRKDPC Dpc, __in CCHAR Number)
Definition: fxglobalskm.h:175
VOID(STDCALL * PFN_POX_SET_DEVICE_IDLE_TIMEOUT)(__in POHANDLE Handle, __in ULONGLONG IdleTimeout)
Definition: fxglobalskm.h:296
VOID(STDCALL * PFN_POX_COMPLETE_DEVICE_POWER_NOT_REQUIRED)(__in POHANDLE Handle)
Definition: fxglobalskm.h:290
NTSTATUS(STDCALL * PFN_POX_REGISTER_DEVICE)(__in MdDeviceObject Pdo, __in PPO_FX_DEVICE PoxDevice, __out POHANDLE *Handle)
Definition: fxglobalskm.h:234
VOID(STDCALL * PFN_POX_REPORT_DEVICE_POWERED_ON)(__in POHANDLE Handle)
Definition: fxglobalskm.h:270
KAFFINITY(STDCALL * PFN_KE_QUERY_ACTIVE_PROCESSORS)(VOID)
Definition: fxglobalskm.h:169
VOID(STDCALL * PFN_POX_START_DEVICE_POWER_MANAGEMENT)(__in POHANDLE Handle)
Definition: fxglobalskm.h:242
PVOID FxPoolAllocator(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PFX_POOL Pool, __in POOL_TYPE Type, __in SIZE_T Size, __in ULONG Tag, __in PVOID CallersAddress)
Definition: wdfpool.cpp:76
USHORT WDFTYPE
Definition: fxtypes.h:29
ULONG Handle
Definition: gdb_input.c:15
const GLubyte * c
Definition: glext.h:8905
#define InterlockedCompareExchange
Definition: interlocked.h:104
#define _ReturnAddress()
Definition: intrin_arm.h:35
#define c
Definition: ke_i.h:80
#define ASSERT(a)
Definition: mode.c:44
ObjectType
Definition: metafile.c:81
#define __bcount(size)
Definition: ms_sal.h:2671
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _In_
Definition: ms_sal.h:308
BOOLEAN(STDCALL * PFN_KE_SET_COALESCABLE_TIMER)(__inout PKTIMER Timer, __in LARGE_INTEGER DueTime, __in ULONG Period, __in ULONG TolerableDelay, __in_opt PKDPC Dpc)
Definition: mxtimerkm.h:29
#define MEMORY_ALLOCATION_ALIGNMENT
Definition: ntbasedef.h:90
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define CONST
Definition: pedump.c:81
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
Definition: fxpool.h:63
FxTrackPowerOption TrackPower
Definition: fxglobals.h:145
FxAllocatedMdls AllocatedMdls
Definition: fxglobals.h:124
FxObjectDebugInfo * ObjectDebugInfo
Definition: fxglobals.h:118
LIST_ENTRY AllocatedTagTrackersListHead
Definition: fxglobals.h:134
FX_DRIVER_TRACKER_CACHE_AWARE DriverTracker
Definition: fxglobals.h:812
PDEVICE_OBJECT LibraryDeviceObject
Definition: fxglobals.h:728
PFN_KE_QUERY_ACTIVE_PROCESSORS KeQueryActiveProcessors
Definition: fxglobals.h:734
PFN_IO_REPORT_INTERRUPT_INACTIVE IoReportInterruptInactive
Definition: fxglobals.h:764
PVOID VerifierSectionHandle
Definition: fxglobals.h:842
PFN_POX_REGISTER_DEVICE PoxRegisterDevice
Definition: fxglobals.h:742
PFN_KE_SET_TARGET_PROCESSOR_DPC KeSetTargetProcessorDpc
Definition: fxglobals.h:736
PFN_POX_COMPLETE_DEVICE_POWER_NOT_REQUIRED PoxCompleteDevicePowerNotRequired
Definition: fxglobals.h:758
PFN_POX_START_DEVICE_POWER_MANAGEMENT PoxStartDevicePowerManagement
Definition: fxglobals.h:744
LIST_ENTRY FxDriverGlobalsList
Definition: fxglobals.h:774
PVOID DummyPerfTraceRoutines
Definition: fxglobals.h:863
PFN_IO_DISCONNECT_INTERRUPT_EX IoDisconnectInterruptEx
Definition: fxglobals.h:732
PFN_POX_COMPLETE_IDLE_STATE PoxCompleteIdleState
Definition: fxglobals.h:754
PFX_DUMP_DRIVER_INFO_ENTRY BugCheckDriverInfo
Definition: fxglobals.h:791
RTL_OSVERSIONINFOEXW OsVersionInfo
Definition: fxglobals.h:770
KBUGCHECK_REASON_CALLBACK_RECORD BugCheckCallbackRecord
Definition: fxglobals.h:796
PFN_POX_IDLE_COMPONENT PoxIdleComponent
Definition: fxglobals.h:750
PFN_KE_SET_COALESCABLE_TIMER KeSetCoalescableTimer
Definition: fxglobals.h:738
ULONG BugCheckDriverInfoCount
Definition: fxglobals.h:785
PFN_IO_CONNECT_INTERRUPT_EX IoConnectInterruptEx
Definition: fxglobals.h:730
PFN_POX_REPORT_DEVICE_POWERED_ON PoxReportDevicePoweredOn
Definition: fxglobals.h:752
PDRIVER_OBJECT DriverObject
Definition: fxglobals.h:719
PFN_VF_CHECK_NX_POOL_TYPE VfCheckNxPoolType
Definition: fxglobals.h:766
PFN_IO_REPORT_INTERRUPT_ACTIVE IoReportInterruptActive
Definition: fxglobals.h:762
PFN_POX_COMPLETE_IDLE_CONDITION PoxCompleteIdleCondition
Definition: fxglobals.h:756
BOOLEAN PassiveLevelInterruptSupport
Definition: fxglobals.h:820
PFX_DRIVER_GLOBALS BestDriverForDumpLog
Definition: fxglobals.h:817
BOOLEAN InternalTracingInitialized
Definition: fxglobals.h:804
PFN_IO_UNREGISTER_PLUGPLAY_NOTIFICATION_EX IoUnregisterPlugPlayNotificationEx
Definition: fxglobals.h:740
PFN_POX_ACTIVATE_COMPONENT PoxActivateComponent
Definition: fxglobals.h:748
ULONG BugCheckDriverInfoIndex
Definition: fxglobals.h:780
BOOLEAN ProcessorGroupSupport
Definition: fxglobals.h:798
PFN_POX_SET_DEVICE_IDLE_TIMEOUT PoxSetDeviceIdleTimeout
Definition: fxglobals.h:760
BOOLEAN MachineSleepStates[FxMachineSleepStatesMax]
Definition: fxglobals.h:836
BOOLEAN IsUserModeFramework
Definition: fxglobals.h:825
MxLockNoDynam FxDriverGlobalsListLock
Definition: fxglobals.h:772
PFN_POX_UNREGISTER_DEVICE PoxUnregisterDevice
Definition: fxglobals.h:746
volatile LONG VerifierSectionHandleRefCount
Definition: fxglobals.h:848
struct FxObjectDebugInfo::@4761::@4762 Bits
union FxObjectDebugInfo::@4761 u
USHORT ObjectType
Definition: fxglobals.h:94
USHORT TrackReferences
Definition: fxglobals.h:108
Definition: ncftp.h:79
BOOLEAN FxPoolTrackingOn
Definition: fxglobals.h:393
_Must_inspect_result_ BOOLEAN IsCorrectVersionRegistered(_In_ PCUNICODE_STRING ServiceKeyName)
Definition: globalskm.cpp:112
BOOLEAN IsObjectDebugOn(VOID)
Definition: fxglobals.h:223
LIST_ENTRY Linkage
Definition: fxglobals.h:339
BOOLEAN FxVerifierOn
Definition: fxglobals.h:420
ULONG RemoveLockOptionFlags
Definition: fxglobals.h:494
LONG WdfVerifierAllocateFailCount
Definition: fxglobals.h:362
BOOLEAN FxVerifierDbgBreakOnDeviceStateError
Definition: fxglobals.h:436
ULONG __inline AddRef(__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
Definition: fxglobals.h:169
ULONG DbgWaitForWakeInterruptIsrTimeoutInSec
Definition: fxglobals.h:534
FxDriver * Driver
Definition: fxglobals.h:374
ULONG FxEnhancedVerifierOptions
Definition: fxglobals.h:518
BOOLEAN FxVerifyDownlevel
Definition: fxglobals.h:426
FxLibraryGlobalsType * LibraryGlobals
Definition: fxglobals.h:378
VOID SetVerifierState(__in BOOLEAN State)
Definition: fxglobals.h:236
PWDF_BIND_INFO WdfBindInfo
Definition: fxglobals.h:405
ULONG BugCheckDriverInfoIndex
Definition: fxglobals.h:506
PLIST_ENTRY ThreadTable
Definition: fxglobals.h:400
_Must_inspect_result_ BOOLEAN IsVersionGreaterThanOrEqualTo(__in ULONG Major, __in ULONG Minor)
Definition: globalskm.cpp:92
BOOLEAN FxForceLogsInMiniDump
Definition: fxglobals.h:477
BOOLEAN FxVerifierIO
Definition: fxglobals.h:446
__inline _Must_inspect_result_ BOOLEAN IsDownlevelVerificationEnabled()
Definition: fxglobals.h:314
BOOLEAN FxVerifierLock
Definition: fxglobals.h:451
BOOLEAN FxVerifierDbgBreakOnError
Definition: fxglobals.h:431
BOOLEAN FxVerifierHandle
Definition: fxglobals.h:441
KBUGCHECK_REASON_CALLBACK_RECORD BugCheckCallbackRecord
Definition: fxglobals.h:511
VOID RegisterClientVersion(_In_ PCUNICODE_STRING ServiceKeyName)
Definition: globalskm.cpp:162
FX_POOL FxPoolFrameworks
Definition: fxglobals.h:388
ULONG_PTR WdfHandleMask
Definition: fxglobals.h:356
FxDriverGlobalsDebugExtension * DebugExtension
Definition: fxglobals.h:376
MxLock ThreadTableLock
Definition: fxglobals.h:398
CWudfDriverGlobals * UfxDriverGlobals
Definition: fxglobals.h:537
PFX_TELEMETRY_CONTEXT TelemetryContext
Definition: fxglobals.h:540
BOOLEAN IsUserModeDriver
Definition: fxglobals.h:488
DECLSPEC_ALIGN(MEMORY_ALLOCATION_ALIGNMENT) WDF_DRIVER_GLOBALS Public
_Must_inspect_result_ BOOLEAN IsDebuggerAttached(VOID)
Definition: globalskm.cpp:250
ULONG FxVerifierDbgWaitForSignalTimeoutInSec
Definition: fxglobals.h:527
BOOLEAN FxVerboseOn
Definition: fxglobals.h:462
_Must_inspect_result_ BOOLEAN IsVerificationEnabled(__in ULONG Major, __in ULONG Minor, __in FxVerifierDownlevelOption DownLevel)
Definition: fxglobals.h:286
BOOLEAN FxRequestParentOptimizationOn
Definition: fxglobals.h:467
BOOLEAN FxTrackDriverForMiniDumpLog
Definition: fxglobals.h:483
VOID WaitForSignal(__in MxEvent *Event, __in PCSTR ReasonForWaiting, __in PVOID Handle, __in ULONG WarningTimeoutInSec, __in ULONG WaitSignalFlags)
Definition: globals.cpp:1705
MxEvent DestroyEvent
Definition: fxglobals.h:351
ULONG __inline Release(__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
Definition: fxglobals.h:193
BOOLEAN IsPoolTrackingOn(VOID)
Definition: fxglobals.h:215
BOOLEAN FxVerifyOn
Definition: fxglobals.h:457
Definition: fxbugcheck.h:81
const CHAR * Name
Definition: fxglobals.h:880
USHORT ObjectType
Definition: fxglobals.h:898
const CHAR * HandleName
Definition: fxglobals.h:887
volatile LONG DoOnceFlagsBitmap
Definition: fxglobals.h:162
Definition: typedefs.h:120
ULONG dwMajorVersion
Definition: rtltypes.h:270
ULONG dwMinorVersion
Definition: rtltypes.h:271
uint32_t * PULONG
Definition: typedefs.h:59
char * PSTR
Definition: typedefs.h:51
INT POOL_TYPE
Definition: typedefs.h:78
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PWDF_DRIVER_CONFIG DriverConfig
Definition: wdfdriver.h:219
@ WdfVerifierOn
Definition: wdfdriver.h:54
@ WdfVerifyOn
Definition: wdfdriver.h:53
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
#define FORCEINLINE
Definition: wdftypes.h:67
_In_ ULONG _Out_opt_ PULONG RequiredLength
Definition: wmifuncs.h:30
_In_ ULONG TraceInformationLength
Definition: wmifuncs.h:29
enum _TRACE_INFORMATION_CLASS TRACE_INFORMATION_CLASS
_Out_opt_ PULONG Minor
Definition: cmfuncs.h:44
_Must_inspect_result_ typedef _In_ ULONG _In_ ULONG MessageNumber
Definition: iotypes.h:4304
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175