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 *AcpiDmAestResourceNames[] =
182 "Unknown Resource Type" /* Reserved */
185 static const char *AcpiDmAestSubnames[] =
187 "Processor Error Node",
190 "Vendor-defined Error Node",
192 "Unknown Subtable Type" /* Reserved */
195 static const char *AcpiDmAestCacheNames[] =
200 "Unknown Cache Type" /* Reserved */
203 static const char *AcpiDmAestGicNames[] =
209 "Unknown GIC Interface Type" /* Reserved */
212 static const char *AcpiDmAestXfaceNames[] =
214 "System Register Interface",
215 "Memory Mapped Interface",
216 "Unknown Interface Type" /* Reserved */
219 static const char *AcpiDmAestXruptNames[] =
221 "Fault Handling Interrupt",
222 "Error Recovery Interrupt",
223 "Unknown Interrupt Type" /* Reserved */
226 static const char *AcpiDmAsfSubnames[] =
230 "ASF Remote Control",
231 "ASF RMCP Boot Options",
233 "Unknown Subtable Type" /* Reserved */
236 static const char *AcpiDmCedtSubnames[] =
238 "CXL Host Bridge Structure",
239 "CXL Fixed Memory Window Structure",
240 "Unknown Subtable Type" /* Reserved */
243 static const char *AcpiDmDmarSubnames[] =
245 "Hardware Unit Definition",
246 "Reserved Memory Region",
247 "Root Port ATS Capability",
248 "Remapping Hardware Static Affinity",
249 "ACPI Namespace Device Declaration",
250 "Unknown Subtable Type" /* Reserved */
253 static const char *AcpiDmDmarScope[] =
256 "PCI Endpoint Device",
259 "Message-capable HPET Device",
261 "Unknown Scope Type" /* Reserved */
264 static const char *AcpiDmEinjActions[] =
273 "Get Command Status",
274 "Set Error Type With Address",
275 "Get Execute Timings",
279 static const char *AcpiDmEinjInstructions[] =
282 "Read Register Value",
284 "Write Register Value",
287 "Unknown Instruction"
290 static const char *AcpiDmErstActions[] =
292 "Begin Write Operation",
293 "Begin Read Operation",
294 "Begin Clear Operation",
299 "Get Command Status",
300 "Get Record Identifier",
301 "Set Record Identifier",
304 "Unused/Unknown Action",
305 "Get Error Address Range",
306 "Get Error Address Length",
307 "Get Error Attributes",
312 static const char *AcpiDmErstInstructions[] =
315 "Read Register Value",
317 "Write Register Value",
330 "Set Source Address",
331 "Set Destination Address",
333 "Unknown Instruction"
336 static const char *AcpiDmGtdtSubnames[] =
338 "Generic Timer Block",
339 "Generic Watchdog Timer",
340 "Unknown Subtable Type" /* Reserved */
343 static const char *AcpiDmHestSubnames[] =
345 "IA-32 Machine Check Exception",
346 "IA-32 Corrected Machine Check",
347 "IA-32 Non-Maskable Interrupt",
348 "Unknown Subtable Type", /* 3 - Reserved */
349 "Unknown Subtable Type", /* 4 - Reserved */
350 "Unknown Subtable Type", /* 5 - Reserved */
351 "PCI Express Root Port AER",
352 "PCI Express AER (AER Endpoint)",
353 "PCI Express/PCI-X Bridge AER",
354 "Generic Hardware Error Source",
355 "Generic Hardware Error Source V2",
356 "IA-32 Deferred Machine Check",
357 "Unknown Subtable Type" /* Reserved */
360 static const char *AcpiDmHestNotifySubnames[] =
363 "External Interrupt",
367 "CMCI", /* ACPI 5.0 */
368 "MCE", /* ACPI 5.0 */
369 "GPIO", /* ACPI 6.0 */
370 "SEA", /* ACPI 6.1 */
371 "SEI", /* ACPI 6.1 */
372 "GSIV", /* ACPI 6.1 */
373 "Software Delegated Exception", /* ACPI 6.2 */
374 "Unknown Notify Type" /* Reserved */
377 static const char *AcpiDmHmatSubnames[] =
379 "Memory Proximity Domain Attributes",
380 "System Locality Latency and Bandwidth Information",
381 "Memory Side Cache Information",
382 "Unknown Structure Type" /* Reserved */
385 static const char *AcpiDmMadtSubnames[] =
387 "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
388 "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
389 "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
390 "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
391 "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
392 "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
393 "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
394 "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
395 "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
396 "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
397 "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
398 "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
399 "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */
400 "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
401 "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
402 "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
403 "Mutiprocessor Wakeup", /* ACPI_MADT_TYPE_MULTIPROC_WAKEUP */
404 "Unknown Subtable Type" /* Reserved */
407 static const char *AcpiDmNfitSubnames[] =
409 "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */
410 "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */
411 "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */
412 "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */
413 "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
414 "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
415 "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
416 "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
417 "Unknown Subtable Type" /* Reserved */
420 static const char *AcpiDmNhltLinkTypeNames[] =
422 "Reserved for HD-Audio", /* ACPI_NHLT_RESERVED_HD_AUDIO */
423 "Reserved for DSP", /* ACPI_NHLT_RESERVED_DSP */
424 "Type PDM", /* ACPI_NHLT_PDM */
425 "Type SSP", /* ACPI_NHLT_SSP */
426 "Reserved for SlimBus", /* ACPI_NHLT_RESERVED_SLIMBUS */
427 "Reserved for SoundWire", /* ACPI_NHLT_RESERVED_SOUNDWIRE */
428 "Unknown Link Type" /* Reserved */
431 static const char *AcpiDmNhltDirectionNames[] =
433 "Render", /* ACPI_NHLT_DIR_RENDER */
434 "Capture", /* ACPI_NHLT_DIR_CAPTURE */
435 "Render with Loopback", /* ACPI_NHLT_DIR_RENDER_LOOPBACK */
436 "Feedback for Render", /* ACPI_NHLT_DIR_RENDER_FEEDBACK */
437 "Unknown Direction" /* Reserved */
440 static const char *AcpiDmPcctSubnames[] =
442 "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
443 "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
444 "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
445 "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
446 "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
447 "HW Registers based Comm Subspace", /* ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE */
448 "Unknown Subtable Type" /* Reserved */
451 static const char *AcpiDmPhatSubnames[] =
453 "Firmware Version Data", /* ACPI_PHAT_TYPE_FW_VERSION_DATA */
454 "Firmware Health Data", /* ACPI_PHAT_TYPE_FW_HEALTH_DATA */
455 "Unknown Subtable Type" /* Reserved */
458 static const char *AcpiDmPmttSubnames[] =
460 "Socket", /* ACPI_PMTT_TYPE_SOCKET */
461 "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
462 "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
463 "Unknown Subtable Type", /* Reserved */
464 "Vendor Specific" /* ACPI_PMTT_TYPE_VENDOR */
467 static const char *AcpiDmPpttSubnames[] =
469 "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
470 "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
471 "ID", /* ACPI_PPTT_TYPE_ID */
472 "Unknown Subtable Type" /* Reserved */
475 static const char *AcpiDmRgrtSubnames[] =
477 "Unknown/Reserved Image Type", /* ACPI_RGRT_TYPE_RESERVED0 */
478 "Type PNG" /* ACPI_RGRT_IMAGE_TYPE_PNG */
481 static const char *AcpiDmSdevSubnames[] =
483 "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
484 "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
485 "Unknown Subtable Type" /* Reserved */
488 static const char *AcpiDmSratSubnames[] =
490 "Processor Local APIC/SAPIC Affinity",
492 "Processor Local x2APIC Affinity",
494 "GIC ITS Affinity", /* Acpi 6.2 */
495 "Generic Initiator Affinity", /* Acpi 6.3 */
496 "Generic Port Affinity", /* Acpi 6.4 */
497 "Unknown Subtable Type" /* Reserved */
500 static const char *AcpiDmTpm2Subnames[] =
502 "Illegal Start Method value",
509 "Command Response Buffer",
510 "Command Response Buffer with ACPI Start Method",
513 "Command Response Buffer with ARM SMC",
514 "Unknown Subtable Type" /* Reserved */
517 static const char *AcpiDmIvrsSubnames[] =
519 "Hardware Definition Block (IVHD)",
520 "Hardware Definition Block - Mixed Format (IVHD)",
521 "Memory Definition Block (IVMD)",
522 "Unknown/Reserved Subtable Type" /* Reserved */
525 static const char *AcpiDmIvrsDevEntryNames[] =
527 "Unknown/Reserved Device Entry Type", /* 0- Reserved */
528 "Device Entry: Select All Devices", /* 1 */
529 "Device Entry: Select One Device", /* 2 */
530 "Device Entry: Start of Range", /* 3 */
531 "Device Entry: End of Range", /* 4 */
532 "Device Entry: Alias Select", /* 66 */
533 "Device Entry: Alias Start of Range", /* 67 */
534 "Unknown/Reserved Device Entry Type", /* 68- Reserved */
535 "Unknown/Reserved Device Entry Type", /* 69- Reserved */
536 "Device Entry: Extended Select", /* 70 */
537 "Device Entry: Extended Start of Range", /* 71 */
538 "Device Entry: Special Device", /* 72 */
539 "Device Entry: ACPI HID Named Device", /* 240 */
540 "Unknown/Reserved Device Entry Type" /* Reserved */
543 static const char *AcpiDmLpitSubnames[] =
545 "Native C-state Idle Structure",
546 "Unknown Subtable Type" /* Reserved */
549 static const char *AcpiDmViotSubnames[] =
551 "Unknown Subtable Type", /* 0 -Reserved */
556 "Unknown Subtable Type" /* Reserved */
559 #define ACPI_FADT_PM_RESERVED 9
561 static const char *AcpiDmFadtProfiles[] =
570 "Performance Server",
572 "Unknown Profile Type"
575 #define ACPI_GAS_WIDTH_RESERVED 5
577 static const char *AcpiDmGasAccessWidth[] =
584 "Unknown Width Encoding"
588 /*******************************************************************************
590 * ACPI Table Data, indexed by signature.
592 * Each entry contains: Signature, Table Info, Handler, DtHandler,
593 * Template, Description
595 * Simple tables have only a TableInfo structure, complex tables have a
596 * handler. This table must be NULL terminated. RSDP and FACS are
597 * special-cased elsewhere.
599 * Note: Any tables added here should be duplicated within
600 * AcpiGbl_SupportedTables in the file common/ahtable.c
602 ******************************************************************************/
604 const ACPI_DMTABLE_DATA AcpiDmTableData[] =
606 {ACPI_SIG_AEST, NULL, AcpiDmDumpAest, DtCompileAest, TemplateAest},
607 {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
608 {ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat},
609 {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
610 {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt},
611 {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot},
612 {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt},
613 {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
614 {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
615 {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2},
616 {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp},
617 {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar},
618 {ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm},
619 {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt},
620 {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj},
621 {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst},
622 {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt},
623 {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt},
624 {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt},
625 {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest},
626 {ACPI_SIG_HMAT, NULL, AcpiDmDumpHmat, DtCompileHmat, TemplateHmat},
627 {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet},
628 {ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort},
629 {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs},
630 {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit},
631 {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt},
632 {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg},
633 {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi},
634 {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst},
635 {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
636 {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
637 {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
638 {ACPI_SIG_NHLT, AcpiDmTableInfoNhlt, AcpiDmDumpNhlt, NULL, NULL},
639 {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
640 {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
641 {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat},
642 {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
643 {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
644 {ACPI_SIG_PRMT, NULL, AcpiDmDumpPrmt, DtCompilePrmt, TemplatePrmt},
645 {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
646 {ACPI_SIG_RGRT, NULL, AcpiDmDumpRgrt, DtCompileRgrt, TemplateRgrt},
647 {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
648 {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
649 {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
650 {ACPI_SIG_SDEI, AcpiDmTableInfoSdei, NULL, NULL, TemplateSdei},
651 {ACPI_SIG_SDEV, AcpiDmTableInfoSdev, AcpiDmDumpSdev, DtCompileSdev, TemplateSdev},
652 {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic},
653 {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit},
654 {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr},
655 {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi},
656 {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
657 {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
658 {ACPI_SIG_SVKL, AcpiDmTableInfoSvkl, AcpiDmDumpSvkl, DtCompileSvkl, TemplateSvkl},
659 {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
660 {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
661 {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
662 {ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot},
663 {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet},
664 {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat},
665 {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
666 {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt},
667 {ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt},
668 {ACPI_SIG_WSMT, AcpiDmTableInfoWsmt, NULL, NULL, TemplateWsmt},
669 {ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv},
670 {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt},
671 {NULL, NULL, NULL, NULL, NULL}
675 /*******************************************************************************
677 * FUNCTION: AcpiDmGenerateChecksum
679 * PARAMETERS: Table - Pointer to table to be checksummed
680 * Length - Length of the table
681 * OriginalChecksum - Value of the checksum field
683 * RETURN: 8 bit checksum of buffer
685 * DESCRIPTION: Computes an 8 bit checksum of the table.
687 ******************************************************************************/
690 AcpiDmGenerateChecksum (
693 UINT8 OriginalChecksum)
698 /* Sum the entire table as-is */
700 Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
702 /* Subtract off the existing checksum value in the table */
704 Checksum = (UINT8) (Checksum - OriginalChecksum);
706 /* Compute the final checksum */
708 Checksum = (UINT8) (0 - Checksum);
713 /*******************************************************************************
715 * FUNCTION: AcpiDmGetTableData
717 * PARAMETERS: Signature - ACPI signature (4 chars) to match
719 * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
721 * DESCRIPTION: Find a match in the global table of supported ACPI tables
723 ******************************************************************************/
725 const ACPI_DMTABLE_DATA *
729 const ACPI_DMTABLE_DATA *Info;
732 for (Info = AcpiDmTableData; Info->Signature; Info++)
734 if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature))
744 /*******************************************************************************
746 * FUNCTION: AcpiDmDumpDataTable
748 * PARAMETERS: Table - An ACPI table
752 * DESCRIPTION: Format the contents of an ACPI data table (any table other
753 * than an SSDT or DSDT that does not contain executable AML code)
755 ******************************************************************************/
758 AcpiDmDumpDataTable (
759 ACPI_TABLE_HEADER *Table)
762 const ACPI_DMTABLE_DATA *TableData;
766 /* Ignore tables that contain AML */
768 if (AcpiUtIsAmlTable (Table))
770 if (AslGbl_VerboseTemplates)
772 /* Dump the raw table data */
774 Length = Table->Length;
776 AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
777 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
778 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
779 Length, DB_BYTE_DISPLAY, 0);
780 AcpiOsPrintf (" */\n");
786 * Handle tables that don't use the common ACPI table header structure.
787 * Currently, these are the FACS, RSDP, and S3PT.
789 if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
791 Length = Table->Length;
792 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
793 if (ACPI_FAILURE (Status))
798 else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
800 Length = AcpiDmDumpRsdp (Table);
802 else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT))
804 Length = AcpiDmDumpS3pt (Table);
809 * All other tables must use the common ACPI table header, dump it now
811 Length = Table->Length;
812 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
813 if (ACPI_FAILURE (Status))
819 /* Match signature and dispatch appropriately */
821 TableData = AcpiDmGetTableData (Table->Signature);
824 if (!strncmp (Table->Signature, "OEM", 3))
826 AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
831 AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
834 fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
837 if (!AcpiGbl_ForceAmlDisassembly)
839 fprintf (stderr, "decoding ACPI table header only\n");
843 fprintf (stderr, "assuming table contains valid AML code\n");
847 else if (TableData->TableHandler)
849 /* Complex table, has a handler */
851 TableData->TableHandler (Table);
853 else if (TableData->TableInfo)
855 /* Simple table, just walk the info table */
857 Status = AcpiDmDumpTable (Length, 0, Table, 0, TableData->TableInfo);
858 if (ACPI_FAILURE (Status))
865 if (!AslGbl_DoTemplates || AslGbl_VerboseTemplates)
867 /* Dump the raw table data */
869 AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
870 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
871 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
872 Length, DB_BYTE_DISPLAY, 0);
877 /*******************************************************************************
879 * FUNCTION: AcpiDmLineHeader
881 * PARAMETERS: Offset - Current byte offset, from table start
882 * ByteLength - Length of the field in bytes, 0 for flags
883 * Name - Name of this field
887 * DESCRIPTION: Utility routines for formatting output lines. Displays the
888 * current table offset in hex and decimal, the field length,
889 * and the field name.
891 ******************************************************************************/
900 /* Allow a null name for fields that span multiple lines (large buffers) */
907 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
911 AcpiOsPrintf ("[%.4d] %34s : ", ByteLength, Name);
917 AcpiOsPrintf ("%41s : ", Name);
921 AcpiOsPrintf ("%41s ", Name);
925 else /* Normal disassembler or verbose template */
929 AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
930 Offset, Offset, ByteLength, Name);
936 AcpiOsPrintf ("%44s : ", Name);
940 AcpiOsPrintf ("%44s ", Name);
954 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
958 AcpiOsPrintf ("[%.4d] %30s %3d : ",
959 ByteLength, Name, Value);
963 AcpiOsPrintf ("%36s % 3d : ",
967 else /* Normal disassembler or verbose template */
971 AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
972 Offset, Offset, ByteLength, Name, Value);
976 AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
977 Offset, Offset, Name, Value);
983 /*******************************************************************************
985 * FUNCTION: AcpiDmDumpTable
987 * PARAMETERS: TableLength - Length of the entire ACPI table
988 * TableOffset - Starting offset within the table for this
989 * sub-descriptor (0 if main table)
990 * Table - The ACPI table
991 * SubtableLength - Length of this sub-descriptor
992 * Info - Info table for this ACPI table
996 * DESCRIPTION: Display ACPI table contents by walking the Info table.
998 * Note: This function must remain in sync with DtGetFieldLength.
1000 ******************************************************************************/
1007 UINT32 SubtableLength,
1008 ACPI_DMTABLE_INFO *Info)
1011 UINT32 CurrentOffset;
1017 const AH_TABLE *TableData;
1019 BOOLEAN LastOutputBlankLine = FALSE;
1021 char RepairedName[8];
1026 AcpiOsPrintf ("Display not implemented\n");
1027 return (AE_NOT_IMPLEMENTED);
1030 /* Walk entire Info table; Null name terminates */
1032 for (; Info->Name; Info++)
1035 * Target points to the field within the ACPI Table. CurrentOffset is
1036 * the offset of the field from the start of the main table.
1038 Target = ACPI_ADD_PTR (UINT8, Table, Info->Offset);
1039 CurrentOffset = TableOffset + Info->Offset;
1041 /* Check for beyond subtable end or (worse) beyond EOT */
1043 if (SubtableLength && (Info->Offset >= SubtableLength))
1046 "/**** ACPI subtable terminates early (Len %u) - "
1047 "may be older version (dump table) */\n", SubtableLength);
1049 /* Move on to next subtable */
1054 if (CurrentOffset >= TableLength)
1057 "/**** ACPI table terminates "
1058 "in the middle of a data structure! (dump table) */\n");
1059 return (AE_BAD_DATA);
1062 /* Generate the byte length for this field */
1064 switch (Info->Opcode)
1066 case ACPI_DMT_UINT8:
1067 case ACPI_DMT_CHKSUM:
1068 case ACPI_DMT_SPACEID:
1069 case ACPI_DMT_ACCWIDTH:
1072 case ACPI_DMT_IVRS_DE:
1075 case ACPI_DMT_NHLT1:
1076 case ACPI_DMT_NHLT1a:
1084 case ACPI_DMT_AEST_RES:
1085 case ACPI_DMT_AEST_XFACE:
1086 case ACPI_DMT_AEST_XRUPT:
1088 case ACPI_DMT_HESTNTYP:
1089 case ACPI_DMT_FADTPM:
1090 case ACPI_DMT_EINJACT:
1091 case ACPI_DMT_EINJINST:
1092 case ACPI_DMT_ERSTACT:
1093 case ACPI_DMT_ERSTINST:
1094 case ACPI_DMT_DMAR_SCOPE:
1100 case ACPI_DMT_UINT16:
1110 case ACPI_DMT_UINT24:
1115 case ACPI_DMT_UINT32:
1116 case ACPI_DMT_AEST_CACHE:
1117 case ACPI_DMT_AEST_GIC:
1118 case ACPI_DMT_NAME4:
1126 case ACPI_DMT_UINT40:
1131 case ACPI_DMT_UINT48:
1132 case ACPI_DMT_NAME6:
1137 case ACPI_DMT_UINT56:
1143 case ACPI_DMT_UINT64:
1144 case ACPI_DMT_NAME8:
1149 case ACPI_DMT_BUF10:
1154 case ACPI_DMT_BUF12:
1159 case ACPI_DMT_BUF16:
1165 case ACPI_DMT_BUF18:
1170 case ACPI_DMT_BUF128:
1175 case ACPI_DMT_WPBT_UNICODE:
1177 ByteLength = SubtableLength;
1178 CurrentOffset = sizeof (ACPI_TABLE_WPBT);
1181 case ACPI_DMT_UNICODE:
1182 case ACPI_DMT_BUFFER:
1183 case ACPI_DMT_RAW_BUFFER:
1185 ByteLength = SubtableLength;
1188 case ACPI_DMT_PMTT_VENDOR:
1190 * Calculate the length of the vendor data for the PMTT table:
1191 * Length = (Current Subtable ptr + Subtable length) -
1192 * Start of the vendor data (Target)
1194 ByteLength = ((ACPI_CAST_PTR (char, Table) +
1195 (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) -
1196 ACPI_CAST_PTR (char, Target));
1199 case ACPI_DMT_STRING:
1201 ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1;
1204 case ACPI_DMT_IVRS_UNTERMINATED_STRING:
1206 ByteLength = ((ACPI_CAST_PTR (ACPI_IVRS_DEVICE_HID, Target) -1)->UidLength);
1211 if (!LastOutputBlankLine)
1213 AcpiOsPrintf ("\n");
1214 LastOutputBlankLine = TRUE;
1217 ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
1220 case ACPI_DMT_HESTNTFY:
1222 if (!LastOutputBlankLine)
1224 AcpiOsPrintf ("\n");
1225 LastOutputBlankLine = TRUE;
1228 ByteLength = sizeof (ACPI_HEST_NOTIFY);
1231 case ACPI_DMT_IORTMEM:
1233 if (!LastOutputBlankLine)
1235 LastOutputBlankLine = FALSE;
1238 ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
1247 /* Check if we are beyond a subtable, or (worse) beyond EOT */
1249 if (CurrentOffset + ByteLength > TableLength)
1254 "/**** ACPI subtable terminates early - "
1255 "may be older version (dump table) */\n");
1257 /* Move on to next subtable */
1263 "/**** ACPI table terminates "
1264 "in the middle of a data structure! */\n");
1265 return (AE_BAD_DATA);
1268 if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
1270 AcpiOsPrintf ("%s", Info->Name);
1274 /* Start a new line and decode the opcode */
1276 AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
1278 switch (Info->Opcode)
1280 /* Single-bit Flag fields. Note: Opcode is the bit position */
1282 case ACPI_DMT_FLAG0:
1283 case ACPI_DMT_FLAG1:
1284 case ACPI_DMT_FLAG2:
1285 case ACPI_DMT_FLAG3:
1286 case ACPI_DMT_FLAG4:
1287 case ACPI_DMT_FLAG5:
1288 case ACPI_DMT_FLAG6:
1289 case ACPI_DMT_FLAG7:
1291 AcpiOsPrintf ("%1.1X\n", (*Target >> Info->Opcode) & 0x01);
1294 /* 2-bit Flag fields */
1296 case ACPI_DMT_FLAGS0:
1298 AcpiOsPrintf ("%1.1X\n", *Target & 0x03);
1301 case ACPI_DMT_FLAGS1:
1303 AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03);
1306 case ACPI_DMT_FLAGS2:
1308 AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
1311 case ACPI_DMT_FLAGS4:
1313 AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
1316 case ACPI_DMT_FLAGS4_0:
1318 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target) & 0x0F);
1321 case ACPI_DMT_FLAGS4_4:
1323 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 4) & 0x0F);
1326 case ACPI_DMT_FLAGS4_8:
1328 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 8) & 0x0F);
1331 case ACPI_DMT_FLAGS4_12:
1333 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 12) & 0x0F);
1336 case ACPI_DMT_FLAGS16_16:
1338 AcpiOsPrintf ("%4.4X\n", (*(UINT32 *)Target >> 16) & 0xFFFF);
1341 /* Integer Data Types */
1343 case ACPI_DMT_UINT8:
1344 case ACPI_DMT_UINT16:
1345 case ACPI_DMT_UINT24:
1346 case ACPI_DMT_UINT32:
1347 case ACPI_DMT_UINT40:
1348 case ACPI_DMT_UINT48:
1349 case ACPI_DMT_UINT56:
1350 case ACPI_DMT_UINT64:
1352 * Dump bytes - high byte first, low byte last.
1353 * Note: All ACPI tables are little-endian.
1356 for (Temp8 = (UINT8) ByteLength; Temp8 > 0; Temp8--)
1358 AcpiOsPrintf ("%2.2X", Target[Temp8 - 1]);
1359 Value |= Target[Temp8 - 1];
1363 if (!Value && (Info->Flags & DT_DESCRIBES_OPTIONAL))
1365 AcpiOsPrintf (" [Optional field not present]");
1368 AcpiOsPrintf ("\n");
1372 case ACPI_DMT_BUF10:
1373 case ACPI_DMT_BUF12:
1374 case ACPI_DMT_BUF16:
1375 case ACPI_DMT_BUF18:
1376 case ACPI_DMT_BUF128:
1378 * Buffer: Size depends on the opcode and was set above.
1379 * Each hex byte is separated with a space.
1380 * Multiple lines are separated by line continuation char.
1382 for (Temp16 = 0; Temp16 < ByteLength; Temp16++)
1384 AcpiOsPrintf ("%2.2X", Target[Temp16]);
1385 if ((UINT32) (Temp16 + 1) < ByteLength)
1387 if ((Temp16 > 0) && (!((Temp16+1) % 16)))
1389 AcpiOsPrintf (" \\\n"); /* Line continuation */
1390 AcpiDmLineHeader (0, 0, NULL);
1399 AcpiOsPrintf ("\n");
1404 /* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
1406 (void) AcpiUtConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
1408 AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
1411 case ACPI_DMT_STRING:
1413 AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target));
1416 case ACPI_DMT_IVRS_UNTERMINATED_STRING:
1418 AcpiOsPrintf ("\"%.*s\"\n", ByteLength, ACPI_CAST_PTR (char, Target));
1421 /* Fixed length ASCII name fields */
1425 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1426 AcpiOsPrintf ("\"%.4s\" ", RepairedName);
1428 TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
1431 AcpiOsPrintf (STRING_FORMAT, TableData->Description);
1435 AcpiOsPrintf ("\n");
1439 case ACPI_DMT_NAME4:
1441 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1442 AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
1445 case ACPI_DMT_NAME6:
1447 AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
1448 AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
1451 case ACPI_DMT_NAME8:
1453 AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
1454 AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
1457 /* Special Data Types */
1459 case ACPI_DMT_CHKSUM:
1461 /* Checksum, display and validate */
1463 AcpiOsPrintf ("%2.2X", *Target);
1464 Temp8 = AcpiDmGenerateChecksum (Table,
1465 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
1466 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
1468 if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
1471 " /* Incorrect checksum, should be %2.2X */", Temp8);
1474 AcpiOsPrintf ("\n");
1477 case ACPI_DMT_SPACEID:
1479 /* Address Space ID */
1481 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiUtGetRegionName (*Target));
1484 case ACPI_DMT_ACCWIDTH:
1486 /* Encoded Access Width */
1489 if (Temp8 > ACPI_GAS_WIDTH_RESERVED)
1491 Temp8 = ACPI_GAS_WIDTH_RESERVED;
1494 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
1499 /* Generic Address Structure */
1501 AcpiOsPrintf (STRING_FORMAT, "Generic Address Structure");
1502 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1503 sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas);
1504 if (ACPI_FAILURE (Status))
1509 AcpiOsPrintf ("\n");
1510 LastOutputBlankLine = TRUE;
1515 /* AEST subtable types */
1518 if (Temp8 > ACPI_AEST_NODE_TYPE_RESERVED)
1520 Temp8 = ACPI_AEST_NODE_TYPE_RESERVED;
1523 AcpiOsPrintf (UINT8_FORMAT, *Target,
1524 AcpiDmAestSubnames[Temp8]);
1527 case ACPI_DMT_AEST_CACHE:
1529 /* AEST cache resource subtable */
1532 if (Temp32 > ACPI_AEST_CACHE_RESERVED)
1534 Temp32 = ACPI_AEST_CACHE_RESERVED;
1537 AcpiOsPrintf (UINT32_FORMAT, *Target,
1538 AcpiDmAestCacheNames[Temp32]);
1541 case ACPI_DMT_AEST_GIC:
1543 /* AEST GIC error subtable */
1546 if (Temp32 > ACPI_AEST_GIC_RESERVED)
1548 Temp32 = ACPI_AEST_GIC_RESERVED;
1551 AcpiOsPrintf (UINT32_FORMAT, *Target,
1552 AcpiDmAestGicNames[Temp32]);
1555 case ACPI_DMT_AEST_RES:
1557 /* AEST resource type subtable */
1560 if (Temp8 > ACPI_AEST_RESOURCE_RESERVED)
1562 Temp8 = ACPI_AEST_RESOURCE_RESERVED;
1565 AcpiOsPrintf (UINT8_FORMAT, *Target,
1566 AcpiDmAestResourceNames[Temp8]);
1569 case ACPI_DMT_AEST_XFACE:
1571 /* AEST interface structure types */
1574 if (Temp8 > ACPI_AEST_XFACE_RESERVED)
1576 Temp8 = ACPI_AEST_XFACE_RESERVED;
1579 AcpiOsPrintf (UINT8_FORMAT, *Target,
1580 AcpiDmAestXfaceNames[Temp8]);
1583 case ACPI_DMT_AEST_XRUPT:
1585 /* AEST interrupt structure types */
1588 if (Temp8 > ACPI_AEST_XRUPT_RESERVED)
1590 Temp8 = ACPI_AEST_XRUPT_RESERVED;
1593 AcpiOsPrintf (UINT8_FORMAT, *Target,
1594 AcpiDmAestXruptNames[Temp8]);
1599 /* ASF subtable types */
1601 Temp16 = (UINT16) ((*Target) & 0x7F); /* Top bit can be zero or one */
1602 if (Temp16 > ACPI_ASF_TYPE_RESERVED)
1604 Temp16 = ACPI_ASF_TYPE_RESERVED;
1607 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]);
1612 /* CEDT subtable types */
1615 if (Temp8 > ACPI_CEDT_TYPE_RESERVED)
1617 Temp8 = ACPI_CEDT_TYPE_RESERVED;
1620 AcpiOsPrintf (UINT8_FORMAT, *Target,
1621 AcpiDmCedtSubnames[Temp8]);
1626 /* DMAR subtable types */
1628 Temp16 = ACPI_GET16 (Target);
1629 if (Temp16 > ACPI_DMAR_TYPE_RESERVED)
1631 Temp16 = ACPI_DMAR_TYPE_RESERVED;
1634 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1635 AcpiDmDmarSubnames[Temp16]);
1638 case ACPI_DMT_DMAR_SCOPE:
1640 /* DMAR device scope types */
1643 if (Temp8 > ACPI_DMAR_SCOPE_TYPE_RESERVED)
1645 Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
1648 AcpiOsPrintf (UINT8_FORMAT, *Target,
1649 AcpiDmDmarScope[Temp8]);
1652 case ACPI_DMT_EINJACT:
1654 /* EINJ Action types */
1657 if (Temp8 > ACPI_EINJ_ACTION_RESERVED)
1659 Temp8 = ACPI_EINJ_ACTION_RESERVED;
1662 AcpiOsPrintf (UINT8_FORMAT, *Target,
1663 AcpiDmEinjActions[Temp8]);
1666 case ACPI_DMT_EINJINST:
1668 /* EINJ Instruction types */
1671 if (Temp8 > ACPI_EINJ_INSTRUCTION_RESERVED)
1673 Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
1676 AcpiOsPrintf (UINT8_FORMAT, *Target,
1677 AcpiDmEinjInstructions[Temp8]);
1680 case ACPI_DMT_ERSTACT:
1682 /* ERST Action types */
1685 if (Temp8 > ACPI_ERST_ACTION_RESERVED)
1687 Temp8 = ACPI_ERST_ACTION_RESERVED;
1690 AcpiOsPrintf (UINT8_FORMAT, *Target,
1691 AcpiDmErstActions[Temp8]);
1694 case ACPI_DMT_ERSTINST:
1696 /* ERST Instruction types */
1699 if (Temp8 > ACPI_ERST_INSTRUCTION_RESERVED)
1701 Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
1704 AcpiOsPrintf (UINT8_FORMAT, *Target,
1705 AcpiDmErstInstructions[Temp8]);
1710 /* GTDT subtable types */
1713 if (Temp8 > ACPI_GTDT_TYPE_RESERVED)
1715 Temp8 = ACPI_GTDT_TYPE_RESERVED;
1718 AcpiOsPrintf (UINT8_FORMAT, *Target,
1719 AcpiDmGtdtSubnames[Temp8]);
1724 /* HEST subtable types */
1726 Temp16 = ACPI_GET16 (Target);
1727 if (Temp16 > ACPI_HEST_TYPE_RESERVED)
1729 Temp16 = ACPI_HEST_TYPE_RESERVED;
1732 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1733 AcpiDmHestSubnames[Temp16]);
1736 case ACPI_DMT_HESTNTFY:
1738 AcpiOsPrintf (STRING_FORMAT,
1739 "Hardware Error Notification Structure");
1741 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1742 sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
1743 if (ACPI_FAILURE (Status))
1748 AcpiOsPrintf ("\n");
1749 LastOutputBlankLine = TRUE;
1752 case ACPI_DMT_HESTNTYP:
1754 /* HEST Notify types */
1757 if (Temp8 > ACPI_HEST_NOTIFY_RESERVED)
1759 Temp8 = ACPI_HEST_NOTIFY_RESERVED;
1762 AcpiOsPrintf (UINT8_FORMAT, *Target,
1763 AcpiDmHestNotifySubnames[Temp8]);
1768 /* HMAT subtable types */
1771 if (Temp16 > ACPI_HMAT_TYPE_RESERVED)
1773 Temp16 = ACPI_HMAT_TYPE_RESERVED;
1776 AcpiOsPrintf (UINT16_FORMAT, *Target,
1777 AcpiDmHmatSubnames[Temp16]);
1780 case ACPI_DMT_IORTMEM:
1782 AcpiOsPrintf (STRING_FORMAT,
1783 "IORT Memory Access Properties");
1785 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1786 sizeof (ACPI_IORT_MEMORY_ACCESS), AcpiDmTableInfoIortAcc);
1787 if (ACPI_FAILURE (Status))
1792 LastOutputBlankLine = TRUE;
1797 /* MADT subtable types */
1800 if (Temp8 > ACPI_MADT_TYPE_RESERVED)
1802 Temp8 = ACPI_MADT_TYPE_RESERVED;
1805 AcpiOsPrintf (UINT8_FORMAT, *Target,
1806 AcpiDmMadtSubnames[Temp8]);
1811 /* NFIT subtable types */
1813 Temp16 = ACPI_GET16 (Target);
1814 if (Temp16 > ACPI_NFIT_TYPE_RESERVED)
1816 Temp16 = ACPI_NFIT_TYPE_RESERVED;
1819 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1820 AcpiDmNfitSubnames[Temp16]);
1823 case ACPI_DMT_NHLT1:
1825 /* NHLT link types */
1828 if (Temp8 > ACPI_NHLT_TYPE_RESERVED)
1830 Temp8 = ACPI_NHLT_TYPE_RESERVED;
1833 AcpiOsPrintf (UINT8_FORMAT, *Target,
1834 AcpiDmNhltLinkTypeNames[Temp8]);
1837 case ACPI_DMT_NHLT1a:
1839 /* NHLT direction */
1842 if (Temp8 > ACPI_NHLT_DIR_RESERVED)
1844 Temp8 = ACPI_NHLT_DIR_RESERVED;
1847 AcpiOsPrintf (UINT8_FORMAT, *Target,
1848 AcpiDmNhltDirectionNames[Temp8]);
1853 /* PCCT subtable types */
1856 if (Temp8 > ACPI_PCCT_TYPE_RESERVED)
1858 Temp8 = ACPI_PCCT_TYPE_RESERVED;
1861 AcpiOsPrintf (UINT8_FORMAT, *Target,
1862 AcpiDmPcctSubnames[Temp8]);
1867 /* PMTT subtable types */
1870 if (Temp16 > ACPI_PHAT_TYPE_RESERVED)
1872 Temp16 = ACPI_PHAT_TYPE_RESERVED;
1875 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16(Target),
1876 AcpiDmPhatSubnames[Temp16]);
1881 /* PMTT subtable types */
1884 if (Temp8 == ACPI_PMTT_TYPE_VENDOR)
1886 Temp8 = ACPI_PMTT_TYPE_RESERVED + 1;
1888 else if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
1890 Temp8 = ACPI_PMTT_TYPE_RESERVED;
1892 AcpiOsPrintf (UINT8_FORMAT, *Target,
1893 AcpiDmPmttSubnames[Temp8]);
1898 /* PPTT subtable types */
1901 if (Temp8 > ACPI_PPTT_TYPE_RESERVED)
1903 Temp8 = ACPI_PPTT_TYPE_RESERVED;
1906 AcpiOsPrintf (UINT8_FORMAT, *Target,
1907 AcpiDmPpttSubnames[Temp8]);
1910 case ACPI_DMT_UNICODE:
1911 case ACPI_DMT_WPBT_UNICODE:
1913 if (ByteLength == 0)
1915 AcpiOsPrintf ("/* Zero-length Data */\n");
1919 AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength);
1922 case ACPI_DMT_RAW_BUFFER:
1923 case ACPI_DMT_BUFFER:
1924 case ACPI_DMT_PMTT_VENDOR:
1926 if (ByteLength == 0)
1928 AcpiOsPrintf ("/* Zero-length Data */\n");
1932 AcpiDmDumpBuffer (Target, 0, ByteLength, 0, NULL);
1937 /* RGRT subtable types */
1940 if (Temp8 >= ACPI_RGRT_TYPE_RESERVED)
1942 Temp8 = ACPI_RGRT_TYPE_RESERVED0;
1945 AcpiOsPrintf (UINT8_FORMAT, *Target,
1946 AcpiDmRgrtSubnames[Temp8]);
1951 /* SDEV subtable types */
1954 if (Temp8 > ACPI_SDEV_TYPE_RESERVED)
1956 Temp8 = ACPI_SDEV_TYPE_RESERVED;
1959 AcpiOsPrintf (UINT8_FORMAT, *Target,
1960 AcpiDmSdevSubnames[Temp8]);
1965 /* SRAT subtable types */
1968 if (Temp8 > ACPI_SRAT_TYPE_RESERVED)
1970 Temp8 = ACPI_SRAT_TYPE_RESERVED;
1973 AcpiOsPrintf (UINT8_FORMAT, *Target,
1974 AcpiDmSratSubnames[Temp8]);
1979 /* TPM2 Start Method types */
1982 if (Temp8 > ACPI_TPM2_RESERVED)
1984 Temp8 = ACPI_TPM2_RESERVED;
1987 AcpiOsPrintf (UINT8_FORMAT, *Target,
1988 AcpiDmTpm2Subnames[Temp8]);
1992 case ACPI_DMT_FADTPM:
1994 /* FADT Preferred PM Profile names */
1997 if (Temp8 > ACPI_FADT_PM_RESERVED)
1999 Temp8 = ACPI_FADT_PM_RESERVED;
2002 AcpiOsPrintf (UINT8_FORMAT, *Target,
2003 AcpiDmFadtProfiles[Temp8]);
2008 /* IVRS subtable types */
2013 case ACPI_IVRS_TYPE_HARDWARE1:
2014 case ACPI_IVRS_TYPE_HARDWARE2:
2016 Name = AcpiDmIvrsSubnames[0];
2019 case ACPI_IVRS_TYPE_HARDWARE3:
2021 Name = AcpiDmIvrsSubnames[1];
2024 case ACPI_IVRS_TYPE_MEMORY1:
2025 case ACPI_IVRS_TYPE_MEMORY2:
2026 case ACPI_IVRS_TYPE_MEMORY3:
2028 Name = AcpiDmIvrsSubnames[2];
2033 Name = AcpiDmIvrsSubnames[3];
2037 AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
2040 case ACPI_DMT_IVRS_DE:
2042 /* IVRS device entry types */
2047 case ACPI_IVRS_TYPE_ALL:
2048 case ACPI_IVRS_TYPE_SELECT:
2049 case ACPI_IVRS_TYPE_START:
2050 case ACPI_IVRS_TYPE_END:
2052 Name = AcpiDmIvrsDevEntryNames[Temp8];
2055 case ACPI_IVRS_TYPE_ALIAS_SELECT:
2056 case ACPI_IVRS_TYPE_ALIAS_START:
2057 case ACPI_IVRS_TYPE_EXT_SELECT:
2058 case ACPI_IVRS_TYPE_EXT_START:
2059 case ACPI_IVRS_TYPE_SPECIAL:
2061 Name = AcpiDmIvrsDevEntryNames[Temp8 - 61];
2064 case ACPI_IVRS_TYPE_HID:
2066 Name = AcpiDmIvrsDevEntryNames[Temp8 - 228];
2070 Name = AcpiDmIvrsDevEntryNames[0]; /* Unknown/Reserved */
2074 AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
2079 /* LPIT subtable types */
2081 Temp32 = ACPI_GET32 (Target);
2082 if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
2084 Temp32 = ACPI_LPIT_TYPE_RESERVED;
2087 AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
2088 AcpiDmLpitSubnames[Temp32]);
2093 /* VIOT subtable types */
2096 if (Temp8 > ACPI_VIOT_RESERVED)
2098 Temp8 = ACPI_VIOT_RESERVED;
2101 AcpiOsPrintf (UINT8_FORMAT, *Target,
2102 AcpiDmViotSubnames[Temp8]);
2111 ACPI_ERROR ((AE_INFO,
2112 "**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
2113 return (AE_SUPPORT);
2117 if (TableOffset && !SubtableLength)
2120 * If this table is not the main table, the subtable must have a
2123 AcpiOsPrintf ("Invalid zero length subtable\n");
2124 return (AE_BAD_DATA);