1 /******************************************************************************
3 * Module Name: dmtbdump - Dump ACPI data tables that contain no AML code
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2015, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
49 /* This module used for application-level code only */
51 #define _COMPONENT ACPI_CA_DISASSEMBLER
52 ACPI_MODULE_NAME ("dmtbdump")
55 /* Local prototypes */
58 AcpiDmValidateFadtLength (
63 /*******************************************************************************
65 * FUNCTION: AcpiDmDumpBuffer
67 * PARAMETERS: Table - ACPI Table or subtable
68 * BufferOffset - Offset of buffer from Table above
69 * Length - Length of the buffer
70 * AbsoluteOffset - Offset of buffer in the main ACPI table
71 * Header - Name of the buffer field (printed on the
76 * DESCRIPTION: Format the contents of an arbitrary length data buffer (in the
77 * disassembler output format.)
79 ******************************************************************************/
86 UINT32 AbsoluteOffset
,
98 Buffer
= ACPI_CAST_PTR (UINT8
, Table
) + BufferOffset
;
105 /* Insert a backslash - line continuation character */
109 AcpiOsPrintf ("\\\n ");
113 AcpiOsPrintf ("%.02X ", *Buffer
);
123 /*******************************************************************************
125 * FUNCTION: AcpiDmDumpUnicode
127 * PARAMETERS: Table - ACPI Table or subtable
128 * BufferOffset - Offset of buffer from Table above
129 * ByteLength - Length of the buffer
133 * DESCRIPTION: Validate and dump the contents of a buffer that contains
134 * unicode data. The output is a standard ASCII string. If it
135 * appears that the data is not unicode, the buffer is dumped
138 ******************************************************************************/
151 Buffer
= ((UINT8
*) Table
) + BufferOffset
;
152 Length
= ByteLength
- 2; /* Last two bytes are the null terminator */
154 /* Ensure all low bytes are entirely printable ASCII */
156 for (i
= 0; i
< Length
; i
+= 2)
158 if (!isprint (Buffer
[i
]))
164 /* Ensure all high bytes are zero */
166 for (i
= 1; i
< Length
; i
+= 2)
174 /* Dump the buffer as a normal string */
177 for (i
= 0; i
< Length
; i
+= 2)
179 AcpiOsPrintf ("%c", Buffer
[i
]);
181 AcpiOsPrintf ("\"\n");
185 AcpiDmDumpBuffer (Table
, BufferOffset
, ByteLength
,
191 /*******************************************************************************
193 * FUNCTION: AcpiDmDumpRsdp
195 * PARAMETERS: Table - A RSDP
197 * RETURN: Length of the table (there is not always a length field,
198 * use revision or length if available (ACPI 2.0+))
200 * DESCRIPTION: Format the contents of a RSDP
202 ******************************************************************************/
206 ACPI_TABLE_HEADER
*Table
)
208 ACPI_TABLE_RSDP
*Rsdp
= ACPI_CAST_PTR (ACPI_TABLE_RSDP
, Table
);
209 UINT32 Length
= sizeof (ACPI_RSDP_COMMON
);
214 /* Dump the common ACPI 1.0 portion */
216 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoRsdp1
);
217 if (ACPI_FAILURE (Status
))
222 /* Validate the first checksum */
224 Checksum
= AcpiDmGenerateChecksum (Rsdp
, sizeof (ACPI_RSDP_COMMON
),
226 if (Checksum
!= Rsdp
->Checksum
)
228 AcpiOsPrintf ("/* Incorrect Checksum above, should be 0x%2.2X */\n",
232 /* The RSDP for ACPI 2.0+ contains more data and has a Length field */
234 if (Rsdp
->Revision
> 0)
236 Length
= Rsdp
->Length
;
237 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoRsdp2
);
238 if (ACPI_FAILURE (Status
))
243 /* Validate the extended checksum over entire RSDP */
245 Checksum
= AcpiDmGenerateChecksum (Rsdp
, sizeof (ACPI_TABLE_RSDP
),
246 Rsdp
->ExtendedChecksum
);
247 if (Checksum
!= Rsdp
->ExtendedChecksum
)
250 "/* Incorrect Extended Checksum above, should be 0x%2.2X */\n",
259 /*******************************************************************************
261 * FUNCTION: AcpiDmDumpRsdt
263 * PARAMETERS: Table - A RSDT
267 * DESCRIPTION: Format the contents of a RSDT
269 ******************************************************************************/
273 ACPI_TABLE_HEADER
*Table
)
281 /* Point to start of table pointer array */
283 Array
= ACPI_CAST_PTR (ACPI_TABLE_RSDT
, Table
)->TableOffsetEntry
;
284 Offset
= sizeof (ACPI_TABLE_HEADER
);
286 /* RSDT uses 32-bit pointers */
288 Entries
= (Table
->Length
- sizeof (ACPI_TABLE_HEADER
)) / sizeof (UINT32
);
290 for (i
= 0; i
< Entries
; i
++)
292 AcpiDmLineHeader2 (Offset
, sizeof (UINT32
), "ACPI Table Address", i
);
293 AcpiOsPrintf ("%8.8X\n", Array
[i
]);
294 Offset
+= sizeof (UINT32
);
299 /*******************************************************************************
301 * FUNCTION: AcpiDmDumpXsdt
303 * PARAMETERS: Table - A XSDT
307 * DESCRIPTION: Format the contents of a XSDT
309 ******************************************************************************/
313 ACPI_TABLE_HEADER
*Table
)
321 /* Point to start of table pointer array */
323 Array
= ACPI_CAST_PTR (ACPI_TABLE_XSDT
, Table
)->TableOffsetEntry
;
324 Offset
= sizeof (ACPI_TABLE_HEADER
);
326 /* XSDT uses 64-bit pointers */
328 Entries
= (Table
->Length
- sizeof (ACPI_TABLE_HEADER
)) / sizeof (UINT64
);
330 for (i
= 0; i
< Entries
; i
++)
332 AcpiDmLineHeader2 (Offset
, sizeof (UINT64
), "ACPI Table Address", i
);
333 AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array
[i
]));
334 Offset
+= sizeof (UINT64
);
339 /*******************************************************************************
341 * FUNCTION: AcpiDmDumpFadt
343 * PARAMETERS: Table - A FADT
347 * DESCRIPTION: Format the contents of a FADT
349 * NOTE: We cannot depend on the FADT version to indicate the actual
350 * contents of the FADT because of BIOS bugs. The table length
351 * is the only reliable indicator.
353 ******************************************************************************/
357 ACPI_TABLE_HEADER
*Table
)
362 /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */
364 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoFadt1
);
365 if (ACPI_FAILURE (Status
))
370 /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */
372 if ((Table
->Length
> ACPI_FADT_V1_SIZE
) &&
373 (Table
->Length
<= ACPI_FADT_V2_SIZE
))
375 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoFadt2
);
376 if (ACPI_FAILURE (Status
))
382 /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */
384 else if (Table
->Length
> ACPI_FADT_V2_SIZE
)
386 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoFadt3
);
387 if (ACPI_FAILURE (Status
))
392 /* Check for FADT revision 5 fields and up (ACPI 5.0+) */
394 if (Table
->Length
> ACPI_FADT_V3_SIZE
)
396 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoFadt5
);
397 if (ACPI_FAILURE (Status
))
403 /* Check for FADT revision 6 fields and up (ACPI 6.0+) */
405 if (Table
->Length
> ACPI_FADT_V3_SIZE
)
407 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoFadt6
);
408 if (ACPI_FAILURE (Status
))
415 /* Validate various fields in the FADT, including length */
417 AcpiTbCreateLocalFadt (Table
, Table
->Length
);
419 /* Validate FADT length against the revision */
421 AcpiDmValidateFadtLength (Table
->Revision
, Table
->Length
);
425 /*******************************************************************************
427 * FUNCTION: AcpiDmValidateFadtLength
429 * PARAMETERS: Revision - FADT revision (Header->Revision)
430 * Length - FADT length (Header->Length
434 * DESCRIPTION: Check the FADT revision against the expected table length for
435 * that revision. Issue a warning if the length is not what was
436 * expected. This seems to be such a common BIOS bug that the
437 * FADT revision has been rendered virtually meaningless.
439 ******************************************************************************/
442 AcpiDmValidateFadtLength (
446 UINT32 ExpectedLength
;
453 AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
458 ExpectedLength
= ACPI_FADT_V1_SIZE
;
463 ExpectedLength
= ACPI_FADT_V2_SIZE
;
469 ExpectedLength
= ACPI_FADT_V3_SIZE
;
474 ExpectedLength
= ACPI_FADT_V5_SIZE
;
482 if (Length
== ExpectedLength
)
488 "\n// ACPI Warning: FADT revision %X does not match length: found %X expected %X\n",
489 Revision
, Length
, ExpectedLength
);
493 /*******************************************************************************
495 * FUNCTION: AcpiDmDumpAsf
497 * PARAMETERS: Table - A ASF table
501 * DESCRIPTION: Format the contents of a ASF table
503 ******************************************************************************/
507 ACPI_TABLE_HEADER
*Table
)
510 UINT32 Offset
= sizeof (ACPI_TABLE_HEADER
);
511 ACPI_ASF_INFO
*SubTable
;
512 ACPI_DMTABLE_INFO
*InfoTable
;
513 ACPI_DMTABLE_INFO
*DataInfoTable
= NULL
;
514 UINT8
*DataTable
= NULL
;
515 UINT32 DataCount
= 0;
516 UINT32 DataLength
= 0;
517 UINT32 DataOffset
= 0;
522 /* No main table, only subtables */
524 SubTable
= ACPI_ADD_PTR (ACPI_ASF_INFO
, Table
, Offset
);
525 while (Offset
< Table
->Length
)
527 /* Common subtable header */
529 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
530 SubTable
->Header
.Length
, AcpiDmTableInfoAsfHdr
);
531 if (ACPI_FAILURE (Status
))
536 /* The actual type is the lower 7 bits of Type */
538 Type
= (UINT8
) (SubTable
->Header
.Type
& 0x7F);
542 case ACPI_ASF_TYPE_INFO
:
544 InfoTable
= AcpiDmTableInfoAsf0
;
547 case ACPI_ASF_TYPE_ALERT
:
549 InfoTable
= AcpiDmTableInfoAsf1
;
550 DataInfoTable
= AcpiDmTableInfoAsf1a
;
551 DataTable
= ACPI_ADD_PTR (UINT8
, SubTable
, sizeof (ACPI_ASF_ALERT
));
552 DataCount
= ACPI_CAST_PTR (ACPI_ASF_ALERT
, SubTable
)->Alerts
;
553 DataLength
= ACPI_CAST_PTR (ACPI_ASF_ALERT
, SubTable
)->DataLength
;
554 DataOffset
= Offset
+ sizeof (ACPI_ASF_ALERT
);
557 case ACPI_ASF_TYPE_CONTROL
:
559 InfoTable
= AcpiDmTableInfoAsf2
;
560 DataInfoTable
= AcpiDmTableInfoAsf2a
;
561 DataTable
= ACPI_ADD_PTR (UINT8
, SubTable
, sizeof (ACPI_ASF_REMOTE
));
562 DataCount
= ACPI_CAST_PTR (ACPI_ASF_REMOTE
, SubTable
)->Controls
;
563 DataLength
= ACPI_CAST_PTR (ACPI_ASF_REMOTE
, SubTable
)->DataLength
;
564 DataOffset
= Offset
+ sizeof (ACPI_ASF_REMOTE
);
567 case ACPI_ASF_TYPE_BOOT
:
569 InfoTable
= AcpiDmTableInfoAsf3
;
572 case ACPI_ASF_TYPE_ADDRESS
:
574 InfoTable
= AcpiDmTableInfoAsf4
;
575 DataTable
= ACPI_ADD_PTR (UINT8
, SubTable
, sizeof (ACPI_ASF_ADDRESS
));
576 DataLength
= ACPI_CAST_PTR (ACPI_ASF_ADDRESS
, SubTable
)->Devices
;
577 DataOffset
= Offset
+ sizeof (ACPI_ASF_ADDRESS
);
582 AcpiOsPrintf ("\n**** Unknown ASF subtable type 0x%X\n", SubTable
->Header
.Type
);
586 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
587 SubTable
->Header
.Length
, InfoTable
);
588 if (ACPI_FAILURE (Status
))
593 /* Dump variable-length extra data */
597 case ACPI_ASF_TYPE_ALERT
:
598 case ACPI_ASF_TYPE_CONTROL
:
600 for (i
= 0; i
< DataCount
; i
++)
603 Status
= AcpiDmDumpTable (Table
->Length
, DataOffset
,
604 DataTable
, DataLength
, DataInfoTable
);
605 if (ACPI_FAILURE (Status
))
610 DataTable
= ACPI_ADD_PTR (UINT8
, DataTable
, DataLength
);
611 DataOffset
+= DataLength
;
615 case ACPI_ASF_TYPE_ADDRESS
:
617 for (i
= 0; i
< DataLength
; i
++)
621 AcpiDmLineHeader (DataOffset
, 1, "Addresses");
624 AcpiOsPrintf ("%2.2X ", *DataTable
);
627 if (DataOffset
> Table
->Length
)
629 AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure! (ASF! table)\n");
644 /* Point to next subtable */
646 if (!SubTable
->Header
.Length
)
648 AcpiOsPrintf ("Invalid zero subtable header length\n");
652 Offset
+= SubTable
->Header
.Length
;
653 SubTable
= ACPI_ADD_PTR (ACPI_ASF_INFO
, SubTable
, SubTable
->Header
.Length
);
658 /*******************************************************************************
660 * FUNCTION: AcpiDmDumpCpep
662 * PARAMETERS: Table - A CPEP table
666 * DESCRIPTION: Format the contents of a CPEP. This table type consists
667 * of an open-ended number of subtables.
669 ******************************************************************************/
673 ACPI_TABLE_HEADER
*Table
)
676 ACPI_CPEP_POLLING
*SubTable
;
677 UINT32 Length
= Table
->Length
;
678 UINT32 Offset
= sizeof (ACPI_TABLE_CPEP
);
683 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoCpep
);
684 if (ACPI_FAILURE (Status
))
691 SubTable
= ACPI_ADD_PTR (ACPI_CPEP_POLLING
, Table
, Offset
);
692 while (Offset
< Table
->Length
)
695 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
696 SubTable
->Header
.Length
, AcpiDmTableInfoCpep0
);
697 if (ACPI_FAILURE (Status
))
702 /* Point to next subtable */
704 Offset
+= SubTable
->Header
.Length
;
705 SubTable
= ACPI_ADD_PTR (ACPI_CPEP_POLLING
, SubTable
,
706 SubTable
->Header
.Length
);
711 /*******************************************************************************
713 * FUNCTION: AcpiDmDumpCsrt
715 * PARAMETERS: Table - A CSRT table
719 * DESCRIPTION: Format the contents of a CSRT. This table type consists
720 * of an open-ended number of subtables.
722 ******************************************************************************/
726 ACPI_TABLE_HEADER
*Table
)
729 ACPI_CSRT_GROUP
*SubTable
;
730 ACPI_CSRT_SHARED_INFO
*SharedInfoTable
;
731 ACPI_CSRT_DESCRIPTOR
*SubSubTable
;
732 UINT32 Length
= Table
->Length
;
733 UINT32 Offset
= sizeof (ACPI_TABLE_CSRT
);
739 /* The main table only contains the ACPI header, thus already handled */
741 /* Subtables (Resource Groups) */
743 SubTable
= ACPI_ADD_PTR (ACPI_CSRT_GROUP
, Table
, Offset
);
744 while (Offset
< Table
->Length
)
746 /* Resource group subtable */
749 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
750 SubTable
->Length
, AcpiDmTableInfoCsrt0
);
751 if (ACPI_FAILURE (Status
))
756 /* Shared info subtable (One per resource group) */
758 SubOffset
= sizeof (ACPI_CSRT_GROUP
);
759 SharedInfoTable
= ACPI_ADD_PTR (ACPI_CSRT_SHARED_INFO
, Table
,
763 Status
= AcpiDmDumpTable (Length
, Offset
+ SubOffset
, SharedInfoTable
,
764 sizeof (ACPI_CSRT_SHARED_INFO
), AcpiDmTableInfoCsrt1
);
765 if (ACPI_FAILURE (Status
))
770 SubOffset
+= SubTable
->SharedInfoLength
;
772 /* Sub-Subtables (Resource Descriptors) */
774 SubSubTable
= ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR
, Table
,
777 while ((SubOffset
< SubTable
->Length
) &&
778 ((Offset
+ SubOffset
) < Table
->Length
))
781 Status
= AcpiDmDumpTable (Length
, Offset
+ SubOffset
, SubSubTable
,
782 SubSubTable
->Length
, AcpiDmTableInfoCsrt2
);
783 if (ACPI_FAILURE (Status
))
788 SubSubOffset
= sizeof (ACPI_CSRT_DESCRIPTOR
);
790 /* Resource-specific info buffer */
792 InfoLength
= SubSubTable
->Length
- SubSubOffset
;
795 Status
= AcpiDmDumpTable (Length
,
796 Offset
+ SubOffset
+ SubSubOffset
, Table
,
797 InfoLength
, AcpiDmTableInfoCsrt2a
);
798 if (ACPI_FAILURE (Status
))
802 SubSubOffset
+= InfoLength
;
805 /* Point to next sub-subtable */
807 SubOffset
+= SubSubTable
->Length
;
808 SubSubTable
= ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR
, SubSubTable
,
809 SubSubTable
->Length
);
812 /* Point to next subtable */
814 Offset
+= SubTable
->Length
;
815 SubTable
= ACPI_ADD_PTR (ACPI_CSRT_GROUP
, SubTable
,
821 /*******************************************************************************
823 * FUNCTION: AcpiDmDumpDbg2
825 * PARAMETERS: Table - A DBG2 table
829 * DESCRIPTION: Format the contents of a DBG2. This table type consists
830 * of an open-ended number of subtables.
832 ******************************************************************************/
836 ACPI_TABLE_HEADER
*Table
)
839 ACPI_DBG2_DEVICE
*SubTable
;
840 UINT32 Length
= Table
->Length
;
841 UINT32 Offset
= sizeof (ACPI_TABLE_DBG2
);
844 UINT32 AbsoluteOffset
;
850 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoDbg2
);
851 if (ACPI_FAILURE (Status
))
858 SubTable
= ACPI_ADD_PTR (ACPI_DBG2_DEVICE
, Table
, Offset
);
859 while (Offset
< Table
->Length
)
862 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
863 SubTable
->Length
, AcpiDmTableInfoDbg2Device
);
864 if (ACPI_FAILURE (Status
))
869 /* Dump the BaseAddress array */
871 for (i
= 0; i
< SubTable
->RegisterCount
; i
++)
873 ArrayOffset
= SubTable
->BaseAddressOffset
+
874 (sizeof (ACPI_GENERIC_ADDRESS
) * i
);
875 AbsoluteOffset
= Offset
+ ArrayOffset
;
876 Array
= (UINT8
*) SubTable
+ ArrayOffset
;
878 Status
= AcpiDmDumpTable (Length
, AbsoluteOffset
, Array
,
879 SubTable
->Length
, AcpiDmTableInfoDbg2Addr
);
880 if (ACPI_FAILURE (Status
))
886 /* Dump the AddressSize array */
888 for (i
= 0; i
< SubTable
->RegisterCount
; i
++)
890 ArrayOffset
= SubTable
->AddressSizeOffset
+
891 (sizeof (UINT32
) * i
);
892 AbsoluteOffset
= Offset
+ ArrayOffset
;
893 Array
= (UINT8
*) SubTable
+ ArrayOffset
;
895 Status
= AcpiDmDumpTable (Length
, AbsoluteOffset
, Array
,
896 SubTable
->Length
, AcpiDmTableInfoDbg2Size
);
897 if (ACPI_FAILURE (Status
))
903 /* Dump the Namestring (required) */
906 ArrayOffset
= SubTable
->NamepathOffset
;
907 AbsoluteOffset
= Offset
+ ArrayOffset
;
908 Array
= (UINT8
*) SubTable
+ ArrayOffset
;
910 Status
= AcpiDmDumpTable (Length
, AbsoluteOffset
, Array
,
911 SubTable
->Length
, AcpiDmTableInfoDbg2Name
);
912 if (ACPI_FAILURE (Status
))
917 /* Dump the OemData (optional) */
919 if (SubTable
->OemDataOffset
)
921 Status
= AcpiDmDumpTable (Length
, Offset
+ SubTable
->OemDataOffset
,
922 Table
, SubTable
->OemDataLength
,
923 AcpiDmTableInfoDbg2OemData
);
924 if (ACPI_FAILURE (Status
))
930 /* Point to next subtable */
932 Offset
+= SubTable
->Length
;
933 SubTable
= ACPI_ADD_PTR (ACPI_DBG2_DEVICE
, SubTable
,
939 /*******************************************************************************
941 * FUNCTION: AcpiDmDumpDmar
943 * PARAMETERS: Table - A DMAR table
947 * DESCRIPTION: Format the contents of a DMAR. This table type consists
948 * of an open-ended number of subtables.
950 ******************************************************************************/
954 ACPI_TABLE_HEADER
*Table
)
957 ACPI_DMAR_HEADER
*SubTable
;
958 UINT32 Length
= Table
->Length
;
959 UINT32 Offset
= sizeof (ACPI_TABLE_DMAR
);
960 ACPI_DMTABLE_INFO
*InfoTable
;
961 ACPI_DMAR_DEVICE_SCOPE
*ScopeTable
;
969 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoDmar
);
970 if (ACPI_FAILURE (Status
))
977 SubTable
= ACPI_ADD_PTR (ACPI_DMAR_HEADER
, Table
, Offset
);
978 while (Offset
< Table
->Length
)
980 /* Common subtable header */
983 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
984 SubTable
->Length
, AcpiDmTableInfoDmarHdr
);
985 if (ACPI_FAILURE (Status
))
991 switch (SubTable
->Type
)
993 case ACPI_DMAR_TYPE_HARDWARE_UNIT
:
995 InfoTable
= AcpiDmTableInfoDmar0
;
996 ScopeOffset
= sizeof (ACPI_DMAR_HARDWARE_UNIT
);
999 case ACPI_DMAR_TYPE_RESERVED_MEMORY
:
1001 InfoTable
= AcpiDmTableInfoDmar1
;
1002 ScopeOffset
= sizeof (ACPI_DMAR_RESERVED_MEMORY
);
1005 case ACPI_DMAR_TYPE_ROOT_ATS
:
1007 InfoTable
= AcpiDmTableInfoDmar2
;
1008 ScopeOffset
= sizeof (ACPI_DMAR_ATSR
);
1011 case ACPI_DMAR_TYPE_HARDWARE_AFFINITY
:
1013 InfoTable
= AcpiDmTableInfoDmar3
;
1014 ScopeOffset
= sizeof (ACPI_DMAR_RHSA
);
1017 case ACPI_DMAR_TYPE_NAMESPACE
:
1019 InfoTable
= AcpiDmTableInfoDmar4
;
1020 ScopeOffset
= sizeof (ACPI_DMAR_ANDD
);
1025 AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", SubTable
->Type
);
1029 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1030 SubTable
->Length
, InfoTable
);
1031 if (ACPI_FAILURE (Status
))
1037 * Dump the optional device scope entries
1039 if ((SubTable
->Type
== ACPI_DMAR_TYPE_HARDWARE_AFFINITY
) ||
1040 (SubTable
->Type
== ACPI_DMAR_TYPE_NAMESPACE
))
1042 /* These types do not support device scopes */
1047 ScopeTable
= ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE
, SubTable
, ScopeOffset
);
1048 while (ScopeOffset
< SubTable
->Length
)
1050 AcpiOsPrintf ("\n");
1051 Status
= AcpiDmDumpTable (Length
, Offset
+ ScopeOffset
, ScopeTable
,
1052 ScopeTable
->Length
, AcpiDmTableInfoDmarScope
);
1053 if (ACPI_FAILURE (Status
))
1057 AcpiOsPrintf ("\n");
1059 /* Dump the PCI Path entries for this device scope */
1061 PathOffset
= sizeof (ACPI_DMAR_DEVICE_SCOPE
); /* Path entries start at this offset */
1063 PciPath
= ACPI_ADD_PTR (UINT8
, ScopeTable
,
1064 sizeof (ACPI_DMAR_DEVICE_SCOPE
));
1066 while (PathOffset
< ScopeTable
->Length
)
1068 AcpiDmLineHeader ((PathOffset
+ ScopeOffset
+ Offset
), 2, "PCI Path");
1069 AcpiOsPrintf ("%2.2X,%2.2X\n", PciPath
[0], PciPath
[1]);
1071 /* Point to next PCI Path entry */
1075 AcpiOsPrintf ("\n");
1078 /* Point to next device scope entry */
1080 ScopeOffset
+= ScopeTable
->Length
;
1081 ScopeTable
= ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE
,
1082 ScopeTable
, ScopeTable
->Length
);
1086 /* Point to next subtable */
1088 Offset
+= SubTable
->Length
;
1089 SubTable
= ACPI_ADD_PTR (ACPI_DMAR_HEADER
, SubTable
, SubTable
->Length
);
1094 /*******************************************************************************
1096 * FUNCTION: AcpiDmDumpDrtm
1098 * PARAMETERS: Table - A DRTM table
1102 * DESCRIPTION: Format the contents of a DRTM.
1104 ******************************************************************************/
1108 ACPI_TABLE_HEADER
*Table
)
1112 ACPI_DRTM_VTABLE_LIST
*DrtmVtl
;
1113 ACPI_DRTM_RESOURCE_LIST
*DrtmRl
;
1114 ACPI_DRTM_DPS_ID
*DrtmDps
;
1120 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
1121 AcpiDmTableInfoDrtm
);
1122 if (ACPI_FAILURE (Status
))
1127 Offset
= sizeof (ACPI_TABLE_DRTM
);
1131 /* Dump ValidatedTable length */
1133 DrtmVtl
= ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST
, Table
, Offset
);
1134 AcpiOsPrintf ("\n");
1135 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1136 DrtmVtl
, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST
, ValidatedTables
),
1137 AcpiDmTableInfoDrtm0
);
1138 if (ACPI_FAILURE (Status
))
1142 Offset
+= ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST
, ValidatedTables
);
1144 /* Dump Validated table addresses */
1147 while ((Offset
< Table
->Length
) &&
1148 (DrtmVtl
->ValidatedTableCount
> Count
))
1150 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1151 ACPI_ADD_PTR (void, Table
, Offset
), sizeof (UINT64
),
1152 AcpiDmTableInfoDrtm0a
);
1153 if (ACPI_FAILURE (Status
))
1157 Offset
+= sizeof (UINT64
);
1161 /* Dump ResourceList length */
1163 DrtmRl
= ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST
, Table
, Offset
);
1164 AcpiOsPrintf ("\n");
1165 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1166 DrtmRl
, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST
, Resources
),
1167 AcpiDmTableInfoDrtm1
);
1168 if (ACPI_FAILURE (Status
))
1173 Offset
+= ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST
, Resources
);
1175 /* Dump the Resource List */
1178 while ((Offset
< Table
->Length
) &&
1179 (DrtmRl
->ResourceCount
> Count
))
1181 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1182 ACPI_ADD_PTR (void, Table
, Offset
),
1183 sizeof (ACPI_DRTM_RESOURCE
),
1184 AcpiDmTableInfoDrtm1a
);
1185 if (ACPI_FAILURE (Status
))
1190 Offset
+= sizeof (ACPI_DRTM_RESOURCE
);
1196 DrtmDps
= ACPI_ADD_PTR (ACPI_DRTM_DPS_ID
, Table
, Offset
);
1197 AcpiOsPrintf ("\n");
1198 (void) AcpiDmDumpTable (Table
->Length
, Offset
,
1199 DrtmDps
, sizeof (ACPI_DRTM_DPS_ID
),
1200 AcpiDmTableInfoDrtm2
);
1204 /*******************************************************************************
1206 * FUNCTION: AcpiDmDumpEinj
1208 * PARAMETERS: Table - A EINJ table
1212 * DESCRIPTION: Format the contents of a EINJ. This table type consists
1213 * of an open-ended number of subtables.
1215 ******************************************************************************/
1219 ACPI_TABLE_HEADER
*Table
)
1222 ACPI_WHEA_HEADER
*SubTable
;
1223 UINT32 Length
= Table
->Length
;
1224 UINT32 Offset
= sizeof (ACPI_TABLE_EINJ
);
1229 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoEinj
);
1230 if (ACPI_FAILURE (Status
))
1237 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, Table
, Offset
);
1238 while (Offset
< Table
->Length
)
1240 AcpiOsPrintf ("\n");
1241 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1242 sizeof (ACPI_WHEA_HEADER
), AcpiDmTableInfoEinj0
);
1243 if (ACPI_FAILURE (Status
))
1248 /* Point to next subtable (each subtable is of fixed length) */
1250 Offset
+= sizeof (ACPI_WHEA_HEADER
);
1251 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, SubTable
,
1252 sizeof (ACPI_WHEA_HEADER
));
1257 /*******************************************************************************
1259 * FUNCTION: AcpiDmDumpErst
1261 * PARAMETERS: Table - A ERST table
1265 * DESCRIPTION: Format the contents of a ERST. This table type consists
1266 * of an open-ended number of subtables.
1268 ******************************************************************************/
1272 ACPI_TABLE_HEADER
*Table
)
1275 ACPI_WHEA_HEADER
*SubTable
;
1276 UINT32 Length
= Table
->Length
;
1277 UINT32 Offset
= sizeof (ACPI_TABLE_ERST
);
1282 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoErst
);
1283 if (ACPI_FAILURE (Status
))
1290 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, Table
, Offset
);
1291 while (Offset
< Table
->Length
)
1293 AcpiOsPrintf ("\n");
1294 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1295 sizeof (ACPI_WHEA_HEADER
), AcpiDmTableInfoErst0
);
1296 if (ACPI_FAILURE (Status
))
1301 /* Point to next subtable (each subtable is of fixed length) */
1303 Offset
+= sizeof (ACPI_WHEA_HEADER
);
1304 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, SubTable
,
1305 sizeof (ACPI_WHEA_HEADER
));
1310 /*******************************************************************************
1312 * FUNCTION: AcpiDmDumpFpdt
1314 * PARAMETERS: Table - A FPDT table
1318 * DESCRIPTION: Format the contents of a FPDT. This table type consists
1319 * of an open-ended number of subtables.
1321 ******************************************************************************/
1325 ACPI_TABLE_HEADER
*Table
)
1328 ACPI_FPDT_HEADER
*SubTable
;
1329 UINT32 Length
= Table
->Length
;
1330 UINT32 Offset
= sizeof (ACPI_TABLE_FPDT
);
1331 ACPI_DMTABLE_INFO
*InfoTable
;
1334 /* There is no main table (other than the standard ACPI header) */
1338 SubTable
= ACPI_ADD_PTR (ACPI_FPDT_HEADER
, Table
, Offset
);
1339 while (Offset
< Table
->Length
)
1341 /* Common subtable header */
1343 AcpiOsPrintf ("\n");
1344 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1345 SubTable
->Length
, AcpiDmTableInfoFpdtHdr
);
1346 if (ACPI_FAILURE (Status
))
1351 switch (SubTable
->Type
)
1353 case ACPI_FPDT_TYPE_BOOT
:
1355 InfoTable
= AcpiDmTableInfoFpdt0
;
1358 case ACPI_FPDT_TYPE_S3PERF
:
1360 InfoTable
= AcpiDmTableInfoFpdt1
;
1365 AcpiOsPrintf ("\n**** Unknown FPDT subtable type 0x%X\n\n", SubTable
->Type
);
1367 /* Attempt to continue */
1369 if (!SubTable
->Length
)
1371 AcpiOsPrintf ("Invalid zero length subtable\n");
1377 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1378 SubTable
->Length
, InfoTable
);
1379 if (ACPI_FAILURE (Status
))
1385 /* Point to next subtable */
1387 Offset
+= SubTable
->Length
;
1388 SubTable
= ACPI_ADD_PTR (ACPI_FPDT_HEADER
, SubTable
, SubTable
->Length
);
1393 /*******************************************************************************
1395 * FUNCTION: AcpiDmDumpGtdt
1397 * PARAMETERS: Table - A GTDT table
1401 * DESCRIPTION: Format the contents of a GTDT. This table type consists
1402 * of an open-ended number of subtables.
1404 ******************************************************************************/
1408 ACPI_TABLE_HEADER
*Table
)
1411 ACPI_GTDT_HEADER
*SubTable
;
1412 UINT32 Length
= Table
->Length
;
1413 UINT32 Offset
= sizeof (ACPI_TABLE_GTDT
);
1414 ACPI_DMTABLE_INFO
*InfoTable
;
1415 UINT32 SubTableLength
;
1417 ACPI_GTDT_TIMER_ENTRY
*GtxTable
;
1422 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoGtdt
);
1423 if (ACPI_FAILURE (Status
))
1430 SubTable
= ACPI_ADD_PTR (ACPI_GTDT_HEADER
, Table
, Offset
);
1431 while (Offset
< Table
->Length
)
1433 /* Common subtable header */
1435 AcpiOsPrintf ("\n");
1436 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1437 SubTable
->Length
, AcpiDmTableInfoGtdtHdr
);
1438 if (ACPI_FAILURE (Status
))
1444 switch (SubTable
->Type
)
1446 case ACPI_GTDT_TYPE_TIMER_BLOCK
:
1448 SubTableLength
= sizeof (ACPI_GTDT_TIMER_BLOCK
);
1449 GtCount
= (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK
,
1450 SubTable
))->TimerCount
;
1452 InfoTable
= AcpiDmTableInfoGtdt0
;
1455 case ACPI_GTDT_TYPE_WATCHDOG
:
1457 SubTableLength
= sizeof (ACPI_GTDT_WATCHDOG
);
1459 InfoTable
= AcpiDmTableInfoGtdt1
;
1464 /* Cannot continue on unknown type - no length */
1466 AcpiOsPrintf ("\n**** Unknown GTDT subtable type 0x%X\n", SubTable
->Type
);
1470 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1471 SubTable
->Length
, InfoTable
);
1472 if (ACPI_FAILURE (Status
))
1477 /* Point to end of current subtable (each subtable above is of fixed length) */
1479 Offset
+= SubTableLength
;
1481 /* If there are any Gt Timer Blocks from above, dump them now */
1485 GtxTable
= ACPI_ADD_PTR (ACPI_GTDT_TIMER_ENTRY
, SubTable
, SubTableLength
);
1486 SubTableLength
+= GtCount
* sizeof (ACPI_GTDT_TIMER_ENTRY
);
1490 AcpiOsPrintf ("\n");
1491 Status
= AcpiDmDumpTable (Length
, Offset
, GtxTable
,
1492 sizeof (ACPI_GTDT_TIMER_ENTRY
), AcpiDmTableInfoGtdt0a
);
1493 if (ACPI_FAILURE (Status
))
1497 Offset
+= sizeof (ACPI_GTDT_TIMER_ENTRY
);
1503 /* Point to next subtable */
1505 SubTable
= ACPI_ADD_PTR (ACPI_GTDT_HEADER
, SubTable
, SubTableLength
);
1510 /*******************************************************************************
1512 * FUNCTION: AcpiDmDumpHest
1514 * PARAMETERS: Table - A HEST table
1518 * DESCRIPTION: Format the contents of a HEST. This table type consists
1519 * of an open-ended number of subtables.
1521 ******************************************************************************/
1525 ACPI_TABLE_HEADER
*Table
)
1528 ACPI_HEST_HEADER
*SubTable
;
1529 UINT32 Length
= Table
->Length
;
1530 UINT32 Offset
= sizeof (ACPI_TABLE_HEST
);
1531 ACPI_DMTABLE_INFO
*InfoTable
;
1532 UINT32 SubTableLength
;
1534 ACPI_HEST_IA_ERROR_BANK
*BankTable
;
1539 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoHest
);
1540 if (ACPI_FAILURE (Status
))
1547 SubTable
= ACPI_ADD_PTR (ACPI_HEST_HEADER
, Table
, Offset
);
1548 while (Offset
< Table
->Length
)
1551 switch (SubTable
->Type
)
1553 case ACPI_HEST_TYPE_IA32_CHECK
:
1555 InfoTable
= AcpiDmTableInfoHest0
;
1556 SubTableLength
= sizeof (ACPI_HEST_IA_MACHINE_CHECK
);
1557 BankCount
= (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK
,
1558 SubTable
))->NumHardwareBanks
;
1561 case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK
:
1563 InfoTable
= AcpiDmTableInfoHest1
;
1564 SubTableLength
= sizeof (ACPI_HEST_IA_CORRECTED
);
1565 BankCount
= (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED
,
1566 SubTable
))->NumHardwareBanks
;
1569 case ACPI_HEST_TYPE_IA32_NMI
:
1571 InfoTable
= AcpiDmTableInfoHest2
;
1572 SubTableLength
= sizeof (ACPI_HEST_IA_NMI
);
1575 case ACPI_HEST_TYPE_AER_ROOT_PORT
:
1577 InfoTable
= AcpiDmTableInfoHest6
;
1578 SubTableLength
= sizeof (ACPI_HEST_AER_ROOT
);
1581 case ACPI_HEST_TYPE_AER_ENDPOINT
:
1583 InfoTable
= AcpiDmTableInfoHest7
;
1584 SubTableLength
= sizeof (ACPI_HEST_AER
);
1587 case ACPI_HEST_TYPE_AER_BRIDGE
:
1589 InfoTable
= AcpiDmTableInfoHest8
;
1590 SubTableLength
= sizeof (ACPI_HEST_AER_BRIDGE
);
1593 case ACPI_HEST_TYPE_GENERIC_ERROR
:
1595 InfoTable
= AcpiDmTableInfoHest9
;
1596 SubTableLength
= sizeof (ACPI_HEST_GENERIC
);
1601 /* Cannot continue on unknown type - no length */
1603 AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n", SubTable
->Type
);
1607 AcpiOsPrintf ("\n");
1608 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1609 SubTableLength
, InfoTable
);
1610 if (ACPI_FAILURE (Status
))
1615 /* Point to end of current subtable (each subtable above is of fixed length) */
1617 Offset
+= SubTableLength
;
1619 /* If there are any (fixed-length) Error Banks from above, dump them now */
1623 BankTable
= ACPI_ADD_PTR (ACPI_HEST_IA_ERROR_BANK
, SubTable
, SubTableLength
);
1624 SubTableLength
+= BankCount
* sizeof (ACPI_HEST_IA_ERROR_BANK
);
1628 AcpiOsPrintf ("\n");
1629 Status
= AcpiDmDumpTable (Length
, Offset
, BankTable
,
1630 sizeof (ACPI_HEST_IA_ERROR_BANK
), AcpiDmTableInfoHestBank
);
1631 if (ACPI_FAILURE (Status
))
1635 Offset
+= sizeof (ACPI_HEST_IA_ERROR_BANK
);
1641 /* Point to next subtable */
1643 SubTable
= ACPI_ADD_PTR (ACPI_HEST_HEADER
, SubTable
, SubTableLength
);
1648 /*******************************************************************************
1650 * FUNCTION: AcpiDmDumpIort
1652 * PARAMETERS: Table - A IORT table
1656 * DESCRIPTION: Format the contents of a IORT
1658 ******************************************************************************/
1662 ACPI_TABLE_HEADER
*Table
)
1665 ACPI_TABLE_IORT
*Iort
;
1666 ACPI_IORT_NODE
*IortNode
;
1667 ACPI_IORT_ITS_GROUP
*IortItsGroup
= NULL
;
1668 ACPI_IORT_SMMU
*IortSmmu
= NULL
;
1672 ACPI_DMTABLE_INFO
*InfoTable
;
1679 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoIort
);
1680 if (ACPI_FAILURE (Status
))
1685 Iort
= ACPI_CAST_PTR (ACPI_TABLE_IORT
, Table
);
1686 Offset
= sizeof (ACPI_TABLE_IORT
);
1688 /* Dump the OptionalPadding (optional) */
1690 if (Iort
->NodeOffset
> Offset
)
1692 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, Table
,
1693 Iort
->NodeOffset
- Offset
, AcpiDmTableInfoIortPad
);
1694 if (ACPI_FAILURE (Status
))
1700 Offset
= Iort
->NodeOffset
;
1701 while (Offset
< Table
->Length
)
1703 /* Common subtable header */
1705 IortNode
= ACPI_ADD_PTR (ACPI_IORT_NODE
, Table
, Offset
);
1706 AcpiOsPrintf ("\n");
1707 Length
= ACPI_OFFSET (ACPI_IORT_NODE
, NodeData
);
1708 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1709 IortNode
, Length
, AcpiDmTableInfoIortHdr
);
1710 if (ACPI_FAILURE (Status
))
1715 NodeOffset
= Length
;
1717 switch (IortNode
->Type
)
1719 case ACPI_IORT_NODE_ITS_GROUP
:
1721 InfoTable
= AcpiDmTableInfoIort0
;
1722 Length
= ACPI_OFFSET (ACPI_IORT_ITS_GROUP
, Identifiers
);
1723 IortItsGroup
= ACPI_ADD_PTR (ACPI_IORT_ITS_GROUP
, IortNode
, NodeOffset
);
1726 case ACPI_IORT_NODE_NAMED_COMPONENT
:
1728 InfoTable
= AcpiDmTableInfoIort1
;
1729 Length
= ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT
, DeviceName
);
1730 String
= ACPI_ADD_PTR (char, IortNode
, NodeOffset
+ Length
);
1731 Length
+= strlen (String
) + 1;
1734 case ACPI_IORT_NODE_PCI_ROOT_COMPLEX
:
1736 InfoTable
= AcpiDmTableInfoIort2
;
1737 Length
= IortNode
->Length
- NodeOffset
;
1740 case ACPI_IORT_NODE_SMMU
:
1742 InfoTable
= AcpiDmTableInfoIort3
;
1743 Length
= ACPI_OFFSET (ACPI_IORT_SMMU
, Interrupts
);
1744 IortSmmu
= ACPI_ADD_PTR (ACPI_IORT_SMMU
, IortNode
, NodeOffset
);
1749 AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",
1752 /* Attempt to continue */
1754 if (!IortNode
->Length
)
1756 AcpiOsPrintf ("Invalid zero length IORT node\n");
1762 /* Dump the node subtable header */
1764 AcpiOsPrintf ("\n");
1765 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1766 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1768 if (ACPI_FAILURE (Status
))
1773 NodeOffset
+= Length
;
1775 /* Dump the node specific data */
1777 switch (IortNode
->Type
)
1779 case ACPI_IORT_NODE_ITS_GROUP
:
1781 /* Validate IortItsGroup to avoid compiler warnings */
1785 for (i
= 0; i
< IortItsGroup
->ItsCount
; i
++)
1787 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1788 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1789 4, AcpiDmTableInfoIort0a
);
1795 case ACPI_IORT_NODE_NAMED_COMPONENT
:
1797 /* Dump the Padding (optional) */
1799 if (IortNode
->Length
> NodeOffset
)
1801 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1802 Table
, IortNode
->Length
- NodeOffset
,
1803 AcpiDmTableInfoIort1a
);
1804 if (ACPI_FAILURE (Status
))
1811 case ACPI_IORT_NODE_SMMU
:
1813 AcpiOsPrintf ("\n");
1815 /* Validate IortSmmu to avoid compiler warnings */
1819 Length
= 2 * sizeof (UINT64
);
1820 NodeOffset
= IortSmmu
->GlobalInterruptOffset
;
1821 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1822 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1823 Length
, AcpiDmTableInfoIort3a
);
1824 if (ACPI_FAILURE (Status
))
1829 NodeOffset
= IortSmmu
->ContextInterruptOffset
;
1830 for (i
= 0; i
< IortSmmu
->ContextInterruptCount
; i
++)
1832 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1833 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1834 8, AcpiDmTableInfoIort3b
);
1835 if (ACPI_FAILURE (Status
))
1842 NodeOffset
= IortSmmu
->PmuInterruptOffset
;
1843 for (i
= 0; i
< IortSmmu
->PmuInterruptCount
; i
++)
1845 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1846 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1847 8, AcpiDmTableInfoIort3c
);
1848 if (ACPI_FAILURE (Status
))
1862 /* Dump the ID mappings */
1864 NodeOffset
= IortNode
->MappingOffset
;
1865 for (i
= 0; i
< IortNode
->MappingCount
; i
++)
1867 AcpiOsPrintf ("\n");
1868 Length
= sizeof (ACPI_IORT_ID_MAPPING
);
1869 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1870 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1871 Length
, AcpiDmTableInfoIortMap
);
1872 if (ACPI_FAILURE (Status
))
1876 NodeOffset
+= Length
;
1880 /* Point to next node subtable */
1882 Offset
+= IortNode
->Length
;
1883 IortNode
= ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, IortNode
->Length
);
1888 /*******************************************************************************
1890 * FUNCTION: AcpiDmDumpIvrs
1892 * PARAMETERS: Table - A IVRS table
1896 * DESCRIPTION: Format the contents of a IVRS
1898 ******************************************************************************/
1900 static UINT8 EntrySizes
[] = {4,8,16,32};
1904 ACPI_TABLE_HEADER
*Table
)
1907 UINT32 Offset
= sizeof (ACPI_TABLE_IVRS
);
1911 ACPI_IVRS_DE_HEADER
*DeviceEntry
;
1912 ACPI_IVRS_HEADER
*SubTable
;
1913 ACPI_DMTABLE_INFO
*InfoTable
;
1918 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoIvrs
);
1919 if (ACPI_FAILURE (Status
))
1926 SubTable
= ACPI_ADD_PTR (ACPI_IVRS_HEADER
, Table
, Offset
);
1927 while (Offset
< Table
->Length
)
1929 /* Common subtable header */
1931 AcpiOsPrintf ("\n");
1932 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
1933 SubTable
->Length
, AcpiDmTableInfoIvrsHdr
);
1934 if (ACPI_FAILURE (Status
))
1939 switch (SubTable
->Type
)
1941 case ACPI_IVRS_TYPE_HARDWARE
:
1943 InfoTable
= AcpiDmTableInfoIvrs0
;
1946 case ACPI_IVRS_TYPE_MEMORY1
:
1947 case ACPI_IVRS_TYPE_MEMORY2
:
1948 case ACPI_IVRS_TYPE_MEMORY3
:
1950 InfoTable
= AcpiDmTableInfoIvrs1
;
1955 AcpiOsPrintf ("\n**** Unknown IVRS subtable type 0x%X\n",
1958 /* Attempt to continue */
1960 if (!SubTable
->Length
)
1962 AcpiOsPrintf ("Invalid zero length subtable\n");
1968 /* Dump the subtable */
1970 AcpiOsPrintf ("\n");
1971 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
1972 SubTable
->Length
, InfoTable
);
1973 if (ACPI_FAILURE (Status
))
1978 /* The hardware subtable can contain multiple device entries */
1980 if (SubTable
->Type
== ACPI_IVRS_TYPE_HARDWARE
)
1982 EntryOffset
= Offset
+ sizeof (ACPI_IVRS_HARDWARE
);
1983 DeviceEntry
= ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER
, SubTable
,
1984 sizeof (ACPI_IVRS_HARDWARE
));
1986 while (EntryOffset
< (Offset
+ SubTable
->Length
))
1988 AcpiOsPrintf ("\n");
1990 * Upper 2 bits of Type encode the length of the device entry
1994 * 10 = 16 byte - currently no entries defined
1995 * 11 = 32 byte - currently no entries defined
1997 EntryType
= DeviceEntry
->Type
;
1998 EntryLength
= EntrySizes
[EntryType
>> 6];
2002 /* 4-byte device entries */
2004 case ACPI_IVRS_TYPE_PAD4
:
2005 case ACPI_IVRS_TYPE_ALL
:
2006 case ACPI_IVRS_TYPE_SELECT
:
2007 case ACPI_IVRS_TYPE_START
:
2008 case ACPI_IVRS_TYPE_END
:
2010 InfoTable
= AcpiDmTableInfoIvrs4
;
2013 /* 8-byte entries, type A */
2015 case ACPI_IVRS_TYPE_ALIAS_SELECT
:
2016 case ACPI_IVRS_TYPE_ALIAS_START
:
2018 InfoTable
= AcpiDmTableInfoIvrs8a
;
2021 /* 8-byte entries, type B */
2023 case ACPI_IVRS_TYPE_PAD8
:
2024 case ACPI_IVRS_TYPE_EXT_SELECT
:
2025 case ACPI_IVRS_TYPE_EXT_START
:
2027 InfoTable
= AcpiDmTableInfoIvrs8b
;
2030 /* 8-byte entries, type C */
2032 case ACPI_IVRS_TYPE_SPECIAL
:
2034 InfoTable
= AcpiDmTableInfoIvrs8c
;
2038 InfoTable
= AcpiDmTableInfoIvrs4
;
2040 "\n**** Unknown IVRS device entry type/length: "
2041 "0x%.2X/0x%X at offset 0x%.4X: (header below)\n",
2042 EntryType
, EntryLength
, EntryOffset
);
2046 /* Dump the Device Entry */
2048 Status
= AcpiDmDumpTable (Table
->Length
, EntryOffset
,
2049 DeviceEntry
, EntryLength
, InfoTable
);
2050 if (ACPI_FAILURE (Status
))
2055 EntryOffset
+= EntryLength
;
2056 DeviceEntry
= ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER
, DeviceEntry
,
2062 /* Point to next subtable */
2064 Offset
+= SubTable
->Length
;
2065 SubTable
= ACPI_ADD_PTR (ACPI_IVRS_HEADER
, SubTable
, SubTable
->Length
);
2070 /*******************************************************************************
2072 * FUNCTION: AcpiDmDumpLpit
2074 * PARAMETERS: Table - A LPIT table
2078 * DESCRIPTION: Format the contents of a LPIT. This table type consists
2079 * of an open-ended number of subtables. Note: There are no
2080 * entries in the main table. An LPIT consists of the table
2081 * header and then subtables only.
2083 ******************************************************************************/
2087 ACPI_TABLE_HEADER
*Table
)
2090 ACPI_LPIT_HEADER
*SubTable
;
2091 UINT32 Length
= Table
->Length
;
2092 UINT32 Offset
= sizeof (ACPI_TABLE_LPIT
);
2093 ACPI_DMTABLE_INFO
*InfoTable
;
2094 UINT32 SubTableLength
;
2099 SubTable
= ACPI_ADD_PTR (ACPI_LPIT_HEADER
, Table
, Offset
);
2100 while (Offset
< Table
->Length
)
2102 /* Common subtable header */
2104 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2105 sizeof (ACPI_LPIT_HEADER
), AcpiDmTableInfoLpitHdr
);
2106 if (ACPI_FAILURE (Status
))
2111 switch (SubTable
->Type
)
2113 case ACPI_LPIT_TYPE_NATIVE_CSTATE
:
2115 InfoTable
= AcpiDmTableInfoLpit0
;
2116 SubTableLength
= sizeof (ACPI_LPIT_NATIVE
);
2121 /* Cannot continue on unknown type - no length */
2123 AcpiOsPrintf ("\n**** Unknown LPIT subtable type 0x%X\n", SubTable
->Type
);
2127 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2128 SubTableLength
, InfoTable
);
2129 if (ACPI_FAILURE (Status
))
2133 AcpiOsPrintf ("\n");
2135 /* Point to next subtable */
2137 Offset
+= SubTableLength
;
2138 SubTable
= ACPI_ADD_PTR (ACPI_LPIT_HEADER
, SubTable
, SubTableLength
);
2143 /*******************************************************************************
2145 * FUNCTION: AcpiDmDumpMadt
2147 * PARAMETERS: Table - A MADT table
2151 * DESCRIPTION: Format the contents of a MADT. This table type consists
2152 * of an open-ended number of subtables.
2154 ******************************************************************************/
2158 ACPI_TABLE_HEADER
*Table
)
2161 ACPI_SUBTABLE_HEADER
*SubTable
;
2162 UINT32 Length
= Table
->Length
;
2163 UINT32 Offset
= sizeof (ACPI_TABLE_MADT
);
2164 ACPI_DMTABLE_INFO
*InfoTable
;
2169 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoMadt
);
2170 if (ACPI_FAILURE (Status
))
2177 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, Table
, Offset
);
2178 while (Offset
< Table
->Length
)
2180 /* Common subtable header */
2182 AcpiOsPrintf ("\n");
2183 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2184 SubTable
->Length
, AcpiDmTableInfoMadtHdr
);
2185 if (ACPI_FAILURE (Status
))
2190 switch (SubTable
->Type
)
2192 case ACPI_MADT_TYPE_LOCAL_APIC
:
2194 InfoTable
= AcpiDmTableInfoMadt0
;
2197 case ACPI_MADT_TYPE_IO_APIC
:
2199 InfoTable
= AcpiDmTableInfoMadt1
;
2202 case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
:
2204 InfoTable
= AcpiDmTableInfoMadt2
;
2207 case ACPI_MADT_TYPE_NMI_SOURCE
:
2209 InfoTable
= AcpiDmTableInfoMadt3
;
2212 case ACPI_MADT_TYPE_LOCAL_APIC_NMI
:
2214 InfoTable
= AcpiDmTableInfoMadt4
;
2217 case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE
:
2219 InfoTable
= AcpiDmTableInfoMadt5
;
2222 case ACPI_MADT_TYPE_IO_SAPIC
:
2224 InfoTable
= AcpiDmTableInfoMadt6
;
2227 case ACPI_MADT_TYPE_LOCAL_SAPIC
:
2229 InfoTable
= AcpiDmTableInfoMadt7
;
2232 case ACPI_MADT_TYPE_INTERRUPT_SOURCE
:
2234 InfoTable
= AcpiDmTableInfoMadt8
;
2237 case ACPI_MADT_TYPE_LOCAL_X2APIC
:
2239 InfoTable
= AcpiDmTableInfoMadt9
;
2242 case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI
:
2244 InfoTable
= AcpiDmTableInfoMadt10
;
2247 case ACPI_MADT_TYPE_GENERIC_INTERRUPT
:
2249 InfoTable
= AcpiDmTableInfoMadt11
;
2252 case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR
:
2254 InfoTable
= AcpiDmTableInfoMadt12
;
2257 case ACPI_MADT_TYPE_GENERIC_MSI_FRAME
:
2259 InfoTable
= AcpiDmTableInfoMadt13
;
2262 case ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR
:
2264 InfoTable
= AcpiDmTableInfoMadt14
;
2267 case ACPI_MADT_TYPE_GENERIC_TRANSLATOR
:
2269 InfoTable
= AcpiDmTableInfoMadt15
;
2274 AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n", SubTable
->Type
);
2276 /* Attempt to continue */
2278 if (!SubTable
->Length
)
2280 AcpiOsPrintf ("Invalid zero length subtable\n");
2286 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2287 SubTable
->Length
, InfoTable
);
2288 if (ACPI_FAILURE (Status
))
2294 /* Point to next subtable */
2296 Offset
+= SubTable
->Length
;
2297 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, SubTable
, SubTable
->Length
);
2302 /*******************************************************************************
2304 * FUNCTION: AcpiDmDumpMcfg
2306 * PARAMETERS: Table - A MCFG Table
2310 * DESCRIPTION: Format the contents of a MCFG table
2312 ******************************************************************************/
2316 ACPI_TABLE_HEADER
*Table
)
2319 UINT32 Offset
= sizeof (ACPI_TABLE_MCFG
);
2320 ACPI_MCFG_ALLOCATION
*SubTable
;
2325 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMcfg
);
2326 if (ACPI_FAILURE (Status
))
2333 SubTable
= ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION
, Table
, Offset
);
2334 while (Offset
< Table
->Length
)
2336 if (Offset
+ sizeof (ACPI_MCFG_ALLOCATION
) > Table
->Length
)
2338 AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n",
2339 sizeof (ACPI_MCFG_ALLOCATION
) - (Offset
- Table
->Length
));
2343 AcpiOsPrintf ("\n");
2344 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2345 sizeof (ACPI_MCFG_ALLOCATION
), AcpiDmTableInfoMcfg0
);
2346 if (ACPI_FAILURE (Status
))
2351 /* Point to next subtable (each subtable is of fixed length) */
2353 Offset
+= sizeof (ACPI_MCFG_ALLOCATION
);
2354 SubTable
= ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION
, SubTable
,
2355 sizeof (ACPI_MCFG_ALLOCATION
));
2360 /*******************************************************************************
2362 * FUNCTION: AcpiDmDumpMpst
2364 * PARAMETERS: Table - A MPST Table
2368 * DESCRIPTION: Format the contents of a MPST table
2370 ******************************************************************************/
2374 ACPI_TABLE_HEADER
*Table
)
2377 UINT32 Offset
= sizeof (ACPI_TABLE_MPST
);
2378 ACPI_MPST_POWER_NODE
*SubTable0
;
2379 ACPI_MPST_POWER_STATE
*SubTable0A
;
2380 ACPI_MPST_COMPONENT
*SubTable0B
;
2381 ACPI_MPST_DATA_HDR
*SubTable1
;
2382 ACPI_MPST_POWER_DATA
*SubTable2
;
2383 UINT16 SubtableCount
;
2384 UINT32 PowerStateCount
;
2385 UINT32 ComponentCount
;
2390 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMpst
);
2391 if (ACPI_FAILURE (Status
))
2396 /* Subtable: Memory Power Node(s) */
2398 SubtableCount
= (ACPI_CAST_PTR (ACPI_TABLE_MPST
, Table
))->PowerNodeCount
;
2399 SubTable0
= ACPI_ADD_PTR (ACPI_MPST_POWER_NODE
, Table
, Offset
);
2401 while ((Offset
< Table
->Length
) && SubtableCount
)
2403 AcpiOsPrintf ("\n");
2404 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable0
,
2405 sizeof (ACPI_MPST_POWER_NODE
), AcpiDmTableInfoMpst0
);
2406 if (ACPI_FAILURE (Status
))
2411 /* Extract the sub-subtable counts */
2413 PowerStateCount
= SubTable0
->NumPowerStates
;
2414 ComponentCount
= SubTable0
->NumPhysicalComponents
;
2415 Offset
+= sizeof (ACPI_MPST_POWER_NODE
);
2417 /* Sub-subtables - Memory Power State Structure(s) */
2419 SubTable0A
= ACPI_ADD_PTR (ACPI_MPST_POWER_STATE
, SubTable0
,
2420 sizeof (ACPI_MPST_POWER_NODE
));
2422 while (PowerStateCount
)
2424 AcpiOsPrintf ("\n");
2425 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable0A
,
2426 sizeof (ACPI_MPST_POWER_STATE
), AcpiDmTableInfoMpst0A
);
2427 if (ACPI_FAILURE (Status
))
2434 Offset
+= sizeof (ACPI_MPST_POWER_STATE
);
2437 /* Sub-subtables - Physical Component ID Structure(s) */
2439 SubTable0B
= ACPI_CAST_PTR (ACPI_MPST_COMPONENT
, SubTable0A
);
2443 AcpiOsPrintf ("\n");
2446 while (ComponentCount
)
2448 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable0B
,
2449 sizeof (ACPI_MPST_COMPONENT
), AcpiDmTableInfoMpst0B
);
2450 if (ACPI_FAILURE (Status
))
2457 Offset
+= sizeof (ACPI_MPST_COMPONENT
);
2460 /* Point to next Memory Power Node subtable */
2463 SubTable0
= ACPI_ADD_PTR (ACPI_MPST_POWER_NODE
, SubTable0
,
2464 sizeof (ACPI_MPST_POWER_NODE
) +
2465 (sizeof (ACPI_MPST_POWER_STATE
) * SubTable0
->NumPowerStates
) +
2466 (sizeof (ACPI_MPST_COMPONENT
) * SubTable0
->NumPhysicalComponents
));
2469 /* Subtable: Count of Memory Power State Characteristic structures */
2471 AcpiOsPrintf ("\n");
2472 SubTable1
= ACPI_CAST_PTR (ACPI_MPST_DATA_HDR
, SubTable0
);
2473 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable1
,
2474 sizeof (ACPI_MPST_DATA_HDR
), AcpiDmTableInfoMpst1
);
2475 if (ACPI_FAILURE (Status
))
2480 SubtableCount
= SubTable1
->CharacteristicsCount
;
2481 Offset
+= sizeof (ACPI_MPST_DATA_HDR
);
2483 /* Subtable: Memory Power State Characteristics structure(s) */
2485 SubTable2
= ACPI_ADD_PTR (ACPI_MPST_POWER_DATA
, SubTable1
, sizeof (ACPI_MPST_DATA_HDR
));
2487 while ((Offset
< Table
->Length
) && SubtableCount
)
2489 AcpiOsPrintf ("\n");
2490 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable2
,
2491 sizeof (ACPI_MPST_POWER_DATA
), AcpiDmTableInfoMpst2
);
2492 if (ACPI_FAILURE (Status
))
2499 Offset
+= sizeof (ACPI_MPST_POWER_DATA
);
2504 /*******************************************************************************
2506 * FUNCTION: AcpiDmDumpMsct
2508 * PARAMETERS: Table - A MSCT table
2512 * DESCRIPTION: Format the contents of a MSCT
2514 ******************************************************************************/
2518 ACPI_TABLE_HEADER
*Table
)
2521 UINT32 Offset
= sizeof (ACPI_TABLE_MSCT
);
2522 ACPI_MSCT_PROXIMITY
*SubTable
;
2527 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMsct
);
2528 if (ACPI_FAILURE (Status
))
2535 SubTable
= ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY
, Table
, Offset
);
2536 while (Offset
< Table
->Length
)
2538 /* Common subtable header */
2540 AcpiOsPrintf ("\n");
2541 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2542 sizeof (ACPI_MSCT_PROXIMITY
), AcpiDmTableInfoMsct0
);
2543 if (ACPI_FAILURE (Status
))
2548 /* Point to next subtable */
2550 Offset
+= sizeof (ACPI_MSCT_PROXIMITY
);
2551 SubTable
= ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY
, SubTable
, sizeof (ACPI_MSCT_PROXIMITY
));
2556 /*******************************************************************************
2558 * FUNCTION: AcpiDmDumpMtmr
2560 * PARAMETERS: Table - A MTMR table
2564 * DESCRIPTION: Format the contents of a MTMR
2566 ******************************************************************************/
2570 ACPI_TABLE_HEADER
*Table
)
2573 UINT32 Offset
= sizeof (ACPI_TABLE_MTMR
);
2574 ACPI_MTMR_ENTRY
*SubTable
;
2579 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMtmr
);
2580 if (ACPI_FAILURE (Status
))
2587 SubTable
= ACPI_ADD_PTR (ACPI_MTMR_ENTRY
, Table
, Offset
);
2588 while (Offset
< Table
->Length
)
2590 /* Common subtable header */
2592 AcpiOsPrintf ("\n");
2593 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2594 sizeof (ACPI_MTMR_ENTRY
), AcpiDmTableInfoMtmr0
);
2595 if (ACPI_FAILURE (Status
))
2600 /* Point to next subtable */
2602 Offset
+= sizeof (ACPI_MTMR_ENTRY
);
2603 SubTable
= ACPI_ADD_PTR (ACPI_MTMR_ENTRY
, SubTable
, sizeof (ACPI_MTMR_ENTRY
));
2608 /*******************************************************************************
2610 * FUNCTION: AcpiDmDumpNfit
2612 * PARAMETERS: Table - A NFIT table
2616 * DESCRIPTION: Format the contents of an NFIT.
2618 ******************************************************************************/
2622 ACPI_TABLE_HEADER
*Table
)
2625 UINT32 Offset
= sizeof (ACPI_TABLE_NFIT
);
2626 UINT32 FieldOffset
= 0;
2628 ACPI_NFIT_HEADER
*SubTable
;
2629 ACPI_DMTABLE_INFO
*InfoTable
;
2630 ACPI_NFIT_INTERLEAVE
*Interleave
= NULL
;
2631 ACPI_NFIT_SMBIOS
*SmbiosInfo
= NULL
;
2632 ACPI_NFIT_FLUSH_ADDRESS
*Hint
= NULL
;
2638 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoNfit
);
2639 if (ACPI_FAILURE (Status
))
2646 SubTable
= ACPI_ADD_PTR (ACPI_NFIT_HEADER
, Table
, Offset
);
2647 while (Offset
< Table
->Length
)
2649 /* NFIT subtable header */
2651 AcpiOsPrintf ("\n");
2652 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2653 SubTable
->Length
, AcpiDmTableInfoNfitHdr
);
2654 if (ACPI_FAILURE (Status
))
2659 switch (SubTable
->Type
)
2661 case ACPI_NFIT_TYPE_SYSTEM_ADDRESS
:
2663 InfoTable
= AcpiDmTableInfoNfit0
;
2666 case ACPI_NFIT_TYPE_MEMORY_MAP
:
2668 InfoTable
= AcpiDmTableInfoNfit1
;
2671 case ACPI_NFIT_TYPE_INTERLEAVE
:
2673 /* Has a variable number of 32-bit values at the end */
2675 InfoTable
= AcpiDmTableInfoNfit2
;
2676 Interleave
= ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE
, SubTable
);
2677 FieldOffset
= sizeof (ACPI_NFIT_INTERLEAVE
);
2680 case ACPI_NFIT_TYPE_SMBIOS
:
2682 SmbiosInfo
= ACPI_CAST_PTR (ACPI_NFIT_SMBIOS
, SubTable
);
2683 InfoTable
= AcpiDmTableInfoNfit3
;
2686 case ACPI_NFIT_TYPE_CONTROL_REGION
:
2688 InfoTable
= AcpiDmTableInfoNfit4
;
2691 case ACPI_NFIT_TYPE_DATA_REGION
:
2693 InfoTable
= AcpiDmTableInfoNfit5
;
2696 case ACPI_NFIT_TYPE_FLUSH_ADDRESS
:
2698 /* Has a variable number of 64-bit addresses at the end */
2700 InfoTable
= AcpiDmTableInfoNfit6
;
2701 Hint
= ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS
, SubTable
);
2702 FieldOffset
= sizeof (ACPI_NFIT_FLUSH_ADDRESS
) - sizeof (UINT64
);
2706 AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n", SubTable
->Type
);
2708 /* Attempt to continue */
2710 if (!SubTable
->Length
)
2712 AcpiOsPrintf ("Invalid zero length subtable\n");
2718 AcpiOsPrintf ("\n");
2719 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2720 SubTable
->Length
, InfoTable
);
2721 if (ACPI_FAILURE (Status
))
2726 /* Per-subtable variable-length fields */
2728 switch (SubTable
->Type
)
2730 case ACPI_NFIT_TYPE_INTERLEAVE
:
2732 for (i
= 0; i
< Interleave
->LineCount
; i
++)
2734 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ FieldOffset
,
2735 &Interleave
->LineOffset
[i
],
2736 sizeof (UINT32
), AcpiDmTableInfoNfit2a
);
2737 if (ACPI_FAILURE (Status
))
2742 FieldOffset
+= sizeof (UINT32
);
2746 case ACPI_NFIT_TYPE_SMBIOS
:
2748 Length
= SubTable
->Length
- sizeof (ACPI_NFIT_SMBIOS
) + sizeof (UINT8
);
2751 Status
= AcpiDmDumpTable (Table
->Length
,
2752 sizeof (ACPI_NFIT_SMBIOS
) - sizeof (UINT8
),
2754 Length
, AcpiDmTableInfoNfit3a
);
2755 if (ACPI_FAILURE (Status
))
2763 case ACPI_NFIT_TYPE_FLUSH_ADDRESS
:
2765 for (i
= 0; i
< Hint
->HintCount
; i
++)
2767 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ FieldOffset
,
2768 &Hint
->HintAddress
[i
],
2769 sizeof (UINT64
), AcpiDmTableInfoNfit6a
);
2770 if (ACPI_FAILURE (Status
))
2775 FieldOffset
+= sizeof (UINT64
);
2784 /* Point to next subtable */
2786 Offset
+= SubTable
->Length
;
2787 SubTable
= ACPI_ADD_PTR (ACPI_NFIT_HEADER
, SubTable
, SubTable
->Length
);
2792 /*******************************************************************************
2794 * FUNCTION: AcpiDmDumpPcct
2796 * PARAMETERS: Table - A PCCT table
2800 * DESCRIPTION: Format the contents of a PCCT. This table type consists
2801 * of an open-ended number of subtables.
2803 ******************************************************************************/
2807 ACPI_TABLE_HEADER
*Table
)
2810 ACPI_PCCT_SUBSPACE
*SubTable
;
2811 ACPI_DMTABLE_INFO
*InfoTable
;
2812 UINT32 Length
= Table
->Length
;
2813 UINT32 Offset
= sizeof (ACPI_TABLE_PCCT
);
2818 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoPcct
);
2819 if (ACPI_FAILURE (Status
))
2826 SubTable
= ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE
, Table
, Offset
);
2827 while (Offset
< Table
->Length
)
2829 /* Common subtable header */
2831 AcpiOsPrintf ("\n");
2832 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2833 SubTable
->Header
.Length
, AcpiDmTableInfoPcctHdr
);
2834 if (ACPI_FAILURE (Status
))
2839 switch (SubTable
->Header
.Type
)
2841 case ACPI_PCCT_TYPE_GENERIC_SUBSPACE
:
2843 InfoTable
= AcpiDmTableInfoPcct0
;
2846 case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE
:
2848 InfoTable
= AcpiDmTableInfoPcct1
;
2854 "\n**** Unexpected or unknown PCCT subtable type 0x%X\n\n",
2855 SubTable
->Header
.Type
);
2859 AcpiOsPrintf ("\n");
2860 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2861 SubTable
->Header
.Length
, InfoTable
);
2862 if (ACPI_FAILURE (Status
))
2867 /* Point to next subtable */
2869 Offset
+= SubTable
->Header
.Length
;
2870 SubTable
= ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE
, SubTable
,
2871 SubTable
->Header
.Length
);
2876 /*******************************************************************************
2878 * FUNCTION: AcpiDmDumpPmtt
2880 * PARAMETERS: Table - A PMTT table
2884 * DESCRIPTION: Format the contents of a PMTT. This table type consists
2885 * of an open-ended number of subtables.
2887 ******************************************************************************/
2891 ACPI_TABLE_HEADER
*Table
)
2894 ACPI_PMTT_HEADER
*SubTable
;
2895 ACPI_PMTT_HEADER
*MemSubTable
;
2896 ACPI_PMTT_HEADER
*DimmSubTable
;
2897 ACPI_PMTT_DOMAIN
*DomainArray
;
2898 UINT32 Length
= Table
->Length
;
2899 UINT32 Offset
= sizeof (ACPI_TABLE_PMTT
);
2902 UINT32 DomainOffset
;
2908 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoPmtt
);
2909 if (ACPI_FAILURE (Status
))
2916 SubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
, Table
, Offset
);
2917 while (Offset
< Table
->Length
)
2919 /* Common subtable header */
2921 AcpiOsPrintf ("\n");
2922 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2923 SubTable
->Length
, AcpiDmTableInfoPmttHdr
);
2924 if (ACPI_FAILURE (Status
))
2929 /* Only Socket subtables are expected at this level */
2931 if (SubTable
->Type
!= ACPI_PMTT_TYPE_SOCKET
)
2934 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
2939 /* Dump the fixed-length portion of the subtable */
2941 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2942 SubTable
->Length
, AcpiDmTableInfoPmtt0
);
2943 if (ACPI_FAILURE (Status
))
2948 /* Walk the memory controller subtables */
2950 MemOffset
= sizeof (ACPI_PMTT_SOCKET
);
2951 MemSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
, SubTable
,
2952 sizeof (ACPI_PMTT_SOCKET
));
2954 while (((Offset
+ MemOffset
) < Table
->Length
) &&
2955 (MemOffset
< SubTable
->Length
))
2957 /* Common subtable header */
2959 AcpiOsPrintf ("\n");
2960 Status
= AcpiDmDumpTable (Length
,
2961 Offset
+ MemOffset
, MemSubTable
,
2962 MemSubTable
->Length
, AcpiDmTableInfoPmttHdr
);
2963 if (ACPI_FAILURE (Status
))
2968 /* Only memory controller subtables are expected at this level */
2970 if (MemSubTable
->Type
!= ACPI_PMTT_TYPE_CONTROLLER
)
2973 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
2978 /* Dump the fixed-length portion of the controller subtable */
2980 Status
= AcpiDmDumpTable (Length
,
2981 Offset
+ MemOffset
, MemSubTable
,
2982 MemSubTable
->Length
, AcpiDmTableInfoPmtt1
);
2983 if (ACPI_FAILURE (Status
))
2988 /* Walk the variable count of proximity domains */
2990 DomainCount
= ((ACPI_PMTT_CONTROLLER
*) MemSubTable
)->DomainCount
;
2991 DomainOffset
= sizeof (ACPI_PMTT_CONTROLLER
);
2992 DomainArray
= ACPI_ADD_PTR (ACPI_PMTT_DOMAIN
, MemSubTable
,
2993 sizeof (ACPI_PMTT_CONTROLLER
));
2995 while (((Offset
+ MemOffset
+ DomainOffset
) < Table
->Length
) &&
2996 ((MemOffset
+ DomainOffset
) < SubTable
->Length
) &&
2999 Status
= AcpiDmDumpTable (Length
,
3000 Offset
+ MemOffset
+ DomainOffset
, DomainArray
,
3001 sizeof (ACPI_PMTT_DOMAIN
), AcpiDmTableInfoPmtt1a
);
3002 if (ACPI_FAILURE (Status
))
3007 DomainOffset
+= sizeof (ACPI_PMTT_DOMAIN
);
3015 "\n**** DomainCount exceeds subtable length\n\n");
3018 /* Walk the physical component (DIMM) subtables */
3020 DimmOffset
= DomainOffset
;
3021 DimmSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
, MemSubTable
,
3024 while (((Offset
+ MemOffset
+ DimmOffset
) < Table
->Length
) &&
3025 (DimmOffset
< MemSubTable
->Length
))
3027 /* Common subtable header */
3029 AcpiOsPrintf ("\n");
3030 Status
= AcpiDmDumpTable (Length
,
3031 Offset
+ MemOffset
+ DimmOffset
, DimmSubTable
,
3032 DimmSubTable
->Length
, AcpiDmTableInfoPmttHdr
);
3033 if (ACPI_FAILURE (Status
))
3038 /* Only DIMM subtables are expected at this level */
3040 if (DimmSubTable
->Type
!= ACPI_PMTT_TYPE_DIMM
)
3043 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
3044 DimmSubTable
->Type
);
3048 /* Dump the fixed-length DIMM subtable */
3050 Status
= AcpiDmDumpTable (Length
,
3051 Offset
+ MemOffset
+ DimmOffset
, DimmSubTable
,
3052 DimmSubTable
->Length
, AcpiDmTableInfoPmtt2
);
3053 if (ACPI_FAILURE (Status
))
3058 /* Point to next DIMM subtable */
3060 DimmOffset
+= DimmSubTable
->Length
;
3061 DimmSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
,
3062 DimmSubTable
, DimmSubTable
->Length
);
3065 /* Point to next Controller subtable */
3067 MemOffset
+= MemSubTable
->Length
;
3068 MemSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
,
3069 MemSubTable
, MemSubTable
->Length
);
3072 /* Point to next Socket subtable */
3074 Offset
+= SubTable
->Length
;
3075 SubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
,
3076 SubTable
, SubTable
->Length
);
3081 /*******************************************************************************
3083 * FUNCTION: AcpiDmDumpS3pt
3085 * PARAMETERS: Table - A S3PT table
3087 * RETURN: Length of the table
3089 * DESCRIPTION: Format the contents of a S3PT
3091 ******************************************************************************/
3095 ACPI_TABLE_HEADER
*Tables
)
3098 UINT32 Offset
= sizeof (ACPI_TABLE_S3PT
);
3099 ACPI_S3PT_HEADER
*SubTable
;
3100 ACPI_DMTABLE_INFO
*InfoTable
;
3101 ACPI_TABLE_S3PT
*S3ptTable
= ACPI_CAST_PTR (ACPI_TABLE_S3PT
, Tables
);
3106 Status
= AcpiDmDumpTable (Offset
, 0, S3ptTable
, 0, AcpiDmTableInfoS3pt
);
3107 if (ACPI_FAILURE (Status
))
3112 SubTable
= ACPI_ADD_PTR (ACPI_S3PT_HEADER
, S3ptTable
, Offset
);
3113 while (Offset
< S3ptTable
->Length
)
3115 /* Common subtable header */
3117 AcpiOsPrintf ("\n");
3118 Status
= AcpiDmDumpTable (S3ptTable
->Length
, Offset
, SubTable
,
3119 SubTable
->Length
, AcpiDmTableInfoS3ptHdr
);
3120 if (ACPI_FAILURE (Status
))
3125 switch (SubTable
->Type
)
3127 case ACPI_S3PT_TYPE_RESUME
:
3129 InfoTable
= AcpiDmTableInfoS3pt0
;
3132 case ACPI_S3PT_TYPE_SUSPEND
:
3134 InfoTable
= AcpiDmTableInfoS3pt1
;
3139 AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n", SubTable
->Type
);
3141 /* Attempt to continue */
3143 if (!SubTable
->Length
)
3145 AcpiOsPrintf ("Invalid zero length subtable\n");
3151 AcpiOsPrintf ("\n");
3152 Status
= AcpiDmDumpTable (S3ptTable
->Length
, Offset
, SubTable
,
3153 SubTable
->Length
, InfoTable
);
3154 if (ACPI_FAILURE (Status
))
3160 /* Point to next subtable */
3162 Offset
+= SubTable
->Length
;
3163 SubTable
= ACPI_ADD_PTR (ACPI_S3PT_HEADER
, SubTable
, SubTable
->Length
);
3166 return (S3ptTable
->Length
);
3170 /*******************************************************************************
3172 * FUNCTION: AcpiDmDumpSlic
3174 * PARAMETERS: Table - A SLIC table
3178 * DESCRIPTION: Format the contents of a SLIC
3180 ******************************************************************************/
3184 ACPI_TABLE_HEADER
*Table
)
3186 (void) AcpiDmDumpTable (Table
->Length
, sizeof (ACPI_TABLE_HEADER
), Table
,
3187 Table
->Length
- sizeof (*Table
), AcpiDmTableInfoSlic
);
3191 /*******************************************************************************
3193 * FUNCTION: AcpiDmDumpSlit
3195 * PARAMETERS: Table - An SLIT
3199 * DESCRIPTION: Format the contents of a SLIT
3201 ******************************************************************************/
3205 ACPI_TABLE_HEADER
*Table
)
3217 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoSlit
);
3218 if (ACPI_FAILURE (Status
))
3223 /* Display the Locality NxN Matrix */
3225 Localities
= (UINT32
) ACPI_CAST_PTR (ACPI_TABLE_SLIT
, Table
)->LocalityCount
;
3226 Offset
= ACPI_OFFSET (ACPI_TABLE_SLIT
, Entry
[0]);
3227 Row
= (UINT8
*) ACPI_CAST_PTR (ACPI_TABLE_SLIT
, Table
)->Entry
;
3229 for (i
= 0; i
< Localities
; i
++)
3231 /* Display one row of the matrix */
3233 AcpiDmLineHeader2 (Offset
, Localities
, "Locality", i
);
3234 for (j
= 0; j
< Localities
; j
++)
3236 /* Check for beyond EOT */
3238 if (Offset
>= Table
->Length
)
3240 AcpiOsPrintf ("\n**** Not enough room in table for all localities\n");
3244 AcpiOsPrintf ("%2.2X", Row
[j
]);
3247 /* Display up to 16 bytes per output row */
3249 if ((j
+1) < Localities
)
3253 if (j
&& (((j
+1) % 16) == 0))
3255 AcpiOsPrintf ("\\\n"); /* With line continuation char */
3256 AcpiDmLineHeader (Offset
, 0, NULL
);
3261 /* Point to next row */
3263 AcpiOsPrintf ("\n");
3269 /*******************************************************************************
3271 * FUNCTION: AcpiDmDumpSrat
3273 * PARAMETERS: Table - A SRAT table
3277 * DESCRIPTION: Format the contents of a SRAT
3279 ******************************************************************************/
3283 ACPI_TABLE_HEADER
*Table
)
3286 UINT32 Offset
= sizeof (ACPI_TABLE_SRAT
);
3287 ACPI_SUBTABLE_HEADER
*SubTable
;
3288 ACPI_DMTABLE_INFO
*InfoTable
;
3293 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoSrat
);
3294 if (ACPI_FAILURE (Status
))
3301 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, Table
, Offset
);
3302 while (Offset
< Table
->Length
)
3304 /* Common subtable header */
3306 AcpiOsPrintf ("\n");
3307 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3308 SubTable
->Length
, AcpiDmTableInfoSratHdr
);
3309 if (ACPI_FAILURE (Status
))
3314 switch (SubTable
->Type
)
3316 case ACPI_SRAT_TYPE_CPU_AFFINITY
:
3318 InfoTable
= AcpiDmTableInfoSrat0
;
3321 case ACPI_SRAT_TYPE_MEMORY_AFFINITY
:
3323 InfoTable
= AcpiDmTableInfoSrat1
;
3326 case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY
:
3328 InfoTable
= AcpiDmTableInfoSrat2
;
3331 case ACPI_SRAT_TYPE_GICC_AFFINITY
:
3333 InfoTable
= AcpiDmTableInfoSrat3
;
3337 AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n", SubTable
->Type
);
3339 /* Attempt to continue */
3341 if (!SubTable
->Length
)
3343 AcpiOsPrintf ("Invalid zero length subtable\n");
3349 AcpiOsPrintf ("\n");
3350 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3351 SubTable
->Length
, InfoTable
);
3352 if (ACPI_FAILURE (Status
))
3358 /* Point to next subtable */
3360 Offset
+= SubTable
->Length
;
3361 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, SubTable
, SubTable
->Length
);
3366 /*******************************************************************************
3368 * FUNCTION: AcpiDmDumpStao
3370 * PARAMETERS: Table - A STAO table
3374 * DESCRIPTION: Format the contents of a STAO. This is a variable-length
3375 * table that contains an open-ended number of ASCII strings
3376 * at the end of the table.
3378 ******************************************************************************/
3382 ACPI_TABLE_HEADER
*Table
)
3386 UINT32 Length
= Table
->Length
;
3387 UINT32 StringLength
;
3388 UINT32 Offset
= sizeof (ACPI_TABLE_STAO
);
3393 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoStao
);
3394 if (ACPI_FAILURE (Status
))
3399 /* The rest of the table consists of Namepath strings */
3401 while (Offset
< Table
->Length
)
3403 Namepath
= ACPI_ADD_PTR (char, Table
, Offset
);
3404 StringLength
= strlen (Namepath
) + 1;
3406 AcpiDmLineHeader (Offset
, StringLength
, "Namestring");
3407 AcpiOsPrintf ("\"%s\"\n", Namepath
);
3409 /* Point to next namepath */
3411 Offset
+= StringLength
;
3416 /*******************************************************************************
3418 * FUNCTION: AcpiDmDumpTcpa
3420 * PARAMETERS: Table - A TCPA table
3424 * DESCRIPTION: Format the contents of a TCPA.
3426 * NOTE: There are two versions of the table with the same signature:
3427 * the client version and the server version. The common
3428 * PlatformClass field is used to differentiate the two types of
3431 ******************************************************************************/
3435 ACPI_TABLE_HEADER
*Table
)
3437 UINT32 Offset
= sizeof (ACPI_TABLE_TCPA_HDR
);
3438 ACPI_TABLE_TCPA_HDR
*CommonHeader
= ACPI_CAST_PTR (
3439 ACPI_TABLE_TCPA_HDR
, Table
);
3440 ACPI_TABLE_TCPA_HDR
*SubTable
= ACPI_ADD_PTR (
3441 ACPI_TABLE_TCPA_HDR
, Table
, Offset
);
3447 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
,
3448 0, AcpiDmTableInfoTcpaHdr
);
3449 if (ACPI_FAILURE (Status
))
3455 * Examine the PlatformClass field to determine the table type.
3456 * Either a client or server table. Only one.
3458 switch (CommonHeader
->PlatformClass
)
3460 case ACPI_TCPA_CLIENT_TABLE
:
3462 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3463 Table
->Length
- Offset
, AcpiDmTableInfoTcpaClient
);
3466 case ACPI_TCPA_SERVER_TABLE
:
3468 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3469 Table
->Length
- Offset
, AcpiDmTableInfoTcpaServer
);
3474 AcpiOsPrintf ("\n**** Unknown TCPA Platform Class 0x%X\n",
3475 CommonHeader
->PlatformClass
);
3480 if (ACPI_FAILURE (Status
))
3482 AcpiOsPrintf ("\n**** Cannot disassemble TCPA table\n");
3487 /*******************************************************************************
3489 * FUNCTION: AcpiDmDumpVrtc
3491 * PARAMETERS: Table - A VRTC table
3495 * DESCRIPTION: Format the contents of a VRTC
3497 ******************************************************************************/
3501 ACPI_TABLE_HEADER
*Table
)
3504 UINT32 Offset
= sizeof (ACPI_TABLE_VRTC
);
3505 ACPI_VRTC_ENTRY
*SubTable
;
3510 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoVrtc
);
3511 if (ACPI_FAILURE (Status
))
3518 SubTable
= ACPI_ADD_PTR (ACPI_VRTC_ENTRY
, Table
, Offset
);
3519 while (Offset
< Table
->Length
)
3521 /* Common subtable header */
3523 AcpiOsPrintf ("\n");
3524 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3525 sizeof (ACPI_VRTC_ENTRY
), AcpiDmTableInfoVrtc0
);
3526 if (ACPI_FAILURE (Status
))
3531 /* Point to next subtable */
3533 Offset
+= sizeof (ACPI_VRTC_ENTRY
);
3534 SubTable
= ACPI_ADD_PTR (ACPI_VRTC_ENTRY
, SubTable
, sizeof (ACPI_VRTC_ENTRY
));
3539 /*******************************************************************************
3541 * FUNCTION: AcpiDmDumpWdat
3543 * PARAMETERS: Table - A WDAT table
3547 * DESCRIPTION: Format the contents of a WDAT
3549 ******************************************************************************/
3553 ACPI_TABLE_HEADER
*Table
)
3556 UINT32 Offset
= sizeof (ACPI_TABLE_WDAT
);
3557 ACPI_WDAT_ENTRY
*SubTable
;
3562 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoWdat
);
3563 if (ACPI_FAILURE (Status
))
3570 SubTable
= ACPI_ADD_PTR (ACPI_WDAT_ENTRY
, Table
, Offset
);
3571 while (Offset
< Table
->Length
)
3573 /* Common subtable header */
3575 AcpiOsPrintf ("\n");
3576 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3577 sizeof (ACPI_WDAT_ENTRY
), AcpiDmTableInfoWdat0
);
3578 if (ACPI_FAILURE (Status
))
3583 /* Point to next subtable */
3585 Offset
+= sizeof (ACPI_WDAT_ENTRY
);
3586 SubTable
= ACPI_ADD_PTR (ACPI_WDAT_ENTRY
, SubTable
, sizeof (ACPI_WDAT_ENTRY
));
3590 /*******************************************************************************
3592 * FUNCTION: AcpiDmDumpWpbt
3594 * PARAMETERS: Table - A WPBT table
3598 * DESCRIPTION: Format the contents of a WPBT. This table type consists
3599 * of an open-ended arguments buffer at the end of the table.
3601 ******************************************************************************/
3605 ACPI_TABLE_HEADER
*Table
)
3608 ACPI_TABLE_WPBT
*SubTable
;
3609 UINT32 Length
= Table
->Length
;
3610 UINT16 ArgumentsLength
;
3613 /* Dump the main table */
3615 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoWpbt
);
3616 if (ACPI_FAILURE (Status
))
3621 /* Extract the arguments buffer length from the main table */
3623 SubTable
= ACPI_CAST_PTR (ACPI_TABLE_WPBT
, Table
);
3624 ArgumentsLength
= SubTable
->ArgumentsLength
;
3626 /* Dump the arguments buffer */
3628 (void) AcpiDmDumpTable (Table
->Length
, 0, Table
, ArgumentsLength
,
3629 AcpiDmTableInfoWpbt0
);