Blame SOURCES/0034-Support-STAO-in-a-big-endian-world.patch

9897bb
From c313a76ce818135f02ab158a9f0c8e4b8e96698a Mon Sep 17 00:00:00 2001
9897bb
From: Al Stone <ahs3@redhat.com>
9897bb
Date: Mon, 28 Sep 2020 11:49:42 -0600
9897bb
Subject: [PATCH 34/45] Support STAO in a big-endian world
9897bb
9897bb
Signed-off-by: Al Stone <ahs3@redhat.com>
9897bb
---
9897bb
 source/common/dmtbdump3.c | 6 +++---
9897bb
 1 file changed, 3 insertions(+), 3 deletions(-)
9897bb
9897bb
Index: acpica-unix2-20210604/source/common/dmtbdump3.c
9897bb
===================================================================
9897bb
--- acpica-unix2-20210604.orig/source/common/dmtbdump3.c
9897bb
+++ acpica-unix2-20210604/source/common/dmtbdump3.c
9897bb
@@ -285,14 +285,14 @@ AcpiDmDumpStao (
9897bb
 {
9897bb
     ACPI_STATUS             Status;
9897bb
     char                    *Namepath;
9897bb
-    UINT32                  Length = Table->Length;
9897bb
+    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
9897bb
     UINT32                  StringLength;
9897bb
     UINT32                  Offset = sizeof (ACPI_TABLE_STAO);
9897bb
 
9897bb
 
9897bb
     /* Main table */
9897bb
 
9897bb
-    Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoStao);
9897bb
+    Status = AcpiDmDumpTable (TableLength, 0, Table, 0, AcpiDmTableInfoStao);
9897bb
     if (ACPI_FAILURE (Status))
9897bb
     {
9897bb
         return;
9897bb
@@ -300,7 +300,7 @@ AcpiDmDumpStao (
9897bb
 
9897bb
     /* The rest of the table consists of Namepath strings */
9897bb
 
9897bb
-    while (Offset < Table->Length)
9897bb
+    while (Offset < TableLength)
9897bb
     {
9897bb
         Namepath = ACPI_ADD_PTR (char, Table, Offset);
9897bb
         StringLength = strlen (Namepath) + 1;