ed54474adc8e49b813535a19cdde944d2d962c34
[reactos.git] / reactos / drivers / bus / pcix / pcivrify.c
1 /*
2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/pcivrify.c
5 * PURPOSE: PCI Driver Verifier Support
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include <pci.h>
12 #define NDEBUG
13 #include <debug.h>
14
15 /* GLOBALS ********************************************************************/
16
17 BOOLEAN PciVerifierRegistered;
18 PVOID PciVerifierNotificationHandle;
19
20 /* FUNCTIONS ******************************************************************/
21
22 NTSTATUS
23 NTAPI
24 PciVerifierProfileChangeCallback(IN PVOID NotificationStructure,
25 IN PVOID Context)
26 {
27 /* This function is not yet implemented */
28 UNIMPLEMENTED;
29 while (TRUE);
30 return STATUS_SUCCESS;
31 }
32
33 VOID
34 NTAPI
35 PciVerifierInit(IN PDRIVER_OBJECT DriverObject)
36 {
37 NTSTATUS Status;
38
39 /* Check if the kernel driver verifier is enabled */
40 if (VfIsVerificationEnabled(VFOBJTYPE_SYSTEM_BIOS, NULL))
41 {
42 /* Register a notification for changes, to keep track of the PCI tree */
43 Status = IoRegisterPlugPlayNotification(EventCategoryHardwareProfileChange,
44 0,
45 NULL,
46 DriverObject,
47 PciVerifierProfileChangeCallback,
48 NULL,
49 &PciVerifierNotificationHandle);
50 if (NT_SUCCESS(Status)) PciVerifierRegistered = TRUE;
51 }
52 }
53
54 /* EOF */