ReactOS  0.4.14-dev-49-gfb4591c
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 
30 #ifdef ALLOC_PRAGMA
31 
32 // Make the initialization routines discardable, so that they
33 // don't waste space
34 
35 #pragma alloc_text(INIT, DriverEntry)
36 
37 #endif /* ALLOC_PRAGMA */
38 
39 /*** PUBLIC ******************************************************************/
40 
42 
43 /*** PRIVATE *****************************************************************/
44 
45 static NTSTATUS
46 NTAPI
49  IN PIRP Irp)
50 {
53 
55  DPRINT("Called. IRP is at (0x%p)\n", Irp);
56 
57  Irp->IoStatus.Information = 0;
58 
60  switch (IrpSp->Parameters.DeviceIoControl.IoControlCode)
61  {
62  default:
63  DPRINT("Unknown IOCTL 0x%X\n", IrpSp->Parameters.DeviceIoControl.IoControlCode);
65  break;
66  }
67 
68  if (Status != STATUS_PENDING)
69  {
70  Irp->IoStatus.Status = Status;
71 
72  DPRINT("Completing IRP at 0x%p\n", Irp);
73 
75  }
76 
77  DPRINT("Leaving. Status 0x%X\n", Status);
78 
79  return Status;
80 }
81 
82 
83 static NTSTATUS
84 NTAPI
87  IN PIRP Irp)
88 /*
89  * FUNCTION: Handle Plug and Play IRPs
90  * ARGUMENTS:
91  * DeviceObject = Pointer to PDO or FDO
92  * Irp = Pointer to IRP that should be handled
93  * RETURNS:
94  * Status
95  */
96 {
97  PCOMMON_DEVICE_EXTENSION DeviceExtension;
99 
101 
102  DPRINT("IsFDO %u\n", DeviceExtension->IsFDO);
103 
104  if (DeviceExtension->IsFDO)
105  {
107  }
108  else
109  {
111  }
112 
113  return Status;
114 }
115 
116 
117 static NTSTATUS
118 NTAPI
121  IN PIRP Irp)
122 /*
123  * FUNCTION: Handle power management IRPs
124  * ARGUMENTS:
125  * DeviceObject = Pointer to PDO or FDO
126  * Irp = Pointer to IRP that should be handled
127  * RETURNS:
128  * Status
129  */
130 {
131  PCOMMON_DEVICE_EXTENSION DeviceExtension;
133 
135 
136  if (DeviceExtension->IsFDO)
137  {
139  }
140  else
141  {
143  }
144 
145  return Status;
146 }
147 
148 
149 static NTSTATUS
150 NTAPI
154 {
155  PFDO_DEVICE_EXTENSION DeviceExtension;
156  PDEVICE_OBJECT Fdo;
158 
159  DPRINT("Called\n");
160  if (PhysicalDeviceObject == NULL)
161  return STATUS_SUCCESS;
162 
164  sizeof(FDO_DEVICE_EXTENSION),
165  NULL,
168  TRUE,
169  &Fdo);
170  if (!NT_SUCCESS(Status))
171  {
172  DPRINT("IoCreateDevice() failed with status 0x%X\n", Status);
173  return Status;
174  }
175 
176  DeviceExtension = (PFDO_DEVICE_EXTENSION)Fdo->DeviceExtension;
177 
178  RtlZeroMemory(DeviceExtension, sizeof(FDO_DEVICE_EXTENSION));
179 
180  DeviceExtension->Common.IsFDO = TRUE;
181 
182  DeviceExtension->Ldo = IoAttachDeviceToDeviceStack(Fdo,
184 
185  DeviceExtension->State = dsStopped;
186 
187  Fdo->Flags &= ~DO_DEVICE_INITIALIZING;
188 
189  //Fdo->Flags |= DO_POWER_PAGABLE;
190 
191  DPRINT("Done AddDevice\n");
192 
193  return STATUS_SUCCESS;
194 }
195 
196 DRIVER_UNLOAD PciUnload;
197 
198 VOID
199 NTAPI
202 {
203  /* The driver object extension is destroyed by the I/O manager */
205 }
206 
207 NTSTATUS
208 NTAPI
212 {
214 
216  DPRINT("Peripheral Component Interconnect Bus Driver\n");
217 
223 
225  DriverObject,
226  sizeof(PCI_DRIVER_EXTENSION),
228  if (!NT_SUCCESS(Status))
229  return Status;
230 
232 
235 
236  return STATUS_SUCCESS;
237 }
238 
239 
240 NTSTATUS
243 {
244  WCHAR Buffer[256];
245 
247  L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X",
248  Device->PciConfig.VendorID,
249  Device->PciConfig.DeviceID,
250  (Device->PciConfig.u.type0.SubSystemID << 16) +
251  Device->PciConfig.u.type0.SubVendorID,
252  Device->PciConfig.RevisionID);
253 
255 }
256 
257 
258 NTSTATUS
261 {
262  WCHAR Buffer[3];
263 
264  swprintf(Buffer, L"%02X", Device->SlotNumber.u.AsULONG & 0xff);
265 
267 }
268 
269 
270 NTSTATUS
273 {
274  WCHAR Buffer[256];
275  UNICODE_STRING BufferU;
276  ULONG Index;
277 
278  Index = 0;
279  Index += swprintf(&Buffer[Index],
280  L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X",
281  Device->PciConfig.VendorID,
282  Device->PciConfig.DeviceID,
283  (Device->PciConfig.u.type0.SubSystemID << 16) +
284  Device->PciConfig.u.type0.SubVendorID,
285  Device->PciConfig.RevisionID);
286  Index++;
287 
288  Index += swprintf(&Buffer[Index],
289  L"PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X",
290  Device->PciConfig.VendorID,
291  Device->PciConfig.DeviceID,
292  (Device->PciConfig.u.type0.SubSystemID << 16) +
293  Device->PciConfig.u.type0.SubVendorID);
294  Index++;
295 
296  Index += swprintf(&Buffer[Index],
297  L"PCI\\VEN_%04X&DEV_%04X&CC_%02X%02X%02X",
298  Device->PciConfig.VendorID,
299  Device->PciConfig.DeviceID,
300  Device->PciConfig.BaseClass,
301  Device->PciConfig.SubClass,
302  Device->PciConfig.ProgIf);
303  Index++;
304 
305  Index += swprintf(&Buffer[Index],
306  L"PCI\\VEN_%04X&DEV_%04X&CC_%02X%02X",
307  Device->PciConfig.VendorID,
308  Device->PciConfig.DeviceID,
309  Device->PciConfig.BaseClass,
310  Device->PciConfig.SubClass);
311  Index++;
312 
314 
315  BufferU.Length = BufferU.MaximumLength = (USHORT) Index * sizeof(WCHAR);
316  BufferU.Buffer = Buffer;
317 
318  return PciDuplicateUnicodeString(0, &BufferU, HardwareIDs);
319 }
320 
321 
322 NTSTATUS
325 {
326  WCHAR Buffer[256];
327  UNICODE_STRING BufferU;
328  ULONG Index;
329 
330  Index = 0;
331  Index += swprintf(&Buffer[Index],
332  L"PCI\\VEN_%04X&DEV_%04X&REV_%02X",
333  Device->PciConfig.VendorID,
334  Device->PciConfig.DeviceID,
335  Device->PciConfig.RevisionID);
336  Index++;
337 
338  Index += swprintf(&Buffer[Index],
339  L"PCI\\VEN_%04X&DEV_%04X",
340  Device->PciConfig.VendorID,
341  Device->PciConfig.DeviceID);
342  Index++;
343 
344  Index += swprintf(&Buffer[Index],
345  L"PCI\\VEN_%04X&CC_%02X%02X%02X",
346  Device->PciConfig.VendorID,
347  Device->PciConfig.BaseClass,
348  Device->PciConfig.SubClass,
349  Device->PciConfig.ProgIf);
350  Index++;
351 
352  Index += swprintf(&Buffer[Index],
353  L"PCI\\VEN_%04X&CC_%02X%02X",
354  Device->PciConfig.VendorID,
355  Device->PciConfig.BaseClass,
356  Device->PciConfig.SubClass);
357  Index++;
358 
359  Index += swprintf(&Buffer[Index],
360  L"PCI\\VEN_%04X",
361  Device->PciConfig.VendorID);
362  Index++;
363 
364  Index += swprintf(&Buffer[Index],
365  L"PCI\\CC_%02X%02X%02X",
366  Device->PciConfig.BaseClass,
367  Device->PciConfig.SubClass,
368  Device->PciConfig.ProgIf);
369  Index++;
370 
371  Index += swprintf(&Buffer[Index],
372  L"PCI\\CC_%02X%02X",
373  Device->PciConfig.BaseClass,
374  Device->PciConfig.SubClass);
375  Index++;
376 
378 
379  BufferU.Length = BufferU.MaximumLength = (USHORT)Index * sizeof(WCHAR);
380  BufferU.Buffer = Buffer;
381 
382  return PciDuplicateUnicodeString(0, &BufferU, CompatibleIDs);
383 }
384 
385 
386 NTSTATUS
389 {
391 
392  switch (Device->PciConfig.BaseClass)
393  {
394  case PCI_CLASS_PRE_20:
395  switch (Device->PciConfig.SubClass)
396  {
398  Description = L"VGA device";
399  break;
400 
401  default:
403  Description = L"PCI device";
404  break;
405  }
406  break;
407 
409  switch (Device->PciConfig.SubClass)
410  {
412  Description = L"SCSI controller";
413  break;
414 
416  Description = L"IDE controller";
417  break;
418 
420  Description = L"Floppy disk controller";
421  break;
422 
424  Description = L"IPI controller";
425  break;
426 
428  Description = L"RAID controller";
429  break;
430 
431  default:
432  Description = L"Mass storage controller";
433  break;
434  }
435  break;
436 
438  switch (Device->PciConfig.SubClass)
439  {
441  Description = L"Ethernet controller";
442  break;
443 
445  Description = L"Token-Ring controller";
446  break;
447 
449  Description = L"FDDI controller";
450  break;
451 
453  Description = L"ATM controller";
454  break;
455 
456  default:
457  Description = L"Network controller";
458  break;
459  }
460  break;
461 
463  switch (Device->PciConfig.SubClass)
464  {
466  Description = L"VGA display controller";
467  break;
468 
470  Description = L"XGA display controller";
471  break;
472 
474  Description = L"Multimedia display controller";
475  break;
476 
477  default:
478  Description = L"Other display controller";
479  break;
480  }
481  break;
482 
484  switch (Device->PciConfig.SubClass)
485  {
487  Description = L"Multimedia video device";
488  break;
489 
491  Description = L"Multimedia audio device";
492  break;
493 
495  Description = L"Multimedia telephony device";
496  break;
497 
498  default:
499  Description = L"Other multimedia device";
500  break;
501  }
502  break;
503 
505  switch (Device->PciConfig.SubClass)
506  {
508  Description = L"PCI Memory";
509  break;
510 
512  Description = L"PCI Flash Memory";
513  break;
514 
515  default:
516  Description = L"Other memory controller";
517  break;
518  }
519  break;
520 
522  switch (Device->PciConfig.SubClass)
523  {
525  Description = L"PCI-Host bridge";
526  break;
527 
528  case PCI_SUBCLASS_BR_ISA:
529  Description = L"PCI-ISA bridge";
530  break;
531 
533  Description = L"PCI-EISA bridge";
534  break;
535 
536  case PCI_SUBCLASS_BR_MCA:
537  Description = L"PCI-Micro Channel bridge";
538  break;
539 
541  Description = L"PCI-PCI bridge";
542  break;
543 
545  Description = L"PCI-PCMCIA bridge";
546  break;
547 
549  Description = L"PCI-NUBUS bridge";
550  break;
551 
553  Description = L"PCI-CARDBUS bridge";
554  break;
555 
556  default:
557  Description = L"Other bridge device";
558  break;
559  }
560  break;
561 
563  switch (Device->PciConfig.SubClass)
564  {
565 
566  default:
567  Description = L"Communication device";
568  break;
569  }
570  break;
571 
573  switch (Device->PciConfig.SubClass)
574  {
575 
576  default:
577  Description = L"System device";
578  break;
579  }
580  break;
581 
582  case PCI_CLASS_INPUT_DEV:
583  switch (Device->PciConfig.SubClass)
584  {
585 
586  default:
587  Description = L"Input device";
588  break;
589  }
590  break;
591 
593  switch (Device->PciConfig.SubClass)
594  {
595 
596  default:
597  Description = L"Docking station";
598  break;
599  }
600  break;
601 
602  case PCI_CLASS_PROCESSOR:
603  switch (Device->PciConfig.SubClass)
604  {
605 
606  default:
607  Description = L"Processor";
608  break;
609  }
610  break;
611 
613  switch (Device->PciConfig.SubClass)
614  {
616  Description = L"FireWire controller";
617  break;
618 
620  Description = L"ACCESS bus controller";
621  break;
622 
623  case PCI_SUBCLASS_SB_SSA:
624  Description = L"SSA controller";
625  break;
626 
627  case PCI_SUBCLASS_SB_USB:
628  Description = L"USB controller";
629  break;
630 
632  Description = L"Fibre Channel controller";
633  break;
634 
636  Description = L"SMBus controller";
637  break;
638 
639  default:
640  Description = L"Other serial bus controller";
641  break;
642  }
643  break;
644 
645  default:
646  Description = L"Other PCI Device";
647  break;
648  }
649 
651 }
652 
653 
654 NTSTATUS
657 {
658  WCHAR Buffer[256];
659 
661  L"PCI-Bus %lu, Device %u, Function %u",
662  Device->BusNumber,
663  Device->SlotNumber.u.bits.DeviceNumber,
664  Device->SlotNumber.u.bits.FunctionNumber);
665 
667 }
668 
669 NTSTATUS
671  IN ULONG Flags,
674 {
675  if (SourceString == NULL ||
676  DestinationString == NULL ||
680  Flags >= 4)
681  {
683  }
684 
685  if ((SourceString->Length == 0) &&
688  {
692  }
693  else
694  {
695  USHORT DestMaxLength = SourceString->Length;
696 
698  DestMaxLength += sizeof(UNICODE_NULL);
699 
701  if (DestinationString->Buffer == NULL)
702  return STATUS_NO_MEMORY;
703 
706  DestinationString->MaximumLength = DestMaxLength;
707 
710  }
711 
712  return STATUS_SUCCESS;
713 }
714 
715 /* EOF */
#define DO_DEVICE_INITIALIZING
Definition: env_spec_w32.h:399
#define PCI_SUBCLASS_NET_TOKEN_RING_CTLR
Definition: iotypes.h:3781
const uint16_t * PCWSTR
Definition: typedefs.h:55
#define IN
Definition: typedefs.h:38
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
#define PCI_SUBCLASS_NET_ETHERNET_CTLR
Definition: iotypes.h:3780
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define PCI_CLASS_SERIAL_BUS_CTLR
Definition: iotypes.h:3759
_In_ PIRP _In_ PDEVICE_OBJECT Device
Definition: fatprocs.h:2020
NTSTATUS NTAPI IoAllocateDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress, IN ULONG DriverObjectExtensionSize, OUT PVOID *DriverObjectExtension)
Definition: driver.c:1764
static DRIVER_DISPATCH PciPowerControl
Definition: pci.c:23
#define PCI_SUBCLASS_VID_3D_CTLR
Definition: iotypes.h:3790
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
USHORT MaximumLength
Definition: env_spec_w32.h:370
#define PCI_SUBCLASS_MSC_SCSI_BUS_CTLR
Definition: iotypes.h:3772
NTSTATUS PciDuplicateUnicodeString(IN ULONG Flags, IN PCUNICODE_STRING SourceString, OUT PUNICODE_STRING DestinationString)
Definition: pci.c:670
#define PCI_SUBCLASS_SB_USB
Definition: iotypes.h:3851
_In_ PIRP Irp
Definition: csq.h:116
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING
Definition: green.h:16
static DRIVER_DISPATCH PciDispatchDeviceControl
Definition: pci.c:17
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define PCI_SUBCLASS_MEM_RAM
Definition: iotypes.h:3800
_In_ USHORT DeviceID
Definition: iotypes.h:860
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS PciCreateDeviceLocationString(PUNICODE_STRING DeviceLocation, PPCI_DEVICE Device)
Definition: pci.c:655
unsigned short Length
Definition: sprintf.c:451
#define PCI_CLASS_MULTIMEDIA_DEV
Definition: iotypes.h:3751
static const WCHAR Description[]
Definition: oid.c:1266
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1114
Definition: pci.h:8
#define PCI_SUBCLASS_MEM_FLASH
Definition: iotypes.h:3801
#define PCI_SUBCLASS_PRE_20_NON_VGA
Definition: iotypes.h:3768
PDEVICE_OBJECT Ldo
Definition: pci.h:94
#define PCI_SUBCLASS_MM_TELEPHONY_DEV
Definition: iotypes.h:3796
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
#define PCI_SUBCLASS_MM_AUDIO_DEV
Definition: iotypes.h:3795
#define PCI_SUBCLASS_SB_FIBRE_CHANNEL
Definition: iotypes.h:3852
#define PCI_SUBCLASS_SB_SMBUS
Definition: iotypes.h:3853
NTSTATUS PdoPnpControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: pdo.c:1499
#define PCI_SUBCLASS_BR_CARDBUS
Definition: iotypes.h:3812
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
void * Buffer
Definition: sprintf.c:453
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:3783
#define UNICODE_NULL
#define PCI_SUBCLASS_MSC_FLOPPY_CTLR
Definition: iotypes.h:3774
PDEVICE_OBJECT NTAPI IoAttachDeviceToDeviceStack(IN PDEVICE_OBJECT SourceDevice, IN PDEVICE_OBJECT TargetDevice)
Definition: device.c:966
PDRIVER_EXTENSION DriverExtension
Definition: iotypes.h:2174
NTSTATUS PdoPowerControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: pdo.c:1645
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:251
PVOID DeviceExtension
Definition: env_spec_w32.h:418
#define PCI_SUBCLASS_MSC_IPI_CTLR
Definition: iotypes.h:3775
#define PCI_SUBCLASS_MSC_RAID_CTLR
Definition: iotypes.h:3776
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1869
smooth NULL
Definition: ftsmooth.c:416
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
#define IoCompleteRequest
Definition: irp.c:1240
void DPRINT(...)
Definition: polytest.cpp:61
NTSTATUS PciCreateCompatibleIDsString(PUNICODE_STRING CompatibleIDs, PPCI_DEVICE Device)
Definition: pci.c:323
Definition: bufpool.h:45
#define PCI_SUBCLASS_NET_FDDI_CTLR
Definition: iotypes.h:3782
static DRIVER_DISPATCH PciPnpControl
Definition: pci.c:26
#define PCI_SUBCLASS_VID_VGA_CTLR
Definition: iotypes.h:3788
_Must_inspect_result_ _In_ PDEVICE_DESCRIPTION DeviceDescription
Definition: iofuncs.h:1015
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
#define swprintf(buf, format,...)
Definition: sprintf.c:56
NTSTATUS PciCreateDeviceDescriptionString(PUNICODE_STRING DeviceDescription, PPCI_DEVICE Device)
Definition: pci.c:387
KSPIN_LOCK BusListLock
Definition: pci.h:104
NTSTATUS PciCreateHardwareIDsString(PUNICODE_STRING HardwareIDs, PPCI_DEVICE Device)
Definition: pci.c:271
struct _COMMON_DEVICE_EXTENSION * PCOMMON_DEVICE_EXTENSION
static const UCHAR Index[8]
Definition: usbohci.c:18
PCI_DEVICE_STATE State
Definition: pci.h:86
#define PCI_SUBCLASS_BR_MCA
Definition: iotypes.h:3808
#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE
Definition: green.h:15
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PCI_CLASS_DISPLAY_CTLR
Definition: iotypes.h:3750
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define IRP_MJ_POWER
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1869
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2180
LIST_ENTRY BusListHead
Definition: pci.h:102
#define PCI_SUBCLASS_BR_PCMCIA
Definition: iotypes.h:3810
#define TAG_PCI
Definition: pci.h:6
#define PCI_CLASS_MEMORY_CTLR
Definition: iotypes.h:3752
#define PCI_SUBCLASS_BR_PCI_TO_PCI
Definition: iotypes.h:3809
#define PCI_SUBCLASS_MSC_IDE_CTLR
Definition: iotypes.h:3773
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:41
DRIVER_DISPATCH(nfs41_FsdDispatch)
COMMON_DEVICE_EXTENSION Common
Definition: pci.h:80
#define PCI_CLASS_SIMPLE_COMMS_CTLR
Definition: iotypes.h:3754
NTSTATUS FdoPowerControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: fdo.c:580
#define PCI_SUBCLASS_SB_SSA
Definition: iotypes.h:3850
Status
Definition: gdiplustypes.h:24
NTSTATUS PciCreateDeviceIDString(PUNICODE_STRING DeviceID, PPCI_DEVICE Device)
Definition: pci.c:241
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
#define PCI_CLASS_NETWORK_CTLR
Definition: iotypes.h:3749
PDRIVER_ADD_DEVICE AddDevice
Definition: iotypes.h:2112
unsigned short USHORT
Definition: pedump.c:61
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4157
#define PCI_SUBCLASS_MM_VIDEO_DEV
Definition: iotypes.h:3794
#define PCI_SUBCLASS_VID_XGA_CTLR
Definition: iotypes.h:3789
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: pci.c:209
#define PCI_SUBCLASS_SB_IEEE1394
Definition: iotypes.h:3848
#define PCI_CLASS_INPUT_DEV
Definition: iotypes.h:3756
NTSTATUS FdoPnpControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: fdo.c:462
#define PCI_SUBCLASS_BR_NUBUS
Definition: iotypes.h:3811
#define PCI_SUBCLASS_PRE_20_VGA
Definition: iotypes.h:3769
#define PCI_CLASS_DOCKING_STATION
Definition: iotypes.h:3757
#define OUT
Definition: typedefs.h:39
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2181
NTSTATUS PciCreateInstanceIDString(PUNICODE_STRING InstanceID, PPCI_DEVICE Device)
Definition: pci.c:259
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:566
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:261
#define PCI_SUBCLASS_BR_HOST
Definition: iotypes.h:3805
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
#define PCI_CLASS_PROCESSOR
Definition: iotypes.h:3758
#define FILE_DEVICE_SECURE_OPEN
Definition: cdrw_usr.h:46
#define PCI_CLASS_BRIDGE_DEV
Definition: iotypes.h:3753
#define PCI_SUBCLASS_BR_ISA
Definition: iotypes.h:3806
#define PCI_SUBCLASS_SB_ACCESS
Definition: iotypes.h:3849
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define PCI_CLASS_BASE_SYSTEM_DEV
Definition: iotypes.h:3755
static DRIVER_ADD_DEVICE PciAddDevice
Definition: pci.c:20
return STATUS_SUCCESS
Definition: btrfs.c:2966
#define FILE_DEVICE_BUS_EXTENDER
Definition: winioctl.h:147
unsigned short MaximumLength
Definition: sprintf.c:452
#define PCI_SUBCLASS_BR_EISA
Definition: iotypes.h:3807
DRIVER_UNLOAD PciUnload
Definition: pci.c:196
#define PCI_CLASS_MASS_STORAGE_CTLR
Definition: iotypes.h:3748
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define PCI_CLASS_PRE_20
Definition: iotypes.h:3747