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.

124 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. vector.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 _VECTOR_H_
  14. #define _VECTOR_H_
  15. //
  16. // Object returned by GpeConnectVector
  17. //
  18. typedef struct _GPE_VECTOR_OBJECT {
  19. ULONG Vector;
  20. PGPE_SERVICE_ROUTINE Handler;
  21. PVOID Context;
  22. BOOLEAN Sharable;
  23. BOOLEAN HasControlMethod;
  24. KINTERRUPT_MODE Mode;
  25. } GPE_VECTOR_OBJECT, *PGPE_VECTOR_OBJECT;
  26. //
  27. // Structure of each entry in the global GPE vector table
  28. //
  29. typedef struct {
  30. UCHAR Next;
  31. PGPE_VECTOR_OBJECT GpeVectorObject;
  32. } GPE_VECTOR_ENTRY, *PGPE_VECTOR_ENTRY;
  33. extern PGPE_VECTOR_ENTRY GpeVectorTable;
  34. extern UCHAR GpeVectorFree;
  35. extern ULONG GpeVectorTableSize;
  36. //
  37. // Action parameter to ACPIGpeInstallRemoveIndex
  38. //
  39. #define ACPI_GPE_EDGE_INSTALL 0
  40. #define ACPI_GPE_LEVEL_INSTALL 1
  41. #define ACPI_GPE_REMOVE 2
  42. //
  43. // Type parameter to ACPIGpeInstallRemoveIndex
  44. //
  45. #define ACPI_GPE_HANDLER 0
  46. #define ACPI_GPE_CONTROL_METHOD 1
  47. VOID
  48. ACPIVectorBuildVectorMasks(
  49. VOID
  50. );
  51. NTSTATUS
  52. ACPIVectorClear(
  53. PDEVICE_OBJECT AcpiDeviceObject,
  54. PVOID GpeVectorObject
  55. );
  56. NTSTATUS
  57. ACPIVectorConnect(
  58. PDEVICE_OBJECT AcpiDeviceObject,
  59. ULONG GpeVector,
  60. KINTERRUPT_MODE GpeMode,
  61. BOOLEAN Sharable,
  62. PGPE_SERVICE_ROUTINE ServiceRoutine,
  63. PVOID ServiceContext,
  64. PVOID *GpeVectorObject
  65. );
  66. NTSTATUS
  67. ACPIVectorDisable(
  68. PDEVICE_OBJECT AcpiDeviceObject,
  69. PVOID GpeVectorObject
  70. );
  71. NTSTATUS
  72. ACPIVectorDisconnect(
  73. PVOID GpeVectorObject
  74. );
  75. NTSTATUS
  76. ACPIVectorEnable(
  77. PDEVICE_OBJECT AcpiDeviceObject,
  78. PVOID GpeVectorObject
  79. );
  80. VOID
  81. ACPIVectorFreeEntry (
  82. ULONG TableIndex
  83. );
  84. BOOLEAN
  85. ACPIVectorGetEntry (
  86. PULONG TableIndex
  87. );
  88. BOOLEAN
  89. ACPIVectorInstall(
  90. ULONG GpeIndex,
  91. PGPE_VECTOR_OBJECT GpeVectorObject
  92. );
  93. BOOLEAN
  94. ACPIVectorRemove(
  95. ULONG GpeIndex
  96. );
  97. #endif