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