Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
4.1 KiB

  1. /*++
  2. Module Name:
  3. pciintrf.h
  4. Abstract:
  5. Contains interface GUIDs and structures for non-wdm modules that
  6. interface directly with the PCI driver via the PNP QUERY_INTERFACE
  7. mechanism.
  8. Author:
  9. Peter Johnston (peterj) November 1997
  10. Revision History:
  11. --*/
  12. DEFINE_GUID(GUID_PCI_CARDBUS_INTERFACE_PRIVATE, 0xcca82f31, 0x54d6, 0x11d1, 0x82, 0x24, 0x00, 0xa0, 0xc9, 0x32, 0x43, 0x85);
  13. DEFINE_GUID(GUID_PCI_PME_INTERFACE, 0xaac7e6ac, 0xbb0b, 0x11d2, 0xb4, 0x84, 0x00, 0xc0, 0x4f, 0x72, 0xde, 0x8b);
  14. DEFINE_GUID(GUID_PCI_NATIVE_IDE_INTERFACE, 0x98f37d63, 0x42ae, 0x4ad9, 0x8c, 0x36, 0x93, 0x2d, 0x28, 0x38, 0x3d, 0xf8);
  15. #ifndef _PCIINTRF_
  16. #define _PCIINTRF_
  17. //
  18. // CardBus
  19. //
  20. #define PCI_CB_INTRF_VERSION 1
  21. typedef
  22. NTSTATUS
  23. (*PCARDBUSADD)(
  24. IN PDEVICE_OBJECT DeviceObject,
  25. IN OUT PVOID * DeviceContext
  26. );
  27. typedef
  28. NTSTATUS
  29. (*PCARDBUSDELETE)(
  30. IN PVOID DeviceContext
  31. );
  32. typedef
  33. NTSTATUS
  34. (*PCARDBUSPCIDISPATCH)(
  35. IN PVOID DeviceContext,
  36. IN PIRP Irp
  37. );
  38. typedef
  39. NTSTATUS
  40. (*PCARDBUSGETLOCATION)(
  41. IN PDEVICE_OBJECT DeviceObject,
  42. OUT UCHAR *Bus,
  43. OUT UCHAR *DeviceNumber,
  44. OUT UCHAR *FunctionNumber,
  45. OUT BOOLEAN *OnDebugPath
  46. );
  47. typedef struct _PCI_CARDBUS_INTERFACE_PRIVATE {
  48. //
  49. // generic interface header
  50. //
  51. USHORT Size;
  52. USHORT Version;
  53. PVOID Context; // not actually used in this interface
  54. PINTERFACE_REFERENCE InterfaceReference;
  55. PINTERFACE_DEREFERENCE InterfaceDereference;
  56. //
  57. // Pci data.
  58. //
  59. PDRIVER_OBJECT DriverObject; // returned ptr to PCI driver
  60. //
  61. // Pci-Cardbus private interfaces
  62. //
  63. PCARDBUSADD AddCardBus;
  64. PCARDBUSDELETE DeleteCardBus;
  65. PCARDBUSPCIDISPATCH DispatchPnp;
  66. PCARDBUSGETLOCATION GetLocation;
  67. } PCI_CARDBUS_INTERFACE_PRIVATE, *PPCI_CARDBUS_INTERFACE_PRIVATE;
  68. typedef
  69. VOID
  70. (*PPME_GET_INFORMATION) (
  71. IN PDEVICE_OBJECT Pdo,
  72. OUT PBOOLEAN PmeCapable,
  73. OUT PBOOLEAN PmeStatus,
  74. OUT PBOOLEAN PmeEnable
  75. );
  76. typedef
  77. VOID
  78. (*PPME_CLEAR_PME_STATUS) (
  79. IN PDEVICE_OBJECT Pdo
  80. );
  81. typedef
  82. VOID
  83. (*PPME_SET_PME_ENABLE) (
  84. IN PDEVICE_OBJECT Pdo,
  85. IN BOOLEAN PmeEnable
  86. );
  87. typedef struct _PCI_PME_INTERFACE {
  88. //
  89. // generic interface header
  90. //
  91. USHORT Size;
  92. USHORT Version;
  93. PVOID Context;
  94. PINTERFACE_REFERENCE InterfaceReference;
  95. PINTERFACE_DEREFERENCE InterfaceDereference;
  96. //
  97. // PME Signal interfaces
  98. //
  99. PPME_GET_INFORMATION GetPmeInformation;
  100. PPME_CLEAR_PME_STATUS ClearPmeStatus;
  101. PPME_SET_PME_ENABLE UpdateEnable;
  102. } PCI_PME_INTERFACE, *PPCI_PME_INTERFACE;
  103. // Some well-known interface versions supported by the PCI Bus Driver
  104. #define PCI_PME_INTRF_STANDARD_VER 1
  105. //
  106. //
  107. //
  108. typedef
  109. VOID
  110. (*PPCI_IDE_IOSPACE_INTERRUPT_CONTROL)(
  111. IN PVOID Context,
  112. IN BOOLEAN Enable
  113. );
  114. /*++
  115. Routine Description:
  116. Controls the enabling and disabling of native mode PCI IDE controllers
  117. IoSpaceEnable bits which on some controllers (currently Intel ICH3)
  118. will mask off interrupt generation and this prevent the system from
  119. crashing...
  120. This should be called during AddDevice and the calling it modifies
  121. PCIs behaviour to not enable IO space during START_DEVICE for the device.
  122. This function the allows the requester to enable IO space when appropriate.
  123. Arguments:
  124. Context - Context from the PCI_NATIVE_IDE_INTERFACE
  125. Enable - If TRUE then set the IoSpaceEnable bit in the command register,
  126. otherwise disable it.
  127. Return Value:
  128. None - if this operation fails we have aleady bugchecked in the PCI driver
  129. --*/
  130. typedef struct _PCI_NATIVE_IDE_INTERFACE {
  131. //
  132. // Generic interface header
  133. //
  134. USHORT Size;
  135. USHORT Version;
  136. PVOID Context;
  137. PINTERFACE_REFERENCE InterfaceReference;
  138. PINTERFACE_DEREFERENCE InterfaceDereference;
  139. //
  140. // Native IDE methods
  141. //
  142. PPCI_IDE_IOSPACE_INTERRUPT_CONTROL InterruptControl;
  143. } PCI_NATIVE_IDE_INTERFACE, *PPCI_NATIVE_IDE_INTERFACE;
  144. #define PCI_NATIVE_IDE_INTERFACE_VERSION 1
  145. #endif // _PCIINTRF_