X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Fbus%2Fpcix%2Fpcivrify.c;h=f51f02dba89219a6acb7cad633c3149c56c3f393;hp=ed54474adc8e49b813535a19cdde944d2d962c34;hb=8091e98e96e3be0cf7cf545e9e49f62ce90571f3;hpb=a6017cd9b2f5a39d7befd81b791c95ba0a4191c1 diff --git a/reactos/drivers/bus/pcix/pcivrify.c b/reactos/drivers/bus/pcix/pcivrify.c index ed54474adc8..f51f02dba89 100644 --- a/reactos/drivers/bus/pcix/pcivrify.c +++ b/reactos/drivers/bus/pcix/pcivrify.c @@ -17,8 +17,62 @@ BOOLEAN PciVerifierRegistered; PVOID PciVerifierNotificationHandle; +PCI_VERIFIER_DATA PciVerifierFailureTable[PCI_VERIFIER_CODES] = +{ + { + 1, + VFFAILURE_FAIL_LOGO, + 0, + "The BIOS has reprogrammed the bus numbers of an active PCI device " + "(!devstack %DevObj) during a dock or undock!" + }, + { + 2, + VFFAILURE_FAIL_LOGO, + 0, + "A device in the system did not update it's PMCSR register in the spec " + "mandated time (!devstack %DevObj, Power state D%Ulong)" + }, + { + 3, + VFFAILURE_FAIL_LOGO, + 0, + "A driver controlling a PCI device has tried to access OS controlled " + "configuration space registers (!devstack %DevObj, Offset 0x%Ulong1, " + "Length 0x%Ulong2)" + }, + { + 4, + VFFAILURE_FAIL_UNDER_DEBUGGER, + 0, + "A driver controlling a PCI device has tried to read or write from an " + "invalid space using IRP_MN_READ/WRITE_CONFIG or via BUS_INTERFACE_STANDARD." + " NB: These functions take WhichSpace parameters of the form PCI_WHICHSPACE_*" + " and not a BUS_DATA_TYPE (!devstack %DevObj, WhichSpace 0x%Ulong1)" + }, +}; + /* FUNCTIONS ******************************************************************/ +PPCI_VERIFIER_DATA +NTAPI +PciVerifierRetrieveFailureData(IN ULONG FailureCode) +{ + PPCI_VERIFIER_DATA VerifierData; + + /* Scan the verifier failure table for this code */ + VerifierData = PciVerifierFailureTable; + while (VerifierData->FailureCode != FailureCode) + { + /* Keep searching */ + ++VerifierData; + ASSERT(VerifierData < &PciVerifierFailureTable[PCI_VERIFIER_CODES]); + } + + /* Return the entry for this code */ + return VerifierData; +} + NTSTATUS NTAPI PciVerifierProfileChangeCallback(IN PVOID NotificationStructure,