- Add support for PnP IRP to PDO: IRP_MN_QUERY_BUS_INFORMATION (PciQueryBusInformatio...
[reactos.git] / reactos / drivers / bus / pcix / pci.h
index 306265f..87b1c44 100644 (file)
 //
 #define PCI_VERIFIER_CODES                  0x04
 
+//
+// PCI ID Buffer ANSI Strings
+//
+#define MAX_ANSI_STRINGS                    0x08
+
 //
 // Device Extension, Interface, Translator and Arbiter Signatures
 //
@@ -102,6 +107,18 @@ typedef enum _PCI_SIGNATURE
     PciInterface_Location  = 'icP?'
 } PCI_SIGNATURE, *PPCI_SIGNATURE;
 
+//
+// Driver-handled PCI Device Types
+//
+typedef enum _PCI_DEVICE_TYPES
+{
+    PciTypeInvalid,
+    PciTypeHostBridge,
+    PciTypePciBridge,
+    PciTypeCardbusBridge,
+    PciTypeDevice
+} PCI_DEVICE_TYPES;
+
 //
 // Device Extension Logic States
 //
@@ -398,6 +415,19 @@ typedef struct _PCI_VERIFIER_DATA
     PCHAR DebuggerMessageText;
 } PCI_VERIFIER_DATA, *PPCI_VERIFIER_DATA;
 
+//
+// PCI ID Buffer Descriptor
+//
+typedef struct _PCI_ID_BUFFER
+{
+    ULONG Count;
+    ANSI_STRING Strings[MAX_ANSI_STRINGS];
+    ULONG StringSize[MAX_ANSI_STRINGS];
+    ULONG TotalLength;
+    PCHAR CharBuffer;
+    CHAR BufferData[256];
+} PCI_ID_BUFFER, *PPCI_ID_BUFFER;
+
 //
 // PCI Configuration Callbacks
 //
@@ -1064,6 +1094,12 @@ PciCanDisableDecodes(
     IN BOOLEAN ForPowerDown
 );
 
+PCI_DEVICE_TYPES
+NTAPI
+PciClassifyDeviceType(
+    IN PPCI_PDO_EXTENSION PdoExtension
+);
+
 ULONG_PTR
 NTAPI
 PciExecuteCriticalSystemRoutine(
@@ -1093,6 +1129,20 @@ PciDecodeEnable(
     OUT PUSHORT Command
 );
 
+NTSTATUS
+NTAPI
+PciQueryBusInformation(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    IN PPNP_BUS_INFORMATION* Buffer
+);
+
+NTSTATUS
+NTAPI
+PciQueryCapabilities(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    IN OUT PDEVICE_CAPABILITIES DeviceCapability
+);
+
 //
 // Configuration Routines
 //
@@ -1199,6 +1249,12 @@ PciDebugDumpCommonConfig(
     IN PPCI_COMMON_HEADER PciData
 );
 
+VOID
+NTAPI
+PciDebugDumpQueryCapabilities(
+    IN PDEVICE_CAPABILITIES DeviceCaps
+);
+
 //
 // Interface Support
 //
@@ -1434,6 +1490,34 @@ PciQueryDeviceRelations(
     IN OUT PDEVICE_RELATIONS *pDeviceRelations
 );
 
+NTSTATUS
+NTAPI
+PciQueryResources(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    OUT PCM_RESOURCE_LIST *Buffer
+);
+
+NTSTATUS
+NTAPI
+PciQueryTargetDeviceRelations(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    IN OUT PDEVICE_RELATIONS *pDeviceRelations
+);
+
+NTSTATUS
+NTAPI
+PciQueryEjectionRelations(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    IN OUT PDEVICE_RELATIONS *pDeviceRelations
+);
+
+NTSTATUS
+NTAPI
+PciQueryRequirements(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    IN OUT PIO_RESOURCE_REQUIREMENTS_LIST *RequirementsList
+);
+
 //
 // Identification Functions
 //
@@ -1444,6 +1528,23 @@ PciGetDeviceDescriptionMessage(
     IN UCHAR SubClass
 );
 
+NTSTATUS
+NTAPI
+PciQueryDeviceText(
+    IN PPCI_PDO_EXTENSION PdoExtension,
+    IN DEVICE_TEXT_TYPE QueryType,
+    IN ULONG Locale,
+    OUT PWCHAR *Buffer
+);
+
+NTSTATUS
+NTAPI
+PciQueryId(
+    IN PPCI_PDO_EXTENSION DeviceExtension,
+    IN BUS_QUERY_ID_TYPE QueryType,
+    OUT PWCHAR *Buffer
+);
+
 //
 // CardBUS Support
 //
@@ -1607,7 +1708,10 @@ extern PCI_INTERFACE TranslatorInterfaceInterrupt;
 extern PDRIVER_OBJECT PciDriverObject;
 extern PWATCHDOG_TABLE WdTable;
 extern PPCI_HACK_ENTRY PciHackTable;
+extern BOOLEAN PciAssignBusNumbers;
 extern BOOLEAN PciEnableNativeModeATA;
+extern PPCI_IRQ_ROUTING_TABLE PciIrqRoutingTable;
+extern BOOLEAN PciRunningDatacenter;
 
 /* Exported by NTOS, should this go in the NDK? */
 extern NTSYSAPI BOOLEAN InitSafeBootMode;