8d997c7866efdaa9b7abfe229d3ab70033c18502
[reactos.git] / reactos / drivers / bus / acpi / acpica / include / acdisasm.h
1 /******************************************************************************
2 *
3 * Name: acdisasm.h - AML disassembler
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2017, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #ifndef __ACDISASM_H__
45 #define __ACDISASM_H__
46
47 #include "amlresrc.h"
48
49
50 #define BLOCK_NONE 0
51 #define BLOCK_PAREN 1
52 #define BLOCK_BRACE 2
53 #define BLOCK_COMMA_LIST 4
54 #define ACPI_DEFAULT_RESNAME *(UINT32 *) "__RD"
55
56 /*
57 * Raw table data header. Used by disassembler and data table compiler.
58 * Do not change.
59 */
60 #define ACPI_RAW_TABLE_DATA_HEADER "Raw Table Data"
61
62
63 typedef struct acpi_dmtable_info
64 {
65 UINT8 Opcode;
66 UINT16 Offset;
67 char *Name;
68 UINT8 Flags;
69
70 } ACPI_DMTABLE_INFO;
71
72 /* Values for Flags field above */
73
74 #define DT_LENGTH 0x01 /* Field is a subtable length */
75 #define DT_FLAG 0x02 /* Field is a flag value */
76 #define DT_NON_ZERO 0x04 /* Field must be non-zero */
77 #define DT_OPTIONAL 0x08 /* Field is optional */
78 #define DT_DESCRIBES_OPTIONAL 0x10 /* Field describes an optional field (length, etc.) */
79 #define DT_COUNT 0x20 /* Currently not used */
80
81 /*
82 * Values for Opcode above.
83 * Note: 0-7 must not change, they are used as a flag shift value. Other
84 * than those, new values can be added wherever appropriate.
85 */
86 typedef enum
87 {
88 /* Simple Data Types */
89
90 ACPI_DMT_FLAG0 = 0,
91 ACPI_DMT_FLAG1 = 1,
92 ACPI_DMT_FLAG2 = 2,
93 ACPI_DMT_FLAG3 = 3,
94 ACPI_DMT_FLAG4 = 4,
95 ACPI_DMT_FLAG5 = 5,
96 ACPI_DMT_FLAG6 = 6,
97 ACPI_DMT_FLAG7 = 7,
98 ACPI_DMT_FLAGS0,
99 ACPI_DMT_FLAGS1,
100 ACPI_DMT_FLAGS2,
101 ACPI_DMT_FLAGS4,
102 ACPI_DMT_FLAGS4_0,
103 ACPI_DMT_FLAGS4_4,
104 ACPI_DMT_FLAGS4_8,
105 ACPI_DMT_FLAGS4_12,
106 ACPI_DMT_FLAGS16_16,
107 ACPI_DMT_UINT8,
108 ACPI_DMT_UINT16,
109 ACPI_DMT_UINT24,
110 ACPI_DMT_UINT32,
111 ACPI_DMT_UINT40,
112 ACPI_DMT_UINT48,
113 ACPI_DMT_UINT56,
114 ACPI_DMT_UINT64,
115 ACPI_DMT_BUF7,
116 ACPI_DMT_BUF10,
117 ACPI_DMT_BUF12,
118 ACPI_DMT_BUF16,
119 ACPI_DMT_BUF128,
120 ACPI_DMT_SIG,
121 ACPI_DMT_STRING,
122 ACPI_DMT_NAME4,
123 ACPI_DMT_NAME6,
124 ACPI_DMT_NAME8,
125
126 /* Types that are decoded to strings and miscellaneous */
127
128 ACPI_DMT_ACCWIDTH,
129 ACPI_DMT_CHKSUM,
130 ACPI_DMT_GAS,
131 ACPI_DMT_SPACEID,
132 ACPI_DMT_UNICODE,
133 ACPI_DMT_UUID,
134
135 /* Types used only for the Data Table Compiler */
136
137 ACPI_DMT_BUFFER,
138 ACPI_DMT_RAW_BUFFER, /* Large, multiple line buffer */
139 ACPI_DMT_DEVICE_PATH,
140 ACPI_DMT_LABEL,
141 ACPI_DMT_PCI_PATH,
142
143 /* Types that are specific to particular ACPI tables */
144
145 ACPI_DMT_ASF,
146 ACPI_DMT_DMAR,
147 ACPI_DMT_DMAR_SCOPE,
148 ACPI_DMT_EINJACT,
149 ACPI_DMT_EINJINST,
150 ACPI_DMT_ERSTACT,
151 ACPI_DMT_ERSTINST,
152 ACPI_DMT_FADTPM,
153 ACPI_DMT_GTDT,
154 ACPI_DMT_HEST,
155 ACPI_DMT_HESTNTFY,
156 ACPI_DMT_HESTNTYP,
157 ACPI_DMT_HMAT,
158 ACPI_DMT_IORTMEM,
159 ACPI_DMT_IVRS,
160 ACPI_DMT_LPIT,
161 ACPI_DMT_MADT,
162 ACPI_DMT_NFIT,
163 ACPI_DMT_PCCT,
164 ACPI_DMT_PMTT,
165 ACPI_DMT_PPTT,
166 ACPI_DMT_SLIC,
167 ACPI_DMT_SRAT,
168
169 /* Special opcodes */
170
171 ACPI_DMT_EXTRA_TEXT,
172 ACPI_DMT_EXIT
173
174 } ACPI_ENTRY_TYPES;
175
176 typedef
177 void (*ACPI_DMTABLE_HANDLER) (
178 ACPI_TABLE_HEADER *Table);
179
180 typedef
181 ACPI_STATUS (*ACPI_CMTABLE_HANDLER) (
182 void **PFieldList);
183
184 typedef struct acpi_dmtable_data
185 {
186 char *Signature;
187 ACPI_DMTABLE_INFO *TableInfo;
188 ACPI_DMTABLE_HANDLER TableHandler;
189 ACPI_CMTABLE_HANDLER CmTableHandler;
190 const unsigned char *Template;
191
192 } ACPI_DMTABLE_DATA;
193
194
195 typedef struct acpi_op_walk_info
196 {
197 ACPI_WALK_STATE *WalkState;
198 ACPI_PARSE_OBJECT *MappingOp;
199 UINT8 *PreviousAml;
200 UINT8 *StartAml;
201 UINT32 Level;
202 UINT32 LastLevel;
203 UINT32 Count;
204 UINT32 BitOffset;
205 UINT32 Flags;
206 UINT32 AmlOffset;
207
208 } ACPI_OP_WALK_INFO;
209
210 /*
211 * TBD - another copy of this is in asltypes.h, fix
212 */
213 #ifndef ASL_WALK_CALLBACK_DEFINED
214 typedef
215 ACPI_STATUS (*ASL_WALK_CALLBACK) (
216 ACPI_PARSE_OBJECT *Op,
217 UINT32 Level,
218 void *Context);
219 #define ASL_WALK_CALLBACK_DEFINED
220 #endif
221
222 typedef
223 void (*ACPI_RESOURCE_HANDLER) (
224 ACPI_OP_WALK_INFO *Info,
225 AML_RESOURCE *Resource,
226 UINT32 Length,
227 UINT32 Level);
228
229 typedef struct acpi_resource_tag
230 {
231 UINT32 BitIndex;
232 char *Tag;
233
234 } ACPI_RESOURCE_TAG;
235
236 /* Strings used for decoding flags to ASL keywords */
237
238 extern const char *AcpiGbl_WordDecode[];
239 extern const char *AcpiGbl_IrqDecode[];
240 extern const char *AcpiGbl_LockRule[];
241 extern const char *AcpiGbl_AccessTypes[];
242 extern const char *AcpiGbl_UpdateRules[];
243 extern const char *AcpiGbl_MatchOps[];
244
245 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
246 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
247 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
248 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2[];
249 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2a[];
250 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[];
251 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[];
252 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[];
253 extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
254 extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
255 extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
256 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
257 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
258 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt0[];
259 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt1[];
260 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt2[];
261 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt2a[];
262 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2[];
263 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Device[];
264 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Addr[];
265 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Size[];
266 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Name[];
267 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2OemData[];
268 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbgp[];
269 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar[];
270 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarHdr[];
271 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[];
272 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[];
273 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[];
274 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[];
275 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar3[];
276 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar4[];
277 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm[];
278 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm0[];
279 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm0a[];
280 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm1[];
281 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm1a[];
282 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm2[];
283 extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
284 extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
285 extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
286 extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
287 extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[];
288 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
289 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
290 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
291 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[];
292 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[];
293 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[];
294 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt[];
295 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdtHdr[];
296 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt0[];
297 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt1[];
298 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[];
299 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt[];
300 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdtHdr[];
301 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0[];
302 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0a[];
303 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt1[];
304 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHeader[];
305 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest[];
306 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest0[];
307 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest1[];
308 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest2[];
309 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest6[];
310 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest7[];
311 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest8[];
312 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[];
313 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest10[];
314 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest11[];
315 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[];
316 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestBank[];
317 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[];
318 extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpitHdr[];
319 extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpit0[];
320 extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpit1[];
321 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat[];
322 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat0[];
323 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1[];
324 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1a[];
325 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1b[];
326 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1c[];
327 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat2[];
328 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmat2a[];
329 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHmatHdr[];
330 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort[];
331 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort0[];
332 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort0a[];
333 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort1[];
334 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort1a[];
335 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort2[];
336 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3[];
337 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3a[];
338 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3b[];
339 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3c[];
340 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[];
341 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortAcc[];
342 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr[];
343 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortMap[];
344 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortPad[];
345 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs[];
346 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[];
347 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs1[];
348 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs4[];
349 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8a[];
350 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8b[];
351 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8c[];
352 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHdr[];
353 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[];
354 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt0[];
355 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt1[];
356 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt2[];
357 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt3[];
358 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt4[];
359 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt5[];
360 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt6[];
361 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt7[];
362 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt8[];
363 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt9[];
364 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt10[];
365 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt11[];
366 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt12[];
367 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt13[];
368 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt14[];
369 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt15[];
370 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[];
371 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[];
372 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
373 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[];
374 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst[];
375 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0[];
376 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0A[];
377 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0B[];
378 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst1[];
379 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[];
380 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[];
381 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[];
382 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[];
383 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[];
384 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit[];
385 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfitHdr[];
386 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit0[];
387 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit1[];
388 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit2[];
389 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit2a[];
390 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit3[];
391 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit3a[];
392 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit4[];
393 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit5[];
394 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6[];
395 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[];
396 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[];
397 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[];
398 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[];
399 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[];
400 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[];
401 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[];
402 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[];
403 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
404 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
405 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[];
406 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
407 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct3[];
408 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct4[];
409 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0[];
410 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0a[];
411 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1[];
412 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[];
413 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPpttHdr[];
414 extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[];
415 extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
416 extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
417 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
418 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[];
419 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[];
420 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[];
421 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
422 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
423 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
424 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
425 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
426 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat[];
427 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSratHdr[];
428 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[];
429 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[];
430 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[];
431 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[];
432 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[];
433 extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[];
434 extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[];
435 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[];
436 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaClient[];
437 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[];
438 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
439 extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[];
440 extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[];
441 extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[];
442 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWaet[];
443 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat[];
444 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[];
445 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWddt[];
446 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[];
447 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt[];
448 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[];
449 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWsmt[];
450 extern ACPI_DMTABLE_INFO AcpiDmTableInfoXenv[];
451
452 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2];
453
454 /*
455 * dmtable and ahtable
456 */
457 extern const ACPI_DMTABLE_DATA AcpiDmTableData[];
458 extern const AH_TABLE Gbl_AcpiSupportedTables[];
459
460 UINT8
461 AcpiDmGenerateChecksum (
462 void *Table,
463 UINT32 Length,
464 UINT8 OriginalChecksum);
465
466 const ACPI_DMTABLE_DATA *
467 AcpiDmGetTableData (
468 char *Signature);
469
470 void
471 AcpiDmDumpDataTable (
472 ACPI_TABLE_HEADER *Table);
473
474 ACPI_STATUS
475 AcpiDmDumpTable (
476 UINT32 TableLength,
477 UINT32 TableOffset,
478 void *Table,
479 UINT32 SubTableLength,
480 ACPI_DMTABLE_INFO *Info);
481
482 void
483 AcpiDmLineHeader (
484 UINT32 Offset,
485 UINT32 ByteLength,
486 char *Name);
487
488 void
489 AcpiDmLineHeader2 (
490 UINT32 Offset,
491 UINT32 ByteLength,
492 char *Name,
493 UINT32 Value);
494
495
496 /*
497 * dmtbdump
498 */
499 void
500 AcpiDmDumpBuffer (
501 void *Table,
502 UINT32 BufferOffset,
503 UINT32 Length,
504 UINT32 AbsoluteOffset,
505 char *Header);
506
507 void
508 AcpiDmDumpUnicode (
509 void *Table,
510 UINT32 BufferOffset,
511 UINT32 ByteLength);
512
513 void
514 AcpiDmDumpAsf (
515 ACPI_TABLE_HEADER *Table);
516
517 void
518 AcpiDmDumpCpep (
519 ACPI_TABLE_HEADER *Table);
520
521 void
522 AcpiDmDumpCsrt (
523 ACPI_TABLE_HEADER *Table);
524
525 void
526 AcpiDmDumpDbg2 (
527 ACPI_TABLE_HEADER *Table);
528
529 void
530 AcpiDmDumpDmar (
531 ACPI_TABLE_HEADER *Table);
532
533 void
534 AcpiDmDumpDrtm (
535 ACPI_TABLE_HEADER *Table);
536
537 void
538 AcpiDmDumpEinj (
539 ACPI_TABLE_HEADER *Table);
540
541 void
542 AcpiDmDumpErst (
543 ACPI_TABLE_HEADER *Table);
544
545 void
546 AcpiDmDumpFadt (
547 ACPI_TABLE_HEADER *Table);
548
549 void
550 AcpiDmDumpFpdt (
551 ACPI_TABLE_HEADER *Table);
552
553 void
554 AcpiDmDumpGtdt (
555 ACPI_TABLE_HEADER *Table);
556
557 void
558 AcpiDmDumpHest (
559 ACPI_TABLE_HEADER *Table);
560
561 void
562 AcpiDmDumpHmat (
563 ACPI_TABLE_HEADER *Table);
564
565 void
566 AcpiDmDumpIort (
567 ACPI_TABLE_HEADER *Table);
568
569 void
570 AcpiDmDumpIvrs (
571 ACPI_TABLE_HEADER *Table);
572
573 void
574 AcpiDmDumpLpit (
575 ACPI_TABLE_HEADER *Table);
576
577 void
578 AcpiDmDumpMadt (
579 ACPI_TABLE_HEADER *Table);
580
581 void
582 AcpiDmDumpMcfg (
583 ACPI_TABLE_HEADER *Table);
584
585 void
586 AcpiDmDumpMpst (
587 ACPI_TABLE_HEADER *Table);
588
589 void
590 AcpiDmDumpMsct (
591 ACPI_TABLE_HEADER *Table);
592
593 void
594 AcpiDmDumpMtmr (
595 ACPI_TABLE_HEADER *Table);
596
597 void
598 AcpiDmDumpNfit (
599 ACPI_TABLE_HEADER *Table);
600
601 void
602 AcpiDmDumpPcct (
603 ACPI_TABLE_HEADER *Table);
604
605 void
606 AcpiDmDumpPmtt (
607 ACPI_TABLE_HEADER *Table);
608
609 void
610 AcpiDmDumpPptt (
611 ACPI_TABLE_HEADER *Table);
612
613 UINT32
614 AcpiDmDumpRsdp (
615 ACPI_TABLE_HEADER *Table);
616
617 void
618 AcpiDmDumpRsdt (
619 ACPI_TABLE_HEADER *Table);
620
621 UINT32
622 AcpiDmDumpS3pt (
623 ACPI_TABLE_HEADER *Table);
624
625 void
626 AcpiDmDumpSlic (
627 ACPI_TABLE_HEADER *Table);
628
629 void
630 AcpiDmDumpSlit (
631 ACPI_TABLE_HEADER *Table);
632
633 void
634 AcpiDmDumpSrat (
635 ACPI_TABLE_HEADER *Table);
636
637 void
638 AcpiDmDumpStao (
639 ACPI_TABLE_HEADER *Table);
640
641 void
642 AcpiDmDumpTcpa (
643 ACPI_TABLE_HEADER *Table);
644
645 void
646 AcpiDmDumpVrtc (
647 ACPI_TABLE_HEADER *Table);
648
649 void
650 AcpiDmDumpWdat (
651 ACPI_TABLE_HEADER *Table);
652
653 void
654 AcpiDmDumpWpbt (
655 ACPI_TABLE_HEADER *Table);
656
657 void
658 AcpiDmDumpXsdt (
659 ACPI_TABLE_HEADER *Table);
660
661
662 /*
663 * dmwalk
664 */
665 void
666 AcpiDmDisassemble (
667 ACPI_WALK_STATE *WalkState,
668 ACPI_PARSE_OBJECT *Origin,
669 UINT32 NumOpcodes);
670
671 void
672 AcpiDmWalkParseTree (
673 ACPI_PARSE_OBJECT *Op,
674 ASL_WALK_CALLBACK DescendingCallback,
675 ASL_WALK_CALLBACK AscendingCallback,
676 void *Context);
677
678
679 /*
680 * dmopcode
681 */
682 void
683 AcpiDmDisassembleOneOp (
684 ACPI_WALK_STATE *WalkState,
685 ACPI_OP_WALK_INFO *Info,
686 ACPI_PARSE_OBJECT *Op);
687
688 UINT32
689 AcpiDmListType (
690 ACPI_PARSE_OBJECT *Op);
691
692 void
693 AcpiDmMethodFlags (
694 ACPI_PARSE_OBJECT *Op);
695
696 void
697 AcpiDmDisplayTargetPathname (
698 ACPI_PARSE_OBJECT *Op);
699
700 void
701 AcpiDmNotifyDescription (
702 ACPI_PARSE_OBJECT *Op);
703
704 void
705 AcpiDmPredefinedDescription (
706 ACPI_PARSE_OBJECT *Op);
707
708 void
709 AcpiDmFieldPredefinedDescription (
710 ACPI_PARSE_OBJECT *Op);
711
712 void
713 AcpiDmFieldFlags (
714 ACPI_PARSE_OBJECT *Op);
715
716 void
717 AcpiDmAddressSpace (
718 UINT8 SpaceId);
719
720 void
721 AcpiDmRegionFlags (
722 ACPI_PARSE_OBJECT *Op);
723
724 void
725 AcpiDmMatchOp (
726 ACPI_PARSE_OBJECT *Op);
727
728
729 /*
730 * dmnames
731 */
732 UINT32
733 AcpiDmDumpName (
734 UINT32 Name);
735
736 ACPI_STATUS
737 AcpiPsDisplayObjectPathname (
738 ACPI_WALK_STATE *WalkState,
739 ACPI_PARSE_OBJECT *Op);
740
741 void
742 AcpiDmNamestring (
743 char *Name);
744
745
746 /*
747 * dmbuffer
748 */
749 void
750 AcpiDmDisasmByteList (
751 UINT32 Level,
752 UINT8 *ByteData,
753 UINT32 ByteCount);
754
755 void
756 AcpiDmByteList (
757 ACPI_OP_WALK_INFO *Info,
758 ACPI_PARSE_OBJECT *Op);
759
760 void
761 AcpiDmCheckForHardwareId (
762 ACPI_PARSE_OBJECT *Op);
763
764 void
765 AcpiDmDecompressEisaId (
766 UINT32 EncodedId);
767
768 BOOLEAN
769 AcpiDmIsUuidBuffer (
770 ACPI_PARSE_OBJECT *Op);
771
772 BOOLEAN
773 AcpiDmIsUnicodeBuffer (
774 ACPI_PARSE_OBJECT *Op);
775
776 BOOLEAN
777 AcpiDmIsStringBuffer (
778 ACPI_PARSE_OBJECT *Op);
779
780 BOOLEAN
781 AcpiDmIsPldBuffer (
782 ACPI_PARSE_OBJECT *Op);
783
784
785 /*
786 * dmdeferred
787 */
788 ACPI_STATUS
789 AcpiDmParseDeferredOps (
790 ACPI_PARSE_OBJECT *Root);
791
792
793 /*
794 * dmextern
795 */
796 ACPI_STATUS
797 AcpiDmAddToExternalFileList (
798 char *PathList);
799
800 void
801 AcpiDmClearExternalFileList (
802 void);
803
804 void
805 AcpiDmAddOpToExternalList (
806 ACPI_PARSE_OBJECT *Op,
807 char *Path,
808 UINT8 Type,
809 UINT32 Value,
810 UINT16 Flags);
811
812 void
813 AcpiDmCreateSubobjectForExternal (
814 UINT8 Type,
815 ACPI_NAMESPACE_NODE **Node,
816 UINT32 Value);
817
818 void
819 AcpiDmAddNodeToExternalList (
820 ACPI_NAMESPACE_NODE *Node,
821 UINT8 Type,
822 UINT32 Value,
823 UINT16 Flags);
824
825 void
826 AcpiDmAddExternalListToNamespace (
827 void);
828
829 void
830 AcpiDmAddOneExternalToNamespace (
831 char *Path,
832 UINT8 Type,
833 UINT32 Value);
834
835 UINT32
836 AcpiDmGetUnresolvedExternalMethodCount (
837 void);
838
839 void
840 AcpiDmClearExternalList (
841 void);
842
843 void
844 AcpiDmEmitExternals (
845 void);
846
847 void
848 AcpiDmEmitExternal (
849 ACPI_PARSE_OBJECT *NameOp,
850 ACPI_PARSE_OBJECT *TypeOp);
851
852 void
853 AcpiDmUnresolvedWarning (
854 UINT8 Type);
855
856 void
857 AcpiDmGetExternalsFromFile (
858 void);
859
860 void
861 AcpiDmMarkExternalConflict (
862 ACPI_NAMESPACE_NODE *Node);
863
864
865 /*
866 * dmresrc
867 */
868 void
869 AcpiDmDumpInteger8 (
870 UINT8 Value,
871 const char *Name);
872
873 void
874 AcpiDmDumpInteger16 (
875 UINT16 Value,
876 const char *Name);
877
878 void
879 AcpiDmDumpInteger32 (
880 UINT32 Value,
881 const char *Name);
882
883 void
884 AcpiDmDumpInteger64 (
885 UINT64 Value,
886 const char *Name);
887
888 void
889 AcpiDmResourceTemplate (
890 ACPI_OP_WALK_INFO *Info,
891 ACPI_PARSE_OBJECT *Op,
892 UINT8 *ByteData,
893 UINT32 ByteCount);
894
895 ACPI_STATUS
896 AcpiDmIsResourceTemplate (
897 ACPI_WALK_STATE *WalkState,
898 ACPI_PARSE_OBJECT *Op);
899
900 void
901 AcpiDmBitList (
902 UINT16 Mask);
903
904 void
905 AcpiDmDescriptorName (
906 void);
907
908
909 /*
910 * dmresrcl
911 */
912 void
913 AcpiDmWordDescriptor (
914 ACPI_OP_WALK_INFO *Info,
915 AML_RESOURCE *Resource,
916 UINT32 Length,
917 UINT32 Level);
918
919 void
920 AcpiDmDwordDescriptor (
921 ACPI_OP_WALK_INFO *Info,
922 AML_RESOURCE *Resource,
923 UINT32 Length,
924 UINT32 Level);
925
926 void
927 AcpiDmExtendedDescriptor (
928 ACPI_OP_WALK_INFO *Info,
929 AML_RESOURCE *Resource,
930 UINT32 Length,
931 UINT32 Level);
932
933 void
934 AcpiDmQwordDescriptor (
935 ACPI_OP_WALK_INFO *Info,
936 AML_RESOURCE *Resource,
937 UINT32 Length,
938 UINT32 Level);
939
940 void
941 AcpiDmMemory24Descriptor (
942 ACPI_OP_WALK_INFO *Info,
943 AML_RESOURCE *Resource,
944 UINT32 Length,
945 UINT32 Level);
946
947 void
948 AcpiDmMemory32Descriptor (
949 ACPI_OP_WALK_INFO *Info,
950 AML_RESOURCE *Resource,
951 UINT32 Length,
952 UINT32 Level);
953
954 void
955 AcpiDmFixedMemory32Descriptor (
956 ACPI_OP_WALK_INFO *Info,
957 AML_RESOURCE *Resource,
958 UINT32 Length,
959 UINT32 Level);
960
961 void
962 AcpiDmGenericRegisterDescriptor (
963 ACPI_OP_WALK_INFO *Info,
964 AML_RESOURCE *Resource,
965 UINT32 Length,
966 UINT32 Level);
967
968 void
969 AcpiDmInterruptDescriptor (
970 ACPI_OP_WALK_INFO *Info,
971 AML_RESOURCE *Resource,
972 UINT32 Length,
973 UINT32 Level);
974
975 void
976 AcpiDmVendorLargeDescriptor (
977 ACPI_OP_WALK_INFO *Info,
978 AML_RESOURCE *Resource,
979 UINT32 Length,
980 UINT32 Level);
981
982 void
983 AcpiDmGpioDescriptor (
984 ACPI_OP_WALK_INFO *Info,
985 AML_RESOURCE *Resource,
986 UINT32 Length,
987 UINT32 Level);
988
989 void
990 AcpiDmPinFunctionDescriptor (
991 ACPI_OP_WALK_INFO *Info,
992 AML_RESOURCE *Resource,
993 UINT32 Length,
994 UINT32 Level);
995
996 void
997 AcpiDmPinConfigDescriptor (
998 ACPI_OP_WALK_INFO *Info,
999 AML_RESOURCE *Resource,
1000 UINT32 Length,
1001 UINT32 Level);
1002
1003 void
1004 AcpiDmPinGroupDescriptor (
1005 ACPI_OP_WALK_INFO *Info,
1006 AML_RESOURCE *Resource,
1007 UINT32 Length,
1008 UINT32 Level);
1009
1010 void
1011 AcpiDmPinGroupFunctionDescriptor (
1012 ACPI_OP_WALK_INFO *Info,
1013 AML_RESOURCE *Resource,
1014 UINT32 Length,
1015 UINT32 Level);
1016
1017 void
1018 AcpiDmPinGroupConfigDescriptor (
1019 ACPI_OP_WALK_INFO *Info,
1020 AML_RESOURCE *Resource,
1021 UINT32 Length,
1022 UINT32 Level);
1023
1024 void
1025 AcpiDmSerialBusDescriptor (
1026 ACPI_OP_WALK_INFO *Info,
1027 AML_RESOURCE *Resource,
1028 UINT32 Length,
1029 UINT32 Level);
1030
1031 void
1032 AcpiDmVendorCommon (
1033 const char *Name,
1034 UINT8 *ByteData,
1035 UINT32 Length,
1036 UINT32 Level);
1037
1038
1039 /*
1040 * dmresrcs
1041 */
1042 void
1043 AcpiDmIrqDescriptor (
1044 ACPI_OP_WALK_INFO *Info,
1045 AML_RESOURCE *Resource,
1046 UINT32 Length,
1047 UINT32 Level);
1048
1049 void
1050 AcpiDmDmaDescriptor (
1051 ACPI_OP_WALK_INFO *Info,
1052 AML_RESOURCE *Resource,
1053 UINT32 Length,
1054 UINT32 Level);
1055
1056 void
1057 AcpiDmFixedDmaDescriptor (
1058 ACPI_OP_WALK_INFO *Info,
1059 AML_RESOURCE *Resource,
1060 UINT32 Length,
1061 UINT32 Level);
1062
1063 void
1064 AcpiDmIoDescriptor (
1065 ACPI_OP_WALK_INFO *Info,
1066 AML_RESOURCE *Resource,
1067 UINT32 Length,
1068 UINT32 Level);
1069
1070 void
1071 AcpiDmFixedIoDescriptor (
1072 ACPI_OP_WALK_INFO *Info,
1073 AML_RESOURCE *Resource,
1074 UINT32 Length,
1075 UINT32 Level);
1076
1077 void
1078 AcpiDmStartDependentDescriptor (
1079 ACPI_OP_WALK_INFO *Info,
1080 AML_RESOURCE *Resource,
1081 UINT32 Length,
1082 UINT32 Level);
1083
1084 void
1085 AcpiDmEndDependentDescriptor (
1086 ACPI_OP_WALK_INFO *Info,
1087 AML_RESOURCE *Resource,
1088 UINT32 Length,
1089 UINT32 Level);
1090
1091 void
1092 AcpiDmVendorSmallDescriptor (
1093 ACPI_OP_WALK_INFO *Info,
1094 AML_RESOURCE *Resource,
1095 UINT32 Length,
1096 UINT32 Level);
1097
1098
1099 /*
1100 * dmutils
1101 */
1102 void
1103 AcpiDmDecodeAttribute (
1104 UINT8 Attribute);
1105
1106 void
1107 AcpiDmIndent (
1108 UINT32 Level);
1109
1110 BOOLEAN
1111 AcpiDmCommaIfListMember (
1112 ACPI_PARSE_OBJECT *Op);
1113
1114 void
1115 AcpiDmCommaIfFieldMember (
1116 ACPI_PARSE_OBJECT *Op);
1117
1118
1119 /*
1120 * dmrestag
1121 */
1122 void
1123 AcpiDmFindResources (
1124 ACPI_PARSE_OBJECT *Root);
1125
1126 void
1127 AcpiDmCheckResourceReference (
1128 ACPI_PARSE_OBJECT *Op,
1129 ACPI_WALK_STATE *WalkState);
1130
1131
1132 /*
1133 * dmcstyle
1134 */
1135 BOOLEAN
1136 AcpiDmCheckForSymbolicOpcode (
1137 ACPI_PARSE_OBJECT *Op,
1138 ACPI_OP_WALK_INFO *Info);
1139
1140 void
1141 AcpiDmCloseOperator (
1142 ACPI_PARSE_OBJECT *Op);
1143
1144
1145 /*
1146 * dmtables
1147 */
1148 ACPI_STATUS
1149 AcpiDmProcessSwitch (
1150 ACPI_PARSE_OBJECT *Op);
1151
1152 void
1153 AcpiDmClearTempList(
1154 void);
1155
1156 /*
1157 * dmtables
1158 */
1159 void
1160 AdDisassemblerHeader (
1161 char *Filename,
1162 UINT8 TableType);
1163
1164 #define ACPI_IS_AML_TABLE 0
1165 #define ACPI_IS_DATA_TABLE 1
1166
1167
1168 /*
1169 * adisasm
1170 */
1171 ACPI_STATUS
1172 AdAmlDisassemble (
1173 BOOLEAN OutToFile,
1174 char *Filename,
1175 char *Prefix,
1176 char **OutFilename);
1177
1178 ACPI_STATUS
1179 AdGetLocalTables (
1180 void);
1181
1182 ACPI_STATUS
1183 AdParseTable (
1184 ACPI_TABLE_HEADER *Table,
1185 ACPI_OWNER_ID *OwnerId,
1186 BOOLEAN LoadTable,
1187 BOOLEAN External);
1188
1189 ACPI_STATUS
1190 AdDisplayTables (
1191 char *Filename,
1192 ACPI_TABLE_HEADER *Table);
1193
1194 ACPI_STATUS
1195 AdDisplayStatistics (
1196 void);
1197
1198
1199 /*
1200 * dmwalk
1201 */
1202 UINT32
1203 AcpiDmBlockType (
1204 ACPI_PARSE_OBJECT *Op);
1205
1206
1207 #endif /* __ACDISASM_H__ */