1 /* $Id: pci.h,v 1.4 2003/12/12 21:54:42 ekohl Exp $ */
14 typedef struct _PCI_DEVICE
16 // Entry on device list
18 // Physical Device Object of device
21 PCI_SLOT_NUMBER SlotNumber
;
22 // PCI configuration data
23 PCI_COMMON_CONFIG PciConfig
;
24 // Flag used during enumeration to locate removed devices
25 BOOLEAN RemovePending
;
26 } PCI_DEVICE
, *PPCI_DEVICE
;
38 typedef struct _COMMON_DEVICE_EXTENSION
40 // Pointer to device object, this device extension is associated with
41 PDEVICE_OBJECT DeviceObject
;
42 // Wether this device extension is for an FDO or PDO
44 // Wether the device is removed
46 // Current device power state for the device
47 DEVICE_POWER_STATE DevicePowerState
;
48 } __attribute((packed
)) COMMON_DEVICE_EXTENSION
, *PCOMMON_DEVICE_EXTENSION
;
50 /* Physical Device Object device extension for a child device */
51 typedef struct _PDO_DEVICE_EXTENSION
54 COMMON_DEVICE_EXTENSION Common
;
56 UNICODE_STRING DeviceID
;
58 UNICODE_STRING InstanceID
;
60 UNICODE_STRING HardwareIDs
;
62 UNICODE_STRING CompatibleIDs
;
63 // Textual description of device
64 UNICODE_STRING DeviceText
;
65 // Textual description of device
66 UNICODE_STRING DeviceTextLocation
;
67 } __attribute((packed
)) PDO_DEVICE_EXTENSION
, *PPDO_DEVICE_EXTENSION
;
69 /* Functional Device Object device extension for the PCI driver device object */
70 typedef struct _FDO_DEVICE_EXTENSION
73 COMMON_DEVICE_EXTENSION Common
;
74 // Physical Device Object
76 // Current state of the driver
77 PCI_DEVICE_STATE State
;
78 // Namespace device list
79 LIST_ENTRY DeviceListHead
;
80 // Number of (not removed) devices in device list
81 ULONG DeviceListCount
;
82 // Lock for namespace device list
83 KSPIN_LOCK DeviceListLock
;
86 // Lower device object
88 } __attribute((packed
)) FDO_DEVICE_EXTENSION
, *PFDO_DEVICE_EXTENSION
;
95 PDEVICE_OBJECT DeviceObject
,
100 PDEVICE_OBJECT DeviceObject
,
106 PciCreateUnicodeString(
107 PUNICODE_STRING Destination
,
115 PDEVICE_OBJECT DeviceObject
,
120 PDEVICE_OBJECT DeviceObject
,