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.

142 lines
3.8 KiB

  1. /****************************************************************************
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. hctioctl.h
  5. Abstract:
  6. This header file is used both by ring3 app and ring0 driver.
  7. Environment:
  8. Kernel & user mode
  9. Revision History:
  10. 8-20-96 : created
  11. ****************************************************************************/
  12. //
  13. //Values for IOCTL_ACPI_GET_CAPABILITIES
  14. //
  15. #define SYSTEM_S1_BIT 0
  16. #define SYSTEM_S1 (1 << SYSTEM_S1_BIT)
  17. #define SYSTEM_S2_BIT 1
  18. #define SYSTEM_S2 (1 << SYSTEM_S2_BIT)
  19. #define SYSTEM_S3_BIT 2
  20. #define SYSTEM_S3 (1 << SYSTEM_S3_BIT)
  21. #define CPU_C1_BIT 3
  22. #define CPU_C1 (1 << CPU_C1_BIN)
  23. #define CPU_C2_BIT 4
  24. #define CPU_C2 (1 << CPU_C2_BIT)
  25. #define CPU_C3_BIT 5
  26. #define CPU_C3 (1 << CPU_C3_BIT)
  27. //
  28. //Processor States
  29. //
  30. #define CPU_STATE_C1 1
  31. #define CPU_STATE_C2 2
  32. #define CPU_STATE_C3 3
  33. //
  34. //Fan States
  35. //
  36. #define FAN_OFF 0
  37. #define FAN_ON 1
  38. //
  39. // IOCTL info
  40. //
  41. #define ACPIHCT_IOCTL_INDEX 80
  42. //
  43. //The input buffer must contain a ULONG pointer to one of the
  44. // SYSTEM_POWER_STATE enum values.
  45. //
  46. #define IOCTL_ACPI_SET_SYSTEM_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  47. ACPIHCT_IOCTL_INDEX+0, \
  48. METHOD_BUFFERED, \
  49. FILE_ANY_ACCESS)
  50. //
  51. //The input buffer must contain a ULONG pointer to one of the
  52. // Processor States.
  53. //
  54. #define IOCTL_ACPI_SET_PROCESSOR_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  55. ACPIHCT_IOCTL_INDEX+1, \
  56. METHOD_BUFFERED, \
  57. FILE_ANY_ACCESS)
  58. //
  59. //The input buffer must contain a ULONG pointer to on of the Fan
  60. // States.
  61. //
  62. #define IOCTL_ACPI_SET_FAN_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  63. ACPIHCT_IOCTL_INDEX+2, \
  64. METHOD_BUFFERED, \
  65. FILE_ANY_ACCESS)
  66. //
  67. //The output buffer must contain a ULONG pointer. The ACPI driver will
  68. // fill this buffer with the capabilities of the machine.
  69. //
  70. #define IOCTL_ACPI_GET_CAPABILITIES CTL_CODE(FILE_DEVICE_UNKNOWN, \
  71. ACPIHCT_IOCTL_INDEX+3, \
  72. METHOD_BUFFERED, \
  73. FILE_ANY_ACCESS)
  74. //
  75. //The input buffer must contain a ULONG pointer to a percentage (a
  76. // number between 1 and 100).
  77. //
  78. #define IOCTL_ACPI_SET_CPU_DUTY_CYCLE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  79. ACPIHCT_IOCTL_INDEX+4, \
  80. METHOD_BUFFERED, \
  81. FILE_ANY_ACCESS)
  82. //
  83. //The input buffer must contain a point to a TIME_FIELDS structure
  84. //
  85. #define IOCTL_ACPI_SET_RTC_WAKE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  86. ACPIHCT_IOCTL_INDEX+5, \
  87. METHOD_BUFFERED, \
  88. FILE_ANY_ACCESS)
  89. //
  90. //The output buffer points to a structure that will receive a
  91. // TIME_FIELDS structure
  92. //
  93. #define IOCTL_ACPI_GET_RTC_WAKE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  94. ACPIHCT_IOCTL_INDEX+6, \
  95. METHOD_BUFFERED, \
  96. FILE_ANY_ACCESS)
  97. #define IOCTL_ACPI_GET_TEMPERATURE CTL_CODE(FILE_DEVICE_UNKNOWN, \
  98. ACPIHCT_IOCTL_INDEX+7, \
  99. METHOD_BUFFERED, \
  100. FILE_ANY_ACCESS)