1 /******************************************************************************
3 * Module Name: dmtable - Support for ACPI tables that contain no AML code
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
153 #include "accommon.h"
154 #include "acdisasm.h"
155 #include "actables.h"
156 #include "aslcompiler.h"
158 /* This module used for application-level code only */
160 #define _COMPONENT ACPI_CA_DISASSEMBLER
161 ACPI_MODULE_NAME ("dmtable")
168 /* Common format strings for commented values */
170 #define UINT8_FORMAT "%2.2X [%s]\n"
171 #define UINT16_FORMAT "%4.4X [%s]\n"
172 #define UINT32_FORMAT "%8.8X [%s]\n"
173 #define STRING_FORMAT "[%s]\n"
175 /* These tables map a subtable type to a description string */
177 static const char *AcpiDmAsfSubnames[] =
181 "ASF Remote Control",
182 "ASF RMCP Boot Options",
184 "Unknown Subtable Type" /* Reserved */
187 static const char *AcpiDmCedtSubnames[] =
189 "CXL Host Bridge Structure",
190 "Unknown Subtable Type" /* Reserved */
193 static const char *AcpiDmDmarSubnames[] =
195 "Hardware Unit Definition",
196 "Reserved Memory Region",
197 "Root Port ATS Capability",
198 "Remapping Hardware Static Affinity",
199 "ACPI Namespace Device Declaration",
200 "Unknown Subtable Type" /* Reserved */
203 static const char *AcpiDmDmarScope[] =
206 "PCI Endpoint Device",
209 "Message-capable HPET Device",
211 "Unknown Scope Type" /* Reserved */
214 static const char *AcpiDmEinjActions[] =
223 "Get Command Status",
224 "Set Error Type With Address",
225 "Get Execute Timings",
229 static const char *AcpiDmEinjInstructions[] =
232 "Read Register Value",
234 "Write Register Value",
237 "Unknown Instruction"
240 static const char *AcpiDmErstActions[] =
242 "Begin Write Operation",
243 "Begin Read Operation",
244 "Begin Clear Operation",
249 "Get Command Status",
250 "Get Record Identifier",
251 "Set Record Identifier",
254 "Unused/Unknown Action",
255 "Get Error Address Range",
256 "Get Error Address Length",
257 "Get Error Attributes",
262 static const char *AcpiDmErstInstructions[] =
265 "Read Register Value",
267 "Write Register Value",
280 "Set Source Address",
281 "Set Destination Address",
283 "Unknown Instruction"
286 static const char *AcpiDmGtdtSubnames[] =
288 "Generic Timer Block",
289 "Generic Watchdog Timer",
290 "Unknown Subtable Type" /* Reserved */
293 static const char *AcpiDmHestSubnames[] =
295 "IA-32 Machine Check Exception",
296 "IA-32 Corrected Machine Check",
297 "IA-32 Non-Maskable Interrupt",
298 "Unknown Subtable Type", /* 3 - Reserved */
299 "Unknown Subtable Type", /* 4 - Reserved */
300 "Unknown Subtable Type", /* 5 - Reserved */
301 "PCI Express Root Port AER",
302 "PCI Express AER (AER Endpoint)",
303 "PCI Express/PCI-X Bridge AER",
304 "Generic Hardware Error Source",
305 "Generic Hardware Error Source V2",
306 "IA-32 Deferred Machine Check",
307 "Unknown Subtable Type" /* Reserved */
310 static const char *AcpiDmHestNotifySubnames[] =
313 "External Interrupt",
317 "CMCI", /* ACPI 5.0 */
318 "MCE", /* ACPI 5.0 */
319 "GPIO", /* ACPI 6.0 */
320 "SEA", /* ACPI 6.1 */
321 "SEI", /* ACPI 6.1 */
322 "GSIV", /* ACPI 6.1 */
323 "Software Delegated Exception", /* ACPI 6.2 */
324 "Unknown Notify Type" /* Reserved */
327 static const char *AcpiDmHmatSubnames[] =
329 "Memory Proximity Domain Attributes",
330 "System Locality Latency and Bandwidth Information",
331 "Memory Side Cache Information",
332 "Unknown Structure Type" /* Reserved */
335 static const char *AcpiDmMadtSubnames[] =
337 "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
338 "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
339 "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
340 "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
341 "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
342 "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
343 "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
344 "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
345 "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
346 "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
347 "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
348 "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
349 "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */
350 "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
351 "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
352 "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
353 "Unknown Subtable Type" /* Reserved */
356 static const char *AcpiDmNfitSubnames[] =
358 "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */
359 "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */
360 "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */
361 "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */
362 "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
363 "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
364 "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
365 "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
366 "Unknown Subtable Type" /* Reserved */
369 static const char *AcpiDmPcctSubnames[] =
371 "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
372 "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
373 "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
374 "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
375 "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
376 "HW Registers based Comm Subspace", /* ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE */
377 "Unknown Subtable Type" /* Reserved */
380 static const char *AcpiDmPhatSubnames[] =
382 "Firmware Version Data", /* ACPI_PHAT_TYPE_FW_VERSION_DATA */
383 "Firmware Health Data", /* ACPI_PHAT_TYPE_FW_HEALTH_DATA */
384 "Unknown Subtable Type" /* Reserved */
387 static const char *AcpiDmPmttSubnames[] =
389 "Socket", /* ACPI_PMTT_TYPE_SOCKET */
390 "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
391 "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
392 "Unknown Subtable Type", /* Reserved */
393 "Vendor Specific" /* ACPI_PMTT_TYPE_VENDOR */
396 static const char *AcpiDmPpttSubnames[] =
398 "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
399 "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
400 "ID", /* ACPI_PPTT_TYPE_ID */
401 "Unknown Subtable Type" /* Reserved */
404 static const char *AcpiDmSdevSubnames[] =
406 "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
407 "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
408 "Unknown Subtable Type" /* Reserved */
411 static const char *AcpiDmSratSubnames[] =
413 "Processor Local APIC/SAPIC Affinity",
415 "Processor Local x2APIC Affinity",
417 "GIC ITS Affinity", /* Acpi 6.2 */
418 "Generic Initiator Affinity", /* Acpi 6.3 */
419 "Unknown Subtable Type" /* Reserved */
422 static const char *AcpiDmTpm2Subnames[] =
424 "Illegal Start Method value",
431 "Command Response Buffer",
432 "Command Response Buffer with ACPI Start Method",
435 "Command Response Buffer with ARM SMC",
436 "Unknown Subtable Type" /* Reserved */
439 static const char *AcpiDmIvrsSubnames[] =
441 "Hardware Definition Block",
442 "Memory Definition Block",
443 "Unknown Subtable Type" /* Reserved */
446 static const char *AcpiDmLpitSubnames[] =
448 "Native C-state Idle Structure",
449 "Unknown Subtable Type" /* Reserved */
452 static const char *AcpiDmViotSubnames[] =
454 "Unknown Subtable Type", /* 0 -Reserved */
459 "Unknown Subtable Type" /* Reserved */
462 #define ACPI_FADT_PM_RESERVED 9
464 static const char *AcpiDmFadtProfiles[] =
473 "Performance Server",
475 "Unknown Profile Type"
478 #define ACPI_GAS_WIDTH_RESERVED 5
480 static const char *AcpiDmGasAccessWidth[] =
487 "Unknown Width Encoding"
491 /*******************************************************************************
493 * ACPI Table Data, indexed by signature.
495 * Each entry contains: Signature, Table Info, Handler, DtHandler,
496 * Template, Description
498 * Simple tables have only a TableInfo structure, complex tables have a
499 * handler. This table must be NULL terminated. RSDP and FACS are
500 * special-cased elsewhere.
502 * Note: Any tables added here should be duplicated within
503 * AcpiGbl_SupportedTables in the file common/ahtable.c
505 ******************************************************************************/
507 const ACPI_DMTABLE_DATA AcpiDmTableData[] =
509 {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
510 {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
511 {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt},
512 {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot},
513 {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt},
514 {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
515 {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
516 {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2},
517 {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp},
518 {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar},
519 {ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm},
520 {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt},
521 {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj},
522 {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst},
523 {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt},
524 {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt},
525 {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt},
526 {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest},
527 {ACPI_SIG_HMAT, NULL, AcpiDmDumpHmat, DtCompileHmat, TemplateHmat},
528 {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet},
529 {ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort},
530 {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs},
531 {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit},
532 {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt},
533 {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg},
534 {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi},
535 {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst},
536 {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
537 {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
538 {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
539 {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
540 {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
541 {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat},
542 {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
543 {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
544 {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
545 {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
546 {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
547 {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
548 {ACPI_SIG_SDEI, AcpiDmTableInfoSdei, NULL, NULL, TemplateSdei},
549 {ACPI_SIG_SDEV, AcpiDmTableInfoSdev, AcpiDmDumpSdev, DtCompileSdev, TemplateSdev},
550 {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic},
551 {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit},
552 {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr},
553 {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi},
554 {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
555 {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
556 {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
557 {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
558 {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
559 {ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot},
560 {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet},
561 {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat},
562 {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
563 {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt},
564 {ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt},
565 {ACPI_SIG_WSMT, AcpiDmTableInfoWsmt, NULL, NULL, TemplateWsmt},
566 {ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv},
567 {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt},
568 {NULL, NULL, NULL, NULL, NULL}
572 /*******************************************************************************
574 * FUNCTION: AcpiDmGenerateChecksum
576 * PARAMETERS: Table - Pointer to table to be checksummed
577 * Length - Length of the table
578 * OriginalChecksum - Value of the checksum field
580 * RETURN: 8 bit checksum of buffer
582 * DESCRIPTION: Computes an 8 bit checksum of the table.
584 ******************************************************************************/
587 AcpiDmGenerateChecksum (
590 UINT8 OriginalChecksum)
595 /* Sum the entire table as-is */
597 Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
599 /* Subtract off the existing checksum value in the table */
601 Checksum = (UINT8) (Checksum - OriginalChecksum);
603 /* Compute the final checksum */
605 Checksum = (UINT8) (0 - Checksum);
610 /*******************************************************************************
612 * FUNCTION: AcpiDmGetTableData
614 * PARAMETERS: Signature - ACPI signature (4 chars) to match
616 * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
618 * DESCRIPTION: Find a match in the global table of supported ACPI tables
620 ******************************************************************************/
622 const ACPI_DMTABLE_DATA *
626 const ACPI_DMTABLE_DATA *Info;
629 for (Info = AcpiDmTableData; Info->Signature; Info++)
631 if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature))
641 /*******************************************************************************
643 * FUNCTION: AcpiDmDumpDataTable
645 * PARAMETERS: Table - An ACPI table
649 * DESCRIPTION: Format the contents of an ACPI data table (any table other
650 * than an SSDT or DSDT that does not contain executable AML code)
652 ******************************************************************************/
655 AcpiDmDumpDataTable (
656 ACPI_TABLE_HEADER *Table)
659 const ACPI_DMTABLE_DATA *TableData;
663 /* Ignore tables that contain AML */
665 if (AcpiUtIsAmlTable (Table))
667 if (AslGbl_VerboseTemplates)
669 /* Dump the raw table data */
671 Length = Table->Length;
673 AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
674 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
675 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
676 Length, DB_BYTE_DISPLAY, 0);
677 AcpiOsPrintf (" */\n");
683 * Handle tables that don't use the common ACPI table header structure.
684 * Currently, these are the FACS, RSDP, and S3PT.
686 if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
688 Length = Table->Length;
689 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
690 if (ACPI_FAILURE (Status))
695 else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
697 Length = AcpiDmDumpRsdp (Table);
699 else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT))
701 Length = AcpiDmDumpS3pt (Table);
706 * All other tables must use the common ACPI table header, dump it now
708 Length = Table->Length;
709 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
710 if (ACPI_FAILURE (Status))
716 /* Match signature and dispatch appropriately */
718 TableData = AcpiDmGetTableData (Table->Signature);
721 if (!strncmp (Table->Signature, "OEM", 3))
723 AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
728 AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
731 fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
734 if (!AcpiGbl_ForceAmlDisassembly)
736 fprintf (stderr, "decoding ACPI table header only\n");
740 fprintf (stderr, "assuming table contains valid AML code\n");
744 else if (TableData->TableHandler)
746 /* Complex table, has a handler */
748 TableData->TableHandler (Table);
750 else if (TableData->TableInfo)
752 /* Simple table, just walk the info table */
754 Status = AcpiDmDumpTable (Length, 0, Table, 0, TableData->TableInfo);
755 if (ACPI_FAILURE (Status))
762 if (!AslGbl_DoTemplates || AslGbl_VerboseTemplates)
764 /* Dump the raw table data */
766 AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
767 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
768 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
769 Length, DB_BYTE_DISPLAY, 0);
774 /*******************************************************************************
776 * FUNCTION: AcpiDmLineHeader
778 * PARAMETERS: Offset - Current byte offset, from table start
779 * ByteLength - Length of the field in bytes, 0 for flags
780 * Name - Name of this field
784 * DESCRIPTION: Utility routines for formatting output lines. Displays the
785 * current table offset in hex and decimal, the field length,
786 * and the field name.
788 ******************************************************************************/
797 /* Allow a null name for fields that span multiple lines (large buffers) */
804 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
808 AcpiOsPrintf ("[%.4d] %34s : ", ByteLength, Name);
814 AcpiOsPrintf ("%41s : ", Name);
818 AcpiOsPrintf ("%41s ", Name);
822 else /* Normal disassembler or verbose template */
826 AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
827 Offset, Offset, ByteLength, Name);
833 AcpiOsPrintf ("%44s : ", Name);
837 AcpiOsPrintf ("%44s ", Name);
851 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
855 AcpiOsPrintf ("[%.4d] %30s %3d : ",
856 ByteLength, Name, Value);
860 AcpiOsPrintf ("%36s % 3d : ",
864 else /* Normal disassembler or verbose template */
868 AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
869 Offset, Offset, ByteLength, Name, Value);
873 AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
874 Offset, Offset, Name, Value);
880 /*******************************************************************************
882 * FUNCTION: AcpiDmDumpTable
884 * PARAMETERS: TableLength - Length of the entire ACPI table
885 * TableOffset - Starting offset within the table for this
886 * sub-descriptor (0 if main table)
887 * Table - The ACPI table
888 * SubtableLength - Length of this sub-descriptor
889 * Info - Info table for this ACPI table
893 * DESCRIPTION: Display ACPI table contents by walking the Info table.
895 * Note: This function must remain in sync with DtGetFieldLength.
897 ******************************************************************************/
904 UINT32 SubtableLength,
905 ACPI_DMTABLE_INFO *Info)
908 UINT32 CurrentOffset;
914 const AH_TABLE *TableData;
916 BOOLEAN LastOutputBlankLine = FALSE;
918 char RepairedName[8];
923 AcpiOsPrintf ("Display not implemented\n");
924 return (AE_NOT_IMPLEMENTED);
927 /* Walk entire Info table; Null name terminates */
929 for (; Info->Name; Info++)
932 * Target points to the field within the ACPI Table. CurrentOffset is
933 * the offset of the field from the start of the main table.
935 Target = ACPI_ADD_PTR (UINT8, Table, Info->Offset);
936 CurrentOffset = TableOffset + Info->Offset;
938 /* Check for beyond subtable end or (worse) beyond EOT */
940 if (SubtableLength && (Info->Offset >= SubtableLength))
943 "/**** ACPI subtable terminates early - "
944 "may be older version (dump table) */\n");
946 /* Move on to next subtable */
951 if (CurrentOffset >= TableLength)
954 "/**** ACPI table terminates "
955 "in the middle of a data structure! (dump table) */\n");
956 return (AE_BAD_DATA);
959 /* Generate the byte length for this field */
961 switch (Info->Opcode)
964 case ACPI_DMT_CHKSUM:
965 case ACPI_DMT_SPACEID:
966 case ACPI_DMT_ACCWIDTH:
977 case ACPI_DMT_HESTNTYP:
978 case ACPI_DMT_FADTPM:
979 case ACPI_DMT_EINJACT:
980 case ACPI_DMT_EINJINST:
981 case ACPI_DMT_ERSTACT:
982 case ACPI_DMT_ERSTINST:
983 case ACPI_DMT_DMAR_SCOPE:
989 case ACPI_DMT_UINT16:
999 case ACPI_DMT_UINT24:
1004 case ACPI_DMT_UINT32:
1005 case ACPI_DMT_NAME4:
1013 case ACPI_DMT_UINT40:
1018 case ACPI_DMT_UINT48:
1019 case ACPI_DMT_NAME6:
1024 case ACPI_DMT_UINT56:
1030 case ACPI_DMT_UINT64:
1031 case ACPI_DMT_NAME8:
1036 case ACPI_DMT_BUF10:
1041 case ACPI_DMT_BUF12:
1046 case ACPI_DMT_BUF16:
1052 case ACPI_DMT_BUF128:
1057 case ACPI_DMT_UNICODE:
1058 case ACPI_DMT_BUFFER:
1059 case ACPI_DMT_RAW_BUFFER:
1061 ByteLength = SubtableLength;
1064 case ACPI_DMT_PMTT_VENDOR:
1066 * Calculate the length of the vendor data for the PMTT table:
1067 * Length = (Current Subtable ptr + Subtable length) -
1068 * Start of the vendor data (Target)
1070 ByteLength = ((ACPI_CAST_PTR (char, Table) +
1071 (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) -
1072 ACPI_CAST_PTR (char, Target));
1075 case ACPI_DMT_STRING:
1077 ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1;
1082 if (!LastOutputBlankLine)
1084 AcpiOsPrintf ("\n");
1085 LastOutputBlankLine = TRUE;
1088 ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
1091 case ACPI_DMT_HESTNTFY:
1093 if (!LastOutputBlankLine)
1095 AcpiOsPrintf ("\n");
1096 LastOutputBlankLine = TRUE;
1099 ByteLength = sizeof (ACPI_HEST_NOTIFY);
1102 case ACPI_DMT_IORTMEM:
1104 if (!LastOutputBlankLine)
1106 LastOutputBlankLine = FALSE;
1109 ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
1118 /* Check if we are beyond a subtable, or (worse) beyond EOT */
1120 if (CurrentOffset + ByteLength > TableLength)
1125 "/**** ACPI subtable terminates early - "
1126 "may be older version (dump table) */\n");
1128 /* Move on to next subtable */
1134 "/**** ACPI table terminates "
1135 "in the middle of a data structure! */\n");
1136 return (AE_BAD_DATA);
1139 if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
1141 AcpiOsPrintf ("%s", Info->Name);
1145 /* Start a new line and decode the opcode */
1147 AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
1149 switch (Info->Opcode)
1151 /* Single-bit Flag fields. Note: Opcode is the bit position */
1153 case ACPI_DMT_FLAG0:
1154 case ACPI_DMT_FLAG1:
1155 case ACPI_DMT_FLAG2:
1156 case ACPI_DMT_FLAG3:
1157 case ACPI_DMT_FLAG4:
1158 case ACPI_DMT_FLAG5:
1159 case ACPI_DMT_FLAG6:
1160 case ACPI_DMT_FLAG7:
1162 AcpiOsPrintf ("%1.1X\n", (*Target >> Info->Opcode) & 0x01);
1165 /* 2-bit Flag fields */
1167 case ACPI_DMT_FLAGS0:
1169 AcpiOsPrintf ("%1.1X\n", *Target & 0x03);
1172 case ACPI_DMT_FLAGS1:
1174 AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03);
1177 case ACPI_DMT_FLAGS2:
1179 AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
1182 case ACPI_DMT_FLAGS4:
1184 AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
1187 case ACPI_DMT_FLAGS4_0:
1189 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target) & 0x0F);
1192 case ACPI_DMT_FLAGS4_4:
1194 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 4) & 0x0F);
1197 case ACPI_DMT_FLAGS4_8:
1199 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 8) & 0x0F);
1202 case ACPI_DMT_FLAGS4_12:
1204 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 12) & 0x0F);
1207 case ACPI_DMT_FLAGS16_16:
1209 AcpiOsPrintf ("%4.4X\n", (*(UINT32 *)Target >> 16) & 0xFFFF);
1212 /* Integer Data Types */
1214 case ACPI_DMT_UINT8:
1215 case ACPI_DMT_UINT16:
1216 case ACPI_DMT_UINT24:
1217 case ACPI_DMT_UINT32:
1218 case ACPI_DMT_UINT40:
1219 case ACPI_DMT_UINT48:
1220 case ACPI_DMT_UINT56:
1221 case ACPI_DMT_UINT64:
1223 * Dump bytes - high byte first, low byte last.
1224 * Note: All ACPI tables are little-endian.
1227 for (Temp8 = (UINT8) ByteLength; Temp8 > 0; Temp8--)
1229 AcpiOsPrintf ("%2.2X", Target[Temp8 - 1]);
1230 Value |= Target[Temp8 - 1];
1234 if (!Value && (Info->Flags & DT_DESCRIBES_OPTIONAL))
1236 AcpiOsPrintf (" [Optional field not present]");
1239 AcpiOsPrintf ("\n");
1243 case ACPI_DMT_BUF10:
1244 case ACPI_DMT_BUF12:
1245 case ACPI_DMT_BUF16:
1246 case ACPI_DMT_BUF128:
1248 * Buffer: Size depends on the opcode and was set above.
1249 * Each hex byte is separated with a space.
1250 * Multiple lines are separated by line continuation char.
1252 for (Temp16 = 0; Temp16 < ByteLength; Temp16++)
1254 AcpiOsPrintf ("%2.2X", Target[Temp16]);
1255 if ((UINT32) (Temp16 + 1) < ByteLength)
1257 if ((Temp16 > 0) && (!((Temp16+1) % 16)))
1259 AcpiOsPrintf (" \\\n"); /* Line continuation */
1260 AcpiDmLineHeader (0, 0, NULL);
1269 AcpiOsPrintf ("\n");
1274 /* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
1276 (void) AuConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
1278 AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
1281 case ACPI_DMT_STRING:
1283 AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target));
1286 /* Fixed length ASCII name fields */
1290 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1291 AcpiOsPrintf ("\"%.4s\" ", RepairedName);
1293 TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
1296 AcpiOsPrintf (STRING_FORMAT, TableData->Description);
1300 AcpiOsPrintf ("\n");
1304 case ACPI_DMT_NAME4:
1306 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1307 AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
1310 case ACPI_DMT_NAME6:
1312 AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
1313 AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
1316 case ACPI_DMT_NAME8:
1318 AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
1319 AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
1322 /* Special Data Types */
1324 case ACPI_DMT_CHKSUM:
1326 /* Checksum, display and validate */
1328 AcpiOsPrintf ("%2.2X", *Target);
1329 Temp8 = AcpiDmGenerateChecksum (Table,
1330 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
1331 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
1333 if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
1336 " /* Incorrect checksum, should be %2.2X */", Temp8);
1339 AcpiOsPrintf ("\n");
1342 case ACPI_DMT_SPACEID:
1344 /* Address Space ID */
1346 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiUtGetRegionName (*Target));
1349 case ACPI_DMT_ACCWIDTH:
1351 /* Encoded Access Width */
1354 if (Temp8 > ACPI_GAS_WIDTH_RESERVED)
1356 Temp8 = ACPI_GAS_WIDTH_RESERVED;
1359 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
1364 /* Generic Address Structure */
1366 AcpiOsPrintf (STRING_FORMAT, "Generic Address Structure");
1367 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1368 sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas);
1369 if (ACPI_FAILURE (Status))
1374 AcpiOsPrintf ("\n");
1375 LastOutputBlankLine = TRUE;
1380 /* ASF subtable types */
1382 Temp16 = (UINT16) ((*Target) & 0x7F); /* Top bit can be zero or one */
1383 if (Temp16 > ACPI_ASF_TYPE_RESERVED)
1385 Temp16 = ACPI_ASF_TYPE_RESERVED;
1388 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]);
1393 /* CEDT subtable types */
1396 if (Temp8 > ACPI_CEDT_TYPE_RESERVED)
1398 Temp8 = ACPI_CEDT_TYPE_RESERVED;
1401 AcpiOsPrintf (UINT8_FORMAT, *Target,
1402 AcpiDmCedtSubnames[Temp8]);
1407 /* DMAR subtable types */
1409 Temp16 = ACPI_GET16 (Target);
1410 if (Temp16 > ACPI_DMAR_TYPE_RESERVED)
1412 Temp16 = ACPI_DMAR_TYPE_RESERVED;
1415 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1416 AcpiDmDmarSubnames[Temp16]);
1419 case ACPI_DMT_DMAR_SCOPE:
1421 /* DMAR device scope types */
1424 if (Temp8 > ACPI_DMAR_SCOPE_TYPE_RESERVED)
1426 Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
1429 AcpiOsPrintf (UINT8_FORMAT, *Target,
1430 AcpiDmDmarScope[Temp8]);
1433 case ACPI_DMT_EINJACT:
1435 /* EINJ Action types */
1438 if (Temp8 > ACPI_EINJ_ACTION_RESERVED)
1440 Temp8 = ACPI_EINJ_ACTION_RESERVED;
1443 AcpiOsPrintf (UINT8_FORMAT, *Target,
1444 AcpiDmEinjActions[Temp8]);
1447 case ACPI_DMT_EINJINST:
1449 /* EINJ Instruction types */
1452 if (Temp8 > ACPI_EINJ_INSTRUCTION_RESERVED)
1454 Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
1457 AcpiOsPrintf (UINT8_FORMAT, *Target,
1458 AcpiDmEinjInstructions[Temp8]);
1461 case ACPI_DMT_ERSTACT:
1463 /* ERST Action types */
1466 if (Temp8 > ACPI_ERST_ACTION_RESERVED)
1468 Temp8 = ACPI_ERST_ACTION_RESERVED;
1471 AcpiOsPrintf (UINT8_FORMAT, *Target,
1472 AcpiDmErstActions[Temp8]);
1475 case ACPI_DMT_ERSTINST:
1477 /* ERST Instruction types */
1480 if (Temp8 > ACPI_ERST_INSTRUCTION_RESERVED)
1482 Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
1485 AcpiOsPrintf (UINT8_FORMAT, *Target,
1486 AcpiDmErstInstructions[Temp8]);
1491 /* GTDT subtable types */
1494 if (Temp8 > ACPI_GTDT_TYPE_RESERVED)
1496 Temp8 = ACPI_GTDT_TYPE_RESERVED;
1499 AcpiOsPrintf (UINT8_FORMAT, *Target,
1500 AcpiDmGtdtSubnames[Temp8]);
1505 /* HEST subtable types */
1507 Temp16 = ACPI_GET16 (Target);
1508 if (Temp16 > ACPI_HEST_TYPE_RESERVED)
1510 Temp16 = ACPI_HEST_TYPE_RESERVED;
1513 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1514 AcpiDmHestSubnames[Temp16]);
1517 case ACPI_DMT_HESTNTFY:
1519 AcpiOsPrintf (STRING_FORMAT,
1520 "Hardware Error Notification Structure");
1522 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1523 sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
1524 if (ACPI_FAILURE (Status))
1529 AcpiOsPrintf ("\n");
1530 LastOutputBlankLine = TRUE;
1533 case ACPI_DMT_HESTNTYP:
1535 /* HEST Notify types */
1538 if (Temp8 > ACPI_HEST_NOTIFY_RESERVED)
1540 Temp8 = ACPI_HEST_NOTIFY_RESERVED;
1543 AcpiOsPrintf (UINT8_FORMAT, *Target,
1544 AcpiDmHestNotifySubnames[Temp8]);
1549 /* HMAT subtable types */
1552 if (Temp16 > ACPI_HMAT_TYPE_RESERVED)
1554 Temp16 = ACPI_HMAT_TYPE_RESERVED;
1557 AcpiOsPrintf (UINT16_FORMAT, *Target,
1558 AcpiDmHmatSubnames[Temp16]);
1561 case ACPI_DMT_IORTMEM:
1563 AcpiOsPrintf (STRING_FORMAT,
1564 "IORT Memory Access Properties");
1566 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1567 sizeof (ACPI_IORT_MEMORY_ACCESS), AcpiDmTableInfoIortAcc);
1568 if (ACPI_FAILURE (Status))
1573 LastOutputBlankLine = TRUE;
1578 /* MADT subtable types */
1581 if (Temp8 > ACPI_MADT_TYPE_RESERVED)
1583 Temp8 = ACPI_MADT_TYPE_RESERVED;
1586 AcpiOsPrintf (UINT8_FORMAT, *Target,
1587 AcpiDmMadtSubnames[Temp8]);
1592 /* NFIT subtable types */
1594 Temp16 = ACPI_GET16 (Target);
1595 if (Temp16 > ACPI_NFIT_TYPE_RESERVED)
1597 Temp16 = ACPI_NFIT_TYPE_RESERVED;
1600 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1601 AcpiDmNfitSubnames[Temp16]);
1606 /* PCCT subtable types */
1609 if (Temp8 > ACPI_PCCT_TYPE_RESERVED)
1611 Temp8 = ACPI_PCCT_TYPE_RESERVED;
1614 AcpiOsPrintf (UINT8_FORMAT, *Target,
1615 AcpiDmPcctSubnames[Temp8]);
1620 /* PMTT subtable types */
1623 if (Temp16 > ACPI_PHAT_TYPE_RESERVED)
1625 Temp16 = ACPI_PHAT_TYPE_RESERVED;
1628 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16(Target),
1629 AcpiDmPhatSubnames[Temp16]);
1634 /* PMTT subtable types */
1637 if (Temp8 == ACPI_PMTT_TYPE_VENDOR)
1639 Temp8 = ACPI_PMTT_TYPE_RESERVED + 1;
1641 else if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
1643 Temp8 = ACPI_PMTT_TYPE_RESERVED;
1645 AcpiOsPrintf (UINT8_FORMAT, *Target,
1646 AcpiDmPmttSubnames[Temp8]);
1651 /* PPTT subtable types */
1654 if (Temp8 > ACPI_PPTT_TYPE_RESERVED)
1656 Temp8 = ACPI_PPTT_TYPE_RESERVED;
1659 AcpiOsPrintf (UINT8_FORMAT, *Target,
1660 AcpiDmPpttSubnames[Temp8]);
1663 case ACPI_DMT_UNICODE:
1665 if (ByteLength == 0)
1667 AcpiOsPrintf ("/* Zero-length Data */\n");
1671 AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength);
1674 case ACPI_DMT_RAW_BUFFER:
1675 case ACPI_DMT_BUFFER:
1676 case ACPI_DMT_PMTT_VENDOR:
1678 if (ByteLength == 0)
1680 AcpiOsPrintf ("/* Zero-length Data */\n");
1684 AcpiDmDumpBuffer (Target, 0, ByteLength, 0, NULL);
1689 /* SDEV subtable types */
1692 if (Temp8 > ACPI_SDEV_TYPE_RESERVED)
1694 Temp8 = ACPI_SDEV_TYPE_RESERVED;
1697 AcpiOsPrintf (UINT8_FORMAT, *Target,
1698 AcpiDmSdevSubnames[Temp8]);
1703 /* SRAT subtable types */
1706 if (Temp8 > ACPI_SRAT_TYPE_RESERVED)
1708 Temp8 = ACPI_SRAT_TYPE_RESERVED;
1711 AcpiOsPrintf (UINT8_FORMAT, *Target,
1712 AcpiDmSratSubnames[Temp8]);
1717 /* TPM2 Start Method types */
1720 if (Temp8 > ACPI_TPM2_RESERVED)
1722 Temp8 = ACPI_TPM2_RESERVED;
1725 AcpiOsPrintf (UINT8_FORMAT, *Target,
1726 AcpiDmTpm2Subnames[Temp8]);
1730 case ACPI_DMT_FADTPM:
1732 /* FADT Preferred PM Profile names */
1735 if (Temp8 > ACPI_FADT_PM_RESERVED)
1737 Temp8 = ACPI_FADT_PM_RESERVED;
1740 AcpiOsPrintf (UINT8_FORMAT, *Target,
1741 AcpiDmFadtProfiles[Temp8]);
1746 /* IVRS subtable types */
1751 case ACPI_IVRS_TYPE_HARDWARE1:
1752 case ACPI_IVRS_TYPE_HARDWARE2:
1753 case ACPI_IVRS_TYPE_HARDWARE3:
1755 Name = AcpiDmIvrsSubnames[0];
1758 case ACPI_IVRS_TYPE_MEMORY1:
1759 case ACPI_IVRS_TYPE_MEMORY2:
1760 case ACPI_IVRS_TYPE_MEMORY3:
1762 Name = AcpiDmIvrsSubnames[1];
1767 Name = AcpiDmIvrsSubnames[2];
1771 AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
1776 /* LPIT subtable types */
1778 Temp32 = ACPI_GET32 (Target);
1779 if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
1781 Temp32 = ACPI_LPIT_TYPE_RESERVED;
1784 AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
1785 AcpiDmLpitSubnames[Temp32]);
1790 /* VIOT subtable types */
1793 if (Temp8 > ACPI_VIOT_RESERVED)
1795 Temp8 = ACPI_VIOT_RESERVED;
1798 AcpiOsPrintf (UINT8_FORMAT, *Target,
1799 AcpiDmViotSubnames[Temp8]);
1808 ACPI_ERROR ((AE_INFO,
1809 "**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
1810 return (AE_SUPPORT);
1814 if (TableOffset && !SubtableLength)
1817 * If this table is not the main table, the subtable must have a
1820 AcpiOsPrintf ("Invalid zero length subtable\n");
1821 return (AE_BAD_DATA);