acpica-tools/0028-Support-PCCT-in-a-big-endian-world.patch
Al Stone edb6c78416 Update to upstream 20200925 version
This update also means a major update for all of the big-endian patching
that has been done.  The older mechanism was getting to unwieldy to keep
maintained, and too sensitive to upstream changes.  Hence, redid all of
the old patches, and took the opportunity to make them more amenable to
change over time.  Ultimately, the goal is to have upstream accept these
in some form.

Signed-off-by: Al Stone <ahs3@redhat.com>
2020-10-19 12:24:09 -06:00

55 lines
1.9 KiB
Diff

From 661f59c00e991553fb3f5fe7786eb0e2f640805c Mon Sep 17 00:00:00 2001
From: Al Stone <ahs3@redhat.com>
Date: Fri, 25 Sep 2020 17:39:34 -0600
Subject: [PATCH 28/40] Support PCCT in a big-endian world
Signed-off-by: Al Stone <ahs3@redhat.com>
---
source/common/dmtbdump2.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: acpica-unix2-20200925/source/common/dmtbdump2.c
===================================================================
--- acpica-unix2-20200925.orig/source/common/dmtbdump2.c
+++ acpica-unix2-20200925/source/common/dmtbdump2.c
@@ -1286,13 +1286,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;
@@ -1301,12 +1301,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))
{
@@ -1349,7 +1349,7 @@ AcpiDmDumpPcct (
}
AcpiOsPrintf ("\n");
- Status = AcpiDmDumpTable (Length, Offset, Subtable,
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
Subtable->Header.Length, InfoTable);
if (ACPI_FAILURE (Status))
{