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 "CXL Fixed Memory Window Structure",
191 "Unknown Subtable Type" /* Reserved */
194 static const char *AcpiDmDmarSubnames[] =
196 "Hardware Unit Definition",
197 "Reserved Memory Region",
198 "Root Port ATS Capability",
199 "Remapping Hardware Static Affinity",
200 "ACPI Namespace Device Declaration",
201 "Unknown Subtable Type" /* Reserved */
204 static const char *AcpiDmDmarScope[] =
207 "PCI Endpoint Device",
210 "Message-capable HPET Device",
212 "Unknown Scope Type" /* Reserved */
215 static const char *AcpiDmEinjActions[] =
224 "Get Command Status",
225 "Set Error Type With Address",
226 "Get Execute Timings",
230 static const char *AcpiDmEinjInstructions[] =
233 "Read Register Value",
235 "Write Register Value",
238 "Unknown Instruction"
241 static const char *AcpiDmErstActions[] =
243 "Begin Write Operation",
244 "Begin Read Operation",
245 "Begin Clear Operation",
250 "Get Command Status",
251 "Get Record Identifier",
252 "Set Record Identifier",
255 "Unused/Unknown Action",
256 "Get Error Address Range",
257 "Get Error Address Length",
258 "Get Error Attributes",
263 static const char *AcpiDmErstInstructions[] =
266 "Read Register Value",
268 "Write Register Value",
281 "Set Source Address",
282 "Set Destination Address",
284 "Unknown Instruction"
287 static const char *AcpiDmGtdtSubnames[] =
289 "Generic Timer Block",
290 "Generic Watchdog Timer",
291 "Unknown Subtable Type" /* Reserved */
294 static const char *AcpiDmHestSubnames[] =
296 "IA-32 Machine Check Exception",
297 "IA-32 Corrected Machine Check",
298 "IA-32 Non-Maskable Interrupt",
299 "Unknown Subtable Type", /* 3 - Reserved */
300 "Unknown Subtable Type", /* 4 - Reserved */
301 "Unknown Subtable Type", /* 5 - Reserved */
302 "PCI Express Root Port AER",
303 "PCI Express AER (AER Endpoint)",
304 "PCI Express/PCI-X Bridge AER",
305 "Generic Hardware Error Source",
306 "Generic Hardware Error Source V2",
307 "IA-32 Deferred Machine Check",
308 "Unknown Subtable Type" /* Reserved */
311 static const char *AcpiDmHestNotifySubnames[] =
314 "External Interrupt",
318 "CMCI", /* ACPI 5.0 */
319 "MCE", /* ACPI 5.0 */
320 "GPIO", /* ACPI 6.0 */
321 "SEA", /* ACPI 6.1 */
322 "SEI", /* ACPI 6.1 */
323 "GSIV", /* ACPI 6.1 */
324 "Software Delegated Exception", /* ACPI 6.2 */
325 "Unknown Notify Type" /* Reserved */
328 static const char *AcpiDmHmatSubnames[] =
330 "Memory Proximity Domain Attributes",
331 "System Locality Latency and Bandwidth Information",
332 "Memory Side Cache Information",
333 "Unknown Structure Type" /* Reserved */
336 static const char *AcpiDmMadtSubnames[] =
338 "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
339 "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
340 "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
341 "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
342 "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
343 "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
344 "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
345 "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
346 "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
347 "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
348 "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
349 "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
350 "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */
351 "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
352 "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
353 "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
354 "Mutiprocessor Wakeup", /* ACPI_MADT_TYPE_MULTIPROC_WAKEUP */
355 "Unknown Subtable Type" /* Reserved */
358 static const char *AcpiDmNfitSubnames[] =
360 "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */
361 "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */
362 "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */
363 "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */
364 "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
365 "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
366 "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
367 "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
368 "Unknown Subtable Type" /* Reserved */
371 static const char *AcpiDmPcctSubnames[] =
373 "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
374 "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
375 "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
376 "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
377 "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
378 "HW Registers based Comm Subspace", /* ACPI_PCCT_TYPE_HW_REG_COMM_SUBSPACE */
379 "Unknown Subtable Type" /* Reserved */
382 static const char *AcpiDmPhatSubnames[] =
384 "Firmware Version Data", /* ACPI_PHAT_TYPE_FW_VERSION_DATA */
385 "Firmware Health Data", /* ACPI_PHAT_TYPE_FW_HEALTH_DATA */
386 "Unknown Subtable Type" /* Reserved */
389 static const char *AcpiDmPmttSubnames[] =
391 "Socket", /* ACPI_PMTT_TYPE_SOCKET */
392 "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
393 "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
394 "Unknown Subtable Type", /* Reserved */
395 "Vendor Specific" /* ACPI_PMTT_TYPE_VENDOR */
398 static const char *AcpiDmPpttSubnames[] =
400 "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
401 "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
402 "ID", /* ACPI_PPTT_TYPE_ID */
403 "Unknown Subtable Type" /* Reserved */
406 static const char *AcpiDmRgrtSubnames[] =
408 "Unknown/Reserved Image Type", /* ACPI_RGRT_TYPE_RESERVED0 */
409 "Type PNG" /* ACPI_RGRT_IMAGE_TYPE_PNG */
412 static const char *AcpiDmSdevSubnames[] =
414 "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
415 "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
416 "Unknown Subtable Type" /* Reserved */
419 static const char *AcpiDmSratSubnames[] =
421 "Processor Local APIC/SAPIC Affinity",
423 "Processor Local x2APIC Affinity",
425 "GIC ITS Affinity", /* Acpi 6.2 */
426 "Generic Initiator Affinity", /* Acpi 6.3 */
427 "Unknown Subtable Type" /* Reserved */
430 static const char *AcpiDmTpm2Subnames[] =
432 "Illegal Start Method value",
439 "Command Response Buffer",
440 "Command Response Buffer with ACPI Start Method",
443 "Command Response Buffer with ARM SMC",
444 "Unknown Subtable Type" /* Reserved */
447 static const char *AcpiDmIvrsSubnames[] =
449 "Hardware Definition Block (IVHD)",
450 "Hardware Definition Block - Mixed Format (IVHD)",
451 "Memory Definition Block (IVMD)",
452 "Unknown/Reserved Subtable Type" /* Reserved */
455 static const char *AcpiDmIvrsDevEntryNames[] =
457 "Unknown/Reserved Device Entry Type", /* 0- Reserved */
458 "Device Entry: Select All Devices", /* 1 */
459 "Device Entry: Select One Device", /* 2 */
460 "Device Entry: Start of Range", /* 3 */
461 "Device Entry: End of Range", /* 4 */
462 "Device Entry: Alias Select", /* 66 */
463 "Device Entry: Alias Start of Range", /* 67 */
464 "Unknown/Reserved Device Entry Type", /* 68- Reserved */
465 "Unknown/Reserved Device Entry Type", /* 69- Reserved */
466 "Device Entry: Extended Select", /* 70 */
467 "Device Entry: Extended Start of Range", /* 71 */
468 "Device Entry: Special Device", /* 72 */
469 "Device Entry: ACPI HID Named Device", /* 240 */
470 "Unknown/Reserved Device Entry Type" /* Reserved */
473 static const char *AcpiDmLpitSubnames[] =
475 "Native C-state Idle Structure",
476 "Unknown Subtable Type" /* Reserved */
479 static const char *AcpiDmViotSubnames[] =
481 "Unknown Subtable Type", /* 0 -Reserved */
486 "Unknown Subtable Type" /* Reserved */
489 #define ACPI_FADT_PM_RESERVED 9
491 static const char *AcpiDmFadtProfiles[] =
500 "Performance Server",
502 "Unknown Profile Type"
505 #define ACPI_GAS_WIDTH_RESERVED 5
507 static const char *AcpiDmGasAccessWidth[] =
514 "Unknown Width Encoding"
518 /*******************************************************************************
520 * ACPI Table Data, indexed by signature.
522 * Each entry contains: Signature, Table Info, Handler, DtHandler,
523 * Template, Description
525 * Simple tables have only a TableInfo structure, complex tables have a
526 * handler. This table must be NULL terminated. RSDP and FACS are
527 * special-cased elsewhere.
529 * Note: Any tables added here should be duplicated within
530 * AcpiGbl_SupportedTables in the file common/ahtable.c
532 ******************************************************************************/
534 const ACPI_DMTABLE_DATA AcpiDmTableData[] =
536 {ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
537 {ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat},
538 {ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
539 {ACPI_SIG_BGRT, AcpiDmTableInfoBgrt, NULL, NULL, TemplateBgrt},
540 {ACPI_SIG_BOOT, AcpiDmTableInfoBoot, NULL, NULL, TemplateBoot},
541 {ACPI_SIG_CEDT, NULL, AcpiDmDumpCedt, DtCompileCedt, TemplateCedt},
542 {ACPI_SIG_CPEP, NULL, AcpiDmDumpCpep, DtCompileCpep, TemplateCpep},
543 {ACPI_SIG_CSRT, NULL, AcpiDmDumpCsrt, DtCompileCsrt, TemplateCsrt},
544 {ACPI_SIG_DBG2, AcpiDmTableInfoDbg2, AcpiDmDumpDbg2, DtCompileDbg2, TemplateDbg2},
545 {ACPI_SIG_DBGP, AcpiDmTableInfoDbgp, NULL, NULL, TemplateDbgp},
546 {ACPI_SIG_DMAR, NULL, AcpiDmDumpDmar, DtCompileDmar, TemplateDmar},
547 {ACPI_SIG_DRTM, NULL, AcpiDmDumpDrtm, DtCompileDrtm, TemplateDrtm},
548 {ACPI_SIG_ECDT, AcpiDmTableInfoEcdt, NULL, NULL, TemplateEcdt},
549 {ACPI_SIG_EINJ, NULL, AcpiDmDumpEinj, DtCompileEinj, TemplateEinj},
550 {ACPI_SIG_ERST, NULL, AcpiDmDumpErst, DtCompileErst, TemplateErst},
551 {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, DtCompileFadt, TemplateFadt},
552 {ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt},
553 {ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt},
554 {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest},
555 {ACPI_SIG_HMAT, NULL, AcpiDmDumpHmat, DtCompileHmat, TemplateHmat},
556 {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet},
557 {ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort},
558 {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs},
559 {ACPI_SIG_LPIT, NULL, AcpiDmDumpLpit, DtCompileLpit, TemplateLpit},
560 {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, DtCompileMadt, TemplateMadt},
561 {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, DtCompileMcfg, TemplateMcfg},
562 {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi},
563 {ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst},
564 {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct},
565 {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm},
566 {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
567 {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
568 {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt},
569 {ACPI_SIG_PHAT, NULL, AcpiDmDumpPhat, DtCompilePhat, TemplatePhat},
570 {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
571 {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
572 {ACPI_SIG_PRMT, NULL, AcpiDmDumpPrmt, DtCompilePrmt, TemplatePrmt},
573 {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
574 {ACPI_SIG_RGRT, NULL, AcpiDmDumpRgrt, DtCompileRgrt, TemplateRgrt},
575 {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
576 {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
577 {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
578 {ACPI_SIG_SDEI, AcpiDmTableInfoSdei, NULL, NULL, TemplateSdei},
579 {ACPI_SIG_SDEV, AcpiDmTableInfoSdev, AcpiDmDumpSdev, DtCompileSdev, TemplateSdev},
580 {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic},
581 {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit},
582 {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr},
583 {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, NULL, TemplateSpmi},
584 {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat},
585 {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao},
586 {ACPI_SIG_SVKL, AcpiDmTableInfoSvkl, AcpiDmDumpSvkl, DtCompileSvkl, TemplateSvkl},
587 {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa},
588 {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2},
589 {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi},
590 {ACPI_SIG_VIOT, AcpiDmTableInfoViot, AcpiDmDumpViot, DtCompileViot, TemplateViot},
591 {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet},
592 {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, DtCompileWdat, TemplateWdat},
593 {ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
594 {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt},
595 {ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt},
596 {ACPI_SIG_WSMT, AcpiDmTableInfoWsmt, NULL, NULL, TemplateWsmt},
597 {ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv},
598 {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt},
599 {NULL, NULL, NULL, NULL, NULL}
603 /*******************************************************************************
605 * FUNCTION: AcpiDmGenerateChecksum
607 * PARAMETERS: Table - Pointer to table to be checksummed
608 * Length - Length of the table
609 * OriginalChecksum - Value of the checksum field
611 * RETURN: 8 bit checksum of buffer
613 * DESCRIPTION: Computes an 8 bit checksum of the table.
615 ******************************************************************************/
618 AcpiDmGenerateChecksum (
621 UINT8 OriginalChecksum)
626 /* Sum the entire table as-is */
628 Checksum = AcpiTbChecksum ((UINT8 *) Table, Length);
630 /* Subtract off the existing checksum value in the table */
632 Checksum = (UINT8) (Checksum - OriginalChecksum);
634 /* Compute the final checksum */
636 Checksum = (UINT8) (0 - Checksum);
641 /*******************************************************************************
643 * FUNCTION: AcpiDmGetTableData
645 * PARAMETERS: Signature - ACPI signature (4 chars) to match
647 * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
649 * DESCRIPTION: Find a match in the global table of supported ACPI tables
651 ******************************************************************************/
653 const ACPI_DMTABLE_DATA *
657 const ACPI_DMTABLE_DATA *Info;
660 for (Info = AcpiDmTableData; Info->Signature; Info++)
662 if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature))
672 /*******************************************************************************
674 * FUNCTION: AcpiDmDumpDataTable
676 * PARAMETERS: Table - An ACPI table
680 * DESCRIPTION: Format the contents of an ACPI data table (any table other
681 * than an SSDT or DSDT that does not contain executable AML code)
683 ******************************************************************************/
686 AcpiDmDumpDataTable (
687 ACPI_TABLE_HEADER *Table)
690 const ACPI_DMTABLE_DATA *TableData;
694 /* Ignore tables that contain AML */
696 if (AcpiUtIsAmlTable (Table))
698 if (AslGbl_VerboseTemplates)
700 /* Dump the raw table data */
702 Length = Table->Length;
704 AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
705 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
706 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
707 Length, DB_BYTE_DISPLAY, 0);
708 AcpiOsPrintf (" */\n");
714 * Handle tables that don't use the common ACPI table header structure.
715 * Currently, these are the FACS, RSDP, and S3PT.
717 if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS))
719 Length = Table->Length;
720 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs);
721 if (ACPI_FAILURE (Status))
726 else if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
728 Length = AcpiDmDumpRsdp (Table);
730 else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT))
732 Length = AcpiDmDumpS3pt (Table);
737 * All other tables must use the common ACPI table header, dump it now
739 Length = Table->Length;
740 Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoHeader);
741 if (ACPI_FAILURE (Status))
747 /* Match signature and dispatch appropriately */
749 TableData = AcpiDmGetTableData (Table->Signature);
752 if (!strncmp (Table->Signature, "OEM", 3))
754 AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
759 AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
762 fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
765 if (!AcpiGbl_ForceAmlDisassembly)
767 fprintf (stderr, "decoding ACPI table header only\n");
771 fprintf (stderr, "assuming table contains valid AML code\n");
775 else if (TableData->TableHandler)
777 /* Complex table, has a handler */
779 TableData->TableHandler (Table);
781 else if (TableData->TableInfo)
783 /* Simple table, just walk the info table */
785 Status = AcpiDmDumpTable (Length, 0, Table, 0, TableData->TableInfo);
786 if (ACPI_FAILURE (Status))
793 if (!AslGbl_DoTemplates || AslGbl_VerboseTemplates)
795 /* Dump the raw table data */
797 AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
798 ACPI_RAW_TABLE_DATA_HEADER, Length, Length);
799 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, Table),
800 Length, DB_BYTE_DISPLAY, 0);
805 /*******************************************************************************
807 * FUNCTION: AcpiDmLineHeader
809 * PARAMETERS: Offset - Current byte offset, from table start
810 * ByteLength - Length of the field in bytes, 0 for flags
811 * Name - Name of this field
815 * DESCRIPTION: Utility routines for formatting output lines. Displays the
816 * current table offset in hex and decimal, the field length,
817 * and the field name.
819 ******************************************************************************/
828 /* Allow a null name for fields that span multiple lines (large buffers) */
835 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
839 AcpiOsPrintf ("[%.4d] %34s : ", ByteLength, Name);
845 AcpiOsPrintf ("%41s : ", Name);
849 AcpiOsPrintf ("%41s ", Name);
853 else /* Normal disassembler or verbose template */
857 AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
858 Offset, Offset, ByteLength, Name);
864 AcpiOsPrintf ("%44s : ", Name);
868 AcpiOsPrintf ("%44s ", Name);
882 if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
886 AcpiOsPrintf ("[%.4d] %30s %3d : ",
887 ByteLength, Name, Value);
891 AcpiOsPrintf ("%36s % 3d : ",
895 else /* Normal disassembler or verbose template */
899 AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
900 Offset, Offset, ByteLength, Name, Value);
904 AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
905 Offset, Offset, Name, Value);
911 /*******************************************************************************
913 * FUNCTION: AcpiDmDumpTable
915 * PARAMETERS: TableLength - Length of the entire ACPI table
916 * TableOffset - Starting offset within the table for this
917 * sub-descriptor (0 if main table)
918 * Table - The ACPI table
919 * SubtableLength - Length of this sub-descriptor
920 * Info - Info table for this ACPI table
924 * DESCRIPTION: Display ACPI table contents by walking the Info table.
926 * Note: This function must remain in sync with DtGetFieldLength.
928 ******************************************************************************/
935 UINT32 SubtableLength,
936 ACPI_DMTABLE_INFO *Info)
939 UINT32 CurrentOffset;
945 const AH_TABLE *TableData;
947 BOOLEAN LastOutputBlankLine = FALSE;
949 char RepairedName[8];
954 AcpiOsPrintf ("Display not implemented\n");
955 return (AE_NOT_IMPLEMENTED);
958 /* Walk entire Info table; Null name terminates */
960 for (; Info->Name; Info++)
963 * Target points to the field within the ACPI Table. CurrentOffset is
964 * the offset of the field from the start of the main table.
966 Target = ACPI_ADD_PTR (UINT8, Table, Info->Offset);
967 CurrentOffset = TableOffset + Info->Offset;
969 /* Check for beyond subtable end or (worse) beyond EOT */
971 if (SubtableLength && (Info->Offset >= SubtableLength))
974 "/**** ACPI subtable terminates early (Len %u) - "
975 "may be older version (dump table) */\n", SubtableLength);
977 /* Move on to next subtable */
982 if (CurrentOffset >= TableLength)
985 "/**** ACPI table terminates "
986 "in the middle of a data structure! (dump table) */\n");
987 return (AE_BAD_DATA);
990 /* Generate the byte length for this field */
992 switch (Info->Opcode)
995 case ACPI_DMT_CHKSUM:
996 case ACPI_DMT_SPACEID:
997 case ACPI_DMT_ACCWIDTH:
1000 case ACPI_DMT_IVRS_DE:
1010 case ACPI_DMT_HESTNTYP:
1011 case ACPI_DMT_FADTPM:
1012 case ACPI_DMT_EINJACT:
1013 case ACPI_DMT_EINJINST:
1014 case ACPI_DMT_ERSTACT:
1015 case ACPI_DMT_ERSTINST:
1016 case ACPI_DMT_DMAR_SCOPE:
1022 case ACPI_DMT_UINT16:
1032 case ACPI_DMT_UINT24:
1037 case ACPI_DMT_UINT32:
1038 case ACPI_DMT_NAME4:
1046 case ACPI_DMT_UINT40:
1051 case ACPI_DMT_UINT48:
1052 case ACPI_DMT_NAME6:
1057 case ACPI_DMT_UINT56:
1063 case ACPI_DMT_UINT64:
1064 case ACPI_DMT_NAME8:
1069 case ACPI_DMT_BUF10:
1074 case ACPI_DMT_BUF12:
1079 case ACPI_DMT_BUF16:
1085 case ACPI_DMT_BUF128:
1090 case ACPI_DMT_UNICODE:
1091 case ACPI_DMT_BUFFER:
1092 case ACPI_DMT_RAW_BUFFER:
1094 ByteLength = SubtableLength;
1097 case ACPI_DMT_PMTT_VENDOR:
1099 * Calculate the length of the vendor data for the PMTT table:
1100 * Length = (Current Subtable ptr + Subtable length) -
1101 * Start of the vendor data (Target)
1103 ByteLength = ((ACPI_CAST_PTR (char, Table) +
1104 (ACPI_CAST_PTR (ACPI_PMTT_HEADER, Table)->Length)) -
1105 ACPI_CAST_PTR (char, Target));
1108 case ACPI_DMT_STRING:
1110 ByteLength = strlen (ACPI_CAST_PTR (char, Target)) + 1;
1113 case ACPI_DMT_IVRS_UNTERMINATED_STRING:
1115 ByteLength = ((ACPI_CAST_PTR (ACPI_IVRS_DEVICE_HID, Target) -1)->UidLength);
1120 if (!LastOutputBlankLine)
1122 AcpiOsPrintf ("\n");
1123 LastOutputBlankLine = TRUE;
1126 ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
1129 case ACPI_DMT_HESTNTFY:
1131 if (!LastOutputBlankLine)
1133 AcpiOsPrintf ("\n");
1134 LastOutputBlankLine = TRUE;
1137 ByteLength = sizeof (ACPI_HEST_NOTIFY);
1140 case ACPI_DMT_IORTMEM:
1142 if (!LastOutputBlankLine)
1144 LastOutputBlankLine = FALSE;
1147 ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
1156 /* Check if we are beyond a subtable, or (worse) beyond EOT */
1158 if (CurrentOffset + ByteLength > TableLength)
1163 "/**** ACPI subtable terminates early - "
1164 "may be older version (dump table) */\n");
1166 /* Move on to next subtable */
1172 "/**** ACPI table terminates "
1173 "in the middle of a data structure! */\n");
1174 return (AE_BAD_DATA);
1177 if (Info->Opcode == ACPI_DMT_EXTRA_TEXT)
1179 AcpiOsPrintf ("%s", Info->Name);
1183 /* Start a new line and decode the opcode */
1185 AcpiDmLineHeader (CurrentOffset, ByteLength, Info->Name);
1187 switch (Info->Opcode)
1189 /* Single-bit Flag fields. Note: Opcode is the bit position */
1191 case ACPI_DMT_FLAG0:
1192 case ACPI_DMT_FLAG1:
1193 case ACPI_DMT_FLAG2:
1194 case ACPI_DMT_FLAG3:
1195 case ACPI_DMT_FLAG4:
1196 case ACPI_DMT_FLAG5:
1197 case ACPI_DMT_FLAG6:
1198 case ACPI_DMT_FLAG7:
1200 AcpiOsPrintf ("%1.1X\n", (*Target >> Info->Opcode) & 0x01);
1203 /* 2-bit Flag fields */
1205 case ACPI_DMT_FLAGS0:
1207 AcpiOsPrintf ("%1.1X\n", *Target & 0x03);
1210 case ACPI_DMT_FLAGS1:
1212 AcpiOsPrintf ("%1.1X\n", (*Target >> 1) & 0x03);
1215 case ACPI_DMT_FLAGS2:
1217 AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
1220 case ACPI_DMT_FLAGS4:
1222 AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
1225 case ACPI_DMT_FLAGS4_0:
1227 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target) & 0x0F);
1230 case ACPI_DMT_FLAGS4_4:
1232 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 4) & 0x0F);
1235 case ACPI_DMT_FLAGS4_8:
1237 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 8) & 0x0F);
1240 case ACPI_DMT_FLAGS4_12:
1242 AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 12) & 0x0F);
1245 case ACPI_DMT_FLAGS16_16:
1247 AcpiOsPrintf ("%4.4X\n", (*(UINT32 *)Target >> 16) & 0xFFFF);
1250 /* Integer Data Types */
1252 case ACPI_DMT_UINT8:
1253 case ACPI_DMT_UINT16:
1254 case ACPI_DMT_UINT24:
1255 case ACPI_DMT_UINT32:
1256 case ACPI_DMT_UINT40:
1257 case ACPI_DMT_UINT48:
1258 case ACPI_DMT_UINT56:
1259 case ACPI_DMT_UINT64:
1261 * Dump bytes - high byte first, low byte last.
1262 * Note: All ACPI tables are little-endian.
1265 for (Temp8 = (UINT8) ByteLength; Temp8 > 0; Temp8--)
1267 AcpiOsPrintf ("%2.2X", Target[Temp8 - 1]);
1268 Value |= Target[Temp8 - 1];
1272 if (!Value && (Info->Flags & DT_DESCRIBES_OPTIONAL))
1274 AcpiOsPrintf (" [Optional field not present]");
1277 AcpiOsPrintf ("\n");
1281 case ACPI_DMT_BUF10:
1282 case ACPI_DMT_BUF12:
1283 case ACPI_DMT_BUF16:
1284 case ACPI_DMT_BUF128:
1286 * Buffer: Size depends on the opcode and was set above.
1287 * Each hex byte is separated with a space.
1288 * Multiple lines are separated by line continuation char.
1290 for (Temp16 = 0; Temp16 < ByteLength; Temp16++)
1292 AcpiOsPrintf ("%2.2X", Target[Temp16]);
1293 if ((UINT32) (Temp16 + 1) < ByteLength)
1295 if ((Temp16 > 0) && (!((Temp16+1) % 16)))
1297 AcpiOsPrintf (" \\\n"); /* Line continuation */
1298 AcpiDmLineHeader (0, 0, NULL);
1307 AcpiOsPrintf ("\n");
1312 /* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
1314 (void) AcpiUtConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
1316 AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
1319 case ACPI_DMT_STRING:
1321 AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target));
1324 case ACPI_DMT_IVRS_UNTERMINATED_STRING:
1326 AcpiOsPrintf ("\"%.*s\"\n", ByteLength, ACPI_CAST_PTR (char, Target));
1329 /* Fixed length ASCII name fields */
1333 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1334 AcpiOsPrintf ("\"%.4s\" ", RepairedName);
1336 TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
1339 AcpiOsPrintf (STRING_FORMAT, TableData->Description);
1343 AcpiOsPrintf ("\n");
1347 case ACPI_DMT_NAME4:
1349 AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
1350 AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
1353 case ACPI_DMT_NAME6:
1355 AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
1356 AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
1359 case ACPI_DMT_NAME8:
1361 AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
1362 AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
1365 /* Special Data Types */
1367 case ACPI_DMT_CHKSUM:
1369 /* Checksum, display and validate */
1371 AcpiOsPrintf ("%2.2X", *Target);
1372 Temp8 = AcpiDmGenerateChecksum (Table,
1373 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
1374 ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
1376 if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
1379 " /* Incorrect checksum, should be %2.2X */", Temp8);
1382 AcpiOsPrintf ("\n");
1385 case ACPI_DMT_SPACEID:
1387 /* Address Space ID */
1389 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiUtGetRegionName (*Target));
1392 case ACPI_DMT_ACCWIDTH:
1394 /* Encoded Access Width */
1397 if (Temp8 > ACPI_GAS_WIDTH_RESERVED)
1399 Temp8 = ACPI_GAS_WIDTH_RESERVED;
1402 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
1407 /* Generic Address Structure */
1409 AcpiOsPrintf (STRING_FORMAT, "Generic Address Structure");
1410 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1411 sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas);
1412 if (ACPI_FAILURE (Status))
1417 AcpiOsPrintf ("\n");
1418 LastOutputBlankLine = TRUE;
1423 /* ASF subtable types */
1425 Temp16 = (UINT16) ((*Target) & 0x7F); /* Top bit can be zero or one */
1426 if (Temp16 > ACPI_ASF_TYPE_RESERVED)
1428 Temp16 = ACPI_ASF_TYPE_RESERVED;
1431 AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmAsfSubnames[Temp16]);
1436 /* CEDT subtable types */
1439 if (Temp8 > ACPI_CEDT_TYPE_RESERVED)
1441 Temp8 = ACPI_CEDT_TYPE_RESERVED;
1444 AcpiOsPrintf (UINT8_FORMAT, *Target,
1445 AcpiDmCedtSubnames[Temp8]);
1450 /* DMAR subtable types */
1452 Temp16 = ACPI_GET16 (Target);
1453 if (Temp16 > ACPI_DMAR_TYPE_RESERVED)
1455 Temp16 = ACPI_DMAR_TYPE_RESERVED;
1458 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1459 AcpiDmDmarSubnames[Temp16]);
1462 case ACPI_DMT_DMAR_SCOPE:
1464 /* DMAR device scope types */
1467 if (Temp8 > ACPI_DMAR_SCOPE_TYPE_RESERVED)
1469 Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
1472 AcpiOsPrintf (UINT8_FORMAT, *Target,
1473 AcpiDmDmarScope[Temp8]);
1476 case ACPI_DMT_EINJACT:
1478 /* EINJ Action types */
1481 if (Temp8 > ACPI_EINJ_ACTION_RESERVED)
1483 Temp8 = ACPI_EINJ_ACTION_RESERVED;
1486 AcpiOsPrintf (UINT8_FORMAT, *Target,
1487 AcpiDmEinjActions[Temp8]);
1490 case ACPI_DMT_EINJINST:
1492 /* EINJ Instruction types */
1495 if (Temp8 > ACPI_EINJ_INSTRUCTION_RESERVED)
1497 Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
1500 AcpiOsPrintf (UINT8_FORMAT, *Target,
1501 AcpiDmEinjInstructions[Temp8]);
1504 case ACPI_DMT_ERSTACT:
1506 /* ERST Action types */
1509 if (Temp8 > ACPI_ERST_ACTION_RESERVED)
1511 Temp8 = ACPI_ERST_ACTION_RESERVED;
1514 AcpiOsPrintf (UINT8_FORMAT, *Target,
1515 AcpiDmErstActions[Temp8]);
1518 case ACPI_DMT_ERSTINST:
1520 /* ERST Instruction types */
1523 if (Temp8 > ACPI_ERST_INSTRUCTION_RESERVED)
1525 Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
1528 AcpiOsPrintf (UINT8_FORMAT, *Target,
1529 AcpiDmErstInstructions[Temp8]);
1534 /* GTDT subtable types */
1537 if (Temp8 > ACPI_GTDT_TYPE_RESERVED)
1539 Temp8 = ACPI_GTDT_TYPE_RESERVED;
1542 AcpiOsPrintf (UINT8_FORMAT, *Target,
1543 AcpiDmGtdtSubnames[Temp8]);
1548 /* HEST subtable types */
1550 Temp16 = ACPI_GET16 (Target);
1551 if (Temp16 > ACPI_HEST_TYPE_RESERVED)
1553 Temp16 = ACPI_HEST_TYPE_RESERVED;
1556 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1557 AcpiDmHestSubnames[Temp16]);
1560 case ACPI_DMT_HESTNTFY:
1562 AcpiOsPrintf (STRING_FORMAT,
1563 "Hardware Error Notification Structure");
1565 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1566 sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
1567 if (ACPI_FAILURE (Status))
1572 AcpiOsPrintf ("\n");
1573 LastOutputBlankLine = TRUE;
1576 case ACPI_DMT_HESTNTYP:
1578 /* HEST Notify types */
1581 if (Temp8 > ACPI_HEST_NOTIFY_RESERVED)
1583 Temp8 = ACPI_HEST_NOTIFY_RESERVED;
1586 AcpiOsPrintf (UINT8_FORMAT, *Target,
1587 AcpiDmHestNotifySubnames[Temp8]);
1592 /* HMAT subtable types */
1595 if (Temp16 > ACPI_HMAT_TYPE_RESERVED)
1597 Temp16 = ACPI_HMAT_TYPE_RESERVED;
1600 AcpiOsPrintf (UINT16_FORMAT, *Target,
1601 AcpiDmHmatSubnames[Temp16]);
1604 case ACPI_DMT_IORTMEM:
1606 AcpiOsPrintf (STRING_FORMAT,
1607 "IORT Memory Access Properties");
1609 Status = AcpiDmDumpTable (TableLength, CurrentOffset, Target,
1610 sizeof (ACPI_IORT_MEMORY_ACCESS), AcpiDmTableInfoIortAcc);
1611 if (ACPI_FAILURE (Status))
1616 LastOutputBlankLine = TRUE;
1621 /* MADT subtable types */
1624 if (Temp8 > ACPI_MADT_TYPE_RESERVED)
1626 Temp8 = ACPI_MADT_TYPE_RESERVED;
1629 AcpiOsPrintf (UINT8_FORMAT, *Target,
1630 AcpiDmMadtSubnames[Temp8]);
1635 /* NFIT subtable types */
1637 Temp16 = ACPI_GET16 (Target);
1638 if (Temp16 > ACPI_NFIT_TYPE_RESERVED)
1640 Temp16 = ACPI_NFIT_TYPE_RESERVED;
1643 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
1644 AcpiDmNfitSubnames[Temp16]);
1649 /* PCCT subtable types */
1652 if (Temp8 > ACPI_PCCT_TYPE_RESERVED)
1654 Temp8 = ACPI_PCCT_TYPE_RESERVED;
1657 AcpiOsPrintf (UINT8_FORMAT, *Target,
1658 AcpiDmPcctSubnames[Temp8]);
1663 /* PMTT subtable types */
1666 if (Temp16 > ACPI_PHAT_TYPE_RESERVED)
1668 Temp16 = ACPI_PHAT_TYPE_RESERVED;
1671 AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16(Target),
1672 AcpiDmPhatSubnames[Temp16]);
1677 /* PMTT subtable types */
1680 if (Temp8 == ACPI_PMTT_TYPE_VENDOR)
1682 Temp8 = ACPI_PMTT_TYPE_RESERVED + 1;
1684 else if (Temp8 > ACPI_PMTT_TYPE_RESERVED)
1686 Temp8 = ACPI_PMTT_TYPE_RESERVED;
1688 AcpiOsPrintf (UINT8_FORMAT, *Target,
1689 AcpiDmPmttSubnames[Temp8]);
1694 /* PPTT subtable types */
1697 if (Temp8 > ACPI_PPTT_TYPE_RESERVED)
1699 Temp8 = ACPI_PPTT_TYPE_RESERVED;
1702 AcpiOsPrintf (UINT8_FORMAT, *Target,
1703 AcpiDmPpttSubnames[Temp8]);
1706 case ACPI_DMT_UNICODE:
1708 if (ByteLength == 0)
1710 AcpiOsPrintf ("/* Zero-length Data */\n");
1714 AcpiDmDumpUnicode (Table, CurrentOffset, ByteLength);
1717 case ACPI_DMT_RAW_BUFFER:
1718 case ACPI_DMT_BUFFER:
1719 case ACPI_DMT_PMTT_VENDOR:
1721 if (ByteLength == 0)
1723 AcpiOsPrintf ("/* Zero-length Data */\n");
1727 AcpiDmDumpBuffer (Target, 0, ByteLength, 0, NULL);
1732 /* RGRT subtable types */
1735 if (Temp8 >= ACPI_RGRT_TYPE_RESERVED)
1737 Temp8 = ACPI_RGRT_TYPE_RESERVED0;
1740 AcpiOsPrintf (UINT8_FORMAT, *Target,
1741 AcpiDmRgrtSubnames[Temp8]);
1746 /* SDEV subtable types */
1749 if (Temp8 > ACPI_SDEV_TYPE_RESERVED)
1751 Temp8 = ACPI_SDEV_TYPE_RESERVED;
1754 AcpiOsPrintf (UINT8_FORMAT, *Target,
1755 AcpiDmSdevSubnames[Temp8]);
1760 /* SRAT subtable types */
1763 if (Temp8 > ACPI_SRAT_TYPE_RESERVED)
1765 Temp8 = ACPI_SRAT_TYPE_RESERVED;
1768 AcpiOsPrintf (UINT8_FORMAT, *Target,
1769 AcpiDmSratSubnames[Temp8]);
1774 /* TPM2 Start Method types */
1777 if (Temp8 > ACPI_TPM2_RESERVED)
1779 Temp8 = ACPI_TPM2_RESERVED;
1782 AcpiOsPrintf (UINT8_FORMAT, *Target,
1783 AcpiDmTpm2Subnames[Temp8]);
1787 case ACPI_DMT_FADTPM:
1789 /* FADT Preferred PM Profile names */
1792 if (Temp8 > ACPI_FADT_PM_RESERVED)
1794 Temp8 = ACPI_FADT_PM_RESERVED;
1797 AcpiOsPrintf (UINT8_FORMAT, *Target,
1798 AcpiDmFadtProfiles[Temp8]);
1803 /* IVRS subtable types */
1808 case ACPI_IVRS_TYPE_HARDWARE1:
1809 case ACPI_IVRS_TYPE_HARDWARE2:
1811 Name = AcpiDmIvrsSubnames[0];
1814 case ACPI_IVRS_TYPE_HARDWARE3:
1816 Name = AcpiDmIvrsSubnames[1];
1819 case ACPI_IVRS_TYPE_MEMORY1:
1820 case ACPI_IVRS_TYPE_MEMORY2:
1821 case ACPI_IVRS_TYPE_MEMORY3:
1823 Name = AcpiDmIvrsSubnames[2];
1828 Name = AcpiDmIvrsSubnames[3];
1832 AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
1835 case ACPI_DMT_IVRS_DE:
1837 /* IVRS device entry types */
1842 case ACPI_IVRS_TYPE_ALL:
1843 case ACPI_IVRS_TYPE_SELECT:
1844 case ACPI_IVRS_TYPE_START:
1845 case ACPI_IVRS_TYPE_END:
1847 Name = AcpiDmIvrsDevEntryNames[Temp8];
1850 case ACPI_IVRS_TYPE_ALIAS_SELECT:
1851 case ACPI_IVRS_TYPE_ALIAS_START:
1852 case ACPI_IVRS_TYPE_EXT_SELECT:
1853 case ACPI_IVRS_TYPE_EXT_START:
1854 case ACPI_IVRS_TYPE_SPECIAL:
1856 Name = AcpiDmIvrsDevEntryNames[Temp8 - 61];
1859 case ACPI_IVRS_TYPE_HID:
1861 Name = AcpiDmIvrsDevEntryNames[Temp8 - 228];
1865 Name = AcpiDmIvrsDevEntryNames[0]; /* Unknown/Reserved */
1869 AcpiOsPrintf (UINT8_FORMAT, *Target, Name);
1874 /* LPIT subtable types */
1876 Temp32 = ACPI_GET32 (Target);
1877 if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
1879 Temp32 = ACPI_LPIT_TYPE_RESERVED;
1882 AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
1883 AcpiDmLpitSubnames[Temp32]);
1888 /* VIOT subtable types */
1891 if (Temp8 > ACPI_VIOT_RESERVED)
1893 Temp8 = ACPI_VIOT_RESERVED;
1896 AcpiOsPrintf (UINT8_FORMAT, *Target,
1897 AcpiDmViotSubnames[Temp8]);
1906 ACPI_ERROR ((AE_INFO,
1907 "**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
1908 return (AE_SUPPORT);
1912 if (TableOffset && !SubtableLength)
1915 * If this table is not the main table, the subtable must have a
1918 AcpiOsPrintf ("Invalid zero length subtable\n");
1919 return (AE_BAD_DATA);