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 - 2020, 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 *AcpiDmDmarSubnames[] =
189 "Hardware Unit Definition",
190 "Reserved Memory Region",
191 "Root Port ATS Capability",
192 "Remapping Hardware Static Affinity",
193 "ACPI Namespace Device Declaration",
194 "Unknown Subtable Type" /* Reserved */
197 static const char *AcpiDmDmarScope[] =
200 "PCI Endpoint Device",
203 "Message-capable HPET Device",
205 "Unknown Scope Type" /* Reserved */
208 static const char *AcpiDmEinjActions[] =
217 "Get Command Status",
218 "Set Error Type With Address",
219 "Get Execute Timings",
223 static const char *AcpiDmEinjInstructions[] =
226 "Read Register Value",
228 "Write Register Value",
231 "Unknown Instruction"
234 static const char *AcpiDmErstActions[] =
236 "Begin Write Operation",
237 "Begin Read Operation",
238 "Begin Clear Operation",
243 "Get Command Status",
244 "Get Record Identifier",
245 "Set Record Identifier",
248 "Unused/Unknown Action",
249 "Get Error Address Range",
250 "Get Error Address Length",
251 "Get Error Attributes",
256 static const char *AcpiDmErstInstructions[] =
259 "Read Register Value",
261 "Write Register Value",
274 "Set Source Address",
275 "Set Destination Address",
277 "Unknown Instruction"
280 static const char *AcpiDmGtdtSubnames[] =
282 "Generic Timer Block",
283 "Generic Watchdog Timer",
284 "Unknown Subtable Type" /* Reserved */
287 static const char *AcpiDmHestSubnames[] =
289 "IA-32 Machine Check Exception",
290 "IA-32 Corrected Machine Check",
291 "IA-32 Non-Maskable Interrupt",
292 "Unknown Subtable Type", /* 3 - Reserved */
293 "Unknown Subtable Type", /* 4 - Reserved */
294 "Unknown Subtable Type", /* 5 - Reserved */
295 "PCI Express Root Port AER",
296 "PCI Express AER (AER Endpoint)",
297 "PCI Express/PCI-X Bridge AER",
298 "Generic Hardware Error Source",
299 "Generic Hardware Error Source V2",
300 "IA-32 Deferred Machine Check",
301 "Unknown Subtable Type" /* Reserved */
304 static const char *AcpiDmHestNotifySubnames[] =
307 "External Interrupt",
311 "CMCI", /* ACPI 5.0 */
312 "MCE", /* ACPI 5.0 */
313 "GPIO", /* ACPI 6.0 */
314 "SEA", /* ACPI 6.1 */
315 "SEI", /* ACPI 6.1 */
316 "GSIV", /* ACPI 6.1 */
317 "Software Delegated Exception", /* ACPI 6.2 */
318 "Unknown Notify Type" /* Reserved */
321 static const char *AcpiDmHmatSubnames[] =
323 "Memory Proximity Domain Attributes",
324 "System Locality Latency and Bandwidth Information",
325 "Memory Side Cache Information",
326 "Unknown Structure Type" /* Reserved */
329 static const char *AcpiDmMadtSubnames[] =
331 "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
332 "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
333 "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
334 "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
335 "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
336 "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
337 "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
338 "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
339 "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
340 "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
341 "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
342 "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
343 "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */
344 "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
345 "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
346 "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
347 "Unknown Subtable Type" /* Reserved */
350 static const char *AcpiDmNfitSubnames[] =
352 "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */
353 "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */
354 "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */
355 "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */
356 "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
357 "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
358 "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
359 "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
360 "Unknown Subtable Type" /* Reserved */
363 static const char *AcpiDmPcctSubnames[] =
365 "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
366 "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
367 "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
368 "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
369 "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
370 "Unknown Subtable Type" /* Reserved */
373 static const char *AcpiDmPmttSubnames[] =
375 "Socket", /* ACPI_PMTT_TYPE_SOCKET */
376 "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
377 "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
378 "Unknown Subtable Type" /* Reserved */
381 static const char *AcpiDmPpttSubnames[] =
383 "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
384 "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
385 "ID", /* ACPI_PPTT_TYPE_ID */
386 "Unknown Subtable Type" /* Reserved */
389 static const char *AcpiDmSdevSubnames[] =
391 "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
392 "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
393 "Unknown Subtable Type" /* Reserved */
396 static const char *AcpiDmSratSubnames[] =
398 "Processor Local APIC/SAPIC Affinity",
400 "Processor Local x2APIC Affinity",
402 "GIC ITS Affinity", /* Acpi 6.2 */
403 "Generic Initiator Affinity", /* Acpi 6.3 */
404 "Unknown Subtable Type" /* Reserved */
407 static const char *AcpiDmTpm2Subnames[] =
409 "Illegal Start Method value",
416 "Command Response Buffer",
417 "Command Response Buffer with ACPI Start Method",
420 "Command Response Buffer with ARM SMC",
421 "Unknown Subtable Type" /* Reserved */
424 static const char *AcpiDmIvrsSubnames[] =
426 "Hardware Definition Block",
427 "Memory Definition Block",
428 "Unknown Subtable Type" /* Reserved */
431 static const char *AcpiDmLpitSubnames[] =
433 "Native C-state Idle Structure",
434 "Unknown Subtable Type" /* Reserved */
437 #define ACPI_FADT_PM_RESERVED 9
439 static const char *AcpiDmFadtProfiles[] =
448 "Performance Server",
450 "Unknown Profile Type"
453 #define ACPI_GAS_WIDTH_RESERVED 5
455 static const char *AcpiDmGasAccessWidth[] =
462 "Unknown Width Encoding"
466 /*******************************************************************************
468 * ACPI Table Data, indexed by signature.
470 * Each entry contains: Signature, Table Info, Handler, DtHandler,
471 * Template, Description
473 * Simple tables have only a TableInfo structure, complex tables have a
474 * handler. This table must be NULL terminated. RSDP and FACS are
475 * special-cased elsewhere.
477 * Note: Any tables added here should be duplicated within AcpiSupportedTables
478 * in the file common/ahtable.c
480 ******************************************************************************/
482 const ACPI_DMTABLE_DATA AcpiDmTableData[] =
484 {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
485 {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
486 {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt},
487 {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot},
488 {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
489 {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
490 {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2},
491 {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp},
492 {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar},
493 {ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm},
494 {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt},
495 {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj},
496 {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst},
497 {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt},
498 {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt},
499 {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt},
500 {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest},
501 {ACPI_SIG_HMAT, NULL, AcpiDmDumpHmat, DtCompileHmat, TemplateHmat},
502 {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet},
503 {ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort},
504 {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs},
505 {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit},
506 {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt},
507 {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg},
508 {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi},
509 {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst},
510 {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
511 {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
512 {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr},
513 {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
514 {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
515 {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
516 {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
517 {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
518 {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
519 {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
520 {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
521 {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
522 {ACPI_SIG_SDEI, AcpiDmTableInfoSdei, NULL, NULL, TemplateSdei},
523 {ACPI_SIG_SDEV, AcpiDmTableInfoSdev, AcpiDmDumpSdev, DtCompileSdev, TemplateSdev},
524 {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic},
525 {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit},
526 {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr},
527 {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi},
528 {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
529 {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
530 {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
531 {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
532 {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
533 {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc, AcpiDmDumpVrtc, DtCompileVrtc, TemplateVrtc},
534 {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet},
535 {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat},
536 {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
537 {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt},
538 {ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt},
539 {ACPI_SIG_WSMT, AcpiDmTableInfoWsmt, NULL, NULL, TemplateWsmt},
540 {ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv},
541 {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt},
542 {NULL, NULL, NULL, NULL, NULL}
546 /*******************************************************************************
548 * FUNCTION: AcpiDmGenerateChecksum
550 * PARAMETERS: Table - Pointer to table to be checksummed
551 * Length - Length of the table
552 * OriginalChecksum - Value of the checksum field
554 * RETURN: 8 bit checksum of buffer
556 * DESCRIPTION: Computes an 8 bit checksum of the table.
558 ******************************************************************************/
561 AcpiDmGenerateChecksum (
564 UINT8 OriginalChecksum)
569 /* Sum the entire table as-is */
571 Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
573 /* Subtract off the existing checksum value in the table */
575 Checksum = (UINT8) (Checksum - OriginalChecksum);
577 /* Compute the final checksum */
579 Checksum = (UINT8) (0 - Checksum);
584 /*******************************************************************************
586 * FUNCTION: AcpiDmGetTableData
588 * PARAMETERS: Signature - ACPI signature (4 chars) to match
590 * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
592 * DESCRIPTION: Find a match in the global table of supported ACPI tables
594 ******************************************************************************/
596 const ACPI_DMTABLE_DATA *
600 const ACPI_DMTABLE_DATA *Info;
603 for (Info = AcpiDmTableData; Info->Signature; Info++)
605 if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature))
615 /*******************************************************************************
617 * FUNCTION: AcpiDmDumpDataTable
619 * PARAMETERS: Table - An ACPI table
623 * DESCRIPTION: Format the contents of an ACPI data table (any table other
624 * than an SSDT or DSDT that does not contain executable AML code)
626 ******************************************************************************/
629 AcpiDmDumpDataTable (
630 ACPI_TABLE_HEADER *Table)
633 const ACPI_DMTABLE_DATA *TableData;
637 /* Ignore tables that contain AML */
639 if (AcpiUtIsAmlTable (Table))
641 if (AslGbl_VerboseTemplates)
643 /* Dump the raw table data */
645 Length = Table->Length;
647 AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
648 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
649 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
650 Length, DB_BYTE_DISPLAY, 0);
651 AcpiOsPrintf (" */\n");
657 * Handle tables that don't use the common ACPI table header structure.
658 * Currently, these are the FACS, RSDP, and S3PT.
660 if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
662 Length = Table->Length;
663 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
664 if (ACPI_FAILURE (Status))
669 else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
671 Length = AcpiDmDumpRsdp (Table);
673 else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT))
675 Length = AcpiDmDumpS3pt (Table);
680 * All other tables must use the common ACPI table header, dump it now
682 Length = Table->Length;
683 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
684 if (ACPI_FAILURE (Status))
690 /* Match signature and dispatch appropriately */
692 TableData = AcpiDmGetTableData (Table->Signature);
695 if (!strncmp (Table->Signature, "OEM", 3))
697 AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
702 AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
705 fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
708 if (!AcpiGbl_ForceAmlDisassembly)
710 fprintf (stderr, "decoding ACPI table header only\n");
714 fprintf (stderr, "assuming table contains valid AML code\n");
718 else if (TableData->TableHandler)
720 /* Complex table, has a handler */
722 TableData->TableHandler (Table);
724 else if (TableData->TableInfo)
726 /* Simple table, just walk the info table */
728 Status = AcpiDmDumpTable (Length, 0, Table, 0, TableData->TableInfo);
729 if (ACPI_FAILURE (Status))
736 if (!AslGbl_DoTemplates || AslGbl_VerboseTemplates)
738 /* Dump the raw table data */
740 AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
741 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
742 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
743 Length, DB_BYTE_DISPLAY, 0);
748 /*******************************************************************************
750 * FUNCTION: AcpiDmLineHeader
752 * PARAMETERS: Offset - Current byte offset, from table start
753 * ByteLength - Length of the field in bytes, 0 for flags
754 * Name - Name of this field
758 * DESCRIPTION: Utility routines for formatting output lines. Displays the
759 * current table offset in hex and decimal, the field length,
760 * and the field name.
762 ******************************************************************************/
771 /* Allow a null name for fields that span multiple lines (large buffers) */
778 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
782 AcpiOsPrintf ("[%.4d] %34s : ", ByteLength, Name);
788 AcpiOsPrintf ("%41s : ", Name);
792 AcpiOsPrintf ("%41s ", Name);
796 else /* Normal disassembler or verbose template */
800 AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
801 Offset, Offset, ByteLength, Name);
807 AcpiOsPrintf ("%44s : ", Name);
811 AcpiOsPrintf ("%44s ", Name);
825 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
829 AcpiOsPrintf ("[%.4d] %30s %3d : ",
830 ByteLength, Name, Value);
834 AcpiOsPrintf ("%36s % 3d : ",
838 else /* Normal disassembler or verbose template */
842 AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
843 Offset, Offset, ByteLength, Name, Value);
847 AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
848 Offset, Offset, Name, Value);
854 /*******************************************************************************
856 * FUNCTION: AcpiDmDumpTable
858 * PARAMETERS: TableLength - Length of the entire ACPI table
859 * TableOffset - Starting offset within the table for this
860 * sub-descriptor (0 if main table)
861 * Table - The ACPI table
862 * SubtableLength - Length of this sub-descriptor
863 * Info - Info table for this ACPI table
867 * DESCRIPTION: Display ACPI table contents by walking the Info table.
869 * Note: This function must remain in sync with DtGetFieldLength.
871 ******************************************************************************/
878 UINT32 SubtableLength,
879 ACPI_DMTABLE_INFO *Info)
882 UINT32 CurrentOffset;
888 const AH_TABLE *TableData;
890 BOOLEAN LastOutputBlankLine = FALSE;
892 char RepairedName[8];
897 AcpiOsPrintf ("Display not implemented\n");
898 return (AE_NOT_IMPLEMENTED);
901 /* Walk entire Info table; Null name terminates */
903 for (; Info->Name; Info++)
906 * Target points to the field within the ACPI Table. CurrentOffset is
907 * the offset of the field from the start of the main table.
909 Target = ACPI_ADD_PTR (UINT8, Table, Info->Offset);
910 CurrentOffset = TableOffset + Info->Offset;
912 /* Check for beyond subtable end or (worse) beyond EOT */
914 if (SubtableLength && (Info->Offset >= SubtableLength))
917 "/**** ACPI subtable terminates early - "
918 "may be older version (dump table) */\n");
920 /* Move on to next subtable */
925 if (CurrentOffset >= TableLength)
928 "/**** ACPI table terminates "
929 "in the middle of a data structure! (dump table) */\n");
930 return (AE_BAD_DATA);
933 /* Generate the byte length for this field */
935 switch (Info->Opcode)
938 case ACPI_DMT_CHKSUM:
939 case ACPI_DMT_SPACEID:
940 case ACPI_DMT_ACCWIDTH:
950 case ACPI_DMT_HESTNTYP:
951 case ACPI_DMT_FADTPM:
952 case ACPI_DMT_EINJACT:
953 case ACPI_DMT_EINJINST:
954 case ACPI_DMT_ERSTACT:
955 case ACPI_DMT_ERSTINST:
956 case ACPI_DMT_DMAR_SCOPE:
961 case ACPI_DMT_UINT16:
970 case ACPI_DMT_UINT24:
975 case ACPI_DMT_UINT32:
984 case ACPI_DMT_UINT40:
989 case ACPI_DMT_UINT48:
995 case ACPI_DMT_UINT56:
1001 case ACPI_DMT_UINT64:
1002 case ACPI_DMT_NAME8:
1007 case ACPI_DMT_BUF10:
1012 case ACPI_DMT_BUF12:
1017 case ACPI_DMT_BUF16:
1023 case ACPI_DMT_BUF128:
1028 case ACPI_DMT_UNICODE:
1029 case ACPI_DMT_BUFFER:
1030 case ACPI_DMT_RAW_BUFFER:
1032 ByteLength = SubtableLength;
1035 case ACPI_DMT_STRING:
1037 ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1;
1042 if (!LastOutputBlankLine)
1044 AcpiOsPrintf ("\n");
1045 LastOutputBlankLine = TRUE;
1048 ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
1051 case ACPI_DMT_HESTNTFY:
1053 if (!LastOutputBlankLine)
1055 AcpiOsPrintf ("\n");
1056 LastOutputBlankLine = TRUE;
1059 ByteLength = sizeof (ACPI_HEST_NOTIFY);
1062 case ACPI_DMT_IORTMEM:
1064 if (!LastOutputBlankLine)
1066 LastOutputBlankLine = FALSE;
1069 ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
1078 /* Check if we are beyond a subtable, or (worse) beyond EOT */
1080 if (CurrentOffset + ByteLength > TableLength)
1085 "/**** ACPI subtable terminates early - "
1086 "may be older version (dump table) */\n");
1088 /* Move on to next subtable */
1094 "/**** ACPI table terminates "
1095 "in the middle of a data structure! */\n");
1096 return (AE_BAD_DATA);
1099 if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
1101 AcpiOsPrintf ("%s", Info->Name);
1105 /* Start a new line and decode the opcode */
1107 AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
1109 switch (Info->Opcode)
1111 /* Single-bit Flag fields. Note: Opcode is the bit position */
1113 case ACPI_DMT_FLAG0:
1114 case ACPI_DMT_FLAG1:
1115 case ACPI_DMT_FLAG2:
1116 case ACPI_DMT_FLAG3:
1117 case ACPI_DMT_FLAG4:
1118 case ACPI_DMT_FLAG5:
1119 case ACPI_DMT_FLAG6:
1120 case ACPI_DMT_FLAG7:
1122 AcpiOsPrintf ("%1.1X\n", (*Target >> Info->Opcode) & 0x01);
1125 /* 2-bit Flag fields */
1127 case ACPI_DMT_FLAGS0:
1129 AcpiOsPrintf ("%1.1X\n", *Target & 0x03);
1132 case ACPI_DMT_FLAGS1:
1134 AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03);
1137 case ACPI_DMT_FLAGS2:
1139 AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
1142 case ACPI_DMT_FLAGS4:
1144 AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
1147 case ACPI_DMT_FLAGS4_0:
1149 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target) & 0x0F);
1152 case ACPI_DMT_FLAGS4_4:
1154 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 4) & 0x0F);
1157 case ACPI_DMT_FLAGS4_8:
1159 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 8) & 0x0F);
1162 case ACPI_DMT_FLAGS4_12:
1164 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 12) & 0x0F);
1167 case ACPI_DMT_FLAGS16_16:
1169 AcpiOsPrintf ("%4.4X\n", (*(UINT32 *)Target >> 16) & 0xFFFF);
1172 /* Integer Data Types */
1174 case ACPI_DMT_UINT8:
1175 case ACPI_DMT_UINT16:
1176 case ACPI_DMT_UINT24:
1177 case ACPI_DMT_UINT32:
1178 case ACPI_DMT_UINT40:
1179 case ACPI_DMT_UINT48:
1180 case ACPI_DMT_UINT56:
1181 case ACPI_DMT_UINT64:
1183 * Dump bytes - high byte first, low byte last.
1184 * Note: All ACPI tables are little-endian.
1187 for (Temp8 = (UINT8) ByteLength; Temp8 > 0; Temp8--)
1189 AcpiOsPrintf ("%2.2X", Target[Temp8 - 1]);
1190 Value |= Target[Temp8 - 1];
1194 if (!Value && (Info->Flags & DT_DESCRIBES_OPTIONAL))
1196 AcpiOsPrintf (" [Optional field not present]");
1199 AcpiOsPrintf ("\n");
1203 case ACPI_DMT_BUF10:
1204 case ACPI_DMT_BUF12:
1205 case ACPI_DMT_BUF16:
1206 case ACPI_DMT_BUF128:
1208 * Buffer: Size depends on the opcode and was set above.
1209 * Each hex byte is separated with a space.
1210 * Multiple lines are separated by line continuation char.
1212 for (Temp16 = 0; Temp16 < ByteLength; Temp16++)
1214 AcpiOsPrintf ("%2.2X", Target[Temp16]);
1215 if ((UINT32) (Temp16 + 1) < ByteLength)
1217 if ((Temp16 > 0) && (!((Temp16+1) % 16)))
1219 AcpiOsPrintf (" \\\n"); /* Line continuation */
1220 AcpiDmLineHeader (0, 0, NULL);
1229 AcpiOsPrintf ("\n");
1234 /* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
1236 (void) AuConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
1238 AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
1241 case ACPI_DMT_STRING:
1243 AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target));
1246 /* Fixed length ASCII name fields */
1250 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1251 AcpiOsPrintf ("\"%.4s\" ", RepairedName);
1253 TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
1256 AcpiOsPrintf (STRING_FORMAT, TableData->Description);
1260 AcpiOsPrintf ("\n");
1264 case ACPI_DMT_NAME4:
1266 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1267 AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
1270 case ACPI_DMT_NAME6:
1272 AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
1273 AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
1276 case ACPI_DMT_NAME8:
1278 AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
1279 AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
1282 /* Special Data Types */
1284 case ACPI_DMT_CHKSUM:
1286 /* Checksum, display and validate */
1288 AcpiOsPrintf ("%2.2X", *Target);
1289 Temp8 = AcpiDmGenerateChecksum (Table,
1290 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
1291 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
1293 if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
1296 " /* Incorrect checksum, should be %2.2X */", Temp8);
1299 AcpiOsPrintf ("\n");
1302 case ACPI_DMT_SPACEID:
1304 /* Address Space ID */
1306 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiUtGetRegionName (*Target));
1309 case ACPI_DMT_ACCWIDTH:
1311 /* Encoded Access Width */
1314 if (Temp8 > ACPI_GAS_WIDTH_RESERVED)
1316 Temp8 = ACPI_GAS_WIDTH_RESERVED;
1319 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
1324 /* Generic Address Structure */
1326 AcpiOsPrintf (STRING_FORMAT, "Generic Address Structure");
1327 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1328 sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas);
1329 if (ACPI_FAILURE (Status))
1334 AcpiOsPrintf ("\n");
1335 LastOutputBlankLine = TRUE;
1340 /* ASF subtable types */
1342 Temp16 = (UINT16) ((*Target) & 0x7F); /* Top bit can be zero or one */
1343 if (Temp16 > ACPI_ASF_TYPE_RESERVED)
1345 Temp16 = ACPI_ASF_TYPE_RESERVED;
1348 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]);
1353 /* DMAR subtable types */
1355 Temp16 = ACPI_GET16 (Target);
1356 if (Temp16 > ACPI_DMAR_TYPE_RESERVED)
1358 Temp16 = ACPI_DMAR_TYPE_RESERVED;
1361 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1362 AcpiDmDmarSubnames[Temp16]);
1365 case ACPI_DMT_DMAR_SCOPE:
1367 /* DMAR device scope types */
1370 if (Temp8 > ACPI_DMAR_SCOPE_TYPE_RESERVED)
1372 Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
1375 AcpiOsPrintf (UINT8_FORMAT, *Target,
1376 AcpiDmDmarScope[Temp8]);
1379 case ACPI_DMT_EINJACT:
1381 /* EINJ Action types */
1384 if (Temp8 > ACPI_EINJ_ACTION_RESERVED)
1386 Temp8 = ACPI_EINJ_ACTION_RESERVED;
1389 AcpiOsPrintf (UINT8_FORMAT, *Target,
1390 AcpiDmEinjActions[Temp8]);
1393 case ACPI_DMT_EINJINST:
1395 /* EINJ Instruction types */
1398 if (Temp8 > ACPI_EINJ_INSTRUCTION_RESERVED)
1400 Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
1403 AcpiOsPrintf (UINT8_FORMAT, *Target,
1404 AcpiDmEinjInstructions[Temp8]);
1407 case ACPI_DMT_ERSTACT:
1409 /* ERST Action types */
1412 if (Temp8 > ACPI_ERST_ACTION_RESERVED)
1414 Temp8 = ACPI_ERST_ACTION_RESERVED;
1417 AcpiOsPrintf (UINT8_FORMAT, *Target,
1418 AcpiDmErstActions[Temp8]);
1421 case ACPI_DMT_ERSTINST:
1423 /* ERST Instruction types */
1426 if (Temp8 > ACPI_ERST_INSTRUCTION_RESERVED)
1428 Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
1431 AcpiOsPrintf (UINT8_FORMAT, *Target,
1432 AcpiDmErstInstructions[Temp8]);
1437 /* GTDT subtable types */
1440 if (Temp8 > ACPI_GTDT_TYPE_RESERVED)
1442 Temp8 = ACPI_GTDT_TYPE_RESERVED;
1445 AcpiOsPrintf (UINT8_FORMAT, *Target,
1446 AcpiDmGtdtSubnames[Temp8]);
1451 /* HEST subtable types */
1453 Temp16 = ACPI_GET16 (Target);
1454 if (Temp16 > ACPI_HEST_TYPE_RESERVED)
1456 Temp16 = ACPI_HEST_TYPE_RESERVED;
1459 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1460 AcpiDmHestSubnames[Temp16]);
1463 case ACPI_DMT_HESTNTFY:
1465 AcpiOsPrintf (STRING_FORMAT,
1466 "Hardware Error Notification Structure");
1468 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1469 sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
1470 if (ACPI_FAILURE (Status))
1475 AcpiOsPrintf ("\n");
1476 LastOutputBlankLine = TRUE;
1479 case ACPI_DMT_HESTNTYP:
1481 /* HEST Notify types */
1484 if (Temp8 > ACPI_HEST_NOTIFY_RESERVED)
1486 Temp8 = ACPI_HEST_NOTIFY_RESERVED;
1489 AcpiOsPrintf (UINT8_FORMAT, *Target,
1490 AcpiDmHestNotifySubnames[Temp8]);
1495 /* HMAT subtable types */
1498 if (Temp16 > ACPI_HMAT_TYPE_RESERVED)
1500 Temp16 = ACPI_HMAT_TYPE_RESERVED;
1503 AcpiOsPrintf (UINT16_FORMAT, *Target,
1504 AcpiDmHmatSubnames[Temp16]);
1507 case ACPI_DMT_IORTMEM:
1509 AcpiOsPrintf (STRING_FORMAT,
1510 "IORT Memory Access Properties");
1512 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1513 sizeof (ACPI_IORT_MEMORY_ACCESS), AcpiDmTableInfoIortAcc);
1514 if (ACPI_FAILURE (Status))
1519 LastOutputBlankLine = TRUE;
1524 /* MADT subtable types */
1527 if (Temp8 > ACPI_MADT_TYPE_RESERVED)
1529 Temp8 = ACPI_MADT_TYPE_RESERVED;
1532 AcpiOsPrintf (UINT8_FORMAT, *Target,
1533 AcpiDmMadtSubnames[Temp8]);
1538 /* NFIT subtable types */
1540 Temp16 = ACPI_GET16 (Target);
1541 if (Temp16 > ACPI_NFIT_TYPE_RESERVED)
1543 Temp16 = ACPI_NFIT_TYPE_RESERVED;
1546 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1547 AcpiDmNfitSubnames[Temp16]);
1552 /* PCCT subtable types */
1555 if (Temp8 > ACPI_PCCT_TYPE_RESERVED)
1557 Temp8 = ACPI_PCCT_TYPE_RESERVED;
1560 AcpiOsPrintf (UINT8_FORMAT, *Target,
1561 AcpiDmPcctSubnames[Temp8]);
1566 /* PMTT subtable types */
1569 if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
1571 Temp8 = ACPI_PMTT_TYPE_RESERVED;
1574 AcpiOsPrintf (UINT8_FORMAT, *Target,
1575 AcpiDmPmttSubnames[Temp8]);
1580 /* PPTT subtable types */
1583 if (Temp8 > ACPI_PPTT_TYPE_RESERVED)
1585 Temp8 = ACPI_PPTT_TYPE_RESERVED;
1588 AcpiOsPrintf (UINT8_FORMAT, *Target,
1589 AcpiDmPpttSubnames[Temp8]);
1592 case ACPI_DMT_UNICODE:
1594 if (ByteLength == 0)
1596 AcpiOsPrintf ("/* Zero-length Data */\n");
1600 AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength);
1603 case ACPI_DMT_RAW_BUFFER:
1605 if (ByteLength == 0)
1607 AcpiOsPrintf ("/* Zero-length Data */\n");
1611 AcpiDmDumpBuffer (Table, CurrentOffset, ByteLength,
1612 CurrentOffset, NULL);
1617 /* SDEV subtable types */
1620 if (Temp8 > ACPI_SDEV_TYPE_RESERVED)
1622 Temp8 = ACPI_SDEV_TYPE_RESERVED;
1625 AcpiOsPrintf (UINT8_FORMAT, *Target,
1626 AcpiDmSdevSubnames[Temp8]);
1631 /* SRAT subtable types */
1634 if (Temp8 > ACPI_SRAT_TYPE_RESERVED)
1636 Temp8 = ACPI_SRAT_TYPE_RESERVED;
1639 AcpiOsPrintf (UINT8_FORMAT, *Target,
1640 AcpiDmSratSubnames[Temp8]);
1645 /* TPM2 Start Method types */
1648 if (Temp8 > ACPI_TPM2_RESERVED)
1650 Temp8 = ACPI_TPM2_RESERVED;
1653 AcpiOsPrintf (UINT8_FORMAT, *Target,
1654 AcpiDmTpm2Subnames[Temp8]);
1658 case ACPI_DMT_FADTPM:
1660 /* FADT Preferred PM Profile names */
1663 if (Temp8 > ACPI_FADT_PM_RESERVED)
1665 Temp8 = ACPI_FADT_PM_RESERVED;
1668 AcpiOsPrintf (UINT8_FORMAT, *Target,
1669 AcpiDmFadtProfiles[Temp8]);
1674 /* IVRS subtable types */
1679 case ACPI_IVRS_TYPE_HARDWARE1:
1680 case ACPI_IVRS_TYPE_HARDWARE2:
1682 Name = AcpiDmIvrsSubnames[0];
1685 case ACPI_IVRS_TYPE_MEMORY1:
1686 case ACPI_IVRS_TYPE_MEMORY2:
1687 case ACPI_IVRS_TYPE_MEMORY3:
1689 Name = AcpiDmIvrsSubnames[1];
1694 Name = AcpiDmIvrsSubnames[2];
1698 AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
1703 /* LPIT subtable types */
1705 Temp32 = ACPI_GET32 (Target);
1706 if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
1708 Temp32 = ACPI_LPIT_TYPE_RESERVED;
1711 AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
1712 AcpiDmLpitSubnames[Temp32]);
1721 ACPI_ERROR ((AE_INFO,
1722 "**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
1723 return (AE_SUPPORT);
1727 if (TableOffset && !SubtableLength)
1730 * If this table is not the main table, the subtable must have a
1733 AcpiOsPrintf ("Invalid zero length subtable\n");
1734 return (AE_BAD_DATA);