1 /******************************************************************************
3 * Module Name: dmtbdump - Dump ACPI data tables that contain no AML code
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2016, 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
]);
182 AcpiOsPrintf ("\"\n");
186 AcpiDmDumpBuffer (Table
, BufferOffset
, ByteLength
,
192 /*******************************************************************************
194 * FUNCTION: AcpiDmDumpRsdp
196 * PARAMETERS: Table - A RSDP
198 * RETURN: Length of the table (there is not always a length field,
199 * use revision or length if available (ACPI 2.0+))
201 * DESCRIPTION: Format the contents of a RSDP
203 ******************************************************************************/
207 ACPI_TABLE_HEADER
*Table
)
209 ACPI_TABLE_RSDP
*Rsdp
= ACPI_CAST_PTR (ACPI_TABLE_RSDP
, Table
);
210 UINT32 Length
= sizeof (ACPI_RSDP_COMMON
);
215 /* Dump the common ACPI 1.0 portion */
217 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoRsdp1
);
218 if (ACPI_FAILURE (Status
))
223 /* Validate the first checksum */
225 Checksum
= AcpiDmGenerateChecksum (Rsdp
, sizeof (ACPI_RSDP_COMMON
),
227 if (Checksum
!= Rsdp
->Checksum
)
229 AcpiOsPrintf ("/* Incorrect Checksum above, should be 0x%2.2X */\n",
233 /* The RSDP for ACPI 2.0+ contains more data and has a Length field */
235 if (Rsdp
->Revision
> 0)
237 Length
= Rsdp
->Length
;
238 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoRsdp2
);
239 if (ACPI_FAILURE (Status
))
244 /* Validate the extended checksum over entire RSDP */
246 Checksum
= AcpiDmGenerateChecksum (Rsdp
, sizeof (ACPI_TABLE_RSDP
),
247 Rsdp
->ExtendedChecksum
);
248 if (Checksum
!= Rsdp
->ExtendedChecksum
)
251 "/* Incorrect Extended Checksum above, should be 0x%2.2X */\n",
260 /*******************************************************************************
262 * FUNCTION: AcpiDmDumpRsdt
264 * PARAMETERS: Table - A RSDT
268 * DESCRIPTION: Format the contents of a RSDT
270 ******************************************************************************/
274 ACPI_TABLE_HEADER
*Table
)
282 /* Point to start of table pointer array */
284 Array
= ACPI_CAST_PTR (ACPI_TABLE_RSDT
, Table
)->TableOffsetEntry
;
285 Offset
= sizeof (ACPI_TABLE_HEADER
);
287 /* RSDT uses 32-bit pointers */
289 Entries
= (Table
->Length
- sizeof (ACPI_TABLE_HEADER
)) / sizeof (UINT32
);
291 for (i
= 0; i
< Entries
; i
++)
293 AcpiDmLineHeader2 (Offset
, sizeof (UINT32
), "ACPI Table Address", i
);
294 AcpiOsPrintf ("%8.8X\n", Array
[i
]);
295 Offset
+= sizeof (UINT32
);
300 /*******************************************************************************
302 * FUNCTION: AcpiDmDumpXsdt
304 * PARAMETERS: Table - A XSDT
308 * DESCRIPTION: Format the contents of a XSDT
310 ******************************************************************************/
314 ACPI_TABLE_HEADER
*Table
)
322 /* Point to start of table pointer array */
324 Array
= ACPI_CAST_PTR (ACPI_TABLE_XSDT
, Table
)->TableOffsetEntry
;
325 Offset
= sizeof (ACPI_TABLE_HEADER
);
327 /* XSDT uses 64-bit pointers */
329 Entries
= (Table
->Length
- sizeof (ACPI_TABLE_HEADER
)) / sizeof (UINT64
);
331 for (i
= 0; i
< Entries
; i
++)
333 AcpiDmLineHeader2 (Offset
, sizeof (UINT64
), "ACPI Table Address", i
);
334 AcpiOsPrintf ("%8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Array
[i
]));
335 Offset
+= sizeof (UINT64
);
340 /*******************************************************************************
342 * FUNCTION: AcpiDmDumpFadt
344 * PARAMETERS: Table - A FADT
348 * DESCRIPTION: Format the contents of a FADT
350 * NOTE: We cannot depend on the FADT version to indicate the actual
351 * contents of the FADT because of BIOS bugs. The table length
352 * is the only reliable indicator.
354 ******************************************************************************/
358 ACPI_TABLE_HEADER
*Table
)
363 /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */
365 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
366 AcpiDmTableInfoFadt1
);
367 if (ACPI_FAILURE (Status
))
372 /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */
374 if ((Table
->Length
> ACPI_FADT_V1_SIZE
) &&
375 (Table
->Length
<= ACPI_FADT_V2_SIZE
))
377 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
378 AcpiDmTableInfoFadt2
);
379 if (ACPI_FAILURE (Status
))
385 /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */
387 else if (Table
->Length
> ACPI_FADT_V2_SIZE
)
389 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
390 AcpiDmTableInfoFadt3
);
391 if (ACPI_FAILURE (Status
))
396 /* Check for FADT revision 5 fields and up (ACPI 5.0+) */
398 if (Table
->Length
> ACPI_FADT_V3_SIZE
)
400 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
401 AcpiDmTableInfoFadt5
);
402 if (ACPI_FAILURE (Status
))
408 /* Check for FADT revision 6 fields and up (ACPI 6.0+) */
410 if (Table
->Length
> ACPI_FADT_V3_SIZE
)
412 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
413 AcpiDmTableInfoFadt6
);
414 if (ACPI_FAILURE (Status
))
421 /* Validate various fields in the FADT, including length */
423 AcpiTbCreateLocalFadt (Table
, Table
->Length
);
425 /* Validate FADT length against the revision */
427 AcpiDmValidateFadtLength (Table
->Revision
, Table
->Length
);
431 /*******************************************************************************
433 * FUNCTION: AcpiDmValidateFadtLength
435 * PARAMETERS: Revision - FADT revision (Header->Revision)
436 * Length - FADT length (Header->Length
440 * DESCRIPTION: Check the FADT revision against the expected table length for
441 * that revision. Issue a warning if the length is not what was
442 * expected. This seems to be such a common BIOS bug that the
443 * FADT revision has been rendered virtually meaningless.
445 ******************************************************************************/
448 AcpiDmValidateFadtLength (
452 UINT32 ExpectedLength
;
459 AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
464 ExpectedLength
= ACPI_FADT_V1_SIZE
;
469 ExpectedLength
= ACPI_FADT_V2_SIZE
;
475 ExpectedLength
= ACPI_FADT_V3_SIZE
;
480 ExpectedLength
= ACPI_FADT_V5_SIZE
;
488 if (Length
== ExpectedLength
)
494 "\n// ACPI Warning: FADT revision %X does not match length: "
495 "found %X expected %X\n",
496 Revision
, Length
, ExpectedLength
);
500 /*******************************************************************************
502 * FUNCTION: AcpiDmDumpAsf
504 * PARAMETERS: Table - A ASF table
508 * DESCRIPTION: Format the contents of a ASF table
510 ******************************************************************************/
514 ACPI_TABLE_HEADER
*Table
)
517 UINT32 Offset
= sizeof (ACPI_TABLE_HEADER
);
518 ACPI_ASF_INFO
*SubTable
;
519 ACPI_DMTABLE_INFO
*InfoTable
;
520 ACPI_DMTABLE_INFO
*DataInfoTable
= NULL
;
521 UINT8
*DataTable
= NULL
;
522 UINT32 DataCount
= 0;
523 UINT32 DataLength
= 0;
524 UINT32 DataOffset
= 0;
529 /* No main table, only subtables */
531 SubTable
= ACPI_ADD_PTR (ACPI_ASF_INFO
, Table
, Offset
);
532 while (Offset
< Table
->Length
)
534 /* Common subtable header */
536 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
537 SubTable
->Header
.Length
, AcpiDmTableInfoAsfHdr
);
538 if (ACPI_FAILURE (Status
))
543 /* The actual type is the lower 7 bits of Type */
545 Type
= (UINT8
) (SubTable
->Header
.Type
& 0x7F);
549 case ACPI_ASF_TYPE_INFO
:
551 InfoTable
= AcpiDmTableInfoAsf0
;
554 case ACPI_ASF_TYPE_ALERT
:
556 InfoTable
= AcpiDmTableInfoAsf1
;
557 DataInfoTable
= AcpiDmTableInfoAsf1a
;
558 DataTable
= ACPI_ADD_PTR (UINT8
, SubTable
, sizeof (ACPI_ASF_ALERT
));
559 DataCount
= ACPI_CAST_PTR (ACPI_ASF_ALERT
, SubTable
)->Alerts
;
560 DataLength
= ACPI_CAST_PTR (ACPI_ASF_ALERT
, SubTable
)->DataLength
;
561 DataOffset
= Offset
+ sizeof (ACPI_ASF_ALERT
);
564 case ACPI_ASF_TYPE_CONTROL
:
566 InfoTable
= AcpiDmTableInfoAsf2
;
567 DataInfoTable
= AcpiDmTableInfoAsf2a
;
568 DataTable
= ACPI_ADD_PTR (UINT8
, SubTable
, sizeof (ACPI_ASF_REMOTE
));
569 DataCount
= ACPI_CAST_PTR (ACPI_ASF_REMOTE
, SubTable
)->Controls
;
570 DataLength
= ACPI_CAST_PTR (ACPI_ASF_REMOTE
, SubTable
)->DataLength
;
571 DataOffset
= Offset
+ sizeof (ACPI_ASF_REMOTE
);
574 case ACPI_ASF_TYPE_BOOT
:
576 InfoTable
= AcpiDmTableInfoAsf3
;
579 case ACPI_ASF_TYPE_ADDRESS
:
581 InfoTable
= AcpiDmTableInfoAsf4
;
582 DataTable
= ACPI_ADD_PTR (UINT8
, SubTable
, sizeof (ACPI_ASF_ADDRESS
));
583 DataLength
= ACPI_CAST_PTR (ACPI_ASF_ADDRESS
, SubTable
)->Devices
;
584 DataOffset
= Offset
+ sizeof (ACPI_ASF_ADDRESS
);
589 AcpiOsPrintf ("\n**** Unknown ASF subtable type 0x%X\n",
590 SubTable
->Header
.Type
);
594 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
595 SubTable
->Header
.Length
, InfoTable
);
596 if (ACPI_FAILURE (Status
))
601 /* Dump variable-length extra data */
605 case ACPI_ASF_TYPE_ALERT
:
606 case ACPI_ASF_TYPE_CONTROL
:
608 for (i
= 0; i
< DataCount
; i
++)
611 Status
= AcpiDmDumpTable (Table
->Length
, DataOffset
,
612 DataTable
, DataLength
, DataInfoTable
);
613 if (ACPI_FAILURE (Status
))
618 DataTable
= ACPI_ADD_PTR (UINT8
, DataTable
, DataLength
);
619 DataOffset
+= DataLength
;
623 case ACPI_ASF_TYPE_ADDRESS
:
625 for (i
= 0; i
< DataLength
; i
++)
629 AcpiDmLineHeader (DataOffset
, 1, "Addresses");
632 AcpiOsPrintf ("%2.2X ", *DataTable
);
636 if (DataOffset
> Table
->Length
)
639 "**** ACPI table terminates in the middle of a "
640 "data structure! (ASF! table)\n");
655 /* Point to next subtable */
657 if (!SubTable
->Header
.Length
)
659 AcpiOsPrintf ("Invalid zero subtable header length\n");
663 Offset
+= SubTable
->Header
.Length
;
664 SubTable
= ACPI_ADD_PTR (ACPI_ASF_INFO
, SubTable
,
665 SubTable
->Header
.Length
);
670 /*******************************************************************************
672 * FUNCTION: AcpiDmDumpCpep
674 * PARAMETERS: Table - A CPEP table
678 * DESCRIPTION: Format the contents of a CPEP. This table type consists
679 * of an open-ended number of subtables.
681 ******************************************************************************/
685 ACPI_TABLE_HEADER
*Table
)
688 ACPI_CPEP_POLLING
*SubTable
;
689 UINT32 Length
= Table
->Length
;
690 UINT32 Offset
= sizeof (ACPI_TABLE_CPEP
);
695 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoCpep
);
696 if (ACPI_FAILURE (Status
))
703 SubTable
= ACPI_ADD_PTR (ACPI_CPEP_POLLING
, Table
, Offset
);
704 while (Offset
< Table
->Length
)
707 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
708 SubTable
->Header
.Length
, AcpiDmTableInfoCpep0
);
709 if (ACPI_FAILURE (Status
))
714 /* Point to next subtable */
716 Offset
+= SubTable
->Header
.Length
;
717 SubTable
= ACPI_ADD_PTR (ACPI_CPEP_POLLING
, SubTable
,
718 SubTable
->Header
.Length
);
723 /*******************************************************************************
725 * FUNCTION: AcpiDmDumpCsrt
727 * PARAMETERS: Table - A CSRT table
731 * DESCRIPTION: Format the contents of a CSRT. This table type consists
732 * of an open-ended number of subtables.
734 ******************************************************************************/
738 ACPI_TABLE_HEADER
*Table
)
741 ACPI_CSRT_GROUP
*SubTable
;
742 ACPI_CSRT_SHARED_INFO
*SharedInfoTable
;
743 ACPI_CSRT_DESCRIPTOR
*SubSubTable
;
744 UINT32 Length
= Table
->Length
;
745 UINT32 Offset
= sizeof (ACPI_TABLE_CSRT
);
751 /* The main table only contains the ACPI header, thus already handled */
753 /* Subtables (Resource Groups) */
755 SubTable
= ACPI_ADD_PTR (ACPI_CSRT_GROUP
, Table
, Offset
);
756 while (Offset
< Table
->Length
)
758 /* Resource group subtable */
761 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
762 SubTable
->Length
, AcpiDmTableInfoCsrt0
);
763 if (ACPI_FAILURE (Status
))
768 /* Shared info subtable (One per resource group) */
770 SubOffset
= sizeof (ACPI_CSRT_GROUP
);
771 SharedInfoTable
= ACPI_ADD_PTR (ACPI_CSRT_SHARED_INFO
, Table
,
775 Status
= AcpiDmDumpTable (Length
, Offset
+ SubOffset
, SharedInfoTable
,
776 sizeof (ACPI_CSRT_SHARED_INFO
), AcpiDmTableInfoCsrt1
);
777 if (ACPI_FAILURE (Status
))
782 SubOffset
+= SubTable
->SharedInfoLength
;
784 /* Sub-Subtables (Resource Descriptors) */
786 SubSubTable
= ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR
, Table
,
789 while ((SubOffset
< SubTable
->Length
) &&
790 ((Offset
+ SubOffset
) < Table
->Length
))
793 Status
= AcpiDmDumpTable (Length
, Offset
+ SubOffset
, SubSubTable
,
794 SubSubTable
->Length
, AcpiDmTableInfoCsrt2
);
795 if (ACPI_FAILURE (Status
))
800 SubSubOffset
= sizeof (ACPI_CSRT_DESCRIPTOR
);
802 /* Resource-specific info buffer */
804 InfoLength
= SubSubTable
->Length
- SubSubOffset
;
807 Status
= AcpiDmDumpTable (Length
,
808 Offset
+ SubOffset
+ SubSubOffset
, Table
,
809 InfoLength
, AcpiDmTableInfoCsrt2a
);
810 if (ACPI_FAILURE (Status
))
814 SubSubOffset
+= InfoLength
;
817 /* Point to next sub-subtable */
819 SubOffset
+= SubSubTable
->Length
;
820 SubSubTable
= ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR
, SubSubTable
,
821 SubSubTable
->Length
);
824 /* Point to next subtable */
826 Offset
+= SubTable
->Length
;
827 SubTable
= ACPI_ADD_PTR (ACPI_CSRT_GROUP
, SubTable
,
833 /*******************************************************************************
835 * FUNCTION: AcpiDmDumpDbg2
837 * PARAMETERS: Table - A DBG2 table
841 * DESCRIPTION: Format the contents of a DBG2. This table type consists
842 * of an open-ended number of subtables.
844 ******************************************************************************/
848 ACPI_TABLE_HEADER
*Table
)
851 ACPI_DBG2_DEVICE
*SubTable
;
852 UINT32 Length
= Table
->Length
;
853 UINT32 Offset
= sizeof (ACPI_TABLE_DBG2
);
856 UINT32 AbsoluteOffset
;
862 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoDbg2
);
863 if (ACPI_FAILURE (Status
))
870 SubTable
= ACPI_ADD_PTR (ACPI_DBG2_DEVICE
, Table
, Offset
);
871 while (Offset
< Table
->Length
)
874 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
875 SubTable
->Length
, AcpiDmTableInfoDbg2Device
);
876 if (ACPI_FAILURE (Status
))
881 /* Dump the BaseAddress array */
883 for (i
= 0; i
< SubTable
->RegisterCount
; i
++)
885 ArrayOffset
= SubTable
->BaseAddressOffset
+
886 (sizeof (ACPI_GENERIC_ADDRESS
) * i
);
887 AbsoluteOffset
= Offset
+ ArrayOffset
;
888 Array
= (UINT8
*) SubTable
+ ArrayOffset
;
890 Status
= AcpiDmDumpTable (Length
, AbsoluteOffset
, Array
,
891 SubTable
->Length
, AcpiDmTableInfoDbg2Addr
);
892 if (ACPI_FAILURE (Status
))
898 /* Dump the AddressSize array */
900 for (i
= 0; i
< SubTable
->RegisterCount
; i
++)
902 ArrayOffset
= SubTable
->AddressSizeOffset
+
903 (sizeof (UINT32
) * i
);
904 AbsoluteOffset
= Offset
+ ArrayOffset
;
905 Array
= (UINT8
*) SubTable
+ ArrayOffset
;
907 Status
= AcpiDmDumpTable (Length
, AbsoluteOffset
, Array
,
908 SubTable
->Length
, AcpiDmTableInfoDbg2Size
);
909 if (ACPI_FAILURE (Status
))
915 /* Dump the Namestring (required) */
918 ArrayOffset
= SubTable
->NamepathOffset
;
919 AbsoluteOffset
= Offset
+ ArrayOffset
;
920 Array
= (UINT8
*) SubTable
+ ArrayOffset
;
922 Status
= AcpiDmDumpTable (Length
, AbsoluteOffset
, Array
,
923 SubTable
->Length
, AcpiDmTableInfoDbg2Name
);
924 if (ACPI_FAILURE (Status
))
929 /* Dump the OemData (optional) */
931 if (SubTable
->OemDataOffset
)
933 Status
= AcpiDmDumpTable (Length
, Offset
+ SubTable
->OemDataOffset
,
934 Table
, SubTable
->OemDataLength
,
935 AcpiDmTableInfoDbg2OemData
);
936 if (ACPI_FAILURE (Status
))
942 /* Point to next subtable */
944 Offset
+= SubTable
->Length
;
945 SubTable
= ACPI_ADD_PTR (ACPI_DBG2_DEVICE
, SubTable
,
951 /*******************************************************************************
953 * FUNCTION: AcpiDmDumpDmar
955 * PARAMETERS: Table - A DMAR table
959 * DESCRIPTION: Format the contents of a DMAR. This table type consists
960 * of an open-ended number of subtables.
962 ******************************************************************************/
966 ACPI_TABLE_HEADER
*Table
)
969 ACPI_DMAR_HEADER
*SubTable
;
970 UINT32 Length
= Table
->Length
;
971 UINT32 Offset
= sizeof (ACPI_TABLE_DMAR
);
972 ACPI_DMTABLE_INFO
*InfoTable
;
973 ACPI_DMAR_DEVICE_SCOPE
*ScopeTable
;
981 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoDmar
);
982 if (ACPI_FAILURE (Status
))
989 SubTable
= ACPI_ADD_PTR (ACPI_DMAR_HEADER
, Table
, Offset
);
990 while (Offset
< Table
->Length
)
992 /* Common subtable header */
995 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
996 SubTable
->Length
, AcpiDmTableInfoDmarHdr
);
997 if (ACPI_FAILURE (Status
))
1002 AcpiOsPrintf ("\n");
1004 switch (SubTable
->Type
)
1006 case ACPI_DMAR_TYPE_HARDWARE_UNIT
:
1008 InfoTable
= AcpiDmTableInfoDmar0
;
1009 ScopeOffset
= sizeof (ACPI_DMAR_HARDWARE_UNIT
);
1012 case ACPI_DMAR_TYPE_RESERVED_MEMORY
:
1014 InfoTable
= AcpiDmTableInfoDmar1
;
1015 ScopeOffset
= sizeof (ACPI_DMAR_RESERVED_MEMORY
);
1018 case ACPI_DMAR_TYPE_ROOT_ATS
:
1020 InfoTable
= AcpiDmTableInfoDmar2
;
1021 ScopeOffset
= sizeof (ACPI_DMAR_ATSR
);
1024 case ACPI_DMAR_TYPE_HARDWARE_AFFINITY
:
1026 InfoTable
= AcpiDmTableInfoDmar3
;
1027 ScopeOffset
= sizeof (ACPI_DMAR_RHSA
);
1030 case ACPI_DMAR_TYPE_NAMESPACE
:
1032 InfoTable
= AcpiDmTableInfoDmar4
;
1033 ScopeOffset
= sizeof (ACPI_DMAR_ANDD
);
1038 AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n",
1043 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1044 SubTable
->Length
, InfoTable
);
1045 if (ACPI_FAILURE (Status
))
1051 * Dump the optional device scope entries
1053 if ((SubTable
->Type
== ACPI_DMAR_TYPE_HARDWARE_AFFINITY
) ||
1054 (SubTable
->Type
== ACPI_DMAR_TYPE_NAMESPACE
))
1056 /* These types do not support device scopes */
1061 ScopeTable
= ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE
, SubTable
, ScopeOffset
);
1062 while (ScopeOffset
< SubTable
->Length
)
1064 AcpiOsPrintf ("\n");
1065 Status
= AcpiDmDumpTable (Length
, Offset
+ ScopeOffset
, ScopeTable
,
1066 ScopeTable
->Length
, AcpiDmTableInfoDmarScope
);
1067 if (ACPI_FAILURE (Status
))
1071 AcpiOsPrintf ("\n");
1073 /* Dump the PCI Path entries for this device scope */
1075 PathOffset
= sizeof (ACPI_DMAR_DEVICE_SCOPE
); /* Path entries start at this offset */
1077 PciPath
= ACPI_ADD_PTR (UINT8
, ScopeTable
,
1078 sizeof (ACPI_DMAR_DEVICE_SCOPE
));
1080 while (PathOffset
< ScopeTable
->Length
)
1082 AcpiDmLineHeader ((PathOffset
+ ScopeOffset
+ Offset
), 2,
1084 AcpiOsPrintf ("%2.2X,%2.2X\n", PciPath
[0], PciPath
[1]);
1086 /* Point to next PCI Path entry */
1090 AcpiOsPrintf ("\n");
1093 /* Point to next device scope entry */
1095 ScopeOffset
+= ScopeTable
->Length
;
1096 ScopeTable
= ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE
,
1097 ScopeTable
, ScopeTable
->Length
);
1101 /* Point to next subtable */
1103 Offset
+= SubTable
->Length
;
1104 SubTable
= ACPI_ADD_PTR (ACPI_DMAR_HEADER
, SubTable
,
1110 /*******************************************************************************
1112 * FUNCTION: AcpiDmDumpDrtm
1114 * PARAMETERS: Table - A DRTM table
1118 * DESCRIPTION: Format the contents of a DRTM.
1120 ******************************************************************************/
1124 ACPI_TABLE_HEADER
*Table
)
1128 ACPI_DRTM_VTABLE_LIST
*DrtmVtl
;
1129 ACPI_DRTM_RESOURCE_LIST
*DrtmRl
;
1130 ACPI_DRTM_DPS_ID
*DrtmDps
;
1136 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0,
1137 AcpiDmTableInfoDrtm
);
1138 if (ACPI_FAILURE (Status
))
1143 Offset
= sizeof (ACPI_TABLE_DRTM
);
1147 /* Dump ValidatedTable length */
1149 DrtmVtl
= ACPI_ADD_PTR (ACPI_DRTM_VTABLE_LIST
, Table
, Offset
);
1150 AcpiOsPrintf ("\n");
1151 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1152 DrtmVtl
, ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST
, ValidatedTables
),
1153 AcpiDmTableInfoDrtm0
);
1154 if (ACPI_FAILURE (Status
))
1159 Offset
+= ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST
, ValidatedTables
);
1161 /* Dump Validated table addresses */
1164 while ((Offset
< Table
->Length
) &&
1165 (DrtmVtl
->ValidatedTableCount
> Count
))
1167 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1168 ACPI_ADD_PTR (void, Table
, Offset
), sizeof (UINT64
),
1169 AcpiDmTableInfoDrtm0a
);
1170 if (ACPI_FAILURE (Status
))
1175 Offset
+= sizeof (UINT64
);
1179 /* Dump ResourceList length */
1181 DrtmRl
= ACPI_ADD_PTR (ACPI_DRTM_RESOURCE_LIST
, Table
, Offset
);
1182 AcpiOsPrintf ("\n");
1183 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1184 DrtmRl
, ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST
, Resources
),
1185 AcpiDmTableInfoDrtm1
);
1186 if (ACPI_FAILURE (Status
))
1191 Offset
+= ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST
, Resources
);
1193 /* Dump the Resource List */
1196 while ((Offset
< Table
->Length
) &&
1197 (DrtmRl
->ResourceCount
> Count
))
1199 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1200 ACPI_ADD_PTR (void, Table
, Offset
),
1201 sizeof (ACPI_DRTM_RESOURCE
), AcpiDmTableInfoDrtm1a
);
1202 if (ACPI_FAILURE (Status
))
1207 Offset
+= sizeof (ACPI_DRTM_RESOURCE
);
1213 DrtmDps
= ACPI_ADD_PTR (ACPI_DRTM_DPS_ID
, Table
, Offset
);
1214 AcpiOsPrintf ("\n");
1215 (void) AcpiDmDumpTable (Table
->Length
, Offset
,
1216 DrtmDps
, sizeof (ACPI_DRTM_DPS_ID
), AcpiDmTableInfoDrtm2
);
1220 /*******************************************************************************
1222 * FUNCTION: AcpiDmDumpEinj
1224 * PARAMETERS: Table - A EINJ table
1228 * DESCRIPTION: Format the contents of a EINJ. This table type consists
1229 * of an open-ended number of subtables.
1231 ******************************************************************************/
1235 ACPI_TABLE_HEADER
*Table
)
1238 ACPI_WHEA_HEADER
*SubTable
;
1239 UINT32 Length
= Table
->Length
;
1240 UINT32 Offset
= sizeof (ACPI_TABLE_EINJ
);
1245 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoEinj
);
1246 if (ACPI_FAILURE (Status
))
1253 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, Table
, Offset
);
1254 while (Offset
< Table
->Length
)
1256 AcpiOsPrintf ("\n");
1257 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1258 sizeof (ACPI_WHEA_HEADER
), AcpiDmTableInfoEinj0
);
1259 if (ACPI_FAILURE (Status
))
1264 /* Point to next subtable (each subtable is of fixed length) */
1266 Offset
+= sizeof (ACPI_WHEA_HEADER
);
1267 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, SubTable
,
1268 sizeof (ACPI_WHEA_HEADER
));
1273 /*******************************************************************************
1275 * FUNCTION: AcpiDmDumpErst
1277 * PARAMETERS: Table - A ERST table
1281 * DESCRIPTION: Format the contents of a ERST. This table type consists
1282 * of an open-ended number of subtables.
1284 ******************************************************************************/
1288 ACPI_TABLE_HEADER
*Table
)
1291 ACPI_WHEA_HEADER
*SubTable
;
1292 UINT32 Length
= Table
->Length
;
1293 UINT32 Offset
= sizeof (ACPI_TABLE_ERST
);
1298 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoErst
);
1299 if (ACPI_FAILURE (Status
))
1306 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, Table
, Offset
);
1307 while (Offset
< Table
->Length
)
1309 AcpiOsPrintf ("\n");
1310 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1311 sizeof (ACPI_WHEA_HEADER
), AcpiDmTableInfoErst0
);
1312 if (ACPI_FAILURE (Status
))
1317 /* Point to next subtable (each subtable is of fixed length) */
1319 Offset
+= sizeof (ACPI_WHEA_HEADER
);
1320 SubTable
= ACPI_ADD_PTR (ACPI_WHEA_HEADER
, SubTable
,
1321 sizeof (ACPI_WHEA_HEADER
));
1326 /*******************************************************************************
1328 * FUNCTION: AcpiDmDumpFpdt
1330 * PARAMETERS: Table - A FPDT table
1334 * DESCRIPTION: Format the contents of a FPDT. This table type consists
1335 * of an open-ended number of subtables.
1337 ******************************************************************************/
1341 ACPI_TABLE_HEADER
*Table
)
1344 ACPI_FPDT_HEADER
*SubTable
;
1345 UINT32 Length
= Table
->Length
;
1346 UINT32 Offset
= sizeof (ACPI_TABLE_FPDT
);
1347 ACPI_DMTABLE_INFO
*InfoTable
;
1350 /* There is no main table (other than the standard ACPI header) */
1354 SubTable
= ACPI_ADD_PTR (ACPI_FPDT_HEADER
, Table
, Offset
);
1355 while (Offset
< Table
->Length
)
1357 /* Common subtable header */
1359 AcpiOsPrintf ("\n");
1360 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1361 SubTable
->Length
, AcpiDmTableInfoFpdtHdr
);
1362 if (ACPI_FAILURE (Status
))
1367 switch (SubTable
->Type
)
1369 case ACPI_FPDT_TYPE_BOOT
:
1371 InfoTable
= AcpiDmTableInfoFpdt0
;
1374 case ACPI_FPDT_TYPE_S3PERF
:
1376 InfoTable
= AcpiDmTableInfoFpdt1
;
1381 AcpiOsPrintf ("\n**** Unknown FPDT subtable type 0x%X\n\n",
1384 /* Attempt to continue */
1386 if (!SubTable
->Length
)
1388 AcpiOsPrintf ("Invalid zero length subtable\n");
1394 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1395 SubTable
->Length
, InfoTable
);
1396 if (ACPI_FAILURE (Status
))
1402 /* Point to next subtable */
1404 Offset
+= SubTable
->Length
;
1405 SubTable
= ACPI_ADD_PTR (ACPI_FPDT_HEADER
, SubTable
,
1411 /*******************************************************************************
1413 * FUNCTION: AcpiDmDumpGtdt
1415 * PARAMETERS: Table - A GTDT table
1419 * DESCRIPTION: Format the contents of a GTDT. This table type consists
1420 * of an open-ended number of subtables.
1422 ******************************************************************************/
1426 ACPI_TABLE_HEADER
*Table
)
1429 ACPI_GTDT_HEADER
*SubTable
;
1430 UINT32 Length
= Table
->Length
;
1431 UINT32 Offset
= sizeof (ACPI_TABLE_GTDT
);
1432 ACPI_DMTABLE_INFO
*InfoTable
;
1433 UINT32 SubTableLength
;
1435 ACPI_GTDT_TIMER_ENTRY
*GtxTable
;
1440 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoGtdt
);
1441 if (ACPI_FAILURE (Status
))
1448 SubTable
= ACPI_ADD_PTR (ACPI_GTDT_HEADER
, Table
, Offset
);
1449 while (Offset
< Table
->Length
)
1451 /* Common subtable header */
1453 AcpiOsPrintf ("\n");
1454 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1455 SubTable
->Length
, AcpiDmTableInfoGtdtHdr
);
1456 if (ACPI_FAILURE (Status
))
1462 switch (SubTable
->Type
)
1464 case ACPI_GTDT_TYPE_TIMER_BLOCK
:
1466 SubTableLength
= sizeof (ACPI_GTDT_TIMER_BLOCK
);
1467 GtCount
= (ACPI_CAST_PTR (ACPI_GTDT_TIMER_BLOCK
,
1468 SubTable
))->TimerCount
;
1470 InfoTable
= AcpiDmTableInfoGtdt0
;
1473 case ACPI_GTDT_TYPE_WATCHDOG
:
1475 SubTableLength
= sizeof (ACPI_GTDT_WATCHDOG
);
1477 InfoTable
= AcpiDmTableInfoGtdt1
;
1482 /* Cannot continue on unknown type - no length */
1484 AcpiOsPrintf ("\n**** Unknown GTDT subtable type 0x%X\n",
1489 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1490 SubTable
->Length
, InfoTable
);
1491 if (ACPI_FAILURE (Status
))
1496 /* Point to end of current subtable (each subtable above is of fixed length) */
1498 Offset
+= SubTableLength
;
1500 /* If there are any Gt Timer Blocks from above, dump them now */
1504 GtxTable
= ACPI_ADD_PTR (
1505 ACPI_GTDT_TIMER_ENTRY
, SubTable
, SubTableLength
);
1506 SubTableLength
+= GtCount
* sizeof (ACPI_GTDT_TIMER_ENTRY
);
1510 AcpiOsPrintf ("\n");
1511 Status
= AcpiDmDumpTable (Length
, Offset
, GtxTable
,
1512 sizeof (ACPI_GTDT_TIMER_ENTRY
), AcpiDmTableInfoGtdt0a
);
1513 if (ACPI_FAILURE (Status
))
1517 Offset
+= sizeof (ACPI_GTDT_TIMER_ENTRY
);
1523 /* Point to next subtable */
1525 SubTable
= ACPI_ADD_PTR (ACPI_GTDT_HEADER
, SubTable
, SubTableLength
);
1530 /*******************************************************************************
1532 * FUNCTION: AcpiDmDumpHest
1534 * PARAMETERS: Table - A HEST table
1538 * DESCRIPTION: Format the contents of a HEST. This table type consists
1539 * of an open-ended number of subtables.
1541 ******************************************************************************/
1545 ACPI_TABLE_HEADER
*Table
)
1548 ACPI_HEST_HEADER
*SubTable
;
1549 UINT32 Length
= Table
->Length
;
1550 UINT32 Offset
= sizeof (ACPI_TABLE_HEST
);
1551 ACPI_DMTABLE_INFO
*InfoTable
;
1552 UINT32 SubTableLength
;
1554 ACPI_HEST_IA_ERROR_BANK
*BankTable
;
1559 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoHest
);
1560 if (ACPI_FAILURE (Status
))
1567 SubTable
= ACPI_ADD_PTR (ACPI_HEST_HEADER
, Table
, Offset
);
1568 while (Offset
< Table
->Length
)
1571 switch (SubTable
->Type
)
1573 case ACPI_HEST_TYPE_IA32_CHECK
:
1575 InfoTable
= AcpiDmTableInfoHest0
;
1576 SubTableLength
= sizeof (ACPI_HEST_IA_MACHINE_CHECK
);
1577 BankCount
= (ACPI_CAST_PTR (ACPI_HEST_IA_MACHINE_CHECK
,
1578 SubTable
))->NumHardwareBanks
;
1581 case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK
:
1583 InfoTable
= AcpiDmTableInfoHest1
;
1584 SubTableLength
= sizeof (ACPI_HEST_IA_CORRECTED
);
1585 BankCount
= (ACPI_CAST_PTR (ACPI_HEST_IA_CORRECTED
,
1586 SubTable
))->NumHardwareBanks
;
1589 case ACPI_HEST_TYPE_IA32_NMI
:
1591 InfoTable
= AcpiDmTableInfoHest2
;
1592 SubTableLength
= sizeof (ACPI_HEST_IA_NMI
);
1595 case ACPI_HEST_TYPE_AER_ROOT_PORT
:
1597 InfoTable
= AcpiDmTableInfoHest6
;
1598 SubTableLength
= sizeof (ACPI_HEST_AER_ROOT
);
1601 case ACPI_HEST_TYPE_AER_ENDPOINT
:
1603 InfoTable
= AcpiDmTableInfoHest7
;
1604 SubTableLength
= sizeof (ACPI_HEST_AER
);
1607 case ACPI_HEST_TYPE_AER_BRIDGE
:
1609 InfoTable
= AcpiDmTableInfoHest8
;
1610 SubTableLength
= sizeof (ACPI_HEST_AER_BRIDGE
);
1613 case ACPI_HEST_TYPE_GENERIC_ERROR
:
1615 InfoTable
= AcpiDmTableInfoHest9
;
1616 SubTableLength
= sizeof (ACPI_HEST_GENERIC
);
1619 case ACPI_HEST_TYPE_GENERIC_ERROR_V2
:
1621 InfoTable
= AcpiDmTableInfoHest10
;
1622 SubTableLength
= sizeof (ACPI_HEST_GENERIC_V2
);
1627 /* Cannot continue on unknown type - no length */
1629 AcpiOsPrintf ("\n**** Unknown HEST subtable type 0x%X\n",
1634 AcpiOsPrintf ("\n");
1635 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
1636 SubTableLength
, InfoTable
);
1637 if (ACPI_FAILURE (Status
))
1642 /* Point to end of current subtable (each subtable above is of fixed length) */
1644 Offset
+= SubTableLength
;
1646 /* If there are any (fixed-length) Error Banks from above, dump them now */
1650 BankTable
= ACPI_ADD_PTR (ACPI_HEST_IA_ERROR_BANK
, SubTable
,
1652 SubTableLength
+= BankCount
* sizeof (ACPI_HEST_IA_ERROR_BANK
);
1656 AcpiOsPrintf ("\n");
1657 Status
= AcpiDmDumpTable (Length
, Offset
, BankTable
,
1658 sizeof (ACPI_HEST_IA_ERROR_BANK
), AcpiDmTableInfoHestBank
);
1659 if (ACPI_FAILURE (Status
))
1664 Offset
+= sizeof (ACPI_HEST_IA_ERROR_BANK
);
1670 /* Point to next subtable */
1672 SubTable
= ACPI_ADD_PTR (ACPI_HEST_HEADER
, SubTable
, SubTableLength
);
1677 /*******************************************************************************
1679 * FUNCTION: AcpiDmDumpIort
1681 * PARAMETERS: Table - A IORT table
1685 * DESCRIPTION: Format the contents of a IORT
1687 ******************************************************************************/
1691 ACPI_TABLE_HEADER
*Table
)
1694 ACPI_TABLE_IORT
*Iort
;
1695 ACPI_IORT_NODE
*IortNode
;
1696 ACPI_IORT_ITS_GROUP
*IortItsGroup
= NULL
;
1697 ACPI_IORT_SMMU
*IortSmmu
= NULL
;
1701 ACPI_DMTABLE_INFO
*InfoTable
;
1708 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoIort
);
1709 if (ACPI_FAILURE (Status
))
1714 Iort
= ACPI_CAST_PTR (ACPI_TABLE_IORT
, Table
);
1715 Offset
= sizeof (ACPI_TABLE_IORT
);
1717 /* Dump the OptionalPadding (optional) */
1719 if (Iort
->NodeOffset
> Offset
)
1721 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, Table
,
1722 Iort
->NodeOffset
- Offset
, AcpiDmTableInfoIortPad
);
1723 if (ACPI_FAILURE (Status
))
1729 Offset
= Iort
->NodeOffset
;
1730 while (Offset
< Table
->Length
)
1732 /* Common subtable header */
1734 IortNode
= ACPI_ADD_PTR (ACPI_IORT_NODE
, Table
, Offset
);
1735 AcpiOsPrintf ("\n");
1736 Length
= ACPI_OFFSET (ACPI_IORT_NODE
, NodeData
);
1737 Status
= AcpiDmDumpTable (Table
->Length
, Offset
,
1738 IortNode
, Length
, AcpiDmTableInfoIortHdr
);
1739 if (ACPI_FAILURE (Status
))
1744 NodeOffset
= Length
;
1746 switch (IortNode
->Type
)
1748 case ACPI_IORT_NODE_ITS_GROUP
:
1750 InfoTable
= AcpiDmTableInfoIort0
;
1751 Length
= ACPI_OFFSET (ACPI_IORT_ITS_GROUP
, Identifiers
);
1752 IortItsGroup
= ACPI_ADD_PTR (ACPI_IORT_ITS_GROUP
, IortNode
, NodeOffset
);
1755 case ACPI_IORT_NODE_NAMED_COMPONENT
:
1757 InfoTable
= AcpiDmTableInfoIort1
;
1758 Length
= ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT
, DeviceName
);
1759 String
= ACPI_ADD_PTR (char, IortNode
, NodeOffset
+ Length
);
1760 Length
+= strlen (String
) + 1;
1763 case ACPI_IORT_NODE_PCI_ROOT_COMPLEX
:
1765 InfoTable
= AcpiDmTableInfoIort2
;
1766 Length
= IortNode
->Length
- NodeOffset
;
1769 case ACPI_IORT_NODE_SMMU
:
1771 InfoTable
= AcpiDmTableInfoIort3
;
1772 Length
= ACPI_OFFSET (ACPI_IORT_SMMU
, Interrupts
);
1773 IortSmmu
= ACPI_ADD_PTR (ACPI_IORT_SMMU
, IortNode
, NodeOffset
);
1776 case ACPI_IORT_NODE_SMMU_V3
:
1778 InfoTable
= AcpiDmTableInfoIort4
;
1779 Length
= IortNode
->Length
- NodeOffset
;
1784 AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",
1787 /* Attempt to continue */
1789 if (!IortNode
->Length
)
1791 AcpiOsPrintf ("Invalid zero length IORT node\n");
1797 /* Dump the node subtable header */
1799 AcpiOsPrintf ("\n");
1800 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1801 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1803 if (ACPI_FAILURE (Status
))
1808 NodeOffset
+= Length
;
1810 /* Dump the node specific data */
1812 switch (IortNode
->Type
)
1814 case ACPI_IORT_NODE_ITS_GROUP
:
1816 /* Validate IortItsGroup to avoid compiler warnings */
1820 for (i
= 0; i
< IortItsGroup
->ItsCount
; i
++)
1822 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1823 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1824 4, AcpiDmTableInfoIort0a
);
1830 case ACPI_IORT_NODE_NAMED_COMPONENT
:
1832 /* Dump the Padding (optional) */
1834 if (IortNode
->Length
> NodeOffset
)
1836 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1837 Table
, IortNode
->Length
- NodeOffset
,
1838 AcpiDmTableInfoIort1a
);
1839 if (ACPI_FAILURE (Status
))
1846 case ACPI_IORT_NODE_SMMU
:
1848 AcpiOsPrintf ("\n");
1850 /* Validate IortSmmu to avoid compiler warnings */
1854 Length
= 2 * sizeof (UINT64
);
1855 NodeOffset
= IortSmmu
->GlobalInterruptOffset
;
1856 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1857 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1858 Length
, AcpiDmTableInfoIort3a
);
1859 if (ACPI_FAILURE (Status
))
1864 NodeOffset
= IortSmmu
->ContextInterruptOffset
;
1865 for (i
= 0; i
< IortSmmu
->ContextInterruptCount
; i
++)
1867 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1868 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1869 8, AcpiDmTableInfoIort3b
);
1870 if (ACPI_FAILURE (Status
))
1878 NodeOffset
= IortSmmu
->PmuInterruptOffset
;
1879 for (i
= 0; i
< IortSmmu
->PmuInterruptCount
; i
++)
1881 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1882 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1883 8, AcpiDmTableInfoIort3c
);
1884 if (ACPI_FAILURE (Status
))
1899 /* Dump the ID mappings */
1901 NodeOffset
= IortNode
->MappingOffset
;
1902 for (i
= 0; i
< IortNode
->MappingCount
; i
++)
1904 AcpiOsPrintf ("\n");
1905 Length
= sizeof (ACPI_IORT_ID_MAPPING
);
1906 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ NodeOffset
,
1907 ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, NodeOffset
),
1908 Length
, AcpiDmTableInfoIortMap
);
1909 if (ACPI_FAILURE (Status
))
1914 NodeOffset
+= Length
;
1918 /* Point to next node subtable */
1920 Offset
+= IortNode
->Length
;
1921 IortNode
= ACPI_ADD_PTR (ACPI_IORT_NODE
, IortNode
, IortNode
->Length
);
1926 /*******************************************************************************
1928 * FUNCTION: AcpiDmDumpIvrs
1930 * PARAMETERS: Table - A IVRS table
1934 * DESCRIPTION: Format the contents of a IVRS
1936 ******************************************************************************/
1938 static UINT8 EntrySizes
[] = {4,8,16,32};
1942 ACPI_TABLE_HEADER
*Table
)
1945 UINT32 Offset
= sizeof (ACPI_TABLE_IVRS
);
1949 ACPI_IVRS_DE_HEADER
*DeviceEntry
;
1950 ACPI_IVRS_HEADER
*SubTable
;
1951 ACPI_DMTABLE_INFO
*InfoTable
;
1956 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoIvrs
);
1957 if (ACPI_FAILURE (Status
))
1964 SubTable
= ACPI_ADD_PTR (ACPI_IVRS_HEADER
, Table
, Offset
);
1965 while (Offset
< Table
->Length
)
1967 /* Common subtable header */
1969 AcpiOsPrintf ("\n");
1970 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
1971 SubTable
->Length
, AcpiDmTableInfoIvrsHdr
);
1972 if (ACPI_FAILURE (Status
))
1977 switch (SubTable
->Type
)
1979 case ACPI_IVRS_TYPE_HARDWARE
:
1981 InfoTable
= AcpiDmTableInfoIvrs0
;
1984 case ACPI_IVRS_TYPE_MEMORY1
:
1985 case ACPI_IVRS_TYPE_MEMORY2
:
1986 case ACPI_IVRS_TYPE_MEMORY3
:
1988 InfoTable
= AcpiDmTableInfoIvrs1
;
1993 AcpiOsPrintf ("\n**** Unknown IVRS subtable type 0x%X\n",
1996 /* Attempt to continue */
1998 if (!SubTable
->Length
)
2000 AcpiOsPrintf ("Invalid zero length subtable\n");
2006 /* Dump the subtable */
2008 AcpiOsPrintf ("\n");
2009 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2010 SubTable
->Length
, InfoTable
);
2011 if (ACPI_FAILURE (Status
))
2016 /* The hardware subtable can contain multiple device entries */
2018 if (SubTable
->Type
== ACPI_IVRS_TYPE_HARDWARE
)
2020 EntryOffset
= Offset
+ sizeof (ACPI_IVRS_HARDWARE
);
2021 DeviceEntry
= ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER
, SubTable
,
2022 sizeof (ACPI_IVRS_HARDWARE
));
2024 while (EntryOffset
< (Offset
+ SubTable
->Length
))
2026 AcpiOsPrintf ("\n");
2028 * Upper 2 bits of Type encode the length of the device entry
2032 * 10 = 16 byte - currently no entries defined
2033 * 11 = 32 byte - currently no entries defined
2035 EntryType
= DeviceEntry
->Type
;
2036 EntryLength
= EntrySizes
[EntryType
>> 6];
2040 /* 4-byte device entries */
2042 case ACPI_IVRS_TYPE_PAD4
:
2043 case ACPI_IVRS_TYPE_ALL
:
2044 case ACPI_IVRS_TYPE_SELECT
:
2045 case ACPI_IVRS_TYPE_START
:
2046 case ACPI_IVRS_TYPE_END
:
2048 InfoTable
= AcpiDmTableInfoIvrs4
;
2051 /* 8-byte entries, type A */
2053 case ACPI_IVRS_TYPE_ALIAS_SELECT
:
2054 case ACPI_IVRS_TYPE_ALIAS_START
:
2056 InfoTable
= AcpiDmTableInfoIvrs8a
;
2059 /* 8-byte entries, type B */
2061 case ACPI_IVRS_TYPE_PAD8
:
2062 case ACPI_IVRS_TYPE_EXT_SELECT
:
2063 case ACPI_IVRS_TYPE_EXT_START
:
2065 InfoTable
= AcpiDmTableInfoIvrs8b
;
2068 /* 8-byte entries, type C */
2070 case ACPI_IVRS_TYPE_SPECIAL
:
2072 InfoTable
= AcpiDmTableInfoIvrs8c
;
2076 InfoTable
= AcpiDmTableInfoIvrs4
;
2078 "\n**** Unknown IVRS device entry type/length: "
2079 "0x%.2X/0x%X at offset 0x%.4X: (header below)\n",
2080 EntryType
, EntryLength
, EntryOffset
);
2084 /* Dump the Device Entry */
2086 Status
= AcpiDmDumpTable (Table
->Length
, EntryOffset
,
2087 DeviceEntry
, EntryLength
, InfoTable
);
2088 if (ACPI_FAILURE (Status
))
2093 EntryOffset
+= EntryLength
;
2094 DeviceEntry
= ACPI_ADD_PTR (ACPI_IVRS_DE_HEADER
, DeviceEntry
,
2100 /* Point to next subtable */
2102 Offset
+= SubTable
->Length
;
2103 SubTable
= ACPI_ADD_PTR (ACPI_IVRS_HEADER
, SubTable
, SubTable
->Length
);
2108 /*******************************************************************************
2110 * FUNCTION: AcpiDmDumpLpit
2112 * PARAMETERS: Table - A LPIT table
2116 * DESCRIPTION: Format the contents of a LPIT. This table type consists
2117 * of an open-ended number of subtables. Note: There are no
2118 * entries in the main table. An LPIT consists of the table
2119 * header and then subtables only.
2121 ******************************************************************************/
2125 ACPI_TABLE_HEADER
*Table
)
2128 ACPI_LPIT_HEADER
*SubTable
;
2129 UINT32 Length
= Table
->Length
;
2130 UINT32 Offset
= sizeof (ACPI_TABLE_LPIT
);
2131 ACPI_DMTABLE_INFO
*InfoTable
;
2132 UINT32 SubTableLength
;
2137 SubTable
= ACPI_ADD_PTR (ACPI_LPIT_HEADER
, Table
, Offset
);
2138 while (Offset
< Table
->Length
)
2140 /* Common subtable header */
2142 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2143 sizeof (ACPI_LPIT_HEADER
), AcpiDmTableInfoLpitHdr
);
2144 if (ACPI_FAILURE (Status
))
2149 switch (SubTable
->Type
)
2151 case ACPI_LPIT_TYPE_NATIVE_CSTATE
:
2153 InfoTable
= AcpiDmTableInfoLpit0
;
2154 SubTableLength
= sizeof (ACPI_LPIT_NATIVE
);
2159 /* Cannot continue on unknown type - no length */
2161 AcpiOsPrintf ("\n**** Unknown LPIT subtable type 0x%X\n",
2166 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2167 SubTableLength
, InfoTable
);
2168 if (ACPI_FAILURE (Status
))
2173 AcpiOsPrintf ("\n");
2175 /* Point to next subtable */
2177 Offset
+= SubTableLength
;
2178 SubTable
= ACPI_ADD_PTR (ACPI_LPIT_HEADER
, SubTable
, SubTableLength
);
2183 /*******************************************************************************
2185 * FUNCTION: AcpiDmDumpMadt
2187 * PARAMETERS: Table - A MADT table
2191 * DESCRIPTION: Format the contents of a MADT. This table type consists
2192 * of an open-ended number of subtables.
2194 ******************************************************************************/
2198 ACPI_TABLE_HEADER
*Table
)
2201 ACPI_SUBTABLE_HEADER
*SubTable
;
2202 UINT32 Length
= Table
->Length
;
2203 UINT32 Offset
= sizeof (ACPI_TABLE_MADT
);
2204 ACPI_DMTABLE_INFO
*InfoTable
;
2209 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoMadt
);
2210 if (ACPI_FAILURE (Status
))
2217 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, Table
, Offset
);
2218 while (Offset
< Table
->Length
)
2220 /* Common subtable header */
2222 AcpiOsPrintf ("\n");
2223 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2224 SubTable
->Length
, AcpiDmTableInfoMadtHdr
);
2225 if (ACPI_FAILURE (Status
))
2230 switch (SubTable
->Type
)
2232 case ACPI_MADT_TYPE_LOCAL_APIC
:
2234 InfoTable
= AcpiDmTableInfoMadt0
;
2237 case ACPI_MADT_TYPE_IO_APIC
:
2239 InfoTable
= AcpiDmTableInfoMadt1
;
2242 case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE
:
2244 InfoTable
= AcpiDmTableInfoMadt2
;
2247 case ACPI_MADT_TYPE_NMI_SOURCE
:
2249 InfoTable
= AcpiDmTableInfoMadt3
;
2252 case ACPI_MADT_TYPE_LOCAL_APIC_NMI
:
2254 InfoTable
= AcpiDmTableInfoMadt4
;
2257 case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE
:
2259 InfoTable
= AcpiDmTableInfoMadt5
;
2262 case ACPI_MADT_TYPE_IO_SAPIC
:
2264 InfoTable
= AcpiDmTableInfoMadt6
;
2267 case ACPI_MADT_TYPE_LOCAL_SAPIC
:
2269 InfoTable
= AcpiDmTableInfoMadt7
;
2272 case ACPI_MADT_TYPE_INTERRUPT_SOURCE
:
2274 InfoTable
= AcpiDmTableInfoMadt8
;
2277 case ACPI_MADT_TYPE_LOCAL_X2APIC
:
2279 InfoTable
= AcpiDmTableInfoMadt9
;
2282 case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI
:
2284 InfoTable
= AcpiDmTableInfoMadt10
;
2287 case ACPI_MADT_TYPE_GENERIC_INTERRUPT
:
2289 InfoTable
= AcpiDmTableInfoMadt11
;
2292 case ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR
:
2294 InfoTable
= AcpiDmTableInfoMadt12
;
2297 case ACPI_MADT_TYPE_GENERIC_MSI_FRAME
:
2299 InfoTable
= AcpiDmTableInfoMadt13
;
2302 case ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR
:
2304 InfoTable
= AcpiDmTableInfoMadt14
;
2307 case ACPI_MADT_TYPE_GENERIC_TRANSLATOR
:
2309 InfoTable
= AcpiDmTableInfoMadt15
;
2314 AcpiOsPrintf ("\n**** Unknown MADT subtable type 0x%X\n\n",
2317 /* Attempt to continue */
2319 if (!SubTable
->Length
)
2321 AcpiOsPrintf ("Invalid zero length subtable\n");
2328 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2329 SubTable
->Length
, InfoTable
);
2330 if (ACPI_FAILURE (Status
))
2336 /* Point to next subtable */
2338 Offset
+= SubTable
->Length
;
2339 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, SubTable
,
2345 /*******************************************************************************
2347 * FUNCTION: AcpiDmDumpMcfg
2349 * PARAMETERS: Table - A MCFG Table
2353 * DESCRIPTION: Format the contents of a MCFG table
2355 ******************************************************************************/
2359 ACPI_TABLE_HEADER
*Table
)
2362 UINT32 Offset
= sizeof (ACPI_TABLE_MCFG
);
2363 ACPI_MCFG_ALLOCATION
*SubTable
;
2368 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMcfg
);
2369 if (ACPI_FAILURE (Status
))
2376 SubTable
= ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION
, Table
, Offset
);
2377 while (Offset
< Table
->Length
)
2379 if (Offset
+ sizeof (ACPI_MCFG_ALLOCATION
) > Table
->Length
)
2381 AcpiOsPrintf ("Warning: there are %u invalid trailing bytes\n",
2382 sizeof (ACPI_MCFG_ALLOCATION
) - (Offset
- Table
->Length
));
2386 AcpiOsPrintf ("\n");
2387 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2388 sizeof (ACPI_MCFG_ALLOCATION
), AcpiDmTableInfoMcfg0
);
2389 if (ACPI_FAILURE (Status
))
2394 /* Point to next subtable (each subtable is of fixed length) */
2396 Offset
+= sizeof (ACPI_MCFG_ALLOCATION
);
2397 SubTable
= ACPI_ADD_PTR (ACPI_MCFG_ALLOCATION
, SubTable
,
2398 sizeof (ACPI_MCFG_ALLOCATION
));
2403 /*******************************************************************************
2405 * FUNCTION: AcpiDmDumpMpst
2407 * PARAMETERS: Table - A MPST Table
2411 * DESCRIPTION: Format the contents of a MPST table
2413 ******************************************************************************/
2417 ACPI_TABLE_HEADER
*Table
)
2420 UINT32 Offset
= sizeof (ACPI_TABLE_MPST
);
2421 ACPI_MPST_POWER_NODE
*SubTable0
;
2422 ACPI_MPST_POWER_STATE
*SubTable0A
;
2423 ACPI_MPST_COMPONENT
*SubTable0B
;
2424 ACPI_MPST_DATA_HDR
*SubTable1
;
2425 ACPI_MPST_POWER_DATA
*SubTable2
;
2426 UINT16 SubtableCount
;
2427 UINT32 PowerStateCount
;
2428 UINT32 ComponentCount
;
2433 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMpst
);
2434 if (ACPI_FAILURE (Status
))
2439 /* Subtable: Memory Power Node(s) */
2441 SubtableCount
= (ACPI_CAST_PTR (ACPI_TABLE_MPST
, Table
))->PowerNodeCount
;
2442 SubTable0
= ACPI_ADD_PTR (ACPI_MPST_POWER_NODE
, Table
, Offset
);
2444 while ((Offset
< Table
->Length
) && SubtableCount
)
2446 AcpiOsPrintf ("\n");
2447 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable0
,
2448 sizeof (ACPI_MPST_POWER_NODE
), AcpiDmTableInfoMpst0
);
2449 if (ACPI_FAILURE (Status
))
2454 /* Extract the sub-subtable counts */
2456 PowerStateCount
= SubTable0
->NumPowerStates
;
2457 ComponentCount
= SubTable0
->NumPhysicalComponents
;
2458 Offset
+= sizeof (ACPI_MPST_POWER_NODE
);
2460 /* Sub-subtables - Memory Power State Structure(s) */
2462 SubTable0A
= ACPI_ADD_PTR (ACPI_MPST_POWER_STATE
, SubTable0
,
2463 sizeof (ACPI_MPST_POWER_NODE
));
2465 while (PowerStateCount
)
2467 AcpiOsPrintf ("\n");
2468 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable0A
,
2469 sizeof (ACPI_MPST_POWER_STATE
), AcpiDmTableInfoMpst0A
);
2470 if (ACPI_FAILURE (Status
))
2477 Offset
+= sizeof (ACPI_MPST_POWER_STATE
);
2480 /* Sub-subtables - Physical Component ID Structure(s) */
2482 SubTable0B
= ACPI_CAST_PTR (ACPI_MPST_COMPONENT
, SubTable0A
);
2486 AcpiOsPrintf ("\n");
2489 while (ComponentCount
)
2491 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable0B
,
2492 sizeof (ACPI_MPST_COMPONENT
), AcpiDmTableInfoMpst0B
);
2493 if (ACPI_FAILURE (Status
))
2500 Offset
+= sizeof (ACPI_MPST_COMPONENT
);
2503 /* Point to next Memory Power Node subtable */
2506 SubTable0
= ACPI_ADD_PTR (ACPI_MPST_POWER_NODE
, SubTable0
,
2507 sizeof (ACPI_MPST_POWER_NODE
) +
2508 (sizeof (ACPI_MPST_POWER_STATE
) * SubTable0
->NumPowerStates
) +
2509 (sizeof (ACPI_MPST_COMPONENT
) * SubTable0
->NumPhysicalComponents
));
2512 /* Subtable: Count of Memory Power State Characteristic structures */
2514 AcpiOsPrintf ("\n");
2515 SubTable1
= ACPI_CAST_PTR (ACPI_MPST_DATA_HDR
, SubTable0
);
2516 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable1
,
2517 sizeof (ACPI_MPST_DATA_HDR
), AcpiDmTableInfoMpst1
);
2518 if (ACPI_FAILURE (Status
))
2523 SubtableCount
= SubTable1
->CharacteristicsCount
;
2524 Offset
+= sizeof (ACPI_MPST_DATA_HDR
);
2526 /* Subtable: Memory Power State Characteristics structure(s) */
2528 SubTable2
= ACPI_ADD_PTR (ACPI_MPST_POWER_DATA
, SubTable1
,
2529 sizeof (ACPI_MPST_DATA_HDR
));
2531 while ((Offset
< Table
->Length
) && SubtableCount
)
2533 AcpiOsPrintf ("\n");
2534 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable2
,
2535 sizeof (ACPI_MPST_POWER_DATA
), AcpiDmTableInfoMpst2
);
2536 if (ACPI_FAILURE (Status
))
2543 Offset
+= sizeof (ACPI_MPST_POWER_DATA
);
2548 /*******************************************************************************
2550 * FUNCTION: AcpiDmDumpMsct
2552 * PARAMETERS: Table - A MSCT table
2556 * DESCRIPTION: Format the contents of a MSCT
2558 ******************************************************************************/
2562 ACPI_TABLE_HEADER
*Table
)
2565 UINT32 Offset
= sizeof (ACPI_TABLE_MSCT
);
2566 ACPI_MSCT_PROXIMITY
*SubTable
;
2571 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMsct
);
2572 if (ACPI_FAILURE (Status
))
2579 SubTable
= ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY
, Table
, Offset
);
2580 while (Offset
< Table
->Length
)
2582 /* Common subtable header */
2584 AcpiOsPrintf ("\n");
2585 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2586 sizeof (ACPI_MSCT_PROXIMITY
), AcpiDmTableInfoMsct0
);
2587 if (ACPI_FAILURE (Status
))
2592 /* Point to next subtable */
2594 Offset
+= sizeof (ACPI_MSCT_PROXIMITY
);
2595 SubTable
= ACPI_ADD_PTR (ACPI_MSCT_PROXIMITY
, SubTable
,
2596 sizeof (ACPI_MSCT_PROXIMITY
));
2601 /*******************************************************************************
2603 * FUNCTION: AcpiDmDumpMtmr
2605 * PARAMETERS: Table - A MTMR table
2609 * DESCRIPTION: Format the contents of a MTMR
2611 ******************************************************************************/
2615 ACPI_TABLE_HEADER
*Table
)
2618 UINT32 Offset
= sizeof (ACPI_TABLE_MTMR
);
2619 ACPI_MTMR_ENTRY
*SubTable
;
2624 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoMtmr
);
2625 if (ACPI_FAILURE (Status
))
2632 SubTable
= ACPI_ADD_PTR (ACPI_MTMR_ENTRY
, Table
, Offset
);
2633 while (Offset
< Table
->Length
)
2635 /* Common subtable header */
2637 AcpiOsPrintf ("\n");
2638 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2639 sizeof (ACPI_MTMR_ENTRY
), AcpiDmTableInfoMtmr0
);
2640 if (ACPI_FAILURE (Status
))
2645 /* Point to next subtable */
2647 Offset
+= sizeof (ACPI_MTMR_ENTRY
);
2648 SubTable
= ACPI_ADD_PTR (ACPI_MTMR_ENTRY
, SubTable
,
2649 sizeof (ACPI_MTMR_ENTRY
));
2654 /*******************************************************************************
2656 * FUNCTION: AcpiDmDumpNfit
2658 * PARAMETERS: Table - A NFIT table
2662 * DESCRIPTION: Format the contents of an NFIT.
2664 ******************************************************************************/
2668 ACPI_TABLE_HEADER
*Table
)
2671 UINT32 Offset
= sizeof (ACPI_TABLE_NFIT
);
2672 UINT32 FieldOffset
= 0;
2674 ACPI_NFIT_HEADER
*SubTable
;
2675 ACPI_DMTABLE_INFO
*InfoTable
;
2676 ACPI_NFIT_INTERLEAVE
*Interleave
= NULL
;
2677 ACPI_NFIT_SMBIOS
*SmbiosInfo
= NULL
;
2678 ACPI_NFIT_FLUSH_ADDRESS
*Hint
= NULL
;
2684 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoNfit
);
2685 if (ACPI_FAILURE (Status
))
2692 SubTable
= ACPI_ADD_PTR (ACPI_NFIT_HEADER
, Table
, Offset
);
2693 while (Offset
< Table
->Length
)
2695 /* NFIT subtable header */
2697 AcpiOsPrintf ("\n");
2698 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2699 SubTable
->Length
, AcpiDmTableInfoNfitHdr
);
2700 if (ACPI_FAILURE (Status
))
2705 switch (SubTable
->Type
)
2707 case ACPI_NFIT_TYPE_SYSTEM_ADDRESS
:
2709 InfoTable
= AcpiDmTableInfoNfit0
;
2712 case ACPI_NFIT_TYPE_MEMORY_MAP
:
2714 InfoTable
= AcpiDmTableInfoNfit1
;
2717 case ACPI_NFIT_TYPE_INTERLEAVE
:
2719 /* Has a variable number of 32-bit values at the end */
2721 InfoTable
= AcpiDmTableInfoNfit2
;
2722 Interleave
= ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE
, SubTable
);
2723 FieldOffset
= sizeof (ACPI_NFIT_INTERLEAVE
);
2726 case ACPI_NFIT_TYPE_SMBIOS
:
2728 SmbiosInfo
= ACPI_CAST_PTR (ACPI_NFIT_SMBIOS
, SubTable
);
2729 InfoTable
= AcpiDmTableInfoNfit3
;
2732 case ACPI_NFIT_TYPE_CONTROL_REGION
:
2734 InfoTable
= AcpiDmTableInfoNfit4
;
2737 case ACPI_NFIT_TYPE_DATA_REGION
:
2739 InfoTable
= AcpiDmTableInfoNfit5
;
2742 case ACPI_NFIT_TYPE_FLUSH_ADDRESS
:
2744 /* Has a variable number of 64-bit addresses at the end */
2746 InfoTable
= AcpiDmTableInfoNfit6
;
2747 Hint
= ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS
, SubTable
);
2748 FieldOffset
= sizeof (ACPI_NFIT_FLUSH_ADDRESS
) - sizeof (UINT64
);
2752 AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n",
2755 /* Attempt to continue */
2757 if (!SubTable
->Length
)
2759 AcpiOsPrintf ("Invalid zero length subtable\n");
2765 AcpiOsPrintf ("\n");
2766 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
2767 SubTable
->Length
, InfoTable
);
2768 if (ACPI_FAILURE (Status
))
2773 /* Per-subtable variable-length fields */
2775 switch (SubTable
->Type
)
2777 case ACPI_NFIT_TYPE_INTERLEAVE
:
2779 for (i
= 0; i
< Interleave
->LineCount
; i
++)
2781 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ FieldOffset
,
2782 &Interleave
->LineOffset
[i
],
2783 sizeof (UINT32
), AcpiDmTableInfoNfit2a
);
2784 if (ACPI_FAILURE (Status
))
2789 FieldOffset
+= sizeof (UINT32
);
2793 case ACPI_NFIT_TYPE_SMBIOS
:
2795 Length
= SubTable
->Length
-
2796 sizeof (ACPI_NFIT_SMBIOS
) + sizeof (UINT8
);
2800 Status
= AcpiDmDumpTable (Table
->Length
,
2801 sizeof (ACPI_NFIT_SMBIOS
) - sizeof (UINT8
),
2803 Length
, AcpiDmTableInfoNfit3a
);
2804 if (ACPI_FAILURE (Status
))
2812 case ACPI_NFIT_TYPE_FLUSH_ADDRESS
:
2814 for (i
= 0; i
< Hint
->HintCount
; i
++)
2816 Status
= AcpiDmDumpTable (Table
->Length
, Offset
+ FieldOffset
,
2817 &Hint
->HintAddress
[i
],
2818 sizeof (UINT64
), AcpiDmTableInfoNfit6a
);
2819 if (ACPI_FAILURE (Status
))
2824 FieldOffset
+= sizeof (UINT64
);
2833 /* Point to next subtable */
2835 Offset
+= SubTable
->Length
;
2836 SubTable
= ACPI_ADD_PTR (ACPI_NFIT_HEADER
, SubTable
, SubTable
->Length
);
2841 /*******************************************************************************
2843 * FUNCTION: AcpiDmDumpPcct
2845 * PARAMETERS: Table - A PCCT table
2849 * DESCRIPTION: Format the contents of a PCCT. This table type consists
2850 * of an open-ended number of subtables.
2852 ******************************************************************************/
2856 ACPI_TABLE_HEADER
*Table
)
2859 ACPI_PCCT_SUBSPACE
*SubTable
;
2860 ACPI_DMTABLE_INFO
*InfoTable
;
2861 UINT32 Length
= Table
->Length
;
2862 UINT32 Offset
= sizeof (ACPI_TABLE_PCCT
);
2867 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoPcct
);
2868 if (ACPI_FAILURE (Status
))
2875 SubTable
= ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE
, Table
, Offset
);
2876 while (Offset
< Table
->Length
)
2878 /* Common subtable header */
2880 AcpiOsPrintf ("\n");
2881 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2882 SubTable
->Header
.Length
, AcpiDmTableInfoPcctHdr
);
2883 if (ACPI_FAILURE (Status
))
2888 switch (SubTable
->Header
.Type
)
2890 case ACPI_PCCT_TYPE_GENERIC_SUBSPACE
:
2892 InfoTable
= AcpiDmTableInfoPcct0
;
2895 case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE
:
2897 InfoTable
= AcpiDmTableInfoPcct1
;
2900 case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2
:
2902 InfoTable
= AcpiDmTableInfoPcct2
;
2908 "\n**** Unexpected or unknown PCCT subtable type 0x%X\n\n",
2909 SubTable
->Header
.Type
);
2913 AcpiOsPrintf ("\n");
2914 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2915 SubTable
->Header
.Length
, InfoTable
);
2916 if (ACPI_FAILURE (Status
))
2921 /* Point to next subtable */
2923 Offset
+= SubTable
->Header
.Length
;
2924 SubTable
= ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE
, SubTable
,
2925 SubTable
->Header
.Length
);
2930 /*******************************************************************************
2932 * FUNCTION: AcpiDmDumpPmtt
2934 * PARAMETERS: Table - A PMTT table
2938 * DESCRIPTION: Format the contents of a PMTT. This table type consists
2939 * of an open-ended number of subtables.
2941 ******************************************************************************/
2945 ACPI_TABLE_HEADER
*Table
)
2948 ACPI_PMTT_HEADER
*SubTable
;
2949 ACPI_PMTT_HEADER
*MemSubTable
;
2950 ACPI_PMTT_HEADER
*DimmSubTable
;
2951 ACPI_PMTT_DOMAIN
*DomainArray
;
2952 UINT32 Length
= Table
->Length
;
2953 UINT32 Offset
= sizeof (ACPI_TABLE_PMTT
);
2956 UINT32 DomainOffset
;
2962 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoPmtt
);
2963 if (ACPI_FAILURE (Status
))
2970 SubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
, Table
, Offset
);
2971 while (Offset
< Table
->Length
)
2973 /* Common subtable header */
2975 AcpiOsPrintf ("\n");
2976 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2977 SubTable
->Length
, AcpiDmTableInfoPmttHdr
);
2978 if (ACPI_FAILURE (Status
))
2983 /* Only Socket subtables are expected at this level */
2985 if (SubTable
->Type
!= ACPI_PMTT_TYPE_SOCKET
)
2988 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
2993 /* Dump the fixed-length portion of the subtable */
2995 Status
= AcpiDmDumpTable (Length
, Offset
, SubTable
,
2996 SubTable
->Length
, AcpiDmTableInfoPmtt0
);
2997 if (ACPI_FAILURE (Status
))
3002 /* Walk the memory controller subtables */
3004 MemOffset
= sizeof (ACPI_PMTT_SOCKET
);
3005 MemSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
, SubTable
,
3006 sizeof (ACPI_PMTT_SOCKET
));
3008 while (((Offset
+ MemOffset
) < Table
->Length
) &&
3009 (MemOffset
< SubTable
->Length
))
3011 /* Common subtable header */
3013 AcpiOsPrintf ("\n");
3014 Status
= AcpiDmDumpTable (Length
,
3015 Offset
+ MemOffset
, MemSubTable
,
3016 MemSubTable
->Length
, AcpiDmTableInfoPmttHdr
);
3017 if (ACPI_FAILURE (Status
))
3022 /* Only memory controller subtables are expected at this level */
3024 if (MemSubTable
->Type
!= ACPI_PMTT_TYPE_CONTROLLER
)
3027 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
3032 /* Dump the fixed-length portion of the controller subtable */
3034 Status
= AcpiDmDumpTable (Length
,
3035 Offset
+ MemOffset
, MemSubTable
,
3036 MemSubTable
->Length
, AcpiDmTableInfoPmtt1
);
3037 if (ACPI_FAILURE (Status
))
3042 /* Walk the variable count of proximity domains */
3044 DomainCount
= ((ACPI_PMTT_CONTROLLER
*) MemSubTable
)->DomainCount
;
3045 DomainOffset
= sizeof (ACPI_PMTT_CONTROLLER
);
3046 DomainArray
= ACPI_ADD_PTR (ACPI_PMTT_DOMAIN
, MemSubTable
,
3047 sizeof (ACPI_PMTT_CONTROLLER
));
3049 while (((Offset
+ MemOffset
+ DomainOffset
) < Table
->Length
) &&
3050 ((MemOffset
+ DomainOffset
) < SubTable
->Length
) &&
3053 Status
= AcpiDmDumpTable (Length
,
3054 Offset
+ MemOffset
+ DomainOffset
, DomainArray
,
3055 sizeof (ACPI_PMTT_DOMAIN
), AcpiDmTableInfoPmtt1a
);
3056 if (ACPI_FAILURE (Status
))
3061 DomainOffset
+= sizeof (ACPI_PMTT_DOMAIN
);
3069 "\n**** DomainCount exceeds subtable length\n\n");
3072 /* Walk the physical component (DIMM) subtables */
3074 DimmOffset
= DomainOffset
;
3075 DimmSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
, MemSubTable
,
3078 while (((Offset
+ MemOffset
+ DimmOffset
) < Table
->Length
) &&
3079 (DimmOffset
< MemSubTable
->Length
))
3081 /* Common subtable header */
3083 AcpiOsPrintf ("\n");
3084 Status
= AcpiDmDumpTable (Length
,
3085 Offset
+ MemOffset
+ DimmOffset
, DimmSubTable
,
3086 DimmSubTable
->Length
, AcpiDmTableInfoPmttHdr
);
3087 if (ACPI_FAILURE (Status
))
3092 /* Only DIMM subtables are expected at this level */
3094 if (DimmSubTable
->Type
!= ACPI_PMTT_TYPE_DIMM
)
3097 "\n**** Unexpected or unknown PMTT subtable type 0x%X\n\n",
3098 DimmSubTable
->Type
);
3102 /* Dump the fixed-length DIMM subtable */
3104 Status
= AcpiDmDumpTable (Length
,
3105 Offset
+ MemOffset
+ DimmOffset
, DimmSubTable
,
3106 DimmSubTable
->Length
, AcpiDmTableInfoPmtt2
);
3107 if (ACPI_FAILURE (Status
))
3112 /* Point to next DIMM subtable */
3114 DimmOffset
+= DimmSubTable
->Length
;
3115 DimmSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
,
3116 DimmSubTable
, DimmSubTable
->Length
);
3119 /* Point to next Controller subtable */
3121 MemOffset
+= MemSubTable
->Length
;
3122 MemSubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
,
3123 MemSubTable
, MemSubTable
->Length
);
3126 /* Point to next Socket subtable */
3128 Offset
+= SubTable
->Length
;
3129 SubTable
= ACPI_ADD_PTR (ACPI_PMTT_HEADER
,
3130 SubTable
, SubTable
->Length
);
3135 /*******************************************************************************
3137 * FUNCTION: AcpiDmDumpS3pt
3139 * PARAMETERS: Table - A S3PT table
3141 * RETURN: Length of the table
3143 * DESCRIPTION: Format the contents of a S3PT
3145 ******************************************************************************/
3149 ACPI_TABLE_HEADER
*Tables
)
3152 UINT32 Offset
= sizeof (ACPI_TABLE_S3PT
);
3153 ACPI_FPDT_HEADER
*SubTable
;
3154 ACPI_DMTABLE_INFO
*InfoTable
;
3155 ACPI_TABLE_S3PT
*S3ptTable
= ACPI_CAST_PTR (ACPI_TABLE_S3PT
, Tables
);
3160 Status
= AcpiDmDumpTable (Offset
, 0, S3ptTable
, 0, AcpiDmTableInfoS3pt
);
3161 if (ACPI_FAILURE (Status
))
3166 SubTable
= ACPI_ADD_PTR (ACPI_FPDT_HEADER
, S3ptTable
, Offset
);
3167 while (Offset
< S3ptTable
->Length
)
3169 /* Common subtable header */
3171 AcpiOsPrintf ("\n");
3172 Status
= AcpiDmDumpTable (S3ptTable
->Length
, Offset
, SubTable
,
3173 SubTable
->Length
, AcpiDmTableInfoS3ptHdr
);
3174 if (ACPI_FAILURE (Status
))
3179 switch (SubTable
->Type
)
3181 case ACPI_S3PT_TYPE_RESUME
:
3183 InfoTable
= AcpiDmTableInfoS3pt0
;
3186 case ACPI_S3PT_TYPE_SUSPEND
:
3188 InfoTable
= AcpiDmTableInfoS3pt1
;
3193 AcpiOsPrintf ("\n**** Unknown S3PT subtable type 0x%X\n",
3196 /* Attempt to continue */
3198 if (!SubTable
->Length
)
3200 AcpiOsPrintf ("Invalid zero length subtable\n");
3206 AcpiOsPrintf ("\n");
3207 Status
= AcpiDmDumpTable (S3ptTable
->Length
, Offset
, SubTable
,
3208 SubTable
->Length
, InfoTable
);
3209 if (ACPI_FAILURE (Status
))
3215 /* Point to next subtable */
3217 Offset
+= SubTable
->Length
;
3218 SubTable
= ACPI_ADD_PTR (ACPI_FPDT_HEADER
, SubTable
, SubTable
->Length
);
3221 return (S3ptTable
->Length
);
3225 /*******************************************************************************
3227 * FUNCTION: AcpiDmDumpSlic
3229 * PARAMETERS: Table - A SLIC table
3233 * DESCRIPTION: Format the contents of a SLIC
3235 ******************************************************************************/
3239 ACPI_TABLE_HEADER
*Table
)
3242 (void) AcpiDmDumpTable (Table
->Length
, sizeof (ACPI_TABLE_HEADER
), Table
,
3243 Table
->Length
- sizeof (*Table
), AcpiDmTableInfoSlic
);
3247 /*******************************************************************************
3249 * FUNCTION: AcpiDmDumpSlit
3251 * PARAMETERS: Table - An SLIT
3255 * DESCRIPTION: Format the contents of a SLIT
3257 ******************************************************************************/
3261 ACPI_TABLE_HEADER
*Table
)
3273 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoSlit
);
3274 if (ACPI_FAILURE (Status
))
3279 /* Display the Locality NxN Matrix */
3281 Localities
= (UINT32
) ACPI_CAST_PTR (ACPI_TABLE_SLIT
, Table
)->LocalityCount
;
3282 Offset
= ACPI_OFFSET (ACPI_TABLE_SLIT
, Entry
[0]);
3283 Row
= (UINT8
*) ACPI_CAST_PTR (ACPI_TABLE_SLIT
, Table
)->Entry
;
3285 for (i
= 0; i
< Localities
; i
++)
3287 /* Display one row of the matrix */
3289 AcpiDmLineHeader2 (Offset
, Localities
, "Locality", i
);
3290 for (j
= 0; j
< Localities
; j
++)
3292 /* Check for beyond EOT */
3294 if (Offset
>= Table
->Length
)
3297 "\n**** Not enough room in table for all localities\n");
3301 AcpiOsPrintf ("%2.2X", Row
[j
]);
3304 /* Display up to 16 bytes per output row */
3306 if ((j
+1) < Localities
)
3310 if (j
&& (((j
+1) % 16) == 0))
3312 AcpiOsPrintf ("\\\n"); /* With line continuation char */
3313 AcpiDmLineHeader (Offset
, 0, NULL
);
3318 /* Point to next row */
3320 AcpiOsPrintf ("\n");
3326 /*******************************************************************************
3328 * FUNCTION: AcpiDmDumpSrat
3330 * PARAMETERS: Table - A SRAT table
3334 * DESCRIPTION: Format the contents of a SRAT
3336 ******************************************************************************/
3340 ACPI_TABLE_HEADER
*Table
)
3343 UINT32 Offset
= sizeof (ACPI_TABLE_SRAT
);
3344 ACPI_SUBTABLE_HEADER
*SubTable
;
3345 ACPI_DMTABLE_INFO
*InfoTable
;
3350 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoSrat
);
3351 if (ACPI_FAILURE (Status
))
3358 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, Table
, Offset
);
3359 while (Offset
< Table
->Length
)
3361 /* Common subtable header */
3363 AcpiOsPrintf ("\n");
3364 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3365 SubTable
->Length
, AcpiDmTableInfoSratHdr
);
3366 if (ACPI_FAILURE (Status
))
3371 switch (SubTable
->Type
)
3373 case ACPI_SRAT_TYPE_CPU_AFFINITY
:
3375 InfoTable
= AcpiDmTableInfoSrat0
;
3378 case ACPI_SRAT_TYPE_MEMORY_AFFINITY
:
3380 InfoTable
= AcpiDmTableInfoSrat1
;
3383 case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY
:
3385 InfoTable
= AcpiDmTableInfoSrat2
;
3388 case ACPI_SRAT_TYPE_GICC_AFFINITY
:
3390 InfoTable
= AcpiDmTableInfoSrat3
;
3394 AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n",
3397 /* Attempt to continue */
3399 if (!SubTable
->Length
)
3401 AcpiOsPrintf ("Invalid zero length subtable\n");
3407 AcpiOsPrintf ("\n");
3408 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3409 SubTable
->Length
, InfoTable
);
3410 if (ACPI_FAILURE (Status
))
3416 /* Point to next subtable */
3418 Offset
+= SubTable
->Length
;
3419 SubTable
= ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER
, SubTable
,
3425 /*******************************************************************************
3427 * FUNCTION: AcpiDmDumpStao
3429 * PARAMETERS: Table - A STAO table
3433 * DESCRIPTION: Format the contents of a STAO. This is a variable-length
3434 * table that contains an open-ended number of ASCII strings
3435 * at the end of the table.
3437 ******************************************************************************/
3441 ACPI_TABLE_HEADER
*Table
)
3445 UINT32 Length
= Table
->Length
;
3446 UINT32 StringLength
;
3447 UINT32 Offset
= sizeof (ACPI_TABLE_STAO
);
3452 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoStao
);
3453 if (ACPI_FAILURE (Status
))
3458 /* The rest of the table consists of Namepath strings */
3460 while (Offset
< Table
->Length
)
3462 Namepath
= ACPI_ADD_PTR (char, Table
, Offset
);
3463 StringLength
= strlen (Namepath
) + 1;
3465 AcpiDmLineHeader (Offset
, StringLength
, "Namestring");
3466 AcpiOsPrintf ("\"%s\"\n", Namepath
);
3468 /* Point to next namepath */
3470 Offset
+= StringLength
;
3475 /*******************************************************************************
3477 * FUNCTION: AcpiDmDumpTcpa
3479 * PARAMETERS: Table - A TCPA table
3483 * DESCRIPTION: Format the contents of a TCPA.
3485 * NOTE: There are two versions of the table with the same signature:
3486 * the client version and the server version. The common
3487 * PlatformClass field is used to differentiate the two types of
3490 ******************************************************************************/
3494 ACPI_TABLE_HEADER
*Table
)
3496 UINT32 Offset
= sizeof (ACPI_TABLE_TCPA_HDR
);
3497 ACPI_TABLE_TCPA_HDR
*CommonHeader
= ACPI_CAST_PTR (
3498 ACPI_TABLE_TCPA_HDR
, Table
);
3499 ACPI_TABLE_TCPA_HDR
*SubTable
= ACPI_ADD_PTR (
3500 ACPI_TABLE_TCPA_HDR
, Table
, Offset
);
3506 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
,
3507 0, AcpiDmTableInfoTcpaHdr
);
3508 if (ACPI_FAILURE (Status
))
3514 * Examine the PlatformClass field to determine the table type.
3515 * Either a client or server table. Only one.
3517 switch (CommonHeader
->PlatformClass
)
3519 case ACPI_TCPA_CLIENT_TABLE
:
3521 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3522 Table
->Length
- Offset
, AcpiDmTableInfoTcpaClient
);
3525 case ACPI_TCPA_SERVER_TABLE
:
3527 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3528 Table
->Length
- Offset
, AcpiDmTableInfoTcpaServer
);
3533 AcpiOsPrintf ("\n**** Unknown TCPA Platform Class 0x%X\n",
3534 CommonHeader
->PlatformClass
);
3539 if (ACPI_FAILURE (Status
))
3541 AcpiOsPrintf ("\n**** Cannot disassemble TCPA table\n");
3546 /*******************************************************************************
3548 * FUNCTION: AcpiDmDumpVrtc
3550 * PARAMETERS: Table - A VRTC table
3554 * DESCRIPTION: Format the contents of a VRTC
3556 ******************************************************************************/
3560 ACPI_TABLE_HEADER
*Table
)
3563 UINT32 Offset
= sizeof (ACPI_TABLE_VRTC
);
3564 ACPI_VRTC_ENTRY
*SubTable
;
3569 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoVrtc
);
3570 if (ACPI_FAILURE (Status
))
3577 SubTable
= ACPI_ADD_PTR (ACPI_VRTC_ENTRY
, Table
, Offset
);
3578 while (Offset
< Table
->Length
)
3580 /* Common subtable header */
3582 AcpiOsPrintf ("\n");
3583 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3584 sizeof (ACPI_VRTC_ENTRY
), AcpiDmTableInfoVrtc0
);
3585 if (ACPI_FAILURE (Status
))
3590 /* Point to next subtable */
3592 Offset
+= sizeof (ACPI_VRTC_ENTRY
);
3593 SubTable
= ACPI_ADD_PTR (ACPI_VRTC_ENTRY
, SubTable
,
3594 sizeof (ACPI_VRTC_ENTRY
));
3599 /*******************************************************************************
3601 * FUNCTION: AcpiDmDumpWdat
3603 * PARAMETERS: Table - A WDAT table
3607 * DESCRIPTION: Format the contents of a WDAT
3609 ******************************************************************************/
3613 ACPI_TABLE_HEADER
*Table
)
3616 UINT32 Offset
= sizeof (ACPI_TABLE_WDAT
);
3617 ACPI_WDAT_ENTRY
*SubTable
;
3622 Status
= AcpiDmDumpTable (Table
->Length
, 0, Table
, 0, AcpiDmTableInfoWdat
);
3623 if (ACPI_FAILURE (Status
))
3630 SubTable
= ACPI_ADD_PTR (ACPI_WDAT_ENTRY
, Table
, Offset
);
3631 while (Offset
< Table
->Length
)
3633 /* Common subtable header */
3635 AcpiOsPrintf ("\n");
3636 Status
= AcpiDmDumpTable (Table
->Length
, Offset
, SubTable
,
3637 sizeof (ACPI_WDAT_ENTRY
), AcpiDmTableInfoWdat0
);
3638 if (ACPI_FAILURE (Status
))
3643 /* Point to next subtable */
3645 Offset
+= sizeof (ACPI_WDAT_ENTRY
);
3646 SubTable
= ACPI_ADD_PTR (ACPI_WDAT_ENTRY
, SubTable
,
3647 sizeof (ACPI_WDAT_ENTRY
));
3652 /*******************************************************************************
3654 * FUNCTION: AcpiDmDumpWpbt
3656 * PARAMETERS: Table - A WPBT table
3660 * DESCRIPTION: Format the contents of a WPBT. This table type consists
3661 * of an open-ended arguments buffer at the end of the table.
3663 ******************************************************************************/
3667 ACPI_TABLE_HEADER
*Table
)
3670 ACPI_TABLE_WPBT
*SubTable
;
3671 UINT32 Length
= Table
->Length
;
3672 UINT16 ArgumentsLength
;
3675 /* Dump the main table */
3677 Status
= AcpiDmDumpTable (Length
, 0, Table
, 0, AcpiDmTableInfoWpbt
);
3678 if (ACPI_FAILURE (Status
))
3683 /* Extract the arguments buffer length from the main table */
3685 SubTable
= ACPI_CAST_PTR (ACPI_TABLE_WPBT
, Table
);
3686 ArgumentsLength
= SubTable
->ArgumentsLength
;
3688 /* Dump the arguments buffer */
3690 (void) AcpiDmDumpTable (Table
->Length
, 0, Table
, ArgumentsLength
,
3691 AcpiDmTableInfoWpbt0
);