xref: /freebsd/sys/contrib/dev/acpica/include/acdisasm.h (revision 39ee7a7a6bdd1557b1c3532abf60d139798ac88b)
1 /******************************************************************************
2  *
3  * Name: acdisasm.h - AML disassembler
4  *
5  *****************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2015, 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 <contrib/dev/acpica/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        AcpiDmTableInfoHestNotify[];
306 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHestBank[];
307 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHpet[];
308 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoLpitHdr[];
309 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoLpit0[];
310 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoLpit1[];
311 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort[];
312 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort0[];
313 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort0a[];
314 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort1[];
315 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort1a[];
316 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort2[];
317 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3[];
318 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3a[];
319 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3b[];
320 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3c[];
321 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortAcc[];
322 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortHdr[];
323 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortMap[];
324 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortPad[];
325 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs[];
326 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs0[];
327 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs1[];
328 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs4[];
329 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs8a[];
330 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs8b[];
331 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrs8c[];
332 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIvrsHdr[];
333 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt[];
334 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt0[];
335 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt1[];
336 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt2[];
337 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt3[];
338 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt4[];
339 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt5[];
340 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt6[];
341 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt7[];
342 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt8[];
343 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt9[];
344 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt10[];
345 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt11[];
346 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt12[];
347 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt13[];
348 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt14[];
349 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadt15[];
350 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMadtHdr[];
351 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMcfg[];
352 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMcfg0[];
353 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMchi[];
354 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst[];
355 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst0[];
356 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst0A[];
357 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst0B[];
358 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst1[];
359 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMpst2[];
360 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMsct[];
361 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMsct0[];
362 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMtmr[];
363 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoMtmr0[];
364 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit[];
365 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfitHdr[];
366 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit0[];
367 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit1[];
368 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit2[];
369 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit2a[];
370 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit3[];
371 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit3a[];
372 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit4[];
373 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit5[];
374 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit6[];
375 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoNfit6a[];
376 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt[];
377 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt0[];
378 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt1[];
379 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt1a[];
380 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmtt2[];
381 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPmttHdr[];
382 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct[];
383 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcctHdr[];
384 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct0[];
385 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct1[];
386 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp1[];
387 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp2[];
388 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt[];
389 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3ptHdr[];
390 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt0[];
391 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt1[];
392 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSbst[];
393 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlic[];
394 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlit[];
395 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSpcr[];
396 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSpmi[];
397 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat[];
398 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSratHdr[];
399 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat0[];
400 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat1[];
401 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat2[];
402 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat3[];
403 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoStao[];
404 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoStaoStr[];
405 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaHdr[];
406 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaClient[];
407 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaServer[];
408 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm2[];
409 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoUefi[];
410 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc[];
411 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc0[];
412 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWaet[];
413 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdat[];
414 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdat0[];
415 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWddt[];
416 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdrt[];
417 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWpbt[];
418 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWpbt0[];
419 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoXenv[];
420 
421 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoGeneric[][2];
422 
423 /*
424  * dmtable and ahtable
425  */
426 extern const ACPI_DMTABLE_DATA  AcpiDmTableData[];
427 extern const AH_TABLE           AcpiSupportedTables[];
428 
429 UINT8
430 AcpiDmGenerateChecksum (
431     void                    *Table,
432     UINT32                  Length,
433     UINT8                   OriginalChecksum);
434 
435 const ACPI_DMTABLE_DATA *
436 AcpiDmGetTableData (
437     char                    *Signature);
438 
439 void
440 AcpiDmDumpDataTable (
441     ACPI_TABLE_HEADER       *Table);
442 
443 ACPI_STATUS
444 AcpiDmDumpTable (
445     UINT32                  TableLength,
446     UINT32                  TableOffset,
447     void                    *Table,
448     UINT32                  SubTableLength,
449     ACPI_DMTABLE_INFO        *Info);
450 
451 void
452 AcpiDmLineHeader (
453     UINT32                  Offset,
454     UINT32                  ByteLength,
455     char                    *Name);
456 
457 void
458 AcpiDmLineHeader2 (
459     UINT32                  Offset,
460     UINT32                  ByteLength,
461     char                    *Name,
462     UINT32                  Value);
463 
464 
465 /*
466  * dmtbdump
467  */
468 void
469 AcpiDmDumpBuffer (
470     void                    *Table,
471     UINT32                  BufferOffset,
472     UINT32                  Length,
473     UINT32                  AbsoluteOffset,
474     char                    *Header);
475 
476 void
477 AcpiDmDumpUnicode (
478     void                    *Table,
479     UINT32                  BufferOffset,
480     UINT32                  ByteLength);
481 
482 void
483 AcpiDmDumpAsf (
484     ACPI_TABLE_HEADER       *Table);
485 
486 void
487 AcpiDmDumpCpep (
488     ACPI_TABLE_HEADER       *Table);
489 
490 void
491 AcpiDmDumpCsrt (
492     ACPI_TABLE_HEADER       *Table);
493 
494 void
495 AcpiDmDumpDbg2 (
496     ACPI_TABLE_HEADER       *Table);
497 
498 void
499 AcpiDmDumpDmar (
500     ACPI_TABLE_HEADER       *Table);
501 
502 void
503 AcpiDmDumpDrtm (
504     ACPI_TABLE_HEADER       *Table);
505 
506 void
507 AcpiDmDumpEinj (
508     ACPI_TABLE_HEADER       *Table);
509 
510 void
511 AcpiDmDumpErst (
512     ACPI_TABLE_HEADER       *Table);
513 
514 void
515 AcpiDmDumpFadt (
516     ACPI_TABLE_HEADER       *Table);
517 
518 void
519 AcpiDmDumpFpdt (
520     ACPI_TABLE_HEADER       *Table);
521 
522 void
523 AcpiDmDumpGtdt (
524     ACPI_TABLE_HEADER       *Table);
525 
526 void
527 AcpiDmDumpHest (
528     ACPI_TABLE_HEADER       *Table);
529 
530 void
531 AcpiDmDumpIort (
532     ACPI_TABLE_HEADER       *Table);
533 
534 void
535 AcpiDmDumpIvrs (
536     ACPI_TABLE_HEADER       *Table);
537 
538 void
539 AcpiDmDumpLpit (
540     ACPI_TABLE_HEADER       *Table);
541 
542 void
543 AcpiDmDumpMadt (
544     ACPI_TABLE_HEADER       *Table);
545 
546 void
547 AcpiDmDumpMcfg (
548     ACPI_TABLE_HEADER       *Table);
549 
550 void
551 AcpiDmDumpMpst (
552     ACPI_TABLE_HEADER       *Table);
553 
554 void
555 AcpiDmDumpMsct (
556     ACPI_TABLE_HEADER       *Table);
557 
558 void
559 AcpiDmDumpMtmr (
560     ACPI_TABLE_HEADER       *Table);
561 
562 void
563 AcpiDmDumpNfit (
564     ACPI_TABLE_HEADER       *Table);
565 
566 void
567 AcpiDmDumpPcct (
568     ACPI_TABLE_HEADER       *Table);
569 
570 void
571 AcpiDmDumpPmtt (
572     ACPI_TABLE_HEADER       *Table);
573 
574 UINT32
575 AcpiDmDumpRsdp (
576     ACPI_TABLE_HEADER       *Table);
577 
578 void
579 AcpiDmDumpRsdt (
580     ACPI_TABLE_HEADER       *Table);
581 
582 UINT32
583 AcpiDmDumpS3pt (
584     ACPI_TABLE_HEADER       *Table);
585 
586 void
587 AcpiDmDumpSlic (
588     ACPI_TABLE_HEADER       *Table);
589 
590 void
591 AcpiDmDumpSlit (
592     ACPI_TABLE_HEADER       *Table);
593 
594 void
595 AcpiDmDumpSrat (
596     ACPI_TABLE_HEADER       *Table);
597 
598 void
599 AcpiDmDumpStao (
600     ACPI_TABLE_HEADER       *Table);
601 
602 void
603 AcpiDmDumpTcpa (
604     ACPI_TABLE_HEADER       *Table);
605 
606 void
607 AcpiDmDumpVrtc (
608     ACPI_TABLE_HEADER       *Table);
609 
610 void
611 AcpiDmDumpWdat (
612     ACPI_TABLE_HEADER       *Table);
613 
614 void
615 AcpiDmDumpWpbt (
616     ACPI_TABLE_HEADER       *Table);
617 
618 void
619 AcpiDmDumpXsdt (
620     ACPI_TABLE_HEADER       *Table);
621 
622 
623 /*
624  * dmwalk
625  */
626 void
627 AcpiDmDisassemble (
628     ACPI_WALK_STATE         *WalkState,
629     ACPI_PARSE_OBJECT       *Origin,
630     UINT32                  NumOpcodes);
631 
632 void
633 AcpiDmWalkParseTree (
634     ACPI_PARSE_OBJECT       *Op,
635     ASL_WALK_CALLBACK       DescendingCallback,
636     ASL_WALK_CALLBACK       AscendingCallback,
637     void                    *Context);
638 
639 
640 /*
641  * dmopcode
642  */
643 void
644 AcpiDmDisassembleOneOp (
645     ACPI_WALK_STATE         *WalkState,
646     ACPI_OP_WALK_INFO       *Info,
647     ACPI_PARSE_OBJECT       *Op);
648 
649 UINT32
650 AcpiDmListType (
651     ACPI_PARSE_OBJECT       *Op);
652 
653 void
654 AcpiDmMethodFlags (
655     ACPI_PARSE_OBJECT       *Op);
656 
657 void
658 AcpiDmDisplayTargetPathname (
659     ACPI_PARSE_OBJECT       *Op);
660 
661 void
662 AcpiDmNotifyDescription (
663     ACPI_PARSE_OBJECT       *Op);
664 
665 void
666 AcpiDmPredefinedDescription (
667     ACPI_PARSE_OBJECT       *Op);
668 
669 void
670 AcpiDmFieldPredefinedDescription (
671     ACPI_PARSE_OBJECT       *Op);
672 
673 void
674 AcpiDmFieldFlags (
675     ACPI_PARSE_OBJECT       *Op);
676 
677 void
678 AcpiDmAddressSpace (
679     UINT8                   SpaceId);
680 
681 void
682 AcpiDmRegionFlags (
683     ACPI_PARSE_OBJECT       *Op);
684 
685 void
686 AcpiDmMatchOp (
687     ACPI_PARSE_OBJECT       *Op);
688 
689 
690 /*
691  * dmnames
692  */
693 UINT32
694 AcpiDmDumpName (
695     UINT32                  Name);
696 
697 ACPI_STATUS
698 AcpiPsDisplayObjectPathname (
699     ACPI_WALK_STATE         *WalkState,
700     ACPI_PARSE_OBJECT       *Op);
701 
702 void
703 AcpiDmNamestring (
704     char                    *Name);
705 
706 
707 /*
708  * dmbuffer
709  */
710 void
711 AcpiDmDisasmByteList (
712     UINT32                  Level,
713     UINT8                   *ByteData,
714     UINT32                  ByteCount);
715 
716 void
717 AcpiDmByteList (
718     ACPI_OP_WALK_INFO       *Info,
719     ACPI_PARSE_OBJECT       *Op);
720 
721 void
722 AcpiDmCheckForHardwareId (
723     ACPI_PARSE_OBJECT       *Op);
724 
725 void
726 AcpiDmDecompressEisaId (
727     UINT32                  EncodedId);
728 
729 BOOLEAN
730 AcpiDmIsUuidBuffer (
731     ACPI_PARSE_OBJECT       *Op);
732 
733 BOOLEAN
734 AcpiDmIsUnicodeBuffer (
735     ACPI_PARSE_OBJECT       *Op);
736 
737 BOOLEAN
738 AcpiDmIsStringBuffer (
739     ACPI_PARSE_OBJECT       *Op);
740 
741 BOOLEAN
742 AcpiDmIsPldBuffer (
743     ACPI_PARSE_OBJECT       *Op);
744 
745 
746 /*
747  * dmdeferred
748  */
749 ACPI_STATUS
750 AcpiDmParseDeferredOps (
751     ACPI_PARSE_OBJECT       *Root);
752 
753 
754 /*
755  * dmextern
756  */
757 ACPI_STATUS
758 AcpiDmAddToExternalFileList (
759     char                    *PathList);
760 
761 void
762 AcpiDmClearExternalFileList (
763     void);
764 
765 void
766 AcpiDmAddOpToExternalList (
767     ACPI_PARSE_OBJECT       *Op,
768     char                    *Path,
769     UINT8                   Type,
770     UINT32                  Value,
771     UINT16                  Flags);
772 
773 void
774 AcpiDmAddNodeToExternalList (
775     ACPI_NAMESPACE_NODE     *Node,
776     UINT8                   Type,
777     UINT32                  Value,
778     UINT16                  Flags);
779 
780 void
781 AcpiDmAddExternalsToNamespace (
782     void);
783 
784 UINT32
785 AcpiDmGetExternalMethodCount (
786     void);
787 
788 void
789 AcpiDmClearExternalList (
790     void);
791 
792 void
793 AcpiDmEmitExternals (
794     void);
795 
796 void
797 AcpiDmUnresolvedWarning (
798     UINT8                   Type);
799 
800 void
801 AcpiDmGetExternalsFromFile (
802     void);
803 
804 /*
805  * dmresrc
806  */
807 void
808 AcpiDmDumpInteger8 (
809     UINT8                   Value,
810     char                    *Name);
811 
812 void
813 AcpiDmDumpInteger16 (
814     UINT16                  Value,
815     char                    *Name);
816 
817 void
818 AcpiDmDumpInteger32 (
819     UINT32                  Value,
820     char                    *Name);
821 
822 void
823 AcpiDmDumpInteger64 (
824     UINT64                  Value,
825     char                    *Name);
826 
827 void
828 AcpiDmResourceTemplate (
829     ACPI_OP_WALK_INFO       *Info,
830     ACPI_PARSE_OBJECT       *Op,
831     UINT8                   *ByteData,
832     UINT32                  ByteCount);
833 
834 ACPI_STATUS
835 AcpiDmIsResourceTemplate (
836     ACPI_WALK_STATE         *WalkState,
837     ACPI_PARSE_OBJECT       *Op);
838 
839 void
840 AcpiDmBitList (
841     UINT16                  Mask);
842 
843 void
844 AcpiDmDescriptorName (
845     void);
846 
847 
848 /*
849  * dmresrcl
850  */
851 void
852 AcpiDmWordDescriptor (
853     ACPI_OP_WALK_INFO       *Info,
854     AML_RESOURCE            *Resource,
855     UINT32                  Length,
856     UINT32                  Level);
857 
858 void
859 AcpiDmDwordDescriptor (
860     ACPI_OP_WALK_INFO       *Info,
861     AML_RESOURCE            *Resource,
862     UINT32                  Length,
863     UINT32                  Level);
864 
865 void
866 AcpiDmExtendedDescriptor (
867     ACPI_OP_WALK_INFO       *Info,
868     AML_RESOURCE            *Resource,
869     UINT32                  Length,
870     UINT32                  Level);
871 
872 void
873 AcpiDmQwordDescriptor (
874     ACPI_OP_WALK_INFO       *Info,
875     AML_RESOURCE            *Resource,
876     UINT32                  Length,
877     UINT32                  Level);
878 
879 void
880 AcpiDmMemory24Descriptor (
881     ACPI_OP_WALK_INFO       *Info,
882     AML_RESOURCE            *Resource,
883     UINT32                  Length,
884     UINT32                  Level);
885 
886 void
887 AcpiDmMemory32Descriptor (
888     ACPI_OP_WALK_INFO       *Info,
889     AML_RESOURCE            *Resource,
890     UINT32                  Length,
891     UINT32                  Level);
892 
893 void
894 AcpiDmFixedMemory32Descriptor (
895     ACPI_OP_WALK_INFO       *Info,
896     AML_RESOURCE            *Resource,
897     UINT32                  Length,
898     UINT32                  Level);
899 
900 void
901 AcpiDmGenericRegisterDescriptor (
902     ACPI_OP_WALK_INFO       *Info,
903     AML_RESOURCE            *Resource,
904     UINT32                  Length,
905     UINT32                  Level);
906 
907 void
908 AcpiDmInterruptDescriptor (
909     ACPI_OP_WALK_INFO       *Info,
910     AML_RESOURCE            *Resource,
911     UINT32                  Length,
912     UINT32                  Level);
913 
914 void
915 AcpiDmVendorLargeDescriptor (
916     ACPI_OP_WALK_INFO       *Info,
917     AML_RESOURCE            *Resource,
918     UINT32                  Length,
919     UINT32                  Level);
920 
921 void
922 AcpiDmGpioDescriptor (
923     ACPI_OP_WALK_INFO       *Info,
924     AML_RESOURCE            *Resource,
925     UINT32                  Length,
926     UINT32                  Level);
927 
928 void
929 AcpiDmSerialBusDescriptor (
930     ACPI_OP_WALK_INFO       *Info,
931     AML_RESOURCE            *Resource,
932     UINT32                  Length,
933     UINT32                  Level);
934 
935 void
936 AcpiDmVendorCommon (
937     char                    *Name,
938     UINT8                   *ByteData,
939     UINT32                  Length,
940     UINT32                  Level);
941 
942 
943 /*
944  * dmresrcs
945  */
946 void
947 AcpiDmIrqDescriptor (
948     ACPI_OP_WALK_INFO       *Info,
949     AML_RESOURCE            *Resource,
950     UINT32                  Length,
951     UINT32                  Level);
952 
953 void
954 AcpiDmDmaDescriptor (
955     ACPI_OP_WALK_INFO       *Info,
956     AML_RESOURCE            *Resource,
957     UINT32                  Length,
958     UINT32                  Level);
959 
960 void
961 AcpiDmFixedDmaDescriptor (
962     ACPI_OP_WALK_INFO       *Info,
963     AML_RESOURCE            *Resource,
964     UINT32                  Length,
965     UINT32                  Level);
966 
967 void
968 AcpiDmIoDescriptor (
969     ACPI_OP_WALK_INFO       *Info,
970     AML_RESOURCE            *Resource,
971     UINT32                  Length,
972     UINT32                  Level);
973 
974 void
975 AcpiDmFixedIoDescriptor (
976     ACPI_OP_WALK_INFO       *Info,
977     AML_RESOURCE            *Resource,
978     UINT32                  Length,
979     UINT32                  Level);
980 
981 void
982 AcpiDmStartDependentDescriptor (
983     ACPI_OP_WALK_INFO       *Info,
984     AML_RESOURCE            *Resource,
985     UINT32                  Length,
986     UINT32                  Level);
987 
988 void
989 AcpiDmEndDependentDescriptor (
990     ACPI_OP_WALK_INFO       *Info,
991     AML_RESOURCE            *Resource,
992     UINT32                  Length,
993     UINT32                  Level);
994 
995 void
996 AcpiDmVendorSmallDescriptor (
997     ACPI_OP_WALK_INFO       *Info,
998     AML_RESOURCE            *Resource,
999     UINT32                  Length,
1000     UINT32                  Level);
1001 
1002 
1003 /*
1004  * dmutils
1005  */
1006 void
1007 AcpiDmDecodeAttribute (
1008     UINT8                   Attribute);
1009 
1010 void
1011 AcpiDmIndent (
1012     UINT32                  Level);
1013 
1014 BOOLEAN
1015 AcpiDmCommaIfListMember (
1016     ACPI_PARSE_OBJECT       *Op);
1017 
1018 void
1019 AcpiDmCommaIfFieldMember (
1020     ACPI_PARSE_OBJECT       *Op);
1021 
1022 
1023 /*
1024  * dmrestag
1025  */
1026 void
1027 AcpiDmFindResources (
1028     ACPI_PARSE_OBJECT       *Root);
1029 
1030 void
1031 AcpiDmCheckResourceReference (
1032     ACPI_PARSE_OBJECT       *Op,
1033     ACPI_WALK_STATE         *WalkState);
1034 
1035 
1036 /*
1037  * dmcstyle
1038  */
1039 BOOLEAN
1040 AcpiDmCheckForSymbolicOpcode (
1041     ACPI_PARSE_OBJECT       *Op,
1042     ACPI_OP_WALK_INFO       *Info);
1043 
1044 void
1045 AcpiDmCloseOperator (
1046     ACPI_PARSE_OBJECT       *Op);
1047 
1048 
1049 /*
1050  * acdisasm
1051  */
1052 void
1053 AdDisassemblerHeader (
1054     char                    *Filename,
1055     UINT8                   TableType);
1056 
1057 #define ACPI_IS_AML_TABLE   0
1058 #define ACPI_IS_DATA_TABLE  1
1059 
1060 #endif  /* __ACDISASM_H__ */
1061