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.

236 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. unasm.h
  5. Abstract:
  6. This unassembles an AML file
  7. Author:
  8. Based on code by Mike Tsang (MikeTs)
  9. Stephane Plante (Splante)
  10. Environment:
  11. User mode only
  12. Revision History:
  13. --*/
  14. #ifndef _UNASM_H_
  15. #define _UNASM_H_
  16. //
  17. // Typedef for the print function
  18. //
  19. typedef VOID (*PUNASM_PRINT)(PCCHAR DebugMessage, ... );
  20. //
  21. // Global Variables
  22. //
  23. PUCHAR TopOpcode;
  24. PUCHAR CurrentOpcode;
  25. PUCHAR StartOpcode;
  26. //
  27. // Functions
  28. //
  29. UCHAR
  30. LOCAL
  31. ComputeDataCheckSum(
  32. PUCHAR OpCode,
  33. ULONG Length
  34. );
  35. VOID
  36. LOCAL
  37. DumpCode(
  38. PUCHAR *Opcode,
  39. PUNASM_PRINT PrintFunction,
  40. ULONG_PTR BaseAddress,
  41. ULONG IndentLevel
  42. );
  43. PASLTERM
  44. LOCAL
  45. FindKeywordTerm(
  46. UCHAR KeyWordGroup,
  47. UCHAR Data
  48. );
  49. UCHAR
  50. LOCAL
  51. FindOpClass(
  52. UCHAR OpCode,
  53. POPMAP OpCodeTable
  54. );
  55. PASLTERM
  56. LOCAL
  57. FindOpTerm(
  58. ULONG OpCode
  59. );
  60. NTSTATUS
  61. LOCAL
  62. ParseNameTail(
  63. PUCHAR *OpCode,
  64. PUCHAR Buffer,
  65. ULONG Length
  66. );
  67. ULONG
  68. LOCAL
  69. ParsePackageLen(
  70. PUCHAR *OpCode,
  71. PUCHAR *OpCodeNext
  72. );
  73. VOID
  74. LOCAL
  75. PrintIndent(
  76. PUNASM_PRINT PrintFunction,
  77. ULONG IndentLevel
  78. );
  79. NTSTATUS
  80. LOCAL
  81. UnAsmArgs(
  82. PUCHAR UnAsmArgTypes,
  83. PUCHAR ArgActions,
  84. PUCHAR *OpCode,
  85. PNSOBJ *NameObject,
  86. PUNASM_PRINT PrintFunction,
  87. ULONG_PTR BaseAddress,
  88. ULONG IndentLevel
  89. );
  90. NTSTATUS
  91. LOCAL
  92. UnAsmDataList(
  93. PUCHAR *OpCode,
  94. PUCHAR OpCodeEnd,
  95. PUNASM_PRINT PrintFunction,
  96. ULONG_PTR BaseAddress,
  97. ULONG IndentLevel
  98. );
  99. NTSTATUS
  100. LOCAL
  101. UnAsmDataObj(
  102. PUCHAR *OpCode,
  103. PUNASM_PRINT PrintFunction,
  104. ULONG_PTR BaseAddress,
  105. ULONG IndentLevel
  106. );
  107. NTSTATUS
  108. EXPORT
  109. UnAsmDSDT(
  110. PUCHAR DSDT,
  111. PUNASM_PRINT PrintFunction,
  112. ULONG_PTR DsdtLocation,
  113. ULONG IndentLevel
  114. );
  115. NTSTATUS
  116. LOCAL
  117. UnAsmField(
  118. PUCHAR *OpCode,
  119. PULONG BitPos,
  120. PUNASM_PRINT PrintFunction,
  121. ULONG_PTR BaseAddress,
  122. ULONG IndentLevel
  123. );
  124. NTSTATUS
  125. LOCAL
  126. UnAsmFieldList(
  127. PUCHAR *OpCode,
  128. PUCHAR OpCodeEnd,
  129. PUNASM_PRINT PrintFunction,
  130. ULONG_PTR BaseAddress,
  131. ULONG IndentLevel
  132. );
  133. NTSTATUS
  134. LOCAL
  135. UnAsmHeader(
  136. PDESCRIPTION_HEADER DsdtHeader,
  137. PUNASM_PRINT PrintFunction,
  138. ULONG_PTR DsdtLocation,
  139. ULONG IndentLevel
  140. );
  141. NTSTATUS
  142. EXPORT
  143. UnAsmLoadDSDT(
  144. PUCHAR DSDT
  145. );
  146. NTSTATUS
  147. LOCAL
  148. UnAsmNameObj(
  149. PUCHAR *OpCode,
  150. PNSOBJ *NameObject,
  151. UCHAR ObjectType,
  152. PUNASM_PRINT PrintFunction,
  153. ULONG_PTR BaseAddress,
  154. ULONG IndentLevel
  155. );
  156. NTSTATUS
  157. LOCAL
  158. UnAsmOpcode(
  159. PUCHAR *OpCode,
  160. PUNASM_PRINT PrintFunction,
  161. ULONG_PTR BaseAddress,
  162. ULONG IndentLevel
  163. );
  164. NTSTATUS
  165. LOCAL
  166. UnAsmPkgList(
  167. PUCHAR *OpCode,
  168. PUCHAR OpCodeEnd,
  169. PUNASM_PRINT PrintFunction,
  170. ULONG_PTR BaseAddress,
  171. ULONG IndentLevel
  172. );
  173. NTSTATUS
  174. LOCAL
  175. UnAsmScope(
  176. PUCHAR *OpCode,
  177. PUCHAR OpCodeEnd,
  178. PUNASM_PRINT PrintFunction,
  179. ULONG_PTR BaseAddress,
  180. ULONG IndentLevel
  181. );
  182. NTSTATUS
  183. LOCAL
  184. UnAsmSuperName(
  185. PUCHAR *OpCode,
  186. PUNASM_PRINT PrintFunction,
  187. ULONG_PTR BaseAddress,
  188. ULONG IndentLevel
  189. );
  190. NTSTATUS
  191. LOCAL
  192. UnAsmTermObj(
  193. PASLTERM Term,
  194. PUCHAR *OpCode,
  195. PUNASM_PRINT PrintFunction,
  196. ULONG_PTR BaseAddress,
  197. ULONG IndentLevel
  198. );
  199. #endif