ReactOS 0.4.16-dev-1946-g52006dd
globals.cpp
Go to the documentation of this file.
1
2/*++
3
4Copyright (c) Microsoft Corporation
5
6Module Name:
7
8 globals.cpp
9
10Abstract:
11
12 This contains all Driver Frameworks configuration globals.
13
14Author:
15
16
17
18
19Environment:
20
21 Both kernel and user mode
22
23Revision History:
24
25
26
27
28
29
30
31
32
33
34
35
36
37--*/
38
39
40#include "fxobjectpch.hpp"
41
42// Tracing support
43extern "C" {
44#if defined(EVENT_TRACING)
45#include "globals.tmh"
46#endif
47}
48
49extern "C" {
50
51#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
52VOID
54 VOID
55 );
56#ifdef ALLOC_PRAGMA
57#pragma alloc_text(WDF_FX_VF_SECTION_NAME, VerifierPageLockHandle)
58#endif
59#endif
60
61//
62// Private methods.
63//
64
65VOID
67 VOID
68 );
69
70VOID
72 __inout PFX_DRIVER_GLOBALS FxDriverGlobals,
74 __in BOOLEAN WindowsVerifierOn
75 );
76
81 __in PFX_DRIVER_GLOBALS FxDriverGlobals
82 );
83
84VOID
87 __out FxTrackPowerOption* TrackPower
88 );
89
90//
91// Global allocation tracker
92//
94
96
97//
98// These are defined in FxObjectInfo.cpp to account for the facts that
99// 1. FxObjectInfo array is different for UMDF and KMDF,
100// 2. and not all the types are available in the common code
101//
102extern const FX_OBJECT_INFO FxObjectsInfo[];
104
105//
106// Prevent compiler/linker/BBT from optimizing the global variable away
107//
108#if defined(_M_IX86)
109#pragma comment(linker, "/include:_FxObjectsInfoCount")
110#else
111#pragma comment(linker, "/include:FxObjectsInfoCount")
112#endif
113
114
119 )
120{
121 ULONG i;
122
123 for (i = 0; i < FxObjectsInfoCount; i++) {
125 return TRUE;
126 }
127 else if (ObjectType > FxObjectsInfo[i].ObjectType) {
128 continue;
129 }
130
131 return FALSE;
132 }
133
134 return FALSE;
135}
136
140 __in LPWSTR HandleNameList,
141 __in PFX_DRIVER_GLOBALS FxDriverGlobals
142 )
143
144/*++
145
146Routine Description:
147 Allocates an array of FxObjectDebugInfo's. The length of this array is the
148 same length as FxObjectsInfo. The array is sorted the same as
149 FxObjectDebugInfo, ObjectInfo is ascending in the list.
150
151 If HandleNameList's first string is "*", we treat this as a wildcard and
152 track all external handles.
153
154Arguments:
155 HandleNameList - a multi-sz of handle names. It is assumed the multi sz is
156 well formed.
157
158Return Value:
159 a pointer allocated by ExAllocatePoolWithTag. The caller is responsible for
160 eventually freeing the pointer by calling ExFreePool.
161
162--*/
163
164{
165 FxObjectDebugInfo* pInfo;
166 PWCHAR pCur;
167 ULONG i, length;
168 BOOLEAN all;
169
170 //
171 // check to see if the multi sz is empty
172 //
173 if (*HandleNameList == NULL) {
174 return NULL;
175 }
176
178
179 //
180 // Freed with ExFreePool in FxFreeDriverGlobals. Must be non paged because
181 // objects can be allocated at IRQL > PASSIVE_LEVEL.
182 //
184 length,
185 FxDriverGlobals->Tag);
186
187 if (pInfo == NULL) {
188 return NULL;
189 }
190
191 all = *HandleNameList == L'*' ? TRUE : FALSE;
192
193 RtlZeroMemory(pInfo, length);
194
195 //
196 // Iterate over all of the objects in our internal array. We iterate over
197 // this array instead of the multi sz list b/c this way we only convert
198 // each ANSI string to UNICODE once.
199 //
200 for (i = 0; i < FxObjectsInfoCount; i++) {
201 UNICODE_STRING objectName;
202 WCHAR ubuffer[40];
204
206
207 //
208 // If this is an internal object, just continue past it
209 //
210 if (FxObjectsInfo[i].HandleName == NULL) {
211 continue;
212 }
213
214 //
215 // Short circuit if we are wildcarding
216 //
217 if (all) {
219 continue;
220 }
221
222 RtlInitAnsiString(&string, FxObjectsInfo[i].HandleName);
223
224 RtlZeroMemory(ubuffer, sizeof(ubuffer));
225 objectName.Buffer = ubuffer;
226 objectName.Length = 0;
227 objectName.MaximumLength = sizeof(ubuffer);
228
229 //
230 // Conversion failed, just continue. Failure is not critical to
231 // returning the list.
232 //
234 &string,
235 FALSE))) {
236 continue;
237 }
238
239 //
240 // Now iterate over the multi sz list, comparing handle strings in the
241 // list against the current object name.
242 //
243 pCur = HandleNameList;
244
245 while (*pCur != UNICODE_NULL) {
246 UNICODE_STRING handleName;
247
248 RtlInitUnicodeString(&handleName, pCur);
249
250 //
251 // Increment to the next string now. Add one so that we skip past
252 // terminating null for this sz as well.
253 // Length is the number of bytes, not the number of characters.
254 //
255 pCur += handleName.Length / sizeof(WCHAR) + 1;
256
257 //
258 // Case insensitive compare
259 //
260 if (RtlCompareUnicodeString(&handleName, &objectName, TRUE) == 0) {
262 break;
263 }
264 }
265 }
266
267 return pInfo;
268}
269
270VOID
272 __inout PFX_DRIVER_GLOBALS FxDriverGlobals,
274 )
275{
277
278 //
279 // The wdf subkey may not be present for inbox drivers that do not use inf.
280 // Since Mdl tracking doen't need regsitry info we go ahead and allocate
281 // debug extension for use in Mdl tracking. Tag tracker depends on registry
282 // info and it won't be available if registry info is not present.
283 //
284
286 NonPagedPool, sizeof(FxDriverGlobalsDebugExtension), FxDriverGlobals->Tag);
287
288 if (pExtension == NULL) {
289 return;
290 }
291
292 *pExtension = {};
293
295
297
298 pExtension->TrackPower = FxTrackPowerNone;
299
300 FxDriverGlobals->DebugExtension = pExtension;
301
302 if (Key != NULL) {
304 Key,
305 FxDriverGlobals
306 );
308 }
309
310#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
312#endif
313}
314
315PCSTR
318 )
319{
320 ULONG i;
321
322 for (i = 0; i < FxObjectsInfoCount; i++) {
324 return FxObjectsInfo[i].HandleName;
325 }
326 else if (ObjectType > FxObjectsInfo[i].ObjectType) {
327 continue;
328 }
329
330 return NULL;
331 }
332
333 return NULL;
334}
335
339 __in FxObjectDebugInfo* DebugInfo,
341 )
342
343/*++
344
345Routine Description:
346 For a given object type, returns to the caller if it should track references
347 to the object.
348
349Arguments:
350 DebugInfo - array of object debug info to search through
351 ObjectType - the type of the object to check
352
353Return Value:
354 TRUE if references should be tracked, FALSE otherwise
355
356--*/
357
358{
359 ULONG i;
360
361 //
362 // Array size of DebugInfo is the same size as FxObjectsInfo
363 //
364 for (i = 0; i < FxObjectsInfoCount; i++) {
365 if (ObjectType == DebugInfo[i].ObjectType) {
366 return FLAG_TO_BOOL(DebugInfo[i].u.DebugFlags,
368 }
369 else if (ObjectType > FxObjectsInfo[i].ObjectType) {
370 continue;
371 }
372
373 return FALSE;
374 }
375
376 return FALSE;
377}
378
379
380VOID
382 VOID
383 )
384{
385 ULONG i;
386 USHORT prevType;
387
388 prevType = FxObjectsInfo[0].ObjectType;
389
390 for (i = 1; i < FxObjectsInfoCount; i++) {
391 if (prevType >= FxObjectsInfo[i].ObjectType) {
392 ASSERTMSG("FxObjectsInfo table is not in sorted order\n",
393 prevType < FxObjectsInfo[i].ObjectType);
394 }
395
396 prevType = FxObjectsInfo[i].ObjectType;
397 }
398}
399
400typedef
403 __out PRTL_OSVERSIONINFOW VersionInformation
404 );
405
406typedef
412 );
413
414typedef
420 );
421
422VOID
424 VOID
425 )
426{
428 PFN_RTL_VERIFY_VERSION_INFO pRtlVerifyVersionInfo;
429 PFN_VER_SET_CONDITION_MASK pVerSetConditionMask;
432
433 pRtlVerifyVersionInfo = (PFN_RTL_VERIFY_VERSION_INFO)
434 Mx::MxGetSystemRoutineAddress(MAKE_MX_FUNC_NAME("RtlVerifyVersionInfo"));
435
436 if (pRtlVerifyVersionInfo == NULL) {
437 return;
438 }
439
440 pVerSetConditionMask = (PFN_VER_SET_CONDITION_MASK)
441 Mx::MxGetSystemRoutineAddress(MAKE_MX_FUNC_NAME("VerSetConditionMask"));
442
443 //
444 // Check for Win8 (6.2) and later for passive-level interrupt support.
445 //
446 RtlZeroMemory(&info, sizeof(info));
447 info.dwOSVersionInfoSize = sizeof(info);
448 info.dwMajorVersion = 6;
449 info.dwMinorVersion = 2;
450
451 condition = 0;
452 condition = pVerSetConditionMask(condition, VER_MAJORVERSION, VER_GREATER_EQUAL);
453 condition = pVerSetConditionMask(condition, VER_MINORVERSION, VER_GREATER_EQUAL);
454
455 status = pRtlVerifyVersionInfo(&info,
457 condition);
458 if (NT_SUCCESS(status)) {
460 }
461}
462
463VOID
465 VOID
466 )
467{
468 FxAutoRegKey hWdf;
472 ULONG ifrDisabled = 0;
473
474 status = FxRegKey::_OpenKey(NULL, &path, &hWdf.m_Key, KEY_READ);
475 if (!NT_SUCCESS(status)) {
476 goto exit;
477 }
478
479 status = FxRegKey::_QueryULong(hWdf.m_Key, &ifrDisabledName, &ifrDisabled);
480 if (!NT_SUCCESS(status)) {
481 goto exit;
482 }
483
484 if (ifrDisabled == 1) {
486 }
487
488exit:
489 return;
490}
491
495 VOID
496 )
497{
498 PFN_RTL_GET_VERSION pRtlGetVersion;
500
501 //
502 // Global initialization for mode-agnostic primitives library
503 //
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
522#else
524#endif
525
526 //
527 // IFR is enabled by default
528 //
530
531 //
532 // Query global WDF settings (both KMDF and UMDF).
533 //
535
536#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
537 UNICODE_STRING funcName;
538
539 // For DSF support.
540 RtlInitUnicodeString(&funcName, L"IoConnectInterruptEx");
542 MmGetSystemRoutineAddress(&funcName);
543
544 RtlInitUnicodeString(&funcName, L"IoDisconnectInterruptEx");
546 MmGetSystemRoutineAddress(&funcName);
547
548 // 32 bit: W2k and forward.
549 // 64 bit: W2k -> Windows Server 2008 (obsolete otherwise).
550 RtlInitUnicodeString(&funcName, L"KeQueryActiveProcessors");
552 MmGetSystemRoutineAddress(&funcName);
553
554 RtlInitUnicodeString(&funcName, L"KeSetTargetProcessorDpc");
556 MmGetSystemRoutineAddress(&funcName);
557
558 // These should always be there (obsolete in 64 bit Win 7 and forward).
561
562 // Win 7 and forward.
563 RtlInitUnicodeString(&funcName, L"KeQueryActiveGroupCount");
564 if (MmGetSystemRoutineAddress(&funcName) != NULL) {
566 }
567
568 // Win 7 and forward.
569 RtlInitUnicodeString(&funcName, L"KeSetCoalescableTimer");
571 MmGetSystemRoutineAddress(&funcName);
572
573 // Win 7 and forward.
574 RtlInitUnicodeString(&funcName, L"IoUnregisterPlugPlayNotificationEx");
576 MmGetSystemRoutineAddress(&funcName);
577
578 // Win 8 and forward
579 RtlInitUnicodeString(&funcName, L"PoFxRegisterDevice");
582
583 // Win 8 and forward
584 RtlInitUnicodeString(&funcName, L"PoFxStartDevicePowerManagement");
587 MmGetSystemRoutineAddress(&funcName);
588
589 // Win 8 and forward
590 RtlInitUnicodeString(&funcName, L"PoFxUnregisterDevice");
593 MmGetSystemRoutineAddress(&funcName);
594
595 // Win 8 and forward
596 RtlInitUnicodeString(&funcName, L"PoFxActivateComponent");
598 MmGetSystemRoutineAddress(&funcName);
599
600 // Win 8 and forward
601 RtlInitUnicodeString(&funcName, L"PoFxIdleComponent");
603 MmGetSystemRoutineAddress(&funcName);
604
605 // Win 8 and forward
606 RtlInitUnicodeString(&funcName, L"PoFxReportDevicePoweredOn");
609
610 // Win 8 and forward
611 RtlInitUnicodeString(&funcName, L"PoFxCompleteIdleState");
614
615 // Win 8 and forward
616 RtlInitUnicodeString(&funcName, L"PoFxCompleteIdleCondition");
619
620 // Win 8 and forward
621 RtlInitUnicodeString(&funcName, L"PoFxCompleteDevicePowerNotRequired");
624
625 // Win 8 and forward
626 RtlInitUnicodeString(&funcName, L"PoFxSetDeviceIdleTimeout");
629
630 // Win 8 and forward
631 RtlInitUnicodeString(&funcName, L"IoReportInterruptActive");
634
635 // Win 8 and forward
636 RtlInitUnicodeString(&funcName, L"IoReportInterruptInactive");
639
640 // Win 8.2 and forward
641 RtlInitUnicodeString(&funcName, L"VfCheckNxPoolType");
644
645#endif //((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
646
648
649 // User/Kernel agnostic.
650
651 pRtlGetVersion = (PFN_RTL_GET_VERSION)
653
654 ASSERT(pRtlGetVersion != NULL);
657
658 //
659 // Initialize power management-related stuff.
660 //
663
664 //
665 // Insure that the FxObject is layed-up correctly.
666 //
668
669 //
670 // Initialize the list of FxDriverGlobals.
671 // This is essentially the list of drivers on this WDF version.
672 //
675
676#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
677 //
678 // Register for the global (library) bugcheck callbacks.
679 //
681#ifdef EVENT_TRACING // __REACTOS__
682 //
683 // Init driver usage tracker. This tracker is used by the debug dump
684 // callback routines for finding the driver's dump log file to write
685 // in the minidump. Ignore any tracker's errors.
686 //
688
689 //
690 // Initialize enhanced-verifier section handle
691 //
694
695 //
696 // Retrieve a pointer to the data structure that cotains trace routines
697 // corresponding to WdfNotifyRoutinesClass from the SystemTraceProvider
698 // that we'll use for perf tracing of WDF operations. The trace
699 // routines inside the structuyre are present only when tracing is enabled
700 // by some trace client (e.g. tracelog or xperf) for WDF specific perf
701 // groups. Note that no unregistration is necessary.
702 //
703 status = WmiQueryTraceInformation(WdfNotifyRoutinesClass,
705 sizeof(PWMI_WDF_NOTIFY_ROUTINES),
706 NULL,
707 NULL);
708
709 if (!NT_SUCCESS(status)) {
710 //
711 // WDF trace routines are available only on win8+, so failure is
712 // expected on pre-Win8 OS. Use the dummy routines on failure.
713 //
715 sizeof(WMI_WDF_NOTIFY_ROUTINES));
717 sizeof(WMI_WDF_NOTIFY_ROUTINES);
721 }
722
723 //
724 // The Size member of WMI_WDF_NOTIFY_ROUTINES allows versioning. When
725 // the WMI_WDF_NOTIFY_ROUTINES structure is revised with additional
726 // members in future OS versions, the Size member will allow validating
727 // the various versions, and initializeing the structure correctly.
728 //
730 sizeof(WMI_WDF_NOTIFY_ROUTINES));
731#else
732 status = STATUS_SUCCESS; // __REACTOS__
733#endif // EVENT_TRACING
734#else
736#endif
737
738 return status;
739}
740
741VOID
743 VOID
744 )
745{
746 //
747 // Assure the all driver's FxDriverGlobals have been freed.
748 //
750
751#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
752 //
753 // Cleanup for the driver usage tracker.
754 //
756
757 //
758 // Deregister from the global (library) bugcheck callbacks.
759 //
761#endif
762
764
765 return;
766}
767
768#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
769//
770// This function is only used to lock down verifier section code in memory.
771// It uses the #pragma alloc_text(...) style for paging.
772//
773VOID
775 VOID
776 )
777{
779 DO_NOTHING();
780}
781
782VOID
784 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals,
786 )
787{
788 LONG count;
789
790 //
791 // This asserts makes sure the struct is not pack(1) and the counter
792 // is correctly aligned on a 32 bit boundary.
793 //
794 C_ASSERT((FIELD_OFFSET(FxLibraryGlobalsType, VerifierSectionHandleRefCount)
795 % __alignof(LONG)) == 0);
796
798 ASSERT(count > 0);
799
800 //
801 // If verifier section is unlocked, lock it in.
802 //
804 //
805 //First time verifier section is being locked.
806 //
808 "First time Locking (%d) in Verifier Paged Memory "
809 "from %!wZ! from driver globals %p",
810 count, RegistryPath, FxDriverGlobals);
811 //
812 // VerifierLockHandle is a function that we use to lock in all the code from it's section
813 // since all the verifier code is in the same section as VerifierLockHandle.
814 //
816 }
817 else {
818 MmLockPagableSectionByHandle(FxLibraryGlobals.VerifierSectionHandle);
820 "Increment Lock counter (%d) for Verifier Paged Memory "
821 "from %!wZ! from driver globals %p",
822 count, RegistryPath, FxDriverGlobals);
823 }
824}
825
826VOID
828 _In_ PFX_DRIVER_GLOBALS FxDriverGlobals
829 )
830{
832 LONG count;
833
835 ASSERT(count >= 0);
836
837 MmUnlockPagableImageSection(FxLibraryGlobals.VerifierSectionHandle);
839 "Decrement UnLock counter (%d) for Verifier Paged Memory "
840 "with driver globals %p",
841 count, FxDriverGlobals);
842 }
843}
844#endif
845
849 __inout PFX_DRIVER_GLOBALS FxDriverGlobals,
853 )
854
855/*++
856
857Routine Description:
858
859 This is the global framework initialization routine.
860
861 This is called when the framework is loaded, and by
862 any drivers that use the framework.
863
864 It is safe to call if already initialized, to handle
865 cases where multiple drivers are sharing a common
866 kernel DLL.
867
868 This method is used instead of relying on C++ static class
869 constructors in kernel mode.
870
871Arguments:
872
873
874Returns:
875
876 NTSTATUS
877
878--*/
879
880{
882 BOOLEAN windowsVerifierOn = FALSE;
883
885
886 //
887 // Check if windows driver verifier is on for this driver
888 // We need this when initializing wdf verifier
889 //
890 windowsVerifierOn = IsWindowsVerifierOn(DriverObject);
891
892 //
893 // Get registry values first since these effect the
894 // rest of initialization
895 //
896 FxRegistrySettingsInitialize(FxDriverGlobals,
898 windowsVerifierOn);
899
900 //
901 // Initialize IFR logging
902 //
903 // FxIFRStart(FxDriverGlobals, RegistryPath, DriverObject); __REACTOS__
904
906 "Initialize globals for %!wZ!", RegistryPath);
907
908 //
909 // Only first one initializes the frameworks globals
910 //
911 status = FxPoolPackageInitialize(FxDriverGlobals);
912 if (!NT_SUCCESS(status)) {
913 //
914 // FxPoolPackageInitialize logs a message in case of failure so
915 // we don't need to log failure here.
916 //
917 // FxIFRStop(FxDriverGlobals); __REACTOS__
918 return status;
919 }
920
921 //
922 // Lock verifier package
923 //
924 FxVerifierLockInitialize(FxDriverGlobals);
925
926#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
927 //
928 // Cache driver info for bugcheck callback.
929 //
930 FxCacheBugCheckDriverInfo(FxDriverGlobals);
931
932 //
933 // Register for bugcheck callbacks.
934 //
936#endif
937
938 if (NULL != RegistryPath) {
939 if (FALSE == FxDriverGlobals->IsCorrectVersionRegistered(RegistryPath))
940 FxDriverGlobals->RegisterClientVersion(RegistryPath);
941 }
942
943#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
944 if(FxDriverGlobals->FxVerifierOn){
945 LockVerifierSection(FxDriverGlobals, RegistryPath);
946 }
947#endif
948
949 return STATUS_SUCCESS;
950}
951
955 )
956{
957 BOOLEAN windowsVerifierOn = FALSE;
958
959#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
960 //
961 // Check if windows driver verifier is on for this driver
962 // We need this when initializing wdf verifier
963 //
964 windowsVerifierOn = MmIsDriverVerifying(DriverObject) ? TRUE: FALSE;
965
966#else
968
969 //
970 // For user-mode we check if app verifier's verifier.dll is loaded in this
971 // process (since app verifier doesn't provide any other way to detect its
972 // presence).
973 //
974 windowsVerifierOn = (GetModuleHandleW(L"verifier.dll") == NULL ? FALSE : TRUE);
975#endif
976
977 return windowsVerifierOn;
978}
979
980VOID
982 __in PFX_DRIVER_GLOBALS FxDriverGlobals
983 )
984
985/*++
986
987Routine Description:
988
989 This is the global framework uninitialization routine.
990
991 It is here for symmetry, and to allow a shared DLL based frameworks
992 to unload safely.
993
994Arguments:
995
996
997Returns:
998
999 NTSTATUS
1000
1001--*/
1002
1003{
1004 //
1005 // Release the last reference.
1006 //
1007 FxDriverGlobals->RELEASE((PVOID)FxDestroy);
1008
1009 //
1010 // Wait for everyone else to be done.
1011 //
1012 Mx::MxEnterCriticalRegion();
1013 FxDriverGlobals->DestroyEvent.WaitFor(Executive, KernelMode, FALSE, NULL);
1014 Mx::MxLeaveCriticalRegion();
1015
1016 //
1017 // Lock verifier package
1018 //
1019 FxVerifierLockDestroy(FxDriverGlobals);
1020
1021 //
1022 // Cleanup frameworks structures
1023 //
1024 FxPoolPackageDestroy(FxDriverGlobals);
1025
1026#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
1027 //
1028 // Deregister from the bugcheck callbacks.
1029 //
1030 FxUnregisterBugCheckCallback(FxDriverGlobals);
1031
1032 //
1033 // Purge driver info from bugcheck data.
1034 //
1035 FxPurgeBugCheckDriverInfo(FxDriverGlobals);
1036#endif
1037
1038#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
1039 //
1040 // unlock verifier image sections
1041 //
1042 if(FxDriverGlobals->FxVerifierOn){
1043 UnlockVerifierSection(FxDriverGlobals);
1044 }
1045#endif
1046
1047 return;
1048}
1049
1053 VOID
1054 )
1055{
1057 KIRQL irql;
1059
1062
1063 if (pFxDriverGlobals == NULL) {
1064 return NULL;
1065 }
1066
1067 *pFxDriverGlobals = {};
1068
1070
1072#if (FX_CORE_MODE==FX_CORE_USER_MODE)
1073 if (!NT_SUCCESS(status)) {
1075 return NULL;
1076 }
1077#else
1079#endif
1080
1081 //
1082 // Initialize this new FxDriverGlobals structure.
1083 //
1088
1095
1096 //
1097 // Verifier settings. Off by default.
1098 //
1100
1101 //
1102 // By default don't apply latest-version restricted verifier checks
1103 // to downlevel version drivers.
1104 //
1106
1107 //
1108 // Verbose is separate knob
1109 //
1111
1112 //
1113 // Do not parent queue presented requests.
1114 // This performance optimization is on by default.
1115 //
1117
1118 //
1119 // Enhanced verifier options. Off by default
1120 //
1122
1123 //
1124 // If FxVerifierDbgBreakOnError is true, WaitForSignal interrupts the
1125 // execution of the system after waiting for the specified number
1126 // of seconds. Developer will have an opportunity to validate the state
1127 // of the driver when breakpoint is hit. Developer can continue to wait
1128 // by entering 'g' in the debugger.
1129 //
1131
1132 //
1133 // Timeout used by the wake interrupt ISR in WaitForSignal to catch
1134 // scenarios where the interrupt ISR is blocked because the device stack
1135 // is taking too long to power up
1136 //
1138
1139 //
1140 // Minidump log related settings.
1141 //
1143
1144#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
1145 // pFxDriverGlobals->FxTrackDriverForMiniDumpLog = TRUE;
1148#else
1151#endif
1152
1153#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
1154 //
1155 // Minidump driver info related settings.
1156 //
1158#endif
1159
1160 //
1161 // By default disable the support for device simulation framework (DSF).
1162 //
1164
1165 //
1166 // Allocate a telemetry context if a telemetry client is enabled, for any level/keyword.
1167 //
1169#ifdef EVENT_TRACING // __REACTOS__
1170 if (TraceLoggingProviderEnabled(g_TelemetryProvider, 0 ,0)) {
1172 }
1173#endif
1174
1175 return &pFxDriverGlobals->Public;
1176}
1177
1178VOID
1180 __in PWDF_DRIVER_GLOBALS DriverGlobals
1181 )
1182{
1184 KIRQL irql;
1185
1186 pFxDriverGlobals = GetFxDriverGlobals(DriverGlobals);
1187
1192
1194
1196
1200 }
1201
1203
1206 }
1207
1208 //
1209 // Cleanup event b/c d'tor is not called for MxAllocatePoolWithTag.
1210 //
1212
1216 }
1217
1219}
1220
1224 __in HANDLE Key,
1225 __in PFX_DRIVER_GLOBALS FxDriverGlobals
1226 )
1227
1228/*++
1229
1230Routine Description:
1231 Attempts to open a value under the passed in key and create an array of
1232 FxObjectDebugInfo.
1233
1234Arguments:
1235 Key - Registry key to query the value for
1236
1237Return Value:
1238 NULL or a pointer which should be freed by the caller using ExFreePool
1239
1240--*/
1241
1242{
1243 FxObjectDebugInfo* pInfo;
1246 ULONG length, type;
1247 DECLARE_CONST_UNICODE_STRING(valueName, L"TrackHandles");
1248
1249 pInfo = NULL;
1251 length = 0;
1252
1253 //
1254 // Find out how big a buffer we need to allocate if the value is present
1255 //
1256 status = FxRegKey::_QueryValue(FxDriverGlobals,
1257 Key,
1258 &valueName,
1259 length,
1260 NULL,
1261 &length,
1262 &type);
1263
1264 //
1265 // We expect the list to be bigger then a standard partial, so if it is
1266 // not, just bail now.
1267 //
1269 return NULL;
1270 }
1271
1272 //
1273 // Pool can be paged b/c we are running at PASSIVE_LEVEL and we are going
1274 // to free it at the end of this function.
1275 //
1277 if (dataBuffer == NULL) {
1278 return NULL;
1279 }
1280
1281 //
1282 // Requery now that we have a big enough buffer
1283 //
1284 status = FxRegKey::_QueryValue(FxDriverGlobals,
1285 Key,
1286 &valueName,
1287 length,
1288 dataBuffer,
1289 &length,
1290 &type);
1291 if (NT_SUCCESS(status)) {
1292 //
1293 // Verify that the data from the registry is a valid multi-sz string.
1294 //
1295 status = FxRegKey::_VerifyMultiSzString(FxDriverGlobals,
1296 &valueName,
1298 length);
1299 }
1300
1301 if (NT_SUCCESS(status)) {
1302#pragma prefast(push)
1303#pragma prefast(suppress:__WARNING_PRECONDITION_NULLTERMINATION_VIOLATION, "FxRegKey::_VerifyMultiSzString makes sure the string is NULL-terminated")
1304 pInfo = FxVerifyAllocateDebugInfo((LPWSTR) dataBuffer, FxDriverGlobals);
1305#pragma prefast(pop)
1306
1307 }
1308
1310
1311 return pInfo;
1312}
1313
1314VOID
1316 __in HANDLE Key,
1317 __out FxTrackPowerOption* TrackPower
1318 )
1319{
1321 ULONG value = 0;
1322 DECLARE_CONST_UNICODE_STRING(valueName, L"TrackPower");
1323
1324 status = FxRegKey::_QueryULong(Key, &valueName, &value);
1326 *TrackPower = (FxTrackPowerOption)value;
1327 }
1328 else {
1329 *TrackPower = FxTrackPowerNone;
1330 }
1331}
1332
1333VOID
1335 __in HANDLE Key,
1337 __out PBOOLEAN OverrideValue
1338 )
1339{
1340 UNICODE_STRING valueName;
1341 ULONG value = 0;
1342
1343 RtlInitUnicodeString(&valueName, Name);
1344
1345 if (NT_SUCCESS(FxRegKey::_QueryULong(Key,
1346 (PCUNICODE_STRING)&valueName,
1347 &value))) {
1348 if (value) {
1349 *OverrideValue = TRUE;
1350 } else {
1351 *OverrideValue = FALSE;
1352 }
1353 }
1354
1355}
1356
1357
1358VOID
1360 __inout PFX_DRIVER_GLOBALS FxDriverGlobals,
1362 __in BOOLEAN WindowsVerifierOn
1363 )
1364
1365/*++
1366
1367Routine Description:
1368
1369 Initialize Driver Framework settings from the driver
1370 specific registry settings under
1371
1372 \REGISTRY\MACHINE\SYSTEM\ControlSetxxx\Services<driver>\Parameters\Wdf
1373
1374Arguments:
1375
1376 RegistryPath - Registry path passed to DriverEntry
1377
1378--*/
1379
1380{
1382 RTL_QUERY_REGISTRY_TABLE paramTable[10];
1383 ULONG verifierOnValue;
1384 ULONG verifyDownlevelValue;
1385 ULONG verboseValue;
1386 ULONG allocateFailValue;
1387 ULONG forceLogsInMiniDump;
1388 ULONG trackDriverForMiniDumpLog;
1389 ULONG requestParentOptimizationOn;
1390 ULONG dsfValue;
1391 ULONG removeLockOptionFlags;
1392 ULONG zero = 0;
1393 ULONG max = 0xFFFFFFFF;
1394 ULONG defaultTrue = (ULONG) TRUE;
1395 ULONG i;
1396 ULONG timeoutValue = 0;
1397 FxAutoRegKey hDriver, hWdf;
1398 DECLARE_CONST_UNICODE_STRING(parametersPath, L"Parameters\\Wdf");
1399
1400 typedef NTSTATUS NTAPI QUERYFN(
1402
1403 QUERYFN* queryFn;
1404
1405#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
1407#endif
1408
1409 //
1410 // UMDF may not provide this registry path
1411 //
1412 if (NULL == RegistryPath) {
1413 return;
1414 }
1415
1416 status = FxRegKey::_OpenKey(NULL, RegistryPath, &hDriver.m_Key, KEY_READ);
1417 if (!NT_SUCCESS(status)) {
1418 return;
1419 }
1420
1421 status = FxRegKey::_OpenKey(hDriver.m_Key, &parametersPath, &hWdf.m_Key, KEY_READ);
1422 if (!NT_SUCCESS(status)) {
1423 //
1424 // For version >= 1.9 we enable WDF verifier automatically when driver
1425 // verifier or app verifier is enabled. Since inbox drivers may not have
1426 // WDF subkey populated as they may not use INF, we need to enable
1427 // verifier even if we fail to open wdf subkey (if DriverVerifier is on).
1428 //
1429 if (FxDriverGlobals->IsVersionGreaterThanOrEqualTo(1,9)) {
1430 //
1431 // Verifier settings are all or nothing. We currently do not support
1432 // turning on individual sub-verifiers.
1433 //
1434 FxDriverGlobals->SetVerifierState(WindowsVerifierOn);
1435 if (FxDriverGlobals->FxVerifierOn) {
1437 }
1438 }
1439
1440 return;
1441 }
1442
1443 RtlZeroMemory (&paramTable[0], sizeof(paramTable));
1444 i = 0;
1445
1446 verboseValue = 0;
1447
1448 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1449 paramTable[i].Name = L"VerboseOn";
1450 paramTable[i].EntryContext = &verboseValue;
1451 paramTable[i].DefaultType = REG_DWORD;
1452 paramTable[i].DefaultData = &zero;
1453 paramTable[i].DefaultLength = sizeof(ULONG);
1454
1455 allocateFailValue = (ULONG) -1;
1456 i++;
1457
1458 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1459 paramTable[i].Name = L"VerifierAllocateFailCount";
1460 paramTable[i].EntryContext = &allocateFailValue;
1461 paramTable[i].DefaultType = REG_DWORD;
1462 paramTable[i].DefaultData = &max;
1463 paramTable[i].DefaultLength = sizeof(ULONG);
1464
1465 verifierOnValue = 0;
1466
1467 //
1468 // If the client version is 1.9 or above, the defaut (i.e when
1469 // the key is not present) VerifierOn state is tied to the
1470 // driver verifier.
1471 //
1472 if (FxDriverGlobals->IsVersionGreaterThanOrEqualTo(1,9)) {
1473 verifierOnValue = WindowsVerifierOn;
1474 }
1475
1476 i++;
1477
1478 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1479 paramTable[i].Name = L"VerifierOn";
1480 paramTable[i].EntryContext = &verifierOnValue;
1481 paramTable[i].DefaultType = REG_DWORD;
1482 paramTable[i].DefaultData = &verifierOnValue;
1483 paramTable[i].DefaultLength = sizeof(ULONG);
1484
1485 verifyDownlevelValue = 0;
1486 i++;
1487
1488 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1489 paramTable[i].Name = L"VerifyDownLevel";
1490 paramTable[i].EntryContext = &verifyDownlevelValue;
1491 paramTable[i].DefaultType = REG_DWORD;
1492 paramTable[i].DefaultData = &zero;
1493 paramTable[i].DefaultLength = sizeof(ULONG);
1494
1495 forceLogsInMiniDump = 0;
1496 i++;
1497
1498 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1499 paramTable[i].Name = L"ForceLogsInMiniDump";
1500 paramTable[i].EntryContext = &forceLogsInMiniDump;
1501 paramTable[i].DefaultType = REG_DWORD;
1502 paramTable[i].DefaultData = &zero;
1503 paramTable[i].DefaultLength = sizeof(ULONG);
1504
1505 //
1506 // Track driver for minidump log:
1507 // Default for KMDF is on.
1508 // Default for UMDF is off.
1509 //
1510#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
1511 trackDriverForMiniDumpLog = (ULONG) TRUE;
1512#else
1513 trackDriverForMiniDumpLog = 0;
1514#endif
1515 i++;
1516
1517 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1518 paramTable[i].Name = L"TrackDriverForMiniDumpLog";
1519 paramTable[i].EntryContext = &trackDriverForMiniDumpLog;
1520 paramTable[i].DefaultType = REG_DWORD;
1521#if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
1522 paramTable[i].DefaultData = &defaultTrue;
1523#else
1524 paramTable[i].DefaultData = &zero;
1525#endif
1526 paramTable[i].DefaultLength = sizeof(ULONG);
1527
1528 requestParentOptimizationOn = (ULONG) TRUE;
1529 i++;
1530
1531 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1532 paramTable[i].Name = L"RequestParentOptimizationOn";
1533 paramTable[i].EntryContext = &requestParentOptimizationOn;
1534 paramTable[i].DefaultType = REG_DWORD;
1535 paramTable[i].DefaultData = &defaultTrue;
1536 paramTable[i].DefaultLength = sizeof(ULONG);
1537
1538 dsfValue = 0;
1539 i++;
1540
1541 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1542 paramTable[i].Name = L"DsfOn";
1543 paramTable[i].EntryContext = &dsfValue;
1544 paramTable[i].DefaultType = REG_DWORD;
1545 paramTable[i].DefaultData = &zero;
1546 paramTable[i].DefaultLength = sizeof(ULONG);
1547
1548 removeLockOptionFlags = 0;
1549 i++;
1550
1551 paramTable[i].Flags = RTL_QUERY_REGISTRY_DIRECT;
1552 paramTable[i].Name = L"RemoveLockOptionFlags";
1553 paramTable[i].EntryContext = &removeLockOptionFlags;
1554 paramTable[i].DefaultType = REG_DWORD;
1555 paramTable[i].DefaultData = &zero;
1556 paramTable[i].DefaultLength = sizeof(ULONG);
1557
1558 ASSERT(i < sizeof(paramTable) / sizeof(paramTable[0]));
1559
1560#if (FX_CORE_MODE==FX_CORE_USER_MODE)
1561
1562 queryFn = (QUERYFN*) GetProcAddress(
1563 GetModuleHandle(TEXT("ntdll.dll")),
1564 "RtlQueryRegistryValuesEx"
1565 );
1566
1567#else
1568
1569 RtlInitUnicodeString(&FunctionName, L"RtlQueryRegistryValuesEx");
1570
1571#pragma warning(push)
1572#pragma warning(disable: 4055)
1573
1574 queryFn = (QUERYFN*)MmGetSystemRoutineAddress(&FunctionName);
1575
1576#pragma warning(pop)
1577
1578#endif
1579
1580 if (queryFn == NULL) {
1581 queryFn = &RtlQueryRegistryValues;
1582 }
1583
1584 status = queryFn(
1586 (PWSTR) hWdf.m_Key,
1587 &paramTable[0],
1588 NULL,
1589 NULL
1590 );
1591
1592 //
1593 // Only examine key values on success
1594 //
1595 if (NT_SUCCESS(status)) {
1596
1597 if (verboseValue) {
1598 FxDriverGlobals->FxVerboseOn = TRUE;
1599 }
1600 else {
1601 FxDriverGlobals->FxVerboseOn = FALSE;
1602 }
1603
1604 if (allocateFailValue != (ULONG) -1) {
1605 FxDriverGlobals->WdfVerifierAllocateFailCount = (LONG) allocateFailValue;
1606 }
1607 else {
1608 FxDriverGlobals->WdfVerifierAllocateFailCount = -1;
1609 }
1610
1611 //
1612 // Verifier settings are all or nothing. We currently do not support
1613 // turning on individual sub-verifiers.
1614 //
1615 FxDriverGlobals->SetVerifierState(verifierOnValue ? TRUE : FALSE);
1616
1617 if (FxDriverGlobals->FxVerifierOn) {
1618 FxDriverGlobalsInitializeDebugExtension(FxDriverGlobals, hWdf.m_Key);
1619 }
1620
1621 //
1622 // Update FxVerifyDownLevel independent of FxVerifyOn because for UMDF
1623 // verifer is always on so it does not consume FxVerifyOn value
1624 //
1625 if (verifyDownlevelValue) {
1626 FxDriverGlobals->FxVerifyDownlevel = TRUE;
1627 }
1628 else {
1629 FxDriverGlobals->FxVerifyDownlevel = FALSE;
1630 }
1631
1632 //
1633 // See if there exists an override in the registry for WDFVERIFY state.
1634 // We query for this separately so that we can establish a default state
1635 // based on verifierOnValue, and then know if the value was present in
1636 // the registry to override the default.
1637 //
1639 L"VerifyOn",
1640 &FxDriverGlobals->FxVerifyOn);
1641
1642 if (FxDriverGlobals->FxVerifyOn) {
1643 FxDriverGlobals->Public.DriverFlags |= WdfVerifyOn;
1644 }
1645
1647 L"DbgBreakOnError",
1648 &FxDriverGlobals->FxVerifierDbgBreakOnError);
1649
1651 L"DbgBreakOnDeviceStateError",
1652 &FxDriverGlobals->FxVerifierDbgBreakOnDeviceStateError);
1653
1654 if (FxDriverGlobals->FxVerifierDbgBreakOnError) {
1655 timeoutValue = 0;
1656 DECLARE_CONST_UNICODE_STRING(timeoutName, L"DbgWaitForSignalTimeoutInSec");
1657
1658 //
1659 // Get the override value for the WaitForSignal's timeout if present.
1660 //
1661 if (NT_SUCCESS(FxRegKey::_QueryULong(hWdf.m_Key,
1662 &timeoutName,
1663 &timeoutValue))) {
1664
1665 FxDriverGlobals->FxVerifierDbgWaitForSignalTimeoutInSec = timeoutValue;
1666 }
1667 }
1668
1669 timeoutValue = 0;
1670 DECLARE_CONST_UNICODE_STRING(timeoutName, L"DbgWaitForWakeInterruptIsrTimeoutInSec");
1671
1672 //
1673 // Get the override value for the Wake Interrupt ISR timeout if present.
1674 // Since the wake interrupt feature is only supported for 1.13 and higher,
1675 // avoid querying the reg key for older versions
1676 //
1677 if (FxDriverGlobals->IsVersionGreaterThanOrEqualTo(1,13) &&
1678 NT_SUCCESS(FxRegKey::_QueryULong(hWdf.m_Key,
1679 &timeoutName,
1680 &timeoutValue))) {
1681
1682 FxDriverGlobals->DbgWaitForWakeInterruptIsrTimeoutInSec = timeoutValue;
1683 }
1684
1685 FxDriverGlobals->FxForceLogsInMiniDump =
1686 (forceLogsInMiniDump) ? TRUE : FALSE;
1687
1688 FxDriverGlobals->FxTrackDriverForMiniDumpLog =
1689 (trackDriverForMiniDumpLog) ? TRUE : FALSE;
1690
1691 FxDriverGlobals->FxRequestParentOptimizationOn =
1692 (requestParentOptimizationOn) ? TRUE : FALSE;
1693
1694 FxDriverGlobals->FxDsfOn = (dsfValue) ? TRUE : FALSE;
1695
1696 FxDriverGlobals->RemoveLockOptionFlags = removeLockOptionFlags;
1697 }
1698
1699 return;
1700}
1701
1702VOID
1705 __in PCSTR ReasonForWaiting,
1707 __in ULONG WarningTimeoutInSec,
1709 )
1710{
1711 LARGE_INTEGER timeOut;
1713
1715
1716 timeOut.QuadPart = WDF_REL_TIMEOUT_IN_SEC(((ULONGLONG)WarningTimeoutInSec));
1717
1718 do {
1719 status = Event->WaitFor(Executive,
1720 KernelMode,
1721 FALSE, // Non alertable
1722 timeOut.QuadPart ? &timeOut : NULL);
1723
1724 if(status == STATUS_TIMEOUT) {
1725 DbgPrint("Thread 0x%p is %s 0x%p\n",
1727 ReasonForWaiting,
1728 Handle);
1729
1734 IsDebuggerAttached())) {
1735
1736 DbgBreakPoint();
1737 }
1738 } else {
1740 break;
1741 }
1742 } WHILE(TRUE);
1743}
1744
1745} // extern "C"
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1279
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
OSVERSIONINFOW VersionInfo
Definition: wkssvc.c:40
static _Must_inspect_result_ NTSTATUS _VerifyMultiSzString(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PCUNICODE_STRING RegValueName, __in_bcount(DataLength) PWCHAR DataString, __in ULONG DataLength)
Definition: fxregkey.cpp:14
__inline VOID Uninitialize()
Definition: mxeventkm.h:146
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in EVENT_TYPE Type, __in BOOLEAN InitialState)
Definition: mxeventkm.h:55
__inline VOID Uninitialize()
Definition: mxlockkm.h:104
__inline VOID Initialize()
Definition: mxlockkm.h:43
static __inline VOID MxFreePool(__in PVOID Ptr)
Definition: mxmemorykm.h:41
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
static VOID MxGlobalInit(VOID)
Definition: mxgeneralkm.cpp:51
static __inline PVOID MxGetSystemRoutineAddress(__in MxFuncName FuncName)
Definition: mxgeneralkm.h:226
static __inline MxThread MxGetCurrentThread()
Definition: mxgeneralkm.h:61
static __inline KIRQL MxGetCurrentIrql()
Definition: mxgeneralkm.h:86
#define WDF_REGISTRY_BASE_PATH
Definition: corepriv.hpp:31
#define STATUS_TIMEOUT
Definition: d3dkmdt.h:49
#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 TRACINGDRIVER
Definition: dbgtrace.h:68
LPWSTR Name
Definition: desk.c:124
#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:33
#define NTSTATUS
Definition: precomp.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
#define L(x)
Definition: resources.c:13
KIRQL irql
Definition: wave.h:1
LOGICAL NTAPI MmIsDriverVerifying(IN PDRIVER_OBJECT DriverObject)
Definition: drvmgmt.c:212
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG RtlCompareUnicodeString(PUNICODE_STRING s1, PUNICODE_STRING s2, BOOLEAN UpCase)
Definition: string_lib.cpp:31
#define NonPagedPool
Definition: env_spec_w32.h:307
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604
#define PagedPool
Definition: env_spec_w32.h:308
std::wstring STRING
Definition: fontsub.cpp:33
VOID FxUnregisterBugCheckCallback(__inout PFX_DRIVER_GLOBALS FxDriverGlobals)
VOID FxCacheBugCheckDriverInfo(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
VOID FxPurgeBugCheckDriverInfo(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
VOID FxUninitializeBugCheckDriverInfo()
VOID FxRegisterBugCheckCallback(__inout PFX_DRIVER_GLOBALS FxDriverGlobals, __in PDRIVER_OBJECT DriverObject)
VOID FxInitializeBugCheckDriverInfo()
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
SINGLE_LIST_ENTRY * pCur
struct _FX_DRIVER_GLOBALS * PFX_DRIVER_GLOBALS
Definition: fxforward.hpp:7
void FxVerifierLockDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
VOID FxFreeAllocatedMdlsDebugInfo(__in FxDriverGlobalsDebugExtension *DebugExtension)
Definition: globalskm.cpp:20
void FxVerifierLockInitialize(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
FxTrackPowerOption
Definition: fxglobals.h:71
@ FxTrackPowerNone
Definition: fxglobals.h:72
@ FxTrackPowerMaxValue
Definition: fxglobals.h:75
WaitSignalFlags
Definition: fxglobals.h:83
@ WaitSignalBreakUnderDebugger
Definition: fxglobals.h:85
@ WaitSignalAlwaysBreak
Definition: fxglobals.h:86
@ WaitSignalBreakUnderVerifier
Definition: fxglobals.h:84
@ FxObjectDebugTrackReferences
Definition: fxglobals.h:68
VOID(NTAPI * PFN_IO_REPORT_INTERRUPT_INACTIVE)(_In_ PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS Parameters)
Definition: fxglobalskm.h:309
VOID(NTAPI * PFN_POX_START_DEVICE_POWER_MANAGEMENT)(__in POHANDLE Handle)
Definition: fxglobalskm.h:242
NTSTATUS(NTAPI * PFN_IO_DISCONNECT_INTERRUPT_EX)(__in PIO_DISCONNECT_INTERRUPT_PARAMETERS Parameters)
Definition: fxglobalskm.h:104
VOID(NTAPI * PFN_POX_REPORT_DEVICE_POWERED_ON)(__in POHANDLE Handle)
Definition: fxglobalskm.h:270
NTSTATUS(NTAPI * PFN_IO_CONNECT_INTERRUPT_EX)(__inout PIO_CONNECT_INTERRUPT_PARAMETERS Parameters)
Definition: fxglobalskm.h:98
VOID(NTAPI * PFN_POX_UNREGISTER_DEVICE)(__in POHANDLE Handle)
Definition: fxglobalskm.h:248
VOID(NTAPI * PFN_VF_CHECK_NX_POOL_TYPE)(_In_ POOL_TYPE PoolType, _In_ PVOID CallingAddress, _In_ ULONG PoolTag)
Definition: fxglobalskm.h:315
NTSTATUS(NTAPI * PFN_IO_UNREGISTER_PLUGPLAY_NOTIFICATION_EX)(__in PVOID NotificationEntry)
Definition: fxglobalskm.h:228
VOID(NTAPI * PFN_KE_SET_TARGET_PROCESSOR_DPC)(__in PRKDPC Dpc, __in CCHAR Number)
Definition: fxglobalskm.h:175
KAFFINITY(NTAPI * PFN_KE_QUERY_ACTIVE_PROCESSORS)(VOID)
Definition: fxglobalskm.h:169
VOID(NTAPI * PFN_POX_SET_DEVICE_IDLE_TIMEOUT)(__in POHANDLE Handle, __in ULONGLONG IdleTimeout)
Definition: fxglobalskm.h:296
VOID(NTAPI * PFN_POX_COMPLETE_IDLE_CONDITION)(__in POHANDLE Handle, __in ULONG Component)
Definition: fxglobalskm.h:283
VOID(NTAPI * PFN_POX_COMPLETE_DEVICE_POWER_NOT_REQUIRED)(__in POHANDLE Handle)
Definition: fxglobalskm.h:290
VOID(NTAPI * PFN_POX_COMPLETE_IDLE_STATE)(__in POHANDLE Handle, __in ULONG Component)
Definition: fxglobalskm.h:276
VOID(NTAPI * PFN_POX_ACTIVATE_COMPONENT)(__in POHANDLE Handle, __in ULONG Component, __in ULONG Flags)
Definition: fxglobalskm.h:254
NTSTATUS(NTAPI * PFN_POX_REGISTER_DEVICE)(__in MdDeviceObject Pdo, __in PPO_FX_DEVICE PoxDevice, __out POHANDLE *Handle)
Definition: fxglobalskm.h:234
VOID(NTAPI * PFN_IO_REPORT_INTERRUPT_ACTIVE)(_In_ PIO_REPORT_INTERRUPT_ACTIVE_STATE_PARAMETERS Parameters)
Definition: fxglobalskm.h:303
VOID(NTAPI * PFN_POX_IDLE_COMPONENT)(__in POHANDLE Handle, __in ULONG Component, __in ULONG Flags)
Definition: fxglobalskm.h:262
#define FX_TAG
Definition: fxmacros.hpp:155
#define WHILE(constant)
Definition: fxmacros.hpp:226
#define FLAG_TO_BOOL(_Flags, _FlagMask)
Definition: fxobject.hpp:125
DECLSPEC_SELECTANY const ULONG_PTR FxHandleValueMask
_Must_inspect_result_ NTSTATUS FxPoolPackageInitialize(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: wdfpool.cpp:667
VOID FxPoolPackageDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: wdfpool.cpp:689
PVOID dataBuffer
VOID AllocAndInitializeTelemetryContext(_In_ PFX_TELEMETRY_CONTEXT *TelemetryContext)
USHORT WDFTYPE
Definition: fxtypes.h:29
#define WmiQueryTraceInformation
Definition: fxwmicompat.h:64
ULONG Handle
Definition: gdb_input.c:15
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLenum condition
Definition: glext.h:9255
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
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
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 * u
Definition: glfuncs.h:240
_Must_inspect_result_ FxObjectDebugInfo * FxVerifyAllocateDebugInfo(__in LPWSTR HandleNameList, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: globals.cpp:139
VOID FxVerifierQueryTrackPower(__in HANDLE Key, __out FxTrackPowerOption *TrackPower)
Definition: globals.cpp:1315
VOID FxDriverGlobalsInitializeDebugExtension(__inout PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt HANDLE Key)
Definition: globals.cpp:271
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
NTSTATUS(NTAPI * PFN_RTL_GET_VERSION)(__out PRTL_OSVERSIONINFOW VersionInformation)
Definition: globals.cpp:402
NTSTATUS(NTAPI * PFN_RTL_VERIFY_VERSION_INFO)(__in PRTL_OSVERSIONINFOEXW VersionInfo, __in ULONG TypeMask, __in ULONGLONG ConditionMask)
Definition: globals.cpp:408
_Must_inspect_result_ NTSTATUS FxLibraryGlobalsCommission(VOID)
Definition: globals.cpp:494
VOID FxFreeDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: globals.cpp:1179
_Must_inspect_result_ BOOLEAN FxVerifyObjectTypeInTable(__in USHORT ObjectType)
Definition: globals.cpp:117
FX_POOL FxPoolFrameworks
Definition: globals.cpp:93
VOID VerifierPageLockHandle(VOID)
Definition: globals.cpp:774
VOID FxVerifyObjectTableIsSorted(VOID)
Definition: globals.cpp:381
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
_Must_inspect_result_ PWDF_DRIVER_GLOBALS FxAllocateDriverGlobals(VOID)
Definition: globals.cpp:1052
VOID FxRegistrySettingsInitialize(__inout PFX_DRIVER_GLOBALS FxDriverGlobals, __in PCUNICODE_STRING RegistryPath, __in BOOLEAN WindowsVerifierOn)
Definition: globals.cpp:1359
ULONG FxObjectsInfoCount
VOID FxLibraryGlobalsVerifyVersion(VOID)
Definition: globals.cpp:423
_Must_inspect_result_ BOOLEAN FxVerifierGetTrackReferences(__in FxObjectDebugInfo *DebugInfo, __in WDFTYPE ObjectType)
Definition: globals.cpp:338
VOID FxOverrideDefaultVerifierSettings(__in HANDLE Key, __in LPWSTR Name, __out PBOOLEAN OverrideValue)
Definition: globals.cpp:1334
VOID FxLibraryGlobalsQueryRegistrySettings(VOID)
Definition: globals.cpp:464
PCSTR FxObjectTypeToHandleName(__in WDFTYPE ObjectType)
Definition: globals.cpp:316
VOID FxDestroy(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: globals.cpp:981
_Must_inspect_result_ FxObjectDebugInfo * FxVerifierGetObjectDebugInfo(__in HANDLE Key, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: globals.cpp:1223
FxLibraryGlobalsType FxLibraryGlobals
Definition: globals.cpp:95
ULONGLONG(NTAPI * PFN_VER_SET_CONDITION_MASK)(__in ULONGLONG ConditionMask, __in ULONG TypeMask, __in UCHAR Condition)
Definition: globals.cpp:416
const FX_OBJECT_INFO FxObjectsInfo[]
#define DbgPrint
Definition: hal.h:12
NTSYSAPI void WINAPI DbgBreakPoint(void)
NTSYSAPI NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID)
#define C_ASSERT(e)
Definition: intsafe.h:73
#define TEXT(s)
Definition: k32.h:28
#define ASSERT(a)
Definition: mode.c:44
char string[160]
Definition: util.h:11
ObjectType
Definition: metafile.c:81
#define DO_NOTHING()
Definition: mxgeneral.h:32
#define MAKE_MX_FUNC_NAME(x)
Definition: mxgeneralkm.h:26
BOOLEAN(NTAPI * 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 KernelMode
Definition: asm.h:38
_In_ ULONG TypeMask
Definition: rtlfuncs.h:4677
_In_ ULONG _In_ ULONGLONG ConditionMask
Definition: rtlfuncs.h:4679
#define VER_MAJORVERSION
Definition: rtltypes.h:229
#define VER_GREATER_EQUAL
Definition: rtltypes.h:241
#define VER_MINORVERSION
Definition: rtltypes.h:228
#define _Must_inspect_result_
Definition: no_sal2.h:62
#define _In_
Definition: no_sal2.h:158
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
#define KEY_READ
Definition: nt_native.h:1026
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RTL_QUERY_REGISTRY_DIRECT
Definition: nt_native.h:144
#define REG_MULTI_SZ
Definition: nt_native.h:1504
#define RTL_REGISTRY_OPTIONAL
Definition: nt_native.h:169
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define RTL_REGISTRY_HANDLE
Definition: nt_native.h:168
#define UNICODE_NULL
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
IN ULONG IN UCHAR Condition
@ NotificationEvent
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define REG_DWORD
Definition: sdbapi.c:615
#define exit(n)
Definition: config.h:202
int zero
Definition: sehframes.cpp:29
#define WDF_GLOBAL_VALUE_IFRDISABLED
Definition: objectpriv.hpp:36
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define TRACE_LEVEL_INFORMATION
Definition: storswtr.h:29
Definition: fxpool.h:63
FxTrackPowerOption TrackPower
Definition: fxglobals.h:145
FxObjectDebugInfo * ObjectDebugInfo
Definition: fxglobals.h:118
LIST_ENTRY AllocatedTagTrackersListHead
Definition: fxglobals.h:134
FX_DRIVER_TRACKER_CACHE_AWARE DriverTracker
Definition: fxglobals.h:812
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
RTL_OSVERSIONINFOEXW OsVersionInfo
Definition: fxglobals.h:770
PFN_POX_IDLE_COMPONENT PoxIdleComponent
Definition: fxglobals.h:750
PFN_KE_SET_COALESCABLE_TIMER KeSetCoalescableTimer
Definition: fxglobals.h:738
PFN_IO_CONNECT_INTERRUPT_EX IoConnectInterruptEx
Definition: fxglobals.h:730
PFN_POX_REPORT_DEVICE_POWERED_ON PoxReportDevicePoweredOn
Definition: fxglobals.h:752
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
PFN_IO_UNREGISTER_PLUGPLAY_NOTIFICATION_EX IoUnregisterPlugPlayNotificationEx
Definition: fxglobals.h:740
PFN_POX_ACTIVATE_COMPONENT PoxActivateComponent
Definition: fxglobals.h:748
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
union FxObjectDebugInfo::@5052 u
USHORT ObjectType
Definition: fxglobals.h:94
LIST_ENTRY Linkage
Definition: fxglobals.h:339
LONG WdfVerifierAllocateFailCount
Definition: fxglobals.h:362
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
ULONG BugCheckDriverInfoIndex
Definition: fxglobals.h:506
BOOLEAN FxForceLogsInMiniDump
Definition: fxglobals.h:477
BOOLEAN FxVerifierDbgBreakOnError
Definition: fxglobals.h:431
ULONG_PTR WdfHandleMask
Definition: fxglobals.h:356
FxDriverGlobalsDebugExtension * DebugExtension
Definition: fxglobals.h:376
PFX_TELEMETRY_CONTEXT TelemetryContext
Definition: fxglobals.h:540
BOOLEAN IsUserModeDriver
Definition: fxglobals.h:488
_Must_inspect_result_ BOOLEAN IsDebuggerAttached(VOID)
Definition: globalskm.cpp:250
ULONG FxVerifierDbgWaitForSignalTimeoutInSec
Definition: fxglobals.h:527
BOOLEAN FxVerboseOn
Definition: fxglobals.h:462
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:1703
MxEvent DestroyEvent
Definition: fxglobals.h:351
_Must_inspect_result_ NTSTATUS Initialize()
USHORT ObjectType
Definition: fxglobals.h:898
const CHAR * HandleName
Definition: fxglobals.h:887
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:269
USHORT MaximumLength
Definition: env_spec_w32.h:370
Definition: ps.c:97
#define max(a, b)
Definition: svc.c:63
PVOID NTAPI MmGetSystemRoutineAddress(IN PUNICODE_STRING SystemRoutineName)
Definition: sysldr.c:3615
uint16_t * PWSTR
Definition: typedefs.h:56
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned char * PBOOLEAN
Definition: typedefs.h:53
#define NTAPI
Definition: typedefs.h:36
const char * PCSTR
Definition: typedefs.h:52
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint16_t * PWCHAR
Definition: typedefs.h:56
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
LONGLONG QuadPart
Definition: typedefs.h:114
Definition: pdh_main.c:96
#define DECLARE_CONST_UNICODE_STRING(_variablename, _string)
Definition: wdfcore.h:161
FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_SEC(_In_ ULONGLONG Time)
Definition: wdfcore.h:62
_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
@ WdfVerifyOn
Definition: wdfdriver.h:53
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
#define GetModuleHandle
Definition: winbase.h:3576
_In_ LPWSTR _In_ ULONG _In_ ULONG _In_ ULONG _Out_ DEVINFO _In_ HDEV _In_ LPWSTR _In_ HANDLE hDriver
Definition: winddi.h:3557
#define PAGED_CODE_LOCKED()
Definition: kefuncs.h:1417
@ Executive
Definition: ketypes.h:467
#define MmLockPagableCodeSection(Address)
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184