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 - 2018, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
122 * 1. Redistributions of source code must retain the above copyright
123 * notice, this list of conditions, and the following disclaimer,
124 * without modification.
125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
126 * substantially similar to the "NO WARRANTY" disclaimer below
127 * ("Disclaimer") and any redistribution must be conditioned upon
128 * including a substantially similar Disclaimer requirement for further
129 * binary redistribution.
130 * 3. Neither the names of the above-listed copyright holders nor the names
131 * of any contributors may be used to endorse or promote products derived
132 * from this software without specific prior written permission.
134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 * Alternatively, you may choose to be licensed under the terms of the
147 * GNU General Public License ("GPL") version 2 as published by the Free
148 * Software Foundation.
150 *****************************************************************************/
153 #include "accommon.h"
154 #include "acdisasm.h"
155 #include "actables.h"
156 #include "aslcompiler.h"
158 /* This module used for application-level code only */
160 #define _COMPONENT ACPI_CA_DISASSEMBLER
161 ACPI_MODULE_NAME ("dmtable")
168 /* Common format strings for commented values */
170 #define UINT8_FORMAT "%2.2X [%s]\n"
171 #define UINT16_FORMAT "%4.4X [%s]\n"
172 #define UINT32_FORMAT "%8.8X [%s]\n"
173 #define STRING_FORMAT "[%s]\n"
175 /* These tables map a subtable type to a description string */
177 static const char *AcpiDmAsfSubnames
[] =
181 "ASF Remote Control",
182 "ASF RMCP Boot Options",
184 "Unknown Subtable Type" /* Reserved */
187 static const char *AcpiDmDmarSubnames
[] =
189 "Hardware Unit Definition",
190 "Reserved Memory Region",
191 "Root Port ATS Capability",
192 "Remapping Hardware Static Affinity",
193 "ACPI Namespace Device Declaration",
194 "Unknown Subtable Type" /* Reserved */
197 static const char *AcpiDmDmarScope
[] =
200 "PCI Endpoint Device",
203 "Message-capable HPET Device",
205 "Unknown Scope Type" /* Reserved */
208 static const char *AcpiDmEinjActions
[] =
217 "Get Command Status",
218 "Set Error Type With Address",
219 "Get Execute Timings",
223 static const char *AcpiDmEinjInstructions
[] =
226 "Read Register Value",
228 "Write Register Value",
231 "Unknown Instruction"
234 static const char *AcpiDmErstActions
[] =
236 "Begin Write Operation",
237 "Begin Read Operation",
238 "Begin Clear Operation",
243 "Get Command Status",
244 "Get Record Identifier",
245 "Set Record Identifier",
248 "Unused/Unknown Action",
249 "Get Error Address Range",
250 "Get Error Address Length",
251 "Get Error Attributes",
256 static const char *AcpiDmErstInstructions
[] =
259 "Read Register Value",
261 "Write Register Value",
274 "Set Source Address",
275 "Set Destination Address",
277 "Unknown Instruction"
280 static const char *AcpiDmGtdtSubnames
[] =
282 "Generic Timer Block",
283 "Generic Watchdog Timer",
284 "Unknown Subtable Type" /* Reserved */
287 static const char *AcpiDmHestSubnames
[] =
289 "IA-32 Machine Check Exception",
290 "IA-32 Corrected Machine Check",
291 "IA-32 Non-Maskable Interrupt",
292 "Unknown Subtable Type", /* 3 - Reserved */
293 "Unknown Subtable Type", /* 4 - Reserved */
294 "Unknown Subtable Type", /* 5 - Reserved */
295 "PCI Express Root Port AER",
296 "PCI Express AER (AER Endpoint)",
297 "PCI Express/PCI-X Bridge AER",
298 "Generic Hardware Error Source",
299 "Generic Hardware Error Source V2",
300 "IA-32 Deferred Machine Check",
301 "Unknown Subtable Type" /* Reserved */
304 static const char *AcpiDmHestNotifySubnames
[] =
307 "External Interrupt",
311 "CMCI", /* ACPI 5.0 */
312 "MCE", /* ACPI 5.0 */
313 "GPIO", /* ACPI 6.0 */
314 "SEA", /* ACPI 6.1 */
315 "SEI", /* ACPI 6.1 */
316 "GSIV", /* ACPI 6.1 */
317 "Software Delegated Exception", /* ACPI 6.2 */
318 "Unknown Notify Type" /* Reserved */
321 static const char *AcpiDmHmatSubnames
[] =
323 "Memory Subystem Address Range",
324 "System Locality Latency and Bandwidth Information",
325 "Memory Side Cache Information",
326 "Unknown Structure Type" /* Reserved */
329 static const char *AcpiDmMadtSubnames
[] =
331 "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
332 "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
333 "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
334 "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
335 "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
336 "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
337 "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
338 "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
339 "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
340 "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
341 "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
342 "Generic Interrupt Controller", /* ACPI_MADT_GENERIC_INTERRUPT */
343 "Generic Interrupt Distributor", /* ACPI_MADT_GENERIC_DISTRIBUTOR */
344 "Generic MSI Frame", /* ACPI_MADT_GENERIC_MSI_FRAME */
345 "Generic Interrupt Redistributor", /* ACPI_MADT_GENERIC_REDISTRIBUTOR */
346 "Generic Interrupt Translator", /* ACPI_MADT_GENERIC_TRANSLATOR */
347 "Unknown Subtable Type" /* Reserved */
350 static const char *AcpiDmNfitSubnames
[] =
352 "System Physical Address Range", /* ACPI_NFIT_TYPE_SYSTEM_ADDRESS */
353 "Memory Range Map", /* ACPI_NFIT_TYPE_MEMORY_MAP */
354 "Interleave Info", /* ACPI_NFIT_TYPE_INTERLEAVE */
355 "SMBIOS Information", /* ACPI_NFIT_TYPE_SMBIOS */
356 "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */
357 "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */
358 "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
359 "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */
360 "Unknown Subtable Type" /* Reserved */
363 static const char *AcpiDmPcctSubnames
[] =
365 "Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
366 "HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
367 "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
368 "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
369 "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
370 "Unknown Subtable Type" /* Reserved */
373 static const char *AcpiDmPmttSubnames
[] =
375 "Socket", /* ACPI_PMTT_TYPE_SOCKET */
376 "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */
377 "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */
378 "Unknown Subtable Type" /* Reserved */
381 static const char *AcpiDmPpttSubnames
[] =
383 "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
384 "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
385 "ID", /* ACPI_PPTT_TYPE_ID */
386 "Unknown Subtable Type" /* Reserved */
389 static const char *AcpiDmSdevSubnames
[] =
391 "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
392 "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
393 "Unknown Subtable Type" /* Reserved */
396 static const char *AcpiDmSratSubnames
[] =
398 "Processor Local APIC/SAPIC Affinity",
400 "Processor Local x2APIC Affinity",
402 "GIC ITS Affinity", /* Acpi 6.2 */
403 "Unknown Subtable Type" /* Reserved */
406 static const char *AcpiDmTpm2Subnames
[] =
408 "Illegal Start Method value",
415 "Command Response Buffer",
416 "Command Response Buffer with ACPI Start Method",
419 "Command Response Buffer with ARM SMC",
420 "Unknown Subtable Type" /* Reserved */
423 static const char *AcpiDmIvrsSubnames
[] =
425 "Hardware Definition Block",
426 "Memory Definition Block",
427 "Unknown Subtable Type" /* Reserved */
430 static const char *AcpiDmLpitSubnames
[] =
432 "Native C-state Idle Structure",
433 "Unknown Subtable Type" /* Reserved */
436 #define ACPI_FADT_PM_RESERVED 9
438 static const char *AcpiDmFadtProfiles
[] =
447 "Performance Server",
449 "Unknown Profile Type"
452 #define ACPI_GAS_WIDTH_RESERVED 5
454 static const char *AcpiDmGasAccessWidth
[] =
461 "Unknown Width Encoding"
465 /*******************************************************************************
467 * ACPI Table Data, indexed by signature.
469 * Each entry contains: Signature, Table Info, Handler, DtHandler,
470 * Template, Description
472 * Simple tables have only a TableInfo structure, complex tables have a
473 * handler. This table must be NULL terminated. RSDP and FACS are
474 * special-cased elsewhere.
476 * Note: Any tables added here should be duplicated within AcpiSupportedTables
477 * in the file common/ahtable.c
479 ******************************************************************************/
481 const ACPI_DMTABLE_DATA AcpiDmTableData
[] =
483 {ACPI_SIG_ASF
, NULL
, AcpiDmDumpAsf
, DtCompileAsf
, TemplateAsf
},
484 {ACPI_SIG_BERT
, AcpiDmTableInfoBert
, NULL
, NULL
, TemplateBert
},
485 {ACPI_SIG_BGRT
, AcpiDmTableInfoBgrt
, NULL
, NULL
, TemplateBgrt
},
486 {ACPI_SIG_BOOT
, AcpiDmTableInfoBoot
, NULL
, NULL
, TemplateBoot
},
487 {ACPI_SIG_CPEP
, NULL
, AcpiDmDumpCpep
, DtCompileCpep
, TemplateCpep
},
488 {ACPI_SIG_CSRT
, NULL
, AcpiDmDumpCsrt
, DtCompileCsrt
, TemplateCsrt
},
489 {ACPI_SIG_DBG2
, AcpiDmTableInfoDbg2
, AcpiDmDumpDbg2
, DtCompileDbg2
, TemplateDbg2
},
490 {ACPI_SIG_DBGP
, AcpiDmTableInfoDbgp
, NULL
, NULL
, TemplateDbgp
},
491 {ACPI_SIG_DMAR
, NULL
, AcpiDmDumpDmar
, DtCompileDmar
, TemplateDmar
},
492 {ACPI_SIG_DRTM
, NULL
, AcpiDmDumpDrtm
, DtCompileDrtm
, TemplateDrtm
},
493 {ACPI_SIG_ECDT
, AcpiDmTableInfoEcdt
, NULL
, NULL
, TemplateEcdt
},
494 {ACPI_SIG_EINJ
, NULL
, AcpiDmDumpEinj
, DtCompileEinj
, TemplateEinj
},
495 {ACPI_SIG_ERST
, NULL
, AcpiDmDumpErst
, DtCompileErst
, TemplateErst
},
496 {ACPI_SIG_FADT
, NULL
, AcpiDmDumpFadt
, DtCompileFadt
, TemplateFadt
},
497 {ACPI_SIG_FPDT
, NULL
, AcpiDmDumpFpdt
, DtCompileFpdt
, TemplateFpdt
},
498 {ACPI_SIG_GTDT
, NULL
, AcpiDmDumpGtdt
, DtCompileGtdt
, TemplateGtdt
},
499 {ACPI_SIG_HEST
, NULL
, AcpiDmDumpHest
, DtCompileHest
, TemplateHest
},
500 {ACPI_SIG_HMAT
, NULL
, AcpiDmDumpHmat
, DtCompileHmat
, TemplateHmat
},
501 {ACPI_SIG_HPET
, AcpiDmTableInfoHpet
, NULL
, NULL
, TemplateHpet
},
502 {ACPI_SIG_IORT
, NULL
, AcpiDmDumpIort
, DtCompileIort
, TemplateIort
},
503 {ACPI_SIG_IVRS
, NULL
, AcpiDmDumpIvrs
, DtCompileIvrs
, TemplateIvrs
},
504 {ACPI_SIG_LPIT
, NULL
, AcpiDmDumpLpit
, DtCompileLpit
, TemplateLpit
},
505 {ACPI_SIG_MADT
, NULL
, AcpiDmDumpMadt
, DtCompileMadt
, TemplateMadt
},
506 {ACPI_SIG_MCFG
, NULL
, AcpiDmDumpMcfg
, DtCompileMcfg
, TemplateMcfg
},
507 {ACPI_SIG_MCHI
, AcpiDmTableInfoMchi
, NULL
, NULL
, TemplateMchi
},
508 {ACPI_SIG_MPST
, AcpiDmTableInfoMpst
, AcpiDmDumpMpst
, DtCompileMpst
, TemplateMpst
},
509 {ACPI_SIG_MSCT
, NULL
, AcpiDmDumpMsct
, DtCompileMsct
, TemplateMsct
},
510 {ACPI_SIG_MSDM
, NULL
, AcpiDmDumpSlic
, DtCompileSlic
, TemplateMsdm
},
511 {ACPI_SIG_MTMR
, NULL
, AcpiDmDumpMtmr
, DtCompileMtmr
, TemplateMtmr
},
512 {ACPI_SIG_NFIT
, AcpiDmTableInfoNfit
, AcpiDmDumpNfit
, DtCompileNfit
, TemplateNfit
},
513 {ACPI_SIG_PCCT
, AcpiDmTableInfoPcct
, AcpiDmDumpPcct
, DtCompilePcct
, TemplatePcct
},
514 {ACPI_SIG_PDTT
, AcpiDmTableInfoPdtt
, AcpiDmDumpPdtt
, DtCompilePdtt
, TemplatePdtt
},
515 {ACPI_SIG_PMTT
, NULL
, AcpiDmDumpPmtt
, DtCompilePmtt
, TemplatePmtt
},
516 {ACPI_SIG_PPTT
, NULL
, AcpiDmDumpPptt
, DtCompilePptt
, TemplatePptt
},
517 {ACPI_SIG_RASF
, AcpiDmTableInfoRasf
, NULL
, NULL
, TemplateRasf
},
518 {ACPI_SIG_RSDT
, NULL
, AcpiDmDumpRsdt
, DtCompileRsdt
, TemplateRsdt
},
519 {ACPI_SIG_S3PT
, NULL
, NULL
, NULL
, TemplateS3pt
},
520 {ACPI_SIG_SBST
, AcpiDmTableInfoSbst
, NULL
, NULL
, TemplateSbst
},
521 {ACPI_SIG_SDEI
, AcpiDmTableInfoSdei
, NULL
, NULL
, TemplateSdei
},
522 {ACPI_SIG_SDEV
, AcpiDmTableInfoSdev
, AcpiDmDumpSdev
, DtCompileSdev
, TemplateSdev
},
523 {ACPI_SIG_SLIC
, NULL
, AcpiDmDumpSlic
, DtCompileSlic
, TemplateSlic
},
524 {ACPI_SIG_SLIT
, NULL
, AcpiDmDumpSlit
, DtCompileSlit
, TemplateSlit
},
525 {ACPI_SIG_SPCR
, AcpiDmTableInfoSpcr
, NULL
, NULL
, TemplateSpcr
},
526 {ACPI_SIG_SPMI
, AcpiDmTableInfoSpmi
, NULL
, NULL
, TemplateSpmi
},
527 {ACPI_SIG_SRAT
, NULL
, AcpiDmDumpSrat
, DtCompileSrat
, TemplateSrat
},
528 {ACPI_SIG_STAO
, NULL
, AcpiDmDumpStao
, DtCompileStao
, TemplateStao
},
529 {ACPI_SIG_TCPA
, NULL
, AcpiDmDumpTcpa
, DtCompileTcpa
, TemplateTcpa
},
530 {ACPI_SIG_TPM2
, AcpiDmTableInfoTpm2
, AcpiDmDumpTpm2
, DtCompileTpm2
, TemplateTpm2
},
531 {ACPI_SIG_UEFI
, AcpiDmTableInfoUefi
, NULL
, DtCompileUefi
, TemplateUefi
},
532 {ACPI_SIG_VRTC
, AcpiDmTableInfoVrtc
, AcpiDmDumpVrtc
, DtCompileVrtc
, TemplateVrtc
},
533 {ACPI_SIG_WAET
, AcpiDmTableInfoWaet
, NULL
, NULL
, TemplateWaet
},
534 {ACPI_SIG_WDAT
, NULL
, AcpiDmDumpWdat
, DtCompileWdat
, TemplateWdat
},
535 {ACPI_SIG_WDDT
, AcpiDmTableInfoWddt
, NULL
, NULL
, TemplateWddt
},
536 {ACPI_SIG_WDRT
, AcpiDmTableInfoWdrt
, NULL
, NULL
, TemplateWdrt
},
537 {ACPI_SIG_WPBT
, NULL
, AcpiDmDumpWpbt
, DtCompileWpbt
, TemplateWpbt
},
538 {ACPI_SIG_WSMT
, AcpiDmTableInfoWsmt
, NULL
, NULL
, TemplateWsmt
},
539 {ACPI_SIG_XENV
, AcpiDmTableInfoXenv
, NULL
, NULL
, TemplateXenv
},
540 {ACPI_SIG_XSDT
, NULL
, AcpiDmDumpXsdt
, DtCompileXsdt
, TemplateXsdt
},
541 {NULL
, NULL
, NULL
, NULL
, NULL
}
545 /*******************************************************************************
547 * FUNCTION: AcpiDmGenerateChecksum
549 * PARAMETERS: Table - Pointer to table to be checksummed
550 * Length - Length of the table
551 * OriginalChecksum - Value of the checksum field
553 * RETURN: 8 bit checksum of buffer
555 * DESCRIPTION: Computes an 8 bit checksum of the table.
557 ******************************************************************************/
560 AcpiDmGenerateChecksum (
563 UINT8 OriginalChecksum
)
568 /* Sum the entire table as-is */
570 Checksum
= AcpiTbChecksum ((UINT8
*) Table
, Length
);
572 /* Subtract off the existing checksum value in the table */
574 Checksum
= (UINT8
) (Checksum
- OriginalChecksum
);
576 /* Compute the final checksum */
578 Checksum
= (UINT8
) (0 - Checksum
);
583 /*******************************************************************************
585 * FUNCTION: AcpiDmGetTableData
587 * PARAMETERS: Signature - ACPI signature (4 chars) to match
589 * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
591 * DESCRIPTION: Find a match in the global table of supported ACPI tables
593 ******************************************************************************/
595 const ACPI_DMTABLE_DATA
*
599 const ACPI_DMTABLE_DATA
*Info
;
602 for (Info
= AcpiDmTableData
; Info
->Signature
; Info
++)
604 if (ACPI_COMPARE_NAME (Signature
, Info
->Signature
))
614 /*******************************************************************************
616 * FUNCTION: AcpiDmDumpDataTable
618 * PARAMETERS: Table - An ACPI table
622 * DESCRIPTION: Format the contents of an ACPI data table (any table other
623 * than an SSDT or DSDT that does not contain executable AML code)
625 ******************************************************************************/
628 AcpiDmDumpDataTable (
629 ACPI_TABLE_HEADER
*Table
)
632 const ACPI_DMTABLE_DATA
*TableData
;
636 /* Ignore tables that contain AML */
638 if (AcpiUtIsAmlTable (Table
))
640 if (AslGbl_VerboseTemplates
)
642 /* Dump the raw table data */
644 Length
= Table
->Length
;
646 AcpiOsPrintf ("\n/*\n%s: Length %d (0x%X)\n\n",
647 ACPI_RAW_TABLE_DATA_HEADER
, Length
, Length
);
648 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8
, Table
),
649 Length
, DB_BYTE_DISPLAY
, 0);
650 AcpiOsPrintf (" */\n");
656 * Handle tables that don't use the common ACPI table header structure.
657 * Currently, these are the FACS, RSDP, and S3PT.
659 if (ACPI_COMPARE_NAME (Table
->Signature
, ACPI_SIG_FACS
))
661 Length
= Table
->Length
;
662 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoFacs
);
663 if (ACPI_FAILURE (Status
))
668 else if (ACPI_VALIDATE_RSDP_SIG (Table
->Signature
))
670 Length
= AcpiDmDumpRsdp (Table
);
672 else if (ACPI_COMPARE_NAME (Table
->Signature
, ACPI_SIG_S3PT
))
674 Length
= AcpiDmDumpS3pt (Table
);
679 * All other tables must use the common ACPI table header, dump it now
681 Length
= Table
->Length
;
682 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoHeader
);
683 if (ACPI_FAILURE (Status
))
689 /* Match signature and dispatch appropriately */
691 TableData
= AcpiDmGetTableData (Table
->Signature
);
694 if (!strncmp (Table
->Signature
, "OEM", 3))
696 AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
701 AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
704 fprintf (stderr
, "Unknown ACPI table signature [%4.4s], ",
707 if (!AcpiGbl_ForceAmlDisassembly
)
709 fprintf (stderr
, "decoding ACPI table header only\n");
713 fprintf (stderr
, "assuming table contains valid AML code\n");
717 else if (TableData
->TableHandler
)
719 /* Complex table, has a handler */
721 TableData
->TableHandler (Table
);
723 else if (TableData
->TableInfo
)
725 /* Simple table, just walk the info table */
727 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, TableData
->TableInfo
);
728 if (ACPI_FAILURE (Status
))
735 if (!AslGbl_DoTemplates
|| AslGbl_VerboseTemplates
)
737 /* Dump the raw table data */
739 AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
740 ACPI_RAW_TABLE_DATA_HEADER
, Length
, Length
);
741 AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8
, Table
),
742 Length
, DB_BYTE_DISPLAY
, 0);
747 /*******************************************************************************
749 * FUNCTION: AcpiDmLineHeader
751 * PARAMETERS: Offset - Current byte offset, from table start
752 * ByteLength - Length of the field in bytes, 0 for flags
753 * Name - Name of this field
757 * DESCRIPTION: Utility routines for formatting output lines. Displays the
758 * current table offset in hex and decimal, the field length,
759 * and the field name.
761 ******************************************************************************/
770 /* Allow a null name for fields that span multiple lines (large buffers) */
777 if (AslGbl_DoTemplates
&& !AslGbl_VerboseTemplates
) /* Terse template */
781 AcpiOsPrintf ("[%.4d] %34s : ", ByteLength
, Name
);
787 AcpiOsPrintf ("%41s : ", Name
);
791 AcpiOsPrintf ("%41s ", Name
);
795 else /* Normal disassembler or verbose template */
799 AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
800 Offset
, Offset
, ByteLength
, Name
);
806 AcpiOsPrintf ("%44s : ", Name
);
810 AcpiOsPrintf ("%44s ", Name
);
824 if (AslGbl_DoTemplates
&& !AslGbl_VerboseTemplates
) /* Terse template */
828 AcpiOsPrintf ("[%.4d] %30s %3d : ",
829 ByteLength
, Name
, Value
);
833 AcpiOsPrintf ("%36s % 3d : ",
837 else /* Normal disassembler or verbose template */
841 AcpiOsPrintf ("[%3.3Xh %4.4d %3d] %24s %3d : ",
842 Offset
, Offset
, ByteLength
, Name
, Value
);
846 AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s %3d : ",
847 Offset
, Offset
, Name
, Value
);
853 /*******************************************************************************
855 * FUNCTION: AcpiDmDumpTable
857 * PARAMETERS: TableLength - Length of the entire ACPI table
858 * TableOffset - Starting offset within the table for this
859 * sub-descriptor (0 if main table)
860 * Table - The ACPI table
861 * SubtableLength - Length of this sub-descriptor
862 * Info - Info table for this ACPI table
866 * DESCRIPTION: Display ACPI table contents by walking the Info table.
868 * Note: This function must remain in sync with DtGetFieldLength.
870 ******************************************************************************/
877 UINT32 SubtableLength
,
878 ACPI_DMTABLE_INFO
*Info
)
881 UINT32 CurrentOffset
;
887 const AH_TABLE
*TableData
;
889 BOOLEAN LastOutputBlankLine
= FALSE
;
891 char RepairedName
[8];
896 AcpiOsPrintf ("Display not implemented\n");
897 return (AE_NOT_IMPLEMENTED
);
900 /* Walk entire Info table; Null name terminates */
902 for (; Info
->Name
; Info
++)
905 * Target points to the field within the ACPI Table. CurrentOffset is
906 * the offset of the field from the start of the main table.
908 Target
= ACPI_ADD_PTR (UINT8
, Table
, Info
->Offset
);
909 CurrentOffset
= TableOffset
+ Info
->Offset
;
911 /* Check for beyond subtable end or (worse) beyond EOT */
913 if (SubtableLength
&& (Info
->Offset
>= SubtableLength
))
916 "/**** ACPI subtable terminates early - "
917 "may be older version (dump table) */\n");
919 /* Move on to next subtable */
924 if (CurrentOffset
>= TableLength
)
927 "/**** ACPI table terminates "
928 "in the middle of a data structure! (dump table) */\n");
929 return (AE_BAD_DATA
);
932 /* Generate the byte length for this field */
934 switch (Info
->Opcode
)
937 case ACPI_DMT_CHKSUM
:
938 case ACPI_DMT_SPACEID
:
939 case ACPI_DMT_ACCWIDTH
:
949 case ACPI_DMT_HESTNTYP
:
950 case ACPI_DMT_FADTPM
:
951 case ACPI_DMT_EINJACT
:
952 case ACPI_DMT_EINJINST
:
953 case ACPI_DMT_ERSTACT
:
954 case ACPI_DMT_ERSTINST
:
955 case ACPI_DMT_DMAR_SCOPE
:
960 case ACPI_DMT_UINT16
:
969 case ACPI_DMT_UINT24
:
974 case ACPI_DMT_UINT32
:
983 case ACPI_DMT_UINT40
:
988 case ACPI_DMT_UINT48
:
994 case ACPI_DMT_UINT56
:
1000 case ACPI_DMT_UINT64
:
1001 case ACPI_DMT_NAME8
:
1006 case ACPI_DMT_BUF10
:
1011 case ACPI_DMT_BUF12
:
1016 case ACPI_DMT_BUF16
:
1022 case ACPI_DMT_BUF128
:
1027 case ACPI_DMT_UNICODE
:
1028 case ACPI_DMT_BUFFER
:
1029 case ACPI_DMT_RAW_BUFFER
:
1031 ByteLength
= SubtableLength
;
1034 case ACPI_DMT_STRING
:
1036 ByteLength
= strlen (ACPI_CAST_PTR (char, Target
)) + 1;
1041 if (!LastOutputBlankLine
)
1043 AcpiOsPrintf ("\n");
1044 LastOutputBlankLine
= TRUE
;
1047 ByteLength
= sizeof (ACPI_GENERIC_ADDRESS
);
1050 case ACPI_DMT_HESTNTFY
:
1052 if (!LastOutputBlankLine
)
1054 AcpiOsPrintf ("\n");
1055 LastOutputBlankLine
= TRUE
;
1058 ByteLength
= sizeof (ACPI_HEST_NOTIFY
);
1061 case ACPI_DMT_IORTMEM
:
1063 if (!LastOutputBlankLine
)
1065 LastOutputBlankLine
= FALSE
;
1068 ByteLength
= sizeof (ACPI_IORT_MEMORY_ACCESS
);
1077 /* Check if we are beyond a subtable, or (worse) beyond EOT */
1079 if (CurrentOffset
+ ByteLength
> TableLength
)
1084 "/**** ACPI subtable terminates early - "
1085 "may be older version (dump table) */\n");
1087 /* Move on to next subtable */
1093 "/**** ACPI table terminates "
1094 "in the middle of a data structure! */\n");
1095 return (AE_BAD_DATA
);
1098 if (Info
->Opcode
== ACPI_DMT_EXTRA_TEXT
)
1100 AcpiOsPrintf ("%s", Info
->Name
);
1104 /* Start a new line and decode the opcode */
1106 AcpiDmLineHeader (CurrentOffset
, ByteLength
, Info
->Name
);
1108 switch (Info
->Opcode
)
1110 /* Single-bit Flag fields. Note: Opcode is the bit position */
1112 case ACPI_DMT_FLAG0
:
1113 case ACPI_DMT_FLAG1
:
1114 case ACPI_DMT_FLAG2
:
1115 case ACPI_DMT_FLAG3
:
1116 case ACPI_DMT_FLAG4
:
1117 case ACPI_DMT_FLAG5
:
1118 case ACPI_DMT_FLAG6
:
1119 case ACPI_DMT_FLAG7
:
1121 AcpiOsPrintf ("%1.1X\n", (*Target
>> Info
->Opcode
) & 0x01);
1124 /* 2-bit Flag fields */
1126 case ACPI_DMT_FLAGS0
:
1128 AcpiOsPrintf ("%1.1X\n", *Target
& 0x03);
1131 case ACPI_DMT_FLAGS1
:
1133 AcpiOsPrintf ("%1.1X\n", (*Target
>> 1) & 0x03);
1136 case ACPI_DMT_FLAGS2
:
1138 AcpiOsPrintf ("%1.1X\n", (*Target
>> 2) & 0x03);
1141 case ACPI_DMT_FLAGS4
:
1143 AcpiOsPrintf ("%1.1X\n", (*Target
>> 4) & 0x03);
1146 case ACPI_DMT_FLAGS4_0
:
1148 AcpiOsPrintf ("%1.1X\n", (*(UINT32
*)Target
) & 0x0F);
1151 case ACPI_DMT_FLAGS4_4
:
1153 AcpiOsPrintf ("%1.1X\n", (*(UINT32
*)Target
>> 4) & 0x0F);
1156 case ACPI_DMT_FLAGS4_8
:
1158 AcpiOsPrintf ("%1.1X\n", (*(UINT32
*)Target
>> 8) & 0x0F);
1161 case ACPI_DMT_FLAGS4_12
:
1163 AcpiOsPrintf ("%1.1X\n", (*(UINT32
*)Target
>> 12) & 0x0F);
1166 case ACPI_DMT_FLAGS16_16
:
1168 AcpiOsPrintf ("%4.4X\n", (*(UINT32
*)Target
>> 16) & 0xFFFF);
1171 /* Integer Data Types */
1173 case ACPI_DMT_UINT8
:
1174 case ACPI_DMT_UINT16
:
1175 case ACPI_DMT_UINT24
:
1176 case ACPI_DMT_UINT32
:
1177 case ACPI_DMT_UINT40
:
1178 case ACPI_DMT_UINT48
:
1179 case ACPI_DMT_UINT56
:
1180 case ACPI_DMT_UINT64
:
1182 * Dump bytes - high byte first, low byte last.
1183 * Note: All ACPI tables are little-endian.
1186 for (Temp8
= (UINT8
) ByteLength
; Temp8
> 0; Temp8
--)
1188 AcpiOsPrintf ("%2.2X", Target
[Temp8
- 1]);
1189 Value
|= Target
[Temp8
- 1];
1193 if (!Value
&& (Info
->Flags
& DT_DESCRIBES_OPTIONAL
))
1195 AcpiOsPrintf (" [Optional field not present]");
1198 AcpiOsPrintf ("\n");
1202 case ACPI_DMT_BUF10
:
1203 case ACPI_DMT_BUF12
:
1204 case ACPI_DMT_BUF16
:
1205 case ACPI_DMT_BUF128
:
1207 * Buffer: Size depends on the opcode and was set above.
1208 * Each hex byte is separated with a space.
1209 * Multiple lines are separated by line continuation char.
1211 for (Temp16
= 0; Temp16
< ByteLength
; Temp16
++)
1213 AcpiOsPrintf ("%2.2X", Target
[Temp16
]);
1214 if ((UINT32
) (Temp16
+ 1) < ByteLength
)
1216 if ((Temp16
> 0) && (!((Temp16
+1) % 16)))
1218 AcpiOsPrintf (" \\\n"); /* Line continuation */
1219 AcpiDmLineHeader (0, 0, NULL
);
1228 AcpiOsPrintf ("\n");
1233 /* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
1235 (void) AuConvertUuidToString ((char *) Target
, AslGbl_MsgBuffer
);
1237 AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer
);
1240 case ACPI_DMT_STRING
:
1242 AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target
));
1245 /* Fixed length ASCII name fields */
1249 AcpiUtCheckAndRepairAscii (Target
, RepairedName
, 4);
1250 AcpiOsPrintf ("\"%.4s\" ", RepairedName
);
1252 TableData
= AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target
));
1255 AcpiOsPrintf (STRING_FORMAT
, TableData
->Description
);
1259 AcpiOsPrintf ("\n");
1263 case ACPI_DMT_NAME4
:
1265 AcpiUtCheckAndRepairAscii (Target
, RepairedName
, 4);
1266 AcpiOsPrintf ("\"%.4s\"\n", RepairedName
);
1269 case ACPI_DMT_NAME6
:
1271 AcpiUtCheckAndRepairAscii (Target
, RepairedName
, 6);
1272 AcpiOsPrintf ("\"%.6s\"\n", RepairedName
);
1275 case ACPI_DMT_NAME8
:
1277 AcpiUtCheckAndRepairAscii (Target
, RepairedName
, 8);
1278 AcpiOsPrintf ("\"%.8s\"\n", RepairedName
);
1281 /* Special Data Types */
1283 case ACPI_DMT_CHKSUM
:
1285 /* Checksum, display and validate */
1287 AcpiOsPrintf ("%2.2X", *Target
);
1288 Temp8
= AcpiDmGenerateChecksum (Table
,
1289 ACPI_CAST_PTR (ACPI_TABLE_HEADER
, Table
)->Length
,
1290 ACPI_CAST_PTR (ACPI_TABLE_HEADER
, Table
)->Checksum
);
1292 if (Temp8
!= ACPI_CAST_PTR (ACPI_TABLE_HEADER
, Table
)->Checksum
)
1295 " /* Incorrect checksum, should be %2.2X */", Temp8
);
1298 AcpiOsPrintf ("\n");
1301 case ACPI_DMT_SPACEID
:
1303 /* Address Space ID */
1305 AcpiOsPrintf (UINT8_FORMAT
, *Target
, AcpiUtGetRegionName (*Target
));
1308 case ACPI_DMT_ACCWIDTH
:
1310 /* Encoded Access Width */
1313 if (Temp8
> ACPI_GAS_WIDTH_RESERVED
)
1315 Temp8
= ACPI_GAS_WIDTH_RESERVED
;
1318 AcpiOsPrintf (UINT8_FORMAT
, *Target
, AcpiDmGasAccessWidth
[Temp8
]);
1323 /* Generic Address Structure */
1325 AcpiOsPrintf (STRING_FORMAT
, "Generic Address Structure");
1326 Status
= AcpiDmDumpTable (TableLength
, CurrentOffset
, Target
,
1327 sizeof (ACPI_GENERIC_ADDRESS
), AcpiDmTableInfoGas
);
1328 if (ACPI_FAILURE (Status
))
1333 AcpiOsPrintf ("\n");
1334 LastOutputBlankLine
= TRUE
;
1339 /* ASF subtable types */
1341 Temp16
= (UINT16
) ((*Target
) & 0x7F); /* Top bit can be zero or one */
1342 if (Temp16
> ACPI_ASF_TYPE_RESERVED
)
1344 Temp16
= ACPI_ASF_TYPE_RESERVED
;
1347 AcpiOsPrintf (UINT8_FORMAT
, *Target
, AcpiDmAsfSubnames
[Temp16
]);
1352 /* DMAR subtable types */
1354 Temp16
= ACPI_GET16 (Target
);
1355 if (Temp16
> ACPI_DMAR_TYPE_RESERVED
)
1357 Temp16
= ACPI_DMAR_TYPE_RESERVED
;
1360 AcpiOsPrintf (UINT16_FORMAT
, ACPI_GET16 (Target
),
1361 AcpiDmDmarSubnames
[Temp16
]);
1364 case ACPI_DMT_DMAR_SCOPE
:
1366 /* DMAR device scope types */
1369 if (Temp8
> ACPI_DMAR_SCOPE_TYPE_RESERVED
)
1371 Temp8
= ACPI_DMAR_SCOPE_TYPE_RESERVED
;
1374 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1375 AcpiDmDmarScope
[Temp8
]);
1378 case ACPI_DMT_EINJACT
:
1380 /* EINJ Action types */
1383 if (Temp8
> ACPI_EINJ_ACTION_RESERVED
)
1385 Temp8
= ACPI_EINJ_ACTION_RESERVED
;
1388 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1389 AcpiDmEinjActions
[Temp8
]);
1392 case ACPI_DMT_EINJINST
:
1394 /* EINJ Instruction types */
1397 if (Temp8
> ACPI_EINJ_INSTRUCTION_RESERVED
)
1399 Temp8
= ACPI_EINJ_INSTRUCTION_RESERVED
;
1402 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1403 AcpiDmEinjInstructions
[Temp8
]);
1406 case ACPI_DMT_ERSTACT
:
1408 /* ERST Action types */
1411 if (Temp8
> ACPI_ERST_ACTION_RESERVED
)
1413 Temp8
= ACPI_ERST_ACTION_RESERVED
;
1416 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1417 AcpiDmErstActions
[Temp8
]);
1420 case ACPI_DMT_ERSTINST
:
1422 /* ERST Instruction types */
1425 if (Temp8
> ACPI_ERST_INSTRUCTION_RESERVED
)
1427 Temp8
= ACPI_ERST_INSTRUCTION_RESERVED
;
1430 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1431 AcpiDmErstInstructions
[Temp8
]);
1436 /* GTDT subtable types */
1439 if (Temp8
> ACPI_GTDT_TYPE_RESERVED
)
1441 Temp8
= ACPI_GTDT_TYPE_RESERVED
;
1444 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1445 AcpiDmGtdtSubnames
[Temp8
]);
1450 /* HEST subtable types */
1452 Temp16
= ACPI_GET16 (Target
);
1453 if (Temp16
> ACPI_HEST_TYPE_RESERVED
)
1455 Temp16
= ACPI_HEST_TYPE_RESERVED
;
1458 AcpiOsPrintf (UINT16_FORMAT
, ACPI_GET16 (Target
),
1459 AcpiDmHestSubnames
[Temp16
]);
1462 case ACPI_DMT_HESTNTFY
:
1464 AcpiOsPrintf (STRING_FORMAT
,
1465 "Hardware Error Notification Structure");
1467 Status
= AcpiDmDumpTable (TableLength
, CurrentOffset
, Target
,
1468 sizeof (ACPI_HEST_NOTIFY
), AcpiDmTableInfoHestNotify
);
1469 if (ACPI_FAILURE (Status
))
1474 AcpiOsPrintf ("\n");
1475 LastOutputBlankLine
= TRUE
;
1478 case ACPI_DMT_HESTNTYP
:
1480 /* HEST Notify types */
1483 if (Temp8
> ACPI_HEST_NOTIFY_RESERVED
)
1485 Temp8
= ACPI_HEST_NOTIFY_RESERVED
;
1488 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1489 AcpiDmHestNotifySubnames
[Temp8
]);
1494 /* HMAT subtable types */
1497 if (Temp16
> ACPI_HMAT_TYPE_RESERVED
)
1499 Temp16
= ACPI_HMAT_TYPE_RESERVED
;
1502 AcpiOsPrintf (UINT16_FORMAT
, *Target
,
1503 AcpiDmHmatSubnames
[Temp16
]);
1506 case ACPI_DMT_IORTMEM
:
1508 AcpiOsPrintf (STRING_FORMAT
,
1509 "IORT Memory Access Properties");
1511 Status
= AcpiDmDumpTable (TableLength
, CurrentOffset
, Target
,
1512 sizeof (ACPI_IORT_MEMORY_ACCESS
), AcpiDmTableInfoIortAcc
);
1513 if (ACPI_FAILURE (Status
))
1518 LastOutputBlankLine
= TRUE
;
1523 /* MADT subtable types */
1526 if (Temp8
> ACPI_MADT_TYPE_RESERVED
)
1528 Temp8
= ACPI_MADT_TYPE_RESERVED
;
1531 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1532 AcpiDmMadtSubnames
[Temp8
]);
1537 /* NFIT subtable types */
1539 Temp16
= ACPI_GET16 (Target
);
1540 if (Temp16
> ACPI_NFIT_TYPE_RESERVED
)
1542 Temp16
= ACPI_NFIT_TYPE_RESERVED
;
1545 AcpiOsPrintf (UINT16_FORMAT
, ACPI_GET16 (Target
),
1546 AcpiDmNfitSubnames
[Temp16
]);
1551 /* PCCT subtable types */
1554 if (Temp8
> ACPI_PCCT_TYPE_RESERVED
)
1556 Temp8
= ACPI_PCCT_TYPE_RESERVED
;
1559 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1560 AcpiDmPcctSubnames
[Temp8
]);
1565 /* PMTT subtable types */
1568 if (Temp8
> ACPI_PMTT_TYPE_RESERVED
)
1570 Temp8
= ACPI_PMTT_TYPE_RESERVED
;
1573 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1574 AcpiDmPmttSubnames
[Temp8
]);
1579 /* PPTT subtable types */
1582 if (Temp8
> ACPI_PPTT_TYPE_RESERVED
)
1584 Temp8
= ACPI_PPTT_TYPE_RESERVED
;
1587 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1588 AcpiDmPpttSubnames
[Temp8
]);
1591 case ACPI_DMT_UNICODE
:
1593 if (ByteLength
== 0)
1595 AcpiOsPrintf ("/* Zero-length Data */\n");
1599 AcpiDmDumpUnicode (Table
, CurrentOffset
, ByteLength
);
1602 case ACPI_DMT_RAW_BUFFER
:
1604 if (ByteLength
== 0)
1606 AcpiOsPrintf ("/* Zero-length Data */\n");
1610 AcpiDmDumpBuffer (Table
, CurrentOffset
, ByteLength
,
1611 CurrentOffset
, NULL
);
1616 /* SDEV subtable types */
1619 if (Temp8
> ACPI_SDEV_TYPE_RESERVED
)
1621 Temp8
= ACPI_SDEV_TYPE_RESERVED
;
1624 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1625 AcpiDmSdevSubnames
[Temp8
]);
1630 /* SRAT subtable types */
1633 if (Temp8
> ACPI_SRAT_TYPE_RESERVED
)
1635 Temp8
= ACPI_SRAT_TYPE_RESERVED
;
1638 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1639 AcpiDmSratSubnames
[Temp8
]);
1644 /* TPM2 Start Method types */
1647 if (Temp8
> ACPI_TPM2_RESERVED
)
1649 Temp8
= ACPI_TPM2_RESERVED
;
1652 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1653 AcpiDmTpm2Subnames
[Temp8
]);
1657 case ACPI_DMT_FADTPM
:
1659 /* FADT Preferred PM Profile names */
1662 if (Temp8
> ACPI_FADT_PM_RESERVED
)
1664 Temp8
= ACPI_FADT_PM_RESERVED
;
1667 AcpiOsPrintf (UINT8_FORMAT
, *Target
,
1668 AcpiDmFadtProfiles
[Temp8
]);
1673 /* IVRS subtable types */
1678 case ACPI_IVRS_TYPE_HARDWARE
:
1680 Name
= AcpiDmIvrsSubnames
[0];
1683 case ACPI_IVRS_TYPE_MEMORY1
:
1684 case ACPI_IVRS_TYPE_MEMORY2
:
1685 case ACPI_IVRS_TYPE_MEMORY3
:
1687 Name
= AcpiDmIvrsSubnames
[1];
1692 Name
= AcpiDmIvrsSubnames
[2];
1696 AcpiOsPrintf (UINT8_FORMAT
, *Target
, Name
);
1701 /* LPIT subtable types */
1703 Temp32
= ACPI_GET32 (Target
);
1704 if (Temp32
> ACPI_LPIT_TYPE_RESERVED
)
1706 Temp32
= ACPI_LPIT_TYPE_RESERVED
;
1709 AcpiOsPrintf (UINT32_FORMAT
, ACPI_GET32 (Target
),
1710 AcpiDmLpitSubnames
[Temp32
]);
1719 ACPI_ERROR ((AE_INFO
,
1720 "**** Invalid table opcode [0x%X] ****\n", Info
->Opcode
));
1721 return (AE_SUPPORT
);
1725 if (TableOffset
&& !SubtableLength
)
1728 * If this table is not the main table, the subtable must have a
1731 AcpiOsPrintf ("Invalid zero length subtable\n");
1732 return (AE_BAD_DATA
);