[ACPICA]
[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 - 2016, 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_UINT8,
103 ACPI_DMT_UINT16,
104 ACPI_DMT_UINT24,
105 ACPI_DMT_UINT32,
106 ACPI_DMT_UINT40,
107 ACPI_DMT_UINT48,
108 ACPI_DMT_UINT56,
109 ACPI_DMT_UINT64,
110 ACPI_DMT_BUF7,
111 ACPI_DMT_BUF10,
112 ACPI_DMT_BUF16,
113 ACPI_DMT_BUF128,
114 ACPI_DMT_SIG,
115 ACPI_DMT_STRING,
116 ACPI_DMT_NAME4,
117 ACPI_DMT_NAME6,
118 ACPI_DMT_NAME8,
119
120 /* Types that are decoded to strings and miscellaneous */
121
122 ACPI_DMT_ACCWIDTH,
123 ACPI_DMT_CHKSUM,
124 ACPI_DMT_GAS,
125 ACPI_DMT_SPACEID,
126 ACPI_DMT_UNICODE,
127 ACPI_DMT_UUID,
128
129 /* Types used only for the Data Table Compiler */
130
131 ACPI_DMT_BUFFER,
132 ACPI_DMT_RAW_BUFFER, /* Large, multiple line buffer */
133 ACPI_DMT_DEVICE_PATH,
134 ACPI_DMT_LABEL,
135 ACPI_DMT_PCI_PATH,
136
137 /* Types that are specific to particular ACPI tables */
138
139 ACPI_DMT_ASF,
140 ACPI_DMT_DMAR,
141 ACPI_DMT_DMAR_SCOPE,
142 ACPI_DMT_EINJACT,
143 ACPI_DMT_EINJINST,
144 ACPI_DMT_ERSTACT,
145 ACPI_DMT_ERSTINST,
146 ACPI_DMT_FADTPM,
147 ACPI_DMT_GTDT,
148 ACPI_DMT_HEST,
149 ACPI_DMT_HESTNTFY,
150 ACPI_DMT_HESTNTYP,
151 ACPI_DMT_IORTMEM,
152 ACPI_DMT_IVRS,
153 ACPI_DMT_LPIT,
154 ACPI_DMT_MADT,
155 ACPI_DMT_NFIT,
156 ACPI_DMT_PCCT,
157 ACPI_DMT_PMTT,
158 ACPI_DMT_SLIC,
159 ACPI_DMT_SRAT,
160
161 /* Special opcodes */
162
163 ACPI_DMT_EXTRA_TEXT,
164 ACPI_DMT_EXIT
165
166 } ACPI_ENTRY_TYPES;
167
168 typedef
169 void (*ACPI_DMTABLE_HANDLER) (
170 ACPI_TABLE_HEADER *Table);
171
172 typedef
173 ACPI_STATUS (*ACPI_CMTABLE_HANDLER) (
174 void **PFieldList);
175
176 typedef struct acpi_dmtable_data
177 {
178 char *Signature;
179 ACPI_DMTABLE_INFO *TableInfo;
180 ACPI_DMTABLE_HANDLER TableHandler;
181 ACPI_CMTABLE_HANDLER CmTableHandler;
182 const unsigned char *Template;
183
184 } ACPI_DMTABLE_DATA;
185
186
187 typedef struct acpi_op_walk_info
188 {
189 ACPI_WALK_STATE *WalkState;
190 ACPI_PARSE_OBJECT *MappingOp;
191 UINT8 *PreviousAml;
192 UINT8 *StartAml;
193 UINT32 Level;
194 UINT32 LastLevel;
195 UINT32 Count;
196 UINT32 BitOffset;
197 UINT32 Flags;
198 UINT32 AmlOffset;
199
200 } ACPI_OP_WALK_INFO;
201
202 /*
203 * TBD - another copy of this is in asltypes.h, fix
204 */
205 #ifndef ASL_WALK_CALLBACK_DEFINED
206 typedef
207 ACPI_STATUS (*ASL_WALK_CALLBACK) (
208 ACPI_PARSE_OBJECT *Op,
209 UINT32 Level,
210 void *Context);
211 #define ASL_WALK_CALLBACK_DEFINED
212 #endif
213
214 typedef
215 void (*ACPI_RESOURCE_HANDLER) (
216 ACPI_OP_WALK_INFO *Info,
217 AML_RESOURCE *Resource,
218 UINT32 Length,
219 UINT32 Level);
220
221 typedef struct acpi_resource_tag
222 {
223 UINT32 BitIndex;
224 char *Tag;
225
226 } ACPI_RESOURCE_TAG;
227
228 /* Strings used for decoding flags to ASL keywords */
229
230 extern const char *AcpiGbl_WordDecode[];
231 extern const char *AcpiGbl_IrqDecode[];
232 extern const char *AcpiGbl_LockRule[];
233 extern const char *AcpiGbl_AccessTypes[];
234 extern const char *AcpiGbl_UpdateRules[];
235 extern const char *AcpiGbl_MatchOps[];
236
237 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
238 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
239 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
240 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2[];
241 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2a[];
242 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[];
243 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[];
244 extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[];
245 extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
246 extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
247 extern ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[];
248 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
249 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
250 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt0[];
251 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt1[];
252 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt2[];
253 extern ACPI_DMTABLE_INFO AcpiDmTableInfoCsrt2a[];
254 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2[];
255 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Device[];
256 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Addr[];
257 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Size[];
258 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2Name[];
259 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbg2OemData[];
260 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbgp[];
261 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar[];
262 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarHdr[];
263 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[];
264 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[];
265 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[];
266 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[];
267 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar3[];
268 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar4[];
269 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm[];
270 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm0[];
271 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm0a[];
272 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm1[];
273 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm1a[];
274 extern ACPI_DMTABLE_INFO AcpiDmTableInfoDrtm2[];
275 extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
276 extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
277 extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
278 extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
279 extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[];
280 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
281 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
282 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
283 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[];
284 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[];
285 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[];
286 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt[];
287 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdtHdr[];
288 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt0[];
289 extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt1[];
290 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[];
291 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt[];
292 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdtHdr[];
293 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0[];
294 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0a[];
295 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt1[];
296 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHeader[];
297 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest[];
298 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest0[];
299 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest1[];
300 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest2[];
301 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest6[];
302 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest7[];
303 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest8[];
304 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[];
305 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest10[];
306 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[];
307 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestBank[];
308 extern ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[];
309 extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpitHdr[];
310 extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpit0[];
311 extern ACPI_DMTABLE_INFO AcpiDmTableInfoLpit1[];
312 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort[];
313 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort0[];
314 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort0a[];
315 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort1[];
316 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort1a[];
317 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort2[];
318 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3[];
319 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3a[];
320 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3b[];
321 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3c[];
322 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[];
323 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortAcc[];
324 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr[];
325 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortMap[];
326 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortPad[];
327 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs[];
328 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs0[];
329 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs1[];
330 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs4[];
331 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8a[];
332 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8b[];
333 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrs8c[];
334 extern ACPI_DMTABLE_INFO AcpiDmTableInfoIvrsHdr[];
335 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[];
336 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt0[];
337 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt1[];
338 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt2[];
339 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt3[];
340 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt4[];
341 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt5[];
342 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt6[];
343 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt7[];
344 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt8[];
345 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt9[];
346 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt10[];
347 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt11[];
348 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt12[];
349 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt13[];
350 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt14[];
351 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt15[];
352 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[];
353 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[];
354 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
355 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[];
356 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst[];
357 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0[];
358 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0A[];
359 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst0B[];
360 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst1[];
361 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMpst2[];
362 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[];
363 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[];
364 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr[];
365 extern ACPI_DMTABLE_INFO AcpiDmTableInfoMtmr0[];
366 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit[];
367 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfitHdr[];
368 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit0[];
369 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit1[];
370 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit2[];
371 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit2a[];
372 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit3[];
373 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit3a[];
374 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit4[];
375 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit5[];
376 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6[];
377 extern ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[];
378 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt[];
379 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt0[];
380 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1[];
381 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt1a[];
382 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[];
383 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPmttHdr[];
384 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[];
385 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
386 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
387 extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[];
388 extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
389 extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
390 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
391 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3ptHdr[];
392 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[];
393 extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[];
394 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
395 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
396 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
397 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
398 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
399 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat[];
400 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSratHdr[];
401 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[];
402 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[];
403 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[];
404 extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[];
405 extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[];
406 extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[];
407 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[];
408 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaClient[];
409 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[];
410 extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
411 extern ACPI_DMTABLE_INFO AcpiDmTableInfoUefi[];
412 extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc[];
413 extern ACPI_DMTABLE_INFO AcpiDmTableInfoVrtc0[];
414 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWaet[];
415 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat[];
416 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdat0[];
417 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWddt[];
418 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[];
419 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt[];
420 extern ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[];
421 extern ACPI_DMTABLE_INFO AcpiDmTableInfoXenv[];
422
423 extern ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2];
424
425 /*
426 * dmtable and ahtable
427 */
428 extern const ACPI_DMTABLE_DATA AcpiDmTableData[];
429 extern const AH_TABLE AcpiSupportedTables[];
430
431 UINT8
432 AcpiDmGenerateChecksum (
433 void *Table,
434 UINT32 Length,
435 UINT8 OriginalChecksum);
436
437 const ACPI_DMTABLE_DATA *
438 AcpiDmGetTableData (
439 char *Signature);
440
441 void
442 AcpiDmDumpDataTable (
443 ACPI_TABLE_HEADER *Table);
444
445 ACPI_STATUS
446 AcpiDmDumpTable (
447 UINT32 TableLength,
448 UINT32 TableOffset,
449 void *Table,
450 UINT32 SubTableLength,
451 ACPI_DMTABLE_INFO *Info);
452
453 void
454 AcpiDmLineHeader (
455 UINT32 Offset,
456 UINT32 ByteLength,
457 char *Name);
458
459 void
460 AcpiDmLineHeader2 (
461 UINT32 Offset,
462 UINT32 ByteLength,
463 char *Name,
464 UINT32 Value);
465
466
467 /*
468 * dmtbdump
469 */
470 void
471 AcpiDmDumpBuffer (
472 void *Table,
473 UINT32 BufferOffset,
474 UINT32 Length,
475 UINT32 AbsoluteOffset,
476 char *Header);
477
478 void
479 AcpiDmDumpUnicode (
480 void *Table,
481 UINT32 BufferOffset,
482 UINT32 ByteLength);
483
484 void
485 AcpiDmDumpAsf (
486 ACPI_TABLE_HEADER *Table);
487
488 void
489 AcpiDmDumpCpep (
490 ACPI_TABLE_HEADER *Table);
491
492 void
493 AcpiDmDumpCsrt (
494 ACPI_TABLE_HEADER *Table);
495
496 void
497 AcpiDmDumpDbg2 (
498 ACPI_TABLE_HEADER *Table);
499
500 void
501 AcpiDmDumpDmar (
502 ACPI_TABLE_HEADER *Table);
503
504 void
505 AcpiDmDumpDrtm (
506 ACPI_TABLE_HEADER *Table);
507
508 void
509 AcpiDmDumpEinj (
510 ACPI_TABLE_HEADER *Table);
511
512 void
513 AcpiDmDumpErst (
514 ACPI_TABLE_HEADER *Table);
515
516 void
517 AcpiDmDumpFadt (
518 ACPI_TABLE_HEADER *Table);
519
520 void
521 AcpiDmDumpFpdt (
522 ACPI_TABLE_HEADER *Table);
523
524 void
525 AcpiDmDumpGtdt (
526 ACPI_TABLE_HEADER *Table);
527
528 void
529 AcpiDmDumpHest (
530 ACPI_TABLE_HEADER *Table);
531
532 void
533 AcpiDmDumpIort (
534 ACPI_TABLE_HEADER *Table);
535
536 void
537 AcpiDmDumpIvrs (
538 ACPI_TABLE_HEADER *Table);
539
540 void
541 AcpiDmDumpLpit (
542 ACPI_TABLE_HEADER *Table);
543
544 void
545 AcpiDmDumpMadt (
546 ACPI_TABLE_HEADER *Table);
547
548 void
549 AcpiDmDumpMcfg (
550 ACPI_TABLE_HEADER *Table);
551
552 void
553 AcpiDmDumpMpst (
554 ACPI_TABLE_HEADER *Table);
555
556 void
557 AcpiDmDumpMsct (
558 ACPI_TABLE_HEADER *Table);
559
560 void
561 AcpiDmDumpMtmr (
562 ACPI_TABLE_HEADER *Table);
563
564 void
565 AcpiDmDumpNfit (
566 ACPI_TABLE_HEADER *Table);
567
568 void
569 AcpiDmDumpPcct (
570 ACPI_TABLE_HEADER *Table);
571
572 void
573 AcpiDmDumpPmtt (
574 ACPI_TABLE_HEADER *Table);
575
576 UINT32
577 AcpiDmDumpRsdp (
578 ACPI_TABLE_HEADER *Table);
579
580 void
581 AcpiDmDumpRsdt (
582 ACPI_TABLE_HEADER *Table);
583
584 UINT32
585 AcpiDmDumpS3pt (
586 ACPI_TABLE_HEADER *Table);
587
588 void
589 AcpiDmDumpSlic (
590 ACPI_TABLE_HEADER *Table);
591
592 void
593 AcpiDmDumpSlit (
594 ACPI_TABLE_HEADER *Table);
595
596 void
597 AcpiDmDumpSrat (
598 ACPI_TABLE_HEADER *Table);
599
600 void
601 AcpiDmDumpStao (
602 ACPI_TABLE_HEADER *Table);
603
604 void
605 AcpiDmDumpTcpa (
606 ACPI_TABLE_HEADER *Table);
607
608 void
609 AcpiDmDumpVrtc (
610 ACPI_TABLE_HEADER *Table);
611
612 void
613 AcpiDmDumpWdat (
614 ACPI_TABLE_HEADER *Table);
615
616 void
617 AcpiDmDumpWpbt (
618 ACPI_TABLE_HEADER *Table);
619
620 void
621 AcpiDmDumpXsdt (
622 ACPI_TABLE_HEADER *Table);
623
624
625 /*
626 * dmwalk
627 */
628 void
629 AcpiDmDisassemble (
630 ACPI_WALK_STATE *WalkState,
631 ACPI_PARSE_OBJECT *Origin,
632 UINT32 NumOpcodes);
633
634 void
635 AcpiDmWalkParseTree (
636 ACPI_PARSE_OBJECT *Op,
637 ASL_WALK_CALLBACK DescendingCallback,
638 ASL_WALK_CALLBACK AscendingCallback,
639 void *Context);
640
641
642 /*
643 * dmopcode
644 */
645 void
646 AcpiDmDisassembleOneOp (
647 ACPI_WALK_STATE *WalkState,
648 ACPI_OP_WALK_INFO *Info,
649 ACPI_PARSE_OBJECT *Op);
650
651 UINT32
652 AcpiDmListType (
653 ACPI_PARSE_OBJECT *Op);
654
655 void
656 AcpiDmMethodFlags (
657 ACPI_PARSE_OBJECT *Op);
658
659 void
660 AcpiDmDisplayTargetPathname (
661 ACPI_PARSE_OBJECT *Op);
662
663 void
664 AcpiDmNotifyDescription (
665 ACPI_PARSE_OBJECT *Op);
666
667 void
668 AcpiDmPredefinedDescription (
669 ACPI_PARSE_OBJECT *Op);
670
671 void
672 AcpiDmFieldPredefinedDescription (
673 ACPI_PARSE_OBJECT *Op);
674
675 void
676 AcpiDmFieldFlags (
677 ACPI_PARSE_OBJECT *Op);
678
679 void
680 AcpiDmAddressSpace (
681 UINT8 SpaceId);
682
683 void
684 AcpiDmRegionFlags (
685 ACPI_PARSE_OBJECT *Op);
686
687 void
688 AcpiDmMatchOp (
689 ACPI_PARSE_OBJECT *Op);
690
691
692 /*
693 * dmnames
694 */
695 UINT32
696 AcpiDmDumpName (
697 UINT32 Name);
698
699 ACPI_STATUS
700 AcpiPsDisplayObjectPathname (
701 ACPI_WALK_STATE *WalkState,
702 ACPI_PARSE_OBJECT *Op);
703
704 void
705 AcpiDmNamestring (
706 char *Name);
707
708
709 /*
710 * dmbuffer
711 */
712 void
713 AcpiDmDisasmByteList (
714 UINT32 Level,
715 UINT8 *ByteData,
716 UINT32 ByteCount);
717
718 void
719 AcpiDmByteList (
720 ACPI_OP_WALK_INFO *Info,
721 ACPI_PARSE_OBJECT *Op);
722
723 void
724 AcpiDmCheckForHardwareId (
725 ACPI_PARSE_OBJECT *Op);
726
727 void
728 AcpiDmDecompressEisaId (
729 UINT32 EncodedId);
730
731 BOOLEAN
732 AcpiDmIsUuidBuffer (
733 ACPI_PARSE_OBJECT *Op);
734
735 BOOLEAN
736 AcpiDmIsUnicodeBuffer (
737 ACPI_PARSE_OBJECT *Op);
738
739 BOOLEAN
740 AcpiDmIsStringBuffer (
741 ACPI_PARSE_OBJECT *Op);
742
743 BOOLEAN
744 AcpiDmIsPldBuffer (
745 ACPI_PARSE_OBJECT *Op);
746
747
748 /*
749 * dmdeferred
750 */
751 ACPI_STATUS
752 AcpiDmParseDeferredOps (
753 ACPI_PARSE_OBJECT *Root);
754
755
756 /*
757 * dmextern
758 */
759 ACPI_STATUS
760 AcpiDmAddToExternalFileList (
761 char *PathList);
762
763 void
764 AcpiDmClearExternalFileList (
765 void);
766
767 void
768 AcpiDmAddOpToExternalList (
769 ACPI_PARSE_OBJECT *Op,
770 char *Path,
771 UINT8 Type,
772 UINT32 Value,
773 UINT16 Flags);
774
775 void
776 AcpiDmAddNodeToExternalList (
777 ACPI_NAMESPACE_NODE *Node,
778 UINT8 Type,
779 UINT32 Value,
780 UINT16 Flags);
781
782 void
783 AcpiDmAddExternalsToNamespace (
784 void);
785
786 UINT32
787 AcpiDmGetExternalMethodCount (
788 void);
789
790 void
791 AcpiDmClearExternalList (
792 void);
793
794 void
795 AcpiDmEmitExternals (
796 void);
797
798 void
799 AcpiDmUnresolvedWarning (
800 UINT8 Type);
801
802 void
803 AcpiDmGetExternalsFromFile (
804 void);
805
806 /*
807 * dmresrc
808 */
809 void
810 AcpiDmDumpInteger8 (
811 UINT8 Value,
812 const char *Name);
813
814 void
815 AcpiDmDumpInteger16 (
816 UINT16 Value,
817 const char *Name);
818
819 void
820 AcpiDmDumpInteger32 (
821 UINT32 Value,
822 const char *Name);
823
824 void
825 AcpiDmDumpInteger64 (
826 UINT64 Value,
827 const char *Name);
828
829 void
830 AcpiDmResourceTemplate (
831 ACPI_OP_WALK_INFO *Info,
832 ACPI_PARSE_OBJECT *Op,
833 UINT8 *ByteData,
834 UINT32 ByteCount);
835
836 ACPI_STATUS
837 AcpiDmIsResourceTemplate (
838 ACPI_WALK_STATE *WalkState,
839 ACPI_PARSE_OBJECT *Op);
840
841 void
842 AcpiDmBitList (
843 UINT16 Mask);
844
845 void
846 AcpiDmDescriptorName (
847 void);
848
849
850 /*
851 * dmresrcl
852 */
853 void
854 AcpiDmWordDescriptor (
855 ACPI_OP_WALK_INFO *Info,
856 AML_RESOURCE *Resource,
857 UINT32 Length,
858 UINT32 Level);
859
860 void
861 AcpiDmDwordDescriptor (
862 ACPI_OP_WALK_INFO *Info,
863 AML_RESOURCE *Resource,
864 UINT32 Length,
865 UINT32 Level);
866
867 void
868 AcpiDmExtendedDescriptor (
869 ACPI_OP_WALK_INFO *Info,
870 AML_RESOURCE *Resource,
871 UINT32 Length,
872 UINT32 Level);
873
874 void
875 AcpiDmQwordDescriptor (
876 ACPI_OP_WALK_INFO *Info,
877 AML_RESOURCE *Resource,
878 UINT32 Length,
879 UINT32 Level);
880
881 void
882 AcpiDmMemory24Descriptor (
883 ACPI_OP_WALK_INFO *Info,
884 AML_RESOURCE *Resource,
885 UINT32 Length,
886 UINT32 Level);
887
888 void
889 AcpiDmMemory32Descriptor (
890 ACPI_OP_WALK_INFO *Info,
891 AML_RESOURCE *Resource,
892 UINT32 Length,
893 UINT32 Level);
894
895 void
896 AcpiDmFixedMemory32Descriptor (
897 ACPI_OP_WALK_INFO *Info,
898 AML_RESOURCE *Resource,
899 UINT32 Length,
900 UINT32 Level);
901
902 void
903 AcpiDmGenericRegisterDescriptor (
904 ACPI_OP_WALK_INFO *Info,
905 AML_RESOURCE *Resource,
906 UINT32 Length,
907 UINT32 Level);
908
909 void
910 AcpiDmInterruptDescriptor (
911 ACPI_OP_WALK_INFO *Info,
912 AML_RESOURCE *Resource,
913 UINT32 Length,
914 UINT32 Level);
915
916 void
917 AcpiDmVendorLargeDescriptor (
918 ACPI_OP_WALK_INFO *Info,
919 AML_RESOURCE *Resource,
920 UINT32 Length,
921 UINT32 Level);
922
923 void
924 AcpiDmGpioDescriptor (
925 ACPI_OP_WALK_INFO *Info,
926 AML_RESOURCE *Resource,
927 UINT32 Length,
928 UINT32 Level);
929
930 void
931 AcpiDmSerialBusDescriptor (
932 ACPI_OP_WALK_INFO *Info,
933 AML_RESOURCE *Resource,
934 UINT32 Length,
935 UINT32 Level);
936
937 void
938 AcpiDmVendorCommon (
939 const char *Name,
940 UINT8 *ByteData,
941 UINT32 Length,
942 UINT32 Level);
943
944
945 /*
946 * dmresrcs
947 */
948 void
949 AcpiDmIrqDescriptor (
950 ACPI_OP_WALK_INFO *Info,
951 AML_RESOURCE *Resource,
952 UINT32 Length,
953 UINT32 Level);
954
955 void
956 AcpiDmDmaDescriptor (
957 ACPI_OP_WALK_INFO *Info,
958 AML_RESOURCE *Resource,
959 UINT32 Length,
960 UINT32 Level);
961
962 void
963 AcpiDmFixedDmaDescriptor (
964 ACPI_OP_WALK_INFO *Info,
965 AML_RESOURCE *Resource,
966 UINT32 Length,
967 UINT32 Level);
968
969 void
970 AcpiDmIoDescriptor (
971 ACPI_OP_WALK_INFO *Info,
972 AML_RESOURCE *Resource,
973 UINT32 Length,
974 UINT32 Level);
975
976 void
977 AcpiDmFixedIoDescriptor (
978 ACPI_OP_WALK_INFO *Info,
979 AML_RESOURCE *Resource,
980 UINT32 Length,
981 UINT32 Level);
982
983 void
984 AcpiDmStartDependentDescriptor (
985 ACPI_OP_WALK_INFO *Info,
986 AML_RESOURCE *Resource,
987 UINT32 Length,
988 UINT32 Level);
989
990 void
991 AcpiDmEndDependentDescriptor (
992 ACPI_OP_WALK_INFO *Info,
993 AML_RESOURCE *Resource,
994 UINT32 Length,
995 UINT32 Level);
996
997 void
998 AcpiDmVendorSmallDescriptor (
999 ACPI_OP_WALK_INFO *Info,
1000 AML_RESOURCE *Resource,
1001 UINT32 Length,
1002 UINT32 Level);
1003
1004
1005 /*
1006 * dmutils
1007 */
1008 void
1009 AcpiDmDecodeAttribute (
1010 UINT8 Attribute);
1011
1012 void
1013 AcpiDmIndent (
1014 UINT32 Level);
1015
1016 BOOLEAN
1017 AcpiDmCommaIfListMember (
1018 ACPI_PARSE_OBJECT *Op);
1019
1020 void
1021 AcpiDmCommaIfFieldMember (
1022 ACPI_PARSE_OBJECT *Op);
1023
1024
1025 /*
1026 * dmrestag
1027 */
1028 void
1029 AcpiDmFindResources (
1030 ACPI_PARSE_OBJECT *Root);
1031
1032 void
1033 AcpiDmCheckResourceReference (
1034 ACPI_PARSE_OBJECT *Op,
1035 ACPI_WALK_STATE *WalkState);
1036
1037
1038 /*
1039 * dmcstyle
1040 */
1041 BOOLEAN
1042 AcpiDmCheckForSymbolicOpcode (
1043 ACPI_PARSE_OBJECT *Op,
1044 ACPI_OP_WALK_INFO *Info);
1045
1046 void
1047 AcpiDmCloseOperator (
1048 ACPI_PARSE_OBJECT *Op);
1049
1050
1051 /*
1052 * dmtables
1053 */
1054 void
1055 AdDisassemblerHeader (
1056 char *Filename,
1057 UINT8 TableType);
1058
1059 #define ACPI_IS_AML_TABLE 0
1060 #define ACPI_IS_DATA_TABLE 1
1061
1062
1063 /*
1064 * adisasm
1065 */
1066 ACPI_STATUS
1067 AdAmlDisassemble (
1068 BOOLEAN OutToFile,
1069 char *Filename,
1070 char *Prefix,
1071 char **OutFilename);
1072
1073 ACPI_STATUS
1074 AdGetLocalTables (
1075 void);
1076
1077 ACPI_STATUS
1078 AdParseTable (
1079 ACPI_TABLE_HEADER *Table,
1080 ACPI_OWNER_ID *OwnerId,
1081 BOOLEAN LoadTable,
1082 BOOLEAN External);
1083
1084 ACPI_STATUS
1085 AdDisplayTables (
1086 char *Filename,
1087 ACPI_TABLE_HEADER *Table);
1088
1089 ACPI_STATUS
1090 AdDisplayStatistics (
1091 void);
1092
1093 #endif /* __ACDISASM_H__ */