IRP_MN_START_DEVICE implement for ROOT FDO (PciFdoStartDevice)
[reactos.git] / reactos / drivers / bus / pcix / pci.h
1 /*
2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/pci.h
5 * PURPOSE: Main Header File
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 #include <initguid.h>
10 #include <ntifs.h>
11 #include <ntagp.h>
12 #include <wdmguid.h>
13 #include <wchar.h>
14 #include <acpiioct.h>
15 #include <drivers/pci/pci.h>
16 #include <drivers/acpi/acpi.h>
17 #include "halfuncs.h"
18 #include "rtlfuncs.h"
19 #include "vffuncs.h"
20 #include "bugcodes.h"
21
22 //
23 // Tag used in all pool allocations (Pci Bus)
24 //
25 #define PCI_POOL_TAG 'BicP'
26
27 //
28 // Checks if the specified FDO is the FDO for the Root PCI Bus
29 //
30 #define PCI_IS_ROOT_FDO(x) ((x)->BusRootFdoExtension == x)
31
32 //
33 // Assertions to make sure we are dealing with the right kind of extension
34 //
35 #define ASSERT_FDO(x) ASSERT((x)->ExtensionType == PciFdoExtensionType);
36 #define ASSERT_PDO(x) ASSERT((x)->ExtensionType == PciPdoExtensionType);
37
38 //
39 // PCI Hack Entry Name Lengths
40 //
41 #define PCI_HACK_ENTRY_SIZE sizeof(L"VVVVdddd") - sizeof(UNICODE_NULL)
42 #define PCI_HACK_ENTRY_REV_SIZE sizeof(L"VVVVddddRR") - sizeof(UNICODE_NULL)
43 #define PCI_HACK_ENTRY_SUBSYS_SIZE sizeof(L"VVVVddddssssIIII") - sizeof(UNICODE_NULL)
44 #define PCI_HACK_ENTRY_FULL_SIZE sizeof(L"VVVVddddssssIIIIRR") - sizeof(UNICODE_NULL)
45
46 //
47 // PCI Hack Entry Flags
48 //
49 #define PCI_HACK_HAS_REVISION_INFO 0x01
50 #define PCI_HACK_HAS_SUBSYSTEM_INFO 0x02
51
52 //
53 // PCI Interface Flags
54 //
55 #define PCI_INTERFACE_PDO 0x01
56 #define PCI_INTERFACE_FDO 0x02
57 #define PCI_INTERFACE_ROOT 0x04
58
59 //
60 // Device Extension, Interface, Translator and Arbiter Signatures
61 //
62 typedef enum _PCI_SIGNATURE
63 {
64 PciPdoExtensionType = 'icP0',
65 PciFdoExtensionType = 'icP1',
66 PciArb_Io = 'icP2',
67 PciArb_Memory = 'icP3',
68 PciArb_Interrupt = 'icP4',
69 PciArb_BusNumber = 'icP5',
70 PciTrans_Interrupt = 'icP6',
71 PciInterface_BusHandler = 'icP7',
72 PciInterface_IntRouteHandler = 'icP8',
73 PciInterface_PciCb = 'icP9',
74 PciInterface_LegacyDeviceDetection = 'icP:',
75 PciInterface_PmeHandler = 'icP;',
76 PciInterface_DevicePresent = 'icP<',
77 PciInterface_NativeIde = 'icP=',
78 PciInterface_AgpTarget = 'icP>',
79 PciInterface_Location = 'icP?'
80 } PCI_SIGNATURE, *PPCI_SIGNATURE;
81
82 //
83 // Device Extension Logic States
84 //
85 typedef enum _PCI_STATE
86 {
87 PciNotStarted,
88 PciStarted,
89 PciDeleted,
90 PciStopped,
91 PciSurpriseRemoved,
92 PciSynchronizedOperation,
93 PciMaxObjectState
94 } PCI_STATE;
95
96 //
97 // IRP Dispatch Logic Style
98 //
99 typedef enum _PCI_DISPATCH_STYLE
100 {
101 IRP_COMPLETE,
102 IRP_DOWNWARD,
103 IRP_UPWARD,
104 IRP_DISPATCH,
105 } PCI_DISPATCH_STYLE;
106
107 //
108 // PCI Hack Entry Information
109 //
110 typedef struct _PCI_HACK_ENTRY
111 {
112 USHORT VendorID;
113 USHORT DeviceID;
114 USHORT SubVendorID;
115 USHORT SubSystemID;
116 ULONGLONG HackFlags;
117 USHORT RevisionID;
118 UCHAR Flags;
119 } PCI_HACK_ENTRY, *PPCI_HACK_ENTRY;
120
121 //
122 // Power State Information for Device Extension
123 //
124 typedef struct _PCI_POWER_STATE
125 {
126 SYSTEM_POWER_STATE CurrentSystemState;
127 DEVICE_POWER_STATE CurrentDeviceState;
128 SYSTEM_POWER_STATE SystemWakeLevel;
129 DEVICE_POWER_STATE DeviceWakeLevel;
130 DEVICE_POWER_STATE SystemStateMapping[7];
131 PIRP WaitWakeIrp;
132 PVOID SavedCancelRoutine;
133 LONG Paging;
134 LONG Hibernate;
135 LONG CrashDump;
136 } PCI_POWER_STATE, *PPCI_POWER_STATE;
137
138 //
139 // Internal PCI Lock Structure
140 //
141 typedef struct _PCI_LOCK
142 {
143 LONG Atom;
144 BOOLEAN OldIrql;
145 } PCI_LOCK, *PPCI_LOCK;
146
147 //
148 // Device Extension for a Bus FDO
149 //
150 typedef struct _PCI_FDO_EXTENSION
151 {
152 SINGLE_LIST_ENTRY List;
153 ULONG ExtensionType;
154 struct _PCI_MJ_DISPATCH_TABLE *IrpDispatchTable;
155 BOOLEAN DeviceState;
156 BOOLEAN TentativeNextState;
157 KEVENT SecondaryExtLock;
158 PDEVICE_OBJECT PhysicalDeviceObject;
159 PDEVICE_OBJECT FunctionalDeviceObject;
160 PDEVICE_OBJECT AttachedDeviceObject;
161 KEVENT ChildListLock;
162 struct _PCI_PDO_EXTENSION *ChildPdoList;
163 struct _PCI_FDO_EXTENSION *BusRootFdoExtension;
164 struct _PCI_FDO_EXTENSION *ParentFdoExtension;
165 struct _PCI_PDO_EXTENSION *ChildBridgePdoList;
166 PPCI_BUS_INTERFACE_STANDARD PciBusInterface;
167 BOOLEAN MaxSubordinateBus;
168 BUS_HANDLER *BusHandler;
169 BOOLEAN BaseBus;
170 BOOLEAN Fake;
171 BOOLEAN ChildDelete;
172 BOOLEAN Scanned;
173 BOOLEAN ArbitersInitialized;
174 BOOLEAN BrokenVideoHackApplied;
175 BOOLEAN Hibernated;
176 PCI_POWER_STATE PowerState;
177 SINGLE_LIST_ENTRY SecondaryExtension;
178 LONG ChildWaitWakeCount;
179 PPCI_COMMON_CONFIG PreservedConfig;
180 PCI_LOCK Lock;
181 struct
182 {
183 BOOLEAN Acquired;
184 BOOLEAN CacheLineSize;
185 BOOLEAN LatencyTimer;
186 BOOLEAN EnablePERR;
187 BOOLEAN EnableSERR;
188 } HotPlugParameters;
189 LONG BusHackFlags;
190 } PCI_FDO_EXTENSION, *PPCI_FDO_EXTENSION;
191
192 //
193 // IRP Dispatch Function Type
194 //
195 typedef NTSTATUS (NTAPI *PCI_DISPATCH_FUNCTION)(
196 IN PIRP Irp,
197 IN PIO_STACK_LOCATION IoStackLocation,
198 IN PPCI_FDO_EXTENSION DeviceExtension
199 );
200
201 //
202 // IRP Dispatch Minor Table
203 //
204 typedef struct _PCI_MN_DISPATCH_TABLE
205 {
206 PCI_DISPATCH_STYLE DispatchStyle;
207 PCI_DISPATCH_FUNCTION DispatchFunction;
208 } PCI_MN_DISPATCH_TABLE, *PPCI_MN_DISPATCH_TABLE;
209
210 //
211 // IRP Dispatch Major Table
212 //
213 typedef struct _PCI_MJ_DISPATCH_TABLE
214 {
215 ULONG PnpIrpMaximumMinorFunction;
216 PPCI_MN_DISPATCH_TABLE PnpIrpDispatchTable;
217 ULONG PowerIrpMaximumMinorFunction;
218 PPCI_MN_DISPATCH_TABLE PowerIrpDispatchTable;
219 PCI_DISPATCH_STYLE SystemControlIrpDispatchStyle;
220 PCI_DISPATCH_FUNCTION SystemControlIrpDispatchFunction;
221 PCI_DISPATCH_STYLE OtherIrpDispatchStyle;
222 PCI_DISPATCH_FUNCTION OtherIrpDispatchFunction;
223 } PCI_MJ_DISPATCH_TABLE, *PPCI_MJ_DISPATCH_TABLE;
224
225 //
226 // Generic PCI Interface Constructor and Initializer
227 //
228 struct _PCI_INTERFACE;
229 typedef NTSTATUS (NTAPI *PCI_INTERFACE_CONSTRUCTOR)(
230 IN PVOID DeviceExtension,
231 IN PVOID Instance,
232 IN PVOID InterfaceData,
233 IN USHORT Version,
234 IN USHORT Size,
235 IN PINTERFACE Interface
236 );
237
238 typedef NTSTATUS (NTAPI *PCI_INTERFACE_INITIALIZER)(
239 IN PVOID Instance
240 );
241
242 //
243 // Generic PCI Interface (Interface, Translator, Arbiter)
244 //
245 typedef struct _PCI_INTERFACE
246 {
247 CONST GUID *InterfaceType;
248 USHORT MinSize;
249 USHORT MinVersion;
250 USHORT MaxVersion;
251 USHORT Flags;
252 LONG ReferenceCount;
253 PCI_SIGNATURE Signature;
254 PCI_INTERFACE_CONSTRUCTOR Constructor;
255 PCI_INTERFACE_INITIALIZER Initializer;
256 } PCI_INTERFACE, *PPCI_INTERFACE;
257
258 //
259 // Generic Secondary Extension Instance Header (Interface, Translator, Arbiter)
260 //
261 typedef struct PCI_SECONDARY_EXTENSION
262 {
263 SINGLE_LIST_ENTRY List;
264 PCI_SIGNATURE ExtensionType;
265 PVOID Destructor;
266 } PCI_SECONDARY_EXTENSION, *PPCI_SECONDARY_EXTENSION;
267
268 //
269 // PCI Arbiter Instance
270 //
271 typedef struct PCI_ARBITER_INSTANCE
272 {
273 PCI_SECONDARY_EXTENSION Header;
274 PPCI_INTERFACE Interface;
275 PPCI_FDO_EXTENSION BusFdoExtension;
276 WCHAR InstanceName[24];
277 //ARBITER_INSTANCE CommonInstance; FIXME: Need Arbiter Headers
278 } PCI_ARBITER_INSTANCE, *PPCI_ARBITER_INSTANCE;
279
280 //
281 // IRP Dispatch Routines
282 //
283 NTSTATUS
284 NTAPI
285 PciDispatchIrp(
286 IN PDEVICE_OBJECT DeviceObject,
287 IN PIRP Irp
288 );
289
290 NTSTATUS
291 NTAPI
292 PciIrpNotSupported(
293 IN PIRP Irp,
294 IN PIO_STACK_LOCATION IoStackLocation,
295 IN PPCI_FDO_EXTENSION DeviceExtension
296 );
297
298 NTSTATUS
299 NTAPI
300 PciPassIrpFromFdoToPdo(
301 IN PPCI_FDO_EXTENSION DeviceExtension,
302 IN PIRP Irp
303 );
304
305 NTSTATUS
306 NTAPI
307 PciCallDownIrpStack(
308 IN PPCI_FDO_EXTENSION DeviceExtension,
309 IN PIRP Irp
310 );
311
312 //
313 // Power Routines
314 //
315 NTSTATUS
316 NTAPI
317 PciFdoWaitWake(
318 IN PIRP Irp,
319 IN PIO_STACK_LOCATION IoStackLocation,
320 IN PPCI_FDO_EXTENSION DeviceExtension
321 );
322
323 NTSTATUS
324 NTAPI
325 PciFdoSetPowerState(
326 IN PIRP Irp,
327 IN PIO_STACK_LOCATION IoStackLocation,
328 IN PPCI_FDO_EXTENSION DeviceExtension
329 );
330
331 NTSTATUS
332 NTAPI
333 PciFdoIrpQueryPower(
334 IN PIRP Irp,
335 IN PIO_STACK_LOCATION IoStackLocation,
336 IN PPCI_FDO_EXTENSION DeviceExtension
337 );
338
339 //
340 // Bus FDO Routines
341 //
342 NTSTATUS
343 NTAPI
344 PciAddDevice(
345 IN PDRIVER_OBJECT DriverObject,
346 IN PDEVICE_OBJECT PhysicalDeviceObject
347 );
348
349 NTSTATUS
350 NTAPI
351 PciFdoIrpStartDevice(
352 IN PIRP Irp,
353 IN PIO_STACK_LOCATION IoStackLocation,
354 IN PPCI_FDO_EXTENSION DeviceExtension
355 );
356
357 NTSTATUS
358 NTAPI
359 PciFdoIrpQueryRemoveDevice(
360 IN PIRP Irp,
361 IN PIO_STACK_LOCATION IoStackLocation,
362 IN PPCI_FDO_EXTENSION DeviceExtension
363 );
364
365 NTSTATUS
366 NTAPI
367 PciFdoIrpRemoveDevice(
368 IN PIRP Irp,
369 IN PIO_STACK_LOCATION IoStackLocation,
370 IN PPCI_FDO_EXTENSION DeviceExtension
371 );
372
373 NTSTATUS
374 NTAPI
375 PciFdoIrpCancelRemoveDevice(
376 IN PIRP Irp,
377 IN PIO_STACK_LOCATION IoStackLocation,
378 IN PPCI_FDO_EXTENSION DeviceExtension
379 );
380
381 NTSTATUS
382 NTAPI
383 PciFdoIrpStopDevice(
384 IN PIRP Irp,
385 IN PIO_STACK_LOCATION IoStackLocation,
386 IN PPCI_FDO_EXTENSION DeviceExtension
387 );
388
389 NTSTATUS
390 NTAPI
391 PciFdoIrpQueryStopDevice(
392 IN PIRP Irp,
393 IN PIO_STACK_LOCATION IoStackLocation,
394 IN PPCI_FDO_EXTENSION DeviceExtension
395 );
396
397 NTSTATUS
398 NTAPI
399 PciFdoIrpCancelStopDevice(
400 IN PIRP Irp,
401 IN PIO_STACK_LOCATION IoStackLocation,
402 IN PPCI_FDO_EXTENSION DeviceExtension
403 );
404
405 NTSTATUS
406 NTAPI
407 PciFdoIrpQueryDeviceRelations(
408 IN PIRP Irp,
409 IN PIO_STACK_LOCATION IoStackLocation,
410 IN PPCI_FDO_EXTENSION DeviceExtension
411 );
412
413 NTSTATUS
414 NTAPI
415 PciFdoIrpQueryInterface(
416 IN PIRP Irp,
417 IN PIO_STACK_LOCATION IoStackLocation,
418 IN PPCI_FDO_EXTENSION DeviceExtension
419 );
420
421 NTSTATUS
422 NTAPI
423 PciFdoIrpQueryCapabilities(
424 IN PIRP Irp,
425 IN PIO_STACK_LOCATION IoStackLocation,
426 IN PPCI_FDO_EXTENSION DeviceExtension
427 );
428
429 NTSTATUS
430 NTAPI
431 PciFdoIrpDeviceUsageNotification(
432 IN PIRP Irp,
433 IN PIO_STACK_LOCATION IoStackLocation,
434 IN PPCI_FDO_EXTENSION DeviceExtension
435 );
436
437 NTSTATUS
438 NTAPI
439 PciFdoIrpSurpriseRemoval(
440 IN PIRP Irp,
441 IN PIO_STACK_LOCATION IoStackLocation,
442 IN PPCI_FDO_EXTENSION DeviceExtension
443 );
444
445 NTSTATUS
446 NTAPI
447 PciFdoIrpQueryLegacyBusInformation(
448 IN PIRP Irp,
449 IN PIO_STACK_LOCATION IoStackLocation,
450 IN PPCI_FDO_EXTENSION DeviceExtension
451 );
452
453 //
454 // HAL Callback/Hook Routines
455 //
456 VOID
457 NTAPI
458 PciHookHal(
459 VOID
460 );
461
462 //
463 // PCI Verifier Routines
464 //
465 VOID
466 NTAPI
467 PciVerifierInit(
468 IN PDRIVER_OBJECT DriverObject
469 );
470
471 //
472 // Utility Routines
473 //
474 BOOLEAN
475 NTAPI
476 PciStringToUSHORT(
477 IN PWCHAR String,
478 OUT PUSHORT Value
479 );
480
481 BOOLEAN
482 NTAPI
483 PciIsDatacenter(
484 VOID
485 );
486
487 NTSTATUS
488 NTAPI
489 PciBuildDefaultExclusionLists(
490 VOID
491 );
492
493 BOOLEAN
494 NTAPI
495 PciUnicodeStringStrStr(
496 IN PUNICODE_STRING InputString,
497 IN PCUNICODE_STRING EqualString,
498 IN BOOLEAN CaseInSensitive
499 );
500
501 BOOLEAN
502 NTAPI
503 PciOpenKey(
504 IN PWCHAR KeyName,
505 IN HANDLE RootKey,
506 IN ACCESS_MASK DesiredAccess,
507 OUT PHANDLE KeyHandle,
508 OUT PNTSTATUS KeyStatus
509 );
510
511 NTSTATUS
512 NTAPI
513 PciGetRegistryValue(
514 IN PWCHAR ValueName,
515 IN PWCHAR KeyName,
516 IN HANDLE RootHandle,
517 IN ULONG Type,
518 OUT PVOID *OutputBuffer,
519 OUT PULONG OutputLength
520 );
521
522 PPCI_FDO_EXTENSION
523 NTAPI
524 PciFindParentPciFdoExtension(
525 IN PDEVICE_OBJECT DeviceObject,
526 IN PKEVENT Lock
527 );
528
529 VOID
530 NTAPI
531 PciInsertEntryAtTail(
532 IN PSINGLE_LIST_ENTRY ListHead,
533 IN PPCI_FDO_EXTENSION DeviceExtension,
534 IN PKEVENT Lock
535 );
536
537 NTSTATUS
538 NTAPI
539 PciGetDeviceProperty(
540 IN PDEVICE_OBJECT DeviceObject,
541 IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
542 OUT PVOID *OutputBuffer
543 );
544
545 NTSTATUS
546 NTAPI
547 PciSendIoctl(
548 IN PDEVICE_OBJECT DeviceObject,
549 IN ULONG IoControlCode,
550 IN PVOID InputBuffer,
551 IN ULONG InputBufferLength,
552 IN PVOID OutputBuffer,
553 IN ULONG OutputBufferLength
554 );
555
556 VOID
557 NTAPI
558 PcipLinkSecondaryExtension(
559 IN PSINGLE_LIST_ENTRY List,
560 IN PVOID Lock,
561 IN PPCI_SECONDARY_EXTENSION SecondaryExtension,
562 IN PCI_SIGNATURE ExtensionType,
563 IN PVOID Destructor
564 );
565
566 PPCI_SECONDARY_EXTENSION
567 NTAPI
568 PciFindNextSecondaryExtension(
569 IN PSINGLE_LIST_ENTRY ListHead,
570 IN PCI_SIGNATURE ExtensionType
571 );
572
573 //
574 // Configuration Routines
575 //
576 NTSTATUS
577 NTAPI
578 PciGetConfigHandlers(
579 IN PPCI_FDO_EXTENSION FdoExtension
580 );
581
582 //
583 // State Machine Logic Transition Routines
584 //
585 VOID
586 NTAPI
587 PciInitializeState(
588 IN PPCI_FDO_EXTENSION DeviceExtension
589 );
590
591 NTSTATUS
592 NTAPI
593 PciBeginStateTransition(
594 IN PPCI_FDO_EXTENSION DeviceExtension,
595 IN PCI_STATE NewState
596 );
597
598 NTSTATUS
599 NTAPI
600 PciCancelStateTransition(
601 IN PPCI_FDO_EXTENSION DeviceExtension,
602 IN PCI_STATE NewState
603 );
604
605 VOID
606 NTAPI
607 PciCommitStateTransition(
608 IN PPCI_FDO_EXTENSION DeviceExtension,
609 IN PCI_STATE NewState
610 );
611
612
613 //
614 // Arbiter Support
615 //
616 NTSTATUS
617 NTAPI
618 PciInitializeArbiters(
619 IN PPCI_FDO_EXTENSION FdoExtension
620 );
621
622 NTSTATUS
623 NTAPI
624 PciInitializeArbiterRanges(
625 IN PPCI_FDO_EXTENSION DeviceExtension,
626 IN PCM_RESOURCE_LIST Resources
627 );
628
629 //
630 // Debug Helpers
631 //
632 BOOLEAN
633 NTAPI
634 PciDebugIrpDispatchDisplay(
635 IN PIO_STACK_LOCATION IoStackLocation,
636 IN PPCI_FDO_EXTENSION DeviceExtension,
637 IN USHORT MaxMinor
638 );
639
640 //
641 // Interface Support
642 //
643 NTSTATUS
644 NTAPI
645 PciQueryInterface(
646 IN PPCI_FDO_EXTENSION DeviceExtension,
647 IN CONST GUID* InterfaceType,
648 IN ULONG Size,
649 IN ULONG Version,
650 IN PVOID InterfaceData,
651 IN PINTERFACE Interface,
652 IN BOOLEAN LastChance
653 );
654
655 NTSTATUS
656 NTAPI
657 PciPmeInterfaceInitializer(
658 IN PVOID Instance
659 );
660
661 NTSTATUS
662 NTAPI
663 routeintrf_Initializer(
664 IN PVOID Instance
665 );
666
667 NTSTATUS
668 NTAPI
669 arbusno_Initializer(
670 IN PVOID Instance
671 );
672
673 NTSTATUS
674 NTAPI
675 agpintrf_Initializer(
676 IN PVOID Instance
677 );
678
679 NTSTATUS
680 NTAPI
681 tranirq_Initializer(
682 IN PVOID Instance
683 );
684
685 NTSTATUS
686 NTAPI
687 busintrf_Initializer(
688 IN PVOID Instance
689 );
690
691 NTSTATUS
692 NTAPI
693 armem_Initializer(
694 IN PVOID Instance
695 );
696
697 NTSTATUS
698 NTAPI
699 ario_Initializer(
700 IN PVOID Instance
701 );
702
703 NTSTATUS
704 NTAPI
705 locintrf_Initializer(
706 IN PVOID Instance
707 );
708
709 NTSTATUS
710 NTAPI
711 pcicbintrf_Initializer(
712 IN PVOID Instance
713 );
714
715 NTSTATUS
716 NTAPI
717 lddintrf_Initializer(
718 IN PVOID Instance
719 );
720
721 NTSTATUS
722 NTAPI
723 devpresent_Initializer(
724 IN PVOID Instance
725 );
726
727 NTSTATUS
728 NTAPI
729 agpintrf_Constructor(
730 IN PVOID DeviceExtension,
731 IN PVOID Instance,
732 IN PVOID InterfaceData,
733 IN USHORT Version,
734 IN USHORT Size,
735 IN PINTERFACE Interface
736 );
737
738 NTSTATUS
739 NTAPI
740 arbusno_Constructor(
741 IN PVOID DeviceExtension,
742 IN PVOID Instance,
743 IN PVOID InterfaceData,
744 IN USHORT Version,
745 IN USHORT Size,
746 IN PINTERFACE Interface
747 );
748
749 NTSTATUS
750 NTAPI
751 tranirq_Constructor(
752 IN PVOID DeviceExtension,
753 IN PVOID Instance,
754 IN PVOID InterfaceData,
755 IN USHORT Version,
756 IN USHORT Size,
757 IN PINTERFACE Interface
758 );
759
760 NTSTATUS
761 NTAPI
762 armem_Constructor(
763 IN PVOID DeviceExtension,
764 IN PVOID Instance,
765 IN PVOID InterfaceData,
766 IN USHORT Version,
767 IN USHORT Size,
768 IN PINTERFACE Interface
769 );
770
771 NTSTATUS
772 NTAPI
773 busintrf_Constructor(
774 IN PVOID DeviceExtension,
775 IN PVOID Instance,
776 IN PVOID InterfaceData,
777 IN USHORT Version,
778 IN USHORT Size,
779 IN PINTERFACE Interface
780 );
781
782 NTSTATUS
783 NTAPI
784 ario_Constructor(
785 IN PVOID DeviceExtension,
786 IN PVOID Instance,
787 IN PVOID InterfaceData,
788 IN USHORT Version,
789 IN USHORT Size,
790 IN PINTERFACE Interface
791 );
792
793 NTSTATUS
794 NTAPI
795 pcicbintrf_Constructor(
796 IN PVOID DeviceExtension,
797 IN PVOID Instance,
798 IN PVOID InterfaceData,
799 IN USHORT Version,
800 IN USHORT Size,
801 IN PINTERFACE Interface
802 );
803
804 NTSTATUS
805 NTAPI
806 lddintrf_Constructor(
807 IN PVOID DeviceExtension,
808 IN PVOID Instance,
809 IN PVOID InterfaceData,
810 IN USHORT Version,
811 IN USHORT Size,
812 IN PINTERFACE Interface
813 );
814
815 NTSTATUS
816 NTAPI
817 locintrf_Constructor(
818 IN PVOID DeviceExtension,
819 IN PVOID Instance,
820 IN PVOID InterfaceData,
821 IN USHORT Version,
822 IN USHORT Size,
823 IN PINTERFACE Interface
824 );
825
826 NTSTATUS
827 NTAPI
828 PciPmeInterfaceConstructor(
829 IN PVOID DeviceExtension,
830 IN PVOID Instance,
831 IN PVOID InterfaceData,
832 IN USHORT Version,
833 IN USHORT Size,
834 IN PINTERFACE Interface
835 );
836
837 NTSTATUS
838 NTAPI
839 routeintrf_Constructor(
840 IN PVOID DeviceExtension,
841 IN PVOID Instance,
842 IN PVOID InterfaceData,
843 IN USHORT Version,
844 IN USHORT Size,
845 IN PINTERFACE Interface
846 );
847
848 NTSTATUS
849 NTAPI
850 devpresent_Constructor(
851 IN PVOID DeviceExtension,
852 IN PVOID Instance,
853 IN PVOID InterfaceData,
854 IN USHORT Version,
855 IN USHORT Size,
856 IN PINTERFACE Interface
857 );
858
859 //
860 // External Resources
861 //
862 extern SINGLE_LIST_ENTRY PciFdoExtensionListHead;
863 extern KEVENT PciGlobalLock;
864 extern PPCI_INTERFACE PciInterfaces[];
865 extern PCI_INTERFACE ArbiterInterfaceBusNumber;
866 extern PCI_INTERFACE ArbiterInterfaceMemory;
867 extern PCI_INTERFACE ArbiterInterfaceIo;
868 extern PCI_INTERFACE BusHandlerInterface;
869 extern PCI_INTERFACE PciRoutingInterface;
870 extern PCI_INTERFACE PciCardbusPrivateInterface;
871 extern PCI_INTERFACE PciLegacyDeviceDetectionInterface;
872 extern PCI_INTERFACE PciPmeInterface;
873 extern PCI_INTERFACE PciDevicePresentInterface;
874 //extern PCI_INTERFACE PciNativeIdeInterface;
875 extern PCI_INTERFACE PciLocationInterface;
876 extern PCI_INTERFACE AgpTargetInterface;
877 extern PCI_INTERFACE TranslatorInterfaceInterrupt;
878
879 /* EOF */