]> git.pld-linux.org Git - packages/acpica.git/blame - 0009-Support-ASF-tables-in-a-big-endian-world.patch
- updated to 20220331 + current Fedora patch set; acpinames is gone
[packages/acpica.git] / 0009-Support-ASF-tables-in-a-big-endian-world.patch
CommitLineData
b643ab7e
JB
1From ce811b4c38b9a09533ee8bafa22813f6e43c023d Mon Sep 17 00:00:00 2001
2From: Al Stone <ahs3@redhat.com>
3Date: Fri, 18 Sep 2020 16:41:02 -0600
4Subject: [PATCH 09/45] Support ASF! tables in a big-endian world
5
6Read the table length properly and it all works right for big-endian.
7
8Signed-off-by: Al Stone <ahs3@redhat.com>
9---
10 source/common/dmtbdump1.c | 10 ++++++----
11 1 file changed, 6 insertions(+), 4 deletions(-)
12
13Index: acpica-unix2-20220331/source/common/dmtbdump1.c
14===================================================================
15--- acpica-unix2-20220331.orig/source/common/dmtbdump1.c
16+++ acpica-unix2-20220331/source/common/dmtbdump1.c
17@@ -358,16 +358,18 @@ AcpiDmDumpAsf (
18 UINT32 DataOffset = 0;
19 UINT32 i;
20 UINT8 Type;
21+ UINT32 TableLength;
22
23
24 /* No main table, only subtables */
25
26 Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset);
27- while (Offset < Table->Length)
28+ TableLength = AcpiUtReadUint32 (&Table->Length);
29+ while (Offset < TableLength)
30 {
31 /* Common subtable header */
32
33- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
34+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
35 Subtable->Header.Length, AcpiDmTableInfoAsfHdr);
36 if (ACPI_FAILURE (Status))
37 {
38@@ -425,7 +427,7 @@ AcpiDmDumpAsf (
39 return;
40 }
41
42- Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
43+ Status = AcpiDmDumpTable (TableLength, Offset, Subtable,
44 Subtable->Header.Length, InfoTable);
45 if (ACPI_FAILURE (Status))
46 {
47@@ -442,7 +444,7 @@ AcpiDmDumpAsf (
48 for (i = 0; i < DataCount; i++)
49 {
50 AcpiOsPrintf ("\n");
51- Status = AcpiDmDumpTable (Table->Length, DataOffset,
52+ Status = AcpiDmDumpTable (TableLength, DataOffset,
53 DataTable, DataLength, DataInfoTable);
54 if (ACPI_FAILURE (Status))
55 {
This page took 0.073731 seconds and 4 git commands to generate.