Leaked source code of windows server 2003
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.

120 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. pch.h
  5. Abstract:
  6. This is the precompiled header for the ACPI NT subtree
  7. Author:
  8. Jason Clark (jasoncl)
  9. Environment:
  10. Kernel mode only.
  11. Revision History:
  12. --*/
  13. #ifndef _ACPI_IRQ_ARB_H_
  14. #define _ACPI_IRQ_ARB_H_
  15. typedef struct {
  16. ARBITER_INSTANCE ArbiterState;
  17. PDEVICE_OBJECT DeviceObject;
  18. } ACPI_ARBITER, *PACPI_ARBITER;
  19. typedef struct {
  20. SINGLE_LIST_ENTRY List;
  21. PDEVICE_OBJECT Pdo;
  22. } LINK_NODE_ATTACHED_DEVICES, *PLINK_NODE_ATTACHED_DEVICES;
  23. typedef struct {
  24. LIST_ENTRY List;
  25. ULONG ReferenceCount;
  26. LONG TempRefCount;
  27. PNSOBJ NameSpaceObject;
  28. ULONGLONG CurrentIrq;
  29. ULONGLONG TempIrq;
  30. UCHAR Flags;
  31. SINGLE_LIST_ENTRY AttachedDevices; // filled in only for debugging
  32. } LINK_NODE, *PLINK_NODE;
  33. #define LAST_PCI_IRQ_BUFFER_SIZE 10
  34. typedef struct {
  35. LIST_ENTRY LinkNodeHead;
  36. PNSOBJ CurrentLinkNode;
  37. PINT_ROUTE_INTERFACE_STANDARD InterruptRouting;
  38. ULONG LastPciIrqIndex;
  39. ULONGLONG LastPciIrq[LAST_PCI_IRQ_BUFFER_SIZE];
  40. } ARBITER_EXTENSION, *PARBITER_EXTENSION;
  41. typedef struct _VECTOR_BLOCK {
  42. union {
  43. struct {
  44. ULONG Vector;
  45. UCHAR Count;
  46. CHAR TempCount;
  47. UCHAR Flags;
  48. UCHAR TempFlags;
  49. } Entry;
  50. struct {
  51. ULONG Token;
  52. struct _VECTOR_BLOCK *Next;
  53. } Chain;
  54. };
  55. } VECTOR_BLOCK, *PVECTOR_BLOCK;
  56. #define TOKEN_VALUE 0x57575757
  57. #define EMPTY_BLOCK_VALUE 0x58585858
  58. #define VECTOR_HASH_TABLE_LENGTH 0x1f
  59. #define VECTOR_HASH_TABLE_WIDTH 2
  60. #define VECTOR_HASH_TABLE_SIZE (sizeof(VECTOR_BLOCK) \
  61. * VECTOR_HASH_TABLE_LENGTH \
  62. * VECTOR_HASH_TABLE_WIDTH)
  63. NTSTATUS
  64. AcpiInitIrqArbiter(
  65. PDEVICE_OBJECT RootFdo
  66. );
  67. NTSTATUS
  68. AcpiArbInitializePciRouting(
  69. PDEVICE_OBJECT PciPdo
  70. );
  71. NTSTATUS
  72. IrqArbRestoreIrqRouting(
  73. PFNACB CompletionHandler,
  74. PVOID CompletionContext
  75. );
  76. extern ACPI_ARBITER AcpiArbiter;
  77. extern BOOLEAN PciInterfacesInstantiated;
  78. #define PCI_PNP_ID "PNP0A03"
  79. #define LINK_NODE_PNP_ID "PNP0C0F"
  80. // Prototypes for stuff used by msi.c
  81. NTSTATUS
  82. GetVectorProperties(
  83. IN ULONG Vector,
  84. OUT UCHAR *Flags
  85. );
  86. NTSTATUS
  87. AcpiArbGetLinkNodeOptions(
  88. IN PNSOBJ LinkNode,
  89. IN OUT PCM_RESOURCE_LIST *LinkNodeIrqs,
  90. IN OUT UCHAR *Flags
  91. );
  92. #endif