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.

144 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1990-1998 Microsoft Corporation
  3. Module Name:
  4. local.h
  5. Abstract:
  6. This contains the private header information (function prototypes,
  7. data and type declarations) for the PCI IRQ Miniport library.
  8. Author:
  9. Santosh Jodh (santoshj) 09-June-1998
  10. Revision History:
  11. --*/
  12. #include "nthal.h"
  13. #include "hal.h"
  14. #include "pci.h"
  15. #include "pciirqmp.h"
  16. #if DBG
  17. #define PCIIRQMPPRINT(x) { \
  18. DbgPrint("PCIIRQMP: "); \
  19. DbgPrint x; \
  20. DbgPrint("\n"); \
  21. }
  22. #else
  23. #define PCIIRQMPPRINT(x)
  24. #endif
  25. //
  26. // Typedefs to keep source level compatibility with W9x
  27. //
  28. typedef PCI_IRQ_ROUTING_TABLE IRQINFOHEADER;
  29. typedef PPCI_IRQ_ROUTING_TABLE PIRQINFOHEADER;
  30. typedef SLOT_INFO IRQINFO;
  31. typedef PSLOT_INFO PIRQINFO;
  32. #define CDECL
  33. #define LOCAL_DATA static
  34. #define GLOBAL_DATA
  35. //
  36. // Bus number of the Pci Irq Router device.
  37. //
  38. extern ULONG bBusPIC;
  39. //
  40. // Slot number of Pci Irq Router device (Bits 7:3 Dev, 2:0 Func).
  41. //
  42. extern ULONG bDevFuncPIC;
  43. #define CATENATE(x, y) x ## y
  44. #define XCATENATE(x, y) CATENATE(x, y)
  45. #define DECLARE_MINIPORT_FUNCTION(x, y) XCATENATE(x, y)
  46. #define IO_Delay()
  47. //
  48. // Prototype for misc utility functions.
  49. //
  50. NTSTATUS
  51. EisaGetTrigger (
  52. OUT PULONG Trigger
  53. );
  54. NTSTATUS
  55. EisaSetTrigger (
  56. IN ULONG Trigger
  57. );
  58. UCHAR
  59. ReadConfigUchar (
  60. IN ULONG BusNumber,
  61. IN ULONG DevFunc,
  62. IN UCHAR Offset
  63. );
  64. USHORT
  65. ReadConfigUshort (
  66. IN ULONG BusNumber,
  67. IN ULONG DevFunc,
  68. IN UCHAR Offset
  69. );
  70. ULONG
  71. ReadConfigUlong (
  72. IN ULONG BusNumber,
  73. IN ULONG DevFunc,
  74. IN UCHAR Offset
  75. );
  76. VOID
  77. WriteConfigUchar (
  78. IN ULONG BusNumber,
  79. IN ULONG DevFunc,
  80. IN UCHAR Offset,
  81. IN UCHAR Data
  82. );
  83. VOID
  84. WriteConfigUshort (
  85. IN ULONG BusNumber,
  86. IN ULONG DevFunc,
  87. IN UCHAR Offset,
  88. IN USHORT Data
  89. );
  90. VOID
  91. WriteConfigUlong (
  92. IN ULONG BusNumber,
  93. IN ULONG DevFunc,
  94. IN UCHAR Offset,
  95. IN ULONG Data
  96. );
  97. UCHAR
  98. GetMinLink (
  99. IN PPCI_IRQ_ROUTING_TABLE PciIrqRoutingTable
  100. );
  101. UCHAR
  102. GetMaxLink (
  103. IN PPCI_IRQ_ROUTING_TABLE PciIrqRoutingTable
  104. );
  105. VOID
  106. NormalizeLinks (
  107. IN PPCI_IRQ_ROUTING_TABLE PciIrqRoutingTable,
  108. IN UCHAR Adjustment
  109. );