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.

155 lines
3.7 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. wake.h
  5. Abstract:
  6. Handles wake code for the entire ACPI subsystem
  7. Author:
  8. splante (splante)
  9. Environment:
  10. Kernel mode only.
  11. Revision History:
  12. 06-18-97: Initial Revision
  13. 11-24-97: Rewrite
  14. --*/
  15. #ifndef _WAKE_H_
  16. #define _WAKE_H_
  17. //
  18. // This structure is used only within this module to ensure that we run
  19. // the _PSW methods in a synchronized and well behabed manner
  20. //
  21. typedef struct _ACPI_WAKE_PSW_CONTEXT {
  22. LIST_ENTRY ListEntry;
  23. PDEVICE_EXTENSION DeviceExtension;
  24. BOOLEAN Enable;
  25. ULONG Count;
  26. PFNACB CallBack;
  27. PVOID Context;
  28. } ACPI_WAKE_PSW_CONTEXT, *PACPI_WAKE_PSW_CONTEXT;
  29. //
  30. // This structure is used when we wake up from hibernate and we need to
  31. // re-enable all of the outstanding _PSWs
  32. //
  33. typedef struct _ACPI_WAKE_RESTORE_PSW_CONTEXT {
  34. PACPI_POWER_CALLBACK CallBack;
  35. PVOID CallBackContext;
  36. } ACPI_WAKE_RESTORE_PSW_CONTEXT, *PACPI_WAKE_RESTORE_PSW_CONTEXT;
  37. extern NPAGED_LOOKASIDE_LIST PswContextLookAsideList;
  38. extern BOOLEAN PciPmeInterfaceInstantiated;
  39. VOID
  40. ACPIWakeCompleteRequestQueue(
  41. IN PLIST_ENTRY RequestList,
  42. IN NTSTATUS Status
  43. );
  44. NTSTATUS
  45. ACPIWakeDisableAsync(
  46. IN PDEVICE_EXTENSION DeviceExtenion,
  47. IN PLIST_ENTRY RequestList,
  48. IN PFNACB CallBack,
  49. IN PVOID Context
  50. );
  51. NTSTATUS
  52. ACPIWakeEmptyRequestQueue(
  53. IN PDEVICE_EXTENSION DeviceExtension
  54. );
  55. NTSTATUS
  56. ACPIWakeEnableDisableAsync(
  57. IN PDEVICE_EXTENSION DeviceExtension,
  58. IN BOOLEAN Enable,
  59. IN PFNACB CallBack,
  60. IN PVOID Context
  61. );
  62. VOID
  63. EXPORT
  64. ACPIWakeEnableDisableAsyncCallBack(
  65. IN PNSOBJ AcpiObject,
  66. IN NTSTATUS Status,
  67. IN POBJDATA ObjData,
  68. IN PVOID Context
  69. );
  70. VOID
  71. ACPIWakeEnableDisablePciDevice(
  72. IN PDEVICE_EXTENSION DeviceExtension,
  73. IN BOOLEAN Enable
  74. );
  75. NTSTATUS
  76. ACPIWakeEnableDisableSync(
  77. IN PDEVICE_EXTENSION DeviceExtension,
  78. IN BOOLEAN Enable
  79. );
  80. VOID
  81. EXPORT
  82. ACPIWakeEnableDisableSyncCallBack(
  83. IN PNSOBJ AcpiObject,
  84. IN NTSTATUS Status,
  85. IN POBJDATA ObjData,
  86. IN PVOID Context
  87. );
  88. VOID
  89. ACPIWakeEnableWakeEvents(
  90. VOID
  91. );
  92. NTSTATUS
  93. ACPIWakeInitializePciDevice(
  94. IN PDEVICE_OBJECT DeviceObject
  95. );
  96. NTSTATUS
  97. ACPIWakeInitializePmeRouting(
  98. IN PDEVICE_OBJECT DeviceObject
  99. );
  100. VOID
  101. ACPIWakeRemoveDevicesAndUpdate(
  102. IN PDEVICE_EXTENSION TargetExtension,
  103. IN PLIST_ENTRY ListHead
  104. );
  105. NTSTATUS
  106. ACPIWakeRestoreEnables(
  107. IN PACPI_BUILD_CALLBACK CallBack,
  108. IN PVOID CallBackContext
  109. );
  110. VOID
  111. ACPIWakeRestoreEnablesCompletion(
  112. IN PDEVICE_EXTENSION DeviceExtension,
  113. IN PVOID Context,
  114. IN NTSTATUS Status
  115. );
  116. NTSTATUS
  117. ACPIWakeWaitIrp(
  118. IN PDEVICE_OBJECT DeviceObject,
  119. IN PIRP Irp
  120. );
  121. #endif