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