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

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