From a58ff76fc6e68488d93b55016a7aeb257971a252 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Fri, 25 Sep 2020 17:39:34 -0600 Subject: [PATCH 31/45] Support PCCT in a big-endian world Signed-off-by: Al Stone --- source/common/dmtbdump2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: acpica-unix2-20211217/source/common/dmtbdump2.c =================================================================== --- acpica-unix2-20211217.orig/source/common/dmtbdump2.c +++ acpica-unix2-20211217/source/common/dmtbdump2.c @@ -1803,13 +1803,13 @@ AcpiDmDumpPcct ( ACPI_STATUS Status; ACPI_PCCT_SUBSPACE *Subtable; ACPI_DMTABLE_INFO *InfoTable; - UINT32 Length = Table->Length; + UINT32 TableLength = AcpiUtReadUint32 (&Table->Length); UINT32 Offset = sizeof (ACPI_TABLE_PCCT); /* Main table */ - Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoPcct); + Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoPcct); if (ACPI_FAILURE (Status)) { return; @@ -1818,12 +1818,12 @@ AcpiDmDumpPcct ( /* Subtables */ Subtable = ACPI_ADD_PTR (ACPI_PCCT_SUBSPACE, Table, Offset); - while (Offset < Table->Length) + while (Offset < TableLength) { /* Common subtable header */ AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, Subtable, + Status = AcpiDmDumpTable (TableLength, Offset, Subtable, Subtable->Header.Length, AcpiDmTableInfoPcctHdr); if (ACPI_FAILURE (Status)) { @@ -1871,7 +1871,7 @@ AcpiDmDumpPcct ( } AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, Subtable, + Status = AcpiDmDumpTable (TableLength, Offset, Subtable, Subtable->Header.Length, InfoTable); if (ACPI_FAILURE (Status)) {