+ PCI_COMMON_HEADER PciData;
+
+ /* Read PCI configuration data */
+ HalGetBusData(PCIConfiguration,
+ BusHandler->BusNumber,
+ PciSlot.u.AsULONG,
+ &PciData,
+ PCI_COMMON_HDR_LENGTH);
+
+ /* Make sure it's a real device */
+ if (PciData.VendorID == PCI_INVALID_VENDORID) return STATUS_UNSUCCESSFUL;
+
+ /* Allocate the supported range structure */
+ *Range = ExAllocatePoolWithTag(PagedPool, sizeof(SUPPORTED_RANGE), 'Hal ');
+ if (!*Range) return STATUS_INSUFFICIENT_RESOURCES;
+
+ /* Set it up */
+ RtlZeroMemory(*Range, sizeof(SUPPORTED_RANGE));
+ (*Range)->Base = 1;
+
+ /* If the PCI device has no IRQ, nothing to do */
+ if (!PciData.u.type0.InterruptPin) return STATUS_SUCCESS;
+
+ /* FIXME: The PCI IRQ Routing Miniport should be called */
+
+ /* Also if the INT# seems bogus, nothing to do either */
+ if ((PciData.u.type0.InterruptLine == 0) ||
+ (PciData.u.type0.InterruptLine == 255))
+ {
+ /* Fake success */
+ return STATUS_SUCCESS;
+ }
+
+ /* Otherwise, the INT# should be valid, return it to the caller */
+ (*Range)->Base = PciData.u.type0.InterruptLine;
+ (*Range)->Limit = PciData.u.type0.InterruptLine;