1 /* $Id: pci.h,v 1.1 2001/09/16 13:18:24 chorns Exp $ */
17 typedef struct _PCI_DEVICE
19 // Entry on device list
21 // Physical Device Object of device
23 // PCI configuration data
24 PCI_COMMON_CONFIG PciConfig
;
25 // Flag used during enumeration to locate removed devices
26 BOOLEAN RemovePending
;
27 } PCI_DEVICE
, *PPCI_DEVICE
;
39 typedef struct _COMMON_DEVICE_EXTENSION
41 // Pointer to device object, this device extension is associated with
42 PDEVICE_OBJECT DeviceObject
;
43 // Wether this device extension is for an FDO or PDO
45 // Wether the device is removed
47 // Current device power state for the device
48 DEVICE_POWER_STATE DevicePowerState
;
49 } __attribute((packed
)) COMMON_DEVICE_EXTENSION
, *PCOMMON_DEVICE_EXTENSION
;
51 /* Physical Device Object device extension for a child device */
52 typedef struct _PDO_DEVICE_EXTENSION
55 COMMON_DEVICE_EXTENSION
;
57 UNICODE_STRING DeviceID
;
59 UNICODE_STRING InstanceID
;
61 UNICODE_STRING HardwareIDs
;
63 UNICODE_STRING CompatibleIDs
;
64 // Textual description of device
65 UNICODE_STRING DeviceText
;
66 // Textual description of device
67 UNICODE_STRING DeviceTextLocation
;
68 } __attribute((packed
)) PDO_DEVICE_EXTENSION
, *PPDO_DEVICE_EXTENSION
;
70 /* Functional Device Object device extension for the PCI driver device object */
71 typedef struct _FDO_DEVICE_EXTENSION
74 COMMON_DEVICE_EXTENSION
;
75 // Physical Device Object
77 // Current state of the driver
78 PCI_DEVICE_STATE State
;
79 // Namespace device list
80 LIST_ENTRY DeviceListHead
;
81 // Number of (not removed) devices in device list
82 ULONG DeviceListCount
;
83 // Lock for namespace device list
84 KSPIN_LOCK DeviceListLock
;
87 // Lower device object
89 } __attribute((packed
)) FDO_DEVICE_EXTENSION
, *PFDO_DEVICE_EXTENSION
;
96 PDEVICE_OBJECT DeviceObject
,
101 PDEVICE_OBJECT DeviceObject
,
106 extern PCI_BUS_TYPE PciBusConfigType
;
109 PciGetBusConfigType(VOID
);
112 PciCreateUnicodeString(
113 PUNICODE_STRING Destination
,
121 PDEVICE_OBJECT DeviceObject
,
126 PDEVICE_OBJECT DeviceObject
,