ReactOS  0.4.15-dev-3291-gea4c1a0
pci.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS PCI Bus driver
3  * FILE: pci.c
4  * PURPOSE: Driver entry
5  * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
6  * UPDATE HISTORY:
7  * 10-09-2001 CSH Created
8  */
9 
10 #include "pci.h"
11 
12 #include <stdio.h>
13 
14 #define NDEBUG
15 #include <debug.h>
16 
19 
20 static DRIVER_ADD_DEVICE PciAddDevice;
22 
25 
28 
29 /*** PUBLIC ******************************************************************/
30 
32 
33 /*** PRIVATE *****************************************************************/
34 
35 static NTSTATUS
36 NTAPI
39  IN PIRP Irp)
40 {
43 
45  DPRINT("Called. IRP is at (0x%p)\n", Irp);
46 
47  Irp->IoStatus.Information = 0;
48 
50  switch (IrpSp->Parameters.DeviceIoControl.IoControlCode)
51  {
52  default:
53  DPRINT("Unknown IOCTL 0x%X\n", IrpSp->Parameters.DeviceIoControl.IoControlCode);
55  break;
56  }
57 
58  if (Status != STATUS_PENDING)
59  {
60  Irp->IoStatus.Status = Status;
61 
62  DPRINT("Completing IRP at 0x%p\n", Irp);
63 
65  }
66 
67  DPRINT("Leaving. Status 0x%X\n", Status);
68 
69  return Status;
70 }
71 
72 
73 static NTSTATUS
74 NTAPI
77  IN PIRP Irp)
78 /*
79  * FUNCTION: Handle Plug and Play IRPs
80  * ARGUMENTS:
81  * DeviceObject = Pointer to PDO or FDO
82  * Irp = Pointer to IRP that should be handled
83  * RETURNS:
84  * Status
85  */
86 {
87  PCOMMON_DEVICE_EXTENSION DeviceExtension;
89 
90  DeviceExtension = (PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
91 
92  DPRINT("IsFDO %u\n", DeviceExtension->IsFDO);
93 
94  if (DeviceExtension->IsFDO)
95  {
97  }
98  else
99  {
101  }
102 
103  return Status;
104 }
105 
106 
107 static NTSTATUS
108 NTAPI
111  IN PIRP Irp)
112 /*
113  * FUNCTION: Handle power management IRPs
114  * ARGUMENTS:
115  * DeviceObject = Pointer to PDO or FDO
116  * Irp = Pointer to IRP that should be handled
117  * RETURNS:
118  * Status
119  */
120 {
121  PCOMMON_DEVICE_EXTENSION DeviceExtension;
123 
124  DeviceExtension = (PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
125 
126  if (DeviceExtension->IsFDO)
127  {
129  }
130  else
131  {
133  }
134 
135  return Status;
136 }
137 
138 
139 static NTSTATUS
140 NTAPI
144 {
145  PFDO_DEVICE_EXTENSION DeviceExtension;
148 
149  DPRINT("Called\n");
150  if (PhysicalDeviceObject == NULL)
151  return STATUS_SUCCESS;
152 
154  sizeof(FDO_DEVICE_EXTENSION),
155  NULL,
158  TRUE,
159  &Fdo);
160  if (!NT_SUCCESS(Status))
161  {
162  DPRINT("IoCreateDevice() failed with status 0x%X\n", Status);
163  return Status;
164  }
165 
166  DeviceExtension = (PFDO_DEVICE_EXTENSION)Fdo->DeviceExtension;
167 
168  RtlZeroMemory(DeviceExtension, sizeof(FDO_DEVICE_EXTENSION));
169 
170  DeviceExtension->Common.IsFDO = TRUE;
171 
172  DeviceExtension->Ldo = IoAttachDeviceToDeviceStack(Fdo,
174 
175  DeviceExtension->State = dsStopped;
176 
177  Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
178 
179  //Fdo->Flags |= DO_POWER_PAGABLE;
180 
181  DPRINT("Done AddDevice\n");
182 
183  return STATUS_SUCCESS;
184 }
185 
186 DRIVER_UNLOAD PciUnload;
187 
188 VOID
189 NTAPI
192 {
193  /* The driver object extension is destroyed by the I/O manager */
195 }
196 
197 CODE_SEG("INIT")
198 NTSTATUS
199 NTAPI
203 {
205 
207  DPRINT("Peripheral Component Interconnect Bus Driver\n");
208 
210  DriverObject->MajorFunction[IRP_MJ_PNP] = PciPnpControl;
211  DriverObject->MajorFunction[IRP_MJ_POWER] = PciPowerControl;
212  DriverObject->DriverExtension->AddDevice = PciAddDevice;
213  DriverObject->DriverUnload = PciUnload;
214 
216  DriverObject,
217  sizeof(PCI_DRIVER_EXTENSION),
219  if (!NT_SUCCESS(Status))
220  return Status;
221 
223 
226 
227  return STATUS_SUCCESS;
228 }
229 
230 
231 NTSTATUS
234 {
235  WCHAR Buffer[256];
236 
238  L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X",
239  Device->PciConfig.VendorID,
240  Device->PciConfig.DeviceID,
241  (Device->PciConfig.u.type0.SubSystemID << 16) +
242  Device->PciConfig.u.type0.SubVendorID,
243  Device->PciConfig.RevisionID);
244 
246 }
247 
248 
249 NTSTATUS
252 {
253  WCHAR Buffer[3];
254 
255  swprintf(Buffer, L"%02X", Device->SlotNumber.u.AsULONG & 0xff);
256 
258 }
259 
260 
261 NTSTATUS
264 {
265  WCHAR Buffer[256];
266  UNICODE_STRING BufferU;
267  ULONG Index;
268 
269  Index = 0;
270  Index += swprintf(&Buffer[Index],
271  L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X",
272  Device->PciConfig.VendorID,
273  Device->PciConfig.DeviceID,
274  (Device->PciConfig.u.type0.SubSystemID << 16) +
275  Device->PciConfig.u.type0.SubVendorID,
276  Device->PciConfig.RevisionID);
277  Index++;
278 
279  Index += swprintf(&Buffer[Index],
280  L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X",
281  Device->PciConfig.VendorID,
282  Device->PciConfig.DeviceID,
283  (Device->PciConfig.u.type0.SubSystemID << 16) +
284  Device->PciConfig.u.type0.SubVendorID);
285  Index++;
286 
287  Index += swprintf(&Buffer[Index],
288  L"PCI\\VEN_%04X&DEV_%04X&CC_%02X%02X%02X",
289  Device->PciConfig.VendorID,
290  Device->PciConfig.DeviceID,
291  Device->PciConfig.BaseClass,
292  Device->PciConfig.SubClass,
293  Device->PciConfig.ProgIf);
294  Index++;
295 
296  Index += swprintf(&Buffer[Index],
297  L"PCI\\VEN_%04X&DEV_%04X&CC_%02X%02X",
298  Device->PciConfig.VendorID,
299  Device->PciConfig.DeviceID,
300  Device->PciConfig.BaseClass,
301  Device->PciConfig.SubClass);
302  Index++;
303 
305 
306  BufferU.Length = BufferU.MaximumLength = (USHORT) Index * sizeof(WCHAR);
307  BufferU.Buffer = Buffer;
308 
309  return PciDuplicateUnicodeString(0, &BufferU, HardwareIDs);
310 }
311 
312 
313 NTSTATUS
316 {
317  WCHAR Buffer[256];
318  UNICODE_STRING BufferU;
319  ULONG Index;
320 
321  Index = 0;
322  Index += swprintf(&Buffer[Index],
323  L"PCI\\VEN_%04X&DEV_%04X&REV_%02X",
324  Device->PciConfig.VendorID,
325  Device->PciConfig.DeviceID,
326  Device->PciConfig.RevisionID);
327  Index++;
328 
329  Index += swprintf(&Buffer[Index],
330  L"PCI\\VEN_%04X&DEV_%04X",
331  Device->PciConfig.VendorID,
332  Device->PciConfig.DeviceID);
333  Index++;
334 
335  Index += swprintf(&Buffer[Index],
336  L"PCI\\VEN_%04X&CC_%02X%02X%02X",
337  Device->PciConfig.VendorID,
338  Device->PciConfig.BaseClass,
339  Device->PciConfig.SubClass,
340  Device->PciConfig.ProgIf);
341  Index++;
342 
343  Index += swprintf(&Buffer[Index],
344  L"PCI\\VEN_%04X&CC_%02X%02X",
345  Device->PciConfig.VendorID,
346  Device->PciConfig.BaseClass,
347  Device->PciConfig.SubClass);
348  Index++;
349 
350  Index += swprintf(&Buffer[Index],
351  L"PCI\\VEN_%04X",
352  Device->PciConfig.VendorID);
353  Index++;
354 
355  Index += swprintf(&Buffer[Index],
356  L"PCI\\CC_%02X%02X%02X",
357  Device->PciConfig.BaseClass,
358  Device->PciConfig.SubClass,
359  Device->PciConfig.ProgIf);
360  Index++;
361 
362  Index += swprintf(&Buffer[Index],
363  L"PCI\\CC_%02X%02X",
364  Device->PciConfig.BaseClass,
365  Device->PciConfig.SubClass);
366  Index++;
367 
369 
370  BufferU.Length = BufferU.MaximumLength = (USHORT)Index * sizeof(WCHAR);
371  BufferU.Buffer = Buffer;
372 
373  return PciDuplicateUnicodeString(0, &BufferU, CompatibleIDs);
374 }
375 
376 
377 NTSTATUS
380 {
382 
383  switch (Device->PciConfig.BaseClass)
384  {
385  case PCI_CLASS_PRE_20:
386  switch (Device->PciConfig.SubClass)
387  {
389  Description = L"VGA device";
390  break;
391 
392  default:
394  Description = L"PCI device";
395  break;
396  }
397  break;
398 
400  switch (Device->PciConfig.SubClass)
401  {
403  Description = L"SCSI controller";
404  break;
405 
407  Description = L"IDE controller";
408  break;
409 
411  Description = L"Floppy disk controller";
412  break;
413 
415  Description = L"IPI controller";
416  break;
417 
419  Description = L"RAID controller";
420  break;
421 
422  default:
423  Description = L"Mass storage controller";
424  break;
425  }
426  break;
427 
429  switch (Device->PciConfig.SubClass)
430  {
432  Description = L"Ethernet controller";
433  break;
434 
436  Description = L"Token-Ring controller";
437  break;
438 
440  Description = L"FDDI controller";
441  break;
442 
444  Description = L"ATM controller";
445  break;
446 
447  default:
448  Description = L"Network controller";
449  break;
450  }
451  break;
452 
454  switch (Device->PciConfig.SubClass)
455  {
457  Description = L"VGA display controller";
458  break;
459 
461  Description = L"XGA display controller";
462  break;
463 
465  Description = L"Multimedia display controller";
466  break;
467 
468  default:
469  Description = L"Other display controller";
470  break;
471  }
472  break;
473 
475  switch (Device->PciConfig.SubClass)
476  {
478  Description = L"Multimedia video device";
479  break;
480 
482  Description = L"Multimedia audio device";
483  break;
484 
486  Description = L"Multimedia telephony device";
487  break;
488 
489  default:
490  Description = L"Other multimedia device";
491  break;
492  }
493  break;
494 
496  switch (Device->PciConfig.SubClass)
497  {
499  Description = L"PCI Memory";
500  break;
501 
503  Description = L"PCI Flash Memory";
504  break;
505 
506  default:
507  Description = L"Other memory controller";
508  break;
509  }
510  break;
511 
513  switch (Device->PciConfig.SubClass)
514  {
516  Description = L"PCI-Host bridge";
517  break;
518 
519  case PCI_SUBCLASS_BR_ISA:
520  Description = L"PCI-ISA bridge";
521  break;
522 
524  Description = L"PCI-EISA bridge";
525  break;
526 
527  case PCI_SUBCLASS_BR_MCA:
528  Description = L"PCI-Micro Channel bridge";
529  break;
530 
532  Description = L"PCI-PCI bridge";
533  break;
534 
536  Description = L"PCI-PCMCIA bridge";
537  break;
538 
540  Description = L"PCI-NUBUS bridge";
541  break;
542 
544  Description = L"PCI-CARDBUS bridge";
545  break;
546 
547  default:
548  Description = L"Other bridge device";
549  break;
550  }
551  break;
552 
554  switch (Device->PciConfig.SubClass)
555  {
556 
557  default:
558  Description = L"Communication device";
559  break;
560  }
561  break;
562 
564  switch (Device->PciConfig.SubClass)
565  {
566 
567  default:
568  Description = L"System device";
569  break;
570  }
571  break;
572 
573  case PCI_CLASS_INPUT_DEV:
574  switch (Device->PciConfig.SubClass)
575  {
576 
577  default:
578  Description = L"Input device";
579  break;
580  }
581  break;
582 
584  switch (Device->PciConfig.SubClass)
585  {
586 
587  default:
588  Description = L"Docking station";
589  break;
590  }
591  break;
592 
593  case PCI_CLASS_PROCESSOR:
594  switch (Device->PciConfig.SubClass)
595  {
596 
597  default:
598  Description = L"Processor";
599  break;
600  }
601  break;
602 
604  switch (Device->PciConfig.SubClass)
605  {
607  Description = L"FireWire controller";
608  break;
609 
611  Description = L"ACCESS bus controller";
612  break;
613 
614  case PCI_SUBCLASS_SB_SSA:
615  Description = L"SSA controller";
616  break;
617 
618  case PCI_SUBCLASS_SB_USB:
619  Description = L"USB controller";
620  break;
621 
623  Description = L"Fibre Channel controller";
624  break;
625 
627  Description = L"SMBus controller";
628  break;
629 
630  default:
631  Description = L"Other serial bus controller";
632  break;
633  }
634  break;
635 
636  default:
637  Description = L"Other PCI Device";
638  break;
639  }
640 
642 }
643 
644 
645 NTSTATUS
648 {
649  WCHAR Buffer[256];
650 
652  L"PCI-Bus %lu, Device %u, Function %u",
653  Device->BusNumber,
654  Device->SlotNumber.u.bits.DeviceNumber,
655  Device->SlotNumber.u.bits.FunctionNumber);
656 
658 }
659 
660 NTSTATUS
662  IN ULONG Flags,
665 {
666  if (SourceString == NULL ||
667  DestinationString == NULL ||
671  Flags >= 4)
672  {
674  }
675 
676  if ((SourceString->Length == 0) &&
679  {
683  }
684  else
685  {
686  USHORT DestMaxLength = SourceString->Length;
687 
689  DestMaxLength += sizeof(UNICODE_NULL);
690 
692  if (DestinationString->Buffer == NULL)
693  return STATUS_NO_MEMORY;
694 
697  DestinationString->MaximumLength = DestMaxLength;
698 
701  }
702 
703  return STATUS_SUCCESS;
704 }
705 
706 /* EOF */
#define DO_DEVICE_INITIALIZING
Definition: env_spec_w32.h:399
#define PCI_SUBCLASS_NET_TOKEN_RING_CTLR
Definition: iotypes.h:4137
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
#define PCI_SUBCLASS_NET_ETHERNET_CTLR
Definition: iotypes.h:4136
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define PCI_CLASS_SERIAL_BUS_CTLR
Definition: iotypes.h:4115
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1799
#define PCI_SUBCLASS_VID_3D_CTLR
Definition: iotypes.h:4146
USHORT MaximumLength
Definition: env_spec_w32.h:370
#define PCI_SUBCLASS_MSC_SCSI_BUS_CTLR
Definition: iotypes.h:4128
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define PCI_SUBCLASS_SB_USB
Definition: iotypes.h:4207
#define TRUE
Definition: types.h:120
NTSTATUS PciCreateDeviceDescriptionString(PUNICODE_STRING DeviceDescription, PPCI_DEVICE Device)
Definition: pci.c:378
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING
Definition: green.h:16
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define PCI_SUBCLASS_MEM_RAM
Definition: iotypes.h:4156
NTSTATUS PciDuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: pci.c:661
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:213
unsigned short Length
Definition: sprintf.c:451
#define PCI_CLASS_MULTIMEDIA_DEV
Definition: iotypes.h:4107
static const WCHAR Description[]
Definition: oid.c:1266
#define swprintf
Definition: precomp.h:40
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1155
Definition: pci.h:9
#define PCI_SUBCLASS_MEM_FLASH
Definition: iotypes.h:4157
if(dx==0 &&dy==0)
Definition: linetemp.h:174
#define PCI_SUBCLASS_PRE_20_NON_VGA
Definition: iotypes.h:4124
PDEVICE_OBJECT Ldo
Definition: pci.h:95
#define PCI_SUBCLASS_MM_TELEPHONY_DEV
Definition: iotypes.h:4152
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
#define PCI_SUBCLASS_MM_AUDIO_DEV
Definition: iotypes.h:4151
#define PCI_SUBCLASS_SB_FIBRE_CHANNEL
Definition: iotypes.h:4208
#define PCI_SUBCLASS_SB_SMBUS
Definition: iotypes.h:4209
NTSTATUS PdoPnpControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: pdo.c:1500
#define PCI_SUBCLASS_BR_CARDBUS
Definition: iotypes.h:4168
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
return STATUS_NOT_IMPLEMENTED
void * Buffer
Definition: sprintf.c:453
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceDescription
Definition: wdfpdo.h:430
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define PCI_SUBCLASS_NET_ATM_CTLR
Definition: iotypes.h:4139
#define UNICODE_NULL
_In_ PIRP Irp
Definition: csq.h:116
#define PCI_SUBCLASS_MSC_FLOPPY_CTLR
Definition: iotypes.h:4130
static DRIVER_DISPATCH PciPnpControl
Definition: pci.c:26
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:966
NTSTATUS PdoPowerControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: pdo.c:1623
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
#define PCI_SUBCLASS_MSC_IPI_CTLR
Definition: iotypes.h:4131
#define PCI_SUBCLASS_MSC_RAID_CTLR
Definition: iotypes.h:4132
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1868
#define IoCompleteRequest
Definition: irp.c:1240
Definition: bufpool.h:45
#define PCI_SUBCLASS_NET_FDDI_CTLR
Definition: iotypes.h:4138
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
NTSTATUS PciCreateHardwareIDsString(PUNICODE_STRING HardwareIDs, PPCI_DEVICE Device)
Definition: pci.c:262
#define PCI_SUBCLASS_VID_VGA_CTLR
Definition: iotypes.h:4144
Status
Definition: gdiplustypes.h:24
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
_In_ WDFCOLLECTION _In_ ULONG Index
KSPIN_LOCK BusListLock
Definition: pci.h:105
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
PCI_DEVICE_STATE State
Definition: pci.h:87
#define PCI_SUBCLASS_BR_MCA
Definition: iotypes.h:4164
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: pci.c:200
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING InstanceID
Definition: wdfpdo.h:306
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
Definition: green.h:15
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
_Must_inspect_result_ _In_ WDFDEVICE Fdo
Definition: wdffdo.h:461
#define PCI_CLASS_DISPLAY_CTLR
Definition: iotypes.h:4106
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define IRP_MJ_POWER
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1868
static const WCHAR L[]
Definition: oid.c:1250
LIST_ENTRY BusListHead
Definition: pci.h:103
#define PCI_SUBCLASS_BR_PCMCIA
Definition: iotypes.h:4166
#define TAG_PCI
Definition: pci.h:7
#define PCI_CLASS_MEMORY_CTLR
Definition: iotypes.h:4108
NTSTATUS PciCreateInstanceIDString(PUNICODE_STRING InstanceID, PPCI_DEVICE Device)
Definition: pci.c:250
#define PCI_SUBCLASS_BR_PCI_TO_PCI
Definition: iotypes.h:4165
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING DeviceID
Definition: wdfpdo.h:275
#define PCI_SUBCLASS_MSC_IDE_CTLR
Definition: iotypes.h:4129
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
DRIVER_DISPATCH(nfs41_FsdDispatch)
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:81
#define PCI_CLASS_SIMPLE_COMMS_CTLR
Definition: iotypes.h:4110
NTSTATUS FdoPowerControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: fdo.c:586
#define PCI_SUBCLASS_SB_SSA
Definition: iotypes.h:4206
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793
#define PCI_CLASS_NETWORK_CTLR
Definition: iotypes.h:4105
static DRIVER_DISPATCH PciPowerControl
Definition: pci.c:23
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS PciCreateDeviceIDString(PUNICODE_STRING DeviceID, PPCI_DEVICE Device)
Definition: pci.c:232
static DRIVER_ADD_DEVICE PciAddDevice
Definition: pci.c:20
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
#define PCI_SUBCLASS_MM_VIDEO_DEV
Definition: iotypes.h:4150
#define PCI_SUBCLASS_VID_XGA_CTLR
Definition: iotypes.h:4145
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
NTSTATUS PciCreateCompatibleIDsString(PUNICODE_STRING CompatibleIDs, PPCI_DEVICE Device)
Definition: pci.c:314
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING _In_ PCUNICODE_STRING DeviceLocation
Definition: wdfpdo.h:430
#define PCI_SUBCLASS_SB_IEEE1394
Definition: iotypes.h:4204
NTSTATUS PciCreateDeviceLocationString(PUNICODE_STRING DeviceLocation, PPCI_DEVICE Device)
Definition: pci.c:646
#define NULL
Definition: types.h:112
static DRIVER_DISPATCH PciDispatchDeviceControl
Definition: pci.c:17
#define PCI_CLASS_INPUT_DEV
Definition: iotypes.h:4112
NTSTATUS FdoPnpControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: fdo.c:468
#define PCI_SUBCLASS_BR_NUBUS
Definition: iotypes.h:4167
#define PCI_SUBCLASS_PRE_20_VGA
Definition: iotypes.h:4125
#define PCI_CLASS_DOCKING_STATION
Definition: iotypes.h:4113
#define OUT
Definition: typedefs.h:40
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:31
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:598
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define PCI_SUBCLASS_BR_HOST
Definition: iotypes.h:4161
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
DRIVER_UNLOAD PciUnload
Definition: pci.c:186
#define PCI_CLASS_PROCESSOR
Definition: iotypes.h:4114
#define FILE_DEVICE_SECURE_OPEN
Definition: cdrw_usr.h:46
#define PCI_CLASS_BRIDGE_DEV
Definition: iotypes.h:4109
#define STATUS_SUCCESS
Definition: shellext.h:65
#define PCI_SUBCLASS_BR_ISA
Definition: iotypes.h:4162
#define DPRINT
Definition: sndvol32.h:71
#define PCI_SUBCLASS_SB_ACCESS
Definition: iotypes.h:4205
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3128
#define PCI_CLASS_BASE_SYSTEM_DEV
Definition: iotypes.h:4111
#define FILE_DEVICE_BUS_EXTENDER
Definition: winioctl.h:148
unsigned short MaximumLength
Definition: sprintf.c:452
#define PCI_SUBCLASS_BR_EISA
Definition: iotypes.h:4163
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
#define PCI_CLASS_MASS_STORAGE_CTLR
Definition: iotypes.h:4104
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define PCI_CLASS_PRE_20
Definition: iotypes.h:4103