xref: /titanic_44/usr/src/uts/intel/sys/acpi/acdisasm.h (revision ab6fd898a4f8198d9657172ea3f2c92bcf2a5963)
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        AcpiDmTableInfoPcct2[];
389 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp1[];
390 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp2[];
391 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt[];
392 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3ptHdr[];
393 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt0[];
394 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt1[];
395 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSbst[];
396 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlic[];
397 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlit[];
398 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSpcr[];
399 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSpmi[];
400 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat[];
401 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSratHdr[];
402 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat0[];
403 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat1[];
404 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat2[];
405 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSrat3[];
406 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoStao[];
407 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoStaoStr[];
408 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaHdr[];
409 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaClient[];
410 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaServer[];
411 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm2[];
412 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoUefi[];
413 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc[];
414 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc0[];
415 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWaet[];
416 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdat[];
417 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdat0[];
418 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWddt[];
419 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWdrt[];
420 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWpbt[];
421 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoWpbt0[];
422 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoXenv[];
423 
424 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoGeneric[][2];
425 
426 /*
427  * dmtable and ahtable
428  */
429 extern const ACPI_DMTABLE_DATA  AcpiDmTableData[];
430 extern const AH_TABLE           AcpiSupportedTables[];
431 
432 UINT8
433 AcpiDmGenerateChecksum (
434     void                    *Table,
435     UINT32                  Length,
436     UINT8                   OriginalChecksum);
437 
438 const ACPI_DMTABLE_DATA *
439 AcpiDmGetTableData (
440     char                    *Signature);
441 
442 void
443 AcpiDmDumpDataTable (
444     ACPI_TABLE_HEADER       *Table);
445 
446 ACPI_STATUS
447 AcpiDmDumpTable (
448     UINT32                  TableLength,
449     UINT32                  TableOffset,
450     void                    *Table,
451     UINT32                  SubTableLength,
452     ACPI_DMTABLE_INFO        *Info);
453 
454 void
455 AcpiDmLineHeader (
456     UINT32                  Offset,
457     UINT32                  ByteLength,
458     char                    *Name);
459 
460 void
461 AcpiDmLineHeader2 (
462     UINT32                  Offset,
463     UINT32                  ByteLength,
464     char                    *Name,
465     UINT32                  Value);
466 
467 
468 /*
469  * dmtbdump
470  */
471 void
472 AcpiDmDumpBuffer (
473     void                    *Table,
474     UINT32                  BufferOffset,
475     UINT32                  Length,
476     UINT32                  AbsoluteOffset,
477     char                    *Header);
478 
479 void
480 AcpiDmDumpUnicode (
481     void                    *Table,
482     UINT32                  BufferOffset,
483     UINT32                  ByteLength);
484 
485 void
486 AcpiDmDumpAsf (
487     ACPI_TABLE_HEADER       *Table);
488 
489 void
490 AcpiDmDumpCpep (
491     ACPI_TABLE_HEADER       *Table);
492 
493 void
494 AcpiDmDumpCsrt (
495     ACPI_TABLE_HEADER       *Table);
496 
497 void
498 AcpiDmDumpDbg2 (
499     ACPI_TABLE_HEADER       *Table);
500 
501 void
502 AcpiDmDumpDmar (
503     ACPI_TABLE_HEADER       *Table);
504 
505 void
506 AcpiDmDumpDrtm (
507     ACPI_TABLE_HEADER       *Table);
508 
509 void
510 AcpiDmDumpEinj (
511     ACPI_TABLE_HEADER       *Table);
512 
513 void
514 AcpiDmDumpErst (
515     ACPI_TABLE_HEADER       *Table);
516 
517 void
518 AcpiDmDumpFadt (
519     ACPI_TABLE_HEADER       *Table);
520 
521 void
522 AcpiDmDumpFpdt (
523     ACPI_TABLE_HEADER       *Table);
524 
525 void
526 AcpiDmDumpGtdt (
527     ACPI_TABLE_HEADER       *Table);
528 
529 void
530 AcpiDmDumpHest (
531     ACPI_TABLE_HEADER       *Table);
532 
533 void
534 AcpiDmDumpIort (
535     ACPI_TABLE_HEADER       *Table);
536 
537 void
538 AcpiDmDumpIvrs (
539     ACPI_TABLE_HEADER       *Table);
540 
541 void
542 AcpiDmDumpLpit (
543     ACPI_TABLE_HEADER       *Table);
544 
545 void
546 AcpiDmDumpMadt (
547     ACPI_TABLE_HEADER       *Table);
548 
549 void
550 AcpiDmDumpMcfg (
551     ACPI_TABLE_HEADER       *Table);
552 
553 void
554 AcpiDmDumpMpst (
555     ACPI_TABLE_HEADER       *Table);
556 
557 void
558 AcpiDmDumpMsct (
559     ACPI_TABLE_HEADER       *Table);
560 
561 void
562 AcpiDmDumpMtmr (
563     ACPI_TABLE_HEADER       *Table);
564 
565 void
566 AcpiDmDumpNfit (
567     ACPI_TABLE_HEADER       *Table);
568 
569 void
570 AcpiDmDumpPcct (
571     ACPI_TABLE_HEADER       *Table);
572 
573 void
574 AcpiDmDumpPmtt (
575     ACPI_TABLE_HEADER       *Table);
576 
577 UINT32
578 AcpiDmDumpRsdp (
579     ACPI_TABLE_HEADER       *Table);
580 
581 void
582 AcpiDmDumpRsdt (
583     ACPI_TABLE_HEADER       *Table);
584 
585 UINT32
586 AcpiDmDumpS3pt (
587     ACPI_TABLE_HEADER       *Table);
588 
589 void
590 AcpiDmDumpSlic (
591     ACPI_TABLE_HEADER       *Table);
592 
593 void
594 AcpiDmDumpSlit (
595     ACPI_TABLE_HEADER       *Table);
596 
597 void
598 AcpiDmDumpSrat (
599     ACPI_TABLE_HEADER       *Table);
600 
601 void
602 AcpiDmDumpStao (
603     ACPI_TABLE_HEADER       *Table);
604 
605 void
606 AcpiDmDumpTcpa (
607     ACPI_TABLE_HEADER       *Table);
608 
609 void
610 AcpiDmDumpVrtc (
611     ACPI_TABLE_HEADER       *Table);
612 
613 void
614 AcpiDmDumpWdat (
615     ACPI_TABLE_HEADER       *Table);
616 
617 void
618 AcpiDmDumpWpbt (
619     ACPI_TABLE_HEADER       *Table);
620 
621 void
622 AcpiDmDumpXsdt (
623     ACPI_TABLE_HEADER       *Table);
624 
625 
626 /*
627  * dmwalk
628  */
629 void
630 AcpiDmDisassemble (
631     ACPI_WALK_STATE         *WalkState,
632     ACPI_PARSE_OBJECT       *Origin,
633     UINT32                  NumOpcodes);
634 
635 void
636 AcpiDmWalkParseTree (
637     ACPI_PARSE_OBJECT       *Op,
638     ASL_WALK_CALLBACK       DescendingCallback,
639     ASL_WALK_CALLBACK       AscendingCallback,
640     void                    *Context);
641 
642 
643 /*
644  * dmopcode
645  */
646 void
647 AcpiDmDisassembleOneOp (
648     ACPI_WALK_STATE         *WalkState,
649     ACPI_OP_WALK_INFO       *Info,
650     ACPI_PARSE_OBJECT       *Op);
651 
652 UINT32
653 AcpiDmListType (
654     ACPI_PARSE_OBJECT       *Op);
655 
656 void
657 AcpiDmMethodFlags (
658     ACPI_PARSE_OBJECT       *Op);
659 
660 void
661 AcpiDmDisplayTargetPathname (
662     ACPI_PARSE_OBJECT       *Op);
663 
664 void
665 AcpiDmNotifyDescription (
666     ACPI_PARSE_OBJECT       *Op);
667 
668 void
669 AcpiDmPredefinedDescription (
670     ACPI_PARSE_OBJECT       *Op);
671 
672 void
673 AcpiDmFieldPredefinedDescription (
674     ACPI_PARSE_OBJECT       *Op);
675 
676 void
677 AcpiDmFieldFlags (
678     ACPI_PARSE_OBJECT       *Op);
679 
680 void
681 AcpiDmAddressSpace (
682     UINT8                   SpaceId);
683 
684 void
685 AcpiDmRegionFlags (
686     ACPI_PARSE_OBJECT       *Op);
687 
688 void
689 AcpiDmMatchOp (
690     ACPI_PARSE_OBJECT       *Op);
691 
692 
693 /*
694  * dmnames
695  */
696 UINT32
697 AcpiDmDumpName (
698     UINT32                  Name);
699 
700 ACPI_STATUS
701 AcpiPsDisplayObjectPathname (
702     ACPI_WALK_STATE         *WalkState,
703     ACPI_PARSE_OBJECT       *Op);
704 
705 void
706 AcpiDmNamestring (
707     char                    *Name);
708 
709 
710 /*
711  * dmbuffer
712  */
713 void
714 AcpiDmDisasmByteList (
715     UINT32                  Level,
716     UINT8                   *ByteData,
717     UINT32                  ByteCount);
718 
719 void
720 AcpiDmByteList (
721     ACPI_OP_WALK_INFO       *Info,
722     ACPI_PARSE_OBJECT       *Op);
723 
724 void
725 AcpiDmCheckForHardwareId (
726     ACPI_PARSE_OBJECT       *Op);
727 
728 void
729 AcpiDmDecompressEisaId (
730     UINT32                  EncodedId);
731 
732 BOOLEAN
733 AcpiDmIsUuidBuffer (
734     ACPI_PARSE_OBJECT       *Op);
735 
736 BOOLEAN
737 AcpiDmIsUnicodeBuffer (
738     ACPI_PARSE_OBJECT       *Op);
739 
740 BOOLEAN
741 AcpiDmIsStringBuffer (
742     ACPI_PARSE_OBJECT       *Op);
743 
744 BOOLEAN
745 AcpiDmIsPldBuffer (
746     ACPI_PARSE_OBJECT       *Op);
747 
748 
749 /*
750  * dmdeferred
751  */
752 ACPI_STATUS
753 AcpiDmParseDeferredOps (
754     ACPI_PARSE_OBJECT       *Root);
755 
756 
757 /*
758  * dmextern
759  */
760 ACPI_STATUS
761 AcpiDmAddToExternalFileList (
762     char                    *PathList);
763 
764 void
765 AcpiDmClearExternalFileList (
766     void);
767 
768 void
769 AcpiDmAddOpToExternalList (
770     ACPI_PARSE_OBJECT       *Op,
771     char                    *Path,
772     UINT8                   Type,
773     UINT32                  Value,
774     UINT16                  Flags);
775 
776 void
777 AcpiDmAddNodeToExternalList (
778     ACPI_NAMESPACE_NODE     *Node,
779     UINT8                   Type,
780     UINT32                  Value,
781     UINT16                  Flags);
782 
783 void
784 AcpiDmAddExternalsToNamespace (
785     void);
786 
787 UINT32
788 AcpiDmGetExternalMethodCount (
789     void);
790 
791 void
792 AcpiDmClearExternalList (
793     void);
794 
795 void
796 AcpiDmEmitExternals (
797     void);
798 
799 void
800 AcpiDmUnresolvedWarning (
801     UINT8                   Type);
802 
803 void
804 AcpiDmGetExternalsFromFile (
805     void);
806 
807 /*
808  * dmresrc
809  */
810 void
811 AcpiDmDumpInteger8 (
812     UINT8                   Value,
813     const char              *Name);
814 
815 void
816 AcpiDmDumpInteger16 (
817     UINT16                  Value,
818     const char              *Name);
819 
820 void
821 AcpiDmDumpInteger32 (
822     UINT32                  Value,
823     const char              *Name);
824 
825 void
826 AcpiDmDumpInteger64 (
827     UINT64                  Value,
828     const char              *Name);
829 
830 void
831 AcpiDmResourceTemplate (
832     ACPI_OP_WALK_INFO       *Info,
833     ACPI_PARSE_OBJECT       *Op,
834     UINT8                   *ByteData,
835     UINT32                  ByteCount);
836 
837 ACPI_STATUS
838 AcpiDmIsResourceTemplate (
839     ACPI_WALK_STATE         *WalkState,
840     ACPI_PARSE_OBJECT       *Op);
841 
842 void
843 AcpiDmBitList (
844     UINT16                  Mask);
845 
846 void
847 AcpiDmDescriptorName (
848     void);
849 
850 
851 /*
852  * dmresrcl
853  */
854 void
855 AcpiDmWordDescriptor (
856     ACPI_OP_WALK_INFO       *Info,
857     AML_RESOURCE            *Resource,
858     UINT32                  Length,
859     UINT32                  Level);
860 
861 void
862 AcpiDmDwordDescriptor (
863     ACPI_OP_WALK_INFO       *Info,
864     AML_RESOURCE            *Resource,
865     UINT32                  Length,
866     UINT32                  Level);
867 
868 void
869 AcpiDmExtendedDescriptor (
870     ACPI_OP_WALK_INFO       *Info,
871     AML_RESOURCE            *Resource,
872     UINT32                  Length,
873     UINT32                  Level);
874 
875 void
876 AcpiDmQwordDescriptor (
877     ACPI_OP_WALK_INFO       *Info,
878     AML_RESOURCE            *Resource,
879     UINT32                  Length,
880     UINT32                  Level);
881 
882 void
883 AcpiDmMemory24Descriptor (
884     ACPI_OP_WALK_INFO       *Info,
885     AML_RESOURCE            *Resource,
886     UINT32                  Length,
887     UINT32                  Level);
888 
889 void
890 AcpiDmMemory32Descriptor (
891     ACPI_OP_WALK_INFO       *Info,
892     AML_RESOURCE            *Resource,
893     UINT32                  Length,
894     UINT32                  Level);
895 
896 void
897 AcpiDmFixedMemory32Descriptor (
898     ACPI_OP_WALK_INFO       *Info,
899     AML_RESOURCE            *Resource,
900     UINT32                  Length,
901     UINT32                  Level);
902 
903 void
904 AcpiDmGenericRegisterDescriptor (
905     ACPI_OP_WALK_INFO       *Info,
906     AML_RESOURCE            *Resource,
907     UINT32                  Length,
908     UINT32                  Level);
909 
910 void
911 AcpiDmInterruptDescriptor (
912     ACPI_OP_WALK_INFO       *Info,
913     AML_RESOURCE            *Resource,
914     UINT32                  Length,
915     UINT32                  Level);
916 
917 void
918 AcpiDmVendorLargeDescriptor (
919     ACPI_OP_WALK_INFO       *Info,
920     AML_RESOURCE            *Resource,
921     UINT32                  Length,
922     UINT32                  Level);
923 
924 void
925 AcpiDmGpioDescriptor (
926     ACPI_OP_WALK_INFO       *Info,
927     AML_RESOURCE            *Resource,
928     UINT32                  Length,
929     UINT32                  Level);
930 
931 void
932 AcpiDmSerialBusDescriptor (
933     ACPI_OP_WALK_INFO       *Info,
934     AML_RESOURCE            *Resource,
935     UINT32                  Length,
936     UINT32                  Level);
937 
938 void
939 AcpiDmVendorCommon (
940     const char              *Name,
941     UINT8                   *ByteData,
942     UINT32                  Length,
943     UINT32                  Level);
944 
945 
946 /*
947  * dmresrcs
948  */
949 void
950 AcpiDmIrqDescriptor (
951     ACPI_OP_WALK_INFO       *Info,
952     AML_RESOURCE            *Resource,
953     UINT32                  Length,
954     UINT32                  Level);
955 
956 void
957 AcpiDmDmaDescriptor (
958     ACPI_OP_WALK_INFO       *Info,
959     AML_RESOURCE            *Resource,
960     UINT32                  Length,
961     UINT32                  Level);
962 
963 void
964 AcpiDmFixedDmaDescriptor (
965     ACPI_OP_WALK_INFO       *Info,
966     AML_RESOURCE            *Resource,
967     UINT32                  Length,
968     UINT32                  Level);
969 
970 void
971 AcpiDmIoDescriptor (
972     ACPI_OP_WALK_INFO       *Info,
973     AML_RESOURCE            *Resource,
974     UINT32                  Length,
975     UINT32                  Level);
976 
977 void
978 AcpiDmFixedIoDescriptor (
979     ACPI_OP_WALK_INFO       *Info,
980     AML_RESOURCE            *Resource,
981     UINT32                  Length,
982     UINT32                  Level);
983 
984 void
985 AcpiDmStartDependentDescriptor (
986     ACPI_OP_WALK_INFO       *Info,
987     AML_RESOURCE            *Resource,
988     UINT32                  Length,
989     UINT32                  Level);
990 
991 void
992 AcpiDmEndDependentDescriptor (
993     ACPI_OP_WALK_INFO       *Info,
994     AML_RESOURCE            *Resource,
995     UINT32                  Length,
996     UINT32                  Level);
997 
998 void
999 AcpiDmVendorSmallDescriptor (
1000     ACPI_OP_WALK_INFO       *Info,
1001     AML_RESOURCE            *Resource,
1002     UINT32                  Length,
1003     UINT32                  Level);
1004 
1005 
1006 /*
1007  * dmutils
1008  */
1009 void
1010 AcpiDmDecodeAttribute (
1011     UINT8                   Attribute);
1012 
1013 void
1014 AcpiDmIndent (
1015     UINT32                  Level);
1016 
1017 BOOLEAN
1018 AcpiDmCommaIfListMember (
1019     ACPI_PARSE_OBJECT       *Op);
1020 
1021 void
1022 AcpiDmCommaIfFieldMember (
1023     ACPI_PARSE_OBJECT       *Op);
1024 
1025 
1026 /*
1027  * dmrestag
1028  */
1029 void
1030 AcpiDmFindResources (
1031     ACPI_PARSE_OBJECT       *Root);
1032 
1033 void
1034 AcpiDmCheckResourceReference (
1035     ACPI_PARSE_OBJECT       *Op,
1036     ACPI_WALK_STATE         *WalkState);
1037 
1038 
1039 /*
1040  * dmcstyle
1041  */
1042 BOOLEAN
1043 AcpiDmCheckForSymbolicOpcode (
1044     ACPI_PARSE_OBJECT       *Op,
1045     ACPI_OP_WALK_INFO       *Info);
1046 
1047 void
1048 AcpiDmCloseOperator (
1049     ACPI_PARSE_OBJECT       *Op);
1050 
1051 
1052 /*
1053  * dmtables
1054  */
1055 void
1056 AdDisassemblerHeader (
1057     char                    *Filename,
1058     UINT8                   TableType);
1059 
1060 #define ACPI_IS_AML_TABLE   0
1061 #define ACPI_IS_DATA_TABLE  1
1062 
1063 
1064 /*
1065  * adisasm
1066  */
1067 ACPI_STATUS
1068 AdAmlDisassemble (
1069     BOOLEAN                 OutToFile,
1070     char                    *Filename,
1071     char                    *Prefix,
1072     char                    **OutFilename);
1073 
1074 ACPI_STATUS
1075 AdGetLocalTables (
1076     void);
1077 
1078 ACPI_STATUS
1079 AdParseTable (
1080     ACPI_TABLE_HEADER       *Table,
1081     ACPI_OWNER_ID           *OwnerId,
1082     BOOLEAN                 LoadTable,
1083     BOOLEAN                 External);
1084 
1085 ACPI_STATUS
1086 AdDisplayTables (
1087     char                    *Filename,
1088     ACPI_TABLE_HEADER       *Table);
1089 
1090 ACPI_STATUS
1091 AdDisplayStatistics (
1092     void);
1093 
1094 #endif  /* __ACDISASM_H__ */
1095