2021-07-12 03:22:10 +00:00
|
|
|
From ce811b4c38b9a09533ee8bafa22813f6e43c023d Mon Sep 17 00:00:00 2001
|
2020-10-19 18:24:09 +00:00
|
|
|
From: Al Stone <ahs3@redhat.com>
|
|
|
|
Date: Fri, 18 Sep 2020 16:41:02 -0600
|
2021-07-12 03:22:10 +00:00
|
|
|
Subject: [PATCH 09/45] Support ASF! tables in a big-endian world
|
2020-10-19 18:24:09 +00:00
|
|
|
|
|
|
|
Read the table length properly and it all works right for big-endian.
|
|
|
|
|
|
|
|
Signed-off-by: Al Stone <ahs3@redhat.com>
|
|
|
|
---
|
|
|
|
source/common/dmtbdump1.c | 10 ++++++----
|
|
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
|
2022-03-10 02:45:13 +00:00
|
|
|
Index: acpica-unix2-20210730/source/common/dmtbdump1.c
|
2020-10-19 18:24:09 +00:00
|
|
|
===================================================================
|
2022-03-10 02:45:13 +00:00
|
|
|
--- acpica-unix2-20210730.orig/source/common/dmtbdump1.c
|
|
|
|
+++ acpica-unix2-20210730/source/common/dmtbdump1.c
|
|
|
|
@@ -298,16 +298,18 @@ AcpiDmDumpAsf (
|
2020-10-19 18:24:09 +00:00
|
|
|
UINT32 DataOffset = 0;
|
|
|
|
UINT32 i;
|
|
|
|
UINT8 Type;
|
|
|
|
+ UINT32 TableLength;
|
|
|
|
|
|
|
|
|
|
|
|
/* No main table, only subtables */
|
|
|
|
|
|
|
|
Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset);
|
|
|
|
- while (Offset < Table->Length)
|
2021-07-12 03:22:10 +00:00
|
|
|
+ TableLength = AcpiUtReadUint32 (&Table->Length);
|
2020-10-19 18:24:09 +00:00
|
|
|
+ while (Offset < TableLength)
|
|
|
|
{
|
|
|
|
/* Common subtable header */
|
|
|
|
|
|
|
|
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
|
|
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
|
|
|
|
Subtable->Header.Length, AcpiDmTableInfoAsfHdr);
|
|
|
|
if (ACPI_FAILURE (Status))
|
|
|
|
{
|
2022-03-10 02:45:13 +00:00
|
|
|
@@ -365,7 +367,7 @@ AcpiDmDumpAsf (
|
2020-10-19 18:24:09 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
|
|
|
+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
|
|
|
|
Subtable->Header.Length, InfoTable);
|
|
|
|
if (ACPI_FAILURE (Status))
|
|
|
|
{
|
2022-03-10 02:45:13 +00:00
|
|
|
@@ -382,7 +384,7 @@ AcpiDmDumpAsf (
|
2020-10-19 18:24:09 +00:00
|
|
|
for (i = 0; i < DataCount; i++)
|
|
|
|
{
|
|
|
|
AcpiOsPrintf ("\n");
|
|
|
|
- Status = AcpiDmDumpTable (Table->Length, DataOffset,
|
|
|
|
+ Status = AcpiDmDumpTable (TableLength, DataOffset,
|
|
|
|
DataTable, DataLength, DataInfoTable);
|
|
|
|
if (ACPI_FAILURE (Status))
|
|
|
|
{
|