Source code of Windows XP (NT5)
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.

212 lines
5.4 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. amli.h
  5. Abstract:
  6. This contains some of the routines to read
  7. and understand the AMLI library
  8. Author:
  9. Stephane Plante (splante)
  10. Environment:
  11. NT Kernel Model Driver only
  12. --*/
  13. #ifndef _AMLI_H_
  14. #define _AMLI_H_
  15. #define ACPIAmliFreeDataBuffers AMLIFreeDataBuffs
  16. #define PACKED_AC0 ((ULONG)'0CA_')
  17. #define PACKED_AC1 ((ULONG)'1CA_')
  18. #define PACKED_AC2 ((ULONG)'2CA_')
  19. #define PACKED_AC3 ((ULONG)'3CA_')
  20. #define PACKED_AC4 ((ULONG)'4CA_')
  21. #define PACKED_AC5 ((ULONG)'5CA_')
  22. #define PACKED_AC6 ((ULONG)'6CA_')
  23. #define PACKED_AC7 ((ULONG)'7CA_')
  24. #define PACKED_AC8 ((ULONG)'8CA_')
  25. #define PACKED_AC9 ((ULONG)'9CA_')
  26. #define PACKED_ADR ((ULONG)'RDA_')
  27. #define PACKED_AL0 ((ULONG)'0LA_')
  28. #define PACKED_AL1 ((ULONG)'1LA_')
  29. #define PACKED_AL2 ((ULONG)'2LA_')
  30. #define PACKED_AL3 ((ULONG)'3LA_')
  31. #define PACKED_AL4 ((ULONG)'4LA_')
  32. #define PACKED_AL5 ((ULONG)'5LA_')
  33. #define PACKED_AL6 ((ULONG)'6LA_')
  34. #define PACKED_AL7 ((ULONG)'7LA_')
  35. #define PACKED_AL8 ((ULONG)'8LA_')
  36. #define PACKED_AL9 ((ULONG)'9LA_')
  37. #define PACKED_BST ((ULONG)'TSB_')
  38. #define PACKED_CID ((ULONG)'DIC_')
  39. #define PACKED_CRS ((ULONG)'SRC_')
  40. #define PACKED_CRT ((ULONG)'TRC_')
  41. #define PACKED_DCK ((ULONG)'KCD_')
  42. #define PACKED_DDN ((ULONG)'NDD_')
  43. #define PACKED_DIS ((ULONG)'SID_')
  44. #define PACKED_EJD ((ULONG)'DJE_')
  45. #define PACKED_EJ0 ((ULONG)'0JE_')
  46. #define PACKED_EJ1 ((ULONG)'1JE_')
  47. #define PACKED_EJ2 ((ULONG)'2JE_')
  48. #define PACKED_EJ3 ((ULONG)'3JE_')
  49. #define PACKED_EJ4 ((ULONG)'4JE_')
  50. #define PACKED_EJ5 ((ULONG)'5JE_')
  51. #define PACKED_HID ((ULONG)'DIH_')
  52. #define PACKED_INI ((ULONG)'INI_')
  53. #define PACKED_IRC ((ULONG)'CRI_')
  54. #define PACKED_LCK ((ULONG)'KCL_')
  55. #define PACKED_LID ((ULONG)'DIL_')
  56. #define PACKED_OFF ((ULONG)'FFO_')
  57. #define PACKED_ON ((ULONG)'_NO_')
  58. #define PACKED_PR0 ((ULONG)'0RP_')
  59. #define PACKED_PR1 ((ULONG)'1RP_')
  60. #define PACKED_PR2 ((ULONG)'2RP_')
  61. #define PACKED_PRS ((ULONG)'SRP_')
  62. #define PACKED_PRT ((ULONG)'TRP_')
  63. #define PACKED_PRW ((ULONG)'WRP_')
  64. #define PACKED_PS0 ((ULONG)'0SP_')
  65. #define PACKED_PS1 ((ULONG)'1SP_')
  66. #define PACKED_PS2 ((ULONG)'2SP_')
  67. #define PACKED_PS3 ((ULONG)'3SP_')
  68. #define PACKED_PSC ((ULONG)'CSP_')
  69. #define PACKED_PSL ((ULONG)'LSP_')
  70. #define PACKED_PSV ((ULONG)'VSP_')
  71. #define PACKED_PSW ((ULONG)'WSP_')
  72. #define PACKED_PTS ((ULONG)'STP_')
  73. #define PACKED_REG ((ULONG)'GER_')
  74. #define PACKED_RMV ((ULONG)'VMR_')
  75. #define PACKED_S0 ((ULONG)'_0S_')
  76. #define PACKED_S0D ((ULONG)'D0S_')
  77. #define PACKED_S1 ((ULONG)'_1S_')
  78. #define PACKED_S1D ((ULONG)'D1S_')
  79. #define PACKED_S2 ((ULONG)'_2S_')
  80. #define PACKED_S2D ((ULONG)'D2S_')
  81. #define PACKED_S3 ((ULONG)'_3S_')
  82. #define PACKED_S3D ((ULONG)'D3S_')
  83. #define PACKED_S4 ((ULONG)'_4S_')
  84. #define PACKED_S4D ((ULONG)'D4S_')
  85. #define PACKED_S5 ((ULONG)'_5S_')
  86. #define PACKED_S5D ((ULONG)'D5S_')
  87. #define PACKED_SCP ((ULONG)'PCS_')
  88. #define PACKED_SI ((ULONG)'_IS_')
  89. #define PACKED_SRS ((ULONG)'SRS_')
  90. #define PACKED_SST ((ULONG)'TSS_')
  91. #define PACKED_STA ((ULONG)'ATS_')
  92. #define PACKED_STD ((ULONG)'DTS_')
  93. #define PACKED_SUN ((ULONG)'NUS_')
  94. #define PACKED_SWD ((ULONG)'DWS_')
  95. #define PACKED_TC1 ((ULONG)'1CT_')
  96. #define PACKED_TC2 ((ULONG)'2CT_')
  97. #define PACKED_TMP ((ULONG)'PMT_')
  98. #define PACKED_TSP ((ULONG)'PST_')
  99. #define PACKED_UID ((ULONG)'DIU_')
  100. #define PACKED_WAK ((ULONG)'KAW_')
  101. #define PACKED_BBN ((ULONG)'NBB_')
  102. #define STA_STATUS_PRESENT 0x00000001
  103. #define STA_STATUS_ENABLED 0x00000002
  104. #define STA_STATUS_USER_INTERFACE 0x00000004
  105. #define STA_STATUS_WORKING_OK 0x00000008
  106. #define STA_STATUS_DEFAULT ( STA_STATUS_PRESENT | \
  107. STA_STATUS_ENABLED | \
  108. STA_STATUS_USER_INTERFACE | \
  109. STA_STATUS_WORKING_OK)
  110. typedef struct {
  111. PVOID CompletionRoutine;
  112. PVOID Context;
  113. } AMLI_COMPLETION_CONTEXT, *PAMLI_COMPLETION_CONTEXT;
  114. typedef struct {
  115. KEVENT Event;
  116. NTSTATUS Status;
  117. } AMLISUPP_CONTEXT_PASSIVE, *PAMLISUPP_CONTEXT_PASSIVE;
  118. typedef enum _ACPIENUM_CONTROL
  119. {
  120. ACPIENUM_STOP,
  121. ACPIENUM_CONTINUE,
  122. ACPIENUM_CONTINUE_NORECURSE
  123. } ACPIENUM_CONTROL ;
  124. typedef ACPIENUM_CONTROL (*ACPIENUM_CALLBACK)(
  125. IN PNSOBJ,
  126. IN OUT PVOID,
  127. IN ULONG,
  128. OUT NTSTATUS *
  129. ) ;
  130. VOID
  131. EXPORT
  132. AmlisuppCompletePassive(
  133. IN PNSOBJ AcpiObject,
  134. IN NTSTATUS Status,
  135. IN POBJDATA Result,
  136. IN PVOID Context
  137. );
  138. VOID
  139. ACPIAmliDoubleToName(
  140. IN OUT PUCHAR ACPIName,
  141. IN ULONG DwordID,
  142. IN BOOLEAN ConvertToID
  143. );
  144. VOID
  145. ACPIAmliDoubleToNameWide(
  146. IN OUT PWCHAR ACPIName,
  147. IN ULONG DwordID,
  148. IN BOOLEAN ConvertToID
  149. );
  150. PNSOBJ
  151. ACPIAmliGetNamedChild(
  152. IN PNSOBJ AcpiObject,
  153. IN ULONG ObjectId
  154. );
  155. PUCHAR
  156. ACPIAmliNameObject(
  157. IN PNSOBJ AcpiObject
  158. );
  159. VOID
  160. EXPORT
  161. ACPISimpleEvalComplete(
  162. IN PNSOBJ AcpiObject,
  163. IN NTSTATUS Status,
  164. IN POBJDATA Result OPTIONAL,
  165. IN PKEVENT Event
  166. );
  167. NTSTATUS
  168. ACPIAmliFindObject(
  169. IN PUCHAR ObjectName,
  170. IN PNSOBJ Scope,
  171. OUT PNSOBJ *Object
  172. );
  173. NTSTATUS
  174. ACPIAmliGetFirstChild(
  175. IN PUCHAR ObjectName,
  176. OUT PNSOBJ *Object
  177. );
  178. NTSTATUS
  179. ACPIAmliBuildObjectPathname(
  180. IN PNSOBJ ACPIObject,
  181. OUT PUCHAR *ConstructedPathName
  182. );
  183. #endif