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