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.

168 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. thermal.h
  5. Abstract:
  6. This module implements all the callbacks that are NT specific from
  7. the AML Interperter
  8. Environment
  9. Kernel mode only
  10. Revision History:
  11. 04-Jun-97 Initial Revision
  12. --*/
  13. #ifndef _THERMAL_H_
  14. #define _THERMAL_H_
  15. //
  16. // Structures
  17. //
  18. typedef struct {
  19. THERMAL_INFORMATION Info;
  20. ULONG CoolingLevel;
  21. ULONG Mode;
  22. PVOID ActiveList[10];
  23. PNSOBJ TempMethod;
  24. OBJDATA Temp;
  25. } THRM_INFO, *PTHRM_INFO;
  26. extern WMIGUIDREGINFO ACPIThermalGuidList;
  27. extern KSPIN_LOCK AcpiThermalLock;
  28. extern LIST_ENTRY AcpiThermalList;
  29. #define ACPIThermalGuidCount (sizeof(ACPIThermalGuidList) / sizeof(WMIGUIDREGINFO))
  30. //
  31. // Defines
  32. //
  33. #define THRM_COOLING_LEVEL 0x00000001
  34. #define THRM_TEMP 0x00000002
  35. #define THRM_TRIP_POINTS 0x00000004
  36. #define THRM_MODE 0x00000008
  37. #define THRM_INITIALIZE 0x00000010
  38. #define THRM_WAIT_FOR_NOTIFY 0x20000000
  39. #define THRM_BUSY 0x40000000
  40. #define THRM_IN_SERVICE_LOOP 0x80000000
  41. //
  42. // Prototypes
  43. //
  44. VOID
  45. ACPIThermalCalculateProcessorMask(
  46. IN PNSOBJ ProcessorObject,
  47. IN PTHRM_INFO Thrm
  48. );
  49. VOID
  50. ACPIThermalCancelRequest (
  51. IN PDEVICE_OBJECT DeviceObject,
  52. IN PIRP Irp
  53. );
  54. VOID
  55. EXPORT
  56. ACPIThermalComplete(
  57. IN PNSOBJ AcpiObject,
  58. IN NTSTATUS Status,
  59. IN POBJDATA Result OPTIONAL,
  60. IN PVOID DevExt
  61. );
  62. BOOLEAN
  63. ACPIThermalCompletePendingIrps(
  64. IN PDEVICE_EXTENSION DeviceExtension,
  65. IN PTHRM_INFO Thermal
  66. );
  67. NTSTATUS
  68. ACPIThermalDeviceControl(
  69. IN PDEVICE_OBJECT DeviceObject,
  70. IN PIRP Irp
  71. );
  72. VOID
  73. ACPIThermalEvent(
  74. IN PDEVICE_OBJECT DeviceObject,
  75. IN ULONG EventData
  76. );
  77. NTSTATUS
  78. ACPIThermalFanStartDevice(
  79. IN PDEVICE_OBJECT DeviceObject,
  80. IN PIRP Irp
  81. );
  82. VOID
  83. ACPIThermalLoop(
  84. IN PDEVICE_EXTENSION DeviceExtension,
  85. IN ULONG Clear
  86. );
  87. VOID
  88. ACPIThermalPowerCallback(
  89. IN PDEVICE_EXTENSION DeviceExtenion,
  90. IN PVOID Context,
  91. IN NTSTATUS Status
  92. );
  93. NTSTATUS
  94. ACPIThermalQueryWmiDataBlock(
  95. IN PDEVICE_OBJECT DeviceObject,
  96. IN PIRP Irp,
  97. IN ULONG GuidIndex,
  98. IN ULONG InstanceIndex,
  99. IN ULONG InstanceCount,
  100. IN OUT PULONG InstanceLengthArray,
  101. IN ULONG BufferAvail,
  102. OUT PUCHAR Buffer
  103. );
  104. NTSTATUS
  105. ACPIThermalQueryWmiRegInfo(
  106. IN PDEVICE_OBJECT DeviceObject,
  107. OUT ULONG *RegFlags,
  108. OUT PUNICODE_STRING InstanceName,
  109. OUT PUNICODE_STRING *RegistryPath,
  110. OUT PUNICODE_STRING MofResourceName,
  111. OUT PDEVICE_OBJECT *Pdo
  112. );
  113. NTSTATUS
  114. ACPIThermalStartDevice(
  115. IN PDEVICE_OBJECT DeviceObject,
  116. IN PIRP Irp
  117. );
  118. VOID
  119. EXPORT
  120. ACPIThermalTempatureRead (
  121. IN PNSOBJ AcpiObject,
  122. IN NTSTATUS Status,
  123. IN POBJDATA Result OPTIONAL,
  124. IN PVOID DevExt
  125. );
  126. VOID
  127. ACPIThermalWorker (
  128. IN PDEVICE_EXTENSION DevExt,
  129. IN ULONG Events
  130. );
  131. NTSTATUS
  132. ACPIThermalWmi(
  133. IN PDEVICE_OBJECT DeviceObject,
  134. IN PIRP Irp
  135. );
  136. #endif