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 - 2009, 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 *****************************************************************************/
117 #include "accommon.h"
118 #include "acdisasm.h"
119 #include "actables.h"
121 /* This module used for application-level code only */
123 #define _COMPONENT ACPI_CA_DISASSEMBLER
124 ACPI_MODULE_NAME ("dmtable")
126 /* Local Prototypes */
128 static ACPI_DMTABLE_DATA
*
139 AcpiTbGenerateChecksum (
140 ACPI_TABLE_HEADER
*Table
);
143 /* These tables map a subtable type to a description string */
145 static const char *AcpiDmAsfSubnames
[] =
149 "ASF Remote Control",
150 "ASF RMCP Boot Options",
152 "Unknown SubTable Type" /* Reserved */
155 static const char *AcpiDmDmarSubnames
[] =
157 "Hardware Unit Definition",
158 "Reserved Memory Region",
159 "Root Port ATS Capability",
160 "Remapping Hardware Static Affinity",
161 "Unknown SubTable Type" /* Reserved */
164 static const char *AcpiDmHestSubnames
[] =
166 "IA-32 Machine Check Exception",
167 "IA-32 Corrected Machine Check",
168 "IA-32 Non-Maskable Interrupt",
169 "Unknown SubTable Type", /* 3 - Reserved */
170 "Unknown SubTable Type", /* 4 - Reserved */
171 "Unknown SubTable Type", /* 5 - Reserved */
172 "PCI Express Root Port AER",
173 "PCI Express AER (AER Endpoint)",
174 "PCI Express/PCI-X Bridge AER",
175 "Generic Hardware Error Source",
176 "Unknown SubTable Type" /* Reserved */
179 static const char *AcpiDmHestNotifySubnames
[] =
182 "External Interrupt",
186 "Unknown Notify Type" /* Reserved */
189 static const char *AcpiDmMadtSubnames
[] =
191 "Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
192 "I/O APIC", /* ACPI_MADT_TYPE_IO_APIC */
193 "Interrupt Source Override", /* ACPI_MADT_TYPE_INTERRUPT_OVERRIDE */
194 "NMI Source", /* ACPI_MADT_TYPE_NMI_SOURCE */
195 "Local APIC NMI", /* ACPI_MADT_TYPE_LOCAL_APIC_NMI */
196 "Local APIC Address Override", /* ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE */
197 "I/O SAPIC", /* ACPI_MADT_TYPE_IO_SAPIC */
198 "Local SAPIC", /* ACPI_MADT_TYPE_LOCAL_SAPIC */
199 "Platform Interrupt Sources", /* ACPI_MADT_TYPE_INTERRUPT_SOURCE */
200 "Processor Local x2APIC", /* ACPI_MADT_TYPE_LOCAL_X2APIC */
201 "Local x2APIC NMI", /* ACPI_MADT_TYPE_LOCAL_X2APIC_NMI */
202 "Unknown SubTable Type" /* Reserved */
205 static const char *AcpiDmSratSubnames
[] =
207 "Processor Local APIC/SAPIC Affinity",
209 "Processor Local x2APIC Affinity",
210 "Unknown SubTable Type" /* Reserved */
213 static const char *AcpiDmIvrsSubnames
[] =
215 "Hardware Definition Block",
216 "Memory Definition Block",
217 "Unknown SubTable Type" /* Reserved */
222 #define ACPI_FADT_PM_RESERVED 8
224 static const char *AcpiDmFadtProfiles
[] =
233 "Performance Server",
234 "Unknown Profile Type"
237 /*******************************************************************************
239 * ACPI Table Data, indexed by signature.
241 * Each entry contains: Signature, Table Info, Handler, Description
243 * Simple tables have only a TableInfo structure, complex tables have a handler.
244 * This table must be NULL terminated. RSDP and FACS are special-cased
247 ******************************************************************************/
249 static ACPI_DMTABLE_DATA AcpiDmTableData
[] =
251 {ACPI_SIG_ASF
, NULL
, AcpiDmDumpAsf
, "Alert Standard Format table"},
252 {ACPI_SIG_BOOT
, AcpiDmTableInfoBoot
, NULL
, "Simple Boot Flag Table"},
253 {ACPI_SIG_BERT
, AcpiDmTableInfoBert
, NULL
, "Boot Error Record Table"},
254 {ACPI_SIG_CPEP
, NULL
, AcpiDmDumpCpep
, "Corrected Platform Error Polling table"},
255 {ACPI_SIG_DBGP
, AcpiDmTableInfoDbgp
, NULL
, "Debug Port table"},
256 {ACPI_SIG_DMAR
, NULL
, AcpiDmDumpDmar
, "DMA Remapping table"},
257 {ACPI_SIG_ECDT
, AcpiDmTableInfoEcdt
, NULL
, "Embedded Controller Boot Resources Table"},
258 {ACPI_SIG_EINJ
, NULL
, AcpiDmDumpEinj
, "Error Injection table"},
259 {ACPI_SIG_ERST
, NULL
, AcpiDmDumpErst
, "Error Record Serialization Table"},
260 {ACPI_SIG_FADT
, NULL
, AcpiDmDumpFadt
, "Fixed ACPI Description Table"},
261 {ACPI_SIG_HEST
, NULL
, AcpiDmDumpHest
, "Hardware Error Source Table"},
262 {ACPI_SIG_HPET
, AcpiDmTableInfoHpet
, NULL
, "High Precision Event Timer table"},
263 {ACPI_SIG_IVRS
, NULL
, AcpiDmDumpIvrs
, "I/O Virtualization Reporting Structure"},
264 {ACPI_SIG_MADT
, NULL
, AcpiDmDumpMadt
, "Multiple APIC Description Table"},
265 {ACPI_SIG_MCFG
, NULL
, AcpiDmDumpMcfg
, "Memory Mapped Configuration table"},
266 {ACPI_SIG_MSCT
, NULL
, AcpiDmDumpMsct
, "Maximum System Characteristics Table"},
267 {ACPI_SIG_RSDT
, NULL
, AcpiDmDumpRsdt
, "Root System Description Table"},
268 {ACPI_SIG_SBST
, AcpiDmTableInfoSbst
, NULL
, "Smart Battery Specification Table"},
269 {ACPI_SIG_SLIC
, AcpiDmTableInfoSlic
, NULL
, "Software Licensing Description Table"},
270 {ACPI_SIG_SLIT
, NULL
, AcpiDmDumpSlit
, "System Locality Information Table"},
271 {ACPI_SIG_SPCR
, AcpiDmTableInfoSpcr
, NULL
, "Serial Port Console Redirection table"},
272 {ACPI_SIG_SPMI
, AcpiDmTableInfoSpmi
, NULL
, "Server Platform Management Interface table"},
273 {ACPI_SIG_SRAT
, NULL
, AcpiDmDumpSrat
, "System Resource Affinity Table"},
274 {ACPI_SIG_TCPA
, AcpiDmTableInfoTcpa
, NULL
, "Trusted Computing Platform Alliance table"},
275 {ACPI_SIG_UEFI
, AcpiDmTableInfoUefi
, NULL
, "UEFI Boot Optimization Table"},
276 {ACPI_SIG_WAET
, AcpiDmTableInfoWaet
, NULL
, "Windows ACPI Emulated Devices Table"},
277 {ACPI_SIG_WDAT
, NULL
, AcpiDmDumpWdat
, "Watchdog Action Table"},
278 {ACPI_SIG_WDRT
, AcpiDmTableInfoWdrt
, NULL
, "Watchdog Resource Table"},
279 {ACPI_SIG_XSDT
, NULL
, AcpiDmDumpXsdt
, "Extended System Description Table"},
280 {NULL
, NULL
, NULL
, NULL
}
284 /*******************************************************************************
286 * FUNCTION: AcpiTbGenerateChecksum
288 * PARAMETERS: Table - Pointer to a valid ACPI table (with a
289 * standard ACPI header)
291 * RETURN: 8 bit checksum of buffer
293 * DESCRIPTION: Computes an 8 bit checksum of the table.
295 ******************************************************************************/
298 AcpiTbGenerateChecksum (
299 ACPI_TABLE_HEADER
*Table
)
304 /* Sum the entire table as-is */
306 Checksum
= AcpiTbChecksum ((UINT8
*) Table
, Table
->Length
);
308 /* Subtract off the existing checksum value in the table */
310 Checksum
= (UINT8
) (Checksum
- Table
->Checksum
);
312 /* Compute the final checksum */
314 Checksum
= (UINT8
) (0 - Checksum
);
319 /*******************************************************************************
321 * FUNCTION: AcpiDmGetTableData
323 * PARAMETERS: Signature - ACPI signature (4 chars) to match
325 * RETURN: Pointer to a valid ACPI_DMTABLE_DATA. Null if no match found.
327 * DESCRIPTION: Find a match in the global table of supported ACPI tables
329 ******************************************************************************/
331 static ACPI_DMTABLE_DATA
*
335 ACPI_DMTABLE_DATA
*TableData
;
338 for (TableData
= AcpiDmTableData
; TableData
->Signature
; TableData
++)
340 if (ACPI_COMPARE_NAME (Signature
, TableData
->Signature
))
350 /*******************************************************************************
352 * FUNCTION: AcpiDmDumpDataTable
354 * PARAMETERS: Table - An ACPI table
358 * DESCRIPTION: Format the contents of an ACPI data table (any table other
359 * than an SSDT or DSDT that does not contain executable AML code)
361 ******************************************************************************/
364 AcpiDmDumpDataTable (
365 ACPI_TABLE_HEADER
*Table
)
368 ACPI_DMTABLE_DATA
*TableData
;
372 /* Ignore tables that contain AML */
374 if (AcpiUtIsAmlTable (Table
))
380 * Handle tables that don't use the common ACPI table header structure.
381 * Currently, these are the FACS and RSDP.
383 if (ACPI_COMPARE_NAME (Table
->Signature
, ACPI_SIG_FACS
))
385 Length
= Table
->Length
;
386 AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoFacs
);
388 else if (ACPI_COMPARE_NAME (Table
->Signature
, ACPI_SIG_RSDP
))
390 Length
= AcpiDmDumpRsdp (Table
);
395 * All other tables must use the common ACPI table header, dump it now
397 Length
= Table
->Length
;
398 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoHeader
);
399 if (ACPI_FAILURE (Status
))
405 /* Match signature and dispatch appropriately */
407 TableData
= AcpiDmGetTableData (Table
->Signature
);
410 if (!ACPI_STRNCMP (Table
->Signature
, "OEM", 3))
412 AcpiOsPrintf ("\n**** OEM-defined ACPI table [%4.4s], unknown contents\n\n",
417 AcpiOsPrintf ("\n**** Unknown ACPI table type [%4.4s]\n\n",
421 else if (TableData
->TableHandler
)
423 /* Complex table, has a handler */
425 TableData
->TableHandler (Table
);
427 else if (TableData
->TableInfo
)
429 /* Simple table, just walk the info table */
431 AcpiDmDumpTable (Length
, 0, Table
, 0, TableData
->TableInfo
);
435 /* Always dump the raw table data */
437 AcpiOsPrintf ("\nRaw Table Data\n\n");
438 AcpiUtDumpBuffer2 (ACPI_CAST_PTR (UINT8
, Table
), Length
, DB_BYTE_DISPLAY
);
442 /*******************************************************************************
444 * FUNCTION: AcpiDmLineHeader
446 * PARAMETERS: Offset - Current byte offset, from table start
447 * ByteLength - Length of the field in bytes, 0 for flags
448 * Name - Name of this field
449 * Value - Optional value, displayed on left of ':'
453 * DESCRIPTION: Utility routines for formatting output lines. Displays the
454 * current table offset in hex and decimal, the field length,
455 * and the field name.
457 ******************************************************************************/
468 AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %28s : ",
469 Offset
, Offset
, ByteLength
, Name
);
473 AcpiOsPrintf ("%43s : ",
488 AcpiOsPrintf ("[%3.3Xh %4.4d% 3d] %24s % 3d : ",
489 Offset
, Offset
, ByteLength
, Name
, Value
);
493 AcpiOsPrintf ("[%3.3Xh %4.4d ] %24s % 3d : ",
494 Offset
, Offset
, Name
, Value
);
499 /*******************************************************************************
501 * FUNCTION: AcpiDmDumpTable
503 * PARAMETERS: TableLength - Length of the entire ACPI table
504 * TableOffset - Starting offset within the table for this
505 * sub-descriptor (0 if main table)
506 * Table - The ACPI table
507 * SubtableLength - Length of this sub-descriptor
508 * Info - Info table for this ACPI table
512 * DESCRIPTION: Display ACPI table contents by walking the Info table.
514 ******************************************************************************/
521 UINT32 SubtableLength
,
522 ACPI_DMTABLE_INFO
*Info
)
525 UINT32 CurrentOffset
;
529 ACPI_DMTABLE_DATA
*TableData
;
531 BOOLEAN LastOutputBlankLine
= FALSE
;
532 char RepairedName
[8];
537 AcpiOsPrintf ("Display not implemented\n");
538 return (AE_NOT_IMPLEMENTED
);
541 /* Walk entire Info table; Null name terminates */
543 for (; Info
->Name
; Info
++)
546 * Target points to the field within the ACPI Table. CurrentOffset is
547 * the offset of the field from the start of the main table.
549 Target
= ACPI_ADD_PTR (UINT8
, Table
, Info
->Offset
);
550 CurrentOffset
= TableOffset
+ Info
->Offset
;
552 /* Check for beyond EOT or beyond subtable end */
554 if ((CurrentOffset
>= TableLength
) ||
555 (SubtableLength
&& (Info
->Offset
>= SubtableLength
)))
557 AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
558 return (AE_BAD_DATA
);
561 /* Generate the byte length for this field */
563 switch (Info
->Opcode
)
566 case ACPI_DMT_CHKSUM
:
567 case ACPI_DMT_SPACEID
:
572 case ACPI_DMT_HESTNTYP
:
573 case ACPI_DMT_FADTPM
:
576 case ACPI_DMT_UINT16
:
581 case ACPI_DMT_UINT24
:
584 case ACPI_DMT_UINT32
:
592 case ACPI_DMT_UINT56
:
595 case ACPI_DMT_UINT64
:
602 case ACPI_DMT_STRING
:
603 ByteLength
= ACPI_STRLEN (ACPI_CAST_PTR (char, Target
)) + 1;
606 if (!LastOutputBlankLine
)
609 LastOutputBlankLine
= TRUE
;
611 ByteLength
= sizeof (ACPI_GENERIC_ADDRESS
);
613 case ACPI_DMT_HESTNTFY
:
614 if (!LastOutputBlankLine
)
617 LastOutputBlankLine
= TRUE
;
619 ByteLength
= sizeof (ACPI_HEST_NOTIFY
);
626 if (CurrentOffset
+ ByteLength
> TableLength
)
628 AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
629 return (AE_BAD_DATA
);
632 /* Start a new line and decode the opcode */
634 AcpiDmLineHeader (CurrentOffset
, ByteLength
, Info
->Name
);
636 switch (Info
->Opcode
)
638 /* Single-bit Flag fields. Note: Opcode is the bit position */
649 AcpiOsPrintf ("%1.1X\n", (*Target
>> Info
->Opcode
) & 0x01);
652 /* 2-bit Flag fields */
654 case ACPI_DMT_FLAGS0
:
656 AcpiOsPrintf ("%1.1X\n", *Target
& 0x03);
659 case ACPI_DMT_FLAGS2
:
661 AcpiOsPrintf ("%1.1X\n", (*Target
>> 2) & 0x03);
664 /* Standard Data Types */
668 AcpiOsPrintf ("%2.2X\n", *Target
);
671 case ACPI_DMT_UINT16
:
673 AcpiOsPrintf ("%4.4X\n", ACPI_GET16 (Target
));
676 case ACPI_DMT_UINT24
:
678 AcpiOsPrintf ("%2.2X%2.2X%2.2X\n",
679 *Target
, *(Target
+ 1), *(Target
+ 2));
682 case ACPI_DMT_UINT32
:
684 AcpiOsPrintf ("%8.8X\n", ACPI_GET32 (Target
));
687 case ACPI_DMT_UINT56
:
689 for (Temp8
= 0; Temp8
< 7; Temp8
++)
691 AcpiOsPrintf ("%2.2X", Target
[Temp8
]);
696 case ACPI_DMT_UINT64
:
698 AcpiOsPrintf ("%8.8X%8.8X\n",
699 ACPI_FORMAT_UINT64 (ACPI_GET64 (Target
)));
704 /* Buffer of length 16 */
706 for (Temp8
= 0; Temp8
< 16; Temp8
++)
708 AcpiOsPrintf ("%2.2X,", Target
[Temp8
]);
713 case ACPI_DMT_STRING
:
715 AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target
));
718 /* Fixed length ASCII name fields */
722 AcpiDmCheckAscii (Target
, RepairedName
, 4);
723 AcpiOsPrintf ("\"%.4s\" ", RepairedName
);
724 TableData
= AcpiDmGetTableData (ACPI_CAST_PTR (char, Target
));
727 AcpiOsPrintf ("/* %s */", TableData
->Name
);
734 AcpiDmCheckAscii (Target
, RepairedName
, 4);
735 AcpiOsPrintf ("\"%.4s\"\n", RepairedName
);
740 AcpiDmCheckAscii (Target
, RepairedName
, 6);
741 AcpiOsPrintf ("\"%.6s\"\n", RepairedName
);
746 AcpiDmCheckAscii (Target
, RepairedName
, 8);
747 AcpiOsPrintf ("\"%.8s\"\n", RepairedName
);
750 /* Special Data Types */
752 case ACPI_DMT_CHKSUM
:
754 /* Checksum, display and validate */
756 AcpiOsPrintf ("%2.2X", *Target
);
757 Temp8
= AcpiTbGenerateChecksum (Table
);
758 if (Temp8
!= ACPI_CAST_PTR (ACPI_TABLE_HEADER
, Table
)->Checksum
)
761 " /* Incorrect checksum, should be %2.2X */", Temp8
);
766 case ACPI_DMT_SPACEID
:
768 /* Address Space ID */
770 AcpiOsPrintf ("%2.2X (%s)\n", *Target
, AcpiUtGetRegionName (*Target
));
775 /* Generic Address Structure */
777 AcpiOsPrintf ("<Generic Address Structure>\n");
778 AcpiDmDumpTable (TableLength
, CurrentOffset
, Target
,
779 sizeof (ACPI_GENERIC_ADDRESS
), AcpiDmTableInfoGas
);
781 LastOutputBlankLine
= TRUE
;
786 /* ASF subtable types */
788 Temp16
= (UINT16
) ((*Target
) & 0x7F); /* Top bit can be zero or one */
789 if (Temp16
> ACPI_ASF_TYPE_RESERVED
)
791 Temp16
= ACPI_ASF_TYPE_RESERVED
;
794 AcpiOsPrintf ("%2.2X <%s>\n", *Target
, AcpiDmAsfSubnames
[Temp16
]);
799 /* DMAR subtable types */
801 Temp16
= ACPI_GET16 (Target
);
802 if (Temp16
> ACPI_DMAR_TYPE_RESERVED
)
804 Temp16
= ACPI_DMAR_TYPE_RESERVED
;
807 AcpiOsPrintf ("%4.4X <%s>\n", ACPI_GET16 (Target
), AcpiDmDmarSubnames
[Temp16
]);
812 /* HEST subtable types */
814 Temp16
= ACPI_GET16 (Target
);
815 if (Temp16
> ACPI_HEST_TYPE_RESERVED
)
817 Temp16
= ACPI_HEST_TYPE_RESERVED
;
820 AcpiOsPrintf ("%4.4X (%s)\n", ACPI_GET16 (Target
), AcpiDmHestSubnames
[Temp16
]);
823 case ACPI_DMT_HESTNTFY
:
825 AcpiOsPrintf ("<Hardware Error Notification Structure>\n");
826 AcpiDmDumpTable (TableLength
, CurrentOffset
, Target
,
827 sizeof (ACPI_HEST_NOTIFY
), AcpiDmTableInfoHestNotify
);
829 LastOutputBlankLine
= TRUE
;
832 case ACPI_DMT_HESTNTYP
:
834 /* HEST Notify types */
837 if (Temp8
> ACPI_HEST_NOTIFY_RESERVED
)
839 Temp8
= ACPI_HEST_NOTIFY_RESERVED
;
842 AcpiOsPrintf ("%2.2X (%s)\n", *Target
, AcpiDmHestNotifySubnames
[Temp8
]);
848 /* MADT subtable types */
851 if (Temp8
> ACPI_MADT_TYPE_RESERVED
)
853 Temp8
= ACPI_MADT_TYPE_RESERVED
;
856 AcpiOsPrintf ("%2.2X <%s>\n", *Target
, AcpiDmMadtSubnames
[Temp8
]);
861 /* SRAT subtable types */
864 if (Temp8
> ACPI_SRAT_TYPE_RESERVED
)
866 Temp8
= ACPI_SRAT_TYPE_RESERVED
;
869 AcpiOsPrintf ("%2.2X <%s>\n", *Target
, AcpiDmSratSubnames
[Temp8
]);
872 case ACPI_DMT_FADTPM
:
874 /* FADT Preferred PM Profile names */
877 if (Temp8
> ACPI_FADT_PM_RESERVED
)
879 Temp8
= ACPI_FADT_PM_RESERVED
;
882 AcpiOsPrintf ("%2.2X (%s)\n", *Target
, AcpiDmFadtProfiles
[Temp8
]);
887 /* IVRS subtable types */
892 case ACPI_IVRS_TYPE_HARDWARE
:
893 Name
= AcpiDmIvrsSubnames
[0];
896 case ACPI_IVRS_TYPE_MEMORY1
:
897 case ACPI_IVRS_TYPE_MEMORY2
:
898 case ACPI_IVRS_TYPE_MEMORY3
:
899 Name
= AcpiDmIvrsSubnames
[1];
903 Name
= AcpiDmIvrsSubnames
[2];
907 AcpiOsPrintf ("%2.2X <%s>\n", *Target
, Name
);
914 ACPI_ERROR ((AE_INFO
,
915 "**** Invalid table opcode [%X] ****\n", Info
->Opcode
));
920 if (TableOffset
&& !SubtableLength
)
922 /* If this table is not the main table, subtable must have valid length */
924 AcpiOsPrintf ("Invalid zero length subtable\n");
925 return (AE_BAD_DATA
);
932 /*******************************************************************************
934 * FUNCTION: AcpiDmCheckAscii
936 * PARAMETERS: Name - Ascii string
937 * Count - Number of characters to check
941 * DESCRIPTION: Ensure that the requested number of characters are printable
942 * Ascii characters. Sets non-printable and null chars to <space>.
944 ******************************************************************************/
955 for (i
= 0; i
< Count
; i
++)
957 RepairedName
[i
] = Name
[i
];
963 if (!isprint (Name
[i
]))
965 RepairedName
[i
] = ' ';