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.

151 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. gpe.h
  5. Abstract:
  6. contains all structures protyptes for connecting external
  7. vectors to the Gpe Engine
  8. Environment
  9. Kernel mode only
  10. Revision History:
  11. 03/22/00 - Initial Revision
  12. --*/
  13. #ifndef _GPE_H_
  14. #define _GPE_H_
  15. //
  16. // Lock to protect all the table accesses
  17. //
  18. extern KSPIN_LOCK GpeTableLock;
  19. extern PUCHAR GpeEnable;
  20. extern PUCHAR GpeCurEnable;
  21. extern PUCHAR GpeIsLevel;
  22. extern PUCHAR GpeHandlerType;
  23. //
  24. // Possible wake bits that are currently enabled
  25. //
  26. extern PUCHAR GpeWakeEnable;
  27. //
  28. // These are wake bits with methods
  29. //
  30. extern PUCHAR GpeWakeHandler;
  31. extern PUCHAR GpeSpecialHandler;
  32. //
  33. // These are the GPEs that have been processed
  34. //
  35. extern PUCHAR GpePending;
  36. extern PUCHAR GpeRunMethod;
  37. extern PUCHAR GpeComplete;
  38. extern PUCHAR GpeMap;
  39. //
  40. // This is what lets us remember state
  41. //
  42. extern PUCHAR GpeSavedWakeMask;
  43. extern PUCHAR GpeSavedWakeStatus;
  44. //
  45. // For PNP/QUERY_INTERFACE
  46. //
  47. extern ACPI_INTERFACE_STANDARD ACPIInterfaceTable;
  48. //
  49. // For logging errors
  50. //
  51. typedef struct _ACPI_GPE_ERROR_CONTEXT {
  52. WORK_QUEUE_ITEM Item;
  53. ULONG GpeIndex;
  54. } ACPI_GPE_ERROR_CONTEXT, *PACPI_GPE_ERROR_CONTEXT;
  55. VOID
  56. ACPIGpeBuildEventMasks(
  57. VOID
  58. );
  59. VOID
  60. ACPIGpeBuildWakeMasks(
  61. IN PDEVICE_EXTENSION DeviceExtension
  62. );
  63. VOID
  64. ACPIGpeClearEventMasks(
  65. VOID
  66. );
  67. VOID
  68. ACPIGpeClearRegisters(
  69. VOID
  70. );
  71. VOID
  72. ACPIGpeEnableDisableEvents(
  73. BOOLEAN Enable
  74. );
  75. VOID
  76. ACPIGpeHalEnableDisableEvents(
  77. BOOLEAN Enable
  78. );
  79. VOID
  80. ACPIGpeEnableWakeEvents(
  81. VOID
  82. );
  83. ULONG
  84. ACPIGpeIndexToByteIndex(
  85. ULONG Index
  86. );
  87. ULONG
  88. ACPIGpeIndexToGpeRegister(
  89. ULONG Index
  90. );
  91. BOOLEAN
  92. ACPIGpeInstallRemoveIndex(
  93. ULONG GpeIndex,
  94. ULONG Action,
  95. ULONG Type,
  96. PBOOLEAN HasControlMethod
  97. );
  98. VOID
  99. ACPIGpeInstallRemoveIndexErrorWorker(
  100. IN PVOID Context
  101. );
  102. BOOLEAN
  103. ACPIGpeIsEvent(
  104. VOID
  105. );
  106. ULONG
  107. ACPIGpeRegisterToGpeIndex(
  108. ULONG Register,
  109. ULONG BitPosition
  110. );
  111. VOID
  112. ACPIGpeUpdateCurrentEnable(
  113. IN ULONG GpeRegister,
  114. IN UCHAR Completed
  115. );
  116. BOOLEAN
  117. ACPIGpeValidIndex(
  118. ULONG Index
  119. );
  120. #endif